1b1872
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
1b1872
1b1872
%global auditversion 0.3
1b1872
1b1872
Summary: A set of tools to gather troubleshooting information from a system
1b1872
Name: sos
900e1b
Version: 4.2
a18305
Release: 7%{?dist}
1b1872
Group: Applications/System
1b1872
Source0: https://github.com/sosreport/sos/archive/%{version}/sos-%{version}.tar.gz
1b1872
Source1: sos-audit-%{auditversion}.tgz
1b1872
License: GPLv2+
1b1872
BuildArch: noarch
9a3f62
Url: https://github.com/sosreport/sos
1b1872
BuildRequires: python3-devel
1b1872
BuildRequires: gettext
1b1872
Requires: libxml2-python3
1b1872
Requires: bzip2
1b1872
Requires: xz
1b1872
Conflicts: vdsm < 4.40
900d18
Obsoletes: sos-collector
f2c821
Recommends: python3-pexpect
900e1b
Recommends: python3-requests
900e1b
Patch1: sos-bz2011413-cpuX-individual-sizelimits.patch
900e1b
Patch2: sos-bz1998521-unpackaged-recursive-symlink.patch
900e1b
Patch3: sos-bz1998433-opacapture-under-allow-system-changes.patch
900e1b
Patch4: sos-bz2002145-kernel-psi.patch
900e1b
Patch5: sos-bz2001096-iptables-save-under-nf_tables-kmod.patch
900e1b
Patch6: sos-bz1873185-estimate-only-option.patch
900e1b
Patch7: sos-bz2005195-iptables-based-on-ntf.patch
900e1b
Patch8: sos-bz2011506-foreman-puma-status.patch
900e1b
Patch9: sos-bz2012856-dryrun-uncaught-exception.patch
900e1b
Patch10: sos-bz2004929-openvswitch-offline-analysis.patch
6ebc5b
Patch11: sos-bz2012857-plugin-timeout-unhandled-exception.patch
6ebc5b
Patch12: sos-bz2018033-plugin-timeouts-proper-handling.patch
6ebc5b
Patch13: sos-bz2020777-filter-namespace-per-pattern.patch
9a3f62
Patch14: sos-bz2023867-cleaner-hostnames-improvements.patch
9a3f62
Patch15: sos-bz2025610-RHTS-api-change.patch
bdbf16
1b1872
1b1872
%description
1b1872
Sos is a set of tools that gathers information about system
1b1872
hardware and configuration. The information can then be used for
1b1872
diagnostic purposes and debugging. Sos is commonly used to help
1b1872
support technicians and developers.
1b1872
1b1872
%prep
1b1872
%setup -qn %{name}-%{version}
900d18
%setup -T -D -a1 -q
24a42c
%patch1 -p1
24a42c
%patch2 -p1
24a42c
%patch3 -p1
24a42c
%patch4 -p1
24a42c
%patch5 -p1
24a42c
%patch6 -p1
24a42c
%patch7 -p1
24a42c
%patch8 -p1
24a42c
%patch9 -p1
24a42c
%patch10 -p1
6ebc5b
%patch11 -p1
6ebc5b
%patch12 -p1
6ebc5b
%patch13 -p1
9a3f62
%patch14 -p1
9a3f62
%patch15 -p1
1b1872
1b1872
%build
1b1872
%py3_build
1b1872
1b1872
%install
1b1872
%py3_install '--install-scripts=%{_sbindir}'
1b1872
f2c821
install -Dm644 %{name}.conf %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf
1b1872
1b1872
%find_lang %{name} || echo 0
1b1872
1b1872
cd %{name}-audit-%{auditversion}
1b1872
DESTDIR=%{buildroot} ./install.sh
1b1872
cd ..
1b1872
bf10fb
mkdir -p %{buildroot}%{_sysconfdir}/sos/{cleaner,presets.d,extras.d,groups.d}
15f6f8
1b1872
%files -f %{name}.lang
1b1872
%{_sbindir}/sosreport
900d18
%{_sbindir}/sos
900d18
%{_sbindir}/sos-collector
bf10fb
%dir /etc/sos/presets.d
bf10fb
%dir /etc/sos/extras.d
bf10fb
%dir /etc/sos/groups.d
1b1872
%{python3_sitelib}/*
1b1872
%{_mandir}/man1/sosreport.1.gz
900d18
%{_mandir}/man1/sos-clean.1.gz
900d18
%{_mandir}/man1/sos-collect.1.gz
900d18
%{_mandir}/man1/sos-collector.1.gz
900d18
%{_mandir}/man1/sos-mask.1.gz
900d18
%{_mandir}/man1/sos-report.1.gz
900d18
%{_mandir}/man1/sos.1.gz
1b1872
%{_mandir}/man5/sos.conf.5.gz
1b1872
%doc AUTHORS README.md
1b1872
%license LICENSE
f2c821
%config(noreplace) %{_sysconfdir}/sos/sos.conf
15f6f8
%config(noreplace) %{_sysconfdir}/sos/cleaner
7c9316
%config /usr/config/sos.conf
1b1872
1b1872
%package audit
1b1872
Summary: Audit use of some commands for support purposes
1b1872
License: GPLv2+
1b1872
Group: Application/System
1b1872
1b1872
%description audit
1b1872
1b1872
Sos-audit provides configuration files for the Linux Auditing System
1b1872
to track the use of some commands capable of changing the configuration
7c9316
of the system. Currently storage and filesystem commands are audited.
1b1872
1b1872
%post audit
1b1872
%{_sbindir}/sos-audit.sh
1b1872
1b1872
%files audit
1b1872
%defattr(755,root,root,-)
1b1872
%{_sbindir}/sos-audit.sh
1b1872
%defattr(644,root,root,-)
1b1872
%config(noreplace) %{_sysconfdir}/sos/sos-audit.conf
1b1872
%defattr(444,root,root,-)
1b1872
%{_prefix}/lib/sos/audit/*
1b1872
%{_mandir}/man5/sos-audit.conf.5.gz
1b1872
%{_mandir}/man8/sos-audit.sh.8.gz
1b1872
%ghost /etc/audit/rules.d/40-sos-filesystem.rules
1b1872
%ghost /etc/audit/rules.d/40-sos-storage.rules
1b1872
1b1872
%changelog
a18305
* Wed Dec 08 2021 Pavel Moravec <pmoravec@redhat.com> = 4.2-7
a18305
- [hostname] Simplify case matching for domains
a18305
  Resolves: bz2023867
a18305
9a3f62
* Tue Nov 30 2021 Pavel Moravec <pmoravec@redhat.com> = 4.2-6
9a3f62
- [redhat] Fix broken URI to upload to customer portal
9a3f62
  Resolves: bz2025610
9a3f62
9a3f62
* Mon Nov 22 2021 Pavel Moravec <pmoravec@redhat.com> = 4.2-5
9a3f62
- [clean,hostname_parser] Source /etc/hosts for obfuscation
9a3f62
  Resolves: bz2023867
9a3f62
- [clean, hostname] Fix unintentionally case sensitive
9a3f62
  Resolves: bz2023863
9a3f62
- [redhat] update SFTP API version to v2
9a3f62
  Resolves: bz2025610
9a3f62
6ebc5b
* Tue Nov 16 2021 Pavel Moravec <pmoravec@redhat.com> = 4.2-4
6ebc5b
- [report] Calculate sizes of dirs, symlinks and manifest in
6ebc5b
  Resolves: bz1873185
6ebc5b
- [report] shutdown threads for timeouted plugins
6ebc5b
  Resolves: bz2012857
6ebc5b
- [report] fix filter_namespace per pattern
6ebc5b
  Resolves: bz2020777
6ebc5b
- Ensure specific plugin timeouts are only set
6ebc5b
  Resolves: bz2018033
6ebc5b
900e1b
* Wed Nov 03 2021 Pavel Moravec <pmoravec@redhat.com> = 4.2-2
900e1b
- [firewall_tables] call iptables -t  based on nft
900e1b
  Resolves: bz2005195
900e1b
- [report] Count with sos_logs and sos_reports in
900e1b
  Resolves: bz1873185
900e1b
- [foreman] Collect puma status and stats
900e1b
  Resolves: bz2011506
900e1b
- [report] Overwrite pred=None before refering predicate
900e1b
  Resolves: bz2012856
900e1b
- [openvswitch] add commands for offline analysis
900e1b
  Resolves: bz2004929
900e1b
900e1b
* Wed Oct 06 2021 Pavel Moravec <pmoravec@redhat.com> = 4.2-1
900e1b
- Rebase on upstream 4.2
900e1b
  Resolves: bz1998133
900e1b
- [report] Implement --estimate-only
900e1b
  Resolves: bz1873185
900e1b
- [omnipath_client] Opacapture to run only with allow changes
900e1b
  Resolves: bz1998433
900e1b
- [unpackaged] deal with recursive loop of symlinks properly
900e1b
  Resolves: bz1998521
900e1b
- [networking] prevent iptables-save commands to load nf_tables
900e1b
  Resolves: bz2001096
900e1b
- [kernel] Capture Pressure Stall Information
900e1b
  Resolves: bz2002145
900e1b
- [processor] Apply sizelimit to /sys/devices/system/cpu/cpuX
900e1b
  Resolves: bz2011413
900e1b
89c8f0
* Wed Aug 11 2021 Pavel Moravec <pmoravec@redhat.com> = 4.1-5
89c8f0
- [report,collect] unify --map-file arguments
89c8f0
  Resolves: bz1923938
89c8f0
- [rhui] add new plugin for RHUI 4
89c8f0
  Resolves: bz1665947
89c8f0
- [username parser] Load usernames from `last` for LDAP users
89c8f0
  Resolves: bz1985037
89c8f0
bf10fb
* Mon Jul 26 2021 Pavel Moravec <pmoravec@redhat.com> = 4.1-4
bf10fb
- [options] allow variant option names in config file
bf10fb
  Resolves: bz1923938
bf10fb
- [plugins] Set default predicate instead of None
bf10fb
  Resolves: bz1985986
bf10fb
- [MigrationResults] collect info about conversions
bf10fb
  Resolves: bz1959598
bf10fb
ecf6d6
* Mon Jun 21 2021 Pavel Moravec <pmoravec@redhat.com> = 4.1-3
ecf6d6
- [gluster] collect public keys from the right dir
ecf6d6
  Resolves: bz1925419
ecf6d6
- [cleaner] Only skip packaging-based files for the IP parse
ecf6d6
  Resolves: bz1964499
ecf6d6
- [networking] collect also tc filter show ingress
ecf6d6
  Resolves: bz1886711
ecf6d6
- [archive] skip copying SELinux context for /proc and /sys
ecf6d6
  Resolves: bz1965001
ecf6d6
- [sssd] sssd plugin when sssd-common
ecf6d6
  Resolves: bz1967613
ecf6d6
- Various OCP/cluster/cleanup enhancements
ecf6d6
  Resolves: bz1973675
ecf6d6
24a42c
* Tue May 18 2021 Pavel Moravec <pmoravec@redhat.com> = 4.1-2
24a42c
- Load maps from all archives before obfuscation
24a42c
  Resolves: bz1930181
24a42c
- Multiple fixes in man pages
24a42c
  Resolves: bz1935603
24a42c
- [ds] Mask password and encryption keys in ldif files
24a42c
  Resolves: bz1937298
24a42c
- [report] add --cmd-timeout option
24a42c
  Resolves: bz1937418
24a42c
- [cups] Add gathering cups-browsed logs
24a42c
  Resolves: bz1939963
24a42c
- [sssd] Collect memory cache / individual logfiles
24a42c
  Resolves: bz1940502
24a42c
- Collect ibmvNIC dynamic_debugs
24a42c
  Resolves: bz1942276
24a42c
- [pulpcore] add plugin for pulp-3
24a42c
  Resolves: bz1956673
24a42c
- [saphana] remove redundant unused argument of get_inst_info
24a42c
  Resolves: bz1959413
24a42c
- [networking] Add nstat command support
24a42c
  Resolves: bz1961458
24a42c
- [snapper] add a new plugin
24a42c
  Resolves: bz1961229
24a42c
7c9316
* Mon Apr 26 2021 Pavel Moravec <pmoravec@redhat.com> = 4.1-1
7c9316
- Rebase on upstream 4.1
7c9316
  Resolves: bz1928679
264a38
15f6f8
* Tue Feb 16 2021 Pavel Moravec <pmoravec@redhat.com> = 4.0-8
15f6f8
- Automatically create directory for sos-cleaner default_mapping
15f6f8
  Resolves: bz1923937
15f6f8
bdbf16
* Fri Jan 29 2021 Pavel Moravec <pmoravec@redhat.com> = 4.0-7
bdbf16
- [kdump] Gather the file kexec-dmesg.log
bdbf16
  Resolves: bz1887402
bdbf16
- [Policy] Handle additional FTP authentication issues
bdbf16
  Resolves: bz1916729
bdbf16
31726d
* Thu Jan 21 2021 Pavel Moravec <pmoravec@redhat.com> = 4.0-6
31726d
- [networking] Collect 'ethtool -e <device>' conditionally only
31726d
  Resolves: bz1917196
31726d
62aeb2
* Wed Jan 06 2021 Pavel Moravec <pmoravec@redhat.com> = 4.0-5
62aeb2
- [component] honour plugopts from config file
62aeb2
  Resolves: bz1912889
62aeb2
- [collector] declare sysroot for each component
62aeb2
  Resolves: bz1912821
62aeb2
- [plugins] Dont stop collecting by empty specfile when sizelimit=0
62aeb2
  Resolves: bz1912910
62aeb2
f2c821
* Mon Jan 04 2021 Pavel Moravec <pmoravec@redhat.com> = 4.0-4
f2c821
- [component] Use sysroot from Policy when opts doesn't specify it
f2c821
  Resolves: bz1881118
f2c821
f2c821
* Mon Dec 14 2020 Pavel Moravec <pmoravec@redhat.com> = 4.0-3
f2c821
- [ovirt] collect /etc/pki/ovirt-engine/.truststore
f2c821
  Resolves: bz1848095
f2c821
- [collector] allow overriding plain --cluster-type
f2c821
  Resolves: bz1895316
f2c821
- [component] Add log verbosity from presets
f2c821
  Resolves: bz1904045
f2c821
- [options] Fix --log-size=0 being ignored and unreported
f2c821
  Resolves: bz1905657
f2c821
- [report] collect broken symlinks
f2c821
  Resolves: bz1906598
f2c821
900d18
* Thu Oct 29 2020 Pavel Moravec <pmoravec@redhat.com> = 4.0-2
900d18
- [cleaner] more streamlined sanitize_item method
900d18
  Resolves: bz1827801
900d18
- [openstack_ironic] Missing ironic-inspector configs
900d18
  Resolves: bz1874295
900d18
- Add support to collect hardware component logs
900d18
  Resolves: bz1880372
900d18
- [crio] collect /etc/crio/crio.conf.d/
900d18
  Resolves: bz1881118
900d18
- [policy] Handle additional failure conditions for FTP uploads
900d18
  Resolves: bz1882368
900d18
- [filesys] never collect content of /proc/fs/panfs
900d18
  Resolves: bz1886782
900d18
- [kdump] Collect new kdump logfiles
900d18
  Resolves: bz1887390
900d18
- [stratis] Collect key list and report engine
900d18
  Resolves: bz1888012
900d18
- return tmp-dir with absolute path
900d18
  Resolves: bz1891562
900d18
900d18
* Tue Oct 13 2020 Pavel Moravec <pmoravec@redhat.com> = 4.0-1
900d18
- Rebase on upstream 4.0
900d18
  Resolves: bz1827801