diff options
Diffstat (limited to 'net-vpn/openvpn')
-rw-r--r-- | net-vpn/openvpn/Manifest | 4 | ||||
-rw-r--r-- | net-vpn/openvpn/metadata.xml | 4 | ||||
-rw-r--r-- | net-vpn/openvpn/openvpn-2.5.0-r1.ebuild | 151 |
3 files changed, 157 insertions, 2 deletions
diff --git a/net-vpn/openvpn/Manifest b/net-vpn/openvpn/Manifest index 650a20f1ffd0..15474bbab1f9 100644 --- a/net-vpn/openvpn/Manifest +++ b/net-vpn/openvpn/Manifest @@ -3,6 +3,8 @@ AUX openvpn-2.1.conf 892 BLAKE2B d0ce49ecc6275c9677e56de5d13afcc69169666441cb6d8 AUX openvpn-2.1.init 4187 BLAKE2B 9ab133bda1db2d94afbf1e35840515452029319c38bb796af90b117dcfcd8552da2ea236399c2708a4862de753a8f92cdff80a69cfdcc5d53e206f9f3ffc48d8 SHA512 2d97a41b3998c196c440dcaf43ad8992eae27c5356c94b24f4cc4b20169350f3d6c8d65bb9c2517415ee15637fa60298d9cd8252ad9aa3eec6ae3a847ede0611 AUX up.sh 2865 BLAKE2B f359c0078148a8ec59b68227844f39d784df2271e9640b54f50a9c0b6b67450cf8b397dba8fd735931790648c1d485c149a55ffcbf095623b491b8a827eccab9 SHA512 35201b0e60ad20358080007e595eb4f96d186ba8e88f0485c55d164c28e3d78a12f3e09347ba3d76abb9b8b03fb4a53664bd74ab484be1548090022b956925fd DIST openvpn-2.4.9.tar.gz 1000602 BLAKE2B 4a10ec76d1a816f9184dd33e4384623e011a1af40ea38ad56cc06f70ab2c911b6fd92cf8ffcd2ec3ab4179fef87feb187fc9df61c5bea92b1c69ee4113093866 SHA512 7683dfb93592968459f080a07ea750992b7444708cdb1a5aafc0118ab8528fc488f2b9fbd7d042e57ad1811303208875237ae9decf0bb4977c45cd30da53751b +DIST openvpn-2.5.0-r1.tar.gz 1815964 BLAKE2B cca1c1ec4fbfe0c337c14525cf706280c9d961c4bba992dfa0b13c9f96e00092864301138037485095716c746ef6ff3473a2085780b3ef77183bf4a6f1c602ae SHA512 3deb55973b87cc95c0437ab9ce6c43fdc246aa7e42e3e68bd6a5651deffa798b6750f625917cb2aaa2c82f0b3a0805bcf206a2aa8e2c735fd24e6bd38f736562 EBUILD openvpn-2.4.9.ebuild 4163 BLAKE2B 74c7a130da53fcfe4aad644534c87dc2f00a1321e55a91d671f20b6afe0d1676135663991f4110d44ae0feea3433a4841d0c5d251f81fc32decefd3b5288f32f SHA512 5382fdc7fe0e8f27311ea4cccba195969666acafc43979ce79268912d628d03d8f09ba5f912db75873d009e6bb869448b88efe452a80ed338c6f7972db8bda55 +EBUILD openvpn-2.5.0-r1.ebuild 4099 BLAKE2B 578cb4fc0310317a1e00c132cf4cf4c9721e046a06e74fe55afdad4079d298708d59bc56193104c35b6c99b6ad5c103ecfb29daeb69f59727b8c7520b0becb25 SHA512 95e40a586f1f9495a2cd11f3f83e9c46440c5cb1a63c61ce9d81205da67c0db801a14844e2fc5f27c4a34ce27784f87413217ed14f337b288ec8f3b0a4550ccd EBUILD openvpn-9999.ebuild 4148 BLAKE2B d2942eb2659d5cc1cef40143b6cd84e4e869031cc23ac419865db1286c7bf3ec7c66433ed2c3149d654206f74b3db14b3cea17a5d90332e9bfa5cbb6b172fdf5 SHA512 0807ceb96db862c33e42c7b2eb1224cfdb01d32e09048250bb69a05244af9835e805a9a87fb47d8a0a2422c12088ab515389b180d93286093f2089eab2709c8d -MISC metadata.xml 998 BLAKE2B 800c147b67d26d0ae3856c3aebfd7bec9326aaa67ffcb16b57e00ad722b8154bcd4cd6daef741ebb0f12032ef986e0b3b5a4cf99014df1fbd54699a98ed13a0c SHA512 d7e07e98986611dc410a3ab1b0bf2bb3925fcc9f3388c9649ce7a01baa2fa076d7766b4e1b9749048aa1d1850cb9053e8822ce7a1870002805c176c6a60e6db8 +MISC metadata.xml 1158 BLAKE2B 2d27c7254e0249fad84a5e676cb2c60f0edbb5cda6e66e44f380a39e835f4df72931c983d1989d03169e6003f497f39d928fdbe6548e3df799ffb62c8ba7cc45 SHA512 29af52059d7f381cf4956c116ba3d4ad420ae35af9a33ed97779f6b3cee291003def855e3b84bdafd60f30bdcad1baba70a639d2ad01c01af0a52ef18c50d9e5 diff --git a/net-vpn/openvpn/metadata.xml b/net-vpn/openvpn/metadata.xml index 4d0024cb2edf..caa9b97acdf9 100644 --- a/net-vpn/openvpn/metadata.xml +++ b/net-vpn/openvpn/metadata.xml @@ -15,7 +15,9 @@ networks using an encrypted tunnel.</longdescription> <use> <flag name="down-root">Enable the down-root plugin</flag> <flag name="iproute2">Enabled iproute2 support instead of net-tools</flag> - <flag name="mbedtls">Use mbed TLS instead of OpenSSL</flag> + <flag name="mbedtls">Use mbed TLS as the backend crypto library</flag> + <flag name="openssl">Use OpenSSL as the backend crypto library</flag> + <flag name="libressl">Use OpenSSL as the backend crypto library</flag> <flag name="pkcs11">Enable PKCS#11 smartcard support</flag> <flag name="plugins">Enable the OpenVPN plugin system</flag> </use> diff --git a/net-vpn/openvpn/openvpn-2.5.0-r1.ebuild b/net-vpn/openvpn/openvpn-2.5.0-r1.ebuild new file mode 100644 index 000000000000..094213d0203f --- /dev/null +++ b/net-vpn/openvpn/openvpn-2.5.0-r1.ebuild @@ -0,0 +1,151 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools flag-o-matic systemd linux-info + +DESCRIPTION="Robust and highly flexible tunneling application compatible with many OSes" +SRC_URI="https://build.openvpn.net/downloads/releases/${P}.tar.gz -> ${P}-r1.tar.gz" +HOMEPAGE="https://openvpn.net/" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-macos" + +IUSE="down-root examples inotify iproute2 libressl lz4 +lzo mbedtls +openssl pam" +IUSE+=" pkcs11 +plugins selinux +ssl systemd test userland_BSD" + +RESTRICT="!test? ( test )" +REQUIRED_USE=" + ^^ ( openssl libressl mbedtls ) + pkcs11? ( !mbedtls ) + !plugins? ( !pam !down-root ) + inotify? ( plugins ) +" + +CDEPEND=" + kernel_linux? ( + iproute2? ( sys-apps/iproute2[-minimal] ) + ) + libressl? ( dev-libs/libressl:0= ) + lz4? ( app-arch/lz4 ) + lzo? ( >=dev-libs/lzo-1.07 ) + mbedtls? ( net-libs/mbedtls:= ) + openssl? ( >=dev-libs/openssl-0.9.8:0= ) + pam? ( sys-libs/pam ) + pkcs11? ( >=dev-libs/pkcs11-helper-1.11 ) + systemd? ( sys-apps/systemd ) +" +DEPEND="${CDEPEND} + test? ( dev-util/cmocka ) +" +RDEPEND="${CDEPEND} + acct-group/openvpn + acct-user/openvpn + selinux? ( sec-policy/selinux-openvpn ) +" + +CONFIG_CHECK="~TUN" + +pkg_setup() { + linux-info_pkg_setup +} + +src_prepare() { + default + eautoreconf +} + +src_configure() { + local -a myeconfargs + + if use libressl || ! use mbedtls; then + myeconfargs+=( + $(use_enable pkcs11) + ) + fi + myeconfargs+=( + $(use_enable inotify async-push) + --with-crypto-library=$(usex mbedtls mbedtls openssl) + $(use_enable lz4) + $(use_enable lzo) + $(use_enable plugins) + $(use_enable iproute2) + $(use_enable pam plugin-auth-pam) + $(use_enable down-root plugin-down-root) + $(use_enable systemd) + ) + SYSTEMD_UNIT_DIR=$(systemd_get_systemunitdir) \ + TMPFILES_DIR="/usr/lib/tmpfiles.d" \ + IPROUTE=$(usex iproute2 '/bin/ip' '') \ + econf "${myeconfargs[@]}" +} + +src_test() { + make check || die "top-level tests failed" + pushd tests/unit_tests > /dev/null || die + make check || die "unit tests failed" + popd > /dev/null || die +} + +src_install() { + default + find "${ED}/usr" -name '*.la' -delete + # install documentation + dodoc AUTHORS ChangeLog PORTS README README.IPv6 + + # Install some helper scripts + keepdir /etc/openvpn + exeinto /etc/openvpn + doexe "${FILESDIR}/up.sh" + doexe "${FILESDIR}/down.sh" + + # Install the init script and config file + newinitd "${FILESDIR}/${PN}-2.1.init" openvpn + newconfd "${FILESDIR}/${PN}-2.1.conf" openvpn + + # install examples, controlled by the respective useflag + if use examples ; then + # dodoc does not supportly support directory traversal, #15193 + docinto /usr/share/doc/${PF}/examples + dodoc -r sample contrib + fi + + # https://bugs.gentoo.org/755680#c3 + doman doc/openvpn.8 +} + +pkg_postinst() { + if use x64-macos; then + elog "You might want to install tuntaposx for TAP interface support:" + elog "http://tuntaposx.sourceforge.net" + fi + + elog "The openvpn init script expects to find the configuration file" + elog "openvpn.conf in /etc/openvpn along with any extra files it may need." + elog "" + elog "To create more VPNs, simply create a new .conf file for it and" + elog "then create a symlink to the openvpn init script from a link called" + elog "openvpn.newconfname - like so" + elog " cd /etc/openvpn" + elog " ${EDITOR##*/} foo.conf" + elog " cd /etc/init.d" + elog " ln -s openvpn openvpn.foo" + elog "" + elog "You can then treat openvpn.foo as any other service, so you can" + elog "stop one vpn and start another if you need to." + + if grep -Eq "^[ \t]*(up|down)[ \t].*" "${ROOT}/etc/openvpn"/*.conf 2>/dev/null ; then + ewarn "" + ewarn "WARNING: If you use the remote keyword then you are deemed to be" + ewarn "a client by our init script and as such we force up,down scripts." + ewarn "These scripts call /etc/openvpn/\$SVCNAME-{up,down}.sh where you" + ewarn "can move your scripts to." + fi + + if use plugins ; then + einfo "" + einfo "plugins have been installed into /usr/$(get_libdir)/${PN}/plugins" + fi +} |