From a9646ac5d77da117bfe8590e5fbd8938c4a1d6e8 Mon Sep 17 00:00:00 2001 From: rabbitali Date: Fri, 30 Jun 2023 19:33:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=83=AD=E8=A1=A5=E4=B8=81?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E5=8F=AF=E5=BA=94=E7=94=A8=E7=9A=84=E5=88=A4?= =?UTF-8?q?=E6=96=AD=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 53f25c96819db6d1ed0baee8178b50bd8e06ed6f) --- ...nder-which-hotpatches-can-be-applied.patch | 28 +++++++++++++++++++ aops-apollo.spec | 7 ++++- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 0003-update-condition-under-which-hotpatches-can-be-applied.patch diff --git a/0003-update-condition-under-which-hotpatches-can-be-applied.patch b/0003-update-condition-under-which-hotpatches-can-be-applied.patch new file mode 100644 index 0000000..c741058 --- /dev/null +++ b/0003-update-condition-under-which-hotpatches-can-be-applied.patch @@ -0,0 +1,28 @@ +From 30a0f76f2150f27db79fedde3af4926b36954066 Mon Sep 17 00:00:00 2001 +From: rabbitali +Date: Fri, 30 Jun 2023 19:07:55 +0800 +Subject: [PATCH] Update the condition under which hot patches can be applied +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +--- + hotpatch/hotpatch_updateinfo.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/hotpatch/hotpatch_updateinfo.py b/hotpatch/hotpatch_updateinfo.py +index 7dc92ce..3963867 100644 +--- a/hotpatch/hotpatch_updateinfo.py ++++ b/hotpatch/hotpatch_updateinfo.py +@@ -212,7 +212,7 @@ class HotpatchUpdateInfo(object): + hp_vere = '%s-%s' % (src_pkg_version, src_pkg_release) + if hp_vere != inst_pkg_vere: + continue +- elif self._get_hotpatch_status_in_syscare(hotpatch) == 'ACTIVED': ++ elif self._get_hotpatch_status_in_syscare(hotpatch) in ('ACTIVED', "ACCEPTED"): + hotpatch.state = self.INSTALLED + else: + hotpatch.state = self.INSTALLABLE +-- +2.33.0 + diff --git a/aops-apollo.spec b/aops-apollo.spec index 5aee0d7..67f8589 100644 --- a/aops-apollo.spec +++ b/aops-apollo.spec @@ -1,12 +1,14 @@ Name: aops-apollo Version: v1.2.2 -Release: 3 +Release: 4 Summary: Cve management service, monitor machine vulnerabilities and provide fix functions. License: MulanPSL2 URL: https://gitee.com/openeuler/%{name} Source0: %{name}-%{version}.tar.gz Patch0001: 0001-fix-issue-gen-cve-task-failed.patch Patch0002: 0002-do-not-return-the-related-hotpatches-when-the-cve-is.patch +Patch0003: 0003-update-condition-under-which-hotpatches-can-be-applied.patch + BuildRequires: python3-setuptools Requires: aops-vulcanus >= v1.2.0 @@ -77,6 +79,9 @@ cp -r hotpatch %{buildroot}/%{python3_sitelib}/dnf-plugins/ %{python3_sitelib}/aops_apollo_tool/* %changelog +* Fri Jun 30 2023 wenxin - v1.2.2-4 +- Update the condition under which hot patches can be applied + * Wed Jun 28 2023 wangguangge - v1.2.2-3 - do not return the related hotpatches when the cve is fixed