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