diff --git a/tlp-initfix.patch b/tlp-initfix.patch new file mode 100644 index 0000000..973a047 --- /dev/null +++ b/tlp-initfix.patch @@ -0,0 +1,13 @@ +diff --git a/tlp.init b/tlp.init +index a3e6d35..0174e39 100755 +--- a/tlp.init ++++ b/tlp.init +@@ -4,6 +4,8 @@ + # + # Copyright (c) 2017 Thomas Koch + # This software is licensed under the GPL v2 or later. ++# ++# chkconfig: 2345 98 01 + + ### BEGIN INIT INFO + # Provides: tlp diff --git a/tlp.spec b/tlp.spec index 108d93c..f5f812c 100644 --- a/tlp.spec +++ b/tlp.spec @@ -1,10 +1,13 @@ Name: tlp Version: 0.9 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Advanced power management tool for Linux License: GPLv2+ URL: http://linrunner.de/tlp Source0: https://github.com/linrunner/TLP/archive/%{version}.tar.gz +#Fix for init script, will be fixed upstream: +#https://github.com/linrunner/TLP/issues/248 +Patch0: %{name}-initfix.patch #The following requires are not detected: Requires: ethtool @@ -16,6 +19,12 @@ Requires: udev Requires: usbutils Requires: pciutils Requires: pm-utils +Requires(post): chkconfig +Requires(preun): chkconfig +# This is for /sbin/service +Requires(preun): initscripts +# This is for /sbin/service +Requires(postun): initscripts #Note: Conflicts with laptop-mode-tools #Makes sure laptop_mode isn't being used: @@ -40,6 +49,7 @@ based on dock events and the Network Manager connection status. %prep %autosetup -n TLP-%{version} + #Epel6 uses a different initdir than in the makefile: sed -i "s|/etc/init.d/tlp|%{_initddir}/tlp|g" Makefile @@ -86,10 +96,12 @@ if [ "$1" -ge "1" ] ; then /sbin/service tlp condrestart >/dev/null 2>&1 || : fi -%post rdw -/bin/systemctl enable NetworkManager-dispatcher.service >/dev/null 2>&1 || : - %changelog +* Tue Jan 17 2017 Jeremy Newton - 0.9-3 +- Init script fix (missing chkconfig) +- SysV fixes (added proper requires) +- Removed systemd script from rdw + * Tue Jan 17 2017 Jeremy Newton - 0.9-2 - Remove kernel-tools req (not in epel6) - Revert back to arched package (forgot that pm-utils still needs this)