Compare commits

...

2 Commits

Author SHA1 Message Date
John Kacur fa97582889 Add an rpminspect.yaml file
Resolves: RHEL-19396
Signed-off-by: John Kacur <jkacur@redhat.com>
2023-12-13 14:39:14 -05:00
John Kacur e0569818b9 Don't start the gui if a display is not available
Change to SPDX licence tag in the specfile
Resolves: RHEL-8859

Signed-off-by: John Kacur <jkacur@redhat.com>
2023-12-13 11:58:49 -05:00
3 changed files with 50 additions and 2 deletions

4
rpminspect.yaml Normal file
View File

@ -0,0 +1,4 @@
---
inspections:
permissions: off
capabilities: off

View File

@ -0,0 +1,34 @@
From 5c2ff1e15bbce8d76a038de55abc20e8b3164bb7 Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur@redhat.com>
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 <jkacur@redhat.com>
---
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

View File

@ -1,7 +1,7 @@
Name: tuna
Version: 0.19
Release: 2%{?dist}
License: GPLv2
Release: 4%{?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,15 @@ done
%{_datadir}/polkit-1/actions/org.tuna.policy
%changelog
* Wed Dec 13 2023 John Kacur <jkacur@redhat.com> - 0.19-4
- Add an rpminspect.yaml file
Resolves: RHEL-19396
* Wed Dec 13 2023 John Kacur <jkacur@redhat.com> - 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 <jkacur@redhat.com> - 0.19-2
- Add SPDX licenses
- Remove the git maintained spec file