NetworkManager: update to 1.16.0.

This commit is contained in:
Rasmus Thomsen 2019-03-16 15:17:29 +01:00 committed by maxice8
parent 2d88de6d1f
commit 07464f9d2d
8 changed files with 119 additions and 114 deletions

View file

@ -0,0 +1,40 @@
Reason: Fix crossbuilding GIR
Upstream: No, not upstreamable since this is very specific to the Void setup
--- clients/common/meson.build
+++ clients/common/meson.build
@@ -34,7 +34,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(
--- libnm/meson.build
+++ libnm/meson.build
@@ -244,7 +244,23 @@ if enable_introspection
)
endif
- generate_setting_docs = join_paths(meson.current_source_dir(), 'generate-setting-docs.py')
+ if meson.is_cross_build()
+ arch = host_machine.cpu_family()
+ if arch == 'x86'
+ qemu_arch = 'i386'
+ elif arch == 'x86_64'
+ qemu_arch = 'x86_64'
+ elif arch == 'arm'
+ qemu_arch = 'arm'
+ elif arch == 'aarch64'
+ qemu_arch = 'aarch64'
+ endif
+ qemu = '/usr/bin/qemu-' + qemu_arch + '-static'
+ qemu_python3_cmd = qemu + ' -L @XBPS_CROSS_BASE@ @XBPS_CROSS_BASE@/bin/python3'
+ generate_setting_docs = ['sh', '-c', qemu_python3_cmd, join_paths(meson.current_source_dir(), 'generate-setting-docs.py')]
+ else
+ generate_setting_docs = join_paths(meson.current_source_dir(), 'generate-setting-docs.py')
+ endif
gi_typelib_path = run_command('printenv', 'GI_TYPELIB_PATH').stdout()
if gi_typelib_path != ''

View file

@ -1,6 +1,6 @@
Usual fix for musl libc
--- src/systemd/src/basic/stdio-util.h.orig
+++ src/systemd/src/basic/stdio-util.h
--- 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 <http://www.gnu.org/licenses/>.
***/
@ -11,15 +11,16 @@ Usual fix for musl libc
#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 @@
--- shared/systemd/src/basic/util.h.orig
+++ shared/systemd/src/basic/util.h
@@ -46,6 +46,12 @@
#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;
+typedef int (*__compar_d_fn_t) (const void *, const void *, void *);
+#endif
+
size_t page_size(void) _pure_;

View file

@ -1,11 +0,0 @@
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

@ -1,37 +1,22 @@
--- shared/n-acd/src/n-acd.c
+++ shared/n-acd/src/n-acd.c
@@ -23,10 +23,10 @@
#include <errno.h>
#include <limits.h>
#include <linux/filter.h>
-#include <linux/if_ether.h>
#include <linux/if_packet.h>
#include <net/ethernet.h>
#include <netinet/if_ether.h>
+#include <linux/if_ether.h>
#include <netinet/in.h>
#include <stddef.h>
#include <stdio.h>
--- src/devices/nm-device.c
+++ src/devices/nm-device.c
@@ -34,7 +34,11 @@
@@ -32,7 +32,11 @@
#include <arpa/inet.h>
#include <fcntl.h>
#include <linux/if_addr.h>
-#include <linux/if_arp.h>
+#if defined(__GLIBC__)
+ #include <linux/if_arp.h>
#include <linux/if_arp.h>
+#else
+ #include <linux/if.h>
+#include <linux/if.h>
+#endif
#include <linux/rtnetlink.h>
#include <linux/pkt_sched.h>
--- src/nm-manager.c
+++ src/nm-manager.c
@@ -28,6 +28,7 @@
#include <errno.h>
#include <string.h>
@@ -26,6 +26,7 @@
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
+#include <asm/types.h>
@ -45,17 +30,16 @@
#include "nm-linux-platform.h"
+#include "wpan/nm-wpan-utils.h"
#include <poll.h>
#include <endian.h>
@@ -33,7 +34,11 @@
#include <netinet/icmp6.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <dlfcn.h>
@@ -27,7 +28,11 @@
#include <fcntl.h>
#include <libudev.h>
#include <linux/ip.h>
-#include <linux/if_arp.h>
+#if defined(__GLIBC__)
+ #include <linux/if_arp.h>
#include <linux/if_arp.h>
+#else
+ #include <linux/if.h>
+#include <linux/if.h>
+#endif
#include <linux/if_link.h>
#include <linux/if_tun.h>
@ -66,3 +50,5 @@
#include "wifi/nm-wifi-utils-wext.h"
-#include "wpan/nm-wpan-utils.h"
#include "nm-utils/unaligned.h"
#include "nm-utils/nm-io-utils.h"
#include "nm-utils/nm-udev-utils.h"

