324 lines
10 KiB
RPMSpec
324 lines
10 KiB
RPMSpec
Summary: A system tuning service for Linux
|
|
Name: tuned
|
|
Version: 2.10.0
|
|
Release: 8
|
|
License: GPLv2+
|
|
Source0: https://github.com/redhat-performance/%{name}/archive/v%{version}%{?prerel2}.tar.gz#/%{name}-%{version}%{?prerel2}.tar.gz
|
|
URL: http://www.tuned-project.org/
|
|
|
|
BuildArch: noarch
|
|
|
|
%bcond_without python3
|
|
%global _py python3
|
|
%global docdir %{_docdir}/%{name}
|
|
|
|
Requires(post): systemd, virt-what
|
|
Requires(preun): systemd
|
|
Requires(postun): systemd
|
|
BuildRequires: %{_py}, %{_py}-devel
|
|
BuildRequires: git, systemd, desktop-file-utils
|
|
|
|
Requires: python3-dbus, util-linux, systemtap
|
|
Requires: virt-what, gawk, dbus, ethtool
|
|
Requires: polkit, powertop, hdparm, python3-gobject-base
|
|
|
|
Requires: %{_py}-configobj, %{_py}-pyudev, %{_py}-linux-procfs
|
|
Requires: %{_py}-schedutils, %{_py}-decorator, %{_py}-perf
|
|
Recommends:kernel-tools
|
|
Recommends:tuned-profiles-nfv-host-bin
|
|
|
|
Patch0: tuned-2.10.0-python-3.7-fix.patch
|
|
Patch1: 0001-tuned-adm-Fix-a-traceback-when-run-without-action-sp.patch
|
|
Patch2: tuned-2.10.0-makefile-full-python-path.patch
|
|
Patch3: 0001-tuned-gui-Sort-plugins-based-on-their-name.patch
|
|
Patch4: fix-cpu-Update-checking-if-EPB-is-supported.patch
|
|
|
|
|
|
Patch9000: bugfix-tuned-2.8.0-restart-after-kill-dbus.patch
|
|
Patch9001: 0005-realtime-virtual-host-pin-only-the-vcpu-thread-to-is.patch
|
|
Patch9002: 0029-Fix-TypeError.patch
|
|
Patch9003: 0040-Fix-pickle-provider.patch
|
|
Patch9004: 0070-plugin_disk-Fix-checking-the-removable-attribute-on-.patch
|
|
Patch9005: 0074-fix-disk-plugin-plugout-problem.patch
|
|
Patch9006: 0099-Fix-checking-for-None-values.patch
|
|
|
|
|
|
Provides: tuned-gtk
|
|
Provides: tuned-utils
|
|
Provides: tuned-profiles-sap
|
|
Provides: tuned-profiles-mssql
|
|
Provides: tuned-profiles-oracle
|
|
Provides: tuned-profiles-sap-hana
|
|
Provides: tuned-profiles-atomic
|
|
Provides: tuned-profiles-nfv
|
|
Provides: tuned-profiles-cpu-partitioning
|
|
Provides: tuned-profiles-compat
|
|
Provides: tuned-utils-systemtap
|
|
|
|
Obsoletes: tuned-gtk
|
|
Obsoletes: tuned-utils
|
|
Obsoletes: tuned-profiles-sap
|
|
Obsoletes: tuned-profiles-mssql
|
|
Obsoletes: tuned-profiles-oracle
|
|
Obsoletes: tuned-profiles-sap-hana
|
|
Obsoletes: tuned-profiles-atomic
|
|
Obsoletes: tuned-profiles-nfv
|
|
Obsoletes: tuned-profiles-cpu-partitioning
|
|
Obsoletes: tuned-profiles-compat
|
|
Obsoletes: tuned-utils-systemtap
|
|
|
|
%description
|
|
Tuned is a daemon that uses udev to monitor connected devices and
|
|
statically and dynamically tunes system settings according to a
|
|
selected profile. It is distributed with a number of predefined
|
|
profiles for common use cases like high throughput, low latency,
|
|
or powersave, and allows you to further alter the rules defined
|
|
for each profile and customize how to tune a particular device.
|
|
To revert all changes made to the system settings by a certain
|
|
profile, you can either switch to another profile or deactivate
|
|
the tuned daemon.
|
|
|
|
gtk
|
|
gtk GTK GUI that can alter the rules defined for each profile and
|
|
customize how to tune a particular device.
|
|
|
|
profiles-mssql
|
|
Description of profile provided for the MS SQL Server. This
|
|
profileis provided for the MS SQL Server. It's based on the
|
|
throughput-performance profile.
|
|
|
|
utils-systemtap
|
|
The package is used to monitor system status by some systemtap scripts.
|
|
|
|
utils
|
|
The command line utilities for tuned
|
|
|
|
profiles-sap
|
|
Description of profiles provided for the SAP NetWeaver. These profiles
|
|
provides performance optimizations for the SAP NetWeaver applications.
|
|
|
|
profiles-oracle
|
|
Description of profile provided for Oracle.
|
|
|
|
profiles-realtime
|
|
Description of profiles provided for the realtime.
|
|
|
|
profiles-atomic
|
|
Description of profiles provided for the Project Atomic.These
|
|
profiles are provided for the Project Atomic. They provides
|
|
performance optimizations for the Atomic hosts (bare metal) and
|
|
virtual guests.
|
|
|
|
profiles-sap-hana
|
|
An in-memory, highly scalable database that is
|
|
particularly well suited to analytics.
|
|
|
|
profiles-nfv-guest
|
|
Additional tuned profile(s) targeted to Network Function Virtualization (NFV) guest.
|
|
|
|
profiles-nfv-host
|
|
Additional tuned profile(s) targeted to Network Function Virtualization (NFV) host.
|
|
|
|
profiles-nfv
|
|
Additional tuned profile(s) targeted to Network Function Virtualization (NFV).
|
|
|
|
profiles-cpu-partitioning
|
|
Additional tuned profile(s) optimized for CPU partitioning.
|
|
|
|
profiles-compat
|
|
Additional tuned profiles mainly for backward compatibility with tuned 1.0.
|
|
It can be also used to fine tune your system for specific scenarios.
|
|
|
|
%package profiles-devel
|
|
Summary: Additional tuned profile(s) to realtime, NFV guest and NFV host.
|
|
Requires: %{name} = %{version}
|
|
Requires: tuna
|
|
Recommends: tuned-profiles-nfv-host-bin
|
|
|
|
|
|
Provides: tuned-profiles-realtime
|
|
Provides: tuned-profiles-nfv-guest
|
|
Provides: tuned-profiles-nfv-host
|
|
|
|
Obsoletes: tuned-profiles-realtime
|
|
Obsoletes: tuned-profiles-nfv-guest
|
|
Obsoletes: tuned-profiles-nfv-host
|
|
|
|
%description profiles-devel
|
|
Man pages and other related documents for %{name}
|
|
|
|
%package help
|
|
Summary: Documents for %{name}
|
|
Requires: man, info
|
|
|
|
%description help
|
|
Man pages and other related documents for %{name}
|
|
|
|
|
|
%prep
|
|
%autosetup -n %{name}-%{version} -p1 -Sgit
|
|
|
|
%build
|
|
|
|
%install
|
|
%make_install DOCDIR=%{docdir}
|
|
PYTHON=%{__python3}
|
|
sed -i 's/\(dynamic_tuning[ \t]*=[ \t]*\).*/\10/' %{buildroot}%{_sysconfdir}/%{name}/tuned-main.conf
|
|
|
|
mkdir -p %{buildroot}%{_datadir}/%{name}/grub2
|
|
mv %{buildroot}%{_sysconfdir}/grub.d/00_tuned %{buildroot}%{_datadir}/%{name}/grub2/00_tuned
|
|
rmdir %{buildroot}%{_sysconfdir}/grub.d
|
|
|
|
mkdir -p %{buildroot}%{_var}/lib/%{name}
|
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/modprobe.d
|
|
touch %{buildroot}%{_sysconfdir}/modprobe.d/kvm.rt.tuned.conf
|
|
|
|
desktop-file-validate %{buildroot}%{_datadir}/applications/tuned-gui.desktop
|
|
|
|
%post
|
|
if [ $1 -eq 1 ] ; then
|
|
systemctl preset %{name}.service >/dev/null 2>&1 || :
|
|
fi
|
|
|
|
sed -i 's|.*/\([^/]\+\)/[^\.]\+\.conf|\1|' %{_sysconfdir}/%{name}/active_profile
|
|
|
|
if [ -r "%{_sysconfdir}/default/grub" ]; then
|
|
sed -i 's/GRUB_CMDLINE_LINUX="$GRUB_CMDLINE_LINUX \\$tuned_params"/GRUB_CMDLINE_LINUX_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT \\$tuned_params"/' \
|
|
%{_sysconfdir}/default/grub
|
|
fi
|
|
|
|
%preun
|
|
if [ $1 -eq 0 ] ; then
|
|
systemctl --no-reload disable %{name}.service > /dev/null 2>&1 || :
|
|
systemctl stop %{name}.service > /dev/null 2>&1 || :
|
|
fi
|
|
|
|
|
|
if [ "$1" == 0 ]; then
|
|
rm -f %{_var}/lib/%{name}/*
|
|
rm -f /run/%{name}/*
|
|
fi
|
|
|
|
%postun
|
|
systemctl daemon-reload >/dev/null 2>&1 || :
|
|
if [ $1 -ge 1 ] ; then
|
|
systemctl try-restart %{name}.service >/dev/null 2>&1 || :
|
|
fi
|
|
|
|
if [ "$1" == 0 ]; then
|
|
rm -f %{_sysconfdir}/grub.d/00_tuned || :
|
|
if [ -r "%{_sysconfdir}/default/grub" ]; then
|
|
sed -i '/GRUB_CMDLINE_LINUX_DEFAULT="${GRUB_CMDLINE_LINUX_DEFAULT:+$GRUB_CMDLINE_LINUX_DEFAULT }\\$tuned_params"/d' %{_sysconfdir}/default/grub
|
|
fi
|
|
fi
|
|
|
|
%triggerun -- %{name} < 2.0-0
|
|
/usr/sbin/service ktune stop &>/dev/null || :
|
|
/usr/sbin/chkconfig --del ktune &>/dev/null || :
|
|
|
|
%posttrans
|
|
if [ -d %{_sysconfdir}/grub.d ]; then
|
|
cp -a %{_datadir}/%{name}/grub2/00_tuned %{_sysconfdir}/grub.d/00_tuned
|
|
selinuxenabled &>/dev/null && \
|
|
restorecon %{_sysconfdir}/grub.d/00_tuned &>/dev/null || :
|
|
fi
|
|
|
|
%files
|
|
%doc %{docdir}
|
|
%doc %{docdir}/README.NFV
|
|
%doc doc/README.utils
|
|
%doc doc/README.scomes
|
|
%doc COPYING
|
|
%dir %{_datadir}/%{name}
|
|
%dir %{_sysconfdir}/%{name}
|
|
%dir %{_sysconfdir}/%{name}/recommend.d
|
|
%dir %{_libexecdir}/%{name}
|
|
%dir %{_localstatedir}/log/%{name}
|
|
%dir %{_var}/lib/%{name}
|
|
%dir /run/%{name}
|
|
%{_datadir}/bash-completion/completions/%{name}-adm
|
|
%{_datadir}/%{name}/grub2
|
|
%{_datadir}/polkit-1/actions/com.redhat.%{name}.policy
|
|
%{_datadir}/%{name}/ui
|
|
%{_datadir}/polkit-1/actions/com.redhat.%{name}.gui.policy
|
|
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
|
|
%{_datadir}/applications/%{name}-gui.desktop
|
|
%{_sbindir}/%{name}
|
|
%{_sbindir}/%{name}-adm
|
|
%{_sbindir}/%{name}-gui
|
|
%{_sbindir}/varnetload
|
|
%{_sbindir}/netdevstat
|
|
%{_sbindir}/diskdevstat
|
|
%{_sbindir}/scomes
|
|
|
|
%exclude %{_prefix}/lib/%{name}/realtime
|
|
%exclude %{_prefix}/lib/%{name}/realtime-virtual-guest
|
|
%exclude %{_prefix}/lib/%{name}/realtime-virtual-host
|
|
%{_prefix}/lib/%{name}
|
|
|
|
%config(noreplace) %{_sysconfdir}/%{name}/cpu-partitioning-variables.conf
|
|
%config(noreplace) %{_sysconfdir}/%{name}/sap-hana-vmware-variables.conf
|
|
%config(noreplace) %{_sysconfdir}/%{name}/%{name}-main.conf
|
|
%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}/active_profile
|
|
%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}/profile_mode
|
|
%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}/bootcmdline
|
|
%ghost %{_sysconfdir}/modprobe.d/kvm.rt.%{name}.conf
|
|
%{_bindir}/powertop2%{name}
|
|
%{_libexecdir}/%{name}/defirqaffinity*
|
|
%{_libexecdir}/%{name}/pmqos-static*
|
|
%{python3_sitelib}/%{name}/gtk
|
|
%{python3_sitelib}/%{name}
|
|
%{_sysconfdir}/dbus-1/system.d/com.redhat.%{name}.conf
|
|
%verify(not size mtime md5) %{_sysconfdir}/modprobe.d/%{name}.conf
|
|
%{_tmpfilesdir}/%{name}.conf
|
|
%{_unitdir}/%{name}.service
|
|
|
|
%files help
|
|
%{_mandir}/man5/%{name}*
|
|
%{_mandir}/man7/%{name}-profiles-mssql.7*
|
|
%{_mandir}/man7/%{name}-profiles-sap-hana.7*
|
|
%{_mandir}/man7/%{name}-profiles-sap.7*
|
|
%{_mandir}/man7/%{name}-profiles-cpu-partitioning.7*
|
|
%{_mandir}/man7/%{name}-profiles-oracle.7*
|
|
%{_mandir}/man7/%{name}-profiles-atomic.7*
|
|
%{_mandir}/man7/%{name}-profiles-compat.7*
|
|
%{_mandir}/man7/%{name}-profiles.7*
|
|
%{_mandir}/man8/%{name}*
|
|
%{_mandir}/man8/varnetload.*
|
|
%{_mandir}/man8/netdevstat.*
|
|
%{_mandir}/man8/diskdevstat.*
|
|
%{_mandir}/man8/scomes.*
|
|
|
|
%files profiles-devel
|
|
%config(noreplace) %{_sysconfdir}/%{name}/realtime-variables.conf
|
|
%{_prefix}/lib/%{name}/realtime
|
|
%config(noreplace) %{_sysconfdir}/%{name}/realtime-virtual-guest-variables.conf
|
|
%{_prefix}/lib/%{name}/realtime-virtual-guest
|
|
%config(noreplace) %{_sysconfdir}/%{name}/realtime-virtual-host-variables.conf
|
|
%{_prefix}/lib/%{name}/realtime-virtual-host
|
|
%{_mandir}/man7/%{name}-profiles-realtime.7*
|
|
%{_mandir}/man7/%{name}-profiles-nfv-guest.7*
|
|
%{_mandir}/man7/%{name}-profiles-nfv-host.7*
|
|
|
|
%changelog
|
|
* Fri Sep 18 2020 xinghe <xinghe1@huawei.com> - 2.10.0-8
|
|
- cpu Update checking if EPB is supported
|
|
|
|
* Sun Sep 7 2019 hejingxian<hejingxian@huawei.com> - 2.10.0-7
|
|
- Type:other
|
|
- ID:NA
|
|
- SUG:NA
|
|
- DESC: new package tuned-profiles-devel
|
|
|
|
* Wed Aug 28 2019 caomeng<caomeng5@huawei.com> - 2.10.0-6
|
|
- Type:other
|
|
- ID:NA
|
|
- SUG:NA
|
|
- DESC:openeuler rewrite spec file
|
|
|
|
* Wed Aug 28 2019 caomeng<caomeng5@huawei.com> - 2.10.0-5
|
|
- Package init
|
|
|
|
|