Accepting request 254973 from home:posophe:branches:Base:System

Updates + changes

OBS-URL: https://build.opensuse.org/request/show/254973
OBS-URL: https://build.opensuse.org/package/show/Base:System/tuned?expand=0&rev=23
This commit is contained in:
Denisart Benjamin
2014-10-10 12:23:15 +00:00
committed by Git OBS Bridge
parent c8500f9107
commit a527f03135
7 changed files with 176 additions and 40 deletions

View File

@@ -1,14 +0,0 @@
--- a/Makefile 2012-10-10 23:25:44.000000000 +0200
+++ b/Makefile 2012-10-30 12:52:03.786235413 +0100
@@ -65,8 +65,8 @@
# runtime directory
mkdir -p $(DESTDIR)/run/tuned
- mkdir -p $(DESTDIR)/etc/tmpfiles.d
- install -m 0644 tuned.tmpfiles $(DESTDIR)/etc/tmpfiles.d/tuned.conf
+ mkdir -p $(DESTDIR)/usr/lib/tmpfiles.d
+ install -m 0644 tuned.tmpfiles $(DESTDIR)/usr/lib/tmpfiles.d/tuned.conf
# systemd units
mkdir -p $(DESTDIR)$(UNITDIR)

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:fba74ad66abc942859cd42aba0eaf379565adc9ecadea4eb8b49ddad2ff2a4d5
size 62406

View File

@@ -0,0 +1,14 @@
diff --git a/org.tuned.gui.policy b/org.tuned.gui.policy
index 58b6209..68b15d8 100644
--- a/org.tuned.gui.policy
+++ b/org.tuned.gui.policy
@@ -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>

View File

@@ -2,7 +2,7 @@ Index: tuned-2.3.0/tuned/plugins/plugin_cpu.py
===================================================================
--- tuned-2.3.0.orig/tuned/plugins/plugin_cpu.py
+++ tuned-2.3.0/tuned/plugins/plugin_cpu.py
@@ -90,7 +90,8 @@ class CPULatencyPlugin(base.Plugin):
@@ -91,7 +91,8 @@
# Check for cpupower, use workaround if not available
self._check_cpupower()
# Check for x86_energy_perf_policy, ignore if not available / supported
@@ -12,7 +12,7 @@ Index: tuned-2.3.0/tuned/plugins/plugin_cpu.py
# Check for intel_pstate
self._check_intel_pstate()
else:
@@ -206,7 +207,17 @@ class CPULatencyPlugin(base.Plugin):
@@ -207,7 +208,17 @@
@command_set("energy_perf_bias", per_device=True)
def _set_energy_perf_bias(self, energy_perf_bias, device):
@@ -30,8 +30,8 @@ Index: tuned-2.3.0/tuned/plugins/plugin_cpu.py
+ elif self._has_energy_perf_bias:
log.info("setting energy_perf_bias '%s' on cpu '%s'" % (energy_perf_bias, device))
cpu_id = device.lstrip("cpu")
tuned.utils.commands.execute(["x86_energy_perf_policy", "-c", cpu_id, str(energy_perf_bias)])
@@ -214,14 +225,21 @@ class CPULatencyPlugin(base.Plugin):
self._cmd.execute(["x86_energy_perf_policy", "-c", cpu_id, str(energy_perf_bias)])
@@ -215,14 +226,21 @@
@command_get("energy_perf_bias")
def _get_energy_perf_bias(self, device):
energy_perf_bias = None
@@ -41,14 +41,14 @@ Index: tuned-2.3.0/tuned/plugins/plugin_cpu.py
+ retcode, lines = tuned.utils.commands.execute(["cpupower", "-c", cpu_id, "info", "-b"])
+ elif self._has_energy_perf_bias:
cpu_id = device.lstrip("cpu")
retcode, lines = tuned.utils.commands.execute(["x86_energy_perf_policy", "-c", cpu_id, "-r"])
retcode, lines = self._cmd.execute(["x86_energy_perf_policy", "-c", cpu_id, "-r"])
- if retcode == 0:
- for line in lines.splitlines():
- l = line.split()
- if len(l) == 2:
- energy_perf_bias = l[1]
- break
+ else:
+ else:
+ return None
+ if retcode == 0:
+ for line in lines.splitlines():

3
tuned-2.4.0.tar.bz2 Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a6d2a2c5fc8a805031dc4aa7113a62049993535f2635c3a286123c1cecc36193
size 81014

View File

