Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package sensors for openSUSE:Factory checked 
in at 2026-05-04 12:48:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/sensors (Old)
 and      /work/SRC/openSUSE:Factory/.sensors.new.30200 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "sensors"

Mon May  4 12:48:31 2026 rev:115 rq:1350236 version:MACRO

Changes:
--------
--- /work/SRC/openSUSE:Factory/sensors/sensors.changes  2025-12-09 
12:47:27.656607349 +0100
+++ /work/SRC/openSUSE:Factory/.sensors.new.30200/sensors.changes       
2026-05-04 12:49:18.571085360 +0200
@@ -1,0 +2,13 @@
+Fri Mar 13 12:55:59 UTC 2026 - Jean Delvare <[email protected]>
+
+- Add sensors-detect-udevadm-path.patch to deal with the move of
+  udevadm from /sbin to /usr/bin (boo#1259511).
+
+-------------------------------------------------------------------
+Wed Jan  7 17:33:42 UTC 2026 - Jean Delvare <[email protected]>
+
+- Add pwm-fix-bad-scaling-due-to-use-of-integer-type.patch which
+  fixes PWM values being scaled to 0-128% instead of 0-100%
+  (boo#1255928).
+
+-------------------------------------------------------------------

New:
----
  pwm-fix-bad-scaling-due-to-use-of-integer-type.patch
  sensors-detect-udevadm-path.patch

----------(New B)----------
  New:
- Add pwm-fix-bad-scaling-due-to-use-of-integer-type.patch which
  fixes PWM values being scaled to 0-128% instead of 0-100%
  New:
- Add sensors-detect-udevadm-path.patch to deal with the move of
  udevadm from /sbin to /usr/bin (boo#1259511).
----------(New E)----------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ sensors.spec ++++++
--- /var/tmp/diff_new_pack.Er9lDA/_old  2026-05-04 12:49:19.511124065 +0200
+++ /var/tmp/diff_new_pack.Er9lDA/_new  2026-05-04 12:49:19.515124230 +0200
@@ -1,6 +1,7 @@
 #
 # spec file for package sensors
 #
+# Copyright (c) 2026 SUSE LLC
 # Copyright (c) 2025 SUSE LLC and contributors
 #
 # All modifications and additions to the file contributed by third parties
@@ -38,16 +39,20 @@
 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:         pwm-fix-bad-scaling-due-to-use-of-integer-type.patch
+Patch6:         sensors-detect-udevadm-path.patch
 Patch8:         lm_sensors-3.5.0-libsensors-fix-soname.patch
 BuildRequires:  bison
 BuildRequires:  flex
-BuildRequires:  perl-Test-Cmd
 BuildRequires:  rrdtool-devel
 BuildRequires:  systemd-rpm-macros
+%if 0%{?suse_version} >= 1600
+BuildRequires:  perl-Test-Cmd
 # qemu does not support PR_SET_PTRACER
 %if !0%{?qemu_user_space_build}
 BuildRequires:  valgrind
 %endif
+%endif
 Requires:       modutils
 %{?systemd_requires}
 
@@ -105,7 +110,13 @@
 %autosetup -p1 -n %{_name}-%{_version}
 
 %build
+# SLE12's gcc defaults to gnu89 which can't build sensors due to the
+# use of the restrict type qualifier
+%if 0%{?sle_version} < 150000
+RPM_OPT_FLAGS="%{optflags} -std=gnu99"
+%else
 RPM_OPT_FLAGS="%{optflags}"
+%endif
 make %{?_smp_mflags} PROG_EXTRA:=sensord BUILD_STATIC_LIB:=0 PREFIX=%{_prefix} 
MANDIR=%{_mandir} LIBDIR=%{_libdir}
 
 %install
@@ -123,7 +134,9 @@
     cp -a %{SOURCE1}                   %{buildroot}/%{_fillupdir}
 
 %check
+%if 0%{?suse_version} >= 1600
 make test
+%endif
 
 %pre
 %service_add_pre lm_sensors.service fancontrol.service

++++++ pwm-fix-bad-scaling-due-to-use-of-integer-type.patch ++++++
From: xaizek <[email protected]>
Date: Sat, 7 Jun 2025 13:33:11 +0300
Subject: pwm: fix bad scaling due to use of integer type
References: boo#1255928
Patch-mainline: No, pending PR https://github.com/hramrach/lm-sensors/pull/12

This fixes commit c1a1f4ff206c0e6959c3e4d6b19ba27963076d5e ("pwm: Move
scaling factor from sensors prog to library") which didn't account for
return type of `get_type_scaling()` being `int` rather than `double` or
`float`, so the scaling was done by a factor of 2 instead of 2.55, thus
making the result off by quite a lot.
---
 lib/sysfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/sysfs.c b/lib/sysfs.c
index 39644f114..6e93b95cc 100644
--- a/lib/sysfs.c
+++ b/lib/sysfs.c
@@ -139,7 +139,7 @@ static int sysfs_foreach_busdev(const char *bus_type,
 const char *sensors_sysfs_mount = "/sys";
 
 static
-int get_type_scaling(sensors_subfeature_type type)
+double get_type_scaling(sensors_subfeature_type type)
 {
        /* Multipliers for second class subfeatures
           that need their own multiplier */

++++++ sensors-detect-udevadm-path.patch ++++++
From: Jean Delvare <[email protected]>
Subject: sensors-detect: Look for udevadm in /usr/bin
References: boo#1259511

Nowadays, udevadm gets installed in /usr/bin instead of /sbin where
it used to live, so also search for this binary at that location.
---
 prog/detect/sensors-detect |   17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

--- a/prog/detect/sensors-detect
+++ b/prog/detect/sensors-detect
@@ -3349,10 +3349,21 @@ sub load_module
 # udev may take some time to create device nodes when loading modules
 sub udev_settle
 {
-       if (!(-x "/sbin/udevadm" && system("/sbin/udevadm settle") == 0)
-        && !(-x "/sbin/udevsettle" && system("/sbin/udevsettle") == 0)) {
-               sleep(1);
+       my @settle_options = (
+               [ "/usr/bin/udevadm", "settle" ],
+               [ "/sbin/udevadm", "settle" ],
+               [ "/sbin/udevstettle" ],
+       );
+
+       foreach my $settle (@settle_options) {
+               my $command = join " ", @{$settle};
+               print "command = \"$command\"\n";
+               if (-x $settle->[0] && system($command) == 0) {
+                       return;
+               }
        }
+
+       sleep(1);
 }
 
 sub initialize_modules_supported

Reply via email to