CN114780950A - Method, system, device and storage medium for cross-version compatible operation of application software - Google Patents

Method, system, device and storage medium for cross-version compatible operation of application software Download PDF

Info

Publication number
CN114780950A
CN114780950A CN202210698714.9A CN202210698714A CN114780950A CN 114780950 A CN114780950 A CN 114780950A CN 202210698714 A CN202210698714 A CN 202210698714A CN 114780950 A CN114780950 A CN 114780950A
Authority
CN
China
Prior art keywords
environment
application
sandbox
runtime environment
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.)
Granted
Application number
CN202210698714.9A
Other languages
Chinese (zh)
Other versions
CN114780950B (en
Inventor
李小玲
马俊
秦莹
王静
高珑
贾周阳
赵欣
谭郁松
张雪艳
阳娅婧
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
National University of Defense Technology
Original Assignee
National University of Defense Technology
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 National University of Defense Technology filed Critical National University of Defense Technology
Priority to CN202210698714.9A priority Critical patent/CN114780950B/en
Publication of CN114780950A publication Critical patent/CN114780950A/en
Application granted granted Critical
Publication of CN114780950B publication Critical patent/CN114780950B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/52Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems during program execution, e.g. stack integrity ; Preventing unwanted data erasure; Buffer overflow
    • G06F21/53Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems during program execution, e.g. stack integrity ; Preventing unwanted data erasure; Buffer overflow by executing in a restricted environment, e.g. sandbox or secure virtual machine

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention relates to a method, a system, a device and a storage medium for cross-version compatible operation of application software, wherein the method comprises the following steps: 1) building a runtime environment based on the operating system release; 2) constructing a sandbox environment as an isolated operation environment required by the application, and mounting a file system of the sandbox environment constructed by the operation environment in the sandbox environment; 3) constructing an application based on the runtime environment; 4) installing a runtime environment and an application in a sandbox environment; 5) the application is run in a sandbox environment. The invention builds the running environment needed by the application by mounting the running environment in the sandbox environment, and builds an isolated running environment in the sandbox environment, and the isolated environment only depends on the operating system environment built in the running process and does not depend on the host operating system environment in which the application runs, thereby ensuring that the running environment needed by the application is realized in different host operating system releases, and further realizing the cross-version compatible running of the application software.

Description

