CN115469921A - File packet management method and device and computing equipment - Google Patents

File packet management method and device and computing equipment Download PDF

Info

Publication number
CN115469921A
CN115469921A CN202211196933.3A CN202211196933A CN115469921A CN 115469921 A CN115469921 A CN 115469921A CN 202211196933 A CN202211196933 A CN 202211196933A CN 115469921 A CN115469921 A CN 115469921A
Authority
CN
China
Prior art keywords
file
package
target machine
directory
configuration file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211196933.3A
Other languages
Chinese (zh)
Inventor
任伟东
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Coretek Systems Inc
Original Assignee
Coretek Systems Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Coretek Systems Inc filed Critical Coretek Systems Inc
Priority to CN202211196933.3A priority Critical patent/CN115469921A/en
Publication of CN115469921A publication Critical patent/CN115469921A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application relates to the technical field of computers, in particular to a method, a device and a computing device for managing a file package, wherein the method for managing the file package comprises the following steps: mounting a storage medium containing a file package on a first target machine operating system; checking a local source of the file package; configuring a first configuration file for the first target machine after the verification is passed; the first configuration file records a directory where the file package is located; and operating the file package under the directory on the first target machine according to the first configuration file. According to the file package management scheme provided by the embodiment of the application, the storage medium loaded to the target machine is verified, so that the safety is effectively enhanced. Under the condition of being based on the specific local area network, when other target machines manage the file package, the file package can be obtained for management only by modifying the information of the storage position corresponding to the file package in the corresponding repo file, mount verification is avoided from machine to machine, and labor cost, time cost and the like are effectively saved.

Description

File packet management method and device and computing equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for managing a package of files, and a computing device.
Background
There are two main ways of operating system software package management techniques commonly used in the prior art.
In the first mode, all the software packages which may be needed are installed at one time when the operating system leaves the factory. And in the later stage, if the installation requirement is newly added, technicians are required to be contacted to customize the related software packages to realize incremental installation.
In the second way, the management of the software package is generally implemented in cooperation with package management technology. In the existing package management mode, in actual use, each manufacturer generally places each type of software package in the cloud. When the user uses the system, the user needs to configure a package management configuration file in a local target machine, acquire a corresponding software package from a cloud through a remote network, and perform installation and other operations. Or downloading the corresponding software package in the development machine, and copying the software package to the target machine through the storage medium for installation and other operations.
The first approach is labor and time intensive, requiring both the manufacturer and the user to accept the associated technical and time risks. The second way is to use the internet medium, which is not suitable for the secret-related units or the units without internet state.
Disclosure of Invention
In view of the above problems in the prior art, the present application provides a method, an apparatus and a computing device for managing a package of files.
A first aspect of the present application provides a method for managing a package, including:
mounting a storage medium containing a file package on a first target machine operating system;
checking the local source of the file package;
configuring a first configuration file for the first target machine after the verification is passed; the first configuration file records a directory where the file package is located;
and operating the file package under the directory on the first target machine according to the first configuration file.
According to the embodiment, the configuration file of the target machine is modified into the directory where the verified file package is located through the pre-configured operation environment, the target machine can acquire the file package to perform updating, installation and other operations, the safety problem of file package management through the Internet is solved, and meanwhile manpower, material resources and time cost can be effectively saved.
As a possible implementation manner of the first aspect, the performing local source verification on the file package includes:
and reading a check file mounted on the storage medium, and checking the check file according to the local source check code stored by the first target machine.
According to the embodiment, the local source check code stored in the target machine and the mounted storage medium check code are stored for checking, so that the mounted storage medium is checked, and the safety of the file package management process is ensured.
As a possible implementation manner of the first aspect, the method includes:
configuring a second configuration file for a second target machine which is positioned in the same local area network with the first target machine; the configuration file records a directory where the file package is located, and the directory points to the address of the first target machine;
and operating the file package under the directory on the second target machine according to the configuration file.
According to the embodiment, the configuration file is modified, the local file package is obtained by using the local area network, the support and management of the software package source without hardware capacity limitation are realized, the updating operation is simplified, the manpower is saved, and the efficiency is improved.
As a possible implementation manner of the first aspect, the mounted storage medium is an agreed storage medium, and the executing of the corresponding operation program in the operation environment includes at least one of:
and installing the file package under the directory, assisting the file package under the directory, and listing the file package under the directory.
As a possible implementation manner of the first aspect, the method includes: creating the storage medium containing the file package, comprising:
acquiring the file package;
dividing the file package into one or more sub file packages according to a preset size, respectively storing the sub file packages under each sub directory, and respectively generating indexes;
respectively generating the subdirectories into mapping files;
and releasing the mapping files to storage media respectively.
According to the method and the system, the local software package source is manufactured, the file package is manufactured according to the preset size, the compatibility of the software package management process is enhanced, and the version management work of a developer on the software package is simplified.
As a possible implementation manner of the first aspect, the method further includes:
generating an integrated configuration file; the integration configuration file records the integration sequence of the sub-file packages corresponding to the storage media;
the operating the file package under the directory comprises: and integrating the sub-packages read from the storage media according to the integrated configuration file, and then performing the operation.
As a possible implementation manner of the first aspect, the operating systems of the first target machine and the second target machine are yocto framework-based Linux systems.
A second aspect of the present application provides a package management apparatus, including:
the device management module is used for mounting a storage medium containing the file package on the operating system of the first target machine;
the verification module is used for verifying the local source of the file packet;
the configuration file creating module is used for configuring a first configuration file for the first target machine after the verification is passed; the first configuration file records a directory where the file package is located, and the directory points to a local address of the first target machine;
and the processing module is used for processing files under the directory on the first target machine according to the first configuration file.
As a possible implementation manner of the second aspect, the method includes:
the configuration file creating module is further configured to configure a second configuration file for a second target machine located in the same local area network as the first target machine; the configuration file records a directory where the file package is located, and the directory points to the address of the first target machine;
and the processing module is used for operating the file package under the directory on the second target machine according to the configuration file.
A third aspect of the present application provides a computing device comprising:
a processor, and
a memory having stored thereon program instructions that, when executed by the processor, cause the processor to perform the package management method as described above.
According to the file package management method, device and computing equipment, the file package is managed through the local source file installation package, and file package support and management without hardware capacity limitation can be achieved; when a new software package is added, the target machine can acquire the required file package from the corresponding file address through the configuration file by updating the local source file package, so that unified software package management of a plurality of target machines is realized, the version management work of a developer on the software package is simplified, the compatibility of file package management operation is improved, and the labor and material resource cost is effectively saved. Meanwhile, the storage medium loaded to the target machine is verified, and the file package can be managed after the verification is passed, so that the safety is effectively enhanced, and the upgrading and updating of the software package and other work can be conveniently carried out by a security-related unit or a unit without an internet state.
These and other aspects of the present application will be more readily apparent in the following description of the embodiment(s).
Drawings
The various features and the connections between the various features of the present application are further described below with reference to the drawings. The figures are exemplary, some features are not shown to scale, and some of the figures may omit features that are conventional in the art to which the application relates and are not essential to the application, or show additional features that are not essential to the application, and the combination of features shown in the figures is not intended to limit the application. In addition, the same reference numerals are used throughout the specification to designate the same components. The specific drawings are illustrated as follows:
FIG. 1 is a flowchart of a method for managing a package of documents according to an embodiment of the present disclosure;
FIG. 2 is a flowchart of a package management method according to an embodiment of the present disclosure;
FIG. 3 is a schematic structural diagram of a package management device according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a computing device according to an embodiment of the present application.
Detailed Description
The technical solution provided by the present application is further described below by referring to the drawings and the embodiments. It should be understood that the system structure and the service scenario provided in the embodiments of the present application are mainly for illustrating possible implementation manners of the technical solutions of the present application, and should not be construed as the only limitations on the technical solutions of the present application. As can be known to those skilled in the art, with the evolution of the system structure and the appearance of new service scenarios, the technical solution provided in the present application is also applicable to similar technical problems.
It should be understood that the file package management scheme provided by the embodiment of the present application includes a file package management method, a file package management apparatus, a computing device, a storage medium, and the like. Since the principles of solving the problems of these solutions are the same or similar, some of the repeated parts may not be repeated in the following descriptions of the specific embodiments, but it should be understood that these specific embodiments are referred to and can be combined with each other.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. In the case of inconsistency, the meaning described in the present specification or the meaning derived from the content described in the present specification shall control. In addition, the terminology used herein is for the purpose of describing embodiments of the present application only and is not intended to be limiting of the present application. To accurately describe the technical content in the present application and to accurately understand the present application, terms used in the present specification are given the following explanation or definition before describing the specific embodiments:
the target device in the present application refers to a computer, a server, or the like having an operating system that needs to perform package management, and the remote device in the present application also belongs to the target device, but in some cases refers to a target device that needs to perform remote package management via a network including a local area network or the like. The operating system comprises Linux, windows, macOS, chromeOS, UNIX and the like.
In the prior art, there are two main ways for common operating system software package management technology. In the first mode, all software packages which may be needed are installed at one time when the operating system is shipped. And in the later stage, if the installation requirement is newly added, technicians are required to customize related software packages and compile corresponding installation scripts to realize incremental installation. This approach is labor and time intensive, requiring both the manufacturer and the user to accept the associated technical and time risks.
In the second way, the management of the software package needs to be realized by matching with the package management technology. The common Linux system packet management technical mode comprises the following steps: a Red-cap series dnf Package Manager, rpm-based (Red-Hat Package Manager, red-cap software Package Manager) Package; the packet management of the debian series is based on the deb packet; opkg package management at the embedded level, based on ipk packages. In actual use, various manufacturers usually place various types of software packages in the cloud, and when a user uses the package management technology, the user must configure a package management configuration file in a local target machine, acquire a corresponding software package from the cloud through an internet remote network, and perform installation and other operations. However, the second method must be used through the internet medium, and is not suitable for secret-related units or units without internet states.
The existing software package management mode has the following defects: due to high customization, any new requirement and problem of a user need to designate special technicians to package software packages, write installation scripts and the like. The compatibility is poor, the installed software package may depend on other software packages in the actual installation process of the software package, and if the other software packages are not installed, the installation of the software package to be installed fails, and the expansibility is poor; if the newly-added version is released, the corresponding software package packaging and installation script needs to be manufactured and sent to a user, the user copies the script to the target machine after receiving the script, the script is executed on the target machine, upgrading operation is carried out, and manpower and material resources are consumed.
The application belongs to the technical field of computers, relates to management of software packages, and is particularly applied to management of software packages for computers which have higher requirements on network security and have access to the Internet in a limited manner or have no Internet unit. Through the file package management scheme provided by the application, manpower and material resources and time cost can be saved, and the safety and confidentiality of a software package management process can be effectively guaranteed.
As shown in fig. 1, fig. 1 is a flowchart of a method for managing a package of documents according to an embodiment of the present application, and based on the defects existing in the prior art, the embodiment of the present application provides a method for managing a package of documents, which includes:
s101: the storage medium containing the file package is mounted on the first target machine.
In the embodiment of the application, the target machine can be a computer, a server and the like which are required to carry out software package management and are provided with an operating system; operating systems may include Linux, windows, macOS, chromeOS, UNIX, etc.
In the aspect of security, systems such as Windows and the like are often patched to ensure the security of the systems, most virus software cannot run under Linux systems, the Linux system is more guaranteed in the aspect of security because the Linux system is open-source and has a large maintenance base number and a large maintenance range, and the Linux operating system is an open-source system and can customize modules to carry out domestic customization. In the present application, the Linux system is mainly applied to a unit having certain network security and confidentiality requirements, and therefore, in the embodiment of the present application, the Linux system is preferably used as the operating system of the target machine.
In this embodiment, the installed operating system may be a domestic operating system based on an open source Linux system, such as a "road system". In the embodiment of the present application, the operating environment configured for the operating system of the target machine may support dnf package management, debian package management, opkg package management, and the like. In the Linux system, software is generally distributed in the form of a file package, and the work of processing the file package is called package management.
Thus, in the present embodiment, a dnf package management frame, a deb package management frame, an ipk package management frame, and the like can be added to the operating system of the target device. The operating system of the target machine is provided with a management framework supporting various packages, can support various common file packages, is convenient for file package management, and does not need package conversion operation when aiming at different types of file packages so as to save labor cost and time cost.
In addition, various script files, such as a package installation script, a security verification script, and the like, may be configured in the operating system of the target machine.
S102: and carrying out local source verification on the file package.
Based on the operating environment configured in step S101, in this embodiment, a local source file check code, such as an/etc/directory of the Linux system, may be configured in the designated folder of the operating system of the target machine. Meanwhile, the corresponding check code is also preset in the appointed storage medium. Wherein, the local source file can be a local yum source.
When the operating system detects a storage medium, the mounted storage medium check code and the local source file check code are checked to judge whether the storage medium is an appointed storage medium, and if the check is passed, the mounted storage medium is judged to be the appointed storage medium. The storage medium can be a CD-ROM, a removable magnetic disk and a magnetic disk array, a hard disk, a floppy disk and the like.
In some embodiments, when the storage medium is detected by the operating system, the mounted storage medium may be automatically verified by a pre-configured verification script.
In this embodiment, when the check code is checked, the check code of the mounted storage medium and the check code of the local source file may be checked through a digital encryption algorithm. The digital encryption algorithm can comprise a Hash algorithm, a symmetric encryption algorithm, an asymmetric encryption algorithm and the like, and common Hash algorithms such as MD2, MD4, MD5, SHA-1, HMAC-MD5, HMAC-SHA1, RIPEMD160, and Guomy SM 3; common symmetric encryption algorithms such as AES, DES, 3DES, SM4, etc., and common asymmetric encryption algorithms such as RSA, ECC, SM2, etc.
In addition, in some embodiments, a specific device manager, such as udev, htop, dstat, glances, iftop, nethogs, and the like, may also be configured in the operating system of the target machine.
The main function of the udev is to manage the device nodes under the specific directory of the operating system, and it is also used to manage the hot-plug function, and the udev handles the behaviors of the specific directory and the user space when adding/deleting the hardware. When the udev device manager identifies the storage medium access, the check script checks whether the storage medium is an appointed storage medium.
The operating system based on the device manager can support a plurality of appointed storage medium accesses, namely a plurality of source files, and can realize infinite expansion of the source files. For example, under a road system customized based on a home product, by accessing a plurality of (or infinite) external storage media and accessing and integrating a newly required file package, a software package and the like in the storage media, the road system can realize infinite expansion and extension of newly required files, software and the like.
S103: configuring a first configuration file for the first target machine after the verification is passed; the first configuration file records a directory where the file package is located.
When the storage medium is verified to be a local source file, a corresponding configuration file can be created in the operating system according to the information of the local source file by a specific script or program configured in the configuration of the operating environment. The configuration file may be or may also contain a repo file, where the repo file defines the location of the package of files.
S104: and operating the file package under the directory on the first target machine according to the first configuration file.
In this embodiment, after the configuration file including the repo file is successfully created, the update command of the source is executed, and then the package management command, such as the dnf command, may be used to perform operations such as copy, install, update, uninstall, and delete of the package.
The embodiment further improves the safety of package management through verification and verification of the storage medium. Meanwhile, a plurality of scripts are configured in the system, such as an automatic verification script, an automatic installation script and the like, so that automatic operation is realized, and labor cost and time cost can be saved.
In other embodiments, the configuration file further includes remote operation commands in a specific network environment such as a local area network or a private network; when the remote operation command is used for executing remote copy operation, the configuration file further includes a local area network IP address of the target machine and a local area network IP address of the remote machine.
In connection with the configuration file in the above embodiment, for example, a repo file, it defines the location of the file package. Therefore, in the present embodiment, the local source file may be acquired through a local area network or the like, so as to perform localized package management such as installation, update, and uninstallation.
In this embodiment, the second target machine may be based on an FTP (File Transfer Protocol) File Transfer Protocol when acquiring the local source File.
In other embodiments, based on the above-mentioned management of the file package, a scp command may also be used, which is used to make a command for remotely copying a file under Linux, and the scp transmission is encrypted. scp uses ssh connection and encryption to improve data security when copying across machines. For example, to copy a current file from another host 172.19.2.75 in the lan, the following commands may be executed:
scp-r root@172.19.2.75:/home/root/full.tar.gz/home/
wherein the command is to copy the full.tar.gz file under the/home/root/folder of remote host 172.19.2.75 to the/home/folder of local host in the root identity. If the reverse operation is desired, the following commands may be used when copying the current system file to the remote machine on the LAN:
scp-r/home/daisy/full.tar.gz root@172.19.2.75:/home/root
wherein the command is to copy the full.tar.gz file under the native/home/day/folder to/home/root/directory on the remote machine 172.19.2.75.
Therefore, the local file package management scheme based on the specific network avoids manual machine-by-machine management, saves manpower and material resources and time cost, improves working efficiency, and effectively guarantees package management safety.
In other embodiments, the operating system of the target machine is a Linux system built based on yocto framework, wherein yocto can support ARM, PPC, MIPS, x86 (32 and 64bit) hardware architecture by creating a customized system based on Linux kernel, so that a user can customize the operating system according to needs. In yocto framework, a parameter of packing _ CLASSES + = "PACKAGE _ rpm" is configured, so that the compiled operating system can generate rpm and support the PACKAGE management system.
In this embodiment, when the rpm package of the Linux system custom software constructed based on the yocto framework is needed, the corresponding configuration file is written according to the yocto rule, the software source code is put into the specified directory, and the yocto mechanism is used for compiling the configuration file so as to generate the custom rpm package to the directory corresponding to the yocto project.
In some other embodiments, in order to meet the file increment requirement including a secret-related unit and the like without an internet unit, the embodiment may further perform integration and expansion of multiple storage media and multiple file packages in a specific network environment such as a local area network or a private network. For example: when software increment operation is carried out on a certain secret-related unit, multiple storage media are mounted on a server or a PC (personal computer) of a local area network of the unit, for software, files and the like with large volume, a plurality of file packages can be mounted through the multiple storage media, information such as integration sequence, size and the like of each file package is generated or written into a corresponding integration configuration file, and then the file packages are integrated according to the configuration file, so that a target machine can completely acquire the software and the files to carry out increment operation. When a new file package is subsequently updated, after the installation, information of the integration sequence (generally placed in the last order of integration), size and the like of the new file package can be written into the integration configuration file, so as to realize the integration of the new file package.
In other embodiments, a sub-integration configuration file may be generated for each document package, wherein information of the sequence, size, and the like of the document package in the whole original document package is recorded, and an integration configuration file may be generated based on the sub-integration configuration files, wherein the generated integration configuration file records information of the integration sequence, size, and the like of each document package, and the integration sequence is generated based on the sequence of the document package in the whole original document package.
The implementation mode can be compatible with various network environments including the internal Internet based on the secret-related unit, provides software package increment operation for the internal Internet, and effectively improves the working efficiency.
The following describes an embodiment of the document package management method according to the present application with reference to a specific implementation. In this embodiment, a linux operating system runs on the device for manufacturing the document PACKAGE and the target machine, and includes a yocto framework, and a PACKAGE _ CLASSES + = "PACKAGE _ rpm" parameter is newly added, so that the compiled operating system supports generation and PACKAGE management of an rpm PACKAGE. The package management method in this embodiment includes a process of making a document package, which is described in the following steps S210 to S230, and a process of using a document package, which is described in the following steps S250 to S300.
The packet management method of this embodiment is described in detail below with reference to fig. 2:
s210: the method comprises the steps that yocto engineering is arranged on equipment for manufacturing a file package, software source codes corresponding to the file package are placed under an appointed directory, corresponding configuration files are compiled according to yocto rules, then the software source codes under the appointed directory are compiled through a yocto mechanism according to the configuration files, and a user-defined rpm package is generated to the directory corresponding to the yocto engineering.
The configuration file includes information such as user configuration, metadata (including recipes and patches), machine configuration, release configuration and the like by default.
S220: according to the yocot rule, configuring a make-replay.bb file, wherein a script is arranged in the bb file, the script configures the processes of rpm packet segmentation, packet index generation and iso file generation, and the script content can specifically comprise the following steps:
configured rpm packet segmentation procedure: because the capacity and compatibility of the optical disc are limited, and meanwhile, the optical disc based on the types of CD-ROM and the like has higher security, in the embodiment, the rpm packet under the yocto project corresponding directory is preferably divided according to the size of 4G, a new sub-directory is created, and the divided rpm packets smaller than 4G are put into each sub-directory one by one.
The configured packet index generation process: and calling a package-index command of yocto to generate a corresponding index for each divided rpm packet in each subdirectory.
Configured iso file generation process: and calling a relevant iso packaging script to generate each sub-directory into a corresponding local source iso file for manufacturing the optical disc.
S230: and after the configuration of the make-replay. Bb file is completed, executing a bitbake make-replay command under the engineering construction directory of yocto, namely executing the make-replay. Bb file under a bitrake/bin/directory in the engineering construction directory, and completing the generation of the local source iso file. For example, local source 1.Iso, local source 2.Iso, local source 3.Iso are generated.
S240: based on each iso file, each optical disc is recorded. And provides the optical disc to the first target machine. The first target machine may also be a server or the like in a specific network.
S250: the optical discs are sequentially placed in the optical drives of the first target machine, and if the first target machine is connected with a plurality of physical optical drives, the optical discs can be sequentially placed in the optical drives of the first target machine. Access to the physical optical drive of multiple usb interfaces may be achieved, for example, by means of a usb-hub.
If the first target machine only has one physical optical drive, each optical disc can be sequentially placed into the physical optical drive, each iso file is sequentially copied to a directory of the first target machine, a plurality of virtual optical drives are constructed by means of virtual optical drive software, and each iso file is loaded into each virtual optical drive.
S260: after the udev (udev is a device manager of a Linux kernel and has a hot plug identification function) of the first target machine identifies that each new cd-rom is accessed, a step of verifying whether the cd-rom mounted by the operating system is a local source is executed through a verification script, and the following description takes one cd-rom as an example and includes the following steps:
and reading the check file of the mounted cd-rom, checking the check file with a local source check code of the operating system through a hash algorithm, determining the check file as a local source file after the check is passed, and stopping and giving prompt information if the check is not passed. The local source check code can be stored in the/etc/directory of the first target machine in advance.
Meanwhile, after detecting that a new cd-rom is accessed and verified by the verification script, the udev generates a sub-integration configuration file according to the sequence, the size and other information of the iso file in the whole file package under the folder of the iso file by the integration configuration script.
On the other hand, the sub-integration configuration files are distinguished and integrated through the integration configuration script to obtain an integration configuration file, and the integration configuration file records information such as integration sequence and size of each file package.
And the second target machine acquires each iso file according to the sequence of the integrated configuration file, so that the required complete file package can be obtained.
S270: and creating a corresponding repo file according to the cd-rom local source file information. The creation of a repo file of a cd-rom is taken as an example, and the repo file may include the following partial information:
[ ID of local source file ]: for distinguishing between different local source files. The above ISO file name may be used, for example, where the information is: [ local Source 1].
[ name ]: local source file description information. Is optional.
[ baseurl ]: local source file addresses, including HTTP (HTTP://), local (file://), FTP (FTP://). The file address indicates where the file package is located. In this example, the file package is a local source, and one example of the information here may be: baseurl = file:///127.0.1/dev/cdrom 1/, where 127.0.0.1 denotes the default ip address of the local device, i.e. denotes that the local source file is located under/dev/cdrom 1/of the local device.
[ enabled ]: whether the local source file is available or not is set, 1 is available, and 0 is unavailable. For example, here the information is: enabled =1.
[ gpgcheck ]: and setting whether the local source file checks the file, wherein 1 is checking and 0 is not checking. For example, here the information is: enabled =1.
……
S280: and after the repo file is successfully created, executing an update command of a source to enable information such as the position of the file package to be effective, and then performing operations such as installation, deletion, update and the like of the package on the first target machine by using a dnf command. For example, the operation command may include the following:
dnf install package-name// install package-name software package
dnf erase package-name// offload package-name software package
dnf list// list installable software packages
In the process of executing the dnf command, when the software package needs to be read, the reading sequence of each ios file is obtained according to the integrated configuration file, and each iso file is sequentially read according to the reading sequence, so that the reading of the whole software package to the memory is realized.
S290: for a second target machine located in the same local area network as the first target machine, the ip address in the repo file of the second target machine can be modified to be the ip address of the first target machine.
S300: based on the modified repo file of the second target machine, the second target machine can know the position information of the file package and acquire the file package through the local area network.
When the second target machine acquires the file package, the second target machine acquires each iso folder and the corresponding iso file, and a sub-integration configuration file of information such as the sequence and the size of the iso file in the whole file package is stored under each iso folder. The sub-integration configuration files can be distinguished and integrated through the integration configuration script to obtain an integration configuration file, and the second target machine obtains each iso file according to the sequence of the integration configuration file to obtain the required complete file package. Or the integrated configuration file can be directly read from the first target machine by the second target machine for use.
And then executing the update command of the source, namely performing the operations of installation, update, deletion and the like of the package on the second target machine. In the embodiment, based on the operating environment pre-configured for the target machine, when the file package management is performed, the storage medium loaded to the target machine is verified, and after the verification is passed, the storage directory and the address of the corresponding file package in the corresponding repo file are created or modified, so that the file package management can be performed, and the security is effectively enhanced. Similarly, under the condition of a specific local area network based on an intranet, a secure network and the like, for example, when other target machines such as the second target machine perform operations such as adding and updating of the file package, the file package can be acquired and managed only by modifying information corresponding to the storage position of the file package in the corresponding repo file in the second target machine, mount verification and the like are avoided from machine to machine, and labor cost, time cost and the like are effectively saved.
As shown in fig. 3, fig. 3 is a schematic structural diagram of an example of a document bundle management apparatus 300 provided in this embodiment, where the document bundle management apparatus 300 of this embodiment includes a device management module 310, a verification module 320, a configuration file creation module 330, and a processing module 340, and the modules are specifically configured to execute the foregoing steps S101 to S104 and any optional example thereof. Reference may be made in detail to the method examples, which are briefly described herein as follows:
the device management module 310 is configured to mount a storage medium containing a file package on an operating system of a first target machine;
a checking module 320, configured to perform local source checking on the file package;
a configuration file creating module 330, configured to configure a first configuration file for the first target machine after the verification is passed; the first configuration file records a directory where the file package is located, and the directory points to a local address of the first target machine;
the processing module 340 is configured to operate on the first target machine on the file under the directory according to the first configuration file.
It should be understood that, for details of processing of the devices or modules in the embodiments of the present application, reference may be made to relevant expressions of the embodiments and the relevant extended embodiments shown in fig. 1 to fig. 2, and details of the embodiments of the present application will not be repeated.
According to the file package management scheme provided by the embodiment of the application, through configuration of the operation environment, the operation such as verification, installation and updating can be performed by utilizing the script, meanwhile, local remote package management can be achieved based on the local area network, the problems that the storage medium is subjected to verification carried out machine by machine, manpower and material resources and time are high in cost are solved, and meanwhile, the safety of file package management is effectively guaranteed through verification of the storage medium.
Fig. 4 is a schematic structural diagram of a computing device 900 according to an embodiment of the present application. The computing device may be used as various optional embodiments in the management of the file package, and the computing device may be a terminal, or may be a chip or a chip system inside the terminal. As shown in fig. 4, the computing device 900 includes: a processor 910, a memory 920, and a communication interface 930.
It should be appreciated that the communication interface 930 in the computing device 900 shown in fig. 4 may be used for communicating with other devices, and may in particular comprise one or more transceiver circuits or interface circuits.
The processor 910 may be connected to the memory 920. The memory 920 may be used to store the program codes and data. Therefore, the memory 920 may be a storage unit inside the processor 910, an external storage unit independent of the processor 910, or a component including a storage unit inside the processor 910 and an external storage unit independent of the processor 910.
Optionally, computing device 900 may also include a bus. The memory 920 and the communication interface 930 may be connected to the processor 910 through a bus. The bus may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, a line without arrows is used in fig. 4 to indicate that there is only one bus or one type of bus.
It should be understood that, in the embodiment of the present application, the processor 910 may employ a Central Processing Unit (CPU). The processor may also be other general purpose processors, digital Signal Processors (DSPs), application Specific Integrated Circuits (ASICs), field Programmable Gate Arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. Or the processor 910 is implemented by one or more integrated circuits, and is configured to execute the relevant programs to implement the technical solutions provided in the embodiments of the present application.
The memory 920 may include a read-only memory and a random access memory, and provides instructions and data to the processor 910. A portion of the processor 910 may also include non-volatile random access memory. For example, the processor 910 may also store information of the device type.
When the computing device 900 is running, the processor 910 executes the computer-executable instructions in the memory 920 to perform any of the operational steps of the methods described above and any optional embodiment thereof.
It should be understood that the computing device 900 according to the embodiment of the present application may correspond to a corresponding main body executing a method according to each embodiment of the present application, and the above and other operations and/or functions of each module in the computing device 900 are respectively for implementing a corresponding flow of each method of the embodiment, and are not described herein again for brevity.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the technical solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions may be stored in a computer-readable storage medium if they are implemented in the form of software functional units and sold or used as separate products. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The present embodiments also provide a computer-readable storage medium, on which a computer program is stored, where the computer program is used to execute the method described above when executed by a processor, and the method includes at least one of the solutions described in the above embodiments.
The computer storage media of embodiments of the present application may take any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider). Additionally, the terms first, second, third and the like in the description and in the claims, or the terms first, second, third and the like, or module a, module B, module C and the like, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order, as may be recognized and appropriate, so that the embodiments of the application described herein may be practiced in other sequences than those illustrated or described herein.
In the above description, reference numerals indicating steps such as S110, S120 \ 8230 \8230 \ 8230, etc. do not necessarily indicate that the steps are performed, and the order of the front and rear steps may be interchanged or performed simultaneously, where the case allows.
The term "comprising" as used in the specification and claims should not be construed as being limited to the items listed thereafter; it does not exclude other elements or steps. It is thus to be interpreted as specifying the presence of the stated features, integers, steps or components as referred to, but does not preclude the presence or addition of one or more other features, integers, steps or components, or groups thereof. Thus, the expression "an apparatus comprising the devices a and B" should not be limited to an apparatus consisting of only the components a and B.
Reference in the specification to "one embodiment" or "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the application. Thus, appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment, but may. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments, as would be apparent to one of ordinary skill in the art from this disclosure.
It is to be noted that the foregoing is only illustrative of the presently preferred embodiments and application of the principles of the present invention. Those skilled in the art will appreciate that the present application is not limited to the particular embodiments described herein, but is capable of many obvious modifications, rearrangements and substitutions without departing from the scope of the application. Therefore, although the present application has been described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present application, and all such equivalent embodiments are encompassed in the scope of the present application.

Claims (10)

1. A method for portfolio management, comprising:
mounting a storage medium containing a file package on a first target machine operating system;
checking the local source of the file package;
configuring a first configuration file for the first target machine after the verification is passed; the first configuration file records a directory where the file package is located;
and operating the file package under the directory on the first target machine according to the first configuration file.
2. The method of claim 1, wherein the locally verifying the bundle of files comprises:
and reading a verification file mounted on the storage medium, and verifying the verification file according to the local source verification code stored by the first target machine.
3. The method of claim 1, further comprising:
configuring a second configuration file for a second target machine which is positioned in the same local area network with the first target machine; the configuration file records a directory where the file package is located, and the directory points to the address of the first target machine;
and operating the file package under the directory on the second target machine according to the configuration file.
4. The method of any of claims 1-3, wherein manipulating the file package under the directory comprises at least one of:
and installing the file package under the directory, uninstalling the file package under the directory, and listing the file package under the directory.
5. The method of claim 1, further comprising: creating the storage medium containing the file package, comprising:
acquiring the file package;
dividing the file package into one or more sub-file packages according to a preset size, respectively storing the sub-file packages under each sub-directory, and respectively generating indexes;
respectively generating the subdirectories into mapping files;
and releasing the image files to storage media respectively.
6. The method of claim 3, further comprising:
generating an integrated configuration file; the integration configuration file records the integration sequence of the sub-file packages corresponding to the storage media;
the operating the file package under the directory comprises: and integrating the sub-packages read from the storage media according to the integrated configuration file, and then performing the operation.
7. The method according to any one of claims 1 to 5, wherein the operating system is a yocto framework based Linux system, said Linux system comprising at least one of:
a Dnf package management component for supporting said operations on said file packages;
and the detection verification script is used for executing the verification of the local source of the file packet.
8. A package management device, characterized by comprising:
the device management module is used for mounting a storage medium containing the file package on the operating system of the first target machine;
the verification module is used for verifying the local source of the file package;
the configuration file creating module is used for configuring a first configuration file for the first target machine after the verification is passed; the first configuration file records a directory where the file package is located, and the directory points to a local address of the first target machine;
and the processing module is used for operating the files under the directory on the first target machine according to the first configuration file.
9. The apparatus of claim 8, comprising:
the configuration file creating module is further configured to configure a second configuration file for a second target machine located in the same local area network as the first target machine; the configuration file records a directory where the file package is located, and the directory points to the address of the first target machine;
and the processing module is used for operating the file package under the directory on the second target machine according to the configuration file.
10. A computing device, comprising:
a processor, and
a memory having stored thereon program instructions that, when executed by the processor, cause the processor to perform the package management method of any of claims 1 to 7.
CN202211196933.3A 2022-09-29 2022-09-29 File packet management method and device and computing equipment Pending CN115469921A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211196933.3A CN115469921A (en) 2022-09-29 2022-09-29 File packet management method and device and computing equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211196933.3A CN115469921A (en) 2022-09-29 2022-09-29 File packet management method and device and computing equipment

