Package: release.debian.org
Severity: normal
User: release.debian....@packages.debian.org
Usertags: unblock

Please unblock package gnome-settings-daemon. It has a minimal fix for
#861111 (Severity: important).

Upstream discovered that the MediaKeys component of g-s-d failed to
set up its intended and documented D-Bus API, by not requesting the
intended D-Bus name org.gnome.SettingsDaemon.MediaKeys. Instead,
everyone who uses that API has been using it via the name
org.gnome.SettingsDaemon.

GNOME 3.24 splits up the g-s-d process into multiple smaller
daemons, which makes use of the SettingsDaemon name inappropriate,
so upstream intend to carry out a transition to the documented MediaKeys
name during our buster release cycle.

This transition will go more smoothly if we make g-s-d in stretch
own both bus names - SettingsDaemon (which it already does), and
the documented MediaKeys name. That way, packages that are converted
to use the documented name during the buster cycle won't need a
versioned dependency on g-s-d (>> stretch), making apt's job easier
during the future upgrade from stretch to buster. This way will also
be better for backports from buster to stretch.

unblock gnome-settings-daemon/3.22.2-2

Thanks,
    S
diffstat for gnome-settings-daemon-3.22.2 gnome-settings-daemon-3.22.2

 changelog                                                       |   11 +
 patches/media-keys-Fix-mmkeys-D-Bus-API-to-match-API-docs.patch |   62 ++++++++++
 patches/series                                                  |    1 
 3 files changed, 74 insertions(+)

diff -Nru gnome-settings-daemon-3.22.2/debian/changelog gnome-settings-daemon-3.22.2/debian/changelog
--- gnome-settings-daemon-3.22.2/debian/changelog	2017-03-14 17:22:17.000000000 +0000
+++ gnome-settings-daemon-3.22.2/debian/changelog	2017-04-24 19:54:01.000000000 +0100
@@ -1,3 +1,14 @@
+gnome-settings-daemon (3.22.2-2) unstable; urgency=medium
+
+  * Team upload
+  * d/p/media-keys-Fix-mmkeys-D-Bus-API-to-match-API-docs.patch:
+    Own the D-Bus name that the API documentation tells users of the
+    multimedia keys API they should use (org.gnome.SettingsDaemon.MediaKeys),
+    in addition to the D-Bus name that they actually use in practice
+    (org.gnome.SettingsDaemon). (Closes: #861111)
+
+ -- Simon McVittie <s...@debian.org>  Mon, 24 Apr 2017 19:54:01 +0100
+
 gnome-settings-daemon (3.22.2-1) unstable; urgency=medium
 
   * New upstream release.
diff -Nru gnome-settings-daemon-3.22.2/debian/patches/media-keys-Fix-mmkeys-D-Bus-API-to-match-API-docs.patch gnome-settings-daemon-3.22.2/debian/patches/media-keys-Fix-mmkeys-D-Bus-API-to-match-API-docs.patch
--- gnome-settings-daemon-3.22.2/debian/patches/media-keys-Fix-mmkeys-D-Bus-API-to-match-API-docs.patch	1970-01-01 01:00:00.000000000 +0100
+++ gnome-settings-daemon-3.22.2/debian/patches/media-keys-Fix-mmkeys-D-Bus-API-to-match-API-docs.patch	2017-04-24 19:35:57.000000000 +0100
@@ -0,0 +1,62 @@
+From: Bastien Nocera <had...@hadess.net>
+Date: Fri, 21 Apr 2017 15:30:47 +0200
+Subject: media-keys: Fix mmkeys D-Bus API to match API docs
+
+Bizarrely, since 2011, gnome-settings-daemon was documented as using
+org.gnome.SettingsDaemon.MediaKeys D-Bus name, but everybody ended up
+using the org.gnome.SettingsDaemon owned by the daemon instead, and
+never reported the discrepancy.
+
+This fixes the code to match the 6-year old API as documented by owning
+the org.gnome.SettingsDaemon.MediaKeys.
+
+The portion of this patch adding the org.gnome.SettingsDaemon.MediaKeys
+name owning will need to be backported as far as reasonably possible by
+distributions, and all users of the API changed before GNOME 3.26. This
+would obviously have been easier if the problem was reported when
+detected, committer of this fix included.
+
+Bug: https://bugzilla.gnome.org/show_bug.cgi?id=781326
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=861111
+Origin: upstream, 3.22.3, commit:12c92274bc118836d9c6dcb5262b82536ef2fe58
+---
+ plugins/media-keys/gsd-media-keys-manager.c | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+diff --git a/plugins/media-keys/gsd-media-keys-manager.c b/plugins/media-keys/gsd-media-keys-manager.c
+index 33b6762c..bf79cd77 100644
+--- a/plugins/media-keys/gsd-media-keys-manager.c
++++ b/plugins/media-keys/gsd-media-keys-manager.c
+@@ -219,6 +219,8 @@ struct GsdMediaKeysManagerPrivate
+ 
+         guint            start_idle_id;
+ 
++        /* Multimedia keys */
++        guint            mmkeys_name_id;
+         MprisController *mpris_controller;
+ };
+ 
+@@ -2926,6 +2928,11 @@ gsd_media_keys_manager_stop (GsdMediaKeysManager *manager)
+                 priv->start_idle_id = 0;
+         }
+ 
++        if (priv->mmkeys_name_id > 0) {
++                g_bus_unown_name (priv->mmkeys_name_id);
++                priv->mmkeys_name_id = 0;
++        }
++
+         if (priv->bus_cancellable != NULL) {
+                 g_cancellable_cancel (priv->bus_cancellable);
+                 g_object_unref (priv->bus_cancellable);
+@@ -3227,6 +3234,11 @@ on_bus_gotten (GObject             *source_object,
+                                            NULL,
+                                            NULL);
+ 
++        manager->priv->mmkeys_name_id = g_bus_own_name_on_connection (manager->priv->connection,
++                                                                      "org.gnome.SettingsDaemon.MediaKeys",
++                                                                      G_BUS_NAME_OWNER_FLAGS_NONE,
++                                                                      NULL, NULL, NULL, NULL);
++
+         g_dbus_proxy_new (manager->priv->connection,
+                           G_DBUS_PROXY_FLAGS_NONE,
+                           NULL,
diff -Nru gnome-settings-daemon-3.22.2/debian/patches/series gnome-settings-daemon-3.22.2/debian/patches/series
--- gnome-settings-daemon-3.22.2/debian/patches/series	2015-10-12 10:53:12.000000000 +0100
+++ gnome-settings-daemon-3.22.2/debian/patches/series	2017-04-24 19:35:57.000000000 +0100
@@ -1 +1,2 @@
+media-keys-Fix-mmkeys-D-Bus-API-to-match-API-docs.patch
 04_superP.patch

Reply via email to