From 62a51f9504a6f6567d7f5d41e80b40dfeb89ee48 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Nov 03 2016 06:09:50 +0000 Subject: import lm_sensors-3.4.0-4.20160601gitf9185e5.el7 --- diff --git a/.gitignore b/.gitignore index 1943c4a..0f7af11 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/lm_sensors-3.3.4.tar.bz2 +SOURCES/lm-sensors-f9185e5c060ff22d2c8d4f6a19d317a529171c72.tar.gz diff --git a/.lm_sensors.metadata b/.lm_sensors.metadata index cef3641..f653d5c 100644 --- a/.lm_sensors.metadata +++ b/.lm_sensors.metadata @@ -1 +1 @@ -4e62538ca99973ff505f2eeb5b841bb402e996d8 SOURCES/lm_sensors-3.3.4.tar.bz2 +dd5bf20d5c25bd66848a74dac5ee1968a2cf3bb0 SOURCES/lm-sensors-f9185e5c060ff22d2c8d4f6a19d317a529171c72.tar.gz diff --git a/SOURCES/lm_sensors-3.3.4-lm_sensors-service-modprobe-warnings.patch b/SOURCES/lm_sensors-3.3.4-lm_sensors-service-modprobe-warnings.patch index c3c545e..17e633b 100644 --- a/SOURCES/lm_sensors-3.3.4-lm_sensors-service-modprobe-warnings.patch +++ b/SOURCES/lm_sensors-3.3.4-lm_sensors-service-modprobe-warnings.patch @@ -1,7 +1,17 @@ -diff -Naur lm_sensors-3.3.4.orig/prog/init/lm_sensors.service lm_sensors-3.3.4/prog/init/lm_sensors.service ---- lm_sensors-3.3.4.orig/prog/init/lm_sensors.service 2011-04-27 19:35:18.000000000 +0200 -+++ lm_sensors-3.3.4/prog/init/lm_sensors.service 2013-07-30 17:03:23.918671002 +0200 -@@ -6,9 +6,9 @@ +From 198101f07f8f70a471596b16788af69c43c41ddc Mon Sep 17 00:00:00 2001 +From: Martin Sehnoutka +Date: Wed, 1 Jun 2016 12:54:13 +0200 +Subject: [PATCH] lm_sensors-3.3.4-lm_sensors-service-modprobe-warnings + +--- + prog/init/lm_sensors.service | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/prog/init/lm_sensors.service b/prog/init/lm_sensors.service +index 7d3bf80..fb56a91 100644 +--- a/prog/init/lm_sensors.service ++++ b/prog/init/lm_sensors.service +@@ -5,9 +5,9 @@ Description=Initialize hardware monitoring sensors EnvironmentFile=/etc/sysconfig/lm_sensors Type=oneshot RemainAfterExit=yes @@ -13,3 +23,6 @@ diff -Naur lm_sensors-3.3.4.orig/prog/init/lm_sensors.service lm_sensors-3.3.4/p [Install] WantedBy=multi-user.target +-- +2.7.4 + diff --git a/SOURCES/lm_sensors-3.3.4-man-sensors-conf-conv.patch b/SOURCES/lm_sensors-3.3.4-man-sensors-conf-conv.patch deleted file mode 100644 index 12ce553..0000000 --- a/SOURCES/lm_sensors-3.3.4-man-sensors-conf-conv.patch +++ /dev/null @@ -1,48 +0,0 @@ -diff -Naur lm_sensors-3.3.4.orig/etc/Module.mk lm_sensors-3.3.4/etc/Module.mk ---- lm_sensors-3.3.4.orig/etc/Module.mk 2009-07-24 15:52:28.000000000 +0200 -+++ lm_sensors-3.3.4/etc/Module.mk 2013-08-01 13:47:42.000000000 +0200 -@@ -32,10 +32,13 @@ - -a ! -e $(DESTDIR)$(ETCDIR)/modprobe.d/lm_sensors.conf ] ; then \ - $(MV) $(DESTDIR)$(ETCDIR)/modprobe.d/lm_sensors $(DESTDIR)$(ETCDIR)/modprobe.d/lm_sensors.conf ; \ - fi -+ $(MKDIR) $(DESTDIR)$(MANDIR)/man8 -+ $(INSTALL) -m 644 $(ETC_DIR)/sensors-conf-convert.8 $(DESTDIR)$(MANDIR)/man8 - - user_install :: install-etc - - uninstall-etc: - $(RM) $(DESTDIR)$(BINDIR)/sensors-conf-convert -+ $(RM) $(DESTDIR)$(MANDIR)/man8/sensors-conf-convert.8 - - user_uninstall :: uninstall-etc -diff -Naur lm_sensors-3.3.4.orig/etc/sensors-conf-convert.8 lm_sensors-3.3.4/etc/sensors-conf-convert.8 ---- lm_sensors-3.3.4.orig/etc/sensors-conf-convert.8 1970-01-01 01:00:00.000000000 +0100 -+++ lm_sensors-3.3.4/etc/sensors-conf-convert.8 2013-08-01 13:34:06.197767137 +0200 -@@ -0,0 +1,27 @@ -+.TH SENSORS-CONF-CONVERT 8 "August 2013" "lm-sensors 3" -+.SH NAME -+sensors-conf-convert \- sensors configuration conversion -+ -+.SH SYNOPSIS -+.B sensors-conf-convert -+\ < -+.I /etc/sensors.conf -+\ \ \ > -+.I /etc/sensors3.conf -+ -+.SH DESCRIPTION -+The purpose of the -+.B sensors-conf-convert -+tool is to convert -+.I sensors.conf -+from the lm_sensors version 2 to the lm_sensors -+version 3 format. -+.P -+The data are read from the standard input and the result -+is written to the standard output. -+ -+.SH SEE ALSO -+sensors(1) -+ -+.SH AUTHOR -+Jean Delvare diff --git a/SOURCES/lm_sensors-3.3.4-sensors-detect-null-input.patch b/SOURCES/lm_sensors-3.3.4-sensors-detect-null-input.patch deleted file mode 100644 index 3d7ef79..0000000 --- a/SOURCES/lm_sensors-3.3.4-sensors-detect-null-input.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff -Naur lm_sensors-3.3.4.orig/prog/detect/sensors-detect lm_sensors-3.3.4/prog/detect/sensors-detect ---- lm_sensors-3.3.4.orig/prog/detect/sensors-detect 2013-05-20 21:25:22.000000000 +0200 -+++ lm_sensors-3.3.4/prog/detect/sensors-detect 2013-07-25 18:24:41.636807410 +0200 -@@ -3707,7 +3707,7 @@ - "Do you want to scan it? (\%s/selectively): ", - $default ? "YES/no" : "yes/NO"; - -- $input = ; -+ $input = || ''; - if ($input =~ /^\s*n/i - || (!$default && $input !~ /^\s*[ys]/i)) { - print "\n"; -@@ -3718,7 +3718,7 @@ - print "Please enter one or more addresses not to scan. Separate them with commas.\n", - "You can specify a range by using dashes. Example: 0x58-0x5f,0x69.\n", - "Addresses: "; -- $input = ; -+ $input = || ''; - chomp($input); - @not_to_scan = parse_not_to_scan(0x03, 0x77, $input); - } elsif (($class & 0xff00) == 0x0300) { -@@ -6859,7 +6859,7 @@ - "safe though. Yes, you do have ISA I/O ports even if you do not have any\n". - "ISA slots! Do you want to scan the ISA I/O ports? (\%s): ", - $superio_features ? "yes/NO" : "YES/no"; -- $input = ; -+ $input = || ''; - unless ($input =~ /^\s*n/i - || ($superio_features && $input !~ /^\s*y/i)) { - if (initialize_ioports()) { diff --git a/SOURCES/lm_sensors-3.3.4-sensors-detect-ppc-missing-vendor_id.patch b/SOURCES/lm_sensors-3.3.4-sensors-detect-ppc-missing-vendor_id.patch deleted file mode 100644 index 5fb0671..0000000 --- a/SOURCES/lm_sensors-3.3.4-sensors-detect-ppc-missing-vendor_id.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -Naur lm_sensors-3.3.4.orig/prog/detect/sensors-detect lm_sensors-3.3.4/prog/detect/sensors-detect ---- lm_sensors-3.3.4.orig/prog/detect/sensors-detect 2013-08-07 09:46:59.000000000 -0400 -+++ lm_sensors-3.3.4/prog/detect/sensors-detect 2013-09-09 13:59:09.753266033 -0400 -@@ -2657,6 +2657,7 @@ - if (m/^processor\s*:\s*(\d+)/) { - push @cpu, $entry if scalar keys(%{$entry}); # Previous entry - $entry = { nr => $1 }; # New entry -+ $entry->{vendor_id} = "undefined"; - next; - } - if (m/^(vendor_id|cpu family|model|model name|stepping|cpuid level)\s*:\s*(.+)$/) { diff --git a/SOURCES/lm_sensors-3.4.0-alternative-architectures-warning.patch b/SOURCES/lm_sensors-3.4.0-alternative-architectures-warning.patch new file mode 100644 index 0000000..7756fec --- /dev/null +++ b/SOURCES/lm_sensors-3.4.0-alternative-architectures-warning.patch @@ -0,0 +1,21 @@ +diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect +index 005bbd0..737be98 100755 +--- a/prog/detect/sensors-detect ++++ b/prog/detect/sensors-detect +@@ -2877,7 +2877,15 @@ sub initialize_cpu_list + sub print_cpu_info + { + my $cpu = $cpu[0]; +- print "# Processor: $cpu->{'model name'} ($cpu->{'cpu family'}/$cpu->{model}/$cpu->{stepping})\n"; ++ if (!exists $cpu->{'model name'} || !exists $cpu->{'cpu family'} || !exists $cpu->{'model'}){ ++ print "**********\n"; ++ print "Your processor's architecture is not yet supported. Beware that sensors-detect might not work properly!\n"; ++ print "**********\n"; ++ } ++ else{ ++ 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 diff --git a/SOURCES/lm_sensors-3.4.0-fix-systemd-paths.patch b/SOURCES/lm_sensors-3.4.0-fix-systemd-paths.patch new file mode 100644 index 0000000..94aeeb6 --- /dev/null +++ b/SOURCES/lm_sensors-3.4.0-fix-systemd-paths.patch @@ -0,0 +1,119 @@ +From b26a85f06c231e488f99e698861932077aab7be5 Mon Sep 17 00:00:00 2001 +From: Jean Delvare +Date: Mon, 6 Jul 2015 11:51:24 +0000 +Subject: [PATCH 1/6] sensors-detect: Fix systemd paths + +--- + CHANGES | 3 +++ + prog/detect/sensors-detect | 53 ++++++++++++++++++++++++++++------------------ + 2 files changed, 35 insertions(+), 21 deletions(-) + +diff --git a/CHANGES b/CHANGES +index a33bc42..9a761f5 100644 +--- a/CHANGES ++++ b/CHANGES +@@ -1,6 +1,9 @@ + lm-sensors CHANGES file + ----------------------- + ++SVN HEAD ++ sensors-detect: Fix systemd paths ++ + 3.4.0 (2015-06-25) + documentation: Update the note about libsensors license + sensors.conf.5: Enhance the hysteresis documentation +diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect +index fb6658c..6c0c566 100755 +--- 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 +@@ -7090,19 +7103,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; + } + +@@ -7170,13 +7180,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(); +@@ -7187,6 +7190,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(); +-- +2.7.4 + diff --git a/SPECS/lm_sensors.spec b/SPECS/lm_sensors.spec index a01cb30..f1eeadf 100644 --- a/SPECS/lm_sensors.spec +++ b/SPECS/lm_sensors.spec @@ -1,27 +1,37 @@ +%global commit f9185e5c060ff22d2c8d4f6a19d317a529171c72 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) +%global year 2016 +%global month 06 +%global day 01 +%global date %{year}%{month}%{day} + Name: lm_sensors -Version: 3.3.4 -Release: 11%{?dist} +Version: 3.4.0 +Release: 4.%{date}git%{shortcommit}%{?dist} Summary: Hardware monitoring tools Group: Applications/System License: LGPLv2+ and GPLv3+ and GPLv2+ and Verbatim and Public domain -URL: http://www.lm-sensors.org/ +#URL: http://www.lm-sensors.org/ +URL: http://github.com/groeck/lm-sensors/ -Source: http://dl.lm-sensors.org/lm-sensors/releases/%{name}-%{version}.tar.bz2 +# Official website seems to be dead. Using github temporarily. +#Source: http://dl.lm-sensors.org/lm-sensors/releases/%{name}-%{version}.tar.bz2 +Source0: http://github.com/groeck/lm-sensors/archive/%{commit}/lm-sensors-%{commit}.tar.gz Source1: lm_sensors.sysconfig # these 2 were taken from PLD-linux, Thanks! Source2: sensord.sysconfig Source3: lm_sensors-modprobe Source4: lm_sensors-modprobe-r -Patch0: lm_sensors-3.3.4-sensors-detect-null-input.patch -Patch1: lm_sensors-3.3.4-lm_sensors-service-modprobe-warnings.patch -Patch2: lm_sensors-3.3.4-man-sensors-conf-conv.patch -Patch3: lm_sensors-3.3.4-sensors-detect-ppc-missing-vendor_id.patch +Patch0: lm_sensors-3.3.4-lm_sensors-service-modprobe-warnings.patch +Patch1: lm_sensors-3.4.0-fix-systemd-paths.patch +Patch2: lm_sensors-3.4.0-alternative-architectures-warning.patch %ifarch %{ix86} x86_64 Requires: /usr/sbin/dmidecode %endif +Requires: %{name}-libs = %{version}-%{release} Requires(post): systemd-units BuildRequires: kernel-headers >= 2.2.16, bison, libsysfs-devel, flex, gawk BuildRequires: rrdtool-devel @@ -60,16 +70,21 @@ database, and warns of sensor alarms. %prep -%setup -q +%setup -q -n lm-sensors-%{commit} %patch0 -p1 %patch1 -p1 %patch2 -p1 -%patch3 -p1 mv prog/init/README prog/init/README.initscripts chmod -x prog/init/fancontrol.init +# Exchange revision string in sensors-detect with version, release and date +RELEASE=$(echo %{release} | sed "s/\..*$//" ) +sed -i "s/\$Revision\$ (\$Date\$)/%{version}-$RELEASE (%{year}-%{month}-%{day})/" \ + prog/detect/sensors-detect +# Remove string formatting, because new string is already formatted +sed -i 's/^\$revision =~ .*$//' prog/detect/sensors-detect %build export CFLAGS="%{optflags} -fPIC" @@ -171,6 +186,22 @@ fi %changelog +* Tue Aug 23 2016 Martin Sehnoutka - 3.4.0-4.20160601gitf9185e5 +- Print warning message when running on an alternative architecture. +- Resolves: #1362664 + +* Mon Aug 22 2016 Martin Sehnoutka - 3.4.0-3.20160601gitf9185e5 +- Replace Revision string with release and date. Resolves: #1362658 + +* Wed Jun 15 2016 Martin Sehnoutka - 3.4.0-2.20160601gitf9185e5 +- Add explicit package version requirement. + +* Wed Jun 01 2016 Martin Sehnoutka - 3.4.0-0.20160601gitf9185e5.1 +- New upstream release +- Drop patches that are already present in upstream +- Apply upstream fix for systemd paths +- Resolves: #1297795 + * Wed Oct 01 2014 Jaromir Capik - 3.3.4-11 - Hardening the build (#1092536) - Resolves: rhbz#1092536