summaryrefslogtreecommitdiffstats
path: root/network
diff options
context:
space:
mode:
author Anj Duvnjak2020-01-16 19:03:38 +0100
committer Willy Sudiarto Raharjo2020-01-16 19:03:38 +0100
commite0240b2e4f77e5daa861435a9931af5e30e03b2a (patch)
treefa3b70e0a8f7fccf7bf1ada4797325cba1542d0e /network
parent0e78b0de95726333e506bfdac6cd395a181e997e (diff)
downloadslackbuilds-e0240b2e4f77e5daa861435a9931af5e30e03b2a.tar.gz
network/wireguard-tools: Fix script.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network')
-rw-r--r--network/wireguard-tools/README10
-rw-r--r--network/wireguard-tools/wireguard-tools.SlackBuild7
2 files changed, 16 insertions, 1 deletions
diff --git a/network/wireguard-tools/README b/network/wireguard-tools/README
index f14a0fa01e..4769a806fe 100644
--- a/network/wireguard-tools/README
+++ b/network/wireguard-tools/README
@@ -8,3 +8,13 @@ Slackbuilds to build the associated kernel module package.
openresolv is an optional runtime dependency -- you need it if you want
to use to use wg-quick's DNS option.
+
+The wg-quick script needs at least nft 0.7 installed, if using nft.
+Slackware 14.2 ships with nftables 0.6. As such the build script
+will patch wg-quick to always fall back to iptables.
+
+If you have nftables 0.7 or newer installed (i.e. you are running
+-current or a modified 14.2 installation), you may want to leave
+wg-quick unpatched by setting NEW_NFT as follows -:
+
+NEW_NFT=yes ./wireguard-tools.SlackBuild
diff --git a/network/wireguard-tools/wireguard-tools.SlackBuild b/network/wireguard-tools/wireguard-tools.SlackBuild
index 54fe8d25d7..bd3c9c2ea2 100644
--- a/network/wireguard-tools/wireguard-tools.SlackBuild
+++ b/network/wireguard-tools/wireguard-tools.SlackBuild
@@ -25,7 +25,7 @@
PRGNAM=wireguard-tools
VERSION=${VERSION:-1.0.20200102}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGVER="$(printf %s "${VERSION}" | tr - _)"
@@ -72,6 +72,11 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+NEW_NFT=${NEW_NFT:-no}
+[[ $NEW_NFT != "no" ]] || sed -i 's/type -p nft/false/g' src/wg-quick/linux.bash ;
+
+
# If you want this, you can have it :)
SYSTEMD="${SYSTEMD:-no}"