SP packaging method, system and equipment based on RPM and medium

Through the RPM-based SP packaging method, the visual generation tool is used to automatically process SP package generation, which solves the problem of the lack of unified packaging tools in the Red-Hat kernel system, and achieves fast and convenient software package management and installation.

CN119127280APending Publication Date: 2024-12-13INSPUR FINANCIAL INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410489191.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-23
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

The Red-Hat kernel system lacks a unified packaging tool, which leads to the need to manually create packaging files for installation package production, which has limitations and inconveniences.

Method used

Provide a RPM-based SP packaging method, including parameter setting, version verification, file copying and installation package production steps, set SP package generation information through visual generation tools, check and synchronize the SDK directory, generate rpm packages, and realize automated Package and install software package.

Benefits of technology

It realizes the RPM-based design concept, establishes a unified database file, records software information in detail, automatically analyzes dependencies, and quickly and conveniently creates, installs and uninstalls SP packages, improving the automation and convenience of the packaging process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119127280A_ABST
    Figure CN119127280A_ABST
Patent Text Reader

Abstract

The invention discloses an SP packaging method, system and device based on RPM and a medium, and the method comprises the following steps: setting SP package generation information based on a visual generation tool before an SP package is generated; after responding to the SP packet generation information setting, calling a visualization generation tool to execute version verification operation; after the version verification operation is responded, a visualization generation tool is called to generate information according to the SP package, and file copying is carried out; after file copying is responded, a visualization generation tool is called to generate an rpm package based on the RPMS directory; according to the method, a unified database file can be established on the basis of the RPM design concept, software information can be recorded in detail, the dependency relationship can be automatically analyzed, and finally, the SP package can be rapidly and conveniently manufactured, installed and uninstalled.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to an RPM-based SP packaging method, system, device and medium. Background Art

[0002] RPM, short for Red-Hat Package Manager, is a software manager that solves the problem that early Linux systems could only install software using source code packages.

[0003] Although the NuXfs platform software has been adapted to multiple systems, the Red-Hat kernel system still lacks a unified packaging tool. The installation package still needs to be manually produced, which has certain limitations and inconveniences. Summary of the invention

[0004] The object of the present invention is to provide an RPM-based SP packaging method, system, device and medium, thereby solving all or one of the above-mentioned problems existing in the prior art.

[0005] In order to solve the above technical problems, the specific technical solutions of the present invention are as follows: On the one hand, the present invention provides an SP packaging method based on RPM, comprising the following steps: Parameter setting steps: In response to before the SP package is generated, setting the SP package generation information based on the visual generation tool; Version verification steps: In response to the SP package generation information being set, calling the visualization generation tool to perform a version verification operation; File copy steps: In response to the version verification operation, calling the visualization generation tool to generate information according to the SP package to copy the file; Installation package creation steps: In response to the file copying, a visual generation tool is called to generate an rpm package based on the RPMS directory.

[0006] As an improved solution, the SP package generation information is set based on a visual generation tool, including: In the tool interface of the visual generation tool, select the module to be packaged, select the configuration, set the SDK directory, and set the installation package related information.

[0007] As an improved solution, the installation package related information includes: software name, version number, project, model, description and protocol.

[0008] As an improved solution, the version verification operation includes: The visualization generation tool is called to verify whether the SVN version is consistent with the version set in the SDK directory; in response to inconsistency, the local directory SDK is synchronized based on the SVN version to obtain an updated SDK directory.

[0009] As an improved solution, the file copy is executed in the updated SDK directory.

[0010] As an improved solution, the file copying includes: Generate an rpmbuild directory of the current installation package under the tool directory of the visual generation tool; In the rpmbuild directory, create a new Source intermediate directory; Store the copied files in the Source intermediate directory; Generate the spec file and buildrpm.sh file simultaneously.

[0011] As an improved solution, the rpm package is generated based on the RPMS directory, including: Calling the visual generation tool to execute the buildrpm.sh file to obtain the rpm package located in the RPMS directory; When file modification is required, corresponding items are adjusted in the Source intermediate directory.

[0012] On the other hand, the present invention also provides an RPM-based SP packaging system, comprising: A parameter setting module, used to: in response to before the SP package is generated, set the SP package generation information based on the visual generation tool; A version verification module, used to: in response to the SP package generation information being set, call the visualization generation tool to perform a version verification operation; A file copy module, configured to: in response to the version verification operation, call the visualization generation tool to copy the file according to the SP package generation information; The installation package making module is used for: in response to the file copying, calling the visual generation tool to generate the rpm package based on the RPMS directory.

[0013] On the other hand, the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the RPM-based SP packaging method are implemented.

[0014] On the other hand, the present invention further provides a computer device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; wherein: The memory is used to store computer programs; The processor is used to execute the steps of the RPM-based SP packaging method by running the program stored in the memory.

[0015] The beneficial effects of the technical solution of the present invention are: The RPM-based SP packaging method described in the present invention can implement the RPM-based design concept, establish a unified database file, record software information in detail and automatically analyze dependencies, and ultimately achieve fast and convenient production, installation and uninstallation of SP packages.

[0016] The RPM-based SP packaging system described in the present invention can realize the design concept based on RPM through the mutual cooperation of the parameter setting module, the version verification module, the file copy module and the installation package production module, establish a unified database file, record software information in detail and automatically analyze dependencies, and finally realize fast and convenient production, installation and uninstallation of SP packages.

[0017] The computer-readable storage medium described in the present invention can realize the cooperation of the boot parameter setting module, the version verification module, the file copy module and the installation package production module, thereby realizing the RPM-based SP packaging method described in the present invention, and the computer-readable storage medium described in the present invention also effectively improves the operability of the RPM-based SP packaging method.

[0018] The computer device described in the present invention can store and execute the computer-readable storage medium, thereby realizing the RPM-based SP packaging method described in the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0020] Figure 1 is a flow chart of the SP packaging method based on RPM according to Embodiment 1 of the present invention; Figure 2 is a schematic diagram of the interface of the visualization generation tool in the SP packaging method based on RPM described in Example 1 of the present invention; Figure 3 It is a schematic diagram of the contents of the spec file in the SP packaging method based on RPM described in Example 1 of the present invention; Figure 4 Schematic diagram of the architecture of the SP packaging system based on RPM according to Embodiment 2 of the present invention; Figure 5 is a schematic diagram of the structure of the computer device described in Example 4 of the present invention; The symbols in the accompanying drawings are explained as follows: 1501, processor; 1502, communication interface; 1503, memory; 1504, communication bus. DETAILED DESCRIPTION

[0021] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings so that the advantages and features of the present invention can be more easily understood by those skilled in the art, thereby making a clearer and more definite definition of the protection scope of the present invention.

[0022] In the description of the present invention, it should be noted that the embodiments described in the present invention are only part of the embodiments of the present invention, rather than all of the embodiments; based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present invention.

[0023] The terms "first", "second", etc. in the specification and claims of this article and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of this article described here can be implemented in an order other than those illustrated or described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, device, product or equipment that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or equipment. Example 1

