import lm_sensors-3.4.0-21.20180522git70f7e08.el8
This commit is contained in:
parent
05e38c4918
commit
4873a1d85f
@ -0,0 +1,54 @@
|
||||
From c28d20d19d620f42d239ed4b35139683035f11dc Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= <olysonek@redhat.com>
|
||||
Date: Thu, 17 Oct 2019 10:07:21 +0200
|
||||
Subject: [PATCH] sensors-detect: Fix printing CPU info on ppc and arm
|
||||
|
||||
The format of /proc/cpuinfo on other arches is different from the
|
||||
format on x86. Modify the print_cpu_info function to handle arm and
|
||||
ppc.
|
||||
|
||||
This change also eliminates Perl warnings caused by non-existent
|
||||
elements in the %cpu hash:
|
||||
Use of uninitialized value in concatenation (.) or string at
|
||||
./prog/detect/sensors-detect line 3124.
|
||||
|
||||
Based on a patch from Changqing Li <changqing.li@windriver.com>,
|
||||
GitHub PR: https://github.com/lm-sensors/lm-sensors/pull/168
|
||||
---
|
||||
prog/detect/sensors-detect | 13 +++++++++++--
|
||||
1 file changed, 11 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect
|
||||
index c2cbe9b9..78b0b5a1 100755
|
||||
--- a/prog/detect/sensors-detect
|
||||
+++ b/prog/detect/sensors-detect
|
||||
@@ -3130,7 +3130,7 @@ sub initialize_cpu_list
|
||||
};
|
||||
next;
|
||||
}
|
||||
- if (m/^(vendor_id|cpu family|model|model name|stepping|cpuid level)\s*:\s*(.+)$/) {
|
||||
+ if (m/^(vendor_id|cpu family|model|model name|stepping|cpuid level|cpu|revision)\s*:\s*(.+)$/) {
|
||||
my $k = $1;
|
||||
my $v = $2;
|
||||
$v =~ s/\s+/ /g; # Merge multiple spaces
|
||||
@@ -3146,7 +3146,16 @@ 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 ($kernel_arch =~ m/^ppc(64(le)?)?$/) {
|
||||
+ print "# Processor: $cpu->{cpu} ($cpu->{revision})\n";
|
||||
+ } elsif ($kernel_arch =~ m/^arm/) {
|
||||
+ print "# Processor: $cpu->{'model name'}\n";
|
||||
+ } elsif (exists $cpu->{'model name'} && exists $cpu->{'cpu family'}
|
||||
+ && exists $cpu->{'model'} && exists $cpu->{'stepping'}) {
|
||||
+ print "# Processor: $cpu->{'model name'} ($cpu->{'cpu family'}/$cpu->{model}/$cpu->{stepping})\n";
|
||||
+ } else {
|
||||
+ print "# Cannot show processor info on $kernel_arch architecture.\n";
|
||||
+ }
|
||||
}
|
||||
|
||||
# @i2c_adapters is a list of references to hashes, one hash per I2C/SMBus
|
||||
--
|
||||
2.20.1
|
||||
|
85
SOURCES/fix-unexpanded-revision-strings.patch
Normal file
85
SOURCES/fix-unexpanded-revision-strings.patch
Normal file
@ -0,0 +1,85 @@
|
||||
diff --git a/doc/developers/release_checklist b/doc/developers/release_checklist
|
||||
index b84256b5..a97745e1 100644
|
||||
--- a/doc/developers/release_checklist
|
||||
+++ b/doc/developers/release_checklist
|
||||
@@ -10,7 +10,7 @@ Release steps:
|
||||
- Update the CHANGES file (set version and release date)
|
||||
- Update doc/developers/lm_sensors.lsm (Version, Entered-date and Primary-site)
|
||||
- Update doc/libsensors-API.txt and SENSORS_API_VERSION in lib/sensors.h
|
||||
-- Update version.h
|
||||
+- grep for LM_VERSION and update values of the constants
|
||||
- Commit
|
||||
- Tag the release using git:
|
||||
git tag V3-x-x
|
||||
@@ -22,6 +22,7 @@ After release, remember to:
|
||||
https://github.com/lm-sensors/lm-sensors/archive/V3-x-x/lm-sensors-3-x-x.tar.gz
|
||||
- Add a news item to https://hwmon.wiki.kernel.org/lm_sensors
|
||||
- Announce on the lm-sensors mailing list
|
||||
-- Add "+git" to version.h and commit
|
||||
+- grep for LM_VERSION and add "+git" to the values of the constants
|
||||
+- Commit
|
||||
- Send lm_sensors.lsm to the LSM by mailing it to lsm@qqx.org with the
|
||||
subject `add' (no quotes)
|
||||
diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect
|
||||
index 78b0b5a1..07df0fbe 100755
|
||||
--- a/prog/detect/sensors-detect
|
||||
+++ b/prog/detect/sensors-detect
|
||||
@@ -38,12 +38,9 @@ foreach ('/usr/sbin', '/usr/local/sbin', '/sbin') {
|
||||
#########################
|
||||
|
||||
use constant NO_CACHE => 1;
|
||||
+use constant LM_VERSION => '3.4.0+git';
|
||||
use vars qw(@pci_adapters @chip_ids @ipmi_ifs @non_hwmon_chip_ids
|
||||
- $i2c_addresses_to_scan $revision @i2c_byte_cache %opt);
|
||||
-
|
||||
-$revision = '$Revision$ ($Date$)';
|
||||
-$revision =~ s/\$\w+: (.*?) \$/$1/g;
|
||||
-$revision =~ s/ \([^()]*\)//;
|
||||
+ $i2c_addresses_to_scan @i2c_byte_cache %opt);
|
||||
|
||||
# This is the list of SMBus or I2C adapters we recognize by their PCI
|
||||
# signature. This is an easy and fast way to determine which SMBus or I2C
|
||||
@@ -7511,7 +7508,7 @@ sub main
|
||||
system("/sbin/service", "lm_sensors", "stop");
|
||||
}
|
||||
|
||||
- print "# sensors-detect revision $revision\n";
|
||||
+ print "# sensors-detect version ".LM_VERSION."\n";
|
||||
initialize_dmi_data();
|
||||
print_dmi_summary();
|
||||
print_kernel_version();
|
||||
diff --git a/prog/init/fancontrol.init b/prog/init/fancontrol.init
|
||||
index eabe734c..8ab2c929 100755
|
||||
--- a/prog/init/fancontrol.init
|
||||
+++ b/prog/init/fancontrol.init
|
||||
@@ -1,7 +1,5 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
-# $Id$
|
||||
-#
|
||||
# fancontrol
|
||||
#
|
||||
# chkconfig: 2345 90 01
|
||||
diff --git a/prog/pwm/pwmconfig b/prog/pwm/pwmconfig
|
||||
index a40acd5c..3ecdca5b 100755
|
||||
--- a/prog/pwm/pwmconfig
|
||||
+++ b/prog/pwm/pwmconfig
|
||||
@@ -29,8 +29,7 @@
|
||||
#
|
||||
#
|
||||
|
||||
-REVISION=$(echo '$Revision$' | cut -d' ' -f2)
|
||||
-REVDATE=$(echo '$Date$' | cut -d' ' -f2)
|
||||
+LM_VERSION='3.4.0+git'
|
||||
PIDFILE="/var/run/fancontrol.pid"
|
||||
|
||||
if [ -f "$PIDFILE" ]
|
||||
@@ -48,7 +47,7 @@ then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
-echo "# pwmconfig revision $REVISION ($REVDATE)"
|
||||
+echo "# pwmconfig version $LM_VERSION"
|
||||
echo 'This program will search your sensors for pulse width modulation (pwm)'
|
||||
echo 'controls, and test each one to see if it controls a fan on'
|
||||
echo 'your motherboard. Note that many motherboards do not have pwm'
|
@ -7,7 +7,7 @@
|
||||
|
||||
Name: lm_sensors
|
||||
Version: 3.4.0
|
||||
Release: 20.%{date}git%{shortcommit}%{?dist}
|
||||
Release: 21.%{date}git%{shortcommit}%{?dist}
|
||||
Summary: Hardware monitoring tools
|
||||
Group: Applications/System
|
||||
|
||||
@ -34,6 +34,12 @@ Source7: lm_sensors.service
|
||||
Patch1: 0001-sensors-detect-Add-detection-of-AMD-Family-17h-model.patch
|
||||
# Patch that combines several upstream patches:
|
||||
Patch2: 0001-Fix-stale-links-and-outdated-info.patch
|
||||
# Upstream commit c28d20d19d620f42d:
|
||||
Patch3: 0001-sensors-detect-Fix-printing-CPU-info-on-ppc-and-arm.patch
|
||||
# Patch that combines upstream commits 5c900c7e851cc and f1e1a7607caa96b,
|
||||
# with the version string modified from 3.5.0+git to 3.4.0+git. Drop/modify
|
||||
# this patch on rebase.
|
||||
Patch4: fix-unexpanded-revision-strings.patch
|
||||
|
||||
Requires: /usr/sbin/modprobe
|
||||
%ifarch %{ix86} x86_64
|
||||
@ -91,6 +97,8 @@ database, and warns of sensor alarms.
|
||||
%setup -q -n lm-sensors-%{commit}
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
|
||||
# Remove currently unused files to make sure we've got the license right
|
||||
rm -f prog/init/sysconfig-lm_sensors-convert prog/hotplug/unhide_ICH_SMBus
|
||||
@ -212,6 +220,12 @@ fi
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Oct 18 2019 Ondřej Lysoněk <olysonek@redhat.com> - 3.4.0-21.20180522git70f7e08
|
||||
- Fix printing CPU info on non-x86 architectures in sensors-detect
|
||||
- Resolves: rhbz#1752854
|
||||
- Fix printing lm_sensors version in sensors-detect and pwmconfig
|
||||
- Resolves: rhbz#1677414
|
||||
|
||||
* Mon May 06 2019 Ondřej Lysoněk <olysonek@redhat.com> - 3.4.0-20.20180522git70f7e08
|
||||
- Added explicit Requires on lm_sensors-libs
|
||||
- Resolves: rhbz#1706145
|
||||
|
Loading…
Reference in New Issue
Block a user