Compare commits

...

No commits in common. "imports/c8s/sos-4.1-1.el8" and "c8" have entirely different histories.

4 changed files with 397 additions and 16 deletions

2
.gitignore vendored
View File

@ -1,2 +1,2 @@
SOURCES/sos-4.1.tar.gz
SOURCES/sos-4.7.1.tar.gz
SOURCES/sos-audit-0.3.tgz

View File

@ -1,2 +1,2 @@
7d4d03af232e2357e3359ad564a59f4c3654eac0 SOURCES/sos-4.1.tar.gz
9ced981872d308e13c5dc47fee21071592ceefc2 SOURCES/sos-4.7.1.tar.gz
9d478b9f0085da9178af103078bbf2fd77b0175a SOURCES/sos-audit-0.3.tgz

View File

@ -0,0 +1,30 @@
From a0c2586e230c9600d3d3f70ab89c9f6eb52ed3ed Mon Sep 17 00:00:00 2001
From: Pavel Moravec <pmoravec@redhat.com>
Date: Tue, 23 Apr 2024 11:00:11 +0200
Subject: [PATCH] [archive] Fix get_archive_root after files reordering
Commit d5d8c21 reordered files in the archive, such that the first
member is not the archive root directory further more. Let change the
get_archive_root method accordingly to prevent self.archive_root being
empty.
Resolves: #3616
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
---
sos/cleaner/archives/__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sos/cleaner/archives/__init__.py b/sos/cleaner/archives/__init__.py
index f7c5eb587..0fa1ef43f 100644
--- a/sos/cleaner/archives/__init__.py
+++ b/sos/cleaner/archives/__init__.py
@@ -104,7 +104,7 @@ def get_archive_root(self):
if toplevel.isdir():
return toplevel.name
else:
- return os.sep
+ return os.path.dirname(toplevel.name) or os.sep
return os.path.abspath(self.archive_path)
def report_msg(self, msg):

View File