[0024] This embodiment provides an RPM-based SP packaging method, such as Figure 1~Figure 3 As shown, the following steps are included: The core function of this method is to quickly and conveniently generate SP packages based on the design concept of RPM and the general SP package file system structure under NuXfs, and to isolate the installation package file information from the packaging operation and support secondary modification of the packaging information. The specific steps are as follows: S100, parameter setting steps: In this step, a visual generation tool is used to generate SP packages. Before the SP package is generated, relevant information needs to be set; In one implementation, select the module to be packaged, configuration options, SDK directory, and installation package related information on the tool interface; In one implementation, the selection of modules to be packaged includes, but is not limited to: InspCard, InspCamera, InspCHK, InspCKS, TnspQueue, InspBarcode, InspCTL, InspDeposit, InspEPP, InspMID, InspReceipt, InspPrinter, InspCash, InspMulti, InspFPI, InspIDCM, InspScanner, InspPassbook, InspSwipe, InspUKey, InspCID, InspPSAM, InspMifare, InspDigitizer and combinations of other modules, such as: InspCardPrinter+InspXXX; It should be noted that the examples here are only for explaining the present invention and cannot limit the scope of protection of the present invention; In one implementation, the installation package related information includes, but is not limited to: software name, version number, project, model, description, and protocol (such as PISA); it should be noted that the examples here are only for explaining the present invention and cannot limit the scope of protection of the present invention.

[0025] S200, version verification steps: In this step, after the above information is set, the visual generation tool is called to copy the file. Before copying the file, the visual generation tool performs version verification; In one implementation, a visualization generation tool is called to verify whether the SVN version is consistent with the version under the SDK directory selected in the above operation; when the versions are inconsistent, the local directory SDK is synchronized based on the latest SVN version; it should be noted that the examples here are only for explaining the present invention and cannot limit the scope of protection of the present invention.

[0026] S300, file copying steps: In this step, after the above version verification, the visual generation tool is called to filter and copy files in the updated SDK directory according to the selected configuration file, SDK and module list; In one implementation, the rpmbuild directory of the current installation package is generated under the tool directory of the visual generation tool; it should be noted that the example here is only for explaining the present invention and cannot limit the protection scope of the present invention; In one implementation, in the rpmbuild directory, a new Source intermediate directory is created according to the machine model, and the filtered and copied files are stored in the Source intermediate directory; it should be noted that the example here is only for explaining the present invention and cannot limit the protection scope of the present invention; In one implementation, the spec file and the buildrpm.sh file are generated simultaneously, and the related pre- and post-installation operations are based on the general SP settings, and secondary modification is supported; wherein the specific spec configuration file structure is as follows Figure 3 As shown; it should be noted that the examples here are only for explaining the present invention and cannot limit the protection scope of the present invention; In one implementation, when secondary modification is required, secondary modification and adjustment of corresponding items are performed in the Source intermediate directory according to project requirements; it should be noted that the examples here are only for explaining the present invention and cannot limit the protection scope of the present invention.

[0027] S400, installation package production steps: In this step, after completing the above operations, click Make Installation Package in the Visual Generation Tool to trigger the call of the Visual Generation Tool to execute the aforementioned buildrpm.sh file, and finally generate the rpm package in the RPMS directory; In one implementation, the RPM packaging directory structure is as follows: rpmbuild (the rpmbuild directory is usually stored in the home directory, and the directory must contain the following folders) ├── BUILD saves the files installed in the %install phase ├── RPMS ├── SOURCES ├── SPECS saves RPM package configuration (.spec) files └── SRPMS Among them, when creating a directory, the following one-key creation command can be used: mkdir -p ~ / rpmbuild / {BUILD,RPMS,SOURCES,SPECS,SRPMS}; it should be noted that the examples here are only for explaining the present invention and cannot limit the scope of protection of the present invention. Example 2

[0028] This embodiment is based on the same inventive concept as the RPM-based SP packaging method described in Embodiment 1, and provides an RPM-based SP packaging system, such as Figure 4 As shown, including: The parameter setting module is used to generate SP packages using a visual generation tool. Before the SP package is generated, relevant information needs to be set; In one implementation, the parameter setting module selects the module to be packaged, configuration selection, SDK directory, and installation package related information in the tool interface; In one implementation, the selection of modules to be packaged includes, but is not limited to: InspCard, InspCamera, InspCHK, InspCKS, TnspQueue, InspBarcode, InspCTL, InspDeposit, InspEPP, InspMID, InspReceipt, InspPrinter, InspCash, InspMulti, InspFPI, InspIDCM, InspScanner, InspPassbook, InspSwipe, InspUKey, InspCID, InspPSAM, InspMifare, InspDigitizer and combinations of other modules, such as: InspCardPrinter+InspXXX; It should be noted that the examples here are only for explaining the present invention and cannot limit the scope of protection of the present invention; In one implementation, the installation package related information includes, but is not limited to: software name, version number, project, model, description, and protocol (such as PISA); it should be noted that the examples here are only for explaining the present invention and cannot limit the scope of protection of the present invention.

