diff --git a/0001-update-cve-fix.patch b/0001-update-cve-fix.patch deleted file mode 100644 index 851b546bd39e9defcd9da87f79068576cc2ed20a..0000000000000000000000000000000000000000 --- a/0001-update-cve-fix.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 412ebea59d55abbf1acc328077b8854b2634a4d1 Mon Sep 17 00:00:00 2001 -From: rabbitali -Date: Thu, 1 Jun 2023 09:09:39 +0800 -Subject: [PATCH] update cve fix -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - ---- - zeus/function/verify/vulnerability.py | 2 +- - zeus/vulnerability_manage/view.py | 8 ++++++-- - 2 files changed, 7 insertions(+), 3 deletions(-) - -diff --git a/zeus/function/verify/vulnerability.py b/zeus/function/verify/vulnerability.py -index 253bb4d..4aabc00 100644 ---- a/zeus/function/verify/vulnerability.py -+++ b/zeus/function/verify/vulnerability.py -@@ -75,7 +75,7 @@ class CveFixSchema(TaskGeneralSchema): - """ - tasks = fields.List(fields.Nested(CveFixTask()), - required=True, validate=lambda s: len(s) > 0) -- -+ accepted = fields.Boolean(validate=validate.OneOf([True, False]),required=True) - - class CveRollbackTask(Schema): - host_id = fields.Integer(required=True, validate=lambda s: s > 0) -diff --git a/zeus/vulnerability_manage/view.py b/zeus/vulnerability_manage/view.py -index adb4bc8..368847c 100644 ---- a/zeus/vulnerability_manage/view.py -+++ b/zeus/vulnerability_manage/view.py -@@ -604,7 +604,12 @@ class ExecuteCveFixTask(BaseResponse): - }) - return data - -+ for cve in task_info.get("cves"): -+ if cve.get("hotpatch"): -+ cve["accepted"] = task_info["accepted"] -+ - command_args = { -+ "accepted": task_info.get("accepted"), - "check_items": self._check_items, - "check": task_info.get("check"), - "cves": task_info.get("cves") -@@ -732,8 +737,7 @@ class ExecuteCveFixTask(BaseResponse): - self._task_name = params.get("task_name") - self._task_type = params.get("task_type") - self._check_items = params.get('check_items') -- tasks = generate_tasks(params.get('tasks'), host_infos, -- **{"repo_info": params.get("repo_info")}) -+ tasks = generate_tasks(params.get('tasks'), host_infos, **{"accepted": params.get("accepted", False)}) - if params.get("timed"): - self._header.update({ - "exempt_authentication": configuration.individuation.get("EXEMPT_AUTHENTICATION"), --- diff --git a/aops-zeus-v1.2.1.tar.gz b/aops-zeus-v1.3.0.tar.gz similarity index 42% rename from aops-zeus-v1.2.1.tar.gz rename to aops-zeus-v1.3.0.tar.gz index 5f4980553787edef41f83033055298c4ff6bb932..6882ff18ce1c90f986aea04bb1c1bd31f9061dd4 100644 Binary files a/aops-zeus-v1.2.1.tar.gz and b/aops-zeus-v1.3.0.tar.gz differ diff --git a/aops-zeus.spec b/aops-zeus.spec index 4c9fef365b0bf02822400c1b97624eb7b89dadc6..baa4fc01072ed249765b7cdadfe512fdf8e50643 100644 --- a/aops-zeus.spec +++ b/aops-zeus.spec @@ -1,11 +1,10 @@ Name: aops-zeus -Version: v1.2.1 -Release: 2 +Version: v1.3.0 +Release: 1 Summary: A host and user manager service which is the foundation of aops. License: MulanPSL2 URL: https://gitee.com/openeuler/%{name} Source0: %{name}-%{version}.tar.gz -Patch0001: 0001-update-cve-fix.patch BuildRequires: python3-setuptools Requires: aops-vulcanus >= v1.2.0 @@ -21,7 +20,7 @@ A host and user manager service which is the foundation of aops. %prep -%autosetup -n %{name}-%{version} -p1 +%autosetup -n %{name}-%{version} # build for aops-zeus @@ -30,6 +29,8 @@ A host and user manager service which is the foundation of aops. # install for aops-zeus %py3_install +mkdir -p %{buildroot}/opt/aops/ +cp -r database %{buildroot}/opt/aops/ %files @@ -39,9 +40,13 @@ A host and user manager service which is the foundation of aops. %attr(0755,root,root) /usr/lib/systemd/system/aops-zeus.service %{python3_sitelib}/aops_zeus*.egg-info %{python3_sitelib}/zeus/* +%attr(0755, root, root) /opt/aops/database/* %changelog +* Tue Sep 05 2023 wenxin - v1.3.0-1 +- optimize the method of executing apollo tasks + * Fri Jun 02 2023 wenxin - v1.2.1-2 - update cve fix