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
2ed6e8
Version: 4.1
2ed6e8
Release: 5%{?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
ce36b2
Url: http://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
2ed6e8
Patch1: sos-bz1930181-collect-cleaning-consistency.patch
2ed6e8
Patch2: sos-bz1935603-manpages-see-also.patch
2ed6e8
Patch3: sos-bz1937418-add-cmd-timeout.patch
2ed6e8
Patch4: sos-bz1937298-ds-mask-password-in-ldif.patch
2ed6e8
Patch5: sos-bz1939963-gather-cups-browsed-logs.patch
2ed6e8
Patch6: sos-bz1940502-sssd-memcache-and-logs.patch
2ed6e8
Patch7: sos-bz1942276-ibmvNIC-dynamic-debugs.patch
2ed6e8
Patch8: sos-bz1956673-pulpcore-plugin.patch
2ed6e8
Patch9: sos-bz1959413-saphana-traceback.patch
2ed6e8
Patch10: sos-bz1961458-collect-nstat.patch
2ed6e8
Patch11: sos-bz1961229-snapper-plugin-and-allocation-failures.patch
2ed6e8
Patch12: sos-bz1925419-all-gluster-files.patch
2ed6e8
Patch13: sos-bz1964499-obfuscate-fqdn-from-dnf-log.patch
2ed6e8
Patch14: sos-bz1886711-enhance-tc-hw-offload.patch
2ed6e8
Patch15: sos-bz1965001-fix-avc-copystating-proc-sys.patch
2ed6e8
Patch16: sos-bz1967613-sssd-common.patch
2ed6e8
Patch17: sos-bz1973675-ocp-cluster-cleaner.patch
2ed6e8
Patch18: sos-bz1923938-sos-log-effective-options.patch
2ed6e8
Patch19: sos-bz1985986-potential-issues-static-analyse.patch
2ed6e8
Patch20: sos-bz1959598-conversions-and-upgrades.patch
2ed6e8
Patch21: sos-bz1665947-rhui-plugin.patch
2ed6e8
Patch22: sos-bz1985037-cleaner-AD-users-obfuscation.patch
8bcace
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
c5258f
%patch11 -p1
c5258f
%patch12 -p1
c5258f
%patch13 -p1
8bcace
%patch14 -p1
8bcace
%patch15 -p1
8bcace
%patch16 -p1
8bcace
%patch17 -p1
8bcace
%patch18 -p1
8bcace
%patch19 -p1
8bcace
%patch20 -p1
2ed6e8
%patch21 -p1
2ed6e8
%patch22 -p1
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
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
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