From 590b9b7b03bf4651e099949e318755af7cfa81b8 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 1 Aug 2021 22:03:23 +0100 Subject: gentoo resync : 01.08.2021 --- net-vpn/openvpn/Manifest | 4 +- net-vpn/openvpn/openvpn-2.5.2-r2.ebuild | 192 ++++++++++++++++++++++++++++++++ net-vpn/openvpn/openvpn-2.5.2.ebuild | 189 ------------------------------- net-vpn/openvpn/openvpn-9999.ebuild | 4 +- 4 files changed, 197 insertions(+), 192 deletions(-) create mode 100644 net-vpn/openvpn/openvpn-2.5.2-r2.ebuild delete mode 100644 net-vpn/openvpn/openvpn-2.5.2.ebuild (limited to 'net-vpn/openvpn') diff --git a/net-vpn/openvpn/Manifest b/net-vpn/openvpn/Manifest index 5ac5fc475251..413b0e59c5bc 100644 --- a/net-vpn/openvpn/Manifest +++ b/net-vpn/openvpn/Manifest @@ -5,6 +5,6 @@ AUX openvpn-2.5.0-auth-pam-missing-header.patch 339 BLAKE2B 8aa56f7d475c4d7a1f0d AUX openvpn-2.5.2-detect-python-rst2man.patch 554 BLAKE2B e379af57dcc25766803043c40ac2128e2649acb4594ba6c4f55967e5d38dc6fd3190d519b6e9ea81656eb9e5344043e6cb84e155059337282913b60a58d09eca SHA512 e09307c2841a8836d12e1973baaa5e61fd9371e6628dcc858cfa9111b8907f8e6ad73073552655292f0f9d23b8850aa821d3a1520b4b11c312a8beb2225c6ae9 AUX up.sh 2865 BLAKE2B f359c0078148a8ec59b68227844f39d784df2271e9640b54f50a9c0b6b67450cf8b397dba8fd735931790648c1d485c149a55ffcbf095623b491b8a827eccab9 SHA512 35201b0e60ad20358080007e595eb4f96d186ba8e88f0485c55d164c28e3d78a12f3e09347ba3d76abb9b8b03fb4a53664bd74ab484be1548090022b956925fd DIST openvpn-2.5.2.tar.gz 1830763 BLAKE2B d1c5fa97b3a9168e8715a7cf926b581e054d1d8ac905dcb78e91b9e7f2ea2abf2f03a02e6b4ee10184e810ebb871f4fc638834848eb3b4a9122b177705382fe8 SHA512 5811d26b32e7f258dc1f7ed704d28f9eb03200b54a128e4cb5dfa37ace5113d7841830fc04e1c5f69a138141d0f6f0ca6cb7fc3c39d67456e476eb4c45102be1 -EBUILD openvpn-2.5.2.ebuild 5007 BLAKE2B a276f607f7defd11de4f19f61a7a1a2e21a3d9b929f748b9b1c825033b40578a4106eda5cb66e7a32e999ce04e5506398a2ffbfeab7ebc70c703b9c6b129566d SHA512 9fdb0645c697ca50f8bf7226b3f2423280091a971d31bca972c0b02df59583d7cf9e16f223b34873ca6143c8321e3210a33b0b94e882a1f0002f8ea748257742 -EBUILD openvpn-9999.ebuild 4986 BLAKE2B 5eebd395ec22387351e2dea239b61ca22cbcc0c7cff64f2de4c7bd4bac9cb8c99af4546aa986a67cd11efe524e3db8e57a7bac95da7b22ebfe3f1e0bfdf8beb4 SHA512 279bc764dfda1887a9259c84a226764784ac31d7d8dc85ad45ab1dde5ad05a26f9c0c1556299cd2d3687299a8c89d00d19c18113c94145d59c914885fbde19e7 +EBUILD openvpn-2.5.2-r2.ebuild 5073 BLAKE2B 6e5af48ff12ad50db367e306e38055254196e389a6f4a5cc6b997d13ed86c16f3b19365b83cca7171a63bf3e2ee307d5c91b7a055abeb61196eeb33b02e753fc SHA512 2723e6954ddaa4bf2e62f53901267f59bf845443b5cb9ff0bdf15f15d4cdc197c52c98a50869db7e9f91f32cb56c83556e0ceda21c455afbf176e91f1d3e9177 +EBUILD openvpn-9999.ebuild 5027 BLAKE2B ee349a52108d8e8952b3f1053893f85a37486628e58fe88d1574137a9bc7abbe8972e6cdc117b36588e53ce2cc9a0edb848a960258f02189c45302158b7080b8 SHA512 8b4d1b69f7a5a223d33e51fa3edf1328ae5a15eca3040be1fc1c609865bc23dec2571eda4a92b2c32465979dba286d6ccc69bc7f0f452e40a274330d5d015ee2 MISC metadata.xml 1083 BLAKE2B 5642cd5be7d4d53f5cc3b1e501f3a22c875ceee114cc2c4d5fa45f96983593d8f2c5b60a30c396187ad7bb2adb36d6d5c03aef8530d450ab86df589a591ae95b SHA512 91a8c6eda7d21dbf7619b49b757d9016ac94ff6c9e87ef5684a01d5138d8f84cfcc525fd62729ceac85394e82cec3931716f6dfaae59cfc3eda804bd968ee428 diff --git a/net-vpn/openvpn/openvpn-2.5.2-r2.ebuild b/net-vpn/openvpn/openvpn-2.5.2-r2.ebuild new file mode 100644 index 000000000000..e09e6ac634dc --- /dev/null +++ b/net-vpn/openvpn/openvpn-2.5.2-r2.ebuild @@ -0,0 +1,192 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools flag-o-matic systemd linux-info tmpfiles + +DESCRIPTION="Robust and highly flexible tunneling application compatible with many OSes" +HOMEPAGE="https://openvpn.net/" + +if [[ ${PV} == "9999" ]]; then + EGIT_REPO_URI="https://github.com/OpenVPN/${PN}.git" + EGIT_SUBMODULES=(-cmocka) + + inherit git-r3 +else + SRC_URI="https://build.openvpn.net/downloads/releases/${P}.tar.gz" + KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux" +fi + +LICENSE="GPL-2" +SLOT="0" + +IUSE="down-root examples inotify iproute2 +lz4 +lzo mbedtls +openssl" +IUSE+=" pam pkcs11 +plugins selinux systemd test userland_BSD" + +RESTRICT="!test? ( test )" +REQUIRED_USE=" + ^^ ( openssl mbedtls ) + pkcs11? ( !mbedtls ) + !plugins? ( !pam !down-root ) + inotify? ( plugins ) +" + +CDEPEND=" + kernel_linux? ( + iproute2? ( sys-apps/iproute2[-minimal] ) + ) + 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 ) +" + +BDEPEND="virtual/pkgconfig" + +DEPEND="${CDEPEND} + test? ( dev-util/cmocka ) +" +RDEPEND="${CDEPEND} + acct-group/openvpn + acct-user/openvpn + selinux? ( sec-policy/selinux-openvpn ) +" + +if [[ ${PV} = "9999" ]]; then + BDEPEND+=" dev-python/docutils" +fi + +PATCHES=( + "${FILESDIR}"/openvpn-2.5.0-auth-pam-missing-header.patch + "${FILESDIR}"/openvpn-2.5.2-detect-python-rst2man.patch +) + +pkg_setup() { + local CONFIG_CHECK="~TUN" + linux-info_pkg_setup +} + +src_prepare() { + default + eautoreconf +} + +src_configure() { + local -a myeconfargs + + if ! 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() { + local -x RUN_SUDO=false + + 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 || die + + # 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 + # (is the below comment relevant anymore?) + ## dodoc does not supportly support directory traversal, #15193 + docinto examples + dodoc -r sample contrib + fi + + # https://bugs.gentoo.org/755680#c3 + doman doc/openvpn.8 +} + +pkg_postinst() { + tmpfiles_process openvpn.conf + + if use x64-macos; then + elog "You might want to install tuntaposx for TAP interface support:" + elog "http://tuntaposx.sourceforge.net" + fi + + if systemd_is_booted || has_version sys-apps/systemd; then + elog "In order to use OpenVPN with systemd please use the correct systemd service file." + elog "" + elog "server:" + elog "" + elog "- Place your server configuration file in /etc/openvpn/server" + elog "- Use the openvpn-server@.service like so" + elog "systemctl start openvpn-server@{Server-config}" + elog "" + elog "client:" + elog "" + elog "- Place your client configuration file in /etc/openvpn/client" + elog "- Use the openvpn-client@.service like so:" + elog "systemctl start openvpn-client@{Client-config}" + else + 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." + fi + + 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 +} diff --git a/net-vpn/openvpn/openvpn-2.5.2.ebuild b/net-vpn/openvpn/openvpn-2.5.2.ebuild deleted file mode 100644 index 97c64cdc1ea5..000000000000 --- a/net-vpn/openvpn/openvpn-2.5.2.ebuild +++ /dev/null @@ -1,189 +0,0 @@ -# Copyright 1999-2021 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" -HOMEPAGE="https://openvpn.net/" - -if [[ ${PV} == "9999" ]]; then - EGIT_REPO_URI="https://github.com/OpenVPN/${PN}.git" - EGIT_SUBMODULES=(-cmocka) - - inherit git-r3 -else - SRC_URI="https://build.openvpn.net/downloads/releases/${P}.tar.gz" - KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux" -fi - -LICENSE="GPL-2" -SLOT="0" - -IUSE="down-root examples inotify iproute2 +lz4 +lzo mbedtls +openssl" -IUSE+=" pam pkcs11 +plugins selinux systemd test userland_BSD" - -RESTRICT="!test? ( test )" -REQUIRED_USE=" - ^^ ( openssl mbedtls ) - pkcs11? ( !mbedtls ) - !plugins? ( !pam !down-root ) - inotify? ( plugins ) -" - -CDEPEND=" - kernel_linux? ( - iproute2? ( sys-apps/iproute2[-minimal] ) - ) - 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 ) -" - -BDEPEND="virtual/pkgconfig" - -DEPEND="${CDEPEND} - test? ( dev-util/cmocka ) -" -RDEPEND="${CDEPEND} - acct-group/openvpn - acct-user/openvpn - selinux? ( sec-policy/selinux-openvpn ) -" - -if [[ ${PV} = "9999" ]]; then - BDEPEND+=" dev-python/docutils" -fi - -PATCHES=( - "${FILESDIR}"/openvpn-2.5.0-auth-pam-missing-header.patch - "${FILESDIR}"/openvpn-2.5.2-detect-python-rst2man.patch -) - -pkg_setup() { - local CONFIG_CHECK="~TUN" - linux-info_pkg_setup -} - -src_prepare() { - default - eautoreconf -} - -src_configure() { - local -a myeconfargs - - if ! 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() { - local -x RUN_SUDO=false - - 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 || die - - # 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 - - if systemd_is_booted || has_version sys-apps/systemd; then - elog "In order to use OpenVPN with systemd please use the correct systemd service file." - elog "" - elog "server:" - elog "" - elog "- Place your server configuration file in /etc/openvpn/server" - elog "- Use the openvpn-server@.service like so" - elog "systemctl start openvpn-server@{Server-config}" - elog "" - elog "client:" - elog "" - elog "- Place your client configuration file in /etc/openvpn/client" - elog "- Use the openvpn-client@.service like so:" - elog "systemctl start openvpn-client@{Client-config}" - else - 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." - fi - - 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 -} diff --git a/net-vpn/openvpn/openvpn-9999.ebuild b/net-vpn/openvpn/openvpn-9999.ebuild index ac64c3e3d3c7..d5d643edb2fb 100644 --- a/net-vpn/openvpn/openvpn-9999.ebuild +++ b/net-vpn/openvpn/openvpn-9999.ebuild @@ -3,7 +3,7 @@ EAPI=7 -inherit autotools flag-o-matic systemd linux-info +inherit autotools flag-o-matic systemd linux-info tmpfiles DESCRIPTION="Robust and highly flexible tunneling application compatible with many OSes" HOMEPAGE="https://openvpn.net/" @@ -139,6 +139,8 @@ src_install() { } pkg_postinst() { + tmpfiles_process openvpn.conf + if use x64-macos ; then elog "You might want to install tuntaposx for TAP interface support:" elog "http://tuntaposx.sourceforge.net" -- cgit v1.2.3