From 8b8335e5e45c9fdfe348a99b7d13a6abe65840ac Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Mon, 11 Feb 2008 13:21:03 +0000 Subject: [PATCH] - New upstream release 3.0.1 - Drop several patches which are included in the new upstream release - Add a patch to make the initscript returncodes LSB compliant (bug 431884) --- lm_sensors-2.10.4-service-default-off.patch | 37 +++++++++++-------- lm_sensors-3.0.0-lsb-retcode.patch | 30 +++++++++++++++ lm_sensors-3.0.0-sensord.patch | 13 ------- lm_sensors-3.0.0-sensors.conf.patch | 35 ------------------ ...s-3.0.1-sensors-detect-special-chips.patch | 23 ++++++++++++ lm_sensors.spec | 13 +++++-- 6 files changed, 83 insertions(+), 68 deletions(-) create mode 100644 lm_sensors-3.0.0-lsb-retcode.patch delete mode 100644 lm_sensors-3.0.0-sensord.patch delete mode 100644 lm_sensors-3.0.0-sensors.conf.patch create mode 100644 lm_sensors-3.0.1-sensors-detect-special-chips.patch diff --git a/lm_sensors-2.10.4-service-default-off.patch b/lm_sensors-2.10.4-service-default-off.patch index 4da96af..474ce07 100644 --- a/lm_sensors-2.10.4-service-default-off.patch +++ b/lm_sensors-2.10.4-service-default-off.patch @@ -1,20 +1,25 @@ ---- lm_sensors-2.10.4/prog/detect/sensors-detect~ 2007-07-19 13:53:58.000000000 -0400 -+++ lm_sensors-2.10.4/prog/detect/sensors-detect 2007-08-21 14:29:25.000000000 -0400 -@@ -5785,10 +5785,8 @@ - $i++; - } - print SYSCONFIG $sysconfig; -- -- print "Copy prog/init/lm_sensors.init to /etc/init.d/lm_sensors\n". -- "for initialization at boot time.\n" -- unless -f "/etc/init.d/lm_sensors"; -+ -+ system("/sbin/chkconfig", "lm_sensors", "on"); - } - } +diff -up lm_sensors-3.0.1/prog/detect/sensors-detect.foo lm_sensors-3.0.1/prog/detect/sensors-detect +--- lm_sensors-3.0.1/prog/detect/sensors-detect.foo 2008-01-22 13:22:47.000000000 +0100 ++++ lm_sensors-3.0.1/prog/detect/sensors-detect 2008-02-11 13:42:04.000000000 +0100 +@@ -5943,6 +5943,15 @@ EOT ---- lm_sensors-2.10.4/prog/init/lm_sensors.init~ 2007-08-22 16:43:50.000000000 +0200 -+++ lm_sensors-2.10.4/prog/init/lm_sensors.init 2007-08-22 16:43:50.000000000 +0200 + if (-x "/sbin/insserv" && -f "/etc/init.d/lm_sensors") { + system("/sbin/insserv", "/etc/init.d/lm_sensors"); ++ } elsif (-x "/sbin/chkconfig" && -f "/etc/init.d/lm_sensors") { ++ system("/sbin/chkconfig", "lm_sensors", "on"); ++ if (-x "/sbin/service") { ++ if (-f "/var/lock/subsys/lm_sensors") { ++ system("/sbin/service", "lm_sensors", "restart"); ++ } else { ++ system("/sbin/service", "lm_sensors", "start"); ++ } ++ } + } else { + print "You should now start the lm_sensors service to load the required\n". + "kernel modules.\n\n"; +diff -up lm_sensors-3.0.1/prog/init/lm_sensors.init.foo lm_sensors-3.0.1/prog/init/lm_sensors.init +--- lm_sensors-3.0.1/prog/init/lm_sensors.init.foo 2007-04-27 14:34:17.000000000 +0200 ++++ lm_sensors-3.0.1/prog/init/lm_sensors.init 2008-02-11 13:08:58.000000000 +0100 @@ -1,6 +1,6 @@ #!/bin/sh # diff --git a/lm_sensors-3.0.0-lsb-retcode.patch b/lm_sensors-3.0.0-lsb-retcode.patch new file mode 100644 index 0000000..4b17b13 --- /dev/null +++ b/lm_sensors-3.0.0-lsb-retcode.patch @@ -0,0 +1,30 @@ +--- lm_sensors/prog/init/lm_sensors.init 2008-02-07 11:37:22.000000000 -0500 ++++ lm_sensors/prog/init/lm_sensors.init 2008-02-07 11:41:04.000000000 -0500 +@@ -40,15 +40,15 @@ + + # Don't bother if /proc/sensors still doesn't exist, kernel doesn't have + # support for sensors. +- [ -e /proc/sys/dev/sensors ] || exit 0 ++ [ -e /proc/sys/dev/sensors ] || exit 6 + + # If sensors was not already running, unload the module... + [ -e /var/lock/subsys/lm_sensors ] || /sbin/modprobe -r i2c-proc >/dev/null 2>&1 + fi + + CONFIG=/etc/sysconfig/lm_sensors +-[ -r "$CONFIG" ] || exit 0 +-grep '^MODULE_' $CONFIG >/dev/null 2>&1 || exit 0 ++[ -r "$CONFIG" ] || exit 6 ++grep '^MODULE_' $CONFIG >/dev/null 2>&1 || exit 6 + + # Load config file + . "$CONFIG" +@@ -147,7 +147,7 @@ + ;; + *) + echo "Usage: $0 {start|stop|status|restart|reload|condrestart}" +- exit 1 ++ exit 3 + esac + + exit $RETVAL diff --git a/lm_sensors-3.0.0-sensord.patch b/lm_sensors-3.0.0-sensord.patch deleted file mode 100644 index 1c0a157..0000000 --- a/lm_sensors-3.0.0-sensord.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- lm-sensors-3.0.0/prog/sensord/rrd.c (revision 4849) -+++ lm-sensors-3.0.0/prog/sensord/rrd.c (revision 5069) -@@ -157,8 +157,8 @@ - for (index0 = 0; (ret == 0) && (num < MAX_RRD_SENSORS) && features[index0].format; ++ index0) { - const FeatureDescriptor *feature = features + index0; -- const char *rawLabel = features->feature->name; -+ const char *rawLabel = feature->feature->name; - char *label = NULL; - -- if (!(label = sensors_get_label (chip, features->feature))) { -+ if (!(label = sensors_get_label (chip, feature->feature))) { - sensorLog (LOG_ERR, "Error getting sensor label: %s/%s", chip->prefix, rawLabel); - ret = -1; diff --git a/lm_sensors-3.0.0-sensors.conf.patch b/lm_sensors-3.0.0-sensors.conf.patch deleted file mode 100644 index 8727566..0000000 --- a/lm_sensors-3.0.0-sensors.conf.patch +++ /dev/null @@ -1,35 +0,0 @@ ---- lm-sensors-3.0.0/etc/sensors.conf.eg (revision 4980) -+++ lm-sensors-3.0.0/etc/sensors.conf.eg (revision 5076) -@@ -938,5 +938,5 @@ - - compute in2 (197/47)*@ , @/(197/47) -- compute in4 (5*@)-(4*in0) , (@+4*in0)/5 -+ compute in4 (5*@)-(4*in0_input) , (@+4*in0_input)/5 - - # set in0_min 4.8 -@@ -988,6 +988,6 @@ - compute in3 (2.8/1.9) * @, @ * 1.9/2.8 - compute in4 (160/30.1 + 1) * @, @ / (160/30.1 + 1) -- compute in5 (160/35.7)*(@ - in0) + @, (@ + in0 * 160/35.7)/ (1 + 160/35.7) -- compute in6 (36/16.2)*(@ - in0) + @, (@ + in0 * 36/16.2) / (1 + 36/16.2) -+ compute in5 (160/35.7)*(@ - in0_input) + @, (@ + in0_input * 160/35.7)/ (1 + 160/35.7) -+ compute in6 (36/16.2)*(@ - in0_input) + @, (@ + in0_input * 36/16.2) / (1 + 36/16.2) - - # set in0_min 5 * 0.95 -@@ -2065,10 +2065,10 @@ - # default). If not, use 3.3 instead, but you lose accuracy. - -- compute temp4 3435 / (` (1 / (1 - @ / in10) - 1) + 3435 / 298.15) - 273.15, \ -- in10 * (1 - 1 / (1 + (^ (3435 / (273.15 + @) - 3435 / 298.15)))) -- compute temp5 3435 / (` (1 / (1 - @ / in10) - 1) + 3435 / 298.15) - 273.15, \ -- in10 * (1 - 1 / (1 + (^ (3435 / (273.15 + @) - 3435 / 298.15)))) -- compute temp6 3435 / (` (1 / (1 - @ / in10) - 1) + 3435 / 298.15) - 273.15, \ -- in10 * (1 - 1 / (1 + (^ (3435 / (273.15 + @) - 3435 / 298.15)))) -+ compute temp4 3435 / (` (1 / (1 - @ / in10_input) - 1) + 3435 / 298.15) - 273.15, \ -+ in10_input * (1 - 1 / (1 + (^ (3435 / (273.15 + @) - 3435 / 298.15)))) -+ compute temp5 3435 / (` (1 / (1 - @ / in10_input) - 1) + 3435 / 298.15) - 273.15, \ -+ in10_input * (1 - 1 / (1 + (^ (3435 / (273.15 + @) - 3435 / 298.15)))) -+ compute temp6 3435 / (` (1 / (1 - @ / in10_input) - 1) + 3435 / 298.15) - 273.15, \ -+ in10_input * (1 - 1 / (1 + (^ (3435 / (273.15 + @) - 3435 / 298.15)))) - - # set temp4_min 0 diff --git a/lm_sensors-3.0.1-sensors-detect-special-chips.patch b/lm_sensors-3.0.1-sensors-detect-special-chips.patch new file mode 100644 index 0000000..5413a9f --- /dev/null +++ b/lm_sensors-3.0.1-sensors-detect-special-chips.patch @@ -0,0 +1,23 @@ +diff -up lm_sensors-3.0.1/prog/detect/sensors-detect~ lm_sensors-3.0.1/prog/detect/sensors-detect +--- lm_sensors-3.0.1/prog/detect/sensors-detect~ 2008-02-11 13:59:25.000000000 +0100 ++++ lm_sensors-3.0.1/prog/detect/sensors-detect 2008-02-11 13:59:25.000000000 +0100 +@@ -5677,6 +5677,9 @@ sub main + initialize_conf; + initialize_proc_pci; + initialize_modules_list; ++ # make sure any special case chips are added to the chip_ids list before ++ # making the support modules list ++ chip_special_cases(); + initialize_modules_supported; + initialize_cpu_list(); + +@@ -5740,9 +5744,6 @@ sub main + print "\n"; + } + +- # Before looking for chips, make sure any special case chips are +- # added to the chip_ids list +- chip_special_cases(); + $i2c_addresses_to_scan = i2c_addresses_to_scan(); + + print "We are now going to do the I2C/SMBus adapter probings. Some chips may\n", diff --git a/lm_sensors.spec b/lm_sensors.spec index 129cc3f..851e218 100644 --- a/lm_sensors.spec +++ b/lm_sensors.spec @@ -1,6 +1,6 @@ Name: lm_sensors -Version: 3.0.0 -Release: 3%{?dist} +Version: 3.0.1 +Release: 1%{?dist} URL: http://www.lm-sensors.org/ Source: http://dl.lm-sensors.org/lm-sensors/releases/%{name}-%{version}.tar.bz2 Source1: lm_sensors.sysconfig @@ -8,8 +8,8 @@ Source1: lm_sensors.sysconfig Source2: sensord.sysconfig Source3: sensord.init Patch0: lm_sensors-2.10.4-service-default-off.patch -Patch1: lm_sensors-3.0.0-sensord.patch -Patch2: lm_sensors-3.0.0-sensors.conf.patch +Patch1: lm_sensors-3.0.0-lsb-retcode.patch +Patch2: lm_sensors-3.0.1-sensors-detect-special-chips.patch Summary: Hardware monitoring tools Group: Applications/System License: GPLv2+ @@ -167,6 +167,11 @@ fi %changelog +* Mon Feb 11 2008 Hans de Goede 3.0.1-1 +- New upstream release 3.0.1 +- Drop several patches which are included in the new upstream release +- Add a patch to make the initscript returncodes LSB compliant (bug 431884) + * Tue Dec 18 2007 Hans de Goede 3.0.0-3 - Fix sensors.conf errors with certain chips (patch send in by upstream)