From b54e7d33fb0e19892d355e9b70b10c56fdf2b100 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Mon, 6 Jul 2015 00:00:08 +0200 Subject: [PATCH] new-release resolves: rhbz#1155052 - add support for ethtool -C to tuned network plugin resolves: rhbz#1152539 - add support for ethtool -K to tuned network plugin resolves: rhbz#1152541 - add support for calculation of values for the kernel command line resolves: rhbz#1191595 - no error output if there is no hdparm installed resolves: rhbz#1191775 - do not run hdparm on hotplug events if there is no hdparm tuning resolves: rhbz#1193682 - add oracle tuned profile resolves: rhbz#1196298 - fix bash completions for tuned-adm resolves: rhbz#1207668 - add glob support to tuned sysfs plugin resolves: rhbz#1212831 - add tuned-adm verify subcommand resolves: rhbz#1212836 - do not install tuned kernel command line to rescue kernels resolves: rhbz#1223864 - add variables support resolves: rhbz#1225124 - add built-in support for unit conversion into tuned resolves: rhbz#1225135 - fix vm.max_map_count setting in sap-netweaver profile resolves: rhbz#1228562 - add tuned profile for RHEL-RT resolves: rhbz#1228801 - plugin_scheduler: added support for runtime tuning of processes resolves: rhbz#1148546 - add support for changing elevators on xvd* devices (Amazon EC2) resolves: rhbz#1170152 - add workaround to be run after systemd-sysctl resolves: rhbz#1189263 - do not change settings of transparent hugepages if set in kernel cmdline resolves: rhbz#1189868 - add tuned profiles for RHEL-NFV resolves: rhbz#1228803 - plugin_bootloader: apply $tuned_params to existing kernels resolves: rhbz#1233004 --- sources | 2 +- tuned-2.4.1-bashcomp-fix.patch | 100 --------------- tuned-2.4.1-configobj.patch | 36 ------ tuned-2.4.1-powertop2tuned-keyerror-fix.patch | 11 -- tuned.spec | 121 ++++++++++++++++-- 5 files changed, 109 insertions(+), 161 deletions(-) delete mode 100644 tuned-2.4.1-bashcomp-fix.patch delete mode 100644 tuned-2.4.1-configobj.patch delete mode 100644 tuned-2.4.1-powertop2tuned-keyerror-fix.patch diff --git a/sources b/sources index 538d133..04d0711 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -52f50aa2d53ca95206e5c19b8d978ac6 tuned-2.4.1.tar.bz2 +dde5feeeb2c07b35f0cf12a3fd07a07d tuned-2.5.0.tar.bz2 diff --git a/tuned-2.4.1-bashcomp-fix.patch b/tuned-2.4.1-bashcomp-fix.patch deleted file mode 100644 index 0cfc6d7..0000000 --- a/tuned-2.4.1-bashcomp-fix.patch +++ /dev/null @@ -1,100 +0,0 @@ -From 15dc0865f0b47b7f430c8c2c9fcc39b2169d0a07 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= -Date: Wed, 1 Apr 2015 18:11:19 +0200 -Subject: [PATCH] Fixed bash completion -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Resolves: rhbz#1207668 - -Signed-off-by: Jaroslav Škarvada ---- -diff --git a/Makefile b/Makefile -index abda771..792ec05 100644 ---- a/Makefile -+++ b/Makefile -@@ -9,7 +9,7 @@ DESTDIR = / - DOCDIR = /usr/share/doc/$(NAME) - PYTHON_SITELIB = /usr/lib/python2.7/site-packages - TUNED_PROFILESDIR = /usr/lib/tuned --BASH_COMPLETIONS = /usr/share/bash-completion/completions/ -+BASH_COMPLETIONS = /usr/share/bash-completion/completions - - archive: clean - mkdir -p $(VERSIONED_NAME) -@@ -17,8 +17,9 @@ archive: clean - cp AUTHORS COPYING INSTALL README $(VERSIONED_NAME) - - cp tuned.py tuned.spec tuned.service tuned.tmpfiles Makefile tuned-adm.py \ -- tuned.bash dbus.conf recommend.conf tuned-main.conf 00_tuned bootcmdline \ -- org.tuned.gui.policy tuned-gui.py tuned-gui.glade $(VERSIONED_NAME) -+ tuned-adm.bash dbus.conf recommend.conf tuned-main.conf 00_tuned \ -+ bootcmdline org.tuned.gui.policy tuned-gui.py tuned-gui.glade \ -+ $(VERSIONED_NAME) - cp -a doc experiments libexec man profiles systemtap tuned $(VERSIONED_NAME) - - tar cjf $(VERSIONED_NAME).tar.bz2 $(VERSIONED_NAME) -@@ -62,8 +63,8 @@ install: - cp -a profiles/* $(DESTDIR)$(TUNED_PROFILESDIR)/ - install -pm 0644 recommend.conf $(DESTDIR)$(TUNED_PROFILESDIR)/recommend.conf - -- # Install bash completion -- install -Dpm 0644 tuned.bash $(DESTDIR)$(BASH_COMPLETIONS)/tuned/tuned.bash -+ # bash completion -+ install -Dpm 0644 tuned-adm.bash $(DESTDIR)$(BASH_COMPLETIONS)/tuned-adm - - # log dir - mkdir -p $(DESTDIR)/var/log/tuned -diff --git a/tuned-adm.bash b/tuned-adm.bash -new file mode 100644 -index 0000000..9fc2780 ---- /dev/null -+++ b/tuned-adm.bash -@@ -0,0 +1,19 @@ -+# bash completion for tuned-adm -+ -+_tuned_adm() -+{ -+ local commands="active list off profile recommend" -+ local cur prev words cword -+ _init_completion || return -+ -+ if [[ "$cword" -eq 1 ]]; then -+ COMPREPLY=( $(compgen -W "$commands" -- "$cur" ) ) -+ elif [[ "$cword" -eq 2 && "$prev" == "profile" ]]; then -+ COMPREPLY=( $(compgen -W "$(command find /usr/lib/tuned /etc/tuned -mindepth 1 -maxdepth 1 -type d -printf "%f\n")" -- "$cur" ) ) -+ else -+ COMPREPLY=() -+ fi -+ -+ return 0 -+} && -+complete -F _tuned_adm tuned-adm -diff --git a/tuned.bash b/tuned.bash -deleted file mode 100644 -index 8603b8f..0000000 ---- a/tuned.bash -+++ /dev/null -@@ -1,19 +0,0 @@ --# bash completion for tuned-adm -- --_tuned_adm() --{ -- local commands="active list off profile recommend" -- local current="${COMP_WORDS[$COMP_CWORD]}" -- local previous="${COMP_WORDS[$COMP_CWORD-1]}" -- -- if [[ $COMP_CWORD -eq 1 ]]; then -- COMPREPLY=( $(compgen -W "$commands" -- "$current" ) ) -- elif [[ $COMP_CWORD -eq 2 && "$previous" == "profile" ]]; then -- COMPREPLY=( $(compgen -W "$(command find /usr/lib/tuned /etc/tuned -mindepth 1 -maxdepth 1 -type d -printf "%f\n")" -- "$current" ) ) -- else -- COMPREPLY=() -- fi -- -- return 0 --} && --complete -F _tuned_adm tuned-adm --- -2.1.0 diff --git a/tuned-2.4.1-configobj.patch b/tuned-2.4.1-configobj.patch deleted file mode 100644 index 978ef01..0000000 --- a/tuned-2.4.1-configobj.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff --git a/tuned/daemon/application.py b/tuned/daemon/application.py -index e4c9da3..4745adb 100644 ---- a/tuned/daemon/application.py -+++ b/tuned/daemon/application.py -@@ -1,6 +1,6 @@ - from tuned import storage, units, monitors, plugins, profiles, exports, hardware - from tuned.exceptions import TunedException --from configobj import ConfigObj -+from configobj import ConfigObj, ConfigObjError - from validate import Validator - import tuned.logs - import controller -diff --git a/tuned/gtk/gui_plugin_loader.py b/tuned/gtk/gui_plugin_loader.py -index bdef93a..a3d7a90 100644 ---- a/tuned/gtk/gui_plugin_loader.py -+++ b/tuned/gtk/gui_plugin_loader.py -@@ -136,7 +136,7 @@ class GuiPluginLoader(PluginLoader): - """ - - try: -- config = ConfigObj(file_name, -+ config = ConfigObj.ConfigObj(file_name, - configspec=global_config_spec, - raise_errors=True, file_error=True) - except IOError, e: -diff --git a/tuned/profiles/loader.py b/tuned/profiles/loader.py -index 70c1446..8183a04 100644 ---- a/tuned/profiles/loader.py -+++ b/tuned/profiles/loader.py -@@ -1,5 +1,5 @@ - import tuned.profiles.profile --from configobj import ConfigObj -+from configobj import ConfigObj, ConfigObjError - import os.path - import collections - import tuned.logs diff --git a/tuned-2.4.1-powertop2tuned-keyerror-fix.patch b/tuned-2.4.1-powertop2tuned-keyerror-fix.patch deleted file mode 100644 index d6f94a6..0000000 --- a/tuned-2.4.1-powertop2tuned-keyerror-fix.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/experiments/powertop2tuned.py 2014-10-15 09:15:23.000000000 -0400 -+++ b/experiments/powertop2tuned.py 2014-12-21 01:27:40.875480511 -0500 -@@ -83,7 +83,7 @@ - - def handle_starttag(self, tag, attrs): - self.lastStartTag = tag -- if self.lastStartTag == "div" and dict(attrs)["id"] == "tuning": -+ if self.lastStartTag == "div" and dict(attrs).get("id") == "tuning": - self.inProperTable = True - if self.inProperTable and tag == "td": - self.tdCounter += 1 diff --git a/tuned.spec b/tuned.spec index 4ac0543..449330a 100644 --- a/tuned.spec +++ b/tuned.spec @@ -1,7 +1,7 @@ Summary: A dynamic adaptive system tuning daemon Name: tuned -Version: 2.4.1 -Release: 6%{?dist} +Version: 2.5.0 +Release: 1%{?dist} License: GPLv2+ Source: https://fedorahosted.org/releases/t/u/tuned/tuned-%{version}.tar.bz2 URL: https://fedorahosted.org/tuned/ @@ -12,10 +12,7 @@ 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 -Patch0: tuned-2.4.1-powertop2tuned-keyerror-fix.patch -Patch1: tuned-2.4.1-bashcomp-fix.patch -Patch2: tuned-2.4.1-configobj.patch +Requires: util-linux, python-perf %description The tuned package contains a daemon that tunes system settings dynamically. @@ -24,6 +21,12 @@ Based on that information components will then be put into lower or higher power saving modes to adapt to the current usage. Currently only ethernet network and ATA harddisk devices are implemented. +%if 0%{?rhel} <= 7 +%global docdir %{_docdir}/%{name}-%{version} +%else +%global docdir %{_docdir}/%{name} +%endif + %package gtk Summary: GTK GUI for tuned Requires: %{name} = %{version}-%{release} @@ -60,6 +63,13 @@ Requires: %{name} = %{version}-%{release} %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} + +%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} @@ -68,11 +78,25 @@ Requires: %{name} = %{version}-%{release} Additional tuned profile(s) targeted to SAP HANA loads. %package profiles-atomic -Summary: Additional tuned profiles targeted to Atomic +Summary: Additional tuned profile(s) targeted to Atomic Requires: %{name} = %{version}-%{release} %description profiles-atomic -Additional tuned profiles targeted to Atomic host and guest. +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} + +%description profiles-realtime +Additional tuned profile(s) targeted to realtime. + +%package profiles-nfv +Summary: Additional tuned profile(s) targeted to Network Function Virtualization (NFV) +Requires: %{name} = %{version}-%{release}, %{name}-profiles-realtime = %{version}-%{release} + +%description profiles-nfv +Additional tuned profile(s) targeted to Network Function Virtualization (NFV). %package profiles-compat Summary: Additional tuned profiles mainly for backward compatibility with tuned 1.0 @@ -84,16 +108,13 @@ It can be also used to fine tune your system for specific scenarios. %prep %setup -q -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 %build %install -make install DESTDIR=%{buildroot} +make install DESTDIR=%{buildroot} DOCDIR=%{docdir} %if 0%{?rhel} sed -i 's/\(dynamic_tuning[ \t]*=[ \t]*\).*/\10/' %{buildroot}%{_sysconfdir}/tuned/tuned-main.conf %endif @@ -110,6 +131,10 @@ rmdir %{buildroot}%{_sysconfdir}/grub.d # convert active_profile from full path to name (if needed) sed -i 's|.*/\([^/]\+\)/[^\.]\+\.conf|\1|' /etc/tuned/active_profile +# convert GRUB_CMDLINE_LINUX to GRUB_CMDLINE_LINUX_DEFAULT +sed -i 's/GRUB_CMDLINE_LINUX="$GRUB_CMDLINE_LINUX \\$tuned_params"/GRUB_CMDLINE_LINUX_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT \\$tuned_params"/' \ + %{_sysconfdir}/default/grub + %preun %systemd_preun tuned.service @@ -120,8 +145,10 @@ sed -i 's|.*/\([^/]\+\)/[^\.]\+\.conf|\1|' /etc/tuned/active_profile # conditional support for grub2, grub2 is not available on all architectures # and tuned is noarch package, thus the following hack is needed -if [ "$1" == "0" ]; then +if [ "$1" == 0 ]; then rm -f %{_sysconfdir}/grub.d/00_tuned || : +# unpatch /etc/default/grub + sed -i '/GRUB_CMDLINE_LINUX_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT \\$tuned_params"/d' %{_sysconfdir}/default/grub fi @@ -150,6 +177,7 @@ fi %{python_sitelib}/tuned %{_sbindir}/tuned %{_sbindir}/tuned-adm +%exclude %{_sysconfdir}/tuned/realtime-variables.conf %exclude %{_prefix}/lib/tuned/default %exclude %{_prefix}/lib/tuned/desktop-powersave %exclude %{_prefix}/lib/tuned/laptop-ac-powersave @@ -160,10 +188,13 @@ fi %exclude %{_prefix}/lib/tuned/sap-netweaver %exclude %{_prefix}/lib/tuned/sap-hana %exclude %{_prefix}/lib/tuned/sap-hana-vmware +%exclude %{_prefix}/lib/tuned/oracle %exclude %{_prefix}/lib/tuned/atomic-host %exclude %{_prefix}/lib/tuned/atomic-guest +%exclude %{_prefix}/lib/tuned/realtime %{_prefix}/lib/tuned %dir %{_sysconfdir}/tuned +%dir %{_libexecdir}/tuned %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 @@ -215,12 +246,32 @@ fi %{_prefix}/lib/tuned/sap-hana-vmware %{_mandir}/man7/tuned-profiles-sap-hana.7* +%files profiles-oracle +%defattr(-,root,root,-) +%{_prefix}/lib/tuned/oracle +%{_mandir}/man7/tuned-profiles-oracle.7* + %files profiles-atomic %defattr(-,root,root,-) %{_prefix}/lib/tuned/atomic-host %{_prefix}/lib/tuned/atomic-guest %{_mandir}/man7/tuned-profiles-atomic.7* +%files profiles-realtime +%defattr(-,root,root,-) +%config(noreplace) %{_sysconfdir}/tuned/realtime-variables.conf +%{_prefix}/lib/tuned/realtime +%{_mandir}/man7/tuned-profiles-realtime.7* + +%files profiles-nfv +%defattr(-,root,root,-) +%config(noreplace) %{_sysconfdir}/tuned/realtime-virtual-guest-variables.conf +%config(noreplace) %{_sysconfdir}/tuned/realtime-virtual-host-variables.conf +%{_prefix}/lib/tuned/realtime-virtual-guest +%{_prefix}/lib/tuned/realtime-virtual-host +%{_libexecdir}/tuned/defirqaffinity* +%{_mandir}/man7/tuned-profiles-nfv.7* + %files profiles-compat %defattr(-,root,root,-) %{_prefix}/lib/tuned/default @@ -233,6 +284,50 @@ fi %{_mandir}/man7/tuned-profiles-compat.7* %changelog +* Sun Jul 5 2015 Jaroslav Škarvada - 2.5.0-1 +- new-release + resolves: rhbz#1155052 + - add support for ethtool -C to tuned network plugin + resolves: rhbz#1152539 + - add support for ethtool -K to tuned network plugin + resolves: rhbz#1152541 + - add support for calculation of values for the kernel command line + resolves: rhbz#1191595 + - no error output if there is no hdparm installed + resolves: rhbz#1191775 + - do not run hdparm on hotplug events if there is no hdparm tuning + resolves: rhbz#1193682 + - add oracle tuned profile + resolves: rhbz#1196298 + - fix bash completions for tuned-adm + resolves: rhbz#1207668 + - add glob support to tuned sysfs plugin + resolves: rhbz#1212831 + - add tuned-adm verify subcommand + resolves: rhbz#1212836 + - do not install tuned kernel command line to rescue kernels + resolves: rhbz#1223864 + - add variables support + resolves: rhbz#1225124 + - add built-in support for unit conversion into tuned + resolves: rhbz#1225135 + - fix vm.max_map_count setting in sap-netweaver profile + resolves: rhbz#1228562 + - add tuned profile for RHEL-RT + resolves: rhbz#1228801 + - plugin_scheduler: added support for runtime tuning of processes + resolves: rhbz#1148546 + - add support for changing elevators on xvd* devices (Amazon EC2) + resolves: rhbz#1170152 + - add workaround to be run after systemd-sysctl + resolves: rhbz#1189263 + - do not change settings of transparent hugepages if set in kernel cmdline + resolves: rhbz#1189868 + - add tuned profiles for RHEL-NFV + resolves: rhbz#1228803 + - plugin_bootloader: apply $tuned_params to existing kernels + resolves: rhbz#1233004 + * Fri Jun 19 2015 Fedora Release Engineering - 2.4.1-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild