Software package automatic construction method and device for SW platform, equipment and storage medium

By building an automated build system on the Shenwei platform and configuring an independent build environment, we solve the problems of cumbersome software package management and lack of automated builds in the existing technology, achieve rapid batch build and management of software packages, and improve build efficiency and management. normative.

CN118796261APending Publication Date: 2024-10-18WUXI ADVANCED TECH RES INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411083406.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-08
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

The existing technology lacks an automated construction method for software packages on the Shenwei platform, resulting in cumbersome and repetitive software package management and the inability to automate the process and identify source code packages of binary files, which increases the cost and management difficulty of the compilation environment.

Method used

Adopt an automated build system, configure an independent build environment through central scheduling components, build-side components, warehouse update components, web-side components and databases, release software package construction tasks in batches, and achieve clean room compilation and binary file unification for each software package manage.

Benefits of technology

It realizes the rapid batch construction and management of software packages on the Shenwei platform, reduces the cost of the compilation environment, improves the construction efficiency and management standardization, and realizes the automation, process and unification of software packages.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118796261A_ABST
    Figure CN118796261A_ABST
Patent Text Reader

Abstract

The invention discloses a software package automatic construction method, device and equipment for a SW platform and a storage medium, and the automatic construction method comprises the steps: releasing software package construction tasks in batches in a pre-constructed automatic construction system according to all obtained source code package list files of a target operating system, obtaining all binary software packages of the target operating system; the construction method of the automatic construction system comprises the following steps: installing an automatic construction component into a server to obtain the automatic construction system, and configuring system parameters of the automatic construction system; and configuring a basic compiling environment and an external warehouse of the automatic construction system according to the target operating system type to obtain a construction target of the software package construction task. Software packages can be quickly constructed in batches, and meanwhile, each software package adopts an independent construction environment to complete clean room compiling.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of software package automation construction, and in particular to a software package automation construction method, device, equipment and storage medium for the Shenwei platform. Background Art

[0002] At present, the Shenwei architecture chip is undergoing rapid iteration and upgrading. The operating system is a huge collection of software, so it is imperative to quickly build software packages to adapt to the operating system of each version of Shenwei chips. At present, the software ecosystem of the Shenwei platform is expanding, which puts higher requirements on the software package management of developers. The rapid iteration of the operating system also means a lot of tedious and repetitive software package building work. Therefore, efficient and automated software package building is an urgent need for the Shenwei platform, aiming to quickly batch build software packages and effectively manage the iterative updates of software packages. At present, the Shenwei platform adopts a unified rpm (RedHat Package Manager) package format, and uses the basic build tool rpmbuild to manually compile and build software packages. The build activity has not yet achieved process automation.

[0003] Currently, the basic build tool rpmbuild uses the same build environment to build software packages. The mixed build environment sometimes cannot align with the environment required by the software package to be compiled, and the compilation dependencies of most software need to be installed manually, which greatly increases the cost of aligning the compilation environment. At the same time, all binary files generated by rpmbuild are located in the same directory, and it is impossible to identify which binary files come from a certain source package, which is inconvenient for the management and use of software packages. Summary of the invention

[0004] The purpose of the present invention is to overcome the deficiencies in the prior art and to provide a method, device, equipment and storage medium for automatically building a software package for the Shenwei platform. The method for automatically building a software package can quickly build software packages in batches, and each software package uses an independent construction environment to complete clean room compilation.

[0005] To achieve the above object, the present invention is implemented by adopting the following technical solutions:

[0006] In a first aspect, the present invention provides a method for automatically constructing a software package for the Shenwei platform, comprising:

[0007] According to the obtained list files of all source packages of the target operating system, batch publish software package building tasks in the pre-built automated building system to obtain all binary software packages of the target operating system;

[0008] The method for constructing the automated construction system includes:

[0009] Install the automated build component into the server to obtain the automated build system, and configure the system parameters of the automated build system;

[0010] Configure the basic compilation environment and external warehouse of the automated build system according to the target operating system type to obtain the build target of the software package build task.

[0011] Furthermore, the automated construction components include: a central scheduling component, a construction end component, a warehouse update component, a web end component, a client end component and a database;

[0012] The system parameters of the configuration automated build system include:

[0013] Generate trust credentials between the central scheduling component and each component;

[0014] Initialize the database of the automated build system, create database tables with different functions, and start the database service;

[0015] Initialize the administrator user of the client component;

