From 3c2a241ac8baf279f53ff96ebb771a50ad25a0a2 Mon Sep 17 00:00:00 2001 From: MSVSphere Packaging Team Date: Tue, 26 Nov 2024 19:33:42 +0300 Subject: [PATCH] import tuna-0.19-8.el10 --- .gitignore | 1 + .tuna.metadata | 1 + .../0001-Add-SPDX-license-identifiers.patch | 357 ++++++++++++++++++ .../0002-tuna-Remove-spec-file-from-git.patch | 220 +++++++++++ ...-the-gui-if-a-display-is-not-availab.patch | 34 ++ SPECS/tuna.spec | 253 +++++++++++++ 6 files changed, 866 insertions(+) create mode 100644 .gitignore create mode 100644 .tuna.metadata create mode 100644 SOURCES/0001-Add-SPDX-license-identifiers.patch create mode 100644 SOURCES/0002-tuna-Remove-spec-file-from-git.patch create mode 100644 SOURCES/tuna-Don-t-start-the-gui-if-a-display-is-not-availab.patch create mode 100644 SPECS/tuna.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2cc5245 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/tuna-0.19.tar.xz diff --git a/.tuna.metadata b/.tuna.metadata new file mode 100644 index 0000000..6cd04aa --- /dev/null +++ b/.tuna.metadata @@ -0,0 +1 @@ +476a07c86a1687d703fe86c8bcb33126240d97ce SOURCES/tuna-0.19.tar.xz diff --git a/SOURCES/0001-Add-SPDX-license-identifiers.patch b/SOURCES/0001-Add-SPDX-license-identifiers.patch new file mode 100644 index 0000000..e3c1f6d --- /dev/null +++ b/SOURCES/0001-Add-SPDX-license-identifiers.patch @@ -0,0 +1,357 @@ +From fbde2418c84e57723ae1698acfe5932a11f4d611 Mon Sep 17 00:00:00 2001 +From: Clark Williams +Date: Thu, 17 Aug 2023 08:12:38 -0500 +Subject: [PATCH 1/2] Add SPDX license identifiers + +use SPDX license identifiers to clarify the licences under which +tuna is released. + +Signed-off-by: Clark Williams +Signed-off-by: John Kacur +--- + Makefile | 3 +++ + org.tuna.policy | 1 + + oscilloscope-cmd.py | 15 +-------------- + setup.py | 1 + + testuna | 10 +++++----- + tuna-cmd.py | 9 +-------- + tuna.desktop | 1 + + tuna/__init__.py | 2 +- + tuna/config.py | 2 ++ + tuna/gui/__init__.py | 2 ++ + tuna/gui/commonview.py | 2 ++ + tuna/gui/cpuview.py | 1 + + tuna/gui/irqview.py | 1 + + tuna/gui/procview.py | 1 + + tuna/gui/profileview.py | 1 + + tuna/gui/util.py | 1 + + tuna/new_eth.py | 1 + + tuna/oscilloscope.py | 15 +-------------- + tuna/sysfs.py | 2 ++ + tuna/tuna.py | 7 ++++--- + tuna/tuna_gui.py | 1 + + tuna/tuna_sched.py | 1 + + 22 files changed, 35 insertions(+), 45 deletions(-) + +diff --git a/Makefile b/Makefile +index 50ded3985743..a3d71d2de896 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,3 +1,6 @@ ++# ++# SPDX-License-Identifier: GPL-2.0-only ++# + PACKAGE := tuna + VERSION := $(shell rpm -q --qf '%{VERSION} ' --specfile rpm/SPECS/$(PACKAGE).spec | cut -d' ' -f1) + +diff --git a/org.tuna.policy b/org.tuna.policy +index 4f71d4ad65f4..b3b3900a4d76 100644 +--- a/org.tuna.policy ++++ b/org.tuna.policy +@@ -1,4 +1,5 @@ + ++ + + +diff --git a/oscilloscope-cmd.py b/oscilloscope-cmd.py +index 2ca87e9edc62..a65117637160 100755 +--- a/oscilloscope-cmd.py ++++ b/oscilloscope-cmd.py +@@ -5,20 +5,7 @@ + # http://git.kernel.org/?p=linux/kernel/git/acme/tuna.git;a=tree + # For newer versions and to see it integrated with tuna + # +-# This library is free software; you can redistribute it and/or +-# modify it under the terms of the GNU Lesser General Public +-# License as published by the Free Software Foundation; +-# version 2.1 of the License. +-# +-# This library is distributed in the hope that it will be useful, +-# but WITHOUT ANY WARRANTY; without even the implied warranty of +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-# Lesser General Public License for more details. +-# +-# You should have received a copy of the GNU Lesser General Public +-# License along with this library; if not, write to the Free Software +-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +-# USA ++# SPDX-License-Identifier: LGPL-2.1-only + + import getopt + import sys +diff --git a/setup.py b/setup.py +index db0f00735524..f119e75abdeb 100755 +--- a/setup.py ++++ b/setup.py +@@ -1,4 +1,5 @@ + #!/usr/bin/python3 ++# SPDX-License-Identifier: GPL-2.0-only + import os + import sysconfig + from os.path import isfile, relpath +diff --git a/testuna b/testuna +index 4bf91ebdb76f..cb98640c0167 100755 +--- a/testuna ++++ b/testuna +@@ -2,7 +2,7 @@ + # Regression tests for tuna + # (c) 2008 Red Hat Inc. + # Arnaldo Carvalho de Melo +-# Released under the GPLv2 ++# SPDX-License-Identifier: GPL-2.0-only + + dprint() { + [ -n "$VERBOSE" ] && echo $1 +@@ -111,21 +111,21 @@ PID=$(ktpidof "watchdog") + RTPRIO=$(get_rtprio $PID) + POLICY=$(get_policy $PID) + POLICY=$(echo ${POLICY:6:1} | tr 'A-Z' 'a-z') +-chrt -$POLICY -p $((RTPRIO - 1)) $PID ++chrt -$POLICY -p $((RTPRIO - 1)) $PID + + die_if_not_saved 1 'Saving changes to a kernel thread priority' + +-chrt -$POLICY -p $RTPRIO $PID ++chrt -$POLICY -p $RTPRIO $PID + + die_if_conf_changed 'Restoring kernel thread priority' + + new_policy=$(echo $POLICY | tr fr rf) + +-chrt -$new_policy -p $RTPRIO $PID ++chrt -$new_policy -p $RTPRIO $PID + + die_if_not_saved 1 'Changing kernel thread sched policy' + +-chrt -$POLICY -p $RTPRIO $PID ++chrt -$POLICY -p $RTPRIO $PID + + die_if_conf_changed 'Restoring kernel thread sched policy' + +diff --git a/tuna-cmd.py b/tuna-cmd.py +index 6a980598526f..e953869c4f48 100755 +--- a/tuna-cmd.py ++++ b/tuna-cmd.py +@@ -5,14 +5,7 @@ + # Copyright (C) 2008, 2009, 2010, 2011 Red Hat Inc. + # Arnaldo Carvalho de Melo + # +-# This application is free software; you can redistribute it and/or +-# modify it under the terms of the GNU General Public License +-# as published by the Free Software Foundation; version 2. +-# +-# This application is distributed in the hope that it will be useful, +-# but WITHOUT ANY WARRANTY; without even the implied warranty of +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-# General Public License for more details. ++# SPDX-License-Identifier: GPL-2.0-only + + """ tuna - Application Tuning Program""" + +diff --git a/tuna.desktop b/tuna.desktop +index 603011f79467..87ca3a35ce63 100644 +--- a/tuna.desktop ++++ b/tuna.desktop +@@ -1,3 +1,4 @@ ++# SPDX-License-Identifier: GPL-2.0-only + [Desktop Entry] + Name=tuna + GenericName=Application Tuner +diff --git a/tuna/__init__.py b/tuna/__init__.py +index 30924a00cf96..614e3e4c7ed8 100755 +--- a/tuna/__init__.py ++++ b/tuna/__init__.py +@@ -4,4 +4,4 @@ Copyright (c) 2008, 2009 Red Hat Inc. + Application Tuning GUI + """ + __author__ = "Arnaldo Carvalho de Melo " +-__license__ = "GPLv2 License" ++__license__ = "SPDX-License-Identifier: GPL-2.0-only" +diff --git a/tuna/config.py b/tuna/config.py +index 09d26dd87029..63c9f23bb09b 100644 +--- a/tuna/config.py ++++ b/tuna/config.py +@@ -1,3 +1,5 @@ ++# SPDX-License-Identifier: GPL-2.0-only ++ + import io + import os + import re +diff --git a/tuna/gui/__init__.py b/tuna/gui/__init__.py +index ad1191c13d8d..a40f86292e6f 100755 +--- a/tuna/gui/__init__.py ++++ b/tuna/gui/__init__.py +@@ -1,3 +1,5 @@ ++# SPDX-License-Identifier: GPL-2.0-only ++ + """ + Copyright (c) 2009 Red Hat Inc. + +diff --git a/tuna/gui/commonview.py b/tuna/gui/commonview.py +index cc8f913819a2..8089ed154dae 100644 +--- a/tuna/gui/commonview.py ++++ b/tuna/gui/commonview.py +@@ -1,3 +1,5 @@ ++# SPDX-License-Identifier: GPL-2.0-only ++ + from gi.repository import Gtk + from tuna import tuna + +diff --git a/tuna/gui/cpuview.py b/tuna/gui/cpuview.py +index cc3f0f905ae7..844705a4bb21 100755 +--- a/tuna/gui/cpuview.py ++++ b/tuna/gui/cpuview.py +@@ -1,5 +1,6 @@ + # -*- python -*- + # -*- coding: utf-8 -*- ++# SPDX-License-Identifier: GPL-2.0-only + + from functools import reduce + +diff --git a/tuna/gui/irqview.py b/tuna/gui/irqview.py +index 5143d6dc0df5..e89fb70197fc 100755 +--- a/tuna/gui/irqview.py ++++ b/tuna/gui/irqview.py +@@ -1,5 +1,6 @@ + # -*- python -*- + # -*- coding: utf-8 -*- ++# SPDX-License-Identifier: GPL-2.0-only + from tuna import tuna, gui + import procfs + from gi.repository import Gdk +diff --git a/tuna/gui/procview.py b/tuna/gui/procview.py +index 440a289a1b29..78d5f573dd49 100755 +--- a/tuna/gui/procview.py ++++ b/tuna/gui/procview.py +@@ -1,3 +1,4 @@ ++# SPDX-License-Identifier: GPL-2.0-only + import re + import os + import tuna.tuna_sched as tuna_sched +diff --git a/tuna/gui/profileview.py b/tuna/gui/profileview.py +index 26f58cbc8f4f..7570bc0e57ce 100644 +--- a/tuna/gui/profileview.py ++++ b/tuna/gui/profileview.py +@@ -1,3 +1,4 @@ ++# SPDX-License-Identifier: GPL-2.0-only + import os + import shutil + import gi +diff --git a/tuna/gui/util.py b/tuna/gui/util.py +index ec368ae4b2c9..92bd368179cc 100644 +--- a/tuna/gui/util.py ++++ b/tuna/gui/util.py +@@ -1,3 +1,4 @@ ++# SPDX-License-Identifier: GPL-2.0-only + import errno + import os + import gi +diff --git a/tuna/new_eth.py b/tuna/new_eth.py +index 98f9179d5695..e2888d4cef36 100755 +--- a/tuna/new_eth.py ++++ b/tuna/new_eth.py +@@ -1,4 +1,5 @@ + # Copyright (C) 2022 John Kacur ++# SPDX-License-Identifier: GPL-2.0-only + """ A few functions similar to ethtool """ + import os + import socket +diff --git a/tuna/oscilloscope.py b/tuna/oscilloscope.py +index 317fe4554c60..a44ace53ec27 100755 +--- a/tuna/oscilloscope.py ++++ b/tuna/oscilloscope.py +@@ -8,20 +8,7 @@ + # http://git.kernel.org/?p=linux/kernel/git/acme/tuna.git;a=tree + # For newer versions and to see it integrated with tuna + # +-# This library is free software; you can redistribute it and/or +-# modify it under the terms of the GNU Lesser General Public +-# License as published by the Free Software Foundation; +-# version 2.1 of the License. +-# +-# This library is distributed in the hope that it will be useful, +-# but WITHOUT ANY WARRANTY; without even the implied warranty of +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-# Lesser General Public License for more details. +-# +-# You should have received a copy of the GNU Lesser General Public +-# License along with this library; if not, write to the Free Software +-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +-# USA ++# SPDX-License-Identifier: LGPL-2.1-only + + import os + import sys +diff --git a/tuna/sysfs.py b/tuna/sysfs.py +index 1c903e106a44..cd2377a8df26 100755 +--- a/tuna/sysfs.py ++++ b/tuna/sysfs.py +@@ -1,5 +1,7 @@ + # -*- python -*- + # -*- coding: utf-8 -*- ++# SPDX-License-Identifier: GPL-2.0-only ++ + """ + classes for /sys/devices/system/cpu/ + so we can get topology information and do CPU hotplug operations +diff --git a/tuna/tuna.py b/tuna/tuna.py +index e527facb151c..bd678e2dc7ae 100755 +--- a/tuna/tuna.py ++++ b/tuna/tuna.py +@@ -1,5 +1,6 @@ + # -*- python -*- + # -*- coding: utf-8 -*- ++# SPDX-License-Identifier: GPL-2.0-only + + import copy + import errno +@@ -647,12 +648,12 @@ def generate_rtgroups(filename, kthreads, nr_cpus): + f.write('''# Generated by tuna + # + # Use it with rtctl: +-# ++# + # rtctl --file %s reset + # + # Please use 'man rtctl' for more operations + # +-# Associate processes into named groups with default priority and ++# Associate processes into named groups with default priority and + # scheduling policy. + # + # Format is: ::: +@@ -661,7 +662,7 @@ def generate_rtgroups(filename, kthreads, nr_cpus): + # sched must be one of: 'f' (fifo) + # 'b' (batch) + # 'r' (round-robin) +-# 'o' (other) ++# 'o' (other) + # '*' (leave alone) + # regex is an awk regex + # +diff --git a/tuna/tuna_gui.py b/tuna/tuna_gui.py +index 459f90303ed5..cefee4a57697 100755 +--- a/tuna/tuna_gui.py ++++ b/tuna/tuna_gui.py +@@ -1,5 +1,6 @@ + # -*- python -*- + # -*- coding: utf-8 -*- ++# SPDX-License-Identifier: GPL-2.0-only + + import sys + import os +diff --git a/tuna/tuna_sched.py b/tuna/tuna_sched.py +index de9846bb5fae..1051983e53f9 100644 +--- a/tuna/tuna_sched.py ++++ b/tuna/tuna_sched.py +@@ -1,5 +1,6 @@ + #!/usr/bin/python3 + # Copyright (C) 2022 John Kacur ++# SPDX-License-Identifier: GPL-2.0-only + """ + Functions to translate a scheduling policy into either a string name or an + equivalent integer +-- +2.42.0 + diff --git a/SOURCES/0002-tuna-Remove-spec-file-from-git.patch b/SOURCES/0002-tuna-Remove-spec-file-from-git.patch new file mode 100644 index 0000000..df4c938 --- /dev/null +++ b/SOURCES/0002-tuna-Remove-spec-file-from-git.patch @@ -0,0 +1,220 @@ +From 0c93bd0f26c3d7abda51e51a43ea979ecd794cc9 Mon Sep 17 00:00:00 2001 +From: John Kacur +Date: Wed, 18 Oct 2023 10:54:49 -0400 +Subject: [PATCH 2/2] tuna: Remove spec file from git + +The specfile should be maintained in the distribution and not upstream +The specfile that is upstream is largely unmaintained anyway. +This change also guts the Makefile which uses the specfile. +Most of the functionality in the Makefile is available through tools +such as rpmbuild anyway. Leaving the Makefile in place for a few +minor things like makeing tagfiles + +Signed-off-by: John Kacur +--- + Makefile | 39 +------------ + rpm/SPECS/tuna.spec | 137 -------------------------------------------- + 2 files changed, 3 insertions(+), 173 deletions(-) + delete mode 100644 rpm/SPECS/tuna.spec + +diff --git a/Makefile b/Makefile +index a3d71d2de896..a55821a8f908 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,42 +1,8 @@ + # + # SPDX-License-Identifier: GPL-2.0-only + # +-PACKAGE := tuna +-VERSION := $(shell rpm -q --qf '%{VERSION} ' --specfile rpm/SPECS/$(PACKAGE).spec | cut -d' ' -f1) +- +-rpmdirs: +- @[ -d rpm/BUILD ] || mkdir rpm/BUILD +- @[ -d rpm/RPMS ] || mkdir rpm/RPMS +- @[ -d rpm/SRPMS ] || mkdir rpm/SRPMS +- @[ -d rpm/SOURCES ] || mkdir rpm/SOURCES +- +-bz2: rpmdirs +- git archive --format=tar --prefix=$(PACKAGE)-$(VERSION)/ HEAD | \ +- bzip2 -9 > rpm/SOURCES/$(PACKAGE)-$(VERSION).tar.bz2 +- +-rpm: bz2 rpmdirs +- rpmbuild -ba --define "_topdir $(PWD)/rpm" rpm/SPECS/$(PACKAGE).spec +- +-bz2dev: rpmdirs +- @mkdir -p /tmp/$(PACKAGE)-$(VERSION) +- @tar cf - `cat MANIFEST` | (cd /tmp/$(PACKAGE)-$(VERSION) ; tar xf -) +- @(cd /tmp; tar cf - $(PACKAGE)-$(VERSION)) | bzip2 -9 > rpm/SOURCES/$(PACKAGE)-$(VERSION).tar.bz2 +- +-rpmdev: bz2dev rpmdirs +- rpmbuild -ba --define "_topdir $(PWD)/rpm" rpm/SPECS/$(PACKAGE).spec +- +-po/$(PACKAGE).pot: +- xgettext -k_ -kN_ -f po/POTFILES.in -o $@ +- +-po/%.po: po/$(PACKAGE).pot +- msgmerge --suffix=.old -U $@ $< && rm -f $@.old +- +-rpmclean: +- @rm -f rpm/RPMS/*/$(PACKAGE)-$(VERSION)-*.rpm +- @rm -f rpm/SRPMS/$(PACKAGE)-$(VERSION)-*.src.rpm +- @rm -f rpm/SOURCES/$(PACKAGE)-$(VERSION).tar.bz2 +- @rm -rf rpm/BUILD/$(PACKAGE)-$(VERSION)* + ++.PHONY: pyclean + pyclean: + @find . -type f \( -name \*~ -o -name \*.pyc \) -delete + +@@ -52,4 +18,5 @@ cleantags: + cleanlogs: + rm -rf tuna-20* + +-clean: pyclean rpmclean ++.PHONY: clean ++clean: pyclean +diff --git a/rpm/SPECS/tuna.spec b/rpm/SPECS/tuna.spec +deleted file mode 100644 +index eca96c833265..000000000000 +--- a/rpm/SPECS/tuna.spec ++++ /dev/null +@@ -1,137 +0,0 @@ +-Name: tuna +-Version: 0.15 +-Release: 1%{?dist} +-License: GPLv2 +-Summary: Application tuning GUI & command line utility +-Group: Applications/System +-Source: http://userweb.kernel.org/~acme/tuna/%{name}-%{version}.tar.bz2 +-URL: http://userweb.kernel.org/~acme/tuna/ +-BuildArch: noarch +-BuildRequires: python-devel, gettext, desktop-file-utils +-Requires: python-ethtool +-Requires: python-linux-procfs >= 0.6 +-# This really should be a Suggests... +-# Requires: python-inet_diag +-BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) +- +-%description +-Provides interface for changing scheduler and IRQ tunables, at whole CPU and at +-per thread/IRQ level. Allows isolating CPUs for use by a specific application +-and moving threads and interrupts to a CPU by just dragging and dropping them. +-Operations can be done on CPU sockets, understanding CPU topology. +- +-Can be used as a command line utility without requiring the GUI libraries to be +-installed. +- +-%package -n oscilloscope +-Summary: Generic graphical signal plotting tool +-Group: Applications/System +-Requires: python-matplotlib +-Requires: numpy +-Requires: pygtk2 +-Requires: tuna = %{version}-%{release} +- +-%description -n oscilloscope +-Plots stream of values read from standard input on the screen together with +-statistics and a histogram. +- +-Allows to instantly see how a signal generator, such as cyclictest, signaltest +-or even ping, reacts when, for instance, its scheduling policy or real time +-priority is changed, be it using tuna or plain chrt & taskset. +- +-%prep +-%setup -q +- +-%build +-%{python3} setup.py build +- +-%install +-rm -rf %{buildroot} +-%{python3} setup.py install --skip-build --root %{buildroot} +-mkdir -p %{buildroot}/%{_sysconfdir}/tuna/ +-mkdir -p %{buildroot}/{%{_bindir},%{_datadir}/tuna/help/kthreads,%{_mandir}/man8} +-mkdir -p %{buildroot}/%{_datadir}/polkit-1/actions/ +-install -p -m644 tuna/tuna_gui.glade %{buildroot}/%{_datadir}/tuna/ +-install -p -m755 tuna-cmd.py %{buildroot}/%{_bindir}/tuna +-install -p -m755 oscilloscope-cmd.py %{buildroot}/%{_bindir}/oscilloscope +-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/ +-desktop-file-install --dir=%{buildroot}/%{_datadir}/applications tuna.desktop +- +-# l10n-ed message catalogues +-for lng in `cat po/LINGUAS`; do +- po=po/"$lng.po" +- mkdir -p %{buildroot}/%{_datadir}/locale/${lng}/LC_MESSAGES +- msgfmt $po -o %{buildroot}/%{_datadir}/locale/${lng}/LC_MESSAGES/%{name}.mo +-done +- +-%find_lang %name +- +-%clean +-rm -rf %{buildroot} +- +-%files -f %{name}.lang +-%defattr(-,root,root,-) +-%doc ChangeLog +-%if "%{python_ver}" >= "2.5" +-%{python2_sitelib}/*.egg-info +-%endif +-%{_bindir}/tuna +-%{_datadir}/tuna/ +-%{python3_sitelib}/tuna/ +-%{_mandir}/man8/tuna.8* +-%{_sysconfdir}/tuna.conf +-%{_sysconfdir}/tuna/* +-%{_datadir}/polkit-1/actions/org.tuna.policy +-%{_datadir}/applications/tuna.desktop +- +-%files -n oscilloscope +-%defattr(-,root,root,-) +-%{_bindir}/oscilloscope +-%doc docs/oscilloscope+tuna.html +-%doc docs/oscilloscope+tuna.pdf +- +-%changelog +-* Fri Feb 1 2013 Arnaldo Carvalho de Melo - 0.10.4-1 +-- New upstream release +- +-* Fri Aug 24 2012 Arnaldo Carvalho de Melo - 0.10.3-1 +-- New upstream release +- +-* Thu Jul 28 2011 Arnaldo Carvalho de Melo - 0.10.2-1 +-- New upstream release +- +-* Wed Feb 23 2011 Arnaldo Carvalho de Melo - 0.10.1-1 +-- New upstream release +- +-* Wed Feb 23 2011 Arnaldo Carvalho de Melo - 0.10-1 +-- New upstream release +- +-* Mon May 17 2010 Arnaldo Carvalho de Melo - 0.9.3-1 +-- New upstream release +-- Fixes the folowing bugzilla.redhat.com tickets: +-- 563355 error in tuna --help output +-- 574950 cannot use cpu ranges in the tuna GUI +-- 559770 tuna backtrace when moving threads +-- 563352 tuna backtrace when no thread list is given for --priority +-- 563350 tuna backtrace when scheduler is mis-typed. +- +-* Thu Nov 12 2009 Arnaldo Carvalho de Melo - 0.9.2-1 +-- New upstream release +- +-* Thu Sep 03 2009 Arnaldo Carvalho de Melo - 0.9.1-1 +-- New upstream release +- +-* Wed Aug 26 2009 Arnaldo Carvalho de Melo - 0.9-3 +-- Rewrite the oscilloscope package summary +-- Remove the shebang in tuna/oscilloscope.py +- +-* Mon Aug 17 2009 Arnaldo Carvalho de Melo - 0.9-2 +-- Use install -p +-- Add BuildRequires for gettext +- +-* Fri Jul 10 2009 Arnaldo Carvalho de Melo - 0.9-1 +-- Fedora package reviewing changes: introduce ChangeLog file +-- +2.42.0 + diff --git a/SOURCES/tuna-Don-t-start-the-gui-if-a-display-is-not-availab.patch b/SOURCES/tuna-Don-t-start-the-gui-if-a-display-is-not-availab.patch new file mode 100644 index 0000000..58c1e3f --- /dev/null +++ b/SOURCES/tuna-Don-t-start-the-gui-if-a-display-is-not-availab.patch @@ -0,0 +1,34 @@ +From 5c2ff1e15bbce8d76a038de55abc20e8b3164bb7 Mon Sep 17 00:00:00 2001 +From: John Kacur +Date: Mon, 11 Dec 2023 16:35:03 -0500 +Subject: [PATCH] tuna: Don't start the gui if a display is not available + +This is intended for the main branch of tuna. + +Don't start the gui if a display is not available. + +Signed-off-by: John Kacur +--- + tuna-cmd.py | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/tuna-cmd.py b/tuna-cmd.py +index e953869c4f48..f37e286bffdb 100755 +--- a/tuna-cmd.py ++++ b/tuna-cmd.py +@@ -736,6 +736,12 @@ def main(): + thread_help(tid) + + elif args.command in ['g', 'gui']: ++ # Don't try to start the gui if no display is available ++ display = os.getenv("DISPLAY") ++ if not display: ++ parser.print_help() ++ return ++ + try: + from tuna import tuna_gui + except ImportError: +-- +2.42.0 + diff --git a/SPECS/tuna.spec b/SPECS/tuna.spec new file mode 100644 index 0000000..63f98a8 --- /dev/null +++ b/SPECS/tuna.spec @@ -0,0 +1,253 @@ +%bcond oscilloscope %{undefined rhel} + +Name: tuna +Version: 0.19 +Release: 8%{?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 +URL: https://rt.wiki.kernel.org/index.php/Tuna +BuildArch: noarch +BuildRequires: python3-devel, gettext +BuildRequires: python3-setuptools +Requires: python3-linux-procfs >= 0.7.3 +# This really should be a Suggests... +# Requires: python-inet_diag + +# Patches +Patch1: 0001-Add-SPDX-license-identifiers.patch +Patch2: 0002-tuna-Remove-spec-file-from-git.patch +Patch3: tuna-Don-t-start-the-gui-if-a-display-is-not-availab.patch + +%description +Provides interface for changing scheduler and IRQ tunables, at whole CPU and at +per thread/IRQ level. Allows isolating CPUs for use by a specific application +and moving threads and interrupts to a CPU by just dragging and dropping them. +Operations can be done on CPU sockets, understanding CPU topology. + +Can be used as a command line utility without requiring the GUI libraries to be +installed. + +%prep +%setup -q +%patch 1 -p1 +%patch 2 -p1 +%patch 3 -p1 + +%build +%py3_build +%py3_shebang_fix tuna/ +%py3_shebang_fix tuna-cmd.py + +%install +rm -rf %{buildroot} +%py3_install +mkdir -p %{buildroot}/%{_sysconfdir}/tuna/ +mkdir -p %{buildroot}/{%{_bindir},%{_datadir}/tuna/help/kthreads,%{_mandir}/man8} +mkdir -p %{buildroot}/%{_datadir}/polkit-1/actions/ +install -p -m644 tuna/tuna_gui.glade %{buildroot}/%{_datadir}/tuna/ +install -p -m755 tuna-cmd.py %{buildroot}/%{_bindir}/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/ + +# l10n-ed message catalogues +for lng in `cat po/LINGUAS`; do + po=po/"$lng.po" + mkdir -p %{buildroot}/%{_datadir}/locale/${lng}/LC_MESSAGES + msgfmt $po -o %{buildroot}/%{_datadir}/locale/${lng}/LC_MESSAGES/%{name}.mo +done + +%find_lang %name + +%files -f %{name}.lang +%doc ChangeLog +%{python3_sitelib}/*.egg-info +%{_bindir}/tuna +%{_datadir}/tuna/ +%{python3_sitelib}/tuna/ +%{_mandir}/man8/tuna.8* +%{_sysconfdir}/tuna.conf +%{_sysconfdir}/tuna/* +%{_datadir}/polkit-1/actions/org.tuna.policy + +%changelog +* Tue Nov 26 2024 MSVSphere Packaging Team - 0.19-8 +- Rebuilt for MSVSphere 10 + +* Mon Jun 24 2024 Troy Dawson - 0.19-8 +- Bump release for June 2024 mass rebuild + +* Tue Mar 26 2024 John Kacur - 0.19-7 +- Add missing patch to prevents tuna gui from starting if display not available +- remove oscilloscope which is unsupported in rhel +- Add rpmsinpect.yaml and gating.yaml +- Add tests dir +- update the current version of python-linux-procfs as a requires +Resolves: RHEL-30171 + +* Sat Jan 27 2024 Fedora Release Engineering - 0.19-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sat Dec 02 2023 John Kacur - 0.19-5 +- Convert to SPDX licenses and use this in the specfile too + +* Sat Jul 22 2023 Fedora Release Engineering - 0.19-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Fri Jun 23 2023 Yaakov Selkowitz - 0.19-3 +- Disable oscilloscope in RHEL builds +- Remove obsolete dependencies + +* Tue Jun 13 2023 Python Maint - 0.19-2 +- Rebuilt for Python 3.12 + +* Thu Feb 16 2023 John Kacur - 0.19-1 +- Use setuptools and sysconfig instead of distutils in setup.py +- Update to 0.19 upstream + +* Sat Jan 21 2023 Fedora Release Engineering - 0.18-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Fri Aug 12 2022 Federico Pellegrin - 0.18-1 +- update to 0.18, remove now merged patch + +* Sat Jul 23 2022 Fedora Release Engineering - 0.17-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Mon Jun 13 2022 Python Maint - 0.17-3 +- Rebuilt for Python 3.11 + +* Sat Jan 22 2022 Fedora Release Engineering - 0.17-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Tue Jan 11 2022 Federico Pellegrin - 0.17-1 +- update to 0.17 (various fixes and cleanups) + +* Fri Aug 20 2021 Federico Pellegrin - 0.16-1 +- update to 0.16 (contains Gtk3 support) + +* Fri Jul 23 2021 Fedora Release Engineering - 0.14.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Fri Jun 04 2021 Python Maint - 0.14.1-5 +- Rebuilt for Python 3.10 + +* Wed Jan 27 2021 Fedora Release Engineering - 0.14.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Jul 29 2020 Fedora Release Engineering - 0.14.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Tue May 26 2020 Miro Hrončok - 0.14.1-2 +- Rebuilt for Python 3.9 + +* Thu May 21 2020 Jiri Kastner - 0.14.1 +- update to 0.14.1 +- fixes RHBZ#1773339 + +* Fri Jan 31 2020 Fedora Release Engineering - 0.14-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Oct 03 2019 Miro Hrončok - 0.14-5 +- Rebuilt for Python 3.8.0rc1 (#1748018) + +* Mon Aug 19 2019 Miro Hrončok - 0.14-4 +- Rebuilt for Python 3.8 + +* Sat Jul 27 2019 Fedora Release Engineering - 0.14-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Tue Feb 12 2019 Jiri Kastner - 0.14-3 +- upload patch + +* Tue Feb 12 2019 Jiri Kastner - 0.14-2 +- oscilloscope gtk3 patch + +* Tue Feb 12 2019 Jiri Kastner - 0.14-1 +- update to 0.14 +- switch to python3 + +* Sun Feb 03 2019 Fedora Release Engineering - 0.13.1-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Sat Jul 14 2018 Fedora Release Engineering - 0.13.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Wed Feb 14 2018 Iryna Shcherbina - 0.13.1-6 +- Update Python 2 dependency declarations to new packaging standards + (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) + +* Fri Feb 09 2018 Fedora Release Engineering - 0.13.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Wed Nov 29 2017 Lubomir Rintel - 0.13.1-4 +- Add a missing dependency for oscilloscope + +* Thu Jul 27 2017 Fedora Release Engineering - 0.13.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Sat Feb 11 2017 Fedora Release Engineering - 0.13.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Wed Dec 21 2016 Jiri Kastner - 0.13.1-1 +- new version + +* Mon Sep 26 2016 Dominik Mierzejewski - 0.12-5 +- rebuilt for matplotlib-2.0.0 + +* Tue Jul 19 2016 Fedora Release Engineering - 0.12-4 +- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages + +* Fri Feb 05 2016 Fedora Release Engineering - 0.12-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Fri Jun 19 2015 Fedora Release Engineering - 0.12-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Fri Oct 10 2014 Jiri Kastner - 0.12-1 +- new upstream release + +* Sun Jun 08 2014 Fedora Release Engineering - 0.11.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Mon Jul 29 2013 Jiri Kastner - 0.11.1-1 +- New upstream release + +* Tue Jun 11 2013 Jiri Kastner - 0.11-2 +- changed dependencies from python-numeric to numpy +- merged spec changes from upstream + +* Thu Jun 6 2013 Jiri Kastner - 0.11-1 +- New upstream release + +* Fri Feb 15 2013 Fedora Release Engineering - 0.9.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Sun Jul 22 2012 Fedora Release Engineering - 0.9.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Sat Jan 14 2012 Fedora Release Engineering - 0.9.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Wed Feb 09 2011 Fedora Release Engineering - 0.9.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Sun Aug 01 2010 Orcan Ogetbil - 0.9.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild + +* Thu Sep 03 2009 Arnaldo Carvalho de Melo - 0.9.1-1 +- New upstream release + +* Wed Aug 26 2009 Arnaldo Carvalho de Melo - 0.9-3 +- Rewrite the oscilloscope package summary +- Remove the shebang in tuna/oscilloscope.py + +* Mon Aug 17 2009 Arnaldo Carvalho de Melo - 0.9-2 +- Use install -p +- Add BuildRequires for gettext + +* Fri Jul 10 2009 Arnaldo Carvalho de Melo - 0.9-1 +- Fedora package reviewing changes: introduce ChangeLog file