diff options
Diffstat (limited to 'net-vpn/openvpn')
-rw-r--r-- | net-vpn/openvpn/Manifest | 15 | ||||
-rw-r--r-- | net-vpn/openvpn/files/openvpn-2.1.init | 6 | ||||
-rw-r--r-- | net-vpn/openvpn/files/openvpn-2.5.2-detect-python-rst2man.patch | 14 | ||||
-rw-r--r-- | net-vpn/openvpn/metadata.xml | 1 | ||||
-rw-r--r-- | net-vpn/openvpn/openvpn-2.4.9.ebuild | 9 | ||||
-rw-r--r-- | net-vpn/openvpn/openvpn-2.5.0-r1.ebuild | 9 | ||||
-rw-r--r-- | net-vpn/openvpn/openvpn-2.5.1-r1.ebuild | 9 | ||||
-rw-r--r-- | net-vpn/openvpn/openvpn-2.5.2.ebuild | 189 | ||||
-rw-r--r-- | net-vpn/openvpn/openvpn-9999.ebuild | 97 |
9 files changed, 283 insertions, 66 deletions
diff --git a/net-vpn/openvpn/Manifest b/net-vpn/openvpn/Manifest index ac1e5551dd62..eb2407798d95 100644 --- a/net-vpn/openvpn/Manifest +++ b/net-vpn/openvpn/Manifest @@ -1,13 +1,16 @@ AUX down.sh 943 BLAKE2B 9853748aebd819c46cec0229971375d28922abe91ff6442a572090f300cd901ccd80c04fc3df30a1251492a55e593a4783f7f5a4b380053f27bb387f5417444b SHA512 5defd61edf11cc63f3f8f60bef7fa730c4bcdd2545d664bd94666dd3aea80bd9d190263d8835a555e4287a594f6fce0f52426aed49c60233ff637a2a6164a997 AUX openvpn-2.1.conf 892 BLAKE2B d0ce49ecc6275c9677e56de5d13afcc69169666441cb6d8eb958642786f0ee7ff6acb1830af0001fd1945b666daf5af1d9be211032817fc345e33242e1d86885 SHA512 982ade883afbe2e656a9cbbe36c31c0e8b4f7bbbe5b63df9f7b834f02a9153032fb7445c85d3e91f62c68a7ddd13c3afbf420fb71cdd13d9c4b69f867bdd9f37 -AUX openvpn-2.1.init 4187 BLAKE2B 9ab133bda1db2d94afbf1e35840515452029319c38bb796af90b117dcfcd8552da2ea236399c2708a4862de753a8f92cdff80a69cfdcc5d53e206f9f3ffc48d8 SHA512 2d97a41b3998c196c440dcaf43ad8992eae27c5356c94b24f4cc4b20169350f3d6c8d65bb9c2517415ee15637fa60298d9cd8252ad9aa3eec6ae3a847ede0611 +AUX openvpn-2.1.init 4176 BLAKE2B bcce4f9683c485acde0c909a2be77511b7f0576dcd2452c18042ebd414deb0a43c6885cf6d5e402f22bf0d64c79b70b29b66bbfd9517946053e39eb9d8706e15 SHA512 403314b8bb29b2112af46ff6a6760c6f746904d20f916b35ae08edcef979bb023e3c2c1c3493f784d14ce3fbb96744b5ad077b304841a0223fc46abfbf956b1d AUX openvpn-2.5.0-auth-pam-missing-header.patch 339 BLAKE2B 8aa56f7d475c4d7a1f0d8b14b7563744981f9fef15c5b217aba00d91469eda99cfa04b4a1e8ffbc92dccfc981290ec5aaf209041ed7790f05f2bcf51a06981bb SHA512 373e63417f829c3309cc3ec1e676559deaa7f19be438228d05ac4f47cd5d18f36be270cff1e6dad5b610afd77ff128c170a319263b903d6f221344e3b6be32bc +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.4.9.tar.gz 1000602 BLAKE2B 4a10ec76d1a816f9184dd33e4384623e011a1af40ea38ad56cc06f70ab2c911b6fd92cf8ffcd2ec3ab4179fef87feb187fc9df61c5bea92b1c69ee4113093866 SHA512 7683dfb93592968459f080a07ea750992b7444708cdb1a5aafc0118ab8528fc488f2b9fbd7d042e57ad1811303208875237ae9decf0bb4977c45cd30da53751b DIST openvpn-2.5.0-r1.tar.gz 1815964 BLAKE2B cca1c1ec4fbfe0c337c14525cf706280c9d961c4bba992dfa0b13c9f96e00092864301138037485095716c746ef6ff3473a2085780b3ef77183bf4a6f1c602ae SHA512 3deb55973b87cc95c0437ab9ce6c43fdc246aa7e42e3e68bd6a5651deffa798b6750f625917cb2aaa2c82f0b3a0805bcf206a2aa8e2c735fd24e6bd38f736562 DIST openvpn-2.5.1.tar.gz 1827517 BLAKE2B 068af9313c9b2b93dcaa06f82ad66489154ce04973e323af07f38f209b4be77b7b785046aa31559a9f744b4b8c6976acd3e644d5a573f3c5511dc11f5bab3dce SHA512 eb85d14eeb383bed09670941451328db38feacc0b8b7b960840a3f465de83a7527de7d183e66344011da3a3655d558483c569d096b36964209a23418f89052e2 -EBUILD openvpn-2.4.9.ebuild 4756 BLAKE2B 44efa8c170cab681304afe8694e06283dd60941e1ab90f5348e467df4ae5ffff3fae7d565fc81d3bc213d23856c213b8f9be3c810217b13be0da3417582f9b67 SHA512 877e8640b156e031268c928b9c8702869ae774586047f38b79a3bf9e2c5d684b35b2fd46c92eaa071d8cb3e9c9d930b9ba18104a86fd96032db5f5be7ee5b0de -EBUILD openvpn-2.5.0-r1.ebuild 4775 BLAKE2B fb9868cc03e1325bf551557526a24ab02ad355b73171903deae94fc58bf28bad69464575a2f90a208b2f991a455edd569a4d7cea9dbc2d0cf7a7494d74327abe SHA512 96baa09524a98794d6604ef1f9918745fe4f3de23ef79c6225c2913bc11a2cc02fba52efafe623265ab9287c3438e43570447ea2d20262c80256dbe5c25436d2 -EBUILD openvpn-2.5.1-r1.ebuild 4759 BLAKE2B 6c1575a2fa70dc433fca5405cfa73f62485289554dcd3c37f3cff1a162fe088176652a77a8e12874ecaa4cd59bdb0ba428b1f0b75318b0c05c6cb729199aabea SHA512 0d6452e99166557148dce32a7862138ae8b455aa1cab7b1a7940dbf7be5312f3734bfe92f5a13aa8d34e97ba1d0daf8ec3670890b779216a463ed18e088ccd6b -EBUILD openvpn-9999.ebuild 4763 BLAKE2B d16e734db362f6ef1c68a16f980ea35d6bbad0a59e9e48bfa039e1be46499e04ffdd48e49574155aec6e9ac1db274b437dacd09a5928a9ecd17670c39f9c6c91 SHA512 0b776162a07b746aed576694bbd75594172675a2cede06696d4f99957661284b9e8917c94c42ca9f7db6c8aeabbfa5d6ef7a8a83da2d294680de379f30ad9254 -MISC metadata.xml 1158 BLAKE2B 2d27c7254e0249fad84a5e676cb2c60f0edbb5cda6e66e44f380a39e835f4df72931c983d1989d03169e6003f497f39d928fdbe6548e3df799ffb62c8ba7cc45 SHA512 29af52059d7f381cf4956c116ba3d4ad420ae35af9a33ed97779f6b3cee291003def855e3b84bdafd60f30bdcad1baba70a639d2ad01c01af0a52ef18c50d9e5 +DIST openvpn-2.5.2.tar.gz 1830763 BLAKE2B d1c5fa97b3a9168e8715a7cf926b581e054d1d8ac905dcb78e91b9e7f2ea2abf2f03a02e6b4ee10184e810ebb871f4fc638834848eb3b4a9122b177705382fe8 SHA512 5811d26b32e7f258dc1f7ed704d28f9eb03200b54a128e4cb5dfa37ace5113d7841830fc04e1c5f69a138141d0f6f0ca6cb7fc3c39d67456e476eb4c45102be1 +EBUILD openvpn-2.4.9.ebuild 4673 BLAKE2B 5c59d4d0745d7ea2efc85145acb06a101aac417f8a2f5a23e21b0939b9180d009b380db2064d7babf9335fddc866bd48fcf1c0a87f4094f1718315ad22e6f5cd SHA512 4c4880507b407549b42b9f58443f6031e0ac6aaa41c14426dcc792930c1fa45ad84e7e3934fa85c91599adfdd2dc019eefbfa3afefad518a30058c6a6489f0da +EBUILD openvpn-2.5.0-r1.ebuild 4695 BLAKE2B dd947f38a6484cc69e8cccac511fb60ffc04ab3ab7e69d11192b274234f93c175d2f15f8567b5312281efe76ba568bdf168a9d6cf51f1c19d778c914921d228a SHA512 7d8d46b49fe36c2850c031c74a47a459b28bbc5e94bc9ba5862999b196f3ad8ba425cd30031d7e592a53c89e6926a9110baee8b3b4300ba44e629ba33ac5ee8c +EBUILD openvpn-2.5.1-r1.ebuild 4679 BLAKE2B a823847503c964ff792b78ba44116dd9f257814d73e24965560cbcbc85235368be160892274579a60d26c77e31bda389a6b4122a0e1e344a4ee4fe2e0f29552d SHA512 1894deec5ca459b8de6cf58c5aed77b9987671a7bf7c052e15dd3ffa48a6e1b2a7ad14797ee9886ba6545f4a8f14d64de8b1715787880b5bc8880f4e23d8174e +EBUILD openvpn-2.5.2.ebuild 5000 BLAKE2B 87806f8baa1589c14ec92972199068a774e4d30406466ce3611b0ec818e6dc99eabacd619ae72ca94988df5ff6047ca95e630838b14a9fca81828e4790449d8c SHA512 e414ef1ad5496dcb220aab5785a5343f2d1d40bad1e184d52c0aa2bea4772a9594b201fd91fd786a8c984c15e3b8da8b06c2a02f8a9cd39db95232a4d48d2c23 +EBUILD openvpn-9999.ebuild 5006 BLAKE2B 580199387ed1a7a35ada0566f030f4597bb78106fcc49a19473f15cd63581db3a0ddf3493bbe3935914ed9df687c4d26aaf84cba8f1a693e581a1fdaa8bf9881 SHA512 149e1cb8868a6133a061c9434fc13f12cf7b1ea90130f106adbf4d9e7fa25aa560d449f153cc3dbcbe067fc28f08ad287a9fe2465a377dc0b95a8e4a639d35ac +MISC metadata.xml 1083 BLAKE2B 5642cd5be7d4d53f5cc3b1e501f3a22c875ceee114cc2c4d5fa45f96983593d8f2c5b60a30c396187ad7bb2adb36d6d5c03aef8530d450ab86df589a591ae95b SHA512 91a8c6eda7d21dbf7619b49b757d9016ac94ff6c9e87ef5684a01d5138d8f84cfcc525fd62729ceac85394e82cec3931716f6dfaae59cfc3eda804bd968ee428 diff --git a/net-vpn/openvpn/files/openvpn-2.1.init b/net-vpn/openvpn/files/openvpn-2.1.init index b42aa13d20de..ba05689a1e09 100644 --- a/net-vpn/openvpn/files/openvpn-2.1.init +++ b/net-vpn/openvpn/files/openvpn-2.1.init @@ -1,13 +1,13 @@ #!/sbin/openrc-run -# Copyright 1999-2007 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 VPNDIR=${VPNDIR:-/etc/openvpn} VPN=${SVCNAME#*.} if [ -n "${VPN}" ] && [ ${SVCNAME} != "openvpn" ]; then - VPNPID="/var/run/openvpn.${VPN}.pid" + VPNPID="/run/openvpn.${VPN}.pid" else - VPNPID="/var/run/openvpn.pid" + VPNPID="/run/openvpn.pid" fi VPNCONF="${VPNDIR}/${VPN}.conf" diff --git a/net-vpn/openvpn/files/openvpn-2.5.2-detect-python-rst2man.patch b/net-vpn/openvpn/files/openvpn-2.5.2-detect-python-rst2man.patch new file mode 100644 index 000000000000..d2060bbff4b1 --- /dev/null +++ b/net-vpn/openvpn/files/openvpn-2.5.2-detect-python-rst2man.patch @@ -0,0 +1,14 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -376,8 +376,8 @@ AC_DEFINE_UNQUOTED([SYSTEMD_ASK_PASSWORD_PATH], ["$SYSTEMD_ASK_PASSWORD"], [Path + # + AC_ARG_VAR([RST2MAN], [path to rst2man utility]) + AC_ARG_VAR([RST2HTML], [path to rst2html utility]) +-AC_CHECK_PROGS([RST2MAN], [rst2man]) +-AC_CHECK_PROGS([RST2HTML], [rst2html]) ++AC_CHECK_PROGS([RST2MAN], [rst2man rst2man.py]) ++AC_CHECK_PROGS([RST2HTML], [rst2html rst2html.py]) + AM_CONDITIONAL([HAVE_PYDOCUTILS], [test "${RST2MAN}" -a "${RST2HTML}"]) + + # Set -std=c99 unless user already specified a -std= + diff --git a/net-vpn/openvpn/metadata.xml b/net-vpn/openvpn/metadata.xml index caa9b97acdf9..699f7fa4ff84 100644 --- a/net-vpn/openvpn/metadata.xml +++ b/net-vpn/openvpn/metadata.xml @@ -17,7 +17,6 @@ networks using an encrypted tunnel.</longdescription> <flag name="iproute2">Enabled iproute2 support instead of net-tools</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.4.9.ebuild b/net-vpn/openvpn/openvpn-2.4.9.ebuild index 6d6d5d7a02da..fa2a4e2f0261 100644 --- a/net-vpn/openvpn/openvpn-2.4.9.ebuild +++ b/net-vpn/openvpn/openvpn-2.4.9.ebuild @@ -13,7 +13,7 @@ LICENSE="GPL-2" SLOT="0" KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux" -IUSE="down-root examples inotify iproute2 libressl +lz4 +lzo mbedtls pam" +IUSE="down-root examples inotify iproute2 +lz4 +lzo mbedtls pam" IUSE+=" pkcs11 +plugins selinux +ssl systemd test userland_BSD" RESTRICT="!test? ( test )" @@ -29,10 +29,7 @@ CDEPEND=" ) pam? ( sys-libs/pam ) ssl? ( - !mbedtls? ( - !libressl? ( >=dev-libs/openssl-0.9.8:0= ) - libressl? ( dev-libs/libressl:0= ) - ) + !mbedtls? ( >=dev-libs/openssl-0.9.8:0= ) mbedtls? ( net-libs/mbedtls:= ) ) lz4? ( app-arch/lz4 ) @@ -69,7 +66,7 @@ src_configure() { myeconfargs+=( $(use_with ssl crypto-library $(usex mbedtls mbedtls openssl)) ) - if use libressl || ! use mbedtls; then + if ! use mbedtls; then myeconfargs+=( $(use_enable pkcs11) ) diff --git a/net-vpn/openvpn/openvpn-2.5.0-r1.ebuild b/net-vpn/openvpn/openvpn-2.5.0-r1.ebuild index 2744ace92710..8ee40bcb156d 100644 --- a/net-vpn/openvpn/openvpn-2.5.0-r1.ebuild +++ b/net-vpn/openvpn/openvpn-2.5.0-r1.ebuild @@ -13,7 +13,7 @@ LICENSE="GPL-2" SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" -IUSE="down-root examples inotify iproute2 libressl +lz4 +lzo mbedtls +openssl" +IUSE="down-root examples inotify iproute2 +lz4 +lzo mbedtls +openssl" IUSE+=" pam pkcs11 +plugins selinux systemd test userland_BSD" RESTRICT="!test? ( test )" @@ -31,10 +31,7 @@ CDEPEND=" lz4? ( app-arch/lz4 ) lzo? ( >=dev-libs/lzo-1.07 ) mbedtls? ( net-libs/mbedtls:= ) - openssl? ( - !libressl? ( >=dev-libs/openssl-0.9.8:0= ) - libressl? ( dev-libs/libressl:0= ) - ) + openssl? ( >=dev-libs/openssl-0.9.8:0= ) pam? ( sys-libs/pam ) pkcs11? ( >=dev-libs/pkcs11-helper-1.11 ) systemd? ( sys-apps/systemd ) @@ -65,7 +62,7 @@ src_prepare() { src_configure() { local -a myeconfargs - if use libressl || ! use mbedtls; then + if ! use mbedtls; then myeconfargs+=( $(use_enable pkcs11) ) diff --git a/net-vpn/openvpn/openvpn-2.5.1-r1.ebuild b/net-vpn/openvpn/openvpn-2.5.1-r1.ebuild index 5d4782a0359f..f6859b6c7e04 100644 --- a/net-vpn/openvpn/openvpn-2.5.1-r1.ebuild +++ b/net-vpn/openvpn/openvpn-2.5.1-r1.ebuild @@ -13,7 +13,7 @@ LICENSE="GPL-2" SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" -IUSE="down-root examples inotify iproute2 libressl +lz4 +lzo mbedtls +openssl" +IUSE="down-root examples inotify iproute2 +lz4 +lzo mbedtls +openssl" IUSE+=" pam pkcs11 +plugins selinux systemd test userland_BSD" RESTRICT="!test? ( test )" @@ -31,10 +31,7 @@ CDEPEND=" lz4? ( app-arch/lz4 ) lzo? ( >=dev-libs/lzo-1.07 ) mbedtls? ( net-libs/mbedtls:= ) - openssl? ( - !libressl? ( >=dev-libs/openssl-0.9.8:0= ) - libressl? ( dev-libs/libressl:0= ) - ) + openssl? ( >=dev-libs/openssl-0.9.8:0= ) pam? ( sys-libs/pam ) pkcs11? ( >=dev-libs/pkcs11-helper-1.11 ) systemd? ( sys-apps/systemd ) @@ -65,7 +62,7 @@ src_prepare() { src_configure() { local -a myeconfargs - if use libressl || ! use mbedtls; then + if ! use mbedtls; then myeconfargs+=( $(use_enable pkcs11) ) diff --git a/net-vpn/openvpn/openvpn-2.5.2.ebuild b/net-vpn/openvpn/openvpn-2.5.2.ebuild new file mode 100644 index 000000000000..757421b60090 --- /dev/null +++ b/net-vpn/openvpn/openvpn-2.5.2.ebuild @@ -0,0 +1,189 @@ +# 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 ~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 b2945c23a0f7..20cd58c60ee4 100644 --- a/net-vpn/openvpn/openvpn-9999.ebuild +++ b/net-vpn/openvpn/openvpn-9999.ebuild @@ -3,22 +3,31 @@ EAPI=7 -inherit autotools flag-o-matic systemd linux-info git-r3 +inherit autotools flag-o-matic systemd linux-info DESCRIPTION="Robust and highly flexible tunneling application compatible with many OSes" -EGIT_REPO_URI="https://github.com/OpenVPN/${PN}.git" -EGIT_SUBMODULES=(-cmocka) 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 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" +fi + LICENSE="GPL-2" SLOT="0" -KEYWORDS="" -IUSE="down-root examples inotify iproute2 libressl +lz4 +lzo mbedtls pam" -IUSE+=" pkcs11 +plugins selinux +ssl systemd test userland_BSD" +IUSE="down-root examples inotify iproute2 +lz4 +lzo mbedtls +openssl" +IUSE+=" pam pkcs11 +plugins selinux systemd test userland_BSD" RESTRICT="!test? ( test )" -REQUIRED_USE="pkcs11? ( ssl ) +REQUIRED_USE=" + ^^ ( openssl mbedtls ) + pkcs11? ( !mbedtls ) !plugins? ( !pam !down-root ) inotify? ( plugins ) " @@ -26,21 +35,18 @@ REQUIRED_USE="pkcs11? ( ssl ) CDEPEND=" kernel_linux? ( iproute2? ( sys-apps/iproute2[-minimal] ) - !iproute2? ( >=sys-apps/net-tools-1.60_p20160215155418 ) - ) - pam? ( sys-libs/pam ) - ssl? ( - !mbedtls? ( - !libressl? ( >=dev-libs/openssl-0.9.8:0= ) - libressl? ( dev-libs/libressl:0= ) - ) - mbedtls? ( net-libs/mbedtls:= ) ) 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 ) " @@ -50,9 +56,17 @@ RDEPEND="${CDEPEND} selinux? ( sec-policy/selinux-openvpn ) " -CONFIG_CHECK="~TUN" +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 } @@ -62,28 +76,37 @@ src_prepare() { } src_configure() { - SYSTEMD_UNIT_DIR=$(systemd_get_systemunitdir) \ - TMPFILES_DIR="/usr/lib/tmpfiles.d" \ - econf \ - --with-plugindir="${EPREFIX}/usr/$(get_libdir)/${PN}" \ - $(use_enable inotify async-push) \ - $(use_enable ssl crypto) \ - $(use_with ssl crypto-library $(usex mbedtls mbedtls openssl)) \ - $(use_enable lz4) \ - $(use_enable lzo) \ - $(use_enable pkcs11) \ - $(use_enable plugins) \ - $(use_enable iproute2) \ - $(use_enable pam plugin-auth-pam) \ - $(use_enable down-root plugin-down-root) \ + 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 + pushd tests/unit_tests &>/dev/null || die make check || die "unit tests failed" - popd > /dev/null || die + popd &>/dev/null || die } src_install() { @@ -110,6 +133,9 @@ src_install() { docinto /usr/share/doc/${PF}/examples dodoc -r sample contrib fi + + # https://bugs.gentoo.org/755680#c3 + doman doc/openvpn.8 } pkg_postinst() { @@ -160,9 +186,4 @@ pkg_postinst() { einfo "" einfo "plugins have been installed into /usr/$(get_libdir)/${PN}/plugins" fi - - ewarn "" - ewarn "You are using a live ebuild building from the sources of openvpn" - ewarn "repository from http://openvpn.git.sourceforge.net. For reporting" - ewarn "bugs please contact: openvpn-devel@lists.sourceforge.net." } |