diff --git a/hardware/powermanagement/upower/actions.py b/hardware/powermanagement/upower/actions.py index d7a0b2527f..64398d36ca 100644 --- a/hardware/powermanagement/upower/actions.py +++ b/hardware/powermanagement/upower/actions.py @@ -2,26 +2,26 @@ # -*- coding: utf-8 -*- # # Licensed under the GNU General Public License, version 3. -# See the file http://www.gnu.org/licenses/gpl.txt +# See the file https://www.gnu.org/licenses/gpl-3.0.txt -from pisi.actionsapi import get -from pisi.actionsapi import autotools -from pisi.actionsapi import pisitools -from pisi.actionsapi import shelltools -from pisi.actionsapi import mesontools +from pisi.actionsapi import mesontools, pisitools + +i = ''.join([ + ' --prefix=/usr', + ' --buildtype=release', + ' -Dintrospection=enabled', + ' -Dsystemdsystemunitdir=no', + ' -Didevice=enabled', + ' -Dpolkit=enabled ' + ]) def setup(): - shelltools.system("sed '/parse_version/d' -i src/linux/integration-test.py") - #pisitools.dosed("configure", "DISABLE_DEPRECATED", deleteLine=True) - mesontools.configure("-Dgtk-doc=false \ - -Dudevrulesdir=/lib/udev/rules.d \ - -Dudevhwdbdir=/etc/udev/hwdb.d \ - -Dintrospection=enabled \ - -Dsystemdsystemunitdir=no") + mesontools.configure(i) + def build(): mesontools.build() def install(): mesontools.install() - pisitools.dodoc("COPYING", "README") + pisitools.dodoc("AUTHORS", "COPYING", "NEWS") diff --git a/hardware/powermanagement/upower/files/0.99.18-meson-Allow-unittest-inspector-to-fail.patch b/hardware/powermanagement/upower/files/0.99.18-meson-Allow-unittest-inspector-to-fail.patch deleted file mode 100644 index feafa87e97..0000000000 --- a/hardware/powermanagement/upower/files/0.99.18-meson-Allow-unittest-inspector-to-fail.patch +++ /dev/null @@ -1,31 +0,0 @@ -Bug: https://bugs.gentoo.org/848525 - -From aa646fa0ca3e164b09949c546796ec50433b748d Mon Sep 17 00:00:00 2001 -From: Benjamin Berg -Date: Tue, 17 May 2022 16:02:49 +0200 -Subject: [PATCH] meson: Allow unittest inspector to fail - -It is only used to make the test output nicer, and it is completely fine -to fail. - -Closes: #187 ---- - src/meson.build | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/meson.build b/src/meson.build -index b49d5f0..2e1edd1 100644 ---- a/src/meson.build -+++ b/src/meson.build -@@ -124,7 +124,7 @@ if os_backend == 'linux' and gobject_introspection.found() - - python3 = find_program('python3') - unittest_inspector = find_program('linux/unittest_inspector.py') -- r = run_command(unittest_inspector, files('linux/integration-test.py'), check: true) -+ r = run_command(unittest_inspector, files('linux/integration-test.py'), check: false) - unit_tests = r.stdout().strip().split('\n') - - foreach ut: unit_tests --- -2.35.1 - diff --git a/hardware/powermanagement/upower/files/0001-build-Use-a-newer-libplist-if-available.patch b/hardware/powermanagement/upower/files/0001-build-Use-a-newer-libplist-if-available.patch deleted file mode 100644 index 3e9e3b612d..0000000000 --- a/hardware/powermanagement/upower/files/0001-build-Use-a-newer-libplist-if-available.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 694207d3f08bdd2095f01eee09eb523363800825 Mon Sep 17 00:00:00 2001 -From: Bastien Nocera -Date: Tue, 16 Jun 2020 14:04:25 +0200 -Subject: [PATCH] build: Use a newer libplist if available - ---- - configure.ac | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index a96b794..5f08d91 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -202,8 +202,10 @@ if test x$with_backend = xlinux; then - PKG_CHECK_MODULES(USB, [libusb-1.0 >= 1.0.0]) - AC_ARG_WITH(idevice, AS_HELP_STRING([--without-idevice],[Build without libimobiledevice]), - with_idevice=$withval,with_idevice=yes) -+ LIBPLIST_DEP=libplist -+ PKG_CHECK_EXISTS(libplist-2.0, LIBPLIST_DEP=libplist-2.0) - AS_IF([test "x$with_idevice" != "xno"], -- [PKG_CHECK_MODULES(IDEVICE, libimobiledevice-1.0 >= 0.9.7 libplist >= 0.12, have_idevice=yes, have_idevice=no)], -+ [PKG_CHECK_MODULES(IDEVICE, libimobiledevice-1.0 >= 0.9.7 $LIBPLIST_DEP, have_idevice=yes, have_idevice=no)], - [have_idevice=no]) - AS_IF([test "x$have_idevice" = "xyes"], - [AC_DEFINE(HAVE_IDEVICE, 1, [Define to 1 if iDevice is going to be built])]) --- -2.26.2 - diff --git a/hardware/powermanagement/upower/files/0001-linux-Add-support-for-iPhone-XR-XS-models.patch b/hardware/powermanagement/upower/files/0001-linux-Add-support-for-iPhone-XR-XS-models.patch deleted file mode 100644 index 08654a1c08..0000000000 --- a/hardware/powermanagement/upower/files/0001-linux-Add-support-for-iPhone-XR-XS-models.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 97185bae75b16bea48d532aa5511417e485b1c06 Mon Sep 17 00:00:00 2001 -From: Bastien Nocera -Date: Wed, 17 Jun 2020 10:51:09 +0200 -Subject: [PATCH] linux: Add support for iPhone XR, XS models - -Modifying the udev serial to be acceptable as an hyphened UDID, as the -usbmux stack expects. - -Closes: #114 ---- - src/linux/up-device-idevice.c | 28 ++++++++++++++++++++++++++-- - 1 file changed, 26 insertions(+), 2 deletions(-) - -diff --git a/src/linux/up-device-idevice.c b/src/linux/up-device-idevice.c -index a808269..d2fa0a1 100644 ---- a/src/linux/up-device-idevice.c -+++ b/src/linux/up-device-idevice.c -@@ -203,6 +203,28 @@ out: - return G_SOURCE_CONTINUE; - } - -+static char * -+get_device_uuid (GUdevDevice *native) -+{ -+ const char *uuid; -+ char *retval; -+ -+ uuid = g_udev_device_get_property (native, "ID_SERIAL_SHORT"); -+ if (uuid == NULL) -+ return NULL; -+ -+ if (strlen (uuid) != 24) -+ return g_strdup (uuid); -+ -+ /* new style UDID: add hyphen between first 8 and following 16 digits */ -+ retval = g_malloc0 (24 + 1 + 1); -+ memcpy (&retval[0], &uuid[0], 8); -+ retval[8] = '-'; -+ memcpy (&retval[9], &uuid[8], 16); -+ -+ return retval; -+} -+ - /** - * up_device_idevice_coldplug: - * -@@ -213,7 +235,7 @@ up_device_idevice_coldplug (UpDevice *device) - { - UpDeviceIdevice *idevice = UP_DEVICE_IDEVICE (device); - GUdevDevice *native; -- const gchar *uuid; -+ char *uuid; - const gchar *model; - UpDeviceKind kind; - -@@ -223,7 +245,7 @@ up_device_idevice_coldplug (UpDevice *device) - return FALSE; - - /* Get the UUID */ -- uuid = g_udev_device_get_property (native, "ID_SERIAL_SHORT"); -+ uuid = get_device_uuid (native); - if (uuid == NULL) - return FALSE; - -@@ -253,6 +275,8 @@ up_device_idevice_coldplug (UpDevice *device) - g_source_set_name_by_id (idevice->priv->start_id, - "[upower] up_device_idevice_start_poll_cb (linux)"); - -+ g_free (uuid); -+ - return TRUE; - } - --- -2.26.2 - diff --git a/hardware/powermanagement/upower/files/LINGUAS.patch b/hardware/powermanagement/upower/files/LINGUAS.patch new file mode 100644 index 0000000000..6e6e842cb7 --- /dev/null +++ b/hardware/powermanagement/upower/files/LINGUAS.patch @@ -0,0 +1,14 @@ +diff --git a/po/LINGUAS b/po/LINGUAS +index 0e617f9..5258b29 100644 +--- a/po/LINGUAS ++++ b/po/LINGUAS +@@ -2,6 +2,7 @@ + # + fr + it +-sv ++ka + pl +- ++sv ++tr diff --git a/hardware/powermanagement/upower/files/add-tr.patch b/hardware/powermanagement/upower/files/add-tr.patch deleted file mode 100644 index 31304f39c2..0000000000 --- a/hardware/powermanagement/upower/files/add-tr.patch +++ /dev/null @@ -1,8 +0,0 @@ ---- upower-0.9.4.orig/po/LINGUAS -+++ upower-0.9.4/po/LINGUAS -@@ -3,4 +3,4 @@ - it - sv - pl -- -+tr diff --git a/hardware/powermanagement/upower/files/create-dir-runtime.patch b/hardware/powermanagement/upower/files/create-dir-runtime.patch deleted file mode 100644 index 34340d44ec..0000000000 --- a/hardware/powermanagement/upower/files/create-dir-runtime.patch +++ /dev/null @@ -1,34 +0,0 @@ -From b9cff29978113aefe3ad18521f383f12ab099a34 Mon Sep 17 00:00:00 2001 -From: Cosimo Cecchi -Date: Tue, 25 Feb 2014 09:43:04 +0000 -Subject: Create the history directory at runtime - -In addition to build time - this increases compatibilty with OSTree, -which starts out with an empty /var. - -Signed-off-by: Richard Hughes ---- -diff --git a/src/up-history.c b/src/up-history.c -index f9d0fdf..795b093 100644 ---- a/src/up-history.c -+++ b/src/up-history.c -@@ -414,6 +414,7 @@ up_history_set_directory (UpHistory *history, const gchar *dir) - { - g_free (history->priv->dir); - history->priv->dir = g_strdup (dir); -+ g_mkdir_with_parents (dir, 0755); - } - - /** -@@ -887,7 +888,8 @@ up_history_init (UpHistory *history) - history->priv->data_time_full = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref); - history->priv->data_time_empty = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref); - history->priv->max_data_age = UP_HISTORY_DEFAULT_MAX_DATA_AGE; -- history->priv->dir = g_build_filename (HISTORY_DIR, NULL); -+ -+ up_history_set_directory (history, HISTORY_DIR); - } - - /** --- -cgit v0.9.0.2-2-gbebe diff --git a/hardware/powermanagement/upower/files/fix-segfault.patch b/hardware/powermanagement/upower/files/fix-segfault.patch deleted file mode 100644 index 3e89763207..0000000000 --- a/hardware/powermanagement/upower/files/fix-segfault.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 0d64bbddaa0078ef148d609a3cfad854cf00d7de Mon Sep 17 00:00:00 2001 -From: Martin Pitt -Date: Fri, 08 Nov 2013 13:59:50 +0000 -Subject: lib: Fix segfault on getting property when daemon is not running - -This fixes "upower --version" when the daemon is not running, and thus the -client proxy is NULL. ---- -diff --git a/libupower-glib/up-client.c b/libupower-glib/up-client.c -index 35d7b5d..17fb02d 100644 ---- a/libupower-glib/up-client.c -+++ b/libupower-glib/up-client.c -@@ -322,6 +322,9 @@ up_client_get_property (GObject *object, - UpClient *client; - client = UP_CLIENT (object); - -+ if (client->priv->proxy == NULL) -+ return; -+ - switch (prop_id) { - case PROP_DAEMON_VERSION: - g_value_set_string (value, up_client_glue_get_daemon_version (client->priv->proxy)); --- -cgit v0.9.0.2-2-gbebe diff --git a/hardware/powermanagement/upower/pspec.xml b/hardware/powermanagement/upower/pspec.xml index d0766005f5..8ee39fbdb4 100644 --- a/hardware/powermanagement/upower/pspec.xml +++ b/hardware/powermanagement/upower/pspec.xml @@ -1,76 +1,54 @@ - + upower - http://upower.freedesktop.org + https://upower.freedesktop.org/ PisiLinux Community admins@pisilinux.org - GPLv2+ + GPLv2 library app:console - Power Management Service + Power Management Service. upower provides a daemon, API and command line tools for managing power devices attached to the system. - https://gitlab.freedesktop.org/upower/upower/-/archive/v1.90.4/upower-v1.90.4.tar.bz2 + https://gitlab.freedesktop.org/upower/upower/-/archive/v1.90.7/upower-v1.90.7.tar.bz2 tr.po meson - python3-devel - dbus-devel + gtk-doc + libxslt glib2-devel polkit-devel - dbus-glib-devel libgudev-devel - libusb-devel - libplist-devel libimobiledevice-devel gobject-introspection-devel - docbook-xsl - intltool - gtk-doc - add-tr.patch - - + + LINGUAS.patch upower - dbus glib2 polkit - dbus-glib libgudev - libplist libimobiledevice - - libusb + /etc /lib - /usr/lib - /etc/dbus-1 - /etc/udev/hwdb.d/95-upower-hid.hwdb - /usr/share/man - /usr/share/doc - /etc/UPower /usr/bin - /var/lib/upower - /usr/share/gir-1.0 - /usr/share/dbus-1 /usr/libexec - /usr/share/polkit-1 - /usr/share/locale - /usr/share/dbus-1/interfaces/*.xml - /usr/lib/girepository-1.0/*.typelib - /usr/share/installed-tests/upower/upower-integration.test + /usr/lib + /usr/share + /var @@ -78,22 +56,27 @@ upower-devel Development files for upower - upower - dbus-devel glib2-devel polkit-devel - dbus-glib-devel - libgudev-devel - libplist-devel - libimobiledevice-devel + upower + /usr/libexec/upower /usr/include /usr/lib/pkgconfig + /usr/share/gir-1.0 + /usr/share/installed-tests + + 2025-01-30 + 1.90.7 + Version bump. + Mustafa Cinasal + muscnsl@gmail.com + 2024-04-09 1.90.4