Method, system, device and storage medium for cross-version compatible operation of application software
Technical Field
The invention relates to the field of application software management, in particular to a method, a system, a device and a storage medium for cross-version compatible operation of application software.
Background
In the Linux operating system, the traditional application software (such as the deb and rpm packages) needs to be installed at the same time when being installed, and the traditional application software can only run on a specific operating system release. Because the out-of-core environment and the in-core version of different Linux releases are different, application software cannot run compatibly across releases, for example, software in Ubuntu 1604 cannot be installed or run normally on Ubuntu 1804 because software dependency is not satisfied. Therefore, it can be known that the current application software and the operating system are tightly coupled, the application software of a specific version can only run on the version of the specific operating system generally, and the updating and upgrading of an operating system underlying library or a certain software package can cause the unavailability of other software, which brings great challenges to third party application developers and operating system managers and also influences the improvement of the application ecology of the Linux system to a certain extent.
In order to solve the technical problems, the current mainstream method is to adopt technologies such as a virtual machine, WINE, AppImage, and flexpak, the virtual machine technology realizes system-level isolation by simulating a real computer device, and the compatible mode has large memory occupation and large performance loss. WINE translates Windows API calls into dynamic POSIX calls, and realizes the butt mapping of API interfaces between two operating systems through a compatible layer. By packaging all the dependent files of one piece of software together, the application only needs to access the internal files of the application when running, and does not need to access any files of an operating system. The Flatpak builds the application based on a shared Runtime environment (Runtime), and the method has the main problems of high requirement and high cost for application building.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: the utility model provides a method, a system, a device and a storage medium for cross-version compatible operation of application software, which can realize the cross-version compatible operation of the application software.
The technical scheme adopted by the invention for solving the technical problems is as follows: a method for cross-version compatible operation of application software comprises the following steps: 1) building a runtime environment based on the operating system release; 2) constructing a sandbox environment as an isolated operation environment required by the application, and mounting a file system of the sandbox environment constructed by the operation environment in the sandbox environment; 3) constructing an application based on the runtime environment; 4) installing a runtime environment and an application in a sandbox environment; 5) the application is run in a sandbox environment.
Preferably, the building of the runtime environment includes building a basic runtime environment and building an incremental runtime environment, the mounting runtime environment is a joint mounting basic runtime environment and an incremental runtime environment, the corresponding basic runtime environment is built based on a software warehouse of a corresponding operating system release, the incremental runtime environment is built based on the basic runtime environment, and the incremental runtime environment is an incremental environment required by application operation and added on the basis of the basic runtime environment.
Preferably, the step of constructing the corresponding base runtime environment based on the software repository of the corresponding operating system release is as follows:
1) analyzing the metadata file, and acquiring an operating system type and a release code corresponding to a basic runtime environment;
2) constructing a rootfs file system through a file system construction tool according to the acquired operating system type and the release code;
3) determining a signature key, and updating a GPG key of the metadata file to be a public key of the signature key;
4) and (3) constructing and outputting the rootfs file system into a file with a specified format by using a formatting tool, and signing the output file to obtain a basic runtime environment.
Preferably, the step of constructing the incremental runtime environment based on the base runtime environment is as follows:
1) confirming whether a corresponding basic runtime environment is installed or not, and if not, installing the basic runtime environment to form a rootfs directory;
2) if the basic operation environment is installed, analyzing the dependent configuration file to obtain a software list needing to be installed;
3) constructing a sandbox environment, and mapping a rootfs directory and a newly-built readable and writable directory of a basic runtime environment to a root directory of the sandbox in a combined mounting mode to form a file system of the sandbox;
4) installing a software list using a software management tool;
5) determining a signature key, and updating a GPG key of the metadata file to be a public key of the signature key;
6) and (4) constructing and outputting the newly-built readable and writable directory of the sandbox into a file with a specified format by using a formatting tool, and signing to obtain an increment runtime environment.
Preferably, the step of building the application based on the runtime environment is as follows:
1) analyzing the metadata configuration file of the application to obtain a runtime environment on which the application depends;
2) judging whether to install the dependent runtime environment, if not, installing the corresponding runtime environment; if so, continuing;
3) constructing a sandbox environment, and mapping a dependent runtime environment as a file system;
4) installing an application in the sandbox using a software management tool;
5) determining a signature secret key, and updating a GPG secret key of the metadata file into a public key of the signature secret key;
6) and packaging and signing the newly-built readable and writable directory of the sandbox to obtain the application installation file.
A system for cross-version compatible operation of application software, comprising:
compatible application management module, compatible application management module includes:
the environment and application building unit is used for building a runtime environment based on the operating system release, building a sandbox environment as an isolated runtime environment required by the application, mounting a file system of the runtime environment built sandbox environment in the sandbox environment, and building a corresponding application in the sandbox environment;
the runtime management client is used for supporting the installation and operation of a runtime environment in the sandbox environment;
and the application management client is used for supporting the installation and the operation of the application in the sandbox environment.
Preferably, the system further comprises:
the directory mapping management module is used for being in butt joint with a file system in an operating system and managing a runtime environment, a directory of an application and a configuration file;
the directory map management module comprises:
the file directory management unit of runtime, is used for managing the organization mode, storage directory of the environment in file system of runtime;
the application file directory management unit is used for managing the organization modes and the storage directories of different applications in the file system;
and the unified configuration directory management unit is used for storing and managing configuration files of the application and the runtime environment.
Preferably, the system further comprises:
the runtime environment management module is used for being in butt joint with an out-of-core environment in an operating system and supporting the construction of a sandbox environment and the communication and interaction between an application environment in the sandbox and a host system environment;
the runtime environment management module includes:
the sandbox environment constructing unit is used for constructing a file system environment isolated from the host system through a sandbox mechanism and providing a dynamic library;
a shared services unit for supporting shared access to file systems and devices in a host system in a sandbox environment;
a communication service unit for supporting communication of applications within the sandbox environment with applications or services in the host system;
and the configuration service management unit is used for managing the configuration of the application and the configuration interface of the host system.
A computer apparatus, comprising: a processor, a memory, and a program;
the program is stored in the memory, and the processor calls the program stored in the memory to execute the method for the cross-version compatible operation of the application software.
A computer readable storage medium storing a program for executing the above method for cross-version compatible operation of application software.
The beneficial effects of the invention are:
1. the application software is compatible to run across releases: the application software constructed based on the method can run compatibly on different operating system releases;
2. and (3) multi-version installation and operation of application software: the method can realize the simultaneous installation and compatible operation of a plurality of different versions of software on the operating system version of the target host;
3. safety control: the sandbox mechanism realizes the isolation of an application running environment from an operating system environment so as to ensure the safety of the operating system;
4. effectively docking an existing software warehouse: compatible applications can be constructed through the binary software package, and the problems of dependence in the software compiling process, binary software installation configuration and the like can be avoided.
Drawings
FIG. 1 is a framework schematic diagram of a system in which application software of the present invention runs compatibly across versions;
FIG. 2 is a technical architecture diagram of a system in which the application software of the present invention runs compatibly across versions;
FIG. 3 is a flow chart illustrating a method for cross-version compatible operation of application software according to the present invention;
FIG. 4 is a structural block diagram of a computer device according to the present invention.
Detailed Description
The invention may be embodied in many different forms and should not be construed as limited to the embodiments set forth herein.
The invention provides a method for cross-version compatible operation of application software, which comprises the following steps: 1) building a runtime environment based on the operating system release; 2) constructing a sandbox environment as an isolated operation environment required by the application, and mounting a file system of the sandbox environment constructed by the operation environment in the sandbox environment; 3) constructing an application based on the runtime environment; 4) installing a runtime environment and an application in a sandbox environment; 5) the application is run in a sandbox environment. Preferably, the operating system is a Linux-based operating system.
Specifically, in the embodiment of the present invention, the building of the Runtime environment (Runtime) includes building a Base Runtime environment (Base Runtime) and a Delta Runtime environment (Delta Runtime), the mount Runtime environment is a joint mount Base Runtime environment and a Delta Runtime environment, a corresponding Base Runtime environment is built based on a software warehouse of a corresponding operating system release, the Base Runtime environment includes a core file system of an operating system, the Delta Runtime environment is an environment that is built by performing secondary development on the basis of the Base Runtime environment (Base Runtime) for different development environments (such as GTK, Qt, and the like), the Delta Runtime environment is built on the basis of the Base Runtime environment, and the Delta Runtime environment is an incremental environment required by application operation added on the basis of the Base Runtime environment.
The invention builds the running environment required by the application by mounting the running environment in the sandbox environment, and builds an isolated running environment in the sandbox environment, wherein the isolated environment only depends on the operating system environment built in the running process and does not depend on the host operating system environment in which the application runs, thereby ensuring that the running environment required by the application is realized in different host operating system releases, and further realizing the cross-version compatible running of the application.
In one embodiment of the present invention, the detailed steps of building a corresponding base runtime environment based on a software repository of a corresponding operating system release are as follows:
1) analyzing the metadata file to obtain an operating system type and a release code corresponding to the basic runtime environment;
2) constructing a rootfs file system through a file system construction tool according to the acquired operating system type and the release code; such as setting the mirror, script, etc. of the deboottrace, calls the deboottrace tool to construct the rootfs file system, which is a tool under debian/ubuntu to construct a basic set of systems (root file system). The generated directory conforms to the Linux file system standard (FHS), namely, the generated directory comprises directories of/boot,/etc.;
3) determining a signature secret key, and updating a GPG secret key of the metadata file into a public key of the signature secret key;
4) constructing and outputting a rootfs file system into a file with a specified format by using a formatting tool, and signing the output file to obtain a basic runtime environment; in this embodiment, an mksquashfs tool is specifically used to construct and output a rootfs file system as a squashfs format file and to sign the file, so that a Base Runtime environment (Base Runtime) is obtained.
The detailed steps of constructing the incremental Runtime environment (Delta Runtime) based on the Base Runtime environment (Base Runtime) in the present embodiment are as follows:
1) confirming whether a corresponding basic runtime environment is installed or not, if not, installing the basic runtime environment to form a rootfs directory;
2) if the basic operation environment is installed, analyzing the dependent configuration file to obtain a software list needing to be installed;
3) constructing a sandbox environment, and mapping a rootfs directory and a newly-built readable and writable directory of a basic runtime environment to a root directory of the sandbox in a combined mounting mode to form a file system of the sandbox; specifically, in one embodiment, a sandbox is started through a sandbox tool bwrap, a read-only rootfs directory and a newly-built readable and writable builddir directory are mapped to a root directory of the sandbox in a combined mounting mode, so that a file system of the sandbox is formed, uid/gid is mapped, and an external common user is mapped to a root user inside the sandbox;
4) installing a software list using a software management tool; specifically, in one embodiment, a software name list pkgname _ list is traversed, and a corresponding application is installed in a sandbox through an apt command;
5) determining a signature secret key, and updating a GPG secret key of the metadata file into a public key of the signature secret key;
6) constructing and outputting the newly-built readable and writable directory of the sandbox into a file with a specified format by using a formatting tool, and signing to obtain an increment operation environment; specifically, in one embodiment, the mksquashfs tool may be used to export the newly created readable-writable builddir directory as a squarhfs format file and sign the file.
In the embodiment of the invention, the detailed steps of constructing the application (App) based on the Runtime environment (Runtime) are as follows:
1) analyzing the metadata configuration file of the application to obtain a runtime environment on which the application depends;
2) judging whether to install the dependent runtime environment, if not, installing the corresponding runtime environment; if so, continuing;
3) constructing a sandbox environment, and mapping a dependent Runtime environment (Runtime) as a file system;
4) installing an application in the sandbox using a software management tool; executing an apt-get install appname command in the sandbox, wherein the newly-built readable and writable directory of the sandbox is the installation directory of the application after the installation is successful, and in other embodiments, the application can be installed through a dpkg command;
5) determining a signature secret key, and updating a GPG secret key of the metadata file into a public key of the signature secret key;
6) packing and signing the newly-built readable and writable directory of the sandbox to obtain an application installation file; specifically, a tar tool can be used to package and sign the newly-created readable and writable builddir directory.
Specifically, in an embodiment, the installation of the base runtime environment and the incremental runtime environment includes the following steps:
1) acquiring a signed runtime environment file with a specified format, namely acquiring a squashfs file of a runtime environment;
2) acquiring metadata file information;
3) verifying the integrity of the runtime environment file;
4) confirming an installation catalog of the runtime environment;
5) adding the squashfs file of the runtime environment to a runtime environment directory;
6) and calling the configuration file to complete the configuration of the environment file.
Specifically, in the embodiment, after obtaining the installation file of the application, the installation of the application includes the following steps:
1) acquiring an application installation file;
2) decompressing the application installation file and acquiring metadata file information;
3) verifying the integrity of the application installation file;
4) confirming an installation directory of the application;
5) adding the decompressed application installation file to an application directory;
6) and calling the application configuration file to complete the application configuration work and complete the installation of the application, so far, the application is already installed in the sandbox environment, and then the application can be operated in the sandbox environment.
In the foregoing embodiment, a method for implementing cross-version compatible operation of application software is provided, and particularly in an operating system of Linux, a runtime environment is first constructed to implement decoupling of an upper layer application and a bottom layer operating system; secondly, creating an application running environment isolated from an operating system of a host system (host machine) through a sandbox technology, so that the application is isolated from the operating system and the application is isolated from the application, and the running environment is mounted in a combined mounting mode to construct a file system of the sandbox environment; and installing the specified application software by using a self-contained software installation tool of the Linux system such as apt/dpkg in the sandbox running environment again.
The method of the invention can obtain the following beneficial effects:
1. the application software is compatible to run across releases: the application software constructed based on the method can run compatibly on different operating system releases;
2. the multi-version installation and operation of the application software are as follows: the method can realize the simultaneous installation and compatible operation of a plurality of different versions of software on the operating system version of the target host;
3. safety control: the sandbox mechanism realizes the isolation of an application running environment and an operating system environment so as to ensure the safety of the operating system;
4. effectively docking an existing software warehouse: compatible applications can be constructed through the binary software package, and the problems of dependence in the software compiling process, configuration of binary software installation and the like can be avoided.
In an embodiment of the present invention, a system for compatible operation of application software across versions is further provided, including:
compatible application management module 1, compatible application management module 1 includes:
the environment and application constructing unit 101 is configured to construct a runtime environment based on an operating system release, construct a sandbox environment as an isolated runtime environment required by an application, mount a file system of the runtime environment constructed sandbox environment in the sandbox environment, and construct a corresponding application in the sandbox environment; the environment and application constructing unit 101 is responsible for constructing a runtime environment and an application, including constructing a basic runtime environment, an incremental runtime environment and an application, and defining a format and metadata of the runtime environment and the application;
a runtime management client 102, configured to support installation and operation of a runtime environment in a sandbox environment;
and the application management client 103 is used for supporting the installation and the operation of the application in the sandbox environment.
In addition, the runtime management client 102 also supports deletion and querying of runtime environments, and the application management client 103 also supports deletion and querying of applications.
The system also comprises a directory mapping management module 2, which is used for interfacing with a file system in the operating system and managing directories and configuration files of the runtime environment and the application.
Specifically, the directory mapping management module 2 includes:
a Runtime file directory management unit 201, configured to manage an organization manner and a storage directory of a Runtime environment in a file system, and mainly manage an organization manner and a storage directory and the like of a Base Runtime environment (Base Runtime) and an incremental Runtime environment (Delta Runtime) in the file system;
the application file directory management unit 202 is used for managing organization modes and storage directories of different applications in a file system, different branches of the application software with the same name are stored in different sub-directories, and the same files in different application software can be shared in a hard link mode;
the unified configuration directory management unit 203 is configured to store and manage configuration files of the application and the Runtime environment, the global configuration file records a mapping relationship between the App/Runtime and the host system, and the Runtime/App configuration file records metadata and installation path information of the installed Runtime/App.
Specifically, in an embodiment, the implementation content of the runtime file directory management unit 201 includes:
1) a storage format is set, and the specified storage format of the embodiment is as follows: the Runtime is stored under a $ Runtime _ path directory, a primary directory is base or delta and respectively corresponds to a Runtime directory and a Runtime increment directory; the secondary catalog is an operating system type; the third level directory is an operating system version code. For example, the Base Runtime storage path of Ubuntu 1804 release is $ Runtime _ path/Base/Ubuntu/bionic;
2) data is added to the Runtime directory by means of hard linking to deduplicate file data.
Specifically, in an embodiment, the applying the file directory management unit 202 implements contents including:
1) a storage format is set, and the storage format specified in this embodiment is: app is stored under a $ App _ path directory, the primary directory is an application name, and the secondary directory is a software version. For example, the vim 2.3 version storage path is $ app _ path/vim/2.3;
2) and adding data to the application directory by means of hard link deduplication of file data.
Specifically, in an embodiment, the implementation content of the unified configuration directory management unit 203 includes:
the unified configuration directory management unit 203 manages and configures files in a unified configuration directory, where this embodiment specifies the directory as a/kylink/config directory, and the directory includes the following 3 files;
1) global configuration file: and recording the mapping relation among the runtime environment directory, the application directory and the host file directory. The present embodiment specifies the default mapping relationship as: mapping the runtime environment directory to a/kylink/runtime directory of the host system, which is recorded as runtime _ path, and mapping the application directory to a $ HOME/kylink _ app directory of the host system, which is recorded as app _ path;
2) runtime environment directory configuration file: recording the installed runtime environment directory information, which generally includes metadata information, installation path information, and the like;
3) application configuration files: recording installed application information, typically including metadata information, installation path information, etc.;
in order to support the operation of the compatible application management module 1, the system is also provided with a runtime environment management module 3 which is used for being in butt joint with an extranuclear environment in an operating system and supporting the construction of a sandbox environment and the communication and interaction between the application environment in the sandbox and a host system environment.
Specifically, in one embodiment, the runtime environment management module 3 includes:
the sandbox environment constructing unit 301 is configured to construct a file system environment isolated from the host system by using a sandbox mechanism, and provide a dynamic library, where the sandbox environment constructing unit 301 implements construction of a multi-layer file system by using a union file system (Unionfs), and the Unionfs file system is divided into a read-only layer and a read-write layer. The read-only layer file system is composed of a plurality of read-only file systems;
a shared services unit 302 for supporting shared access to file systems and devices in a host system in a sandbox environment; the shared service unit 302 includes the following functions:
firstly, the access of the application in the sandbox to the file system of the host system is realized, and access authorities such as no access, read-only access, read-write access and the like can be set; secondly, the host system accesses the file system corresponding to the sandbox application, the Runtime and the App in the sandbox are mapped into the file system of the host system through the directory mapping management module 2, and the host system can directly access all the file systems in the application in this way; thirdly, the application in the sandbox can access the external device of the host system, and the sharing of the device file of the host system and the sandbox is realized in a device sharing mode;
a communication service unit 303, configured to support communication between an application in the sandbox environment and an application or service in the host system; because the sandbox technology is used to isolate the running environment of the compatible application from the environment of the host system, the communication modes of the running environment and the environment of the host system are generally Socket communication or DBUS communication, including Socket communication with the host system and DBUS bus communication;
a configuration service management unit 304, configured to interface the configuration of the application with the configuration of the host system, for example, interface the desktop shortcut, interface the system configuration of directories such as/etc., interface the user configuration of directories such as under the/home directory,. var,. cache etc., and update the Runtime and App related configuration files during installation.
In one embodiment, the sandbox environment building unit 301 may implement the file system building and directory and image checking.
The file system construction implementation content of the sandbox environment comprises the following steps:
301-1) obtaining the name runtime _ name of the runtime environment and the name app _ name of the application software;
301-2) checking the integrity of the runtime environment's name runtime _ name by the directory and mirror check module; if the success is successful, continuing to the step 301-3), otherwise, exiting;
301-3) find the installation path of the runtime environment's name runtime _ name and the dependent runtime environment through the runtime management client interface. A temporary directory runtime _ dir is created and the runtime environment file is mounted under the runtime _ dir1 directory using the mount command. If the runtime dependence exists, continuing to the step 301-4), otherwise, turning to the step 301-5);
301-4) find runtime dependent installation paths through the runtime management client interface. Creating a temporary directory runtime _ dir1, and using a mount command to mount the runtime file under a runtime _ dir1 directory;
301-5) searching an installation path app _ dir of the name app _ name of the application software through an application management client interface;
301-6) create a temporary directory tmpdir;
301-7) the sandbox file system is formed by jointly mounting the Overlay file system, wherein runtime _ dir is a read-only layer, app _ dir is a read-write layer, and tmpdir is a joint layer.
The contents and steps of the implementation of the directory and mirror image verification are as follows:
1) acquiring the name runtime _ name of the runtime environment;
2) analyzing the configuration file of the runtime environment, and acquiring a gpg secret key and a runtime installation path through a runtime management client query interface;
3) integrity of runtime is checked.
Specifically, in an embodiment, the sharing service unit 302 is mainly used for managing various rights of the application to the host system, and the implementation content and steps are as follows:
1) transferring the permission type and the permission content parameter to the module;
2) comparing the authority type parameters, executing the following operations:
for the device authority, mounting a directory and a file under a host system/dev through remount;
and for the filesystems authority, mounting the host system directory into the sandbox according to the authority content parameters.
Specifically, in an embodiment, the communication service unit 303 is mainly used for implementing mutual communication between the application and the host system, and mainly includes a Socket communication module and a Dbus communication module, and its implementation content and steps are as follows:
1) the Socket communication module is responsible for communicating with x11, pulseaudio and the like of the host system, and the detailed steps are as follows: analyzing and acquiring a permission parameter list; traversing the list, only reading and mounting a corresponding socket file, and setting an environment variable;
2) the Dbus communication module is communicated with other desktop applications through Dbus-daemon, and the detailed steps are as follows:
firstly, inquiring DBUS _ SESSION _ BUS _ ADDRESS environment variables of a host system for SESSION-DBUS, mounting socket files under the path of the environment variables in the host system into a sandbox where an application is located in a read-only mode (the path is recorded as sock _ path), and setting the DBUS _ SESSION _ BUS _ ADDRESS environment variables in the sandbox as sock _ path;
secondly, for SYSTEM-DBUS, inquiring the DBUS _ SYSTEM _ BUS _ ADDRESS environment variable of the host SYSTEM, mounting the socket file under the path of the environment variable in the host SYSTEM into a sandbox where the application is located in a read-only mode (the path is marked as socket _ path), and setting the DBUS _ SYSTEM _ BUS _ ADDRESS environment variable in the sandbox to be socket _ path.
The configuration service management unit 304 relates to the relevant configuration operations of the processes of environment construction, runtime/app installation, etc., and implements the following contents and steps:
1) updating the runtime configuration file of the unified configuration directory management unit after the runtime is successfully installed;
2) and updating the app configuration file of the unified configuration directory management unit after the app is successfully installed.
In an embodiment of the present invention, there is also provided a computer apparatus, including: a processor, a memory, and a program;
the program is stored in the memory, and the processor calls the program stored in the memory to execute the method for the cross-version compatible operation of the application software.
The computer apparatus may be a terminal, and its internal structure diagram may be as shown in fig. 4. The computer device comprises a processor, a memory, a network interface, a display screen and an input device which are connected through a bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for connecting and communicating with an external terminal through a network. The computer program, when executed by a processor, implements a method for cross-version compatible operation of application software. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on a shell of the computer device, an external keyboard, a touch pad or a mouse and the like.
The Memory may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like. The memory is used for storing programs, and the processor executes the programs after receiving the execution instructions.
The processor may be an integrated circuit chip having signal processing capabilities. The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like. 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, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Those skilled in the art will appreciate that the configuration shown in fig. 4 is a block diagram of only a portion of the configuration associated with the present application and is not intended to limit the computing device to which the present application may be applied, and that a particular computing device may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In an embodiment of the present invention, a computer-readable storage medium is further provided, and the computer-readable storage medium is used for storing a program for executing the method for compatible operation of the application software across versions.
As will be appreciated by one of skill in the art, embodiments of the present invention may be provided as a method, computer apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and so forth) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations of methods, computer apparatus, or computer program products according to embodiments of the invention. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart.
The method, system, computer device, and computer-readable storage medium for cross-version compatible operation of application software provided by the present invention are described in detail above, and specific embodiments are applied herein to explain the principles and embodiments of the present invention, and the description of the embodiments is only used to help understand the method and its core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, the specific embodiments and the application range may be changed, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (9)

