diff --git a/.gitignore b/.gitignore index b8feb8f..35164be 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /thinkfan-0.8.1.tar.gz /thinkfan-0.9.2.tar.gz +/thinkfan-0.9.3.tar.gz diff --git a/0001-Fixed-thinkfan-writing-out-garbage-to-fan-control.patch b/0001-Fixed-thinkfan-writing-out-garbage-to-fan-control.patch deleted file mode 100644 index 225f6dc..0000000 --- a/0001-Fixed-thinkfan-writing-out-garbage-to-fan-control.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 790e9d624ef356bfa1b695762fb03826520d4680 Mon Sep 17 00:00:00 2001 -From: Shuhao Wu -Date: Thu, 10 Sep 2015 21:01:39 -0400 -Subject: [PATCH] Fixed thinkfan writing out garbage to fan control - -For some reason on the line that I changed, `cur_lvl == "V"`. Not sure -why this is the case. This causes invalid argument to be thrown by the -kernel, which crashes thinkfan. - -Also fixed the build process with CMake, which seems to be broken. ---- - CMakeLists.txt | 2 +- - src/thinkfan.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index e028e2f..c650e16 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -6,7 +6,7 @@ option(USE_ATASMART "Enable reading temperatures from HDDs via S.M.A.R.T") - set(MAXERR 2 CACHE STRING "Fail after this many consecutive errors when in DANGEROUS - mode") - --add_executable(thinkfan thinkfan.c config.c message.c parser.c system.c) -+add_executable(thinkfan src/thinkfan.c src/config.c src/message.c src/parser.c src/system.c) - - set(CMAKE_C_FLAGS_DEBUG "-O0 -g3 -Wall -DDEBUG") - -diff --git a/src/thinkfan.c b/src/thinkfan.c -index b4be989..f656639 100644 ---- a/src/thinkfan.c -+++ b/src/thinkfan.c -@@ -156,7 +156,7 @@ int fancontrol() { - // Write current fan level to IBM_FAN one cycle before the watchdog - // timeout ends, to let it know we're alive. - if (unlikely((wt -= tmp_sleeptime) <= sleeptime)) { -- config->setfan(); -+ set_fan; - wt = watchdog_timeout; - } - --- -2.5.1 - diff --git a/sources b/sources index a29f2d4..c178295 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4292633aebd61b91f04cd332c4d3e181 thinkfan-0.9.2.tar.gz +1519f3a098a414fad6557720414b1689 thinkfan-0.9.3.tar.gz diff --git a/thinkfan.service b/thinkfan.service index cbf73ac..a3acd1a 100644 --- a/thinkfan.service +++ b/thinkfan.service @@ -3,9 +3,10 @@ Description=simple and lightweight fan control program After=syslog.target lm_sensors.service [Service] -EnvironmentFile=/etc/sysconfig/thinkfan ExecStart=/usr/sbin/thinkfan -n ${OPTIONS} +PIDFile=/var/run/thinkfan.pid ExecReload=/bin/kill -HUP $MAINPID +EnvironmentFile=/etc/sysconfig/thinkfan [Install] WantedBy=multi-user.target diff --git a/thinkfan.spec b/thinkfan.spec index 1fb018b..977c3f7 100644 --- a/thinkfan.spec +++ b/thinkfan.spec @@ -1,19 +1,15 @@ Name: thinkfan -Version: 0.9.2 -Release: 7%{?dist} +Version: 0.9.3 +Release: 1%{?dist} Summary: A simple fan control program License: GPLv3+ -URL: http://thinkfan.sourceforge.net/ -Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz +URL: https://github.com/vmatare/thinkfan +Source0: https://github.com/vmatare/thinkfan/archive/%{version}/%{name}-%{version}.tar.gz Source1: thinkfan.modprobe Source2: thinkfan.service Source3: thinkfan.sysconfig -# Fix #1247034 setfan_ibm: Error writing to /proc/acpi/ibm/fan: Invalid argument -# Taken from https://bugs.launchpad.net/ubuntu/+source/thinkfan/+bug/1494546 -Patch0: 0001-Fixed-thinkfan-writing-out-garbage-to-fan-control.patch - BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: systemd-units @@ -28,12 +24,10 @@ with thinkpad_acpi. It is designed to eat as little CPU power as possible. %prep -%setup -q -c +%setup -q -# Make man page documentation UTF-8 -iconv -f ISO-8859-1 -t UTF-8 thinkfan.1 > thinkfan.1.new -rm thinkfan.1 -mv thinkfan.1.new thinkfan.1 +# Workaround incorrectly placed file +mv src/thinkfan.1 . %build @@ -69,21 +63,6 @@ rm -f %{buildroot}/%{_pkgdocdir}/COPYING %postun %systemd_postun_with_restart thinkfan.service -%pretrans -p -path = "%{_sysconfdir}/sysconfig/thinkfan" -st = posix.stat(path) -if st and st.type == "directory" then - status = os.rename(path, path .. ".rpmmoved") - if not status then - suffix = 0 - while not status do - suffix = suffix + 1 - status = os.rename(path .. ".rpmmoved", path .. ".rpmmoved." .. suffix) - end - os.rename(path, path .. ".rpmmoved") - end -end - %files %license COPYING @@ -97,6 +76,9 @@ end %{_mandir}/man1/thinkfan.1.* %changelog +* Fri May 06 2016 Sandro Mani - 0.9.3-1 +- Update to 0.9.3 + * Fri Feb 05 2016 Fedora Release Engineering - 0.9.2-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild