From 442debcdd94ef14ee4843ec3f220619d10b8538b Mon Sep 17 00:00:00 2001 From: Jan Vcelak Date: Fri, 30 Mar 2012 14:43:02 +0200 Subject: [PATCH] first stable 2.0 release (starting with emtpy changelog) --- .gitignore | 3 +- sources | 2 +- tuned-systemd-path.patch | 28 ---- tuned.spec | 354 ++++++++------------------------------- 4 files changed, 71 insertions(+), 316 deletions(-) delete mode 100644 tuned-systemd-path.patch diff --git a/.gitignore b/.gitignore index eb7b67f..15f57d3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ -/tuned-0.2.21.tar.bz2 -/tuned-0.2.22.tar.bz2 +/tuned-2.0.tar.bz2 diff --git a/sources b/sources index b16401c..c45b66b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -8b9efeb2a8c46b574a98f3673a275ede tuned-0.2.22.tar.bz2 +49b47ce5d68cf6edc1ef4eba942e3b22 tuned-2.0.tar.bz2 diff --git a/tuned-systemd-path.patch b/tuned-systemd-path.patch deleted file mode 100644 index 9649785..0000000 --- a/tuned-systemd-path.patch +++ /dev/null @@ -1,28 +0,0 @@ -From d4c0b5a2d145da188b995419764f9c969b9afdbb Mon Sep 17 00:00:00 2001 -From: Jan Vcelak -Date: Tue, 20 Mar 2012 14:29:04 +0100 -Subject: [PATCH] update systemd unit file install path - -required by /lib -> /usr/lib feature ---- - Makefile | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/Makefile b/Makefile -index c88c170..84bf761 100644 ---- a/Makefile -+++ b/Makefile -@@ -165,8 +165,8 @@ install-parts-systemd: - install -m 0644 tuned.tmpfiles $(DESTDIR)/etc/tmpfiles.d/tuned.conf - - # systemd units -- mkdir -p $(DESTDIR)/lib/systemd/system -- install -m 0644 tuned.service $(DESTDIR)/lib/systemd/system -+ mkdir -p $(DESTDIR)/usr/lib/systemd/system -+ install -m 0644 tuned.service $(DESTDIR)/usr/lib/systemd/system - - # ktune: sysvinit compatiblity - mkdir -p $(DESTDIR)/etc/rc.d/init.d --- -1.7.6.5 - diff --git a/tuned.spec b/tuned.spec index 9931725..5f284d2 100644 --- a/tuned.spec +++ b/tuned.spec @@ -1,29 +1,21 @@ -%global uses_systemd (0%{?fedora} >= 15) - Summary: A dynamic adaptive system tuning daemon Name: tuned -Version: 0.2.22 +Version: 2.0 Release: 1%{?dist} -License: GPLv2+ -Group: System Environment/Daemons +License: GPLv2 # The source for this package was pulled from upstream git. Use the # following commands to get the corresponding tarball: # git clone git://git.fedorahosted.org/git/tuned.git # cd tuned -# git checkout v%{version} +# git checkout v%%{version} # make archive Source: tuned-%{version}.tar.bz2 URL: https://fedorahosted.org/tuned/ -Buildroot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) -BuildRequires: python, systemd-units -Requires: usermode ethtool udev -Requires(post): chkconfig -Requires(preun): chkconfig -Requires(preun): initscripts -Requires(postun): initscripts BuildArch: noarch - -Patch0: tuned-systemd-path.patch +BuildRequires: python, systemd-units +Requires(post): systemd-units +Requires(preun): systemd-units +Requires(postun): systemd-units %description The tuned package contains a daemon that tunes system settings dynamically. @@ -35,7 +27,6 @@ network and ATA harddisk devices are implemented. %package utils Summary: Disk and net statistic monitoring systemtap scripts Requires: systemtap -Group: Applications/System %description utils The tuned-utils package contains several systemtap scripts to allow detailed @@ -44,80 +35,78 @@ 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). +%package profiles-compat +Summary: Additional tuned profiles mainly for backward compatibility with tuned 1.0 +Requires: %{name} = %{version}-%{release} + +%description 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. + %prep %setup -q -%patch0 -p1 + %build -%install -rm -rf %{buildroot} -%if %uses_systemd - make install DESTDIR=%{buildroot} INITSYSTEM=systemd -%else - make install DESTDIR=%{buildroot} -%endif -%clean -rm -rf %{buildroot} +%install +make install DESTDIR=%{buildroot} + %post -%if !%uses_systemd - /sbin/chkconfig --add tuned -%endif -/sbin/chkconfig --add ktune +# initial instalation +if [ $1 -eq 1 ]; then + /usr/bin/systemctl daemon-reload &>/dev/null || : +fi + %preun -if [ $1 = 0 ] ; then - /sbin/service tuned stop &>/dev/null - /sbin/service ktune stop &>/dev/null - - %if !%uses_systemd - /sbin/chkconfig --del tuned - %endif - /sbin/chkconfig --del ktune +# package removal, not upgrade +if [ $1 -eq 0 ]; then + /usr/bin/systemctl --no-reload disable tuned.service &>/dev/null || : + /usr/bin/systemctl stop tuned.service &>/dev/null || : fi + %postun -if [ "$1" -ge "1" ] ; then - /sbin/service tuned condrestart &>/dev/null || : - /sbin/service ktune condrestart &>/dev/null || : +# package upgrade, not uninstall +if [ $1 -ge 1 ]; then + /usr/bin/systemctl try-restart tuned.service &>/dev/null || : fi + +%triggerun -- tuned < 2.0-0 +# remove ktune from old tuned, now part of tuned +/usr/sbin/service ktune stop &>/dev/null || : +/usr/sbin/chkconfig --del ktune &>/dev/null || : + + %files %defattr(-,root,root,-) -%doc AUTHORS ChangeLog COPYING INSTALL NEWS README doc/DESIGN.txt doc/TIPS.txt ktune/README.ktune doc/examples -%config(noreplace) %{_sysconfdir}/tuned.conf -%config(noreplace) %{_sysconfdir}/pam.d/tuned-adm -%config(noreplace) %{_sysconfdir}/security/console.apps/tuned-adm +%doc AUTHORS +%doc COPYING +%doc README +%doc doc/TIPS.txt %{_sysconfdir}/bash_completion.d +%{python_sitelib}/tuned %{_sbindir}/tuned %{_sbindir}/tuned-adm -# consolehelper hard link -%{_bindir}/tuned-adm -%config(noreplace) %{_sysconfdir}/tune-profiles/active-profile -%{_sysconfdir}/tune-profiles -%{_datadir}/tuned -%{_mandir}/man1/tuned-adm.* -%{_mandir}/man5/tuned.conf.* -%{_mandir}/man8/tuned.* -%config(noreplace) %{_sysconfdir}/sysconfig/ktune -%config(noreplace) %{_sysconfdir}/ktune.d/tunedadm.conf -%dir %{_sysconfdir}/ktune.d -%dir %{_localstatedir}/log/tuned -%dir %{_localstatedir}/run/tuned -%attr(0755,root,root) /lib/udev/tuned-mpath-iosched -/lib/udev/rules.d/* -%{_libexecdir}/tuned/ -%if %uses_systemd +%exclude %{_prefix}/lib/tuned/default +%exclude %{_prefix}/lib/tuned/desktop-powersave +%exclude %{_prefix}/lib/tuned/laptop-ac-powersave +%exclude %{_prefix}/lib/tuned/server-powersave +%exclude %{_prefix}/lib/tuned/laptop-battery-powersave +%exclude %{_prefix}/lib/tuned/enterprise-storage +%exclude %{_prefix}/lib/tuned/spindown-disk +%{_prefix}/lib/tuned +%config(noreplace) %{_sysconfdir}/tuned/active_profile %{_sysconfdir}/tmpfiles.d %{_unitdir}/tuned.service -# compatibility -%{_initddir}/ktune -%else -%{_initddir}/tuned -%{_initddir}/ktune -%endif +%dir %{_localstatedir}/log/tuned +%dir %{_localstatedir}/run/tuned +%{_mandir}/man5/tuned* +%{_mandir}/man8/tuned* %files utils %defattr(-,root,root,-) @@ -128,227 +117,22 @@ fi %{_sbindir}/netdevstat %{_sbindir}/diskdevstat %{_sbindir}/scomes +%{_bindir}/powertop2tuned %{_mandir}/man8/varnetload.* %{_mandir}/man8/netdevstat.* %{_mandir}/man8/diskdevstat.* %{_mandir}/man8/scomes.* +%files profiles-compat +%defattr(-,root,root,-) +%{_prefix}/lib/tuned/default +%{_prefix}/lib/tuned/desktop-powersave +%{_prefix}/lib/tuned/laptop-ac-powersave +%{_prefix}/lib/tuned/server-powersave +%{_prefix}/lib/tuned/laptop-battery-powersave +%{_prefix}/lib/tuned/enterprise-storage +%{_prefix}/lib/tuned/spindown-disk %changelog -* Tue Mar 20 2012 Jan Vcelak 0.2.22-1 -- fix: daemonization race with systemd -- enhancement: add pmqos-static daemon (used by ktune to set kernel PM QoS parameters) -- fix: handle IOError in net plugin -- enhancement: add support for radeon power savings -- enhancement: better formula for calculation scomes scores -- enhancement: better disks detection mechanism -- enhancement: support for disk scheduler quantum setting -- enhancement: diskdevstat, netdevstat cmdline error handling -- tuned-adm: - + fix: enabling services compatibly with systemd and sysvinit - + fix: crash when active-profile file is missing - + enhancement: sort list of profiles -- profile changes: - + latency-performance: add cpu_dma_latency=0 - + all: add virtual disks (vd*) to ktune.sysconfig - + new profile: virtual-host - + new profile: virtual-guest - -* Tue Jun 21 2011 Jan Vcelak 0.2.21-1 -- fix: crash when ethtool advertised modes in unknown format (#689715) -- fix: check if ELEVATOR_KTUNE_DEVS is set -- typo fix: scomes, pooling -> polling -- fix: handle exceptions when determining type of network device (#707079) -- remove hal-disable-polling as HAL is being removed from Fedora (#710920) -- fix: add LSB headers to ktune initscript not to cause deadlock in systemd (#690177) -- fix: incorrect handling of stdin/stdout/stderr during daemon creation (#695480) - -* Fri Mar 18 2011 Jan Vcelak 0.2.20-1 -- new manual pages: diskdevstat, netdevstat, scomes, and varnetload -- updated obsolete parts in the other manual pages -- laptop-battery-powersave profile fixes -- support for new network device naming -- EEE PC dynamic FSB reclocking is done dynamicly in CPU plugin (Jaroslav Skarvada) - -* Mon Jan 10 2011 Jan Vcelak 0.2.19-1 -- reduced FSB support on Asus EEE netbooks with Intel Atom -- consolidate ktune script functions in tuning profiles -- disable tuned daemon on s390/s390x architectures -- set readahead by multiplying previous setting -- udev rules and script for CFQ and multipath scheduler tuning - -* Mon Nov 29 2010 Jan Vcelak 0.2.18-1 -- fix hal-disable-polling if no CD drives present -- setup tmpfiles.d config to autocreate runtime directory on F15 - -* Wed Oct 06 2010 Jan Vcelak 0.2.17-1 -- added 'enterprise-storage' profile -- added support for architecture-specific configuration files -- special sysctl setting for s390x arch in 'throughtput-performance' profile -- apply I/O scheduler setting to device mapper devices -- workaround for hal-disable-polling bug -- fixed problem with network cards that provide unparsable supported network modes (#620686) - -* Wed Aug 11 2010 David Malcolm - 0.2.15-2 -- recompiling .py files against Python 2.7 (rhbz#623413) - -* Tue Jul 13 2010 Jan Vcelak 0.2.15-1 -- overall profiles update -- 'tuned-adm active' shows status of tuned and ktune services as well -- proper configuration files setup after fresh instalation -- tuned-utils: added license text - -* Fri Jun 04 2010 Jan Vcelak 0.2.14-1 -- bash completion support -- tuned-adm: profile validity check - -* Tue May 04 2010 Jan Vcelak 0.2.13-1 -- Fixed 588736 - tuned should not apply /etc/sysctl.ktune settings (Jan Vcelak) -- Fixed 577971 - error: "net.bridge.bridge-nf-call-ip6tables" is an unknown key (Thomas Woerner) - -* Tue Mar 30 2010 Jan Vcelak 0.2.12-1 -- Fixed 577983 - AttributeError: Nettool instance has no attribute 'interface' - -* Mon Mar 22 2010 Phil Knirsch 0.2.11-1 -- Added support for display of currently active profile -- Fix missing help command -- Large update to documentation and manpages -- Updated several of the profiles -- Updated ALPM powersave code in the various powersave profiles -- Disabled USB autosuspend in laptop-battery-powersave for now - -* Wed Feb 03 2010 Jan Vcelak 0.2.10-1 -- Log file moved to separate directory. - -* Mon Feb 01 2010 Jan Vcelak 0.2.9-1 -- New release. - -* Tue Jan 26 2010 Jan Vcelak 0.2.8-2 -- Included Thomas Woerner's patch checking user rights when executing - ktune service commands. -- Included Jan Vcelak's patch fixing logging module initialization. - -* Fri Jan 08 2010 Jan Vcelak 0.2.8-1 -- New release. Adds logging support. - -* Mon Dec 21 2009 Jan Vcelak 0.2.7-2 -- Fixed 542305 - [abrt] crash detected in tuned-0.2.5-2.fc12 - Some ethernet cards are not supported by 'ethtool'. - -* Fri Dec 11 2009 Thomas Woerner 0.2.7-1 -- Updated ktune to version 0.4-1 - - Supports start and stop options in profile scripts calls - - Fixed CMDLINE_ELEVATOR test (rhbz#496940#c9) - -* Tue Dec 08 2009 Phil Knirsch 0.2.6-1 -- Included Jan Vcelak's patch for pyo and pyc files -- Updated ktune.sh script for laptop-battery-powersave profile with latest - ALPM mechanism -- Fixed ktune.sh script for laptop-battery-powersave profile to stop printing - errors when files in /sys are missing - -* Thu Nov 26 2009 Petr Lautrbach 0.2.5-2 -- Added python into build requires -- Resolves: #539949 - -* Tue Nov 03 2009 Phil Knirsch 0.2.5-1 -- Moved from prerelease to normal -- Added missing ethtool requires -- Fixed 532209 - init priority wrong for ktune (Jan Vcelak) -- Fixed 530457 - [abrt] crash detected in tuned-0.2.5-0.1.fc12 (Jan Vcelak) -- Added detection of netcard supported speeds (Jan Vcelak) -- Fix ktune.sh script for stopping in regard to ALPM and CDROM polling (Phil Knirsch) - -* Mon Oct 19 2009 Marcela Mašláňová 0.2.5-0.3 -- new release - -* Thu Oct 15 2009 Petr Lautrbach 0.2.5-0.2 -- Allow run tuned-adm as root for users at the physical console - -* Mon Oct 12 2009 Petr Lautrbach 0.2.5-0.1 -- Removed dependence on kobo -- Bumped to 0.2.5 pre release version - -* Wed Sep 23 2009 Petr Lautrbach 0.2.4-2 -- fixed url to fedorahosted project page -- Resolves: #519019 - -* Mon Sep 21 2009 Petr Lautrbach 0.2.4-1 -- Update release to tuned-0.2.4 -- Resolves: #523385 - -* Tue Aug 18 2009 Phil Knirsch 0.2.3-1 -- Updated documentation -- Few more fixes for tuned-adm - -* Fri Aug 14 2009 Phil Knirsch 0.2.2-1 -- Updates to the ktune scripts -- Added support for start/stop of the ktune scripts and ktune initscript - -* Tue Aug 04 2009 Phil Knirsch - 0.2.1-1 -- Added first set of profiles -- Added tuned-adm tool for profile switching -- Fixed several issues with the tuned-adm tool - -* Mon Jul 27 2009 Thomas Woerner - 0.2.0-1 -- Integrated ktune-0.4 - -* Sun Jul 26 2009 Fedora Release Engineering - 0.1.6-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild - -* Thu Jul 16 2009 Phil Knirsch - 0.1.7-1 -- Added first version CPU tuning and monitoring plugins - -* Thu Jun 25 2009 Petr Lautrbach - 0.1.6-1 -- added scomes - -* Wed Mar 25 2009 Phil Knirsch - 0.1.5-1 -- Updated documentation, thanks to Marcela Maslanova! -- Updated diskdevstat and netdevstat to have command line arguments -- Added the possibility to output a histogram at the end of the - run for detailed information about the collected data - -* Fri Mar 06 2009 Phil Knirsch - 0.1.4-1 -- Dropped unecessary kernel-debuginfo requires from tuned-utils - -* Mon Mar 02 2009 Phil Knirsch - 0.1.3-1 -- Fixed placement of doc entry at tuned-utils package - -* Thu Feb 26 2009 Phil Knirsch - 0.1.2-1 -- Added config file option to enable/disable plugins -- Switched from ConfigParser to RawConfigParser -- Renamed doc/README.txt to doc/DESIGN.txt -- Added tuned.conf man page -- Updated tuned man page -- Updated package descriptions (#487312) -- Added documentation for utils scripts (#487312) - -* Wed Feb 25 2009 Phil Knirsch - 0.1.1-1 -- Bump version -- Added comment in empty __init__.py files -- Fixed BuildRoot tag to use latest recommendation of FPG -- Lots of whitespace changes -- Some minor README changes -- Added a changelog rule in Makefile -- Fixed rpmlint error messages -- Add init() methods to each plugin -- Call plugin init() methods during tuned's init() -- Add support for command line parameters - o -c conffile|--config==conffile to specify the location of the config file - o -d to start tuned as a daemon (instead of as normal app) -- Readded the debug output in case tuned isn't started as as daemon -- Fixed initialization of max transfer values for net tuning plugin -- Added complete cleanup code in case of tuned exiting and/or - getting a SIGTERM to restore default values -- Made the disk tuning pluging less nosy if started as non-daemon -- Fixed missing self. in the tuned.py config handling -- Added a manpage -- Fixed summary -- Added missing GPL notic to tuned.py -- Added explanation for Source entry in specfile -- Added a distarchive target for the Makefile for proper tagging in git -- Added a explanation how to create the tarball via git in the specfile -- Fixed the defattr() lines in the specfile to conform FRG - -* Mon Feb 23 2009 Phil Knirsch - 0.1.0-1 -- Initial version +* Fri Mar 30 2012 Jan Vcelak 2.0-1 +- first stable release