diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2019-03-03 13:42:34 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2019-03-03 13:42:34 +0000 |
commit | 066d27181e9a797ad9f8fc43b49fc9a10ff2f707 (patch) | |
tree | 3cb05783d73b2c33589ba305144a31c718e123cd /net-vpn/openvpn | |
parent | 16449a80e28af2209916cc66d19c9a44ca2b90d9 (diff) |
gentoo resync : 03.03.2019
Diffstat (limited to 'net-vpn/openvpn')
-rw-r--r-- | net-vpn/openvpn/Manifest | 6 | ||||
-rw-r--r-- | net-vpn/openvpn/files/openvpn-2.4.7-libressl.patch | 49 | ||||
-rw-r--r-- | net-vpn/openvpn/files/openvpn-2.5-external-cmocka.patch | 65 | ||||
-rw-r--r-- | net-vpn/openvpn/openvpn-2.4.7-r1.ebuild | 159 | ||||
-rw-r--r-- | net-vpn/openvpn/openvpn-9999.ebuild | 9 |
5 files changed, 281 insertions, 7 deletions
diff --git a/net-vpn/openvpn/Manifest b/net-vpn/openvpn/Manifest index e5c7198e457a..7e17ef6bab53 100644 --- a/net-vpn/openvpn/Manifest +++ b/net-vpn/openvpn/Manifest @@ -2,11 +2,15 @@ AUX down.sh 943 BLAKE2B 9853748aebd819c46cec0229971375d28922abe91ff6442a572090f3 AUX openvpn-2.1.conf 892 BLAKE2B d0ce49ecc6275c9677e56de5d13afcc69169666441cb6d8eb958642786f0ee7ff6acb1830af0001fd1945b666daf5af1d9be211032817fc345e33242e1d86885 SHA512 982ade883afbe2e656a9cbbe36c31c0e8b4f7bbbe5b63df9f7b834f02a9153032fb7445c85d3e91f62c68a7ddd13c3afbf420fb71cdd13d9c4b69f867bdd9f37 AUX openvpn-2.1.init 4187 BLAKE2B 9ab133bda1db2d94afbf1e35840515452029319c38bb796af90b117dcfcd8552da2ea236399c2708a4862de753a8f92cdff80a69cfdcc5d53e206f9f3ffc48d8 SHA512 2d97a41b3998c196c440dcaf43ad8992eae27c5356c94b24f4cc4b20169350f3d6c8d65bb9c2517415ee15637fa60298d9cd8252ad9aa3eec6ae3a847ede0611 AUX openvpn-2.4.5-libressl-macro-fix.patch 2096 BLAKE2B d3d277c8bd800827ceabc01431c2ff22e78a89921ff2460460e9acdfbfb7466188456557031de2b0bf2c00703a573c05ba1fcbff96da4b5def596c82717ac81a SHA512 77026186911e852e8434b19662026fa5503a389ecc1a7a8fb3a395beeb2397bc75426ca310e7728ac24ec540b59e00fd623324e262276007c772f9a1cda16863 +AUX openvpn-2.4.7-libressl.patch 1929 BLAKE2B 175375bd8f233a0315ee99fb3ff6ca84f77cd850fabe8cf3f53033f56f99e0ce5ee9de4f4970011909a91e940c2665cc65004f5dce987c9545390b698b580676 SHA512 8fab84df8e268e1ec88bff3443e8e35c5228dfabff71b75f64ba29f6ff09523b36a1c8af9c9cbf20bff9d241d5de3136a1278b3f76675c28238d4c3a12ff535c +AUX openvpn-2.5-external-cmocka.patch 2279 BLAKE2B a20cb45170590c332813fa6a0c539b8972ed329fec4ddb644996d5caa32f821dc4be75a9bc525917562e47588f8135b0def65aed9e747609b836d06a9f6ea666 SHA512 5f6d01b7051511e37a8822a0a514cfbdea3118cf52a86bec3addc2de713640842e972346ce598147e354353dd9483ecdbb13efc211e9b74c58598d6c11038f1e AUX openvpn-external-cmocka.patch 2083 BLAKE2B 4e9f0a2ca509a4c37d2efe061ed7a027ba7e069041d193a237d214c493b839fc36e87898aad160eb8198845306b7910f4d9da0e87671b9310425786fbe676bf4 SHA512 6c34518f626992031735f6433861fafd44e3cf35e95668cf5945aee7b341a049e3b6a73dd9937a0f287e4a750a2415532ae49aac11011767e0c7a3355f8ff6ca AUX up.sh 2865 BLAKE2B f359c0078148a8ec59b68227844f39d784df2271e9640b54f50a9c0b6b67450cf8b397dba8fd735931790648c1d485c149a55ffcbf095623b491b8a827eccab9 SHA512 35201b0e60ad20358080007e595eb4f96d186ba8e88f0485c55d164c28e3d78a12f3e09347ba3d76abb9b8b03fb4a53664bd74ab484be1548090022b956925fd DIST mock_msg.h 1356 BLAKE2B da7585cfeee89c0a4d3aa6326de6e2324804ed2a57a0e8bf7c2e51b25a91a8e1fcf9d29bba90fe58e40bf0197793a76fc1e83d8b6d677228cdc5e5333253b1a3 SHA512 930775a5837bc7f97a26817ea028782d555e0e71ba06b04c39941f4c01bbc3ca0a5dc63bcf19dc694e0e746b3a382f22daf6a6373a3443c5afd7398cbaaef6ea DIST openvpn-2.4.6.tar.gz 1431971 BLAKE2B 1ab0746a845fc56bf738c1730cc187c27f61d5bb763df149640978f0bf87450a01e3e40372265440f1aae4e1c58b6d9a1ee1f2aade970d19fd8e8813e0b487a7 SHA512 cdd70bfd03177bc6cb70d0d614e40389df00816b7097740b4cda9d7bee094d1463fdb5afeaf604c52c7b3167d1edb098a2e095e131a8b9fed0ed8b29da90cbe8 +DIST openvpn-2.4.7.tar.gz 998094 BLAKE2B 90f91d74279a547b49704cd14d9ac3dde26c522cd77eb851ea603addb1b220eda9be4de6cf5d74fe7717f34b3ff5fc802ca977a1402c5ed75616139d449fceb0 SHA512 ba9bc08c02fad85ba05c27488b0bfcb3540ba9c625c42334e24cb1d5e253b91c518c02641d755e03b8747ae8c2ebd340c55d51f7aedbbf2550ee4e4b79823c9c EBUILD openvpn-2.4.6-r1.ebuild 4586 BLAKE2B db7c3da2659728384d6bb78beb8ffa632c66dba467403d87250bdbaa4bdc008b6d4e73dda30c1bf747517927256e144ab0e49e2f419525937d293cc14f38082e SHA512 ba63e3d5cade6cae6ae13126aa974798caba94a2806d0f1da2610c891072b349af73f874f6374817d3d509e1e633cf2b1fd2afbf873c9fb5790059758dc6987d EBUILD openvpn-2.4.6.ebuild 4577 BLAKE2B e8828ba11b3d6026ebddd2f7c64aa351881b99f9bdc2ad480347db796eaf1fa139e1d3478135e53287439a97bd6904e6911b0ff361110b9d6e32e454ff76c6e6 SHA512 b906ae2d8281893d36ed87bf4b6a58c9d8dfd11dedc2f78bdbaf00f246a32a987b50347dd6142c9224e4744bb34146b154e31c9f68b9d938dc21c1bc12a4bf92 -EBUILD openvpn-9999.ebuild 4343 BLAKE2B 1da475ccc626cf4381fd58c78c028cc979894801962a8c5cdf55ff373cbab461ac7721052c384a4f506d0b2a70208069e576d3ce2c24e0c248f83a9ed704bd45 SHA512 2ad94c32bf75c559ecfa3ff93415c02774b266ef6c5ea0bcda8e4c4b1b7045ce782e63b32a23fab1afae34ba50a2185172e6ec8c36e6ff334b84d581630a4504 +EBUILD openvpn-2.4.7-r1.ebuild 4631 BLAKE2B 911f155893cedef53848906375d7ff6281496c797335852f64b0d9561b722c3293aeb45ae7d61bac5990791815624fef8b5f112b9321d29c8094435d6c27c065 SHA512 5568835996f6260ac3a2cc03c163b87178775c36c1fa2d53ba09f99f4a1be6c936adab153e7442757709bf28a6de4ac1bb92d2a3ac6183769dbbc542c7cb1702 +EBUILD openvpn-9999.ebuild 4291 BLAKE2B 0bd80862bf886f0ab5a859ac1894c8c786d8a861c3c87cbf70ce8000f1c842a9025c61382aca5e2c4361f626b460ab73cea5f265b7280e023d6d31d4d88860db SHA512 dbd5e8f80532d625c4403e461ed56ba87b1f36ad24c69d13e9c120298a08aa32a3993ee4283a7d436f890b9c284f0dd1c6c313c1ff334f4661d6c2017b7b3a14 MISC metadata.xml 1045 BLAKE2B 14b6e8113ca48e9c0511ace61b4df0d42d7875b8f6d54f7c4c60bb2f217c8ac15b2d806e7d30897a99caa326214e48386c7bf9839dcabc86831522ca435815c5 SHA512 5d86b34f307c95414b5ae0fddc6ea730dd5058f5198fc14d45f632bb7c4b6d8adf26b7b5971d4ba3ed5b8ff2267fb64d0ab7abc8c19c899929f235563cdceaec diff --git a/net-vpn/openvpn/files/openvpn-2.4.7-libressl.patch b/net-vpn/openvpn/files/openvpn-2.4.7-libressl.patch new file mode 100644 index 000000000000..210189cd4d4d --- /dev/null +++ b/net-vpn/openvpn/files/openvpn-2.4.7-libressl.patch @@ -0,0 +1,49 @@ +From 4faf695e3c42a81131c2aae96c4a60228aa237a5 Mon Sep 17 00:00:00 2001 +From: Stefan Strogin <stefan.strogin@gmail.com> +Date: Sat, 23 Feb 2019 20:13:41 +0200 +Subject: [PATCH] Fix compilation with LibreSSL + +TLS 1.3 is not ready yet in LibreSSL. +Also SSL_get1_supported_ciphers() has been just added into master (not yet +released). + +Upstream-Status: Submitted [https://github.com/OpenVPN/openvpn/pull/123] +Signed-off-by: Stefan Strogin <stefan.strogin@gmail.com> +--- + src/openvpn/ssl_openssl.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/openvpn/ssl_openssl.c b/src/openvpn/ssl_openssl.c +index a78dae99..6a8fcef3 100644 +--- a/src/openvpn/ssl_openssl.c ++++ b/src/openvpn/ssl_openssl.c +@@ -459,7 +459,7 @@ tls_ctx_restrict_ciphers_tls13(struct tls_root_ctx *ctx, const char *ciphers) + return; + } + +-#if (OPENSSL_VERSION_NUMBER < 0x1010100fL) ++#if (OPENSSL_VERSION_NUMBER < 0x1010100fL) || defined(LIBRESSL_VERSION_NUMBER) + crypto_msg(M_WARN, "Not compiled with OpenSSL 1.1.1 or higher. " + "Ignoring TLS 1.3 only tls-ciphersuites '%s' setting.", + ciphers); +@@ -1846,7 +1846,7 @@ show_available_tls_ciphers_list(const char *cipher_list, + crypto_msg(M_FATAL, "Cannot create SSL_CTX object"); + } + +-#if (OPENSSL_VERSION_NUMBER >= 0x1010100fL) ++#if (OPENSSL_VERSION_NUMBER >= 0x1010100fL && !defined(LIBRESSL_VERSION_NUMBER)) + if (tls13) + { + SSL_CTX_set_min_proto_version(tls_ctx.ctx, TLS1_3_VERSION); +@@ -1867,7 +1867,7 @@ show_available_tls_ciphers_list(const char *cipher_list, + crypto_msg(M_FATAL, "Cannot create SSL object"); + } + +-#if (OPENSSL_VERSION_NUMBER < 0x1010000fL) ++#if (OPENSSL_VERSION_NUMBER < 0x1010000fL) || defined(LIBRESSL_VERSION_NUMBER) + STACK_OF(SSL_CIPHER) *sk = SSL_get_ciphers(ssl); + #else + STACK_OF(SSL_CIPHER) *sk = SSL_get1_supported_ciphers(ssl); +-- +2.20.1 + diff --git a/net-vpn/openvpn/files/openvpn-2.5-external-cmocka.patch b/net-vpn/openvpn/files/openvpn-2.5-external-cmocka.patch new file mode 100644 index 000000000000..d339dcd558b1 --- /dev/null +++ b/net-vpn/openvpn/files/openvpn-2.5-external-cmocka.patch @@ -0,0 +1,65 @@ +diff --git a/configure.ac b/configure.ac +index 1e6891b1..c801789c 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1312,6 +1312,21 @@ if test "${enable_async_push}" = "yes"; then + ) + fi + ++AC_ARG_ENABLE( ++ [tests], ++ AS_HELP_STRING([--enable-tests], [enable unit tests @<:@default=no@:>@]) ++) ++ ++if test "${enable_tests}" = "yes"; then ++ PKG_CHECK_MODULES([CMOCKA], [cmocka]) ++ TEST_CFLAGS="${CMOCKA_CFLAGS}" ++ TEST_LDFLAGS="${CMOCKA_LIBS}" ++ AC_SUBST([TEST_CFLAGS]) ++ AC_SUBST([TEST_LDFLAGS]) ++fi ++AM_CONDITIONAL([ENABLE_TESTS], [test "${enable_tests}" = "yes"]) ++AM_CONDITIONAL([CMOCKA_INITIALIZED], [false]) ++ + CONFIGURE_DEFINES="`set | grep '^enable_.*=' ; set | grep '^with_.*='`" + AC_DEFINE_UNQUOTED([CONFIGURE_DEFINES], ["`echo ${CONFIGURE_DEFINES}`"], [Configuration settings]) + +@@ -1360,27 +1375,6 @@ AC_SUBST([VENDOR_SRC_ROOT]) + AC_SUBST([VENDOR_BUILD_ROOT]) + AC_SUBST([VENDOR_DIST_ROOT]) + +-TEST_LDFLAGS="${OPTIONAL_CRYPTO_LIBS} ${OPTIONAL_PKCS11_LIBS} -lcmocka -L\$(abs_top_builddir)/vendor/dist/lib -Wl,-rpath,\$(abs_top_builddir)/vendor/dist/lib" +-TEST_CFLAGS="${OPTIONAL_CRYPTO_CFLAGS} ${OPTIONAL_PKCS11_CFLAGS} -I\$(top_srcdir)/include -I\$(abs_top_builddir)/vendor/dist/include" +- +-AC_SUBST([TEST_LDFLAGS]) +-AC_SUBST([TEST_CFLAGS]) +- +-# Check if cmake is available and cmocka git submodule is initialized, +-# needed for unit testing +-AC_CHECK_PROGS([CMAKE], [cmake]) +-if test -n "${CMAKE}"; then +- if test -f "${srcdir}/vendor/cmocka/CMakeLists.txt"; then +- AM_CONDITIONAL([CMOCKA_INITIALIZED], [true]) +- else +- AM_CONDITIONAL([CMOCKA_INITIALIZED], [false]) +- AC_MSG_RESULT([!! WARNING !! The cmoka git submodule has not been initialized or updated. Unit testing cannot be performed.]) +- fi +-else +- AC_MSG_RESULT([!! WARNING !! CMake is NOT available. Unit testing cannot be performed.]) +- AM_CONDITIONAL([CMOCKA_INITIALIZED], [false]) +-fi +- + + AC_CONFIG_FILES([ + version.sh +diff --git a/tests/unit_tests/Makefile.am b/tests/unit_tests/Makefile.am +index 31d37b89..4b7fb41d 100644 +--- a/tests/unit_tests/Makefile.am ++++ b/tests/unit_tests/Makefile.am +@@ -1,5 +1,5 @@ + AUTOMAKE_OPTIONS = foreign + +-if CMOCKA_INITIALIZED ++if ENABLE_TESTS + SUBDIRS = example_test openvpn plugins + endif diff --git a/net-vpn/openvpn/openvpn-2.4.7-r1.ebuild b/net-vpn/openvpn/openvpn-2.4.7-r1.ebuild new file mode 100644 index 000000000000..0ae13d41d8c6 --- /dev/null +++ b/net-vpn/openvpn/openvpn-2.4.7-r1.ebuild @@ -0,0 +1,159 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit autotools flag-o-matic user systemd linux-info + +DESCRIPTION="Robust and highly flexible tunneling application compatible with many OSes" +SRC_URI="https://github.com/OpenVPN/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz + test? ( https://raw.githubusercontent.com/OpenVPN/${PN}/v${PV}/tests/unit_tests/${PN}/mock_msg.h )" +HOMEPAGE="https://openvpn.net/" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos" + +IUSE="down-root examples inotify iproute2 libressl lz4 +lzo mbedtls pam" +IUSE+=" pkcs11 +plugins selinux +ssl static systemd test userland_BSD" + +REQUIRED_USE="static? ( !plugins !pkcs11 ) + mbedtls? ( ssl !libressl ) + pkcs11? ( ssl ) + !plugins? ( !pam !down-root ) + inotify? ( plugins )" + +CDEPEND=" + kernel_linux? ( + iproute2? ( sys-apps/iproute2[-minimal] ) + !iproute2? ( >=sys-apps/net-tools-1.60_p20160215155418 ) + ) + pam? ( virtual/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 ) + pkcs11? ( >=dev-libs/pkcs11-helper-1.11 ) + systemd? ( sys-apps/systemd )" +DEPEND="${CDEPEND} + test? ( dev-util/cmocka )" +RDEPEND="${CDEPEND} + selinux? ( sec-policy/selinux-openvpn )" + +CONFIG_CHECK="~TUN" + +PATCHES=( + "${FILESDIR}/${PN}-external-cmocka.patch" + "${FILESDIR}/${PN}-2.4.5-libressl-macro-fix.patch" + "${FILESDIR}/${P}-libressl.patch" +) + +pkg_setup() { + linux-info_pkg_setup +} + +src_prepare() { + default + eautoreconf + + if use test; then + cp "${DISTDIR}/mock_msg.h" tests/unit_tests/${PN} || die + fi +} + +src_configure() { + use static && append-ldflags -Xcompiler -static + SYSTEMD_UNIT_DIR=$(systemd_get_systemunitdir) \ + TMPFILES_DIR="/usr/lib/tmpfiles.d" \ + IFCONFIG=/bin/ifconfig \ + ROUTE=/bin/route \ + econf \ + $(usex mbedtls '--with-crypto-library=mbedtls' '') \ + $(use_enable inotify async-push) \ + $(use_enable ssl crypto) \ + $(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) \ + $(use_enable test tests) \ + $(use_enable systemd) +} + +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 + insinto /usr/share/doc/${PF}/examples + doins -r sample contrib + fi +} + +pkg_postinst() { + # Add openvpn user so openvpn servers can drop privs + # Clients should run as root so they can change ip addresses, + # dns information and other such things. + enewgroup openvpn + enewuser openvpn "" "" "" openvpn + + 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 +} diff --git a/net-vpn/openvpn/openvpn-9999.ebuild b/net-vpn/openvpn/openvpn-9999.ebuild index eb65ce756e96..8ad3d42ffc35 100644 --- a/net-vpn/openvpn/openvpn-9999.ebuild +++ b/net-vpn/openvpn/openvpn-9999.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=6 @@ -17,11 +17,8 @@ KEYWORDS="" IUSE="down-root examples inotify iproute2 libressl lz4 +lzo mbedtls pam" IUSE+=" pkcs11 +plugins selinux +ssl static systemd test userland_BSD" -REQUIRED_USE="static? ( !plugins !pkcs11 ) +REQUIRED_USE="static? ( !inotify !plugins !pkcs11 ) lzo? ( !lz4 ) - pkcs11? ( ssl ) - mbedtls? ( ssl !libressl ) - pkcs11? ( ssl ) !plugins? ( !pam !down-root ) inotify? ( plugins )" @@ -50,7 +47,7 @@ RDEPEND="${CDEPEND} CONFIG_CHECK="~TUN" PATCHES=( - "${FILESDIR}/${PN}-external-cmocka.patch" + "${FILESDIR}/${PN}-2.5-external-cmocka.patch" ) pkg_setup() { |