diff --git a/SOURCES/sos-3.8-centos-branding.patch b/SOURCES/sos-3.8-centos-branding.patch deleted file mode 100644 index 290268f..0000000 --- a/SOURCES/sos-3.8-centos-branding.patch +++ /dev/null @@ -1,100 +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 2020-05-12 15:45:00.128929276 +0000 -+++ sos-3.8/sos/policies/redhat.py 2020-05-12 15:59:16.328778927 +0000 -@@ -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" -+ 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"' -@@ -77,9 +77,9 @@ class RedHatPolicy(LinuxPolicy): - - @classmethod - def check(cls): -- """This method checks to see if we are running on Red Hat. It must be -+ """This method checks to see if we are running on CentOS. It must be - overriden by concrete subclasses to return True when running on a -- Fedora, RHEL or other Red Hat distribution or False otherwise.""" -+ Fedora, RHEL or CentOS distribution or False otherwise.""" - return False - - def check_usrmove(self, pkgs): -@@ -178,26 +178,26 @@ _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 = "Virtualization" - - RHEL = "rhel" - RHEL_DESC = RHEL_RELEASE_STR - - RHOSP = "rhosp" --RHOSP_DESC = "Red Hat OpenStack Platform" -+RHOSP_DESC = "OpenStack" - RHOSP_OPTS = SoSOptions(plugopts=[ - 'process.lsof=off', - 'networking.ethtool_namespaces=False', - 'networking.namespaces=200']) - - RHOCP = "ocp" --RHOCP_DESC = "OpenShift Container Platform by Red Hat" -+RHOCP_DESC = "RDO" - - 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,9 +236,9 @@ 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/" -+ distro = "CentOS Linux" -+ vendor = "CentOS" -+ vendor_url = "https://wiki.centos.org/" - msg = _("""\ - This command will collect diagnostic and configuration \ - information from this %(distro)s system and installed \ -@@ -257,7 +257,7 @@ support representative. - def check(cls): - """Test to see if the running host is a RHEL installation. - -- Checks for the presence of the "Red Hat Enterprise Linux" -+ Checks for the presence of the "CentOS Linux" - release string at the beginning of the NAME field in the - `/etc/os-release` file and returns ``True`` if it is - found, and ``False`` otherwise. -@@ -314,7 +314,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, -@@ -323,7 +323,7 @@ atomic_presets = { - - - class RedHatAtomicPolicy(RHELPolicy): -- distro = "Red Hat Atomic Host" -+ distro = "CentOS Atomic Host" - msg = _("""\ - This command will collect diagnostic and configuration \ - information from this %(distro)s system. diff --git a/SOURCES/sos-bz1856417-gluster-remove_only_dump_files.patch b/SOURCES/sos-bz1856417-gluster-remove_only_dump_files.patch new file mode 100644 index 0000000..b4ac1ac --- /dev/null +++ b/SOURCES/sos-bz1856417-gluster-remove_only_dump_files.patch @@ -0,0 +1,44 @@ +From 61a638ba60b30408735e4f65dcfdf7aa6b420449 Mon Sep 17 00:00:00 2001 +From: Jan Jansky +Date: Wed, 15 Jul 2020 15:58:58 +0200 +Subject: [PATCH] [gluster] remove only dump files + +Removes only dump files and leaving +other files as .socket or sock. + +Related: #2152 +Resolves: #2153 + +Signed-off-by: Jan Jansky +Signed-off-by: Jake Hunsaker +--- + sos/plugins/gluster.py | 17 ++++++++--------- + 1 file changed, 8 insertions(+), 9 deletions(-) + +diff --git a/sos/plugins/gluster.py b/sos/plugins/gluster.py +--- a/sos/plugins/gluster.py ++++ b/sos/plugins/gluster.py +@@ -54,15 +54,14 @@ + ret = string.count(last_line, 'DUMP_END_TIME') + + def postproc(self): +- if not os.path.exists(self.statedump_dir): +- return +- try: +- for dirs in os.listdir(self.statedump_dir): +- os.remove(os.path.join(self.statedump_dir, dirs)) +- os.rmdir(self.statedump_dir) +- os.unlink('/tmp/glusterdump.options') +- except OSError: +- pass ++ if self.get_option("dump"): ++ if not os.path.exists(self.statedump_dir): ++ return ++ try: ++ for name in glob.glob(self.statedump_dir + '/*.dump.[0-9]*'): ++ os.remove(name) ++ except OSError: ++ pass + + def setup(self): + self.add_forbidden_path("/var/lib/glusterd/geo-replication/secret.pem") diff --git a/SPECS/sos.spec b/SPECS/sos.spec index eb0a8f0..faf8076 100644 --- a/SPECS/sos.spec +++ b/SPECS/sos.spec @@ -2,7 +2,7 @@ Summary: A set of tools to gather troubleshooting information from a system Name: sos Version: 3.8 -Release: 8%{?dist} +Release: 9%{?dist} Group: Applications/System Source0: https://github.com/sosreport/sos/archive/%{version}.tar.gz License: GPLv2+ @@ -27,7 +27,7 @@ Patch4: sos-bz1767445-interim-sysroot-forbidden-paths.patch Patch5: sos-bz1630028-manpages-allow-system-changes.patch Patch6: sos-bz1781148-foreman-psql-dynflow-explicit-cast.patch Patch7: sos-bz1683904-option_to_limit_namespaces.patch -Patch8: sos-3.8-centos-branding.patch +Patch8: sos-bz1856417-gluster-remove_only_dump_files.patch %description Sos is a set of tools that gathers information about system @@ -69,8 +69,9 @@ rm -rf ${RPM_BUILD_ROOT} %config(noreplace) %{_sysconfdir}/sos.conf %changelog -* Tue May 12 2020 CentOS Sources - 3.8-8.el7.centos -- Roll in CentOS Branding +* Wed Jul 15 2020 Jan Jansky = 3.8-9 +- [gluster] remove only dump files + Resolves: bz1856417 * Mon Feb 24 2020 Jan Jansky = 3.8-8 - Added Obsolete for leapp-repository-sos-plugin to solve