diff --git a/README.debrand b/README.debrand deleted file mode 100644 index 01c46d2..0000000 --- a/README.debrand +++ /dev/null @@ -1,2 +0,0 @@ -Warning: This package was configured for automatic debranding, but the changes -failed to apply. diff --git a/SOURCES/sos-bz1705377-composer-sources-info.patch b/SOURCES/sos-bz1705377-composer-sources-info.patch new file mode 100644 index 0000000..5dedf7d --- /dev/null +++ b/SOURCES/sos-bz1705377-composer-sources-info.patch @@ -0,0 +1,107 @@ +From 9135d767e6244d370d8cbd59a75e1a56b928d4a3 Mon Sep 17 00:00:00 2001 +From: "Bryn M. Reeves" +Date: Wed, 12 Dec 2018 10:36:09 +0000 +Subject: [PATCH] [composer] avoid running 'blueprints list' twice + +Use get_cmd_output_now() to store the first call to composer-cli's +'blueprints list' command in the report, and then use that file to +find the list of available blueprints. + +Related: #1447 + +Signed-off-by: Bryn M. Reeves +--- + sos/plugins/composer.py | 15 ++++++--------- + 1 file changed, 6 insertions(+), 9 deletions(-) + +diff --git a/sos/plugins/composer.py b/sos/plugins/composer.py +index 34901bcee..ff3aa49bf 100644 +--- a/sos/plugins/composer.py ++++ b/sos/plugins/composer.py +@@ -12,11 +12,11 @@ class Composer(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): + + def _get_blueprints(self): + blueprints = [] +- bp_result = self.get_command_output("composer-cli blueprints list") +- if bp_result['status'] != 0: +- return blueprints +- for line in bp_result['output'].splitlines(): +- blueprints.append(line) ++ bp_file = self.get_cmd_output_now("composer-cli blueprints list") ++ if bp_file: ++ with open(bp_file, "r") as bps: ++ for line in bps.read().splitlines(): ++ blueprints.append(line) + return blueprints + + def setup(self): +@@ -31,9 +31,6 @@ def setup(self): + for blueprint in blueprints: + self.add_cmd_output("composer-cli blueprints show %s" % blueprint) + +- self.add_cmd_output([ +- "composer-cli blueprints list", +- "composer-cli sources list" +- ]) ++ self.add_cmd_output("composer-cli sources list") + + # vim: set et ts=4 sw=4 : +From e456ae4f23e49c36d5efe6b0584c5ec29be21ba5 Mon Sep 17 00:00:00 2001 +From: Jake Hunsaker +Date: Mon, 18 Feb 2019 12:32:11 -0500 +Subject: [PATCH] [composer] Collect sources info for all sources + +Adds collection of info on each source found by composer-cli. The +_get_blueprints() method has been made more generic to accomodate both +blueprints and sources. + +Resolves: #1571 + +Signed-off-by: Jake Hunsaker +Signed-off-by: Bryn M. Reeves +--- + sos/plugins/composer.py | 22 ++++++++++++---------- + 1 file changed, 12 insertions(+), 10 deletions(-) + +diff --git a/sos/plugins/composer.py b/sos/plugins/composer.py +index 0f926398b..e4f30f5f0 100644 +--- a/sos/plugins/composer.py ++++ b/sos/plugins/composer.py +@@ -10,14 +10,14 @@ class Composer(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): + + packages = ('composer-cli',) + +- def _get_blueprints(self): +- blueprints = [] +- bp_file = self.get_cmd_output_now("composer-cli blueprints list") +- if bp_file: +- with open(bp_file, "r") as bps: +- for line in bps.read().splitlines(): +- blueprints.append(line) +- return blueprints ++ def _get_entries(self, cmd): ++ entries = [] ++ ent_file = self.get_cmd_output_now(cmd) ++ if ent_file: ++ with open(ent_file, "r") as ents: ++ for line in ents.read().splitlines(): ++ entries.append(line) ++ return entries + + def setup(self): + self.add_copy_spec([ +@@ -27,10 +27,12 @@ def setup(self): + "/var/log/lorax-composer/program.log", + "/var/log/lorax-composer/server.log", + ]) +- blueprints = self._get_blueprints() ++ blueprints = self._get_entries("composer-cli blueprints list") + for blueprint in blueprints: + self.add_cmd_output("composer-cli blueprints show %s" % blueprint) + +- self.add_cmd_output("composer-cli sources list") ++ sources = self._get_entries("composer-cli sources list") ++ for src in sources: ++ self.add_cmd_output("composer-cli sources info %s" % src) + + # vim: set et ts=4 sw=4 : diff --git a/SPECS/sos.spec b/SPECS/sos.spec index 47b062f..e301633 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: 3.6 -Release: 10%{?dist} +Release: 10%{?dist}.1 Group: Applications/System Source0: https://github.com/sosreport/sos/archive/%{version}/sos-%{version}.tar.gz Source1: sos-audit-%{auditversion}.tgz @@ -50,6 +50,7 @@ Patch28: sos-bz1638855-block-luks.patch Patch29: sos-bz1645085-networking-collect-all-numa.patch Patch30: sos-bz1642377-opendaylight-karaf-logs.patch Patch31: sos-bz1666214-grub2-boot-data.patch +Patch32: sos-bz1705377-composer-sources-info.patch %description Sos is a set of tools that gathers information about system @@ -90,6 +91,7 @@ support technicians and developers. %patch29 -p1 %patch30 -p1 %patch31 -p1 +%patch32 -p1 %setup -T -D -a1 -q %build @@ -142,8 +144,9 @@ of the system. Currently storage and filesystem commands are audited. %ghost /etc/audit/rules.d/40-sos-storage.rules %changelog -* Tue May 07 2019 CentOS Sources - 3.6-10.el8.centos -- Apply debranding changes +* Thu May 02 2019 Pavel Moravec = 3.6-10.1 + [composer] Collect sources info for all sources + Resolves: bz1705377 * Mon Jan 21 2019 Pavel Moravec = 3.6-10 - [grub2] Enable plugin by grub2-common package also