@@ -1,3 +1,71 @@
-------------------------------------------------------------------
Fri Oct 10 10:14:03 UTC 2014 - p.drouand@gmail.com
- Update to version 2.4.0
+ rebase tuned to latest upstream (rhbz#1093883)
+ fixed traceback if profile cannot be loaded
related: rhbz#953128
+ powertop2tuned: fixed traceback if rewriting file instead of dir
resolves: rhbz#963441
+ throughput-performance: altered dirty ratios for better performance
resolves: rhbz#1043533
+ latency-performance: leaving THP on its default
resolves: rhbz#1064510
+ used throughput-performance profile on server by default
resolves: rhbz#1063481
+ network-latency: added new profile
resolves: rhbz#1052418
+ network-throughput: added new profile
resolves: rhbz#1052421
+ recommend.conf: fixed config file
resolves: rhbz#1069123
+ systemd: added cpupower.service conflict
resolves: rhbz#1073392
+ balanced: used medium_power ALPM policy
+ added support for >, < assignment modifiers in tuned.conf
+ handled root block devices
+ balanced: used conservative CPU governor
resolves: rhbz#1124125
+ plugins: added selinux plugin
+ plugin_net: added nf_conntrack_hashsize parameter
+ profiles: added atomic-host profile
resolves: rhbz#1091977
+ profiles: added atomic-guest profile
resolves: rhbz#1091979
+ moved profile autodetection from post install script to tuned daemon
resolves: rhbz#1144067
+ profiles: included sap-hana and sap-hana-vmware profiles
+ man: structured profiles manual pages according to sub-packages
+ added missing hdparm dependency
resolves: rhbz#1144858
+ improved error handling of switch_profile
resolves: rhbz#1068699
+ tuned-adm: active: detect whether tuned deamon is running
related: rhbz#1068699
+ removed active_profile from RPM verification
resolves: rhbz#1104126
+ plugin_disk: readahead value can be now specified in sectors
resolves: rhbz#1127127
+ plugins: added bootloader plugin
resolves: rhbz#1044111
+ plugin_disk: added error counter to hdparm calls
+ plugins: added scheduler plugin
resolves: rhbz#1100826
+ added tuned-gui
- Add tuned-2.4.0-polkit-tuned-gui-path.patch; fix tuned-gui path
in polkit policy rule
- Remove fix-new-systemd-tmpfiles.d-path.patch; fixed by upstream
- Update use_cpupower_for_intel_perf_bias to upstream changes
+ Added : tuned-2.4.0-use_cpupower_for_intel_perf_bias.patch
+ Deleted : se_cpupower_for_intel_perf_bias
- Add tuned-gtk, profiles-sap, profiles-sap-hana, and profiles-atomic
subpackages
- Add hdparm and util-linux requirements; new dependencies
- Add bash-completion build requirement to avoid owning standard
directory
- Add grub2 build requirement, armv7 excluded , to avoid owning
standard directory
-------------------------------------------------------------------
Fri May 23 12:01:37 UTC 2014 - jsegitz@novell.com

View File

@@ -15,9 +15,10 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%{!?_tmpfilesdir:%global _tmpfilesdir /usr/lib/tmpfiles.d}
Name: tuned
Version: 2.3.0
Version: 2.4.0
Release: 0
Summary: A dynamic adaptive system tuning daemon
License: GPL-2.0+
@@ -27,20 +28,25 @@ Source: https://fedorahosted.org/releases/t/u/tuned/tuned-%{version}.tar
# PATCH-FIX-OPENSUSE fix-allow-receive_sender-default.patch <allow receive_sender="com.redhat.com"/> allow receive_* is normally
# not needed as that is the default --<p.drouand@gmail.com>
Patch0: fix-allow-receive_sender-default.patch
# PATCH-FIX-OPENSUSE fix-new-systemd-tmpfiles.d-path.patch Fix tmpfiles.d systemd path from /etc/tmpdfiles.d to /usr/lib/tmpfiles.d to be
# compatible with new systemd --<p.drouand@gmail.com>
Patch1: fix-new-systemd-tmpfiles.d-path.patch
Patch2: use_cpupower_for_intel_perf_bias
# 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
BuildRequires: bash-completion
Requires: /usr/bin/cpupower
Requires: dbus-1-python
Requires: ethtool
Requires: gawk
Requires: hdparm
Requires: python-configobj
Requires: python-decorator
Requires: python-gobject
Requires: python-pyudev
Requires: util-linux
%{?systemd_requires}
BuildArch: noarch
Obsoletes: pm-profiler
@@ -52,6 +58,41 @@ 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.
%package gtk
Summary: Disk and net statistic monitoring systemtap scripts - GTK GUI
Group: System/Base
Requires: %{name} = %{version}
Requires: powertop,
Requires: python-gobject
Requires: polkit
%description gtk
GTK GUI that can control tuned and provide simple profile editor.
%package profiles-sap
Summary: Additional tuned profile(s) targeted to SAP NetWeaver loads
Group: System/Base
Requires: %{name} = %{version}
%description profiles-sap
Additional tuned profile(s) targeted to SAP NetWeaver loads.
%package profiles-sap-hana
Summary: Additional tuned profile(s) targeted to SAP HANA loads
Group: System/Base
Requires: %{name} = %{version}
%description profiles-sap-hana
Additional tuned profile(s) targeted to SAP HANA loads.
%package profiles-atomic
Summary: Additional tuned profiles targeted to Atomic
Group: System/Base
Requires: %{name} = %{version}
%description profiles-atomic
Additional tuned profiles targeted to Atomic host and guest.
%package utils
Summary: Disk and net statistic monitoring systemtap scripts
Group: System/Base
@@ -78,8 +119,8 @@ instead of fewer large ones).
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%build
#The tuned daemon is written in pure Python. Nothing requires to be built.
@@ -92,18 +133,11 @@ make install DESTDIR=%{buildroot}
rm -rf %{buildroot}/%{_datadir}/doc
# Remove unwanted stuffs instead of exclude them in files list
rm -rf %{buildroot}%{_libexecdir}/%{name}/{default,desktop-powersave,laptop-ac-powersave,server-powersave,laptop-battery-powersave,enterprise-storage,spindown-disk}
rm %{buildroot}%{_mandir}/man7/tuned-profiles-compat.7
ln -sf service $RPM_BUILD_ROOT/usr/sbin/rctuned
%post
%service_add_post %{name}.service
# try to autodetect the best profile for the system in case there is none preset
if [ ! -f /etc/tuned/active_profile -o -z "`cat /etc/tuned/active_profile 2>/dev/null`" ]
then
PROFILE=`/usr/sbin/tuned-adm recommend 2>/dev/null`
[ "$PROFILE" ] || PROFILE=balanced
/usr/sbin/tuned-adm profile "$PROFILE" 2>/dev/null || echo -n "$PROFILE" > /etc/tuned/active_profile
fi
# convert active_profile from full path to name (if needed)
sed -i 's|.*/\([^/]\+\)/[^\.]\+\.conf|\1|' /etc/tuned/active_profile
@@ -119,23 +153,57 @@ sed -i 's|.*/\([^/]\+\)/[^\.]\+\.conf|\1|' /etc/tuned/active_profile
%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING README
%config %{_sysconfdir}/bash_completion.d
%{_datadir}/bash-completion/completions/tuned
%exclude %{python_sitelib}/tuned/gtk
%{python_sitelib}/tuned
%{_sbindir}/tuned
%{_sbindir}/tuned-adm
%{_sbindir}/rctuned
%exclude %{_libexecdir}/tuned/sap-netweaver
%exclude %{_libexecdir}/tuned/sap-hana
%exclude %{_libexecdir}/tuned/sap-hana-vmware
%exclude %{_libexecdir}/tuned/atomic-host
%exclude %{_libexecdir}/tuned/atomic-guest
%{_libexecdir}/tuned
# active_profile might be empty when built via build service, but typically
# not on a real install -> better do not mark it %ghost
%config(noreplace) %{_sysconfdir}/tuned/active_profile
%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/tuned/active_profile
%config(noreplace) %{_sysconfdir}/tuned/tuned-main.conf
%{_libexecdir}/tmpfiles.d
%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/tuned/bootcmdline
%config %{_sysconfdir}/dbus-1/system.d/com.redhat.tuned.conf
%{_sysconfdir}/grub.d
%{_tmpfilesdir}/tuned.conf
%{_unitdir}/tuned.service
%dir %{_localstatedir}/log/tuned
%dir /etc/tuned
%{_mandir}/man5/tuned*
%{_mandir}/man7/tuned-profiles.7*
%{_mandir}/man8/tuned*
%dir %{_datadir}/tuned
%files gtk
%defattr(-,root,root,-)
%{_sbindir}/tuned-gui
%{python_sitelib}/tuned/gtk
%{_datadir}/tuned/ui
%{_datadir}/polkit-1/actions/org.tuned.gui.policy
%files profiles-sap
%defattr(-,root,root,-)
%{_libexecdir}/tuned/sap-netweaver
%{_mandir}/man7/tuned-profiles-sap.7*
%files profiles-sap-hana
%defattr(-,root,root,-)
%{_libexecdir}/tuned/sap-hana
%{_libexecdir}/tuned/sap-hana-vmware
%{_mandir}/man7/tuned-profiles-sap-hana.7*
%files profiles-atomic
%defattr(-,root,root,-)
%{_libexecdir}/tuned/atomic-host
%{_libexecdir}/tuned/atomic-guest
%{_mandir}/man7/tuned-profiles-atomic.7*
%files utils
%defattr(-,root,root,-)