new release
rebase tuned to latest upstream resolves: rhbz#1388454 cpu-partitioning: enabled timer migration resolves: rhbz#1408308 cpu-partitioning: disabled kvmclock sync and ple resolves: rhbz#1395855 spec: muted error if there is no selinux support resolves: rhbz#1404214 units: implemented instance priority resolves: rhbz#1246172 bootloader: added support for initrd overlays resolves: rhbz#1414098 cpu-partitioning: set CPUAffinity early in initrd image resolves: rhbz#1394965 cpu-partitioning: set workqueue affinity early resolves: rhbz#1395899 scsi_host: fixed probing of ALPM, missing ALPM logged as info resolves: rhbz#1416712 added new profile cpu-partitioning resolves: rhbz#1359956 bootloader: improved inheritance resolves: rhbz#1274464 units: mplemented udev-based regexp device matching resolves: rhbz#1251240 units: introduced pre_script, post_script resolves: rhbz#1246176 realtime-virtual-host: accommodate new ktimersoftd thread resolves: rhbz#1332563 defirqaffinity: fixed traceback due to syntax error resolves: rhbz#1369791 variables: support inheritance of variables resolves: rhbz#1433496 scheduler: added support for cores isolation resolves: rhbz#1403309 tuned-profiles-nfv splitted to host/guest and dropped unneeded dependency resolves: rhbz#1413111 desktop: fixed typo in profile summary resolves: rhbz#1421238 with systemd don't do full rollback on shutdown / reboot resolves: rhbz#1421286 builtin functions: added virt_check function and support to include resolves: rhbz#1426654 cpulist_present: explicitly sorted present CPUs resolves: rhbz#1432240 plugin_scheduler: fixed initialization resolves: rhbz#1433496 log errors when applying a profile fails resolves: rhbz#1434360 systemd: added support for older systemd CPUAffinity syntax resolves: rhbz#1441791 scheduler: added workarounds for low level exceptions from python-linux-procfs resolves: rhbz#1441792 bootloader: workaround for adding tuned_initrd to new kernels on restart resolves: rhbz#1441797
This commit is contained in:
parent
ff286f2f6f
commit
c34f2c76bb
2
sources
2
sources
@ -1 +1 @@
|
||||
a1d91a4ed1d3827f48d2184aa6f90585 tuned-2.7.1.tar.bz2
|
||||
SHA512 (tuned-2.8.0.tar.bz2) = 079d82485a45b6999435284f612723c8406cace0d5416db235dde904df0a37865def6f1150c6662688d79b4703ff1d6e90c9cc103f602ffbd52a77a9613a6aa3
|
||||
|
@ -1,73 +0,0 @@
|
||||
From 325dd17ee5f19a84fe97987404edc78d9904fa27 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= <jskarvad@redhat.com>
|
||||
Date: Wed, 21 Sep 2016 16:43:39 +0200
|
||||
Subject: [PATCH] tuned-gui: fixed pkexec to work from GNOME Shell
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
GNOME Shell doesn't seem to run applications through the shell or with some
|
||||
persistent parent, thus pkexec cannot be execed over the original tuned-gui
|
||||
process, because it wouldn't pass the pkexec getppid check. The check is
|
||||
there to ensure that the pkexec will not be owned by the init process.
|
||||
|
||||
This fix runs the pkexec as a child process. The minor drawback is that
|
||||
there will be two tuned-gui processes - the original process running under
|
||||
the user and the pkexeced process running under the root. The original
|
||||
process will effectively do nothing, it will just wait for the pkexeced
|
||||
process to exit.
|
||||
|
||||
Resolves: rhbz#1377896
|
||||
|
||||
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
|
||||
---
|
||||
tuned-gui.desktop | 2 +-
|
||||
tuned-gui.py | 12 +++++++++---
|
||||
2 files changed, 10 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/tuned-gui.desktop b/tuned-gui.desktop
|
||||
index f64869d..460e052 100644
|
||||
--- a/tuned-gui.desktop
|
||||
+++ b/tuned-gui.desktop
|
||||
@@ -3,7 +3,7 @@ Encoding=UTF-8
|
||||
Name=tuned-gui
|
||||
GenericName=tuned-gui
|
||||
Comment=GTK GUI that can control Tuned daemon and provides simple profile editor
|
||||
-Exec=pkexec /usr/sbin/tuned-gui
|
||||
+Exec=tuned-gui
|
||||
Icon=tuned
|
||||
Terminal=false
|
||||
Type=Application
|
||||
diff --git a/tuned-gui.py b/tuned-gui.py
|
||||
index 6cabfb5..3731b34 100755
|
||||
--- a/tuned-gui.py
|
||||
+++ b/tuned-gui.py
|
||||
@@ -49,6 +49,7 @@ import os
|
||||
import time
|
||||
import configobj
|
||||
|
||||
+import subprocess
|
||||
import tuned.logs
|
||||
import tuned.consts as consts
|
||||
import tuned.version as version
|
||||
@@ -1017,9 +1018,14 @@ if __name__ == '__main__':
|
||||
|
||||
if os.geteuid() != 0:
|
||||
try:
|
||||
- os.execvp('pkexec', ['pkexec ' + EXECNAME, EXECNAME] + sys.argv[1:])
|
||||
- except (IOError, OSError) as e:
|
||||
- pass
|
||||
+ # Explicitly disabling shell to be safe
|
||||
+ ec = subprocess.call(['pkexec', EXECNAME] + sys.argv[1:], shell = False)
|
||||
+ except (subprocess.CalledProcessError) as e:
|
||||
+ print >> sys.stderr, 'Error elevating privileges: %s' % e
|
||||
+ else:
|
||||
+ # If not pkexec error
|
||||
+ if ec not in [126, 127]:
|
||||
+ sys.exit(0)
|
||||
# In case of error elevating privileges
|
||||
print >> sys.stderr, 'Superuser permissions are required to run the daemon.'
|
||||
sys.exit(1)
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,28 +0,0 @@
|
||||
diff --git a/tuned/admin/admin.py b/tuned/admin/admin.py
|
||||
index ddf6d9e..d26f8b0 100644
|
||||
--- a/tuned/admin/admin.py
|
||||
+++ b/tuned/admin/admin.py
|
||||
@@ -115,7 +115,7 @@ class Admin(object):
|
||||
profile_name = None
|
||||
return profile_name
|
||||
|
||||
- def _print_profile_info(self, profile_info):
|
||||
+ def _print_profile_info(self, profile, profile_info):
|
||||
if profile_info[0] == True:
|
||||
print("Profile name:")
|
||||
print(profile_info[1])
|
||||
@@ -133,12 +133,12 @@ class Admin(object):
|
||||
def _action_dbus_profile_info(self, profile = ""):
|
||||
if profile == "":
|
||||
profile = self._dbus_get_active_profile()
|
||||
- return self._controller.exit(self._print_profile_info(self._controller.profile_info(profile)))
|
||||
+ return self._controller.exit(self._print_profile_info(profile, self._controller.profile_info(profile)))
|
||||
|
||||
def _action_profile_info(self, profile = ""):
|
||||
if profile == "":
|
||||
profile = self._get_active_profile()
|
||||
- return self._print_profile_info(self._profiles_locator.get_profile_attrs(profile, [consts.PROFILE_ATTR_SUMMARY, consts.PROFILE_ATTR_DESCRIPTION], ["", ""]))
|
||||
+ return self._print_profile_info(profile, self._profiles_locator.get_profile_attrs(profile, [consts.PROFILE_ATTR_SUMMARY, consts.PROFILE_ATTR_DESCRIPTION], ["", ""]))
|
||||
|
||||
def _print_profile_name(self, profile_name):
|
||||
if profile_name is None:
|
159
tuned.spec
159
tuned.spec
@ -1,10 +1,10 @@
|
||||
Summary: A dynamic adaptive system tuning daemon
|
||||
Name: tuned
|
||||
Version: 2.7.1
|
||||
Release: 4%{?dist}
|
||||
Version: 2.8.0
|
||||
Release: 1%{?dist}
|
||||
License: GPLv2+
|
||||
Source: https://fedorahosted.org/releases/t/u/tuned/tuned-%{version}.tar.bz2
|
||||
URL: https://fedorahosted.org/tuned/
|
||||
Source: https://jskarvad.fedorapeople.org/tuned/download/tuned-%{version}.tar.bz2
|
||||
URL: http://www.tuned-project.org/
|
||||
BuildArch: noarch
|
||||
BuildRequires: python, systemd, desktop-file-utils
|
||||
Requires(post): systemd, virt-what
|
||||
@ -12,9 +12,8 @@ Requires(preun): systemd
|
||||
Requires(postun): systemd
|
||||
Requires: python-decorator, dbus-python, pygobject3-base, python-pyudev
|
||||
Requires: virt-what, python-configobj, ethtool, gawk, kernel-tools, hdparm
|
||||
Requires: util-linux, python-perf, dbus, polkit
|
||||
Patch0: tuned-2.7.1-pkexec-fix.patch
|
||||
Patch1: tuned-2.7.1-profile_info-traceback-fix.patch
|
||||
Requires: util-linux, python-perf, dbus, polkit, python-linux-procfs
|
||||
Requires: python-schedutils
|
||||
|
||||
%description
|
||||
The tuned package contains a daemon that tunes system settings dynamically.
|
||||
@ -62,52 +61,79 @@ instead of fewer large ones).
|
||||
|
||||
%package profiles-sap
|
||||
Summary: Additional tuned profile(s) targeted to SAP NetWeaver loads
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: %{name} = %{version}
|
||||
|
||||
%description profiles-sap
|
||||
Additional tuned profile(s) targeted to SAP NetWeaver loads.
|
||||
|
||||
%package profiles-oracle
|
||||
Summary: Additional tuned profile(s) targeted to Oracle loads
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: %{name} = %{version}
|
||||
|
||||
%description profiles-oracle
|
||||
Additional tuned profile(s) targeted to Oracle loads.
|
||||
|
||||
%package profiles-sap-hana
|
||||
Summary: Additional tuned profile(s) targeted to SAP HANA loads
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: %{name} = %{version}
|
||||
|
||||
%description profiles-sap-hana
|
||||
Additional tuned profile(s) targeted to SAP HANA loads.
|
||||
|
||||
%package profiles-atomic
|
||||
Summary: Additional tuned profile(s) targeted to Atomic
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: %{name} = %{version}
|
||||
|
||||
%description profiles-atomic
|
||||
Additional tuned profile(s) targeted to Atomic host and guest.
|
||||
|
||||
%package profiles-realtime
|
||||
Summary: Additional tuned profile(s) targeted to realtime
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: %{name} = %{version}
|
||||
Requires: tuna
|
||||
|
||||
%description profiles-realtime
|
||||
Additional tuned profile(s) targeted to realtime.
|
||||
|
||||
%package profiles-nfv-guest
|
||||
Summary: Additional tuned profile(s) targeted to Network Function Virtualization (NFV) guest
|
||||
Requires: %{name} = %{version}
|
||||
Requires: %{name}-profiles-realtime = %{version}
|
||||
Requires: tuna
|
||||
|
||||
%description profiles-nfv-guest
|
||||
Additional tuned profile(s) targeted to Network Function Virtualization (NFV) guest.
|
||||
|
||||
%package profiles-nfv-host
|
||||
Summary: Additional tuned profile(s) targeted to Network Function Virtualization (NFV) host
|
||||
Requires: %{name} = %{version}
|
||||
Requires: %{name}-profiles-realtime = %{version}
|
||||
Requires: tuna, qemu-kvm-tools-rhev
|
||||
|
||||
%description profiles-nfv-host
|
||||
Additional tuned profile(s) targeted to Network Function Virtualization (NFV) host.
|
||||
|
||||
# this is kept for backward compatibility, it should be dropped for RHEL-8
|
||||
%package profiles-nfv
|
||||
Summary: Additional tuned profile(s) targeted to Network Function Virtualization (NFV)
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: %{name}-profiles-realtime = %{version}-%{release}
|
||||
Requires: tuna
|
||||
Requires: %{name} = %{version}
|
||||
Requires: %{name}-profiles-nfv-guest = %{version}
|
||||
Requires: %{name}-profiles-nfv-host = %{version}
|
||||
|
||||
%description profiles-nfv
|
||||
Additional tuned profile(s) targeted to Network Function Virtualization (NFV).
|
||||
|
||||
%package profiles-cpu-partitioning
|
||||
Summary: Additional tuned profile(s) optimized for CPU partitioning
|
||||
Requires: %{name} = %{version}
|
||||
Requires: tuna
|
||||
|
||||
%description profiles-cpu-partitioning
|
||||
Additional tuned profile(s) optimized for CPU partitioning.
|
||||
|
||||
%package profiles-compat
|
||||
Summary: Additional tuned profiles mainly for backward compatibility with tuned 1.0
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: %{name} = %{version}
|
||||
|
||||
%description profiles-compat
|
||||
Additional tuned profiles mainly for backward compatibility with tuned 1.0.
|
||||
@ -115,8 +141,7 @@ It can be also used to fine tune your system for specific scenarios.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
|
||||
|
||||
%build
|
||||
|
||||
@ -133,6 +158,9 @@ mkdir -p %{buildroot}%{_datadir}/tuned/grub2
|
||||
mv %{buildroot}%{_sysconfdir}/grub.d/00_tuned %{buildroot}%{_datadir}/tuned/grub2/00_tuned
|
||||
rmdir %{buildroot}%{_sysconfdir}/grub.d
|
||||
|
||||
# ghost for persistent storage
|
||||
mkdir -p %{buildroot}%{_var}/lib/tuned
|
||||
|
||||
# ghost for NFV
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/modprobe.d
|
||||
touch %{buildroot}%{_sysconfdir}/modprobe.d/kvm.rt.tuned.conf
|
||||
@ -155,6 +183,10 @@ fi
|
||||
|
||||
%preun
|
||||
%systemd_preun tuned.service
|
||||
if [ "$1" == 0 ]; then
|
||||
# clear persistent storage
|
||||
rm -f %{_var}/lib/tuned/*
|
||||
fi
|
||||
|
||||
|
||||
%postun
|
||||
@ -182,7 +214,8 @@ fi
|
||||
# and tuned is noarch package, thus the following hack is needed
|
||||
if [ -d %{_sysconfdir}/grub.d ]; then
|
||||
cp -a %{_datadir}/tuned/grub2/00_tuned %{_sysconfdir}/grub.d/00_tuned
|
||||
selinuxenabled && restorecon %{_sysconfdir}/grub.d/00_tuned || :
|
||||
selinuxenabled &>/dev/null && \
|
||||
restorecon %{_sysconfdir}/grub.d/00_tuned &>/dev/null || :
|
||||
fi
|
||||
|
||||
|
||||
@ -205,6 +238,7 @@ fi
|
||||
%defattr(-,root,root,-)
|
||||
%exclude %{docdir}/README.utils
|
||||
%exclude %{docdir}/README.scomes
|
||||
%exclude %{docdir}/README.NFV
|
||||
%doc %{docdir}
|
||||
%{_datadir}/bash-completion/completions/tuned-adm
|
||||
%exclude %{python_sitelib}/tuned/gtk
|
||||
@ -212,6 +246,9 @@ fi
|
||||
%{_sbindir}/tuned
|
||||
%{_sbindir}/tuned-adm
|
||||
%exclude %{_sysconfdir}/tuned/realtime-variables.conf
|
||||
%exclude %{_sysconfdir}/tuned/realtime-virtual-guest-variables.conf
|
||||
%exclude %{_sysconfdir}/tuned/realtime-virtual-host-variables.conf
|
||||
%exclude %{_sysconfdir}/tuned/cpu-partitioning-variables.conf
|
||||
%exclude %{_prefix}/lib/tuned/default
|
||||
%exclude %{_prefix}/lib/tuned/desktop-powersave
|
||||
%exclude %{_prefix}/lib/tuned/laptop-ac-powersave
|
||||
@ -228,9 +265,11 @@ fi
|
||||
%exclude %{_prefix}/lib/tuned/realtime
|
||||
%exclude %{_prefix}/lib/tuned/realtime-virtual-guest
|
||||
%exclude %{_prefix}/lib/tuned/realtime-virtual-host
|
||||
%exclude %{_prefix}/lib/tuned/cpu-partitioning
|
||||
%{_prefix}/lib/tuned
|
||||
%dir %{_sysconfdir}/tuned
|
||||
%dir %{_libexecdir}/tuned
|
||||
%{_libexecdir}/tuned/defirqaffinity*
|
||||
%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/tuned/active_profile
|
||||
%config(noreplace) %{_sysconfdir}/tuned/tuned-main.conf
|
||||
%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/tuned/bootcmdline
|
||||
@ -240,12 +279,14 @@ fi
|
||||
%{_unitdir}/tuned.service
|
||||
%dir %{_localstatedir}/log/tuned
|
||||
%dir /run/tuned
|
||||
%dir %{_var}/lib/tuned
|
||||
%{_mandir}/man5/tuned*
|
||||
%{_mandir}/man7/tuned-profiles.7*
|
||||
%{_mandir}/man8/tuned*
|
||||
%dir %{_datadir}/tuned
|
||||
%{_datadir}/tuned/grub2
|
||||
%{_datadir}/polkit-1/actions/com.redhat.tuned.policy
|
||||
%ghost %{_sysconfdir}/modprobe.d/kvm.rt.tuned.conf
|
||||
|
||||
%files gtk
|
||||
%defattr(-,root,root,-)
|
||||
@ -303,15 +344,27 @@ fi
|
||||
%{_prefix}/lib/tuned/realtime
|
||||
%{_mandir}/man7/tuned-profiles-realtime.7*
|
||||
|
||||
%files profiles-nfv
|
||||
%files profiles-nfv-guest
|
||||
%defattr(-,root,root,-)
|
||||
%config(noreplace) %{_sysconfdir}/tuned/realtime-virtual-guest-variables.conf
|
||||
%config(noreplace) %{_sysconfdir}/tuned/realtime-virtual-host-variables.conf
|
||||
%ghost %{_sysconfdir}/modprobe.d/kvm.rt.tuned.conf
|
||||
%{_prefix}/lib/tuned/realtime-virtual-guest
|
||||
%{_mandir}/man7/tuned-profiles-nfv-guest.7*
|
||||
|
||||
%files profiles-nfv-host
|
||||
%defattr(-,root,root,-)
|
||||
%config(noreplace) %{_sysconfdir}/tuned/realtime-virtual-host-variables.conf
|
||||
%{_prefix}/lib/tuned/realtime-virtual-host
|
||||
%{_libexecdir}/tuned/defirqaffinity*
|
||||
%{_mandir}/man7/tuned-profiles-nfv.7*
|
||||
%{_mandir}/man7/tuned-profiles-nfv-host.7*
|
||||
|
||||
%files profiles-nfv
|
||||
%defattr(-,root,root,-)
|
||||
%doc %{docdir}/README.NFV
|
||||
|
||||
%files profiles-cpu-partitioning
|
||||
%defattr(-,root,root,-)
|
||||
%config(noreplace) %{_sysconfdir}/tuned/cpu-partitioning-variables.conf
|
||||
%{_prefix}/lib/tuned/cpu-partitioning
|
||||
%{_mandir}/man7/tuned-profiles-cpu-partitioning.7*
|
||||
|
||||
%files profiles-compat
|
||||
%defattr(-,root,root,-)
|
||||
@ -325,6 +378,64 @@ fi
|
||||
%{_mandir}/man7/tuned-profiles-compat.7*
|
||||
|
||||
%changelog
|
||||
* Fri Apr 7 2017 Jaroslav Škarvada <jskarvad@redhat.com> - 2.8.0-1
|
||||
- new release
|
||||
- rebase tuned to latest upstream
|
||||
resolves: rhbz#1388454
|
||||
- cpu-partitioning: enabled timer migration
|
||||
resolves: rhbz#1408308
|
||||
- cpu-partitioning: disabled kvmclock sync and ple
|
||||
resolves: rhbz#1395855
|
||||
- spec: muted error if there is no selinux support
|
||||
resolves: rhbz#1404214
|
||||
- units: implemented instance priority
|
||||
resolves: rhbz#1246172
|
||||
- bootloader: added support for initrd overlays
|
||||
resolves: rhbz#1414098
|
||||
- cpu-partitioning: set CPUAffinity early in initrd image
|
||||
resolves: rhbz#1394965
|
||||
- cpu-partitioning: set workqueue affinity early
|
||||
resolves: rhbz#1395899
|
||||
- scsi_host: fixed probing of ALPM, missing ALPM logged as info
|
||||
resolves: rhbz#1416712
|
||||
- added new profile cpu-partitioning
|
||||
resolves: rhbz#1359956
|
||||
- bootloader: improved inheritance
|
||||
resolves: rhbz#1274464
|
||||
- units: mplemented udev-based regexp device matching
|
||||
resolves: rhbz#1251240
|
||||
- units: introduced pre_script, post_script
|
||||
resolves: rhbz#1246176
|
||||
- realtime-virtual-host: accommodate new ktimersoftd thread
|
||||
resolves: rhbz#1332563
|
||||
- defirqaffinity: fixed traceback due to syntax error
|
||||
resolves: rhbz#1369791
|
||||
- variables: support inheritance of variables
|
||||
resolves: rhbz#1433496
|
||||
- scheduler: added support for cores isolation
|
||||
resolves: rhbz#1403309
|
||||
- tuned-profiles-nfv splitted to host/guest and dropped unneeded dependency
|
||||
resolves: rhbz#1413111
|
||||
- desktop: fixed typo in profile summary
|
||||
resolves: rhbz#1421238
|
||||
- with systemd don't do full rollback on shutdown / reboot
|
||||
resolves: rhbz#1421286
|
||||
- builtin functions: added virt_check function and support to include
|
||||
resolves: rhbz#1426654
|
||||
- cpulist_present: explicitly sorted present CPUs
|
||||
resolves: rhbz#1432240
|
||||
- plugin_scheduler: fixed initialization
|
||||
resolves: rhbz#1433496
|
||||
- log errors when applying a profile fails
|
||||
resolves: rhbz#1434360
|
||||
- systemd: added support for older systemd CPUAffinity syntax
|
||||
resolves: rhbz#1441791
|
||||
- scheduler: added workarounds for low level exceptions from
|
||||
python-linux-procfs
|
||||
resolves: rhbz#1441792
|
||||
- bootloader: workaround for adding tuned_initrd to new kernels on restart
|
||||
resolves: rhbz#1441797
|
||||
|
||||
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.1-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user