aboutsummaryrefslogtreecommitdiffstats
path: root/testing/wireguard-tools
diff options
context:
space:
mode:
authorStuart Cardall <developer@it-offshore.co.uk>2019-01-02 21:28:39 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2019-01-03 08:30:49 +0000
commit16a4a9c1c7a1b50a313a3a70efaf324189ae0d00 (patch)
tree6aec1e44c8cd10f744accb42008a1fee28afe56e /testing/wireguard-tools
parente6404a21b246558e15ba90e0a54011392d26c497 (diff)
downloadaports-16a4a9c1c7a1b50a313a3a70efaf324189ae0d00.tar.bz2
aports-16a4a9c1c7a1b50a313a3a70efaf324189ae0d00.tar.xz
testing/wireguard-tools: add missing depends
wg-quick does not work with some of the busybox built-ins. based on original report by Nathan Caldwell (saintdev at gmail dot com) adds depends for: procps iproute2 coreutils (for sysctl -r) but NOT for Bash (which is required by wg-quick only & not by other wg-tools) see also: https://github.com/alpinelinux/aports/pull/3903 https://lists.zx2c4.com/pipermail/wireguard/2018-December/003608.html
Diffstat (limited to 'testing/wireguard-tools')
-rw-r--r--testing/wireguard-tools/APKBUILD10
-rw-r--r--testing/wireguard-tools/alpine-compat.patch25
2 files changed, 32 insertions, 3 deletions
diff --git a/testing/wireguard-tools/APKBUILD b/testing/wireguard-tools/APKBUILD
index 76e249e51e..29a32cdc32 100644
--- a/testing/wireguard-tools/APKBUILD
+++ b/testing/wireguard-tools/APKBUILD
@@ -4,15 +4,18 @@
# NOTE: pkgrel must match _toolsrel in wireguard-vanilla
pkgname=wireguard-tools
pkgver=0.0.20181218
-pkgrel=0
+pkgrel=1
pkgdesc="Next generation secure network tunnel: userspace tools"
arch='all'
url='https://www.wireguard.com'
license="GPL-2.0"
makedepends="libmnl-dev"
+depends="iproute2 procps coreutils"
subpackages="$pkgname-doc $pkgname-bash-completion:bashcomp:noarch"
options="!check"
-source="https://git.zx2c4.com/WireGuard/snapshot/WireGuard-$pkgver.tar.xz"
+source="https://git.zx2c4.com/WireGuard/snapshot/WireGuard-$pkgver.tar.xz
+ alpine-compat.patch
+ "
builddir="$srcdir"/WireGuard-$pkgver
build() {
@@ -43,4 +46,5 @@ bashcomp() {
mv "$pkgdir"/usr/share "$subpkgdir"/usr
}
-sha512sums="73c8e9b37d857349b75df776607c15ea2082814952acdba3ad6379c4ce631601db2767603e46ecadf1bce9348a0c26d07f4f6b5857ddd72bb4f4411d1d13d88c WireGuard-0.0.20181218.tar.xz"
+sha512sums="73c8e9b37d857349b75df776607c15ea2082814952acdba3ad6379c4ce631601db2767603e46ecadf1bce9348a0c26d07f4f6b5857ddd72bb4f4411d1d13d88c WireGuard-0.0.20181218.tar.xz
+be16a4b547b9ed60d7cd2b7dddb1ec8001f38faf8340bd76013e631c4c376a2fcd45b757296ac7422b53d7f14c759eecc41376bc6e01159c3bc5bdb121413598 alpine-compat.patch"
diff --git a/testing/wireguard-tools/alpine-compat.patch b/testing/wireguard-tools/alpine-compat.patch
new file mode 100644
index 0000000000..ec7deae02b
--- /dev/null
+++ b/testing/wireguard-tools/alpine-compat.patch
@@ -0,0 +1,25 @@
+diff --git a/src/tools/wg-quick/linux.bash b/src/tools/wg-quick/linux.bash
+index 48ce163..a2a0738 100755
+--- a/src/tools/wg-quick/linux.bash
++++ b/src/tools/wg-quick/linux.bash
+@@ -1,9 +1,18 @@
+-#!/bin/bash
++#!/bin/sh
+ # SPDX-License-Identifier: GPL-2.0
+ #
+ # Copyright (C) 2015-2018 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
+ #
+
++if [ -z "$BASH_VERSION" ]; then
++ if ! type bash >/dev/null 2>&1; then
++ echo "Please run 'apk add bash' and try again." >&2
++ exit 1
++ fi
++ exec bash "$0" "$@"
++fi
++set +o posix
++
+ set -e -o pipefail
+ shopt -s extglob
+ export LC_ALL=C
+