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-06-25 10:49:57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/upower (Old) and /work/SRC/openSUSE:Factory/.upower.new.2088 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "upower" Thu Jun 25 10:49:57 2026 rev:98 rq:1361349 version:1.91.2 Changes: -------- --- /work/SRC/openSUSE:Factory/upower/upower.changes 2026-02-20 17:40:22.985782763 +0100 +++ /work/SRC/openSUSE:Factory/.upower.new.2088/upower.changes 2026-06-25 10:51:44.830036467 +0200 @@ -1,0 +2,20 @@ +Tue Jun 23 09:37:20 UTC 2026 - Thomas Renninger <[email protected]> + +- Revert unneeded policy kit rules (mainline git commit d75f2dbee4df2) +A policy-org.freedesktop.upower.rules-grant-permission-for-skipping-the-inhibitor.patch + +------------------------------------------------------------------- +Tue May 12 20:35:53 UTC 2026 - Bjørn Lie <[email protected]> + +- Update to version 1.91.2: + + Feature: Skip the systemd inhibitor when performing + CriticalPowerAction + + Feature: Introduce "Auto" CriticalPowerAction using + systemd-logind Sleep() + + Fix: Test CanPowerOff() availability before calling PowerOff() + + Fix: Add charge limit support for systems providing only + charge_control_end_threshold +- Add 25303ba52771ee514b70fb1a5318a8313889ac31.patch: + up-device-battery: Prefer "Standard" over "Fast" charging + +------------------------------------------------------------------- Old: ---- _servicedata upower-1.91.1.obscpio New: ---- 25303ba52771ee514b70fb1a5318a8313889ac31.patch policy-org.freedesktop.upower.rules-grant-permission-for-skipping-the-inhibitor.patch upower-1.91.2.obscpio ----------(New B)---------- New: charge_control_end_threshold - Add 25303ba52771ee514b70fb1a5318a8313889ac31.patch: up-device-battery: Prefer "Standard" over "Fast" charging New:- Revert unneeded policy kit rules (mainline git commit d75f2dbee4df2) A policy-org.freedesktop.upower.rules-grant-permission-for-skipping-the-inhibitor.patch ----------(New E)---------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ upower.spec ++++++ --- /var/tmp/diff_new_pack.qTgSX3/_old 2026-06-25 10:51:45.690066251 +0200 +++ /var/tmp/diff_new_pack.qTgSX3/_new 2026-06-25 10:51:45.694066389 +0200 @@ -28,7 +28,7 @@ %define idevice disabled %endif Name: upower -Version: 1.91.1 +Version: 1.91.2 Release: 0 Summary: Power Device Enumeration Framework License: GPL-2.0-or-later @@ -39,6 +39,11 @@ Source1: upower.rpmlintrc # PATCH-FIX-OPENSUSE: Skip installation of test-only dependencies Patch1: skip-tests-install.patch +# PATCH-FIX-UPSTREAM 25303ba52771ee514b70fb1a5318a8313889ac31.patch -- up-device-battery: Prefer "Standard" over "Fast" charging +Patch2: https://gitlab.freedesktop.org/upower/upower/-/commit/25303ba52771ee514b70fb1a5318a8313889ac31.patch +# 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 @@ -170,6 +175,8 @@ %{_mandir}/man7/UPower.7%{?ext_man} %{_mandir}/man8/upowerd.8%{?ext_man} %{_datadir}/polkit-1/actions/org.freedesktop.upower.policy +# Removed by reverting: d75f2dbee4df2 +# %%{_datadir}/polkit-1/rules.d/org.freedesktop.upower.rules %{_datadir}/zsh/site-functions/_upower # This is created via systemd upower.service nowadays ++++++ 25303ba52771ee514b70fb1a5318a8313889ac31.patch ++++++ >From 25303ba52771ee514b70fb1a5318a8313889ac31 Mon Sep 17 00:00:00 2001 From: Armin Wolf <[email protected]> Date: Mon, 13 Apr 2026 11:34:45 +0200 Subject: [PATCH] up-device-battery: Prefer "Standard" over "Fast" charging When disabling the charging threshold feature upower will change the charging strategy from "Long Life" to "Fast" if a battery supports "Long Life", "Standard" and "Fast". This behavior is suboptimal because "Fast" charging might wear down the battery over time, while "Standard" is supposed to be used as the safe default. Fix this by preferring "Standard" over "Fast" charging in such situations. Resolves: #344 Signed-off-by: Armin Wolf <[email protected]> --- src/linux/integration-test.py | 4 ++-- src/linux/up-device-supply-battery.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/linux/integration-test.py b/src/linux/integration-test.py index 9ceb5820..8271e4f7 100755 --- a/src/linux/integration-test.py +++ b/src/linux/integration-test.py @@ -2364,10 +2364,10 @@ class Tests(dbusmock.DBusTestCase): with open(f"/sys/class/power_supply/{battery_name}/charge_types") as fp: self.assertEqual(fp.read(), "Standard") - # Battery 2 switches to "Fast" + # Battery 2 switches to "Standard" battery_name = bat2_up.split("_")[-1] with open(f"/sys/class/power_supply/{battery_name}/charge_types") as fp: - self.assertEqual(fp.read(), "Fast") + self.assertEqual(fp.read(), "Standard") def test_battery_charge_limit_multiple_batteries_get_charge_threshold_settings_supported( self, diff --git a/src/linux/up-device-supply-battery.c b/src/linux/up-device-supply-battery.c index 947b892c..0acc9ffe 100644 --- a/src/linux/up-device-supply-battery.c +++ b/src/linux/up-device-supply-battery.c @@ -302,12 +302,12 @@ up_device_battery_charge_find_available_charge_types_for_charging (UpDevice *dev UpDeviceSupplyBattery *self = UP_DEVICE_SUPPLY_BATTERY (device); UpDeviceSupplyBatteryChargeTypes charge_types = self->supported_charge_types; - if (charge_types & UP_DEVICE_SUPPLY_BATTERY_CHARGE_TYPES_FAST) - return UP_DEVICE_SUPPLY_BATTERY_CHARGE_TYPES_FAST; - if (charge_types & UP_DEVICE_SUPPLY_BATTERY_CHARGE_TYPES_STANDARD) return UP_DEVICE_SUPPLY_BATTERY_CHARGE_TYPES_STANDARD; + if (charge_types & UP_DEVICE_SUPPLY_BATTERY_CHARGE_TYPES_FAST) + return UP_DEVICE_SUPPLY_BATTERY_CHARGE_TYPES_FAST; + if (charge_types & UP_DEVICE_SUPPLY_BATTERY_CHARGE_TYPES_ADAPTIVE) return UP_DEVICE_SUPPLY_BATTERY_CHARGE_TYPES_ADAPTIVE; -- GitLab ++++++ _service ++++++ --- /var/tmp/diff_new_pack.qTgSX3/_old 2026-06-25 10:51:45.794069853 +0200 +++ /var/tmp/diff_new_pack.qTgSX3/_new 2026-06-25 10:51:45.798069991 +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.1</param> + <param name="revision">v1.91.2</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> ++++++ policy-org.freedesktop.upower.rules-grant-permission-for-skipping-the-inhibitor.patch ++++++ From: Kate Hsuan <[email protected]> Subject: policy: org.freedesktop.upower.rules: grant permission for skipping the inhibitor References: bsc#1265867 Patch-Mainline: v1.91.2 Git-commit: d75f2dbee4df2bc20df840f972a25c73ec2685ae Git-repo: https://gitlab.freedesktop.org/upower/upower.git The polkit rule gives upower the necessary permission to ignore the systemd inhibitor when upower runs the CriticalPowerAction. Signed-off-by: Kate Hsuan <[email protected]> Signed-off-by: Thomas Renninger <[email protected]> diff --git b/policy/meson.build a/policy/meson.build index 972ccb0..3371bde 100644 --- b/policy/meson.build +++ a/policy/meson.build @@ -1,9 +1,3 @@ -install_data( - 'org.freedesktop.upower.rules', - install_tag: 'runtime', - install_dir: join_paths(datadir, 'polkit-1', 'rules.d'), -) - if polkit.found() #newer polkit has the ITS rules included if polkit.version().version_compare('>0.113') diff --git b/policy/org.freedesktop.upower.rules a/policy/org.freedesktop.upower.rules deleted file mode 100644 index 8ec28b8..0000000 --- b/policy/org.freedesktop.upower.rules +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2026 Kate Hsuan <[email protected]> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - - -polkit.addRule(function(action, subject) { - if ((action.id == "org.freedesktop.login1.power-off-ignore-inhibit" || - action.id == "org.freedesktop.login1.reboot-ignore-inhibit" || - action.id == "org.freedesktop.login1.halt-ignore-inhibit" || - action.id == "org.freedesktop.login1.suspend-ignore-inhibit" || - action.id == "org.freedesktop.login1.hibernate-ignore-inhibit") && - subject.user == "root") { - return polkit.Result.YES; - } -}); - ++++++ upower-1.91.1.obscpio -> upower-1.91.2.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/upower-1.91.1/NEWS new/upower-1.91.2/NEWS --- old/upower-1.91.1/NEWS 2026-02-10 13:01:59.000000000 +0100 +++ new/upower-1.91.2/NEWS 2026-04-01 10:20:02.000000000 +0200 @@ -1,3 +1,12 @@ +Version 1.91.2 +-------------- +Released: 2026-04-01 + +- Feature: Skip the systemd inhibitor when performing CriticalPowerAction (!309) +- Feature: Introduce "Auto" CriticalPowerAction using systemd-logind Sleep() (!309) +- Fix: Test CanPowerOff() availability before calling PowerOff() (!311) +- Fix: Add charge limit support for systems providing only charge_control_end_threshold (!310, #342, #285) + Version 1.91.1 -------------- Released: 2026-02-10 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/upower-1.91.1/etc/UPower.conf new/upower-1.91.2/etc/UPower.conf --- old/upower-1.91.1/etc/UPower.conf 2026-02-10 13:01:59.000000000 +0100 +++ new/upower-1.91.2/etc/UPower.conf 2026-04-01 10:20:02.000000000 +0200 @@ -104,10 +104,11 @@ # PowerOff # Hibernate # HybridSleep +# Auto (The CriticalPowerAction will be determined by the system) # Suspend (AllowRiskyCriticalPowerAction should be true to use this option but risky) # Ignore (AllowRiskyCriticalPowerAction should be true to use this option but risky) # # If Suspend isn't available or AllowRiskyCriticalPowerAction=false, HybridSleep will be used # If HybridSleep isn't available, Hibernate will be used # If Hibernate isn't available, PowerOff will be used -CriticalPowerAction=HybridSleep +CriticalPowerAction=Auto diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/upower-1.91.1/meson.build new/upower-1.91.2/meson.build --- old/upower-1.91.1/meson.build 2026-02-10 13:01:59.000000000 +0100 +++ new/upower-1.91.2/meson.build 2026-04-01 10:20:02.000000000 +0200 @@ -1,5 +1,5 @@ project('upower', 'c', - version: '1.91.1', + version: '1.91.2', license: 'GPLv2+', default_options: [ 'buildtype=debugoptimized', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/upower-1.91.1/policy/meson.build new/upower-1.91.2/policy/meson.build --- old/upower-1.91.1/policy/meson.build 2026-02-10 13:01:59.000000000 +0100 +++ new/upower-1.91.2/policy/meson.build 2026-04-01 10:20:02.000000000 +0200 @@ -1,3 +1,9 @@ +install_data( + 'org.freedesktop.upower.rules', + install_tag: 'runtime', + install_dir: join_paths(datadir, 'polkit-1', 'rules.d'), +) + if polkit.found() #newer polkit has the ITS rules included if polkit.version().version_compare('>0.113') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/upower-1.91.1/policy/org.freedesktop.upower.rules new/upower-1.91.2/policy/org.freedesktop.upower.rules --- old/upower-1.91.1/policy/org.freedesktop.upower.rules 1970-01-01 01:00:00.000000000 +0100 +++ new/upower-1.91.2/policy/org.freedesktop.upower.rules 2026-04-01 10:20:02.000000000 +0200 @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2026 Kate Hsuan <[email protected]> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + + +polkit.addRule(function(action, subject) { + if ((action.id == "org.freedesktop.login1.power-off-ignore-inhibit" || + action.id == "org.freedesktop.login1.reboot-ignore-inhibit" || + action.id == "org.freedesktop.login1.halt-ignore-inhibit" || + action.id == "org.freedesktop.login1.suspend-ignore-inhibit" || + action.id == "org.freedesktop.login1.hibernate-ignore-inhibit") && + subject.user == "root") { + return polkit.Result.YES; + } +}); + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/upower-1.91.1/rules/60-upower-battery.rules new/upower-1.91.2/rules/60-upower-battery.rules --- old/upower-1.91.1/rules/60-upower-battery.rules 2026-02-10 13:01:59.000000000 +0100 +++ new/upower-1.91.2/rules/60-upower-battery.rules 2026-04-01 10:20:02.000000000 +0200 @@ -4,4 +4,8 @@ IMPORT{builtin}="hwdb 'battery:$kernel:$attr{model_name}:$attr{[dmi/id]modalias}'", \ GOTO="battery_end" +SUBSYSTEM=="power_supply", ATTR{charge_control_end_threshold}!="", \ + IMPORT{builtin}="hwdb 'battery:$kernel:$attr{model_name}:$attr{[dmi/id]modalias}'", \ + GOTO="battery_end" + LABEL="battery_end" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/upower-1.91.1/src/linux/up-backend.c new/upower-1.91.2/src/linux/up-backend.c --- old/upower-1.91.1/src/linux/up-backend.c 2026-02-10 13:01:59.000000000 +0100 +++ new/upower-1.91.2/src/linux/up-backend.c 2026-04-01 10:20:02.000000000 +0200 @@ -566,10 +566,15 @@ const gchar *method; const gchar *can_method; } actions[] = { + /* + * The fallback order is + * Suspend -> HybridSleep -> Hibernate -> PowerOff -> Sleep -> Ignore + */ { "Suspend", "CanSuspend" }, { "HybridSleep", "CanHybridSleep" }, { "Hibernate", "CanHibernate" }, - { "PowerOff", NULL }, + { "PowerOff", "CanPowerOff" }, + { "Sleep", "CanSleep"}, { "Ignore", NULL }, }; g_autofree gchar *action = NULL; @@ -592,6 +597,12 @@ } } + /* if "Auto", use "Sleep()" */ + if (!g_strcmp0 (action, "Auto")) { + g_free (action); + action = g_strdup_printf ("Sleep"); + } + if (action != NULL) { for (i = 0; i < G_N_ELEMENTS (actions); i++) if (g_str_equal (actions[i].method, action)) @@ -633,6 +644,9 @@ void up_backend_take_action (UpBackend *backend) { + GVariant *res = NULL; + g_autoptr (GError) error = NULL; + g_autofree gchar *action = NULL; const char *method; method = up_backend_get_critical_action (backend); @@ -646,14 +660,43 @@ return; } - g_dbus_proxy_call (backend->priv->logind_proxy, - method, - g_variant_new ("(b)", FALSE), - G_DBUS_CALL_FLAGS_NONE, - G_MAXINT, - NULL, - NULL, - NULL); + if (!g_strcmp0 (method, "Sleep")) + action = g_strdup ("Sleep"); + else + action = g_strdup_printf ("%sWithFlags", method); + + /* flag 16 is SD_LOGIND_SKIP_INHIBITORS */ + res = g_dbus_proxy_call_sync (backend->priv->logind_proxy, + action, + g_variant_new ("(t)", 16), + G_DBUS_CALL_FLAGS_NONE, + -1, + NULL, + &error); + + /* if the new API doesn't work, use old one */ + if (error != NULL) { + g_autofree gchar *action_old = NULL; + g_debug ("The new power action API doesn't work, using old one."); + + if (!g_strcmp0 (method, "Sleep")) { + /* Sleep() is not available, so PowerOff instead */ + g_debug ("Sleep() is not available, using PowerOff instead"); + action_old = g_strdup ("PowerOff"); + } else { + action_old = g_strdup (method); + } + g_dbus_proxy_call (backend->priv->logind_proxy, + action_old, + g_variant_new ("(b)", FALSE), + G_DBUS_CALL_FLAGS_NONE, + -1, + NULL, + NULL, + NULL); + } + if (res != NULL) + g_variant_unref (res); } /** ++++++ upower.obsinfo ++++++ --- /var/tmp/diff_new_pack.qTgSX3/_old 2026-06-25 10:51:46.330088416 +0200 +++ /var/tmp/diff_new_pack.qTgSX3/_new 2026-06-25 10:51:46.334088554 +0200 @@ -1,5 +1,5 @@ name: upower -version: 1.91.1 -mtime: 1770724919 -commit: 57f59b584e066dddafaa11cb8137b32e6e3d15c7 +version: 1.91.2 +mtime: 1775031602 +commit: 17f9e8dc5a967fde13be688634a465c71fb79dd0
