community/networkmanager: take maintainership, upgrade to 1.6.2, update to latest policy

This commit is contained in:
William Pitcock 2017-03-24 19:14:01 +00:00
parent d6bb814c17
commit a43872a644
5 changed files with 137 additions and 59 deletions

View File

@ -1,14 +1,15 @@
# Contributor: William Pitcock <nenolod@dereferenced.org>
# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
# Maintainer: William Pitcock <nenolod@dereferenced.org>
pkgname=networkmanager
pkgver=1.0.6
pkgrel=1
pkgver=1.6.2
pkgrel=0
pkgdesc="network management tool"
url="http://projects.gnome.org/NetworkManager/"
arch="all"
license="GPL"
depends="dhcpcd iptables dbus"
depends_dev=
options="!check"
makedepends="$depends_dev
dbus-glib-dev
eudev-dev
@ -28,15 +29,22 @@ makedepends="$depends_dev
ppp-dev
readline-dev
util-linux-dev
jansson-dev
vala
autoconf
automake
libtool
"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"
source="http://ftp.gnome.org/pub/GNOME/sources/NetworkManager/${pkgver:0:3}/NetworkManager-$pkgver.tar.xz
$pkgname.conf
$pkgname.initd
$pkgname.rules
new-fix-musl-headers.patch
disable_set_hostname.patch
musl-basic.patch
musl-network-support.patch
musl-dlopen-configure-ac.patch
"
_builddir="$srcdir"/NetworkManager-$pkgver
@ -48,15 +56,8 @@ prepare() {
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
esac
done
# Build fails without IPTOS_CLASS_CS6 defined (required by systemd) ###
# http://cgit.openembedded.org/openembedded-core/commit/?id=7562021eef5b7585122c92db8b686808ebe7d85e
# Remove systemd functionality. This also removes many: "error: redefinition of 'struct ethhdr'"
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
autoreconf
}
build() {
@ -110,21 +111,11 @@ To modify system network connections without the root password: add your user ac
EOF
}
md5sums="00f5f9ec69725a9f9b99366853c6f73e NetworkManager-1.0.6.tar.xz
b722fa02f904a9c8ed0d2ec21cbfc588 networkmanager.conf
34f8909bb776840e7ec0579aeea14d30 networkmanager.initd
a39b4feaf1edecc057596be6d82ba634 networkmanager.rules
eb52238b018c2ca9cd969facbf3e4a39 new-fix-musl-headers.patch
4f2c03bce7febd1eede0dc2c5f8b30d9 disable_set_hostname.patch"
sha256sums="38ea002403e3b884ffa9aae25aea431d2a8420f81f4919761c83fb92648254bd NetworkManager-1.0.6.tar.xz
cd2a4b0079c0726973c1cf226c4e1cb4f2d27d02c16e0e08af7e4d6b8770423c networkmanager.conf
05225f1f658f9287d95b4564beb1089245ab83ccae28ba5d2d4c8fc5aefde207 networkmanager.initd
01f4b833c515e88c1963a0ee56ffbf70c59c5efc4dd59a5174498d2fabfc9362 networkmanager.rules
ea205946b52fca22b9ef8b1f3a4e89a69dca430201b5b0f441564d1659d9f295 new-fix-musl-headers.patch
6fc7bc258ac01c2d2578f5a29e7eee55b98bbf8f32dae6d28dede7d7ee5e5c4e disable_set_hostname.patch"
sha512sums="74e8f91bbd9a70f1764b06c729717e091d2be0a8e316fe1b6235e644b65f43add5214be7a1100fe9d30b1511f4a00b9892dce79bb8ba0f0b0d57089d2ba6ddbb NetworkManager-1.0.6.tar.xz
sha512sums="8fa5fa5f7f7e7d21e978a7266ad5bb90272e86efae3c4f4eb9ad73e88837d92b38311b810a09095ca450d02281a1f969c5d89ab30b2c21cee5499f985b91c3d2 NetworkManager-1.6.2.tar.xz
a6e507260e2ceffad4cacb2b49a1d4f6b933e5ae8bc50c1bd56f828298c5dc8d9d17aa4be766faeacefbe3c6c0c748e4ef499a55bb5ee40f0f04bbf766fbbc82 networkmanager.conf
80ef470956bc5319f02e8387bff17c5452d4147321f9f997ca86017494d5134d8579bf59566fc796f3e84ee5788a2d49743d3b93e795f4976661866d1f1b1442 networkmanager.initd
9820ed2ead0af689644842de57657bb10330a1eaff0e85b21ae9913f55e399e47d8b41b0a12956f30de80272b4424c6e55f33acbc88e156879003a260bf576f6 networkmanager.rules
18eff8eadcb8d47742a5c760c0c4a217d82749edc0060dc3b62e6aa0671f456de9d0c11b1669b302371410cd4036bf21aee468ed1d61e7a84afd3b694bc69984 new-fix-musl-headers.patch
cdc8c26720b983f8afb11ee08c87aab863522633d8dc08e8cea080ed8d94378b3534aedf09efc6e7481599cfede6122b5f6a86b0b45e0a8bb653f95d4c5beaf8 disable_set_hostname.patch"
cdc8c26720b983f8afb11ee08c87aab863522633d8dc08e8cea080ed8d94378b3534aedf09efc6e7481599cfede6122b5f6a86b0b45e0a8bb653f95d4c5beaf8 disable_set_hostname.patch
b777dd8ff7383d736648bf8190aee7e306f3d699bb30759ed7c726abf27a333937cec0adce77785b19a30f8f168c4170353478069524942a87b940458dbbf14a musl-basic.patch
1e0c519c101762c251225414e897139eee13d3556910bf9e4e86b58f0a9c298475d880be06420117960036da175fb05a5208c058a8eb4d8c424537703131ca58 musl-network-support.patch
9120208c258f0db6cf9057f21c3b384e7ddc4b6876228cfb20475e3b6f7292025f649a77cdecd170918bec0c86f576718d62bec9dd70ebdd1ab8d48ae65cfb53 musl-dlopen-configure-ac.patch"

