aboutsummaryrefslogtreecommitdiffstats
path: root/community/networkmanager
diff options
context:
space:
mode:
authorStuart Cardall <developer@it-offshore.co.uk>2016-08-18 20:46:53 +0000
committerCarlo Landmeter <clandmeter@gmail.com>2016-08-21 22:24:04 +0200
commit5c9f3ca3e307be53b45beeed2ce1626f38008625 (patch)
tree919836fe454e953f46685adf8228b0401280d4b6 /community/networkmanager
parent6a00a953ba02bab6440a2c784e7db37c6eaeace1 (diff)
downloadaports-5c9f3ca3e307be53b45beeed2ce1626f38008625.tar.bz2
aports-5c9f3ca3e307be53b45beeed2ce1626f38008625.tar.xz
testing/[various]: move to community
albatross-themes apk-post-messages autossh bitcoin btrbk entr ffmpegthumbnailer firejail firetools fwsnort gnome-colors imapsync inetutils-syslogd inotify-tools-inc isync junit ktsuss letsencrypt-nosudo libmbim libndp libqmi libteam mini-sendmail modemmanager namecoin networkmanager nginx-naxsi numix-themes nxapi opencl-headers opencl-icd-loader opus-tools perl-authen-ntlm perl-bit-vector perl-data-uniqid perl-file-copy-recursive perl-getopt-argvfile perl-io-tee perl-iptables-chainmgr perl-iptables-parse perl-module-scandeps perl-par-dist perl-par-packer perl-par perl-uri-escape psad py-crcmod py-graphviz py-lz4 py-opencl py-opengl-accelerate runit secpwgen secure-delete socklog spacefm tinyssh udevil virt-viewer virtualbricks whois wrk xpra zram-init
Diffstat (limited to 'community/networkmanager')
-rw-r--r--community/networkmanager/APKBUILD129
-rw-r--r--community/networkmanager/disable_set_hostname.patch20
-rw-r--r--community/networkmanager/networkmanager.conf2
-rw-r--r--community/networkmanager/networkmanager.initd23
-rw-r--r--community/networkmanager/networkmanager.rules9
-rw-r--r--community/networkmanager/new-fix-musl-headers.patch31
6 files changed, 214 insertions, 0 deletions
diff --git a/community/networkmanager/APKBUILD b/community/networkmanager/APKBUILD
new file mode 100644
index 0000000000..7f0a0e8dbf
--- /dev/null
+++ b/community/networkmanager/APKBUILD
@@ -0,0 +1,129 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
+pkgname=networkmanager
+pkgver=1.0.6
+pkgrel=0
+pkgdesc="network management tool"
+url="http://projects.gnome.org/NetworkManager/"
+arch="all"
+license="GPL"
+depends="dhcpcd iptables dbus"
+depends_dev=
+makedepends="$depends_dev
+ dbus-glib-dev
+ eudev-dev
+ gobject-introspection-dev
+ intltool
+ libmm-glib-dev
+ libndp-dev
+ libnl3-dev
+ libsoup-dev
+ libteam-dev
+ linux-headers
+ modemmanager-dev
+ newt-dev
+ nss-dev
+ polkit-dev
+ ppp-dev
+ readline-dev
+ util-linux-dev
+ vala
+ "
+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
+ "
+
+_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
+ # 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
+
+}
+
+build() {
+ 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 \
+ --with-crypto=nss \
+ --with-modem-manager-1 \
+ --with-nmtui=yes \
+ --with-wext=yes \
+ --with-resolvconf=yes \
+ --with-session-tracking=no \
+ --with-suspend-resume=upower \
+ --without-valgrind \
+ || return 1
+ # ourLDFLAGS confuses the gir-scanner
+ unset LDFLAGS
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+
+ install -m755 -D "$srcdir"/networkmanager.initd \
+ "$pkgdir"/etc/init.d/networkmanager || return 1
+
+ install -m644 -D "$srcdir/$pkgname.conf" \
+ "$pkgdir/etc/NetworkManager/NetworkManager.conf" || return 1
+ # 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
+ mkdir -p "$pkgdir/usr/share/apk-tools/$pkgname"
+ # post-install message
+ mv "$pkgdir/usr/share/doc/NetworkManager" "$pkgdir/usr/share/doc/$pkgname" || return 1
+ 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
+}
+
+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
+a6e507260e2ceffad4cacb2b49a1d4f6b933e5ae8bc50c1bd56f828298c5dc8d9d17aa4be766faeacefbe3c6c0c748e4ef499a55bb5ee40f0f04bbf766fbbc82 networkmanager.conf
+80ef470956bc5319f02e8387bff17c5452d4147321f9f997ca86017494d5134d8579bf59566fc796f3e84ee5788a2d49743d3b93e795f4976661866d1f1b1442 networkmanager.initd
+9820ed2ead0af689644842de57657bb10330a1eaff0e85b21ae9913f55e399e47d8b41b0a12956f30de80272b4424c6e55f33acbc88e156879003a260bf576f6 networkmanager.rules
+18eff8eadcb8d47742a5c760c0c4a217d82749edc0060dc3b62e6aa0671f456de9d0c11b1669b302371410cd4036bf21aee468ed1d61e7a84afd3b694bc69984 new-fix-musl-headers.patch
+cdc8c26720b983f8afb11ee08c87aab863522633d8dc08e8cea080ed8d94378b3534aedf09efc6e7481599cfede6122b5f6a86b0b45e0a8bb653f95d4c5beaf8 disable_set_hostname.patch"
diff --git a/community/networkmanager/disable_set_hostname.patch b/community/networkmanager/disable_set_hostname.patch
new file mode 100644
index 0000000000..773e263474
--- /dev/null
+++ b/community/networkmanager/disable_set_hostname.patch
@@ -0,0 +1,20 @@
+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/networkmanager.conf b/community/networkmanager/networkmanager.conf
new file mode 100644
index 0000000000..8da4fe0487
--- /dev/null
+++ b/community/networkmanager/networkmanager.conf
@@ -0,0 +1,2 @@
+[main]
+dhcp=dhcpcd
diff --git a/community/networkmanager/networkmanager.initd b/community/networkmanager/networkmanager.initd
new file mode 100644
index 0000000000..575b413897
--- /dev/null
+++ b/community/networkmanager/networkmanager.initd
@@ -0,0 +1,23 @@
+#!/sbin/openrc-run
+# Copyright (c) 2008 Saleem Abdulrasool <compnerd@compnerd.org>
+# Distributed under the terms of the GNU General Purpose License v2
+# $Header: $
+
+depend() {
+ need dbus
+}
+
+start() {
+ ebegin "Starting NetworkManager"
+ start-stop-daemon --start --quiet --pidfile /var/run/NetworkManager.pid \
+ --exec /usr/sbin/NetworkManager -- --pid-file /var/run/NetworkManager.pid
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping NetworkManager"
+ start-stop-daemon --stop --quiet --pidfile /var/run/NetworkManager.pid
+ eend $?
+}
+
+# vim: set ft=gentoo-init-d ts=3 sw=3 et:
diff --git a/community/networkmanager/networkmanager.rules b/community/networkmanager/networkmanager.rules
new file mode 100644
index 0000000000..66d21d6bbd
--- /dev/null
+++ b/community/networkmanager/networkmanager.rules
@@ -0,0 +1,9 @@
+// Let users in plugdev group modify NetworkManager
+polkit.addRule(function(action, subject) {
+ if (action.id == "org.freedesktop.NetworkManager.settings.modify.system" &&
+ subject.isInGroup("plugdev") && subject.active) {
+ return "yes";
+ }
+});
+
+
diff --git a/community/networkmanager/new-fix-musl-headers.patch b/community/networkmanager/new-fix-musl-headers.patch
new file mode 100644
index 0000000000..e29f8569e6
--- /dev/null
+++ b/community/networkmanager/new-fix-musl-headers.patch
@@ -0,0 +1,31 @@
+## 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
+
+