Search

CN-121979545-A - Application software compatibility guaranteeing method, system, medium and product

CN121979545ACN 121979545 ACN121979545 ACN 121979545ACN-121979545-A

Abstract

The invention discloses a method, a system, a medium and a product for guaranteeing compatibility of application software, wherein the method comprises the steps of establishing a system compatibility baseline; the method comprises the steps of establishing an application daemon list, responding to system software package changing operation initiated by a package manager, triggering pre-changing inspection before the system software package changing operation is executed, analyzing the influence of the system software package changing operation on application software in the application daemon list, allowing the application daemon list to execute the changing operation if no compatibility influence exists, waiting for confirmation of a user if the compatibility influence exists, allowing the package manager to continue executing the system software package changing operation if a command for confirming to continue changing is received, and terminating the system software package changing operation of the package manager if a command for canceling changing of the user or a command for confirming to continue changing is received after a set time is exceeded. The invention can enhance the safety, controllability and reliability of the system updating and maintaining process.

Inventors

  • XIE YANLONG
  • Ma Jianhan
  • Cai Dainan

Assignees

  • 麒麟软件有限公司

Dates

Publication Date
20260505
Application Date
20260120

Claims (10)

  1. 1. The method for guaranteeing the compatibility of the application software is characterized by comprising the following steps of: S1, establishing a system compatibility baseline, namely scanning a dynamic library path and ldconfig caches of a system to generate the system compatibility baseline containing identification information, derived symbol information and version information of all current dynamic libraries of the system; s2, constructing an application daemon list, namely carrying out compatibility inspection on each target application to be daemon based on the system compatibility base line, and incorporating the inspected target application into the application daemon list, wherein the application daemon list stores the dependency information of each inspected target application; S3, responding to a system software package changing operation initiated by a package manager, triggering pre-changing check before the system software package changing operation is executed, analyzing the influence of the system software package changing operation on application software in the application daemon list, allowing the system software package changing operation to be executed if an analysis result shows that the system software package changing operation has no compatibility influence on the application software in the application daemon list, waiting for user confirmation if the analysis result shows that the system software package changing operation has compatibility influence on the application software in the application daemon list, allowing the package manager to continuously execute the system software package changing operation if a user confirmation continuing changing instruction is received, and stopping the system software package changing operation of the package manager if a user canceling changing instruction or a confirmation continuing changing instruction is not received after a set time is exceeded.
  2. 2. The method for guaranteeing compatibility of application software according to claim 1, wherein the step of checking compatibility of each target application to be daemon based on the system compatibility baseline comprises traversing each target application, and performing the following compatibility checking steps for each target application to be daemon: Analyzing an ELF file of the target application, and acquiring a dynamic library list on which the target application depends and all unresolved symbols in the ELF file; Comparing a dynamic library list on which a target application depends with dynamic library identification information in a system compatibility baseline, if all dynamic libraries in the dynamic library list can find matched dynamic library identification information in the system compatibility baseline, judging that the target application passes the library presence inspection, otherwise, judging that the target application fails the library presence inspection; Checking whether all unresolved symbols in an ELF file of a target application exist in corresponding derived symbol information in a system compatibility base line, if so, judging that the unresolved symbol resolvability check passes, otherwise, judging that the unresolved symbol resolvability check does not pass; Checking whether ABI version requirements attached to all unresolved symbols in an ELF file of a target application fall within a version range supported by a corresponding dynamic library in a system compatibility base line, if so, judging that the version constraint checking is passed, otherwise, judging that the version constraint checking is not passed; if the inventory presence check, the unresolved symbol resolvable check and the version constraint check of the target application are all passed, judging that the compatibility check of the target application passes, otherwise, judging that the compatibility check of the target application does not pass.
  3. 3. The application software compatibility assurance method of claim 2, further comprising, before performing the following compatibility checking steps for each target application to be daemon: And judging whether the target application is positioned in a preset white list, if so, skipping the target application, and if not, executing the compatibility checking step for the target application.
  4. 4. The method according to claim 1, wherein if the analysis result indicates that the system software package change operation has a compatibility influence on the applications in the application daemon list, a conflict report is generated and a user confirmation is waited.
  5. 5. The method for guaranteeing compatibility of application software according to claim 1 wherein in step S2, the checked target applications are included in an application daemon, and these target applications are marked as compatible applications in the application daemon, and in step S3, if the analysis result shows that the system software package changing operation has a compatibility influence on the application software in the application daemon, the affected application software is recorded, and after receiving an instruction for confirming the continued change by the user, the following operation is performed for the application daemon, namely, the affected application software is marked as incompatible application, and the dependency information of the application daemon is updated.
  6. 6. The method according to claim 1, wherein a pre-change check execution switch is configured in the system, and when the pre-change check switch is turned off, it indicates that the pre-change check is not triggered before the system package change operation is executed, and the system package change operation is directly executed.
  7. 7. The method according to claim 1, wherein a system package exclusion function is provided in the system, and a specific system package is excluded from the range of performing the pre-change check by setting.
  8. 8. An application software compatibility assurance system comprising a microprocessor and a memory interconnected, wherein the microprocessor is programmed or configured to perform the application software compatibility assurance method of any one of claims 1 to 7.
  9. 9. A computer-readable storage medium having a computer program or instructions stored therein, wherein the computer program or instructions is programmed or configured to execute the application software compatibility assurance method of any one of claims 1-7 by a processor.
  10. 10. A computer program product comprising a computer program or instructions, characterized in that the computer program or instructions are programmed or configured to execute the application software compatibility assurance method of any one of claims 1 to 7 by a processor.

