Accepting request 657147 from Base:System

OBS-URL: https://build.opensuse.org/request/show/657147
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/tuned?expand=0&rev=16
This commit is contained in:
Dominique Leuenberger 2018-12-19 12:50:23 +00:00 committed by Git OBS Bridge
commit a8721131b3
12 changed files with 114 additions and 206 deletions

View File

@ -2,11 +2,11 @@
<service name="tar_scm" mode="disabled">
<param name="scm">git</param>
<param name="url">https://github.com/redhat-performance/tuned</param>
<param name="subdir"></param>
<param name="filename">tuned</param>
<param name="versionformat">2.8.0</param>
<!--
<param name="versionformat">2.9.0+git%cd.%h</param>
-->
<param name="versionformat">2.10.0</param>
<param name="changesgenerate">enable</param>
<param name="revision">refs/tags/v2.8.0</param>
</service>
<service name="recompress" mode="disabled">
<param name="file">tuned*.tar</param>

View File

@ -1,4 +0,0 @@
<servicedata>
<service name="tar_scm">
<param name="url">https://github.com/redhat-performance/tuned</param>
<param name="changesrevision">de880346fa29efafce002a4245968d8cbabae142</param></service></servicedata>

View File

@ -1,20 +0,0 @@
Index: tuned-2.8.0/tuned/plugins/plugin_cpu.py
===================================================================
--- tuned-2.8.0.orig/tuned/plugins/plugin_cpu.py
+++ tuned-2.8.0/tuned/plugins/plugin_cpu.py
@@ -18,12 +18,15 @@ class CPULatencyPlugin(base.Plugin):
Plugin for tuning CPU options. Powersaving, governor, required latency, etc.
"""
+ CPUPOWER_PATH = "/usr/bin/cpupower"
+
def __init__(self, *args, **kwargs):
super(self.__class__, self).__init__(*args, **kwargs)
self._has_pm_qos = True
self._has_energy_perf_bias = True
self._has_intel_pstate = False
+ self._has_cpupower = os.path.isfile(self.CPUPOWER_PATH) and os.access(self.CPUPOWER_PATH, os.X_OK)
self._min_perf_pct_save = None
self._max_perf_pct_save = None

View File

@ -1,11 +0,0 @@
Index: tuned-2.8.0/tuned-gui.desktop
===================================================================
--- tuned-2.8.0.orig/tuned-gui.desktop
+++ tuned-2.8.0/tuned-gui.desktop
@@ -7,5 +7,5 @@ Exec=tuned-gui
Icon=tuned
Terminal=false
Type=Application
-Categories=System;
+Categories=Settings;HardwareSettings;
Version=1.0

View File

@ -1,13 +0,0 @@
Index: tuned-2.8.0/Makefile
===================================================================
--- tuned-2.8.0.orig/Makefile
+++ tuned-2.8.0/Makefile
@@ -113,7 +113,7 @@ install: install-dirs
install -Dpm 0755 $(file) $(DESTDIR)/usr/sbin/$(notdir $(file));)
# glade
- install -Dpm 0755 tuned-gui.glade $(DESTDIR)$(DATADIR)/tuned/ui/tuned-gui.glade
+ install -Dpm 0644 tuned-gui.glade $(DESTDIR)$(DATADIR)/tuned/ui/tuned-gui.glade
# tools
install -Dpm 0755 experiments/powertop2tuned.py $(DESTDIR)/usr/bin/powertop2tuned

View File

@ -1,27 +0,0 @@
Index: tuned-2.8.0/tuned/gtk/gui_plugin_loader.py
===================================================================
--- tuned-2.8.0.orig/tuned/gtk/gui_plugin_loader.py
+++ tuned-2.8.0/tuned/gtk/gui_plugin_loader.py
@@ -1,4 +1,3 @@
-#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (C) 2008-2014 Red Hat, Inc.
Index: tuned-2.8.0/tuned/gtk/gui_profile_loader.py
===================================================================
--- tuned-2.8.0.orig/tuned/gtk/gui_profile_loader.py
+++ tuned-2.8.0/tuned/gtk/gui_profile_loader.py
@@ -1,4 +1,3 @@
-#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (C) 2008-2014 Red Hat, Inc.
Index: tuned-2.8.0/tuned/gtk/managerException.py
===================================================================
--- tuned-2.8.0.orig/tuned/gtk/managerException.py
+++ tuned-2.8.0/tuned/gtk/managerException.py
@@ -1,4 +1,3 @@
-#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (C) 2008-2014 Red Hat, Inc.

3
tuned-2.10.0.tar.xz Normal file
View File

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

View File

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

View File

@ -1,3 +1,63 @@
-------------------------------------------------------------------
Thu Nov 22 11:42:42 UTC 2018 - trenn@suse.de
- Go for 2.10.0 full version in _service (even this is rc1)
bsc#1071436
Latest included git commit:
commit 3722b151920dc20735dc15cbd45aed7b573fdfc2
Date: Wed Nov 21 14:21:32 2018 +0100
Still keep the old git version parameter commented out, maybe
I need this again.
- Since cpupower also has perf_bias binary, the cpupower call to
switch this has been reverted to lower maintenance overhead
D check_for_cpupower.patch
D use-cpupower-for-intel-perf-bias.patch
- Update to version 2.10.0:
* Add range feature for cpu exclusion
* Disable KSM only once, re-enable it only on full rollback
* Add log message for unsupported parameters in plugin_net
* Add missing feature parameters aliases to plugin_net
* Make virtual-host identical to latency-performance
-------------------------------------------------------------------
Fri Apr 06 09:57:36 UTC 2018 - tchvatal@suse.com
- Reintroduce the _service file as we must use git head in order to
get all the python3 fixes in
- Update to version 2.9.0+git20180328.d25e8b8:
* makefile: dropped KVM unit tests, now provided by standalone package
* sysctl: support assignment modifiers as other plugins do
* spec: used weak deps for tuned-profiles-nfv-host-bin
* Added requires to tuned-profiles-nfv-host-bin
* Dropped tuned-profiles-nfv-host-bin subpackage
* tuned: Add readahead comment to throughput-performance tuned.conf
* oracle: fixed ip_local_port_range parity warning
* Consistently use 'balance' instead of 'rebalance' in cpu-partitioning
- Rebase check_for_cpupower.patch to apply cleanly again
-------------------------------------------------------------------
Fri Apr 6 09:44:36 UTC 2018 - tchvatal@suse.com
- Version update to 2.9.0:
* python3 porting start
* various small fixes
- Drop patches merged upstream:
* fix-desktop-category.patch
* remove-unnecessary-shebangs.patch
* fix-glade-file-permission.patch
- Switch to autopatch from calling all individual patchlines
-------------------------------------------------------------------
Fri Apr 6 09:36:04 UTC 2018 - tchvatal@suse.com
- Switch to python3 and format with spec-cleaner
-------------------------------------------------------------------
Fri Apr 6 09:32:49 UTC 2018 - tchvatal@suse.com
- Switch to normal url fetching, there is no actual reason to run
service in order to generate the versioned tarballs
-------------------------------------------------------------------
Fri Feb 16 09:07:59 UTC 2018 - dimstar@opensuse.org

View File

@ -1,3 +1,5 @@
addFilter("W: files-duplicate /etc/tuned/realtime-virtual-host-variables.conf /etc/tuned/realtime-virtual-guest-variables.conf")
addFilter("W: zero-length /etc/tuned/active_profile")
addFilter("W: zero-length /etc/tuned/profile_mode")
addFilter("W: obsolete-not-provided pm-profiler")
addFilter("W: files-duplicate /etc/tuned/realtime-virtual-guest-variables.conf /etc/tuned/realtime-virtual-host-variables.conf")

View File

@ -12,47 +12,40 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{!?_tmpfilesdir:%global _tmpfilesdir %{_libexecdir}/tmpfiles.d}
Name: tuned
Version: 2.8.0
Version: 2.10.0
Release: 0
Summary: A dynamic adaptive system tuning daemon
License: GPL-2.0+
License: GPL-2.0-or-later
Group: System/Base
Url: https://github.com/redhat-performance/tuned
URL: https://github.com/redhat-performance/tuned
#Source0: https://github.com/redhat-performance/tuned/archive/v%%{version}.tar.gz#/%%{name}-%%{version}.tar.gz
Source0: %{name}-%{version}.tar.xz
Source1: tuned.rpmlintrc
# 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 tuned-2.4.0-use-cpupower-for-intel-perf-bias.patch --use cpupower instead of energy class
Patch1: use-cpupower-for-intel-perf-bias.patch
# Patches to make security and usability more stable
# They also pushed upstream
Patch2: fix-desktop-category.patch
Patch3: remove-unnecessary-shebangs.patch
Patch4: fix-glade-file-permission.patch
Patch5: check_for_cpupower.patch
# Do not own standard directories
BuildRequires: bash-completion
BuildRequires: desktop-file-utils
BuildRequires: python
BuildRequires: pkgconfig
BuildRequires: python3-base
BuildRequires: pkgconfig(systemd)
Requires: %{_bindir}/cpupower
Requires: dbus-1-python
# need perf_bias now
Requires: cpupower >= 4.19
Requires: ethtool
Requires: gawk
Requires: hdparm
Requires: python-configobj
Requires: python-decorator
Requires: python-gobject
Requires: python-pyudev
Requires: python3-configobj
Requires: python3-dbus-python
Requires: python3-decorator
Requires: python3-gobject
Requires: python3-pyudev
Requires: util-linux
Obsoletes: pm-profiler
BuildArch: noarch
@ -148,12 +141,7 @@ instead of fewer large ones).
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%autopatch -p1
%build
# The tuned daemon is written in pure Python. Nothing requires to be built.
@ -161,24 +149,22 @@ instead of fewer large ones).
sed -i 's|usr/libexec/tuned|%{_libexecdir}/%{name}|' Makefile
%install
make DESTDIR=%{buildroot} install %{?_smp_mflags}
%py_compile %{buildroot}
%make_install
%py3_compile %{buildroot}/%{python3_sitelib}
rm -rf %{buildroot}/%{_datadir}/doc
# Remove unwanted stuffs instead of exclude them in files list
# Remove unwanted stuff instead of excluding 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 %{buildroot}%{_sbindir}/rctuned
%post
%service_add_post %{name}.service
%if 0%{?suse_version} <= 1320
systemd-tmpfiles --create %{_tmpfilesdir}/%{name}.conf >/dev/null 2>&1 || :
%else
%tmpfiles_create %{_tmpfilesdir}/%{name}.conf
%endif
%tmpfiles_create %{_tmpfilesdir}/%{name}.conf
# convert active_profile from full path to name (if needed)
sed -i 's|.*/\([^/]\+\)/[^\.]\+\.conf|\1|' %{_sysconfdir}/tuned/active_profile
%if 0%{?suse_version} < 1500
%desktop_database_post
%endif
%pre
%service_add_pre %{name}.service
@ -188,17 +174,19 @@ sed -i 's|.*/\([^/]\+\)/[^\.]\+\.conf|\1|' %{_sysconfdir}/tuned/active_profile
%postun
%service_del_postun %{name}.service
%if 0%{?suse_version} < 1500
%desktop_database_postun
%endif
%files
%defattr(-,root,root,-)
%dir %{_sysconfdir}/modprobe.d
%doc AUTHORS COPYING README
%license COPYING
%doc AUTHORS README
%{_datadir}/bash-completion/completions/tuned-adm
%{_datadir}/polkit-1/actions/com.redhat.tuned.policy
%exclude %{python_sitelib}/tuned/gtk
%{python_sitelib}/tuned
%exclude %{python3_sitelib}/tuned/gtk
%{python3_sitelib}/tuned
%{_sbindir}/tuned
%{_sbindir}/tuned-adm
%{_sbindir}/rctuned
@ -222,6 +210,8 @@ sed -i 's|.*/\([^/]\+\)/[^\.]\+\.conf|\1|' %{_sysconfdir}/tuned/active_profile
%config(noreplace) %{_sysconfdir}/modprobe.d/tuned.conf
%config(noreplace) %{_sysconfdir}/tuned/cpu-partitioning-variables.conf
%config(noreplace) %{_sysconfdir}/tuned/tuned-main.conf
%config(noreplace) %{_sysconfdir}/tuned/profile_mode
%config(noreplace) %{_sysconfdir}/tuned/sap-hana-vmware-variables.conf
%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/tuned/bootcmdline
%dir %{_sysconfdir}/dbus-1
%dir %{_sysconfdir}/dbus-1/system.d
@ -232,69 +222,62 @@ sed -i 's|.*/\([^/]\+\)/[^\.]\+\.conf|\1|' %{_sysconfdir}/tuned/active_profile
%dir %{_localstatedir}/log/tuned
%dir %{_sysconfdir}/tuned
%{_mandir}/man5/tuned*
%{_mandir}/man7/tuned-profiles-cpu-partitioning.7.gz
%{_mandir}/man7/tuned-profiles.7.gz
%{_mandir}/man7/tuned-profiles-cpu-partitioning.7%{?ext_man}
%{_mandir}/man7/tuned-profiles.7%{?ext_man}
%{_mandir}/man7/tuned-profiles-mssql.7%{?ext_man}
%{_mandir}/man8/tuned*
%dir %{_datadir}/tuned
%ghost %dir /run/tuned
%files gtk
%defattr(-,root,root,-)
%dir /usr/share/icons/hicolor
%dir /usr/share/icons/hicolor/*/
%dir /usr/share/icons/hicolor/*/apps
%dir %{_datadir}/icons/hicolor
%dir %{_datadir}/icons/hicolor/*/
%dir %{_datadir}/icons/hicolor/*/apps
%{_datadir}/icons/hicolor/*/apps/*
%{_datadir}/applications/tuned-gui.desktop
%{_sbindir}/tuned-gui
%{python_sitelib}/tuned/gtk
%{python3_sitelib}/tuned/gtk
%{_datadir}/tuned/ui
%{_datadir}/polkit-1/actions/com.redhat.tuned.gui.policy
%files profiles-sap
%defattr(-,root,root,-)
%{_libexecdir}/tuned/sap-netweaver
%{_mandir}/man7/tuned-profiles-sap.7*
%{_mandir}/man7/tuned-profiles-sap.7%{?ext_man}
%files profiles-sap-hana
%defattr(-,root,root,-)
%{_libexecdir}/tuned/sap-hana
%{_libexecdir}/tuned/sap-hana-vmware
%{_mandir}/man7/tuned-profiles-sap-hana.7*
%{_mandir}/man7/tuned-profiles-sap-hana.7%{?ext_man}
%files profiles-atomic
%defattr(-,root,root,-)
%{_libexecdir}/tuned/atomic-host
%{_libexecdir}/tuned/atomic-guest
%{_mandir}/man7/tuned-profiles-atomic.7*
%{_mandir}/man7/tuned-profiles-atomic.7%{?ext_man}
%files profiles-realtime
%defattr(-,root,root,-)
%config(noreplace) %{_sysconfdir}/tuned/realtime-variables.conf
%{_libexecdir}/tuned/realtime
%{_mandir}/man7/tuned-profiles-realtime.7*
%{_mandir}/man7/tuned-profiles-realtime.7%{?ext_man}
%files profiles-oracle
%defattr(-,root,root,-)
%{_libexecdir}/tuned/oracle
%{_mandir}/man7/tuned-profiles-oracle.7*
%{_mandir}/man7/tuned-profiles-oracle.7%{?ext_man}
%files profiles-nfv
%defattr(-,root,root,-)
%config(noreplace) %{_sysconfdir}/tuned/realtime-virtual-guest-variables.conf
%config(noreplace) %{_sysconfdir}/tuned/realtime-virtual-host-variables.conf
%{_libexecdir}/tuned/realtime-virtual-guest
%{_libexecdir}/tuned/realtime-virtual-host
%{_libexecdir}/tuned/defirqaffinity*
%{_mandir}/man7/tuned-profiles-nfv-*.7.gz
%{_mandir}/man7/tuned-profiles-nfv-*.7%{?ext_man}
%files utils
%defattr(-,root,root,-)
%doc COPYING
%license COPYING
%{_bindir}/powertop2tuned
%files utils-systemtap
%defattr(-,root,root,-)
%doc doc/README.utils doc/README.scomes COPYING
%license COPYING
%doc doc/README.utils doc/README.scomes
%{_sbindir}/varnetload
%{_sbindir}/netdevstat
%{_sbindir}/diskdevstat

View File

@ -1,62 +0,0 @@
Index: tuned-2.8.0/tuned/plugins/plugin_cpu.py
===================================================================
--- tuned-2.8.0.orig/tuned/plugins/plugin_cpu.py
+++ tuned-2.8.0/tuned/plugins/plugin_cpu.py
@@ -110,7 +110,8 @@ class CPULatencyPlugin(base.Plugin):
instance._load_monitor = None
# Check for x86_energy_perf_policy, ignore if not available / supported
- self._check_energy_perf_bias()
+ if self._has_cpupower is False:
+ self._check_energy_perf_bias()
# Check for intel_pstate
self._check_intel_pstate()
else:
@@ -262,7 +263,17 @@ class CPULatencyPlugin(base.Plugin):
if not self._is_cpu_online(device):
log.debug("%s is not online, skipping" % device)
return None
- if self._has_energy_perf_bias:
+ if self._has_cpupower is True:
+ bias_str = str(energy_perf_bias)
+ if bias_str == "performance":
+ bias_str = "0"
+ elif bias_str == "powersave":
+ bias_str = "15"
+ elif bias_str == "normal":
+ bias_str = "6"
+ cpu_id = device.lstrip("cpu")
+ self._cmd.execute(["cpupower", "-c", cpu_id, "set", "-b", bias_str])
+ elif self._has_energy_perf_bias:
if not sim:
cpu_id = device.lstrip("cpu")
log.info("setting energy_perf_bias '%s' on cpu '%s'" % (energy_perf_bias, device))
@@ -290,14 +301,21 @@ class CPULatencyPlugin(base.Plugin):
if not self._is_cpu_online(device):
log.debug("%s is not online, skipping" % device)
return None
- if self._has_energy_perf_bias:
+ if self._has_cpupower is True:
+ cpu_id = device.lstrip("cpu")
+ retcode, lines = self._cmd.execute(["cpupower", "-c", cpu_id, "info", "-b"])
+ elif self._has_energy_perf_bias:
cpu_id = device.lstrip("cpu")
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 = self._energy_perf_policy_to_human(l[1])
- break
+ else:
+ return None
+ if retcode == 0:
+ for line in lines.splitlines():
+ if line.startswith("analyzing CPU"):
+ continue
+ l = line.split()
+ if len(l) == 2:
+ energy_perf_bias = l[1]
+ break
return energy_perf_bias