diff options
author | Pablo Saavedra <psaavedra@igalia.com> | 2018-03-13 23:20:55 +0100 |
---|---|---|
committer | Joe MacDonald <joe_macdonald@mentor.com> | 2018-04-09 12:32:06 -0400 |
commit | 78cacdb93d4e916d236487d2fd197908f62815ed (patch) | |
tree | 21fa5d58832764563a3359c03dddd09f2ac0c6d6 /meta-networking/recipes-connectivity | |
parent | 4489cac61f5afcbfe119324e3cf357e6bd31931e (diff) | |
download | meta-openembedded-78cacdb93d4e916d236487d2fd197908f62815ed.tar.gz |
networkmanager upgrade to 1.10.6
* Upgraded to latest stable version [1]
* Forward-port of the Yocto patches
* Disabled 0004-Define-missing-features-to-cater-for-musl.patch
* This version keeps fixed 'Fixed setting 802-1x.password-raw
property in nmcli' error. Fixed on 1.6.4 [2].
References:
[1] https://cgit.freedesktop.org/NetworkManager/NetworkManager/tree/NEWS?h=nm-1-10
[2] https://cgit.freedesktop.org/NetworkManager/NetworkManager/tree/NEWS?h=1.6.4#n11
Signed-off-by: Pablo Saavedra <psaavedra@igalia.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
Diffstat (limited to 'meta-networking/recipes-connectivity')
14 files changed, 119 insertions, 930 deletions
diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-adjust-net-headers-for-musl-compatibility.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-adjust-net-headers-for-musl-compatibility.patch index ced0c7cff..194e03722 100644 --- a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-adjust-net-headers-for-musl-compatibility.patch +++ b/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-adjust-net-headers-for-musl-compatibility.patch | |||
@@ -1,21 +1,21 @@ | |||
1 | From 047d3bf96b510740f64687480333c378e414995f Mon Sep 17 00:00:00 2001 | 1 | From f81abf62c0ae93628df36c27357358523be25fb8 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Fri, 31 Mar 2017 15:57:05 -0700 | 3 | Date: Fri, 31 Mar 2017 15:57:05 -0700 |
4 | Subject: [PATCH 1/5] adjust net/ headers for musl compatibility | 4 | Subject: [PATCH 1/7] adjust net/ headers for musl compatibility |
5 | 5 | ||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
7 | --- | 7 | --- |
8 | libnm-core/nm-utils.c | 12 +++++++----- | 8 | libnm-core/nm-utils.c | 13 ++++++++----- |
9 | libnm-core/nm-utils.h | 5 ++--- | 9 | libnm-core/nm-utils.h | 5 ++--- |
10 | src/platform/wifi/wifi-utils.h | 2 +- | 10 | src/platform/wifi/wifi-utils.h | 2 +- |
11 | 3 files changed, 10 insertions(+), 9 deletions(-) | 11 | 3 files changed, 11 insertions(+), 9 deletions(-) |
12 | 12 | ||
13 | diff --git a/libnm-core/nm-utils.c b/libnm-core/nm-utils.c | 13 | diff --git a/libnm-core/nm-utils.c b/libnm-core/nm-utils.c |
14 | index df75d56..868224e 100644 | 14 | index ebbbfd3..77273df 100644 |
15 | --- a/libnm-core/nm-utils.c | 15 | --- a/libnm-core/nm-utils.c |
16 | +++ b/libnm-core/nm-utils.c | 16 | +++ b/libnm-core/nm-utils.c |
17 | @@ -19,24 +19,26 @@ | 17 | @@ -19,14 +19,9 @@ |
18 | * Copyright 2005 - 2014 Red Hat, Inc. | 18 | * Copyright 2005 - 2017 Red Hat, Inc. |
19 | */ | 19 | */ |
20 | 20 | ||
21 | -#include "nm-default.h" | 21 | -#include "nm-default.h" |
@@ -29,25 +29,29 @@ index df75d56..868224e 100644 | |||
29 | #include <arpa/inet.h> | 29 | #include <arpa/inet.h> |
30 | #include <uuid/uuid.h> | 30 | #include <uuid/uuid.h> |
31 | #include <libintl.h> | 31 | #include <libintl.h> |
32 | #include <gmodule.h> | 32 | @@ -34,12 +29,20 @@ |
33 | #include <sys/stat.h> | 33 | #include <sys/stat.h> |
34 | #include <net/if.h> | ||
35 | #include <linux/pkt_sched.h> | ||
34 | +//#include <net/if_arp.h> | 36 | +//#include <net/if_arp.h> |
35 | +//#include <net/ethernet.h> | 37 | +//#include <net/ethernet.h> |
36 | +#include <netinet/ether.h> | 38 | +#include <netinet/ether.h> |
37 | + | 39 | + |
38 | +#include "nm-default.h" | 40 | +#include "nm-default.h" |
39 | 41 | + | |
40 | +#include "nm-utils.h" | 42 | +#include "nm-utils.h" |
43 | |||
41 | #if WITH_JANSSON | 44 | #if WITH_JANSSON |
45 | #include "nm-json.h" | ||
42 | #include <jansson.h> | 46 | #include <jansson.h> |
43 | #endif | 47 | #endif |
44 | 48 | ||
45 | + | 49 | + |
50 | #include "nm-utils/nm-enum-utils.h" | ||
51 | #include "nm-utils/nm-hash-utils.h" | ||
46 | #include "nm-common-macros.h" | 52 | #include "nm-common-macros.h" |
47 | #include "nm-utils-private.h" | ||
48 | #include "nm-setting-private.h" | ||
49 | diff --git a/libnm-core/nm-utils.h b/libnm-core/nm-utils.h | 53 | diff --git a/libnm-core/nm-utils.h b/libnm-core/nm-utils.h |
50 | index 407c14e..156ccae 100644 | 54 | index df9284b..02e24ea 100644 |
51 | --- a/libnm-core/nm-utils.h | 55 | --- a/libnm-core/nm-utils.h |
52 | +++ b/libnm-core/nm-utils.h | 56 | +++ b/libnm-core/nm-utils.h |
53 | @@ -27,11 +27,10 @@ | 57 | @@ -27,11 +27,10 @@ |
@@ -65,7 +69,7 @@ index 407c14e..156ccae 100644 | |||
65 | #include "nm-core-enum-types.h" | 69 | #include "nm-core-enum-types.h" |
66 | #include "nm-setting-wireless-security.h" | 70 | #include "nm-setting-wireless-security.h" |
67 | diff --git a/src/platform/wifi/wifi-utils.h b/src/platform/wifi/wifi-utils.h | 71 | diff --git a/src/platform/wifi/wifi-utils.h b/src/platform/wifi/wifi-utils.h |
68 | index 8e2b93f..84f5ce9 100644 | 72 | index 705717b..939080f 100644 |
69 | --- a/src/platform/wifi/wifi-utils.h | 73 | --- a/src/platform/wifi/wifi-utils.h |
70 | +++ b/src/platform/wifi/wifi-utils.h | 74 | +++ b/src/platform/wifi/wifi-utils.h |
71 | @@ -22,7 +22,7 @@ | 75 | @@ -22,7 +22,7 @@ |
@@ -78,5 +82,5 @@ index 8e2b93f..84f5ce9 100644 | |||
78 | #include "nm-dbus-interface.h" | 82 | #include "nm-dbus-interface.h" |
79 | 83 | ||
80 | -- | 84 | -- |
81 | 2.12.1 | 85 | 2.14.1 |
82 | 86 | ||
diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-dns-resolved-add-systemd-resolved-backend.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-dns-resolved-add-systemd-resolved-backend.patch deleted file mode 100644 index bd194a61d..000000000 --- a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-dns-resolved-add-systemd-resolved-backend.patch +++ /dev/null | |||
@@ -1,621 +0,0 @@ | |||
1 | From: Sjoerd Simons <sjoerd@luon.net> | ||
2 | Date: Sun, 21 Aug 2016 21:46:02 +0200 | ||
3 | Subject: [PATCH] dns/resolved: add systemd-resolved backend | ||
4 | |||
5 | Add initial DNS backend that pushes DNS information into | ||
6 | systemd-resolved. Backend is choosen by default if the systems | ||
7 | resolv.conv is setup to pointing to one of the standard resolved | ||
8 | locations. | ||
9 | |||
10 | This doesn't handle global dns configuration. | ||
11 | |||
12 | Signed-off-by: Sjoerd Simons <sjoerd@luon.net> | ||
13 | |||
14 | https://bugzilla.gnome.org/show_bug.cgi?id=762540 | ||
15 | |||
16 | Upstream-Status: Backport | ||
17 | |||
18 | --- | ||
19 | man/NetworkManager.conf.xml | 10 +- | ||
20 | src/Makefile.am | 2 + | ||
21 | src/dns-manager/nm-dns-manager.c | 43 ++- | ||
22 | src/dns-manager/nm-dns-systemd-resolved.c | 427 ++++++++++++++++++++++++++++++ | ||
23 | src/dns-manager/nm-dns-systemd-resolved.h | 45 ++++ | ||
24 | 5 files changed, 523 insertions(+), 4 deletions(-) | ||
25 | create mode 100644 src/dns-manager/nm-dns-systemd-resolved.c | ||
26 | create mode 100644 src/dns-manager/nm-dns-systemd-resolved.h | ||
27 | |||
28 | diff --git a/man/NetworkManager.conf.xml b/man/NetworkManager.conf.xml | ||
29 | index 6295b82..0a67ae5 100644 | ||
30 | --- a/man/NetworkManager.conf.xml | ||
31 | +++ b/man/NetworkManager.conf.xml | ||
32 | @@ -275,10 +275,12 @@ no-auto-default=* | ||
33 | <varlistentry> | ||
34 | <term><varname>dns</varname></term> | ||
35 | <listitem><para>Set the DNS (<filename>resolv.conf</filename>) processing mode.</para> | ||
36 | - <para><literal>default</literal>: The default if the key is | ||
37 | - not specified. NetworkManager will update | ||
38 | + <para><literal>default</literal>: NetworkManager will update | ||
39 | <filename>resolv.conf</filename> to reflect the nameservers | ||
40 | - provided by currently active connections.</para> | ||
41 | + provided by currently active connections. This is the default | ||
42 | + if the key is not specified, unless the system is configured | ||
43 | + to use systemd-resolved; in this case the default is | ||
44 | + <literal>systemd-resolved</literal></para> | ||
45 | <para><literal>dnsmasq</literal>: NetworkManager will run | ||
46 | dnsmasq as a local caching nameserver, using a "split DNS" | ||
47 | configuration if you are connected to a VPN, and then update | ||
48 | @@ -288,6 +290,8 @@ no-auto-default=* | ||
49 | to unbound and dnssec-triggerd, providing a "split DNS" | ||
50 | configuration with DNSSEC support. The <filename>/etc/resolv.conf</filename> | ||
51 | will be managed by dnssec-trigger daemon.</para> | ||
52 | + <para><literal>systemd-resolved</literal>: NetworkManager will | ||
53 | + push the DNS configuration to systemd-resolved</para> | ||
54 | <para><literal>none</literal>: NetworkManager will not | ||
55 | modify resolv.conf. This implies | ||
56 | <literal>rc-manager</literal> <literal>unmanaged</literal></para> | ||
57 | diff --git a/src/Makefile.am b/src/Makefile.am | ||
58 | index 8d29b19..10f63de 100644 | ||
59 | --- a/src/Makefile.am | ||
60 | +++ b/src/Makefile.am | ||
61 | @@ -345,6 +345,8 @@ libNetworkManager_la_SOURCES = \ | ||
62 | \ | ||
63 | dns-manager/nm-dns-dnsmasq.c \ | ||
64 | dns-manager/nm-dns-dnsmasq.h \ | ||
65 | + dns-manager/nm-dns-systemd-resolved.c \ | ||
66 | + dns-manager/nm-dns-systemd-resolved.h \ | ||
67 | dns-manager/nm-dns-unbound.c \ | ||
68 | dns-manager/nm-dns-unbound.h \ | ||
69 | dns-manager/nm-dns-manager.c \ | ||
70 | diff --git a/src/dns-manager/nm-dns-manager.c b/src/dns-manager/nm-dns-manager.c | ||
71 | index 5a758a9..38bc786 100644 | ||
72 | --- a/src/dns-manager/nm-dns-manager.c | ||
73 | +++ b/src/dns-manager/nm-dns-manager.c | ||
74 | @@ -45,6 +45,7 @@ | ||
75 | |||
76 | #include "nm-dns-plugin.h" | ||
77 | #include "nm-dns-dnsmasq.h" | ||
78 | +#include "nm-dns-systemd-resolved.h" | ||
79 | #include "nm-dns-unbound.h" | ||
80 | |||
81 | #if WITH_LIBSOUP | ||
82 | @@ -1588,6 +1589,37 @@ _check_resconf_immutable (NMDnsManagerResolvConfManager rc_manager) | ||
83 | |||
84 | NM_DEFINE_SINGLETON_GETTER (NMDnsManager, nm_dns_manager_get, NM_TYPE_DNS_MANAGER); | ||
85 | |||
86 | +static gboolean | ||
87 | +_resolvconf_resolved_managed (void) | ||
88 | +{ | ||
89 | + static const char *const resolved_paths[] = { | ||
90 | + "/run/systemd/resolve/resolv.conf", | ||
91 | + "/lib/systemd/resolv.conf", | ||
92 | + "/usr/lib/systemd/resolv.conf", | ||
93 | + }; | ||
94 | + GFile *f; | ||
95 | + GFileInfo *info; | ||
96 | + gboolean ret = FALSE; | ||
97 | + | ||
98 | + f = g_file_new_for_path (_PATH_RESCONF); | ||
99 | + info = g_file_query_info (f, | ||
100 | + G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK","\ | ||
101 | + G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET, | ||
102 | + G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, | ||
103 | + NULL, NULL); | ||
104 | + | ||
105 | + if (info && g_file_info_get_is_symlink (info)) { | ||
106 | + ret = _nm_utils_strv_find_first ((gchar **) resolved_paths, | ||
107 | + G_N_ELEMENTS (resolved_paths), | ||
108 | + g_file_info_get_symlink_target (info)) >= 0; | ||
109 | + } | ||
110 | + | ||
111 | + g_clear_object(&info); | ||
112 | + g_clear_object(&f); | ||
113 | + | ||
114 | + return ret; | ||
115 | +} | ||
116 | + | ||
117 | static void | ||
118 | init_resolv_conf_mode (NMDnsManager *self, gboolean force_reload_plugin) | ||
119 | { | ||
120 | @@ -1633,7 +1665,16 @@ again: | ||
121 | |||
122 | rc_manager = _check_resconf_immutable (rc_manager); | ||
123 | |||
124 | - if (nm_streq0 (mode, "dnsmasq")) { | ||
125 | + if ( (!mode && _resolvconf_resolved_managed ()) | ||
126 | + || nm_streq0 (mode, "systemd-resolved")) { | ||
127 | + if ( force_reload_plugin | ||
128 | + || !NM_IS_DNS_SYSTEMD_RESOLVED (priv->plugin)) { | ||
129 | + _clear_plugin (self); | ||
130 | + priv->plugin = nm_dns_systemd_resolved_new (); | ||
131 | + plugin_changed = TRUE; | ||
132 | + } | ||
133 | + mode = "systemd-resolved"; | ||
134 | + } else if (nm_streq0 (mode, "dnsmasq")) { | ||
135 | if (force_reload_plugin || !NM_IS_DNS_DNSMASQ (priv->plugin)) { | ||
136 | _clear_plugin (self); | ||
137 | priv->plugin = nm_dns_dnsmasq_new (); | ||
138 | diff --git a/src/dns-manager/nm-dns-systemd-resolved.c b/src/dns-manager/nm-dns-systemd-resolved.c | ||
139 | new file mode 100644 | ||
140 | index 0000000..6bdd5f6 | ||
141 | --- /dev/null | ||
142 | +++ b/src/dns-manager/nm-dns-systemd-resolved.c | ||
143 | @@ -0,0 +1,427 @@ | ||
144 | +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ | ||
145 | +/* | ||
146 | + * Copyright (C) 2010 Dan Williams <dcbw@redhat.com> | ||
147 | + * Copyright (C) 2016 Sjoerd Simons <sjoerd@luon.net> | ||
148 | + * | ||
149 | + * This program is free software; you can redistribute it and/or modify | ||
150 | + * it under the terms of the GNU General Public License as published by | ||
151 | + * the Free Software Foundation; either version 2, or (at your option) | ||
152 | + * any later version. | ||
153 | + * | ||
154 | + * This program is distributed in the hope that it will be useful, | ||
155 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
156 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
157 | + * GNU General Public License for more details. | ||
158 | + * | ||
159 | + * You should have received a copy of the GNU General Public License along | ||
160 | + * with this program; if not, write to the Free Software Foundation, Inc., | ||
161 | + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
162 | + * | ||
163 | + */ | ||
164 | + | ||
165 | +#include "nm-default.h" | ||
166 | + | ||
167 | +#include "nm-dns-systemd-resolved.h" | ||
168 | + | ||
169 | +#include <stdlib.h> | ||
170 | +#include <unistd.h> | ||
171 | +#include <sys/types.h> | ||
172 | +#include <sys/wait.h> | ||
173 | +#include <arpa/inet.h> | ||
174 | +#include <sys/stat.h> | ||
175 | +#include <linux/if.h> | ||
176 | + | ||
177 | +#include "nm-core-internal.h" | ||
178 | +#include "nm-platform.h" | ||
179 | +#include "nm-utils.h" | ||
180 | +#include "nm-ip4-config.h" | ||
181 | +#include "nm-ip6-config.h" | ||
182 | +#include "nm-bus-manager.h" | ||
183 | +#include "nm-manager.h" | ||
184 | +#include "nm-device.h" | ||
185 | +#include "NetworkManagerUtils.h" | ||
186 | + | ||
187 | +G_DEFINE_TYPE (NMDnsSystemdResolved, nm_dns_systemd_resolved, NM_TYPE_DNS_PLUGIN) | ||
188 | + | ||
189 | +#define NM_DNS_SYSTEMD_RESOLVED_GET_PRIVATE(o) \ | ||
190 | + (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DNS_SYSTEMD_RESOLVED, \ | ||
191 | + NMDnsSystemdResolvedPrivate)) | ||
192 | + | ||
193 | +#define SYSTEMD_RESOLVED_DBUS_SERVICE "org.freedesktop.resolve1" | ||
194 | +#define SYSTEMD_RESOLVED_DBUS_PATH "/org/freedesktop/resolve1" | ||
195 | + | ||
196 | +typedef struct { | ||
197 | + int ifindex; | ||
198 | + GList *configs; | ||
199 | +} InterfaceConfig; | ||
200 | + | ||
201 | +typedef struct { | ||
202 | + GDBusProxy *resolve; | ||
203 | + GCancellable *init_cancellable; | ||
204 | + GCancellable *update_cancellable; | ||
205 | + GQueue dns_updates; | ||
206 | + GQueue domain_updates; | ||
207 | +} NMDnsSystemdResolvedPrivate; | ||
208 | + | ||
209 | +/*****************************************************************************/ | ||
210 | + | ||
211 | +#define _NMLOG_DOMAIN LOGD_DNS | ||
212 | +#define _NMLOG_PREFIX_NAME "systemd-resolved" | ||
213 | +#define _NMLOG(level, ...) \ | ||
214 | + G_STMT_START { \ | ||
215 | + nm_log ((level), _NMLOG_DOMAIN, \ | ||
216 | + "%s[%p]: " _NM_UTILS_MACRO_FIRST(__VA_ARGS__), \ | ||
217 | + _NMLOG_PREFIX_NAME, \ | ||
218 | + (self) \ | ||
219 | + _NM_UTILS_MACRO_REST(__VA_ARGS__)); \ | ||
220 | + } G_STMT_END | ||
221 | + | ||
222 | +/*****************************************************************************/ | ||
223 | + | ||
224 | +static void | ||
225 | +call_done (GObject *source, GAsyncResult *r, gpointer user_data) | ||
226 | +{ | ||
227 | + GVariant *v; | ||
228 | + GError *error = NULL; | ||
229 | + NMDnsSystemdResolved *self = (NMDnsSystemdResolved *) user_data; | ||
230 | + | ||
231 | + v = g_dbus_proxy_call_finish (G_DBUS_PROXY (source), r, &error); | ||
232 | + | ||
233 | + if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) | ||
234 | + return; | ||
235 | + | ||
236 | + if (error != NULL) { | ||
237 | + _LOGW ("Failed: %s\n", error->message); | ||
238 | + g_error_free (error); | ||
239 | + } | ||
240 | +} | ||
241 | + | ||
242 | +static void | ||
243 | +add_interface_configuration (NMDnsSystemdResolved *self, | ||
244 | + GArray *interfaces, | ||
245 | + const NMDnsIPConfigData *data) | ||
246 | +{ | ||
247 | + int i; | ||
248 | + InterfaceConfig *ic = NULL; | ||
249 | + int ifindex; | ||
250 | + NMDevice *device; | ||
251 | + | ||
252 | + if (NM_IS_IP4_CONFIG (data->config)) | ||
253 | + ifindex = nm_ip4_config_get_ifindex (data->config); | ||
254 | + else if (NM_IS_IP6_CONFIG (data->config)) | ||
255 | + ifindex = nm_ip6_config_get_ifindex (data->config); | ||
256 | + else | ||
257 | + g_return_if_reached (); | ||
258 | + | ||
259 | + device = nm_manager_get_device_by_ifindex (nm_manager_get (), ifindex); | ||
260 | + | ||
261 | + if (!nm_device_get_managed (device, FALSE)) | ||
262 | + return; | ||
263 | + | ||
264 | + for (i = 0; i < interfaces->len; i++) { | ||
265 | + InterfaceConfig *tic = &g_array_index (interfaces, InterfaceConfig, i); | ||
266 | + if (ifindex == tic->ifindex) { | ||
267 | + ic = tic; | ||
268 | + break; | ||
269 | + } | ||
270 | + } | ||
271 | + | ||
272 | + if (!ic) { | ||
273 | + g_array_set_size (interfaces, interfaces->len + 1); | ||
274 | + ic = &g_array_index (interfaces, InterfaceConfig, | ||
275 | + interfaces->len - 1); | ||
276 | + ic->ifindex = ifindex; | ||
277 | + } | ||
278 | + | ||
279 | + ic->configs = g_list_append (ic->configs, data->config); | ||
280 | +} | ||
281 | + | ||
282 | +static void | ||
283 | +add_domain (GVariantBuilder *domains, | ||
284 | + const char *domain, | ||
285 | + gboolean never_default) | ||
286 | +{ | ||
287 | + /* If this link is never the default (e.g. only used for resources on this | ||
288 | + * network) add a routing domain. */ | ||
289 | + g_variant_builder_add (domains, "(sb)", domain, never_default); | ||
290 | +} | ||
291 | + | ||
292 | +static void | ||
293 | +update_add_ip6_config (NMDnsSystemdResolved *self, | ||
294 | + GVariantBuilder *dns, | ||
295 | + GVariantBuilder *domains, | ||
296 | + const NMIP6Config *config) | ||
297 | +{ | ||
298 | + guint i, n; | ||
299 | + | ||
300 | + n = nm_ip6_config_get_num_nameservers (config); | ||
301 | + for (i = 0 ; i < n; i++) { | ||
302 | + const struct in6_addr *ip; | ||
303 | + | ||
304 | + g_variant_builder_open (dns, G_VARIANT_TYPE ("(iay)")); | ||
305 | + g_variant_builder_add (dns, "i", AF_INET6); | ||
306 | + ip = nm_ip6_config_get_nameserver (config, i), | ||
307 | + | ||
308 | + g_variant_builder_add_value (dns, g_variant_new_fixed_array (G_VARIANT_TYPE_BYTE, ip, 16, 1)); | ||
309 | + g_variant_builder_close (dns); | ||
310 | + } | ||
311 | + | ||
312 | + n = nm_ip6_config_get_num_searches (config); | ||
313 | + if (n > 0) { | ||
314 | + for (i = 0; i < n; i++) { | ||
315 | + add_domain (domains, nm_ip6_config_get_search (config, i), | ||
316 | + nm_ip6_config_get_never_default (config)); | ||
317 | + } | ||
318 | + } else { | ||
319 | + n = nm_ip6_config_get_num_domains (config); | ||
320 | + for (i = 0; i < n; i++) { | ||
321 | + add_domain (domains, nm_ip6_config_get_domain (config, i), | ||
322 | + nm_ip6_config_get_never_default (config)); | ||
323 | + } | ||
324 | + } | ||
325 | +} | ||
326 | + | ||
327 | +static void | ||
328 | +update_add_ip4_config (NMDnsSystemdResolved *self, | ||
329 | + GVariantBuilder *dns, | ||
330 | + GVariantBuilder *domains, | ||
331 | + const NMIP4Config *config) | ||
332 | +{ | ||
333 | + guint i, n; | ||
334 | + | ||
335 | + n = nm_ip4_config_get_num_nameservers (config); | ||
336 | + for (i = 0 ; i < n; i++) { | ||
337 | + guint32 ns; | ||
338 | + | ||
339 | + g_variant_builder_open (dns, G_VARIANT_TYPE ("(iay)")); | ||
340 | + g_variant_builder_add (dns, "i", AF_INET); | ||
341 | + ns = nm_ip4_config_get_nameserver (config, i), | ||
342 | + | ||
343 | + g_variant_builder_add_value (dns, g_variant_new_fixed_array (G_VARIANT_TYPE_BYTE, &ns, 4, 1)); | ||
344 | + g_variant_builder_close (dns); | ||
345 | + } | ||
346 | + | ||
347 | + n = nm_ip4_config_get_num_searches (config); | ||
348 | + if (n > 0) { | ||
349 | + for (i = 0; i < n; i++) { | ||
350 | + add_domain (domains, nm_ip4_config_get_search (config, i), | ||
351 | + nm_ip4_config_get_never_default (config)); | ||
352 | + } | ||
353 | + } else { | ||
354 | + n = nm_ip4_config_get_num_domains (config); | ||
355 | + for (i = 0; i < n; i++) { | ||
356 | + add_domain (domains, nm_ip4_config_get_domain (config, i), | ||
357 | + nm_ip4_config_get_never_default (config)); | ||
358 | + } | ||
359 | + } | ||
360 | +} | ||
361 | + | ||
362 | +static void | ||
363 | +free_pending_updates (NMDnsSystemdResolved *self) | ||
364 | +{ | ||
365 | + NMDnsSystemdResolvedPrivate *priv = NM_DNS_SYSTEMD_RESOLVED_GET_PRIVATE (self); | ||
366 | + GVariant *v; | ||
367 | + | ||
368 | + while ((v = g_queue_pop_head (&priv->dns_updates)) != NULL) | ||
369 | + g_variant_unref (v); | ||
370 | + | ||
371 | + while ((v = g_queue_pop_head (&priv->domain_updates)) != NULL) | ||
372 | + g_variant_unref (v); | ||
373 | +} | ||
374 | + | ||
375 | +static void | ||
376 | +prepare_one_interface (NMDnsSystemdResolved *self, InterfaceConfig *ic) | ||
377 | +{ | ||
378 | + NMDnsSystemdResolvedPrivate *priv = NM_DNS_SYSTEMD_RESOLVED_GET_PRIVATE (self); | ||
379 | + GVariantBuilder dns, domains; | ||
380 | + GList *l; | ||
381 | + | ||
382 | + g_variant_builder_init (&dns, G_VARIANT_TYPE ("(ia(iay))")); | ||
383 | + g_variant_builder_add (&dns, "i", ic->ifindex); | ||
384 | + g_variant_builder_open (&dns, G_VARIANT_TYPE ("a(iay)")); | ||
385 | + | ||
386 | + g_variant_builder_init (&domains, G_VARIANT_TYPE ("(ia(sb))")); | ||
387 | + g_variant_builder_add (&domains, "i", ic->ifindex); | ||
388 | + g_variant_builder_open (&domains, G_VARIANT_TYPE ("a(sb)")); | ||
389 | + | ||
390 | + for (l = ic->configs ; l != NULL ; l = g_list_next (l)) { | ||
391 | + if (NM_IS_IP4_CONFIG (l->data)) | ||
392 | + update_add_ip4_config (self, &dns, &domains, l->data); | ||
393 | + else if (NM_IS_IP6_CONFIG (l->data)) | ||
394 | + update_add_ip6_config (self, &dns, &domains, l->data); | ||
395 | + else | ||
396 | + g_assert_not_reached (); | ||
397 | + } | ||
398 | + g_variant_builder_close (&dns); | ||
399 | + g_variant_builder_close (&domains); | ||
400 | + | ||
401 | + g_queue_push_tail (&priv->dns_updates, | ||
402 | + g_variant_ref_sink (g_variant_builder_end (&dns))); | ||
403 | + g_queue_push_tail (&priv->domain_updates, | ||
404 | + g_variant_ref_sink (g_variant_builder_end (&domains))); | ||
405 | +} | ||
406 | + | ||
407 | +static void | ||
408 | +send_updates (NMDnsSystemdResolved *self) | ||
409 | +{ | ||
410 | + NMDnsSystemdResolvedPrivate *priv = NM_DNS_SYSTEMD_RESOLVED_GET_PRIVATE (self); | ||
411 | + GVariant *v; | ||
412 | + | ||
413 | + nm_clear_g_cancellable (&priv->update_cancellable); | ||
414 | + | ||
415 | + if (!priv->resolve) | ||
416 | + return; | ||
417 | + | ||
418 | + priv->update_cancellable = g_cancellable_new (); | ||
419 | + | ||
420 | + while ((v = g_queue_pop_head (&priv->dns_updates)) != NULL) { | ||
421 | + g_dbus_proxy_call (priv->resolve, "SetLinkDNS", v, | ||
422 | + G_DBUS_CALL_FLAGS_NONE, | ||
423 | + -1, priv->update_cancellable, call_done, self); | ||
424 | + g_variant_unref (v); | ||
425 | + } | ||
426 | + | ||
427 | + while ((v = g_queue_pop_head (&priv->domain_updates)) != NULL) { | ||
428 | + g_dbus_proxy_call (priv->resolve, "SetLinkDomains", v, | ||
429 | + G_DBUS_CALL_FLAGS_NONE, | ||
430 | + -1, priv->update_cancellable, call_done, self); | ||
431 | + g_variant_unref (v); | ||
432 | + } | ||
433 | +} | ||
434 | + | ||
435 | +static gboolean | ||
436 | +update (NMDnsPlugin *plugin, | ||
437 | + const NMDnsIPConfigData **configs, | ||
438 | + const NMGlobalDnsConfig *global_config, | ||
439 | + const char *hostname) | ||
440 | +{ | ||
441 | + NMDnsSystemdResolved *self = NM_DNS_SYSTEMD_RESOLVED (plugin); | ||
442 | + GArray *interfaces = g_array_new (TRUE, TRUE, sizeof (InterfaceConfig)); | ||
443 | + const NMDnsIPConfigData **c; | ||
444 | + int i; | ||
445 | + | ||
446 | + for (c = configs; *c != NULL; c++) | ||
447 | + add_interface_configuration (self, interfaces, *c); | ||
448 | + | ||
449 | + free_pending_updates (self); | ||
450 | + | ||
451 | + for (i = 0; i < interfaces->len; i++) { | ||
452 | + InterfaceConfig *ic = &g_array_index (interfaces, InterfaceConfig, i); | ||
453 | + | ||
454 | + prepare_one_interface (self, ic); | ||
455 | + g_list_free (ic->configs); | ||
456 | + } | ||
457 | + | ||
458 | + g_array_free (interfaces, TRUE); | ||
459 | + | ||
460 | + send_updates (self); | ||
461 | + | ||
462 | + return TRUE; | ||
463 | +} | ||
464 | + | ||
465 | +/****************************************************************/ | ||
466 | + | ||
467 | +static gboolean | ||
468 | +is_caching (NMDnsPlugin *plugin) | ||
469 | +{ | ||
470 | + return TRUE; | ||
471 | +} | ||
472 | + | ||
473 | +static const char * | ||
474 | +get_name (NMDnsPlugin *plugin) | ||
475 | +{ | ||
476 | + return "systemd-resolved"; | ||
477 | +} | ||
478 | + | ||
479 | +/****************************************************************/ | ||
480 | + | ||
481 | +NMDnsPlugin * | ||
482 | +nm_dns_systemd_resolved_new (void) | ||
483 | +{ | ||
484 | + return g_object_new (NM_TYPE_DNS_SYSTEMD_RESOLVED, NULL); | ||
485 | +} | ||
486 | + | ||
487 | +static void | ||
488 | +resolved_proxy_created (GObject *source, GAsyncResult *r, gpointer user_data) | ||
489 | +{ | ||
490 | + NMDnsSystemdResolved *self = (NMDnsSystemdResolved *) user_data; | ||
491 | + NMDnsSystemdResolvedPrivate *priv; | ||
492 | + gs_free_error GError *error = NULL; | ||
493 | + GDBusProxy *resolve; | ||
494 | + | ||
495 | + resolve = g_dbus_proxy_new_finish (r, &error); | ||
496 | + if ( !resolve | ||
497 | + && g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) | ||
498 | + return; | ||
499 | + | ||
500 | + priv = NM_DNS_SYSTEMD_RESOLVED_GET_PRIVATE (self); | ||
501 | + g_clear_object (&priv->init_cancellable); | ||
502 | + if (!resolve) { | ||
503 | + _LOGW ("failed to connect to resolved via DBus: %s", error->message); | ||
504 | + g_signal_emit_by_name (self, NM_DNS_PLUGIN_FAILED); | ||
505 | + return; | ||
506 | + } | ||
507 | + | ||
508 | + priv->resolve = resolve; | ||
509 | + send_updates (self); | ||
510 | +} | ||
511 | + | ||
512 | + | ||
513 | +static void | ||
514 | +nm_dns_systemd_resolved_init (NMDnsSystemdResolved *self) | ||
515 | +{ | ||
516 | + NMDnsSystemdResolvedPrivate *priv = NM_DNS_SYSTEMD_RESOLVED_GET_PRIVATE (self); | ||
517 | + NMBusManager *dbus_mgr; | ||
518 | + GDBusConnection *connection; | ||
519 | + | ||
520 | + g_queue_init (&priv->dns_updates); | ||
521 | + g_queue_init (&priv->domain_updates); | ||
522 | + | ||
523 | + dbus_mgr = nm_bus_manager_get (); | ||
524 | + g_return_if_fail (dbus_mgr); | ||
525 | + | ||
526 | + connection = nm_bus_manager_get_connection (dbus_mgr); | ||
527 | + g_return_if_fail (connection); | ||
528 | + | ||
529 | + priv->init_cancellable = g_cancellable_new (); | ||
530 | + g_dbus_proxy_new (connection, | ||
531 | + G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES | | ||
532 | + G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS, | ||
533 | + NULL, | ||
534 | + SYSTEMD_RESOLVED_DBUS_SERVICE, | ||
535 | + SYSTEMD_RESOLVED_DBUS_PATH, | ||
536 | + SYSTEMD_RESOLVED_DBUS_SERVICE ".Manager", | ||
537 | + priv->init_cancellable, | ||
538 | + resolved_proxy_created, | ||
539 | + self); | ||
540 | +} | ||
541 | + | ||
542 | +static void | ||
543 | +dispose (GObject *object) | ||
544 | +{ | ||
545 | + NMDnsSystemdResolved *self = NM_DNS_SYSTEMD_RESOLVED (object); | ||
546 | + NMDnsSystemdResolvedPrivate *priv = NM_DNS_SYSTEMD_RESOLVED_GET_PRIVATE (self); | ||
547 | + | ||
548 | + free_pending_updates (self); | ||
549 | + g_clear_object (&priv->resolve); | ||
550 | + nm_clear_g_cancellable (&priv->init_cancellable); | ||
551 | + nm_clear_g_cancellable (&priv->update_cancellable); | ||
552 | + | ||
553 | + G_OBJECT_CLASS (nm_dns_systemd_resolved_parent_class)->dispose (object); | ||
554 | +} | ||
555 | + | ||
556 | +static void | ||
557 | +nm_dns_systemd_resolved_class_init (NMDnsSystemdResolvedClass *dns_class) | ||
558 | +{ | ||
559 | + NMDnsPluginClass *plugin_class = NM_DNS_PLUGIN_CLASS (dns_class); | ||
560 | + GObjectClass *object_class = G_OBJECT_CLASS (dns_class); | ||
561 | + | ||
562 | + g_type_class_add_private (dns_class, sizeof (NMDnsSystemdResolvedPrivate)); | ||
563 | + | ||
564 | + object_class->dispose = dispose; | ||
565 | + | ||
566 | + plugin_class->is_caching = is_caching; | ||
567 | + plugin_class->update = update; | ||
568 | + plugin_class->get_name = get_name; | ||
569 | +} | ||
570 | + | ||
571 | diff --git a/src/dns-manager/nm-dns-systemd-resolved.h b/src/dns-manager/nm-dns-systemd-resolved.h | ||
572 | new file mode 100644 | ||
573 | index 0000000..45c64b3 | ||
574 | --- /dev/null | ||
575 | +++ b/src/dns-manager/nm-dns-systemd-resolved.h | ||
576 | @@ -0,0 +1,45 @@ | ||
577 | +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ | ||
578 | +/* This program is free software; you can redistribute it and/or modify | ||
579 | + * it under the terms of the GNU General Public License as published by | ||
580 | + * the Free Software Foundation; either version 2, or (at your option) | ||
581 | + * any later version. | ||
582 | + * | ||
583 | + * This program is distributed in the hope that it will be useful, | ||
584 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
585 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
586 | + * GNU General Public License for more details. | ||
587 | + * | ||
588 | + * You should have received a copy of the GNU General Public License along | ||
589 | + * with this program; if not, write to the Free Software Foundation, Inc., | ||
590 | + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
591 | + * | ||
592 | + * Copyright (C) 2010 Red Hat, Inc. | ||
593 | + * Copyright (C) 2016 Sjoerd Simons <sjoerd@luon.net> | ||
594 | + */ | ||
595 | + | ||
596 | +#ifndef __NETWORKMANAGER_DNS_SYSTEMD_RESOLVED_H__ | ||
597 | +#define __NETWORKMANAGER_DNS_SYSTEMD_RESOLVED_H__ | ||
598 | + | ||
599 | +#include "nm-dns-plugin.h" | ||
600 | + | ||
601 | +#define NM_TYPE_DNS_SYSTEMD_RESOLVED (nm_dns_systemd_resolved_get_type ()) | ||
602 | +#define NM_DNS_SYSTEMD_RESOLVED(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DNS_SYSTEMD_RESOLVED, NMDnsSystemdResolved)) | ||
603 | +#define NM_DNS_SYSTEMD_RESOLVED_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_DNS_SYSTEMD_RESOLVED, NMDnsSystemdResolvedClass)) | ||
604 | +#define NM_IS_DNS_SYSTEMD_RESOLVED(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_DNS_SYSTEMD_RESOLVED)) | ||
605 | +#define NM_IS_DNS_SYSTEMD_RESOLVED_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_DNS_SYSTEMD_RESOLVED)) | ||
606 | +#define NM_DNS_SYSTEMD_RESOLVED_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DNS_SYSTEMD_RESOLVED, NMDnsSystemdResolvedClass)) | ||
607 | + | ||
608 | +typedef struct { | ||
609 | + NMDnsPlugin parent; | ||
610 | +} NMDnsSystemdResolved; | ||
611 | + | ||
612 | +typedef struct { | ||
613 | + NMDnsPluginClass parent; | ||
614 | +} NMDnsSystemdResolvedClass; | ||
615 | + | ||
616 | +GType nm_dns_systemd_resolved_get_type (void); | ||
617 | + | ||
618 | +NMDnsPlugin *nm_dns_systemd_resolved_new (void); | ||
619 | + | ||
620 | +#endif /* __NETWORKMANAGER_DNS_SYSTEMD_RESOLVED_H__ */ | ||
621 | + | ||
diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-dns-resolved-also-check-for-etc-resolv-conf.systemd.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-dns-resolved-also-check-for-etc-resolv-conf.systemd.patch deleted file mode 100644 index ca7e4a496..000000000 --- a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-dns-resolved-also-check-for-etc-resolv-conf.systemd.patch +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | From 6f799f1f0e68cc7bf89c0a56aec5ecf46937619d Mon Sep 17 00:00:00 2001 | ||
2 | From: Ricardo Salveti <rsalveti@rsalveti.net> | ||
3 | Date: Thu, 15 Jun 2017 10:02:38 -0300 | ||
4 | Subject: [PATCH] dns/resolved: also check for /etc/resolv-conf.systemd | ||
5 | |||
6 | OE specific resolv.conf path, so it can be enabled by default if available. | ||
7 | |||
8 | Upstream-Status: Inappropriate [OE config specific] | ||
9 | |||
10 | Signed-off-by: Ricardo Salveti <rsalveti@rsalveti.net> | ||
11 | --- | ||
12 | src/dns-manager/nm-dns-manager.c | 1 + | ||
13 | 1 file changed, 1 insertion(+) | ||
14 | |||
15 | diff --git a/src/dns-manager/nm-dns-manager.c b/src/dns-manager/nm-dns-manager.c | ||
16 | index c1d2bf7..d70d4b4 100644 | ||
17 | --- a/src/dns-manager/nm-dns-manager.c | ||
18 | +++ b/src/dns-manager/nm-dns-manager.c | ||
19 | @@ -1596,6 +1596,7 @@ _resolvconf_resolved_managed (void) | ||
20 | "/run/systemd/resolve/resolv.conf", | ||
21 | "/lib/systemd/resolv.conf", | ||
22 | "/usr/lib/systemd/resolv.conf", | ||
23 | + "/etc/resolv-conf.systemd", | ||
24 | }; | ||
25 | GFile *f; | ||
26 | GFileInfo *info; | ||
27 | -- | ||
28 | 2.7.4 | ||
29 | |||
diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-don-t-try-to-run-sbin-dhclient-to-get-the-version-nu.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-don-t-try-to-run-sbin-dhclient-to-get-the-version-nu.patch deleted file mode 100644 index 5c9ed92b8..000000000 --- a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-don-t-try-to-run-sbin-dhclient-to-get-the-version-nu.patch +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | From 7dd40db6606c3b3559365a03944cb99aee5ceabc Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com> | ||
3 | Date: Thu, 4 Apr 2013 12:57:58 +0200 | ||
4 | Subject: [PATCH] don't try to run /sbin/dhclient to get the version number, | ||
5 | this break cross-compiling | ||
6 | MIME-Version: 1.0 | ||
7 | Content-Type: text/plain; charset=UTF-8 | ||
8 | Content-Transfer-Encoding: 8bit | ||
9 | |||
10 | Upstream-Status: Inappropriate [build system specific] | ||
11 | |||
12 | Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com> | ||
13 | --- | ||
14 | configure.ac | 6 ------ | ||
15 | 1 files changed, 0 insertions(+), 6 deletions(-) | ||
16 | |||
17 | diff --git a/configure.ac b/configure.ac | ||
18 | index cc66e9b..7163287 100644 | ||
19 | --- a/configure.ac | ||
20 | +++ b/configure.ac | ||
21 | @@ -488,12 +488,6 @@ AS_IF([test -z "$with_dhcpcd"], with_dhcpcd=yes) | ||
22 | # Search and check the executables | ||
23 | if test "$with_dhclient" = "yes"; then | ||
24 | AC_PATH_PROGS(with_dhclient, dhclient, no, /sbin:/usr/sbin:/usr/local/sbin) | ||
25 | - if test "$with_dhclient" != "no"; then | ||
26 | - if ! $with_dhclient --version 2>&1 | grep -q "^isc-dhclient-4\."; then | ||
27 | - AC_MSG_WARN([Cannot use dhclient, version 4.x is required]) | ||
28 | - with_dhclient=no | ||
29 | - fi | ||
30 | - fi | ||
31 | fi | ||
32 | if test "$with_dhcpcd" = "yes"; then | ||
33 | AC_PATH_PROGS(with_dhcpcd, dhcpcd, no, /sbin:/usr/sbin:/usr/local/sbin) | ||
34 | -- | ||
35 | 1.7.6.5 | ||
36 | |||
diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-systemd-xlocale.h-is-dropped-by-newer-glibc.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-systemd-xlocale.h-is-dropped-by-newer-glibc.patch deleted file mode 100644 index 4234e2be2..000000000 --- a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-systemd-xlocale.h-is-dropped-by-newer-glibc.patch +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | From a9bfe6f2029d75caf28fcdf3e740843cf6359615 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Tue, 27 Jun 2017 07:31:25 -0700 | ||
4 | Subject: [PATCH 1/2] systemd: xlocale.h is dropped by newer glibc | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | --- | ||
8 | src/systemd/src/basic/parse-util.c | 4 ---- | ||
9 | 1 file changed, 4 deletions(-) | ||
10 | |||
11 | diff --git a/src/systemd/src/basic/parse-util.c b/src/systemd/src/basic/parse-util.c | ||
12 | index 9c21e5a..dd95d1f 100644 | ||
13 | --- a/src/systemd/src/basic/parse-util.c | ||
14 | +++ b/src/systemd/src/basic/parse-util.c | ||
15 | @@ -25,11 +25,7 @@ | ||
16 | #include <stdio.h> | ||
17 | #include <stdlib.h> | ||
18 | #include <string.h> | ||
19 | -#ifdef __GLIBC__ | ||
20 | -#include <xlocale.h> | ||
21 | -#else | ||
22 | #include <locale.h> | ||
23 | -#endif | ||
24 | #include "alloc-util.h" | ||
25 | #include "extract-word.h" | ||
26 | #include "macro.h" | ||
27 | -- | ||
28 | 2.13.2 | ||
29 | |||
diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-Fix-nm-version-macro-includes.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-Fix-nm-version-macro-includes.patch deleted file mode 100644 index aa57c832c..000000000 --- a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-Fix-nm-version-macro-includes.patch +++ /dev/null | |||
@@ -1,58 +0,0 @@ | |||
1 | From 7274bbadd398a69b8babf47431f80d35e0228c42 Mon Sep 17 00:00:00 2001 | ||
2 | From: Adrian Freihofer <adrian.freihofer@gmail.com> | ||
3 | Date: Mon, 18 Jan 2016 08:53:26 +0100 | ||
4 | Subject: [PATCH] Fix nm-version-macro includes | ||
5 | |||
6 | nm-version-macros.h cannot be found since include directive has | ||
7 | been changed from " to <. This breaks for example gnome-panel | ||
8 | build: | ||
9 | /usr/include/NetworkManager/NetworkManager.h:31:31: | ||
10 | fatal error: nm-version-macros.h: No such file or directory. | ||
11 | --- | ||
12 | libnm-core/nm-version.h | 2 +- | ||
13 | libnm-util/NetworkManager.h | 2 +- | ||
14 | libnm-util/nm-version.h | 2 +- | ||
15 | 3 files changed, 3 insertions(+), 3 deletions(-) | ||
16 | |||
17 | diff --git a/libnm-core/nm-version.h b/libnm-core/nm-version.h | ||
18 | index 730330a..d751bc1 100644 | ||
19 | --- a/libnm-core/nm-version.h | ||
20 | +++ b/libnm-core/nm-version.h | ||
21 | @@ -23,7 +23,7 @@ | ||
22 | |||
23 | #include <glib.h> | ||
24 | |||
25 | -#include <nm-version-macros.h> | ||
26 | +#include "nm-version-macros.h" | ||
27 | |||
28 | /* Deprecation / Availability macros */ | ||
29 | |||
30 | diff --git a/libnm-util/NetworkManager.h b/libnm-util/NetworkManager.h | ||
31 | index d83e4ab..3a964fc 100644 | ||
32 | --- a/libnm-util/NetworkManager.h | ||
33 | +++ b/libnm-util/NetworkManager.h | ||
34 | @@ -28,7 +28,7 @@ | ||
35 | |||
36 | /* This header must not include glib or libnm. */ | ||
37 | |||
38 | -#include <nm-version-macros.h> | ||
39 | +#include "nm-version-macros.h" | ||
40 | |||
41 | /* | ||
42 | * dbus services details | ||
43 | diff --git a/libnm-util/nm-version.h b/libnm-util/nm-version.h | ||
44 | index 63895dd..41101a4 100644 | ||
45 | --- a/libnm-util/nm-version.h | ||
46 | +++ b/libnm-util/nm-version.h | ||
47 | @@ -23,7 +23,7 @@ | ||
48 | |||
49 | #include <glib.h> | ||
50 | |||
51 | -#include <nm-version-macros.h> | ||
52 | +#include "nm-version-macros.h" | ||
53 | |||
54 | /* Deprecation / Availability macros */ | ||
55 | |||
56 | -- | ||
57 | 2.5.0 | ||
58 | |||
diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-socket-util.h-Include-linux-sockios.h-on-musl.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-socket-util.h-Include-linux-sockios.h-on-musl.patch index 22bc6e8bd..cdcd397d7 100644 --- a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-socket-util.h-Include-linux-sockios.h-on-musl.patch +++ b/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-socket-util.h-Include-linux-sockios.h-on-musl.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From 98d7e3ae5b15e30af1bf5dd1d279e1a774bf2b86 Mon Sep 17 00:00:00 2001 | 1 | From 7f0e0613abe8aa1861946e2cc25397690da7128b Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Fri, 31 Mar 2017 16:05:05 -0700 | 3 | Date: Fri, 31 Mar 2017 16:05:05 -0700 |
4 | Subject: [PATCH 2/5] socket-util.h: Include linux/sockios.h on musl | 4 | Subject: [PATCH 2/7] socket-util.h: Include linux/sockios.h on musl |
5 | 5 | ||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
7 | --- | 7 | --- |
@@ -9,11 +9,11 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
9 | 1 file changed, 6 insertions(+) | 9 | 1 file changed, 6 insertions(+) |
10 | 10 | ||
11 | diff --git a/src/systemd/src/basic/socket-util.h b/src/systemd/src/basic/socket-util.h | 11 | diff --git a/src/systemd/src/basic/socket-util.h b/src/systemd/src/basic/socket-util.h |
12 | index 2536b08..76d6107 100644 | 12 | index d7e2d85..2e7f7b6 100644 |
13 | --- a/src/systemd/src/basic/socket-util.h | 13 | --- a/src/systemd/src/basic/socket-util.h |
14 | +++ b/src/systemd/src/basic/socket-util.h | 14 | +++ b/src/systemd/src/basic/socket-util.h |
15 | @@ -29,6 +29,12 @@ | 15 | @@ -30,6 +30,12 @@ |
16 | #include <linux/netlink.h> | 16 | #include <linux/if_infiniband.h> |
17 | #include <linux/if_packet.h> | 17 | #include <linux/if_packet.h> |
18 | 18 | ||
19 | +#if !defined(__GLIBC__) | 19 | +#if !defined(__GLIBC__) |
@@ -23,8 +23,8 @@ index 2536b08..76d6107 100644 | |||
23 | +#endif | 23 | +#endif |
24 | + | 24 | + |
25 | #include "macro.h" | 25 | #include "macro.h" |
26 | #include "missing.h" | ||
26 | #include "util.h" | 27 | #include "util.h" |
27 | |||
28 | -- | 28 | -- |
29 | 2.12.1 | 29 | 2.14.1 |
30 | 30 | ||
diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-user-format-string-in-g_dbus_message_new_method_erro.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-user-format-string-in-g_dbus_message_new_method_erro.patch deleted file mode 100644 index e32b5c00d..000000000 --- a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-user-format-string-in-g_dbus_message_new_method_erro.patch +++ /dev/null | |||
@@ -1,67 +0,0 @@ | |||
1 | From adc0668b854289a11cfc29597b5566ba1869d17e Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Tue, 27 Jun 2017 07:32:09 -0700 | ||
4 | Subject: [PATCH 2/2] user format string in g_dbus_message_new_method_error () | ||
5 | |||
6 | This fixes format errors with -Werror=format-security | ||
7 | |||
8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
9 | --- | ||
10 | src/nm-manager.c | 6 ++++++ | ||
11 | 1 file changed, 6 insertions(+) | ||
12 | |||
13 | diff --git a/src/nm-manager.c b/src/nm-manager.c | ||
14 | index c3d65cd..e814912 100644 | ||
15 | --- a/src/nm-manager.c | ||
16 | +++ b/src/nm-manager.c | ||
17 | @@ -4871,6 +4871,7 @@ prop_set_auth_done_cb (NMAuthChain *chain, | ||
18 | if (error || (result != NM_AUTH_CALL_RESULT_YES)) { | ||
19 | reply = g_dbus_message_new_method_error (pfd->message, | ||
20 | NM_PERM_DENIED_ERROR, | ||
21 | + "%s", | ||
22 | (error_message = "Not authorized to perform this operation")); | ||
23 | if (error) | ||
24 | error_message = error->message; | ||
25 | @@ -4882,6 +4883,7 @@ prop_set_auth_done_cb (NMAuthChain *chain, | ||
26 | if (!object) { | ||
27 | reply = g_dbus_message_new_method_error (pfd->message, | ||
28 | "org.freedesktop.DBus.Error.UnknownObject", | ||
29 | + "%s", | ||
30 | (error_message = "Object doesn't exist.")); | ||
31 | goto done; | ||
32 | } | ||
33 | @@ -4890,6 +4892,7 @@ prop_set_auth_done_cb (NMAuthChain *chain, | ||
34 | if (!nm_exported_object_get_interface_by_type (object, pfd->interface_type)) { | ||
35 | reply = g_dbus_message_new_method_error (pfd->message, | ||
36 | "org.freedesktop.DBus.Error.InvalidArgs", | ||
37 | + "%s", | ||
38 | (error_message = "Object is of unexpected type.")); | ||
39 | goto done; | ||
40 | } | ||
41 | @@ -4905,6 +4908,7 @@ prop_set_auth_done_cb (NMAuthChain *chain, | ||
42 | if (global_dns && !nm_global_dns_config_is_internal (global_dns)) { | ||
43 | reply = g_dbus_message_new_method_error (pfd->message, | ||
44 | NM_PERM_DENIED_ERROR, | ||
45 | + "%s", | ||
46 | (error_message = "Global DNS configuration already set via configuration file")); | ||
47 | goto done; | ||
48 | } | ||
49 | @@ -4949,6 +4953,7 @@ do_set_property_check (gpointer user_data) | ||
50 | if (!pfd->subject) { | ||
51 | reply = g_dbus_message_new_method_error (pfd->message, | ||
52 | NM_PERM_DENIED_ERROR, | ||
53 | + "%s", | ||
54 | (error_message = "Could not determine request UID.")); | ||
55 | goto out; | ||
56 | } | ||
57 | @@ -4958,6 +4963,7 @@ do_set_property_check (gpointer user_data) | ||
58 | if (!chain) { | ||
59 | reply = g_dbus_message_new_method_error (pfd->message, | ||
60 | NM_PERM_DENIED_ERROR, | ||
61 | + "%s", | ||
62 | (error_message = "Could not authenticate request.")); | ||
63 | goto out; | ||
64 | } | ||
65 | -- | ||
66 | 2.13.2 | ||
67 | |||
diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0003-Define-ETH_ALEN.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/0003-Define-ETH_ALEN.patch index 236914f75..549e46e0e 100644 --- a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0003-Define-ETH_ALEN.patch +++ b/meta-networking/recipes-connectivity/networkmanager/networkmanager/0003-Define-ETH_ALEN.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From 16c3dc7a407101243d2056d2c93e61dce1a05350 Mon Sep 17 00:00:00 2001 | 1 | From d0951fe7da63d8296a305781d7322ce4d3249415 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Fri, 31 Mar 2017 16:08:45 -0700 | 3 | Date: Fri, 31 Mar 2017 16:08:45 -0700 |
4 | Subject: [PATCH 3/5] Define ETH_ALEN | 4 | Subject: [PATCH 3/7] Define ETH_ALEN |
5 | 5 | ||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
7 | --- | 7 | --- |
@@ -10,7 +10,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
10 | 2 files changed, 3 insertions(+) | 10 | 2 files changed, 3 insertions(+) |
11 | 11 | ||
12 | diff --git a/libnm-core/nm-utils.h b/libnm-core/nm-utils.h | 12 | diff --git a/libnm-core/nm-utils.h b/libnm-core/nm-utils.h |
13 | index 156ccae..68e222b 100644 | 13 | index 02e24ea..5ff279c 100644 |
14 | --- a/libnm-core/nm-utils.h | 14 | --- a/libnm-core/nm-utils.h |
15 | +++ b/libnm-core/nm-utils.h | 15 | +++ b/libnm-core/nm-utils.h |
16 | @@ -29,6 +29,7 @@ | 16 | @@ -29,6 +29,7 @@ |
@@ -22,7 +22,7 @@ index 156ccae..68e222b 100644 | |||
22 | #include <netinet/in.h> | 22 | #include <netinet/in.h> |
23 | 23 | ||
24 | diff --git a/src/platform/wifi/wifi-utils.h b/src/platform/wifi/wifi-utils.h | 24 | diff --git a/src/platform/wifi/wifi-utils.h b/src/platform/wifi/wifi-utils.h |
25 | index 84f5ce9..33a838d 100644 | 25 | index 939080f..2274408 100644 |
26 | --- a/src/platform/wifi/wifi-utils.h | 26 | --- a/src/platform/wifi/wifi-utils.h |
27 | +++ b/src/platform/wifi/wifi-utils.h | 27 | +++ b/src/platform/wifi/wifi-utils.h |
28 | @@ -24,6 +24,8 @@ | 28 | @@ -24,6 +24,8 @@ |
@@ -35,5 +35,5 @@ index 84f5ce9..33a838d 100644 | |||
35 | 35 | ||
36 | typedef struct WifiData WifiData; | 36 | typedef struct WifiData WifiData; |
37 | -- | 37 | -- |
38 | 2.12.1 | 38 | 2.14.1 |
39 | 39 | ||
diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0004-Define-missing-features-to-cater-for-musl.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/0004-Define-missing-features-to-cater-for-musl.patch index 27c9ae962..b56f6a37d 100644 --- a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0004-Define-missing-features-to-cater-for-musl.patch +++ b/meta-networking/recipes-connectivity/networkmanager/networkmanager/0004-Define-missing-features-to-cater-for-musl.patch | |||
@@ -1,22 +1,22 @@ | |||
1 | From 2153109e60e362e0d09215d529bf00176f31a3e7 Mon Sep 17 00:00:00 2001 | 1 | From c9e0f112a90b6b1ade87a698608dca8d6fbe89cc Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Fri, 31 Mar 2017 16:09:41 -0700 | 3 | Date: Fri, 31 Mar 2017 16:09:41 -0700 |
4 | Subject: [PATCH 4/5] Define missing features to cater for musl | 4 | Subject: [PATCH 4/7] Define missing features to cater for musl |
5 | 5 | ||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
7 | --- | 7 | --- |
8 | src/systemd/sd-adapt/nm-sd-adapt.h | 2 +- | 8 | src/systemd/sd-adapt/nm-sd-adapt.h | 2 +- |
9 | src/systemd/src/basic/parse-util.c | 5 ++++- | 9 | src/systemd/src/basic/parse-util.c | 4 ++++ |
10 | src/systemd/src/basic/stdio-util.h | 2 ++ | 10 | src/systemd/src/basic/stdio-util.h | 2 ++ |
11 | src/systemd/src/basic/util.h | 5 +++++ | 11 | src/systemd/src/basic/util.h | 5 +++++ |
12 | src/systemd/src/systemd/sd-event.h | 4 ---- | 12 | src/systemd/src/systemd/sd-event.h | 4 ---- |
13 | 5 files changed, 12 insertions(+), 6 deletions(-) | 13 | 5 files changed, 12 insertions(+), 5 deletions(-) |
14 | 14 | ||
15 | diff --git a/src/systemd/sd-adapt/nm-sd-adapt.h b/src/systemd/sd-adapt/nm-sd-adapt.h | 15 | diff --git a/src/systemd/sd-adapt/nm-sd-adapt.h b/src/systemd/sd-adapt/nm-sd-adapt.h |
16 | index cf27c1a..72c1b89 100644 | 16 | index 0d291e2..d88dd9b 100644 |
17 | --- a/src/systemd/sd-adapt/nm-sd-adapt.h | 17 | --- a/src/systemd/sd-adapt/nm-sd-adapt.h |
18 | +++ b/src/systemd/sd-adapt/nm-sd-adapt.h | 18 | +++ b/src/systemd/sd-adapt/nm-sd-adapt.h |
19 | @@ -119,7 +119,7 @@ G_STMT_START { \ | 19 | @@ -134,7 +134,7 @@ G_STMT_START { \ |
20 | # ifdef HAVE___SECURE_GETENV | 20 | # ifdef HAVE___SECURE_GETENV |
21 | # define secure_getenv __secure_getenv | 21 | # define secure_getenv __secure_getenv |
22 | # else | 22 | # else |
@@ -26,22 +26,21 @@ index cf27c1a..72c1b89 100644 | |||
26 | #endif | 26 | #endif |
27 | 27 | ||
28 | diff --git a/src/systemd/src/basic/parse-util.c b/src/systemd/src/basic/parse-util.c | 28 | diff --git a/src/systemd/src/basic/parse-util.c b/src/systemd/src/basic/parse-util.c |
29 | index 2738663..9c21e5a 100644 | 29 | index 6d978e9..e74e84b 100644 |
30 | --- a/src/systemd/src/basic/parse-util.c | 30 | --- a/src/systemd/src/basic/parse-util.c |
31 | +++ b/src/systemd/src/basic/parse-util.c | 31 | +++ b/src/systemd/src/basic/parse-util.c |
32 | @@ -25,8 +25,11 @@ | 32 | @@ -21,7 +21,11 @@ |
33 | #include <stdio.h> | 33 | |
34 | #include <stdlib.h> | 34 | #include <errno.h> |
35 | #include <string.h> | 35 | #include <inttypes.h> |
36 | +#ifdef __GLIBC__ | 36 | +#ifdef __GLIBC__ |
37 | #include <xlocale.h> | 37 | +#include <xlocale.h> |
38 | - | ||
39 | +#else | 38 | +#else |
40 | +#include <locale.h> | 39 | #include <locale.h> |
41 | +#endif | 40 | +#endif |
42 | #include "alloc-util.h" | 41 | #include <stdio.h> |
43 | #include "extract-word.h" | 42 | #include <stdlib.h> |
44 | #include "macro.h" | 43 | #include <string.h> |
45 | diff --git a/src/systemd/src/basic/stdio-util.h b/src/systemd/src/basic/stdio-util.h | 44 | diff --git a/src/systemd/src/basic/stdio-util.h b/src/systemd/src/basic/stdio-util.h |
46 | index bd1144b..c92e935 100644 | 45 | index bd1144b..c92e935 100644 |
47 | --- a/src/systemd/src/basic/stdio-util.h | 46 | --- a/src/systemd/src/basic/stdio-util.h |
@@ -57,7 +56,7 @@ index bd1144b..c92e935 100644 | |||
57 | #include <stdio.h> | 56 | #include <stdio.h> |
58 | #include <sys/types.h> | 57 | #include <sys/types.h> |
59 | diff --git a/src/systemd/src/basic/util.h b/src/systemd/src/basic/util.h | 58 | diff --git a/src/systemd/src/basic/util.h b/src/systemd/src/basic/util.h |
60 | index bb2fc31..fe074a5 100644 | 59 | index b31dfd1..9b7032c 100644 |
61 | --- a/src/systemd/src/basic/util.h | 60 | --- a/src/systemd/src/basic/util.h |
62 | +++ b/src/systemd/src/basic/util.h | 61 | +++ b/src/systemd/src/basic/util.h |
63 | @@ -46,6 +46,11 @@ | 62 | @@ -46,6 +46,11 @@ |
@@ -73,14 +72,14 @@ index bb2fc31..fe074a5 100644 | |||
73 | #define PAGE_ALIGN(l) ALIGN_TO((l), page_size()) | 72 | #define PAGE_ALIGN(l) ALIGN_TO((l), page_size()) |
74 | 73 | ||
75 | diff --git a/src/systemd/src/systemd/sd-event.h b/src/systemd/src/systemd/sd-event.h | 74 | diff --git a/src/systemd/src/systemd/sd-event.h b/src/systemd/src/systemd/sd-event.h |
76 | index cc26b7d..c7e0004 100644 | 75 | index f8cb895..c7e0004 100644 |
77 | --- a/src/systemd/src/systemd/sd-event.h | 76 | --- a/src/systemd/src/systemd/sd-event.h |
78 | +++ b/src/systemd/src/systemd/sd-event.h | 77 | +++ b/src/systemd/src/systemd/sd-event.h |
79 | @@ -69,11 +69,7 @@ typedef int (*sd_event_handler_t)(sd_event_source *s, void *userdata); | 78 | @@ -69,11 +69,7 @@ typedef int (*sd_event_handler_t)(sd_event_source *s, void *userdata); |
80 | typedef int (*sd_event_io_handler_t)(sd_event_source *s, int fd, uint32_t revents, void *userdata); | 79 | typedef int (*sd_event_io_handler_t)(sd_event_source *s, int fd, uint32_t revents, void *userdata); |
81 | typedef int (*sd_event_time_handler_t)(sd_event_source *s, uint64_t usec, void *userdata); | 80 | typedef int (*sd_event_time_handler_t)(sd_event_source *s, uint64_t usec, void *userdata); |
82 | typedef int (*sd_event_signal_handler_t)(sd_event_source *s, const struct signalfd_siginfo *si, void *userdata); | 81 | typedef int (*sd_event_signal_handler_t)(sd_event_source *s, const struct signalfd_siginfo *si, void *userdata); |
83 | -#if defined __USE_POSIX199309 || defined __USE_XOPEN_EXTENDED | 82 | -#if defined _GNU_SOURCE || _POSIX_C_SOURCE >= 199309L |
84 | typedef int (*sd_event_child_handler_t)(sd_event_source *s, const siginfo_t *si, void *userdata); | 83 | typedef int (*sd_event_child_handler_t)(sd_event_source *s, const siginfo_t *si, void *userdata); |
85 | -#else | 84 | -#else |
86 | -typedef void* sd_event_child_handler_t; | 85 | -typedef void* sd_event_child_handler_t; |
@@ -89,5 +88,5 @@ index cc26b7d..c7e0004 100644 | |||
89 | int sd_event_default(sd_event **e); | 88 | int sd_event_default(sd_event **e); |
90 | 89 | ||
91 | -- | 90 | -- |
92 | 2.12.1 | 91 | 2.14.1 |
93 | 92 | ||
diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0005-sd-lldp.h-Remove-net-ethernet.h-seems-to-be-over-spe.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/0005-sd-lldp.h-Remove-net-ethernet.h-seems-to-be-over-spe.patch index f4a04c782..719442319 100644 --- a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0005-sd-lldp.h-Remove-net-ethernet.h-seems-to-be-over-spe.patch +++ b/meta-networking/recipes-connectivity/networkmanager/networkmanager/0005-sd-lldp.h-Remove-net-ethernet.h-seems-to-be-over-spe.patch | |||
@@ -1,18 +1,31 @@ | |||
1 | From 9e9e5814456ec23b9fc669d342bf9d8f7ee49fc2 Mon Sep 17 00:00:00 2001 | 1 | From 18f71c1b48730b8602826517f2b5b088283ae948 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Fri, 31 Mar 2017 16:48:00 -0700 | 3 | Date: Fri, 31 Mar 2017 16:48:00 -0700 |
4 | Subject: [PATCH 5/5] sd-lldp.h: Remove net/ethernet.h seems to be over | 4 | Subject: [PATCH 5/7] sd-lldp.h: Remove net/ethernet.h seems to be over |
5 | specified | 5 | specified |
6 | 6 | ||
7 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 7 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
8 | --- | 8 | --- |
9 | src/systemd/src/systemd/sd-lldp.h | 2 +- | 9 | src/systemd/src/libsystemd-network/sd-lldp.c | 1 + |
10 | 1 file changed, 1 insertion(+), 1 deletion(-) | 10 | src/systemd/src/systemd/sd-lldp.h | 2 +- |
11 | 2 files changed, 2 insertions(+), 1 deletion(-) | ||
11 | 12 | ||
12 | Index: NetworkManager-1.4.2/src/systemd/src/systemd/sd-lldp.h | 13 | diff --git a/src/systemd/src/libsystemd-network/sd-lldp.c b/src/systemd/src/libsystemd-network/sd-lldp.c |
13 | =================================================================== | 14 | index 31e2448..7721cc2 100644 |
14 | --- NetworkManager-1.4.2.orig/src/systemd/src/systemd/sd-lldp.h | 15 | --- a/src/systemd/src/libsystemd-network/sd-lldp.c |
15 | +++ NetworkManager-1.4.2/src/systemd/src/systemd/sd-lldp.h | 16 | +++ b/src/systemd/src/libsystemd-network/sd-lldp.c |
17 | @@ -21,6 +21,7 @@ | ||
18 | #include "nm-sd-adapt.h" | ||
19 | |||
20 | #include <arpa/inet.h> | ||
21 | +#include <net/ethernet.h> | ||
22 | #include <linux/sockios.h> | ||
23 | |||
24 | #include "sd-lldp.h" | ||
25 | diff --git a/src/systemd/src/systemd/sd-lldp.h b/src/systemd/src/systemd/sd-lldp.h | ||
26 | index 3f35eeb..61b0e45 100644 | ||
27 | --- a/src/systemd/src/systemd/sd-lldp.h | ||
28 | +++ b/src/systemd/src/systemd/sd-lldp.h | ||
16 | @@ -22,7 +22,7 @@ | 29 | @@ -22,7 +22,7 @@ |
17 | ***/ | 30 | ***/ |
18 | 31 | ||
@@ -22,15 +35,6 @@ Index: NetworkManager-1.4.2/src/systemd/src/systemd/sd-lldp.h | |||
22 | #include <sys/types.h> | 35 | #include <sys/types.h> |
23 | 36 | ||
24 | #include "sd-event.h" | 37 | #include "sd-event.h" |
25 | Index: NetworkManager-1.4.2/src/systemd/src/libsystemd-network/sd-lldp.c | 38 | -- |
26 | =================================================================== | 39 | 2.14.1 |
27 | --- NetworkManager-1.4.2.orig/src/systemd/src/libsystemd-network/sd-lldp.c | 40 | |
28 | +++ NetworkManager-1.4.2/src/systemd/src/libsystemd-network/sd-lldp.c | ||
29 | @@ -21,6 +21,7 @@ | ||
30 | #include "nm-sd-adapt.h" | ||
31 | |||
32 | #include <arpa/inet.h> | ||
33 | +#include <net/ethernet.h> | ||
34 | |||
35 | #include "sd-lldp.h" | ||
36 | |||
diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-check-for-strndupa-before-using-it.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/0006-check-for-strndupa-before-using-it.patch index 26f380bf9..6adb84baa 100644 --- a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-check-for-strndupa-before-using-it.patch +++ b/meta-networking/recipes-connectivity/networkmanager/networkmanager/0006-check-for-strndupa-before-using-it.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From 05e8bd664d0244cb8ab4376b962830b97860f6bf Mon Sep 17 00:00:00 2001 | 1 | From f24d958fc85f9a43ac13abc85f74c4ae233dc8a4 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Fri, 31 Mar 2017 18:37:19 -0700 | 3 | Date: Fri, 31 Mar 2017 18:37:19 -0700 |
4 | Subject: [PATCH] check for strndupa before using it | 4 | Subject: [PATCH 6/7] check for strndupa before using it |
5 | 5 | ||
6 | musl does not have strndupa | 6 | musl does not have strndupa |
7 | 7 | ||
@@ -13,10 +13,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
13 | 3 files changed, 17 insertions(+) | 13 | 3 files changed, 17 insertions(+) |
14 | 14 | ||
15 | diff --git a/config.h.in b/config.h.in | 15 | diff --git a/config.h.in b/config.h.in |
16 | index db8c135..c4229ed 100644 | 16 | index edec211..0799030 100644 |
17 | --- a/config.h.in | 17 | --- a/config.h.in |
18 | +++ b/config.h.in | 18 | +++ b/config.h.in |
19 | @@ -41,6 +41,10 @@ | 19 | @@ -34,6 +34,10 @@ |
20 | */ | 20 | */ |
21 | #undef HAVE_DCGETTEXT | 21 | #undef HAVE_DCGETTEXT |
22 | 22 | ||
@@ -24,14 +24,14 @@ index db8c135..c4229ed 100644 | |||
24 | + don't. */ | 24 | + don't. */ |
25 | +#undef HAVE_DECL_STRNDUPA | 25 | +#undef HAVE_DECL_STRNDUPA |
26 | + | 26 | + |
27 | /* Define to 1 if you have the <dlfcn.h> header file. */ | 27 | /* Define to 1 if you have the declaration of `explicit_bzero', and to 0 if |
28 | #undef HAVE_DLFCN_H | 28 | you don't. */ |
29 | 29 | #undef HAVE_DECL_EXPLICIT_BZERO | |
30 | diff --git a/configure.ac b/configure.ac | 30 | diff --git a/configure.ac b/configure.ac |
31 | index 2630f8d..d0a57fd 100644 | 31 | index 8a066ad..51e5eb6 100644 |
32 | --- a/configure.ac | 32 | --- a/configure.ac |
33 | +++ b/configure.ac | 33 | +++ b/configure.ac |
34 | @@ -54,6 +54,7 @@ AC_SUBST(NM_VERSION) | 34 | @@ -56,6 +56,7 @@ AC_SUBST(NM_VERSION) |
35 | 35 | ||
36 | GIT_SHA_RECORD(NM_GIT_SHA) | 36 | GIT_SHA_RECORD(NM_GIT_SHA) |
37 | 37 | ||
@@ -40,7 +40,7 @@ index 2630f8d..d0a57fd 100644 | |||
40 | dnl Checks for typedefs, structures, and compiler characteristics. | 40 | dnl Checks for typedefs, structures, and compiler characteristics. |
41 | dnl | 41 | dnl |
42 | diff --git a/src/systemd/src/basic/alloc-util.h b/src/systemd/src/basic/alloc-util.h | 42 | diff --git a/src/systemd/src/basic/alloc-util.h b/src/systemd/src/basic/alloc-util.h |
43 | index ceeee51..924b59c 100644 | 43 | index 0a89691..1e95260 100644 |
44 | --- a/src/systemd/src/basic/alloc-util.h | 44 | --- a/src/systemd/src/basic/alloc-util.h |
45 | +++ b/src/systemd/src/basic/alloc-util.h | 45 | +++ b/src/systemd/src/basic/alloc-util.h |
46 | @@ -25,6 +25,18 @@ | 46 | @@ -25,6 +25,18 @@ |
@@ -63,5 +63,5 @@ index ceeee51..924b59c 100644 | |||
63 | #define new(t, n) ((t*) malloc_multiply(sizeof(t), (n))) | 63 | #define new(t, n) ((t*) malloc_multiply(sizeof(t), (n))) |
64 | 64 | ||
65 | -- | 65 | -- |
66 | 2.12.1 | 66 | 2.14.1 |
67 | 67 | ||
diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0007-Fixed-configure.ac-Fix-pkgconfig-sysroot-locations.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/0007-Fixed-configure.ac-Fix-pkgconfig-sysroot-locations.patch new file mode 100644 index 000000000..28848d354 --- /dev/null +++ b/meta-networking/recipes-connectivity/networkmanager/networkmanager/0007-Fixed-configure.ac-Fix-pkgconfig-sysroot-locations.patch | |||
@@ -0,0 +1,25 @@ | |||
1 | From 583f0448fb7e9aba2b410c06eec6f420b41a6a0c Mon Sep 17 00:00:00 2001 | ||
2 | From: Pablo Saavedra <psaavedra@igalia.com> | ||
3 | Date: Tue, 13 Mar 2018 17:36:20 +0100 | ||
4 | Subject: [PATCH 7/7] Fixed configure.ac: Fix pkgconfig sysroot locations | ||
5 | |||
6 | --- | ||
7 | configure.ac | 2 +- | ||
8 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
9 | |||
10 | diff --git a/configure.ac b/configure.ac | ||
11 | index 51e5eb6..c9d3e56 100644 | ||
12 | --- a/configure.ac | ||
13 | +++ b/configure.ac | ||
14 | @@ -669,7 +669,7 @@ else | ||
15 | AC_DEFINE(WITH_JANSSON, 1, [Define if JANSSON is enabled]) | ||
16 | |||
17 | AC_CHECK_TOOLS(READELF, [eu-readelf readelf]) | ||
18 | - JANSSON_LIBDIR=`$PKG_CONFIG --variable=libdir jansson` | ||
19 | + JANSSON_LIBDIR=${PKG_CONFIG_SYSROOT_DIR}`$PKG_CONFIG --variable=libdir jansson` | ||
20 | JANSSON_SONAME=`$READELF -d $JANSSON_LIBDIR/libjansson.so |sed -n 's/.*SONAME.*\[[\([^]]*\)]]/\1/p'` | ||
21 | |||
22 | if test "$JANSSON_SONAME" = ""; then | ||
23 | -- | ||
24 | 2.14.1 | ||
25 | |||
diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.4.4.bb b/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.10.6.bb index d5f456f37..6538e7b82 100644 --- a/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.4.4.bb +++ b/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.10.6.bb | |||
@@ -5,7 +5,7 @@ SECTION = "net/misc" | |||
5 | LICENSE = "GPLv2+" | 5 | LICENSE = "GPLv2+" |
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=cbbffd568227ada506640fe950a4823b \ | 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=cbbffd568227ada506640fe950a4823b \ |
7 | file://libnm-util/COPYING;md5=1c4fa765d6eb3cd2fbd84344a1b816cd \ | 7 | file://libnm-util/COPYING;md5=1c4fa765d6eb3cd2fbd84344a1b816cd \ |
8 | file://docs/api/html/license.html;md5=8eb8e72bab097b9d11763002cb003697 \ | 8 | file://docs/api/html/license.html;md5=77b9e362690c149da196aefe7712db30 \ |
9 | " | 9 | " |
10 | 10 | ||
11 | DEPENDS = " \ | 11 | DEPENDS = " \ |
@@ -20,6 +20,7 @@ DEPENDS = " \ | |||
20 | libnewt \ | 20 | libnewt \ |
21 | polkit \ | 21 | polkit \ |
22 | jansson \ | 22 | jansson \ |
23 | curl \ | ||
23 | " | 24 | " |
24 | 25 | ||
25 | inherit gnomebase gettext systemd bluetooth bash-completion vala gobject-introspection | 26 | inherit gnomebase gettext systemd bluetooth bash-completion vala gobject-introspection |
@@ -27,21 +28,15 @@ inherit gnomebase gettext systemd bluetooth bash-completion vala gobject-introsp | |||
27 | GI_DATA_ENABLED_libc-musl = "False" | 28 | GI_DATA_ENABLED_libc-musl = "False" |
28 | 29 | ||
29 | SRC_URI = "${GNOME_MIRROR}/NetworkManager/${@gnome_verdir("${PV}")}/NetworkManager-${PV}.tar.xz \ | 30 | SRC_URI = "${GNOME_MIRROR}/NetworkManager/${@gnome_verdir("${PV}")}/NetworkManager-${PV}.tar.xz \ |
30 | file://0001-don-t-try-to-run-sbin-dhclient-to-get-the-version-nu.patch \ | ||
31 | file://0002-Fix-nm-version-macro-includes.patch \ | ||
32 | file://0001-adjust-net-headers-for-musl-compatibility.patch \ | 31 | file://0001-adjust-net-headers-for-musl-compatibility.patch \ |
33 | file://0002-socket-util.h-Include-linux-sockios.h-on-musl.patch \ | 32 | file://0002-socket-util.h-Include-linux-sockios.h-on-musl.patch \ |
34 | file://0003-Define-ETH_ALEN.patch \ | 33 | file://0003-Define-ETH_ALEN.patch \ |
35 | file://0004-Define-missing-features-to-cater-for-musl.patch \ | ||
36 | file://0005-sd-lldp.h-Remove-net-ethernet.h-seems-to-be-over-spe.patch \ | 34 | file://0005-sd-lldp.h-Remove-net-ethernet.h-seems-to-be-over-spe.patch \ |
37 | file://0001-check-for-strndupa-before-using-it.patch \ | 35 | file://0006-check-for-strndupa-before-using-it.patch \ |
38 | file://0001-dns-resolved-add-systemd-resolved-backend.patch \ | 36 | file://0007-Fixed-configure.ac-Fix-pkgconfig-sysroot-locations.patch \ |
39 | file://0001-dns-resolved-also-check-for-etc-resolv-conf.systemd.patch \ | ||
40 | file://0001-systemd-xlocale.h-is-dropped-by-newer-glibc.patch \ | ||
41 | file://0002-user-format-string-in-g_dbus_message_new_method_erro.patch \ | ||
42 | " | 37 | " |
43 | SRC_URI[md5sum] = "63f1e0d6d7e9099499d062c84c927a75" | 38 | SRC_URI[md5sum] = "de3c7147a693da6f80eb22f126086a14" |
44 | SRC_URI[sha256sum] = "829378f318cc008d138a23ca6a9191928ce75344e7e47a2f2c35f4ac82133309" | 39 | SRC_URI[sha256sum] = "6af0b1e856a3725f88791f55c4fbb04105dc0b20dbf182aaec8aad16481fac76" |
45 | 40 | ||
46 | S = "${WORKDIR}/NetworkManager-${PV}" | 41 | S = "${WORKDIR}/NetworkManager-${PV}" |
47 | 42 | ||
@@ -49,6 +44,7 @@ EXTRA_OECONF = " \ | |||
49 | --disable-ifcfg-rh \ | 44 | --disable-ifcfg-rh \ |
50 | --disable-ifnet \ | 45 | --disable-ifnet \ |
51 | --disable-ifcfg-suse \ | 46 | --disable-ifcfg-suse \ |
47 | --disable-introspection \ | ||
52 | --disable-more-warnings \ | 48 | --disable-more-warnings \ |
53 | --with-iptables=${sbindir}/iptables \ | 49 | --with-iptables=${sbindir}/iptables \ |
54 | --with-tests \ | 50 | --with-tests \ |
@@ -73,7 +69,6 @@ PACKAGECONFIG[systemd] = " \ | |||
73 | PACKAGECONFIG[bluez5] = "--enable-bluez5-dun,--disable-bluez5-dun,bluez5" | 69 | PACKAGECONFIG[bluez5] = "--enable-bluez5-dun,--disable-bluez5-dun,bluez5" |
74 | # consolekit is not picked by shlibs, so add it to RDEPENDS too | 70 | # consolekit is not picked by shlibs, so add it to RDEPENDS too |
75 | PACKAGECONFIG[consolekit] = "--with-session-tracking=consolekit,,consolekit,consolekit" | 71 | PACKAGECONFIG[consolekit] = "--with-session-tracking=consolekit,,consolekit,consolekit" |
76 | PACKAGECONFIG[concheck] = "--with-libsoup=yes,--with-libsoup=no,libsoup-2.4" | ||
77 | PACKAGECONFIG[modemmanager] = "--with-modem-manager-1=yes,--with-modem-manager-1=no,modemmanager" | 72 | PACKAGECONFIG[modemmanager] = "--with-modem-manager-1=yes,--with-modem-manager-1=no,modemmanager" |
78 | PACKAGECONFIG[ppp] = "--enable-ppp,--disable-ppp,ppp,ppp" | 73 | PACKAGECONFIG[ppp] = "--enable-ppp,--disable-ppp,ppp,ppp" |
79 | # Use full featured dhcp client instead of internal one | 74 | # Use full featured dhcp client instead of internal one |
@@ -101,6 +96,8 @@ FILES_${PN} += " \ | |||
101 | ${libexecdir} \ | 96 | ${libexecdir} \ |
102 | ${libdir}/pppd/*/nm-pppd-plugin.so \ | 97 | ${libdir}/pppd/*/nm-pppd-plugin.so \ |
103 | ${libdir}/NetworkManager/*.so \ | 98 | ${libdir}/NetworkManager/*.so \ |
99 | ${libdir}/NetworkManager/VPN \ | ||
100 | ${libdir}/NetworkManager/conf.d \ | ||
104 | ${datadir}/polkit-1 \ | 101 | ${datadir}/polkit-1 \ |
105 | ${datadir}/dbus-1 \ | 102 | ${datadir}/dbus-1 \ |
106 | ${base_libdir}/udev/* \ | 103 | ${base_libdir}/udev/* \ |