diff --git a/0001-modify-return-value-when-no-hotpatch-is-matched.patch b/0001-modify-return-value-when-no-hotpatch-is-matched.patch new file mode 100644 index 0000000000000000000000000000000000000000..99bfd7f1b0798e523242d3c61c4580680f551257 --- /dev/null +++ b/0001-modify-return-value-when-no-hotpatch-is-matched.patch @@ -0,0 +1,27 @@ +From a159ed3c419415e8822a6a2867654dbea01c49e4 Mon Sep 17 00:00:00 2001 +From: rabbitali +Date: Wed, 31 May 2023 15:40:03 +0800 +Subject: [PATCH] modify the return result when no hot patch is matched +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +--- + ceres/manages/vulnerability_manage.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ceres/manages/vulnerability_manage.py b/ceres/manages/vulnerability_manage.py +index 5a475e4..4bb42db 100644 +--- a/ceres/manages/vulnerability_manage.py ++++ b/ceres/manages/vulnerability_manage.py +@@ -350,7 +350,7 @@ class VulnerabilityManage: + + if not hotpatch_list: + log = "No valid hot patch is matched." +- return NOT_PATCH, [dict(cve_id=cve["cve_id"], log=log, result="succeed") for cve in cves] ++ return NOT_PATCH, [dict(cve_id=cve["cve_id"], log=log, result="fail") for cve in cves] + + cmd_execute_result = [] + for base_pkg, hotpatch_cves in hotpatch_list.items(): +-- + diff --git a/aops-ceres.spec b/aops-ceres.spec index 94ded57e00cc20a6aba809d213a4301500e50429..59fa046e73d48452c05fe66353fa522d81fbe222 100644 --- a/aops-ceres.spec +++ b/aops-ceres.spec @@ -1,10 +1,11 @@ Name: aops-ceres Version: v1.2.1 -Release: 1 +Release: 2 Summary: An agent which needs to be adopted in client, it managers some plugins, such as gala-gopher(kpi collection), fluentd(log collection) and so on. License: MulanPSL2 URL: https://gitee.com/openeuler/%{name} Source0: %{name}-%{version}.tar.gz +Patch0001: 0001-modify-return-value-when-no-hotpatch-is-matched.patch BuildRequires: python3-setuptools @@ -40,6 +41,9 @@ An agent which needs to be adopted in client, it managers some plugins, such as %changelog +* Thu Jun 01 2023 wenxin - v1.2.1-2 +- modify the return result when no hot patch is matched + * Tue May 23 2023 wenixn - v1.2.1-1 - the client supports hot patch cve rollback