View file

@ -0,0 +1,10 @@
--- src/systemd/sd-adapt-core/nm-sd-adapt-core.h.orig 2019-03-17 16:56:13.649901535 +0100
+++ src/systemd/sd-adapt-core/nm-sd-adapt-core.h 2019-03-17 16:56:35.278786119 +0100
@@ -65,7 +65,7 @@
# ifdef HAVE___SECURE_GETENV
# define secure_getenv __secure_getenv
# else
-# error neither secure_getenv nor __secure_getenv is available
+# define secure_getenv getenv
# endif
#endif

View file

@ -26,12 +26,12 @@
#include "nm-dbus-interface.h"
--- src/systemd/src/basic/socket-util.h.orig
+++ src/systemd/src/basic/socket-util.h
@@ -28,6 +28,11 @@
--- 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 <sys/socket.h>
#include <sys/types.h>
#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 */
@ -39,4 +39,4 @@
+#endif
#include "macro.h"
#include "util.h"
#include "missing_socket.h"

View file

@ -1,5 +1,5 @@
--- src/systemd/src/basic/process-util.c.orig 2018-03-20 23:12:35.698715891 +0100
+++ src/systemd/src/basic/process-util.c 2018-03-20 23:17:24.114733986 +0100
--- shared/systemd/src/basic/process-util.c
+++ shared/systemd/src/basic/process-util.c
@@ -21,6 +21,9 @@
#include <sys/wait.h>
#include <syslog.h>
@ -10,7 +10,7 @@
#if 0 /* NM_IGNORED */
#if HAVE_VALGRIND_VALGRIND_H
#include <valgrind/valgrind.h>
@@ -1153,11 +1156,13 @@ void reset_cached_pid(void) {
@@ -1168,11 +1171,13 @@ void reset_cached_pid(void) {
cached_pid = CACHED_PID_UNSET;
}
@ -19,12 +19,12 @@
* 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 __attribute__ ((__weak__));
extern void* __dso_handle _weak_;
+#endif
pid_t getpid_cached(void) {
static bool installed = false;
@@ -1186,7 +1191,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. */

View file

@ -1,49 +1,34 @@
# Template file for 'NetworkManager'
pkgname=NetworkManager
version=1.14.6
version=1.16.0
revision=1
build_style=gnu-configure
build_style=meson
build_helper="gir"
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-ifcfg-rh
--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=$(vopt_if elogind elogind consolekit)
--with-suspend-resume=$(vopt_if elogind elogind consolekit)
--with-libnm-glib --disable-ifupdown
--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 --enable-concheck --with-libpsl
--with-dnsmasq=/usr/bin/dnsmasq --with-config-dhcp-default=dhclient
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
ac_cv_file__etc_SuSE_release=no ac_cv_file__etc_debian_version=no"
configure_args="-Dpolkit_agent=true -Dsystemd_journal=false
-Dlibaudit=no -Dovs=false -Dlibnm_glib=true -Dselinux=false
-Dmodify_system=true -Dpolkit_agent=true -Dsystemdsystemunitdir=no
-Dpppd=/usr/bin/pppd -Dqt=false
-Dpppd_plugin_dir=/usr/lib/pppd/2.4.7 -Dresolvconf=/usr/bin/resolvconf
-Ddhclient=/usr/bin/dhclient -Dkernel_firmware_dir=/usr/lib/firmware
-Ddnsmasq=/usr/bin/dnsmasq -Ddbus_conf_dir=/etc/dbus-1/system.d
-Dudev_dir=/usr/lib/udev -Dintrospection=$(vopt_if gir true false)
-Dvapi=$(vopt_if vala true false)
-Dsession_tracking=$(vopt_if elogind elogind no)"
hostmakedepends="gettext-devel glib-devel libxslt-devel pkg-config
intltool dbus-glib-devel jansson-devel $(vopt_if vala vala)
$(vopt_if gir 'python3-gobject')"
makedepends="libuuid-devel nss-devel dbus-glib-devel libgudev-devel
libnl3-devel polkit-devel ppp-devel iptables-devel libcurl-devel
ModemManager-devel readline-devel libndp-devel newt-devel jansson-devel
libpsl-devel eudev-libudev-devel
$(vopt_if gir libgirepository-devel) $(vopt_if elogind elogind-devel)"
depends="dbus dhclient iproute2 openresolv wpa_supplicant"
short_desc="Network Management daemon"
maintainer="Rasmus Thomsen <rasmus.thomsen@protonmail.com>"
maintainer="Rasmus Thomsen <oss@cogitri.dev>"
license="GPL-2.0-or-later"
homepage="https://wiki.gnome.org/Projects/NetworkManager"
distfiles="${GNOME_SITE}/${pkgname}/${version%.*}/${pkgname}-${version}.tar.xz"
checksum=693bcdad15eec7f07a06cbc6e43ddb3b1c13b2d2d23ec165fbb5adf4c3323a5d
# gtk-doc generation is disabled but gtkdocisze is required by autogen.sh
hostmakedepends="automake bluez dbus-glib-devel dhclient gettext-devel
glib-devel gnutls-devel gtk-doc intltool iproute2 iptables libtool
libxslt-devel pkg-config wpa_supplicant
$(vopt_if gir 'python-gobject')"
makedepends="libuuid-devel gnutls-devel dbus-glib-devel libgudev-devel
libnl3-devel polkit-devel ppp-devel iptables-devel libcurl-devel
ModemManager-devel readline-devel libndp-devel newt-devel jansson-devel
libpsl-devel
$(vopt_if gir libgirepository-devel) $(vopt_if elogind elogind-devel)"
# Install host dependency to read the soname. Should be the same on
# host and target.
hostmakedepends+=" jansson-devel"
depends="dbus dhclient iproute2 openresolv wpa_supplicant"
checksum=8e962833b6ca03edda1bc57ed6614a7b8c2339531b44acef098d05f2324c5d2c
lib32disabled=yes
conf_files="/etc/${pkgname}/${pkgname}.conf"
make_dirs="
@ -56,38 +41,29 @@ make_dirs="
case "$XBPS_TARGET_MACHINE" in
*-musl)
CFLAGS+=" -DHAVE_SECURE_GETENV -Dsecure_getenv=getenv"
CFLAGS+=" -D__USE_POSIX199309 -DRTLD_DEEPBIND=0"
CFLAGS+=" -DRTLD_DEEPBIND=0"
# Fail to build on musl
configure_args+=" -Dtests=no"
;;
esac
# Package build options
build_options="gir elogind"
build_options="gir vala elogind"
case "$XBPS_TARGET_MACHINE" in
i686-musl|x86_64-musl) build_options_default+=" gir" ;;
i686-musl|x86_64-musl) build_options_default+=" gir vala" ;;
*-musl) ;;
*) build_options_default+=" gir" ;;
*) build_options_default+=" gir vala" ;;
esac
pre_configure() {
NOCONFIGURE=1 ./autogen.sh
# Full switch to /run to not depend on /var/run being a symlink.
sed -e 's,^nmrundir=.*$,nmrundir=\"/run/\$PACKAGE\",' -i configure
# Fsckd-up check for gi ?
sed -e 's,! "$PYTHON" -c ,"$PYTHON" -c,' -i configure
}
pre_build() {
export GIR_EXTRA_LIBS_PATH="${wrksrc}/libnm-util/.libs:${wrksrc}/libnm/.libs:${wrksrc}/libnm-glib/.libs"
if [ "$CROSS_BUILD" ]; then
# Replace the values from our patch into the system itself
sed -i -e "s|@XBPS_CROSS_BASE@|${XBPS_CROSS_BASE}|g" libnm/meson.build
fi
}
post_install() {
vinstall ${FILESDIR}/${pkgname}.conf 644 etc/${pkgname}
# remove unused stuff
rm -rf ${DESTDIR}/etc/init.d
vsv ${pkgname}
}
@ -110,5 +86,8 @@ NetworkManager-devel_package() {
if [ "$build_option_gir" ]; then
vmove usr/share/gir-1.0
fi
if [ "$build_option_vala" ]; then
vmove usr/share/vala
fi
}
}