CN112214221B - Method and equipment for constructing Linux system - Google Patents

Method and equipment for constructing Linux system Download PDF

Info

Publication number
CN112214221B
CN112214221B CN202011080369.XA CN202011080369A CN112214221B CN 112214221 B CN112214221 B CN 112214221B CN 202011080369 A CN202011080369 A CN 202011080369A CN 112214221 B CN112214221 B CN 112214221B
Authority
CN
China
Prior art keywords
software package
compiling
software
dependency
package
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011080369.XA
Other languages
Chinese (zh)
Other versions
CN112214221A (en
Inventor
韦帅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Suninfo Technology Co ltd
Original Assignee
Shanghai Suninfo Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Suninfo Technology Co ltd filed Critical Shanghai Suninfo Technology Co ltd
Priority to CN202011080369.XA priority Critical patent/CN112214221B/en
Publication of CN112214221A publication Critical patent/CN112214221A/en
Application granted granted Critical
Publication of CN112214221B publication Critical patent/CN112214221B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/43Checking; Contextual analysis
    • G06F8/433Dependency analysis; Data or control flow analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

According to the method and the device for constructing the Linux system, a plurality of software packages are firstly obtained, wherein the software packages are used for constructing the Linux system, then the operation dependency relationship among the software packages is determined based on a preset operation dependency detection rule, then the compiling dependency relationship among the software packages is determined based on the preset compiling dependency detection rule, then the compiling sequence among the software packages is determined based on the compiling dependency relationship among the software packages and the operation dependency relationship, and finally the corresponding software packages are recursively compiled based on the compiling sequence among the software packages, so that the Linux system is constructed. By the method, the software package for constructing the Linux system can obtain a determined compiling environment based on the explicit software package dependency relationship so as to construct a controllable Linux system, and the requirement of controllable compiling environment in the process of constructing the Linux system can be met.

Description

Method and equipment for constructing Linux system
Technical Field
The application relates to the technical field of computer operating systems, in particular to a technology for constructing a Linux system.
Background
Linux systems are open source systems, typically consisting of hundreds or thousands of software packages, with intricate dependencies between the software packages, developed and maintained by different programmers around the world. Compilation of software packages is the most important step in the construction of Linux operating systems. Factors that affect the running and compiling results of a software package include: the compilation environment, the software code and the compilation parameters, for example, the software package A is the running dependence of the software package B, if the software package A has problems, the software package B is not available; if the software package C is a compiling dependency of the software package D, if the software package C is not in the compiling environment, the software package D cannot be compiled normally.
The traditional Linux operating system construction method compiles the existing basic software package, adds a new software package and then integrates the new basic software package into a new Linux operating system, but only ensures that software codes and compiling parameters are definitely controllable in the construction process, and cannot ensure the controllability of the compiling environment.
Disclosure of Invention
The purpose of the application is to provide a method and equipment for constructing a Linux system, which are used for solving the technical problem that the compiling environment is uncontrollable in the existing Linux system construction process.
According to one aspect of the present application, there is provided a method for Linux system construction, wherein the method includes:
acquiring a plurality of software packages, wherein the software packages are used for constructing the Linux system;
determining an operation dependency relationship between each software package based on a preset operation dependency detection rule;
determining compiling dependency relationships among each software package based on preset compiling dependency detection rules;
determining the compiling sequence among the software packages based on the compiling dependency relationship and the running dependency relationship among the software packages;
and recursively compiling the corresponding software packages based on the compiling sequence among the software packages so as to construct the Linux system.
Optionally, the determining the operation dependency relationship between each software package based on the preset operation dependency detection rule includes:
acquiring all operation dependency information of each software package based on a preset operation dependency detection rule;
based on all the operation dependency information of each software package, obtaining relevant software package information of the operation dependency of the software package, traversing the plurality of software packages to determine the operation dependency relationship between each software package.
Optionally, the acquiring all the operation dependency information of each software package based on the preset operation dependency detection rule further includes:
all the acquired running dependency information of each software package is processed to remove useless information in the running dependency information.
Optionally, all the operation dependency information of the software package at least includes:
running file information on which the software package depends, wherein the file information comprises a dynamic link library file name and a storage path thereof;
related software package information, wherein the related software package is dependent on which the software package is run.
Optionally, the determining the compiling dependency relationship between each software package based on the preset compiling dependency detection rule includes:
acquiring all compiling dependency information of each software package based on a preset compiling dependency detection rule;
based on all the compiling dependency information of each software package, relevant software package information of the compiling dependency of the software package is obtained, and the plurality of software packages are traversed to determine the compiling dependency relationship between each software package.
Optionally, the acquiring all compiling dependency information of each software package based on the preset compiling dependency detection rule further includes:
all compiled dependency information of each acquired software package is processed to remove the garbage information therein.
Optionally, said recursively compiling the corresponding software packages based on the compiling order between each software package to construct the Linux system includes:
recursively compiling the corresponding software packages based on the compiling sequence among the software packages to determine the minimum compiling environment required by compiling each software package;
and constructing the Linux system based on the minimum compiling environment required by compiling each software package.
Optionally, the method further includes:
acquiring a new version software package of one or more software packages of the Linux system;
updating the corresponding software package in the Linux system into a new version software package;
recursively determining relevant software packages dependent on the updated software packages based on the compiling sequence between each software package;
the relevant software packages are compiled recursively to ensure the integrity of the Linux system based on partial software package updates.
According to another aspect of the present application, there is also provided an apparatus for Linux system construction, wherein the apparatus includes:
the first device is used for acquiring a plurality of software packages, wherein the software packages are used for constructing the Linux system;
the second device is used for determining the operation dependency relationship between each software package based on a preset operation dependency detection rule;
the third device is used for determining the compiling dependency relationship between each software package based on a preset compiling dependency detection rule;
a fourth means for determining a compilation order between each of the software packages based on the compilation dependency and the operation dependency between each of the software packages;
fifth means for recursively compiling the corresponding software packages based on the compiling order between each software package to construct the Linux system.
Compared with the prior art, the method and the device for constructing the Linux system are characterized in that a plurality of software packages are firstly obtained, wherein the software packages are used for constructing the Linux system, then the operation dependency relationship among the software packages is determined based on a preset operation dependency detection rule, then the compiling dependency relationship among the software packages is determined based on a preset compiling dependency detection rule, then the compiling sequence among the software packages is determined based on the compiling dependency relationship among the software packages and the operation dependency relationship, and finally the corresponding software packages are recursively compiled based on the compiling sequence among the software packages, so that the Linux system is constructed. By the method, the software package for constructing the Linux system can obtain a determined compiling environment based on the explicit software package dependency relationship so as to construct a controllable Linux system, and the requirement of controllable compiling environment in the process of constructing the Linux system can be met.
Drawings
Other features, objects and advantages of the present invention will become more apparent upon reading of the detailed description of non-limiting embodiments, made with reference to the accompanying drawings in which:
FIG. 1 illustrates a flow chart of a method for Linux system construction in accordance with an aspect of the present application;
FIG. 2 illustrates a schematic diagram of an apparatus for Linux system construction in accordance with another aspect of the present application;
the same or similar reference numbers in the drawings refer to the same or similar parts.
Detailed Description
The invention is described in further detail below with reference to the accompanying drawings.
In a typical configuration of the subject application, each of the system's modules and trusted parties includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer readable media, as defined herein, does not include non-transitory computer readable media (transmission media), such as modulated data signals and carrier waves.
In order to further describe the technical means and effects adopted by the present application, the following description will be made in detail and complete with reference to the accompanying drawings and preferred embodiments.
FIG. 1 illustrates a flow chart of a method for Linux system construction in one aspect of the present application, wherein the method of one embodiment comprises:
s11, acquiring a plurality of software packages, wherein the software packages are used for constructing the Linux system;
s12, determining the operation dependency relationship between each software package based on a preset operation dependency detection rule;
s13, determining compiling dependency relationships among each software package based on preset compiling dependency detection rules;
s14, determining the compiling sequence among the software packages based on the compiling dependency relationship and the running dependency relationship among the software packages;
s15, recursively compiling corresponding software packages based on the compiling sequence among the software packages to construct the Linux system.
In the present application, the method is performed by the device 1, the device 1 being a computer device and/or a cloud, the computer device including, but not limited to, a personal computer, a notebook computer, an industrial computer, a network host, a single network server, a plurality of network server sets; the Cloud is composed of a large number of computers or network servers based on Cloud Computing (Cloud Computing), which is one of distributed Computing, a virtual supercomputer composed of a group of loosely coupled computer sets.
The computer device and/or cloud is only exemplary, and other devices and/or resource sharing platforms that may be present or hereafter presented, as applicable, are also included within the scope of the present application, and are hereby incorporated by reference herein.
In this embodiment, the Linux system may be a minimum system that ensures that the Linux system can operate after compiling and installing based on the most basic software package, or may be a Linux system that includes various kinds of applications that can be executed thereon.
In the step S11, the device 1 obtains a plurality of software packages required for constructing the Linux system through a network or a copy, for example, the device 1 obtains a plurality of RPM software packages for constructing the Linux system. The acquisition mode is not limited herein, and any software package or file acquisition mode is also included in the protection scope of the present application if applicable.
In this embodiment as well, in said step S12, the device 1 determines the operation dependency relationship between each software package based on preset operation dependency detection rules.
Optionally, the step S12 includes:
acquiring all operation dependency information of each software package based on a preset operation dependency detection rule;
based on all the operation dependency information of each software package, obtaining relevant software package information of the operation dependency of the software package, traversing the plurality of software packages to determine the operation dependency relationship between each software package.
For example, if the device 1 adopts a Linux system environment based on an rpm package manager, after the device 1 acquires a plurality of rpm packages, all files and file attributes on which each rpm package runs are acquired firstly by searching, for example, by searching dynamically linked files contained in the rpm packages, listing all dynamic link library files and paths on which the rpm packages depend by using an ldd command, then acquiring all dependent file paths and other information recorded by the rpm-qR command, searching and recording file path information of all rpm packages in the system by using an rpm-ql command, recording provider information of all rpm packages in the system by using an rpm-filename-q command, and then performing special processing on special information in the information, for example: rtld (gnu_hash), qt-sqlite (x 86-64), rubygem (ruby) (ruby (rubygems), ruby) (release), tcl (abi), ruby (tex (perl, procp-ng, openjade) and other information can be matched to specific rpm packages, and then the provider information of these rpm packages and all files and file attributes on which the obtained rpm packages run depend are searched and matched to obtain the names of the packages on which each rpm package runs, and finally the related software package list on which each rpm package runs depends is obtained.
For example, for one software package a, all the dependent file paths and other information of the running a software package recorded in the rpm can be obtained through the rpm-qR a command, the relevant software package on which the running a software package depends can be determined by comparing other software package information (other software package information can be obtained through the rpm-filename-q command search key), for example, if the dependent file paths and other information of the running a software package contain/bin/flash information, and if the flash software package information contains/bin/flash is found by searching the other software package information, then the flash software package can be determined to be one running dependency of the a software package.
In the above embodiment, if the device 1 adopts other Linux system versions, for example, linux system based on deb software package manager, only the relevant commands related to the software package manager need to be adjusted accordingly.
Optionally, the acquiring all the operation dependency information of each software package based on the preset operation dependency detection rule further includes:
all the acquired running dependency information of each software package is processed to remove useless information in the running dependency information.
For example, in the above embodiment, after obtaining the provider information of the rpm package, the blacklist processing is performed on the useless information after confirmation, so as to provide useful information for the subsequent processing, then the useful information is searched and matched with all files and file attributes on which the obtained rpm package is run, so as to obtain the package name on which each rpm package is run, and finally the obtained package name on which each rpm package is run is subjected to the deduplication processing, so as to obtain the relevant package list on which each rpm package is run.
Optionally, all the operation dependency information of the software package at least includes:
running file information on which the software package depends, wherein the file information comprises a dynamic link library file name and a storage path thereof;
related software package information, wherein the related software package is dependent on which the software package is run.
Continuing in this embodiment, in said step S13, the device 1 determines a compilation dependency between each software package based on preset compilation dependency detection rules.
Optionally, the step S13 includes:
acquiring all compiling dependency information of each software package based on a preset compiling dependency detection rule;
based on all the compiling dependency information of each software package, relevant software package information of the compiling dependency of the software package is obtained, and the plurality of software packages are traversed to determine the compiling dependency relationship between each software package.
For a Linux system environment based on an rpm software package manager, firstly, a space command is used to execute rpm software package compiling, an open file path and an execution file path in the whole compiling process are tracked and recorded, for example, a space-e trace=open is used to obtain a space output file, the space-e trace=open is used, the execution-f-q command records and outputs an operation of opening a file (open) and an operation of executing the file (execute) of the executed compiling command in a compiling process to a file, (for example, space-e trace=open, execution-f-q-o/tmp/log rpchild SPEC/SPEC, namely, operation information in the process of executing the rpb-ba c/ntp.spec command is output to a/tmp/log file), information in the space output file is extracted and recorded, for example, en extracts and records the operation information in the executed compiling command in the space output file, extracts and records the file, and then extracts the relevant information in the space command, and records the window, and the related information in the space command, and the rpm file is removed, and the related information is searched for the file is obtained, and the related information is searched by the path.
For example, if in the Linux system construction process, there is a compilation dependency B package of the a package and a compilation dependency C package of the B package, the compilation sequence of the packages A, B, C should be: firstly compiling an A software package, building a minimum compiling environment according to the compiled A software package, then compiling a B software package in the minimum compiling environment, and then building a new minimum compiling environment according to the compiled A software package and the compiled B software package, wherein the new minimum compiling environment is used for compiling a C software package in the minimum compiling environment. Each software package A, B, C with the above compiled dependencies can be correctly compiled separately in this order.
Further, if the software packages constructing the Linux system are dependent on each other, for example, the compiling of the a software package depends on the B software package, and the compiling of the B software package depends on the a software package, then the a B a compiling or the B a B compiling needs to be performed to obtain the correct software package.
Optionally, the acquiring all compiling dependency information of each software package based on the preset compiling dependency detection rule further includes:
all compiled dependency information of each acquired software package is processed to remove the garbage information therein.
For example, in the above embodiment, the rpm-qf command is used to search all the extracted and recorded file path information, then the information containing "is not owned by any package" is filtered out to obtain the package names of the open and exeve files in the compiling process, and then the obtained package names are subjected to the de-duplication processing, so as to finally obtain the complete compiling dependency relationship corresponding to the rpm package.
In this embodiment as well, in said step S14, the device 1 determines the compilation order between each software package based on the compilation dependencies and the run dependencies between each software package.
For example, if a Linux system is built by using A, B, C, D, E, F software packages, the device 1 determines the compiling dependency relationship and the running dependency relationship between each software package in steps S12 and S13, for example, the following dependency relationship exists between each software package: compilation of the D package depends on the B, C package; compiling the C software package depends on the B software package; compiling the software package B depends on the software package A; whereas the running of the a package depends on the E package; the operation of the software package B depends on the software package F; the running of the F software package depends on the A software package, and the compiling sequence among the software packages is as follows: the E package is compiled first, then the A package is compiled, then the F package is compiled, then the B package is compiled, then the C package is compiled, and finally the D package is compiled.
Continuing in this embodiment, in said step S15, the device 1 recursively compiles the corresponding software packages based on the compilation order between said each software package to build said Linux system.
For example, for a Linux system environment based on an rpm package manager, if a Linux system is built by A, B, C, D, E, F packages, the compiling order among the packages is determined to be: firstly compiling an E software package, then compiling an A software package, then compiling an F software package, then compiling a B software package, then compiling a C software package, and finally compiling a D software package, and then the device 1 recursively compiles the corresponding software package through an rpmbuild command to complete the construction of the Linux system.
Optionally, the step S15 includes:
recursively compiling the corresponding software packages based on the compiling sequence among the software packages to determine the minimum compiling environment required by compiling each software package;
and constructing the Linux system based on the minimum compiling environment required by compiling each software package.
The minimum compiling environment required by the compiling of the software package refers to a direct compiling dependent software package of the software package and a recursively running dependent software package of compiling the dependencies. For example, if a Linux system is built by using A, B, C, D, E, F software packages, the device 1 determines the compiling dependency relationship and the running dependency relationship between each software package in steps S12 and S13, for example, the following dependency relationship exists between each software package: compilation of the D package depends on the B, C package; compiling the C software package depends on the B software package; compiling the software package B depends on the software package A; whereas the running of the a package depends on the E package; the operation of the software package B depends on the software package F; the running of the F software package depends on the A software package, and the compiling sequence among the software packages is as follows: the E package is compiled first, then the A package is compiled, then the F package is compiled, then the B package is compiled, then the C package is compiled, and finally the D package is compiled. The direct compiling dependency software package of the D software package is a B, C software package, the running dependency software package of the B software package is an F software package, the running dependency software package of the F software package is an A software package, and the running dependency software package of the A software package is an E software package, so that the minimum compiling environment of the D software package can be determined to comprise A, B, C, E, F software packages; the compiling dependency software package of the software package C is the software package B, the running dependency software package of the software package B is the software package F, the running dependency software package of the software package F is the software package A, and the running dependency software package of the software package A is the software package E, the minimum compiling environment of the software package C can be determined to comprise a A, B, E, F software package; a similar thing may determine that the minimum compilation environment for the B package includes the A, E, F package.
For each software package, the minimum compiling environment is determined, and the software package is compiled under the minimum compiling environment, so that the aim of controllable compiling environment can be fulfilled, and the situation that different compiling versions are caused by different compiling environments and the software packages with different compiling versions cannot be guaranteed to be universal can be avoided. The method comprises the steps that a root directory of an original Linux system compiling environment can be switched to a minimum compiling environment corresponding to a software package through a color command, at the moment, under the root directory of the minimum compiling environment corresponding to the software package, a directory structure and a file under the root directory of the original Linux system compiling environment cannot be accessed, and when the software package is compiled, the directory structure and the file under the root directory of the corresponding minimum compiling environment are read.
Typically, conventional Linux system maintenance will only perform version maintenance on the target software package that needs to be upgraded or changed, while the relevant software package that it depends on is not processed, for example, if the operation of the D software package depends on the C software package,while the running of the C package depends on the B package, if the version of the B package is B v1 Existing new version B v2 Only the B package is typically updated. The operation of the B software package after updating is normal, but the C software package and the D software package can be influenced by the updating of the B software package to be unavailable, and the compatibility of each software package in the Linux system is influenced.
Optionally, the method further includes:
acquiring a new version software package of one or more software packages of the Linux system;
updating the corresponding software package in the Linux system into a new version software package;
recursively determining relevant software packages dependent on the updated software packages based on the compiling sequence between each software package;
the relevant software packages are compiled recursively to ensure the integrity of the Linux system based on partial software package updates.
For example, in a Linux system of the device 1, if the D package is running on the C package and the C package is running on the B package, if the version of the B package is B v1 Version of the C software package is C v1 Version of the D software package is D v1 If the B software package needs to be updated. First, a new version B of the B software package is obtained v2 Then update the B software package to the new version B v2 Then recursively determining a C software package and a D software package depending on the B software package based on the compiling sequence among the software packages, and finally recursively compiling the C software package and the D software package to update the C software package to a new version C v2 Updating a D software package to a new version D v2 To ensure the integrity of the Linux system after being updated based on the B software package. The method can avoid incompatibility of related software packages in the Linux system caused by local software package updating, can realize version of the Linux system, can realize version control and can ensure the integrity of the Linux system.
FIG. 2 shows a schematic diagram of an apparatus for Linux system construction according to another aspect of the present application, wherein the apparatus comprises:
a first device 21, configured to obtain a plurality of software packages, where the software packages are used to construct the Linux system;
a second means 22 for determining an operation dependency relationship between each software package based on a preset operation dependency detection rule;
third means 23 for determining a compilation dependency relationship between each software package based on a preset compilation dependency detection rule;
fourth means 24 for determining a compilation order between each software package based on the compilation dependency and the run dependency between each software package;
fifth means 25 for recursively compiling the corresponding software packages based on the compiling sequence between each software package to construct the Linux system.
In this embodiment, the device is identical to device 1.
The first device 21 of the apparatus 1 obtains a plurality of software packages, wherein the software packages are used for constructing the Linux system, the second device 22 of the apparatus 1 determines an operation dependency relationship between each software package based on a preset operation dependency detection rule, the third device 23 of the apparatus 1 determines a compilation dependency relationship between each software package based on a preset compilation dependency detection rule, the fourth device 24 of the apparatus 1 determines a compilation sequence between each software package based on the compilation dependency relationship and the operation dependency relationship between each software package, and the fifth device 25 of the apparatus 1 recursively compiles corresponding software packages based on the compilation sequence between each software package to construct the Linux system.
According to yet another aspect of the present application, there is also provided a computer readable medium storing computer readable instructions executable by a processor to implement the foregoing method.
According to yet another aspect of the present application, there is also provided an apparatus, wherein the apparatus includes:
one or more processors; and
a memory storing computer readable instructions that, when executed, cause the processor to perform operations of the method as described above.
For example, computer-readable instructions, when executed, cause the one or more processors to: acquiring a plurality of software packages, wherein the software packages are used for constructing the Linux system; determining an operation dependency relationship between each software package based on a preset operation dependency detection rule; determining compiling dependency relationships among each software package based on preset compiling dependency detection rules; determining the compiling sequence among the software packages based on the compiling dependency relationship and the running dependency relationship among the software packages; and recursively compiling the corresponding software packages based on the compiling sequence among the software packages so as to construct the Linux system.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential characteristics thereof. The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned. Furthermore, it is evident that the word "comprising" does not exclude other elements or steps, and that the singular does not exclude a plurality. A plurality of units or means recited in the apparatus claims can also be implemented by means of one unit or means in software or hardware. The terms first, second, etc. are used to denote a name, but not any particular order.

Claims (10)

1. A method for Linux system construction, the method comprising:
acquiring a plurality of software packages, wherein the software packages are used for constructing the Linux system;
determining an operation dependency relationship between each software package based on a preset operation dependency detection rule;
determining compiling dependency relationships among each software package based on preset compiling dependency detection rules;
determining the compiling sequence among the software packages based on the compiling dependency relationship and the running dependency relationship among the software packages;
and recursively compiling the corresponding software packages based on the compiling sequence among the software packages to determine the minimum compiling environment required by compiling the software packages, and constructing the Linux system based on the minimum compiling environment required by compiling the software packages, wherein the minimum compiling environment required by compiling the software packages refers to a direct compiling dependent software package of the software packages and a recursively running dependent software package of compiling dependencies.
2. The method of claim 1, wherein determining the operational dependency between each software package based on the preset operational dependency detection rules comprises:
acquiring all operation dependency information of each software package based on a preset operation dependency detection rule;
based on all the operation dependency information of each software package, obtaining relevant software package information of the operation dependency of the software package, traversing the plurality of software packages to determine the operation dependency relationship between each software package.
3. The method of claim 2, wherein the obtaining all operation dependency information for each software package based on the preset operation dependency detection rules further comprises:
all the acquired running dependency information of each software package is processed to remove useless information in the running dependency information.
4. A method according to claim 2 or 3, characterized in that all the run-dependent information of the software package comprises at least:
running file information on which the software package depends, wherein the file information comprises a dynamic link library file name and a storage path thereof;
related software package information, wherein the related software package is dependent on which the software package is run.
5. The method of claim 1, wherein determining compilation dependencies between each software package based on preset compilation dependency detection rules comprises:
acquiring all compiling dependency information of each software package based on a preset compiling dependency detection rule;
based on all the compiling dependency information of each software package, relevant software package information of the compiling dependency of the software package is obtained, and the plurality of software packages are traversed to determine the compiling dependency relationship between each software package.
6. The method of claim 5, wherein the obtaining all compilation dependency information for each software package based on the preset compilation dependency detection rules further comprises:
all compiled dependency information of each acquired software package is processed to remove the garbage information therein.
7. The method according to claim 1, wherein the method further comprises:
acquiring a new version software package of one or more software packages of the Linux system;
updating the corresponding software package in the Linux system into a new version software package;
recursively determining relevant software packages dependent on the updated software packages based on the compiling sequence between each software package;
the relevant software packages are compiled recursively to ensure the integrity of the Linux system based on partial software package updates.
8. An apparatus for Linux system construction, the apparatus comprising:
the first device is used for acquiring a plurality of software packages, wherein the software packages are used for constructing the Linux system;
the second device is used for determining the operation dependency relationship between each software package based on a preset operation dependency detection rule;
the third device is used for determining the compiling dependency relationship between each software package based on a preset compiling dependency detection rule;
a fourth means for determining a compilation order between each of the software packages based on the compilation dependency and the operation dependency between each of the software packages;
and fifth means for recursively compiling the corresponding software packages based on the compiling order between the software packages to determine a minimum compiling environment required for compiling each software package, and constructing the Linux system based on the minimum compiling environment required for compiling each software package, wherein the minimum compiling environment required for compiling the software packages refers to a direct compiling dependent software package of the software package and a recursively running dependent software package of the compiling dependency.
9. A computer-readable medium comprising,
having stored thereon computer readable instructions executable by a processor to implement the method of any of claims 1 to 7.
10. An apparatus, the apparatus comprising:
one or more processors; and
a memory storing computer readable instructions that, when executed, cause the processor to perform the operations of the method of any one of claims 1 to 7.
CN202011080369.XA 2020-10-10 2020-10-10 Method and equipment for constructing Linux system Active CN112214221B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011080369.XA CN112214221B (en) 2020-10-10 2020-10-10 Method and equipment for constructing Linux system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011080369.XA CN112214221B (en) 2020-10-10 2020-10-10 Method and equipment for constructing Linux system

Publications (2)

Publication Number Publication Date
CN112214221A CN112214221A (en) 2021-01-12
CN112214221B true CN112214221B (en) 2023-04-28

Family

ID=74053163

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011080369.XA Active CN112214221B (en) 2020-10-10 2020-10-10 Method and equipment for constructing Linux system

Country Status (1)

Country Link
CN (1) CN112214221B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113721916B (en) * 2021-07-29 2023-07-14 苏州浪潮智能科技有限公司 Compiling method, device and equipment of operating system and readable storage medium
CN113672262B (en) * 2021-08-18 2024-03-15 中标软件有限公司 Automatic upgrading method of linux terminal system
CN115934106B (en) * 2023-03-14 2023-06-02 麒麟软件有限公司 Method for rapidly detecting source dependency integrity of apt warehouse

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103119561A (en) * 2010-09-23 2013-05-22 苹果公司 Systems and methods for compiler-based vectorization of non-leaf code
CN106325965A (en) * 2015-06-24 2017-01-11 龙芯中科技术有限公司 Method and device for compiling of operating system
CN110737438A (en) * 2018-07-20 2020-01-31 北京君正集成电路股份有限公司 data processing method and device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7904892B2 (en) * 2006-01-06 2011-03-08 Northrop Grumman Corporation Systems and methods for identifying and displaying dependencies
CN103530148B (en) * 2013-09-18 2016-09-07 国云科技股份有限公司 A kind of dissemination method of large-scale Linux software kit
CN104077140B (en) * 2014-07-04 2017-11-07 用友网络科技股份有限公司 Automation Compilation Method and compilation device for continuous integrating
CN104391733B (en) * 2014-12-10 2017-11-24 华中科技大学 A kind of method according to dependence on-the-flier compiler software kit
CN111078229A (en) * 2019-12-20 2020-04-28 北京天融信网络安全技术有限公司 Application processing method and device, storage medium and electronic equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103119561A (en) * 2010-09-23 2013-05-22 苹果公司 Systems and methods for compiler-based vectorization of non-leaf code
CN106325965A (en) * 2015-06-24 2017-01-11 龙芯中科技术有限公司 Method and device for compiling of operating system
CN110737438A (en) * 2018-07-20 2020-01-31 北京君正集成电路股份有限公司 data processing method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Samer Arandi等."Combining Compile and Run-Time Dependency Resolution in Data-Driven Multithreading".《2011 First Workshop on Data-Flow Execution Models for Extreme Scale Computing》.2012,第1-4页. *
顾昊等."基于SAT的软件包依赖问题的研究".《中国科学院计算技术研究所第九届计算机科学与技术研究生学术讨论会》.2006,第1-6页. *

Also Published As

Publication number Publication date
CN112214221A (en) 2021-01-12

Similar Documents

Publication Publication Date Title
CN112214221B (en) Method and equipment for constructing Linux system
US10990365B2 (en) Container image building using dependency container images
KR102010508B1 (en) System and method for updating source code files
US20200192658A1 (en) Identifying versions of running programs using signatures derived from object files
US10169347B2 (en) Layer identification and dependency analysis for management of images
US8245217B2 (en) Management of software and operating system updates required for the process of creating a virtual machine facsimile of an existing physical or virtual machine
US10942734B2 (en) Software dependency shading
US9639558B2 (en) Image building
US7802302B1 (en) Single scan for a base machine and all associated virtual machines
CN111414231B (en) Method and equipment for mutual conversion between virtual machine mirror image and container mirror image
US10019257B2 (en) Parallel development of a software system
US20210097037A1 (en) Container software discovery and cataloging
US20160062754A1 (en) Coordinating Application Deployment with a Platform Tier
JP6088031B2 (en) Flexible metadata composition
US9116714B2 (en) Methods and systems for file processing
CN108304184B (en) Compiling method and device
US10120664B2 (en) Incremental build generation
US11531531B1 (en) Non-disruptive introduction of live update functionality into long-running applications
US11947495B1 (en) System and method for providing a file system without duplication of files
US20210240596A1 (en) Source code file retrieval
US7565355B1 (en) Merging file systems during a disk clone operation
CN114281760A (en) Registration method and system of data item file, electronic device and storage medium
CN115080390A (en) Method, device and equipment for software patch package regression test
CN117519724A (en) Concurrent compiling method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant