From 3e881291a66ec6f09f7f7b4065e8d1b31a1b9cd9 Mon Sep 17 00:00:00 2001 From: Federico Pellegrin Date: Wed, 12 Jan 2022 08:09:36 +0100 Subject: [PATCH] Add execution patch for installed fix as per upstream --- .gitignore | 1 + fix-ModuleNotFoundError.patch | 35 +++++++++++++++++++++++++++++++++++ tuna.spec | 2 ++ 3 files changed, 38 insertions(+) create mode 100644 fix-ModuleNotFoundError.patch diff --git a/.gitignore b/.gitignore index ce46151..b2892aa 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /tuna-0.14.tar.xz /tuna-0.14.1.tar.xz /tuna-0.16.tar.xz +/tuna-0.17.tar.xz diff --git a/fix-ModuleNotFoundError.patch b/fix-ModuleNotFoundError.patch new file mode 100644 index 0000000..e0a5b5f --- /dev/null +++ b/fix-ModuleNotFoundError.patch @@ -0,0 +1,35 @@ +From 7684169d22af5379d2f466730c450afc92e80da8 Mon Sep 17 00:00:00 2001 +From: John Kacur +Date: Tue, 11 Jan 2022 16:58:58 -0500 +Subject: tuna: Fix ModuleNotFoundError + +commit 43b434867514934593ada5aa8ea448ef6a1778f9 fixed the problem with +relative imports but unfortunately created a new problem with installed +tuna + +This fixes the original problem and also fixes the ModuleNotFoundError +in an installed (not running from git) version of tuna. + +Signed-off-by: John Kacur +--- + tuna/tuna.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tuna/tuna.py b/tuna/tuna.py +index 98a1725..8fb4212 100755 +--- a/tuna/tuna.py ++++ b/tuna/tuna.py +@@ -12,8 +12,8 @@ import platform + import ethtool + import procfs + from procfs import utilist +-import help +-import tuna_sched ++from tuna import help ++from tuna import tuna_sched + + try: + fntable +-- +cgit 1.2.3-1.el7 + diff --git a/tuna.spec b/tuna.spec index d7b31ab..be4d563 100644 --- a/tuna.spec +++ b/tuna.spec @@ -4,6 +4,7 @@ Release: 1%{?dist} License: GPLv2 Summary: Application tuning GUI & command line utility Source: https://www.kernel.org/pub/software/utils/%{name}/%{name}-%{version}.tar.xz +Patch0: fix-ModuleNotFoundError.patch URL: https://rt.wiki.kernel.org/index.php/Tuna BuildArch: noarch BuildRequires: python3-devel, gettext @@ -40,6 +41,7 @@ priority is changed, be it using tuna or plain chrt & taskset. %prep %setup -q +%patch0 -p1 %build %py3_build