1 |
commit: 38dbe9e8af0e04193eece8172105b75ffdac8f34 |
2 |
Author: Jason A. Donenfeld <zx2c4 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Dec 26 16:46:23 2019 +0000 |
4 |
Commit: Jason A. Donenfeld <zx2c4 <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Dec 26 16:47:16 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=38dbe9e8 |
7 |
|
8 |
net-vpn/wireguard: revbump in preparation for move to virtual |
9 |
|
10 |
Package-Manager: Portage-2.3.83, Repoman-2.3.20 |
11 |
Signed-off-by: Jason A. Donenfeld <zx2c4 <AT> gentoo.org> |
12 |
|
13 |
net-vpn/wireguard/Manifest | 1 - |
14 |
net-vpn/wireguard/wireguard-0.0.20191219-r1.ebuild | 137 --------------------- |
15 |
net-vpn/wireguard/wireguard-0.0.20191219-r2.ebuild | 19 +++ |
16 |
net-vpn/wireguard/wireguard-9999.ebuild | 137 --------------------- |
17 |
4 files changed, 19 insertions(+), 275 deletions(-) |
18 |
|
19 |
diff --git a/net-vpn/wireguard/Manifest b/net-vpn/wireguard/Manifest |
20 |
deleted file mode 100644 |
21 |
index e795e99cfef..00000000000 |
22 |
--- a/net-vpn/wireguard/Manifest |
23 |
+++ /dev/null |
24 |
@@ -1 +0,0 @@ |
25 |
-DIST WireGuard-0.0.20191219.tar.xz 332596 BLAKE2B d670a762ec230138ba2889e2156c65d37630df9f368bde4eb619960333d91739ffed72a040cc762aa964ed137d6cde8761e1838c1a561dbe0aa5451333f4eb52 SHA512 0ff9f50e36378b2444f1cd670138e58676cee04f82dcc637d47aea69268034c950103609f7e35af14d7d1b0b579535000330737c2071f61b2d56147c95ef8e71 |
26 |
|
27 |
diff --git a/net-vpn/wireguard/wireguard-0.0.20191219-r1.ebuild b/net-vpn/wireguard/wireguard-0.0.20191219-r1.ebuild |
28 |
deleted file mode 100644 |
29 |
index 917e43d3e74..00000000000 |
30 |
--- a/net-vpn/wireguard/wireguard-0.0.20191219-r1.ebuild |
31 |
+++ /dev/null |
32 |
@@ -1,137 +0,0 @@ |
33 |
-# Copyright 1999-2019 Gentoo Authors |
34 |
-# Distributed under the terms of the GNU General Public License v2 |
35 |
- |
36 |
-EAPI=6 |
37 |
- |
38 |
-MODULES_OPTIONAL_USE="module" |
39 |
-inherit linux-mod bash-completion-r1 |
40 |
- |
41 |
-DESCRIPTION="Simple yet fast and modern VPN that utilizes state-of-the-art cryptography." |
42 |
-HOMEPAGE="https://www.wireguard.com/" |
43 |
- |
44 |
-if [[ ${PV} == 9999 ]]; then |
45 |
- inherit git-r3 |
46 |
- EGIT_REPO_URI="https://git.zx2c4.com/WireGuard" |
47 |
- KEYWORDS="" |
48 |
-else |
49 |
- SRC_URI="https://git.zx2c4.com/WireGuard/snapshot/WireGuard-${PV}.tar.xz" |
50 |
- S="${WORKDIR}/WireGuard-${PV}" |
51 |
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" |
52 |
-fi |
53 |
- |
54 |
-LICENSE="GPL-2" |
55 |
-SLOT="0" |
56 |
-IUSE="debug +module +tools module-src" |
57 |
- |
58 |
-DEPEND="" |
59 |
-RDEPEND="${DEPEND} |
60 |
- tools? ( net-vpn/wireguard-tools ) |
61 |
-" |
62 |
- |
63 |
-MODULE_NAMES="wireguard(kernel/drivers/net:src)" |
64 |
-BUILD_TARGETS="module" |
65 |
-CONFIG_CHECK="NET INET NET_UDP_TUNNEL CRYPTO_ALGAPI" |
66 |
- |
67 |
-wg_quick_optional_config_nob() { |
68 |
- CONFIG_CHECK="$CONFIG_CHECK ~$1" |
69 |
- 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." |
70 |
-} |
71 |
- |
72 |
-pkg_setup() { |
73 |
- if use module; then |
74 |
- if use tools; then |
75 |
- wg_quick_optional_config_nob IP_ADVANCED_ROUTER |
76 |
- wg_quick_optional_config_nob IP_MULTIPLE_TABLES |
77 |
- wg_quick_optional_config_nob NETFILTER_XT_MARK |
78 |
- wg_quick_optional_config_nob NETFILTER_XT_CONNMARK |
79 |
- wg_quick_optional_config_nob IP6_NF_RAW |
80 |
- wg_quick_optional_config_nob IP_NF_RAW |
81 |
- fi |
82 |
- |
83 |
- linux-mod_pkg_setup |
84 |
- kernel_is -lt 3 10 0 && die "This version of ${PN} requires Linux >= 3.10" |
85 |
- fi |
86 |
-} |
87 |
- |
88 |
-src_compile() { |
89 |
- BUILD_PARAMS="KERNELDIR=${KERNEL_DIR}" |
90 |
- use debug && BUILD_PARAMS="CONFIG_WIREGUARD_DEBUG=y ${BUILD_PARAMS}" |
91 |
- use module && linux-mod_src_compile |
92 |
-} |
93 |
- |
94 |
-src_install() { |
95 |
- use module && linux-mod_src_install |
96 |
- use module-src && emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" -C src dkms-install |
97 |
-} |
98 |
- |
99 |
-pkg_postinst() { |
100 |
- if use module-src && ! use module; then |
101 |
- einfo |
102 |
- einfo "You have enabled the module-src USE flag without the module USE" |
103 |
- einfo "flag. This means that sources are installed to" |
104 |
- einfo "${ROOT}usr/src/wireguard instead of having the" |
105 |
- einfo "kernel module compiled. You will need to compile the module" |
106 |
- einfo "yourself. Most likely, you don't want this USE flag, and should" |
107 |
- einfo "rather use USE=module" |
108 |
- einfo |
109 |
- fi |
110 |
- use module && linux-mod_pkg_postinst |
111 |
- |
112 |
- einfo |
113 |
- einfo "This software is experimental and has not yet been released." |
114 |
- einfo "As such, it may contain significant issues. Please do not file" |
115 |
- einfo "bug reports with Gentoo, but rather direct them upstream to:" |
116 |
- einfo |
117 |
- einfo " team@×××××××××.com security@×××××××××.com" |
118 |
- einfo |
119 |
- |
120 |
- if use tools; then |
121 |
- einfo |
122 |
- einfo "After installing WireGuard, if you'd like to try sending some packets through" |
123 |
- einfo "WireGuard, you may use, for testing purposes only, the insecure client.sh" |
124 |
- einfo "test example script:" |
125 |
- einfo |
126 |
- einfo " \$ bzcat ${ROOT}usr/share/doc/${PF}/examples/ncat-client-server/client.sh.bz2 | sudo bash -" |
127 |
- einfo |
128 |
- einfo "This will automatically setup interface wg0, through a very insecure transport" |
129 |
- einfo "that is only suitable for demonstration purposes. You can then try loading the" |
130 |
- einfo "hidden website or sending pings:" |
131 |
- einfo |
132 |
- einfo " \$ chromium http://192.168.4.1" |
133 |
- einfo " \$ ping 192.168.4.1" |
134 |
- einfo |
135 |
- einfo "If you'd like to redirect your internet traffic, you can run it with the" |
136 |
- einfo "\"default-route\" argument. You may not use this server for any abusive or illegal" |
137 |
- einfo "purposes. It is for quick testing only." |
138 |
- einfo |
139 |
- einfo "More info on getting started can be found at: https://www.wireguard.com/quickstart/" |
140 |
- einfo |
141 |
- fi |
142 |
- if use module; then |
143 |
- local old new |
144 |
- if [[ $(uname -r) != "${KV_FULL}" ]]; then |
145 |
- ewarn |
146 |
- ewarn "You have just built WireGuard for kernel ${KV_FULL}, yet the currently running" |
147 |
- ewarn "kernel is $(uname -r). If you intend to use this WireGuard module on the currently" |
148 |
- ewarn "running machine, you will first need to reboot it into the kernel ${KV_FULL}, for" |
149 |
- ewarn "which this module was built." |
150 |
- ewarn |
151 |
- elif [[ -f /sys/module/wireguard/version ]] && \ |
152 |
- old="$(< /sys/module/wireguard/version)" && \ |
153 |
- new="$(modinfo -F version "${ROOT}/lib/modules/${KV_FULL}/net/wireguard.ko" 2>/dev/null)" && \ |
154 |
- [[ $old != "$new" ]]; then |
155 |
- ewarn |
156 |
- ewarn "You appear to have just upgraded WireGuard from version v$old to v$new." |
157 |
- ewarn "However, the old version is still running on your system. In order to use the" |
158 |
- ewarn "new version, you will need to remove the old module and load the new one. As" |
159 |
- ewarn "root, you can accomplish this with the following commands:" |
160 |
- ewarn |
161 |
- ewarn " # rmmod wireguard" |
162 |
- ewarn " # modprobe wireguard" |
163 |
- ewarn |
164 |
- ewarn "Do note that doing this will remove current WireGuard interfaces, so you may want" |
165 |
- ewarn "to gracefully remove them yourself prior." |
166 |
- ewarn |
167 |
- fi |
168 |
- fi |
169 |
-} |
170 |
|
171 |
diff --git a/net-vpn/wireguard/wireguard-0.0.20191219-r2.ebuild b/net-vpn/wireguard/wireguard-0.0.20191219-r2.ebuild |
172 |
new file mode 100644 |
173 |
index 00000000000..bd9e9772ed8 |
174 |
--- /dev/null |
175 |
+++ b/net-vpn/wireguard/wireguard-0.0.20191219-r2.ebuild |
176 |
@@ -0,0 +1,19 @@ |
177 |
+# Copyright 1999-2019 Gentoo Authors |
178 |
+# Distributed under the terms of the GNU General Public License v2 |
179 |
+ |
180 |
+EAPI=6 |
181 |
+ |
182 |
+DESCRIPTION="Simple yet fast and modern VPN that utilizes state-of-the-art cryptography." |
183 |
+HOMEPAGE="https://www.wireguard.com/" |
184 |
+ |
185 |
+LICENSE="MIT" |
186 |
+SLOT="0" |
187 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" |
188 |
+IUSE="debug +module +tools module-src" |
189 |
+ |
190 |
+RDEPEND=" |
191 |
+ tools? ( net-vpn/wireguard-tools ) |
192 |
+ module? ( net-vpn/wireguard-modules[module] ) |
193 |
+ module-src? ( net-vpn/wireguard-modules[module-src] ) |
194 |
+ debug? ( net-vpn/wireguard-modules[debug] ) |
195 |
+" |
196 |
|
197 |
diff --git a/net-vpn/wireguard/wireguard-9999.ebuild b/net-vpn/wireguard/wireguard-9999.ebuild |
198 |
deleted file mode 100644 |
199 |
index 917e43d3e74..00000000000 |
200 |
--- a/net-vpn/wireguard/wireguard-9999.ebuild |
201 |
+++ /dev/null |
202 |
@@ -1,137 +0,0 @@ |
203 |
-# Copyright 1999-2019 Gentoo Authors |
204 |
-# Distributed under the terms of the GNU General Public License v2 |
205 |
- |
206 |
-EAPI=6 |
207 |
- |
208 |
-MODULES_OPTIONAL_USE="module" |
209 |
-inherit linux-mod bash-completion-r1 |
210 |
- |
211 |
-DESCRIPTION="Simple yet fast and modern VPN that utilizes state-of-the-art cryptography." |
212 |
-HOMEPAGE="https://www.wireguard.com/" |
213 |
- |
214 |
-if [[ ${PV} == 9999 ]]; then |
215 |
- inherit git-r3 |
216 |
- EGIT_REPO_URI="https://git.zx2c4.com/WireGuard" |
217 |
- KEYWORDS="" |
218 |
-else |
219 |
- SRC_URI="https://git.zx2c4.com/WireGuard/snapshot/WireGuard-${PV}.tar.xz" |
220 |
- S="${WORKDIR}/WireGuard-${PV}" |
221 |
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" |
222 |
-fi |
223 |
- |
224 |
-LICENSE="GPL-2" |
225 |
-SLOT="0" |
226 |
-IUSE="debug +module +tools module-src" |
227 |
- |
228 |
-DEPEND="" |
229 |
-RDEPEND="${DEPEND} |
230 |
- tools? ( net-vpn/wireguard-tools ) |
231 |
-" |
232 |
- |
233 |
-MODULE_NAMES="wireguard(kernel/drivers/net:src)" |
234 |
-BUILD_TARGETS="module" |
235 |
-CONFIG_CHECK="NET INET NET_UDP_TUNNEL CRYPTO_ALGAPI" |
236 |
- |
237 |
-wg_quick_optional_config_nob() { |
238 |
- CONFIG_CHECK="$CONFIG_CHECK ~$1" |
239 |
- 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." |
240 |
-} |
241 |
- |
242 |
-pkg_setup() { |
243 |
- if use module; then |
244 |
- if use tools; then |
245 |
- wg_quick_optional_config_nob IP_ADVANCED_ROUTER |
246 |
- wg_quick_optional_config_nob IP_MULTIPLE_TABLES |
247 |
- wg_quick_optional_config_nob NETFILTER_XT_MARK |
248 |
- wg_quick_optional_config_nob NETFILTER_XT_CONNMARK |
249 |
- wg_quick_optional_config_nob IP6_NF_RAW |
250 |
- wg_quick_optional_config_nob IP_NF_RAW |
251 |
- fi |
252 |
- |
253 |
- linux-mod_pkg_setup |
254 |
- kernel_is -lt 3 10 0 && die "This version of ${PN} requires Linux >= 3.10" |
255 |
- fi |
256 |
-} |
257 |
- |
258 |
-src_compile() { |
259 |
- BUILD_PARAMS="KERNELDIR=${KERNEL_DIR}" |
260 |
- use debug && BUILD_PARAMS="CONFIG_WIREGUARD_DEBUG=y ${BUILD_PARAMS}" |
261 |
- use module && linux-mod_src_compile |
262 |
-} |
263 |
- |
264 |
-src_install() { |
265 |
- use module && linux-mod_src_install |
266 |
- use module-src && emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" -C src dkms-install |
267 |
-} |
268 |
- |
269 |
-pkg_postinst() { |
270 |
- if use module-src && ! use module; then |
271 |
- einfo |
272 |
- einfo "You have enabled the module-src USE flag without the module USE" |
273 |
- einfo "flag. This means that sources are installed to" |
274 |
- einfo "${ROOT}usr/src/wireguard instead of having the" |
275 |
- einfo "kernel module compiled. You will need to compile the module" |
276 |
- einfo "yourself. Most likely, you don't want this USE flag, and should" |
277 |
- einfo "rather use USE=module" |
278 |
- einfo |
279 |
- fi |
280 |
- use module && linux-mod_pkg_postinst |
281 |
- |
282 |
- einfo |
283 |
- einfo "This software is experimental and has not yet been released." |
284 |
- einfo "As such, it may contain significant issues. Please do not file" |
285 |
- einfo "bug reports with Gentoo, but rather direct them upstream to:" |
286 |
- einfo |
287 |
- einfo " team@×××××××××.com security@×××××××××.com" |
288 |
- einfo |
289 |
- |
290 |
- if use tools; then |
291 |
- einfo |
292 |
- einfo "After installing WireGuard, if you'd like to try sending some packets through" |
293 |
- einfo "WireGuard, you may use, for testing purposes only, the insecure client.sh" |
294 |
- einfo "test example script:" |
295 |
- einfo |
296 |
- einfo " \$ bzcat ${ROOT}usr/share/doc/${PF}/examples/ncat-client-server/client.sh.bz2 | sudo bash -" |
297 |
- einfo |
298 |
- einfo "This will automatically setup interface wg0, through a very insecure transport" |
299 |
- einfo "that is only suitable for demonstration purposes. You can then try loading the" |
300 |
- einfo "hidden website or sending pings:" |
301 |
- einfo |
302 |
- einfo " \$ chromium http://192.168.4.1" |
303 |
- einfo " \$ ping 192.168.4.1" |
304 |
- einfo |
305 |
- einfo "If you'd like to redirect your internet traffic, you can run it with the" |
306 |
- einfo "\"default-route\" argument. You may not use this server for any abusive or illegal" |
307 |
- einfo "purposes. It is for quick testing only." |
308 |
- einfo |
309 |
- einfo "More info on getting started can be found at: https://www.wireguard.com/quickstart/" |
310 |
- einfo |
311 |
- fi |
312 |
- if use module; then |
313 |
- local old new |
314 |
- if [[ $(uname -r) != "${KV_FULL}" ]]; then |
315 |
- ewarn |
316 |
- ewarn "You have just built WireGuard for kernel ${KV_FULL}, yet the currently running" |
317 |
- ewarn "kernel is $(uname -r). If you intend to use this WireGuard module on the currently" |
318 |
- ewarn "running machine, you will first need to reboot it into the kernel ${KV_FULL}, for" |
319 |
- ewarn "which this module was built." |
320 |
- ewarn |
321 |
- elif [[ -f /sys/module/wireguard/version ]] && \ |
322 |
- old="$(< /sys/module/wireguard/version)" && \ |
323 |
- new="$(modinfo -F version "${ROOT}/lib/modules/${KV_FULL}/net/wireguard.ko" 2>/dev/null)" && \ |
324 |
- [[ $old != "$new" ]]; then |
325 |
- ewarn |
326 |
- ewarn "You appear to have just upgraded WireGuard from version v$old to v$new." |
327 |
- ewarn "However, the old version is still running on your system. In order to use the" |
328 |
- ewarn "new version, you will need to remove the old module and load the new one. As" |
329 |
- ewarn "root, you can accomplish this with the following commands:" |
330 |
- ewarn |
331 |
- ewarn " # rmmod wireguard" |
332 |
- ewarn " # modprobe wireguard" |
333 |
- ewarn |
334 |
- ewarn "Do note that doing this will remove current WireGuard interfaces, so you may want" |
335 |
- ewarn "to gracefully remove them yourself prior." |
336 |
- ewarn |
337 |
- fi |
338 |
- fi |
339 |
-} |