diff --git a/change-status-of-period-task-and-sort-mod-file.patch b/change-status-of-period-task-and-sort-mod-file.patch new file mode 100644 index 0000000000000000000000000000000000000000..a3e63ad85b4b752ac6c57279af4b7384d1a1f07d --- /dev/null +++ b/change-status-of-period-task-and-sort-mod-file.patch @@ -0,0 +1,37 @@ +From 8cc13a422ed29e48b0c5b86b2da2a5dc8ad4aa59 Mon Sep 17 00:00:00 2001 +From: zhuofeng +Date: Fri, 13 Dec 2024 11:20:55 +0800 +Subject: [PATCH] change status of period task and sort mod file + +--- + src/python/syssentry/cron_process.py | 1 + + src/python/syssentry/load_mods.py | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/src/python/syssentry/cron_process.py b/src/python/syssentry/cron_process.py +index 50780b3..5543d67 100644 +--- a/src/python/syssentry/cron_process.py ++++ b/src/python/syssentry/cron_process.py +@@ -144,6 +144,7 @@ def period_tasks_handle(): + + if not task.onstart: + logging.debug("period onstart not enabled, task: %s", task.name) ++ task.runtime_status = EXITED_STATUS + continue + + if task.runtime_status == WAITING_STATUS and \ +diff --git a/src/python/syssentry/load_mods.py b/src/python/syssentry/load_mods.py +index 48d7e66..5be5540 100644 +--- a/src/python/syssentry/load_mods.py ++++ b/src/python/syssentry/load_mods.py +@@ -224,6 +224,7 @@ def load_tasks(): + return "failed", "" + + mod_files = os.listdir(TASKS_STORAGE_PATH) ++ mod_files.sort() + for mod_file in mod_files: + logging.debug("find mod, path is %s", mod_file) + if not mod_file.endswith(MOD_FILE_SUFFIX): +-- +2.33.0 + diff --git a/sysSentry.spec b/sysSentry.spec index b71e9e6be95ee89d1320b74d6c86fa9566d3bb09..7385335592fe1e2b87b2f6929b7524c93bca7e51 100644 --- a/sysSentry.spec +++ b/sysSentry.spec @@ -4,7 +4,7 @@ Summary: System Inspection Framework Name: sysSentry Version: 1.0.2 -Release: 22 +Release: 23 License: Mulan PSL v2 Group: System Environment/Daemons Source0: https://gitee.com/openeuler/sysSentry/releases/download/v%{version}/%{name}-%{version}.tar.gz @@ -33,6 +33,7 @@ Patch20: fix-write-file-return-code-bug.patch Patch21: update-the-commit-of-the-log-level-and-format-of-sys.patch Patch22: add-boundary-check-for-settings.patch Patch23: fix-xalarm-not-reject-alarm-msg-exceeds-max-length.patch +Patch24: change-status-of-period-task-and-sort-mod-file.patch BuildRequires: cmake gcc-c++ BuildRequires: python3 python3-setuptools @@ -115,6 +116,9 @@ install -d -m 700 %{buildroot}/etc/sysSentry/plugins/ install -m 600 config/inspect.conf %{buildroot}%{_sysconfdir}/sysSentry install -m 600 service/sysSentry.service %{buildroot}%{_unitdir} +# rasdaemon +install config/tasks/rasdaemon.mod %{buildroot}/etc/sysSentry/tasks/ + # xalarm sh build/build.sh -i %{buildroot}%{_libdir} mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d @@ -178,6 +182,7 @@ rm -rf %{buildroot} %attr(0750,root,root) %config(noreplace) %{_sysconfdir}/sysSentry/tasks %attr(0750,root,root) %config(noreplace) %{_sysconfdir}/sysSentry/plugins %attr(0600,root,root) %config(noreplace) %{_sysconfdir}/sysSentry/inspect.conf +%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/sysSentry/tasks/rasdaemon.mod %attr(0600,root,root) %{_unitdir}/sysSentry.service # xalarm @@ -222,6 +227,12 @@ rm -rf %{buildroot} %attr(0550,root,root) %{python3_sitelib}/syssentry/bmc_alarm.py %changelog +* Fri Dec 13 2024 zhuofeng - 1.0.2-23 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC: change status of period task and sort mod file + * Thu Nov 7 2024 caixiaomeng - 1.0.2-22 - Type:bugfix - CVE:NA