47940b
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
47940b
47940b
%global auditversion 0.3
47940b
47940b
Summary: A set of tools to gather troubleshooting information from a system
47940b
Name: sos
47940b
Version: 4.1
47940b
Release: 8%{?dist}
47940b
Group: Applications/System
47940b
Source0: https://github.com/sosreport/sos/archive/%{version}/sos-%{version}.tar.gz
47940b
Source1: sos-audit-%{auditversion}.tgz
47940b
License: GPLv2+
47940b
BuildArch: noarch
47940b
Url: https://github.com/sosreport/sos
47940b
BuildRequires: python3-devel
47940b
BuildRequires: gettext
47940b
Requires: libxml2-python3
47940b
#Requires: python3-rpm
47940b
Requires: tar
47940b
Requires: bzip2
47940b
Requires: xz
47940b
Recommends: python3-pexpect
47940b
Conflicts: vdsm < 4.40
47940b
Obsoletes: sos-collector <= 1.9
47940b
Patch1: sos-bz1925419-gluster-pubkeys-statusfile.patch
47940b
Patch2: sos-bz1967110-collect-cleaning-consistency.patch
47940b
Patch3: sos-bz1967111-manpages-see-also.patch
47940b
Patch4: sos-bz1967112-add-cmd-timeout.patch
47940b
Patch5: sos-bz1967113-ds-mask-password-in-ldif.patch
47940b
Patch6: sos-bz1967114-gather-cups-browsed-logs.patch
47940b
Patch7: sos-bz1967115-sssd-memcache-and-logs.patch
47940b
Patch8: sos-bz1967116-ibmvNIC-dynamic-debugs.patch
47940b
Patch9: sos-bz1967117-pulpcore-plugin.patch
47940b
Patch10: sos-bz1967118-saphana-traceback.patch
47940b
Patch11: sos-bz1967119-collect-nstat.patch
47940b
Patch12: sos-bz1967120-snapper-plugin-and-allocation-failures.patch
47940b
Patch13: sos-bz1965002-skip-selinux-of-proc-everytime.patch
47940b
Patch14: sos-bz1985976-enhance-tc-hw-offload.patch
47940b
Patch15: sos-bz1985982-obfuscate-fqdn-from-dnf-log.patch
47940b
Patch16: sos-bz1967718-sssd-common.patch
47940b
Patch17: sos-bz1985983-ocp-cluster-cleaner.patch
47940b
Patch18: sos-bz1985985-sos-log-effective-options.patch
47940b
Patch19: sos-bz1938874-potential-issues-static-analyse.patch
47940b
Patch20: sos-bz1959779-conversions-and-upgrades.patch
47940b
Patch21: sos-bz1992859-rhui-plugin.patch
47940b
Patch22: sos-bz1992861-cleaner-AD-users-obfuscation.patch
47940b
47940b
%description
47940b
Sos is a set of tools that gathers information about system
47940b
hardware and configuration. The information can then be used for
47940b
diagnostic purposes and debugging. Sos is commonly used to help
47940b
support technicians and developers.
47940b
47940b
%prep
47940b
%setup -qn %{name}-%{version}
47940b
%setup -T -D -a1 -q
47940b
%patch1 -p1
47940b
%patch2 -p1
47940b
%patch3 -p1
47940b
%patch4 -p1
47940b
%patch5 -p1
47940b
%patch6 -p1
47940b
%patch7 -p1
47940b
%patch8 -p1
47940b
%patch9 -p1
47940b
%patch10 -p1
47940b
%patch11 -p1
47940b
%patch12 -p1
47940b
%patch13 -p1
47940b
%patch14 -p1
47940b
%patch15 -p1
47940b
%patch16 -p1
47940b
%patch17 -p1
47940b
%patch18 -p1
47940b
%patch19 -p1
47940b
%patch20 -p1
47940b
%patch21 -p1
47940b
%patch22 -p1
47940b
47940b
%build
47940b
%py3_build
47940b
47940b
%install
47940b
%py3_install '--install-scripts=%{_sbindir}'
47940b
47940b
install -d -m 755 %{buildroot}%{_sysconfdir}/%{name}
47940b
install -d -m 700 %{buildroot}%{_sysconfdir}/%{name}/cleaner
47940b
install -d -m 755 %{buildroot}%{_sysconfdir}/%{name}/presets.d
47940b
install -d -m 755 %{buildroot}%{_sysconfdir}/%{name}/groups.d
47940b
install -d -m 755 %{buildroot}%{_sysconfdir}/%{name}/extras.d
47940b
install -m 644 %{name}.conf %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf
47940b
47940b
rm -rf %{buildroot}/usr/config/
47940b
47940b
%find_lang %{name} || echo 0
47940b
47940b
cd %{name}-audit-%{auditversion}
47940b
DESTDIR=%{buildroot} ./install.sh
47940b
cd ..
47940b
47940b
%files -f %{name}.lang
47940b
%{_sbindir}/sos
47940b
%{_sbindir}/sosreport
47940b
%{_sbindir}/sos-collector
47940b
#%dir /etc/sos/cleaner
47940b
%dir /etc/sos/presets.d
47940b
%dir /etc/sos/extras.d
47940b
%dir /etc/sos/groups.d
47940b
%{python3_sitelib}/*
47940b
%{_mandir}/man1/*
47940b
%{_mandir}/man5/sos.conf.5.gz
47940b
%doc AUTHORS README.md
47940b
%license LICENSE
47940b
%config(noreplace) %{_sysconfdir}/sos/sos.conf
47940b
%config(noreplace) %{_sysconfdir}/sos/cleaner
47940b
47940b
47940b
%package audit
47940b
Summary: Audit use of some commands for support purposes
47940b
License: GPLv2+
47940b
Group: Application/System
47940b
47940b
%description audit
47940b
47940b
Sos-audit provides configuration files for the Linux Auditing System
47940b
to track the use of some commands capable of changing the configuration
47940b
of the system.  Currently storage and filesystem commands are audited.
47940b
47940b
%post audit
47940b
%{_sbindir}/sos-audit.sh
47940b
47940b
%files audit
47940b
%defattr(755,root,root,-)
47940b
%{_sbindir}/sos-audit.sh
47940b
%defattr(644,root,root,-)
47940b
%config(noreplace) %{_sysconfdir}/sos/sos-audit.conf
47940b
%defattr(444,root,root,-)
47940b
%{_prefix}/lib/sos/audit/*
47940b
%{_mandir}/man5/sos-audit.conf.5.gz
47940b
%{_mandir}/man8/sos-audit.sh.8.gz
47940b
%ghost /etc/audit/rules.d/40-sos-filesystem.rules
47940b
%ghost /etc/audit/rules.d/40-sos-storage.rules
47940b
47940b
47940b
%changelog
47940b
* Wed Aug 11 2021 Pavel Moravec <pmoravec@redhat.com> = 4.1-8
47940b
- [report,collect] unify --map-file arguments
47940b
  Resolves: bz1985985
47940b
- [rhui] add new plugin for RHUI 4
47940b
  Resolves: bz1992859
47940b
- [username parser] Load usernames from `last` for LDAP users
47940b
  Resolves: bz1992861
47940b
47940b
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 4.1-7
47940b
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
47940b
  Related: rhbz#1991688
47940b
47940b
* Tue Jul 27 2021 Pavel Moravec <pmoravec@redhat.com> - 4.1-6
47940b
- [networking] collect also tc filter show ingress
47940b
  Resolves: bz1985976
47940b
- [cleaner] Only skip packaging-based files for the IP parser
47940b
  Resolves: bz1985982
47940b
- [sssd] sssd plugin when sssd-common
47940b
  Resolves: bz1967718
47940b
- Various OCP/cluster/cleanup enhancements
47940b
  Resolves: bz1985983
47940b
- [options] allow variant option names in config file
47940b
  Resolves: bz1985985
47940b
- [plugins] Set default predicate instead of None
47940b
  Resolves: bz1938874
47940b
- [MigrationResults] collect info about conversions and
47940b
  Resolves: bz1959779
47940b
47940b
* Wed Jun 02 2021 Pavel Moravec <pmoravec@redhat.com> - 4.1-4
47940b
- [archive] skip copying SELinux context for /proc and /sys everytime
47940b
  Resolves: bz1965002
47940b
- Load maps from all archives before obfuscation
47940b
  Resolves: bz1967110
47940b
- Multiple fixes in man pages
47940b
  Resolves: bz1967111
47940b
- [ds] Mask password and encryption keys in ldif files
47940b
  Resolves: bz1967112
47940b
- [report] add --cmd-timeout option
47940b
  Resolves: bz1967113
47940b
- [cups] Add gathering cups-browsed logs
47940b
  Resolves: bz1967114
47940b
- [sssd] Collect memory cache / individual logfiles
47940b
  Resolves: bz1967115
47940b
- Collect ibmvNIC dynamic_debugs
47940b
  Resolves: bz1967116
47940b
- [pulpcore] add plugin for pulp-3
47940b
  Resolves: bz1967117
47940b
- [saphana] remove redundant unused argument of get_inst_info
47940b
  Resolves: bz1967118
47940b
- [networking] Add nstat command support
47940b
  Resolves: bz1967119
47940b
- [snapper] add a new plugin
47940b
  Resolves: bz1967120
47940b
47940b
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 4.1-4
47940b
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
47940b
47940b
* Thu Apr 01 2021 Pavel Moravec <pmoravec@redhat.com> - 4.1-3
47940b
- adding sos-audit
47940b
- [gluster] Add glusterd public keys and status files
47940b
  Resolves: bz1925419 
47940b
47940b
* Wed Mar 10 2021 Sandro Bonazzola <sbonazzo@redhat.com> - 4.1-1
47940b
- Rebase to 4.1
47940b