1 |
commit: a6703cb464ead520b9556916a1b6112196914349 |
2 |
Author: Mikle Kolyada <zlogene <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Apr 15 18:52:28 2021 +0000 |
4 |
Commit: Mikle Kolyada <zlogene <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Apr 15 18:54:00 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a6703cb4 |
7 |
|
8 |
net-vpn/openvpn: minor improvements |
9 |
|
10 |
* enable lz4 USE by default (pipular option) |
11 |
* improve postinst to include systemd instructions |
12 |
|
13 |
Package-Manager: Portage-3.0.17, Repoman-3.0.2 |
14 |
Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org> |
15 |
|
16 |
net-vpn/openvpn/openvpn-2.4.9.ebuild | 44 ++++++++++++++++++++++----------- |
17 |
net-vpn/openvpn/openvpn-2.5.0-r1.ebuild | 44 ++++++++++++++++++++++----------- |
18 |
net-vpn/openvpn/openvpn-2.5.1-r1.ebuild | 8 +++--- |
19 |
net-vpn/openvpn/openvpn-9999.ebuild | 44 ++++++++++++++++++++++----------- |
20 |
4 files changed, 94 insertions(+), 46 deletions(-) |
21 |
|
22 |
diff --git a/net-vpn/openvpn/openvpn-2.4.9.ebuild b/net-vpn/openvpn/openvpn-2.4.9.ebuild |
23 |
index 9ee9208aa81..6d6d5d7a02d 100644 |
24 |
--- a/net-vpn/openvpn/openvpn-2.4.9.ebuild |
25 |
+++ b/net-vpn/openvpn/openvpn-2.4.9.ebuild |
26 |
@@ -13,7 +13,7 @@ LICENSE="GPL-2" |
27 |
SLOT="0" |
28 |
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux" |
29 |
|
30 |
-IUSE="down-root examples inotify iproute2 libressl lz4 +lzo mbedtls pam" |
31 |
+IUSE="down-root examples inotify iproute2 libressl +lz4 +lzo mbedtls pam" |
32 |
IUSE+=" pkcs11 +plugins selinux +ssl systemd test userland_BSD" |
33 |
|
34 |
RESTRICT="!test? ( test )" |
35 |
@@ -128,19 +128,35 @@ pkg_postinst() { |
36 |
elog "http://tuntaposx.sourceforge.net" |
37 |
fi |
38 |
|
39 |
- elog "The openvpn init script expects to find the configuration file" |
40 |
- elog "openvpn.conf in /etc/openvpn along with any extra files it may need." |
41 |
- elog "" |
42 |
- elog "To create more VPNs, simply create a new .conf file for it and" |
43 |
- elog "then create a symlink to the openvpn init script from a link called" |
44 |
- elog "openvpn.newconfname - like so" |
45 |
- elog " cd /etc/openvpn" |
46 |
- elog " ${EDITOR##*/} foo.conf" |
47 |
- elog " cd /etc/init.d" |
48 |
- elog " ln -s openvpn openvpn.foo" |
49 |
- elog "" |
50 |
- elog "You can then treat openvpn.foo as any other service, so you can" |
51 |
- elog "stop one vpn and start another if you need to." |
52 |
+ if systemd_is_booted || has_version sys-apps/systemd; then |
53 |
+ elog "In order to use OpenVPN with systemd please use the correct systemd service file." |
54 |
+ elog "" |
55 |
+ elog "server:" |
56 |
+ elog "" |
57 |
+ elog "- Place your server configuration file in /etc/openvpn/server" |
58 |
+ elog "- Use the openvpn-server@.service like so" |
59 |
+ elog "systemctl start openvpn-server@{Server-config}" |
60 |
+ elog "" |
61 |
+ elog "client:" |
62 |
+ elog "" |
63 |
+ elog "- Place your client configuration file in /etc/openvpn/client" |
64 |
+ elog "- Use the openvpn-client@.service like so:" |
65 |
+ elog "systemctl start openvpn-client@{Client-config}" |
66 |
+ else |
67 |
+ elog "The openvpn init script expects to find the configuration file" |
68 |
+ elog "openvpn.conf in /etc/openvpn along with any extra files it may need." |
69 |
+ elog "" |
70 |
+ elog "To create more VPNs, simply create a new .conf file for it and" |
71 |
+ elog "then create a symlink to the openvpn init script from a link called" |
72 |
+ elog "openvpn.newconfname - like so" |
73 |
+ elog " cd /etc/openvpn" |
74 |
+ elog " ${EDITOR##*/} foo.conf" |
75 |
+ elog " cd /etc/init.d" |
76 |
+ elog " ln -s openvpn openvpn.foo" |
77 |
+ elog "" |
78 |
+ elog "You can then treat openvpn.foo as any other service, so you can" |
79 |
+ elog "stop one vpn and start another if you need to." |
80 |
+ fi |
81 |
|
82 |
if grep -Eq "^[ \t]*(up|down)[ \t].*" "${ROOT}/etc/openvpn"/*.conf 2>/dev/null ; then |
83 |
ewarn "" |
84 |
|
85 |
diff --git a/net-vpn/openvpn/openvpn-2.5.0-r1.ebuild b/net-vpn/openvpn/openvpn-2.5.0-r1.ebuild |
86 |
index fe802877755..2744ace9271 100644 |
87 |
--- a/net-vpn/openvpn/openvpn-2.5.0-r1.ebuild |
88 |
+++ b/net-vpn/openvpn/openvpn-2.5.0-r1.ebuild |
89 |
@@ -13,7 +13,7 @@ LICENSE="GPL-2" |
90 |
SLOT="0" |
91 |
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" |
92 |
|
93 |
-IUSE="down-root examples inotify iproute2 libressl lz4 +lzo mbedtls +openssl" |
94 |
+IUSE="down-root examples inotify iproute2 libressl +lz4 +lzo mbedtls +openssl" |
95 |
IUSE+=" pam pkcs11 +plugins selinux systemd test userland_BSD" |
96 |
|
97 |
RESTRICT="!test? ( test )" |
98 |
@@ -127,19 +127,35 @@ pkg_postinst() { |
99 |
elog "http://tuntaposx.sourceforge.net" |
100 |
fi |
101 |
|
102 |
- elog "The openvpn init script expects to find the configuration file" |
103 |
- elog "openvpn.conf in /etc/openvpn along with any extra files it may need." |
104 |
- elog "" |
105 |
- elog "To create more VPNs, simply create a new .conf file for it and" |
106 |
- elog "then create a symlink to the openvpn init script from a link called" |
107 |
- elog "openvpn.newconfname - like so" |
108 |
- elog " cd /etc/openvpn" |
109 |
- elog " ${EDITOR##*/} foo.conf" |
110 |
- elog " cd /etc/init.d" |
111 |
- elog " ln -s openvpn openvpn.foo" |
112 |
- elog "" |
113 |
- elog "You can then treat openvpn.foo as any other service, so you can" |
114 |
- elog "stop one vpn and start another if you need to." |
115 |
+ if systemd_is_booted || has_version sys-apps/systemd; then |
116 |
+ elog "In order to use OpenVPN with systemd please use the correct systemd service file." |
117 |
+ elog "" |
118 |
+ elog "server:" |
119 |
+ elog "" |
120 |
+ elog "- Place your server configuration file in /etc/openvpn/server" |
121 |
+ elog "- Use the openvpn-server@.service like so" |
122 |
+ elog "systemctl start openvpn-server@{Server-config}" |
123 |
+ elog "" |
124 |
+ elog "client:" |
125 |
+ elog "" |
126 |
+ elog "- Place your client configuration file in /etc/openvpn/client" |
127 |
+ elog "- Use the openvpn-client@.service like so:" |
128 |
+ elog "systemctl start openvpn-client@{Client-config}" |
129 |
+ else |
130 |
+ elog "The openvpn init script expects to find the configuration file" |
131 |
+ elog "openvpn.conf in /etc/openvpn along with any extra files it may need." |
132 |
+ elog "" |
133 |
+ elog "To create more VPNs, simply create a new .conf file for it and" |
134 |
+ elog "then create a symlink to the openvpn init script from a link called" |
135 |
+ elog "openvpn.newconfname - like so" |
136 |
+ elog " cd /etc/openvpn" |
137 |
+ elog " ${EDITOR##*/} foo.conf" |
138 |
+ elog " cd /etc/init.d" |
139 |
+ elog " ln -s openvpn openvpn.foo" |
140 |
+ elog "" |
141 |
+ elog "You can then treat openvpn.foo as any other service, so you can" |
142 |
+ elog "stop one vpn and start another if you need to." |
143 |
+ fi |
144 |
|
145 |
if grep -Eq "^[ \t]*(up|down)[ \t].*" "${ROOT}/etc/openvpn"/*.conf 2>/dev/null ; then |
146 |
ewarn "" |
147 |
|
148 |
diff --git a/net-vpn/openvpn/openvpn-2.5.1-r1.ebuild b/net-vpn/openvpn/openvpn-2.5.1-r1.ebuild |
149 |
index 990ee902239..5d4782a0359 100644 |
150 |
--- a/net-vpn/openvpn/openvpn-2.5.1-r1.ebuild |
151 |
+++ b/net-vpn/openvpn/openvpn-2.5.1-r1.ebuild |
152 |
@@ -150,10 +150,10 @@ pkg_postinst() { |
153 |
elog "To create more VPNs, simply create a new .conf file for it and" |
154 |
elog "then create a symlink to the openvpn init script from a link called" |
155 |
elog "openvpn.newconfname - like so" |
156 |
- elog " cd /etc/openvpn" |
157 |
- elog " ${EDITOR##*/} foo.conf" |
158 |
- elog " cd /etc/init.d" |
159 |
- elog " ln -s openvpn openvpn.foo" |
160 |
+ elog " cd /etc/openvpn" |
161 |
+ elog " ${EDITOR##*/} foo.conf" |
162 |
+ elog " cd /etc/init.d" |
163 |
+ elog " ln -s openvpn openvpn.foo" |
164 |
elog "" |
165 |
elog "You can then treat openvpn.foo as any other service, so you can" |
166 |
elog "stop one vpn and start another if you need to." |
167 |
|
168 |
diff --git a/net-vpn/openvpn/openvpn-9999.ebuild b/net-vpn/openvpn/openvpn-9999.ebuild |
169 |
index befc78d0d7b..b2945c23a0f 100644 |
170 |
--- a/net-vpn/openvpn/openvpn-9999.ebuild |
171 |
+++ b/net-vpn/openvpn/openvpn-9999.ebuild |
172 |
@@ -14,7 +14,7 @@ LICENSE="GPL-2" |
173 |
SLOT="0" |
174 |
KEYWORDS="" |
175 |
|
176 |
-IUSE="down-root examples inotify iproute2 libressl lz4 +lzo mbedtls pam" |
177 |
+IUSE="down-root examples inotify iproute2 libressl +lz4 +lzo mbedtls pam" |
178 |
IUSE+=" pkcs11 +plugins selinux +ssl systemd test userland_BSD" |
179 |
|
180 |
RESTRICT="!test? ( test )" |
181 |
@@ -118,19 +118,35 @@ pkg_postinst() { |
182 |
elog "http://tuntaposx.sourceforge.net" |
183 |
fi |
184 |
|
185 |
- elog "The openvpn init script expects to find the configuration file" |
186 |
- elog "openvpn.conf in /etc/openvpn along with any extra files it may need." |
187 |
- elog "" |
188 |
- elog "To create more VPNs, simply create a new .conf file for it and" |
189 |
- elog "then create a symlink to the openvpn init script from a link called" |
190 |
- elog "openvpn.newconfname - like so" |
191 |
- elog " cd /etc/openvpn" |
192 |
- elog " ${EDITOR##*/} foo.conf" |
193 |
- elog " cd /etc/init.d" |
194 |
- elog " ln -s openvpn openvpn.foo" |
195 |
- elog "" |
196 |
- elog "You can then treat openvpn.foo as any other service, so you can" |
197 |
- elog "stop one vpn and start another if you need to." |
198 |
+ if systemd_is_booted || has_version sys-apps/systemd; then |
199 |
+ elog "In order to use OpenVPN with systemd please use the correct systemd service file." |
200 |
+ elog "" |
201 |
+ elog "server:" |
202 |
+ elog "" |
203 |
+ elog "- Place your server configuration file in /etc/openvpn/server" |
204 |
+ elog "- Use the openvpn-server@.service like so" |
205 |
+ elog "systemctl start openvpn-server@{Server-config}" |
206 |
+ elog "" |
207 |
+ elog "client:" |
208 |
+ elog "" |
209 |
+ elog "- Place your client configuration file in /etc/openvpn/client" |
210 |
+ elog "- Use the openvpn-client@.service like so:" |
211 |
+ elog "systemctl start openvpn-client@{Client-config}" |
212 |
+ else |
213 |
+ elog "The openvpn init script expects to find the configuration file" |
214 |
+ elog "openvpn.conf in /etc/openvpn along with any extra files it may need." |
215 |
+ elog "" |
216 |
+ elog "To create more VPNs, simply create a new .conf file for it and" |
217 |
+ elog "then create a symlink to the openvpn init script from a link called" |
218 |
+ elog "openvpn.newconfname - like so" |
219 |
+ elog " cd /etc/openvpn" |
220 |
+ elog " ${EDITOR##*/} foo.conf" |
221 |
+ elog " cd /etc/init.d" |
222 |
+ elog " ln -s openvpn openvpn.foo" |
223 |
+ elog "" |
224 |
+ elog "You can then treat openvpn.foo as any other service, so you can" |
225 |
+ elog "stop one vpn and start another if you need to." |
226 |
+ fi |
227 |
|
228 |
if grep -Eq "^[ \t]*(up|down)[ \t].*" "${ROOT}/etc/openvpn"/*.conf 2>/dev/null ; then |
229 |
ewarn "" |