1 |
commit: 434e02faf70fe788e572a31ccef39eff82cee06c |
2 |
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Dec 16 22:02:58 2015 +0000 |
4 |
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Dec 16 22:02:58 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=434e02fa |
7 |
|
8 |
net-misc/openvpn: tree version works, bug #548886. |
9 |
|
10 |
net-misc/openvpn/Manifest | 15 --- |
11 |
.../openvpn/files/2.3.6-disable-compression.patch | 18 --- |
12 |
net-misc/openvpn/files/2.3.6-musl-compat.patch | 14 --- |
13 |
net-misc/openvpn/files/2.3.6-null-cipher.patch | 46 ------- |
14 |
net-misc/openvpn/files/65openvpn | 1 - |
15 |
net-misc/openvpn/files/down.sh | 33 ----- |
16 |
net-misc/openvpn/files/openvpn-2.1.conf | 18 --- |
17 |
net-misc/openvpn/files/openvpn-2.1.init | 133 -------------------- |
18 |
net-misc/openvpn/files/openvpn.init | 63 ---------- |
19 |
net-misc/openvpn/files/openvpn.service | 12 -- |
20 |
net-misc/openvpn/files/openvpn.tmpfile | 1 - |
21 |
net-misc/openvpn/files/up.sh | 100 --------------- |
22 |
net-misc/openvpn/metadata.xml | 22 ---- |
23 |
net-misc/openvpn/openvpn-2.3.6-r99.ebuild | 137 --------------------- |
24 |
net-misc/openvpn/openvpn-9999.ebuild | 126 ------------------- |
25 |
15 files changed, 739 deletions(-) |
26 |
|
27 |
diff --git a/net-misc/openvpn/Manifest b/net-misc/openvpn/Manifest |
28 |
deleted file mode 100644 |
29 |
index 4c4ace6..0000000 |
30 |
--- a/net-misc/openvpn/Manifest |
31 |
+++ /dev/null |
32 |
@@ -1,15 +0,0 @@ |
33 |
-AUX 2.3.6-disable-compression.patch 579 SHA256 644068d1925a7b2866a4afaef15ebb27f5bbf1b55eed0894d34f7603c230bd9a SHA512 56acdd4716df4f6a0367fd583296718e30d3fa4b6b129159f61f913eba97769943a2354e9b51572314a206f68a20def091a89aec12bc942d94b05369128d3a97 WHIRLPOOL 1fb293d49f63a75cb772c262d9a55a6cb00be0f154387bf4fb3e9be1602038bd70348fad5f1a2b714fa7b45cbcd36a4db2c6f1441f3a00aff7d51732b3629708 |
34 |
-AUX 2.3.6-musl-compat.patch 433 SHA256 5837eef6d66b56ce9c0cb5fe93dac1a27900c085ab8a2e295c5a7b8fcae52e60 SHA512 ef002c1bff131924d8ca1ee41f10c3f274788c85fa122d2b9839bb571579fa836f1bcf865bcb8b825db21681ea7dd9290d796f7005690a2070f32439da105e0f WHIRLPOOL 482e1717c27b89ebd3d2294eea16d588a892ef984e947c0a06eb9c4924247af4a81f4877d6cd89d65840ff28ac8badd4bf5d7ee7b44889b4b8e465d3be1ca8fa |
35 |
-AUX 2.3.6-null-cipher.patch 1531 SHA256 a3f8ac3630c9887d18d21e0ac9781d615cf8dff277c070306b36c5d0faa8a1ac SHA512 0aa288af3c0b43977bf84b099ea28dbf7ab9a1096d76e8f706989570984c70a4c298430eac35b0c80eab8bc05e6072d965c20a9e3689e7448e759abb92c93fb2 WHIRLPOOL cbefb2a1b6d63373890a76d3a6153335f8d05b07e4546893e7a8871c653d39f06941615181308fbf41a07cf702b2a730dfacc6a01840efdbfbeaf301a58362bb |
36 |
-AUX 65openvpn 45 SHA256 d5758e39fdc75dcbb5a788b1afa743c3c1f08c63c535aa32c300b965474d765c SHA512 713345092b60d1322d3fa96fd72d69ed82dbfee5031a675114bc60acfdacaf0811f6bf4530cf937ca5a86b3f2665b28951b9087ec91c2c0faf75bdaf1e25bdbb WHIRLPOOL 534e7dcf2ac953e9ec5de05810022471cb26a16806cd036f25d02550e20f8aaa91410bd005bc7a5e4a549d8a40d01ae317be1d1e1e25d91ed989bbbea7ede9d2 |
37 |
-AUX down.sh 943 SHA256 39debebcd8c899f20e6d355cbc8eaab46e28b83a9f6c33a94c065688a4f3d2c7 SHA512 5defd61edf11cc63f3f8f60bef7fa730c4bcdd2545d664bd94666dd3aea80bd9d190263d8835a555e4287a594f6fce0f52426aed49c60233ff637a2a6164a997 WHIRLPOOL c66fd1e016656fe83d7f55b77bf232058397f9cd3054abe13ec006c227afe6746ee4ada310ff43761ec95510f736b8e542f136711d648642eecafe055975c57e |
38 |
-AUX openvpn-2.1.conf 892 SHA256 330149a83684ddabe413d134d4c8efad4c88b18c2ab67165014deff5f7fffad2 SHA512 982ade883afbe2e656a9cbbe36c31c0e8b4f7bbbe5b63df9f7b834f02a9153032fb7445c85d3e91f62c68a7ddd13c3afbf420fb71cdd13d9c4b69f867bdd9f37 WHIRLPOOL 6ef644826e1e9e2a100e0fa20b5c9190e92c9e08a366dee28dccf3f70fa0593f3c4d271e42db3920630f03704aa2aef8e84d9efbb2b4b6a0d08e74bb340fb0a5 |
39 |
-AUX openvpn-2.1.init 4186 SHA256 d1b1f8a00935d77521bceb62535350444df3470fa45f4d33c3934051a1bb595b SHA512 7ecd0b4dc7341ea0df598752bec8ae6011bea7973ed9dbf17a12c308aed46362e1507fcb3a3bb26049619747f2f819deec1a42c6dce2c13d2a769f1e37735a2f WHIRLPOOL 9d34c438b7d9e45678e2aa48ab42a68b9e2801423688c6280cbb4934a8ef04cbf8a7953a061659f57fb02adf535596ac9313268c29e2dc18cffbf7315681da82 |
40 |
-AUX openvpn.init 1486 SHA256 c4b9e0899fa5ee0b90c5100da7711dc7a6a5658f10042b0feda9e7efb90a11cf SHA512 450595b9ec82ded74c26ed9f73182122e05f53655262a342b195dcedfe63a06a5d9927a3bbe50d0d04f810cc786ac3eb78843877f426c893e165b967bc8ac012 WHIRLPOOL e549221283b4b92c9ada312a746c4ad4c645493c1c844ddaddefecee4c31e17bd4bd8555618408e065c83143e157aaf7e75b44f01abe43f507835df2aa1149d3 |
41 |
-AUX openvpn.service 335 SHA256 a63a6e1505f2b3e20f2c82588dd0c23da9d8c750e1f36fec2ba20a8b5b0c9de1 SHA512 fbd41b80253aaae6750301ac95d8b3bf09e3a70556cc0513792c8e06faa70a716233d134d4928295f381f0f235fcde0eeac9cfa074924b6666a4b46ff7cf91a9 WHIRLPOOL 16f44d10ab03110a21a69716fbac2e64e5376426edd26783d7946d928dd0cc106810126436488843da8e16277d3aa83d208fe50c4aebd9cff86526ce1762b215 |
42 |
-AUX openvpn.tmpfile 39 SHA256 ef3453056a26487d27908d5ced124285403d8e88deb843fccdba9f6724966826 SHA512 659713b35eee340f2b6578796f4335dda391aa635892e802e3f2531f31c9470460b4e4b3be45457f81f3b08b7d60ce15d16f8d70b968fbf24f846ef5f8611a58 WHIRLPOOL 19e4611ffda68a99851921ccaf3a99d04350cd3e0d8833136da151119c267edc383ff96162aa47a2f77171ae908ad011e4119a7a18961ed0bddcbf38d997b976 |
43 |
-AUX up.sh 2865 SHA256 d887ee065261affd849227fa27e092cf66549d824a698f302312d15f787dd840 SHA512 35201b0e60ad20358080007e595eb4f96d186ba8e88f0485c55d164c28e3d78a12f3e09347ba3d76abb9b8b03fb4a53664bd74ab484be1548090022b956925fd WHIRLPOOL 8d25a66d192a6710466d149aec7a1719dfe91558205e8ba7e25b93e58869c8fedc96ba4ce2aedb0595b7e0b63299e6e41be1ba82c6b93ae6bbbb26d409c9bf51 |
44 |
-DIST openvpn-2.3.6.tar.gz 1213272 SHA256 7baed2ff39c12e1a1a289ec0b46fcc49ff094ca58b8d8d5f29b36ac649ee5b26 SHA512 70e0045ea41f6588769ab8b98d8f550b69148adbf7fedcdc36900e25950df43379950492652e243ec6e7965bf9c7dcc86a56ba5dfdc44523aaa81cfc508b1c6e WHIRLPOOL 737f2d1d69ee1c7700d5cd5a4e7d5d1b2f55d8b2229f7c2565fcb8c731ebb719ec8d6bad3b76f763f36e5c70c6e40a666db3508f3024f8e4637c0659061dba48 |
45 |
-EBUILD openvpn-2.3.6-r99.ebuild 4426 SHA256 3f1264eced8d351e4e179b1d7b7522e8c1e3d440b3a608d914d8fe99d4f2ab79 SHA512 0fa7ea5f00d81d83a26b88ff4e7a8944357c85d1df023b76857b53a4b486b926c51efe73082ecc0b0c9d4dd17ae90ebbe02798493f494db95458bf1021b681df WHIRLPOOL 47500eb883a0e077f4a249570c4ebaab0fa033d9051f1e56a0c0d36e97023320ef77f889a9ce81e7a81ca06a4ca7aca826433394c04181f22b19944c532f27b2 |
46 |
-EBUILD openvpn-9999.ebuild 3941 SHA256 ef975ee9157e25b16aa4c59144b1fc0814c67def458a71e5166c70e7c41e5081 SHA512 7030ee666c7372b86a198f3780797a4253baed6e61e4bbb3f1bb166b95268b4ee00992c770c689ab6bb9326eb2d66a6c52cec65739e887ef39e6da1da6ce49b6 WHIRLPOOL 174bee3dc113263b7ebc24048613cc3039cd49f52cee4c9eff55d80d9436cead408d3c09cb6dad1318a4812fb00f7eb22b286f329499346240db2f38a066b2ff |
47 |
-MISC metadata.xml 937 SHA256 3dfcc28012f2c92f044882c39d56b6ef82bb80749ce688b75d526cc6c8836dd3 SHA512 ad3f218ccc64249fda19d87fe79494280eb880841f2d1e69757e7093e62b446f273fecd074ccac02c28894924b02d6a9c9fbbc1bd12ab13493f7f77e50e5b1ce WHIRLPOOL 65bf683e35f44c306c9ed3297cd954eb490f658f97a2d03af2cba0484030b1eccdf401fdc867a5c35a602bd67bf7052d555c2a48b7bebb4469158e26a530a742 |
48 |
|
49 |
diff --git a/net-misc/openvpn/files/2.3.6-disable-compression.patch b/net-misc/openvpn/files/2.3.6-disable-compression.patch |
50 |
deleted file mode 100644 |
51 |
index d9d1c76..0000000 |
52 |
--- a/net-misc/openvpn/files/2.3.6-disable-compression.patch |
53 |
+++ /dev/null |
54 |
@@ -1,18 +0,0 @@ |
55 |
-https://community.openvpn.net/openvpn/changeset/5d5233778868ddd568140c394adfcfc8e3453245/ |
56 |
- |
57 |
---- openvpn-2.3.6/src/openvpn/ssl_openssl.c.orig 2014-11-29 23:00:35.000000000 +0800 |
58 |
-+++ openvpn-2.3.6/src/openvpn/ssl_openssl.c 2015-01-12 21:14:30.186993686 +0800 |
59 |
-@@ -238,6 +238,13 @@ |
60 |
- if (tls_ver_min > TLS_VER_1_2 || tls_ver_max < TLS_VER_1_2) |
61 |
- sslopt |= SSL_OP_NO_TLSv1_2; |
62 |
- #endif |
63 |
-+ |
64 |
-+#ifdef SSL_OP_NO_COMPRESSION |
65 |
-+ msg (M_WARN, "[Workaround] disable SSL compression"); |
66 |
-+ sslopt |= SSL_OP_NO_COMPRESSION; |
67 |
-+#endif |
68 |
-+ |
69 |
-+ |
70 |
- SSL_CTX_set_options (ctx->ctx, sslopt); |
71 |
- } |
72 |
- |
73 |
|
74 |
diff --git a/net-misc/openvpn/files/2.3.6-musl-compat.patch b/net-misc/openvpn/files/2.3.6-musl-compat.patch |
75 |
deleted file mode 100644 |
76 |
index 9b1289b..0000000 |
77 |
--- a/net-misc/openvpn/files/2.3.6-musl-compat.patch |
78 |
+++ /dev/null |
79 |
@@ -1,14 +0,0 @@ |
80 |
-diff -Naur openvpn-2.3.6.orig/src/openvpn/syshead.h openvpn-2.3.6/src/openvpn/syshead.h |
81 |
---- openvpn-2.3.6.orig/src/openvpn/syshead.h 2014-11-29 16:00:35.000000000 +0100 |
82 |
-+++ openvpn-2.3.6/src/openvpn/syshead.h 2015-05-08 00:42:34.171634884 +0200 |
83 |
-@@ -214,10 +214,6 @@ |
84 |
- |
85 |
- #ifdef TARGET_LINUX |
86 |
- |
87 |
--#if defined(HAVE_NETINET_IF_ETHER_H) |
88 |
--#include <netinet/if_ether.h> |
89 |
--#endif |
90 |
-- |
91 |
- #ifdef HAVE_LINUX_IF_TUN_H |
92 |
- #include <linux/if_tun.h> |
93 |
- #endif |
94 |
|
95 |
diff --git a/net-misc/openvpn/files/2.3.6-null-cipher.patch b/net-misc/openvpn/files/2.3.6-null-cipher.patch |
96 |
deleted file mode 100644 |
97 |
index 1e831cf..0000000 |
98 |
--- a/net-misc/openvpn/files/2.3.6-null-cipher.patch |
99 |
+++ /dev/null |
100 |
@@ -1,46 +0,0 @@ |
101 |
-The "really fix cipher none" patch has been merged to release/2.3 and master: |
102 |
- |
103 |
-commit 785838614afc20d362b64907b0212e9a779e2287 (release/2.3) |
104 |
-commit 98156e90e1e83133a6a6a020db8e7333ada6156b (master) |
105 |
- |
106 |
-diff --git a/src/openvpn/crypto_backend.h b/src/openvpn/crypto_backend.h |
107 |
-index 8749878..4e45df0 100644 |
108 |
---- a/src/openvpn/crypto_backend.h |
109 |
-+++ b/src/openvpn/crypto_backend.h |
110 |
-@@ -237,8 +237,7 @@ int cipher_kt_mode (const cipher_kt_t *cipher_kt); |
111 |
- * |
112 |
- * @return true iff the cipher is a CBC mode cipher. |
113 |
- */ |
114 |
--bool cipher_kt_mode_cbc(const cipher_kt_t *cipher) |
115 |
-- __attribute__((nonnull)); |
116 |
-+bool cipher_kt_mode_cbc(const cipher_kt_t *cipher); |
117 |
- |
118 |
- /** |
119 |
- * Check if the supplied cipher is a supported OFB or CFB mode cipher. |
120 |
-@@ -247,8 +246,7 @@ bool cipher_kt_mode_cbc(const cipher_kt_t *cipher) |
121 |
- * |
122 |
- * @return true iff the cipher is a OFB or CFB mode cipher. |
123 |
- */ |
124 |
--bool cipher_kt_mode_ofb_cfb(const cipher_kt_t *cipher) |
125 |
-- __attribute__((nonnull)); |
126 |
-+bool cipher_kt_mode_ofb_cfb(const cipher_kt_t *cipher); |
127 |
- |
128 |
- |
129 |
- /** |
130 |
-diff --git a/tests/t_lpback.sh b/tests/t_lpback.sh |
131 |
-index 8f88ad9..d7792cd 100755 |
132 |
---- a/tests/t_lpback.sh |
133 |
-+++ b/tests/t_lpback.sh |
134 |
-@@ -35,6 +35,9 @@ CIPHERS=$(${top_builddir}/src/openvpn/openvpn --show-ciphers | \ |
135 |
- # GD, 2014-07-06 do not test RC5-* either (fails on NetBSD w/o libcrypto_rc5) |
136 |
- CIPHERS=$(echo "$CIPHERS" | egrep -v '^(DES-EDE3-CFB1|DES-CFB1|RC5-)' ) |
137 |
- |
138 |
-+# Also test cipher 'none' |
139 |
-+CIPHERS=${CIPHERS}$(printf "\nnone") |
140 |
-+ |
141 |
- "${top_builddir}/src/openvpn/openvpn" --genkey --secret key.$$ |
142 |
- set +e |
143 |
- |
144 |
--- |
145 |
-1.9.1 |
146 |
- |
147 |
|
148 |
diff --git a/net-misc/openvpn/files/65openvpn b/net-misc/openvpn/files/65openvpn |
149 |
deleted file mode 100644 |
150 |
index 4ddb034..0000000 |
151 |
--- a/net-misc/openvpn/files/65openvpn |
152 |
+++ /dev/null |
153 |
@@ -1 +0,0 @@ |
154 |
-CONFIG_PROTECT="/usr/share/openvpn/easy-rsa" |
155 |
|
156 |
diff --git a/net-misc/openvpn/files/down.sh b/net-misc/openvpn/files/down.sh |
157 |
deleted file mode 100755 |
158 |
index 1c70db0..0000000 |
159 |
--- a/net-misc/openvpn/files/down.sh |
160 |
+++ /dev/null |
161 |
@@ -1,33 +0,0 @@ |
162 |
-#!/bin/sh |
163 |
-# Copyright (c) 2006-2007 Gentoo Foundation |
164 |
-# Distributed under the terms of the GNU General Public License v2 |
165 |
-# Contributed by Roy Marples (uberlord@g.o) |
166 |
- |
167 |
-# If we have a service specific script, run this now |
168 |
-if [ -x /etc/openvpn/"${SVCNAME}"-down.sh ] ; then |
169 |
- /etc/openvpn/"${SVCNAME}"-down.sh "$@" |
170 |
-fi |
171 |
- |
172 |
-# Restore resolv.conf to how it was |
173 |
-if [ "${PEER_DNS}" != "no" ]; then |
174 |
- if [ -x /sbin/resolvconf ] ; then |
175 |
- /sbin/resolvconf -d "${dev}" |
176 |
- elif [ -e /etc/resolv.conf-"${dev}".sv ] ; then |
177 |
- # Important that we copy instead of move incase resolv.conf is |
178 |
- # a symlink and not an actual file |
179 |
- cp /etc/resolv.conf-"${dev}".sv /etc/resolv.conf |
180 |
- rm -f /etc/resolv.conf-"${dev}".sv |
181 |
- fi |
182 |
-fi |
183 |
- |
184 |
-if [ -n "${SVCNAME}" ]; then |
185 |
- # Re-enter the init script to start any dependant services |
186 |
- if /etc/init.d/"${SVCNAME}" --quiet status ; then |
187 |
- export IN_BACKGROUND=true |
188 |
- /etc/init.d/"${SVCNAME}" --quiet stop |
189 |
- fi |
190 |
-fi |
191 |
- |
192 |
-exit 0 |
193 |
- |
194 |
-# vim: ts=4 : |
195 |
|
196 |
diff --git a/net-misc/openvpn/files/openvpn-2.1.conf b/net-misc/openvpn/files/openvpn-2.1.conf |
197 |
deleted file mode 100644 |
198 |
index 72510c3..0000000 |
199 |
--- a/net-misc/openvpn/files/openvpn-2.1.conf |
200 |
+++ /dev/null |
201 |
@@ -1,18 +0,0 @@ |
202 |
-# OpenVPN automatically creates an /etc/resolv.conf (or sends it to |
203 |
-# resolvconf) if given DNS information by the OpenVPN server. |
204 |
-# Set PEER_DNS="no" to stop this. |
205 |
-PEER_DNS="yes" |
206 |
- |
207 |
-# OpenVPN can run in many modes. Most people will want the init script |
208 |
-# to automatically detect the mode and try and apply a good default |
209 |
-# configuration and setup scripts. However, there are cases where the |
210 |
-# OpenVPN configuration looks like a client, but it's really a peer or |
211 |
-# something else. DETECT_CLIENT controls this behaviour. |
212 |
-DETECT_CLIENT="yes" |
213 |
- |
214 |
-# If DETECT_CLIENT is no and you have your own scripts to re-enter the openvpn |
215 |
-# init script (ie, it first becomes "inactive" and the script then starts the |
216 |
-# script again to make it "started") then you can state this below. |
217 |
-# In other words, unless you understand service dependencies and are a |
218 |
-# competent shell scripter, don't set this. |
219 |
-RE_ENTER="no" |
220 |
|
221 |
diff --git a/net-misc/openvpn/files/openvpn-2.1.init b/net-misc/openvpn/files/openvpn-2.1.init |
222 |
deleted file mode 100755 |
223 |
index d65e6f8..0000000 |
224 |
--- a/net-misc/openvpn/files/openvpn-2.1.init |
225 |
+++ /dev/null |
226 |
@@ -1,133 +0,0 @@ |
227 |
-#!/sbin/runscript |
228 |
-# Copyright 1999-2007 Gentoo Foundation |
229 |
-# Distributed under the terms of the GNU General Public License v2 |
230 |
- |
231 |
-VPNDIR=${VPNDIR:-/etc/openvpn} |
232 |
-VPN=${SVCNAME#*.} |
233 |
-if [ -n "${VPN}" ] && [ ${SVCNAME} != "openvpn" ]; then |
234 |
- VPNPID="/var/run/openvpn.${VPN}.pid" |
235 |
-else |
236 |
- VPNPID="/var/run/openvpn.pid" |
237 |
-fi |
238 |
-VPNCONF="${VPNDIR}/${VPN}.conf" |
239 |
- |
240 |
-depend() { |
241 |
- need localmount net |
242 |
- use dns |
243 |
- after bootmisc |
244 |
-} |
245 |
- |
246 |
-checkconfig() { |
247 |
- # Linux has good dynamic tun/tap creation |
248 |
- if [ $(uname -s) = "Linux" ] ; then |
249 |
- if [ ! -e /dev/net/tun ]; then |
250 |
- if ! modprobe tun ; then |
251 |
- eerror "TUN/TAP support is not available" \ |
252 |
- "in this kernel" |
253 |
- return 1 |
254 |
- fi |
255 |
- fi |
256 |
- if [ -h /dev/net/tun ] && [ -c /dev/misc/net/tun ]; then |
257 |
- ebegin "Detected broken /dev/net/tun symlink, fixing..." |
258 |
- rm -f /dev/net/tun |
259 |
- ln -s /dev/misc/net/tun /dev/net/tun |
260 |
- eend $? |
261 |
- fi |
262 |
- return 0 |
263 |
- fi |
264 |
- |
265 |
- # Other OS's don't, so we rely on a pre-configured interface |
266 |
- # per vpn instance |
267 |
- local ifname=$(sed -n -e 's/[[:space:]]*dev[[:space:]][[:space:]]*\([^[:space:]]*\).*/\1/p' "${VPNCONF}") |
268 |
- if [ -z ${ifname} ] ; then |
269 |
- eerror "You need to specify the interface that this openvpn" \ |
270 |
- "instance should use" \ |
271 |
- "by using the dev option in ${VPNCONF}" |
272 |
- return 1 |
273 |
- fi |
274 |
- |
275 |
- if ! ifconfig "${ifname}" >/dev/null 2>/dev/null ; then |
276 |
- # Try and create it |
277 |
- echo > /dev/"${ifname}" >/dev/null |
278 |
- fi |
279 |
- if ! ifconfig "${ifname}" >/dev/null 2>/dev/null ; then |
280 |
- eerror "${VPNCONF} requires interface ${ifname}" \ |
281 |
- "but that does not exist" |
282 |
- return 1 |
283 |
- fi |
284 |
-} |
285 |
- |
286 |
-start() { |
287 |
- # If we are re-called by the openvpn gentoo-up.sh script |
288 |
- # then we don't actually want to start openvpn |
289 |
- [ "${IN_BACKGROUND}" = "true" ] && return 0 |
290 |
- |
291 |
- ebegin "Starting ${SVCNAME}" |
292 |
- |
293 |
- checkconfig || return 1 |
294 |
- |
295 |
- local args="" reenter=${RE_ENTER:-no} |
296 |
- # If the config file does not specify the cd option, we do |
297 |
- # But if we specify it, we override the config option which we do not want |
298 |
- if ! grep -q "^[ ]*cd[ ].*" "${VPNCONF}" ; then |
299 |
- args="${args} --cd ${VPNDIR}" |
300 |
- fi |
301 |
- |
302 |
- # We mark the service as inactive and then start it. |
303 |
- # When we get an authenticated packet from the peer then we run our script |
304 |
- # which configures our DNS if any and marks us as up. |
305 |
- if [ "${DETECT_CLIENT:-yes}" = "yes" ] && \ |
306 |
- grep -q "^[ ]*remote[ ].*" "${VPNCONF}" ; then |
307 |
- reenter="yes" |
308 |
- args="${args} --up-delay --up-restart" |
309 |
- args="${args} --script-security 2" |
310 |
- args="${args} --up /etc/openvpn/up.sh" |
311 |
- args="${args} --down-pre --down /etc/openvpn/down.sh" |
312 |
- |
313 |
- # Warn about setting scripts as we override them |
314 |
- if grep -Eq "^[ ]*(up|down)[ ].*" "${VPNCONF}" ; then |
315 |
- ewarn "WARNING: You have defined your own up/down scripts" |
316 |
- ewarn "As you're running as a client, we now force Gentoo specific" |
317 |
- ewarn "scripts to be run for up and down events." |
318 |
- ewarn "These scripts will call /etc/openvpn/${SVCNAME}-{up,down}.sh" |
319 |
- ewarn "where you can put your own code." |
320 |
- fi |
321 |
- |
322 |
- # Warn about the inability to change ip/route/dns information when |
323 |
- # dropping privs |
324 |
- if grep -q "^[ ]*user[ ].*" "${VPNCONF}" ; then |
325 |
- ewarn "WARNING: You are dropping root privileges!" |
326 |
- ewarn "As such openvpn may not be able to change ip, routing" |
327 |
- ewarn "or DNS configuration." |
328 |
- fi |
329 |
- else |
330 |
- # So we're a server. Run as openvpn unless otherwise specified |
331 |
- grep -q "^[ ]*user[ ].*" "${VPNCONF}" || args="${args} --user openvpn" |
332 |
- grep -q "^[ ]*group[ ].*" "${VPNCONF}" || args="${args} --group openvpn" |
333 |
- fi |
334 |
- |
335 |
- # Ensure that our scripts get the PEER_DNS variable |
336 |
- [ -n "${PEER_DNS}" ] && args="${args} --setenv PEER_DNS ${PEER_DNS}" |
337 |
- |
338 |
- [ "${reenter}" = "yes" ] && mark_service_inactive "${SVCNAME}" |
339 |
- start-stop-daemon --start --exec /usr/sbin/openvpn --pidfile "${VPNPID}" \ |
340 |
- -- --config "${VPNCONF}" --writepid "${VPNPID}" --daemon \ |
341 |
- --setenv SVCNAME "${SVCNAME}" ${args} |
342 |
- eend $? "Check your logs to see why startup failed" |
343 |
-} |
344 |
- |
345 |
-stop() { |
346 |
- # If we are re-called by the openvpn gentoo-down.sh script |
347 |
- # then we don't actually want to stop openvpn |
348 |
- if [ "${IN_BACKGROUND}" = "true" ] ; then |
349 |
- mark_service_inactive "${SVCNAME}" |
350 |
- return 0 |
351 |
- fi |
352 |
- |
353 |
- ebegin "Stopping ${SVCNAME}" |
354 |
- start-stop-daemon --stop --quiet \ |
355 |
- --exec /usr/sbin/openvpn --pidfile "${VPNPID}" |
356 |
- eend $? |
357 |
-} |
358 |
- |
359 |
-# vim: set ts=4 : |
360 |
|
361 |
diff --git a/net-misc/openvpn/files/openvpn.init b/net-misc/openvpn/files/openvpn.init |
362 |
deleted file mode 100644 |
363 |
index 489ab49..0000000 |
364 |
--- a/net-misc/openvpn/files/openvpn.init |
365 |
+++ /dev/null |
366 |
@@ -1,63 +0,0 @@ |
367 |
-#!/sbin/runscript |
368 |
-# Copyright 1999-2007 Gentoo Foundation |
369 |
-# Distributed under the terms of the GNU General Public License v2 |
370 |
- |
371 |
-VPNDIR="/etc/openvpn" |
372 |
-VPN="${SVCNAME#*.}" |
373 |
-if [ -n "${VPN}" ] && [ "${SVCNAME}" != "openvpn" ]; then |
374 |
- VPNPID="/var/run/openvpn.${VPN}.pid" |
375 |
-else |
376 |
- VPNPID="/var/run/openvpn.pid" |
377 |
-fi |
378 |
-VPNCONF="${VPNDIR}/${VPN}.conf" |
379 |
- |
380 |
-depend() { |
381 |
- need localmount net |
382 |
- before netmount |
383 |
- after bootmisc |
384 |
-} |
385 |
- |
386 |
-checktundevice() { |
387 |
- if [ ! -e /dev/net/tun ]; then |
388 |
- if ! modprobe tun ; then |
389 |
- eerror "TUN/TAP support is not available in this kernel" |
390 |
- return 1 |
391 |
- fi |
392 |
- fi |
393 |
- if [ -h /dev/net/tun ] && [ -c /dev/misc/net/tun ]; then |
394 |
- ebegin "Detected broken /dev/net/tun symlink, fixing..." |
395 |
- rm -f /dev/net/tun |
396 |
- ln -s /dev/misc/net/tun /dev/net/tun |
397 |
- eend $? |
398 |
- fi |
399 |
-} |
400 |
- |
401 |
-start() { |
402 |
- ebegin "Starting ${SVCNAME}" |
403 |
- |
404 |
- checktundevice || return 1 |
405 |
- |
406 |
- if [ ! -e "${VPNCONF}" ]; then |
407 |
- eend 1 "${VPNCONF} does not exist" |
408 |
- return 1 |
409 |
- fi |
410 |
- |
411 |
- local args="" |
412 |
- # If the config file does not specify the cd option, we do |
413 |
- # But if we specify it, we override the config option which we do not want |
414 |
- if ! grep -q "^[ ]*cd[ ].*" "${VPNCONF}" ; then |
415 |
- args="${args} --cd ${VPNDIR}" |
416 |
- fi |
417 |
- |
418 |
- start-stop-daemon --start --exec /usr/sbin/openvpn --pidfile "${VPNPID}" \ |
419 |
- -- --config "${VPNCONF}" --writepid "${VPNPID}" --daemon ${args} |
420 |
- eend $? "Check your logs to see why startup failed" |
421 |
-} |
422 |
- |
423 |
-stop() { |
424 |
- ebegin "Stopping ${SVCNAME}" |
425 |
- start-stop-daemon --stop --exec /usr/sbin/openvpn --pidfile "${VPNPID}" |
426 |
- eend $? |
427 |
-} |
428 |
- |
429 |
-# vim: ts=4 |
430 |
|
431 |
diff --git a/net-misc/openvpn/files/openvpn.service b/net-misc/openvpn/files/openvpn.service |
432 |
deleted file mode 100644 |
433 |
index 358dcb7..0000000 |
434 |
--- a/net-misc/openvpn/files/openvpn.service |
435 |
+++ /dev/null |
436 |
@@ -1,12 +0,0 @@ |
437 |
-[Unit] |
438 |
-Description=OpenVPN Robust And Highly Flexible Tunneling Application On %I |
439 |
-After=syslog.target network.target |
440 |
- |
441 |
-[Service] |
442 |
-PrivateTmp=true |
443 |
-Type=forking |
444 |
-PIDFile=/var/run/openvpn/%i.pid |
445 |
-ExecStart=/usr/sbin/openvpn --daemon --writepid /var/run/openvpn/%i.pid --cd /etc/openvpn/ --config %i.conf |
446 |
- |
447 |
-[Install] |
448 |
-WantedBy=multi-user.target |
449 |
|
450 |
diff --git a/net-misc/openvpn/files/openvpn.tmpfile b/net-misc/openvpn/files/openvpn.tmpfile |
451 |
deleted file mode 100644 |
452 |
index d5fca71..0000000 |
453 |
--- a/net-misc/openvpn/files/openvpn.tmpfile |
454 |
+++ /dev/null |
455 |
@@ -1 +0,0 @@ |
456 |
-D /var/run/openvpn 0710 root openvpn - |
457 |
|
458 |
diff --git a/net-misc/openvpn/files/up.sh b/net-misc/openvpn/files/up.sh |
459 |
deleted file mode 100755 |
460 |
index 6ce82d6..0000000 |
461 |
--- a/net-misc/openvpn/files/up.sh |
462 |
+++ /dev/null |
463 |
@@ -1,100 +0,0 @@ |
464 |
-#!/bin/sh |
465 |
-# Copyright (c) 2006-2007 Gentoo Foundation |
466 |
-# Distributed under the terms of the GNU General Public License v2 |
467 |
-# Contributed by Roy Marples (uberlord@g.o) |
468 |
- |
469 |
-# Setup our resolv.conf |
470 |
-# Vitally important that we use the domain entry in resolv.conf so we |
471 |
-# can setup the nameservers are for the domain ONLY in resolvconf if |
472 |
-# we're using a decent dns cache/forwarder like dnsmasq and NOT nscd/libc. |
473 |
-# nscd/libc users will get the VPN nameservers before their other ones |
474 |
-# and will use the first one that responds - maybe the LAN ones? |
475 |
-# non resolvconf users just the the VPN resolv.conf |
476 |
- |
477 |
-# FIXME:- if we have >1 domain, then we have to use search :/ |
478 |
-# We need to add a flag to resolvconf to say |
479 |
-# "these nameservers should only be used for the listed search domains |
480 |
-# if other global nameservers are present on other interfaces" |
481 |
-# This however, will break compatibility with Debians resolvconf |
482 |
-# A possible workaround would be to just list multiple domain lines |
483 |
-# and try and let resolvconf handle it |
484 |
- |
485 |
-min_route() { |
486 |
- local n=1 |
487 |
- local m |
488 |
- local r |
489 |
- |
490 |
- eval m="\$route_metric_$n" |
491 |
- while [ -n "${m}" ]; do |
492 |
- if [ -z "$r" ] || [ "$r" -gt "$m" ]; then |
493 |
- r="$m" |
494 |
- fi |
495 |
- n="$(($n+1))" |
496 |
- eval m="\$route_metric_$n" |
497 |
- done |
498 |
- |
499 |
- echo "$r" |
500 |
-} |
501 |
- |
502 |
-if [ "${PEER_DNS}" != "no" ]; then |
503 |
- NS= |
504 |
- DOMAIN= |
505 |
- SEARCH= |
506 |
- i=1 |
507 |
- while true ; do |
508 |
- eval opt=\$foreign_option_${i} |
509 |
- [ -z "${opt}" ] && break |
510 |
- if [ "${opt}" != "${opt#dhcp-option DOMAIN *}" ] ; then |
511 |
- if [ -z "${DOMAIN}" ] ; then |
512 |
- DOMAIN="${opt#dhcp-option DOMAIN *}" |
513 |
- else |
514 |
- SEARCH="${SEARCH}${SEARCH:+ }${opt#dhcp-option DOMAIN *}" |
515 |
- fi |
516 |
- elif [ "${opt}" != "${opt#dhcp-option DNS *}" ] ; then |
517 |
- NS="${NS}nameserver ${opt#dhcp-option DNS *}\n" |
518 |
- fi |
519 |
- i=$((${i} + 1)) |
520 |
- done |
521 |
- |
522 |
- if [ -n "${NS}" ] ; then |
523 |
- DNS="# Generated by openvpn for interface ${dev}\n" |
524 |
- if [ -n "${SEARCH}" ] ; then |
525 |
- DNS="${DNS}search ${DOMAIN} ${SEARCH}\n" |
526 |
- elif [ -n "${DOMAIN}" ]; then |
527 |
- DNS="${DNS}domain ${DOMAIN}\n" |
528 |
- fi |
529 |
- DNS="${DNS}${NS}" |
530 |
- if [ -x /sbin/resolvconf ] ; then |
531 |
- metric="$(min_route)" |
532 |
- printf "${DNS}" | /sbin/resolvconf -a "${dev}" ${metric:+-m ${metric}} |
533 |
- else |
534 |
- # Preserve the existing resolv.conf |
535 |
- if [ -e /etc/resolv.conf ] ; then |
536 |
- cp /etc/resolv.conf /etc/resolv.conf-"${dev}".sv |
537 |
- fi |
538 |
- printf "${DNS}" > /etc/resolv.conf |
539 |
- chmod 644 /etc/resolv.conf |
540 |
- fi |
541 |
- fi |
542 |
-fi |
543 |
- |
544 |
-# Below section is Gentoo specific |
545 |
-# Quick summary - our init scripts are re-entrant and set the SVCNAME env var |
546 |
-# as we could have >1 openvpn service |
547 |
- |
548 |
-if [ -n "${SVCNAME}" ]; then |
549 |
- # If we have a service specific script, run this now |
550 |
- if [ -x /etc/openvpn/"${SVCNAME}"-up.sh ] ; then |
551 |
- /etc/openvpn/"${SVCNAME}"-up.sh "$@" |
552 |
- fi |
553 |
- |
554 |
- # Re-enter the init script to start any dependant services |
555 |
- if ! /etc/init.d/"${SVCNAME}" --quiet status ; then |
556 |
- export IN_BACKGROUND=true |
557 |
- /etc/init.d/${SVCNAME} --quiet start |
558 |
- fi |
559 |
-fi |
560 |
- |
561 |
-exit 0 |
562 |
- |
563 |
-# vim: ts=4 : |
564 |
|
565 |
diff --git a/net-misc/openvpn/metadata.xml b/net-misc/openvpn/metadata.xml |
566 |
deleted file mode 100644 |
567 |
index ef30850..0000000 |
568 |
--- a/net-misc/openvpn/metadata.xml |
569 |
+++ /dev/null |
570 |
@@ -1,22 +0,0 @@ |
571 |
-<?xml version="1.0" encoding="UTF-8"?> |
572 |
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
573 |
-<pkgmetadata> |
574 |
- <maintainer> |
575 |
- <email>djc@g.o</email> |
576 |
- <name>Dirkjan Ochtman</name> |
577 |
- </maintainer> |
578 |
- <longdescription>OpenVPN is an easy-to-use, robust and highly |
579 |
-configurable VPN daemon which can be used to securely link two or more |
580 |
-networks using an encrypted tunnel.</longdescription> |
581 |
- <use> |
582 |
- <flag name="down-root">Enable the down-root plugin</flag> |
583 |
- <flag name="iproute2">Enabled iproute2 support instead of net-tools</flag> |
584 |
- <flag name="passwordsave">Enables openvpn to save passwords</flag> |
585 |
- <flag name="polarssl">Use PolarSSL instead of OpenSSL</flag> |
586 |
- <flag name="pkcs11">Enable PKCS#11 smartcard support</flag> |
587 |
- <flag name="plugins">Enable the OpenVPN plugin system</flag> |
588 |
- </use> |
589 |
- <upstream> |
590 |
- <remote-id type="cpe">cpe:/a:openvpn:openvpn</remote-id> |
591 |
- </upstream> |
592 |
-</pkgmetadata> |
593 |
|
594 |
diff --git a/net-misc/openvpn/openvpn-2.3.6-r99.ebuild b/net-misc/openvpn/openvpn-2.3.6-r99.ebuild |
595 |
deleted file mode 100644 |
596 |
index ebb4c70..0000000 |
597 |
--- a/net-misc/openvpn/openvpn-2.3.6-r99.ebuild |
598 |
+++ /dev/null |
599 |
@@ -1,137 +0,0 @@ |
600 |
-# Copyright 1999-2015 Gentoo Foundation |
601 |
-# Distributed under the terms of the GNU General Public License v2 |
602 |
-# $Header: /var/cvsroot/gentoo-x86/net-misc/openvpn/openvpn-2.3.6-r2.ebuild,v 1.1 2015/02/17 18:46:07 djc Exp $ |
603 |
- |
604 |
-EAPI=4 |
605 |
- |
606 |
-inherit multilib autotools flag-o-matic user systemd |
607 |
- |
608 |
-DESCRIPTION="Robust and highly flexible tunneling application compatible with many OSes" |
609 |
-SRC_URI="http://swupdate.openvpn.net/community/releases/${P}.tar.gz" |
610 |
-HOMEPAGE="http://openvpn.net/" |
611 |
- |
612 |
-LICENSE="GPL-2" |
613 |
-SLOT="0" |
614 |
-KEYWORDS="amd64 arm ~mips ppc x86" |
615 |
-IUSE="examples down-root iproute2 pam passwordsave pkcs11 +plugins +polarssl selinux +ssl systemd +lzo static userland_BSD" |
616 |
- |
617 |
-REQUIRED_USE="static? ( !plugins !pkcs11 ) |
618 |
- polarssl? ( ssl ) |
619 |
- pkcs11? ( ssl ) |
620 |
- !plugins? ( !pam !down-root )" |
621 |
- |
622 |
-DEPEND=" |
623 |
- kernel_linux? ( |
624 |
- iproute2? ( sys-apps/iproute2[-minimal] ) !iproute2? ( sys-apps/net-tools ) |
625 |
- ) |
626 |
- pam? ( virtual/pam ) |
627 |
- ssl? ( |
628 |
- !polarssl? ( >=dev-libs/openssl-0.9.7 ) polarssl? ( >=net-libs/polarssl-1.2.10 ) |
629 |
- ) |
630 |
- lzo? ( >=dev-libs/lzo-1.07 ) |
631 |
- pkcs11? ( >=dev-libs/pkcs11-helper-1.11 )" |
632 |
-RDEPEND="${DEPEND} |
633 |
- selinux? ( sec-policy/selinux-openvpn ) |
634 |
-" |
635 |
- |
636 |
-src_prepare() { |
637 |
- # Set correct pass to systemd-ask-password binary |
638 |
- sed -i "s:\(/bin/systemd-ask-password\):/usr\1:" ./src/openvpn/console.c || die |
639 |
- epatch "${FILESDIR}/2.3.6-null-cipher.patch" || die |
640 |
- epatch "${FILESDIR}/2.3.6-disable-compression.patch" || die |
641 |
- epatch "${FILESDIR}/2.3.6-musl-compat.patch" || die |
642 |
- eautoreconf |
643 |
-} |
644 |
- |
645 |
-src_configure() { |
646 |
- use static && LDFLAGS="${LDFLAGS} -Xcompiler -static" |
647 |
- local myconf |
648 |
- echo "DROPPY" |
649 |
- use polarssl && echo "FLOZZY" |
650 |
- use polarssl && myconf="--with-crypto-library=polarssl" |
651 |
- econf \ |
652 |
- ${myconf} \ |
653 |
- --docdir="${EPREFIX}/usr/share/doc/${PF}" \ |
654 |
- --with-plugindir="${ROOT}/usr/$(get_libdir)/$PN" \ |
655 |
- $(use_enable passwordsave password-save) \ |
656 |
- $(use_enable ssl) \ |
657 |
- $(use_enable ssl crypto) \ |
658 |
- $(use_enable lzo) \ |
659 |
- $(use_enable pkcs11) \ |
660 |
- $(use_enable plugins) \ |
661 |
- $(use_enable iproute2) \ |
662 |
- $(use_enable pam plugin-auth-pam) \ |
663 |
- $(use_enable down-root plugin-down-root) \ |
664 |
- $(use_enable systemd) |
665 |
-} |
666 |
- |
667 |
-src_install() { |
668 |
- default |
669 |
- find "${ED}/usr" -name '*.la' -delete |
670 |
- # install documentation |
671 |
- dodoc AUTHORS ChangeLog PORTS README README.IPv6 |
672 |
- |
673 |
- # Install some helper scripts |
674 |
- keepdir /etc/openvpn |
675 |
- exeinto /etc/openvpn |
676 |
- doexe "${FILESDIR}/up.sh" |
677 |
- doexe "${FILESDIR}/down.sh" |
678 |
- |
679 |
- # Install the init script and config file |
680 |
- newinitd "${FILESDIR}/${PN}-2.1.init" openvpn |
681 |
- newconfd "${FILESDIR}/${PN}-2.1.conf" openvpn |
682 |
- |
683 |
- # install examples, controlled by the respective useflag |
684 |
- if use examples ; then |
685 |
- # dodoc does not supportly support directory traversal, #15193 |
686 |
- insinto /usr/share/doc/${PF}/examples |
687 |
- doins -r sample contrib |
688 |
- fi |
689 |
- |
690 |
- systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfile ${PN}.conf |
691 |
- systemd_newunit "${FILESDIR}"/${PN}.service 'openvpn@.service' |
692 |
-} |
693 |
- |
694 |
-pkg_postinst() { |
695 |
- # Add openvpn user so openvpn servers can drop privs |
696 |
- # Clients should run as root so they can change ip addresses, |
697 |
- # dns information and other such things. |
698 |
- enewgroup openvpn |
699 |
- enewuser openvpn "" "" "" openvpn |
700 |
- |
701 |
- if [ path_exists -o "${ROOT}/etc/openvpn/*/local.conf" ] ; then |
702 |
- ewarn "WARNING: The openvpn init script has changed" |
703 |
- ewarn "" |
704 |
- fi |
705 |
- |
706 |
- elog "The openvpn init script expects to find the configuration file" |
707 |
- elog "openvpn.conf in /etc/openvpn along with any extra files it may need." |
708 |
- elog "" |
709 |
- elog "To create more VPNs, simply create a new .conf file for it and" |
710 |
- elog "then create a symlink to the openvpn init script from a link called" |
711 |
- elog "openvpn.newconfname - like so" |
712 |
- elog " cd /etc/openvpn" |
713 |
- elog " ${EDITOR##*/} foo.conf" |
714 |
- elog " cd /etc/init.d" |
715 |
- elog " ln -s openvpn openvpn.foo" |
716 |
- elog "" |
717 |
- elog "You can then treat openvpn.foo as any other service, so you can" |
718 |
- elog "stop one vpn and start another if you need to." |
719 |
- |
720 |
- if grep -Eq "^[ \t]*(up|down)[ \t].*" "${ROOT}/etc/openvpn"/*.conf 2>/dev/null ; then |
721 |
- ewarn "" |
722 |
- ewarn "WARNING: If you use the remote keyword then you are deemed to be" |
723 |
- ewarn "a client by our init script and as such we force up,down scripts." |
724 |
- ewarn "These scripts call /etc/openvpn/\$SVCNAME-{up,down}.sh where you" |
725 |
- ewarn "can move your scripts to." |
726 |
- fi |
727 |
- |
728 |
- if use plugins ; then |
729 |
- einfo "" |
730 |
- einfo "plugins have been installed into /usr/$(get_libdir)/${PN}" |
731 |
- fi |
732 |
- |
733 |
- einfo "" |
734 |
- einfo "OpenVPN 2.3.x no longer includes the easy-rsa suite of utilities." |
735 |
- einfo "They can now be emerged via app-crypt/easy-rsa." |
736 |
-} |
737 |
|
738 |
diff --git a/net-misc/openvpn/openvpn-9999.ebuild b/net-misc/openvpn/openvpn-9999.ebuild |
739 |
deleted file mode 100644 |
740 |
index 408b395..0000000 |
741 |
--- a/net-misc/openvpn/openvpn-9999.ebuild |
742 |
+++ /dev/null |
743 |
@@ -1,126 +0,0 @@ |
744 |
-# Copyright 1999-2014 Gentoo Foundation |
745 |
-# Distributed under the terms of the GNU General Public License v2 |
746 |
-# $Header: /var/cvsroot/gentoo-x86/net-misc/openvpn/openvpn-9999.ebuild,v 1.8 2014/11/02 09:13:00 swift Exp $ |
747 |
- |
748 |
-EAPI=4 |
749 |
- |
750 |
-inherit multilib autotools flag-o-matic user git-2 |
751 |
- |
752 |
-DESCRIPTION="Robust and highly flexible tunneling application compatible with many OSes" |
753 |
-EGIT_REPO_URI="https://github.com/OpenVPN/${PN}.git" |
754 |
-HOMEPAGE="http://openvpn.net/" |
755 |
- |
756 |
-LICENSE="GPL-2" |
757 |
-SLOT="0" |
758 |
-KEYWORDS="" |
759 |
-IUSE="examples down-root iproute2 pam passwordsave pkcs11 +plugins polarssl selinux +ssl +lzo static userland_BSD" |
760 |
- |
761 |
-REQUIRED_USE="static? ( !plugins !pkcs11 ) |
762 |
- polarssl? ( ssl ) |
763 |
- !plugins? ( !pam !down-root )" |
764 |
- |
765 |
-DEPEND=" |
766 |
- kernel_linux? ( |
767 |
- iproute2? ( sys-apps/iproute2[-minimal] ) !iproute2? ( sys-apps/net-tools ) |
768 |
- ) |
769 |
- pam? ( virtual/pam ) |
770 |
- ssl? ( |
771 |
- !polarssl? ( >=dev-libs/openssl-0.9.7 ) polarssl? ( >=net-libs/polarssl-1.1.0 ) |
772 |
- ) |
773 |
- lzo? ( >=dev-libs/lzo-1.07 ) |
774 |
- pkcs11? ( >=dev-libs/pkcs11-helper-1.05 )" |
775 |
-RDEPEND="${DEPEND} |
776 |
- selinux? ( sec-policy/selinux-openvpn ) |
777 |
-" |
778 |
- |
779 |
-src_prepare() { |
780 |
- eautoreconf |
781 |
-} |
782 |
- |
783 |
-src_configure() { |
784 |
- use static && LDFLAGS="${LDFLAGS} -Xcompiler -static" |
785 |
- local myconf |
786 |
- use polarssl && myconf="--with-crypto-library=polarssl" |
787 |
- econf \ |
788 |
- ${myconf} \ |
789 |
- --docdir="${EPREFIX}/usr/share/doc/${PF}" \ |
790 |
- --with-plugindir="${ROOT}/usr/$(get_libdir)/$PN" \ |
791 |
- $(use_enable passwordsave password-save) \ |
792 |
- $(use_enable ssl) \ |
793 |
- $(use_enable ssl crypto) \ |
794 |
- $(use_enable lzo) \ |
795 |
- $(use_enable pkcs11) \ |
796 |
- $(use_enable plugins) \ |
797 |
- $(use_enable iproute2) \ |
798 |
- $(use_enable pam plugin-auth-pam) \ |
799 |
- $(use_enable down-root plugin-down-root) |
800 |
-} |
801 |
- |
802 |
-src_install() { |
803 |
- default |
804 |
- find "${ED}/usr" -name '*.la' -delete |
805 |
- # install documentation |
806 |
- dodoc AUTHORS ChangeLog PORTS README README.IPv6 |
807 |
- |
808 |
- # Install some helper scripts |
809 |
- keepdir /etc/openvpn |
810 |
- exeinto /etc/openvpn |
811 |
- doexe "${FILESDIR}/up.sh" |
812 |
- doexe "${FILESDIR}/down.sh" |
813 |
- |
814 |
- # Install the init script and config file |
815 |
- newinitd "${FILESDIR}/${PN}-2.1.init" openvpn |
816 |
- newconfd "${FILESDIR}/${PN}-2.1.conf" openvpn |
817 |
- |
818 |
- # install examples, controlled by the respective useflag |
819 |
- if use examples ; then |
820 |
- # dodoc does not supportly support directory traversal, #15193 |
821 |
- insinto /usr/share/doc/${PF}/examples |
822 |
- doins -r sample contrib |
823 |
- fi |
824 |
-} |
825 |
- |
826 |
-pkg_postinst() { |
827 |
- # Add openvpn user so openvpn servers can drop privs |
828 |
- # Clients should run as root so they can change ip addresses, |
829 |
- # dns information and other such things. |
830 |
- enewgroup openvpn |
831 |
- enewuser openvpn "" "" "" openvpn |
832 |
- |
833 |
- if [ path_exists -o "${ROOT}/etc/openvpn/*/local.conf" ] ; then |
834 |
- ewarn "WARNING: The openvpn init script has changed" |
835 |
- ewarn "" |
836 |
- fi |
837 |
- |
838 |
- elog "The openvpn init script expects to find the configuration file" |
839 |
- elog "openvpn.conf in /etc/openvpn along with any extra files it may need." |
840 |
- elog "" |
841 |
- elog "To create more VPNs, simply create a new .conf file for it and" |
842 |
- elog "then create a symlink to the openvpn init script from a link called" |
843 |
- elog "openvpn.newconfname - like so" |
844 |
- elog " cd /etc/openvpn" |
845 |
- elog " ${EDITOR##*/} foo.conf" |
846 |
- elog " cd /etc/init.d" |
847 |
- elog " ln -s openvpn openvpn.foo" |
848 |
- elog "" |
849 |
- elog "You can then treat openvpn.foo as any other service, so you can" |
850 |
- elog "stop one vpn and start another if you need to." |
851 |
- |
852 |
- if grep -Eq "^[ \t]*(up|down)[ \t].*" "${ROOT}/etc/openvpn"/*.conf 2>/dev/null ; then |
853 |
- ewarn "" |
854 |
- ewarn "WARNING: If you use the remote keyword then you are deemed to be" |
855 |
- ewarn "a client by our init script and as such we force up,down scripts." |
856 |
- ewarn "These scripts call /etc/openvpn/\$SVCNAME-{up,down}.sh where you" |
857 |
- ewarn "can move your scripts to." |
858 |
- fi |
859 |
- |
860 |
- if use plugins ; then |
861 |
- einfo "" |
862 |
- einfo "plugins have been installed into /usr/$(get_libdir)/${PN}" |
863 |
- fi |
864 |
- |
865 |
- ewarn "" |
866 |
- ewarn "You are using a live ebuild building from the sources of openvpn" |
867 |
- ewarn "repository from http://openvpn.git.sourceforge.net. For reporting" |
868 |
- ewarn "bugs please contact: openvpn-devel@×××××××××××××××××.net." |
869 |
-} |