pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/sysutils/upower Update upower to 0.99.11.
details: https://anonhg.NetBSD.org/pkgsrc/rev/d13c6bc98b72
branches: trunk
changeset: 414810:d13c6bc98b72
user: bsiegert <bsiegert%pkgsrc.org@localhost>
date: Thu Apr 02 11:38:49 2020 +0000
description:
Update upower to 0.99.11.
Version 0.99.11
~~~~~~~~~~~~~~~
Released: 2019-09-03
New Features:
- Add code of conduct document
- build: Migrate from intltool to gettext
- rules: Split off HID++ udev rules
- Harden systemd service
- Let systemd create /var/lib/upower
- Move D-Bus policy file to /usr/share/dbus-1/system.d/
Bug fixes:
- Fix endless loop burning 100% CPU on keyboard plugout with external
backlight
- linux: Start polling for unknown device batteries too
- linux: Retry to get a battery type if it's unknown
- linux: Don't treat device batteries like laptop batteries
- Replace use of G_TYPE_INSTANCE_GET_PRIVATE and g_type_class_add_private()
Version 0.99.10
~~~~~~~~~~~~~~~
Released: 2019-02-20
Bugfixes:
- Set 'pending-charge' for DisplayDevice if at least one
battery is in the 'pending-charge' state
- Map pending-charge to fully-charged when charge is 100%
Version 0.99.9
~~~~~~~~~~~~~~
Released: 2018-10-25
Bugfixes:
- Fix lack of update after AC status changes, and broken keyboard
backlight, following the daemon lockdown added in 0.99.8
- Multiple API documentation fixes
- Out-of-tree build fixes
Version 0.99.8
~~~~~~~~~~~~~~
Released: 2018-06-18
New Features:
- Lock down systemd service file
- Add support for "Unknown" capacity level, and clarify handling
of devices with coarse battery levels
- Add a new version of up_client_get_devices() which unrefs contents
Bugfixes:
- Fix warnings when D-Bus related properties change
- Prevent crash after attaching an Apple TV, and support newer
versions of iOS
- Lower severity of "unhandled action" messages
- Fix battery status on MacBooks after a plug or unplug event
- Fix double-close on exit
Version 0.99.7
~~~~~~~~~~~~~~
Released: 2017-11-28
New Features:
- Add support for Bluetooth LE device batteries (Bastien Nocera)
- Allow to be replaced via --replace,-r (Christian Kellner)
Bugfixes:
- Fix critical action after resume from hibernate (Miroslav Sustek)
- Fix compilation with libimobiledevice git (Bastien Nocera)
Version 0.99.6
~~~~~~~~~~~~~~
Released: 2017-09-11
New Features:
- Add UP_DEVICE_KIND_GAMING_INPUT for gaming devices (Bastien Nocera)
- Detect joysticks as gaming input devices (Bastien Nocera)
Bugfixes:
- Correctly close inhibitor FD (Benjamin Berg)
- Fix crash when '@' is present in the device name (oleid, Bastien Nocera)
- Fix lid detection on FreeBSD (Alberto Villa)
- Grab the model name from device if unavailable from battery (Bastien Nocera)
Version 0.99.5
~~~~~~~~~~~~~~
Released: 2017-07-24
New Features:
- Add a more complete self test for HID++ devices (Bastien Nocera)
- Add BatteryLevel property for devices with a finite number of power levels (Bastien Nocera)
- Add support for pausing and resuming of the daemon poll (Christian Kellner, Bastien Nocera)
- Get a serial number for device batteries (Bastien Nocera)
- Refresh devices after waking up from sleep (Christian Kellner)
Bugfixes:
- Add proper error and cancellable handling to UpClient constructor (Martin Pitt)
- Do not spin in a loop when /proc/timer_stats cannot be written (Richard Hughes)
- Exit early from up-tool when connecting to upower fails (Martin Pitt)
- Expand the integration-tests to run in more environments (Bastien Nocera, Christian Kellner)
- Fix reading and writing the keyboard brightness level (Hans de Goede, Marco Trevisan)
- Fix -Wformat-y2k compilation errors (Bastien Nocera)
- Lower initial power usage when iDevice isn't accessible (Bastien Nocera)
- Simplify string checks in upower-glib (Bastien Nocera)
diffstat:
sysutils/upower/Makefile | 5 +-
sysutils/upower/buildlink3.mk | 6 +-
sysutils/upower/distinfo | 13 +-
sysutils/upower/patches/patch-libupower-glib_up-client.c | 169 ---------------
sysutils/upower/patches/patch-libupower-glib_up-client.h | 39 ---
sysutils/upower/patches/patch-tools_up-tool.c | 35 ---
6 files changed, 10 insertions(+), 257 deletions(-)
diffs (truncated from 305 to 300 lines):
diff -r 5087c46a909f -r d13c6bc98b72 sysutils/upower/Makefile
--- a/sysutils/upower/Makefile Thu Apr 02 11:22:05 2020 +0000
+++ b/sysutils/upower/Makefile Thu Apr 02 11:38:49 2020 +0000
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.15 2020/03/08 16:48:13 wiz Exp $
+# $NetBSD: Makefile,v 1.16 2020/04/02 11:38:49 bsiegert Exp $
-DISTNAME= upower-0.99.4
-PKGREVISION= 5
+DISTNAME= upower-0.99.11
CATEGORIES= sysutils
MASTER_SITES= https://upower.freedesktop.org/releases/
EXTRACT_SUFX= .tar.xz
diff -r 5087c46a909f -r d13c6bc98b72 sysutils/upower/buildlink3.mk
--- a/sysutils/upower/buildlink3.mk Thu Apr 02 11:22:05 2020 +0000
+++ b/sysutils/upower/buildlink3.mk Thu Apr 02 11:38:49 2020 +0000
@@ -1,12 +1,12 @@
-# $NetBSD: buildlink3.mk,v 1.2 2020/03/08 16:48:13 wiz Exp $
+# $NetBSD: buildlink3.mk,v 1.3 2020/04/02 11:38:49 bsiegert Exp $
BUILDLINK_TREE+= upower
.if !defined(UPOWER_BUILDLINK3_MK)
UPOWER_BUILDLINK3_MK:=
-BUILDLINK_API_DEPENDS.upower+= upower>=0.99.2
-BUILDLINK_ABI_DEPENDS.upower?= upower>=0.99.4nb5
+BUILDLINK_API_DEPENDS.upower+= upower>=0.99.8
+BUILDLINK_ABI_DEPENDS.upower?= upower>=0.99.11
BUILDLINK_PKGSRCDIR.upower?= ../../sysutils/upower
.include "../../devel/glib2/buildlink3.mk"
diff -r 5087c46a909f -r d13c6bc98b72 sysutils/upower/distinfo
--- a/sysutils/upower/distinfo Thu Apr 02 11:22:05 2020 +0000
+++ b/sysutils/upower/distinfo Thu Apr 02 11:38:49 2020 +0000
@@ -1,9 +1,6 @@
-$NetBSD: distinfo,v 1.5 2018/07/18 19:18:07 bsiegert Exp $
+$NetBSD: distinfo,v 1.6 2020/04/02 11:38:49 bsiegert Exp $
-SHA1 (upower-0.99.4.tar.xz) = 70beb18c218e758586fb5d98d79b5121cc4a47b1
-RMD160 (upower-0.99.4.tar.xz) = 6cc312d44a19ffc604c3a3282d03b9cdb6aa3638
-SHA512 (upower-0.99.4.tar.xz) = b3fdee5ccf5f4d0c69e227f543272f6952119132814e27bc8f112716b8d36b5e07741a87bcf02203e80ef910cad9ddffa1adecb338c9a9aaa5e1038b62be07f3
-Size (upower-0.99.4.tar.xz) = 426292 bytes
-SHA1 (patch-libupower-glib_up-client.c) = 9eab8b87649546ab7f4d16f009f464a97142836c
-SHA1 (patch-libupower-glib_up-client.h) = d4c458a6f9ce07166a7e1f6c3ad757ca731b32b7
-SHA1 (patch-tools_up-tool.c) = e7594be12597f47b3c4f2eb65c486004804539ee
+SHA1 (upower-0.99.11.tar.xz) = 5a023b29d64a6ce41cc6901bc46a279041784a9b
+RMD160 (upower-0.99.11.tar.xz) = cb4620efd91cd8d1ac770ca014fa91939f39ed00
+SHA512 (upower-0.99.11.tar.xz) = 67219a0beb98c97ac4512e4fe8ba83fc80a1035d1edb5367dda6911da50c672b047051f2f528e8703be29ab47547d92b6c71a7ef695226a1bdb5bc33e6d18803
+Size (upower-0.99.11.tar.xz) = 430128 bytes
diff -r 5087c46a909f -r d13c6bc98b72 sysutils/upower/patches/patch-libupower-glib_up-client.c
--- a/sysutils/upower/patches/patch-libupower-glib_up-client.c Thu Apr 02 11:22:05 2020 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,169 +0,0 @@
-$NetBSD: patch-libupower-glib_up-client.c,v 1.1 2018/07/18 19:18:07 bsiegert Exp $
-
-From 932a6a39e35754be571e1274aec4730fd42dba13 Mon Sep 17 00:00:00 2001
-From: Martin Pitt <martin.pitt%ubuntu.com@localhost>
-Date: Wed, 18 May 2016 09:22:43 +0200
-Subject: [PATCH 1/9] lib: Add proper error and cancellable handling to
- UpClient constructor
-
-A GObject's _init() should never fail or block, but this is currently the case
-as up_client_init() connects to upowerd on D-Bus. Convert this to the GInitable
-interface and provide a new constructor up_client_new_full() which accepts a
-GCancellable and GError, so that clients can do proper error handling
-and reporting.
-
-This changes up_client_new() to return NULL when connecting to upowerd fails.
-This provides a more well-defined behaviour in this case as clients can check
-for this and our methods stop segfaulting as they have checks like
-
- g_return_val_if_fail (UP_IS_CLIENT (client), ...)
-
-Previously we returned a valid object, but trying to call any method on it
-segfaulted due to the NULL D-Bus proxy, so client code had no chance to check
-whether the UpClient object was really valid.
-
-https://bugs.freedesktop.org/show_bug.cgi?id=95350
-
---- libupower-glib/up-client.c
-+++ libupower-glib/up-client.c
-@@ -39,9 +39,10 @@
- #include "up-daemon-generated.h"
- #include "up-device.h"
-
--static void up_client_class_init (UpClientClass *klass);
--static void up_client_init (UpClient *client);
--static void up_client_finalize (GObject *object);
-+static void up_client_class_init (UpClientClass *klass);
-+static void up_client_initable_iface_init (GInitableIface *iface);
-+static void up_client_init (UpClient *client);
-+static void up_client_finalize (GObject *object);
-
- #define UP_CLIENT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), UP_TYPE_CLIENT, UpClientPrivate))
-
-@@ -73,7 +74,8 @@ enum {
- static guint signals [UP_CLIENT_LAST_SIGNAL] = { 0 };
- static gpointer up_client_object = NULL;
-
--G_DEFINE_TYPE (UpClient, up_client, G_TYPE_OBJECT)
-+G_DEFINE_TYPE_WITH_CODE (UpClient, up_client, G_TYPE_OBJECT,
-+ G_IMPLEMENT_INTERFACE(G_TYPE_INITABLE, up_client_initable_iface_init))
-
- /**
- * up_client_get_devices:
-@@ -434,11 +436,10 @@ up_client_class_init (UpClientClass *klass)
- * up_client_init:
- * @client: This class instance
- */
--static void
--up_client_init (UpClient *client)
-+static gboolean
-+up_client_initable_init (GInitable *initable, GCancellable *cancellable, GError **error)
- {
-- GError *error = NULL;
--
-+ UpClient *client = UP_CLIENT (initable);
- client->priv = UP_CLIENT_GET_PRIVATE (client);
-
- /* connect to main interface */
-@@ -446,13 +447,10 @@ up_client_init (UpClient *client)
- G_DBUS_PROXY_FLAGS_NONE,
- "org.freedesktop.UPower",
- "/org/freedesktop/UPower",
-- NULL,
-- &error);
-- if (client->priv->proxy == NULL) {
-- g_warning ("Couldn't connect to proxy: %s", error->message);
-- g_error_free (error);
-- return;
-- }
-+ cancellable,
-+ error);
-+ if (client->priv->proxy == NULL)
-+ return FALSE;
-
- /* all callbacks */
- g_signal_connect (client->priv->proxy, "device-added",
-@@ -461,6 +459,23 @@ up_client_init (UpClient *client)
- G_CALLBACK (up_device_removed_cb), client);
- g_signal_connect (client->priv->proxy, "notify",
- G_CALLBACK (up_client_notify_cb), client);
-+
-+ return TRUE;
-+}
-+
-+static void
-+up_client_initable_iface_init (GInitableIface *iface)
-+{
-+ iface->init = up_client_initable_init;
-+}
-+
-+/*
-+ * up_client_init:
-+ * @client: This class instance
-+ */
-+static void
-+up_client_init (UpClient *client)
-+{
- }
-
- /*
-@@ -482,23 +497,52 @@ up_client_finalize (GObject *object)
- }
-
- /**
-- * up_client_new:
-+ * up_client_new_full:
-+ * @cancellable: (allow-none): A #GCancellable or %NULL.
-+ * @error: Return location for error or %NULL.
- *
-- * Creates a new #UpClient object.
-+ * Creates a new #UpClient object. If connecting to upowerd on D-Bus fails,
-+ % this returns %NULL and sets @error.
- *
-- * Return value: a new UpClient object.
-+ * Return value: a new UpClient object, or %NULL on failure.
- *
-- * Since: 0.9.0
-+ * Since: 0.99.5
- **/
- UpClient *
--up_client_new (void)
-+up_client_new_full (GCancellable *cancellable, GError **error)
- {
- if (up_client_object != NULL) {
- g_object_ref (up_client_object);
- } else {
-- up_client_object = g_object_new (UP_TYPE_CLIENT, NULL);
-- g_object_add_weak_pointer (up_client_object, &up_client_object);
-+ up_client_object = g_initable_new (UP_TYPE_CLIENT, cancellable, error, NULL);
-+ if (up_client_object)
-+ g_object_add_weak_pointer (up_client_object, &up_client_object);
- }
- return UP_CLIENT (up_client_object);
- }
-
-+/**
-+ * up_client_new:
-+ *
-+ * Creates a new #UpClient object. If connecting to upowerd on D-Bus fails,
-+ * this returns %NULL and prints out a warning with the error message.
-+ * Consider using up_client_new_full() instead which allows you to handle errors
-+ * and cancelling long operations yourself.
-+ *
-+ * Return value: a new UpClient object, or %NULL on failure.
-+ *
-+ * Since: 0.9.0
-+ **/
-+UpClient *
-+up_client_new (void)
-+{
-+ GError *error = NULL;
-+ UpClient *client;
-+ client = up_client_new_full (NULL, &error);
-+ if (client == NULL) {
-+ g_warning ("Couldn't connect to proxy: %s", error->message);
-+ g_error_free (error);
-+ }
-+ return client;
-+}
-+
diff -r 5087c46a909f -r d13c6bc98b72 sysutils/upower/patches/patch-libupower-glib_up-client.h
--- a/sysutils/upower/patches/patch-libupower-glib_up-client.h Thu Apr 02 11:22:05 2020 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-$NetBSD: patch-libupower-glib_up-client.h,v 1.1 2018/07/18 19:18:07 bsiegert Exp $
-
-From 932a6a39e35754be571e1274aec4730fd42dba13 Mon Sep 17 00:00:00 2001
-From: Martin Pitt <martin.pitt%ubuntu.com@localhost>
-Date: Wed, 18 May 2016 09:22:43 +0200
-Subject: [PATCH 1/9] lib: Add proper error and cancellable handling to
- UpClient constructor
-
-A GObject's _init() should never fail or block, but this is currently the case
-as up_client_init() connects to upowerd on D-Bus. Convert this to the GInitable
-interface and provide a new constructor up_client_new_full() which accepts a
-GCancellable and GError, so that clients can do proper error handling
-and reporting.
-
-This changes up_client_new() to return NULL when connecting to upowerd fails.
-This provides a more well-defined behaviour in this case as clients can check
-for this and our methods stop segfaulting as they have checks like
-
- g_return_val_if_fail (UP_IS_CLIENT (client), ...)
-
-Previously we returned a valid object, but trying to call any method on it
-segfaulted due to the NULL D-Bus proxy, so client code had no chance to check
-whether the UpClient object was really valid.
-
-https://bugs.freedesktop.org/show_bug.cgi?id=95350
-
---- libupower-glib/up-client.h
-+++ libupower-glib/up-client.h
-@@ -72,6 +72,7 @@ typedef struct
- /* general */
- GType up_client_get_type (void);
- UpClient *up_client_new (void);
-+UpClient *up_client_new_full (GCancellable *cancellable, GError **error);
-
- /* sync versions */
- UpDevice * up_client_get_display_device (UpClient *client);
---
-2.8.1
-
diff -r 5087c46a909f -r d13c6bc98b72 sysutils/upower/patches/patch-tools_up-tool.c
--- a/sysutils/upower/patches/patch-tools_up-tool.c Thu Apr 02 11:22:05 2020 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-$NetBSD: patch-tools_up-tool.c,v 1.1 2018/07/18 19:18:07 bsiegert Exp $
-
-From 4e83fabac13250fdc61ef5db817e82c32b7b301b Mon Sep 17 00:00:00 2001
-From: Martin Pitt <martin.pitt%ubuntu.com@localhost>
-Date: Tue, 17 May 2016 15:36:21 +0200
-Subject: [PATCH 2/9] up-tool: Exit early when connecting to upower fails
-
-This avoids spewing dozens of assertions like
-
- libupower-glib-CRITICAL **: up_client_get_devices: assertion 'UP_IS_CLIENT (client)' failed
- libupower-glib-CRITICAL **: up_device_get_object_path: assertion 'UP_IS_DEVICE (device)' failed
-
-and useless default values and then exiting successfully (which might confuse
-users or scripts trying to parse the output).
-
-Use the new up_client_new_full() constructor so that we get a proper GError.
-
-Side issue in https://bugs.freedesktop.org/show_bug.cgi?id=95350
-
---- tools/up-tool.c
-+++ tools/up-tool.c
-@@ -285,7 +285,12 @@ main (int argc, char **argv)
- g_option_context_free (context);
-
- loop = g_main_loop_new (NULL, FALSE);
-- client = up_client_new ();
-+ client = up_client_new_full (NULL, &error);
-+ if (client == NULL) {
-+ g_warning ("Cannot connect to upowerd: %s", error->message);
-+ g_error_free (error);
Home |
Main Index |
Thread Index |
Old Index