1 |
commit: c0379432b1fe95cf29150ba25b60113b3649aa35 |
2 |
Author: Jason A. Donenfeld <zx2c4 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Dec 26 16:40:15 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=c0379432 |
7 |
|
8 |
net-vpn/wireguard-tools: add missing info from monolithic ebuild |
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 |
.../wireguard-tools-1.0.20191226.ebuild | 40 +++++++++++++++++++++- |
14 |
.../wireguard-tools/wireguard-tools-9999.ebuild | 40 +++++++++++++++++++++- |
15 |
2 files changed, 78 insertions(+), 2 deletions(-) |
16 |
|
17 |
diff --git a/net-vpn/wireguard-tools/wireguard-tools-1.0.20191226.ebuild b/net-vpn/wireguard-tools/wireguard-tools-1.0.20191226.ebuild |
18 |
index db33e8d6af8..700f6f9b03e 100644 |
19 |
--- a/net-vpn/wireguard-tools/wireguard-tools-1.0.20191226.ebuild |
20 |
+++ b/net-vpn/wireguard-tools/wireguard-tools-1.0.20191226.ebuild |
21 |
@@ -3,7 +3,7 @@ |
22 |
|
23 |
EAPI=6 |
24 |
|
25 |
-inherit bash-completion-r1 |
26 |
+inherit linux-mod bash-completion-r1 |
27 |
|
28 |
DESCRIPTION="Required tools for WireGuard, such as wg(8) and wg-quick(8)" |
29 |
HOMEPAGE="https://www.wireguard.com/" |
30 |
@@ -26,6 +26,21 @@ RDEPEND="${DEPEND} |
31 |
!<=net-vpn/wireguard-0.0.20191219 |
32 |
" |
33 |
|
34 |
+wg_quick_optional_config_nob() { |
35 |
+ CONFIG_CHECK="$CONFIG_CHECK ~$1" |
36 |
+ 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." |
37 |
+} |
38 |
+ |
39 |
+pkg_setup() { |
40 |
+ wg_quick_optional_config_nob IP_ADVANCED_ROUTER |
41 |
+ wg_quick_optional_config_nob IP_MULTIPLE_TABLES |
42 |
+ wg_quick_optional_config_nob NETFILTER_XT_MARK |
43 |
+ wg_quick_optional_config_nob NETFILTER_XT_CONNMARK |
44 |
+ wg_quick_optional_config_nob IP6_NF_RAW |
45 |
+ wg_quick_optional_config_nob IP_NF_RAW |
46 |
+ linux-mod_pkg_setup |
47 |
+} |
48 |
+ |
49 |
src_compile() { |
50 |
emake RUNSTATEDIR="${EPREFIX}/run" -C src CC="$(tc-getCC)" LD="$(tc-getLD)" |
51 |
} |
52 |
@@ -42,3 +57,26 @@ src_install() { |
53 |
PREFIX="${EPREFIX}/usr" \ |
54 |
-C src install |
55 |
} |
56 |
+ |
57 |
+pkg_postinst() { |
58 |
+ einfo |
59 |
+ einfo "After installing WireGuard, if you'd like to try sending some packets through" |
60 |
+ einfo "WireGuard, you may use, for testing purposes only, the insecure client.sh" |
61 |
+ einfo "test example script:" |
62 |
+ einfo |
63 |
+ einfo " \$ bzcat ${ROOT}usr/share/doc/${PF}/contrib/ncat-client-server/client.sh.bz2 | sudo bash -" |
64 |
+ einfo |
65 |
+ einfo "This will automatically setup interface wg0, through a very insecure transport" |
66 |
+ einfo "that is only suitable for demonstration purposes. You can then try loading the" |
67 |
+ einfo "hidden website or sending pings:" |
68 |
+ einfo |
69 |
+ einfo " \$ chromium http://192.168.4.1" |
70 |
+ einfo " \$ ping 192.168.4.1" |
71 |
+ einfo |
72 |
+ einfo "If you'd like to redirect your internet traffic, you can run it with the" |
73 |
+ einfo "\"default-route\" argument. You may not use this server for any abusive or illegal" |
74 |
+ einfo "purposes. It is for quick testing only." |
75 |
+ einfo |
76 |
+ einfo "More info on getting started can be found at: https://www.wireguard.com/quickstart/" |
77 |
+ einfo |
78 |
+} |
79 |
|
80 |
diff --git a/net-vpn/wireguard-tools/wireguard-tools-9999.ebuild b/net-vpn/wireguard-tools/wireguard-tools-9999.ebuild |
81 |
index db33e8d6af8..700f6f9b03e 100644 |
82 |
--- a/net-vpn/wireguard-tools/wireguard-tools-9999.ebuild |
83 |
+++ b/net-vpn/wireguard-tools/wireguard-tools-9999.ebuild |
84 |
@@ -3,7 +3,7 @@ |
85 |
|
86 |
EAPI=6 |
87 |
|
88 |
-inherit bash-completion-r1 |
89 |
+inherit linux-mod bash-completion-r1 |
90 |
|
91 |
DESCRIPTION="Required tools for WireGuard, such as wg(8) and wg-quick(8)" |
92 |
HOMEPAGE="https://www.wireguard.com/" |
93 |
@@ -26,6 +26,21 @@ RDEPEND="${DEPEND} |
94 |
!<=net-vpn/wireguard-0.0.20191219 |
95 |
" |
96 |
|
97 |
+wg_quick_optional_config_nob() { |
98 |
+ CONFIG_CHECK="$CONFIG_CHECK ~$1" |
99 |
+ 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." |
100 |
+} |
101 |
+ |
102 |
+pkg_setup() { |
103 |
+ wg_quick_optional_config_nob IP_ADVANCED_ROUTER |
104 |
+ wg_quick_optional_config_nob IP_MULTIPLE_TABLES |
105 |
+ wg_quick_optional_config_nob NETFILTER_XT_MARK |
106 |
+ wg_quick_optional_config_nob NETFILTER_XT_CONNMARK |
107 |
+ wg_quick_optional_config_nob IP6_NF_RAW |
108 |
+ wg_quick_optional_config_nob IP_NF_RAW |
109 |
+ linux-mod_pkg_setup |
110 |
+} |
111 |
+ |
112 |
src_compile() { |
113 |
emake RUNSTATEDIR="${EPREFIX}/run" -C src CC="$(tc-getCC)" LD="$(tc-getLD)" |
114 |
} |
115 |
@@ -42,3 +57,26 @@ src_install() { |
116 |
PREFIX="${EPREFIX}/usr" \ |
117 |
-C src install |
118 |
} |
119 |
+ |
120 |
+pkg_postinst() { |
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}/contrib/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 |
+} |