View File

@ -0,0 +1,65 @@
--- a/src/systemd/src/basic/stdio-util.h
+++ b/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>
--- a/src/systemd/src/basic/util.h
+++ b/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())
--- a/src/systemd/src/basic/parse-util.c
+++ b/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"
--- a/src/systemd/sd-adapt/nm-sd-adapt.h
+++ b/src/systemd/sd-adapt/nm-sd-adapt.h
@@ -119,7 +119,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
--- a/src/systemd/src/systemd/sd-event.h
+++ b/src/systemd/src/systemd/sd-event.h
@@ -69,11 +69,7 @@
typedef int (*sd_event_io_handler_t)(sd_event_source *s, int fd, uint32_t revents, void *userdata);
typedef int (*sd_event_time_handler_t)(sd_event_source *s, uint64_t usec, void *userdata);
typedef int (*sd_event_signal_handler_t)(sd_event_source *s, const struct signalfd_siginfo *si, void *userdata);
-#if defined __USE_POSIX199309 || defined __USE_XOPEN_EXTENDED
typedef int (*sd_event_child_handler_t)(sd_event_source *s, const siginfo_t *si, void *userdata);
-#else
-typedef void* sd_event_child_handler_t;
-#endif
int sd_event_default(sd_event **e);

View File

@ -0,0 +1,11 @@
musl: dlopen is included so LD_LIBS="" instead of LD_LIBS="none required"
--- a/configure.ac
+++ b/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 @@
--- a/libnm-core/nm-utils.h
+++ b/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"
--- a/src/platform/wifi/wifi-utils.h
+++ b/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"
--- a/src/systemd/src/basic/socket-util.h
+++ b/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,31 +0,0 @@
## moving the <linux/xxxx> includes to below nm includes
## no longer works in 1.0.0.
--- NetworkManager-1.0.0/src/platform/wifi/wifi-utils.h
+++ NetworkManager-1.0.0/src/platform/wifi/wifi-utils.h.new
@@ -22,10 +22,10 @@
#ifndef __WIFI_UTILS_H__
#define __WIFI_UTILS_H__
-#include <net/ethernet.h>
#include <glib.h>
#include "nm-dbus-interface.h"
+#include <linux/if_ether.h>
typedef struct WifiData WifiData;
--- NetworkManager-1.0.0/src/settings/nm-settings-connection.h
+++ NetworkManager-1.0.0/src/settings/nm-settings-connection.h.new
@@ -22,10 +22,9 @@
#ifndef __NETWORKMANAGER_SETTINGS_CONNECTION_H__
#define __NETWORKMANAGER_SETTINGS_CONNECTION_H__
-#include <net/ethernet.h>
-
#include <nm-connection.h>
#include "nm-types.h"
+#include <linux/if_ether.h>
G_BEGIN_DECLS