From ff97b9eb53fcb3abdf8392b9d26d166c852edf41 Mon Sep 17 00:00:00 2001 From: Kate Hsuan Date: Tue, 25 Mar 2025 13:17:58 +0800 Subject: [PATCH] Update to the upstream version 1.90.8 - Update to 1.90.8 - README and HACKING were renamed to README.md and HACKING.md - Support zsh-completion - Resolve memory leak when connecting/disconnecting and refreshing the battery info. Resolves: RHEL-74518 --- .gitignore | 1 + ...n-test_sibling_priority_no_overwrite.patch | 26 ----------- 0002-linux-up-enumerator-udev-Find-the.patch | 43 ------------------- sources | 2 +- upower.spec | 10 ++--- 5 files changed, 6 insertions(+), 76 deletions(-) delete mode 100644 0001-Fix-race-condition-in-test_sibling_priority_no_overwrite.patch delete mode 100644 0002-linux-up-enumerator-udev-Find-the.patch diff --git a/.gitignore b/.gitignore index 4d808ab..b89a5a3 100644 --- a/.gitignore +++ b/.gitignore @@ -42,3 +42,4 @@ upower-0.9.5.tar.bz2 /upower-v1.90.2.tar.bz2 /upower-v1.90.4.tar.bz2 /upower-v1.90.6.tar.bz2 +/upower-v1.90.8.tar.bz2 diff --git a/0001-Fix-race-condition-in-test_sibling_priority_no_overwrite.patch b/0001-Fix-race-condition-in-test_sibling_priority_no_overwrite.patch deleted file mode 100644 index c39928b..0000000 --- a/0001-Fix-race-condition-in-test_sibling_priority_no_overwrite.patch +++ /dev/null @@ -1,26 +0,0 @@ -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/0002-linux-up-enumerator-udev-Find-the.patch b/0002-linux-up-enumerator-udev-Find-the.patch deleted file mode 100644 index 54c0681..0000000 --- a/0002-linux-up-enumerator-udev-Find-the.patch +++ /dev/null @@ -1,43 +0,0 @@ -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/sources b/sources index 666497c..f7c8fa7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (upower-v1.90.6.tar.bz2) = 8ac1c0685b73efece0ecfbee7a37cb7c47601d252210cf3ecc32d1e44cabdde4c8b59b9a93d8bf21e25b3ecbbb95fb952958b37a53f878128747231d4334e5a6 +SHA512 (upower-v1.90.8.tar.bz2) = 529e0963df6b01576d72abc259148a0303609881ee4aa88e5b9a1cdef11c10b7ab802a5c1c85430ca335f5a54a1114453b0a80eec83fdbf444ed0d34353ceff1 diff --git a/upower.spec b/upower.spec index c538f47..6f6010d 100644 --- a/upower.spec +++ b/upower.spec @@ -1,6 +1,6 @@ Summary: Power Management Service Name: upower -Version: 1.90.6 +Version: 1.90.8 Release: %autorelease License: GPL-2.0-or-later URL: http://upower.freedesktop.org/ @@ -26,10 +26,7 @@ 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 +# Patches %description UPower (formerly DeviceKit-power) provides a daemon, API and command @@ -90,7 +87,7 @@ Developer documentation for for libupower-glib. %files -f upower.lang %{!?_licensedir:%global license %%doc} %license COPYING -%doc NEWS AUTHORS HACKING README +%doc NEWS AUTHORS HACKING.md README.md %{_datadir}/dbus-1/system.d/*.conf %{_udevrulesdir}/*.rules %{_udevhwdbdir}/*.hwdb @@ -106,6 +103,7 @@ Developer documentation for for libupower-glib. %{_unitdir}/*.service %{_datadir}/installed-tests/upower/upower-integration.test %{_datadir}/polkit-1/actions/org.freedesktop.upower.policy +%{_datadir}/zsh/site-functions/_upower %files libs %license COPYING