Accepting request 434454 from Base:System

Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/434454
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/sensors?expand=0&rev=97
This commit is contained in:
Dominique Leuenberger 2016-10-14 07:27:09 +00:00 committed by Git OBS Bridge
commit a4fbc3600d
3 changed files with 45 additions and 1 deletions

View File

@ -0,0 +1,35 @@
From: Jean Delvare <jdelvare@suse.de>
Subject: sensors-detect: Report proper processor information on ppc
References: bsc#999987
The format of /proc/cpuinfo on ppc differs from the x86 format. Add
the missing pieces to the parsing code so that ppc processor
information is reported properly.
---
prog/detect/sensors-detect | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
--- a/prog/detect/sensors-detect
+++ b/prog/detect/sensors-detect
@@ -2864,7 +2864,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
@@ -2880,7 +2880,11 @@ 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 (defined $cpu->{'model name'}) {
+ print "# Processor: $cpu->{'model name'} ($cpu->{'cpu family'}/$cpu->{model}/$cpu->{stepping})\n";
+ } elsif (defined $cpu->{'cpu'}) { # ppc
+ print "# Processor: $cpu->{'cpu'}, revision $cpu->{'revision'}\n";
+ }
}
# @i2c_adapters is a list of references to hashes, one hash per I2C/SMBus

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Oct 5 06:44:24 UTC 2016 - jdelvare@suse.com
- lm_sensors-3.4.0-sensors-detect-ppc64le.patch: Fix sensors-detect
CPU detection support on ppc architectures.
-------------------------------------------------------------------
Fri Sep 2 12:39:37 UTC 2016 - sweet_f_a@gmx.de

View File

@ -1,7 +1,7 @@
#
# spec file for package sensors
#
# Copyright (c) 2016 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -40,6 +40,8 @@ Patch5: lm_sensors-3.4.0-sensors-detect-fix-systemd-path.patch
Patch6: lm_sensors-3.4.0-sensord-service-extra-args.patch
#PATCH-FEATURE-UPSTREAM add ftsteutates support
Patch7: lm_sensors-3.4.0-sensors-detect-add-ftsteutates-support.patch
#PATCH-BUGFIX-UPSTREAM sensors-detect on ppc
Patch8: lm_sensors-3.4.0-sensors-detect-ppc64le.patch
ExcludeArch: s390 s390x
%{?systemd_requires}
@ -104,6 +106,7 @@ sense to the user.
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%build
RPM_OPT_FLAGS="$RPM_OPT_FLAGS"