diff --git a/tuna-Don-t-start-the-gui-if-a-display-is-not-availab.patch b/tuna-Don-t-start-the-gui-if-a-display-is-not-availab.patch new file mode 100644 index 0000000..58c1e3f --- /dev/null +++ b/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/tuna.spec b/tuna.spec index fb4971b..8424a90 100644 --- a/tuna.spec +++ b/tuna.spec @@ -1,7 +1,7 @@ Name: tuna Version: 0.19 -Release: 2%{?dist} -License: GPLv2 +Release: 3%{?dist} +License: GPL-2.0-only AND LGPL-2.1-only Summary: Application tuning GUI & command line utility URL: https://git.kernel.org/pub/scm/utils/tuna/tuna.git Source: https://www.kernel.org/pub/software/utils/%{name}/%{name}-%{version}.tar.xz @@ -15,6 +15,7 @@ Requires: python3-linux-procfs >= 0.6 # Patches Patch01: Add-SPDX-license-identifiers.patch Patch02: tuna-Remove-spec-file-from-git.patch +Patch03: 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 @@ -68,6 +69,11 @@ done %{_datadir}/polkit-1/actions/org.tuna.policy %changelog +* Wed Dec 13 2023 John Kacur - 0.19-3 +- Don't start the gui if a display is not available +- Change to SPDX licence tag in the specfile +Resolves: RHEL-8859 + * Thu Nov 02 2023 John Kacur - 0.19-2 - Add SPDX licenses - Remove the git maintained spec file