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-3.8-centos-branding.patch b/SOURCES/sos-3.8-centos-branding.patch deleted file mode 100644 index 9f3bc52..0000000 --- a/SOURCES/sos-3.8-centos-branding.patch +++ /dev/null @@ -1,73 +0,0 @@ -diff -uNrp sos-3.8.orig/sos/policies/redhat.py sos-3.8/sos/policies/redhat.py ---- sos-3.8.orig/sos/policies/redhat.py 2019-08-27 03:17:45.000000000 -0500 -+++ sos-3.8/sos/policies/redhat.py 2020-04-25 20:55:00.586172166 -0500 -@@ -23,9 +23,9 @@ OS_RELEASE = "/etc/os-release" - - - class RedHatPolicy(LinuxPolicy): -- distro = "Red Hat" -- vendor = "Red Hat" -- vendor_url = "http://www.redhat.com/" -+ distro = "CentOS Linux" -+ vendor = "CentOS" -+ vendor_url = "http://www.centos.org" - _redhat_release = '/etc/redhat-release' - _tmp_dir = "/var/tmp" - _rpmq_cmd = 'rpm -qa --queryformat "%{NAME}|%{VERSION}|%{RELEASE}\\n"' -@@ -180,22 +180,22 @@ _cb_plugs = ['abrt', 'block', 'boot', 'd - 'hardware', 'host', 'kernel', 'logs', 'lvm2', 'memory', 'rpm', - 'process', 'systemd', 'yum', 'xfs'] - --RHEL_RELEASE_STR = "Red Hat Enterprise Linux" -+RHEL_RELEASE_STR = "CentOS Linux" - - RHV = "rhv" --RHV_DESC = "Red Hat Virtualization" -+RHV_DESC = "CentOS Linux Virtualization" - - RHEL = "rhel" - RHEL_DESC = RHEL_RELEASE_STR - - RHOSP = "rhosp" --RHOSP_DESC = "Red Hat OpenStack Platform" -+RHOSP_DESC = "RDO" - - RHOCP = "ocp" --RHOCP_DESC = "OpenShift Container Platform by Red Hat" -+RHOCP_DESC = "OpenShift" - - RH_SATELLITE = "satellite" --RH_SATELLITE_DESC = "Red Hat Satellite" -+RH_SATELLITE_DESC = "Satellite" - SAT_OPTS = SoSOptions(verify=True, plugopts=['apache.log=on']) - - CB = "cantboot" -@@ -236,8 +236,8 @@ No changes will be made to system config - - class RHELPolicy(RedHatPolicy): - distro = RHEL_RELEASE_STR -- vendor = "Red Hat" -- vendor_url = "https://access.redhat.com/support/" -+ vendor = "CentOS Linux" -+ vendor_url = "https://wiki.centos.org/" - msg = _("""\ - This command will collect diagnostic and configuration \ - information from this %(distro)s system and installed \ -@@ -313,7 +313,7 @@ class CentOsPolicy(RHELPolicy): - - ATOMIC = "atomic" - ATOMIC_RELEASE_STR = "Atomic" --ATOMIC_DESC = "Red Hat Enterprise Linux Atomic Host" -+ATOMIC_DESC = "CentOS Linux Atomic Host" - - atomic_presets = { - ATOMIC: PresetDefaults(name=ATOMIC, desc=ATOMIC_DESC, note=NOTE_TIME, -@@ -322,7 +322,7 @@ atomic_presets = { - - - class RedHatAtomicPolicy(RHELPolicy): -- distro = "Red Hat Atomic Host" -+ distro = "CentOS Linux Atomic Host" - msg = _("""\ - This command will collect diagnostic and configuration \ - information from this %(distro)s system. diff --git a/SOURCES/sos-bz1831549-containers-common-plugin.patch b/SOURCES/sos-bz1831549-containers-common-plugin.patch new file mode 100644 index 0000000..e10ad56 --- /dev/null +++ b/SOURCES/sos-bz1831549-containers-common-plugin.patch @@ -0,0 +1,95 @@ +From 943b3c3cd096f8efaeb4f0f2008391abe4c9f7e2 Mon Sep 17 00:00:00 2001 +From: Pavel Moravec +Date: Sat, 2 May 2020 17:22:35 +0200 +Subject: [PATCH] [containers_common] Add plugin for common containers configs + +Move collection of whole /etc/containers and /usr/share/containers to +one containers_common plugin enabled by the package of the same name. + +Since the package is a common dependency for buildah and podman, no regression +in default data collection happens. + +Resolves: #2040 + +Signed-off-by: Pavel Moravec +Signed-off-by: Jake Hunsaker +--- + sos/plugins/buildah.py | 7 ------- + sos/plugins/containers_common.py | 27 +++++++++++++++++++++++++ + sos/plugins/podman.py | 7 ------- + 3 files changed, 27 insertions(+), 14 deletions(-) + create mode 100644 sos/plugins/containers_common.py + +diff --git a/sos/plugins/buildah.py b/sos/plugins/buildah.py +index 9d237a53..4b8b3b0a 100644 +--- a/sos/plugins/buildah.py ++++ b/sos/plugins/buildah.py +@@ -20,13 +20,6 @@ class Buildah(Plugin, RedHatPlugin): + profiles = ('container',) + + def setup(self): +- self.add_copy_spec([ +- "/etc/containers/registries.conf", +- "/etc/containers/storage.conf", +- "/etc/containers/mounts.conf", +- "/etc/containers/policy.json", +- ]) +- + subcmds = [ + 'containers', + 'containers --all', +diff --git a/sos/plugins/containers_common.py b/sos/plugins/containers_common.py +new file mode 100644 +index 00000000..99ae88fe +--- /dev/null ++++ b/sos/plugins/containers_common.py +@@ -0,0 +1,29 @@ ++# Copyright (C) 2020 Red Hat, Inc., Pavel Moravec ++ ++# This file is part of the sos project: https://github.com/sosreport/sos ++# ++# This copyrighted material is made available to anyone wishing to use, ++# modify, copy, or redistribute it subject to the terms and conditions of ++# version 2 of the GNU General Public License. ++# ++# See the LICENSE file in the source distribution for further information. ++ ++from sos.plugins import Plugin, RedHatPlugin, UbuntuPlugin ++ ++ ++class ContainersCommon(Plugin, RedHatPlugin, UbuntuPlugin): ++ '''Common container configs ++ ''' ++ ++ short_desc = 'Common container configs under {/etc,/usr/share}/containers' ++ plugin_name = 'containers_common' ++ profiles = ('container', ) ++ packages = ('containers-common', ) ++ ++ def setup(self): ++ self.add_copy_spec([ ++ '/etc/containers/*', ++ '/usr/share/containers/*', ++ ]) ++ ++# vim: set et ts=4 sw=4 : +diff --git a/sos/plugins/podman.py b/sos/plugins/podman.py +index f6875197..f6632776 100644 +--- a/sos/plugins/podman.py ++++ b/sos/plugins/podman.py +@@ -27,13 +27,6 @@ class Podman(Plugin, RedHatPlugin, UbuntuPlugin): + ] + + def setup(self): +- self.add_copy_spec([ +- "/etc/containers/registries.conf", +- "/etc/containers/storage.conf", +- "/etc/containers/mounts.conf", +- "/etc/containers/policy.json", +- ]) +- + self.add_env_var([ + 'HTTP_PROXY', + 'HTTPS_PROXY', +-- +2.21.3 diff --git a/SOURCES/sos-bz1838426-container_log-logdir.patch b/SOURCES/sos-bz1838426-container_log-logdir.patch new file mode 100644 index 0000000..420a467 --- /dev/null +++ b/SOURCES/sos-bz1838426-container_log-logdir.patch @@ -0,0 +1,29 @@ +From e4ece6569221f1833d3fb621c26f19c23662b329 Mon Sep 17 00:00:00 2001 +From: Pavel Moravec +Date: Wed, 4 Dec 2019 12:09:20 +0100 +Subject: [PATCH] [container_log] fix unscoped 'logdir' variable + +"sosreport -o container_log --all-logs" fails on global name 'logdir' +is not defined. + +Signed-off-by: Pavel Moravec +--- + sos/plugins/container_log.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sos/plugins/container_log.py b/sos/plugins/container_log.py +index 6208ecc8..739c9956 100644 +--- a/sos/plugins/container_log.py ++++ b/sos/plugins/container_log.py +@@ -21,7 +21,7 @@ class ContainerLog(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): + + def setup(self): + if self.get_option('all_logs'): +- self.add_copy_spec(logdir) ++ self.add_copy_spec(self.logdir) + else: + self.collect_subdirs() + +-- +2.21.3 + diff --git a/SPECS/sos.spec b/SPECS/sos.spec index c9b6ecd..140682b 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.8 -Release: 2%{?dist} +Release: 6%{?dist} Group: Applications/System Source0: https://github.com/sosreport/sos/archive/%{version}/sos-%{version}.tar.gz Source1: sos-audit-%{auditversion}.tgz @@ -32,7 +32,8 @@ Patch9: sos-bz1721779-ebpf-net-list.patch Patch10: sos-bz1768956-ebpf-per-namespace.patch Patch11: sos-bz1741330-openswan-to-libreswan.patch Patch12: sos-bz1709682-grub2-mkconfig-dont-remove-kernel-opts.patch -Patch99: sos-3.8-centos-branding.patch +Patch13: sos-bz1831549-containers-common-plugin.patch +Patch14: sos-bz1838426-container_log-logdir.patch %description Sos is a set of tools that gathers information about system @@ -54,7 +55,8 @@ support technicians and developers. %patch10 -p1 %patch11 -p1 %patch12 -p1 -%patch99 -p1 +%patch13 -p1 +%patch14 -p1 %setup -T -D -a1 -q %build @@ -107,8 +109,13 @@ of the system. Currently storage and filesystem commands are audited. %ghost /etc/audit/rules.d/40-sos-storage.rules %changelog -* Tue Apr 28 2020 CentOS Sources - 3.8-2.el8.centos -- Apply debranding changes +* Thu May 21 2020 Pavel Moravec = 3.8-6 +- [container_log] fix unscoped 'logdir' variable + Resolves: bz1834421 + +* Mon May 18 2020 Pavel Moravec = 3.8-5 +- [containers_common] Add plugin for common containers configs + Resolves: bz1831549 * Fri Jan 10 2020 Pavel Moravec = 3.8-2 - [plugins] improve heuristic for applying --since