diff --git a/SOURCES/sos-bz1912821-sos-collector-declare-sysroot.patch b/SOURCES/sos-bz1912821-sos-collector-declare-sysroot.patch new file mode 100644 index 0000000..569d680 --- /dev/null +++ b/SOURCES/sos-bz1912821-sos-collector-declare-sysroot.patch @@ -0,0 +1,32 @@ +From debb61f8137c53bdaf8d4473756c68c5e4d5cca2 Mon Sep 17 00:00:00 2001 +From: Pavel Moravec +Date: Tue, 5 Jan 2021 13:35:34 +0100 +Subject: [PATCH] [collector] declare sysroot for each component + +Commit 7f72a36 requires self.sysroot to exist for each component, +but it is not set for sos-collector. Let pre-fill self.sysroot +every time. + +Resolves: #2358 + +Signed-off-by: Pavel Moravec +Signed-off-by: Jake Hunsaker +--- + sos/component.py | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/sos/component.py b/sos/component.py +index bd008761..223c3812 100644 +--- a/sos/component.py ++++ b/sos/component.py +@@ -108,6 +108,7 @@ class SoSComponent(): + try: + import sos.policies + self.policy = sos.policies.load(sysroot=self.opts.sysroot) ++ self.sysroot = self.policy.host_sysroot() + except KeyboardInterrupt: + self._exit(0) + self._is_root = self.policy.is_root() +-- +2.26.2 + diff --git a/SOURCES/sos-bz1912889-plugopts-ignored-in-configfile.patch b/SOURCES/sos-bz1912889-plugopts-ignored-in-configfile.patch new file mode 100644 index 0000000..7a26fac --- /dev/null +++ b/SOURCES/sos-bz1912889-plugopts-ignored-in-configfile.patch @@ -0,0 +1,33 @@ +From cd56e096afc8ef06c215c45cbf025bda60f0169c Mon Sep 17 00:00:00 2001 +From: Pavel Moravec +Date: Tue, 5 Jan 2021 15:06:24 +0100 +Subject: [PATCH] [component] honour plugopts from config file + +Currently, config file plugopts are ignored as we overwrite it +in apply_options_from_cmdline by empty list default value from +cmdline. + +Resolves: #2359 + +Signed-off-by: Pavel Moravec +Signed-off-by: Jake Hunsaker +--- + sos/component.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sos/component.py b/sos/component.py +index 7774c05a..bd008761 100644 +--- a/sos/component.py ++++ b/sos/component.py +@@ -192,7 +192,7 @@ class SoSComponent(): + for opt, val in codict.items(): + if opt not in cmdopts.arg_defaults.keys(): + continue +- if val is not None and val != opts.arg_defaults[opt]: ++ if val not in [None, [], ''] and val != opts.arg_defaults[opt]: + setattr(opts, opt, val) + + return opts +-- +2.26.2 + diff --git a/SOURCES/sos-bz1912910-empty-file-stops-collecting.patch b/SOURCES/sos-bz1912910-empty-file-stops-collecting.patch new file mode 100644 index 0000000..82ba360 --- /dev/null +++ b/SOURCES/sos-bz1912910-empty-file-stops-collecting.patch @@ -0,0 +1,33 @@ +From 03642cf2e5619f11c762b63c61c9c69fb2b00cdf Mon Sep 17 00:00:00 2001 +From: Pavel Moravec +Date: Tue, 8 Dec 2020 19:33:07 +0100 +Subject: [PATCH] [plugins] Dont stop collecting by empty specfile when + sizelimit=0 + +When sizelimit=0, collecting an empty file would set limit_reached +wrongly and stop collecting further files. Let fix this corner case. + +Resolves: #2330 + +Signed-off-by: Pavel Moravec +Signed-off-by: Jake Hunsaker +--- + sos/report/plugins/__init__.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sos/report/plugins/__init__.py b/sos/report/plugins/__init__.py +index deb46c93..510e116e 100644 +--- a/sos/report/plugins/__init__.py ++++ b/sos/report/plugins/__init__.py +@@ -1483,7 +1483,7 @@ class Plugin(object): + self._add_copy_paths([_file]) + # in the corner case we just reached the sizelimit, we + # should collect the whole file and stop +- limit_reached = (current_size == sizelimit) ++ limit_reached = (sizelimit and current_size == sizelimit) + if self.manifest: + self.manifest.files.append({ + 'specification': copyspec, +-- +2.26.2 + diff --git a/SPECS/sos.spec b/SPECS/sos.spec index d0b505f..2f607db 100644 --- a/SPECS/sos.spec +++ b/SPECS/sos.spec @@ -5,7 +5,7 @@ Summary: A set of tools to gather troubleshooting information from a system Name: sos Version: 4.0 -Release: 4%{?dist} +Release: 5%{?dist} Group: Applications/System Source0: https://github.com/sosreport/sos/archive/%{version}/sos-%{version}.tar.gz Source1: sos-audit-%{auditversion}.tgz @@ -34,6 +34,9 @@ Patch11: sos-bz1895316-collector--cluster-type.patch Patch12: sos-bz1904045-preset-ignores-verbosity.patch Patch13: sos-bz1905657-empty-file-stops-zero-sizelimit.patch Patch14: sos-bz1906598-collect-broken-symlinks.patch +Patch15: sos-bz1912889-plugopts-ignored-in-configfile.patch +Patch16: sos-bz1912821-sos-collector-declare-sysroot.patch +Patch17: sos-bz1912910-empty-file-stops-collecting.patch %description Sos is a set of tools that gathers information about system @@ -58,6 +61,9 @@ support technicians and developers. %patch12 -p1 %patch13 -p1 %patch14 -p1 +%patch15 -p1 +%patch16 -p1 +%patch17 -p1 %build %py3_build @@ -117,6 +123,14 @@ of the system. Currently storage and filesystem commands are audited. %ghost /etc/audit/rules.d/40-sos-storage.rules %changelog +* Wed Jan 06 2021 Pavel Moravec = 4.0-5 +- [component] honour plugopts from config file + Resolves: bz1912889 +- [collector] declare sysroot for each component + Resolves: bz1912821 +- [plugins] Dont stop collecting by empty specfile when sizelimit=0 + Resolves: bz1912910 + * Mon Jan 04 2021 Pavel Moravec = 4.0-4 - [component] Use sysroot from Policy when opts doesn't specify it Resolves: bz1881118