[0016] Configure the authentication method, database access information, web access address, and top-level directory for software package storage of the central dispatch component, and start network services;

[0017] Configure the corresponding credential information of the build-side component, warehouse update component, web-side component, client component, and central scheduling component information to the corresponding configuration files, and put the trust credentials into the corresponding top-level directory of the software package storage;

[0018] Add a build host to the database, configure the load capacity of the build host based on the performance of the build host, and start the build service and warehouse update service.

[0019] Furthermore, the database tables with different functions are used to store data information of the automated construction system itself;

[0020] The data information of the automated construction system itself includes: client users, user authority information, construction end host information and external warehouse information, etc.

[0021] Furthermore, configuring the basic compilation environment and external warehouse for the target operating system type includes:

[0022] Create a target tag; wherein one target tag corresponds to one operating system;

[0023] Create a build tag, configure the build architecture to be the Shenwei architecture, and use the target tag as the parent tag of the build tag;

[0024] Configure external repositories to build tags, and set external repositories priority and merge mode;

[0025] Configure the software set required for the basic compilation environment to the build tag;

[0026] Create a build target, configure the combination of build tags and target tags to the build target, and build and manage software packages using the build target as an identifier.

[0027] Furthermore, the method for obtaining the list file of all source code packages of the target operating system includes: creating a local directory of source code packages, storing the source code packages of all software to be compiled of the target operating system in the local directory, and generating a list file of source code packages.

[0028] Furthermore, the batch publishing software package building task according to the source package list file includes:

[0029] S1. Read the source code package list file line by line. The source code package information recorded in each line of the source code package list file includes: software name, version number and release number.

[0030] S2. Add the software name corresponding to the current source code package to the target tag, and specify the user to whom the current software belongs;

[0031] S3, configure the source code address corresponding to the current source code package, configure the build target to specify the clean room build environment configuration and the target label to which the build product belongs after the build is successful, and publish the software package build task of the current source code package;

[0032] S4. Repeat steps S1 to S3 until all lines in the source package list file are read and the software package building tasks are released in batches.

[0033] Furthermore, after the batch release of the software package building task, if there is no failed build, all binary software packages of the target operating system are integrated;

[0034] If there is a failed build, locate the failed build task according to the build failure log and re-publish the build task.

[0035] In a second aspect, the present invention provides a software package automatic construction device for the Shenwei platform, comprising:

[0036] The software package automatic construction module is used to batch publish software package construction tasks in a pre-built automatic construction system according to all the source code package list files of the target operating system, and obtain all the binary software packages of the target operating system;

[0037] The method for constructing the automated construction system includes:

[0038] Install the automated build component into the server to obtain the automated build system, and configure the system parameters of the automated build system;

[0039] Configure the basic compilation environment and external warehouse of the automated build system according to the target operating system type to obtain the build target of the software package build task.

[0040] In a third aspect, the present invention provides a computer device, including a processor and a storage medium;

[0041] The storage medium is used to store instructions;

[0042] The processor is used to operate according to the instructions to execute the steps of the method for automatically building a software package for the Shenwei platform according to the first aspect.

[0043] In a fourth aspect, the present invention provides a storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method for automatically constructing a software package for the Shenwei platform described in the first aspect.

[0044] Compared with the prior art, the present invention has the following beneficial effects:

[0045] The above-mentioned method of automatic software package construction can automatically build any target operating system software package that is compatible with the Shenwei platform; distributed construction of multiple build hosts can realize efficient parallel construction of multiple build tasks; customized basic compilation environment for target operating system type can realize cleanroom compilation of each software package in an independent compilation environment. Personalized configuration of the build environment of multiple target operating systems can realize batch synchronous construction of multiple operating system software packages under the Shenwei platform, realize automation and process-based construction of software packages in the Shenwei ecosystem, and unify and standardize software package management. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 The figure is a flow chart of a method for automatically constructing a software package for the Shenwei platform provided by an embodiment of the present invention;

[0047] Figure 2 FIG. 1 is a schematic diagram of the architecture of a system for automatically building a software package provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0048] The technical concept of the present invention is: according to all source code package list files of the target operating system, batch release software package building tasks in a pre-built automated building system to obtain all binary software packages of the target operating system. Software packages can be built in batches quickly, and each software package uses an independent building environment to complete cleanroom compilation.

[0049] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. The following description of at least one exemplary embodiment is actually only illustrative and is by no means intended to limit the present application and its application or use.

[0050] Example 1

