aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJory Pratt <anarchy@gentoo.org>2020-08-20 18:59:29 -0500
committerJory Pratt <anarchy@gentoo.org>2020-08-20 18:59:29 -0500
commite7483fe512c16baf3dcd8c4da05d3eb93bdc1789 (patch)
treeed592b41d7994a40b159ac676a3cb71fe8ea8b1d /net-misc
parentsys-auth/polkit: bump to v0.117 (diff)
downloadmusl-e7483fe512c16baf3dcd8c4da05d3eb93bdc1789.tar.gz
musl-e7483fe512c16baf3dcd8c4da05d3eb93bdc1789.tar.bz2
musl-e7483fe512c16baf3dcd8c4da05d3eb93bdc1789.zip
net-misc/networkmanager: Update for stable users
Package-Manager: Portage-3.0.4, Repoman-2.3.23 Signed-off-by: Jory Pratt <anarchy@gentoo.org>
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/networkmanager/Manifest2
-rw-r--r--net-misc/networkmanager/files/1.18.4-iwd1-compat.patch81
-rw-r--r--net-misc/networkmanager/files/1.18.6-fix-bashisms.patch131
-rw-r--r--net-misc/networkmanager/files/init.d.NetworkManager-r158
-rw-r--r--net-misc/networkmanager/files/musl-basic.patch54
-rw-r--r--net-misc/networkmanager/files/musl-compar.patch18
-rw-r--r--net-misc/networkmanager/files/musl-fix-includes.patch78
-rw-r--r--net-misc/networkmanager/files/musl-network-support.patch50
-rw-r--r--net-misc/networkmanager/files/musl-no-drand.patch58
-rw-r--r--net-misc/networkmanager/files/musl-process-util.patch18
-rw-r--r--net-misc/networkmanager/files/networkmanager-data-fix-the-ID_NET_DRIVER-udev-rule.patch33
-rw-r--r--net-misc/networkmanager/networkmanager-1.26.0.ebuild (renamed from net-misc/networkmanager/networkmanager-1.18.6.ebuild)49
12 files changed, 190 insertions, 440 deletions
diff --git a/net-misc/networkmanager/Manifest b/net-misc/networkmanager/Manifest
index 1218137..db1ec14 100644
--- a/net-misc/networkmanager/Manifest
+++ b/net-misc/networkmanager/Manifest
@@ -1 +1 @@
-DIST NetworkManager-1.18.6.tar.xz 4845144 BLAKE2B cf66789c025d9ec2007d1fe541acb8fd2b5204796ff8498fc5689124016e84a7e76509bee1b6650c796f0429cce6748c7b99e1976d95ac12bc31a1f1e67289b0 SHA512 92ab648e689dd903279fe676e867d7929f616c96dd478b2132854145a29debfcac5b083d70652ea0c7bccb0eb132534133fc9c005527237c47e2802556a29b92
+DIST NetworkManager-1.26.0.tar.xz 4956796 BLAKE2B 752b6b47387bac5787d06be7f31cc7387798d0c917977c8e72d6d21538a86c167003901d628e596109aec28816f56fd8cd6bf2b46a8d4918a7e6cf1946586550 SHA512 46035fda8f154497ba4a634e4bf7f0a11f579d0d3f4ffdcea7d47ea0bde6dd0183885491f5453255af7b163ae3db4f0c62c3161913a8c30c35b6475887235b6d
diff --git a/net-misc/networkmanager/files/1.18.4-iwd1-compat.patch b/net-misc/networkmanager/files/1.18.4-iwd1-compat.patch
deleted file mode 100644
index 12c8b87..0000000
--- a/net-misc/networkmanager/files/1.18.4-iwd1-compat.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-From 59923ad85d1a1cf2216a4f14649702d24d3f2360 Mon Sep 17 00:00:00 2001
-From: Lubomir Rintel <lkundrak@v3.sk>
-Date: Sat, 2 Nov 2019 06:55:54 +0100
-Subject: [PATCH 1/2] iwd: add some missing error handling
-
-g_dbus_object_manager_get_interface() can happily return NULL and we
-need to check for that.
----
- src/devices/wifi/nm-iwd-manager.c | 10 ++++++++++
- 1 file changed, 10 insertions(+)
-
-diff --git a/src/devices/wifi/nm-iwd-manager.c b/src/devices/wifi/nm-iwd-manager.c
-index dd1cad480..e83f8063c 100644
---- a/src/devices/wifi/nm-iwd-manager.c
-+++ b/src/devices/wifi/nm-iwd-manager.c
-@@ -136,6 +136,11 @@ agent_dbus_method_cb (GDBusConnection *connection,
- network = g_dbus_object_manager_get_interface (priv->object_manager,
- network_path,
- NM_IWD_NETWORK_INTERFACE);
-+ if (!network) {
-+ _LOGE ("unable to find the network object");
-+ return;
-+ }
-+
-
- device_path = get_property_string_or_null (G_DBUS_PROXY (network), "Device");
- if (!device_path) {
-@@ -260,6 +265,11 @@ register_agent (NMIwdManager *self)
- "/",
- NM_IWD_AGENT_MANAGER_INTERFACE);
-
-+ if (!agent_manager) {
-+ _LOGE ("unable to register the IWD Agent: PSK/8021x Wi-Fi networks may not work");
-+ return;
-+ }
-+
- /* Register our agent */
- g_dbus_proxy_call (G_DBUS_PROXY (agent_manager),
- "RegisterAgent",
---
-2.20.1
-
-
-From 186d22a9634e2bf94658ed6f1cf2b332ecb3a32c Mon Sep 17 00:00:00 2001
-From: Lubomir Rintel <lkundrak@v3.sk>
-Date: Sat, 2 Nov 2019 07:01:28 +0100
-Subject: [PATCH 2/2] iwd: unbreak iwd-1.0
-
-The upstream apparently thought it's a great idea to change the agent
-manager path. This fixes things for those unfortunate enough to run
-IWD.
----
- src/devices/wifi/nm-iwd-manager.c | 10 +++++++++-
- 1 file changed, 9 insertions(+), 1 deletion(-)
-
-diff --git a/src/devices/wifi/nm-iwd-manager.c b/src/devices/wifi/nm-iwd-manager.c
-index e83f8063c..470cb1c90 100644
---- a/src/devices/wifi/nm-iwd-manager.c
-+++ b/src/devices/wifi/nm-iwd-manager.c
-@@ -262,9 +262,17 @@ register_agent (NMIwdManager *self)
- GDBusInterface *agent_manager;
-
- agent_manager = g_dbus_object_manager_get_interface (priv->object_manager,
-- "/",
-+ "/net/connman/iwd",
- NM_IWD_AGENT_MANAGER_INTERFACE);
-
-+ if (!agent_manager) {
-+ /* IWD prior to 1.0 dated 30 October, 2019 has the agent manager on a
-+ * different path. */
-+ agent_manager = g_dbus_object_manager_get_interface (priv->object_manager,
-+ "/",
-+ NM_IWD_AGENT_MANAGER_INTERFACE);
-+ }
-+
- if (!agent_manager) {
- _LOGE ("unable to register the IWD Agent: PSK/8021x Wi-Fi networks may not work");
- return;
---
-2.20.1
-
diff --git a/net-misc/networkmanager/files/1.18.6-fix-bashisms.patch b/net-misc/networkmanager/files/1.18.6-fix-bashisms.patch
deleted file mode 100644
index 3d087ce..0000000
--- a/net-misc/networkmanager/files/1.18.6-fix-bashisms.patch
+++ /dev/null
@@ -1,131 +0,0 @@
-From 0adfc0f511e1389ca166fb233b9d3feb12da91d2 Mon Sep 17 00:00:00 2001
-From: Gilles Dartiguelongue <eva@gentoo.org>
-Date: Mon, 8 Jun 2020 20:42:40 -0500
-Subject: [PATCH] Remove subshells and fix invalid test syntax
-
-Signed-off-by: Gilles Dartiguelongue <eva@gentoo.org>
----
- configure.ac | 28 ++++++++++++++--------------
- m4/introspection.m4 | 4 ++--
- 2 files changed, 16 insertions(+), 16 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 9dc0625..49cbba3 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -261,7 +261,7 @@ AC_ARG_WITH(libnm-glib,
- AS_HELP_STRING([--with-libnm-glib],
- [build legacy libraries]))
- fake_typelibs=no
--if test "$with_libnm_glib" == "yes"; then
-+if test "$with_libnm_glib" = "yes"; then
- PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.1 dbus-glib-1 >= 0.94, :,
- [AC_MSG_FAILURE([$DBUS_PKG_ERRORS
-
-@@ -277,7 +277,7 @@ Configure with --without-libnm-glib if you do not need the legacy libraries])
- else
- with_libnm_glib=no
- fi
--AM_CONDITIONAL(WITH_LEGACY_LIBRARIES, test "$with_libnm_glib" == "yes")
-+AM_CONDITIONAL(WITH_LEGACY_LIBRARIES, test "$with_libnm_glib" = "yes")
- if test "$fake_typelibs" = "yes"; then
- AC_DEFINE(WITH_FAKE_TYPELIBS, 1, [Define for libnm to prevent GIR from loading libnm-glib])
- else
-@@ -633,7 +633,7 @@ AC_ARG_ENABLE(json-validation,
- AS_HELP_STRING([--enable-json-validation], [Enable JSON validation in libnm]),
- [enable_json_validation=${enableval}],
- [enable_json_validation=${have_jansson}])
--if (test "${enable_json_validation}" == "no"); then
-+if (test "${enable_json_validation}" = "no"); then
- AC_DEFINE(WITH_JSON_VALIDATION, 0, [Define if JSON validation in libnm is enabled])
- else
- if test "$have_jansson" = "no"; then
-@@ -816,8 +816,8 @@ AC_ARG_WITH([dhcpcanon],
- if test "$with_dhcpcanon" != "no"; then
- with_dhcpcanon_="$with_dhcpcanon"
- AC_PATH_PROGS(with_dhcpcanon, dhcpcanon, no, /sbin:/usr/sbin:/usr/local/sbin:/usr/bin:/usr/local/bin)
-- if test "$with_dhcpcanon" == "no"; then
-- if test "$with_dhcpcanon_" == yes; then
-+ if test "$with_dhcpcanon" = "no"; then
-+ if test "$with_dhcpcanon_" = yes; then
- AC_MSG_WARN([dhcpcanon not found, assume path /sbin/dhcpcanon])
- with_dhcpcanon=/sbin/dhcpcanon
- fi
-@@ -846,8 +846,8 @@ AC_ARG_WITH([dhclient],
- if test "$with_dhclient" != "no"; then
- with_dhclient_="$with_dhclient"
- AC_PATH_PROGS(with_dhclient, dhclient, no, /sbin:/usr/sbin:/usr/local/sbin)
-- if test "$with_dhclient" == "no"; then
-- if test "$with_dhclient_" == yes; then
-+ if test "$with_dhclient" = "no"; then
-+ if test "$with_dhclient_" = yes; then
- AC_MSG_WARN([dhclient not found, assume path /usr/sbin/dhclient])
- with_dhclient=/usr/sbin/dhclient
- fi
-@@ -865,8 +865,8 @@ AC_ARG_WITH([dhcpcd],
- if test "$with_dhcpcd" != "no"; then
- with_dhcpcd_="$with_dhcpcd"
- AC_PATH_PROGS(with_dhcpcd, dhcpcd, no, /sbin:/usr/sbin:/usr/local/sbin)
-- if test "$with_dhcpcd" == "no"; then
-- if test "$with_dhcpcd_" == yes; then
-+ if test "$with_dhcpcd" = "no"; then
-+ if test "$with_dhcpcd_" = yes; then
- AC_MSG_WARN([dhcpcd not found, assume path /usr/sbin/dhcpcd])
- with_dhcpcd=/usr/sbin/dhcpcd
- fi
-@@ -1192,17 +1192,17 @@ AS_IF([test -z "$with_valgrind"], with_valgrind="no")
- # Normalize values
- AS_IF([test "$enable_tests" != "yes" -a "$enable_tests" != "root"], enable_tests="no")
- # Search for tools
--AS_IF([test "$with_valgrind" == "yes"],
-+AS_IF([test "$with_valgrind" = "yes"],
- [AC_PATH_PROGS(with_valgrind, valgrind, no)])
- # Add conditionals and substitutions
- AM_CONDITIONAL(ENABLE_TESTS, test "$enable_tests" != "no")
--AM_CONDITIONAL(REQUIRE_ROOT_TESTS, test "$enable_tests" == "root")
-+AM_CONDITIONAL(REQUIRE_ROOT_TESTS, test "$enable_tests" = "root")
- AC_ARG_WITH(valgrind-suppressions,
- AS_HELP_STRING([--with-valgrind-suppressions=path], [Use specific valgrind suppression file]))
--if test "$with_valgrind" == no; then
-+if test "$with_valgrind" = no; then
- with_valgrind_suppressions=
- else
-- if test "$with_valgrind_suppressions" == ""; then
-+ if test "$with_valgrind_suppressions" = ""; then
- with_valgrind_suppressions='$(top_srcdir)/valgrind.suppressions'
- fi
- fi
-@@ -1218,7 +1218,7 @@ GTK_DOC_CHECK(1.0)
- build_docs=no
- if test -n "$INTROSPECTION_MAKEFILE"; then
- # If g-i is installed we know we have python, but we might not have pygobject
-- if ! "$PYTHON" -c 'from gi.repository import GObject' >& /dev/null; then
-+ if ! "$PYTHON" -c 'from gi.repository import GObject' > /dev/null 2>&1; then
- AC_MSG_ERROR(["--enable-introspection aims to build the settings documentation. This requires GObject introspection for python (pygobject)])
- fi
-
-diff --git a/m4/introspection.m4 b/m4/introspection.m4
-index f3bda0e..8c64bd0 100644
---- a/m4/introspection.m4
-+++ b/m4/introspection.m4
-@@ -31,7 +31,7 @@ m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
- INTROSPECTION_GIRDIR=
- INTROSPECTION_TYPELIBDIR=
-
-- if test "x$enable_introspection" == "xno"; then
-+ if test "x$enable_introspection" = "xno"; then
- found_introspection="no"
- else
- PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], [
-@@ -53,7 +53,7 @@ m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
- AC_MSG_RESULT([$found_introspection])
- ], [found_introspection="no (not installed)"])
-
-- if test "x$enable_introspection" == "xyes"; then
-+ if test "x$enable_introspection" = "xyes"; then
- if test "x$found_introspection" != "xyes"; then
- AC_MSG_ERROR([introspection enabled but can't be used])
- fi
---
-2.26.2
-
diff --git a/net-misc/networkmanager/files/init.d.NetworkManager-r1 b/net-misc/networkmanager/files/init.d.NetworkManager-r1
deleted file mode 100644
index fad772d..0000000
--- a/net-misc/networkmanager/files/init.d.NetworkManager-r1
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/sbin/openrc-run
-# Copyright (c) 2008 Saleem Abdulrasool <compnerd@compnerd.org>
-# Copyright 2013-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-description="NetworkManager daemon. The service is marked as started only \
-when a network connection is established."
-
-depend() {
- need dbus
- use consolekit
- provide net
-}
-
-start() {
- # If we are re-called by a dispatcher event, we want to mark the service
- # as started without starting the daemon again
- yesno "${IN_BACKGROUND}" && return 0
-
- [ -z "${INACTIVE_TIMEOUT}" ] && INACTIVE_TIMEOUT="1"
-
- ebegin "Starting NetworkManager"
- start-stop-daemon --start --quiet --pidfile /run/NetworkManager/NetworkManager.pid \
- --exec /usr/sbin/NetworkManager -- --pid-file /run/NetworkManager/NetworkManager.pid
- local _retval=$?
- eend "${_retval}"
- if [ "x${_retval}" = 'x0' ] && ! nm-online -t "${INACTIVE_TIMEOUT}"; then
- einfo "Marking NetworkManager as inactive. It will automatically be marked"
- einfo "as started after a network connection has been established."
- mark_service_inactive
- fi
- return "${_retval}"
-}
-
-stop() {
- # If we are re-called by a dispatcher event, we want to mark the service
- # as inactive without stopping the daemon
- if yesno "${IN_BACKGROUND}"; then
- mark_service_inactive "${SVCNAME}"
- return 0
- fi
-
- ebegin "Stopping NetworkManager"
- local pidfile=/run/NetworkManager/NetworkManager.pid
- if [ ! -e "${pidfile}" ] && [ -e /var/run/NetworkManager.pid ]; then
- # Try stopping the pid file used by <0.9.7
- pidfile=/var/run/NetworkManager.pid
- start-stop-daemon --stop --quiet --pidfile "${pidfile}"
- ret=$?
- [ ${ret} = 0 ] && [ -e "${pidfile}" ] && rm "${pidfile}"
- eend ${ret}
- else
- start-stop-daemon --stop --quiet --pidfile "${pidfile}"
- eend $?
- fi
-}
-
-# vim: set ft=gentoo-init-d ts=4 :
diff --git a/net-misc/networkmanager/files/musl-basic.patch b/net-misc/networkmanager/files/musl-basic.patch
index 8b78354..2e0d562 100644
--- a/net-misc/networkmanager/files/musl-basic.patch
+++ b/net-misc/networkmanager/files/musl-basic.patch
@@ -1,30 +1,18 @@
-From d12f0c518b10a3be0357c9242a2491c0904b51d6 Mon Sep 17 00:00:00 2001
-From: Jory Pratt <anarchy@gentoo.org>
-Date: Mon, 29 Jul 2019 23:24:11 -0500
-Subject: [PATCH 1/5] Usual musl fixes
-
----
- shared/systemd/src/basic/sort-util.h | 6 ++++++
- shared/systemd/src/basic/stdio-util.h | 2 ++
- 2 files changed, 8 insertions(+)
-
-diff --git a/shared/systemd/src/basic/sort-util.h b/shared/systemd/src/basic/sort-util.h
-index e029f86..e876241 100644
---- a/shared/systemd/src/basic/sort-util.h
-+++ b/shared/systemd/src/basic/sort-util.h
-@@ -5,6 +5,12 @@
+diff --git a/libnm-core/nm-json.c b/libnm-core/nm-json.c
+index aa181a4..98c39fc 100644
+--- a/libnm-core/nm-json.c
++++ b/libnm-core/nm-json.c
+@@ -23,6 +23,10 @@
- #include "macro.h"
+ #include <dlfcn.h>
-+#if !defined(__GLIBC__)
-+typedef int (*__compar_fn_t) (const void*, const void*);
-+typedef __compar_fn_t comparison_fn_t;
-+typedef int (*__compar_d_fn_t) (const void *, const void *, void *);
++#ifndef RTLD_DEEPBIND
++#define RTLD_DEEPBIND 0
+#endif
+
- void *xbsearch_r(const void *key, const void *base, size_t nmemb, size_t size,
- __compar_d_fn_t compar, void *arg);
-
+ void *_nm_jansson_json_object_iter_value;
+ void *_nm_jansson_json_object_key_to_iter;
+ void *_nm_jansson_json_integer;
diff --git a/shared/systemd/src/basic/stdio-util.h b/shared/systemd/src/basic/stdio-util.h
index c3b9448..e80a938 100644
--- a/shared/systemd/src/basic/stdio-util.h
@@ -39,6 +27,20 @@ index c3b9448..e80a938 100644
#include <stdarg.h>
#include <stdio.h>
#include <sys/types.h>
---
-2.22.0
-
+diff --git a/shared/systemd/src/basic/util.h b/shared/systemd/src/basic/util.h
+index 25e6ab8..7967e8a 100644
+--- a/shared/systemd/src/basic/util.h
++++ b/shared/systemd/src/basic/util.h
+@@ -46,6 +46,12 @@ static inline unsigned u64log2(uint64_t n) {
+ #endif
+ }
+
++#if !defined(__GLIBC__)
++typedef int (*__compar_fn_t) (const void*, const void*);
++typedef __compar_fn_t comparison_fn_t;
++typedef int (*__compar_d_fn_t) (const void *, const void *, void *);
++#endif
++
+ static inline unsigned u32ctz(uint32_t n) {
+ #if __SIZEOF_INT__ == 4
+ return n != 0 ? __builtin_ctz(n) : 32;
diff --git a/net-misc/networkmanager/files/musl-compar.patch b/net-misc/networkmanager/files/musl-compar.patch
new file mode 100644
index 0000000..1b1de2f
--- /dev/null
+++ b/net-misc/networkmanager/files/musl-compar.patch
@@ -0,0 +1,18 @@
+diff --git a/shared/systemd/src/basic/sort-util.h b/shared/systemd/src/basic/sort-util.h
+index e029f86..935f136 100644
+--- a/shared/systemd/src/basic/sort-util.h
++++ b/shared/systemd/src/basic/sort-util.h
+@@ -5,6 +5,13 @@
+
+ #include "macro.h"
+
++#ifndef __COMPAR_FN_T
++# define __COMPAR_FN_T
++typedef int (*__compar_fn_t) (const void *, const void *);
++typedef __compar_fn_t comparison_fn_t;
++typedef int (*__compar_d_fn_t) (const void *, const void *, void *);
++#endif
++
+ void *xbsearch_r(const void *key, const void *base, size_t nmemb, size_t size,
+ __compar_d_fn_t compar, void *arg);
+
diff --git a/net-misc/networkmanager/files/musl-fix-includes.patch b/net-misc/networkmanager/files/musl-fix-includes.patch
index 9ee2f7f..98f8bc2 100644
--- a/net-misc/networkmanager/files/musl-fix-includes.patch
+++ b/net-misc/networkmanager/files/musl-fix-includes.patch
@@ -1,19 +1,18 @@
-From f0d90910d8a8bde7608221b4e34ff12096a4d951 Mon Sep 17 00:00:00 2001
-From: Jory Pratt <anarchy@gentoo.org>
-Date: Mon, 29 Jul 2019 23:25:11 -0500
-Subject: [PATCH 2/5] fix includes for musl
-
----
- src/devices/nm-device.c | 4 ++++
- src/nm-manager.c | 1 +
- src/platform/nm-linux-platform.c | 6 +++++-
- 3 files changed, 10 insertions(+), 1 deletion(-)
-
+--- a/src/NetworkManagerUtils.c 2020-07-17 20:05:45.382005791 +0200
++++ b/src/NetworkManagerUtils.c 2020-07-17 20:05:39.721463542 +0200
+@@ -4,6 +4,7 @@
+ * Copyright (C) 2005 - 2008 Novell, Inc.
+ */
+
++#include <netinet/if_ether.h>
+ #include "nm-default.h"
+
+ #include "NetworkManagerUtils.h"
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
-index 42e4688..3b9da98 100644
+index e7a4a05..7578abf 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
-@@ -32,7 +32,11 @@
+@@ -17,7 +17,11 @@
#include <arpa/inet.h>
#include <fcntl.h>
#include <linux/if_addr.h>
@@ -26,22 +25,22 @@ index 42e4688..3b9da98 100644
#include <linux/pkt_sched.h>
diff --git a/src/nm-manager.c b/src/nm-manager.c
-index 7d77144..dc143ba 100644
+index 132cf5a..0dd71dd 100644
--- a/src/nm-manager.c
+++ b/src/nm-manager.c
-@@ -26,6 +26,7 @@
- #include <stdlib.h>
- #include <fcntl.h>
- #include <unistd.h>
+@@ -15,6 +15,7 @@
+ #include <sys/stat.h>
+ #include <sys/sendfile.h>
+ #include <limits.h>
+#include <asm/types.h>
#include "nm-glib-aux/nm-c-list.h"
diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c
-index 7d66a88..b9a7b30 100644
+index 305ae52..10cfec6 100644
--- a/src/platform/nm-linux-platform.c
+++ b/src/platform/nm-linux-platform.c
-@@ -20,6 +20,7 @@
+@@ -6,6 +6,7 @@
#include "nm-default.h"
#include "nm-linux-platform.h"
@@ -49,7 +48,7 @@ index 7d66a88..b9a7b30 100644
#include <arpa/inet.h>
#include <dlfcn.h>
-@@ -28,7 +29,11 @@
+@@ -14,7 +15,11 @@
#include <libudev.h>
#include <linux/fib_rules.h>
#include <linux/ip.h>
@@ -61,14 +60,31 @@ index 7d66a88..b9a7b30 100644
#include <linux/if_bridge.h>
#include <linux/if_link.h>
#include <linux/if_tun.h>
-@@ -58,7 +63,6 @@
- #include "nm-platform-private.h"
- #include "wifi/nm-wifi-utils.h"
- #include "wifi/nm-wifi-utils-wext.h"
--#include "wpan/nm-wpan-utils.h"
- #include "nm-glib-aux/nm-io-utils.h"
- #include "nm-udev-aux/nm-udev-utils.h"
+diff --git a/src/systemd/src/libsystemd-network/sd-dhcp6-client.c b/src/systemd/src/libsystemd-network/sd-dhcp6-client.c
+index e1150f9..3cb8390 100644
+--- a/src/systemd/src/libsystemd-network/sd-dhcp6-client.c
++++ b/src/systemd/src/libsystemd-network/sd-dhcp6-client.c
+@@ -7,7 +7,11 @@
+
+ #include <errno.h>
+ #include <sys/ioctl.h>
++#if defined(__GLIBC__)
+ #include <linux/if_arp.h>
++#else
++#include <linux/if.h>
++#endif
+ #include <linux/if_infiniband.h>
+
+ #include "sd-dhcp6-client.h"
+diff --git a/src/devices/nm-device-bridge.c b/src/devices/nm-device-bridge.c
+index c93c6a5..66d2532 100644
+--- a/src/devices/nm-device-bridge.c
++++ b/src/devices/nm-device-bridge.c
+@@ -15,6 +15,8 @@
+ #include "nm-device-factory.h"
+ #include "nm-core-internal.h"
---
-2.22.0
-
++#include <linux/if_ether.h>
++
+ #include "nm-device-logging.h"
+ _LOG_DECLARE_SELF(NMDeviceBridge);
diff --git a/net-misc/networkmanager/files/musl-network-support.patch b/net-misc/networkmanager/files/musl-network-support.patch
index ca242e2..36536df 100644
--- a/net-misc/networkmanager/files/musl-network-support.patch
+++ b/net-misc/networkmanager/files/musl-network-support.patch
@@ -1,16 +1,3 @@
-From e5e2e822a6daab4af1710fb8044072dc2327d002 Mon Sep 17 00:00:00 2001
-From: Jory Pratt <anarchy@gentoo.org>
-Date: Mon, 29 Jul 2019 23:26:46 -0500
-Subject: [PATCH 4/5] add network support for musl libc
-
----
- libnm-core/nm-utils.h | 4 ++++
- shared/systemd/src/basic/socket-util.h | 5 +++++
- src/platform/wifi/nm-wifi-utils.h | 4 ++++
- 3 files changed, 13 insertions(+)
-
-diff --git a/libnm-core/nm-utils.h b/libnm-core/nm-utils.h
-index 2b5baba..976850c 100644
--- a/libnm-core/nm-utils.h
+++ b/libnm-core/nm-utils.h
@@ -30,7 +30,11 @@
@@ -25,24 +12,6 @@ index 2b5baba..976850c 100644
#include <linux/if_infiniband.h>
#include "nm-core-enum-types.h"
-diff --git a/shared/systemd/src/basic/socket-util.h b/shared/systemd/src/basic/socket-util.h
-index 15443f1..b9c3291 100644
---- a/shared/systemd/src/basic/socket-util.h
-+++ b/shared/systemd/src/basic/socket-util.h
-@@ -12,6 +12,11 @@
- #include <sys/socket.h>
- #include <sys/types.h>
- #include <sys/un.h>
-+#if !defined(__GLIBC__)
-+/* SIOCGSTAMPNS from linux/asm-generic.h
-+ * for src/systemd/src/libsystemd-network/sd-lldp.c */
-+#include <linux/sockios.h>
-+#endif
-
- #include "macro.h"
- #include "missing_socket.h"
-diff --git a/src/platform/wifi/nm-wifi-utils.h b/src/platform/wifi/nm-wifi-utils.h
-index 36148b5..d282eb2 100644
--- a/src/platform/wifi/nm-wifi-utils.h
+++ b/src/platform/wifi/nm-wifi-utils.h
@@ -22,7 +22,11 @@
@@ -56,7 +25,18 @@ index 36148b5..d282eb2 100644
+#endif
#include "nm-dbus-interface.h"
- #include "nm-setting-wireless.h"
---
-2.22.0
-
+
+--- a/shared/systemd/src/basic/socket-util.h 2019-03-16 15:41:33.287235649 +0100
++++ b/shared/systemd/src/basic/socket-util.h 2019-03-16 15:42:24.273912106 +0100
+@@ -12,6 +12,11 @@
+ #include <sys/socket.h>
+ #include <sys/types.h>
+ #include <sys/un.h>
++#if !defined(__GLIBC__)
++/* SIOCGSTAMPNS from linux/asm-generic.h
++ * for src/systemd/src/libsystemd-network/sd-lldp.c */
++#include <linux/sockios.h>
++#endif
+
+ #include "macro.h"
+ #include "missing_socket.h"
diff --git a/net-misc/networkmanager/files/musl-no-drand.patch b/net-misc/networkmanager/files/musl-no-drand.patch
new file mode 100644
index 0000000..46e3a79
--- /dev/null
+++ b/net-misc/networkmanager/files/musl-no-drand.patch
@@ -0,0 +1,58 @@
+From ec471e66ee14d7da06d4d0a22bc3cdb5f615fd6f Mon Sep 17 00:00:00 2001
+From: Enno Boland <g@s01.de>
+Date: Wed, 7 Aug 2019 16:51:16 +0200
+Subject: [PATCH] use jrand48 instead of mrand48_r on non glibc platforms
+
+---
+ shared/n-dhcp4/src/n-dhcp4-c-probe.c | 8 ++++++++
+ shared/n-dhcp4/src/n-dhcp4-private.h | 4 ++++
+ 2 files changed, 12 insertions(+)
+
+diff --git a/shared/n-dhcp4/src/n-dhcp4-c-probe.c b/shared/n-dhcp4/src/n-dhcp4-c-probe.c
+index 308cff8307..9463528b1f 100644
+--- a/shared/n-dhcp4/src/n-dhcp4-c-probe.c
++++ b/shared/n-dhcp4/src/n-dhcp4-c-probe.c
+@@ -362,8 +362,12 @@ static void n_dhcp4_client_probe_config_initialize_random_seed(NDhcp4ClientProbe
+ seed16v[1] = (u64 >> 16) ^ (u64 >> 0);
+ seed16v[2] = (u64 >> 32) ^ (u64 >> 16);
+
++#ifdef __GLIBC__
+ r = seed48_r(seed16v, &config->entropy);
+ c_assert(!r);
++#else
++ memcpy(config->entropy, seed16v, sizeof seed16v);
++#endif
+ }
+
+ /**
+@@ -377,10 +381,14 @@ static void n_dhcp4_client_probe_config_initialize_random_seed(NDhcp4ClientProbe
+ */
+ uint32_t n_dhcp4_client_probe_config_get_random(NDhcp4ClientProbeConfig *config) {
+ long int result;
++#ifdef __GLIBC__
+ int r;
+
+ r = mrand48_r(&config->entropy, &result);
+ c_assert(!r);
++#else
++ result = jrand48(config->entropy);
++#endif
+
+ return result;
+ };
+diff --git a/shared/n-dhcp4/src/n-dhcp4-private.h b/shared/n-dhcp4/src/n-dhcp4-private.h
+index c38ddbfc80..fb48807712 100644
+--- a/shared/n-dhcp4/src/n-dhcp4-private.h
++++ b/shared/n-dhcp4/src/n-dhcp4-private.h
+@@ -259,7 +259,11 @@ struct NDhcp4ClientProbeConfig {
+ bool inform_only;
+ bool init_reboot;
+ struct in_addr requested_ip;
++#ifdef __GLIBC__
+ struct drand48_data entropy; /* entropy pool */
++#else
++ unsigned short entropy[3]; /* entropy pool */
++#endif
+ uint64_t ms_start_delay; /* max ms to wait before starting probe */
+ NDhcp4ClientProbeOption *options[UINT8_MAX + 1];
+ int8_t request_parameters[UINT8_MAX + 1];
diff --git a/net-misc/networkmanager/files/musl-process-util.patch b/net-misc/networkmanager/files/musl-process-util.patch
index 6267019..0eb0057 100644
--- a/net-misc/networkmanager/files/musl-process-util.patch
+++ b/net-misc/networkmanager/files/musl-process-util.patch
@@ -1,14 +1,3 @@
-From 23613c07ff805744aaee22c352b24731ec4b2c69 Mon Sep 17 00:00:00 2001
-From: Jory Pratt <anarchy@gentoo.org>
-Date: Mon, 29 Jul 2019 23:27:58 -0500
-Subject: [PATCH 5/5] musl process util
-
----
- shared/systemd/src/basic/process-util.c | 12 +++++++++++-
- 1 file changed, 11 insertions(+), 1 deletion(-)
-
-diff --git a/shared/systemd/src/basic/process-util.c b/shared/systemd/src/basic/process-util.c
-index 7431be3..f9e6d49 100644
--- a/shared/systemd/src/basic/process-util.c
+++ b/shared/systemd/src/basic/process-util.c
@@ -21,6 +21,9 @@
@@ -21,7 +10,7 @@ index 7431be3..f9e6d49 100644
#if 0 /* NM_IGNORED */
#if HAVE_VALGRIND_VALGRIND_H
#include <valgrind/valgrind.h>
-@@ -1183,11 +1186,13 @@ void reset_cached_pid(void) {
+@@ -1168,11 +1171,13 @@ void reset_cached_pid(void) {
cached_pid = CACHED_PID_UNSET;
}
@@ -35,7 +24,7 @@ index 7431be3..f9e6d49 100644
pid_t getpid_cached(void) {
static bool installed = false;
-@@ -1216,7 +1221,12 @@ pid_t getpid_cached(void) {
+@@ -1201,7 +1206,12 @@ pid_t getpid_cached(void) {
* only half-documented (glibc doesn't document it but LSB does — though only superficially)
* we'll check for errors only in the most generic fashion possible. */
@@ -49,6 +38,3 @@ index 7431be3..f9e6d49 100644
/* OOM? Let's try again later */
cached_pid = CACHED_PID_UNSET;
return new_pid;
---
-2.22.0
-
diff --git a/net-misc/networkmanager/files/networkmanager-data-fix-the-ID_NET_DRIVER-udev-rule.patch b/net-misc/networkmanager/files/networkmanager-data-fix-the-ID_NET_DRIVER-udev-rule.patch
deleted file mode 100644
index 1b94ab4..0000000
--- a/net-misc/networkmanager/files/networkmanager-data-fix-the-ID_NET_DRIVER-udev-rule.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 27d380b70ea839c7badab420361e4e65e023e8e9 Mon Sep 17 00:00:00 2001
-From: Lubomir Rintel <lkundrak@v3.sk>
-Date: Fri, 16 Aug 2019 13:22:09 +0200
-Subject: [PATCH] data: fix the ID_NET_DRIVER udev rule
-
-Systemd v243 is complaining about the wrong substitution there. That is
-sort of harmless, because systemd-udevd in that version doesn't need the
-rule anyway. But still fix it, to avoid a warning.
-
-Also, newer udevd's $PATH doesn't include sbin. That is also okay,
-because we don't need the rule to actually work there. But fix it
-anyway.
-
-https://bugzilla.redhat.com/show_bug.cgi?id=1740655
----
- data/84-nm-drivers.rules | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/data/84-nm-drivers.rules b/data/84-nm-drivers.rules
-index d246ef6ce..e398cb9f2 100644
---- a/data/84-nm-drivers.rules
-+++ b/data/84-nm-drivers.rules
-@@ -7,6 +7,6 @@ ACTION!="add|change", GOTO="nm_drivers_end"
- # Determine ID_NET_DRIVER if there's no ID_NET_DRIVER or DRIVERS (old udev?)
- ENV{ID_NET_DRIVER}=="?*", GOTO="nm_drivers_end"
- DRIVERS=="?*", GOTO="nm_drivers_end"
--PROGRAM="/bin/sh -c 'ethtool -i $1 | sed -n s/^driver:\ //p' -- $env{INTERFACE}", RESULT=="?*", ENV{ID_NET_DRIVER}="%c"
-+PROGRAM="/bin/sh -c '/usr/sbin/ethtool -i $$1 |/usr/bin/sed -n s/^driver:\ //p' -- $env{INTERFACE}", ENV{ID_NET_DRIVER}="%c"
-
- LABEL="nm_drivers_end"
---
-2.21.0
-
diff --git a/net-misc/networkmanager/networkmanager-1.18.6.ebuild b/net-misc/networkmanager/networkmanager-1.26.0.ebuild
index 3a90c0c..89691ae 100644
--- a/net-misc/networkmanager/networkmanager-1.18.6.ebuild
+++ b/net-misc/networkmanager/networkmanager-1.26.0.ebuild
@@ -3,10 +3,9 @@
EAPI=6
GNOME_ORG_MODULE="NetworkManager"
-GNOME2_EAUTORECONF="yes"
GNOME2_LA_PUNT="yes"
VALA_USE_DEPEND="vapigen"
-PYTHON_COMPAT=( python{3_6,3_7} )
+PYTHON_COMPAT=( python3_{6,7,8} )
inherit bash-completion-r1 gnome2 linux-info multilib python-any-r1 systemd readme.gentoo-r1 vala virtualx udev multilib-minimal
@@ -14,9 +13,9 @@ DESCRIPTION="A set of co-operative tools that make networking simple and straigh
HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager"
LICENSE="GPL-2+"
-SLOT="0" # add subslot if libnm-util.so.2 or libnm-glib.so.4 bumps soname version
+SLOT="0"
-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"
+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"
RESTRICT="!test? ( test )"
REQUIRED_USE="
@@ -28,13 +27,11 @@ REQUIRED_USE="
?? ( consolekit elogind systemd )
"
-KEYWORDS="~alpha amd64 arm arm64 ~ia64 ppc ~ppc64 ~sparc x86"
+KEYWORDS="amd64 arm arm64 ~ppc ~ppc64 x86"
# gobject-introspection-0.10.3 is needed due to gnome bug 642300
# wpa_supplicant-0.7.3-r3 is needed due to bug 359271
COMMON_DEPEND="
- >=sys-apps/dbus-1.2[${MULTILIB_USEDEP}]
- >=dev-libs/dbus-glib-0.100[${MULTILIB_USEDEP}]
>=dev-libs/glib-2.40:2[${MULTILIB_USEDEP}]
policykit? ( >=sys-auth/polkit-0.106 )
net-libs/libndp[${MULTILIB_USEDEP}]
@@ -54,7 +51,8 @@ COMMON_DEPEND="
elogind? ( >=sys-auth/elogind-219 )
introspection? ( >=dev-libs/gobject-introspection-0.10.3:= )
json? ( >=dev-libs/jansson-2.5[${MULTILIB_USEDEP}] )
- modemmanager? ( >=net-misc/modemmanager-0.7.991:0= )
+ modemmanager? ( >=net-misc/modemmanager-0.7.991:0=
+ net-misc/mobile-broadband-provider-info )
ncurses? ( >=dev-libs/newt-0.52.15 )
nss? ( >=dev-libs/nss-3.11:=[${MULTILIB_USEDEP}] )
!nss? ( gnutls? (
@@ -104,15 +102,13 @@ DEPEND="${COMMON_DEPEND}
"
PATCHES=(
- "${FILESDIR}"/${PN}-data-fix-the-ID_NET_DRIVER-udev-rule.patch
- "${FILESDIR}"/1.18.4-iwd1-compat.patch # included in 1.21.3+
- "${FILESDIR}"/${PV}-fix-bashisms.patch
-
# Required to build on musl
"${FILESDIR}"/musl-basic.patch
"${FILESDIR}"/musl-network-support.patch
"${FILESDIR}"/musl-fix-includes.patch
"${FILESDIR}"/musl-process-util.patch
+ "${FILESDIR}"/musl-compar.patch
+ "${FILESDIR}"/musl-no-drand.patch
)
python_check_deps() {
@@ -178,20 +174,18 @@ multilib_src_configure() {
--disable-more-warnings
--disable-static
--localstatedir=/var
+ --with-runstatedir=/run
--disable-lto
- --disable-config-plugin-ibft
--disable-qt
--without-netconfig
--with-dbus-sys-dir=/etc/dbus-1/system.d
- # We need --with-libnm-glib (and dbus-glib dep) as reverse deps are
- # still not ready for removing that lib, bug #665338
- --with-libnm-glib
$(multilib_native_with nmcli)
--with-udev-dir="$(get_udevdir)"
--with-config-plugins-default=keyfile
--with-iptables=/sbin/iptables
--with-ebpf=yes
$(multilib_native_enable concheck)
+ --with-nm-cloud-setup=$(multilib_is_native_abi && echo yes || echo no)
--with-crypto=$(usex nss nss gnutls)
--with-session-tracking=$(multilib_native_usex systemd systemd $(multilib_native_usex elogind elogind $(multilib_native_usex consolekit consolekit no)))
# ConsoleKit has no build-time dependency, so use it as the default case.
@@ -199,8 +193,10 @@ multilib_src_configure() {
--with-suspend-resume=$(multilib_native_usex systemd systemd $(multilib_native_usex elogind elogind consolekit))
$(multilib_native_use_with audit libaudit)
$(multilib_native_use_enable bluetooth bluez5-dun)
+ --without-dhcpcanon
$(use_with dhclient)
$(use_with dhcpcd)
+ --with-config-dhcp-default=internal
$(multilib_native_use_enable introspection)
$(use_enable json json-validation)
$(multilib_native_use_enable ppp)
@@ -210,7 +206,6 @@ multilib_src_configure() {
$(multilib_native_use_with ofono)
$(multilib_native_use_enable ovs)
$(multilib_native_use_enable policykit polkit)
- $(multilib_native_use_enable policykit polkit-agent)
$(multilib_native_use_with resolvconf)
$(multilib_native_use_with selinux)
$(multilib_native_use_with systemd systemd-journal)
@@ -241,7 +236,7 @@ multilib_src_configure() {
ln -s "${S}/man" man || die
fi
- ECONF_SOURCE=${S} runstatedir="/run" gnome2_src_configure "${myconf[@]}"
+ ECONF_SOURCE=${S} gnome2_src_configure "${myconf[@]}"
}
multilib_src_compile() {
@@ -250,9 +245,6 @@ multilib_src_compile() {
else
local targets=(
libnm/libnm.la
- libnm-util/libnm-util.la
- libnm-glib/libnm-glib.la
- libnm-glib/libnm-glib-vpn.la
)
emake "${targets[@]}"
fi
@@ -274,14 +266,7 @@ multilib_src_install() {
else
local targets=(
install-libLTLIBRARIES
- install-libdeprecatedHEADERS
- install-libnm_glib_libnmvpnHEADERS
- install-libnm_glib_libnmincludeHEADERS
- install-libnm_util_libnm_util_includeHEADERS
install-libnmincludeHEADERS
- install-nodist_libnm_glib_libnmincludeHEADERS
- install-nodist_libnm_glib_libnmvpnHEADERS
- install-nodist_libnm_util_libnm_util_includeHEADERS
install-nodist_libnmincludeHEADERS
install-pkgconfigDATA
)
@@ -354,4 +339,12 @@ pkg_postinst() {
ewarn "either reconfigure affected networks or, at least, set the flag"
ewarn "value to '0'."
fi
+
+ if use dhclient || use dhcpcd; then
+ ewarn "You have enabled USE=dhclient and/or USE=dhcpcd, but NetworkManager since"
+ ewarn "version 1.20 defaults to the internal DHCP client. If the internal client"
+ ewarn "works for you, and you're happy with, the alternative USE flags can be"
+ ewarn "disabled. If you want to use dhclient or dhcpcd, then you need to tweak"
+ ewarn "the main.dhcp configuration option to use one of them instead of internal."
+ fi
}