A source code package automatic compilation method, system, device and storage medium
Through the automatic compilation method and system of source code packages, the RPM package warehouse is automatically compiled and updated with programs, which solves the problems of low compilation efficiency of source code packages and susceptible to system environment in the existing technology, and realizes efficient and automated compilation of source code packages, reducing the compilation of source code packages in a faster and more efficient way. labor costs and error rates.
Patent Information
- Application Number
- CN202111682512.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-30
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2041-12-30
AI Technical Summary
In the prior art, source code package compilation tools such as rpmbuild and Mock require manual operation, resulting in a lot of manpower and time required to compile a large number of source code packages, which is easy to affect the system environment, and can only compile one source code package once, which is inefficient.
Provides an automatic compilation method and system for source code packages, automatically compiles source code packages through programs, uses RPM package warehouse for batch compilation, and recompiles failed packages during loop compilation, realizing automated batch compilation and reducing labor costs and time costs.
It realizes automatic batch compilation of source code packages, improves compilation efficiency, reduces error rates, reduces labor costs and time costs, and is isolated from the system environment and does not affect the system environment.
Smart Images

Figure CN114327487B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, system, device and storage medium for automatically compiling a source code package. Background Art
[0002] Currently, source code packages are generally compiled through rpmbuild or Mock. Among them, rpmbuild compiles source code packages based on the existing system environment, which requires the installation of a large number of source code dependency packages and even the modification of environment variables, resulting in damage to the existing system environment and is not easy to manage and restore. In addition, rpmbuild can only compile source code packages for the corresponding architecture system. In response to the shortcomings of rpmbuild, Mock came into being. Mock is a tool for building packages. It can build packages under different architectures from the build host or different versions of Fedora, RHEL, and Mageia. Mock creates a chroot and builds packages in it. Its only task is to reliably fill the chroot and try to build packages in the chroot. Mock essentially uses rpmbuild for compilation, but because Mock is isolated from the system environment, it will not affect the system environment itself, and the architecture system can be configured according to requirements for corresponding compilation.
[0003] However, Mock and rpmbuild can only compile one source code package at a time. After one source code package is compiled manually, the next source code package needs to be compiled according to the input command. Therefore, when using Mock and rpmbuild to compile a large number of source code packages, a lot of manpower and time are required. Especially for Linux system developers, there are thousands or even tens of thousands of source code packages in the warehouse of a system that need to be compiled, which takes a lot of time to compile the warehouse source code. Summary of the invention
[0004] The purpose of the present invention is to solve one of the technical problems existing in the prior art to at least a certain extent.
[0005] To this end, an object of an embodiment of the present invention is to provide a method for automatically compiling a source code package, which automatically compiles the source code package by running a program, greatly reducing labor costs and improving the efficiency of source code package compilation.
[0006] Another object of an embodiment of the present invention is to provide a source code package automatic compilation system.
[0007] In order to achieve the above technical objectives, the technical solutions adopted by the embodiments of the present invention include:
[0008] In a first aspect, an embodiment of the present invention provides a method for automatically compiling a source code package, comprising the following steps:
[0009] Run a program, the program including a first path, a second path, a first parameter and a second parameter, the first path is a path of a source code package warehouse, the second path is a path of an RPM package warehouse, and the value of the second parameter is the number of automatic compilation cycles of the source code package;
[0010] If the first parameter is rpm, compile the first source code package to obtain an RPM package and a second source code package, wherein the first source code package is saved in the first path, and the second source code package is the source code package that fails to compile;
[0011] Sorting the RPM packages in alphabetical order of package names and outputting them to the second path;
[0012] Update the RPM package repository according to the RPM package;
[0013] Determine whether the compilation of the first source code package is complete, and if so, determine whether to perform loop compilation according to the second parameter;
[0014] If yes, compile the second source package according to the RPM package repository.
[0015] An automatic source code package compilation method according to an embodiment of the present invention automatically compiles all source code packages in a first path through a program, thereby realizing automatic batch compilation of source code packages, improving compilation efficiency, and reducing labor costs and time costs; by updating an RPM package warehouse and recompiling source code packages that have failed to compile according to the RPM package warehouse during cyclic compilation, the error rate of batch compilation of source code packages is reduced, thereby further improving compilation efficiency.
[0016] In addition, the automatic source code package compilation method according to the above embodiment of the present invention may also have the following additional technical features:
[0017] Furthermore, in a source code package automatic compilation method according to an embodiment of the present invention, if the first parameter is rpm, compiling the first source code package to obtain an RPM package and a second source code package further includes:
[0018] The second source code package is saved to a third path.
[0019] Further, in one embodiment of the present invention, the first parameter is rpm or src;
[0020] If the first parameter is rpm, compiling the first source code package to obtain an RPM package and a second source code package also includes the following steps:
[0021] If the first parameter is src, a third source code package is generated.
[0022] Further, in one embodiment of the present invention, updating the RPM package warehouse according to the RPM package includes:
[0023] Generate warehouse data according to the RPM package;
[0024] The RPM package warehouse is updated according to the warehouse data.
[0025] Further, in one embodiment of the present invention, the program further includes a third parameter;
[0026] The method for automatically compiling a source code package also includes the following steps:
[0027] Whether to end automatic compilation is determined according to the third parameter.
[0028] In a second aspect, an embodiment of the present invention provides a source code package automatic compilation system, including:
[0029] Program running module, used to run the program;
[0030] A first source code package compiling module, configured to compile the first source code package to obtain an RPM package and a second source code package if the first parameter is rpm;
[0031] An RPM package output module, used for sorting the RPM packages in alphabetical order of package names and outputting them to the second path;
[0032] An RPM package warehouse update module, used to update the RPM package warehouse according to the RPM package;
[0033] A loop compilation module, used for determining whether the compilation of the first source code package is completed, and if so, determining whether to perform loop compilation according to the second parameter;
[0034] The second source code package compiling module is used to compile the second source code package according to the RPM package warehouse if yes.
[0035] Furthermore, in one embodiment of the present invention, the RPM package repository update module includes:
[0036] The warehouse data generation module is used to generate warehouse data according to the RPM package.
[0037] Furthermore, in one embodiment of the present invention, the automatic compilation system for source code packages further includes:
[0038] A third source code package generating module, configured to generate a third source code package if the first parameter is src;
[0039] The automatic compilation ending module is used to determine whether to end the automatic compilation according to the third parameter.
[0040] In a third aspect, an embodiment of the present invention provides a source code package automatic compilation device, comprising:
[0041] at least one processor;
[0042] at least one memory for storing at least one program;
[0043] When the at least one program is executed by the at least one processor, the at least one processor implements the method for automatically compiling a source code package.
[0044] In a fourth aspect, an embodiment of the present invention provides a storage medium, in which a program executable by a processor is stored. When the program executable by the processor is executed by the processor, it is used to implement the method for automatically compiling a source code package.
[0045] The advantages and benefits of the present invention will be partially given in the following description, and partially become apparent from the following description, or be understood through the practice of the present application:
[0046] The embodiment of the present invention automatically compiles all source code packages in the first path through a program, thereby realizing automatic batch compilation of source code packages, improving compilation efficiency, and reducing labor costs and time costs; by updating the RPM package warehouse and recompiling the source code packages that failed to compile according to the RPM package warehouse during cyclic compilation, the error rate of batch compilation of source code packages is reduced, and the compilation efficiency is further improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following introduction is made to the drawings of the embodiments of the present application or the related technical solutions in the prior art. It should be understood that the drawings introduced below are only for the convenience of clearly describing some embodiments of the technical solutions of the present application. For technical personnel in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0048] Figure 1 A schematic diagram of a specific embodiment of a method for automatically compiling a source code package according to the present invention;
[0049] Figure 2 It is a structural schematic diagram of a specific embodiment of a source code package automatic compilation system of the present invention;
[0050] Figure 3 The figure is a schematic diagram of the structure of a specific embodiment of a source code package automatic compilation device of the present invention. DETAILED DESCRIPTION
[0051] Embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and are not to be construed as limitations on the present application. For the step numbers in the following embodiments, they are only provided for the convenience of explanation, and the order between the steps is not limited in any way, and the execution order of each step in the embodiment can be adaptively adjusted according to the understanding of those skilled in the art.
[0052] The terms "first", "second", "third" and "fourth" etc. in the specification and claims of the present invention and the drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.
[0053] Reference to "embodiments" in the present invention means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0054] Currently, source code packages are generally compiled through rpmbuild or Mock. Among them, rpmbuild compiles source code packages based on the existing system environment, which requires the installation of a large number of source code dependency packages and even the modification of environment variables, resulting in damage to the existing system environment and is not easy to manage and restore. In addition, rpmbuild can only compile source code packages for the corresponding architecture system. In response to the shortcomings of rpmbuild, Mock came into being. Mock is a tool for building packages. It can build packages under different architectures from the build host or different versions of Fedora, RHEL, and Mageia. Mock creates a chroot and builds packages in it. Its only task is to reliably fill the chroot and try to build packages in the chroot. Mock essentially uses rpmbuild for compilation, but because Mock is isolated from the system environment, it will not affect the system environment itself, and the architecture system can be configured according to requirements for corresponding compilation.
[0055] However, Mock and rpmbuild can only compile one source code package at a time. After one source code package is compiled manually, the next source code package needs to be compiled according to the input command. Therefore, when using Mock and rpmbuild to compile a large number of source code packages, a lot of manpower and time are required. Especially for Linux system developers, there are thousands or even tens of thousands of source code packages in the warehouse of a system that need to be compiled, which takes a lot of time to compile the warehouse source code.
[0056] To this end, the present invention proposes a method and system for automatically compiling source code packages, which automatically compile all source code packages in the first path through a program, thereby realizing automatic batch compilation of source code packages, improving compilation efficiency, and reducing labor costs and time costs; by updating the RPM package warehouse and recompiling the source code packages that failed to compile according to the RPM package warehouse during cyclic compilation, the error rate of batch compilation of source code packages is reduced, and the compilation efficiency is further improved.
[0057] A method and system for automatically compiling a source code package according to an embodiment of the present invention will be described in detail below with reference to the accompanying drawings. First, a method for automatically compiling a source code package according to an embodiment of the present invention will be described with reference to the accompanying drawings.
[0058] Reference Figure 1 In an embodiment of the present invention, a method for automatically compiling a source code package is provided. The method for automatically compiling a source code package in an embodiment of the present invention can be applied to a terminal, a server, or software running in a terminal or a server. The terminal can be a tablet computer, a laptop computer, a desktop computer, etc., but is not limited to this. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution networks (CDNs), and big data and artificial intelligence platforms. A method for automatically compiling a source code package in an embodiment of the present invention mainly includes the following steps:
[0059] S101, running program;
[0060] The program includes a first path, a second path, a first parameter, a second parameter and a third parameter. The first path is the path of the source code package warehouse, the second path is the path of the RPM package warehouse, and the value of the second parameter is the number of automatic compilation cycles of the source code package.
[0061] Specifically, the running program is generated and executed in the shell terminal. In one embodiment of the present invention, the program is . / buildsrpm.sh rpm centos-8-nsdl-aarch64 Build / NDE-V4 / SRPMS / Build / nde-src-v4.3.6-rc6 / Build / NDE-V4 / 10. Among them, rpm is the value of the first parameter, indicating that the source code package is compiled to generate a binary RPM package; Build / NDE-V4 / SRPMS / Build / nde-src-v4.3.6-rc6 / is the first path; Build / NDE-V4 / is the second path; 10 is the value of the second parameter, indicating that the number of loop compilations of the source code package in the first path is 10; . / buildsrpm.sh is the third parameter, and centos-8-nsdl-aarch64 is the Mock configuration file.
[0062] By referencing the Mock configuration file, a source code package automatic compilation method according to an embodiment of the present invention has the advantages of Mock, is isolated from the system environment, and does not affect the system environment itself when modifying parameters or variables, and can perform corresponding compilation according to the required configuration architecture system; by generating and executing the running program in the shell terminal, a source code package automatic compilation method according to an embodiment of the present invention can run across platforms and can be applied in different systems (such as x86, aarch64 and mips64el) without adjustment.
[0063] S102: If the first parameter is rpm, compile the first source code package to obtain an RPM package and a second source code package;
[0064] The first source code package is stored in the first path, and the second source code package is source code package information that fails to compile, and the source code package information that fails to compile includes a source code package name and a source code package location.
[0065] Specifically, when compiling the source code package, the relevant files of the corresponding RPM package in the RPM package warehouse are required to compile normally. The second source code package that failed to compile is recorded in the form of text and saved to the third path Rpmbuild-failed.log. In an embodiment of the present invention, the information of recording the second source code package is set and modified through the third parameter . / buildsrpm.sh (script program).
[0066] In an embodiment of the present invention, the first parameter is rpm or src. If the first parameter is src, an operation of generating a third source code package is performed. In this case, the program is . / buildsrpm.sh src centos-8-nsdl-aarch64Build / NDE-V4 / SRPMS / Build / nde-src-v4.3.6-rc6 / Build / NDE-V4 / 10.
[0067] S103, sorting the RPM packages in alphabetical order of package names, and outputting the RPM packages to the second path;
[0068] Specifically, the first source code packages are sorted according to the letters of the package names, without distinguishing between uppercase and lowercase letters.
[0069] S104, updating the RPM package warehouse according to the RPM package;
[0070] Specifically, according to step S102, when compiling the source code package, the relevant files of the corresponding RPM package in the RPM package warehouse are needed to compile normally. It is understandable that updating the RPM package to the RPM package warehouse can obtain an RPM package warehouse with richer RPM packages, thereby improving the success rate of subsequent source code package compilation.
[0071] S104 can be further divided into the following steps S1041-S1042:
[0072] Step S1041, generating warehouse data according to the RPM package;
[0073] Step S1042: Update the RPM package warehouse according to the warehouse data.
[0074] S105, determining whether the first source code package has been compiled, and if so, determining whether to perform loop compilation according to the second parameter;
[0075] According to step S101, the value of the second parameter is the number of loop compilations.
[0076] Specifically, if the source code package has been compiled, the number of loop compilations is determined according to the value of the second parameter, and each loop compilation only compiles the source code package (the second source code package) that failed to compile in the third path.
[0077] S106: If yes, compile the second source code package according to the RPM package repository.
[0078] Specifically, the number of loop compilations is determined according to the value of the second parameter. When the second parameter is not 0, loop compilation is performed, and the second source code package is compiled according to steps S102-S105 according to the RPM package warehouse. When the compilation is successful, the RPM package is generated and the RPM package warehouse is updated. If the compilation fails, the information of the failed source code package is recorded in the third path, and the recorded failed source code package is compiled again in the next loop, and the cycle is repeated.
[0079] It is understandable that, in combination with step S102 and step S103, the RPM package repository contains more abundant RPM packages, which improves the success rate of compiling the second source package. By cyclic compilation and RPM package repository update, the success rate of compiling the source package is improved.
[0080] A method for automatically compiling a source code package according to an embodiment of the present invention further includes the following steps:
[0081] Whether to end automatic compilation is determined according to the third parameter.
[0082] Specifically, according to step S101, the third parameter is . / buildsrpm.sh (script program). In the embodiment of the present invention, the automatic compilation process is terminated by specifying the exit parameter through . / buildsrpm.sh, such as . / buildsrpm.shexit.
[0083] Next, a source code package automatic compilation system proposed according to an embodiment of the present application is described with reference to the accompanying drawings.
[0084] Figure 2 It is a schematic diagram of the structure of a source code package automatic compilation system according to an embodiment of the present application.
[0085] The system specifically comprises:
[0086] A program running module 201 is used to run a program;
[0087] A first source code package compiling module 202, configured to compile the first source code package to obtain an RPM package and a second source code package if the first parameter is rpm;
[0088] An RPM package output module 203, used to sort the RPM packages in alphabetical order of package names and output them to the second path;
[0089] An RPM package warehouse updating module 204 is used to update the RPM package warehouse according to the RPM package;
[0090] A loop compilation module 205, used to determine whether the compilation of the first source code package is completed, and if so, determine whether to perform loop compilation according to the second parameter;
[0091] The second source code package compiling module 206 is configured to compile the second source code package according to the RPM package repository if yes.
[0092] As an optional implementation mode, the RPM package warehouse update module includes:
[0093] The warehouse data generation module is used to generate warehouse data according to the RPM package.
[0094] As an optional implementation manner, the system further includes:
[0095] A third source code package generating module, configured to generate a third source code package if the first parameter is src;
[0096] The automatic compilation ending module is used to determine whether to end the automatic compilation according to the third parameter.
[0097] It can be seen that the contents of the above method embodiments are all applicable to the present system embodiments, the functions specifically implemented by the present system embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0098] Reference Figure 3 , the embodiment of the present application provides a source code package automatic compilation device, including:
[0099] at least one processor 301;
[0100] At least one memory 302, used to store at least one program;
[0101] When the at least one program is executed by the at least one processor 301, the at least one processor 301 implements the method for automatically compiling a source code package.
[0102] Similarly, the contents of the above method embodiments are all applicable to the present device embodiments. The functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0103] In some optional embodiments, the function / operation mentioned in the block diagram may not occur in the order mentioned in the operation diagram. For example, depending on the function / operation involved, the two boxes shown in succession can actually be executed substantially simultaneously or the boxes can sometimes be executed in reverse order. In addition, the embodiment presented and described in the flow chart of the application is provided by way of example, for the purpose of providing a more comprehensive understanding of technology. The disclosed method is not limited to the operation and logic flow presented herein. Optional embodiments are expected, wherein the order of various operations is changed and the sub-operation described as a part of a larger operation is performed independently.
[0104] In addition, although the present application is described in the context of functional modules, it should be understood that, unless otherwise specified, one or more of the functions and / or features can be integrated into a single physical device and / or software module, or one or more functions and / or features can be implemented in a separate physical device or software module. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the present application. More specifically, in view of the properties, functions, and internal relationships of the various functional modules in the device disclosed herein, the actual implementation of the module will be understood within the conventional techniques of the engineer. Therefore, those skilled in the art can implement the present application set forth in the claims without excessive experimentation using ordinary techniques. It is also understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present application, which is determined by the full scope of the attached claims and their equivalents.
[0105] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several programs to enable a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0106] The logic and / or steps represented in the flowchart or otherwise described herein, for example, may be considered as an ordered list of executable programs for implementing the logical functions, and may be embodied in any computer-readable medium for use by a program execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch and execute a program from a program execution system, device or apparatus), or in conjunction with such program execution systems, devices or apparatuses. For purposes of this specification, a "computer-readable medium" may be any device that can contain, store, communicate, propagate or transmit a program for use by a program execution system, device or apparatus, or in conjunction with such program execution systems, devices or apparatuses.
[0107] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.
[0108] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable program execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0109] In the above description of this specification, the description with reference to the terms "one embodiment / example", "another embodiment / example" or "certain embodiments / examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0110] Although the embodiments of the present application have been shown and described, those skilled in the art will appreciate that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present application, and that the scope of the present application is defined by the claims and their equivalents.
[0111] The above is a specific description of the preferred implementation of the present application, but the present application is not limited to the described embodiments. Technical personnel familiar with the field may make various equivalent modifications or substitutions without violating the spirit of the present application. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present application.
Claims
1. A method for automatically compiling a source code package, characterized in that: The following steps are involved: Run a program, the program including a first path, a second path, a first parameter and a second parameter, the first path is a path of a source code package warehouse, the second path is a path of an RPM package warehouse, and the value of the second parameter is the number of automatic compilation cycles of the source code package; If the first parameter is rpm, compile the first source code package to obtain an RPM package and a second source code package, wherein the first source code package is stored in the first path, and the second source code package is source code package information that fails to compile, and the source code package information that fails to compile includes a source code package name and a source package location; Sorting the RPM packages in alphabetical order of package names and outputting them to the second path; Update the RPM package repository according to the RPM package; Determine whether the compilation of the first source code package is complete, and if so, determine whether to perform loop compilation according to the second parameter; If yes, compile the second source package according to the RPM package repository.
2. A method for automatically compiling a source code package according to claim 1, characterized in that: If the first parameter is rpm, compile the first source code package to obtain an RPM package and a second source code package, and further include: The second source code package is saved to a third path.
3. A method for automatically compiling a source code package according to claim 1, characterized in that: The first parameter is rpm or src; If the first parameter is rpm, compiling the first source code package to obtain an RPM package and a second source code package also includes the following steps: If the first parameter is src, a third source code package is generated.
4. A method for automatically compiling a source code package according to claim 1, characterized in that: The updating of the RPM package warehouse according to the RPM package includes: Generate warehouse data according to the RPM package; The RPM package warehouse is updated according to the warehouse data.
5. A method for automatically compiling a source code package according to claim 1, characterized in that: The program also includes a third parameter; The method for automatically compiling a source code package also includes the following steps: Whether to end automatic compilation is determined according to the third parameter.
6. A source code package automatic compilation system, characterized in that: include: Program running module, used to run the program; A first source code package compiling module, used for compiling the first source code package to obtain an RPM package and a second source code package if the first parameter is rpm; An RPM package output module, used for sorting the RPM packages in alphabetical order of package names and outputting them to a second path; An RPM package warehouse update module, used to update the RPM package warehouse according to the RPM package; A loop compilation module, used to determine whether the compilation of the first source code package is completed, and if so, determine whether to perform loop compilation according to a second parameter; The second source code package compiling module is used to compile the second source code package according to the RPM package warehouse if yes.
7. A source code package automatic compilation system according to claim 6, characterized in that: The RPM package warehouse update module includes: The warehouse data generation module is used to generate warehouse data according to the RPM package.
8. A source code package automatic compilation system according to claim 6, characterized in that: Also includes: A third source code package generating module, configured to generate a third source code package if the first parameter is src; The automatic compilation end module is used to determine whether to end the automatic compilation according to the third parameter.
9. A source code package automatic compilation device, characterized in that: include: at least one processor; at least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements a source code package automatic compilation method as described in any one of claims 1 to 5.
10. A storage medium storing a program executable by a processor, characterized in that: The processor-executable program is used to implement a source code package automatic compilation method as described in any one of claims 1 to 5 when executed by the processor.
Citation Information
Patent Citations
Code compiling method, device, equipment and storage medium
CN110704066A
Automatic compiling and software version publishing method
CN112114815A