[0029] A version verification module is used to call the visual generation tool to copy files after setting the above information. Before copying the files, the visual generation tool performs version verification; In one implementation, the version verification module calls a visual generation tool to verify whether the SVN version is consistent with the version under the SDK directory selected in the above operation; when the versions are inconsistent, the local directory SDK is synchronized based on the latest SVN version; it should be noted that the examples here are only for explaining the present invention and cannot limit the scope of protection of the present invention.

[0030] The file copy module is used to call the visual generation tool to filter and copy files in the updated SDK directory according to the selected configuration file, SDK and module list after the above version verification; In one implementation, the file copy module calls the visual generation tool to generate the rpmbuild directory of the current installation package under the tool directory of the visual generation tool; it should be noted that the example here is only for explaining the present invention and cannot limit the protection scope of the present invention; In one implementation, the file copy module calls the visual generation tool in the rpmbuild directory, creates a new Source intermediate directory according to the machine model, and stores the filtered and copied files in the Source intermediate directory; it should be noted that the examples here are only for explaining the present invention and cannot limit the protection scope of the present invention; In one implementation, the file copy module calls the visual generation tool to synchronously generate the spec file and the buildrpm.sh file. The relevant pre- and post-installation operations are based on the general SP settings and support secondary modification. The specific spec configuration file structure is as follows: Figure 3 As shown; it should be noted that the examples here are only for explaining the present invention and cannot limit the protection scope of the present invention; In one implementation, when secondary modification is required, secondary modification and adjustment of corresponding items are performed in the Source intermediate directory according to project requirements. It should be noted that the examples given here are only for explaining the present invention and cannot limit the scope of protection of the present invention.

[0031] The installation package making module is used to click Make Installation Package in the visual generation tool after completing the above operations, triggering the call of the visual generation tool to execute the aforementioned buildrpm.sh file, and finally generating the rpm package in the RPMS directory; In one implementation, the RPM packaging directory structure is as follows: rpmbuild (the rpmbuild directory is usually stored in the home directory, and the directory must contain the following folders) ├── BUILD saves the files installed in the %install phase ├── RPMS ├── SOURCES ├── SPECS saves RPM package configuration (.spec) files └── SRPMS Among them, when creating a directory, the following one-key creation command can be used: mkdir -p ~ / rpmbuild / {BUILD,RPMS,SOURCES,SPECS,SRPMS}; it should be noted that the examples here are only for explaining the present invention and cannot limit the scope of protection of the present invention. Example 3

[0032] This embodiment provides a computer-readable storage medium, including: The storage medium is used to store computer software instructions used to implement the RPM-based SP packaging method described in the above-mentioned Example 1, which includes a program for executing the above-mentioned program set for the RPM-based SP packaging method; specifically, the executable program can be built into the RPM-based SP packaging system described in Example 2, so that the RPM-based SP packaging system can implement the RPM-based SP packaging method described in Example 1 by executing the built-in executable program.

[0033] In addition, the computer-readable storage medium of this embodiment may adopt any combination of one or more computer-readable storage media, wherein the computer-readable storage medium includes electrical, optical, electromagnetic, infrared or semiconductor systems, devices or components, or any combination thereof. Example 4

[0034] This embodiment provides an electronic device, such as Figure 5 As shown, the electronic device may include: a processor 1501 , a communication interface 1502 , a memory 1503 and a communication bus 1504 , wherein the processor 1501 , the communication interface 1502 , and the memory 1503 communicate with each other via the communication bus 1504 .

