Gentoo Archives: gentoo-commits

From: Jory Pratt <anarchy@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/musl:master commit in: net-misc/networkmanager/, net-misc/networkmanager/files/
Date: Thu, 28 Mar 2019 21:45:43
Message-Id: 1553809481.fa1cd38886c338a8c013185fd1d9f517a55df4a8.anarchy@gentoo
1 commit: fa1cd38886c338a8c013185fd1d9f517a55df4a8
2 Author: Jory Pratt <anarchy <AT> gentoo <DOT> org>
3 AuthorDate: Thu Mar 28 21:44:41 2019 +0000
4 Commit: Jory Pratt <anarchy <AT> gentoo <DOT> org>
5 CommitDate: Thu Mar 28 21:44:41 2019 +0000
6 URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=fa1cd388
7
8 net-misc/networkmanager: update to use networkmanager-1.16.0
9
10 net-misc/networkmanager/Manifest | 2 +-
11 .../files/fix-busted-configure.patch | 25 ++++++++
12 net-misc/networkmanager/files/musl-basic.patch | 74 ++++++++--------------
13 .../files/musl-dlopen-configure-ac.patch | 11 ----
14 .../networkmanager/files/musl-fix-includes.patch | 74 ++++++++++++++++++++++
15 .../files/musl-has-not-secure-gentenv.patch | 25 ++++++++
16 .../files/musl-network-support.patch | 54 +++++++++++-----
17 .../networkmanager/files/musl-process-util.patch | 54 ++++++++++++++++
18 net-misc/networkmanager/metadata.xml | 14 ++--
19 ...1.10.10.ebuild => networkmanager-1.16.0.ebuild} | 54 ++++++++++------
20 10 files changed, 285 insertions(+), 102 deletions(-)
21
22 diff --git a/net-misc/networkmanager/Manifest b/net-misc/networkmanager/Manifest
23 index d3cadc7..9f1ff8f 100644
24 --- a/net-misc/networkmanager/Manifest
25 +++ b/net-misc/networkmanager/Manifest
26 @@ -1 +1 @@
27 -DIST NetworkManager-1.10.10.tar.xz 4038552 BLAKE2B a0a3c2a74dd641d25267ec7932f0801e30720334cb905c86abfaeb9bc3c60a2c1e9372b738b1eb43c55a34edf952905d94e3513cef653ea62e470d56bc575b65 SHA512 e536598b19064e0ab7fe3e92362de9c380281ff53a1481438216c2247b2d5287244e735be41c56c53040a5861bf36bbb979e36578244fabd6448a50ea42c4645
28 +DIST NetworkManager-1.16.0.tar.xz 4793620 BLAKE2B 554559eefbfa489cf01067bd2c32e4b06fed076d38920b41f2d0005873ff913c0af2babcc3d9b463a4b636ca82e5c27ee20ab5768fcfb2c6b79e003d7fdc224d SHA512 e9d8365d8e59e5bc7c0bc13482139fb96b1d87183c8884e71e84eaf05fe121f2bcac519edd916bd242be4e9a9e2d2140a1065f529a9a02bda87b6d2bd4192584
29
30 diff --git a/net-misc/networkmanager/files/fix-busted-configure.patch b/net-misc/networkmanager/files/fix-busted-configure.patch
31 new file mode 100644
32 index 0000000..a447814
33 --- /dev/null
34 +++ b/net-misc/networkmanager/files/fix-busted-configure.patch
35 @@ -0,0 +1,25 @@
36 +From 9ce527c9e179ecd3c01c684ca4c6747349a7ec99 Mon Sep 17 00:00:00 2001
37 +From: Jory Pratt <anarchy@g.o>
38 +Date: Thu, 28 Mar 2019 14:21:48 -0500
39 +Subject: [PATCH] Fix up configure
40 +
41 +---
42 + configure | 2 +-
43 + 1 file changed, 1 insertion(+), 1 deletion(-)
44 +
45 +diff --git a/configure b/configure
46 +index b3e14a3..dde9a93 100755
47 +--- a/configure
48 ++++ b/configure
49 +@@ -21127,7 +21127,7 @@ return dlopen ();
50 + _ACEOF
51 + for ac_lib in '' dl dld; do
52 + if test -z "$ac_lib"; then
53 +- ac_res="none required"
54 ++ ac_res=""
55 + else
56 + ac_res=-l$ac_lib
57 + LIBS="-l$ac_lib $ac_func_search_save_LIBS"
58 +--
59 +2.21.0
60 +
61
62 diff --git a/net-misc/networkmanager/files/musl-basic.patch b/net-misc/networkmanager/files/musl-basic.patch
63 index 533ed98..e26ad4a 100644
64 --- a/net-misc/networkmanager/files/musl-basic.patch
65 +++ b/net-misc/networkmanager/files/musl-basic.patch
66 @@ -1,8 +1,20 @@
67 ---- a/src/systemd/src/basic/stdio-util.h
68 -+++ b/src/systemd/src/basic/stdio-util.h
69 -@@ -19,7 +19,9 @@
70 - along with systemd; If not, see <http://www.gnu.org/licenses/>.
71 - ***/
72 +From 8d5abcd3f0ef99cb7551d2db400c0645812a54ab Mon Sep 17 00:00:00 2001
73 +From:
74 +Date: Thu, 28 Mar 2019 11:48:38 -0500
75 +Subject: [PATCH 1/5] Basic musl fixes
76 +
77 +---
78 + shared/systemd/src/basic/stdio-util.h | 2 ++
79 + shared/systemd/src/basic/util.h | 6 ++++++
80 + 2 files changed, 8 insertions(+)
81 +
82 +diff --git a/shared/systemd/src/basic/stdio-util.h b/shared/systemd/src/basic/stdio-util.h
83 +index dc67b6e..6336243 100644
84 +--- a/shared/systemd/src/basic/stdio-util.h
85 ++++ b/shared/systemd/src/basic/stdio-util.h
86 +@@ -1,7 +1,9 @@
87 + /* SPDX-License-Identifier: LGPL-2.1+ */
88 + #pragma once
89
90 +#if defined(__GLIBC__)
91 #include <printf.h>
92 @@ -10,55 +22,23 @@
93 #include <stdarg.h>
94 #include <stdio.h>
95 #include <sys/types.h>
96 ---- a/src/systemd/src/basic/util.h
97 -+++ b/src/systemd/src/basic/util.h
98 -@@ -46,6 +46,11 @@
99 - #include "missing.h"
100 +diff --git a/shared/systemd/src/basic/util.h b/shared/systemd/src/basic/util.h
101 +index dc33d66..fbdf291 100644
102 +--- a/shared/systemd/src/basic/util.h
103 ++++ b/shared/systemd/src/basic/util.h
104 +@@ -27,6 +27,12 @@
105 + #include "macro.h"
106 #include "time-util.h"
107
108 +#if !defined(__GLIBC__)
109 +typedef int (*__compar_fn_t) (const void*, const void*);
110 +typedef __compar_fn_t comparison_fn_t;
111 ++typedef int (*__compar_d_fn_t) (const void *, const void *, void *);
112 +#endif
113 +
114 size_t page_size(void) _pure_;
115 #define PAGE_ALIGN(l) ALIGN_TO((l), page_size())
116
117 ---- a/src/systemd/sd-adapt/nm-sd-adapt.h
118 -+++ b/src/systemd/sd-adapt/nm-sd-adapt.h
119 -@@ -134,7 +134,7 @@
120 - # ifdef HAVE___SECURE_GETENV
121 - # define secure_getenv __secure_getenv
122 - # else
123 --# error neither secure_getenv nor __secure_getenv is available
124 -+# define secure_getenv getenv
125 - # endif
126 - #endif
127 -
128 ---- a/src/systemd/src/basic/process-util.c
129 -+++ b/src/systemd/src/basic/process-util.c
130 -@@ -1018,8 +1018,9 @@
131 - /* We use glibc __register_atfork() + __dso_handle directly here, as they are not included in the glibc
132 - * headers. __register_atfork() is mostly equivalent to pthread_atfork(), but doesn't require us to link against
133 - * libpthread, as it is part of glibc anyway. */
134 --extern int __register_atfork(void (*prepare) (void), void (*parent) (void), void (*child) (void), void * __dso_handle);
135 --extern void* __dso_handle __attribute__ ((__weak__));
136 -+//extern int __register_atfork(void (*prepare) (void), void (*parent) (void), void (*child) (void), void * __dso_handle);
137 -+//extern void* __dso_handle __attribute__ ((__weak__));
138 -+#define __register_atfork(prepare,parent,child,dso) pthread_atfork(prepare,parent,child)
139 -
140 - pid_t getpid_cached(void) {
141 - pid_t current_value;
142 ---- a/libnm-core/nm-json.c
143 -+++ b/libnm-core/nm-json.c
144 -@@ -23,6 +23,10 @@
145 -
146 - #include <dlfcn.h>
147 -
148 -+#ifndef RTLD_DEEPBIND
149 -+#define RTLD_DEEPBIND 0
150 -+#endif
151 -+
152 - void *_nm_jansson_json_object_iter_value;
153 - void *_nm_jansson_json_object_key_to_iter;
154 - void *_nm_jansson_json_integer;
155 +--
156 +2.21.0
157 +
158
159 diff --git a/net-misc/networkmanager/files/musl-dlopen-configure-ac.patch b/net-misc/networkmanager/files/musl-dlopen-configure-ac.patch
160 deleted file mode 100644
161 index 5df320b..0000000
162 --- a/net-misc/networkmanager/files/musl-dlopen-configure-ac.patch
163 +++ /dev/null
164 @@ -1,11 +0,0 @@
165 -musl: dlopen is included so LD_LIBS="" instead of LD_LIBS="none required"
166 ---- a/configure.ac
167 -+++ b/configure.ac
168 -@@ -275,6 +275,7 @@
169 - dnl Checks for libdl - on certain platforms its part of libc
170 - dnl
171 - AC_SEARCH_LIBS([dlopen], [dl dld], [], [ac_cv_search_dlopen=])
172 -+AS_IF([test "$ac_cv_search_dlopen" = "none required"],[ac_cv_search_dlopen=""])
173 - AC_SUBST([DL_LIBS], "$ac_cv_search_dlopen")
174 -
175 - PKG_CHECK_MODULES(GLIB, [gio-unix-2.0 >= 2.37.6 gmodule-2.0],
176
177 diff --git a/net-misc/networkmanager/files/musl-fix-includes.patch b/net-misc/networkmanager/files/musl-fix-includes.patch
178 new file mode 100644
179 index 0000000..9c1e240
180 --- /dev/null
181 +++ b/net-misc/networkmanager/files/musl-fix-includes.patch
182 @@ -0,0 +1,74 @@
183 +From 757c618b86fec884d9f9cb0abdbe31ba680ff863 Mon Sep 17 00:00:00 2001
184 +From:
185 +Date: Thu, 28 Mar 2019 11:49:20 -0500
186 +Subject: [PATCH 2/5] Fix includes for musl users
187 +
188 +---
189 + src/devices/nm-device.c | 4 ++++
190 + src/nm-manager.c | 1 +
191 + src/platform/nm-linux-platform.c | 6 +++++-
192 + 3 files changed, 10 insertions(+), 1 deletion(-)
193 +
194 +diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
195 +index 7514fa7..f041382 100644
196 +--- a/src/devices/nm-device.c
197 ++++ b/src/devices/nm-device.c
198 +@@ -32,7 +32,11 @@
199 + #include <arpa/inet.h>
200 + #include <fcntl.h>
201 + #include <linux/if_addr.h>
202 ++#if defined(__GLIBC__)
203 + #include <linux/if_arp.h>
204 ++#else
205 ++#include <linux/if.h>
206 ++#endif
207 + #include <linux/rtnetlink.h>
208 + #include <linux/pkt_sched.h>
209 +
210 +diff --git a/src/nm-manager.c b/src/nm-manager.c
211 +index 0bf6a75..e392507 100644
212 +--- a/src/nm-manager.c
213 ++++ b/src/nm-manager.c
214 +@@ -26,6 +26,7 @@
215 + #include <stdlib.h>
216 + #include <fcntl.h>
217 + #include <unistd.h>
218 ++#include <asm/types.h>
219 +
220 + #include "nm-utils/nm-c-list.h"
221 +
222 +diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c
223 +index 2f5c75b..f086245 100644
224 +--- a/src/platform/nm-linux-platform.c
225 ++++ b/src/platform/nm-linux-platform.c
226 +@@ -20,6 +20,7 @@
227 + #include "nm-default.h"
228 +
229 + #include "nm-linux-platform.h"
230 ++#include "wpan/nm-wpan-utils.h"
231 +
232 + #include <arpa/inet.h>
233 + #include <dlfcn.h>
234 +@@ -27,7 +28,11 @@
235 + #include <fcntl.h>
236 + #include <libudev.h>
237 + #include <linux/ip.h>
238 ++#if defined(__GLIBC__)
239 + #include <linux/if_arp.h>
240 ++#else
241 ++#include <linux/if.h>
242 ++#endif
243 + #include <linux/if_link.h>
244 + #include <linux/if_tun.h>
245 + #include <linux/if_tunnel.h>
246 +@@ -53,7 +58,6 @@
247 + #include "nm-platform-private.h"
248 + #include "wifi/nm-wifi-utils.h"
249 + #include "wifi/nm-wifi-utils-wext.h"
250 +-#include "wpan/nm-wpan-utils.h"
251 + #include "nm-utils/unaligned.h"
252 + #include "nm-utils/nm-io-utils.h"
253 + #include "nm-utils/nm-udev-utils.h"
254 +--
255 +2.21.0
256 +
257
258 diff --git a/net-misc/networkmanager/files/musl-has-not-secure-gentenv.patch b/net-misc/networkmanager/files/musl-has-not-secure-gentenv.patch
259 new file mode 100644
260 index 0000000..38eec9c
261 --- /dev/null
262 +++ b/net-misc/networkmanager/files/musl-has-not-secure-gentenv.patch
263 @@ -0,0 +1,25 @@
264 +From b5649534943137ddbb97f1735e8d5ced24b1e36e Mon Sep 17 00:00:00 2001
265 +From:
266 +Date: Thu, 28 Mar 2019 11:49:44 -0500
267 +Subject: [PATCH 3/5] Musl does not have secure getenv
268 +
269 +---
270 + src/systemd/sd-adapt-core/nm-sd-adapt-core.h | 2 +-
271 + 1 file changed, 1 insertion(+), 1 deletion(-)
272 +
273 +diff --git a/src/systemd/sd-adapt-core/nm-sd-adapt-core.h b/src/systemd/sd-adapt-core/nm-sd-adapt-core.h
274 +index 8c07c53..d043afc 100644
275 +--- a/src/systemd/sd-adapt-core/nm-sd-adapt-core.h
276 ++++ b/src/systemd/sd-adapt-core/nm-sd-adapt-core.h
277 +@@ -65,7 +65,7 @@
278 + # ifdef HAVE___SECURE_GETENV
279 + # define secure_getenv __secure_getenv
280 + # else
281 +-# error neither secure_getenv nor __secure_getenv is available
282 ++# define secure_getenv getenv
283 + # endif
284 + #endif
285 +
286 +--
287 +2.21.0
288 +
289
290 diff --git a/net-misc/networkmanager/files/musl-network-support.patch b/net-misc/networkmanager/files/musl-network-support.patch
291 index 73c1930..feca98d 100644
292 --- a/net-misc/networkmanager/files/musl-network-support.patch
293 +++ b/net-misc/networkmanager/files/musl-network-support.patch
294 @@ -1,3 +1,16 @@
295 +From 530814cb0d4f3369c18a88a31b5f14f2ed6544bc Mon Sep 17 00:00:00 2001
296 +From:
297 +Date: Thu, 28 Mar 2019 11:50:06 -0500
298 +Subject: [PATCH 4/5] musl network support
299 +
300 +---
301 + libnm-core/nm-utils.h | 4 ++++
302 + shared/systemd/src/basic/socket-util.h | 5 +++++
303 + src/platform/wifi/nm-wifi-utils.h | 4 ++++
304 + 3 files changed, 13 insertions(+)
305 +
306 +diff --git a/libnm-core/nm-utils.h b/libnm-core/nm-utils.h
307 +index 2b5baba..976850c 100644
308 --- a/libnm-core/nm-utils.h
309 +++ b/libnm-core/nm-utils.h
310 @@ -30,7 +30,11 @@
311 @@ -12,8 +25,26 @@
312 #include <linux/if_infiniband.h>
313
314 #include "nm-core-enum-types.h"
315 ---- a/src/platform/wifi/wifi-utils.h
316 -+++ b/src/platform/wifi/wifi-utils.h
317 +diff --git a/shared/systemd/src/basic/socket-util.h b/shared/systemd/src/basic/socket-util.h
318 +index d2246a8..4cb0807 100644
319 +--- a/shared/systemd/src/basic/socket-util.h
320 ++++ b/shared/systemd/src/basic/socket-util.h
321 +@@ -12,6 +12,11 @@
322 + #include <sys/socket.h>
323 + #include <sys/types.h>
324 + #include <sys/un.h>
325 ++#if !defined(__GLIBC__)
326 ++/* SIOCGSTAMPNS from linux/asm-generic.h
327 ++ * for src/systemd/src/libsystemd-network/sd-lldp.c */
328 ++#include <linux/sockios.h>
329 ++#endif
330 +
331 + #include "macro.h"
332 + #include "missing_socket.h"
333 +diff --git a/src/platform/wifi/nm-wifi-utils.h b/src/platform/wifi/nm-wifi-utils.h
334 +index 36148b5..d282eb2 100644
335 +--- a/src/platform/wifi/nm-wifi-utils.h
336 ++++ b/src/platform/wifi/nm-wifi-utils.h
337 @@ -22,7 +22,11 @@
338 #ifndef __WIFI_UTILS_H__
339 #define __WIFI_UTILS_H__
340 @@ -25,18 +56,7 @@
341 +#endif
342
343 #include "nm-dbus-interface.h"
344 -
345 ---- a/src/systemd/src/basic/socket-util.h
346 -+++ b/src/systemd/src/basic/socket-util.h
347 -@@ -28,6 +28,11 @@
348 - #include <sys/un.h>
349 - #include <linux/netlink.h>
350 - #include <linux/if_packet.h>
351 -+#if !defined(__GLIBC__)
352 -+/* SIOCGSTAMPNS from linux/asm-generic.h
353 -+ * for src/systemd/src/libsystemd-network/sd-lldp.c */
354 -+#include <linux/sockios.h>
355 -+#endif
356 -
357 - #include "macro.h"
358 - #include "util.h"
359 + #include "nm-setting-wireless.h"
360 +--
361 +2.21.0
362 +
363
364 diff --git a/net-misc/networkmanager/files/musl-process-util.patch b/net-misc/networkmanager/files/musl-process-util.patch
365 new file mode 100644
366 index 0000000..0b67a78
367 --- /dev/null
368 +++ b/net-misc/networkmanager/files/musl-process-util.patch
369 @@ -0,0 +1,54 @@
370 +From 0777360a2d8baa5c297bfa017bfaa1caf111d720 Mon Sep 17 00:00:00 2001
371 +From:
372 +Date: Thu, 28 Mar 2019 11:50:23 -0500
373 +Subject: [PATCH 5/5] musl process util
374 +
375 +---
376 + shared/systemd/src/basic/process-util.c | 12 +++++++++++-
377 + 1 file changed, 11 insertions(+), 1 deletion(-)
378 +
379 +diff --git a/shared/systemd/src/basic/process-util.c b/shared/systemd/src/basic/process-util.c
380 +index b0afb5c..f72e346 100644
381 +--- a/shared/systemd/src/basic/process-util.c
382 ++++ b/shared/systemd/src/basic/process-util.c
383 +@@ -21,6 +21,9 @@
384 + #include <sys/wait.h>
385 + #include <syslog.h>
386 + #include <unistd.h>
387 ++#ifndef __GLIBC__
388 ++#include <pthread.h>
389 ++#endif
390 + #if 0 /* NM_IGNORED */
391 + #if HAVE_VALGRIND_VALGRIND_H
392 + #include <valgrind/valgrind.h>
393 +@@ -1168,11 +1171,13 @@ void reset_cached_pid(void) {
394 + cached_pid = CACHED_PID_UNSET;
395 + }
396 +
397 ++#ifdef __GLIBC__
398 + /* We use glibc __register_atfork() + __dso_handle directly here, as they are not included in the glibc
399 + * headers. __register_atfork() is mostly equivalent to pthread_atfork(), but doesn't require us to link against
400 + * libpthread, as it is part of glibc anyway. */
401 + extern int __register_atfork(void (*prepare) (void), void (*parent) (void), void (*child) (void), void *dso_handle);
402 + extern void* __dso_handle _weak_;
403 ++#endif
404 +
405 + pid_t getpid_cached(void) {
406 + static bool installed = false;
407 +@@ -1201,7 +1206,12 @@ pid_t getpid_cached(void) {
408 + * only half-documented (glibc doesn't document it but LSB does — though only superficially)
409 + * we'll check for errors only in the most generic fashion possible. */
410 +
411 +- if (__register_atfork(NULL, NULL, reset_cached_pid, __dso_handle) != 0) {
412 ++ #ifdef __GLIBC__
413 ++ if (__register_atfork(NULL, NULL, reset_cached_pid, __dso_handle) != 0) {
414 ++ #else
415 ++ if (pthread_atfork(NULL, NULL, reset_cached_pid) != 0) {
416 ++ #endif
417 ++
418 + /* OOM? Let's try again later */
419 + cached_pid = CACHED_PID_UNSET;
420 + return new_pid;
421 +--
422 +2.21.0
423 +
424
425 diff --git a/net-misc/networkmanager/metadata.xml b/net-misc/networkmanager/metadata.xml
426 index c212206..3345447 100644
427 --- a/net-misc/networkmanager/metadata.xml
428 +++ b/net-misc/networkmanager/metadata.xml
429 @@ -5,10 +5,6 @@
430 <email>gnome@g.o</email>
431 <name>Gentoo GNOME Desktop</name>
432 </maintainer>
433 - <maintainer type="person">
434 - <email>floppym@g.o</email>
435 - <name>Mike Gilbert</name>
436 - </maintainer>
437 <use>
438 <flag name="connection-sharing">Use <pkg>net-dns/dnsmasq</pkg> and
439 <pkg>net-firewall/iptables</pkg> for connection sharing</flag>
440 @@ -18,6 +14,8 @@
441 getting ip</flag>
442 <flag name="dhcpcd">Use <pkg>net-misc/dhcpcd</pkg> for getting ip</flag>
443 <flag name="elogind">Use <pkg>sys-auth/elogind</pkg> for session tracking</flag>
444 + <flag name="iwd">Use <pkg>net-wireless/iwd</pkg> instead of
445 + <pkg>net-wireless/wpa_supplicant</pkg> for wifi support by default</flag>
446 <flag name="json">Enable JSON validation via <pkg>dev-libs/jansson</pkg>
447 in libnm.</flag>
448 <flag name="modemmanager">Enable support for mobile broadband devices
449 @@ -28,10 +26,12 @@
450 <flag name="ppp">Enable support for mobile broadband and PPPoE
451 connections using <pkg>net-dialup/ppp</pkg></flag>
452 <flag name="resolvconf">Use <pkg>net-dns/openresolv</pkg> for managing
453 - DNS information</flag>
454 + DNS information in /etc/resolv.conf. Generally, a symlink to
455 + /run/NetworkManager/resolv.conf is simpler. On systems running
456 + systemd-resolved, disable this flag and create a symlink to
457 + /run/systemd/resolve/stub-resolv.conf.</flag>
458 <flag name="teamd">Enable Teamd control support</flag>
459 - <flag name="wifi">Enable support for wifi and 802.1x security using
460 - <pkg>net-wireless/wpa_supplicant</pkg></flag>
461 + <flag name="wifi">Enable support for wifi and 802.1x security</flag>
462 <flag name="wext">Enable support for the deprecated Wext (Wireless
463 Extensions) API; needed for some older drivers (e.g. ipw2200,
464 ndiswrapper)</flag>
465
466 diff --git a/net-misc/networkmanager/networkmanager-1.10.10.ebuild b/net-misc/networkmanager/networkmanager-1.16.0.ebuild
467 similarity index 87%
468 rename from net-misc/networkmanager/networkmanager-1.10.10.ebuild
469 rename to net-misc/networkmanager/networkmanager-1.16.0.ebuild
470 index af4b2c4..f728034 100644
471 --- a/net-misc/networkmanager/networkmanager-1.10.10.ebuild
472 +++ b/net-misc/networkmanager/networkmanager-1.16.0.ebuild
473 @@ -1,14 +1,14 @@
474 -# Copyright 1999-2018 Gentoo Foundation
475 +# Copyright 1999-2019 Gentoo Authors
476 # Distributed under the terms of the GNU General Public License v2
477
478 EAPI=6
479 GNOME_ORG_MODULE="NetworkManager"
480 GNOME2_LA_PUNT="yes"
481 VALA_USE_DEPEND="vapigen"
482 -PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
483 +PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6,3_7} )
484
485 -inherit autotools bash-completion-r1 gnome2 linux-info multilib python-any-r1 systemd flag-o-matic \
486 - user readme.gentoo-r1 toolchain-funcs vala versionator virtualx udev multilib-minimal
487 +inherit bash-completion-r1 gnome2 linux-info multilib python-any-r1 systemd \
488 + user readme.gentoo-r1 vala virtualx udev multilib-minimal flag-o-matic
489
490 DESCRIPTION="A set of co-operative tools that make networking simple and straightforward"
491 HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager"
492 @@ -16,10 +16,11 @@ HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager"
493 LICENSE="GPL-2+"
494 SLOT="0" # add subslot if libnm-util.so.2 or libnm-glib.so.4 bumps soname version
495
496 -IUSE="audit bluetooth connection-sharing consolekit +dhclient dhcpcd elogind gnutls +introspection json kernel_linux +nss +modemmanager ncurses ofono ovs policykit +ppp resolvconf selinux systemd teamd test vala +wext +wifi"
497 +IUSE="audit bluetooth connection-sharing consolekit +dhclient dhcpcd elogind gnutls +introspection iwd json kernel_linux +nss +modemmanager ncurses ofono ovs policykit +ppp resolvconf selinux systemd teamd test vala +wext +wifi"
498
499 REQUIRED_USE="
500 - modemmanager? ( ppp )
501 + bluetooth? ( modemmanager )
502 + iwd? ( wifi )
503 vala? ( introspection )
504 wext? ( wifi )
505 ^^ ( nss gnutls )
506 @@ -33,8 +34,7 @@ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
507 COMMON_DEPEND="
508 >=sys-apps/dbus-1.2[${MULTILIB_USEDEP}]
509 >=dev-libs/dbus-glib-0.100[${MULTILIB_USEDEP}]
510 - >=dev-libs/glib-2.37.6:2[${MULTILIB_USEDEP}]
511 - >=dev-libs/libnl-3.2.8:3=[${MULTILIB_USEDEP}]
512 + >=dev-libs/glib-2.40:2[${MULTILIB_USEDEP}]
513 policykit? ( >=sys-auth/polkit-0.106 )
514 net-libs/libndp[${MULTILIB_USEDEP}]
515 >=net-misc/curl-7.24
516 @@ -55,7 +55,7 @@ COMMON_DEPEND="
517 dev-libs/libgcrypt:0=[${MULTILIB_USEDEP}]
518 >=net-libs/gnutls-2.12:=[${MULTILIB_USEDEP}] )
519 introspection? ( >=dev-libs/gobject-introspection-0.10.3:= )
520 - json? ( dev-libs/jansson[${MULTILIB_USEDEP}] )
521 + json? ( >=dev-libs/jansson-2.5[${MULTILIB_USEDEP}] )
522 modemmanager? ( >=net-misc/modemmanager-0.7.991:0= )
523 ncurses? ( >=dev-libs/newt-0.52.15 )
524 nss? ( >=dev-libs/nss-3.11:=[${MULTILIB_USEDEP}] )
525 @@ -75,14 +75,18 @@ RDEPEND="${COMMON_DEPEND}
526 net-misc/iputils[arping(+)]
527 net-analyzer/arping
528 )
529 - wifi? ( >=net-wireless/wpa_supplicant-0.7.3-r3[dbus] )
530 + wifi? (
531 + !iwd? ( >=net-wireless/wpa_supplicant-0.7.3-r3[dbus] )
532 + iwd? ( net-wireless/iwd )
533 + )
534 "
535 DEPEND="${COMMON_DEPEND}
536 dev-util/gdbus-codegen
537 + dev-util/glib-utils
538 dev-util/gtk-doc-am
539 >=dev-util/intltool-0.40
540 >=sys-devel/gettext-0.17
541 - >=sys-kernel/linux-headers-2.6.29
542 + >=sys-kernel/linux-headers-3.18
543 virtual/pkgconfig[${MULTILIB_USEDEP}]
544 introspection? (
545 $(python_gen_any_dep 'dev-python/pygobject:3[${PYTHON_USEDEP}]')
546 @@ -98,9 +102,12 @@ DEPEND="${COMMON_DEPEND}
547 "
548
549 PATCHES=(
550 + "${FILESDIR}"/fix-busted-configure.patch
551 "${FILESDIR}"/musl-basic.patch
552 - "${FILESDIR}"/musl-dlopen-configure-ac.patch
553 + "${FILESDIR}"/musl-fix-includes.patch
554 + "${FILESDIR}"/musl-has-not-secure-gentenv.patch
555 "${FILESDIR}"/musl-network-support.patch
556 + "${FILESDIR}"/musl-process-util.patch
557 )
558
559 python_check_deps() {
560 @@ -156,34 +163,31 @@ src_prepare() {
561
562 use vala && vala_src_prepare
563 gnome2_src_prepare
564 - eautoconf
565 }
566
567 multilib_src_configure() {
568 - use elibc_musl && append-cflags -DHAVE_SECURE_GETENV -Dsecure_getenv=getenv -D__USE_POSIX199309
569 -
570 local myconf=(
571 --disable-more-warnings
572 --disable-static
573 --localstatedir=/var
574 --disable-lto
575 --disable-config-plugin-ibft
576 - # ifnet plugin always disabled until someone volunteers to actively
577 - # maintain and fix it
578 - --disable-ifnet
579 --disable-qt
580 --without-netconfig
581 --with-dbus-sys-dir=/etc/dbus-1/system.d
582 # We need --with-libnm-glib (and dbus-glib dep) as reverse deps are
583 - # still not ready for removing that lib
584 + # still not ready for removing that lib, bug #665338
585 --with-libnm-glib
586 --with-nmcli=yes
587 --with-udev-dir="$(get_udevdir)"
588 --with-config-plugins-default=keyfile
589 --with-iptables=/sbin/iptables
590 + --with-ebpf=yes
591 $(multilib_native_enable concheck)
592 --with-crypto=$(usex nss nss gnutls)
593 --with-session-tracking=$(multilib_native_usex systemd systemd $(multilib_native_usex elogind elogind $(multilib_native_usex consolekit consolekit no)))
594 + # ConsoleKit has no build-time dependency, so use it as the default case.
595 + # There is no off switch, and we do not support upower.
596 --with-suspend-resume=$(multilib_native_usex systemd systemd $(multilib_native_usex elogind elogind consolekit))
597 $(multilib_native_use_with audit libaudit)
598 $(multilib_native_use_enable bluetooth bluez5-dun)
599 @@ -204,6 +208,7 @@ multilib_src_configure() {
600 $(multilib_native_use_enable test tests)
601 $(multilib_native_use_enable vala)
602 --without-valgrind
603 + $(multilib_native_use_with wifi iwd)
604 $(multilib_native_use_with wext)
605 $(multilib_native_use_enable wifi)
606 )
607 @@ -232,6 +237,8 @@ multilib_src_configure() {
608 ln -s "${S}/man" man || die
609 fi
610
611 + append-cflags -DRTLD_DEEPBIND=0
612 +
613 ECONF_SOURCE=${S} runstatedir="/run" gnome2_src_configure "${myconf[@]}"
614 }
615
616 @@ -279,6 +286,7 @@ multilib_src_install() {
617 }
618
619 multilib_src_install_all() {
620 + einstalldocs
621 ! use systemd && readme.gentoo_create_doc
622
623 newinitd "${FILESDIR}/init.d.NetworkManager-r1" NetworkManager
624 @@ -300,6 +308,14 @@ multilib_src_install_all() {
625 insinto /usr/share/polkit-1/rules.d/
626 doins "${FILESDIR}/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
627
628 + if use iwd; then
629 + # This goes to $nmlibdir/conf.d/ and $nmlibdir is '${prefix}'/lib/$PACKAGE, thus always lib, not get_libdir
630 + cat <<-EOF > "${ED%/}"/usr/lib/NetworkManager/conf.d/iwd.conf
631 + [device]
632 + wifi.backend=iwd
633 + EOF
634 + fi
635 +
636 # Empty
637 rmdir "${ED%/}"/var{/lib{/NetworkManager,},} || die
638 }