From 079fb291c6f1f33c78f5729fff5e5700cea254c25cc61302e9999db9c8960605 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Mon, 23 Dec 2013 17:51:21 +0000 Subject: [PATCH 1/3] Accepting request 211905 from openSUSE:Factory:Staging:upower - Add gnome-settings-daemon-upower-backport.patch -- from upstream; support upower 0.99. - Up upower-glib dependency. OBS-URL: https://build.opensuse.org/request/show/211905 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-settings-daemon?expand=0&rev=188 --- gnome-settings-daemon-upower-backport.patch | 76 +++++++++++++++++++++ gnome-settings-daemon.changes | 7 ++ gnome-settings-daemon.spec | 5 +- 3 files changed, 87 insertions(+), 1 deletion(-) create mode 100644 gnome-settings-daemon-upower-backport.patch diff --git a/gnome-settings-daemon-upower-backport.patch b/gnome-settings-daemon-upower-backport.patch new file mode 100644 index 0000000..4ace82e --- /dev/null +++ b/gnome-settings-daemon-upower-backport.patch @@ -0,0 +1,76 @@ +From: Mike Gorse +Date: Tue Dec 10 14:36:49 CST 2013 +Subject: [PATCH] Support new libupower-glib API + +Support upower 0.99. Based on commits 88de07 and 3ebfd1 from upstream. +--- + plugins/power/gsd-power-manager.c | 6 +++--- +diff -ur gnome-settings-daemon-3.10.2.orig/plugins/power/gsd-power-manager.c gnome-settings-daemon-3.10.2/plugins/power/gsd-power-manager.c +--- gnome-settings-daemon-3.10.2.orig/plugins/power/gsd-power-manager.c 2013-11-12 12:33:05.000000000 -0600 ++++ gnome-settings-daemon-3.10.2/plugins/power/gsd-power-manager.c 2013-12-10 14:21:08.857851976 -0600 +@@ -991,16 +991,6 @@ + guint i; + GPtrArray *array = NULL; + UpDevice *device; +- gboolean ret; +- GError *error = NULL; +- +- /* get devices from UPower */ +- ret = up_client_enumerate_devices_sync (manager->priv->up_client, NULL, &error); +- if (!ret) { +- g_warning ("failed to get device list: %s", error->message); +- g_error_free (error); +- return FALSE; +- } + + engine_recalculate_state (manager); + +@@ -1031,13 +1021,22 @@ + } + + static void +-engine_device_removed_cb (UpClient *client, UpDevice *device, GsdPowerManager *manager) ++engine_device_removed_cb (UpClient *client, const char *object_path, GsdPowerManager *manager) + { +- gboolean ret; +- ret = g_ptr_array_remove (manager->priv->devices_array, device); +- if (!ret) +- return; +- engine_recalculate_state (manager); ++ gboolean ret = FALSE; ++ guint i; ++ ++ for (i = 0; i < manager->priv->devices_array->len; i++) { ++ UpDevice *device = g_ptr_array_index (manager->priv->devices_array, i); ++ ++ if (g_strcmp0 (object_path, up_device_get_object_path (device)) == 0) { ++ g_ptr_array_remove_index (manager->priv->devices_array, i); ++ ret = TRUE; ++ break; ++ } ++ } ++ if (ret) ++ engine_recalculate_state (manager); + } + + static void +@@ -2172,7 +2172,7 @@ + } + + static void +-up_client_changed_cb (UpClient *client, GsdPowerManager *manager) ++lid_state_changed_cb (UpClient *client, GParamSpec *pspec, GsdPowerManager *manager) + { + gboolean tmp; + +@@ -3276,8 +3276,8 @@ + G_CALLBACK (engine_device_removed_cb), manager); + g_signal_connect (manager->priv->up_client, "device-changed", + G_CALLBACK (engine_device_changed_cb), manager); +- g_signal_connect_after (manager->priv->up_client, "changed", +- G_CALLBACK (up_client_changed_cb), manager); ++ g_signal_connect_after (manager->priv->up_client, "notify::lid-is-closed", ++ G_CALLBACK (lid_state_changed_cb), manager); + g_signal_connect (manager->priv->up_client, "notify::on-battery", + G_CALLBACK (up_client_on_battery_cb), manager); + diff --git a/gnome-settings-daemon.changes b/gnome-settings-daemon.changes index 36b3e66..fb575d2 100644 --- a/gnome-settings-daemon.changes +++ b/gnome-settings-daemon.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Dec 20 00:16:59 UTC 2013 - mgorse@suse.com + +- Add gnome-settings-daemon-upower-backport.patch -- from upstream; + support upower 0.99. +- Up upower-glib dependency. + ------------------------------------------------------------------- Sat Dec 14 21:42:59 UTC 2013 - zaitor@opensuse.org diff --git a/gnome-settings-daemon.spec b/gnome-settings-daemon.spec index 16d181e..29e0d34 100644 --- a/gnome-settings-daemon.spec +++ b/gnome-settings-daemon.spec @@ -51,6 +51,8 @@ Patch17: gnome-settings-daemon-stop-reload-proxy-settings.patch Patch19: gnome-settings-daemon-notify-idle-resumed.patch # PATCH-FIX-UPSTREAM gnome-settings-daemon-export-Gtk_ShellShowsDesktop-setting.patch bgo#712302 zaitor@opensuse.org -- Stop showing desktopfolder in nautilus sidebar when using gnome-shell. Patch20: gnome-settings-daemon-export-Gtk_ShellShowsDesktop-setting.patch +# PATCH-FEATURE-UPSTREAM gnome-settings-daemon-upower-backport.patch mgorse@suse.com -- Update for libupower-glib API changes. +Patch21: gnome-settings-daemon-upower-backport.patch BuildRequires: cups-devel BuildRequires: fdupes BuildRequires: gnome-common @@ -94,7 +96,7 @@ BuildRequires: pkgconfig(nss) BuildRequires: pkgconfig(packagekit-glib2) >= 0.8.1 BuildRequires: pkgconfig(pango) >= 1.20.0 BuildRequires: pkgconfig(polkit-gobject-1) >= 0.103 -BuildRequires: pkgconfig(upower-glib) >= 0.9.11 +BuildRequires: pkgconfig(upower-glib) >= 0.99.0 BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(xext) BuildRequires: pkgconfig(xfixes) @@ -145,6 +147,7 @@ translation-update-upstream %patch17 -p1 %patch19 -p1 %patch20 -p1 +%patch21 -p1 %build autoreconf -f -i From 30924521fc23cadfc04859848d7932610c7b7739b7f282a298e2ba4181b83b7f Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Mon, 23 Dec 2013 17:52:37 +0000 Subject: [PATCH 2/3] tweak OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-settings-daemon?expand=0&rev=189 --- gnome-settings-daemon.changes | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnome-settings-daemon.changes b/gnome-settings-daemon.changes index fb575d2..7dc2fc4 100644 --- a/gnome-settings-daemon.changes +++ b/gnome-settings-daemon.changes @@ -1,8 +1,8 @@ ------------------------------------------------------------------- Fri Dec 20 00:16:59 UTC 2013 - mgorse@suse.com -- Add gnome-settings-daemon-upower-backport.patch -- from upstream; - support upower 0.99. +- Add gnome-settings-daemon-upower-backport.patch: support UPower + version 0.99. - Up upower-glib dependency. ------------------------------------------------------------------- From d83e6a231896cd50023d2d6f4dab0dd093280dfae72b69f6b090477a35c98fef Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Mon, 23 Dec 2013 17:56:47 +0000 Subject: [PATCH 3/3] tweak OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-settings-daemon?expand=0&rev=190 --- gnome-settings-daemon.changes | 1 - 1 file changed, 1 deletion(-) diff --git a/gnome-settings-daemon.changes b/gnome-settings-daemon.changes index 7dc2fc4..9245079 100644 --- a/gnome-settings-daemon.changes +++ b/gnome-settings-daemon.changes @@ -3,7 +3,6 @@ Fri Dec 20 00:16:59 UTC 2013 - mgorse@suse.com - Add gnome-settings-daemon-upower-backport.patch: support UPower version 0.99. -- Up upower-glib dependency. ------------------------------------------------------------------- Sat Dec 14 21:42:59 UTC 2013 - zaitor@opensuse.org