@ -4,23 +4,25 @@
Summary: A set of tools to gather troubleshooting information from a system
Name: sos
Version: 4.1
Release: 1%{?dist}
Version: 4.7.1
Release: 2%{?dist}
Group: Applications/System
Source0: https://github.com/sosreport/sos/archive/%{version}/sos-%{version}.tar.gz
Source1: sos-audit-%{auditversion}.tgz
License: GPLv2+
License: GPL-2.0-or-later
BuildArch: noarch
Url: http://github.com/sosreport/sos
Url: https://github.com/sosreport/sos
BuildRequires: python3-devel
BuildRequires: gettext
Requires: libxml2-python3
Requires: bzip2
Requires: xz
BuildRequires: python3-setuptools
Requires: python3-requests
Requires: python3-setuptools
Recommends: python3-magic
Recommends: python3-pexpect
Recommends: python3-pyyaml
Conflicts: vdsm < 4.40
Obsoletes: sos-collector
Recommends: python3-pexpect
Patch1: sos-RHEL-35945-sos-clean-on-archive.patch
%description
Sos is a set of tools that gathers information about system
@ -31,14 +33,19 @@ support technicians and developers.
%prep
%setup -qn %{name}-%{version}
%setup -T -D -a1 -q
%patch1 -p1
%build
%py3_build
%py3_build
%install
%py3_install '--install-scripts=%{_sbindir}'
rm -f %{buildroot}/usr/config/sos.conf
rm -f %{buildroot}/usr/config/tmpfilesd-sos-rh.conf
install -Dm644 %{name}.conf %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf
install -d -m 755 %{buildroot}%{_sysconfdir}/tmpfiles.d/
install -m 644 tmpfiles/tmpfilesd-sos-rh.conf %{buildroot}%{_sysconfdir}/tmpfiles.d/%{name}.conf
%find_lang %{name} || echo 0
@ -46,17 +53,24 @@ cd %{name}-audit-%{auditversion}
DESTDIR=%{buildroot} ./install.sh
cd ..
mkdir -p %{buildroot}%{_sysconfdir}/sos/cleaner
mkdir -p %{buildroot}%{_sysconfdir}/sos/{cleaner,presets.d,extras.d,groups.d}
%files -f %{name}.lang
# internationalization is currently broken. Uncomment this line once fixed.
# %%files -f %%{name}.lang
%files
%{_sbindir}/sosreport
%{_sbindir}/sos
%{_sbindir}/sos-collector
%dir /etc/sos/presets.d
%dir /etc/sos/extras.d
%dir /etc/sos/groups.d
/etc/tmpfiles.d/%{name}.conf
%{python3_sitelib}/*
%{_mandir}/man1/sosreport.1.gz
%{_mandir}/man1/sos-clean.1.gz
%{_mandir}/man1/sos-collect.1.gz
%{_mandir}/man1/sos-collector.1.gz
%{_mandir}/man1/sos-help.1.gz
%{_mandir}/man1/sos-mask.1.gz
%{_mandir}/man1/sos-report.1.gz
%{_mandir}/man1/sos.1.gz
@ -65,7 +79,6 @@ mkdir -p %{buildroot}%{_sysconfdir}/sos/cleaner
%license LICENSE
%config(noreplace) %{_sysconfdir}/sos/sos.conf
%config(noreplace) %{_sysconfdir}/sos/cleaner
%config /usr/config/sos.conf
%package audit
Summary: Audit use of some commands for support purposes
@ -94,6 +107,344 @@ of the system. Currently storage and filesystem commands are audited.
%ghost /etc/audit/rules.d/40-sos-storage.rules
%changelog
* Thu May 09 2024 Pavel Moravec <pmoravec@redhat.com> = 4.7.1-2
- [archive] Fix get_archive_root after files reordering
Resolves: RHEL-35945
* Mon Apr 08 2024 Jan Jansky <jjansky@redhat.com> = 4.7.1-1
- rebase to upstream 4.7.1
Resolves: RHEL-32104
* Tue Feb 20 2024 Jan Jansky <jjansky@redhat.com> = 4.7.0-1
- rebase to upstream 4.7.0
Resolves: RHEL-26111
* Thu Jan 11 2024 Pavel Moravec <pmoravec@redhat.com> = 4.6.1-1
- rebase to upstream 4.6.1
Resolves: RHEL-21173
- [redhat] Change authentication method for RHEL
Resolves: RHEL-21177
* Wed Oct 18 2023 Pavel Moravec <pmoravec@redhat.com> = 4.6.0-5
[pulpcore] Scrub AUTH_LDAP_BIND_PASSWORD value
Resolves: RHEL-13697
* Tue Oct 17 2023 Pavel Moravec <pmoravec@redhat.com> = 4.6.0-4
- [pulp] Fix dynaconf obfuscation and add AUTH_LDAP_BIND_PASSWORD
Resolves: RHEL-13697
* Fri Sep 01 2023 Pavel Moravec <pmoravec@redhat.com> = 4.6.0-2
- [openshift_ovn] Collect additional ovnkube node logs
Resolves: SUPDEV145
* Wed Aug 23 2023 Jan Jansky <jjansky@redhat.com> = 4.6.0-1
- [cleaner] Use data filter for extraction
Resolves: bz2218873
* Thu Jul 27 2023 Pavel Moravec <pmoravec@redhat.com> = 4.5.6-1
- Rebase sos to 4.5.6
Resolves: bz2226724
* Fri Jul 14 2023 Jan Jansky <jjansky@redhat.com> = 4.5.5-2
- Adding patch for mac obfuscation
Resolves: bz2218279
Resolves: bz2216608
Resolves: bz2207562
* Mon Jul 03 2023 Jan Jansky <jjansky@redhat.com> = 4.5.5-1
- [clean] Respect permissions of sanitised files
Resolves: bz2218279
- [plugin] Fix exception when calling os.makedirs
Resolves: bz2216608
- [cleaner] Enhance trailing characters list after AMC address
Resolves: bz2207562
* Thu Jun 01 2023 Pavel Moravec <pmoravec@redhat.com> = 4.5.4-1
- [plugins] collect strings before commands
Resolves: bz2203141
- [collector] collect report from primary node if in node_list
Resolves: bz2186460
- [powerpc] collect invscout logs
Resolves: bz2210543
- [rhc] New plugin for RHC
Resolves: bz2196649
* Fri May 05 2023 Jan Jansky <jjansky@redhat.com> = 4.5.3-1
- [report] Ignore case when scrubbing via do_file_sub
Resolves: bz2143272
- [subscription_manager] Scrub proxy passwords from repo_server_val
Resolves: bz2177282
- [virsh] Scrub passwords in virt-manager logs
Resolves: bz2184062
* Wed Mar 08 2023 Pavel Moravec <pmoravec@redhat.com> = 4.5.1-3
- Rebase on upstream 4.5.1
Resolves: bz2175806
- [composer] Capure /etc/osbuild-composer file
Resolves: bz2169776
- [ostree] Collect "ostree fsck" under plugin specific opt
Resolves: bz2161533
- [iprconfig] guard whole plugin by sg kmod predicate
Resolves: bz2176086
- [cleaner] dont clean sys_tmp from final_path
Resolves: bz2176218
* Tue Feb 07 2023 Pavel Moravec <pmoravec@redhat.com> = 4.5.0-1
- Rebase on upstream 4.5.0
Resolves: bz2082614
* Thu Nov 03 2022 Pavel Moravec <pmoravec@redhat.com> = 4.4-4
- [ocp] Add newly required labels to temp OCP namespace
Resolves: bz2130922
* Fri Oct 28 2022 Pavel Moravec <pmoravec@redhat.com> = 4.4-3
- [cleaner] Apply compile_regexes after a regular parse line
Resolves: bz2138173
* Thu Sep 22 2022 Pavel Moravec <pmoravec@redhat.com> = 4.4-2
- [utilities] Relax from hard dependency of python3-magic
Resolves: bz2129038
- [dnf] Collect legacy yum config symlinks, properly obfuscate pwds
Resolves: bz2100154
* Fri Sep 09 2022 Pavel Moravec <pmoravec@redhat.com> = 4.4-1
- Rebase on upstream 4.4
Resolves: bz2082614
- [redhat] Honour credential-less --upload-url on RedHat distro properly
Resolves: bz2059572
- [sos] Fix unhandled exception when concurrently removing temp dir
Resolves: bz2088439
- [specfile] drop python3-libxml2 dependency
Resolves: bz2125486
- [md] Restrict data capture to raid members
Resolves: bz2125485
- [cleaner] Use compiled regex lists for parsers by default
Resolves: bz2043233
- [cgroups] not collect memory.kmem.slabinfo
Resolves: bz1995120
- [report] Fix loop devices data gathering
Resolves: bz2010735
- [insights] Collect /var/lib/insights
Resolves: bz2103233
- [candlepin] collect information about SCA
Resolves: bz2060925
- [manpages] Clarify --upload-directory applicable to FTP protocol only
Resolves: bz2063259
- [cleaner] Dont obfuscate tmpdir path of local private_map
Resolves: bz2064815
- [fibrechannel] collect Cisco fnic statistics
Resolves: bz2074715
- [pulpcore] Collect db_tables_sizes
Resolves: bz2081433
- [fibrechannel]: Update fibrechannel plugin to collect HBA logs
Resolves: bz2089591
- [arcconf]: Update arcconf plugin to collect UART logs
Resolves: bz2090283
- [pulpcore] Stop collecting commands relevant to old taskig system
Resolves: bz2093191
- [dnf,yum] Merge plugins into dnf, remove yum plugin
Resolves: bz2100154
- [policies] Simplify flow in _container_init()
Resolves: bz2100480
- [pacemaker] Update collect cluster profile for pacemaker
Resolves: bz2065821
* Mon Aug 29 2022 Pavel Moravec <pmoravec@redhat.com> = 4.3-3
- [vdsm] Set LVM option use_devicesfile=0
Resolves: bz2093993
- [Plugin] Make forbidden path checks more efficient
Resolves: bz2099598
* Thu Jun 16 2022 Pavel Moravec <pmoravec@redhat.com> = 4.3-2
- [ovirt] answer files: Filter out all password keys
Resolves: bz2095263
- [plugins] Allow 'str' PlugOpt type to accept any value
Resolves: bz2079485
- [tigervnc] Update collections for newer versions of TigerVNC
Resolves: bz2062908
- [pacemaker] Redesign node enumeration logic
Resolves: bz2065805
- crio: switch from parsing output in table format to json
Resolves: bz2092969
- [report] Honor plugins' hardcoded plugin_timeout
Resolves: bz2079187
- [report] --list-plugins should report used, not default,
Resolves: bz2079484
- [utilities] Close file only when storing to file
Resolves: bz2079486
- [presets] Adjust OCP preset options, more OCP backports
Resolves: bz2058279
* Mon Apr 04 2022 Pavel Moravec <pmoravec@redhat.com> = 4.3-1
- Rebase on upstream 4.3
Resolves: bz2055002
- [sapnw] Fix IndexError exception
Resolves: bz1992938
- [Plugin, utilities] Allow writing command output directly to disk
Resolves: bz1726023
- [Ceph] Add support for containerized Ceph setup
Resolves: bz1882544
- [unbound] Add new plugin for Unbound DNS resolver
Resolves: bz2018228
- [discovery] Add new discovery plugin
Resolves: bz2018549
- [vdsm] Exclude /var/lib/vdsm/storage/transient_disks
Resolves: bz2029154
* Wed Feb 23 2022 Pavel Moravec <pmoravec@redhat.com> = 4.2-15
- [sosnode] Handle downstream versioning for runtime option
Resolves: bz2036697
- [options] Fix logging on plugopts in effective sos command
Resolves: bz2054882
- [report] Honor plugins' hardcoded plugin_timeout
Resolves: bz2055547
- [policies] Set fallback to None sysroot, don't chroot to '/'
Resolves: bz1873185
- [ovn_central] Rename container responsable of Red Hat
Resolves: bz2042966
* Wed Jan 26 2022 Pavel Moravec <pmoravec@redhat.com> = 4.2-13
- [virsh] Catch parsing exception
Resolves: bz2041488
* Tue Jan 25 2022 Pavel Moravec <pmoravec@redhat.com> = 4.2-12
- [foreman] Use psql-msgpack-decode wrapper for dynflow >= 1.6
Resolves: bz2043102
- [virsh] Call virsh commands in the foreground / with a TTY
Resolves: bz2041488
- [ovn_central] Account for Red Hat ovn package naming
Resolves: bz2042966
- [clean,parsers] Build regex lists for static items only once
Resolves: bz2036697
* Mon Jan 10 2022 Pavel Moravec <pmoravec@redhat.com> = 4.2-11
- [report] Add journal logs for NetworkManager plugin
Resolves: bz2036697
* Fri Jan 07 2022 Pavel Moravec <pmoravec@redhat.com> = 4.2-9
- add oc transport, backport various PRs for OCP
Resolves: bz2036697
- [report] Provide better warning about estimate-mode
Resolves: bz1873185
- [hostname] Fix loading and detection of long base domains
Resolves: bz2023867
* Sun Dec 19 2021 Pavel Moravec <pmoravec@redhat.com> = 4.2-8
- [rhui] New log folder
Resolves: bz2030741
- nvidia]:Patch to update nvidia plugin for GPU info
Resolves: bz2025403
- [hostname] Fix edge case for new hosts in a known subdomain
Resolves: bz2023867
* Wed Dec 08 2021 Pavel Moravec <pmoravec@redhat.com> = 4.2-7
- [hostname] Simplify case matching for domains
Resolves: bz2023867
* Tue Nov 30 2021 Pavel Moravec <pmoravec@redhat.com> = 4.2-6
- [redhat] Fix broken URI to upload to customer portal
Resolves: bz2025610
* Mon Nov 22 2021 Pavel Moravec <pmoravec@redhat.com> = 4.2-5
- [clean,hostname_parser] Source /etc/hosts for obfuscation
Resolves: bz2023867
- [clean, hostname] Fix unintentionally case sensitive
Resolves: bz2023863
- [redhat] update SFTP API version to v2
Resolves: bz2025610
* Tue Nov 16 2021 Pavel Moravec <pmoravec@redhat.com> = 4.2-4
- [report] Calculate sizes of dirs, symlinks and manifest in
Resolves: bz1873185
- [report] shutdown threads for timeouted plugins
Resolves: bz2012857
- [report] fix filter_namespace per pattern
Resolves: bz2020777
- Ensure specific plugin timeouts are only set
Resolves: bz2018033
* Wed Nov 03 2021 Pavel Moravec <pmoravec@redhat.com> = 4.2-2
- [firewall_tables] call iptables -t <table> based on nft
Resolves: bz2005195
- [report] Count with sos_logs and sos_reports in
Resolves: bz1873185
- [foreman] Collect puma status and stats
Resolves: bz2011506
- [report] Overwrite pred=None before refering predicate
Resolves: bz2012856
- [openvswitch] add commands for offline analysis
Resolves: bz2004929
* Wed Oct 06 2021 Pavel Moravec <pmoravec@redhat.com> = 4.2-1
- Rebase on upstream 4.2
Resolves: bz1998133
- [report] Implement --estimate-only
Resolves: bz1873185
- [omnipath_client] Opacapture to run only with allow changes
Resolves: bz1998433
- [unpackaged] deal with recursive loop of symlinks properly
Resolves: bz1998521
- [networking] prevent iptables-save commands to load nf_tables
Resolves: bz2001096
- [kernel] Capture Pressure Stall Information
Resolves: bz2002145
- [processor] Apply sizelimit to /sys/devices/system/cpu/cpuX
Resolves: bz2011413
* Wed Aug 11 2021 Pavel Moravec <pmoravec@redhat.com> = 4.1-5
- [report,collect] unify --map-file arguments
Resolves: bz1923938
- [rhui] add new plugin for RHUI 4
Resolves: bz1665947
- [username parser] Load usernames from `last` for LDAP users
Resolves: bz1985037
* Mon Jul 26 2021 Pavel Moravec <pmoravec@redhat.com> = 4.1-4
- [options] allow variant option names in config file
Resolves: bz1923938
- [plugins] Set default predicate instead of None
Resolves: bz1985986
- [MigrationResults] collect info about conversions
Resolves: bz1959598
* Mon Jun 21 2021 Pavel Moravec <pmoravec@redhat.com> = 4.1-3
- [gluster] collect public keys from the right dir
Resolves: bz1925419
- [cleaner] Only skip packaging-based files for the IP parse
Resolves: bz1964499
- [networking] collect also tc filter show ingress
Resolves: bz1886711
- [archive] skip copying SELinux context for /proc and /sys
Resolves: bz1965001
- [sssd] sssd plugin when sssd-common
Resolves: bz1967613
- Various OCP/cluster/cleanup enhancements
Resolves: bz1973675
* Tue May 18 2021 Pavel Moravec <pmoravec@redhat.com> = 4.1-2
- Load maps from all archives before obfuscation
Resolves: bz1930181
- Multiple fixes in man pages
Resolves: bz1935603
- [ds] Mask password and encryption keys in ldif files
Resolves: bz1937298
- [report] add --cmd-timeout option
Resolves: bz1937418
- [cups] Add gathering cups-browsed logs
Resolves: bz1939963
- [sssd] Collect memory cache / individual logfiles
Resolves: bz1940502
- Collect ibmvNIC dynamic_debugs
Resolves: bz1942276
- [pulpcore] add plugin for pulp-3
Resolves: bz1956673
- [saphana] remove redundant unused argument of get_inst_info
Resolves: bz1959413
- [networking] Add nstat command support
Resolves: bz1961458
- [snapper] add a new plugin
Resolves: bz1961229
* Mon Apr 26 2021 Pavel Moravec <pmoravec@redhat.com> = 4.1-1
- Rebase on upstream 4.1
Resolves: bz1928679