Hello community,

here is the log from the commit of package tuned for openSUSE:Factory checked 
in at 2014-10-18 09:09:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/tuned (Old)
 and      /work/SRC/openSUSE:Factory/.tuned.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "tuned"

Changes:
--------
--- /work/SRC/openSUSE:Factory/tuned/tuned.changes      2014-10-14 
07:10:50.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.tuned.new/tuned.changes 2014-10-18 
09:10:17.000000000 +0200
@@ -1,0 +2,12 @@
+Fri Oct 17 12:45:21 UTC 2014 - [email protected]
+
+- Update to version 2.4.1
+  + plugin_disk: set_spindown and set_APM made independent (rhbz#976725)
+  + plugin_bootloader: added check for grub2 (rhbz#1150047)
+  + tuned-adm: fixed traceback on "tuned-adm list" (rhbz#1149162)
+  + plugin_bootloader: 00_tuned do not return error if there is no cmdline 
(rhbz#1151768, bsc#901180)
+  + fixed polkit configuration
+
+- Remove tuned-2.4.0-polkit-tuned-gui-path.patch
+
+-------------------------------------------------------------------

Old:
----
  tuned-2.4.0-polkit-tuned-gui-path.patch
  tuned-2.4.0.tar.bz2

New:
----
  tuned-2.4.1.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ tuned.spec ++++++
--- /var/tmp/diff_new_pack.BLWCfX/_old  2014-10-18 09:10:18.000000000 +0200
+++ /var/tmp/diff_new_pack.BLWCfX/_new  2014-10-18 09:10:18.000000000 +0200
@@ -15,10 +15,11 @@
 # Please submit bugfixes or comments via http://bugs.opensuse.org/
 #
 
+
 %{!?_tmpfilesdir:%global _tmpfilesdir /usr/lib/tmpfiles.d}
 
 Name:           tuned
-Version:        2.4.0
+Version:        2.4.1
 Release:        0
 Summary:        A dynamic adaptive system tuning daemon
 License:        GPL-2.0+
@@ -30,9 +31,6 @@
 Patch0:         fix-allow-receive_sender-default.patch
 # PATCH-FIX-OPENSUSE tuned-2.4.0-use_cpupower_for_intel_perf_bias.patch --use 
cpupower instead of energy class
 Patch2:         tuned-2.4.0-use_cpupower_for_intel_perf_bias.patch
-# PATCH-FIX-UPSTREAM tuned-2.4.0-polkit-tuned-gui-path.patch --fix tuned-gui 
path 
-# in polkit policy rule file
-Patch3:         tuned-2.4.0-polkit-tuned-gui-path.patch
 BuildRequires:  python
 BuildRequires:  systemd
 # Do not own standard directories
@@ -62,8 +60,8 @@
 Summary:        Disk and net statistic monitoring systemtap scripts - GTK GUI
 Group:          System/Base
 Requires:       %{name} = %{version}
-Requires:       powertop
 Requires:       polkit
+Requires:       powertop
 
 %description gtk
 GTK GUI that can control tuned and provide simple profile editor.
@@ -119,7 +117,6 @@
 %setup -q
 %patch0 -p1
 %patch2 -p1
-%patch3 -p1
 
 %build
 #The tuned daemon is written in pure Python. Nothing requires to be built.

++++++ tuned-2.4.0.tar.bz2 -> tuned-2.4.1.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tuned-2.4.0/00_tuned new/tuned-2.4.1/00_tuned
--- old/tuned-2.4.0/00_tuned    2014-10-01 18:47:55.000000000 +0200
+++ new/tuned-2.4.1/00_tuned    2014-10-17 00:58:53.000000000 +0200
@@ -25,5 +25,4 @@
 
 . $tuned_bootcmdline_file
 
-[ "$TUNED_BOOT_CMDLINE" ] && \
-  echo "set tuned_params=\"$TUNED_BOOT_CMDLINE\""
+echo "set tuned_params=\"$TUNED_BOOT_CMDLINE\""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tuned-2.4.0/man/diskdevstat.8 
new/tuned-2.4.1/man/diskdevstat.8
--- old/tuned-2.4.0/man/diskdevstat.8   2014-09-19 17:47:59.000000000 +0200
+++ new/tuned-2.4.1/man/diskdevstat.8   2014-10-15 15:15:38.000000000 +0200
@@ -1,6 +1,6 @@
 .TH "diskdevstat" "8" "13 Jan 2011" "Phil Knirsch" "Tool for recording 
harddisk activity"
 .SH NAME
-diskdevstat \- tool for recording harddisk activity
+diskdevstat - tool for recording harddisk activity
 .SH SYNOPSIS
 \fBdiskdevstat\fP [\fIupdate interval\fP] [\fItotal duration\fP] [\fIdisplay 
histogram\fP]
 .SH DESCRIPTION
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tuned-2.4.0/man/netdevstat.8 
new/tuned-2.4.1/man/netdevstat.8
--- old/tuned-2.4.0/man/netdevstat.8    2014-09-19 17:47:59.000000000 +0200
+++ new/tuned-2.4.1/man/netdevstat.8    2014-10-15 15:15:46.000000000 +0200
@@ -1,6 +1,6 @@
 .TH "netdevstat" "8" "13 Jan 2011" "Phil Knirsch" "Tool for recording network 
activity"
 .SH NAME
-netdevstat \- tool for recording network activity
+netdevstat - tool for recording network activity
 .SH SYNOPSIS
 \fBnetdevstat\fP [\fIupdate interval\fP] [\fItotal duration\fP] [\fIdisplay 
histogram\fP]
 .SH DESCRIPTION
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tuned-2.4.0/man/scomes.8 new/tuned-2.4.1/man/scomes.8
--- old/tuned-2.4.0/man/scomes.8        2014-09-19 17:47:59.000000000 +0200
+++ new/tuned-2.4.1/man/scomes.8        2014-10-15 15:15:56.000000000 +0200
@@ -1,8 +1,8 @@
 .TH "scomes" "8" "13 Jan 2011" "Phil Knirsch" "Tool for watching system 
resources"
 .SH NAME
-scomes \- tool for watching system resources
+scomes - tool for watching system resources
 .SH SYNOPSIS
-\fBscomes\fP -c "binary [binary arguments ...]" [timer]
+\fBscomes\fP \-c "binary [binary arguments ...]" [timer]
 .SH DESCRIPTION
 \fBscomes\fR is a simple systemtap script for watching activity of one 
process. Syscalls count,
 userspace and kernelspace ticks, read and written bytes, transitted and 
received bytes and polling
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tuned-2.4.0/man/tuned-adm.8 
new/tuned-2.4.1/man/tuned-adm.8
--- old/tuned-2.4.0/man/tuned-adm.8     2014-09-23 11:42:12.000000000 +0200
+++ new/tuned-2.4.1/man/tuned-adm.8     2014-10-15 15:18:48.000000000 +0200
@@ -21,12 +21,12 @@
 .\" 
 .TH TUNED_ADM "8" "23 Sep 2014" "Fedora Power Management SIG" "tuned"
 .SH NAME
-tuned-adm \- commandline tool for switching between different tuning profiles
+tuned\-adm - commandline tool for switching between different tuning profiles
 .SH SYNOPSIS
-.B tuned-adm 
+.B tuned\-adm 
 .B 
 .BR [ " list ", " active ", " profile <profile> ", " off " ]
-.br
+.BR
 .SH DESCRIPTION
 This command line utility allows you to switch between user definable tuning
 profiles. Several predefined profiles are already included. You can even
@@ -66,18 +66,18 @@
 Switch off tuned.
 
 .SH "FILES"
-.nf
+.NF
 /etc/tuned/*
 /usr/lib/tuned/*
 
 .SH "SEE ALSO"
 .BR tuned (8)
 .BR tuned\-conf (5)
-.BR tuned-profiles (7)
-.BR tuned-profiles-atomic (7)
-.BR tuned-profiles-sap (7)
-.BR tuned-profiles-sap-hana (7)
-.BR tuned-profiles-compat (7)
+.BR tuned\-profiles (7)
+.BR tuned\-profiles\-atomic (7)
+.BR tuned\-profiles\-sap (7)
+.BR tuned\-profiles\-sap\-hana (7)
+.BR tuned\-profiles\-compat (7)
 .SH AUTHOR
 .NF
 Jaroslav Škarvada <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tuned-2.4.0/man/tuned-main.conf.5 
new/tuned-2.4.1/man/tuned-main.conf.5
--- old/tuned-2.4.0/man/tuned-main.conf.5       2014-09-19 17:47:59.000000000 
+0200
+++ new/tuned-2.4.1/man/tuned-main.conf.5       2014-10-15 15:19:07.000000000 
+0200
@@ -1,11 +1,11 @@
 .TH "tuned-main.conf" "5" "15 Oct 2013" "Jaroslav Škarvada" "tuned-main.conf 
file format description"
 .SH NAME
-tuned-main.conf \- Tuned global configuration file
+tuned\-main.conf - Tuned global configuration file
 .SH SYNOPSIS
-.B /etc/tuned/tuned-main.conf
+.B /etc/tuned/tuned\-main.conf
 .SH DESCRIPTION
 This man page documents format of the Tuned global configuration file.
-The \fItuned-main.conf\fR file uses the ini-file format.
+The \fItuned\-main.conf\fR file uses the ini\-file format.
 
 .TP
 .BI dynamic_tuning= BOOL
@@ -38,14 +38,14 @@
 This must be multiple of \fBsleep_interval\fR.
 
 .SH EXAMPLE
-.nf
+.NF
 dynamic_tuning = 1
 sleep_interval = 1
 update_interval = 10
-.fi
+.FI
 
 .SH FILES
-.I /etc/tuned/tuned-main.conf
+.I /etc/tuned/tuned\-main.conf
 
 .SH "SEE ALSO"
 .LP
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tuned-2.4.0/man/tuned-profiles-atomic.7 
new/tuned-2.4.1/man/tuned-profiles-atomic.7
--- old/tuned-2.4.0/man/tuned-profiles-atomic.7 2014-09-23 11:28:03.000000000 
+0200
+++ new/tuned-2.4.1/man/tuned-profiles-atomic.7 2014-10-15 15:18:24.000000000 
+0200
@@ -42,7 +42,7 @@
 netfilter connections tracking.
 
 .SH "FILES"
-.nf
+.NF
 .I /etc/tuned/*
 .I /usr/lib/tuned/*
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tuned-2.4.0/man/tuned-profiles-compat.7 
new/tuned-2.4.1/man/tuned-profiles-compat.7
--- old/tuned-2.4.0/man/tuned-profiles-compat.7 2014-09-23 11:27:56.000000000 
+0200
+++ new/tuned-2.4.1/man/tuned-profiles-compat.7 2014-10-15 15:18:15.000000000 
+0200
@@ -75,7 +75,7 @@
 set to performance.
 
 .SH "FILES"
-.nf
+.NF
 .I /etc/tuned/*
 .I /usr/lib/tuned/*
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tuned-2.4.0/man/tuned-profiles-sap-hana.7 
new/tuned-2.4.1/man/tuned-profiles-sap-hana.7
--- old/tuned-2.4.0/man/tuned-profiles-sap-hana.7       2014-09-23 
11:38:10.000000000 +0200
+++ new/tuned-2.4.1/man/tuned-profiles-sap-hana.7       2014-10-15 
15:19:51.000000000 +0200
@@ -44,7 +44,7 @@
 recieve offload for the network adapter.
 
 .SH "FILES"
-.nf
+.NF
 .I /etc/tuned/*
 .I /usr/lib/tuned/*
 
@@ -54,7 +54,7 @@
 .BR tuned\-profiles (7)
 .BR tuned\-profiles\-atomic (7)
 .BR tuned\-profiles\-sap (7)
-.BR tuned\-profiles\-sap\-compat (7)
+.BR tuned\-profiles\-compat (7)
 .SH AUTHOR
 .NF
 Jaroslav Škarvada <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tuned-2.4.0/man/tuned-profiles-sap.7 
new/tuned-2.4.1/man/tuned-profiles-sap.7
--- old/tuned-2.4.0/man/tuned-profiles-sap.7    2014-09-23 11:27:29.000000000 
+0200
+++ new/tuned-2.4.1/man/tuned-profiles-sap.7    2014-10-15 15:20:16.000000000 
+0200
@@ -36,7 +36,7 @@
 areas a process may have.
 
 .SH "FILES"
-.nf
+.NF
 .I /etc/tuned/*
 .I /usr/lib/tuned/*
 
@@ -46,7 +46,7 @@
 .BR tuned\-profiles (7)
 .BR tuned\-profiles\-atomic (7)
 .BR tuned\-profiles\-sap\-hana (7)
-.BR tuned\-profiles\-sap\-compat (7)
+.BR tuned\-profiles\-compat (7)
 .SH AUTHOR
 .NF
 Jaroslav Škarvada <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tuned-2.4.0/man/tuned-profiles.7 
new/tuned-2.4.1/man/tuned-profiles.7
--- old/tuned-2.4.0/man/tuned-profiles.7        2014-09-23 10:46:57.000000000 
+0200
+++ new/tuned-2.4.1/man/tuned-profiles.7        2014-10-15 15:21:33.000000000 
+0200
@@ -43,7 +43,7 @@
 mechanisms of tuned as they would negatively impact throughput or latency.
 
 .SH PROFILES
-At the moment we're providing the following pre-defined profiles:
+At the moment we're providing the following pre\-defined profiles:
 
 .TP
 .BI "balanced"
@@ -72,25 +72,25 @@
 Hybrid Engine is enabled.
 
 .TP
-.BI throughput\-performance
+.BI "throughput\-performance"
 Profile for typical throughput performance tuning. Disables power saving
 mechanisms and enables sysctl settings that improve the throughput performance
 of your disk and network IO. CPU governor is set to performance and CPU energy
 performance bias is set to performance. Disk readahead values are increased.
 
 .TP
-.BI latency\-performance
+.BI "latency\-performance"
 Profile for low latency performance tuning. Disables power saving mechanisms.
 CPU governor is set to performance andlocked to the low C states (by PM QoS).
 CPU energy performance bias to performance.
 
 .TP
-.BI network\-throughput
+.BI "network\-throughput"
 Profile for throughput network tuning. It is based on the 
throughput\-performance
 profile. It additionaly increases kernel network buffers.
 
 .TP
-.BI network\-latency
+.BI "network\-latency"
 Profile for low latency network tuning. It is based on the latency\-performance
 profile. It additionaly disables transparent hugepages, NUMA balancing and
 tunes several other network related sysctl parameters.
@@ -112,7 +112,7 @@
 It additionally enables more aggresive writeback of dirty pages.
 
 .SH "FILES"
-.nf
+.NF
 .I /etc/tuned/*
 .I /usr/lib/tuned/*
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tuned-2.4.0/man/tuned.8 new/tuned-2.4.1/man/tuned.8
--- old/tuned-2.4.0/man/tuned.8 2014-09-19 17:47:59.000000000 +0200
+++ new/tuned-2.4.1/man/tuned.8 2014-10-15 15:22:40.000000000 +0200
@@ -21,7 +21,7 @@
 .\".
 .TH "tuned" "8" "28 Mar 2012" "Fedora Power Management SIG" "Adaptive system 
tuning daemon"
 .SH NAME
-tuned \- dynamic adaptive system tuning daemon
+tuned - dynamic adaptive system tuning daemon
 .SH SYNOPSIS
 \fBtuned\fP [\fIoptions\fP]
 .SH DESCRIPTION
@@ -60,15 +60,15 @@
 .BI  \-v "\fR, \fP" \-\-version
 Show version information.
 .SH "FILES"
-.nf
+.NF
 /etc/tuned
-/usr/share/doc/tuned-*/README
+/usr/share/doc/tuned/README
 .SH "SEE ALSO"
 .LP
 tuned.conf(5)
-tuned-adm(8)
+tuned\-adm(8)
 .SH AUTHOR
-.nf
+.NF
 Jan Kaluža <[email protected]>
 Jan Včelák <[email protected]>
 Jaroslav Škarvada <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tuned-2.4.0/man/tuned.conf.5 
new/tuned-2.4.1/man/tuned.conf.5
--- old/tuned-2.4.0/man/tuned.conf.5    2014-09-19 17:47:59.000000000 +0200
+++ new/tuned-2.4.1/man/tuned.conf.5    2014-10-15 15:23:40.000000000 +0200
@@ -1,6 +1,6 @@
 .TH "tuned.conf" "5" "13 Mar 2012" "Jan Kaluza" "tuned.conf file format 
description"
 .SH NAME
-tuned.conf \- Tuned profile definition
+tuned.conf - Tuned profile definition
 .SH DESCRIPTION
 This man page documents format of Tuned 2.0 profile definition files. Profile 
is
 stored in /etc/tuned/<profile_name>/tuned.conf or in 
@@ -43,7 +43,7 @@
 Plugins can also have plugin related options.
 
 .SH "EXAMPLE"
-.nf
+.NF
 [main]
 # Includes plugins defined in "included" profile.
 include=included
@@ -64,7 +64,7 @@
 [my_script]
 type=script
 script=profile.sh
-.fi
+.FI
 
 .SH "SEE ALSO"
 .LP
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tuned-2.4.0/man/varnetload.8 
new/tuned-2.4.1/man/varnetload.8
--- old/tuned-2.4.0/man/varnetload.8    2014-09-19 17:47:59.000000000 +0200
+++ new/tuned-2.4.1/man/varnetload.8    2014-10-15 15:24:03.000000000 +0200
@@ -1,8 +1,8 @@
 .TH "varnetload" "8" "13 Jan 2011" "Phil Knirsch" "Tool to create reproducable 
network traffic"
 .SH NAME
-varnetload \- tool to create reproducable network traffic
+varnetload - tool to create reproducable network traffic
 .SH SYNOPSIS
-\fBvarnetload\fP [\fI-d delay\fP] [\fI-t time to run\fP] [\fI-u url\fP]
+\fBvarnetload\fP [\fI\-d delay\fP] [\fI\-t time to run\fP] [\fI\-u url\fP]
 .SH DESCRIPTION
 \fBvarnetload\fR is a simple python script to create reproducable sustained 
network traffic.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tuned-2.4.0/org.tuned.gui.policy 
new/tuned-2.4.1/org.tuned.gui.policy
--- old/tuned-2.4.0/org.tuned.gui.policy        2014-10-01 18:47:55.000000000 
+0200
+++ new/tuned-2.4.1/org.tuned.gui.policy        2014-10-17 00:58:53.000000000 
+0200
@@ -10,7 +10,7 @@
       <allow_inactive>auth_admin</allow_inactive>
       <allow_active>auth_admin</allow_active>
     </defaults>
-     <annotate 
key="org.freedesktop.policykit.exec.path">/usr/bin/tuned-gui</annotate>
+     <annotate 
key="org.freedesktop.policykit.exec.path">/usr/sbin/tuned-gui</annotate>
      <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
   </action>
 </policyconfig>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tuned-2.4.0/tuned/admin/admin.py 
new/tuned-2.4.1/tuned/admin/admin.py
--- old/tuned-2.4.0/tuned/admin/admin.py        2014-09-24 19:17:05.000000000 
+0200
+++ new/tuned-2.4.1/tuned/admin/admin.py        2014-10-15 15:15:23.000000000 
+0200
@@ -33,7 +33,7 @@
                print "Available profiles:"
                for profile in profile_names:
                        print "- %s" % profile
-               self.active(False)
+               self.active()
 
        def active(self):
                try:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tuned-2.4.0/tuned/consts.py 
new/tuned-2.4.1/tuned/consts.py
--- old/tuned-2.4.0/tuned/consts.py     2014-10-01 11:55:36.000000000 +0200
+++ new/tuned-2.4.1/tuned/consts.py     2014-10-17 00:13:23.000000000 +0200
@@ -10,11 +10,13 @@
 LOAD_DIRECTORIES = ["/usr/lib/tuned", "/etc/tuned"]
 
 # max. number of consecutive errors to give up
-ERROR_THRESHOLD = 5
+ERROR_THRESHOLD = 3
 
 # bootloader plugin configuration
 GRUB2_CFG_FILES = ["/boot/grub2/grub.cfg", "/boot/efi/EFI/redhat/grub.cfg", 
"/boot/efi/EFI/fedora/grub.cfg"]
+GRUB2_CFG_DIR = "/etc/grub.d"
 GRUB2_TUNED_TEMPLATE_NAME = "00_tuned"
+GRUB2_TUNED_TEMPLATE_PATH = GRUB2_CFG_DIR + "/" + GRUB2_TUNED_TEMPLATE_NAME
 GRUB2_TEMPLATE_HEADER_BEGIN = "### BEGIN /etc/grub.d/" + 
GRUB2_TUNED_TEMPLATE_NAME +  " ###"
 GRUB2_TEMPLATE_HEADER_END = "### END /etc/grub.d/" + GRUB2_TUNED_TEMPLATE_NAME 
+  " ###"
 GRUB2_TUNED_VAR = "tuned_params"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tuned-2.4.0/tuned/plugins/plugin_bootloader.py 
new/tuned-2.4.1/tuned/plugins/plugin_bootloader.py
--- old/tuned-2.4.0/tuned/plugins/plugin_bootloader.py  2014-09-29 
16:33:32.000000000 +0200
+++ new/tuned-2.4.1/tuned/plugins/plugin_bootloader.py  2014-10-15 
15:15:23.000000000 +0200
@@ -1,6 +1,7 @@
 import base
 from decorators import *
 import tuned.logs
+import exceptions
 from tuned.utils.commands import commands
 import tuned.consts as consts
 
@@ -18,6 +19,8 @@
        """
 
        def __init__(self, *args, **kwargs):
+               if not os.path.isfile(consts.GRUB2_TUNED_TEMPLATE_PATH):
+                       raise exceptions.NotSupportedPluginException("Required 
GRUB2 template not found, disabling plugin.")
                super(self.__class__, self).__init__(*args, **kwargs)
                self._cmd = commands()
 
@@ -42,11 +45,12 @@
                return None
 
        def _patch_bootcmdline(self, value):
-               return self._cmd.replace_in_file(consts.BOOT_CMDLINE_FILE, 
r"\b(" + consts.BOOT_CMDLINE_TUNED_VAR + r"\s*=).*$", r"\1" + str(value))
+               return self._cmd.replace_in_file(consts.BOOT_CMDLINE_FILE, 
r"\b(" + consts.BOOT_CMDLINE_TUNED_VAR + \
+                       r"\s*=).*$", r"\1" + "\"" + str(value) + "\"")
 
        def _remove_grub2_tuning(self):
                self._patch_bootcmdline("")
-               self._cmd.replace_in_file(self._grub2_cfg_file, r"\b(set " + 
consts.GRUB2_TUNED_VAR + r"\s*=).*$", r"\1")
+               self._cmd.replace_in_file(self._grub2_cfg_file, r"\b(set " + 
consts.GRUB2_TUNED_VAR + r"\s*=).*$", r"\1" + "\"\"")
 
        def _instance_unapply_static(self, instance, profile_switch = False):
                if profile_switch:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tuned-2.4.0/tuned/plugins/plugin_disk.py 
new/tuned-2.4.1/tuned/plugins/plugin_disk.py
--- old/tuned-2.4.0/tuned/plugins/plugin_disk.py        2014-09-29 
23:09:33.000000000 +0200
+++ new/tuned-2.4.1/tuned/plugins/plugin_disk.py        2014-10-17 
00:12:09.000000000 +0200
@@ -79,8 +79,8 @@
        def _instance_init(self, instance):
                instance._has_static_tuning = True
 
-               self._set_apm_errcnt = 0
-               self._set_spindown_errcnt = 0
+               self._apm_errcnt = 0
+               self._spindown_errcnt = 0
 
                if self._option_bool(instance.options["dynamic"]):
                        instance._has_dynamic_tuning = True
@@ -97,13 +97,25 @@
                        self._monitors_repository.delete(instance._load_monitor)
                        instance._load_monitor = None
 
-       def _check_set_apm_err_threshold(self):
-               if self._set_apm_errcnt >= consts.ERROR_THRESHOLD:
-                       log.info("disabling set_apm command, too many 
consecutive errors")
-
-       def _check_set_spindown_err_threshold(self):
-               if self._set_spindown_errcnt >= consts.ERROR_THRESHOLD:
-                       log.info("disabling set_spindown command, too many 
consecutive errors")
+       def _update_spindown_errcnt(self, rc):
+               if rc == 0:
+                       self._spindown_errcnt = 0
+               else:
+                       if self._spindown_errcnt > consts.ERROR_THRESHOLD:
+                               return
+                       self._spindown_errcnt += 1
+                       if self._spindown_errcnt == consts.ERROR_THRESHOLD:
+                               log.info("disabling set_spindown command, too 
many consecutive errors")
+
+       def _update_apm_errcnt(self, rc):
+               if rc == 0:
+                       self._apm_errcnt = 0
+               else:
+                       if self._apm_errcnt > consts.ERROR_THRESHOLD:
+                               return
+                       self._apm_errcnt += 1
+                       if self._apm_errcnt == consts.ERROR_THRESHOLD:
+                               log.info("disabling set_apm command, too many 
consecutive errors")
 
        def _instance_update_dynamic(self, instance, device):
                load = instance._load_monitor.get_device_load(device)
@@ -135,24 +147,16 @@
                        new_power_level = self._power_levels[idle["level"]]
                        new_spindown_level = 
self._spindown_levels[idle["level"]]
 
-                       log.debug("tuning level changed to %d (power %d, 
spindown %d)" % (idle["level"], new_power_level, new_spindown_level))
-                       if self._set_spindown_errcnt < consts.ERROR_THRESHOLD 
and self._set_apm_errcnt < consts.ERROR_THRESHOLD:
-                               (rc, out) = self._cmd.execute(["hdparm", "-S%d" 
% new_spindown_level, "-B%d" % new_power_level, "/dev/%s" % device])
-                               if rc != 0:
-                                       self._set_spindown_errcnt += 1
-                                       self._set_apm_errcnt += 1
-                                       self._check_set_spindown_err_threshold()
-                                       self._check_set_apm_err_threshold()
-                       elif self._set_spindown_errcnt < consts.ERROR_THRESHOLD:
+                       log.debug("tuning level changed to %d" % idle["level"])
+                       if self._spindown_errcnt < consts.ERROR_THRESHOLD:
+                               log.debug("changing spindown to %d" % 
new_spindown_level)
                                (rc, out) = self._cmd.execute(["hdparm", "-S%d" 
% new_spindown_level, "/dev/%s" % device])
-                               if rc != 0:
-                                       self._set_spindown_errcnt += 1
-                                       self._check_set_spindown_err_threshold()
-                       elif self._set_apm_errcnt < consts.ERROR_THRESHOLD:
+                               self._update_spindown_errcnt(rc)
+                       if self._apm_errcnt < consts.ERROR_THRESHOLD:
+                               log.debug("changing APM_level to %d" % 
new_power_level)
                                (rc, out) = self._cmd.execute(["hdparm", "-B%d" 
% new_power_level, "/dev/%s" % device])
-                               if rc != 0:
-                                       self._set_apm_errcnt += 1
-                                       self._check_set_apm_err_threshold()
+                               self._update_apm_errcnt(rc)
+
                log.debug("%s load: read %0.2f, write %0.2f" % (device, 
stats["read"], stats["write"]))
                log.debug("%s idle: read %d, write %d, level %d" % (device, 
idle["read"], idle["write"], idle["level"]))
 
@@ -236,13 +240,9 @@
 
        @command_set("apm", per_device=True)
        def _set_apm(self, value, device):
-               if self._set_apm_errcnt < consts.ERROR_THRESHOLD:
+               if self._apm_errcnt < consts.ERROR_THRESHOLD:
                        (rc, out) = self._cmd.execute(["hdparm", "-B", 
str(value), "/dev/" + device])
-                       if rc:
-                               self._set_apm_errcnt += 1
-                               self._check_set_apm_err_threshold()
-                       else:
-                               self._set_apm_errcnt = 0
+                       self._update_apm_errcnt(rc)
 
        @command_get("apm")
        def _get_apm(self, device):
@@ -257,13 +257,9 @@
 
        @command_set("spindown", per_device=True)
        def _set_spindown(self, value, device):
-               if self._set_spindown_errcnt < consts.ERROR_THRESHOLD:
+               if self._spindown_errcnt < consts.ERROR_THRESHOLD:
                        (rc, out) = self._cmd.execute(["hdparm", "-S", 
str(value), "/dev/" + device])
-                       if rc:
-                               self._set_spindown_errcnt += 1
-                               self._check_set_spindown_err_threshold()
-                       else:
-                               self._set_spindown_errcnt = 0
+                       self._update_spindown_errcnt(rc)
 
        @command_get("spindown")
        def _get_spindown(self, device):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tuned-2.4.0/tuned/plugins/plugin_scheduler.py 
new/tuned-2.4.1/tuned/plugins/plugin_scheduler.py
--- old/tuned-2.4.0/tuned/plugins/plugin_scheduler.py   2014-10-01 
16:28:31.000000000 +0200
+++ new/tuned-2.4.1/tuned/plugins/plugin_scheduler.py   2014-10-16 
13:51:12.000000000 +0200
@@ -13,6 +13,9 @@
        priorities of system threads (it is substitution for the rtctl tool).
        """
 
+       _dict_sched2param = {"SCHED_FIFO":"f", "SCHED_BATCH":"b", 
"SCHED_RR":"r",
+               "SCHED_OTHER":"o", "SCHED_IDLE":"i"}
+
        def __init__(self, *args, **kwargs):
                super(self.__class__, self).__init__(*args, **kwargs)
                self._has_dynamic_options = True
@@ -38,7 +41,6 @@
 
        def _instance_cleanup(self, instance):
                pass
-#      self._storage.unset(self._scheduler_storage_key(instance))
 
        def get_processes(self):
                (rc, out) = self._cmd.execute(["ps", "-eopid,cmd", 
"--no-headers"])
@@ -47,20 +49,6 @@
                return dict(map(lambda (pid, cmd): (pid.lstrip(), cmd.lstrip()),
                        filter(lambda i: len(i) == 2, map(lambda s: 
s.split(None, 1), out.split("\n")))))
 
-       def _sched2abbrev(sched):
-               if (sched == "SCHED_OTHER"):
-                       return
-               elif (sched == "SCHED_FIFO"):
-                       return
-               elif (sched == "SCHED_RR"):
-                       return
-               elif (sched == "SCHED_BATCH"):
-                       return
-               elif (sched == "SCHED_IDLE"):
-                       return
-               else:
-                       return None
-
        def _parse_val(self, val):
                v = val.split(":", 1)
                if len(v) == 2:
@@ -91,29 +79,15 @@
                return v
 
        def _schedcfg2param(self, sched):
-               if sched == "f":
-                       return "-f"
-               elif sched == "b":
-                       return "-b"
-               elif sched == "r":
-                       return "-r"
-               elif sched == "o":
-                       return "-o"
+               if sched in ["f", "b", "r", "o"]:
+                       return "-" + sched
                else:
                        return ""
 
        def _sched2param(self, sched):
-               if sched == "SCHED_FIFO":
-                       return "-f"
-               elif sched == "SCHED_BATCH":
-                       return "-b"
-               elif sched == "SCHED_RR":
-                       return "-r"
-               elif sched == "SCHED_OTHER":
-                       return "-o"
-               elif sched == "SCHED_IDLE":
-                       return "-i"
-               else:
+               try:
+                       return "-" + self._dict_sched2param[sched]
+               except KeyError:
                        return ""
 
        def _set_rt(self, pid, sched, prio):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tuned-2.4.0/tuned/version.py 
new/tuned-2.4.1/tuned/version.py
--- old/tuned-2.4.0/tuned/version.py    2014-10-01 18:37:11.000000000 +0200
+++ new/tuned-2.4.1/tuned/version.py    2014-10-17 00:48:09.000000000 +0200
@@ -1,3 +1,3 @@
 TUNED_VERSION_MAJOR = 2
 TUNED_VERSION_MINOR = 4
-TUNED_VERSION_PATCH = 0
+TUNED_VERSION_PATCH = 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tuned-2.4.0/tuned.spec new/tuned-2.4.1/tuned.spec
--- old/tuned-2.4.0/tuned.spec  2014-10-01 18:47:55.000000000 +0200
+++ new/tuned-2.4.1/tuned.spec  2014-10-17 00:58:53.000000000 +0200
@@ -1,6 +1,6 @@
 Summary: A dynamic adaptive system tuning daemon
 Name: tuned
-Version: 2.4.0
+Version: 2.4.1
 Release: 1%{?dist}
 License: GPLv2+
 Source: https://fedorahosted.org/releases/t/u/tuned/tuned-%{version}.tar.bz2
@@ -92,6 +92,11 @@
 sed -i 's/\(dynamic_tuning[ \t]*=[ \t]*\).*/\10/' 
%{buildroot}%{_sysconfdir}/tuned/tuned-main.conf
 %endif
 
+# conditional support for grub2, grub2 is not available on all architectures
+# and tuned is noarch package, thus the following hack is needed
+mkdir -p %{buildroot}%{_datadir}/tuned/grub2
+mv %{buildroot}%{_sysconfdir}/grub.d/00_tuned 
%{buildroot}%{_datadir}/tuned/grub2/00_tuned
+rmdir %{buildroot}%{_sysconfdir}/grub.d
 
 %post
 %systemd_post tuned.service
@@ -107,6 +112,12 @@
 %postun
 %systemd_postun_with_restart tuned.service
 
+# 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
+  rm -f %{_sysconfdir}/grub.d/00_tuned || :
+fi
+
 
 %triggerun -- tuned < 2.0-0
 # remove ktune from old tuned, now part of tuned
@@ -114,6 +125,14 @@
 /usr/sbin/chkconfig --del ktune &>/dev/null || :
 
 
+%posttrans
+# conditional support for grub2, grub2 is not available on all architectures
+# 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
+fi
+
+
 %files
 %defattr(-,root,root,-)
 %doc AUTHORS
@@ -143,7 +162,6 @@
 %config(noreplace) %{_sysconfdir}/tuned/tuned-main.conf
 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/tuned/bootcmdline
 %{_sysconfdir}/dbus-1/system.d/com.redhat.tuned.conf
-%{_sysconfdir}/grub.d/00_tuned
 %{_tmpfilesdir}/tuned.conf
 %{_unitdir}/tuned.service
 %dir %{_localstatedir}/log/tuned
@@ -152,6 +170,7 @@
 %{_mandir}/man7/tuned-profiles.7*
 %{_mandir}/man8/tuned*
 %dir %{_datadir}/tuned
+%{_datadir}/tuned/grub2
 
 %files gtk
 %defattr(-,root,root,-)
@@ -208,6 +227,19 @@
 %{_mandir}/man7/tuned-profiles-compat.7*
 
 %changelog
+* Thu Oct 16 2014 Jaroslav Škarvada <[email protected]> - 2.4.1-1
+- new-release
+  - fixed return code of tuned grub template
+    resolves: rhbz#1151768
+  - plugin_bootloader: fix for multiple parameters on command line
+    related: rhbz#1148711
+  - tuned-adm: fixed traceback on "tuned-adm list"
+    resolves: rhbz#1149162
+  - plugin_bootloader is automatically disabled if grub2 is not found
+    resolves: rhbz#1150047
+  - plugin_disk: set_spindown and set_APM made independent
+    resolves: rhbz#976725
+
 * Wed Oct  1 2014 Jaroslav Škarvada <[email protected]> - 2.4.0-1
 - new-release
   resolves: rhbz#1093883

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to