Commit be1b0b06 authored by Rocky Automation's avatar Rocky Automation 📺
Browse files

import tuna-0.15-2.el8

parent 1ec750e8
SOURCES/tuna-0.14.tar.xz
SOURCES/tuna-0.15.tar.xz
0957ee39985f0414dfeabd85daf6c7357c009891 SOURCES/tuna-0.14.tar.xz
67fb3ea8815809203ca5f37941a03bee3dc1422f SOURCES/tuna-0.15.tar.xz
From cd9e707b23980ed568aeddac6eaa2125b651c6cc Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur@redhat.com>
Date: Wed, 3 Mar 2021 10:45:28 -0500
Subject: [PATCH] tuna: Fix tuna --include option breakage
The change to remove the dependency on python-schedutils
broke the --include function.
get_affinity(pid) from python-schedutils returned a list
os.sched_getaffinity(pid) returns a set
In many cases they can be interchanged, but not with the '+' operation
Fix this by changing affinity to a list before concatenation
Reported-by: Mark Simmons <msimmons@redhat.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
---
tuna/tuna.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tuna/tuna.py b/tuna/tuna.py
index e5122dac1081..614a8250b054 100755
--- a/tuna/tuna.py
+++ b/tuna/tuna.py
@@ -431,9 +431,9 @@ def include_cpus(cpus, nr_cpus):
if err.args[0] == errno.ESRCH:
continue
raise err
- if set(affinity).intersection(set(cpus)) != set(cpus):
+ if affinity.intersection(set(cpus)) != set(cpus):
previous_pid_affinities[pid] = copy.copy(affinity)
- affinity = list(set(affinity + cpus))
+ affinity = list(affinity) + cpus
try:
os.sched_setaffinity(pid, affinity)
except OSError as err:
@@ -453,9 +453,9 @@ def include_cpus(cpus, nr_cpus):
if err.args[0] == errno.ESRCH:
continue
raise err
- if set(affinity).intersection(set(cpus)) != set(cpus):
+ if affinity.intersection(set(cpus)) != set(cpus):
previous_pid_affinities[tid] = copy.copy(affinity)
- affinity = list(set(affinity + cpus))
+ affinity = list(affinity) + cpus
try:
os.sched_setaffinity(tid, affinity)
except OSError as err:
--
2.26.2
Name: tuna
Version: 0.14
Release: 4%{?dist}
Version: 0.15
Release: 2%{?dist}
License: GPLv2
Summary: Application tuning GUI & command line utility
Group: Applications/System
Source: https://git.kernel.org/pub/scm/utils/tuna/tuna.git/%{name}/%{name}-%{version}.tar.xz
Source: https://www.kernel.org/pub/software/utils/tuna/%{name}-%{version}.tar.xz
URL: https://git.kernel.org/pub/scm/utils/tuna/tuna.git
# If upstream does not provide tarballs, to generate
# git clone git://git.kernel.org/pub/scm/utils/tuna/tuna.git
# cd tuna
# git archive --format=tar --prefix=tuna-%%{version}/ v%%{version} | xz -c > tuna-%%{version}.tar.xz
BuildArch: noarch
BuildRequires: python3-devel, gettext
Requires: python3-ethtool
Requires: python3-linux-procfs >= 0.6
Requires: python3-schedutils >= 0.6
# This really should be a Suggests...
# Requires: python-inet_diag
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
# PATCHES
Patch1: tuna-sysfs.py-Add-method-to-compare-class-cpu.patch
Patch2: tuna-Use-exception-args-attribute-for-python3.patch
Patch3: tuna-fix-undefined-global-name-stderr.patch
Patch1: tuna-Fix-tuna-include-option-breakage.patch
%description
Provides interface for changing scheduler and IRQ tunables, at whole CPU and at
......@@ -36,8 +30,6 @@ installed.
%prep
%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%build
%{__python3} setup.py build
......@@ -84,6 +76,15 @@ rm -rf %{buildroot}
%{_datadir}/polkit-1/actions/org.tuna.policy
%changelog
* Thu Mar 04 2021 John Kacur <jkacur@redhat.com> - 0.15-2
- Fix tuna's include option
Resolves: rhbz#1934594
* Thu Jan 21 2021 John Kacur <jkacur@redhat.com> - 0.15-1
- Upgrade to latest upstream code
- Upstream drops python-schedutils and uses built-in schedutils
Resolves: rhbz#1890558
* Tue Apr 02 2019 Clark Williams <williams@redhat.com> - 0.14-4
- added OSCI gating framework
Resolves: rhbz#1682423
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment