Package init
This commit is contained in:
commit
22b1b3f790
@ -0,0 +1,38 @@
|
||||
From 6678c472abbd5f645dbb99ab2946c0e35ded7499 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= <olysonek@redhat.com>
|
||||
Date: Tue, 10 Jul 2018 00:24:00 +0200
|
||||
Subject: [PATCH] tuned-adm: Fix a traceback when run without action specified
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Running tuned-adm without an action specified using Python 3 results
|
||||
in a traceback. This is because in this case parse_args does not
|
||||
exit with a usage message in Python 3 and the 'action' option
|
||||
is then undefined.
|
||||
|
||||
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
|
||||
---
|
||||
tuned-adm.py | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tuned-adm.py b/tuned-adm.py
|
||||
index 1b9623d..1df8cc3 100755
|
||||
--- a/tuned-adm.py
|
||||
+++ b/tuned-adm.py
|
||||
@@ -100,7 +100,11 @@ if __name__ == "__main__":
|
||||
debug = options.pop("debug")
|
||||
asynco = options.pop("async")
|
||||
timeout = options.pop("timeout")
|
||||
- action_name = options.pop("action")
|
||||
+ try:
|
||||
+ action_name = options.pop("action")
|
||||
+ except KeyError:
|
||||
+ parser.print_usage(file = sys.stderr)
|
||||
+ sys.exit(1)
|
||||
log_level = options.pop("loglevel")
|
||||
result = False
|
||||
|
||||
--
|
||||
2.14.4
|
||||
|
||||
35
0001-tuned-gui-Sort-plugins-based-on-their-name.patch
Normal file
35
0001-tuned-gui-Sort-plugins-based-on-their-name.patch
Normal file
@ -0,0 +1,35 @@
|
||||
From d46834808c3226b3a6e48649df65befc399c21cd Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= <olysonek@redhat.com>
|
||||
Date: Wed, 11 Jul 2018 00:41:45 +0200
|
||||
Subject: [PATCH] tuned-gui: Sort plugins based on their name
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Previously the sorting was done by comparing the objects themselves,
|
||||
which is not what we want and it doesn't work in Python 3 - TypeError
|
||||
is raised, e.g:
|
||||
TypeError: '<' not supported between instances of 'BootloaderPlugin' and 'MountsPlugin'
|
||||
|
||||
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
|
||||
---
|
||||
tuned-gui.py | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tuned-gui.py b/tuned-gui.py
|
||||
index 8f72fd5..e486687 100755
|
||||
--- a/tuned-gui.py
|
||||
+++ b/tuned-gui.py
|
||||
@@ -278,7 +278,8 @@ class Base(object):
|
||||
self.treestore_profiles = Gtk.ListStore(GObject.TYPE_STRING,
|
||||
GObject.TYPE_STRING)
|
||||
self.treestore_plugins = Gtk.ListStore(GObject.TYPE_STRING)
|
||||
- for plugin in sorted(self.plugin_loader.plugins):
|
||||
+ for plugin in sorted(self.plugin_loader.plugins,
|
||||
+ key = lambda plugin: plugin.name):
|
||||
self.treestore_plugins.append([plugin.name])
|
||||
self.combobox_plugins = \
|
||||
self.builder.get_object('comboboxPlugins')
|
||||
--
|
||||
2.14.4
|
||||
|
||||
@ -0,0 +1,73 @@
|
||||
From 4790e570ce0e41bde4e1866ed6e3cba723b5f4d8 Mon Sep 17 00:00:00 2001
|
||||
From: Marcelo Tosatti <mtosatti@redhat.com>
|
||||
Date: Wed, 4 Jul 2018 17:30:37 -0300
|
||||
Subject: [PATCH 005/124] realtime-virtual-host: pin only the vcpu thread to
|
||||
isolated pCPU (v2)
|
||||
|
||||
As noted in the bugzilla ticket
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1554851
|
||||
|
||||
The QEMU I/O thread can interrupt the time measurement
|
||||
of the timer. To avoid this problem, only
|
||||
pin the vCPU thread.
|
||||
|
||||
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
|
||||
Reviewed-and-Tested-by: Luiz Capitulino <lcapitulino@redhat.com>
|
||||
|
||||
v2:
|
||||
- Use unix sockets (Luiz)
|
||||
- Proper numeric output (Luiz)
|
||||
---
|
||||
profiles/realtime-virtual-host/script.sh | 31 +++++++++++++++++++++----------
|
||||
1 file changed, 21 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/profiles/realtime-virtual-host/script.sh b/profiles/realtime-virtual-host/script.sh
|
||||
index 515d254..32e962d 100755
|
||||
--- a/profiles/realtime-virtual-host/script.sh
|
||||
+++ b/profiles/realtime-virtual-host/script.sh
|
||||
@@ -17,20 +17,31 @@ run_tsc_deadline_latency()
|
||||
|
||||
for i in `seq 1000 500 7000`; do
|
||||
echo $i > $KVM_LAPIC_FILE
|
||||
- chrt -f 1 taskset -c $1 $QEMU -enable-kvm -device pc-testdev \
|
||||
+
|
||||
+ unixpath=`mktemp`
|
||||
+
|
||||
+ chrt -f 1 $QEMU -S -enable-kvm -device pc-testdev \
|
||||
-device isa-debug-exit,iobase=0xf4,iosize=0x4 \
|
||||
-display none -serial stdio -device pci-testdev \
|
||||
-kernel "$TSCDEADLINE_LATENCY" \
|
||||
- -cpu host | grep latency | cut -f 2 -d ":" > $dir/out
|
||||
-
|
||||
- if [ ! -f $dir/out ]; then
|
||||
- die running $TSCDEADLINE_LATENCY failed
|
||||
- fi
|
||||
+ -cpu host \
|
||||
+ -mon chardev=char0,mode=readline \
|
||||
+ -chardev socket,id=char0,nowait,path=$unixpath,server | grep latency | cut -f 2 -d ":" > $dir/out &
|
||||
+
|
||||
+ sleep 1s
|
||||
+ pidofvcpu=`echo "info cpus" | nc -U $unixpath | grep thread_id | cut -f 3 -d "=" | tr -d "\r"`
|
||||
+ taskset -p -c $1 $pidofvcpu >/dev/null
|
||||
+ echo "cont" | nc -U $unixpath >/dev/null
|
||||
+ wait
|
||||
+
|
||||
+ if [ ! -f $dir/out ]; then
|
||||
+ die running $TSCDEADLINE_LATENCY failed
|
||||
+ fi
|
||||
|
||||
- tmp=$(wc -l $dir/out | awk '{ print $1 }')
|
||||
- if [ $tmp -eq 0 ]; then
|
||||
- die running $TSCDEADLINE_LATENCY failed
|
||||
- fi
|
||||
+ tmp=$(wc -l $dir/out | awk '{ print $1 }')
|
||||
+ if [ $tmp -eq 0 ]; then
|
||||
+ die running $TSCDEADLINE_LATENCY failed
|
||||
+ fi
|
||||
|
||||
A=0
|
||||
while read l; do
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
25
0029-Fix-TypeError.patch
Normal file
25
0029-Fix-TypeError.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From 5c61305860a9520e01b1b66a0bd2fa2b21d70b34 Mon Sep 17 00:00:00 2001
|
||||
From: Tomas Korbar <tkorbar@redhat.com>
|
||||
Date: Mon, 23 Jul 2018 14:25:38 +0200
|
||||
Subject: [PATCH 029/124] Fix TypeError
|
||||
|
||||
---
|
||||
tuned/admin/admin.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tuned/admin/admin.py b/tuned/admin/admin.py
|
||||
index 3f84413..22ffcde 100644
|
||||
--- a/tuned/admin/admin.py
|
||||
+++ b/tuned/admin/admin.py
|
||||
@@ -73,7 +73,7 @@ class Admin(object):
|
||||
action = getattr(self, "_action_" + action_name)
|
||||
except AttributeError as e:
|
||||
if not self._dbus:
|
||||
- self._error(e + ", action '%s' is not implemented" % action_name)
|
||||
+ self._error(str(e) + ", action '%s' is not implemented" % action_name)
|
||||
return False
|
||||
if self._dbus:
|
||||
try:
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
36
0040-Fix-pickle-provider.patch
Normal file
36
0040-Fix-pickle-provider.patch
Normal file
@ -0,0 +1,36 @@
|
||||
From c4f83e29567204eed4eef38bd47393dde88f6134 Mon Sep 17 00:00:00 2001
|
||||
From: Tomas Korbar <tkorbar@redhat.com>
|
||||
Date: Tue, 21 Aug 2018 14:38:13 +0200
|
||||
Subject: [PATCH 040/124] Fix pickle provider
|
||||
|
||||
- pickle.load and pickle.dump methods take as a argument
|
||||
a bytes-like object not a str, python 2.7 is overlooking this but
|
||||
python 3 is not
|
||||
---
|
||||
tuned/storage/pickle_provider.py | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/tuned/storage/pickle_provider.py b/tuned/storage/pickle_provider.py
|
||||
index 832a9f8..771704d 100644
|
||||
--- a/tuned/storage/pickle_provider.py
|
||||
+++ b/tuned/storage/pickle_provider.py
|
||||
@@ -31,14 +31,14 @@ class PickleProvider(interfaces.Provider):
|
||||
def save(self):
|
||||
try:
|
||||
log.debug("Saving %s" % str(self._data))
|
||||
- with open(self._path, "w") as f:
|
||||
+ with open(self._path, "wb") as f:
|
||||
pickle.dump(self._data, f)
|
||||
except (OSError, IOError) as e:
|
||||
log.error("Error saving storage file '%s': %s" % (self._path, e))
|
||||
|
||||
def load(self):
|
||||
try:
|
||||
- with open(self._path, "r") as f:
|
||||
+ with open(self._path, "rb") as f:
|
||||
self._data = pickle.load(f)
|
||||
except (OSError, IOError) as e:
|
||||
log.debug("Error loading storage file '%s': %s" % (self._path, e))
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -0,0 +1,35 @@
|
||||
From 2cc3d747986837d7e7957f5a4baede2dd691348a Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= <olysonek@redhat.com>
|
||||
Date: Thu, 24 Jan 2019 16:28:24 +0100
|
||||
Subject: [PATCH 070/124] plugin_disk: Fix checking the 'removable' attribute
|
||||
on python3
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The 'removable' attribute is a bytestring, so it will never be equal to
|
||||
"0" in python3. Check equality with b"0" instead.
|
||||
|
||||
The patch was originally written by Tomáš Korbař.
|
||||
|
||||
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
|
||||
---
|
||||
tuned/plugins/plugin_disk.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tuned/plugins/plugin_disk.py b/tuned/plugins/plugin_disk.py
|
||||
index 1de1257..65504d8 100644
|
||||
--- a/tuned/plugins/plugin_disk.py
|
||||
+++ b/tuned/plugins/plugin_disk.py
|
||||
@@ -39,7 +39,7 @@ class DiskPlugin(hotplug.Plugin):
|
||||
@classmethod
|
||||
def _device_is_supported(cls, device):
|
||||
return device.device_type == "disk" and \
|
||||
- device.attributes.get("removable", None) == "0" and \
|
||||
+ device.attributes.get("removable", None) == b"0" and \
|
||||
(device.parent is None or \
|
||||
device.parent.subsystem in ["scsi", "virtio", "xen"])
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
29
0074-fix-disk-plugin-plugout-problem.patch
Normal file
29
0074-fix-disk-plugin-plugout-problem.patch
Normal file
@ -0,0 +1,29 @@
|
||||
From a2219675f29fae94540868bf63f36f62c61b92c7 Mon Sep 17 00:00:00 2001
|
||||
From: Tomas Korbar <tkorbar@redhat.com>
|
||||
Date: Wed, 12 Dec 2018 14:48:09 +0100
|
||||
Subject: [PATCH 074/124] fix disk plugin/plugout problem
|
||||
|
||||
when udev sends remove event it does not send any device
|
||||
attributes with it so _device_is_supported check must be omitted
|
||||
|
||||
Resolves: rhbz#1595156
|
||||
---
|
||||
tuned/plugins/plugin_disk.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tuned/plugins/plugin_disk.py b/tuned/plugins/plugin_disk.py
|
||||
index 1de1257..56e56f4 100644
|
||||
--- a/tuned/plugins/plugin_disk.py
|
||||
+++ b/tuned/plugins/plugin_disk.py
|
||||
@@ -50,7 +50,7 @@ class DiskPlugin(hotplug.Plugin):
|
||||
self._hardware_inventory.unsubscribe(self)
|
||||
|
||||
def _hardware_events_callback(self, event, device):
|
||||
- if self._device_is_supported(device):
|
||||
+ if self._device_is_supported(device) or event == "remove":
|
||||
super(DiskPlugin, self)._hardware_events_callback(event, device)
|
||||
|
||||
def _added_device_apply_tuning(self, instance, device_name):
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
60
0099-Fix-checking-for-None-values.patch
Normal file
60
0099-Fix-checking-for-None-values.patch
Normal file
@ -0,0 +1,60 @@
|
||||
From 9e6913231d307590fd6a9bc024be549aaa2d8c5e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= <olysonek@redhat.com>
|
||||
Date: Tue, 5 Mar 2019 10:31:42 +0100
|
||||
Subject: [PATCH 099/124] Fix checking for None values
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
In python, 'is None' should be used instead of '== None' to check if
|
||||
something is None.
|
||||
|
||||
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
|
||||
---
|
||||
experiments/kwin-stop/xlib-example.py | 2 +-
|
||||
tuned/plugins/plugin_systemd.py | 2 +-
|
||||
tuned/profiles/merger.py | 2 +-
|
||||
3 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/experiments/kwin-stop/xlib-example.py b/experiments/kwin-stop/xlib-example.py
|
||||
index b8477a5..a0d6206 100644
|
||||
--- a/experiments/kwin-stop/xlib-example.py
|
||||
+++ b/experiments/kwin-stop/xlib-example.py
|
||||
@@ -32,7 +32,7 @@ def loop():
|
||||
root = dpy.screen(num).root
|
||||
for win in root.get_full_property(dpy.get_atom('_NET_CLIENT_LIST'), 0).value.tolist():
|
||||
window = dpy.create_resource_object('window', win)
|
||||
- if window.get_full_property(dpy.get_atom('_NET_WM_STATE'), Xatom.WINDOW) == None:
|
||||
+ if window.get_full_property(dpy.get_atom('_NET_WM_STATE'), Xatom.WINDOW) is None:
|
||||
continue
|
||||
if dpy.get_atom("_NET_WM_STATE_HIDDEN") in window.get_full_property(dpy.get_atom('_NET_WM_STATE'), 0).value.tolist():
|
||||
if not win in hidden:
|
||||
diff --git a/tuned/plugins/plugin_systemd.py b/tuned/plugins/plugin_systemd.py
|
||||
index f6857c5..8f6bbc8 100644
|
||||
--- a/tuned/plugins/plugin_systemd.py
|
||||
+++ b/tuned/plugins/plugin_systemd.py
|
||||
@@ -61,7 +61,7 @@ class SystemdPlugin(base.Plugin):
|
||||
|
||||
def _read_systemd_system_conf(self):
|
||||
systemd_system_conf = self._cmd.read_file(consts.SYSTEMD_SYSTEM_CONF_FILE, err_ret = None)
|
||||
- if systemd_system_conf == None:
|
||||
+ if systemd_system_conf is None:
|
||||
log.error("error reading systemd configuration file")
|
||||
return None
|
||||
return systemd_system_conf
|
||||
diff --git a/tuned/profiles/merger.py b/tuned/profiles/merger.py
|
||||
index 7a3e05c..2364543 100644
|
||||
--- a/tuned/profiles/merger.py
|
||||
+++ b/tuned/profiles/merger.py
|
||||
@@ -33,7 +33,7 @@ class Merger(object):
|
||||
profile_a.units[unit_name].type = unit.type
|
||||
profile_a.units[unit_name].enabled = unit.enabled
|
||||
profile_a.units[unit_name].devices = unit.devices
|
||||
- if unit.devices_udev_regex != None:
|
||||
+ if unit.devices_udev_regex is not None:
|
||||
profile_a.units[unit_name].devices_udev_regex = unit.devices_udev_regex
|
||||
if unit.script_pre is not None:
|
||||
profile_a.units[unit_name].script_pre = unit.script_pre
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
11
bugfix-tuned-2.8.0-restart-after-kill-dbus.patch
Normal file
11
bugfix-tuned-2.8.0-restart-after-kill-dbus.patch
Normal file
@ -0,0 +1,11 @@
|
||||
diff -Nur tuned-2.8.0.old/tuned.service tuned-2.8.0/tuned.service
|
||||
--- tuned-2.8.0.old/tuned.service 2018-07-26 05:41:57.266000000 -0400
|
||||
+++ tuned-2.8.0/tuned.service 2018-07-26 05:43:22.491000000 -0400
|
||||
@@ -9,6 +9,7 @@
|
||||
PIDFile=/run/tuned/tuned.pid
|
||||
BusName=com.redhat.tuned
|
||||
ExecStart=/usr/sbin/tuned -l -P
|
||||
+Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
18
tuned-2.10.0-makefile-full-python-path.patch
Normal file
18
tuned-2.10.0-makefile-full-python-path.patch
Normal file
@ -0,0 +1,18 @@
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -30,12 +30,12 @@ VERSIONED_NAME = $(NAME)-$(VERSION)$(GIT_PSUFFIX)
|
||||
SYSCONFDIR = /etc
|
||||
DATADIR = /usr/share
|
||||
DOCDIR = $(DATADIR)/doc/$(NAME)
|
||||
-PYTHON = python3
|
||||
+PYTHON = /usr/bin/python3
|
||||
PYLINT = pylint-3
|
||||
ifeq ($(PYTHON),python2)
|
||||
PYLINT = pylint-2
|
||||
endif
|
||||
-SHEBANG_REWRITE_REGEX= '1s/^(\#!\/usr\/bin\/)\<python\>/\1$(PYTHON)/'
|
||||
+SHEBANG_REWRITE_REGEX= '1s|^\#!/usr/bin/\<python\>|\#!$(PYTHON)|'
|
||||
PYTHON_SITELIB = $(shell $(PYTHON) -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib());')
|
||||
ifeq ($(PYTHON_SITELIB),)
|
||||
$(error Failed to determine python library directory)
|
||||
|
||||
60
tuned-2.10.0-python-3.7-fix.patch
Normal file
60
tuned-2.10.0-python-3.7-fix.patch
Normal file
@ -0,0 +1,60 @@
|
||||
From f19b7c5713acb76a200811f6531acf2791505cac Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= <jskarvad@redhat.com>
|
||||
Date: Wed, 4 Jul 2018 23:27:38 +0200
|
||||
Subject: [PATCH] Fixed compatibility with python-3.7
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
In python-3.7 async is a keyword, so it cannot be redefined.
|
||||
|
||||
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
|
||||
---
|
||||
tuned-adm.py | 4 ++--
|
||||
tuned/admin/admin.py | 4 ++--
|
||||
2 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/tuned-adm.py b/tuned-adm.py
|
||||
index ea85c54..1b9623d 100755
|
||||
--- a/tuned-adm.py
|
||||
+++ b/tuned-adm.py
|
||||
@@ -98,7 +98,7 @@ if __name__ == "__main__":
|
||||
|
||||
options = vars(args)
|
||||
debug = options.pop("debug")
|
||||
- async = options.pop("async")
|
||||
+ asynco = options.pop("async")
|
||||
timeout = options.pop("timeout")
|
||||
action_name = options.pop("action")
|
||||
log_level = options.pop("loglevel")
|
||||
@@ -107,7 +107,7 @@ if __name__ == "__main__":
|
||||
dbus = config.get_bool(consts.CFG_DAEMON, consts.CFG_DEF_DAEMON)
|
||||
|
||||
try:
|
||||
- admin = tuned.admin.Admin(dbus, debug, async, timeout, log_level)
|
||||
+ admin = tuned.admin.Admin(dbus, debug, asynco, timeout, log_level)
|
||||
|
||||
result = admin.action(action_name, **options)
|
||||
except:
|
||||
diff --git a/tuned/admin/admin.py b/tuned/admin/admin.py
|
||||
index 728af32..3f84413 100644
|
||||
--- a/tuned/admin/admin.py
|
||||
+++ b/tuned/admin/admin.py
|
||||
@@ -14,12 +14,12 @@ import threading
|
||||
import logging
|
||||
|
||||
class Admin(object):
|
||||
- def __init__(self, dbus = True, debug = False, async = False,
|
||||
+ def __init__(self, dbus = True, debug = False, asynco = False,
|
||||
timeout = consts.ADMIN_TIMEOUT,
|
||||
log_level = logging.ERROR):
|
||||
self._dbus = dbus
|
||||
self._debug = debug
|
||||
- self._async = async
|
||||
+ self._async = asynco
|
||||
self._timeout = timeout
|
||||
self._cmd = commands(debug)
|
||||
self._profiles_locator = profiles_locator(consts.LOAD_DIRECTORIES)
|
||||
--
|
||||
2.14.4
|
||||
|
||||
BIN
tuned-2.10.0.tar.gz
Normal file
BIN
tuned-2.10.0.tar.gz
Normal file
Binary file not shown.
318
tuned.spec
Normal file
318
tuned.spec
Normal file
@ -0,0 +1,318 @@
|
||||
Summary: A system tuning service for Linux
|
||||
Name: tuned
|
||||
Version: 2.10.0
|
||||
Release: 7
|
||||
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/
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
%bcond_without python3
|
||||
%global _py python3
|
||||
%global docdir %{_docdir}/%{name}
|
||||
|
||||
Requires(post): systemd, virt-what
|
||||
Requires(preun): systemd
|
||||
Requires(postun): systemd
|
||||
BuildRequires: %{_py}, %{_py}-devel
|
||||
BuildRequires: git, systemd, desktop-file-utils
|
||||
|
||||
Requires: python3-dbus, util-linux, systemtap
|
||||
Requires: virt-what, gawk, dbus, ethtool
|
||||
Requires: polkit, powertop, hdparm, python3-gobject-base
|
||||
|
||||
Requires: %{_py}-configobj, %{_py}-pyudev, %{_py}-linux-procfs
|
||||
Requires: %{_py}-schedutils, %{_py}-decorator, %{_py}-perf
|
||||
Recommends:kernel-tools
|
||||
Recommends:tuned-profiles-nfv-host-bin
|
||||
|
||||
Patch0: tuned-2.10.0-python-3.7-fix.patch
|
||||
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
|
||||
|
||||
Patch9000: bugfix-tuned-2.8.0-restart-after-kill-dbus.patch
|
||||
Patch9001: 0005-realtime-virtual-host-pin-only-the-vcpu-thread-to-is.patch
|
||||
Patch9002: 0029-Fix-TypeError.patch
|
||||
Patch9003: 0040-Fix-pickle-provider.patch
|
||||
Patch9004: 0070-plugin_disk-Fix-checking-the-removable-attribute-on-.patch
|
||||
Patch9005: 0074-fix-disk-plugin-plugout-problem.patch
|
||||
Patch9006: 0099-Fix-checking-for-None-values.patch
|
||||
|
||||
|
||||
Provides: tuned-gtk
|
||||
Provides: tuned-utils
|
||||
Provides: tuned-profiles-sap
|
||||
Provides: tuned-profiles-mssql
|
||||
Provides: tuned-profiles-oracle
|
||||
Provides: tuned-profiles-sap-hana
|
||||
Provides: tuned-profiles-atomic
|
||||
Provides: tuned-profiles-nfv
|
||||
Provides: tuned-profiles-cpu-partitioning
|
||||
Provides: tuned-profiles-compat
|
||||
Provides: tuned-utils-systemtap
|
||||
|
||||
Obsoletes: tuned-gtk
|
||||
Obsoletes: tuned-utils
|
||||
Obsoletes: tuned-profiles-sap
|
||||
Obsoletes: tuned-profiles-mssql
|
||||
Obsoletes: tuned-profiles-oracle
|
||||
Obsoletes: tuned-profiles-sap-hana
|
||||
Obsoletes: tuned-profiles-atomic
|
||||
Obsoletes: tuned-profiles-nfv
|
||||
Obsoletes: tuned-profiles-cpu-partitioning
|
||||
Obsoletes: tuned-profiles-compat
|
||||
Obsoletes: tuned-utils-systemtap
|
||||
|
||||
%description
|
||||
Tuned is a daemon that uses udev to monitor connected devices and
|
||||
statically and dynamically tunes system settings according to a
|
||||
selected profile. It is distributed with a number of predefined
|
||||
profiles for common use cases like high throughput, low latency,
|
||||
or powersave, and allows you to further alter the rules defined
|
||||
for each profile and customize how to tune a particular device.
|
||||
To revert all changes made to the system settings by a certain
|
||||
profile, you can either switch to another profile or deactivate
|
||||
the tuned daemon.
|
||||
|
||||
gtk
|
||||
gtk GTK GUI that can alter the rules defined for each profile and
|
||||
customize how to tune a particular device.
|
||||
|
||||
profiles-mssql
|
||||
Description of profile provided for the MS SQL Server. This
|
||||
profileis provided for the MS SQL Server. It's based on the
|
||||
throughput-performance profile.
|
||||
|
||||
utils-systemtap
|
||||
The package is used to monitor system status by some systemtap scripts.
|
||||
|
||||
utils
|
||||
The command line utilities for tuned
|
||||
|
||||
profiles-sap
|
||||
Description of profiles provided for the SAP NetWeaver. These profiles
|
||||
provides performance optimizations for the SAP NetWeaver applications.
|
||||
|
||||
profiles-oracle
|
||||
Description of profile provided for Oracle.
|
||||
|
||||
profiles-realtime
|
||||
Description of profiles provided for the realtime.
|
||||
|
||||
profiles-atomic
|
||||
Description of profiles provided for the Project Atomic.These
|
||||
profiles are provided for the Project Atomic. They provides
|
||||
performance optimizations for the Atomic hosts (bare metal) and
|
||||
virtual guests.
|
||||
|
||||
profiles-sap-hana
|
||||
An in-memory, highly scalable database that is
|
||||
particularly well suited to analytics.
|
||||
|
||||
profiles-nfv-guest
|
||||
Additional tuned profile(s) targeted to Network Function Virtualization (NFV) guest.
|
||||
|
||||
profiles-nfv-host
|
||||
Additional tuned profile(s) targeted to Network Function Virtualization (NFV) host.
|
||||
|
||||
profiles-nfv
|
||||
Additional tuned profile(s) targeted to Network Function Virtualization (NFV).
|
||||
|
||||
profiles-cpu-partitioning
|
||||
Additional tuned profile(s) optimized for CPU partitioning.
|
||||
|
||||
profiles-compat
|
||||
Additional tuned profiles mainly for backward compatibility with tuned 1.0.
|
||||
It can be also used to fine tune your system for specific scenarios.
|
||||
|
||||
%package profiles-devel
|
||||
Summary: Additional tuned profile(s) to realtime, NFV guest and NFV host.
|
||||
Requires: %{name} = %{version}
|
||||
Requires: tuna
|
||||
Recommends: tuned-profiles-nfv-host-bin
|
||||
|
||||
|
||||
Provides: tuned-profiles-realtime
|
||||
Provides: tuned-profiles-nfv-guest
|
||||
Provides: tuned-profiles-nfv-host
|
||||
|
||||
Obsoletes: tuned-profiles-realtime
|
||||
Obsoletes: tuned-profiles-nfv-guest
|
||||
Obsoletes: tuned-profiles-nfv-host
|
||||
|
||||
%description profiles-devel
|
||||
Man pages and other related documents for %{name}
|
||||
|
||||
%package help
|
||||
Summary: Documents for %{name}
|
||||
Requires: man, info
|
||||
|
||||
%description help
|
||||
Man pages and other related documents for %{name}
|
||||
|
||||
|
||||
%prep
|
||||
%autosetup -n %{name}-%{version} -p1 -Sgit
|
||||
|
||||
%build
|
||||
|
||||
%install
|
||||
%make_install DOCDIR=%{docdir}
|
||||
PYTHON=%{__python3}
|
||||
sed -i 's/\(dynamic_tuning[ \t]*=[ \t]*\).*/\10/' %{buildroot}%{_sysconfdir}/%{name}/tuned-main.conf
|
||||
|
||||
mkdir -p %{buildroot}%{_datadir}/%{name}/grub2
|
||||
mv %{buildroot}%{_sysconfdir}/grub.d/00_tuned %{buildroot}%{_datadir}/%{name}/grub2/00_tuned
|
||||
rmdir %{buildroot}%{_sysconfdir}/grub.d
|
||||
|
||||
mkdir -p %{buildroot}%{_var}/lib/%{name}
|
||||
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/modprobe.d
|
||||
touch %{buildroot}%{_sysconfdir}/modprobe.d/kvm.rt.tuned.conf
|
||||
|
||||
desktop-file-validate %{buildroot}%{_datadir}/applications/tuned-gui.desktop
|
||||
|
||||
%post
|
||||
if [ $1 -eq 1 ] ; then
|
||||
systemctl preset %{name}.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
sed -i 's|.*/\([^/]\+\)/[^\.]\+\.conf|\1|' %{_sysconfdir}/%{name}/active_profile
|
||||
|
||||
if [ -r "%{_sysconfdir}/default/grub" ]; then
|
||||
sed -i 's/GRUB_CMDLINE_LINUX="$GRUB_CMDLINE_LINUX \\$tuned_params"/GRUB_CMDLINE_LINUX_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT \\$tuned_params"/' \
|
||||
%{_sysconfdir}/default/grub
|
||||
fi
|
||||
|
||||
%preun
|
||||
if [ $1 -eq 0 ] ; then
|
||||
systemctl --no-reload disable %{name}.service > /dev/null 2>&1 || :
|
||||
systemctl stop %{name}.service > /dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
|
||||
if [ "$1" == 0 ]; then
|
||||
rm -f %{_var}/lib/%{name}/*
|
||||
rm -f /run/%{name}/*
|
||||
fi
|
||||
|
||||
%postun
|
||||
systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
if [ $1 -ge 1 ] ; then
|
||||
systemctl try-restart %{name}.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
if [ "$1" == 0 ]; then
|
||||
rm -f %{_sysconfdir}/grub.d/00_tuned || :
|
||||
if [ -r "%{_sysconfdir}/default/grub" ]; then
|
||||
sed -i '/GRUB_CMDLINE_LINUX_DEFAULT="${GRUB_CMDLINE_LINUX_DEFAULT:+$GRUB_CMDLINE_LINUX_DEFAULT }\\$tuned_params"/d' %{_sysconfdir}/default/grub
|
||||
fi
|
||||
fi
|
||||
|
||||
%triggerun -- %{name} < 2.0-0
|
||||
/usr/sbin/service ktune stop &>/dev/null || :
|
||||
/usr/sbin/chkconfig --del ktune &>/dev/null || :
|
||||
|
||||
%posttrans
|
||||
if [ -d %{_sysconfdir}/grub.d ]; then
|
||||
cp -a %{_datadir}/%{name}/grub2/00_tuned %{_sysconfdir}/grub.d/00_tuned
|
||||
selinuxenabled &>/dev/null && \
|
||||
restorecon %{_sysconfdir}/grub.d/00_tuned &>/dev/null || :
|
||||
fi
|
||||
|
||||
%files
|
||||
%doc %{docdir}
|
||||
%doc %{docdir}/README.NFV
|
||||
%doc doc/README.utils
|
||||
%doc doc/README.scomes
|
||||
%doc COPYING
|
||||
%dir %{_datadir}/%{name}
|
||||
%dir %{_sysconfdir}/%{name}
|
||||
%dir %{_sysconfdir}/%{name}/recommend.d
|
||||
%dir %{_libexecdir}/%{name}
|
||||
%dir %{_localstatedir}/log/%{name}
|
||||
%dir %{_var}/lib/%{name}
|
||||
%dir /run/%{name}
|
||||
%{_datadir}/bash-completion/completions/%{name}-adm
|
||||
%{_datadir}/%{name}/grub2
|
||||
%{_datadir}/polkit-1/actions/com.redhat.%{name}.policy
|
||||
%{_datadir}/%{name}/ui
|
||||
%{_datadir}/polkit-1/actions/com.redhat.%{name}.gui.policy
|
||||
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
|
||||
%{_datadir}/applications/%{name}-gui.desktop
|
||||
%{_sbindir}/%{name}
|
||||
%{_sbindir}/%{name}-adm
|
||||
%{_sbindir}/%{name}-gui
|
||||
%{_sbindir}/varnetload
|
||||
%{_sbindir}/netdevstat
|
||||
%{_sbindir}/diskdevstat
|
||||
%{_sbindir}/scomes
|
||||
|
||||
%exclude %{_prefix}/lib/%{name}/realtime
|
||||
%exclude %{_prefix}/lib/%{name}/realtime-virtual-guest
|
||||
%exclude %{_prefix}/lib/%{name}/realtime-virtual-host
|
||||
%{_prefix}/lib/%{name}
|
||||
|
||||
%config(noreplace) %{_sysconfdir}/%{name}/cpu-partitioning-variables.conf
|
||||
%config(noreplace) %{_sysconfdir}/%{name}/sap-hana-vmware-variables.conf
|
||||
%config(noreplace) %{_sysconfdir}/%{name}/%{name}-main.conf
|
||||
%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}/active_profile
|
||||
%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}/profile_mode
|
||||
%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}/bootcmdline
|
||||
%ghost %{_sysconfdir}/modprobe.d/kvm.rt.%{name}.conf
|
||||
%{_bindir}/powertop2%{name}
|
||||
%{_libexecdir}/%{name}/defirqaffinity*
|
||||
%{_libexecdir}/%{name}/pmqos-static*
|
||||
%{python3_sitelib}/%{name}/gtk
|
||||
%{python3_sitelib}/%{name}
|
||||
%{_sysconfdir}/dbus-1/system.d/com.redhat.%{name}.conf
|
||||
%verify(not size mtime md5) %{_sysconfdir}/modprobe.d/%{name}.conf
|
||||
%{_tmpfilesdir}/%{name}.conf
|
||||
%{_unitdir}/%{name}.service
|
||||
|
||||
%files help
|
||||
%{_mandir}/man5/%{name}*
|
||||
%{_mandir}/man7/%{name}-profiles-mssql.7*
|
||||
%{_mandir}/man7/%{name}-profiles-sap-hana.7*
|
||||
%{_mandir}/man7/%{name}-profiles-sap.7*
|
||||
%{_mandir}/man7/%{name}-profiles-cpu-partitioning.7*
|
||||
%{_mandir}/man7/%{name}-profiles-oracle.7*
|
||||
%{_mandir}/man7/%{name}-profiles-atomic.7*
|
||||
%{_mandir}/man7/%{name}-profiles-compat.7*
|
||||
%{_mandir}/man7/%{name}-profiles.7*
|
||||
%{_mandir}/man8/%{name}*
|
||||
%{_mandir}/man8/varnetload.*
|
||||
%{_mandir}/man8/netdevstat.*
|
||||
%{_mandir}/man8/diskdevstat.*
|
||||
%{_mandir}/man8/scomes.*
|
||||
|
||||
%files profiles-devel
|
||||
%config(noreplace) %{_sysconfdir}/%{name}/realtime-variables.conf
|
||||
%{_prefix}/lib/%{name}/realtime
|
||||
%config(noreplace) %{_sysconfdir}/%{name}/realtime-virtual-guest-variables.conf
|
||||
%{_prefix}/lib/%{name}/realtime-virtual-guest
|
||||
%config(noreplace) %{_sysconfdir}/%{name}/realtime-virtual-host-variables.conf
|
||||
%{_prefix}/lib/%{name}/realtime-virtual-host
|
||||
%{_mandir}/man7/%{name}-profiles-realtime.7*
|
||||
%{_mandir}/man7/%{name}-profiles-nfv-guest.7*
|
||||
%{_mandir}/man7/%{name}-profiles-nfv-host.7*
|
||||
|
||||
%changelog
|
||||
* Sun Sep 7 2019 hejingxian<hejingxian@huawei.com> - 2.10.0-7
|
||||
- Type:other
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC: new package tuned-profiles-devel
|
||||
|
||||
* Wed Aug 28 2019 caomeng<caomeng5@huawei.com> - 2.10.0-6
|
||||
- Type:other
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:openeuler rewrite spec file
|
||||
|
||||
* Wed Aug 28 2019 caomeng<caomeng5@huawei.com> - 2.10.0-5
|
||||
- Package init
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user