diff --git a/.gitignore b/.gitignore index 57e30d5..9ae3795 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/upower-v1.90.4.tar.bz2 +SOURCES/upower-v1.90.6.tar.bz2 diff --git a/.upower.metadata b/.upower.metadata index 66985f2..3b645be 100644 --- a/.upower.metadata +++ b/.upower.metadata @@ -1 +1 @@ -82b69c2c59c49d75f2e3c81a3d086d5d1ebda1f2 SOURCES/upower-v1.90.4.tar.bz2 +4d1a005e5dd6bb907e7dae79753e98891888de36 SOURCES/upower-v1.90.6.tar.bz2 diff --git a/SOURCES/0001-Fix-race-condition-in-test_sibling_priority_no_overwrite.patch b/SOURCES/0001-Fix-race-condition-in-test_sibling_priority_no_overwrite.patch new file mode 100644 index 0000000..c39928b --- /dev/null +++ b/SOURCES/0001-Fix-race-condition-in-test_sibling_priority_no_overwrite.patch @@ -0,0 +1,26 @@ +From 9ee76826bd41a5d3a377dfd6f5835f42ec50be9a Mon Sep 17 00:00:00 2001 +From: Stuart Hayhurst +Date: Wed, 25 Sep 2024 16:56:11 +0100 +Subject: [PATCH] Fix race condition in test_sibling_priority_no_overwrite + +--- + src/linux/integration-test.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/linux/integration-test.py b/src/linux/integration-test.py +index 6b1514a9..f6c804a4 100755 +--- a/src/linux/integration-test.py ++++ b/src/linux/integration-test.py +@@ -3148,8 +3148,8 @@ class Tests(dbusmock.DBusTestCase): + def test_sibling_priority_no_overwrite(self): + 'Test siblings using the fallback device do not overwrite previous guesses' + +- self.start_daemon() + self.testbed.add_from_file(os.path.join(edir, 'tests/wacom-pen-digitiser.device')) ++ self.start_daemon() + + self.assertDevs({ + 'battery_wacom_battery_0': { +-- +GitLab + diff --git a/SOURCES/0002-linux-up-enumerator-udev-Find-the.patch b/SOURCES/0002-linux-up-enumerator-udev-Find-the.patch new file mode 100644 index 0000000..54c0681 --- /dev/null +++ b/SOURCES/0002-linux-up-enumerator-udev-Find-the.patch @@ -0,0 +1,43 @@ +From 7d7bb84fde91bef9ee7eba924cbdfa74639cc4fe Mon Sep 17 00:00:00 2001 +From: Kate Hsuan +Date: Tue, 18 Jun 2024 15:04:29 +0800 +Subject: [PATCH] linux: up-enumerator-udev: Find the correct parent id for + input devices + +The parent id for the devices under "/sys/devices/virtual/misc/uhid/*" +points to /sys/devices/virtual/misc/uhid. It will cause the device +information to be updated incorrectly. For example, the type for a mouse is +updated to "keyboard". This patch makes sure the correct parent id for +each input device. + +Resolves: #268 #286 +--- + src/linux/up-enumerator-udev.c | 11 ++++++++++- + 1 file changed, 10 insertions(+), 1 deletion(-) + +diff --git a/src/linux/up-enumerator-udev.c b/src/linux/up-enumerator-udev.c +index 36e3887b..553f6524 100644 +--- a/src/linux/up-enumerator-udev.c ++++ b/src/linux/up-enumerator-udev.c +@@ -66,8 +66,17 @@ device_parent_id (GUdevDevice *dev) + return NULL; + + /* Continue walk if the parent is a "hid" device */ +- if (g_strcmp0 (subsystem, "hid") == 0) ++ if (g_strcmp0 (subsystem, "hid") == 0) { ++ /* if the parent is under /sys/devices/virtual/misc/uhid, the device should be input devices ++ * and return the path immediately to make sure they belongs to the correct parent. ++ * for example: ++ * root@fedora:/sys/devices/virtual/misc/uhid# ls ++ * 0005:046D:B01A.0005 0005:05AC:0250.000B dev power subsystem uevent */ ++ if (g_strrstr (g_udev_device_get_sysfs_path (parent), "/sys/devices/virtual/misc/uhid")) ++ return g_strdup (g_udev_device_get_sysfs_path (parent)); ++ + return device_parent_id (parent); ++ } + + /* Also skip over USB interfaces, we care about full devices */ + if (g_strcmp0 (subsystem, "usb") == 0 && +-- +GitLab + diff --git a/SPECS/upower.spec b/SPECS/upower.spec index 350136f..9b2fd2e 100644 --- a/SPECS/upower.spec +++ b/SPECS/upower.spec @@ -1,8 +1,8 @@ ## START: Set by rpmautospec -## (rpmautospec version 0.6.1) +## (rpmautospec version 0.6.5) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: - release_number = 3; + release_number = 2; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} @@ -10,7 +10,7 @@ Summary: Power Management Service Name: upower -Version: 1.90.4 +Version: 1.90.6 Release: %autorelease License: GPL-2.0-or-later URL: http://upower.freedesktop.org/ @@ -30,11 +30,16 @@ BuildRequires: libimobiledevice-devel BuildRequires: glib2-devel >= 2.6.0 BuildRequires: gobject-introspection-devel BuildRequires: gtk-doc +BuildRequires: polkit-devel BuildRequires: systemd Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: udev +# https://gitlab.freedesktop.org/upower/upower/-/commit/9ee76826bd41a5d3a377dfd6f5835f42ec50be9a.patch +Patch1001: 0001-Fix-race-condition-in-test_sibling_priority_no_overwrite.patch +# https://gitlab.freedesktop.org/upower/upower/-/commit/7d7bb84fde91bef9ee7eba924cbdfa74639cc4fe.patch +Patch1002: 0002-linux-up-enumerator-udev-Find-the.patch %description UPower (formerly DeviceKit-power) provides a daemon, API and command @@ -110,6 +115,7 @@ Developer documentation for for libupower-glib. %{_datadir}/dbus-1/system-services/*.service %{_unitdir}/*.service %{_datadir}/installed-tests/upower/upower-integration.test +%{_datadir}/polkit-1/actions/org.freedesktop.upower.policy %files libs %license COPYING @@ -132,6 +138,16 @@ Developer documentation for for libupower-glib. %changelog ## START: Generated by rpmautospec +* Tue Oct 29 2024 Troy Dawson - 1.90.6-2 +- Bump release for October 2024 mass rebuild: + +* Tue Oct 15 2024 Kate Hsuan - 1.90.6-1 +- Update to upstream version 1.90.6 +- Update to the upstream version 1.90.6 +- Include a fix patch for "incorrect external device battery update" issue. + Link: https://gitlab.freedesktop.org/upower/upower/- + /commit/7d7bb84fde91bef9ee7eba924cbdfa74639cc4fe + * Mon Jun 24 2024 Troy Dawson - 1.90.4-3 - Bump release for June 2024 mass rebuild