From de860bd5c7d29ee92058da7219deae4354ebb523 Mon Sep 17 00:00:00 2001 From: Sandro Bonazzola Date: Thu, 1 Jun 2023 10:19:53 +0200 Subject: [PATCH] Adapt to new Fedora packaging guidelines --- sos.spec | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/sos.spec b/sos.spec index 336c9c3..5d72485 100644 --- a/sos.spec +++ b/sos.spec @@ -1,7 +1,7 @@ Summary: A set of tools to gather troubleshooting information from a system Name: sos Version: 4.5.4 -Release: 2%{?dist} +Release: 3%{?dist} Source0: https://github.com/sosreport/sos/archive/%{version}.tar.gz License: GPL-2.0-or-later BuildArch: noarch @@ -28,11 +28,25 @@ support technicians and developers. %prep %setup -qn %{name}-%{version} +%if 0%{?fedora} >= 39 +%generate_buildrequires +%pyproject_buildrequires +%endif + %build +%if 0%{?fedora} >= 39 +%pyproject_wheel +%else %py3_build +%endif %install +%if 0%{?fedora} >= 39 +%pyproject_install +%pyproject_save_files sos +%else %py3_install '--install-scripts=%{_sbindir}' +%endif install -d -m 755 %{buildroot}%{_sysconfdir}/%{name} install -d -m 700 %{buildroot}%{_sysconfdir}/%{name}/cleaner @@ -50,9 +64,15 @@ rm -rf %{buildroot}/usr/config/ # internationalization is currently broken. Uncomment this line once fixed. # %%files -f %%{name}.lang %files +%if 0%{?fedora} >= 39 +%{_bindir}/sos +%{_bindir}/sosreport +%{_bindir}/sos-collector +%else %{_sbindir}/sos %{_sbindir}/sosreport %{_sbindir}/sos-collector +%endif %dir /etc/sos/cleaner %dir /etc/sos/presets.d %dir /etc/sos/extras.d @@ -66,6 +86,9 @@ rm -rf %{buildroot}/usr/config/ %config(noreplace) %{_sysconfdir}/sos/sos.conf %changelog +* Thu Jun 01 2023 Sandro Bonazzola - 4.5.4-3 +- Adapt to new Fedora packaging guidelines + * Mon May 29 2023 Sandro Bonazzola - 4.5.4-2 - Remove unneeded requirements