diff --git a/0003-fix-hotupgrade.py-bug.patch b/0003-fix-hotupgrade.py-bug.patch new file mode 100644 index 0000000000000000000000000000000000000000..2805b334ec16d120e2fd10f7f729826daaef57cb --- /dev/null +++ b/0003-fix-hotupgrade.py-bug.patch @@ -0,0 +1,41 @@ +From ff6903c709ce8f005a4518cc92fb16353e0b817e Mon Sep 17 00:00:00 2001 +From: wang-guangge +Date: Wed, 20 Sep 2023 19:26:49 +0800 +Subject: [PATCH] fix hotupgrade.py bug + +--- + hotpatch/hotupgrade.py | 17 +++-------------- + 1 file changed, 3 insertions(+), 14 deletions(-) + +diff --git a/hotpatch/hotupgrade.py b/hotpatch/hotupgrade.py +index 25086a6..f61e37f 100644 +--- a/hotpatch/hotupgrade.py ++++ b/hotpatch/hotupgrade.py +@@ -110,21 +110,10 @@ class HotupgradeCommand(dnf.cli.Command): + """ + # syscare need a little bit time to process the installed hot patch + sleep(0.5) +- if not self.base.transaction: +- for hp in self.hp_list: +- self._apply_hp(hp) +- if self.opts.takeover and self.is_need_accept_kernel_hp: +- self._accept_kernel_hp(hp) +- return +- +- for ts_item in self.base.transaction: +- if ts_item.action not in dnf.transaction.FORWARD_ACTIONS: +- continue +- if not str(ts_item.pkg).startswith("patch"): +- continue +- self._apply_hp(str(ts_item.pkg)) ++ for hp in self.hp_list: ++ self._apply_hp(hp) + if self.opts.takeover and self.is_need_accept_kernel_hp: +- self._accept_kernel_hp(str(ts_item.pkg)) ++ self._accept_kernel_hp(hp) + + def _apply_hp(self, hp_full_name): + pkg_info = self._parse_hp_name(hp_full_name) +-- +2.33.0 + diff --git a/aops-apollo.spec b/aops-apollo.spec index 6c75332d29c614997da1d8b3bd8918d28005bf46..80aeeb63f988d37fd341c9c92b843c71bbae9939 100644 --- a/aops-apollo.spec +++ b/aops-apollo.spec @@ -1,6 +1,6 @@ Name: aops-apollo Version: v1.3.2 -Release: 3 +Release: 4 Summary: Cve management service, monitor machine vulnerabilities and provide fix functions. License: MulanPSL2 URL: https://gitee.com/openeuler/%{name} @@ -16,6 +16,7 @@ Requires: python3-retrying python3-lxml Provides: aops-apollo Patch0001: 0001-fix-updateinfo_parse.py-bug.patch Patch0002: 0002-add-repair-status-of-the-cve-fixed-package.patch +Patch0003: 0003-fix-hotupgrade.py-bug.patch %description @@ -81,6 +82,9 @@ cp -r hotpatch %{buildroot}/%{python3_sitelib}/dnf-plugins/ %{python3_sitelib}/aops_apollo_tool/* %changelog +* Wed Sep 20 2023 wangguangge - v1.3.2-4 +- fix the hotupgrade.py bug + * Tue Sep 19 2023 gongzhengtang - v1.3.2-3 - added the repair status of the cve fixed package