Description

Application software compatibility guaranteeing method, system, medium and product Technical Field The invention relates to the technical field of system package upgrading of Linux operating systems, in particular to a method, a system, a medium and a product for guaranteeing compatibility of application software. Background In the long-term operation and maintenance process of the Linux server, a user usually needs to perform operations such as version upgrading, degradation, service adaptation or expansion on the system according to service requirements. These operations often involve the management of system software packages, including but not limited to, installation, uninstallation, version switching, etc. of the package. However, because there may be differences in the requirements of different business systems (application software, abbreviated herein as applications) for the underlying dependencies and versions thereof, users often need to configure the dependency environment separately for each business system, and may even need to upgrade the entire operating system to meet business needs. Such operations may cause dependency conflicts and version incompatibilities, which in turn may lead to errors in the running of the application, in particular: Dynamically linked libraries (referred to herein simply as dynamic libraries) rely on the absence that Linux applications record the required list of dynamic libraries (e.g., dt_ NEEDED entries) in their ELF files at compile time. System software package changes (e.g., upgrades or deletions) may result in critical dependent dynamic libraries being missing at runtime. At this point, the dynamic linker (ld.so) will not be able to load the application, resulting in a process load exception or direct termination. ABI/API compatibility destruction-on the premise of meeting the basic dynamic library dependencies, deeper interface dependencies may cause runtime crashes. Such dependencies involve function signatures, data structures, calling conventions, etc. provided by the dynamic library, the stability of which is guaranteed by the Application Binary Interface (ABI) and the Application Program Interface (API). If the dependent dynamic library version upgrades introduce incompatible changes (such as SONAME version transitions, function parameter modifications), the ELF file may trigger symbols to fail to find the induced segment errors, stack corruption, or undefined behavior when calling the relevant symbols. A systematic risk posed by the system administrator's operations is that the system administrator may inadvertently introduce unexpected changes that depend on the environment when repairing a CVE vulnerability or a functional defect. For example, forced upgrades to critical system packages (e.g., libstdc ++, python 3) may result in dependent chain breaks, while rollback operations may cause further problems due to version database inconsistencies of the package manager (e.g., rpm). Disclosure of Invention The invention aims to solve the technical problems by providing an application software compatibility guarantee method, a system, a medium and a product aiming at the problems in the prior art, and aims to realize a mechanism for pre-checking, early warning and controllable execution so as to actively identify and early warn the compatibility influence of the changing operation on the existing application programs marked as compatible in the system before the system software package changing operation is completed through a package manager, thereby enhancing the safety, controllability and reliability of the system updating and maintaining process. In order to solve the technical problems, the invention adopts the following technical scheme: The method for guaranteeing the compatibility of the application software comprises the following steps: S1, establishing a system compatibility baseline, namely scanning a dynamic library path and ldconfig caches of a system to generate the system compatibility baseline containing identification information, derived symbol information and version information of all current dynamic libraries of the system; s2, constructing an application daemon list, namely carrying out compatibility inspection on each target application to be daemon based on the system compatibility base line, and incorporating the inspected target application into the application daemon list, wherein the application daemon list stores the dependency information of each inspected target application; S3, responding to a system software package changing operation initiated by a package manager, triggering pre-changing check before the system software package changing operation is executed, analyzing the influence of the system software package changing operation on application software in the application daemon list, if the analysis result shows that the system software package changing operation has no compatibility influence on the application so