Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package upower for openSUSE:Factory checked in at 2026-10-20 12:35:57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/upower (Old) and /work/SRC/openSUSE:Factory/.upower.new.3698736 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "upower" Tue Oct 20 12:35:57 2026 rev:101 rq:1386010 version:1.91.5 Changes: -------- --- /work/SRC/openSUSE:Factory/upower/upower.changes 2026-10-05 12:54:59.769165755 +0200 +++ /work/SRC/openSUSE:Factory/.upower.new.3698736/upower.changes 2026-10-20 12:36:14.780314378 +0200 @@ -1,0 +2,11 @@ +Sun Oct 18 10:55:25 UTC 2026 - Martin Pluskal <[email protected]> + +- Update to 1.91.5: + * Prefer live sysfs threshold values over hwdb CHARGE_LIMIT + * Keep keyboard backlight event IO active on ENODATA/EINTR + * Hide device batteries that report being offline + * Remove all BlueZ devices when the service vanishes +- Spec cleanup: drop obsolete Group tags, use pkgconfig() + style BuildRequires + +------------------------------------------------------------------- Old: ---- upower-1.91.4.obscpio New: ---- upower-1.91.5.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ upower.spec ++++++ --- /var/tmp/diff_new_pack.Ba0ui9/_old 2026-10-20 12:36:15.467343020 +0200 +++ /var/tmp/diff_new_pack.Ba0ui9/_new 2026-10-20 12:36:15.469343103 +0200 @@ -28,11 +28,10 @@ %define idevice disabled %endif Name: upower -Version: 1.91.4 +Version: 1.91.5 Release: 0 Summary: Power Device Enumeration Framework License: GPL-2.0-or-later -Group: System/Daemons URL: https://upower.freedesktop.org/ #Source: https://gitlab.freedesktop.org/upower/upower/-/archive/v%%{version}/upower-v%%{version}.tar.bz2 Source: %{name}-%{version}.tar.zst @@ -42,9 +41,6 @@ # PATCH-FIX-OPENSUSE: No need on SUSE to grant root user addtional polkit rights, bsc#1265867 # This is a revert of mainline commit d75f2dbee4df2bc20df840 Patch3: policy-org.freedesktop.upower.rules-grant-permission-for-skipping-the-inhibitor.patch - -BuildRequires: gobject-introspection-devel >= 0.9.9 -BuildRequires: gtk-doc >= 1.11 BuildRequires: intltool BuildRequires: libtool BuildRequires: meson >= 0.60.0 @@ -54,6 +50,8 @@ BuildRequires: pkgconfig(gio-unix-2.0) >= 2.76.0 BuildRequires: pkgconfig(glib-2.0) >= 2.76.0 BuildRequires: pkgconfig(gobject-2.0) >= 2.76.0 +BuildRequires: pkgconfig(gobject-introspection-1.0) >= 0.9.9 +BuildRequires: pkgconfig(gtk-doc) >= 1.11 BuildRequires: pkgconfig(gudev-1.0) >= 235 BuildRequires: pkgconfig(libusb-1.0) >= 1.0.0 BuildRequires: pkgconfig(polkit-gobject-1) @@ -62,7 +60,7 @@ %{?systemd_requires} %if %{with libimobile} BuildRequires: pkgconfig(libimobiledevice-1.0) >= 0.9.7 -%if %libplist2 +%if %{libplist2} BuildRequires: pkgconfig(libplist-2.0) %else BuildRequires: pkgconfig(libplist) >= 0.12 @@ -78,7 +76,6 @@ %package -n libupower-glib3 Summary: Power Device Enumeration Framework - Library -Group: System/Daemons Recommends: %{name} %description -n libupower-glib3 @@ -90,7 +87,6 @@ %package -n typelib-1_0-UpowerGlib-1_0 Summary: Power Device Enumeration Framework - Introspection bindings -Group: System/Daemons %description -n typelib-1_0-UpowerGlib-1_0 UPower is an abstraction for enumerating power devices, listening to @@ -104,7 +100,6 @@ %package -n libupower-glib-devel Summary: Power Device Enumeration Framework - Development Files -Group: Development/Libraries/Other Requires: libupower-glib3 = %{version} Requires: typelib-1_0-UpowerGlib-1_0 = %{version} Provides: %{name}-devel = %{version} @@ -141,14 +136,14 @@ %post %{?udev_rules_update:%udev_rules_update} %service_add_post upower.service -%udev_hwdb_update +%{udev_hwdb_update} %preun %service_del_preun upower.service %postun %service_del_postun upower.service -%udev_hwdb_update +%{udev_hwdb_update} %ldconfig_scriptlets -n libupower-glib3 ++++++ _service ++++++ --- /var/tmp/diff_new_pack.Ba0ui9/_old 2026-10-20 12:36:15.499344354 +0200 +++ /var/tmp/diff_new_pack.Ba0ui9/_new 2026-10-20 12:36:15.502344479 +0200 @@ -3,7 +3,7 @@ <service name="obs_scm" mode="manual"> <param name="scm">git</param> <param name="url">https://gitlab.freedesktop.org/upower/upower.git</param> - <param name="revision">v1.91.4</param> + <param name="revision">v1.91.5</param> <param name="versionformat">@PARENT_TAG@+@TAG_OFFSET@</param> <param name="versionrewrite-pattern">(v)?([^+]+)(\+0)?(\+[1-9][0-9]*)?</param> <param name="versionrewrite-replacement">\2\4</param> ++++++ upower-1.91.4.obscpio -> upower-1.91.5.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/upower-1.91.4/.gitlab-ci.yml new/upower-1.91.5/.gitlab-ci.yml --- old/upower-1.91.4/.gitlab-ci.yml 2026-09-09 09:59:00.000000000 +0200 +++ new/upower-1.91.5/.gitlab-ci.yml 2026-10-05 08:18:29.000000000 +0200 @@ -145,20 +145,6 @@ GIT_STRATEGY: none # no need to pull the whole tree for rebuilding the image FDO_DISTRIBUTION_PACKAGES: $DEBIAN_DEPENDENCIES $DEBIAN_EXTRA_DEPENDENCIES -verify_signoff: - extends: - - .fdo.ci-fairy - stage: pre-commit - allow_failure: true - script: - - ci-fairy -vv check-commits --signed-off-by --textwidth 100 --junit-xml=results.xml - rules: - - if: $CI_PIPELINE_SOURCE == "merge_request_event" - variables: - GIT_DEPTH: 100 - artifacts: - reports: - junit: results.xml pre_commit: extends: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/upower-1.91.4/HACKING.md new/upower-1.91.5/HACKING.md --- old/upower-1.91.4/HACKING.md 2026-09-09 09:59:00.000000000 +0200 +++ new/upower-1.91.5/HACKING.md 2026-10-05 08:18:29.000000000 +0200 @@ -103,8 +103,6 @@ git commit -a --author "Joe Coder <[email protected]>" ``` -- "Signed-off-by:" tags should be included" in the commit message. - ## Coding Style - Please follow the coding style already used. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/upower-1.91.4/NEWS new/upower-1.91.5/NEWS --- old/upower-1.91.4/NEWS 2026-09-09 09:59:00.000000000 +0200 +++ new/upower-1.91.5/NEWS 2026-10-05 08:18:29.000000000 +0200 @@ -1,3 +1,12 @@ +Version 1.91.5 +-------------- +Released: 2026-10-05 + +- Fix: Prefer live sysfs threshold values over hwdb CHARGE_LIMIT (!346, #350) +- Fix: Keep keyboard backlight event IO active on ENODATA/EINTR (!347, #358) +- Fix: Hide device batteries that report being offline (!345) +- Fix: Remove all BlueZ devices when the service vanishes (!343) + Version 1.91.4 -------------- Released: 2026-09-10 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/upower-1.91.4/meson.build new/upower-1.91.5/meson.build --- old/upower-1.91.4/meson.build 2026-09-09 09:59:00.000000000 +0200 +++ new/upower-1.91.5/meson.build 2026-10-05 08:18:29.000000000 +0200 @@ -1,5 +1,5 @@ project('upower', 'c', - version: '1.91.4', + version: '1.91.5', license: 'GPLv2+', default_options: [ 'buildtype=debugoptimized', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/upower-1.91.4/src/linux/integration-test.py new/upower-1.91.5/src/linux/integration-test.py --- old/upower-1.91.4/src/linux/integration-test.py 2026-09-09 09:59:00.000000000 +0200 +++ new/upower-1.91.5/src/linux/integration-test.py 2026-10-05 08:18:29.000000000 +0200 @@ -2734,6 +2734,54 @@ with open("/sys/class/power_supply/BAT0/charge_control_end_threshold") as fp: self.assertEqual(fp.read(), "100") + def test_battery_charge_limit_live_sysfs_value(self): + """charge_control_end_threshold live value overrides the hwdb CHARGE_LIMIT default""" + + self.testbed.add_device( + "power_supply", + "BAT0", + None, + [ + "type", + "Battery", + "present", + "1", + "status", + "unknown", + "energy_full", + "60000000", + "energy_full_design", + "80000000", + "energy_now", + "48000000", + "voltage_now", + "12000000", + "charge_control_start_threshold", + "0", + "charge_control_end_threshold", + "85", + ], + [], + ) + self.testbed.set_property( + "/sys/class/power_supply/BAT0", "CHARGE_LIMIT", "75,80" + ) + + self.start_daemon() + devs = self.proxy.EnumerateDevices() + self.assertEqual(len(devs), 1) + bat0_up = devs[0] + + self.assertEqual( + self.get_dbus_dev_property(bat0_up, "ChargeThresholdSupported"), True + ) + self.assertEqual( + self.get_dbus_dev_property(bat0_up, "ChargeStartThreshold"), 75 + ) + self.assertEqual(self.get_dbus_dev_property(bat0_up, "ChargeEndThreshold"), 85) + + self.stop_daemon() + def test_battery_charge_limit_supported_polkit_not_allowed(self): """Battery with charge_control_start/end_threshold supported""" @@ -5249,6 +5297,61 @@ time.sleep(0.5) return self.proxy.EnumerateDevices() + def test_bluetooth_daemon_restart(self): + """All Bluetooth batteries disappear and return across BlueZ restart""" + + def add_devices(): + self.start_bluez() + self.bluez_obj.AddAdapter("hci0", "my-computer") + for suffix in ("01", "02", "03"): + path = self.bluez_obj.AddDevice( + "hci0", "11:22:33:44:AA:" + suffix, "Mouse " + suffix + ) + device = self.dbus_con.get_object("org.bluez", path) + device.AddProperties( + BATTERY_IFACE, {"Percentage": dbus.Byte(70, variant_level=1)} + ) + + add_devices() + self.start_daemon() + self.assertEventually(lambda: len(self.proxy.EnumerateDevices()), value=3) + original_paths = set(self.proxy.EnumerateDevices()) + + # Drop/reacquire the name with an initialized mock. Starting another + # mock process while UPower watches races the template installation. + owner = self.dbus_con.get_name_owner("org.bluez") + mock = dbus.Interface(self.dbus_con.get_object(owner, "/"), dbusmock.MOCK_IFACE) + mock.AddMethods( + dbusmock.MOCK_IFACE, + [ + ( + "ReleaseName", + "", + "", + 'self.bus_name.get_bus().release_name("org.bluez")', + ), + ( + "AcquireName", + "", + "", + 'self.bus_name.get_bus().request_name("org.bluez")', + ), + ], + ) + mock.ReleaseName() + self.assertEventually(lambda: list(self.proxy.EnumerateDevices()), value=[]) + for path in original_paths: + with self.assertRaises(GLib.Error): + self.get_dbus_dev_property(path, "Percentage") + + mock.AcquireName() + self.assertEventually( + lambda: set(self.proxy.EnumerateDevices()), value=original_paths + ) + for path in original_paths: + self.assertEqual(self.get_dbus_dev_property(path, "Percentage"), 70.0) + self.stop_daemon() + def test_bluetooth_le_mouse(self): """Bluetooth LE mouse""" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/upower-1.91.4/src/linux/up-backend.c new/upower-1.91.5/src/linux/up-backend.c --- old/upower-1.91.4/src/linux/up-backend.c 2026-09-09 09:59:00.000000000 +0200 +++ new/upower-1.91.5/src/linux/up-backend.c 2026-10-05 08:18:29.000000000 +0200 @@ -421,14 +421,20 @@ { UpBackend *backend = user_data; GPtrArray *array; + g_autoptr(GPtrArray) devices = g_ptr_array_new_with_free_func (g_object_unref); guint i; g_debug ("BlueZ disappeared"); array = up_device_list_get_array (backend->priv->device_list); + for (i = 0; i < array->len; i++) + g_ptr_array_add (devices, g_object_ref (g_ptr_array_index (array, i))); + g_ptr_array_unref (array); - for (i = 0; i < array->len; i++) { - UpDevice *device = UP_DEVICE (g_ptr_array_index (array, i)); + /* Removing a device mutates device_list. Keep a snapshot, including + * references for the duration of the removal callbacks. */ + for (i = 0; i < devices->len; i++) { + UpDevice *device = UP_DEVICE (g_ptr_array_index (devices, i)); if (UP_IS_DEVICE_BLUEZ (device)) { GDBusObject *object; @@ -439,8 +445,6 @@ } } - g_ptr_array_unref (array); - g_clear_object (&backend->priv->bluez_client); } @@ -481,6 +485,14 @@ g_signal_connect (device, "notify::disconnected", G_CALLBACK (up_device_disconnected_cb), backend); if (UP_IS_DEVICE (device)) { + gboolean disconnected; + + g_object_get (device, "disconnected", &disconnected, NULL); + if (disconnected) { + g_debug ("Device is disconnected, not showing it yet"); + up_device_unregister (UP_DEVICE (device)); + return; + } if (update_added_duplicate_device (backend, UP_DEVICE (device))) g_signal_emit (backend, signals[SIGNAL_DEVICE_ADDED], 0, device); } else if (UP_IS_DEVICE_KBD_BACKLIGHT (device)) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/upower-1.91.4/src/linux/up-device-supply-battery.c new/upower-1.91.5/src/linux/up-device-supply-battery.c --- old/upower-1.91.4/src/linux/up-device-supply-battery.c 2026-09-09 09:59:00.000000000 +0200 +++ new/upower-1.91.5/src/linux/up-device-supply-battery.c 2026-10-05 08:18:29.000000000 +0200 @@ -75,6 +75,7 @@ gboolean charge_threshold_by_charge_type; gboolean shown_invalid_voltage_warning; gboolean ignore_system_percentage; + gboolean support_charge_limit; }; G_DEFINE_TYPE (UpDeviceSupplyBattery, up_device_supply_battery, UP_TYPE_DEVICE_BATTERY) @@ -166,13 +167,18 @@ } static gboolean -up_device_supply_battery_get_charge_control_limits (GUdevDevice *native, UpBatteryInfo *info) +up_device_supply_battery_get_charge_control_limits (UpDeviceSupplyBattery *self, + GUdevDevice *native, + UpBatteryInfo *info) { const gchar *charge_limit; g_auto(GStrv) pairs = NULL; gdouble charge_control_start_threshold; gdouble charge_control_end_threshold; + if (self->support_charge_limit) + return TRUE; + charge_limit = g_udev_device_get_property (native, "CHARGE_LIMIT"); if (charge_limit == NULL) return FALSE; @@ -201,11 +207,22 @@ info->charge_control_start_threshold = charge_control_start_threshold; info->charge_control_end_threshold = charge_control_end_threshold; + self->support_charge_limit = TRUE; - if (g_udev_device_has_sysfs_attr (native, "charge_control_start_threshold")) + /* Live sysfs values override CHARGE_LIMIT; 0 and 100 are the driver defaults */ + if (g_udev_device_has_sysfs_attr (native, "charge_control_start_threshold")) { + gint value = g_udev_device_get_sysfs_attr_as_int_uncached (native, "charge_control_start_threshold"); + if (value > 0 && value < 100) + info->charge_control_start_threshold = value; info->charge_threshold_settings |= UP_DEVICE_SUPPLY_BATTERY_CHARGE_THRESHOLD_SETTINGS_CHARGE_CONTROL_START_THRESHOLD; - if (g_udev_device_has_sysfs_attr (native, "charge_control_end_threshold")) + } + + if (g_udev_device_has_sysfs_attr (native, "charge_control_end_threshold")) { + gint value = g_udev_device_get_sysfs_attr_as_int_uncached (native, "charge_control_end_threshold"); + if (value > 0 && value < 100) + info->charge_control_end_threshold = value; info->charge_threshold_settings |= UP_DEVICE_SUPPLY_BATTERY_CHARGE_THRESHOLD_SETTINGS_CHARGE_CONTROL_END_THRESHOLD; + } return TRUE; } @@ -436,7 +453,7 @@ info.voltage_max_design = g_udev_device_get_sysfs_attr_as_double_uncached (native, "voltage_max_design") / 1000000.0; info.voltage_min_design = g_udev_device_get_sysfs_attr_as_double_uncached (native, "voltage_min_design") / 1000000.0; - if (up_device_supply_battery_get_charge_control_limits (native, &info)) { + if (up_device_supply_battery_get_charge_control_limits (self, native, &info)) { info.charge_control_supported = TRUE; info.charge_control_enabled = FALSE; } else { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/upower-1.91.4/src/linux/up-device-supply.c new/upower-1.91.5/src/linux/up-device-supply.c --- old/upower-1.91.4/src/linux/up-device-supply.c 2026-09-09 09:59:00.000000000 +0200 +++ new/upower-1.91.5/src/linux/up-device-supply.c 2026-10-05 08:18:29.000000000 +0200 @@ -292,6 +292,21 @@ if (g_udev_device_has_sysfs_attr_uncached (native, "present")) is_present = g_udev_device_get_sysfs_attr_as_boolean_uncached (native, "present"); + /* Batteries reached over a wireless link report whether it is up */ + if (g_udev_device_has_sysfs_attr_uncached (native, "online")) { + gboolean is_power_supply; + + g_object_get (device, "power-supply", &is_power_supply, NULL); + if (!is_power_supply) { + gboolean disconnected_old, disconnected_new; + + g_object_get (device, "disconnected", &disconnected_old, NULL); + disconnected_new = !g_udev_device_get_sysfs_attr_as_boolean_uncached (native, "online"); + if (disconnected_old != disconnected_new) + g_object_set (device, "disconnected", disconnected_new, NULL); + } + } + /* get a precise percentage */ percentage = g_udev_device_get_sysfs_attr_as_double_uncached (native, "capacity"); if (percentage == 0.0f) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/upower-1.91.4/src/linux/up-kbd-backlight-led.c new/upower-1.91.5/src/linux/up-kbd-backlight-led.c --- old/upower-1.91.4/src/linux/up-kbd-backlight-led.c 2026-09-09 09:59:00.000000000 +0200 +++ new/upower-1.91.5/src/linux/up-kbd-backlight-led.c 2026-10-05 08:18:29.000000000 +0200 @@ -23,6 +23,7 @@ #include <glib.h> #include <glib/gi18n.h> +#include <glib/gstdio.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> @@ -180,6 +181,7 @@ UpKbdBacklightLed *kbd = UP_KBD_BACKLIGHT_LED (kbd_backlight); UpKbdBacklightLedPrivate *priv = up_kbd_backlight_led_get_instance_private (kbd); gint brightness = -1; + gint errsv = 0; gchar buf[16]; glong len; gchar *end = NULL; @@ -191,9 +193,21 @@ return FALSE; lseek (priv->fd_hw_changed, 0, SEEK_SET); + + errno = 0; len = read (priv->fd_hw_changed, buf, G_N_ELEMENTS (buf) - 1); + errsv = errno; - if (len > 0) { + if (len == 0) { + return TRUE; + } else if (len < 0) { + if (errsv == EINTR || errsv == ENODATA) { + return TRUE; + } else { + g_warning ("kbd eventio: failed to read brightness. %s", g_strerror (errsv)); + return FALSE; + } + } else { buf[len] = '\0'; g_strstrip (buf); brightness = g_ascii_strtoll (buf, &end, 10); @@ -204,8 +218,6 @@ brightness = -1; g_warning ("kbd eventio: failed to convert brightness."); } - } else { - return FALSE; } g_debug ("kbd eventio: brightness: %d", brightness); @@ -255,7 +267,7 @@ /* Set up device watcher */ path_hw_changed = g_build_filename (native_path, "brightness_hw_changed", NULL); - priv->fd_hw_changed = open (path_hw_changed, O_RDONLY); + priv->fd_hw_changed = g_open (path_hw_changed, O_RDONLY); if (priv->fd_hw_changed >= 0) { priv->channel_hw_changed = g_io_channel_unix_new (priv->fd_hw_changed); g_io_add_watch (priv->channel_hw_changed, ++++++ upower.obsinfo ++++++ --- /var/tmp/diff_new_pack.Ba0ui9/_old 2026-10-20 12:36:15.699352692 +0200 +++ /var/tmp/diff_new_pack.Ba0ui9/_new 2026-10-20 12:36:15.703352859 +0200 @@ -1,5 +1,5 @@ name: upower -version: 1.91.4 -mtime: 1788940740 -commit: af22b0bb6a97fff89b0e11101de9fc4937832864 +version: 1.91.5 +mtime: 1791181109 +commit: 233615a1505166ef4a28c959836fe8c7781f5697
