1 |
commit: 11c0cf5d42363856a3b587fbbff7ade95c1a53ea |
2 |
Author: Jason A. Donenfeld <zx2c4 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jul 30 15:07:43 2020 +0000 |
4 |
Commit: Jason A. Donenfeld <zx2c4 <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jul 30 15:08:17 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=11c0cf5d |
7 |
|
8 |
net-vpn/wireguard-modules: detect other kernels that already have wireguard |
9 |
|
10 |
With WireGuard being added to gentoo-sources, we now generalize the |
11 |
detection, so that people use the built-in WireGuard instead of the |
12 |
hacky compatibility module. |
13 |
|
14 |
Package-Manager: Portage-3.0.1, Repoman-2.3.23 |
15 |
Signed-off-by: Jason A. Donenfeld <zx2c4 <AT> gentoo.org> |
16 |
|
17 |
net-vpn/wireguard-modules/wireguard-modules-1.0.20200729.ebuild | 6 +++--- |
18 |
net-vpn/wireguard-modules/wireguard-modules-9999.ebuild | 6 +++--- |
19 |
2 files changed, 6 insertions(+), 6 deletions(-) |
20 |
|
21 |
diff --git a/net-vpn/wireguard-modules/wireguard-modules-1.0.20200729.ebuild b/net-vpn/wireguard-modules/wireguard-modules-1.0.20200729.ebuild |
22 |
index 16df945c1ab..85fe87ad3b4 100644 |
23 |
--- a/net-vpn/wireguard-modules/wireguard-modules-1.0.20200729.ebuild |
24 |
+++ b/net-vpn/wireguard-modules/wireguard-modules-1.0.20200729.ebuild |
25 |
@@ -33,13 +33,13 @@ CONFIG_CHECK="NET INET NET_UDP_TUNNEL CRYPTO_ALGAPI" |
26 |
pkg_setup() { |
27 |
if use module; then |
28 |
linux-mod_pkg_setup |
29 |
- if kernel_is -ge 5 6 0; then |
30 |
+ if [[ -f $KERNEL_DIR/include/uapi/linux/wireguard.h ]]; then |
31 |
eerror |
32 |
- eerror "WireGuard has been merged upstream in Linux 5.6. Therefore," |
33 |
+ eerror "WireGuard has been merged upstream into this kernel. Therefore," |
34 |
eerror "you no longer need this compatibility ebuild. Instead, simply" |
35 |
eerror "enable CONFIG_WIREGUARD=y in your kernel configuration." |
36 |
eerror |
37 |
- die "Use CONFIG_WIREGUARD=y for kernels >= 5.6, and do not use this package." |
38 |
+ die "Use CONFIG_WIREGUARD=y for this kernel, and do not use this package." |
39 |
elif kernel_is -lt 3 10 0; then |
40 |
die "This version of ${PN} requires Linux >= 3.10." |
41 |
fi |
42 |
|
43 |
diff --git a/net-vpn/wireguard-modules/wireguard-modules-9999.ebuild b/net-vpn/wireguard-modules/wireguard-modules-9999.ebuild |
44 |
index 16df945c1ab..85fe87ad3b4 100644 |
45 |
--- a/net-vpn/wireguard-modules/wireguard-modules-9999.ebuild |
46 |
+++ b/net-vpn/wireguard-modules/wireguard-modules-9999.ebuild |
47 |
@@ -33,13 +33,13 @@ CONFIG_CHECK="NET INET NET_UDP_TUNNEL CRYPTO_ALGAPI" |
48 |
pkg_setup() { |
49 |
if use module; then |
50 |
linux-mod_pkg_setup |
51 |
- if kernel_is -ge 5 6 0; then |
52 |
+ if [[ -f $KERNEL_DIR/include/uapi/linux/wireguard.h ]]; then |
53 |
eerror |
54 |
- eerror "WireGuard has been merged upstream in Linux 5.6. Therefore," |
55 |
+ eerror "WireGuard has been merged upstream into this kernel. Therefore," |
56 |
eerror "you no longer need this compatibility ebuild. Instead, simply" |
57 |
eerror "enable CONFIG_WIREGUARD=y in your kernel configuration." |
58 |
eerror |
59 |
- die "Use CONFIG_WIREGUARD=y for kernels >= 5.6, and do not use this package." |
60 |
+ die "Use CONFIG_WIREGUARD=y for this kernel, and do not use this package." |
61 |
elif kernel_is -lt 3 10 0; then |
62 |
die "This version of ${PN} requires Linux >= 3.10." |
63 |
fi |