diff --git a/lm_sensors-3.0.0-sensord-separate.patch b/lm_sensors-3.0.0-sensord-separate.patch index 5428706..a60046d 100644 --- a/lm_sensors-3.0.0-sensord-separate.patch +++ b/lm_sensors-3.0.0-sensord-separate.patch @@ -1,10 +1,14 @@ ---- lm_sensors-3.1.1.orig/doc/progs -+++ lm_sensors-3.1.1/doc/progs +--- + doc/progs | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/doc/progs ++++ b/doc/progs @@ -53,6 +53,8 @@ see http://www.lm-sensors.org/wiki/Usefu the sensors hardware to syslog, and to alert (using syslog level ALERT) when a sensor alarm is signalled; for example, if a fan fails, a temperature limit is exceeded, etc. -+ In Suse Linux, this daemon is packaged separately. You have to explicitly ++ In SUSE Linux, this daemon is packaged separately. You have to explicitly + install the package named "sensord" if you want it. * prog/sensors/sensors (written in C, installed by `make install') diff --git a/lm_sensors-3.0.0-sysconfig_metadata.patch b/lm_sensors-3.0.0-sysconfig_metadata.patch index f0c20be..48d120d 100644 --- a/lm_sensors-3.0.0-sysconfig_metadata.patch +++ b/lm_sensors-3.0.0-sysconfig_metadata.patch @@ -2,9 +2,9 @@ prog/detect/sensors-detect | 6 ++++++ 1 file changed, 6 insertions(+) ---- lm_sensors-3.3.2.orig/prog/detect/sensors-detect -+++ lm_sensors-3.3.2/prog/detect/sensors-detect -@@ -6784,6 +6784,12 @@ sub write_config +--- a/prog/detect/sensors-detect ++++ b/prog/detect/sensors-detect +@@ -7077,6 +7077,12 @@ sub write_config or die "Sorry, can't create /etc/sysconfig/lm_sensors ($!)"; print SYSCONFIG "# Generated by sensors-detect on " . scalar localtime() . "\n"; print SYSCONFIG <<'EOT'; diff --git a/lm_sensors-3.0.3-hint-at-kernel-extra-package.patch b/lm_sensors-3.0.3-hint-at-kernel-extra-package.patch index 0b31178..1560b5a 100644 --- a/lm_sensors-3.0.3-hint-at-kernel-extra-package.patch +++ b/lm_sensors-3.0.3-hint-at-kernel-extra-package.patch @@ -6,9 +6,9 @@ package if drivers are found to be missing. prog/detect/sensors-detect | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) ---- lm_sensors-3.3.2.orig/prog/detect/sensors-detect -+++ lm_sensors-3.3.2/prog/detect/sensors-detect -@@ -2669,13 +2669,16 @@ sub initialize_conf +--- a/prog/detect/sensors-detect ++++ b/prog/detect/sensors-detect +@@ -2796,13 +2796,16 @@ sub initialize_conf # [2] -> SUBLEVEL # [3] -> EXTRAVERSION # @@ -26,7 +26,7 @@ package if drivers are found to be missing. chomp($kernel_arch = `uname -m`); # We only support kernels >= 2.6.5 -@@ -6729,6 +6732,8 @@ sub generate_modprobes +@@ -7022,6 +7025,8 @@ sub generate_modprobes print "Warning: the required module $driver is not currently installed\n". "on your system. Check http://www.lm-sensors.org/wiki/Devices for\n". "driver availability.\n\n"; diff --git a/lm_sensors-3.3.5.tar.bz2 b/lm_sensors-3.3.5.tar.bz2 deleted file mode 100644 index efd376a..0000000 --- a/lm_sensors-3.3.5.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5dae6a665e1150159a93743c4ff1943a7efe02cd9d3bb12c4805e7d7adcf4fcf -size 173609 diff --git a/lm_sensors-3.4.0-sensors-detect-fix-systemd-path.patch b/lm_sensors-3.4.0-sensors-detect-fix-systemd-path.patch new file mode 100644 index 0000000..b3ebf0b --- /dev/null +++ b/lm_sensors-3.4.0-sensors-detect-fix-systemd-path.patch @@ -0,0 +1,100 @@ +From: Jean Delvare +Subject: sensors-detect: Fix systemd paths +Upstream: submitted 2015-07-02 + +Most systems have moved systemd from / to /usr, so sensors-detect +should check for the latter too (and first.) +--- + prog/detect/sensors-detect | 53 +++++++++++++++++++++++++++------------------ + 1 file changed, 32 insertions(+), 21 deletions(-) + +--- a/prog/detect/sensors-detect ++++ b/prog/detect/sensors-detect +@@ -2728,7 +2728,7 @@ sub isa_read_i5d6 + # AUTODETECTION # + ################# + +-use vars qw($dev_i2c $sysfs_root); ++use vars qw($dev_i2c $sysfs_root $systemd_systemctl $systemd_system_dir); + + sub initialize_conf + { +@@ -2789,6 +2789,19 @@ sub initialize_conf + exit -1; + } + } ++ ++ # Detect systemd presence and paths ++ if (-x "/usr/bin/systemctl") { ++ $systemd_systemctl = "/usr/bin/systemctl"; ++ } elsif (-x "/bin/systemctl") { ++ $systemd_systemctl = "/bin/systemctl"; ++ } ++ ++ if (-d "/usr/lib/systemd/system") { ++ $systemd_system_dir = "/usr/lib/systemd/system"; ++ } elsif (-d "/lib/systemd/system") { ++ $systemd_system_dir = "/lib/systemd/system"; ++ } + } + + # [0] -> VERSION +@@ -7101,19 +7114,16 @@ EOT + print SYSCONFIG "HWMON_MODULES=\"", join(" ", @{$hwmon_modules}), "\"\n"; + close(SYSCONFIG); + +- if (-x "/bin/systemctl" && -d "/lib/systemd/system" && +- ! -f "/lib/systemd/system/lm_sensors.service") { +- print "Copy prog/init/lm_sensors.service to /lib/systemd/system\n". +- "and run 'systemctl enable lm_sensors.service'\n". +- "for initialization at boot time.\n"; +- return; +- } +- +- if (-x "/bin/systemctl" && +- -f "/lib/systemd/system/lm_sensors.service") { +- system("/bin/systemctl", "enable", "lm_sensors.service"); +- system("/bin/systemctl", "start", "lm_sensors.service"); +- # All done, don't check for /etc/init.d/lm_sensors ++ if ($systemd_systemctl && $systemd_system_dir) { ++ if (-f "$systemd_system_dir/lm_sensors.service") { ++ system($systemd_systemctl, "enable", "lm_sensors.service"); ++ system($systemd_systemctl, "start", "lm_sensors.service"); ++ # All done, don't check for /etc/init.d/lm_sensors ++ } else { ++ print "Copy prog/init/lm_sensors.service to $systemd_system_dir\n". ++ "and run 'systemctl enable lm_sensors.service'\n". ++ "for initialization at boot time.\n"; ++ } + return; + } + +@@ -7181,13 +7191,6 @@ sub main + exit -1; + } + +- if (-x "/bin/systemctl" && -f "/lib/systemd/system/lm_sensors.service") { +- system("/bin/systemctl", "stop", "lm_sensors.service"); +- } elsif (-x "/sbin/service" && -f "/etc/init.d/lm_sensors" && +- -f "/var/lock/subsys/lm_sensors") { +- system("/sbin/service", "lm_sensors", "stop"); +- } +- + initialize_kernel_version(); + initialize_conf(); + initialize_pci(); +@@ -7198,6 +7201,14 @@ sub main + initialize_modules_supported(); + initialize_cpu_list(); + ++ if ($systemd_systemctl && $systemd_system_dir && ++ -f "$systemd_system_dir/lm_sensors.service") { ++ system("$systemd_systemctl", "stop", "lm_sensors.service"); ++ } elsif (-x "/sbin/service" && -f "/etc/init.d/lm_sensors" && ++ -f "/var/lock/subsys/lm_sensors") { ++ system("/sbin/service", "lm_sensors", "stop"); ++ } ++ + print "# sensors-detect revision $revision\n"; + initialize_dmi_data(); + print_dmi_summary(); diff --git a/lm_sensors-3.4.0.tar.bz2 b/lm_sensors-3.4.0.tar.bz2 new file mode 100644 index 0000000..0b3ec47 --- /dev/null +++ b/lm_sensors-3.4.0.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e0579016081a262dd23eafe1d22b41ebde78921e73a1dcef71e05e424340061f +size 175802 diff --git a/lm_sensors-3.4.0.tar.bz2.sig b/lm_sensors-3.4.0.tar.bz2.sig new file mode 100644 index 0000000..3b89847 Binary files /dev/null and b/lm_sensors-3.4.0.tar.bz2.sig differ diff --git a/lm_sensors-r6216-fancontrol-moving-hwmon-attributes.patch b/lm_sensors-r6216-fancontrol-moving-hwmon-attributes.patch deleted file mode 100644 index 9fc3c1b..0000000 --- a/lm_sensors-r6216-fancontrol-moving-hwmon-attributes.patch +++ /dev/null @@ -1,91 +0,0 @@ -From: Jean Delvare -Subject: fancontrol: Deal with moving hwmon attributes -Upstream: Committed (http://www.lm-sensors.org/changeset/6216) - -Several kernel drivers have already moved their attributes from the -hardware device to the hwmon class device, and others will follow. -Teach fancontrol about this possibility and let it adjust the attribute -paths transparently. ---- - prog/pwm/fancontrol | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 63 insertions(+) - ---- lm_sensors-3.3.5.orig/prog/pwm/fancontrol 2014-11-05 11:39:50.709481711 +0100 -+++ lm_sensors-3.3.5/prog/pwm/fancontrol 2014-11-05 11:39:55.983598361 +0100 -@@ -206,6 +206,65 @@ function ValidateDevices() - return $outdated - } - -+function FixupDeviceFiles -+{ -+ local DEVICE="$1" -+ local fcvcount pwmo tsen fan -+ -+ let fcvcount=0 -+ while (( $fcvcount < ${#AFCPWM[@]} )) # go through all pwm outputs -+ do -+ pwmo=${AFCPWM[$fcvcount]} -+ AFCPWM[$fcvcount]=${pwmo//$DEVICE\/device/$DEVICE} -+ if [ "${AFCPWM[$fcvcount]}" != "$pwmo" ] -+ then -+ echo "Adjusing $pwmo -> ${AFCPWM[$fcvcount]}" -+ fi -+ let fcvcount=$fcvcount+1 -+ done -+ -+ let fcvcount=0 -+ while (( $fcvcount < ${#AFCTEMP[@]} )) # go through all temp inputs -+ do -+ tsen=${AFCTEMP[$fcvcount]} -+ AFCTEMP[$fcvcount]=${tsen//$DEVICE\/device/$DEVICE} -+ if [ "${AFCTEMP[$fcvcount]}" != "$tsen" ] -+ then -+ echo "Adjusing $tsen -> ${AFCTEMP[$fcvcount]}" -+ fi -+ let fcvcount=$fcvcount+1 -+ done -+ -+ let fcvcount=0 -+ while (( $fcvcount < ${#AFCFAN[@]} )) # go through all fan inputs -+ do -+ fan=${AFCFAN[$fcvcount]} -+ AFCFAN[$fcvcount]=${fan//$DEVICE\/device/$DEVICE} -+ if [ "${AFCFAN[$fcvcount]}" != "$fan" ] -+ then -+ echo "Adjusing $fan -> ${AFCFAN[$fcvcount]}" -+ fi -+ let fcvcount=$fcvcount+1 -+ done -+} -+ -+# Some drivers moved their attributes from hard device to class device -+function FixupFiles -+{ -+ local DEVPATH="$1" -+ local entry device -+ -+ for entry in $DEVPATH -+ do -+ device=`echo "$entry" | sed -e 's/=[^=]*$//'` -+ -+ if [ -e "$device/name" ] -+ then -+ FixupDeviceFiles "$device" -+ fi -+ done -+} -+ - # Check that all referenced sysfs files exist - function CheckFiles - { -@@ -306,6 +365,10 @@ then - echo "Configuration appears to be outdated, please run pwmconfig again" >&2 - exit 1 - fi -+if [ "$DIR" = "/sys/class/hwmon" ] -+then -+ FixupFiles "$DEVPATH" -+fi - CheckFiles || exit 1 - - if [ -f "$PIDFILE" ] diff --git a/lm_sensors-r6237-default-config-NCT6779-NCT6791.patch b/lm_sensors-r6237-default-config-NCT6779-NCT6791.patch deleted file mode 100644 index d5e5b37..0000000 --- a/lm_sensors-r6237-default-config-NCT6779-NCT6791.patch +++ /dev/null @@ -1,18 +0,0 @@ -From: Jean Delvare -Subject: sensors.conf.default: Add support for NCT6779 and NCT6791 -Upstream: Committed (http://www.lm-sensors.org/changeset/6237) ---- - etc/sensors.conf.default | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- lm_sensors-3.3.5.orig/etc/sensors.conf.default 2014-11-05 11:39:50.625479853 +0100 -+++ lm_sensors-3.3.5/etc/sensors.conf.default 2014-11-05 11:39:56.157602209 +0100 -@@ -308,7 +308,7 @@ chip "w83627thf-*" - # set in8_max 3.0 * 1.10 - - --chip "w83627ehf-*" "w83627dhg-*" "w83667hg-*" "nct6775-*" "nct6776-*" -+chip "w83627ehf-*" "w83627dhg-*" "w83667hg-*" "nct6775-*" "nct6776-*" "nct6779-*" "nct6791-*" - - label in0 "Vcore" - label in2 "AVCC" diff --git a/lm_sensors-r6254-detect-print-kernel-cpu.patch b/lm_sensors-r6254-detect-print-kernel-cpu.patch deleted file mode 100644 index fcfb393..0000000 --- a/lm_sensors-r6254-detect-print-kernel-cpu.patch +++ /dev/null @@ -1,46 +0,0 @@ -From: Jean Delvare -Subject: Print kernel version and processor information -Upstream: Committed (http://www.lm-sensors.org/changeset/6254) - -Print the kernel version and the processor information, to make user -support easier. ---- - prog/detect/sensors-detect | 13 +++++++++++++ - 1 file changed, 13 insertions(+) - ---- lm_sensors-3.3.5.orig/prog/detect/sensors-detect 2014-11-05 11:39:50.581478880 +0100 -+++ lm_sensors-3.3.5/prog/detect/sensors-detect 2014-11-05 11:39:56.331606058 +0100 -@@ -2688,6 +2688,11 @@ sub initialize_kernel_version - } - } - -+sub print_kernel_version -+{ -+ printf "# Kernel: \%d.\%d.\%d\%s \%s\n", @kernel_version, $kernel_arch; -+} -+ - sub kernel_version_at_least - { - my ($vers, $plvl, $slvl) = @_; -@@ -2732,6 +2737,12 @@ sub initialize_cpu_list - push @cpu, $entry if scalar keys(%{$entry}); # Last entry - } - -+sub print_cpu_info -+{ -+ my $cpu = $cpu[0]; -+ print "# Processor: $cpu->{'model name'} ($cpu->{'cpu family'}/$cpu->{model}/$cpu->{stepping})\n"; -+} -+ - # @i2c_adapters is a list of references to hashes, one hash per I2C/SMBus - # adapter present on the system. Each entry has the following keys: path, - # parent, name (directly taken from sysfs), driver and autoload. -@@ -6908,6 +6919,8 @@ sub main - print "# sensors-detect revision $revision\n"; - initialize_dmi_data(); - print_dmi_summary(); -+ print_kernel_version(); -+ print_cpu_info(); - print "\n"; - - if ($opt{auto}) { diff --git a/lm_sensors-r6255-fix-shell-error-FCFANS.patch b/lm_sensors-r6255-fix-shell-error-FCFANS.patch deleted file mode 100644 index 9a0ffd7..0000000 --- a/lm_sensors-r6255-fix-shell-error-FCFANS.patch +++ /dev/null @@ -1,23 +0,0 @@ -From: Jean Delvare -Subject: fancontrol: Fix shell error when FCFANS is not set -Upstream: Committed (http://www.lm-sensors.org/changeset/6255) -References: bnc#903520 - -The bug was introduced when I added support for multiple fans -controlled by the same PWM output, in r6000. lm-sensors versions -affected: 3.3.2 to 3.3.5. ---- - prog/pwm/fancontrol | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - ---- lm_sensors-3.3.5.orig/prog/pwm/fancontrol 2014-11-05 11:39:55.983598361 +0100 -+++ lm_sensors-3.3.5/prog/pwm/fancontrol 2014-11-05 11:39:56.500609796 +0100 -@@ -513,7 +513,7 @@ function UpdateFanSpeeds - fi - done - else -- fanval=1 # set it to a non zero value, so the rest of the script still works -+ min_fanval=1 # set it to a non zero value, so the rest of the script still works - fi - - # debug info diff --git a/lm_sensors-r6282-detect-graphics-card-in-all-cases.patch b/lm_sensors-r6282-detect-graphics-card-in-all-cases.patch deleted file mode 100644 index 703fc9e..0000000 --- a/lm_sensors-r6282-detect-graphics-card-in-all-cases.patch +++ /dev/null @@ -1,24 +0,0 @@ -Subject: sensors-detect: Detect graphics card in all cases -Patch-mainline: yes (r6282) - -On recent kernels, the i2c bus may not be an immediate child of the -graphics device, instead there can be a drm class device in between. -Treat all drm class devices as graphics devices so that probing the -i2c bus is disabled by default as intended. ---- - prog/detect/sensors-detect | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - ---- a/prog/detect/sensors-detect -+++ b/prog/detect/sensors-detect -@@ -3773,7 +3773,9 @@ sub get_pci_class - my ($subsystem, $class); - - $subsystem = sysfs_device_subsystem($device); -- return 0 unless defined $subsystem && $subsystem eq "pci"; -+ return 0 unless defined $subsystem; -+ return 0x0300 if $subsystem eq "drm"; # Graphics card -+ return 0 unless $subsystem eq "pci"; - - $class = sysfs_device_attribute($device, "class"); - return 0 unless defined $class; diff --git a/lm_sensors-r6283-skip-addresses-0x37-0x4f-on-DDC.patch b/lm_sensors-r6283-skip-addresses-0x37-0x4f-on-DDC.patch deleted file mode 100644 index a34212a..0000000 --- a/lm_sensors-r6283-skip-addresses-0x37-0x4f-on-DDC.patch +++ /dev/null @@ -1,26 +0,0 @@ -Subject: sensors-detect: Skip addresses 0x37 and 0x4f on DDC channels -Patch-mainline: yes (r6283) - -We already skip EDID addresses (0x50-0x57) by default on graphics card -I2C/DDC buses. Also skip 0x37 (DDC/CI) and 0x4f which was recently -reported as corrupting a laptop's display when probed. - ---- - prog/detect/sensors-detect | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - ---- a/prog/detect/sensors-detect -+++ b/prog/detect/sensors-detect -@@ -3819,8 +3819,10 @@ sub scan_i2c_adapter - chomp($input); - @not_to_scan = parse_not_to_scan(0x03, 0x77, $input); - } elsif (($class & 0xff00) == 0x0300) { -- # Skip EDID addresses by default on graphics adapters -- @not_to_scan = parse_not_to_scan(0x03, 0x77, "0x50-0x57"); -+ # Skip EDID and DDC/CI addresses by default on graphics -+ # adapters. Also skip address 0x4f which was reported in a -+ # display corruption case. -+ @not_to_scan = parse_not_to_scan(0x03, 0x77, "0x37, 0x50-0x57, 0x4f"); - } - - open(local *FILE, "$dev_i2c$adapter_nr") or diff --git a/sensors.changes b/sensors.changes index 5ea30f6..3d042e2 100644 --- a/sensors.changes +++ b/sensors.changes @@ -1,3 +1,31 @@ +------------------------------------------------------------------- +Thu Jul 2 10:55:58 CEST 2015 - jdelvare@suse.com + +- lm_sensors-3.4.0-sensors-detect-fix-systemd-path.patch: Handle + the move of systemd from / to /usr. + +------------------------------------------------------------------- +Tue Jun 30 13:08:50 CEST 2015 - jdelvare@suse.com + +- Update to lm_sensors 3.4.0 + * library: The arbitrary limit on per-type sensor count is gone. + Support for temperature min and critical min hysteresis. + * sensors: Support for temperature min and critical min + hysteresis. + * fancontrol: Deal with moving hwmon attributes. Reduce memory + consumption. + * sensors-detect: Detection of new devices. + * lm_sensors-r6216-fancontrol-moving-hwmon-attributes.patch, + lm_sensors-r6237-default-config-NCT6779-NCT6791.patch, + lm_sensors-r6254-detect-print-kernel-cpu.patch, + lm_sensors-r6255-fix-shell-error-FCFANS.patch, + lm_sensors-r6282-detect-graphics-card-in-all-cases.patch, + lm_sensors-r6283-skip-addresses-0x37-0x4f-on-DDC.patch: + Removed, upstream now. + * lm_sensors-3.0.0-sensord-separate.patch, + lm_sensors-3.0.0-sysconfig_metadata.patch, + lm_sensors-3.0.3-hint-at-kernel-extra-package.patch: Refreshed. + ------------------------------------------------------------------- Tue Jun 9 15:40:57 CEST 2015 - jdelvare@suse.com diff --git a/sensors.spec b/sensors.spec index e413b07..d46d278 100644 --- a/sensors.spec +++ b/sensors.spec @@ -22,25 +22,21 @@ BuildRequires: flex BuildRequires: rrdtool-devel BuildRequires: systemd-rpm-macros Url: http://www.lm-sensors.org/ -Version: 3.3.5 +Version: 3.4.0 Release: 0 Summary: Hardware health monitoring for Linux License: GPL-2.0+ Group: System/Monitoring Requires: modutils Source0: http://dl.lm-sensors.org/lm-sensors/releases/lm_sensors-%{version}.tar.bz2 +Source3: http://dl.lm-sensors.org/lm-sensors/releases/lm_sensors-%{version}.tar.bz2.sig Source1: sysconfig.sensord Source2: baselibs.conf Patch1: lm_sensors-3.1.1-build.patch Patch2: lm_sensors-3.0.0-sensord-separate.patch Patch3: lm_sensors-3.0.0-sysconfig_metadata.patch Patch4: lm_sensors-3.0.3-hint-at-kernel-extra-package.patch -Patch5: lm_sensors-r6216-fancontrol-moving-hwmon-attributes.patch -Patch6: lm_sensors-r6237-default-config-NCT6779-NCT6791.patch -Patch7: lm_sensors-r6254-detect-print-kernel-cpu.patch -Patch8: lm_sensors-r6255-fix-shell-error-FCFANS.patch -Patch9: lm_sensors-r6282-detect-graphics-card-in-all-cases.patch -Patch10: lm_sensors-r6283-skip-addresses-0x37-0x4f-on-DDC.patch +Patch5: lm_sensors-3.4.0-sensors-detect-fix-systemd-path.patch ExcludeArch: s390 s390x %{?systemd_requires} @@ -103,11 +99,6 @@ sense to the user. %patch3 -p1 %patch4 -p1 %patch5 -p1 -%patch6 -p1 -%patch7 -p1 -%patch8 -p1 -%patch9 -p1 -%patch10 -p1 %build RPM_OPT_FLAGS="$RPM_OPT_FLAGS"