1. A method for compatible operation of application software across versions is characterized in that: the method comprises the following steps: 1) constructing a runtime environment based on the operating system release; 2) constructing a sandbox environment as an isolated operation environment required by the application, and mounting a file system of the sandbox environment constructed by the operation environment in the sandbox environment; 3) constructing an application based on the runtime environment; 4) installing a runtime environment and an application in a sandbox environment; 5) running an application in a sandbox environment;
the method comprises the steps of constructing a basic runtime environment and an incremental runtime environment, wherein the mounting runtime environment is a combined mounting basic runtime environment and an incremental runtime environment, constructing a corresponding basic runtime environment based on a software warehouse of a corresponding operating system release, and constructing an incremental runtime environment based on the basic runtime environment, wherein the incremental runtime environment is an incremental environment which is required by application operation and is added on the basis of the basic runtime environment.
2. The method for compatible operation of application software across versions according to claim 1, wherein: the steps of constructing a corresponding base runtime environment based on a software repository of a corresponding operating system release are as follows:
1) analyzing the metadata file, and acquiring an operating system type and a release code corresponding to a basic runtime environment;
2) constructing a rootfs file system through a file system construction tool according to the acquired operating system type and release code number;
3) determining a signature key, and updating a GPG key of the metadata file to be a public key of the signature key;
4) and (3) constructing and outputting the rootfs file system into a file with a specified format by using a formatting tool, and signing the output file to obtain a basic runtime environment.
3. The method for compatible operation of application software across versions according to claim 1, wherein: the steps of constructing the incremental runtime environment based on the base runtime environment are as follows:
1) confirming whether a corresponding basic runtime environment is installed or not, and if not, installing the basic runtime environment to form a rootfs directory;
2) if the basic operation environment is installed, analyzing the dependent configuration file to obtain a software list to be installed;
3) constructing a sandbox environment, and mapping a rootfs directory and a newly-built readable and writable directory of a basic runtime environment to a root directory of the sandbox in a combined mounting mode to form a file system of the sandbox;
4) installing a software list using a software management tool;
5) determining a signature key, and updating a GPG key of the metadata file to be a public key of the signature key;
6) and (4) constructing and outputting the newly-built readable and writable directory of the sandbox into a file with a specified format by using a formatting tool, and signing to obtain an increment runtime environment.
4. The method for compatible operation of application software across versions according to claim 1, characterized in that: the steps of building an application based on a runtime environment are as follows:
1) analyzing the metadata configuration file of the application to obtain a runtime environment on which the application depends;
2) judging whether a dependent runtime environment is installed or not, and if not, installing a corresponding runtime environment; if so, continuing;
3) constructing a sandbox environment, and mapping a dependent runtime environment as a file system;
4) installing an application in a sandbox using a software management tool;
5) determining a signature secret key, and updating a GPG secret key of the metadata file into a public key of the signature secret key;
6) and packaging and signing the newly-built readable and writable directory of the sandbox to obtain the application installation file.
5. A system for compatible operation of application software across versions is characterized in that: the method comprises the following steps:
compatible application management module, compatible application management module includes:
the environment and application building unit is used for building a runtime environment based on an operating system release, building a sandbox environment as an isolated runtime environment required by the application, mounting a file system of the runtime environment built sandbox environment in the sandbox environment, and building a corresponding application in the sandbox environment;
the runtime management client is used for supporting the installation and the operation of a runtime environment in a sandbox environment;
and the application management client is used for supporting the installation and the operation of the application in the sandbox environment.
6. The system of claim 5, wherein: further comprising:
the directory mapping management module is used for being in butt joint with a file system in an operating system and managing directories and configuration files of a runtime environment and an application;
the directory map management module comprises:
the file directory management unit of runtime, is used for managing the organization mode, storage directory of the runtime environment in the file system;
the application file directory management unit is used for managing the organization modes and the storage directories of different applications in the file system;
and the unified configuration directory management unit is used for storing and managing configuration files of the application and the runtime environment.
7. The system of claim 5, wherein: further comprising:
the runtime environment management module is used for being in butt joint with an extra-core environment in an operating system and supporting the construction of a sandbox environment and the communication and interaction between an application environment in the sandbox and a host system environment;
the runtime environment management module includes:
the sandbox environment building unit is used for building a file system environment isolated from the host system through a sandbox mechanism and providing a dynamic library;
a shared services unit for supporting shared access to file systems and devices in a host system in a sandbox environment;
the communication service unit is used for supporting the communication between the application in the sandbox environment and the application or service in the host system;
and the configuration service management unit is used for managing the configuration of the application and the configuration interface of the host system.
8. A computer device, characterized by: the method comprises the following steps: a processor, a memory, and a program;
a program stored in the memory, the processor calling the memory stored program to perform the method of cross-version compatible operation of the application software of any of claims 1-4.
9. A computer-readable storage medium characterized by: a computer readable storage medium for storing a program for executing the method for cross-version compatible operation of the application software of any one of claims 1-4.
CN202210698714.9A 2022-06-20 2022-06-20 Method, system, device and storage medium for cross-version compatible operation of application software Active CN114780950B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210698714.9A CN114780950B (en) 2022-06-20 2022-06-20 Method, system, device and storage medium for cross-version compatible operation of application software

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210698714.9A CN114780950B (en) 2022-06-20 2022-06-20 Method, system, device and storage medium for cross-version compatible operation of application software

Publications (2)

Publication Number Publication Date
CN114780950A true CN114780950A (en) 2022-07-22
CN114780950B CN114780950B (en) 2022-09-06

Family

ID=82421861

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210698714.9A Active CN114780950B (en) 2022-06-20 2022-06-20 Method, system, device and storage medium for cross-version compatible operation of application software

Country Status (1)

Country Link
CN (1) CN114780950B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115510429A (en) * 2022-11-21 2022-12-23 统信软件技术有限公司 Sandbox application access right control method, computing device and readable storage medium
CN115934157A (en) * 2022-12-28 2023-04-07 中国人民解放军国防科技大学 Software dependency range automatic inference method, device, computer equipment and memory
CN117234622A (en) * 2023-11-16 2023-12-15 中国电子科技集团公司第十五研究所 Multi-language runtime on-demand calling method and system
CN117707985A (en) * 2024-02-01 2024-03-15 麒麟软件有限公司 Method, device and storage medium for acquiring software compatibility information

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106598576A (en) * 2016-11-30 2017-04-26 深圳市泛海三江科技发展有限公司 Equipment parameter updating method and device based on squashfs read-only file
CN108614701A (en) * 2016-12-26 2018-10-02 中移(苏州)软件技术有限公司 A kind of (SuSE) Linux OS method for customizing and device
CN112148351A (en) * 2020-09-16 2020-12-29 杭州安恒信息技术股份有限公司 Cross-version compatibility method and system for application software
CN112486512A (en) * 2020-11-25 2021-03-12 湖南麒麟信安科技股份有限公司 Linux general software adaptation method and system based on container and stacked file system
CN112698919A (en) * 2021-01-07 2021-04-23 北京金万维科技有限公司 Method for rapidly building shared unified web development environment by using docker based on linux
CN113986395A (en) * 2021-11-08 2022-01-28 麒麟软件有限公司 Packaging method for applying dependent self-contained technology under linux system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106598576A (en) * 2016-11-30 2017-04-26 深圳市泛海三江科技发展有限公司 Equipment parameter updating method and device based on squashfs read-only file
CN108614701A (en) * 2016-12-26 2018-10-02 中移(苏州)软件技术有限公司 A kind of (SuSE) Linux OS method for customizing and device
CN112148351A (en) * 2020-09-16 2020-12-29 杭州安恒信息技术股份有限公司 Cross-version compatibility method and system for application software
CN112486512A (en) * 2020-11-25 2021-03-12 湖南麒麟信安科技股份有限公司 Linux general software adaptation method and system based on container and stacked file system
CN112698919A (en) * 2021-01-07 2021-04-23 北京金万维科技有限公司 Method for rapidly building shared unified web development environment by using docker based on linux
CN113986395A (en) * 2021-11-08 2022-01-28 麒麟软件有限公司 Packaging method for applying dependent self-contained technology under linux system

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115510429A (en) * 2022-11-21 2022-12-23 统信软件技术有限公司 Sandbox application access right control method, computing device and readable storage medium
CN115510429B (en) * 2022-11-21 2023-04-14 统信软件技术有限公司 Sandbox application access right control method, computing device and readable storage medium
CN115934157A (en) * 2022-12-28 2023-04-07 中国人民解放军国防科技大学 Software dependency range automatic inference method, device, computer equipment and memory
CN115934157B (en) * 2022-12-28 2024-04-16 中国人民解放军国防科技大学 Automatic software dependency range deducing method, device, computer equipment and memory
CN117234622A (en) * 2023-11-16 2023-12-15 中国电子科技集团公司第十五研究所 Multi-language runtime on-demand calling method and system
CN117234622B (en) * 2023-11-16 2024-02-27 中国电子科技集团公司第十五研究所 Multi-language runtime on-demand calling method and system
CN117707985A (en) * 2024-02-01 2024-03-15 麒麟软件有限公司 Method, device and storage medium for acquiring software compatibility information
CN117707985B (en) * 2024-02-01 2024-06-07 麒麟软件有限公司 Method, device and storage medium for acquiring software compatibility information

