[lm_sensors] rhbz#806364 - sensors-detect fails with "/sys/bus/pci/devices: No such file or directory"
Nikola Pajkovsky
npajkovs at fedoraproject.org
Mon Apr 2 13:15:11 UTC 2012
commit 373ef7f2509bf59beeb5709272ed24148da54538
Author: Nikola Pajkovsky <npajkovs at redhat.com>
Date: Mon Apr 2 15:14:15 2012 +0200
rhbz#806364 - sensors-detect fails with "/sys/bus/pci/devices: No such file or directory"
PCI bus is always required even if it might be missing on
some platforms. So don't choke is it is missing. Patch from
Jaromir Capik
Signed-off-by: Nikola Pajkovsky <npajkovs at redhat.com>
...always-required-even-if-it-might-be-missi.patch | 44 ++++++++++++++++++++
lm_sensors.spec | 11 ++++-
2 files changed, 54 insertions(+), 1 deletions(-)
---
diff --git a/0001-PCI-bus-is-always-required-even-if-it-might-be-missi.patch b/0001-PCI-bus-is-always-required-even-if-it-might-be-missi.patch
new file mode 100644
index 0000000..f21b529
--- /dev/null
+++ b/0001-PCI-bus-is-always-required-even-if-it-might-be-missi.patch
@@ -0,0 +1,44 @@
+From 9c4da0d42de91406a75c802099451b5dba03bd1f Mon Sep 17 00:00:00 2001
+Message-Id: <9c4da0d42de91406a75c802099451b5dba03bd1f.1333368985.git.npajkovs at redhat.com>
+From: khali <khali at 7894878c-1315-0410-8ee3-d5d059ff63e0>
+Date: Thu, 29 Mar 2012 06:33:15 +0000
+Subject: [PATCH] PCI bus is always required even if it might be missing on
+ some platforms. So don't choke is it is missing. Patch from
+ Jaromir Capik.
+
+git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@6038 7894878c-1315-0410-8ee3-d5d059ff63e0
+---
+ CHANGES | 3 +++
+ prog/detect/sensors-detect | 2 +-
+ 2 files changed, 4 insertions(+), 1 deletions(-)
+
+diff --git a/CHANGES b/CHANGES
+index 167cd15..5b57d72 100644
+--- a/CHANGES
++++ b/CHANGES
+@@ -1,6 +1,9 @@
+ lm-sensors CHANGES file
+ -----------------------
+
++SVN HEAD
++ sensors-detect: Don't choke on systems without PCI
++
+ 3.3.2 (2012-03-14)
+ libsensors: Added support for new sysfs attributes
+ Change sysfs detection to survive upcoming kernel changes
+diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect
+index 709f546..970e26f 100755
+--- a/prog/detect/sensors-detect
++++ b/prog/detect/sensors-detect
+@@ -2996,7 +2996,7 @@ sub read_sys_dev_pci
+ my ($dev, @pci_list);
+
+ opendir(local *DEVICES, "$devices")
+- or die "$devices: $!";
++ or return \@pci_list;
+
+ while (defined($dev = readdir(DEVICES))) {
+ my %record;
+--
+1.7.7.2
+
diff --git a/lm_sensors.spec b/lm_sensors.spec
index a65c141..c83f1d5 100644
--- a/lm_sensors.spec
+++ b/lm_sensors.spec
@@ -1,6 +1,6 @@
Name: lm_sensors
Version: 3.3.2
-Release: 1%{?dist}
+Release: 2%{?dist}
URL: http://www.lm-sensors.org/
Source: http://dl.lm-sensors.org/lm-sensors/releases/%{name}-%{version}.tar.bz2
Source1: lm_sensors.sysconfig
@@ -16,6 +16,8 @@ Requires: /usr/sbin/dmidecode
Requires(post): systemd-units
BuildRequires: kernel-headers >= 2.2.16, bison, libsysfs-devel, flex, gawk
BuildRequires: rrdtool-devel
+Patch0: 0001-PCI-bus-is-always-required-even-if-it-might-be-missi.patch
+
%description
The lm_sensors package includes a collection of modules for general SMBus
@@ -52,6 +54,7 @@ database, and warns of sensor alarms.
%prep
%setup -q
+%patch0 -p1
mv prog/init/README prog/init/README.initscripts
chmod -x prog/init/fancontrol.init
@@ -155,6 +158,12 @@ fi
%changelog
+* Mon Apr 02 2012 Nikola Pajkovsky <npajkovs at redhat.com> - 3.3.2-2
+- rhbz#806364 - sensors-detect fails with "/sys/bus/pci/devices: No such file or directory at /usr/sbin/sensors-detect line 2895"
+ PCI bus is always required even if it might be missing on
+ some platforms. So don't choke is it is missing. Patch from
+ Jaromir Capik
+
* Thu Mar 15 2012 Nikola Pajkovsky <npajkovs at redhat.com> - 3.3.2-1
- upstream lm-sensors-3.3.2
More information about the scm-commits
mailing list