From 65f332177625468b396eef6c5dbdf75efe5bce9f Mon Sep 17 00:00:00 2001 From: yopito Date: Sat, 4 Mar 2017 13:45:34 +0100 Subject: [PATCH] NetworkManager: update to 1.6.2 --- srcpkgs/NetworkManager/files/musl_defines.h | 40 ------- srcpkgs/NetworkManager/patches/fix-musl.patch | 103 ------------------ .../NetworkManager/patches/musl-basic.patch | 41 +++++++ .../patches/musl-dlopen-configure-ac.patch | 11 ++ .../patches/musl-network-support.patch | 42 +++++++ srcpkgs/NetworkManager/template | 22 ++-- 6 files changed, 102 insertions(+), 157 deletions(-) delete mode 100644 srcpkgs/NetworkManager/files/musl_defines.h delete mode 100644 srcpkgs/NetworkManager/patches/fix-musl.patch create mode 100644 srcpkgs/NetworkManager/patches/musl-basic.patch create mode 100644 srcpkgs/NetworkManager/patches/musl-dlopen-configure-ac.patch create mode 100644 srcpkgs/NetworkManager/patches/musl-network-support.patch diff --git a/srcpkgs/NetworkManager/files/musl_defines.h b/srcpkgs/NetworkManager/files/musl_defines.h deleted file mode 100644 index 5e0a4c5157..0000000000 --- a/srcpkgs/NetworkManager/files/musl_defines.h +++ /dev/null @@ -1,40 +0,0 @@ -#ifndef MUSL_DEFINES_H -#define MUSL_DEFINES_H - -#define IFF_TUN 0x0001 -#define IFF_TAP 0x0002 -#define IFF_NO_PI 0x1000 -#define IFF_VNET_HDR 0x4000 -#define IFF_TUN_EXCL 0x8000 -#define TUNSETIFF _IOW('T', 202, int) -#define TUNSETPERSIST _IOW('T', 203, int) -#define TUNSETOWNER _IOW('T', 204, int) -#define TUNSETGROUP _IOW('T', 206, int) - -enum { - IFLA_GRE_UNSPEC, - IFLA_GRE_LINK, - IFLA_GRE_IFLAGS, - IFLA_GRE_OFLAGS, - IFLA_GRE_IKEY, - IFLA_GRE_OKEY, - IFLA_GRE_LOCAL, - IFLA_GRE_REMOTE, - IFLA_GRE_TTL, - IFLA_GRE_TOS, - IFLA_GRE_PMTUDISC, - IFLA_GRE_ENCAP_LIMIT, - IFLA_GRE_FLOWINFO, - IFLA_GRE_FLAGS, - IFLA_GRE_ENCAP_TYPE, - IFLA_GRE_ENCAP_FLAGS, - IFLA_GRE_ENCAP_SPORT, - IFLA_GRE_ENCAP_DPORT, - IFLA_GRE_COLLECT_METADATA, - IFLA_GRE_IGNORE_DF, - __IFLA_GRE_MAX, -}; - -#define IFLA_GRE_MAX (__IFLA_GRE_MAX - 1) - -#endif /* !MUSL_DEFINES_H */ diff --git a/srcpkgs/NetworkManager/patches/fix-musl.patch b/srcpkgs/NetworkManager/patches/fix-musl.patch deleted file mode 100644 index fdfd026c3e..0000000000 --- a/srcpkgs/NetworkManager/patches/fix-musl.patch +++ /dev/null @@ -1,103 +0,0 @@ ---- libnm-core/nm-utils.h.orig 2017-01-14 13:13:15.458590816 +0100 -+++ libnm-core/nm-utils.h 2017-01-14 13:14:38.569521150 +0100 -@@ -30,8 +30,13 @@ - #include - - /* For ETH_ALEN and INFINIBAND_ALEN */ -+#ifdef __GLIBC__ - #include - #include -+#else -+#define ETH_ALEN 6 /* Octets in one ethernet addr */ -+#define INFINIBAND_ALEN 20 /* Octets in IPoIB HW addr */ -+#endif - - #include "nm-core-enum-types.h" - #include "nm-setting-wireless-security.h" ---- src/platform/nm-linux-platform.c.orig 2016-12-15 20:39:00.000000000 +0100 -+++ src/platform/nm-linux-platform.c 2017-01-14 13:34:51.509504441 +0100 -@@ -30,10 +30,15 @@ - #include - #include - #include -+#ifdef __GLIBC__ - #include - #include - #include - #include - #include -+#else -+#include -+#include "../../musl_defines.h" -+#endif - #include - #include ---- src/systemd/src/basic/util.h.orig 2017-01-14 14:11:23.719666887 +0100 -+++ src/systemd/src/basic/util.h 2017-01-14 14:11:39.890653333 +0100 -@@ -46,6 +46,11 @@ - #include "missing.h" - #include "time-util.h" - -+#if !defined(__GLIBC__) -+typedef int (*__compar_fn_t) (const void*, const void*); -+typedef __compar_fn_t comparison_fn_t; -+#endif -+ - size_t page_size(void) _pure_; - #define PAGE_ALIGN(l) ALIGN_TO((l), page_size()) - ---- src/systemd/src/basic/stdio-util.h.orig 2017-01-14 14:17:08.268378080 +0100 -+++ src/systemd/src/basic/stdio-util.h 2017-01-14 14:17:48.499344359 +0100 -@@ -19,7 +19,9 @@ - along with systemd; If not, see . - ***/ - -+#ifdef __GLIBC__ - #include -+#endif - #include - #include - #include - ---- src/systemd/src/basic/in-addr-util.c.orig 2017-01-14 14:22:17.147119172 +0100 -+++ src/systemd/src/basic/in-addr-util.c 2017-01-14 14:22:49.402092135 +0100 -@@ -32,6 +32,15 @@ - #include "parse-util.h" - #include "util.h" - -+#ifndef strndupa -+#define strndupa(s, n) \ -+ (__extension__ ({const char *__in = (s); \ -+ size_t __len = strnlen (__in, (n)) + 1; \ -+ char *__out = (char *) alloca (__len); \ -+ __out[__len-1] = '\0'; \ -+ (char *) memcpy (__out, __in, __len-1);})) -+#endif -+ - bool in4_addr_is_null(const struct in_addr *a) { - return a->s_addr == 0; - } - ---- src/systemd/src/basic/parse-util.c.orig 2017-01-14 14:25:54.270937174 +0100 -+++ src/systemd/src/basic/parse-util.c 2017-01-14 14:26:08.422925312 +0100 -@@ -25,7 +25,9 @@ - #include - #include - #include -+#ifdef __GLIBC__ - #include -+#endif - - #include "alloc-util.h" - #include "extract-word.h" - ---- src/systemd/src/libsystemd-network/sd-lldp.c.orig 2017-03-03 17:19:32.513074615 +0100 -+++ src/systemd/src/libsystemd-network/sd-lldp.c 2017-03-03 17:21:21.668728717 +0100 -@@ -21,6 +21,7 @@ - #include "nm-sd-adapt.h" - - #include -+#include - - #include "sd-lldp.h" - diff --git a/srcpkgs/NetworkManager/patches/musl-basic.patch b/srcpkgs/NetworkManager/patches/musl-basic.patch new file mode 100644 index 0000000000..66b59c646d --- /dev/null +++ b/srcpkgs/NetworkManager/patches/musl-basic.patch @@ -0,0 +1,41 @@ +Usual fix for musl libc +--- src/systemd/src/basic/stdio-util.h.orig ++++ src/systemd/src/basic/stdio-util.h +@@ -19,7 +19,9 @@ + along with systemd; If not, see . + ***/ + ++#if defined(__GLIBC__) + #include ++#endif + #include + #include + #include +--- src/systemd/src/basic/util.h.orig ++++ src/systemd/src/basic/util.h +@@ -46,6 +46,11 @@ + #include "missing.h" + #include "time-util.h" + ++#if !defined(__GLIBC__) ++typedef int (*__compar_fn_t) (const void*, const void*); ++typedef __compar_fn_t comparison_fn_t; ++#endif ++ + size_t page_size(void) _pure_; + #define PAGE_ALIGN(l) ALIGN_TO((l), page_size()) + +--- src/systemd/src/basic/parse-util.c.orig ++++ src/systemd/src/basic/parse-util.c +@@ -25,7 +25,11 @@ + #include + #include + #include ++#if defined(__GLIBC__) + #include ++#else ++#include ++#endif + + #include "alloc-util.h" + #include "extract-word.h" diff --git a/srcpkgs/NetworkManager/patches/musl-dlopen-configure-ac.patch b/srcpkgs/NetworkManager/patches/musl-dlopen-configure-ac.patch new file mode 100644 index 0000000000..cf8969666a --- /dev/null +++ b/srcpkgs/NetworkManager/patches/musl-dlopen-configure-ac.patch @@ -0,0 +1,11 @@ +musl: dlopen is included so LD_LIBS="" instead of LD_LIBS="none required" +--- configure.ac.orig ++++ configure.ac +@@ -275,6 +275,7 @@ + dnl Checks for libdl - on certain platforms its part of libc + dnl + AC_SEARCH_LIBS([dlopen], [dl dld], [], [ac_cv_search_dlopen=]) ++AS_IF([test "$ac_cv_search_dlopen" = "none required"],[ac_cv_search_dlopen=""]) + AC_SUBST([DL_LIBS], "$ac_cv_search_dlopen") + + PKG_CHECK_MODULES(GLIB, [gio-unix-2.0 >= 2.37.6 gmodule-2.0], diff --git a/srcpkgs/NetworkManager/patches/musl-network-support.patch b/srcpkgs/NetworkManager/patches/musl-network-support.patch new file mode 100644 index 0000000000..b9a77bb535 --- /dev/null +++ b/srcpkgs/NetworkManager/patches/musl-network-support.patch @@ -0,0 +1,42 @@ +--- 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/wifi-utils.h.orig ++++ src/platform/wifi/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" + +--- src/systemd/src/basic/socket-util.h.orig ++++ src/systemd/src/basic/socket-util.h +@@ -28,6 +28,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 "util.h" diff --git a/srcpkgs/NetworkManager/template b/srcpkgs/NetworkManager/template index 976861fcc2..a5e4b0e3f0 100644 --- a/srcpkgs/NetworkManager/template +++ b/srcpkgs/NetworkManager/template @@ -1,17 +1,19 @@ # Template file for 'NetworkManager' pkgname=NetworkManager -version=1.4.4 +version=1.6.2 revision=1 build_style=gnu-configure configure_args="--without-dhcpcd --with-dhclient=/usr/bin/dhclient --with-system-ca-path=/etc/ssl/certs --enable-more-warnings=no --with-crypto=gnutls --disable-static --enable-ppp --with-nmtui --with-udev-dir=/usr/lib/udev $(vopt_enable gir introspection) - --with-kernel-firmware-dir=/usr/lib/firmware --disable-wimax + --with-kernel-firmware-dir=/usr/lib/firmware --with-pppd-plugin-dir=/usr/lib/pppd/2.4.7 --enable-modify-system --with-modem-manager-1 --with-resolvconf=/usr/bin/resolvconf --with-session-tracking=consolekit --with-suspend-resume=upower --with-systemdsystemunitdir=no --enable-polkit-agent --enable-tests=no + --with-systemd-journal=no --with-systemd-logind=no --disable-gtk-doc + --with-dbus-sys-dir=/etc/dbus-1/system.d --sbindir=/usr/bin ac_cv_file__etc_redhat_release=no ac_cv_file__etc_gentoo_release=no ac_cv_file__etc_fedora_release=no ac_cv_file__etc_mandriva_release=no @@ -21,15 +23,16 @@ maintainer="Juan RP " homepage="https://wiki.gnome.org/Projects/NetworkManager" license="GPL-2" distfiles="${GNOME_SITE}/$pkgname/${version%.*}/$pkgname-$version.tar.xz" -checksum=829378f318cc008d138a23ca6a9191928ce75344e7e47a2f2c35f4ac82133309 +checksum=b22b6f55cde37bec4982f9be4b1808a21101d807a05049c670116d95059a26f9 +# gtk-doc generation is disabled but gtkdocisze is required by autogen.sh hostmakedepends=" automake libtool pkg-config intltool gnutls-devel glib-devel dbus-glib-devel gettext-devel gtk-doc dbus iproute2 dhclient wpa_supplicant bluez iptables - $(vopt_if gir gobject-introspection)" + $(vopt_if gir gobject-introspection) $(vopt_if gir python-gobject)" makedepends="libuuid-devel gnutls-devel dbus-glib-devel libgudev-devel libnl3-devel polkit-devel ppp-devel iptables-devel libsoup-devel - ModemManager-devel readline-devel libndp-devel newt-devel + ModemManager-devel readline-devel libndp-devel newt-devel jansson-devel $(vopt_if gir libgirepository-devel)" lib32disabled=yes @@ -53,17 +56,9 @@ fi pre_configure() { NOCONFIGURE=1 ./autogen.sh - cp $FILESDIR/musl_defines.h . # Full switch to /run to not depend on /var/run being a symlink. sed -e 's,^nmrundir=.*$,nmrundir=\"/run/\$PACKAGE\",' -i configure - - # See - local f= files=$(find src/dhcp-manager/systemd-dhcp -type f) # --without-systemd has no effect - files="$files $(find src/dhcp-manager -maxdepth 1 -type f -name "*-systemd.*")" - for f in $files; do # do NOT build --with-dbus-sys-dir=/etc/dbus-1 (nm service will crash) - printf "" > $f - done } post_install() { @@ -92,6 +87,5 @@ NetworkManager-devel_package() { if [ "$build_option_gir" ]; then vmove usr/share/gir-1.0 fi - vmove usr/share/gtk-doc } }