aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--setup.py44
-rw-r--r--sos.spec43
2 files changed, 53 insertions, 34 deletions
diff --git a/setup.py b/setup.py
index 5b1e5ffd..04ee66a6 100644
--- a/setup.py
+++ b/setup.py
@@ -58,27 +58,35 @@ class InstallData(install_data):
return (out+".gz", _)
return (out, _)
-setup(name='sos',
- version=VERSION,
- description=("""A set of tools to gather troubleshooting"""
- """ information from a system."""),
- author='Bryn M. Reeves',
- author_email='bmr@redhat.com',
- maintainer='Jake Hunsaker',
- maintainer_email='jhunsake@redhat.com',
- url='https://github.com/sosreport/sos',
- license="GPLv2+",
- scripts=['bin/sos', 'bin/sosreport'],
- data_files=[
+setup(
+ name='sos',
+ version=VERSION,
+ description=("""A set of tools to gather troubleshooting"""
+ """ information from a system."""),
+ author='Bryn M. Reeves',
+ author_email='bmr@redhat.com',
+ maintainer='Jake Hunsaker',
+ maintainer_email='jhunsake@redhat.com',
+ url='https://github.com/sosreport/sos',
+ license="GPLv2+",
+ scripts=['bin/sos', 'bin/sosreport', 'bin/sos-collector'],
+ data_files=[
+ ('/', ['sos.conf']),
('share/man/man1', ['man/en/sosreport.1', 'man/en/sos-report.1',
'man/en/sos.1', 'man/en/sos-collect.1',
- 'man/en/sos-collector.1']),
+ 'man/en/sos-collector.1', 'man/en/sos-clean.1',
+ 'man/en/sos-mask.1']),
('share/man/man5', ['man/en/sos.conf.5']),
- ],
- packages=['sos', 'sos.policies', 'sos.report', 'sos.report.plugins',
- 'sos.collector', 'sos.collector.clusters'],
- cmdclass={'build': BuildData, 'install_data': InstallData},
- requires=['pexpect']
+ ('share/licenses/sos', ['LICENSE']),
+ ('share/doc/sos', ['AUTHORS', 'README.md'])
+ ],
+ packages=[
+ 'sos', 'sos.policies', 'sos.report', 'sos.report.plugins',
+ 'sos.collector', 'sos.collector.clusters', 'sos.cleaner',
+ 'sos.cleaner.mappings', 'sos.cleaner.parsers'
+ ],
+ cmdclass={'build': BuildData, 'install_data': InstallData},
+ requires=['pexpect']
)
diff --git a/sos.spec b/sos.spec
index 12b1bb54..4c34e534 100644
--- a/sos.spec
+++ b/sos.spec
@@ -5,18 +5,19 @@ Name: sos
Version: 3.9
Release: 1%{?dist}
Group: Applications/System
-Source0: https://github.com/sosreport/sos/archive/%{version}.tar.gz
+Source0: https://github.com/sosreport/sos/archive/%{name}-%{version}.tar.gz
License: GPLv2+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
BuildArch: noarch
Url: https://github.com/sosreport/sos/
-BuildRequires: python-devel
+BuildRequires: python3-devel
BuildRequires: gettext
Requires: libxml2-python
Requires: rpm-python
Requires: tar
Requires: xz
Requires: python3-pexpect
+Obsoletes: sos-collector <= 1.9
%description
Sos is a set of tools that gathers information about system
@@ -25,29 +26,39 @@ diagnostic purposes and debugging. Sos is commonly used to help
support technicians and developers.
%prep
-%setup -q
+%setup -qn %{name}-%{version}
%build
-make
+%py3_build
%install
-rm -rf ${RPM_BUILD_ROOT}
-make DESTDIR=${RPM_BUILD_ROOT} install
-%find_lang %{name} || echo 0
+%py3_install '--install-scripts=%{_sbindir}'
+
+install -d -m 755 ${RPM_BUILD_ROOT}/etc/sos
+install -d -m 700 ${RPM_BUILD_ROOT}/etc/sos/cleaner
+install -d -m 755 ${RPM_BUILD_ROOT}/etc/sos/presets.d
+install -d -m 755 ${RPM_BUILD_ROOT}/etc/sos/groups.d
+install -d -m 755 ${RPM_BUILD_ROOT}/etc/sos/extras.d
+install -m 644 %{name}.conf ${RPM_BUILD_ROOT}/etc/sos/%{name}.conf
-%clean
-rm -rf ${RPM_BUILD_ROOT}
+rm ${RPM_BUILD_ROOT}/sos.conf
+
+%find_lang %{name} || echo 0
-%files -f %{name}.lang
-%defattr(-,root,root,-)
+%files
+%{_sbindir}/sos
%{_sbindir}/sosreport
-%{_datadir}/%{name}
-%{python_sitelib}/*
+%{_sbindir}/sos-collector
+%dir /etc/sos/cleaner
+%dir /etc/sos/presets.d
+%dir /etc/sos/extras.d
+%dir /etc/sos/groups.d
+%{python3_sitelib}/*
%{_mandir}/man1/*
%{_mandir}/man5/*
-%doc AUTHORS README.md LICENSE
-%doc /usr/share/doc/sos/html
-%config(noreplace) %{_sysconfdir}/sos.conf
+%doc AUTHORS README.md
+%license LICENSE
+%config(noreplace) %{_sysconfdir}/sos/sos.conf
%changelog
* Fri Feb 14 2020 Bryn M. Reeves <bmr@redhat.com> = 3.9