1 |
commit: b6941460e30a5ae2ee1f4665f0874e33df1e3e0a |
2 |
Author: Jason A. Donenfeld <zx2c4 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jul 31 12:11:32 2020 +0000 |
4 |
Commit: Jason A. Donenfeld <zx2c4 <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jul 31 12:12:07 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b6941460 |
7 |
|
8 |
net-vpn/wireguard-modules: remove 9999 ebuild |
9 |
|
10 |
This is less important than it used to be. |
11 |
|
12 |
Package-Manager: Portage-3.0.1, Repoman-2.3.23 |
13 |
Signed-off-by: Jason A. Donenfeld <zx2c4 <AT> gentoo.org> |
14 |
|
15 |
.../wireguard-modules-9999.ebuild | 100 --------------------- |
16 |
1 file changed, 100 deletions(-) |
17 |
|
18 |
diff --git a/net-vpn/wireguard-modules/wireguard-modules-9999.ebuild b/net-vpn/wireguard-modules/wireguard-modules-9999.ebuild |
19 |
deleted file mode 100644 |
20 |
index 198636c9d9a..00000000000 |
21 |
--- a/net-vpn/wireguard-modules/wireguard-modules-9999.ebuild |
22 |
+++ /dev/null |
23 |
@@ -1,100 +0,0 @@ |
24 |
-# Copyright 1999-2020 Gentoo Authors |
25 |
-# Distributed under the terms of the GNU General Public License v2 |
26 |
- |
27 |
-EAPI=7 |
28 |
- |
29 |
-MODULES_OPTIONAL_USE="module" |
30 |
-inherit linux-mod bash-completion-r1 |
31 |
- |
32 |
-DESCRIPTION="Simple yet fast and modern VPN that utilizes state-of-the-art cryptography." |
33 |
-HOMEPAGE="https://www.wireguard.com/" |
34 |
- |
35 |
-if [[ ${PV} == 9999 ]]; then |
36 |
- inherit git-r3 |
37 |
- EGIT_REPO_URI="https://git.zx2c4.com/wireguard-linux-compat" |
38 |
- KEYWORDS="" |
39 |
-else |
40 |
- SRC_URI="https://git.zx2c4.com/wireguard-linux-compat/snapshot/wireguard-linux-compat-${PV}.tar.xz" |
41 |
- S="${WORKDIR}/wireguard-linux-compat-${PV}" |
42 |
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" |
43 |
-fi |
44 |
- |
45 |
-LICENSE="GPL-2" |
46 |
-SLOT="0" |
47 |
-IUSE="debug +module module-src" |
48 |
- |
49 |
-DEPEND="" |
50 |
-RDEPEND="${DEPEND}" |
51 |
- |
52 |
-MODULE_NAMES="wireguard(kernel/drivers/net:src)" |
53 |
-BUILD_TARGETS="module" |
54 |
-CONFIG_CHECK="NET INET NET_UDP_TUNNEL CRYPTO_ALGAPI" |
55 |
- |
56 |
-pkg_setup() { |
57 |
- if use module; then |
58 |
- linux-mod_pkg_setup |
59 |
- if [[ -f $KERNEL_DIR/include/uapi/linux/wireguard.h ]]; then |
60 |
- eerror |
61 |
- eerror "WireGuard has been merged upstream into this kernel. Therefore," |
62 |
- eerror "you no longer need this compatibility ebuild. Instead, simply" |
63 |
- eerror "enable CONFIG_WIREGUARD=y in your kernel configuration." |
64 |
- eerror |
65 |
- die "Use CONFIG_WIREGUARD=y for this kernel, and do not use this package." |
66 |
- elif kernel_is -lt 3 10 0 || kernel_is -ge 5 6 0; then |
67 |
- die "This version of ${PN} requires Linux >= 3.10 and < 5.6." |
68 |
- fi |
69 |
- fi |
70 |
-} |
71 |
- |
72 |
-src_compile() { |
73 |
- BUILD_PARAMS="KERNELDIR=${KV_OUT_DIR}" |
74 |
- use debug && BUILD_PARAMS="CONFIG_WIREGUARD_DEBUG=y ${BUILD_PARAMS}" |
75 |
- use module && linux-mod_src_compile |
76 |
-} |
77 |
- |
78 |
-src_install() { |
79 |
- use module && linux-mod_src_install |
80 |
- use module-src && emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" -C src dkms-install |
81 |
-} |
82 |
- |
83 |
-pkg_postinst() { |
84 |
- if use module-src && ! use module; then |
85 |
- einfo |
86 |
- einfo "You have enabled the module-src USE flag without the module USE" |
87 |
- einfo "flag. This means that sources are installed to" |
88 |
- einfo "${ROOT}/usr/src/wireguard instead of having the" |
89 |
- einfo "kernel module compiled. You will need to compile the module" |
90 |
- einfo "yourself. Most likely, you don't want this USE flag, and should" |
91 |
- einfo "rather use USE=module" |
92 |
- einfo |
93 |
- fi |
94 |
- |
95 |
- if use module; then |
96 |
- linux-mod_pkg_postinst |
97 |
- local old new |
98 |
- if [[ $(uname -r) != "${KV_FULL}" ]]; then |
99 |
- ewarn |
100 |
- ewarn "You have just built WireGuard for kernel ${KV_FULL}, yet the currently running" |
101 |
- ewarn "kernel is $(uname -r). If you intend to use this WireGuard module on the currently" |
102 |
- ewarn "running machine, you will first need to reboot it into the kernel ${KV_FULL}, for" |
103 |
- ewarn "which this module was built." |
104 |
- ewarn |
105 |
- elif [[ -f /sys/module/wireguard/version ]] && \ |
106 |
- old="$(< /sys/module/wireguard/version)" && \ |
107 |
- new="$(modinfo -F version "${ROOT}/lib/modules/${KV_FULL}/net/wireguard.ko" 2>/dev/null)" && \ |
108 |
- [[ $old != "$new" ]]; then |
109 |
- ewarn |
110 |
- ewarn "You appear to have just upgraded WireGuard from version v$old to v$new." |
111 |
- ewarn "However, the old version is still running on your system. In order to use the" |
112 |
- ewarn "new version, you will need to remove the old module and load the new one. As" |
113 |
- ewarn "root, you can accomplish this with the following commands:" |
114 |
- ewarn |
115 |
- ewarn " # rmmod wireguard" |
116 |
- ewarn " # modprobe wireguard" |
117 |
- ewarn |
118 |
- ewarn "Do note that doing this will remove current WireGuard interfaces, so you may want" |
119 |
- ewarn "to gracefully remove them yourself prior." |
120 |
- ewarn |
121 |
- fi |
122 |
- fi |
123 |
-} |