tuned/tuned.spec
Denisart Benjamin 185b14dacf Accepting request 354167 from home:pluskalm:branches:Base:System
- Update to 2.6.0
  * plugin_cpu: do not show error if cpupower or 
    x86_energy_perf_policy are missing
  * plugin_sysctl: fixed quoting of sysctl values
  * tuned-adm: added log file location hint to verify command output
  * libexec: fixed listdir and isdir in defirqaffinity.py
  * plugin_cpu: save and restore only intel pstate attributes that 
    were changed
  * functions: fixed sysfs save to work with options
  * plugins: added scsi_host plugin
  * tuned-adm: fixed restart attempt if tuned is not running
  * spec: fixed post scriptlet to work without grub
  * tuned-profiles-nfv: fix find-lapictscdeadline-optimal.sh for 
    CPUS where ns > 6500
  * functions: fixed restore_logs_syncing to preserve SELinux 
    context on rsyslog.conf
  * realtime: set unboud workqueues cpumask
  * spec: correctly remove tuned footprint from /etc/default/grub
  * gui: fixed creation of new profile
  * profiles: removed nohz_full from the realtime profile
  * profiles: Added nohz_full and nohz=on to realtime guest/host 
    profiles
  * profiles: fixed lapic_timer_adv_ns cache
  * plugin_sysctl: pass verification even if the option doesn't 
    exist
  * added support for 'summary' and 'description' of profiles, 
    extended D-Bus API for better Cockpit support

OBS-URL: https://build.opensuse.org/request/show/354167
OBS-URL: https://build.opensuse.org/package/show/Base:System/tuned?expand=0&rev=41
2016-01-17 09:49:46 +00:00

277 lines
9.0 KiB
RPMSpec

#
# spec file for package tuned
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# 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/
#
%{!?_tmpfilesdir:%global _tmpfilesdir %{_libexecdir}/tmpfiles.d}
Name: tuned
Version: 2.6.0
Release: 0
Summary: A dynamic adaptive system tuning daemon
License: GPL-2.0+
Group: System/Base
Url: https://fedorahosted.org/tuned/
Source: https://fedorahosted.org/releases/t/u/tuned/tuned-%{version}.tar.bz2
# 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
Patch2: tuned-2.4.0-use_cpupower_for_intel_perf_bias.patch
# Do not own standard directories
BuildRequires: bash-completion
BuildRequires: python
BuildRequires: systemd
Requires: %{_bindir}/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
Obsoletes: pm-profiler
BuildArch: noarch
%{?systemd_requires}
%description
The tuned package contains a daemon that tunes system settings dynamically.
It does so by monitoring the usage of several system components periodically.
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: polkit
Requires: powertop
%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 profiles-realtime
Summary: Additional tuned profiles targeted to realtime
Group: System/Base
Requires: %{name} = %{version}
%description profiles-realtime
Additional tuned profiles targeted to realtime.
%package profiles-oracle
Summary: Additional tuned profiles targeted to Oracle loads
Group: System/Base
Requires: %{name} = %{version}
%description profiles-oracle
Additional tuned profiles targeted to Oracle loads.
%package profiles-nfv
Summary: Additional tuned profiles targeted to Network Function Virtualization (NFV)
Group: System/Base
Requires: %{name} = %{version}
%description profiles-nfv
Additional tuned profiles targeted to Network Function Virtualization (NFV).
%package utils
Summary: Disk and net statistic monitoring systemtap scripts
Group: System/Base
Requires: %{name} = %{version}
Requires: powertop
%description utils
This package contains utilities that can help you to fine tune your
system and manage tuned profiles.
%package utils-systemtap
Summary: Disk and net statistic monitoring systemtap scripts
Group: System/Base
Requires: %{name} = %{version}
Requires: systemtap
%description utils-systemtap
This package contains several systemtap scripts to allow detailed
manual monitoring of the system. Instead of the typical IO/sec it collects
minimal, maximal and average time between operations to be able to
identify applications that behave power inefficient (many small operations
instead of fewer large ones).
%prep
%setup -q
%patch0 -p1
%patch2 -p1
%build
# The tuned daemon is written in pure Python. Nothing requires to be built.
# Just a hack to avoid installation in a wrong directory
sed -i 's|usr/libexec/tuned|%{_libexecdir}/%{name}|' Makefile
%install
make DESTDIR=%{buildroot} install %{?_smp_mflags}
%py_compile %{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 %{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
# convert active_profile from full path to name (if needed)
sed -i 's|.*/\([^/]\+\)/[^\.]\+\.conf|\1|' %{_sysconfdir}/tuned/active_profile
%pre
%service_add_pre %{name}.service
%preun
%service_del_preun %{name}.service
%postun
%service_del_postun %{name}.service
%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING README
%{_datadir}/bash-completion/completions/tuned-adm
%exclude %{python_sitelib}/tuned/gtk
%{python_sitelib}/tuned
%{_sbindir}/tuned
%{_sbindir}/tuned-adm
%{_sbindir}/rctuned
%exclude %{_sysconfdir}/tuned/realtime-variables.conf
%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
%exclude %{_libexecdir}/tuned/realtime-virtual-guest
%exclude %{_libexecdir}/tuned/realtime-virtual-host
%exclude %{_libexecdir}/tuned/oracle
%exclude %{_libexecdir}/tuned/realtime
%exclude %{_libexecdir}/tuned/defirqaffinity*
%{_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) %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
%config %{_sysconfdir}/dbus-1/system.d/com.redhat.tuned.conf
%{_sysconfdir}/grub.d
%{_tmpfilesdir}/tuned.conf
%{_unitdir}/tuned.service
%dir %{_localstatedir}/log/tuned
%dir %{_sysconfdir}/tuned
%{_mandir}/man5/tuned*
%{_mandir}/man7/tuned-profiles.7*
%{_mandir}/man8/tuned*
%dir %{_datadir}/tuned
%ghost %dir /run/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 profiles-realtime
%defattr(-,root,root,-)
%config(noreplace) %{_sysconfdir}/tuned/realtime-variables.conf
%{_libexecdir}/tuned/realtime
%{_mandir}/man7/tuned-profiles-realtime.7*
%files profiles-oracle
%defattr(-,root,root,-)
%{_libexecdir}/tuned/oracle
%{_mandir}/man7/tuned-profiles-oracle.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
%{_libexecdir}/tuned/realtime-virtual-guest
%{_libexecdir}/tuned/realtime-virtual-host
%{_libexecdir}/tuned/defirqaffinity*
%{_mandir}/man7/tuned-profiles-nfv.7*
%files utils
%defattr(-,root,root,-)
%doc COPYING
%{_bindir}/powertop2tuned
%files utils-systemtap
%defattr(-,root,root,-)
%doc doc/README.utils doc/README.scomes COPYING
%{_sbindir}/varnetload
%{_sbindir}/netdevstat
%{_sbindir}/diskdevstat
%{_sbindir}/scomes
%{_mandir}/man8/varnetload.*
%{_mandir}/man8/netdevstat.*
%{_mandir}/man8/diskdevstat.*
%{_mandir}/man8/scomes.*
%changelog