[0051] According to all source package list files of the target operating system, batch publish software package building tasks in the pre-built automated building system to obtain all binary software packages of the target operating system;

[0052] The method for constructing the automated construction system is as follows: Figure 1 As shown, the specific steps include:

[0053] S10. Build an automated build system and configure system parameters, including:

[0054] Install automated build components to the server, including: central scheduling components, build-side components, warehouse update components, web-side components, client components, and databases. Figure 2 : is a diagram of the system architecture for automatically building a software package in an embodiment of the present invention. The specific configuration steps include:

[0055] S11. Generate trust credentials between the central scheduling component and each component to ensure the security of the entire construction system;

[0056] S12, initialize the database of the entire build system, create database tables with different functions to store the data information of the automated build system itself, including: client users, user authority information, build end host information, external warehouse information, etc., and start the database service;

[0057] S13. Initialize the administrator user of the build client for subsequent management of new users, configuration of build hosts, configuration of external repositories, release of build tasks, etc.

[0058] S14, configure the authentication method of the central dispatch component, database access information, web access address, and top-level directory for storing software packages, and start network services;

[0059] S15, configure the corresponding credential information of the build-end component, warehouse update component, web-end component, client component and central scheduling component information to their configuration files, and put the authentication credentials into the corresponding directories;

[0060] S16. Add a build host to the database, configure the load capacity of the build host based on the performance of the build host, and start the build service and warehouse update service.

[0061] S20. Configure the basic compilation environment and external warehouse according to the operating system type, including:

[0062] To build software packages for different operating systems, the configuration of the basic compilation environment and the external warehouse are different. The following takes the configuration of the Euler operating system on the Shenwei platform as an example:

[0063] S21, create a target tag as the parent tag of the subsequent tag construction, one target tag corresponds to one operating system;

[0064] S22, create a build tag, configure the build architecture to be the Shenwei architecture, and inherit the target tag in step S21;

[0065] S23. Configure the external warehouse to the build tag in step S22, and set the warehouse priority and merge mode;

[0066] S24, configuring the software set required for the basic compilation environment to the build tag in step S22, including basic compilation environment tools such as gcc, make, and rpm-build, for creating a cleanroom build environment for each software package;

[0067] S25. Create a build target, configure the combination relationship between the build tag and the target tag to this target, and subsequently build and manage software packages using the target as an identifier: build each software package using the configuration of the build tag, and the built software package belongs to the target tag.

[0068] S30. Create a local directory of source packages and a list file of source packages, including:

[0069] S31, creating a local directory of source code packages on the build host, and storing the source code packages of all software to be compiled in the directory;

[0070] S32. Generate a source code package list file for subsequent batch release build tasks.

[0071] S40, batch release build tasks, including:

[0072] S41, reading the source code package list generated in step S32 line by line, wherein the source code package information recorded in each line of the source code package list file is: software name - version number - release number;

[0073] S42, adding the software name corresponding to the source code package to the target tag in step S21, and specifying the user to whom the software belongs;

[0074] S43, configure the source code address corresponding to the source code package in step S42, configure the build target to specify the clean room build environment configuration and the target tag to which the build product belongs after the build is successful, and publish the software package build task;

[0075] S44: Repeat steps S41 to S43 until all the lines in the source package list are read.

[0076] After batch publishing of tasks in step S44, the central scheduling component will read the load capacity information of the build host in the database to distribute the build tasks to the build host. For tasks that failed to build, the build web component is used to view the build failure log, quickly locate and troubleshoot, and re-publish the build task.

[0077] S50, integrating the corresponding operating system binary software package, specifically including:

[0078] In this automated construction method, all construction products are stored in the same top-level directory in a hierarchical directory of software package name-version number-release number. Since the target tag of the construction product is specified in step S43, the list of software packages to which the target tag belongs is read to sort out all binary software packages of the operating system corresponding to the target tag.

[0079] Example 2

[0080] This embodiment provides a software package automatic construction device for the Shenwei platform, including:

[0081] The software package automatic construction module is used to batch publish software package construction tasks in a pre-built automatic construction system according to all the source code package list files of the target operating system, and obtain all the binary software packages of the target operating system;

[0082] The method for constructing the automated construction system includes:

[0083] Install the automated build component into the server to obtain the automated build system, and configure the system parameters of the automated build system;

[0084] Configure the basic compilation environment and external warehouse of the automated build system according to the target operating system type to obtain the build target of the software package build task.

[0085] Example 3

[0086] This embodiment provides a computer device, including a processor and a storage medium;