Also Published As

Publication number Publication date
CN114780950B (en) 2022-09-06

Similar Documents

Publication Publication Date Title
CN114780950B (en) Method, system, device and storage medium for cross-version compatible operation of application software
JP4199923B2 (en) Mobile device application installation method
US8838644B2 (en) Extensible access control list framework
KR101793306B1 (en) Virtual application extension points
US11074154B2 (en) Identifying a source file for use in debugging compiled code
US8346854B2 (en) Method and system of operating system independence
US20060064576A1 (en) Boot systems and methods
CN108846129B (en) Storage data access method, device and storage medium
US9513762B1 (en) Static content updates
CN116450107B (en) Method and device for secondary development of software by low-code platform and electronic equipment
CN116991381B (en) Application cross compiling method and device, computing equipment and storage medium
US20230091915A1 (en) Automatic Application of Software Updates to Container Images Based on Dependencies
CN115629971A (en) Application development system and method
US20210182078A1 (en) Layered Composite Boot Device And File System For Operating System Booting In File System Virtualization Environments
CN113296891B (en) Platform-based multi-scene knowledge graph processing method and device
JP2023547070A (en) Reloading updated shared libraries without stopping application execution
CN117707543A (en) Application installation package manufacturing and installation method, computing device and storage medium
CN117573111A (en) Micro-service deployment method, device, equipment and storage medium
US10929126B2 (en) Intercepting and replaying interactions with transactional and database environments
CN112650713A (en) File system operation method, device, equipment and storage medium
CN116991427B (en) Application compiling method and device, computing equipment and storage medium
US11748117B2 (en) Operating system partitioning of different users for single-user applications
CN111831609B (en) Method and system for unified management and distribution of binary metric values in virtualized environments
US11556356B1 (en) Dynamic link objects across different addressing modes
CN115421875B (en) Binary translation method and device

Legal Events

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