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