NetworkManager: update to 1.6.2

This commit is contained in:
yopito 2017-03-04 13:45:34 +01:00
parent 5ac2185aa3
commit 65f3321776
6 changed files with 102 additions and 157 deletions

View File

@ -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 */

View File

@ -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 <netinet/in.h>
/* For ETH_ALEN and INFINIBAND_ALEN */
+#ifdef __GLIBC__
#include <linux/if_ether.h>
#include <linux/if_infiniband.h>
+#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 <arpa/inet.h>
#include <netinet/icmp6.h>
#include <netinet/in.h>
+#ifdef __GLIBC__
#include <linux/ip.h>
#include <linux/if_arp.h>
#include <linux/if_link.h>
#include <linux/if_tun.h>
#include <linux/if_tunnel.h>
+#else
+#include <netinet/ip.h>
+#include "../../musl_defines.h"
+#endif
#include <netlink/netlink.h>
#include <netlink/msg.h>
--- 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 <http://www.gnu.org/licenses/>.
***/
+#ifdef __GLIBC__
#include <printf.h>
+#endif
#include <stdarg.h>
#include <stdio.h>
#include <sys/types.h>
--- 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 <stdio.h>
#include <stdlib.h>
#include <string.h>
+#ifdef __GLIBC__
#include <xlocale.h>
+#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 <arpa/inet.h>
+#include <linux/sockios.h>
#include "sd-lldp.h"

View File

@ -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 <http://www.gnu.org/licenses/>.
***/
+#if defined(__GLIBC__)
#include <printf.h>
+#endif
#include <stdarg.h>
#include <stdio.h>
#include <sys/types.h>
--- 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 <stdio.h>
#include <stdlib.h>
#include <string.h>
+#if defined(__GLIBC__)
#include <xlocale.h>
+#else
+#include <locale.h>
+#endif
#include "alloc-util.h"
#include "extract-word.h"

View File

@ -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],

View File

@ -0,0 +1,42 @@
--- libnm-core/nm-utils.h.orig
+++ libnm-core/nm-utils.h
@@ -30,7 +30,11 @@
#include <netinet/in.h>
/* For ETH_ALEN and INFINIBAND_ALEN */
+#if defined(__GLIBC__)
#include <linux/if_ether.h>
+#else
+#define ETH_ALEN 6 /* Octets in one ethernet addr */
+#endif
#include <linux/if_infiniband.h>
#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 <net/ethernet.h>
+#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 <sys/un.h>
#include <linux/netlink.h>
#include <linux/if_packet.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 "util.h"

View File

@ -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 <xtraeme@voidlinux.eu>"
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
}
}