From 7821a8822ddc3ea7ebd817e09d5c235de813e098 Mon Sep 17 00:00:00 2001 From: liudabo Date: Fri, 5 Mar 2021 14:55:45 +0800 Subject: [PATCH] powertop2tuned: work with PowerTOP 2.13 and newer --- ...ed-work-with-PowerTOP-2.13-and-newer.patch | 34 +++++++++++++++++++ tuned.spec | 7 ++-- 2 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 backport-powertop2tuned-work-with-PowerTOP-2.13-and-newer.patch diff --git a/backport-powertop2tuned-work-with-PowerTOP-2.13-and-newer.patch b/backport-powertop2tuned-work-with-PowerTOP-2.13-and-newer.patch new file mode 100644 index 0000000..2849875 --- /dev/null +++ b/backport-powertop2tuned-work-with-PowerTOP-2.13-and-newer.patch @@ -0,0 +1,34 @@ +From b4e975bef871c949e199952d4c3b84f73668f437 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= +Date: Thu, 4 Mar 2021 21:14:54 +0100 +Subject: [PATCH] powertop2tuned: work with PowerTOP 2.13 and newer +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fixes: #328 +Reference:https://github.com/redhat-performance/tuned/pull/329/commits/b4e975bef871c949e199952d4c3b84f73668f437 +Signed-off-by: Jaroslav Škarvada +--- + experiments/powertop2tuned.py | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/experiments/powertop2tuned.py b/experiments/powertop2tuned.py +index 211df2d3..8ab260cf 100755 +--- a/experiments/powertop2tuned.py ++++ b/experiments/powertop2tuned.py +@@ -215,9 +215,12 @@ def generateHTML(self): + print('PowerTOP returned error code: %d' % proc.returncode, file=sys.stderr) + return -2 + +- prefix = "PowerTOP outputing using base filename " ++ prefix = "PowerTOP outputting using base filename " + if output.find(prefix) == -1: +- return -1 ++ # workaround for PowerTOP older than 2.13 ++ prefix = "PowerTOP outputing using base filename " ++ if output.find(prefix) == -1: ++ return -1 + + name = output[output.find(prefix)+len(prefix):-1] + #print "Parsed filename=", [name] diff --git a/tuned.spec b/tuned.spec index 96e2079..2824c2b 100644 --- a/tuned.spec +++ b/tuned.spec @@ -1,7 +1,7 @@ Summary: A system tuning service for Linux Name: tuned Version: 2.10.0 -Release: 8 +Release: 9 License: GPLv2+ Source0: https://github.com/redhat-performance/%{name}/archive/v%{version}%{?prerel2}.tar.gz#/%{name}-%{version}%{?prerel2}.tar.gz URL: http://www.tuned-project.org/ @@ -32,7 +32,7 @@ Patch1: 0001-tuned-adm-Fix-a-traceback-when-run-without-action-sp.patch Patch2: tuned-2.10.0-makefile-full-python-path.patch Patch3: 0001-tuned-gui-Sort-plugins-based-on-their-name.patch Patch4: fix-cpu-Update-checking-if-EPB-is-supported.patch - +Patch5: backport-powertop2tuned-work-with-PowerTOP-2.13-and-newer.patch Patch9000: bugfix-tuned-2.8.0-restart-after-kill-dbus.patch Patch9001: 0005-realtime-virtual-host-pin-only-the-vcpu-thread-to-is.patch @@ -302,6 +302,9 @@ fi %{_mandir}/man7/%{name}-profiles-nfv-host.7* %changelog +* Fri Mar 05 2020 xinghe - 2.10.0-9 +- powertop2tuned work with PowerTOP 2.13 and newer + * Fri Sep 18 2020 xinghe - 2.10.0-8 - cpu Update checking if EPB is supported -- Gitee