I have made the following changes intended for : CE:MW:Shared / telepathy-mission-control CE:MW:Shared / telepathy-ring
Please review and accept or decline. BOSS has already run some checks on this request. See the "Messages from BOSS" section below. https://build.pub.meego.com//request/show/7509 Thank You, John Brooks [This message was auto-generated] --- Request # 7509: Messages from BOSS: State: review at 2012-12-06T02:17:58 by bossbot Reviews: accepted by bossbot : Prechecks succeeded. new for CE-maintainers : Please replace this text with a review and approve/reject the review (not the SR). BOSS will take care of the rest Changes: submit: home:special:branches:CE:MW:Shared / telepathy-mission-control -> CE:MW:Shared / telepathy-mission-control changes files: -------------- --- telepathy-mission-control.changes +++ telepathy-mission-control.changes @@ -0,0 +1,6 @@ +* Tue Dec 04 2012 John Brooks <[email protected]> - 5.14.0 +- Fixes NEMO#588: Enable MCE integration to trigger power-saving mode when device is idle +- Fixes NEMO#587: Actually enable connman connectivity support, which was disabled due to a version conflict +- Add 0001-Update-to-current-ConnMan-API.patch from unreleased upstream to update connman interface +- Add 0001-Always-allow-accounts-with-always_dispatch-to-connec.patch to ensure that ring always remains connected + new: ---- 0001-Always-allow-accounts-with-always_dispatch-to-connec.patch 0001-Update-to-current-ConnMan-API.patch spec files: ----------- --- telepathy-mission-control.spec +++ telepathy-mission-control.spec @@ -16,6 +16,8 @@ URL: http://mission-control.sourceforge.net/ Source0: http://telepathy.freedesktop.org/releases/telepathy-mission-control/%{name}-%{version}.tar.gz Source100: telepathy-mission-control.yaml +Patch0: 0001-Update-to-current-ConnMan-API.patch +Patch1: 0001-Always-allow-accounts-with-always_dispatch-to-connec.patch Requires(post): /sbin/ldconfig Requires(postun): /sbin/ldconfig BuildRequires: pkgconfig(dbus-1) >= 0.95 @@ -26,6 +28,7 @@ BuildRequires: pkgconfig(gmodule-no-export-2.0) BuildRequires: pkgconfig(gio-2.0) >= 2.28 BuildRequires: pkgconfig(upower-glib) +BuildRequires: pkgconfig(mce) BuildRequires: libxslt BuildRequires: python BuildRequires: fdupes @@ -52,6 +55,10 @@ %prep %setup -q -n %{name}-%{version} +# 0001-Update-to-current-ConnMan-API.patch +%patch0 -p1 +# 0001-Always-allow-accounts-with-always_dispatch-to-connec.patch +%patch1 -p1 # >> setup # << setup @@ -65,7 +72,7 @@ --with-accounts-cache-dir=/tmp \ --disable-Werror \ --enable-upower \ - --with-connectivity=no \ + --with-connectivity=connman \ --disable-conn-setting make %{?jobs:-j%jobs} other changes: -------------- ++++++ 0001-Always-allow-accounts-with-always_dispatch-to-connec.patch (new) --- 0001-Always-allow-accounts-with-always_dispatch-to-connec.patch +++ 0001-Always-allow-accounts-with-always_dispatch-to-connec.patch @@ -0,0 +1,38 @@ +From c2bd5f28cf634fb9f63ab2db698035a70cc13680 Mon Sep 17 00:00:00 2001 +From: John Brooks <[email protected]> +Date: Tue, 4 Dec 2012 19:01:57 -0700 +Subject: [PATCH] Always allow accounts with always_dispatch to connect + +The always_dispatch account setting historically would allow an account +to connect without regard to connectivity, which is needed by the ring +manager. Kludge-transport did not obey that setting, and would interfere +with connections on those accounts. + +This allows the ring manager to coexist with a connectivity backend, and +maintain its connection even when not connected to the internet. +--- + src/kludge-transport.c | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/src/kludge-transport.c b/src/kludge-transport.c +index c8e2ba1..66b98e3 100644 +--- a/src/kludge-transport.c ++++ b/src/kludge-transport.c +@@ -235,7 +235,13 @@ mcd_kludge_transport_account_connection_cb ( + McdKludgeTransport *self = MCD_KLUDGE_TRANSPORT (user_data); + McdKludgeTransportPrivate *priv = self->priv; + +- if (mcd_connectivity_monitor_is_online (priv->minotaur)) ++ if (_mcd_account_needs_dispatch (account)) ++ { ++ DEBUG ("Always-dispatchable account %s needs no transport, proceeding", ++ mcd_account_get_unique_name (account)); ++ mcd_account_connection_proceed (account, TRUE); ++ } ++ else if (mcd_connectivity_monitor_is_online (priv->minotaur)) + { + mcd_account_connection_bind_transport (account, (McdTransport *) self); + mcd_account_connection_proceed (account, TRUE); +-- +1.7.9.5 + ++++++ 0001-Update-to-current-ConnMan-API.patch (new) --- 0001-Update-to-current-ConnMan-API.patch +++ 0001-Update-to-current-ConnMan-API.patch @@ -0,0 +1,172 @@ +From c3f9cd49aa0238922b5a0e972cf3cbe3a48be6eb Mon Sep 17 00:00:00 2001 +From: Mike Ruprecht <[email protected]> +Date: Thu, 1 Nov 2012 00:24:35 -0500 +Subject: [PATCH] Update to current ConnMan API + +ConnMan 0.79 removed the GetState method and StateChanged signal. +Use the GetProperties method and PropertyChanged signals as their +replacements. + +Bug: https://bugs.freedesktop.org/show_bug.cgi?id=56600 +Reviewed-by: Guillaume Desmottes <[email protected]> +--- + src/connectivity-monitor.c | 57 ++++++++++++++++++++++++++----------- + tests/twisted/fakeconnectivity.py | 17 +++++++---- + 2 files changed, 52 insertions(+), 22 deletions(-) + +diff --git a/src/connectivity-monitor.c b/src/connectivity-monitor.c +index 5e6e425..7337aa5 100644 +--- a/src/connectivity-monitor.c ++++ b/src/connectivity-monitor.c +@@ -148,7 +148,7 @@ connectivity_monitor_nm_state_change_cb (NMClient *client, + + #ifdef HAVE_CONNMAN + static void +-connectivity_monitor_connman_state_changed_cb (DBusGProxy *proxy, ++connectivity_monitor_connman_state_changed (DBusGProxy *proxy, + const gchar *new_state, + McdConnectivityMonitor *connectivity_monitor) + { +@@ -168,25 +168,47 @@ connectivity_monitor_connman_state_changed_cb (DBusGProxy *proxy, + } + + static void ++connectivity_monitor_connman_property_changed_cb (DBusGProxy *proxy, ++ const gchar *prop_name, ++ const GValue *new_value, ++ McdConnectivityMonitor *connectivity_monitor) ++{ ++ if (!tp_strdiff (prop_name, "State")) ++ connectivity_monitor_connman_state_changed (proxy, ++ g_value_get_string (new_value), connectivity_monitor); ++} ++ ++static void + connectivity_monitor_connman_check_state_cb (DBusGProxy *proxy, + DBusGProxyCall *call_id, + gpointer user_data) + { + McdConnectivityMonitor *connectivity_monitor = (McdConnectivityMonitor *) user_data; + GError *error = NULL; +- gchar *state; ++ GHashTable *props; + + if (dbus_g_proxy_end_call (proxy, call_id, &error, +- G_TYPE_STRING, &state, G_TYPE_INVALID)) ++ dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE), ++ &props, G_TYPE_INVALID)) + { +- connectivity_monitor_connman_state_changed_cb (proxy, state, +- connectivity_monitor); +- g_free (state); ++ const gchar *state = tp_asv_get_string (props, "State"); ++ ++ if (state != NULL) ++ { ++ connectivity_monitor_connman_state_changed (proxy, state, ++ connectivity_monitor); ++ } ++ else ++ { ++ DEBUG ("Failed to get State: not in GetProperties return"); ++ } ++ ++ g_hash_table_unref (props); + } + else + { +- DEBUG ("Failed to call GetState: %s", error->message); +- connectivity_monitor_connman_state_changed_cb (proxy, "offline", ++ DEBUG ("Failed to call GetProperties: %s", error->message); ++ connectivity_monitor_connman_state_changed (proxy, "offline", + connectivity_monitor); + } + } +@@ -198,7 +220,7 @@ connectivity_monitor_connman_check_state (McdConnectivityMonitor *connectivity_m + + priv = connectivity_monitor->priv; + +- dbus_g_proxy_begin_call (priv->proxy, "GetState", ++ dbus_g_proxy_begin_call (priv->proxy, "GetProperties", + connectivity_monitor_connman_check_state_cb, connectivity_monitor, NULL, + G_TYPE_INVALID); + } +@@ -280,14 +302,14 @@ mcd_connectivity_monitor_init (McdConnectivityMonitor *connectivity_monitor) + "net.connman.Manager"); + + dbus_g_object_register_marshaller ( +- g_cclosure_marshal_VOID__STRING, +- G_TYPE_NONE, G_TYPE_STRING, G_TYPE_INVALID); ++ g_cclosure_marshal_generic, ++ G_TYPE_NONE, G_TYPE_STRING, G_TYPE_BOXED, G_TYPE_INVALID); + +- dbus_g_proxy_add_signal (priv->proxy, "StateChanged", +- G_TYPE_STRING, G_TYPE_INVALID); ++ dbus_g_proxy_add_signal (priv->proxy, "PropertyChanged", ++ G_TYPE_STRING, G_TYPE_VALUE, G_TYPE_INVALID); + +- dbus_g_proxy_connect_signal (priv->proxy, "StateChanged", +- G_CALLBACK (connectivity_monitor_connman_state_changed_cb), ++ dbus_g_proxy_connect_signal (priv->proxy, "PropertyChanged", ++ G_CALLBACK (connectivity_monitor_connman_property_changed_cb), + connectivity_monitor, NULL); + + connectivity_monitor_connman_check_state (connectivity_monitor); +@@ -336,8 +358,9 @@ connectivity_monitor_finalize (GObject *object) + #ifdef HAVE_CONNMAN + if (priv->proxy != NULL) + { +- dbus_g_proxy_disconnect_signal (priv->proxy, "StateChanged", +- G_CALLBACK (connectivity_monitor_connman_state_changed_cb), connectivity_monitor); ++ dbus_g_proxy_disconnect_signal (priv->proxy, "PropertyChanged", ++ G_CALLBACK (connectivity_monitor_connman_property_changed_cb), ++ connectivity_monitor); + + g_object_unref (priv->proxy); + priv->proxy = NULL; +diff --git a/tests/twisted/fakeconnectivity.py b/tests/twisted/fakeconnectivity.py +index e613aca..c144452 100644 +--- a/tests/twisted/fakeconnectivity.py ++++ b/tests/twisted/fakeconnectivity.py +@@ -43,9 +43,9 @@ class FakeConnectivity(object): + q.add_dbus_method_impl(self.NM_GetDevices, + path=self.NM_PATH, interface=self.NM_INTERFACE, method='GetDevices') + +- q.add_dbus_method_impl(self.ConnMan_GetState, ++ q.add_dbus_method_impl(self.ConnMan_GetProperties, + path=self.CONNMAN_PATH, interface=self.CONNMAN_INTERFACE, +- method='GetState') ++ method='GetProperties') + + self.change_state(initially_online) + +@@ -88,8 +88,15 @@ class FakeConnectivity(object): + def NM_GetDevices(self, e): + self.q.dbus_return(e.message, [], signature='ao') + +- def ConnMan_GetState(self, e): +- self.q.dbus_return(e.message, self.connman_state, signature='s') ++ def Connman_props(self): ++ return { ++ 'OfflineMode': False, ++ 'SessionMode': False, ++ 'State': self.connman_state, ++ } ++ ++ def ConnMan_GetProperties(self, e): ++ self.q.dbus_return(e.message, self.Connman_props(), signature='a{sv}') + + def change_state(self, online): + if online: +@@ -106,7 +113,7 @@ class FakeConnectivity(object): + 'StateChanged', self.nm_state, + signature='u') + self.q.dbus_emit(self.CONNMAN_PATH, self.CONNMAN_INTERFACE, +- 'StateChanged', self.connman_state, signature='s') ++ 'PropertyChanged', "State", self.connman_state, signature='sv') + + def go_online(self): + self.change_state(True) +-- +1.7.9.5 + ++++++ telepathy-mission-control.yaml --- telepathy-mission-control.yaml +++ telepathy-mission-control.yaml @@ -14,6 +14,9 @@ Sources: - http://telepathy.freedesktop.org/releases/telepathy-mission-control/%{name}-%{version}.tar.gz +Patches: + - 0001-Update-to-current-ConnMan-API.patch + - 0001-Always-allow-accounts-with-always_dispatch-to-connec.patch PkgBR: - libxslt @@ -28,12 +31,13 @@ - gmodule-no-export-2.0 - gio-2.0 >= 2.28 - upower-glib + - mce ConfigOptions: - --disable-gtk-doc - --with-accounts-cache-dir=/tmp - --disable-Werror - --enable-upower - - --with-connectivity=no + - --with-connectivity=connman - --disable-conn-setting SubPackages: - Name: devel submit: home:special:branches:CE:MW:Shared / telepathy-ring -> CE:MW:Shared / telepathy-ring changes files: -------------- --- telepathy-ring.changes +++ telepathy-ring.changes @@ -0,0 +1,3 @@ +* Wed Dec 05 2012 John Brooks <[email protected]> - 2.2.1 +- Added always_dispatch flag for account to stay connected when not online + old: ---- telepathy-ring-2.2.0.tar.bz2 new: ---- telepathy-ring-2.2.1.tar.bz2 spec files: ----------- --- telepathy-ring.spec +++ telepathy-ring.spec @@ -10,7 +10,7 @@ %define keepstatic 1 Summary: GSM connection manager for the Telepathy framework -Version: 2.2.0 +Version: 2.2.1 Release: 2 Group: System/Libraries License: LGPLv2.1 other changes: -------------- ++++++ telepathy-ring-2.2.0.tar.bz2 -> telepathy-ring-2.2.1.tar.bz2 --- ChangeLog +++ ChangeLog @@ -1,3 +1,6 @@ +release 2.2.1 + Added always_dispatch flag to mcp account + release 2.2.0 Added mission-control plugin --- configure.ac +++ configure.ac @@ -1,4 +1,4 @@ -AC_INIT([telepathy-ring], [2.2.0]) +AC_INIT([telepathy-ring], [2.2.1]) AC_PREREQ([2.59]) AM_INIT_AUTOMAKE([foreign 1.9]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES]) --- mc-plugin/mcp-account-manager-ring.c +++ mc-plugin/mcp-account-manager-ring.c @@ -62,6 +62,7 @@ g_hash_table_insert(self->priv->params, g_strdup("DisplayName"), g_strdup("Cellular")); g_hash_table_insert(self->priv->params, g_strdup("Enabled"), g_strdup("true")); g_hash_table_insert(self->priv->params, g_strdup("ConnectAutomatically"), g_strdup("true")); + g_hash_table_insert(self->priv->params, g_strdup("always_dispatch"), g_strdup("true")); } static void mcp_account_manager_ring_class_init(McpAccountManagerRingClass *klass) ++++++ telepathy-ring.yaml --- telepathy-ring.yaml +++ telepathy-ring.yaml @@ -1,6 +1,6 @@ Name: telepathy-ring Summary: GSM connection manager for the Telepathy framework -Version: 2.2.0 +Version: 2.2.1 Release: 2 Group: System/Libraries License: LGPLv2.1