Publications (1)

Publication Number Publication Date
CN115469921A true CN115469921A (en) 2022-12-13

Family

ID=84335491

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211196933.3A Pending CN115469921A (en) 2022-09-29 2022-09-29 File packet management method and device and computing equipment

Country Status (1)

Country Link
CN (1) CN115469921A (en)

Similar Documents

Publication Publication Date Title
US11599348B2 (en) Container image building using shared resources
US10824411B2 (en) Install file size optimization and installation verification system
US9940330B2 (en) System and method for converting a physical disk to a virtual disk
US8843921B1 (en) System and method for controlling installed third party software components
CN103559052B (en) The apparatus and method for that firmware updates
Brittain et al. Tomcat: The Definitive Guide: The Definitive Guide
US8862633B2 (en) System and method for efficiently building virtual appliances in a hosted environment
US20090300641A1 (en) System and method for supporting a virtual appliance
EP1967981A1 (en) Program execution control method, device, and execution control program
EP3345112B1 (en) Thresholds on scripts executable by unified extensible firmware interface systems
US10360011B2 (en) Private computer network installations
CN110543369A (en) Construction method and device of storage space structure of android system and construction structure of storage space structure of android system
CN103714287A (en) Method and device for obtaining temporary Root authority
CN112148297A (en) Intelligent server encryption and packaging method and device
CN113900693A (en) Firmware upgrading method, device and system, electronic equipment and storage medium
BR102013006506A2 (en) Update Method and Embedded Multidomain System
CN115469921A (en) File packet management method and device and computing equipment
CN115629819A (en) Operating system installation method and device and computing equipment
CN107533436B (en) Hardware management
CN114969720A (en) Installation method and device of android application, storage medium and computer equipment
US20090089779A1 (en) Apparatus system and method for customizing a computing environment
CN118427162B (en) Authorization control method and device for operating system, electronic equipment, storage medium and program product
US20240192941A1 (en) Method for firmware burning, electronic device, and non-transitory storage medium
CN109271173B (en) Platform application management method and device, storage medium and terminal equipment
US20240168732A1 (en) Method for generating driver package, method for deploying driver, electronic device, and computer readable storage medium

Legal Events

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