[0087] The storage medium is used to store instructions;

[0088] The processor is used to operate according to the instructions to execute the steps of the method for automatically building a software package for the Shenwei platform according to Example 1.

[0089] Example 4

[0090] This embodiment provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for automatically building a software package for the Shenwei platform described in Example 1 are implemented.

[0091] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0092] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0093] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0094] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0095] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A method for automatically constructing a software package for the Shenwei platform, characterized in that: include: According to the obtained list files of all source packages of the target operating system, batch publish software package building tasks in the pre-built automated building system to obtain all binary software packages of the target operating system; The method for constructing the automated construction system includes: Install the automated build component into the server to obtain the automated build system, and configure the system parameters of the automated build system; Configure the basic compilation environment and external warehouse of the automated build system according to the target operating system type to obtain the build target of the software package build task.

2. The method for automatically constructing a software package for the Shenwei platform according to claim 1, characterized in that: The automated construction components include: a central scheduling component, a construction end component, a warehouse update component, a web end component, a client end component and a database; The system parameters of the configuration automated build system include: Generate trust credentials between the central scheduling component and each component; Initialize the database of the automated build system, create database tables with different functions, and start the database service; Initialize the administrator user of the client component; Configure the authentication method, database access information, web access address, and top-level directory for software package storage of the central dispatch component, and start network services; Configure the corresponding credential information of the build-side component, warehouse update component, web-side component, client component, and central scheduling component information to the corresponding configuration files, and put the trust credentials into the corresponding top-level directory of the software package storage; Add a build host to the database, configure the load capacity of the build host based on the performance of the build host, and start the build service and warehouse update service.

3. The method for automatically constructing a software package for the Shenwei platform according to claim 2, characterized in that: The database tables with different functions are used to store data information of the automated construction system itself; The data information of the automated construction system itself includes: client users, user authority information, construction end host information and external warehouse information.

4. The method for automatically constructing a software package for the Shenwei platform according to claim 1, characterized in that: The configuration of the basic compilation environment and external warehouse according to the target operating system type includes: Create a target tag; wherein one target tag corresponds to one operating system; Create a build tag, configure the build architecture to be the Shenwei architecture, and use the target tag as the parent tag of the build tag; Configure external repositories to build tags, and set external repositories priority and merge mode; Configure the software set required for the basic compilation environment to the build tag; Create a build target, configure the combination of build tags and target tags to the build target, and build and manage software packages using the build target as an identifier.

5. The method for automatically constructing a software package for the Shenwei platform according to claim 1, characterized in that: The method for obtaining all source code package list files of the target operating system includes: creating a local directory of source code packages, storing the source code packages of all software to be compiled of the target operating system in the local directory, and generating a source code package list file.

6. The method for automatically constructing a software package for the Shenwei platform according to claim 1, characterized in that: The task of batch publishing software packages according to the source package list file includes: S1. Read the source code package list file line by line. The source code package information recorded in each line of the source code package list file includes: software name, version number and release number. S2. Add the software name corresponding to the current source code package to the target tag, and specify the user to whom the current software belongs; S3, configure the source code address corresponding to the current source code package, configure the build target to specify the clean room build environment configuration and the target label to which the build product belongs after the build is successful, and publish the software package build task of the current source code package; S4. Repeat steps S1 to S3 until all lines in the source package list file are read and the software package building tasks are released in batches.

7. The method for automatically constructing a software package for the Shenwei platform according to claim 1 or 6, characterized in that: After the batch release software package building task, if there is no failed build, integrate all binary software packages of the target operating system; If there is a failed build, locate the failed build task according to the build failure log and re-publish the build task.

8. A software package automatic construction device for the Shenwei platform, characterized in that: include: The software package automatic construction module is used to batch publish software package construction tasks in a pre-built automatic construction system according to all source code package list files of the target operating system, and obtain all binary software packages of the target operating system; The method for constructing the automated construction system includes: Install the automated build component into the server to obtain the automated build system, and configure the system parameters of the automated build system; Configure the basic compilation environment and external warehouse of the automated build system according to the target operating system type to obtain the build target of the software package build task.

9. A computer device, characterized in that: including processor and storage medium; The storage medium is used to store instructions; The processor is used to operate according to the instructions to execute the steps of the method for automatically building a software package for the Shenwei platform according to any one of claims 1 to 7.

10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for automatically constructing a software package for the Shenwei platform as described in any one of claims 1 to 7 are implemented.