Accepting request 593952 from home:scarabeus_iv:branches:Base:System

The only problem I have is that we now have some polkit rules to handle tuned from UI, someone from security team should review those (when I shadow it the package operates as expected).

- 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
- 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
- Switch to python3 and format with spec-cleaner
- Switch to normal url fetching, there is no actual reason to run
  service in order to generate the versioned tarballs

OBS-URL: https://build.opensuse.org/request/show/593952
OBS-URL: https://build.opensuse.org/package/show/Base:System/tuned?expand=0&rev=50
This commit is contained in:
Thomas Renninger 2018-04-06 12:42:13 +00:00 committed by Git OBS Bridge
parent 87c81f4b36
commit c5b77f0851
10 changed files with 91 additions and 125 deletions

View File

@ -2,11 +2,8 @@
<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="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,7 +1,7 @@
Index: tuned-2.8.0/tuned/plugins/plugin_cpu.py
Index: tuned-2.9.0+git20180328.d25e8b8/tuned/plugins/plugin_cpu.py
===================================================================
--- tuned-2.8.0.orig/tuned/plugins/plugin_cpu.py
+++ tuned-2.8.0/tuned/plugins/plugin_cpu.py
--- tuned-2.9.0+git20180328.d25e8b8.orig/tuned/plugins/plugin_cpu.py
+++ tuned-2.9.0+git20180328.d25e8b8/tuned/plugins/plugin_cpu.py
@@ -18,12 +18,15 @@ class CPULatencyPlugin(base.Plugin):
Plugin for tuning CPU options. Powersaving, governor, required latency, etc.
"""
@ -9,7 +9,7 @@ Index: tuned-2.8.0/tuned/plugins/plugin_cpu.py
+ CPUPOWER_PATH = "/usr/bin/cpupower"
+
def __init__(self, *args, **kwargs):
super(self.__class__, self).__init__(*args, **kwargs)
super(CPULatencyPlugin, self).__init__(*args, **kwargs)
self._has_pm_qos = True
self._has_energy_perf_bias = True

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.

View File

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

View File

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

View File

@ -1,3 +1,42 @@
-------------------------------------------------------------------
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

@ -18,41 +18,37 @@
%{!?_tmpfilesdir:%global _tmpfilesdir %{_libexecdir}/tmpfiles.d}
Name: tuned
Version: 2.8.0
Version: 2.9.0+git20180328.d25e8b8
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
# PATCH-FIX-OPENSUSE 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
# PATCH-FIX-OPENSUSE check_for_cpupower.patch -- check for cpupower binary too
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
Requires: cpupower
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 +144,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 +152,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 +177,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 +213,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 +225,61 @@ 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}/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