summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason A. Donenfeld <zx2c4@gentoo.org>2019-12-03 11:30:18 +0100
committerJason A. Donenfeld <zx2c4@gentoo.org>2019-12-03 11:33:48 +0100
commit8b9ebbaf620a46cdd36da1fb98b0766f65b02fd0 (patch)
tree9548f62fe9d08b370e9e1655b375ae75d9b039fe /net-vpn
parentx11-themes/papirus-icon-theme: Version bump (v20191201) (diff)
downloadgentoo-8b9ebbaf620a46cdd36da1fb98b0766f65b02fd0.tar.gz
gentoo-8b9ebbaf620a46cdd36da1fb98b0766f65b02fd0.tar.bz2
gentoo-8b9ebbaf620a46cdd36da1fb98b0766f65b02fd0.zip
net-vpn/wireguard: fix dependencies
Bug: https://bugs.gentoo.org/701762 Bug: https://bugs.gentoo.org/701758 Package-Manager: Portage-2.3.79, Repoman-2.3.18 Signed-off-by: Jason A. Donenfeld <zx2c4@gentoo.org>
Diffstat (limited to 'net-vpn')
-rw-r--r--net-vpn/wireguard/wireguard-0.0.20191127-r1.ebuild (renamed from net-vpn/wireguard/wireguard-0.0.20191127.ebuild)6
-rw-r--r--net-vpn/wireguard/wireguard-9999.ebuild18
2 files changed, 21 insertions, 3 deletions
diff --git a/net-vpn/wireguard/wireguard-0.0.20191127.ebuild b/net-vpn/wireguard/wireguard-0.0.20191127-r1.ebuild
index e4113ef8fb96..ea25a74e43f6 100644
--- a/net-vpn/wireguard/wireguard-0.0.20191127.ebuild
+++ b/net-vpn/wireguard/wireguard-0.0.20191127-r1.ebuild
@@ -23,7 +23,7 @@ LICENSE="GPL-2"
SLOT="0"
IUSE="debug +module +tools module-src"
-DEPEND="tools? ( net-libs/libmnl )"
+DEPEND="tools? ( net-libs/libmnl net-firewall/iptables )"
RDEPEND="${DEPEND}"
MODULE_NAMES="wireguard(kernel/drivers/net:src)"
@@ -41,6 +41,9 @@ pkg_setup() {
wg_quick_optional_config_nob IP_ADVANCED_ROUTER
wg_quick_optional_config_nob IP_MULTIPLE_TABLES
wg_quick_optional_config_nob NETFILTER_XT_MARK
+ wg_quick_optional_config_nob NETFILTER_XT_CONNMARK
+ wg_quick_optional_config_nob IP6_NF_RAW
+ wg_quick_optional_config_nob IP_NF_RAW
fi
linux-mod_pkg_setup
@@ -60,6 +63,7 @@ src_install() {
if use tools; then
dodoc README.md
dodoc -r contrib/examples
+ sed -i 's/iptables-restore -nw/iptables-restore -n/g' src/tools/wg-quick/linux.bash || die "Unable to patch wg-quick"
emake \
WITH_BASHCOMPLETION=yes \
WITH_SYSTEMDUNITS=yes \
diff --git a/net-vpn/wireguard/wireguard-9999.ebuild b/net-vpn/wireguard/wireguard-9999.ebuild
index e7bf51b60e9c..7bf967c35b0e 100644
--- a/net-vpn/wireguard/wireguard-9999.ebuild
+++ b/net-vpn/wireguard/wireguard-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -23,15 +23,29 @@ LICENSE="GPL-2"
SLOT="0"
IUSE="debug +module +tools module-src"
-DEPEND="tools? ( net-libs/libmnl )"
+DEPEND="tools? ( net-libs/libmnl net-firewall/iptables )"
RDEPEND="${DEPEND}"
MODULE_NAMES="wireguard(kernel/drivers/net:src)"
BUILD_TARGETS="module"
CONFIG_CHECK="NET INET NET_UDP_TUNNEL CRYPTO_BLKCIPHER"
+wg_quick_optional_config_nob() {
+ CONFIG_CHECK="$CONFIG_CHECK ~$1"
+ declare -g ERROR_$1="CONFIG_$1: This option is required for automatic routing of default routes inside of wg-quick(8), though it is not required for general WireGuard usage."
+}
+
pkg_setup() {
if use module; then
+ if use tools; then
+ wg_quick_optional_config_nob IP_ADVANCED_ROUTER
+ wg_quick_optional_config_nob IP_MULTIPLE_TABLES
+ wg_quick_optional_config_nob NETFILTER_XT_MARK
+ wg_quick_optional_config_nob NETFILTER_XT_CONNMARK
+ wg_quick_optional_config_nob IP6_NF_RAW
+ wg_quick_optional_config_nob IP_NF_RAW
+ fi
+
linux-mod_pkg_setup
kernel_is -lt 3 10 0 && die "This version of ${PN} requires Linux >= 3.10"
fi