Accepting request 612697 from Base:System

OBS-URL: https://build.opensuse.org/request/show/612697
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/sensors?expand=0&rev=100
This commit is contained in:
Dominique Leuenberger 2018-05-30 09:45:36 +00:00 committed by Git OBS Bridge
commit 46408cce8d
7 changed files with 97 additions and 193 deletions

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1db77e206b28c9194e5c017c88460e730fdf849cff7ef704fb3e4b8b49fd6d31
size 260917

View File

@ -1,25 +0,0 @@
From 3ec458c2a891f26e1bfd4f0c7d88be3737ac7515 Mon Sep 17 00:00:00 2001
From: Jean Delvare <khali@linux-fr.org>
Date: Mon, 10 Aug 2015 09:04:53 +0000
Subject: [PATCH] sensors-detect: Only probe I/O ports on x86
Contributed by Aurelien Jarno.
---
prog/detect/sensors-detect | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- a/prog/detect/sensors-detect
+++ b/prog/detect/sensors-detect
@@ -7268,9 +7268,9 @@ sub main
print "\n";
$superio_features = 0;
- # Skip "random" I/O port probing on PPC
- if ($kernel_arch ne 'ppc'
- && $kernel_arch ne 'ppc64') {
+ # Skip "random" I/O port probing on non-x86 machines
+ if ($kernel_arch =~ m/^i[3456]86$/
+ || $kernel_arch eq 'x86_64') {
print "Some Super I/O chips contain embedded sensors. We have to write to\n".
"standard I/O ports to probe them. This is usually safe.\n";
print "Do you want to scan for Super I/O sensors? (YES/no): ";

View File

@ -1,100 +0,0 @@
From: Jean Delvare <jdelvare@suse.de>
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();

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e0579016081a262dd23eafe1d22b41ebde78921e73a1dcef71e05e424340061f
size 175802

Binary file not shown.

View File

@ -1,3 +1,35 @@
-------------------------------------------------------------------
Mon May 14 15:39:15 UTC 2018 - hillwood@opensuse.org
- Update version to 3.4.0git20180510.1c48b19, use git version
* Support many new hardware:
+ Add detection of Fintek F81768
+ Only probe I/O ports on x86
+ Add detection of Nuvoton NCT6793D
+ Add detection of Microchip MCP9808
+ Mark F71868A as supported by the f71882fg driver
+ Mark F81768D as supported by the f71882fg driver
+ Mark F81866D as supported by the f71882fg driver
+ Add detection of various ITE chips
+ Add detection of Nuvoton NCT6795D
+ Add detection of DDR4 SPD
+ Add detection of ITE IT8987D
+ Add detection of AMD Family 17h temperature sensors
+ Add detection of AMD KERNCZ SMBus controller
+ Add detection of various Intel SMBus controllers
+ Add detection of Giantec GT30TS00
+ Add detection of ONS CAT34TS02C and CAT34TS04
+ Add detection of AMD Family 15h Model 60+ temperature sensors
+ Add detection of Nuvoton NCT6796D
+ Add detection of AMD Family 15h Model 70+ temperature sensors
* Fix syntax errors
* Fix systemd paths
- Drop lm_sensors-3.4.0-sensors-detect-fix-systemd-path.patch
Upstream merge this patch
- Drop lm_sensors-3.4.0+-Only-probe-I-O-ports-on-x86.patch
Upstream merge this patch
- Change upstream url.
-------------------------------------------------------------------
Thu Nov 23 13:41:51 UTC 2017 - rbrown@suse.com

View File

@ -1,7 +1,7 @@
#
# spec file for package sensors
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2018 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
@ -16,58 +16,55 @@
#
%define commit 1c48b191c8a2b9fc747e3db3816247c666c5c3f1
%define shortcommit 1c48b19
%define _name lm_sensors
#Compat macro for new _fillupdir macro introduced in Nov 2017
%if ! %{defined _fillupdir}
%define _fillupdir /var/adm/fillup-templates
%define _fillupdir %{_localstatedir}/adm/fillup-templates
%endif
Name: sensors
BuildRequires: bison
BuildRequires: flex
BuildRequires: rrdtool-devel
BuildRequires: systemd-rpm-macros
Url: http://www.lm-sensors.org/
Version: 3.4.0
Version: 3.4.0git20180510.1c48b19
Release: 0
Summary: Hardware health monitoring for Linux
License: GPL-2.0+
License: GPL-2.0-or-later
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
URL: https://github.com/groeck/lm-sensors
Source0: https://github.com/groeck/lm-sensors/archive/%{commit}/%{_name}-%{shortcommit}.tar.gz
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-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
#PATCH-BUGFIX-UPSTREAL sensors-detect crash on arm
Patch9: lm_sensors-3.4.0+-Only-probe-I-O-ports-on-x86.patch
BuildRequires: bison
BuildRequires: flex
BuildRequires: rrdtool-devel
BuildRequires: systemd-rpm-macros
Requires: modutils
ExcludeArch: s390 s390x
%{?systemd_requires}
%description
This package includes programs that show data from some sensor chips.
This package includes programs that show data from some sensor chips.
The interface /proc/bus/i2c/ is provided by loading kernel modules.
Which modules to load can be interactively detected as root by calling
/usr/sbin/sensors-detect. Warning, before using the sensors the default
configuration in /etc/sensors.conf has to be checked and changed to fit
%{_sbindir}/sensors-detect. Warning, before using the sensors the default
configuration in %{_sysconfdir}/sensors.conf has to be checked and changed to fit
the actual set up of the mainboard and the BIOS used on that specific
mainboard!
%package -n sensord
Summary: Hardware health monitoring daemon
License: GPL-2.0+
License: GPL-2.0-or-later
Group: System/Monitoring
Provides: sensors:/usr/sbin/sensord
Requires(pre): %fillup_prereq
Provides: sensors:%{_sbindir}/sensord
%description -n sensord
sensord is a daemon that can be used to periodically log sensor
@ -78,7 +75,7 @@ exceeded, etc.
%package -n libsensors4
Summary: Hardware health monitoring library
License: LGPL-2.1+
License: LGPL-2.1-or-later
Group: System/Libraries
%description -n libsensors4
@ -90,12 +87,12 @@ sense to the user.
%package -n libsensors4-devel
Summary: Hardware health monitoring library
License: LGPL-2.1+
License: LGPL-2.1-or-later
Group: Development/Libraries/C and C++
Requires: glibc-devel
Requires: libsensors4 = %{version}
Provides: sensors:/usr/include/sensors/sensors.h
Conflicts: libsensors3-devel
Provides: sensors:%{_includedir}/sensors/sensors.h
%description -n libsensors4-devel
libsensors offers a way for applications to access the hardware
@ -105,42 +102,42 @@ have to be applied for the specific hardware, so that the output makes
sense to the user.
%prep
%setup -q -n lm_sensors-%{version}
# %setup -q -n lm_sensors-%{version}
%setup -q -n lm-%{name}-%{commit}
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%build
RPM_OPT_FLAGS="$RPM_OPT_FLAGS"
RPM_OPT_FLAGS="%{optflags}"
make %{?_smp_mflags} PROG_EXTRA:=sensord BUILD_STATIC_LIB:=0 PREFIX=%{_prefix} MANDIR=%{_mandir} LIBDIR=%{_libdir}
%install
make PROG_EXTRA:=sensord BUILD_STATIC_LIB:=0 PREFIX=%{_prefix} MANDIR=%{_mandir} LIBDIR=%{_libdir} DESTDIR=$RPM_BUILD_ROOT install
mkdir -p $RPM_BUILD_ROOT/%{_docdir}/sensors $RPM_BUILD_ROOT/%{_docdir}/sensord
make PROG_EXTRA:=sensord BUILD_STATIC_LIB:=0 PREFIX=%{_prefix} MANDIR=%{_mandir} LIBDIR=%{_libdir} DESTDIR=%{buildroot} install
mkdir -p %{buildroot}/%{_docdir}/sensors %{buildroot}/%{_docdir}/sensord
cp -a doc/donations doc/fan-divisors \
doc/fancontrol.txt doc/libsensors-API.txt \
doc/progs doc/temperature-sensors \
doc/vid COPYING COPYING.LGPL $RPM_BUILD_ROOT/%{_docdir}/sensors/
cp -a COPYING $RPM_BUILD_ROOT/%{_docdir}/sensord/
chmod -R u+rwX,g+rX,o+rX $RPM_BUILD_ROOT/%{_docdir}/sensors/ $RPM_BUILD_ROOT/%{_docdir}/sensord/
chmod 0755 $RPM_BUILD_ROOT/%{_libdir}/libsensors.so.*
mkdir -p $RPM_BUILD_ROOT/%{_unitdir} $RPM_BUILD_ROOT/%{_fillupdir}
cp -a prog/init/*.service $RPM_BUILD_ROOT/%{_unitdir}/
ln -sf /sbin/service %{buildroot}/usr/sbin/rclm_sensors
cp -a %{SOURCE1} $RPM_BUILD_ROOT/%{_fillupdir}
doc/vid COPYING COPYING.LGPL %{buildroot}/%{_docdir}/sensors/
cp -a COPYING %{buildroot}/%{_docdir}/sensord/
chmod -R u+rwX,g+rX,o+rX %{buildroot}/%{_docdir}/sensors/ %{buildroot}/%{_docdir}/sensord/
chmod 0755 %{buildroot}/%{_libdir}/libsensors.so.*
mkdir -p %{buildroot}/%{_unitdir} %{buildroot}/%{_fillupdir}
cp -a prog/init/*.service %{buildroot}/%{_unitdir}/
ln -sf /sbin/service %{buildroot}%{_sbindir}/rclm_sensors
cp -a %{SOURCE1} %{buildroot}/%{_fillupdir}
%pre
%service_add_pre lm_sensors.service
%post
%service_add_post lm_sensors.service
sh -c '
CONFIG=/etc/sysconfig/lm_sensors
CONFIG=%{_sysconfdir}/sysconfig/lm_sensors
test -r "$CONFIG" || exit 0
unset ${!MODULE_*} $HWMON_MODULES
. "$CONFIG"
@ -158,8 +155,8 @@ echo >> "$CONFIG"
echo "# New configuration format generated by rpm post-install script" >> "$CONFIG"
echo "HWMON_MODULES=\"$HWMON_MODULES\"" >> "$CONFIG"
'
if test -e /etc/modprobe.d/lm_sensors -a ! -e /etc/modprobe.d/lm_sensors.conf ; then
mv -f /etc/modprobe.d/lm_sensors /etc/modprobe.d/lm_sensors.conf
if test -e %{_sysconfdir}/modprobe.d/lm_sensors -a ! -e %{_sysconfdir}/modprobe.d/lm_sensors.conf ; then
mv -f %{_sysconfdir}/modprobe.d/lm_sensors %{_sysconfdir}/modprobe.d/lm_sensors.conf
fi
%preun
@ -190,14 +187,14 @@ fi
%{_unitdir}/lm_sensors.service
%{_sbindir}/rclm_sensors
%{_unitdir}/fancontrol.service
/usr/bin/*
/usr/sbin/fancontrol
%{_bindir}/*
%{_sbindir}/fancontrol
%ifarch i386 i486 i586 i686 x86_64
/usr/sbin/isadump
/usr/sbin/isaset
%{_sbindir}/isadump
%{_sbindir}/isaset
%endif
/usr/sbin/pwmconfig
/usr/sbin/sensors-detect
%{_sbindir}/pwmconfig
%{_sbindir}/sensors-detect
%dir %{_docdir}/sensors
%doc %{_docdir}/sensors/donations
%doc %{_docdir}/sensors/fan-divisors
@ -205,41 +202,41 @@ fi
%doc %{_docdir}/sensors/progs
%doc %{_docdir}/sensors/temperature-sensors
%doc %{_docdir}/sensors/vid
%doc %{_docdir}/sensors/COPYING
%doc /usr/share/man/man1/*.1.gz
%doc /usr/share/man/man8/fancontrol.8.gz
%license %{_docdir}/sensors/COPYING
%{_mandir}/man1/*.1.gz
%{_mandir}/man8/fancontrol.8.gz
%ifarch i386 i486 i586 i686 x86_64
%doc /usr/share/man/man8/isadump.8.gz
%doc /usr/share/man/man8/isaset.8.gz
%{_mandir}/man8/isadump.8.gz
%{_mandir}/man8/isaset.8.gz
%endif
%doc /usr/share/man/man8/pwmconfig.8.gz
%doc /usr/share/man/man8/sensors-conf-convert.8.gz
%doc /usr/share/man/man8/sensors-detect.8.gz
%{_mandir}/man8/pwmconfig.8.gz
%{_mandir}/man8/sensors-conf-convert.8.gz
%{_mandir}/man8/sensors-detect.8.gz
%files -n sensord
%defattr(-,root,root)
%{_unitdir}/sensord.service
%{_fillupdir}/sysconfig.sensord
/usr/sbin/sensord
%{_sbindir}/sensord
%dir %{_docdir}/sensord
%doc %{_docdir}/sensord/COPYING
%doc /usr/share/man/man8/sensord.8.gz
%license %{_docdir}/sensord/COPYING
%{_mandir}/man8/sensord.8.gz
%files -n libsensors4
%defattr(-,root,root)
%config /etc/sensors3.conf
%config /etc/sensors.d/
%config %{_sysconfdir}/sensors3.conf
%config %{_sysconfdir}/sensors.d/
%{_libdir}/libsensors.so.4*
%dir %{_docdir}/sensors
%doc %{_docdir}/sensors/COPYING.LGPL
%doc /usr/share/man/man5/*.5.gz
%license %{_docdir}/sensors/COPYING.LGPL
%{_mandir}/man5/*.5.gz
%files -n libsensors4-devel
%defattr(-,root,root)
/usr/include/sensors/
%{_includedir}/sensors/
%{_libdir}/libsensors.so
%dir %{_docdir}/sensors
%doc %{_docdir}/sensors/libsensors-API.txt
%doc /usr/share/man/man3/*.3.gz
%{_mandir}/man3/*.3.gz
%changelog