Gentoo Archives: gentoo-commits

From: Patrick McLean <chutzpah@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-vpn/openvpn/
Date: Thu, 12 Mar 2020 00:26:06
Message-Id: 1583972754.6d7c55bdf5afaf6a66dccb3c7eb27f724805892e.chutzpah@gentoo
1 commit: 6d7c55bdf5afaf6a66dccb3c7eb27f724805892e
2 Author: Patrick McLean <patrick.mclean <AT> sony <DOT> com>
3 AuthorDate: Thu Mar 12 00:23:22 2020 +0000
4 Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
5 CommitDate: Thu Mar 12 00:25:54 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6d7c55bd
7
8 net-vpn/openvpn-2.4.8: Version bump
9
10 Copyright: Sony Interactive Entertainment Inc.
11 Package-Manager: Portage-2.3.93, Repoman-2.3.20
12 Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>
13
14 net-vpn/openvpn/Manifest | 1 +
15 net-vpn/openvpn/openvpn-2.4.8.ebuild | 145 +++++++++++++++++++++++++++++++++++
16 2 files changed, 146 insertions(+)
17
18 diff --git a/net-vpn/openvpn/Manifest b/net-vpn/openvpn/Manifest
19 index c8d11c05c86..6d128f74611 100644
20 --- a/net-vpn/openvpn/Manifest
21 +++ b/net-vpn/openvpn/Manifest
22 @@ -1,3 +1,4 @@
23 DIST mock_msg.h 1356 BLAKE2B da7585cfeee89c0a4d3aa6326de6e2324804ed2a57a0e8bf7c2e51b25a91a8e1fcf9d29bba90fe58e40bf0197793a76fc1e83d8b6d677228cdc5e5333253b1a3 SHA512 930775a5837bc7f97a26817ea028782d555e0e71ba06b04c39941f4c01bbc3ca0a5dc63bcf19dc694e0e746b3a382f22daf6a6373a3443c5afd7398cbaaef6ea
24 DIST openvpn-2.4.6.tar.gz 1431971 BLAKE2B 1ab0746a845fc56bf738c1730cc187c27f61d5bb763df149640978f0bf87450a01e3e40372265440f1aae4e1c58b6d9a1ee1f2aade970d19fd8e8813e0b487a7 SHA512 cdd70bfd03177bc6cb70d0d614e40389df00816b7097740b4cda9d7bee094d1463fdb5afeaf604c52c7b3167d1edb098a2e095e131a8b9fed0ed8b29da90cbe8
25 DIST openvpn-2.4.7.tar.gz 998094 BLAKE2B 90f91d74279a547b49704cd14d9ac3dde26c522cd77eb851ea603addb1b220eda9be4de6cf5d74fe7717f34b3ff5fc802ca977a1402c5ed75616139d449fceb0 SHA512 ba9bc08c02fad85ba05c27488b0bfcb3540ba9c625c42334e24cb1d5e253b91c518c02641d755e03b8747ae8c2ebd340c55d51f7aedbbf2550ee4e4b79823c9c
26 +DIST openvpn-2.4.8.tar.gz 997417 BLAKE2B 1c56d25c125039b9f0723d8f498c9cc7233c9da940d961a430c82a3c41448c0c4fc64255adad59513d4e39b8e778cf58ced965e1501793c47bc73d211c339e4e SHA512 6a5f6f6a5cccc5011019e64ed452ad395942b751589893bd6fd3159b20577d734f2fe35d2f51f30303adee3a21e67da6d25369ea4421288ba7c2e09445e2c001
27
28 diff --git a/net-vpn/openvpn/openvpn-2.4.8.ebuild b/net-vpn/openvpn/openvpn-2.4.8.ebuild
29 new file mode 100644
30 index 00000000000..395ba5e6873
31 --- /dev/null
32 +++ b/net-vpn/openvpn/openvpn-2.4.8.ebuild
33 @@ -0,0 +1,145 @@
34 +# Copyright 1999-2020 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://github.com/OpenVPN/${PN}/archive/v${PV}.tar.gz -> ${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 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-macos"
48 +
49 +IUSE="down-root examples inotify iproute2 libressl lz4 +lzo mbedtls pam"
50 +IUSE+=" pkcs11 +plugins selinux +ssl systemd test userland_BSD"
51 +
52 +RESTRICT="!test? ( test )"
53 +REQUIRED_USE="pkcs11? ( ssl )
54 + !plugins? ( !pam !down-root )
55 + inotify? ( plugins )
56 +"
57 +
58 +CDEPEND="
59 + kernel_linux? (
60 + iproute2? ( sys-apps/iproute2[-minimal] )
61 + !iproute2? ( >=sys-apps/net-tools-1.60_p20160215155418 )
62 + )
63 + pam? ( sys-libs/pam )
64 + ssl? (
65 + !mbedtls? (
66 + !libressl? ( >=dev-libs/openssl-0.9.8:0= )
67 + libressl? ( dev-libs/libressl:0= )
68 + )
69 + mbedtls? ( net-libs/mbedtls:= )
70 + )
71 + lz4? ( app-arch/lz4 )
72 + lzo? ( >=dev-libs/lzo-1.07 )
73 + pkcs11? ( >=dev-libs/pkcs11-helper-1.11 )
74 + systemd? ( sys-apps/systemd )
75 +"
76 +DEPEND="${CDEPEND}
77 + test? ( dev-util/cmocka )
78 +"
79 +RDEPEND="${CDEPEND}
80 + acct-group/openvpn
81 + acct-user/openvpn
82 + selinux? ( sec-policy/selinux-openvpn )
83 +"
84 +
85 +CONFIG_CHECK="~TUN"
86 +
87 +pkg_setup() {
88 + linux-info_pkg_setup
89 +}
90 +
91 +src_prepare() {
92 + default
93 + eautoreconf
94 +}
95 +
96 +src_configure() {
97 + SYSTEMD_UNIT_DIR=$(systemd_get_systemunitdir) \
98 + TMPFILES_DIR="/usr/lib/tmpfiles.d" \
99 + IFCONFIG=/bin/ifconfig \
100 + ROUTE=/bin/route \
101 + econf \
102 + $(use_enable inotify async-push) \
103 + $(use_enable ssl crypto) \
104 + $(use_with ssl crypto-library $(usex mbedtls mbedtls openssl)) \
105 + $(use_enable lz4) \
106 + $(use_enable lzo) \
107 + $(use_enable pkcs11) \
108 + $(use_enable plugins) \
109 + $(use_enable iproute2) \
110 + $(use_enable pam plugin-auth-pam) \
111 + $(use_enable down-root plugin-down-root) \
112 + $(use_enable systemd)
113 +}
114 +
115 +src_test() {
116 + make check || die "top-level tests failed"
117 + pushd tests/unit_tests > /dev/null || die
118 + make check || die "unit tests failed"
119 + popd > /dev/null || die
120 +}
121 +
122 +src_install() {
123 + default
124 + find "${ED}/usr" -name '*.la' -delete
125 + # install documentation
126 + dodoc AUTHORS ChangeLog PORTS README README.IPv6
127 +
128 + # Install some helper scripts
129 + keepdir /etc/openvpn
130 + exeinto /etc/openvpn
131 + doexe "${FILESDIR}/up.sh"
132 + doexe "${FILESDIR}/down.sh"
133 +
134 + # Install the init script and config file
135 + newinitd "${FILESDIR}/${PN}-2.1.init" openvpn
136 + newconfd "${FILESDIR}/${PN}-2.1.conf" openvpn
137 +
138 + # install examples, controlled by the respective useflag
139 + if use examples ; then
140 + # dodoc does not supportly support directory traversal, #15193
141 + docinto /usr/share/doc/${PF}/examples
142 + dodoc -r sample contrib
143 + fi
144 +}
145 +
146 +pkg_postinst() {
147 + if use x64-macos; then
148 + elog "You might want to install tuntaposx for TAP interface support:"
149 + elog "http://tuntaposx.sourceforge.net"
150 + fi
151 +
152 + elog "The openvpn init script expects to find the configuration file"
153 + elog "openvpn.conf in /etc/openvpn along with any extra files it may need."
154 + elog ""
155 + elog "To create more VPNs, simply create a new .conf file for it and"
156 + elog "then create a symlink to the openvpn init script from a link called"
157 + elog "openvpn.newconfname - like so"
158 + elog " cd /etc/openvpn"
159 + elog " ${EDITOR##*/} foo.conf"
160 + elog " cd /etc/init.d"
161 + elog " ln -s openvpn openvpn.foo"
162 + elog ""
163 + elog "You can then treat openvpn.foo as any other service, so you can"
164 + elog "stop one vpn and start another if you need to."
165 +
166 + if grep -Eq "^[ \t]*(up|down)[ \t].*" "${ROOT}/etc/openvpn"/*.conf 2>/dev/null ; then
167 + ewarn ""
168 + ewarn "WARNING: If you use the remote keyword then you are deemed to be"
169 + ewarn "a client by our init script and as such we force up,down scripts."
170 + ewarn "These scripts call /etc/openvpn/\$SVCNAME-{up,down}.sh where you"
171 + ewarn "can move your scripts to."
172 + fi
173 +
174 + if use plugins ; then
175 + einfo ""
176 + einfo "plugins have been installed into /usr/$(get_libdir)/${PN}/plugins"
177 + fi
178 +}