1 |
commit: 0355870fe3eb0f5d105bca9404a21a34e5649256 |
2 |
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Apr 30 18:12:50 2021 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Apr 30 18:58:34 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0355870f |
7 |
|
8 |
net-vpn/openvpn: bump to v2.5.2 |
9 |
|
10 |
Bug: https://bugs.gentoo.org/785115 |
11 |
Package-Manager: Portage-3.0.18, Repoman-3.0.3 |
12 |
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org> |
13 |
|
14 |
net-vpn/openvpn/Manifest | 1 + |
15 |
net-vpn/openvpn/openvpn-2.5.2.ebuild | 174 +++++++++++++++++++++++++++++++++++ |
16 |
2 files changed, 175 insertions(+) |
17 |
|
18 |
diff --git a/net-vpn/openvpn/Manifest b/net-vpn/openvpn/Manifest |
19 |
index 7c142523829..109a33040d1 100644 |
20 |
--- a/net-vpn/openvpn/Manifest |
21 |
+++ b/net-vpn/openvpn/Manifest |
22 |
@@ -1,3 +1,4 @@ |
23 |
DIST openvpn-2.4.9.tar.gz 1000602 BLAKE2B 4a10ec76d1a816f9184dd33e4384623e011a1af40ea38ad56cc06f70ab2c911b6fd92cf8ffcd2ec3ab4179fef87feb187fc9df61c5bea92b1c69ee4113093866 SHA512 7683dfb93592968459f080a07ea750992b7444708cdb1a5aafc0118ab8528fc488f2b9fbd7d042e57ad1811303208875237ae9decf0bb4977c45cd30da53751b |
24 |
DIST openvpn-2.5.0-r1.tar.gz 1815964 BLAKE2B cca1c1ec4fbfe0c337c14525cf706280c9d961c4bba992dfa0b13c9f96e00092864301138037485095716c746ef6ff3473a2085780b3ef77183bf4a6f1c602ae SHA512 3deb55973b87cc95c0437ab9ce6c43fdc246aa7e42e3e68bd6a5651deffa798b6750f625917cb2aaa2c82f0b3a0805bcf206a2aa8e2c735fd24e6bd38f736562 |
25 |
DIST openvpn-2.5.1.tar.gz 1827517 BLAKE2B 068af9313c9b2b93dcaa06f82ad66489154ce04973e323af07f38f209b4be77b7b785046aa31559a9f744b4b8c6976acd3e644d5a573f3c5511dc11f5bab3dce SHA512 eb85d14eeb383bed09670941451328db38feacc0b8b7b960840a3f465de83a7527de7d183e66344011da3a3655d558483c569d096b36964209a23418f89052e2 |
26 |
+DIST openvpn-2.5.2.tar.gz 1830763 BLAKE2B d1c5fa97b3a9168e8715a7cf926b581e054d1d8ac905dcb78e91b9e7f2ea2abf2f03a02e6b4ee10184e810ebb871f4fc638834848eb3b4a9122b177705382fe8 SHA512 5811d26b32e7f258dc1f7ed704d28f9eb03200b54a128e4cb5dfa37ace5113d7841830fc04e1c5f69a138141d0f6f0ca6cb7fc3c39d67456e476eb4c45102be1 |
27 |
|
28 |
diff --git a/net-vpn/openvpn/openvpn-2.5.2.ebuild b/net-vpn/openvpn/openvpn-2.5.2.ebuild |
29 |
new file mode 100644 |
30 |
index 00000000000..3f04ecb8b50 |
31 |
--- /dev/null |
32 |
+++ b/net-vpn/openvpn/openvpn-2.5.2.ebuild |
33 |
@@ -0,0 +1,174 @@ |
34 |
+# Copyright 1999-2021 Gentoo Authors |
35 |
+# Distributed under the terms of the GNU General Public License v2 |
36 |
+ |
37 |
+EAPI=7 |
38 |
+ |
39 |
+inherit autotools flag-o-matic systemd linux-info |
40 |
+ |
41 |
+DESCRIPTION="Robust and highly flexible tunneling application compatible with many OSes" |
42 |
+SRC_URI="https://build.openvpn.net/downloads/releases/${P}.tar.gz" |
43 |
+HOMEPAGE="https://openvpn.net/" |
44 |
+ |
45 |
+LICENSE="GPL-2" |
46 |
+SLOT="0" |
47 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" |
48 |
+ |
49 |
+IUSE="down-root examples inotify iproute2 +lz4 +lzo mbedtls +openssl" |
50 |
+IUSE+=" pam pkcs11 +plugins selinux systemd test userland_BSD" |
51 |
+ |
52 |
+RESTRICT="!test? ( test )" |
53 |
+REQUIRED_USE=" |
54 |
+ ^^ ( openssl mbedtls ) |
55 |
+ pkcs11? ( !mbedtls ) |
56 |
+ !plugins? ( !pam !down-root ) |
57 |
+ inotify? ( plugins ) |
58 |
+" |
59 |
+ |
60 |
+CDEPEND=" |
61 |
+ kernel_linux? ( |
62 |
+ iproute2? ( sys-apps/iproute2[-minimal] ) |
63 |
+ ) |
64 |
+ lz4? ( app-arch/lz4 ) |
65 |
+ lzo? ( >=dev-libs/lzo-1.07 ) |
66 |
+ mbedtls? ( net-libs/mbedtls:= ) |
67 |
+ openssl? ( >=dev-libs/openssl-0.9.8:0= ) |
68 |
+ pam? ( sys-libs/pam ) |
69 |
+ pkcs11? ( >=dev-libs/pkcs11-helper-1.11 ) |
70 |
+ systemd? ( sys-apps/systemd ) |
71 |
+" |
72 |
+ |
73 |
+BDEPEND="virtual/pkgconfig" |
74 |
+ |
75 |
+DEPEND="${CDEPEND} |
76 |
+ test? ( dev-util/cmocka ) |
77 |
+" |
78 |
+RDEPEND="${CDEPEND} |
79 |
+ acct-group/openvpn |
80 |
+ acct-user/openvpn |
81 |
+ selinux? ( sec-policy/selinux-openvpn ) |
82 |
+" |
83 |
+ |
84 |
+PATCHES=( |
85 |
+ "${FILESDIR}/openvpn-2.5.0-auth-pam-missing-header.patch" |
86 |
+) |
87 |
+ |
88 |
+pkg_setup() { |
89 |
+ local CONFIG_CHECK="~TUN" |
90 |
+ linux-info_pkg_setup |
91 |
+} |
92 |
+ |
93 |
+src_prepare() { |
94 |
+ default |
95 |
+ eautoreconf |
96 |
+} |
97 |
+ |
98 |
+src_configure() { |
99 |
+ local -a myeconfargs |
100 |
+ |
101 |
+ if ! use mbedtls; then |
102 |
+ myeconfargs+=( |
103 |
+ $(use_enable pkcs11) |
104 |
+ ) |
105 |
+ fi |
106 |
+ myeconfargs+=( |
107 |
+ $(use_enable inotify async-push) |
108 |
+ --with-crypto-library=$(usex mbedtls mbedtls openssl) |
109 |
+ $(use_enable lz4) |
110 |
+ $(use_enable lzo) |
111 |
+ $(use_enable plugins) |
112 |
+ $(use_enable iproute2) |
113 |
+ $(use_enable pam plugin-auth-pam) |
114 |
+ $(use_enable down-root plugin-down-root) |
115 |
+ $(use_enable systemd) |
116 |
+ ) |
117 |
+ SYSTEMD_UNIT_DIR=$(systemd_get_systemunitdir) \ |
118 |
+ TMPFILES_DIR="/usr/lib/tmpfiles.d" \ |
119 |
+ IPROUTE=$(usex iproute2 '/bin/ip' '') \ |
120 |
+ econf "${myeconfargs[@]}" |
121 |
+} |
122 |
+ |
123 |
+src_test() { |
124 |
+ make check || die "top-level tests failed" |
125 |
+ pushd tests/unit_tests &>/dev/null || die |
126 |
+ make check || die "unit tests failed" |
127 |
+ popd &>/dev/null || die |
128 |
+} |
129 |
+ |
130 |
+src_install() { |
131 |
+ default |
132 |
+ |
133 |
+ find "${ED}/usr" -name '*.la' -delete || die |
134 |
+ |
135 |
+ # install documentation |
136 |
+ dodoc AUTHORS ChangeLog PORTS README README.IPv6 |
137 |
+ |
138 |
+ # Install some helper scripts |
139 |
+ keepdir /etc/openvpn |
140 |
+ exeinto /etc/openvpn |
141 |
+ doexe "${FILESDIR}/up.sh" |
142 |
+ doexe "${FILESDIR}/down.sh" |
143 |
+ |
144 |
+ # Install the init script and config file |
145 |
+ newinitd "${FILESDIR}/${PN}-2.1.init" openvpn |
146 |
+ newconfd "${FILESDIR}/${PN}-2.1.conf" openvpn |
147 |
+ |
148 |
+ # install examples, controlled by the respective useflag |
149 |
+ if use examples ; then |
150 |
+ # dodoc does not supportly support directory traversal, #15193 |
151 |
+ docinto /usr/share/doc/${PF}/examples |
152 |
+ dodoc -r sample contrib |
153 |
+ fi |
154 |
+ |
155 |
+ # https://bugs.gentoo.org/755680#c3 |
156 |
+ doman doc/openvpn.8 |
157 |
+} |
158 |
+ |
159 |
+pkg_postinst() { |
160 |
+ if use x64-macos; then |
161 |
+ elog "You might want to install tuntaposx for TAP interface support:" |
162 |
+ elog "http://tuntaposx.sourceforge.net" |
163 |
+ fi |
164 |
+ |
165 |
+ if systemd_is_booted || has_version sys-apps/systemd; then |
166 |
+ elog "In order to use OpenVPN with systemd please use the correct systemd service file." |
167 |
+ elog "" |
168 |
+ elog "server:" |
169 |
+ elog "" |
170 |
+ elog "- Place your server configuration file in /etc/openvpn/server" |
171 |
+ elog "- Use the openvpn-server@.service like so" |
172 |
+ elog "systemctl start openvpn-server@{Server-config}" |
173 |
+ elog "" |
174 |
+ elog "client:" |
175 |
+ elog "" |
176 |
+ elog "- Place your client configuration file in /etc/openvpn/client" |
177 |
+ elog "- Use the openvpn-client@.service like so:" |
178 |
+ elog "systemctl start openvpn-client@{Client-config}" |
179 |
+ else |
180 |
+ elog "The openvpn init script expects to find the configuration file" |
181 |
+ elog "openvpn.conf in /etc/openvpn along with any extra files it may need." |
182 |
+ elog "" |
183 |
+ elog "To create more VPNs, simply create a new .conf file for it and" |
184 |
+ elog "then create a symlink to the openvpn init script from a link called" |
185 |
+ elog "openvpn.newconfname - like so" |
186 |
+ elog " cd /etc/openvpn" |
187 |
+ elog " ${EDITOR##*/} foo.conf" |
188 |
+ elog " cd /etc/init.d" |
189 |
+ elog " ln -s openvpn openvpn.foo" |
190 |
+ elog "" |
191 |
+ elog "You can then treat openvpn.foo as any other service, so you can" |
192 |
+ elog "stop one vpn and start another if you need to." |
193 |
+ fi |
194 |
+ |
195 |
+ if grep -Eq "^[ \t]*(up|down)[ \t].*" "${ROOT}/etc/openvpn"/*.conf 2>/dev/null ; then |
196 |
+ ewarn "" |
197 |
+ ewarn "WARNING: If you use the remote keyword then you are deemed to be" |
198 |
+ ewarn "a client by our init script and as such we force up,down scripts." |
199 |
+ ewarn "These scripts call /etc/openvpn/\$SVCNAME-{up,down}.sh where you" |
200 |
+ ewarn "can move your scripts to." |
201 |
+ fi |
202 |
+ |
203 |
+ if use plugins ; then |
204 |
+ einfo "" |
205 |
+ einfo "plugins have been installed into /usr/$(get_libdir)/${PN}/plugins" |
206 |
+ fi |
207 |
+} |