Merge lp:~awe/network-manager/update-1.2-touch into lp:~phablet-team/network-manager/touch-1.2
- update-1.2-touch
- Merge into touch-1.2
Proposed by
Tony Espy
Status: | Merged |
---|---|
Merged at revision: | 1036 |
Proposed branch: | lp:~awe/network-manager/update-1.2-touch |
Merge into: | lp:~phablet-team/network-manager/touch-1.2 |
Diff against target: |
944 lines (+337/-207) 15 files modified
debian/changelog (+34/-6) debian/control (+1/-1) debian/indicator-network.pkla (+6/-0) debian/libnm-dev.install (+2/-1) debian/network-manager.install (+1/-2) debian/network-manager.upstart (+24/-0) debian/patches/clear-requested-scan-when-supplicant-goes-down.patch (+31/-0) debian/patches/dbus-conf-add-sudo-for-indicator-network.patch (+30/-0) debian/patches/ignore_rild_modem_devices.patch (+15/-13) debian/patches/lp1099983_ignore-p2p-wifi-devices.patch (+18/-17) debian/patches/lp1461593-add-modem-reconnect-delay-to-policy.patch (+52/-50) debian/patches/series (+4/-1) debian/patches/wifi-wpas-inactive.patch (+30/-0) debian/patches/wwan-add-ofono-modem-support.patch (+67/-105) debian/rules (+22/-11) |
To merge this branch: | bzr merge lp:~awe/network-manager/update-1.2-touch |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ubuntu Phablet Team | Pending | ||
Review via email: mp+292570@code.launchpad.net |
Commit message
Description of the change
This merge proposal backports the recent desktop/xenial landing of NM 1.2 to vivid for use on Touch.
Differences include:
* bluez5 explicitly disabled ( DUN ! supported on Touch yet )
* ppp disabled ( 2.4.7 needs to be backported )
* systemd logging disabled
* updates to ignore_device patches ( rild & p2p )
* updates to wwan plugin NMModemOfono and NMModemManager classes
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'debian/changelog' |
2 | --- debian/changelog 2016-04-07 21:09:58 +0000 |
3 | +++ debian/changelog 2016-04-27 16:19:01 +0000 |
4 | @@ -1,4 +1,4 @@ |
5 | -network-manager (1.1.93-0ubuntu1) UNRELEASED; urgency=medium |
6 | +network-manager (1.1.93-0ubuntu1~vivid1) vivid; urgency=medium |
7 | |
8 | * New upstream release. |
9 | * Resynchronize with Debian; remaining changes: |
10 | @@ -58,17 +58,45 @@ |
11 | * Renamed 0001-wwan-add-support-for-using-oFono-as-a-modem-manager.patch |
12 | to wwan-add-ofono-modem-support.patch as this patch needed to be |
13 | extensively re-worked due to dbus-glib being deprecated in NM1.2. |
14 | - * Remove upstreamed patches: |
15 | + * Removed upstreamed patches: |
16 | - tests-fix-bashism-in-run-test-dbus-session.sh.patch |
17 | - wifi-hack-for-wext-devices-reporting-IW_MODE_AUTO-configu.patch |
18 | - lp1496434_warn_on_invalid_new_link.patch: alternate fix landed |
19 | upstream which ensures that a valid error instance is returned |
20 | by the factory_create_link method. |
21 | - * Update all symbols files. |
22 | - * Rename ignore_rmnet_devices.path to ignore_rild_modem_devices.patch |
23 | - * Restore wifi-Signal-on-the-wifi-device-when-its-supplicant-i.patch |
24 | + * Updated all symbols files. |
25 | + * Renamed ignore_rmnet_devices.path to ignore_rild_modem_devices.patch |
26 | + * Restored wifi-Signal-on-the-wifi-device-when-its-supplicant-i.patch |
27 | + * Restored lp1461593-add-modem-reconnect-delay-to-policy.patch |
28 | + * Updated d/control: temporarily remove ppp-dev till 2.4.7 backported. |
29 | + * Updated d/rules: |
30 | + - Temporarily disable gir, and ppp. |
31 | + - Disable systemd-journal to restore syslog support. |
32 | + - Fix dh_strip for vivid. |
33 | + - Disable bluez5_dun support ( not supported on Touch yet ). |
34 | + * Restored d/network-manager.upstart. |
35 | + * Updated d/network-manager.install: disable install of pppd/*. |
36 | + * Updated d/libnm-dev.install: disable install of gir/*. |
37 | + * Added d/p/dbus-conf-add-sudo-for-indicator-network.patch: this patch |
38 | + adds a 'sudo' policy group to allow indicator-network to use the |
39 | + NetworkManager and NetworkManager.SecretAgent DBus interfaces. |
40 | + * Added d/indicator-network.pkla, d/rules: install policy kit conf |
41 | + file; this replaces a dirty hack in livecd-rootfs which created |
42 | + this file on behalf of indicator-network. |
43 | + * Updated d/p/wwan-add-ofono-modem-support.patch: fix MM and ofono |
44 | + bus detection and MM restart logic so that NM doesn't keep trying |
45 | + to start MM if it's not installed. |
46 | + * Updated d/p/ignore_rild_modem_devices.patch: add 'rev_rmnet' (mako) |
47 | + to list; also move filter logic before device creation. |
48 | + * Updated d/p/lp1099983_ignore-p2p-wifi-devices.patch: move filter |
49 | + logic before device creation. |
50 | + * d/rules: add explicit --disable-bluez5 to configure. |
51 | + * Added d/p/wifi-wpas-inactive.patch: handle wpa_supplicant |
52 | + WiFi stall related to INACTIVE state. |
53 | + * Added d/p/clear-requested-scan-when-supplicant-goes-down.patch: |
54 | + Clear scan_requested flag if supplicant released. |
55 | |
56 | - -- Mathieu Trudel-Lapierre <mathieu-tl@ubuntu.com> Thu, 03 Mar 2016 15:51:48 -0500 |
57 | + -- Tony Espy <espy@canonical.com> Wed, 27 Apr 2016 12:17:48 -0500 |
58 | |
59 | network-manager (1.0.4-0ubuntu10) xenial; urgency=medium |
60 | |
61 | |
62 | === modified file 'debian/control' |
63 | --- debian/control 2016-03-15 21:52:04 +0000 |
64 | +++ debian/control 2016-04-27 16:19:01 +0000 |
65 | @@ -16,7 +16,7 @@ |
66 | libnl-3-dev (>= 3.2.8), |
67 | libnl-route-3-dev (>= 3.2.8), |
68 | libnl-genl-3-dev (>= 3.2.8), |
69 | - ppp-dev (>= 2.4.7-1+1), |
70 | + ppp-dev (>= 2.4.6), |
71 | libpolkit-gobject-1-dev, |
72 | libpolkit-agent-1-dev (>= 0.97), |
73 | libgnutls-dev, |
74 | |
75 | === added file 'debian/indicator-network.pkla' |
76 | --- debian/indicator-network.pkla 1970-01-01 00:00:00 +0000 |
77 | +++ debian/indicator-network.pkla 2016-04-27 16:19:01 +0000 |
78 | @@ -0,0 +1,6 @@ |
79 | +[indicator-network-service] |
80 | +Identity=unix-group:sudo |
81 | +Action=org.freedesktop.NetworkManager.* |
82 | +ResultAny=yes |
83 | +ResultInactive=no |
84 | +ResultActive=yes |
85 | |
86 | === modified file 'debian/libnm-dev.install' |
87 | --- debian/libnm-dev.install 2015-08-20 09:47:16 +0000 |
88 | +++ debian/libnm-dev.install 2016-04-27 16:19:01 +0000 |
89 | @@ -2,4 +2,5 @@ |
90 | usr/lib/*/libnm.so |
91 | usr/include/libnm/ |
92 | usr/share/gtk-doc/html/libnm/ |
93 | -usr/share/gir-1.0/NM-1.0.gir |
94 | +# temporarily disabled for 1.2 landing: |
95 | +#usr/share/gir-1.0/NM-1.0.gir |
96 | |
97 | === modified file 'debian/network-manager.install' |
98 | --- debian/network-manager.install 2016-03-15 21:52:04 +0000 |
99 | +++ debian/network-manager.install 2016-04-27 16:19:01 +0000 |
100 | @@ -6,11 +6,10 @@ |
101 | usr/lib/NetworkManager/nm-iface-helper |
102 | usr/lib/NetworkManager/nm-dispatcher |
103 | usr/lib/*/NetworkManager/libnm-settings-plugin-ifupdown.so |
104 | -usr/lib/*/NetworkManager/libnm-settings-plugin-ibft.so |
105 | usr/lib/*/NetworkManager/libnm-settings-plugin-ofono.so |
106 | usr/lib/*/NetworkManager/libnm-device-plugin-*.so |
107 | usr/lib/*/NetworkManager/libnm-wwan.so |
108 | -usr/lib/pppd/*/*.so |
109 | +#usr/lib/pppd/*/*.so |
110 | usr/share/doc/NetworkManager/examples/ |
111 | usr/share/locale/ |
112 | usr/share/man/ |
113 | |
114 | === added file 'debian/network-manager.upstart' |
115 | --- debian/network-manager.upstart 1970-01-01 00:00:00 +0000 |
116 | +++ debian/network-manager.upstart 2016-04-27 16:19:01 +0000 |
117 | @@ -0,0 +1,24 @@ |
118 | +# network-manager - network connection manager |
119 | +# |
120 | +# The Network Manager daemon manages the system's network connections, |
121 | +# automatically switching between the best available. |
122 | + |
123 | +description "network connection manager" |
124 | + |
125 | +start on (local-filesystems |
126 | + and started dbus |
127 | + and static-network-up) |
128 | +stop on stopping dbus |
129 | + |
130 | +expect fork |
131 | +respawn |
132 | + |
133 | +script |
134 | + # set $LANG so that messages appearing on the GUI will be translated. See LP: 875017 |
135 | + if [ -r /etc/default/locale ]; then |
136 | + . /etc/default/locale |
137 | + export LANG LANGUAGE LC_MESSAGES LC_ALL |
138 | + fi |
139 | + |
140 | + exec NetworkManager |
141 | +end script |
142 | |
143 | === added file 'debian/patches/clear-requested-scan-when-supplicant-goes-down.patch' |
144 | --- debian/patches/clear-requested-scan-when-supplicant-goes-down.patch 1970-01-01 00:00:00 +0000 |
145 | +++ debian/patches/clear-requested-scan-when-supplicant-goes-down.patch 2016-04-27 16:19:01 +0000 |
146 | @@ -0,0 +1,31 @@ |
147 | +--- |
148 | + src/devices/wifi/nm-device-wifi.c | 7 +++++++ |
149 | + 1 file changed, 7 insertions(+) |
150 | + |
151 | +Index: network-manager-1.1.93/src/devices/wifi/nm-device-wifi.c |
152 | +=================================================================== |
153 | +--- network-manager-1.1.93.orig/src/devices/wifi/nm-device-wifi.c |
154 | ++++ network-manager-1.1.93/src/devices/wifi/nm-device-wifi.c |
155 | +@@ -246,6 +246,13 @@ supplicant_interface_release (NMDeviceWi |
156 | + |
157 | + priv = NM_DEVICE_WIFI_GET_PRIVATE (self); |
158 | + |
159 | ++ if (priv->requested_scan) { |
160 | ++ nm_log_dbg (LOGD_WIFI_SCAN, "(%s): reset requested_scan flag to FALSE", |
161 | ++ nm_device_get_iface (NM_DEVICE (self))); |
162 | ++ priv->requested_scan = FALSE; |
163 | ++ nm_device_remove_pending_action (NM_DEVICE (self), "scan", TRUE); |
164 | ++ } |
165 | ++ |
166 | + nm_clear_g_source (&priv->pending_scan_id); |
167 | + |
168 | + /* Reset the scan interval to be pretty frequent when disconnected */ |
169 | +@@ -1915,7 +1922,7 @@ supplicant_iface_state_cb (NMSupplicantI |
170 | + priv->requested_scan = FALSE; |
171 | + } |
172 | + |
173 | +- cancel_pending_scan (self); |
174 | ++ nm_clear_g_source (&priv->pending_scan_id); |
175 | + request_wireless_scan (self, NULL); |
176 | + } |
177 | + default: |
178 | |
179 | === added file 'debian/patches/dbus-conf-add-sudo-for-indicator-network.patch' |
180 | --- debian/patches/dbus-conf-add-sudo-for-indicator-network.patch 1970-01-01 00:00:00 +0000 |
181 | +++ debian/patches/dbus-conf-add-sudo-for-indicator-network.patch 2016-04-27 16:19:01 +0000 |
182 | @@ -0,0 +1,30 @@ |
183 | +Author: Tony Espy <espy@canonical.com> |
184 | +Subject: Add sudo policy to DBus conf for indicator-network |
185 | + |
186 | +This patch adds a 'sudo' group DBus policy to allow |
187 | +indicator-network to interact with the NetworkManager and |
188 | +NetworkManager.SecretAgent interfaces. |
189 | + |
190 | +This was previously handled by a dirty hack/hook in the |
191 | +livecd-rootfs tool used to build touch images. |
192 | + |
193 | +--- |
194 | + src/org.freedesktop.NetworkManager.conf | 5 +++++ |
195 | + 1 file changed, 5 insertions(+) |
196 | + |
197 | +Index: b/src/org.freedesktop.NetworkManager.conf |
198 | +=================================================================== |
199 | +--- a/src/org.freedesktop.NetworkManager.conf |
200 | ++++ b/src/org.freedesktop.NetworkManager.conf |
201 | +@@ -2,6 +2,11 @@ |
202 | + "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN" |
203 | + "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> |
204 | + <busconfig> |
205 | ++ <policy group="sudo"> |
206 | ++ <allow send_destination="org.freedesktop.NetworkManager"/> |
207 | ++ <allow send_interface="org.freedesktop.NetworkManager"/> |
208 | ++ <allow send_interface="org.freedesktop.NetworkManager.SecretAgent"/> |
209 | ++ </policy> |
210 | + <policy user="root"> |
211 | + <allow own="org.freedesktop.NetworkManager"/> |
212 | + <allow send_destination="org.freedesktop.NetworkManager"/> |
213 | |
214 | === modified file 'debian/patches/ignore_rild_modem_devices.patch' |
215 | --- debian/patches/ignore_rild_modem_devices.patch 2016-04-07 19:30:51 +0000 |
216 | +++ debian/patches/ignore_rild_modem_devices.patch 2016-04-27 16:19:01 +0000 |
217 | @@ -1,23 +1,25 @@ |
218 | From: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com> |
219 | Subject: Ignore rmnet_usbX devices. |
220 | --- |
221 | - src/nm-manager.c | 6 ++++++ |
222 | - 1 file changed, 6 insertions(+) |
223 | + src/nm-manager.c | 8 ++++++++ |
224 | + 1 file changed, 8 insertions(+) |
225 | |
226 | Index: b/src/nm-manager.c |
227 | =================================================================== |
228 | --- a/src/nm-manager.c |
229 | +++ b/src/nm-manager.c |
230 | -@@ -2042,6 +2042,12 @@ platform_link_added (NMManager *self, |
231 | - } |
232 | - } |
233 | +@@ -2078,6 +2078,14 @@ platform_link_added (NMManager *self, |
234 | + gboolean ignore = FALSE; |
235 | + gs_free_error GError *error = NULL; |
236 | |
237 | -+ /* Ignore rmnet_usb devices, which will be handled by their modem parent |
238 | -+ */ |
239 | -+ if (!strncmp (plink->name, "rmnet_usb", NM_STRLEN ("rmnet_usb")) || |
240 | -+ !strncmp (plink->name, "ccmni", NM_STRLEN ("ccmni"))) |
241 | -+ return; |
242 | ++ /* Ignore rild modem devices, which will be handled by their modem parent */ |
243 | ++ if (g_strstr_len (plink->name, NM_STRLEN ("rmnet"), "rmnet") || |
244 | ++ g_strstr_len (plink->name, NM_STRLEN ("rev_rmnet"), "rev_rmnet") || |
245 | ++ g_strstr_len (plink->name, NM_STRLEN ("ccmni"), "ccmni")) { |
246 | ++ _LOGW (LOGD_HW, "Ignoring rild modem device: %s", plink->name); |
247 | ++ return; |
248 | ++ } |
249 | + |
250 | - if (device == NULL) { |
251 | - switch (plink->type) { |
252 | - case NM_LINK_TYPE_WWAN_ETHERNET: |
253 | + device = nm_device_factory_create_device (factory, plink->name, plink, NULL, &ignore, &error); |
254 | + if (!device) { |
255 | + if (!ignore) { |
256 | |
257 | === modified file 'debian/patches/lp1099983_ignore-p2p-wifi-devices.patch' |
258 | --- debian/patches/lp1099983_ignore-p2p-wifi-devices.patch 2016-03-03 22:47:33 +0000 |
259 | +++ debian/patches/lp1099983_ignore-p2p-wifi-devices.patch 2016-04-27 16:19:01 +0000 |
260 | @@ -2,27 +2,28 @@ |
261 | Subject: Ignore p2p0 wifi devices from android. |
262 | |
263 | --- |
264 | - src/nm-manager.c | 10 ++++++++++ |
265 | - 1 file changed, 10 insertions(+) |
266 | + src/nm-manager.c | 11 +++++++++++ |
267 | + 1 file changed, 11 insertions(+) |
268 | |
269 | Index: b/src/nm-manager.c |
270 | =================================================================== |
271 | --- a/src/nm-manager.c |
272 | +++ b/src/nm-manager.c |
273 | -@@ -2048,6 +2048,16 @@ platform_link_added (NMManager *self, |
274 | - !strncmp (plink->name, "ccmni", NM_STRLEN ("ccmni"))) |
275 | - return; |
276 | +@@ -2086,6 +2086,17 @@ platform_link_added (NMManager *self, |
277 | + return; |
278 | + } |
279 | |
280 | -+ /* |
281 | -+ * Ubuntu: Explicitly unmanage p2p Wi-Fi devices exposed by Android JB Wi-Fi drivers. |
282 | -+ */ |
283 | -+ NMDeviceType devtype = nm_device_get_device_type (device); |
284 | -+ if ((plink->type == NM_LINK_TYPE_WIFI) |
285 | -+ && !strncmp (plink->name, "p2p0", NM_STRLEN ("p2p0"))) { |
286 | -+ nm_log_info (LOGD_HW, "(%s): ignoring P2P wireless iface", plink->name); |
287 | -+ return; |
288 | -+ } |
289 | ++ /* |
290 | ++ * Ubuntu: Explicitly unmanage all p2p Wi-Fi devices which are |
291 | ++ * managed externally in the case of Wi-Fi Direct. |
292 | ++ */ |
293 | ++ NMDeviceType devtype = nm_device_get_device_type (device); |
294 | ++ if ((plink->type == NM_LINK_TYPE_WIFI) |
295 | ++ && g_strstr_len (plink->name, NM_STRLEN ("p2p"), "p2p")) { |
296 | ++ nm_log_info (LOGD_HW, "(%s): ignoring P2P wireless iface", plink->name); |
297 | ++ return; |
298 | ++ } |
299 | + |
300 | - if (device == NULL) { |
301 | - switch (plink->type) { |
302 | - case NM_LINK_TYPE_WWAN_ETHERNET: |
303 | + device = nm_device_factory_create_device (factory, plink->name, plink, NULL, &ignore, &error); |
304 | + if (!device) { |
305 | + if (!ignore) { |
306 | |
307 | === modified file 'debian/patches/lp1461593-add-modem-reconnect-delay-to-policy.patch' |
308 | --- debian/patches/lp1461593-add-modem-reconnect-delay-to-policy.patch 2016-03-03 22:47:33 +0000 |
309 | +++ debian/patches/lp1461593-add-modem-reconnect-delay-to-policy.patch 2016-04-27 16:19:01 +0000 |
310 | @@ -7,29 +7,26 @@ |
311 | timeout ( which defaults to 300s ). |
312 | |
313 | Bug: https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1461593 |
314 | - |
315 | ---- |
316 | - |
317 | ---- |
318 | - src/nm-policy.c | 36 +++++++++++++++++++++++++++++------- |
319 | - 1 file changed, 29 insertions(+), 7 deletions(-) |
320 | +--- |
321 | + src/nm-policy.c | 34 +++++++++++++++++++++++++++------- |
322 | + 1 file changed, 27 insertions(+), 7 deletions(-) |
323 | |
324 | Index: b/src/nm-policy.c |
325 | =================================================================== |
326 | --- a/src/nm-policy.c |
327 | +++ b/src/nm-policy.c |
328 | -@@ -901,7 +901,7 @@ sleeping_changed (NMManager *manager, GP |
329 | +@@ -931,7 +931,7 @@ sleeping_changed (NMManager *manager, GP |
330 | } |
331 | |
332 | static void |
333 | --schedule_activate_check (NMPolicy *policy, NMDevice *device) |
334 | -+schedule_activate_check (NMPolicy *policy, NMDevice *device, guint delay) |
335 | +-schedule_activate_check (NMPolicy *self, NMDevice *device) |
336 | ++schedule_activate_check (NMPolicy *self, NMDevice *device, guint delay) |
337 | { |
338 | - NMPolicyPrivate *priv = NM_POLICY_GET_PRIVATE (policy); |
339 | + NMPolicyPrivate *priv = NM_POLICY_GET_PRIVATE (self); |
340 | ActivateData *data; |
341 | -@@ -930,7 +930,12 @@ schedule_activate_check (NMPolicy *polic |
342 | - data = g_malloc0 (sizeof (ActivateData)); |
343 | - data->policy = policy; |
344 | +@@ -960,7 +960,12 @@ schedule_activate_check (NMPolicy *self, |
345 | + data = g_slice_new0 (ActivateData); |
346 | + data->policy = self; |
347 | data->device = g_object_ref (device); |
348 | - data->autoactivate_id = g_idle_add (auto_activate_device, data); |
349 | + |
350 | @@ -41,7 +38,7 @@ |
351 | priv->pending_activation_checks = g_slist_append (priv->pending_activation_checks, data); |
352 | } |
353 | |
354 | -@@ -1125,6 +1130,7 @@ device_state_changed (NMDevice *device, |
355 | +@@ -1155,6 +1160,7 @@ device_state_changed (NMDevice *device, |
356 | NMIP4Config *ip4_config; |
357 | NMIP6Config *ip6_config; |
358 | NMSettingConnection *s_con = NULL; |
359 | @@ -49,64 +46,69 @@ |
360 | |
361 | switch (new_state) { |
362 | case NM_DEVICE_STATE_FAILED: |
363 | -@@ -1153,9 +1159,14 @@ device_state_changed (NMDevice *device, |
364 | +@@ -1172,7 +1178,7 @@ device_state_changed (NMDevice *device, |
365 | + |
366 | + nm_settings_connection_set_autoconnect_blocked_reason (connection, NM_DEVICE_STATE_REASON_NO_SECRETS); |
367 | + } else if (tries > 0) { |
368 | +- _LOGD (LOGD_DEVICE, "connection '%s' failed to autoconnect; %d tries left", |
369 | ++ _LOGI (LOGD_DEVICE, "connection '%s' failed to autoconnect; %d tries left", |
370 | + nm_settings_connection_get_id (connection), tries); |
371 | + nm_settings_connection_set_autoconnect_retries (connection, tries - 1); |
372 | + } |
373 | +@@ -1183,6 +1189,10 @@ device_state_changed (NMDevice *device, |
374 | /* Schedule a handler to reset retries count */ |
375 | if (!priv->reset_retries_id) { |
376 | gint32 retry_time = nm_settings_connection_get_autoconnect_retry_time (connection); |
377 | + gint32 actual_time = MAX (0, retry_time - nm_utils_get_monotonic_timestamp_s ()); |
378 | + |
379 | -+ nm_log_info (LOGD_DEVICE, "Disabling autoconnect for connection '%s'; setting retry of %d.", |
380 | -+ nm_connection_get_id (NM_CONNECTION (connection)), actual_time); |
381 | -+ |
382 | ++ _LOGI (LOGD_DEVICE, "Disabling autoconnect for connection '%s'; setting retry of %d.", |
383 | ++ nm_connection_get_id (NM_CONNECTION (connection)), actual_time); |
384 | |
385 | g_warn_if_fail (retry_time != 0); |
386 | -- priv->reset_retries_id = g_timeout_add_seconds (MAX (0, retry_time - nm_utils_get_monotonic_timestamp_s ()), reset_connections_retries, policy); |
387 | -+ priv->reset_retries_id = g_timeout_add_seconds (actual_time, reset_connections_retries, policy); |
388 | - } |
389 | - } |
390 | - nm_connection_clear_secrets (NM_CONNECTION (connection)); |
391 | -@@ -1220,7 +1231,18 @@ device_state_changed (NMDevice *device, |
392 | - update_routing_and_dns (policy, FALSE); |
393 | + priv->reset_retries_id = g_timeout_add_seconds (MAX (0, retry_time - nm_utils_get_monotonic_timestamp_s ()), reset_connections_retries, self); |
394 | +@@ -1250,7 +1260,17 @@ device_state_changed (NMDevice *device, |
395 | + update_routing_and_dns (self, FALSE); |
396 | |
397 | /* Device is now available for auto-activation */ |
398 | -- schedule_activate_check (policy, device); |
399 | -+ |
400 | +- schedule_activate_check (self, device); |
401 | + if (nm_device_get_device_type (device) == NM_DEVICE_TYPE_MODEM) |
402 | + delay = 5; |
403 | + |
404 | + if (connection) |
405 | -+ nm_log_info (LOGD_DEVICE, "Connection '%s' disconnected, scheduling activate_check in %u seconds.", |
406 | -+ nm_connection_get_id (NM_CONNECTION (connection)), delay); |
407 | ++ _LOGI (LOGD_DEVICE, "Connection '%s' disconnected, scheduling activate_check in %u seconds.", |
408 | ++ nm_connection_get_id (NM_CONNECTION (connection)), delay); |
409 | + else |
410 | -+ nm_log_info (LOGD_DEVICE, "Device '%s' has no connection; scheduling activate_check in %u seconds.", |
411 | -+ nm_device_get_iface (device), delay); |
412 | ++ _LOGI (LOGD_DEVICE, "Device '%s' has no connection; scheduling activate_check in %u seconds.", |
413 | ++ nm_device_get_iface (device), delay); |
414 | + |
415 | -+ schedule_activate_check (policy, device, delay); |
416 | ++ schedule_activate_check (self, device, delay); |
417 | break; |
418 | |
419 | case NM_DEVICE_STATE_PREPARE: |
420 | -@@ -1330,13 +1352,13 @@ device_autoconnect_changed (NMDevice *de |
421 | - gpointer user_data) |
422 | - { |
423 | +@@ -1363,7 +1383,7 @@ device_autoconnect_changed (NMDevice *de |
424 | + NMPolicy *self = priv->self; |
425 | + |
426 | if (nm_device_autoconnect_allowed (device)) |
427 | -- schedule_activate_check ((NMPolicy *) user_data, device); |
428 | -+ schedule_activate_check ((NMPolicy *) user_data, device, 0); |
429 | - } |
430 | - |
431 | - static void |
432 | - device_recheck_auto_activate (NMDevice *device, gpointer user_data) |
433 | - { |
434 | -- schedule_activate_check (NM_POLICY (user_data), device); |
435 | -+ schedule_activate_check (NM_POLICY (user_data), device, 0); |
436 | - } |
437 | - |
438 | - typedef struct { |
439 | -@@ -1561,7 +1583,7 @@ schedule_activate_all (NMPolicy *policy) |
440 | +- schedule_activate_check (self, device); |
441 | ++ schedule_activate_check (self, device, 0); |
442 | + } |
443 | + |
444 | + static void |
445 | +@@ -1372,7 +1392,7 @@ device_recheck_auto_activate (NMDevice * |
446 | + NMPolicyPrivate *priv = user_data; |
447 | + NMPolicy *self = priv->self; |
448 | + |
449 | +- schedule_activate_check (self, device); |
450 | ++ schedule_activate_check (self, device, 0); |
451 | + } |
452 | + |
453 | + static void |
454 | +@@ -1586,7 +1606,7 @@ schedule_activate_all (NMPolicy *self) |
455 | const GSList *iter; |
456 | |
457 | for (iter = nm_manager_get_devices (priv->manager); iter; iter = g_slist_next (iter)) |
458 | -- schedule_activate_check (policy, NM_DEVICE (iter->data)); |
459 | -+ schedule_activate_check (policy, NM_DEVICE (iter->data), 0); |
460 | +- schedule_activate_check (self, NM_DEVICE (iter->data)); |
461 | ++ schedule_activate_check (self, NM_DEVICE (iter->data), 0); |
462 | } |
463 | |
464 | static void |
465 | |
466 | === modified file 'debian/patches/series' |
467 | --- debian/patches/series 2016-04-07 21:09:58 +0000 |
468 | +++ debian/patches/series 2016-04-27 16:19:01 +0000 |
469 | @@ -35,7 +35,7 @@ |
470 | wwan-add-ofono-modem-support.patch |
471 | lp1461593-add-nm-settings-connection-reset-retries-methods.patch |
472 | add_ofono_settings_support.patch |
473 | -#lp1461593-add-modem-reconnect-delay-to-policy.patch |
474 | +lp1461593-add-modem-reconnect-delay-to-policy.patch |
475 | lp1445080-modify-device-modem-avail.patch |
476 | |
477 | # killswitch |
478 | @@ -44,3 +44,6 @@ |
479 | # more fixes |
480 | conditional_libteam_tests.patch |
481 | disable_general_with_expect_test.patch |
482 | +dbus-conf-add-sudo-for-indicator-network.patch |
483 | +wifi-wpas-inactive.patch |
484 | +clear-requested-scan-when-supplicant-goes-down.patch |
485 | |
486 | === added file 'debian/patches/wifi-wpas-inactive.patch' |
487 | --- debian/patches/wifi-wpas-inactive.patch 1970-01-01 00:00:00 +0000 |
488 | +++ debian/patches/wifi-wpas-inactive.patch 2016-04-27 16:19:01 +0000 |
489 | @@ -0,0 +1,30 @@ |
490 | +--- |
491 | + src/devices/wifi/nm-device-wifi.c | 15 +++++++++++++++ |
492 | + 1 file changed, 15 insertions(+) |
493 | + |
494 | +Index: b/src/devices/wifi/nm-device-wifi.c |
495 | +=================================================================== |
496 | +--- a/src/devices/wifi/nm-device-wifi.c |
497 | ++++ b/src/devices/wifi/nm-device-wifi.c |
498 | +@@ -1903,6 +1903,21 @@ supplicant_iface_state_cb (NMSupplicantI |
499 | + else |
500 | + _LOGI (LOGD_DEVICE | LOGD_WIFI, "supplicant interface keeps failing, giving up"); |
501 | + break; |
502 | ++ case NM_SUPPLICANT_INTERFACE_STATE_INACTIVE: |
503 | ++ if (old_state == NM_SUPPLICANT_INTERFACE_STATE_SCANNING) { |
504 | ++ nm_log_warn (LOGD_HW | LOGD_WIFI, "(%s): supplicant state: SCANNING -> INACTIVE", |
505 | ++ nm_device_get_iface (NM_DEVICE (self))); |
506 | ++ |
507 | ++ if (priv->requested_scan) { |
508 | ++ nm_log_dbg (LOGD_WIFI_SCAN, "(%s): clearing requested_scan", |
509 | ++ nm_device_get_iface (NM_DEVICE (self))); |
510 | ++ |
511 | ++ priv->requested_scan = FALSE; |
512 | ++ } |
513 | ++ |
514 | ++ cancel_pending_scan (self); |
515 | ++ request_wireless_scan (self, NULL); |
516 | ++ } |
517 | + default: |
518 | + break; |
519 | + } |
520 | |
521 | === modified file 'debian/patches/wwan-add-ofono-modem-support.patch' |
522 | --- debian/patches/wwan-add-ofono-modem-support.patch 2016-04-08 14:49:37 +0000 |
523 | +++ debian/patches/wwan-add-ofono-modem-support.patch 2016-04-27 16:19:01 +0000 |
524 | @@ -9,13 +9,12 @@ |
525 | --- |
526 | configure.ac | 9 |
527 | src/devices/wwan/Makefile.am | 7 |
528 | - src/devices/wwan/nm-device-modem.c | 20 |
529 | - src/devices/wwan/nm-modem-manager.c | 220 +++++ |
530 | - src/devices/wwan/nm-modem-ofono.c | 1449 ++++++++++++++++++++++++++++++++++++ |
531 | + src/devices/wwan/nm-modem-manager.c | 238 +++++ |
532 | + src/devices/wwan/nm-modem-ofono.c | 1435 ++++++++++++++++++++++++++++++++++++ |
533 | src/devices/wwan/nm-modem-ofono.h | 64 + |
534 | src/devices/wwan/nm-modem.c | 8 |
535 | src/nm-core-utils.c | 20 |
536 | - 8 files changed, 1787 insertions(+), 10 deletions(-) |
537 | + 7 files changed, 1762 insertions(+), 19 deletions(-) |
538 | |
539 | Index: b/configure.ac |
540 | =================================================================== |
541 | @@ -93,58 +92,6 @@ |
542 | WWAN_SYMBOL_VIS_FILE=$(srcdir)/wwan-exports.ver |
543 | |
544 | libnm_wwan_la_LDFLAGS = \ |
545 | -Index: b/src/devices/wwan/nm-device-modem.c |
546 | -=================================================================== |
547 | ---- a/src/devices/wwan/nm-device-modem.c |
548 | -+++ b/src/devices/wwan/nm-device-modem.c |
549 | -@@ -100,6 +100,7 @@ modem_prepare_result (NMModem *modem, |
550 | - if (success) |
551 | - nm_device_activate_schedule_stage2_device_config (device); |
552 | - else { |
553 | -+ |
554 | - if (reason == NM_DEVICE_STATE_REASON_SIM_PIN_INCORRECT) { |
555 | - /* If the connect failed because the SIM PIN was wrong don't allow |
556 | - * the device to be auto-activated anymore, which would risk locking |
557 | -@@ -282,6 +283,16 @@ modem_state_cb (NMModem *modem, |
558 | - } |
559 | - } |
560 | - |
561 | -+ if (dev_state >= NM_DEVICE_STATE_DISCONNECTED && |
562 | -+ new_state == NM_MODEM_STATE_REGISTERED && old_state < NM_MODEM_STATE_REGISTERED) { |
563 | -+ |
564 | -+ nm_log_info (LOGD_MB, "(%s): modem re-registered; re-checking autoconnect", |
565 | -+ nm_device_get_iface (device)); |
566 | -+ |
567 | -+ g_object_set (G_OBJECT (device), NM_DEVICE_AUTOCONNECT, TRUE, NULL); |
568 | -+ nm_device_emit_recheck_auto_activate (device); |
569 | -+ } |
570 | -+ |
571 | - if (new_state < NM_MODEM_STATE_CONNECTING && |
572 | - old_state >= NM_MODEM_STATE_CONNECTING && |
573 | - dev_state >= NM_DEVICE_STATE_NEED_AUTH && |
574 | -@@ -345,6 +356,14 @@ device_state_changed (NMDevice *device, |
575 | - nm_modem_state_to_string (nm_modem_get_state (priv->modem))); |
576 | - } |
577 | - |
578 | -+ /* Block autoconnect until the modem is registered again */ |
579 | -+ if (new_state == NM_DEVICE_STATE_FAILED && nm_modem_get_state (priv->modem) == NM_MODEM_STATE_SEARCHING) { |
580 | -+ nm_log_info (LOGD_MB, "(%s): modem searching; disabling autoconnect", |
581 | -+ nm_device_get_iface (device)); |
582 | -+ |
583 | -+ g_object_set (G_OBJECT (device), NM_DEVICE_AUTOCONNECT, FALSE, NULL); |
584 | -+ } |
585 | -+ |
586 | - nm_modem_device_state_changed (priv->modem, new_state, old_state, reason); |
587 | - |
588 | - switch (reason) { |
589 | -@@ -545,6 +564,7 @@ get_ip_iface_identifier (NMDevice *devic |
590 | - |
591 | - g_return_val_if_fail (priv->modem, FALSE); |
592 | - success = nm_modem_get_iid (priv->modem, out_iid); |
593 | -+ |
594 | - if (!success) |
595 | - success = NM_DEVICE_CLASS (nm_device_modem_parent_class)->get_ip_iface_identifier (device, out_iid); |
596 | - return success; |
597 | Index: b/src/devices/wwan/nm-modem-manager.c |
598 | =================================================================== |
599 | --- a/src/devices/wwan/nm-modem-manager.c |
600 | @@ -288,7 +235,7 @@ |
601 | +{ |
602 | + gchar *name_owner; |
603 | + |
604 | -+ name_owner = g_dbus_object_manager_client_get_name_owner (G_DBUS_OBJECT_MANAGER_CLIENT (self->priv->ofono_proxy)); |
605 | ++ name_owner = g_dbus_proxy_get_name_owner (G_DBUS_OBJECT_MANAGER_CLIENT (self->priv->ofono_proxy)); |
606 | + if (name_owner) { |
607 | + /* Available! */ |
608 | + ofono_appeared (self); |
609 | @@ -361,6 +308,35 @@ |
610 | |
611 | static void |
612 | modem_manager_poke_cb (GDBusConnection *connection, |
613 | +@@ -233,19 +415,19 @@ modem_manager_poke_cb (GDBusConnection * |
614 | + |
615 | + result = g_dbus_connection_call_finish (connection, res, &error); |
616 | + if (error) { |
617 | +- /* Ignore common errors when MM is not installed and such */ |
618 | +- if ( !g_error_matches (error, G_DBUS_ERROR, G_DBUS_ERROR_SERVICE_UNKNOWN) |
619 | +- && !g_error_matches (error, G_DBUS_ERROR, G_DBUS_ERROR_SPAWN_EXEC_FAILED) |
620 | +- && !g_error_matches (error, G_DBUS_ERROR, G_DBUS_ERROR_SPAWN_FORK_FAILED) |
621 | +- && !g_error_matches (error, G_DBUS_ERROR, G_DBUS_ERROR_SPAWN_FAILED) |
622 | +- && !g_error_matches (error, G_DBUS_ERROR, G_DBUS_ERROR_TIMEOUT) |
623 | ++ nm_log_warn (LOGD_MB, "error poking ModemManager: %s", |
624 | ++ error ? error->message : ""); |
625 | ++ |
626 | ++ /* Don't reschedule poke is MM service doesn't exist. */ |
627 | ++ if (!g_error_matches (error, G_DBUS_ERROR, G_DBUS_ERROR_SERVICE_UNKNOWN) |
628 | + && !g_error_matches (error, G_DBUS_ERROR, G_DBUS_ERROR_SPAWN_SERVICE_NOT_FOUND)) { |
629 | +- nm_log_dbg (LOGD_MB, "error poking ModemManager: %s", error->message); |
630 | ++ |
631 | ++ /* Setup timeout to relaunch */ |
632 | ++ schedule_modem_manager_relaunch (self, MODEM_POKE_INTERVAL); |
633 | + } |
634 | ++ |
635 | + g_error_free (error); |
636 | + |
637 | +- /* Setup timeout to relaunch */ |
638 | +- schedule_modem_manager_relaunch (self, MODEM_POKE_INTERVAL); |
639 | + } else |
640 | + g_variant_unref (result); |
641 | + |
642 | @@ -336,22 +518,44 @@ manager_new_ready (GObject *source, |
643 | static void |
644 | ensure_client (NMModemManager *self) |
645 | @@ -496,7 +472,7 @@ |
646 | =================================================================== |
647 | --- /dev/null |
648 | +++ b/src/devices/wwan/nm-modem-ofono.c |
649 | -@@ -0,0 +1,1449 @@ |
650 | +@@ -0,0 +1,1435 @@ |
651 | +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ |
652 | +/* NetworkManager -- Network link manager |
653 | + * |
654 | @@ -709,12 +685,7 @@ |
655 | + nm_log_dbg (LOGD_MB, "(%s): modem disconnected", |
656 | + nm_modem_get_uid (NM_MODEM (self))); |
657 | + |
658 | -+ /* NOTES(1.2): This doesn't accomplish anything as none of the attributes that |
659 | -+ * are checked by update_modem_state are changed by this function! |
660 | -+ * |
661 | -+ * update_modem_state (self); |
662 | -+ */ |
663 | -+ |
664 | ++ update_modem_state (self); |
665 | + disconnect_context_complete (ctx); |
666 | +} |
667 | + |
668 | @@ -889,7 +860,7 @@ |
669 | + &error); |
670 | + if (!v_properties) { |
671 | + g_dbus_error_strip_remote_error (error); |
672 | -+ nm_log_warn (LOGD_BT, "(%s) error getting sim properties: %s", |
673 | ++ nm_log_warn (LOGD_MB, "(%s) error getting sim properties: %s", |
674 | + nm_modem_get_uid (NM_MODEM (self)), |
675 | + error->message); |
676 | + g_error_free (error); |
677 | @@ -900,7 +871,7 @@ |
678 | + |
679 | + v_dict = g_variant_get_child_value (v_properties, 0); |
680 | + if (!v_dict) { |
681 | -+ nm_log_warn (LOGD_BT, "(%s) error getting sim properties: no v_dict", |
682 | ++ nm_log_warn (LOGD_MB, "(%s) error getting sim properties: no v_dict", |
683 | + nm_modem_get_uid (NM_MODEM (self))); |
684 | + return; |
685 | + } |
686 | @@ -1002,7 +973,7 @@ |
687 | + gboolean attached = g_variant_get_boolean (v); |
688 | + |
689 | + nm_log_dbg (LOGD_MB, "(%s): Attached: %s", |
690 | -+ nm_modem_get_uid (NM_MODEM (self)), property ? "True" : "False"); |
691 | ++ nm_modem_get_uid (NM_MODEM (self)), attached ? "True" : "False"); |
692 | + |
693 | + if (priv->gprs_attached != attached) { |
694 | + priv->gprs_attached = attached; |
695 | @@ -1046,7 +1017,7 @@ |
696 | + &error); |
697 | + if (!v_properties) { |
698 | + g_dbus_error_strip_remote_error (error); |
699 | -+ nm_log_warn (LOGD_BT, "(%s) error getting connman properties: %s", |
700 | ++ nm_log_warn (LOGD_MB, "(%s) error getting connman properties: %s", |
701 | + nm_modem_get_uid (NM_MODEM (self)), |
702 | + error->message); |
703 | + g_error_free (error); |
704 | @@ -1226,7 +1197,7 @@ |
705 | + &error); |
706 | + if (!v_properties) { |
707 | + g_dbus_error_strip_remote_error (error); |
708 | -+ nm_log_warn (LOGD_BT, "(%s) error getting modem properties: %s", |
709 | ++ nm_log_warn (LOGD_MB, "(%s) error getting modem properties: %s", |
710 | + nm_modem_get_uid (NM_MODEM (self)), |
711 | + error->message); |
712 | + g_error_free (error); |
713 | @@ -1235,7 +1206,7 @@ |
714 | + |
715 | + v_dict = g_variant_get_child_value (v_properties, 0); |
716 | + if (!v_dict) { |
717 | -+ nm_log_warn (LOGD_BT, "(%s) error getting modem properties: no v_dict", |
718 | ++ nm_log_warn (LOGD_MB, "(%s) error getting modem properties: no v_dict", |
719 | + nm_modem_get_uid (NM_MODEM (self))); |
720 | + return; |
721 | + } |
722 | @@ -1331,14 +1302,6 @@ |
723 | + nm_log_dbg (LOGD_MB, "PropertyChanged: %s", property); |
724 | + |
725 | + /* |
726 | -+ * 0.9.10.x: |
727 | -+ * |
728 | -+ * The old code got PropertyChanged for Settings, and then immediately |
729 | -+ * called 'GetProperties' to get the current values of 'Settings'. |
730 | -+ * |
731 | -+ * There's no need to do this, as the PropertyChanged has the value of |
732 | -+ * 'Settings' as its payload!!! |
733 | -+ * |
734 | + * TODO: might be a good idea and re-factor this to mimic bluez-device, |
735 | + * ie. have this function just check the key, and call a sub-func to |
736 | + * handle the action. |
737 | @@ -1347,24 +1310,14 @@ |
738 | + if (g_strcmp0 (property, "Settings") != 0) |
739 | + return; |
740 | + |
741 | -+ nm_log_dbg (LOGD_MB, "found 'Settings' DICTIONARY property"); |
742 | -+ |
743 | -+ if (nm_modem_get_state (NM_MODEM (self)) == NM_MODEM_STATE_CONNECTED && g_variant_n_children (v) <= 0) { |
744 | -+ nm_log_warn (LOGD_MB, "ofono: (%s): Settings empty", nm_modem_get_uid (NM_MODEM (self))); |
745 | -+ |
746 | -+ goto out; |
747 | -+ } |
748 | -+ |
749 | -+ nm_log_info (LOGD_MB, "ofono: (%s): IPv4 static configuration:", nm_modem_get_uid (NM_MODEM (self))); |
750 | -+ |
751 | + v_dict = g_variant_get_child_value (v, 0); |
752 | + if (!v_dict) { |
753 | -+ nm_log_warn (LOGD_BT, "ofono: (%s): error getting IPv4 Settings: no v_dict", |
754 | ++ nm_log_warn (LOGD_MB, "ofono: (%s): error getting IPv4 Settings", |
755 | + nm_modem_get_uid (NM_MODEM (self))); |
756 | -+ return; |
757 | ++ goto out; |
758 | + } |
759 | + |
760 | -+ /* NOTE - 0.9.10x code didn't fail if 'Interface' missing */ |
761 | ++ nm_log_info (LOGD_MB, "ofono: (%s): IPv4 static Settings:", nm_modem_get_uid (NM_MODEM (self))); |
762 | + |
763 | + if (g_variant_lookup (v_dict, "Interface", "&s", &s)) { |
764 | + |
765 | @@ -1376,7 +1329,7 @@ |
766 | + NM_MODEM_IP4_METHOD, NM_MODEM_IP_METHOD_STATIC, |
767 | + NULL); |
768 | + } else { |
769 | -+ nm_log_warn (LOGD_BT, "ofono: (%s): Settings 'Interface'; empty", |
770 | ++ nm_log_warn (LOGD_MB, "ofono: (%s): Settings 'Interface'; empty", |
771 | + nm_modem_get_uid (NM_MODEM (self))); |
772 | + goto out; |
773 | + } |
774 | @@ -1428,6 +1381,7 @@ |
775 | + } else { |
776 | + nm_log_warn (LOGD_MB, "ofono: (%s): Settings 'Address' missing", |
777 | + nm_modem_get_uid (NM_MODEM (self))); |
778 | ++ goto out; |
779 | + } |
780 | + |
781 | + if (g_variant_lookup (v_dict, "Netmask", "&s", &s)) { |
782 | @@ -1450,7 +1404,8 @@ |
783 | + goto out; |
784 | + } |
785 | + |
786 | -+ nm_log_info (LOGD_MB, " address %s/%d", addr_s, prefix); |
787 | ++ nm_log_info (LOGD_MB, "ofono (%s) Address: %s/%d", |
788 | ++ nm_modem_get_uid (NM_MODEM (self)), addr_s, prefix); |
789 | + nm_ip4_config_add_address (priv->ip4_config, &addr); |
790 | + |
791 | + if (g_variant_lookup (v_dict, "Gateway", "&s", &s)) { |
792 | @@ -1477,7 +1432,7 @@ |
793 | + |
794 | + while (*iter) { |
795 | + if (ip_string_to_network_address (*iter, &address_network) && address_network > 0) { |
796 | -+ nm_log_info (LOGD_MB, "ofono: (%s): DNS %s", |
797 | ++ nm_log_info (LOGD_MB, "ofono: (%s): DNS: %s", |
798 | + nm_modem_get_uid (NM_MODEM (self)), *iter); |
799 | + |
800 | + nm_ip4_config_add_nameserver (priv->ip4_config, address_network); |
801 | @@ -1489,13 +1444,15 @@ |
802 | + *iter++; |
803 | + } |
804 | + |
805 | -+ /* TOOD: check for minimum NameServers >= 1? */ |
806 | ++ if (iter == array) { |
807 | ++ nm_log_warn (LOGD_MB, "ofono: (%s): Settings: 'DomainNameServers': none specified", |
808 | ++ nm_modem_get_uid (NM_MODEM (self))); |
809 | ++ g_free (array); |
810 | ++ goto out; |
811 | ++ } |
812 | + |
813 | + g_free (array); |
814 | + } else { |
815 | -+ |
816 | -+ /* NOTE - 0.9.10.x would not throw an error in this case!!! */ |
817 | -+ |
818 | + nm_log_warn (LOGD_MB, "ofono: (%s): Settings 'DomainNameServers' missing", |
819 | + nm_modem_get_uid (NM_MODEM (self))); |
820 | + goto out; |
821 | @@ -1524,14 +1481,19 @@ |
822 | + ret = TRUE; |
823 | + |
824 | +out: |
825 | -+ if (!ret) |
826 | -+ reason = NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE; |
827 | -+ |
828 | -+ nm_log_dbg (LOGD_MB, "(%s): DONE w/Settings; ret: %s", |
829 | -+ nm_modem_get_uid (NM_MODEM (self)), ret ? "TRUE" : "FALSE"); |
830 | -+ |
831 | -+ if (nm_modem_get_state (NM_MODEM (self)) != NM_MODEM_STATE_CONNECTED) |
832 | ++ if (nm_modem_get_state (NM_MODEM (self)) != NM_MODEM_STATE_CONNECTED) { |
833 | ++ nm_log_info (LOGD_MB, "ofono: (%s): emitting PREPARE_RESULT: %s", |
834 | ++ nm_modem_get_uid (NM_MODEM (self)), ret ? "TRUE" : "FALSE"); |
835 | ++ |
836 | ++ if (!ret) |
837 | ++ reason = NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE; |
838 | ++ |
839 | + g_signal_emit_by_name (self, NM_MODEM_PREPARE_RESULT, ret, reason); |
840 | ++ } else { |
841 | ++ nm_log_warn (LOGD_MB, "ofono: (%s): MODEM_PPP_FAILED", nm_modem_get_uid (NM_MODEM (self))); |
842 | ++ |
843 | ++ g_signal_emit_by_name (self, NM_MODEM_PPP_FAILED, NM_DEVICE_STATE_REASON_PPP_FAILED); |
844 | ++ } |
845 | +} |
846 | + |
847 | +static NMActStageReturn |
848 | |
849 | === modified file 'debian/rules' |
850 | --- debian/rules 2016-04-06 20:01:36 +0000 |
851 | +++ debian/rules 2016-04-27 16:19:01 +0000 |
852 | @@ -2,11 +2,24 @@ |
853 | |
854 | include /usr/share/dpkg/architecture.mk |
855 | |
856 | -PPPD_PLUGIN_DIR := $(shell dh_ppp --plugin-dir) |
857 | +# The following line is used by 1.2x desktop, but doesn't |
858 | +# work on vivid or wily, preventing a source package from |
859 | +# being built on this releases. This is because ppp 2.4.6-3* |
860 | +# doesn't include dh_ppp. |
861 | +# |
862 | +# PPPD_PLUGIN_DIR := $(shell dh_ppp --plugin-dir) |
863 | DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) |
864 | |
865 | %: |
866 | - dh $@ --with gir,systemd,autoreconf,ppp |
867 | +# This is from the 1.2x desktop branch; ppp fails due to lack of |
868 | +# dh_ppp ( see above ). This is a no-op until we fix pptp VPN |
869 | +# on the phone. gir fails when building the binary packages with |
870 | +# the error: |
871 | +# |
872 | +# dh_girepository: Could not find gir file for NM-1.0.typelib |
873 | +# |
874 | +# dh $@ --with gir,systemd,autoreconf,ppp |
875 | + dh $@ --with systemd,autoreconf |
876 | |
877 | autoreconf: |
878 | gtkdocize --copy |
879 | @@ -19,14 +32,13 @@ |
880 | override_dh_auto_configure: |
881 | dh_auto_configure -- \ |
882 | --libexecdir=/usr/lib/NetworkManager \ |
883 | - --with-pppd-plugin-dir=$(PPPD_PLUGIN_DIR) \ |
884 | - --with-pppd=/usr/sbin/pppd \ |
885 | --with-resolvconf=/sbin/resolvconf \ |
886 | --with-dhclient=/sbin/dhclient \ |
887 | --with-iptables=/sbin/iptables \ |
888 | --with-dnsmasq=/usr/sbin/dnsmasq \ |
889 | --with-dnssec-trigger=/usr/lib/dnssec-trigger/dnssec-trigger-script \ |
890 | --with-systemdsystemunitdir=/lib/systemd/system \ |
891 | + --with-systemd-journal=no \ |
892 | --with-udev-dir=/lib/udev \ |
893 | --with-crypto=gnutls \ |
894 | --with-session-tracking=systemd \ |
895 | @@ -36,9 +48,9 @@ |
896 | --with-nmcli \ |
897 | --disable-more-warnings \ |
898 | --disable-modify-system \ |
899 | + --disable-bluez5 \ |
900 | --enable-polkit \ |
901 | --enable-polkit-agent \ |
902 | - --enable-ppp \ |
903 | --enable-ifupdown \ |
904 | --enable-config-plugin-ibft \ |
905 | --enable-introspection \ |
906 | @@ -46,8 +58,7 @@ |
907 | --enable-concheck \ |
908 | --enable-teamdctl=no \ |
909 | --enable-vala \ |
910 | - --with-tests \ |
911 | - --enable-bluez5-dun |
912 | + --with-tests |
913 | |
914 | override_dh_install: |
915 | rm -vf $(CURDIR)/debian/tmp/etc/init.d/NetworkManager |
916 | @@ -59,6 +70,9 @@ |
917 | # copy dnsmasq configuration |
918 | mkdir -p debian/network-manager/etc/dnsmasq.d |
919 | cp debian/network-manager.dnsmasq debian/network-manager/etc/dnsmasq.d/network-manager |
920 | + mkdir -p debian/network-manager/etc/polkit-1/localauthority/50-local.d |
921 | + cp debian/indicator-network.pkla \ |
922 | + debian/network-manager/etc/polkit-1/localauthority/50-local.d/org.freedesktop.NetworkManager.pkla |
923 | |
924 | override_dh_installinit: |
925 | dh_installinit --noscripts |
926 | @@ -67,7 +81,7 @@ |
927 | dh_makeshlibs -X/usr/lib/$(DEB_HOST_MULTIARCH)/NetworkManager/ -X/usr/lib/pppd/ |
928 | |
929 | override_dh_strip: |
930 | - dh_strip --dbgsym-migration='network-manager-dbg (<< 1.1.91-2~)' |
931 | + dh_strip --dbg-package=network-manager-dbg |
932 | |
933 | override_dh_systemd_enable: |
934 | dh_systemd_enable -pnetwork-manager NetworkManager-dispatcher.service |
935 | @@ -81,9 +95,6 @@ |
936 | dh_systemd_start -pnetwork-manager --no-start NetworkManager-wait-online.service |
937 | dh_systemd_start -pnetwork-manager --restart-after-upgrade NetworkManager.service |
938 | |
939 | -override_dh_ppp: |
940 | - dh_ppp --breaks |
941 | - |
942 | override_dh_auto_test: |
943 | ifeq (, $(filter nocheck, $(DEB_BUILD_OPTIONS))) |
944 | make check || ( find . -name test-suite.log -exec cat {} \;; exit 1; ) |