[0035] Memory 1503, used for storing computer programs; The processor 1501 is used to implement the steps of the SP packaging method based on RPM described in the above embodiment 1 when executing the computer program stored in the memory 1503.

[0036] As an embodiment of the present invention, the communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0037] As an implementation mode of the present invention, the communication interface is used for communication between the above-mentioned terminal and other devices.

[0038] As an embodiment of the present invention, the memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0039] As an embodiment of the present invention, the above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.

[0040] Different from the prior art, the present application adopts an RPM-based SP packaging method, system, device and medium, which can establish a unified database file based on the design concept of RPM, record software information in detail and automatically analyze dependencies, and finally realize fast and convenient production, installation and uninstallation of SP packages.

[0041] It should be understood that in the various embodiments of this document, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this document.

[0042] It should also be understood that in the embodiments of this article, the term "and / or" is only a description of the association relationship of the associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0043] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this article.

[0044] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0045] In the several embodiments provided herein, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, or can be electrical, mechanical or other forms of connection.

[0046] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of this article.

[0047] In addition, each functional unit in each embodiment of this invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of software functional unit.

[0048] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this article is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of this article. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0049] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A SP packaging method based on RPM, characterized in that: The following steps are involved: Parameter setting steps: In response to before the SP package is generated, setting the SP package generation information based on the visual generation tool; Version verification steps: In response to the SP package generation information being set, calling the visualization generation tool to perform a version verification operation; File copy steps: In response to the version verification operation, calling the visualization generation tool to generate information according to the SP package to copy the file; Installation package creation steps: In response to the file copying, a visual generation tool is called to generate an rpm package based on the RPMS directory.

2. The SP packaging method based on RPM according to claim 1, characterized in that: The step of setting the SP package generation information based on the visual generation tool includes: In the tool interface of the visual generation tool, select the module to be packaged, select the configuration, set the SDK directory, and set the installation package related information.

3. The SP packaging method based on RPM according to claim 2, characterized in that: The installation package related information includes: software name, version number, project, model, description and protocol.

4. The SP packaging method based on RPM according to claim 2, characterized in that: The version verification operation includes: The visualization generation tool is called to verify whether the SVN version is consistent with the version set in the SDK directory; in response to inconsistency, the local directory SDK is synchronized based on the SVN version to obtain an updated SDK directory.

5. The SP packaging method based on RPM according to claim 4, characterized in that: The file copy is executed in the updated SDK directory.

6. The SP packaging method based on RPM according to claim 4, characterized in that: The file copy includes: Generate an rpmbuild directory of the current installation package under the tool directory of the visual generation tool; In the rpmbuild directory, create a new Source intermediate directory; Store the copied files in the Source intermediate directory; Generate the spec file and buildrpm.sh file simultaneously.

7. The SP packaging method based on RPM according to claim 6, characterized in that: The generating of the rpm package based on the RPMS directory includes: Calling the visual generation tool to execute the buildrpm.sh file to obtain the rpm package located in the RPMS directory; When file modification is required, corresponding items are adjusted in the Source intermediate directory.

8. An RPM-based SP packaging system, characterized in that: include: A parameter setting module, used to: in response to before the SP package is generated, set the SP package generation information based on the visual generation tool; A version verification module, used to: in response to the SP package generation information being set, call the visualization generation tool to perform a version verification operation; A file copy module, configured to: in response to the version verification operation, call the visualization generation tool to copy the file according to the SP package generation information; The installation package making module is used for: in response to the file copying, calling the visual generation tool to generate the rpm package based on the RPMS directory.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the RPM-based SP packaging method according to any one of claims 1 to 7 are implemented.

10. A computer device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; wherein: The memory is used to store computer programs; The processor is used to execute the steps of the RPM-based SP packaging method according to any one of claims 1 to 7 by running the program stored in the memory.