From 3b95445bdd5dc30cbc03484b234dfd560e7de61c Mon Sep 17 00:00:00 2001 From: John Kacur Date: Tue, 4 Nov 2025 13:28:49 -0500 Subject: [PATCH] Add python3-pip, python3-setuptools, python3-wheel BuildRequires Delete setup.py in %prep so pyproject.toml build is used Compress man page during %prep similar to rteval Install tuna script and compressed man page explicitly Resolves: RHEL-114902 Signed-off-by: John Kacur --- tuna.spec | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/tuna.spec b/tuna.spec index ee7bf4f..72aac16 100644 --- a/tuna.spec +++ b/tuna.spec @@ -2,7 +2,7 @@ Name: tuna Version: 0.20 -Release: 1%{?dist} +Release: 2%{?dist} License: GPL-2.0-only AND LGPL-2.1-only Summary: Application tuning GUI & command line utility Source: https://www.kernel.org/pub/software/utils/%{name}/%{name}-%{version}.tar.xz @@ -10,6 +10,9 @@ URL: https://rt.wiki.kernel.org/index.php/Tuna BuildArch: noarch BuildRequires: python3-devel BuildRequires: pyproject-rpm-macros +BuildRequires: python3-pip +BuildRequires: python3-setuptools +BuildRequires: python3-wheel BuildRequires: gettext # This really should be a Suggests... # Requires: python-inet_diag @@ -27,6 +30,12 @@ installed. %prep %autosetup -v -p1 +# Delete setup.py so pyproject.toml build doesn't use it +rm -f setup.py +# Prepare tuna script for installation (save to a separate location to avoid directory conflict) +cp -p tuna-cmd.py %{_builddir}/tuna-script +# Compress man page +gzip -c docs/tuna.8 > %{_builddir}/tuna.8.gz %generate_buildrequires %pyproject_buildrequires @@ -37,16 +46,19 @@ installed. %install %pyproject_install %pyproject_save_files tuna +# Install the tuna script +install -D -m 0755 %{_builddir}/tuna-script %{buildroot}%{_bindir}/tuna +# Install the compressed man page +install -D -m 0644 %{_builddir}/tuna.8.gz %{buildroot}%{_mandir}/man8/tuna.8.gz # Remove oscilloscope (unsupported in RHEL) rm -f %{buildroot}/%{_bindir}/oscilloscope mkdir -p %{buildroot}/%{_sysconfdir}/tuna/ -mkdir -p %{buildroot}/{%{_datadir}/tuna/help/kthreads,%{_mandir}/man8} +mkdir -p %{buildroot}/%{_datadir}/tuna/help/kthreads mkdir -p %{buildroot}/%{_datadir}/polkit-1/actions/ install -p -m644 tuna/tuna_gui.glade %{buildroot}/%{_datadir}/tuna/ install -p -m644 help/kthreads/* %{buildroot}/%{_datadir}/tuna/help/kthreads/ -install -p -m644 docs/tuna.8 %{buildroot}/%{_mandir}/man8/ install -p -m644 etc/tuna/example.conf %{buildroot}/%{_sysconfdir}/tuna/ install -p -m644 etc/tuna.conf %{buildroot}/%{_sysconfdir}/ install -p -m644 org.tuna.policy %{buildroot}/%{_datadir}/polkit-1/actions/ @@ -64,12 +76,19 @@ done %doc ChangeLog %{_bindir}/tuna %{_datadir}/tuna/ -%{_mandir}/man8/tuna.8* +%{_mandir}/man8/tuna.8.gz %{_sysconfdir}/tuna.conf %{_sysconfdir}/tuna/* %{_datadir}/polkit-1/actions/org.tuna.policy %changelog +* Tue Nov 04 2025 John Kacur - 0.20-2 +- Add python3-pip, python3-setuptools, python3-wheel BuildRequires +- Delete setup.py in %%prep so pyproject.toml build is used +- Compress man page during %%prep similar to rteval +- Install tuna script and compressed man page explicitly +Resolves: RHEL-114902 + * Tue Oct 28 2025 John Kacur - 0.20-1 - Update to upstream version 0.20 - Convert spec file to use pyproject-rpm-macros