aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTaner Tas <taner76@gmail.com>2018-05-03 16:32:40 +0300
committerFrancesco Colista <fcolista@alpinelinux.org>2018-05-08 08:33:43 +0000
commitfc74201f2bb3f49e7d2ff52ac3b5ede4ca97c0d3 (patch)
tree1152f7dde37b94c6bf33f246e27fd73533d077a0
parent020b2bdd4ed193aca11f98281d34b38af98be862 (diff)
downloadaports-fc74201f2bb3f49e7d2ff52ac3b5ede4ca97c0d3.tar.gz
aports-fc74201f2bb3f49e7d2ff52ac3b5ede4ca97c0d3.tar.bz2
aports-fc74201f2bb3f49e7d2ff52ac3b5ede4ca97c0d3.tar.xz
community/networkmanager: Upgrade to 1.10.6
* Clarify license * Patches are revised * Enable dhclient utility support * Enable system-wide network configuration support * Enable polkit-agent * disable_set_hostname.patch is no more appendable. Removed. * Add wpa_supplicant as runtime dependency * Add "provide net" rule to the service file * Re-arrange configure options in alphabetical order * Create plugdev group if missing on system * Display a message during install & upgrade
-rw-r--r--community/networkmanager/APKBUILD82
-rw-r--r--community/networkmanager/disable_set_hostname.patch20
-rw-r--r--community/networkmanager/musl-basic.patch53
-rw-r--r--community/networkmanager/networkmanager.initd1
-rw-r--r--community/networkmanager/networkmanager.pre-install9
l---------community/networkmanager/networkmanager.pre-upgrade1
6 files changed, 76 insertions, 90 deletions
diff --git a/community/networkmanager/APKBUILD b/community/networkmanager/APKBUILD
index bb20a51924..fac8e085e3 100644
--- a/community/networkmanager/APKBUILD
+++ b/community/networkmanager/APKBUILD
@@ -1,15 +1,15 @@
# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
# Maintainer: William Pitcock <nenolod@dereferenced.org>
pkgname=networkmanager
-pkgver=1.7.2
-pkgrel=2
+pkgver=1.10.6
+pkgrel=0
pkgdesc="network management tool"
url="http://projects.gnome.org/NetworkManager/"
arch="all"
-license="GPL"
-depends="dhcpcd iptables dbus"
+license="GPL-2.0-or-later"
+depends="dhcpcd iptables dbus wpa_supplicant"
+install="$pkgname.pre-install $pkgname.pre-upgrade"
depends_dev=
-options="!check"
makedepends="$depends_dev
curl-dev
dbus-glib-dev
@@ -31,92 +31,88 @@ makedepends="$depends_dev
util-linux-dev
jansson-dev
vala
-
autoconf
automake
libtool
"
-subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"
-source="https://download.gnome.org/sources/NetworkManager/${pkgver:0:3}/NetworkManager-$pkgver.tar.xz
+subpackages="$pkgname-dev $pkgname-doc $pkgname-lang $pkgname-openrc"
+source="https://download.gnome.org/sources/NetworkManager/${pkgver:0:4}/NetworkManager-$pkgver.tar.xz
$pkgname.conf
$pkgname.initd
$pkgname.rules
- disable_set_hostname.patch
musl-basic.patch
musl-network-support.patch
musl-dlopen-configure-ac.patch
"
+options="!check"
-_builddir="$srcdir"/NetworkManager-$pkgver
-prepare() {
- local i
- cd "$_builddir"
- for i in $source; do
- case $i in
- *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
- esac
- done
+builddir="$srcdir"/NetworkManager-$pkgver
+prepare() {
+ cd "$builddir"
+ default_prepare
autoreconf
}
build() {
- cd "$_builddir"
+ cd "$builddir"
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--localstatedir=/var \
- --disable-more-warnings \
- --disable-config-plugin-ibft \
- --disable-tests \
- --disable-wimax \
- --disable-introspection \
- --enable-ifupdown \
--enable-concheck \
- --with-dhcpcd=yes \
- --with-systemdsystemunitdir=no \
+ --enable-ifupdown \
+ --enable-modify-system \
+ --enable-polkit-agent \
+ --with-config-dhcp-default=dhcpcd \
--with-crypto=nss \
+ --with-dhcpcd=yes \
+ --with-dhclient=yes \
--with-modem-manager-1 \
--with-nmtui=yes \
- --with-wext=yes \
--with-resolvconf=yes \
--with-session-tracking=no \
+ --with-systemdsystemunitdir=no \
+ --with-systemd-journal=no \
+ --with-systemd-logind=no \
--with-suspend-resume=upower \
+ --with-wext=yes \
+ --disable-config-plugin-ibft \
+ --disable-gtk-doc \
+ --disable-introspection \
+ --disable-more-warnings \
+ --disable-tests \
--without-valgrind \
- || return 1
+ --disable-wimax
# ourLDFLAGS confuses the gir-scanner
unset LDFLAGS
make libnm-core/nm-core-enum-types.h
- make || return 1
+ make
}
package() {
- cd "$_builddir"
- make DESTDIR="$pkgdir" install || return 1
-
- install -m755 -D "$srcdir"/networkmanager.initd \
- "$pkgdir"/etc/init.d/networkmanager || return 1
+ cd "$builddir"
+ make DESTDIR="$pkgdir" install
- install -m644 -D "$srcdir/$pkgname.conf" \
- "$pkgdir/etc/NetworkManager/NetworkManager.conf" || return 1
+ install -m755 -D "$srcdir"/networkmanager.initd "$pkgdir"/etc/init.d/networkmanager
+ install -m644 -D "$srcdir/$pkgname.conf" "$pkgdir"/etc/NetworkManager/NetworkManager.conf
# allow plugdev users to modify connections
install -m644 -D "$srcdir/$pkgname.rules" \
- "$pkgdir/usr/share/polkit-1/rules.d/01-org.freedesktop.NetworkManager.settings.modify.system.rules" || return 1
+ "$pkgdir/usr/share/polkit-1/rules.d/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
mkdir -p "$pkgdir/usr/share/apk-tools/$pkgname"
# post-install message
- mv "$pkgdir/usr/share/doc/NetworkManager" "$pkgdir/usr/share/doc/$pkgname" || return 1
+ mv "$pkgdir/usr/share/doc/NetworkManager" "$pkgdir/usr/share/doc/$pkgname"
cat > $pkgdir/usr/share/doc/$pkgname/README.alpine <<EOF
To modify system network connections without the root password: add your user account to the 'plugdev' group.
EOF
}
-sha512sums="9f5a934bb96f4cf714ff485e3452bb13707caa470774de1965d8748e94fd6c1d9165fca51764fd12f4f672d05e650460839abb2fd970d356568264347a893e8a NetworkManager-1.7.2.tar.xz
+sha512sums="8406ed561efff13b63dc218babdd2ad9e2816bcc829ba3ef2ce942bb5fa027640de28660381203016fa9cddb61412d3cd5102b7cbd29d0e284b5cb8d13dd8610 NetworkManager-1.10.6.tar.xz
a6e507260e2ceffad4cacb2b49a1d4f6b933e5ae8bc50c1bd56f828298c5dc8d9d17aa4be766faeacefbe3c6c0c748e4ef499a55bb5ee40f0f04bbf766fbbc82 networkmanager.conf
-80ef470956bc5319f02e8387bff17c5452d4147321f9f997ca86017494d5134d8579bf59566fc796f3e84ee5788a2d49743d3b93e795f4976661866d1f1b1442 networkmanager.initd
+477c4cbb6e8c4805a61cdd9442c6a951c8f96173552d943a2f21938ba0facead455f247d65b2b79d1dcdd42abc6db8a8d06c49847bf028001c99ccfca1782bbd networkmanager.initd
9820ed2ead0af689644842de57657bb10330a1eaff0e85b21ae9913f55e399e47d8b41b0a12956f30de80272b4424c6e55f33acbc88e156879003a260bf576f6 networkmanager.rules
-cdc8c26720b983f8afb11ee08c87aab863522633d8dc08e8cea080ed8d94378b3534aedf09efc6e7481599cfede6122b5f6a86b0b45e0a8bb653f95d4c5beaf8 disable_set_hostname.patch
-b777dd8ff7383d736648bf8190aee7e306f3d699bb30759ed7c726abf27a333937cec0adce77785b19a30f8f168c4170353478069524942a87b940458dbbf14a musl-basic.patch
+e9be48c1beba27e6f618e97d63838783e097a671773564285127393863ffc893b79660fab23beb09c62b7381fb046b2b035dc587f8715c07f376112e30c6fa56 musl-basic.patch
1e0c519c101762c251225414e897139eee13d3556910bf9e4e86b58f0a9c298475d880be06420117960036da175fb05a5208c058a8eb4d8c424537703131ca58 musl-network-support.patch
9120208c258f0db6cf9057f21c3b384e7ddc4b6876228cfb20475e3b6f7292025f649a77cdecd170918bec0c86f576718d62bec9dd70ebdd1ab8d48ae65cfb53 musl-dlopen-configure-ac.patch"
diff --git a/community/networkmanager/disable_set_hostname.patch b/community/networkmanager/disable_set_hostname.patch
deleted file mode 100644
index 773e263474..0000000000
--- a/community/networkmanager/disable_set_hostname.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-diff -Nur NetworkManager-0.9.0.orig/src/nm-policy.c NetworkManager-0.9.0/src/nm-policy.c
---- NetworkManager-0.9.0.orig/src/nm-policy.c 2011-08-23 06:41:02.099686450 +0000
-+++ NetworkManager-0.9.0/src/nm-policy.c 2011-08-23 06:43:38.227791737 +0000
-@@ -302,6 +302,7 @@
- return;
- }
-
-+#if 0
- /* Try automatically determined hostname from the best device's IP config */
- if (!best4)
- best4 = get_best_ip4_device (policy->manager, &best_req4);
-@@ -356,6 +357,7 @@
- }
- }
-
-+#endif
- /* If no automatically-configured hostname, try using the hostname from
- * when NM started up.
- */
-
diff --git a/community/networkmanager/musl-basic.patch b/community/networkmanager/musl-basic.patch
index 3d5bb1dca2..533ed98449 100644
--- a/community/networkmanager/musl-basic.patch
+++ b/community/networkmanager/musl-basic.patch
@@ -24,23 +24,9 @@
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 @@
+@@ -134,7 +134,7 @@
# ifdef HAVE___SECURE_GETENV
# define secure_getenv __secure_getenv
# else
@@ -49,17 +35,30 @@
# 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
+--- a/src/systemd/src/basic/process-util.c
++++ b/src/systemd/src/basic/process-util.c
+@@ -1018,8 +1018,9 @@
+ /* 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 __attribute__ ((__weak__));
++//extern int __register_atfork(void (*prepare) (void), void (*parent) (void), void (*child) (void), void * __dso_handle);
++//extern void* __dso_handle __attribute__ ((__weak__));
++#define __register_atfork(prepare,parent,child,dso) pthread_atfork(prepare,parent,child)
- int sd_event_default(sd_event **e);
+ pid_t getpid_cached(void) {
+ pid_t current_value;
+--- a/libnm-core/nm-json.c
++++ b/libnm-core/nm-json.c
+@@ -23,6 +23,10 @@
+ #include <dlfcn.h>
+
++#ifndef RTLD_DEEPBIND
++#define RTLD_DEEPBIND 0
++#endif
++
+ void *_nm_jansson_json_object_iter_value;
+ void *_nm_jansson_json_object_key_to_iter;
+ void *_nm_jansson_json_integer;
diff --git a/community/networkmanager/networkmanager.initd b/community/networkmanager/networkmanager.initd
index 575b413897..1c5e41fc0a 100644
--- a/community/networkmanager/networkmanager.initd
+++ b/community/networkmanager/networkmanager.initd
@@ -5,6 +5,7 @@
depend() {
need dbus
+ provide net
}
start() {
diff --git a/community/networkmanager/networkmanager.pre-install b/community/networkmanager/networkmanager.pre-install
new file mode 100644
index 0000000000..26811dfb09
--- /dev/null
+++ b/community/networkmanager/networkmanager.pre-install
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+addgroup -S plugdev 2>/dev/null
+
+printf " *\n * To setup system connections, regular users must be member of 'plugdev' group.\n *\n"
+printf " *\n * To control WiFi devices, enable wpa_supplicant service: 'rc-update add wpa_supplicant default'\n"
+printf " * then reboot the system or restart 'wpa_supplicant' and 'networkmanager' services respectively.\n *\n"
+
+exit 0
diff --git a/community/networkmanager/networkmanager.pre-upgrade b/community/networkmanager/networkmanager.pre-upgrade
new file mode 120000
index 0000000000..a349c88895
--- /dev/null
+++ b/community/networkmanager/networkmanager.pre-upgrade
@@ -0,0 +1 @@
+networkmanager.pre-install \ No newline at end of file