From 460820f73fc35929226bd6be55464ca05511cc01 Mon Sep 17 00:00:00 2001 From: cinerea0 Date: Mon, 15 Mar 2021 22:55:17 -0400 Subject: [PATCH] NetworkManager: update to 1.30.2 --- .../patches/fix-cross-gir.patch | 67 ++++++------------- .../patches/fix-musl-linux-header.diff | 15 ----- .../patches/fix-musl-qsort_r.patch | 16 ----- .../NetworkManager/patches/musl-basic.patch | 29 -------- .../patches/musl-fix-includes.patch | 54 --------------- .../patches/musl-network-support.patch | 42 ------------ .../patches/musl-process-util.patch | 40 ----------- .../patches/musl-use-srand48.patch | 40 ----------- srcpkgs/NetworkManager/template | 18 ++--- 9 files changed, 28 insertions(+), 293 deletions(-) delete mode 100644 srcpkgs/NetworkManager/patches/fix-musl-linux-header.diff delete mode 100644 srcpkgs/NetworkManager/patches/fix-musl-qsort_r.patch delete mode 100644 srcpkgs/NetworkManager/patches/musl-basic.patch delete mode 100644 srcpkgs/NetworkManager/patches/musl-fix-includes.patch delete mode 100644 srcpkgs/NetworkManager/patches/musl-network-support.patch delete mode 100644 srcpkgs/NetworkManager/patches/musl-process-util.patch delete mode 100644 srcpkgs/NetworkManager/patches/musl-use-srand48.patch diff --git a/srcpkgs/NetworkManager/patches/fix-cross-gir.patch b/srcpkgs/NetworkManager/patches/fix-cross-gir.patch index c283d4dc1059..c0b4344b1c15 100644 --- a/srcpkgs/NetworkManager/patches/fix-cross-gir.patch +++ b/srcpkgs/NetworkManager/patches/fix-cross-gir.patch @@ -1,52 +1,29 @@ Reason: Fix crossbuilding GIR Upstream: No, not upstreamable since this is very specific to the Void setup -diff --git clients/common/meson.build clients/common/meson.build -index afa257b..50b53e7 100644 ---- clients/common/meson.build -+++ clients/common/meson.build -@@ -35,7 +35,7 @@ if enable_introspection - settings_docs, - input: nm_property_docs, - output: settings_docs, -- command: [xsltproc, '--output', '@OUTPUT@', join_paths(meson.current_source_dir(), 'settings-docs.xsl'), '@INPUT@'], -+ command: [xsltproc, '--output', '@OUTPUT@', join_paths(meson.current_source_dir(), 'settings-docs.xsl'), join_paths(meson.current_source_dir(), '..', '..', '@INPUT@')], - ) - - test( -diff --git libnm/meson.build libnm/meson.build -index 51ca46d..f14d861 100644 ---- libnm/meson.build -+++ libnm/meson.build -@@ -236,7 +236,13 @@ if enable_introspection - ) - endif - -- generate_setting_docs = join_paths(meson.current_source_dir(), 'generate-setting-docs.py') +--- libnm/meson.build.orig 2020-12-28 16:03:30.641850261 +0100 ++++ libnm/meson.build 2020-12-28 16:31:54.932136481 +0100 +@@ -276,6 +276,14 @@ + 'GI_TYPELIB_PATH=' + gi_typelib_path, + 'LD_LIBRARY_PATH=' + ld_library_path, + ] ++ + if meson.is_cross_build() + qemu = '/usr/bin/qemu-@XBPS_TARGET_QEMU_MACHINE@-static' -+ qemu_python3_cmd = qemu + ' -L @XBPS_CROSS_BASE@ @XBPS_CROSS_BASE@/usr/bin/python3' -+ generate_setting_docs = ['sh', '-c', qemu_python3_cmd, join_paths(meson.current_source_dir(), 'generate-setting-docs.py')] ++ qemu_python3_cmd = qemu + ' -L @XBPS_CROSS_BASE@ @XBPS_CROSS_BASE@/bin/python3' ++ generate_setting_docs = ['sh', '-c', qemu_python3_cmd, join_paths(meson.source_root(), 'tools', 'generate-docs-nm-settings-docs-gir.py')] + else -+ generate_setting_docs = [python.path(), join_paths(meson.current_source_dir(), 'generate-setting-docs.py')] ++ generate_setting_docs = [python.path(), join_paths(meson.source_root(), 'tools', 'generate-docs-nm-settings-docs-gir.py')] + endif - gi_typelib_path = run_command('printenv', 'GI_TYPELIB_PATH').stdout() - if gi_typelib_path != '' -@@ -261,7 +267,7 @@ if enable_introspection - name, - input: libnm_gir[0], - output: name, -- command: [generate_setting_docs_env, python.path(), generate_setting_docs, '--lib-path', meson.current_build_dir(), '--gir', '@INPUT@', '--output', '@OUTPUT@'], -+ command: [generate_setting_docs_env, generate_setting_docs, '--lib-path', meson.current_build_dir(), '--gir', '@INPUT@', '--output', '@OUTPUT@'], - depends: libnm_gir, - ) - -@@ -270,7 +276,7 @@ if enable_introspection - name, - input: [libnm_gir[0], nm_settings_docs_overrides], - output: name, -- command: [generate_setting_docs_env, python.path(), generate_setting_docs, '--lib-path', meson.current_build_dir(), '--gir', '@INPUT0@', '--overrides', '@INPUT1@', '--output', '@OUTPUT@'], -+ command: [generate_setting_docs_env, generate_setting_docs, '--lib-path', meson.current_build_dir(), '--gir', '@INPUT0@', '--overrides', '@INPUT1@', '--output', '@OUTPUT@'], - depends: libnm_gir, - ) - endif + nm_settings_docs_xml_gir = custom_target( + 'nm-settings-docs-gir.xml', +@@ -283,8 +291,7 @@ + output: 'nm-settings-docs-gir.xml', + command: [ + generate_setting_docs_env, +- python.path(), +- join_paths(meson.source_root(), 'tools', 'generate-docs-nm-settings-docs-gir.py'), ++ generate_setting_docs, + '--lib-path', meson.current_build_dir(), + '--gir', '@INPUT@', + '--output', '@OUTPUT@' diff --git a/srcpkgs/NetworkManager/patches/fix-musl-linux-header.diff b/srcpkgs/NetworkManager/patches/fix-musl-linux-header.diff deleted file mode 100644 index 511759214a97..000000000000 --- a/srcpkgs/NetworkManager/patches/fix-musl-linux-header.diff +++ /dev/null @@ -1,15 +0,0 @@ -diff --git src/systemd/src/libsystemd-network/sd-dhcp6-client.c src/systemd/src/libsystemd-network/sd-dhcp6-client.c -index f67a45bd2..ec11fa605 100644 ---- src/systemd/src/libsystemd-network/sd-dhcp6-client.c -+++ src/systemd/src/libsystemd-network/sd-dhcp6-client.c -@@ -8,8 +8,10 @@ - #include - #include - #include -+#ifdef __GLIBC__ - #include - #include -+#endif - - #include "sd-dhcp6-client.h" - diff --git a/srcpkgs/NetworkManager/patches/fix-musl-qsort_r.patch b/srcpkgs/NetworkManager/patches/fix-musl-qsort_r.patch deleted file mode 100644 index f89eac778502..000000000000 --- a/srcpkgs/NetworkManager/patches/fix-musl-qsort_r.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git shared/systemd/src/basic/sort-util.h shared/systemd/src/basic/sort-util.h -index e029f8646..168735087 100644 ---- shared/systemd/src/basic/sort-util.h -+++ shared/systemd/src/basic/sort-util.h -@@ -60,7 +60,11 @@ static inline void qsort_r_safe(void *base, size_t nmemb, size_t size, __compar_ - return; - - assert(base); -+#ifdef __GLIBC__ - qsort_r(base, nmemb, size, compar, userdata); -+#else -+ g_qsort_with_data(base, nmemb, size, compar, userdata); -+#endif - } - - #define typesafe_qsort_r(p, n, func, userdata) \ diff --git a/srcpkgs/NetworkManager/patches/musl-basic.patch b/srcpkgs/NetworkManager/patches/musl-basic.patch deleted file mode 100644 index 63ea93ada585..000000000000 --- a/srcpkgs/NetworkManager/patches/musl-basic.patch +++ /dev/null @@ -1,29 +0,0 @@ -Usual fix for musl libc ---- shared/systemd/src/basic/stdio-util.h.orig -+++ shared/systemd/src/basic/stdio-util.h -@@ -19,7 +19,9 @@ - along with systemd; If not, see . - ***/ - -+#if defined(__GLIBC__) - #include -+#endif - #include - #include - #include - ---- shared/systemd/src/basic/sort-util.h 2019-06-09 17:02:48.895695896 +0200 -+++ shared/systemd/src/basic/sort-util.h 2019-06-09 17:03:27.564199937 +0200 -@@ -5,6 +5,12 @@ - - #include "macro.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 *); -+#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/srcpkgs/NetworkManager/patches/musl-fix-includes.patch b/srcpkgs/NetworkManager/patches/musl-fix-includes.patch deleted file mode 100644 index 95ffb2d354ea..000000000000 --- a/srcpkgs/NetworkManager/patches/musl-fix-includes.patch +++ /dev/null @@ -1,54 +0,0 @@ ---- src/devices/nm-device.c.orig 2019-12-17 08:59:49.000000000 +0100 -+++ src/devices/nm-device.c 2020-01-06 17:29:08.678242168 +0100 -@@ -17,7 +17,11 @@ - #include - #include - #include -+#if defined(__GLIBC__) - #include -+#else -+#include -+#endif - #include - #include - ---- src/nm-manager.c.orig 2020-01-06 17:29:08.682242177 +0100 -+++ src/nm-manager.c 2020-01-06 17:30:50.378482034 +0100 -@@ -15,6 +15,7 @@ - #include - #include - #include -+#include - - #include "nm-glib-aux/nm-c-list.h" - ---- src/platform/nm-linux-platform.c.orig 2019-12-17 08:59:49.000000000 +0100 -+++ src/platform/nm-linux-platform.c 2020-01-06 17:29:08.686242186 +0100 -@@ -6,6 +6,7 @@ - #include "nm-default.h" - - #include "nm-linux-platform.h" -+#include "wpan/nm-wpan-utils.h" - - #include - #include -@@ -14,7 +15,11 @@ - #include - #include - #include -+#if defined(__GLIBC__) - #include -+#else -+#include -+#endif - #include - #include - #include -@@ -44,7 +49,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/srcpkgs/NetworkManager/patches/musl-network-support.patch b/srcpkgs/NetworkManager/patches/musl-network-support.patch deleted file mode 100644 index 0fb63f067b17..000000000000 --- a/srcpkgs/NetworkManager/patches/musl-network-support.patch +++ /dev/null @@ -1,42 +0,0 @@ ---- libnm-core/nm-utils.h.orig -+++ libnm-core/nm-utils.h -@@ -30,7 +30,11 @@ - #include - - /* For ETH_ALEN and INFINIBAND_ALEN */ -+#if defined(__GLIBC__) - #include -+#else -+#define ETH_ALEN 6 /* Octets in one ethernet addr */ -+#endif - #include - - #include "nm-core-enum-types.h" ---- src/platform/wifi/nm-wifi-utils.h.orig -+++ src/platform/wifi/nm-wifi-utils.h -@@ -22,7 +22,11 @@ - #ifndef __WIFI_UTILS_H__ - #define __WIFI_UTILS_H__ - -+#if defined(__GLIBC__) - #include -+#else /* musl libc */ -+#define ETH_ALEN 6 /* Octets in one ethernet addr */ -+#endif - - #include "nm-dbus-interface.h" - ---- shared/systemd/src/basic/socket-util.h 2019-03-16 15:41:33.287235649 +0100 -+++ shared/systemd/src/basic/socket-util.h 2019-03-16 15:42:24.273912106 +0100 -@@ -12,6 +12,11 @@ - #include - #include - #include -+#if !defined(__GLIBC__) -+/* SIOCGSTAMPNS from linux/asm-generic.h -+ * for src/systemd/src/libsystemd-network/sd-lldp.c */ -+#include -+#endif - - #include "macro.h" - #include "missing_socket.h" diff --git a/srcpkgs/NetworkManager/patches/musl-process-util.patch b/srcpkgs/NetworkManager/patches/musl-process-util.patch deleted file mode 100644 index e406de1da850..000000000000 --- a/srcpkgs/NetworkManager/patches/musl-process-util.patch +++ /dev/null @@ -1,40 +0,0 @@ ---- shared/systemd/src/basic/process-util.c -+++ shared/systemd/src/basic/process-util.c -@@ -21,6 +21,9 @@ - #include - #include - #include -+#ifndef __GLIBC__ -+#include -+#endif - #if 0 /* NM_IGNORED */ - #if HAVE_VALGRIND_VALGRIND_H - #include -@@ -1168,11 +1171,13 @@ void reset_cached_pid(void) { - cached_pid = CACHED_PID_UNSET; - } - -+#ifdef __GLIBC__ - /* We use glibc __register_atfork() + __dso_handle directly here, as they are not included in the glibc - * headers. __register_atfork() is mostly equivalent to pthread_atfork(), but doesn't require us to link against - * libpthread, as it is part of glibc anyway. */ - extern int __register_atfork(void (*prepare) (void), void (*parent) (void), void (*child) (void), void *dso_handle); - extern void* __dso_handle _weak_; -+#endif - - pid_t getpid_cached(void) { - static bool installed = false; -@@ -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. */ - -- if (__register_atfork(NULL, NULL, reset_cached_pid, __dso_handle) != 0) { -+ #ifdef __GLIBC__ -+ if (__register_atfork(NULL, NULL, reset_cached_pid, __dso_handle) != 0) { -+ #else -+ if (pthread_atfork(NULL, NULL, reset_cached_pid) != 0) { -+ #endif -+ - /* OOM? Let's try again later */ - cached_pid = CACHED_PID_UNSET; - return new_pid; diff --git a/srcpkgs/NetworkManager/patches/musl-use-srand48.patch b/srcpkgs/NetworkManager/patches/musl-use-srand48.patch deleted file mode 100644 index 43b689f3bad1..000000000000 --- a/srcpkgs/NetworkManager/patches/musl-use-srand48.patch +++ /dev/null @@ -1,40 +0,0 @@ ---- shared/n-dhcp4/src/n-dhcp4-c-probe.c.orig 2020-01-06 15:35:10.128600647 +0100 -+++ shared/n-dhcp4/src/n-dhcp4-c-probe.c 2020-01-06 15:39:41.446240531 +0100 -@@ -362,7 +362,12 @@ static void n_dhcp4_client_probe_config_ - seed16v[1] = (u64 >> 16) ^ (u64 >> 0); - seed16v[2] = (u64 >> 32) ^ (u64 >> 16); - -+#ifdef __GLIBC__ - r = seed48_r(seed16v, &config->entropy); -+#else -+ r = 0; -+ seed48(seed16v); -+#endif - c_assert(!r); - } - -@@ -379,7 +384,12 @@ uint32_t n_dhcp4_client_probe_config_get - long int result; - int r; - -+#ifdef __GLIBC__ - r = mrand48_r(&config->entropy, &result); -+#else -+ r = 0; -+ result = mrand48(); -+#endif - c_assert(!r); - - return result; ---- shared/n-dhcp4/src/n-dhcp4-private.h.orig 2020-01-06 15:41:31.941501136 +0100 -+++ shared/n-dhcp4/src/n-dhcp4-private.h 2020-01-06 15:41:55.341556325 +0100 -@@ -267,7 +267,9 @@ struct NDhcp4ClientProbeConfig { - bool inform_only; - bool init_reboot; - struct in_addr requested_ip; -+#ifdef __GLIBC__ - struct drand48_data entropy; /* 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/srcpkgs/NetworkManager/template b/srcpkgs/NetworkManager/template index e482bba98de7..614beaeb2bb6 100644 --- a/srcpkgs/NetworkManager/template +++ b/srcpkgs/NetworkManager/template @@ -1,9 +1,9 @@ # Template file for 'NetworkManager' -# when updating to 1.24 or newer, drop the compat -# patch in gnome-control-center and rebuild it +# when updating, drop 'nm122.patch' in gnome-control-center and rebuild it +# if it builds, revbump it without the patch pkgname=NetworkManager -version=1.22.10 -revision=2 +version=1.30.2 +revision=1 build_style=meson build_helper="gir qemu" configure_args="-Dpolkit_agent=true -Dsystemd_journal=false @@ -35,16 +35,10 @@ maintainer="Enno Boland " license="GPL-2.0-or-later" homepage="https://wiki.gnome.org/Projects/NetworkManager" distfiles="${GNOME_SITE}/${pkgname}/${version%.*}/${pkgname}-${version}.tar.xz" -checksum=2b29ccc1531ba7ebba95a97f40c22b963838e8b6833745efe8e6fb71fd8fca77 +checksum=0c8e80e77877860e4a4e6ab4a0f7cdc1186e356b65b042a751897188b88944d2 lib32disabled=yes conf_files="/etc/${pkgname}/${pkgname}.conf" -make_dirs=" - /etc/NetworkManager/system-connections 0755 root root - /etc/NetworkManager/dispatcher.d/pre-up.d 0750 root root - /etc/NetworkManager/dispatcher.d/pre-down.d 0750 root root - /etc/NetworkManager/VPN 0755 root root - /var/lib/NetworkManager 0755 root root -" +make_check=extended case "$XBPS_TARGET_MACHINE" in *-musl)