diff --git a/fix-configparser.InterpolationSyntaxError.patch b/fix-configparser.InterpolationSyntaxError.patch new file mode 100644 index 0000000000000000000000000000000000000000..8dfd67be754b32495ac2c2d303bf534fbd0efa81 --- /dev/null +++ b/fix-configparser.InterpolationSyntaxError.patch @@ -0,0 +1,37 @@ +From 65ceade489c4018c3f315104d70be0550a28d9d9 Mon Sep 17 00:00:00 2001 +From: shixuantong +Date: Wed, 11 Sep 2024 10:23:41 +0800 +Subject: [PATCH] fix configparser.InterpolationSyntaxError + +--- + src/python/syssentry/sentry_config.py | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/src/python/syssentry/sentry_config.py b/src/python/syssentry/sentry_config.py +index 01f3df8..a0e7b79 100644 +--- a/src/python/syssentry/sentry_config.py ++++ b/src/python/syssentry/sentry_config.py +@@ -103,14 +103,18 @@ class CpuPluginsParamsConfig: + """read config file""" + config_param_section_args = {} + if os.path.exists(self.config_file): +- self.config.read(self.config_file) + try: ++ self.config.read(self.config_file) + config_param_section_args = dict(self.config[self.param_section_name]) +- except (ValueError, KeyError): ++ except (ValueError, KeyError, configparser.InterpolationSyntaxError): + config_param_section_args = {} ++ logging.error("Failed to parse cpu_sentry.ini!") + return config_param_section_args + + def join_cpu_start_cmd(self, cpu_param_dict: dict) -> str: ++ if not cpu_param_dict: ++ return "" ++ + cpu_list = cpu_param_dict.get("cpu_list", "default") + if cpu_list == "default": + cpu_list = CpuPluginsParamsConfig.get_cpu_info() +-- +2.27.0 + diff --git a/sysSentry.spec b/sysSentry.spec index 9d82afc38296b57045e1e5bd8897c49c19a14ca4..beea5be18402a36c061ea83da48f2a1d768a00ad 100644 --- a/sysSentry.spec +++ b/sysSentry.spec @@ -4,7 +4,7 @@ Summary: System Inspection Framework Name: sysSentry Version: 1.0.2 -Release: 10 +Release: 11 License: Mulan PSL v2 Group: System Environment/Daemons Source0: https://gitee.com/openeuler/sysSentry/releases/download/v%{version}/%{name}-%{version}.tar.gz @@ -20,6 +20,7 @@ Patch7: param-must-be-integer.patch Patch8: add-deleted-code-to-plugin-rasdaemon.patch Patch9: Remove-ANSI-escape-sequences.patch Patch10: split-cpu_sentry-and-syssentry.patch +Patch11: fix-configparser.InterpolationSyntaxError.patch BuildRequires: cmake gcc-c++ BuildRequires: python3 python3-setuptools @@ -177,6 +178,12 @@ rm -rf %{buildroot} %attr(0550,root,root) %{python3_sitelib}/syssentry/cpu_* %changelog +* Wed Sep 11 2024 shixuantong - 1.0.2-11 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC:fix configparser.InterpolationSyntaxError + * Mon Sep 09 2024 caixiaomeng - 1.0.2-10 - Type:bugfix - CVE:NA