public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-vpn/openvpn/files/, net-vpn/openvpn/
@ 2019-03-02 13:45 Andreas Sturmlechner
  0 siblings, 0 replies; 3+ messages in thread
From: Andreas Sturmlechner @ 2019-03-02 13:45 UTC (permalink / raw
  To: gentoo-commits

commit:     b2f0b933b0eae84c4160776aabc7e5f18c1cc07c
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat Mar  2 13:26:38 2019 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Mar  2 13:44:53 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b2f0b933

net-vpn/openvpn: Fix external-cmocka.patch

Maintainer-timeout commit.

Thanks-to: techno <AT> fastmail.nl
Closes: https://bugs.gentoo.org/672542
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../files/openvpn-2.5-external-cmocka.patch        | 65 ++++++++++++++++++++++
 net-vpn/openvpn/openvpn-9999.ebuild                |  4 +-
 2 files changed, 67 insertions(+), 2 deletions(-)

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 00000000000..d339dcd558b
--- /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-9999.ebuild b/net-vpn/openvpn/openvpn-9999.ebuild
index eb65ce756e9..66a7682edf9 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
@@ -50,7 +50,7 @@ RDEPEND="${CDEPEND}
 CONFIG_CHECK="~TUN"
 
 PATCHES=(
-	"${FILESDIR}/${PN}-external-cmocka.patch"
+	"${FILESDIR}/${PN}-2.5-external-cmocka.patch"
 )
 
 pkg_setup()  {


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-vpn/openvpn/files/, net-vpn/openvpn/
@ 2019-03-13 21:53 Patrick McLean
  0 siblings, 0 replies; 3+ messages in thread
From: Patrick McLean @ 2019-03-13 21:53 UTC (permalink / raw
  To: gentoo-commits

commit:     5d0eadbc6aabbd869d57e042ab41563e888e6e2c
Author:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 13 21:51:45 2019 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Wed Mar 13 21:53:23 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5d0eadbc

net-vpn/openvpn: Revert LibreSSL patch (bug #680184)

This reverts commit c16af66cd6e5903520a80e73c6f594449e654a5f.

The patch doesn't apply

Closes: https://bugs.gentoo.org/680184
Signed-off-By: Patrick McLean <chutzpah <AT> gentoo.org>

 net-vpn/openvpn/files/openvpn-2.4.7-libressl.patch | 133 ++++-----------------
 ...vpn-2.4.7-r2.ebuild => openvpn-2.4.7-r1.ebuild} |   0
 2 files changed, 20 insertions(+), 113 deletions(-)

diff --git a/net-vpn/openvpn/files/openvpn-2.4.7-libressl.patch b/net-vpn/openvpn/files/openvpn-2.4.7-libressl.patch
index 414f132b336..210189cd4d4 100644
--- a/net-vpn/openvpn/files/openvpn-2.4.7-libressl.patch
+++ b/net-vpn/openvpn/files/openvpn-2.4.7-libressl.patch
@@ -1,142 +1,49 @@
-From a47508606be2c6359d4b27c3b65b72dfe4786222 Mon Sep 17 00:00:00 2001
+From 4faf695e3c42a81131c2aae96c4a60228aa237a5 Mon Sep 17 00:00:00 2001
 From: Stefan Strogin <stefan.strogin@gmail.com>
-Date: Mon, 25 Feb 2019 20:35:31 +0200
-Subject: [PATCH] Use correct ifdefs for LibreSSL support
+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 there is a theoretical
-possibility of OpenSSL >=1.1.1 built without TLS 1.3 support.
-- EC_KEY_METHOD API and SSL_get1_supported_ciphers are added into LibreSSL
-master (not yet released in 2.9.0).
-- Some methods that are available since LibreSSL 2.7.0 were thrown away
-in ssl_openssl.c regardless of LibreSSL version. Use them with newer
-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>
-Acked-by: Arne Schwabe <arne@rfc2549.org>
-Message-Id: <20190225183531.27399-1-stefan.strogin@gmail.com>
-URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg18239.html
-Signed-off-by: Gert Doering <gert@greenie.muc.de>
-Upstream-Status: Accepted
-[https://github.com/OpenVPN/openvpn/commit/a47508606be2c6359d4b27c3b65b72dfe4786222]
 ---
- src/openvpn/ssl_openssl.c | 33 +++++++++++++++++++++------------
- 1 file changed, 21 insertions(+), 12 deletions(-)
+ 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 ddb78da7..8bcebac4 100644
+index a78dae99..6a8fcef3 100644
 --- a/src/openvpn/ssl_openssl.c
 +++ b/src/openvpn/ssl_openssl.c
-@@ -465,7 +465,7 @@ tls_ctx_restrict_ciphers_tls13(struct tls_root_ctx *ctx, const char *ciphers)
+@@ -459,7 +459,7 @@ tls_ctx_restrict_ciphers_tls13(struct tls_root_ctx *ctx, const char *ciphers)
          return;
      }
  
 -#if (OPENSSL_VERSION_NUMBER < 0x1010100fL)
-+#if !defined(TLS1_3_VERSION)
-     crypto_msg(M_WARN, "Not compiled with OpenSSL 1.1.1 or higher. "
-                "Ignoring TLS 1.3 only tls-ciphersuites '%s' setting.",
-                ciphers);
-@@ -526,7 +526,8 @@ tls_ctx_check_cert_time(const struct tls_root_ctx *ctx)
- 
-     ASSERT(ctx);
- 
--#if OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(LIBRESSL_VERSION_NUMBER)
-+#if (OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(LIBRESSL_VERSION_NUMBER)) \
-+    || LIBRESSL_VERSION_NUMBER >= 0x2070000fL
-     /* OpenSSL 1.0.2 and up */
-     cert = SSL_CTX_get0_certificate(ctx->ctx);
- #else
-@@ -561,7 +562,8 @@ tls_ctx_check_cert_time(const struct tls_root_ctx *ctx)
-     }
- 
- cleanup:
--#if OPENSSL_VERSION_NUMBER < 0x10002000L || defined(LIBRESSL_VERSION_NUMBER)
-+#if OPENSSL_VERSION_NUMBER < 0x10002000L \
-+    || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL)
-     SSL_free(ssl);
- #endif
-     return;
-@@ -1209,7 +1211,9 @@ err:
-     return 0;
- }
- 
--#if OPENSSL_VERSION_NUMBER > 0x10100000L && !defined(OPENSSL_NO_EC) && !defined(LIBRESSL_VERSION_NUMBER)
-+#if ((OPENSSL_VERSION_NUMBER > 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)) \
-+     || LIBRESSL_VERSION_NUMBER > 0x2090000fL) \
-+    && !defined(OPENSSL_NO_EC)
- 
- /* called when EC_KEY is destroyed */
- static void
-@@ -1331,7 +1335,7 @@ err:
-     }
-     return 0;
- }
--#endif /* OPENSSL_VERSION_NUMBER > 1.1.0 dev */
-+#endif /* OPENSSL_VERSION_NUMBER > 1.1.0 dev && !defined(OPENSSL_NO_EC) */
- 
- int
- tls_ctx_use_management_external_key(struct tls_root_ctx *ctx)
-@@ -1340,7 +1344,8 @@ tls_ctx_use_management_external_key(struct tls_root_ctx *ctx)
- 
-     ASSERT(NULL != ctx);
- 
--#if OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(LIBRESSL_VERSION_NUMBER)
-+#if (OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(LIBRESSL_VERSION_NUMBER)) \
-+    || LIBRESSL_VERSION_NUMBER >= 0x2070000fL
-     /* OpenSSL 1.0.2 and up */
-     X509 *cert = SSL_CTX_get0_certificate(ctx->ctx);
- #else
-@@ -1362,7 +1367,9 @@ tls_ctx_use_management_external_key(struct tls_root_ctx *ctx)
-             goto cleanup;
-         }
-     }
--#if OPENSSL_VERSION_NUMBER > 0x10100000L && !defined(OPENSSL_NO_EC) && !defined(LIBRESSL_VERSION_NUMBER)
-+#if ((OPENSSL_VERSION_NUMBER > 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)) \
-+     || LIBRESSL_VERSION_NUMBER > 0x2090000fL) \
-+    && !defined(OPENSSL_NO_EC)
-     else if (EVP_PKEY_id(pkey) == EVP_PKEY_EC)
-     {
-         if (!tls_ctx_use_external_ec_key(ctx, pkey))
-@@ -1375,17 +1382,18 @@ tls_ctx_use_management_external_key(struct tls_root_ctx *ctx)
-         crypto_msg(M_WARN, "management-external-key requires an RSA or EC certificate");
-         goto cleanup;
-     }
--#else  /* if OPENSSL_VERSION_NUMBER > 0x10100000L && !defined(OPENSSL_NO_EC) && !defined(LIBRESSL_VERSION_NUMBER) */
-+#else  /* OPENSSL_VERSION_NUMBER > 1.1.0 dev && !defined(OPENSSL_NO_EC) */
-     else
-     {
-         crypto_msg(M_WARN, "management-external-key requires an RSA certificate");
-         goto cleanup;
-     }
--#endif /* OPENSSL_VERSION_NUMBER > 1.1.0 dev */
-+#endif /* OPENSSL_VERSION_NUMBER > 1.1.0 dev && !defined(OPENSSL_NO_EC) */
- 
-     ret = 0;
- cleanup:
--#if OPENSSL_VERSION_NUMBER < 0x10002000L || defined(LIBRESSL_VERSION_NUMBER)
-+#if OPENSSL_VERSION_NUMBER < 0x10002000L \
-+    || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL)
-     if (ssl)
-     {
-         SSL_free(ssl);
-@@ -1998,7 +2006,7 @@ show_available_tls_ciphers_list(const char *cipher_list,
++#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 defined(TLS1_3_VERSION)
++#if (OPENSSL_VERSION_NUMBER >= 0x1010100fL && !defined(LIBRESSL_VERSION_NUMBER))
      if (tls13)
      {
          SSL_CTX_set_min_proto_version(tls_ctx.ctx, TLS1_3_VERSION);
-@@ -2019,7 +2027,8 @@ show_available_tls_ciphers_list(const char *cipher_list,
+@@ -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) && LIBRESSL_VERSION_NUMBER <= 0x2090000fL)
++#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.21.0
+2.20.1
 

diff --git a/net-vpn/openvpn/openvpn-2.4.7-r2.ebuild b/net-vpn/openvpn/openvpn-2.4.7-r1.ebuild
similarity index 100%
rename from net-vpn/openvpn/openvpn-2.4.7-r2.ebuild
rename to net-vpn/openvpn/openvpn-2.4.7-r1.ebuild


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-vpn/openvpn/files/, net-vpn/openvpn/
@ 2021-04-30 18:59 Thomas Deutschmann
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Deutschmann @ 2021-04-30 18:59 UTC (permalink / raw
  To: gentoo-commits

commit:     c86a486ae4e9a65297ef3d6025873a014a8a4c20
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 30 18:53:40 2021 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Fri Apr 30 18:58:35 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c86a486a

net-vpn/openvpn: update live ebuild

Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 .../openvpn-2.5.2-detect-python-rst2man.patch      | 14 ++++
 net-vpn/openvpn/openvpn-2.5.2.ebuild               | 19 ++++-
 net-vpn/openvpn/openvpn-9999.ebuild                | 94 ++++++++++++++--------
 3 files changed, 89 insertions(+), 38 deletions(-)

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 00000000000..d2060bbff4b
--- /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/openvpn-2.5.2.ebuild b/net-vpn/openvpn/openvpn-2.5.2.ebuild
index 83cf65e13cb..20cd58c60ee 100644
--- a/net-vpn/openvpn/openvpn-2.5.2.ebuild
+++ b/net-vpn/openvpn/openvpn-2.5.2.ebuild
@@ -6,12 +6,20 @@ 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"
 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="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
 
 IUSE="down-root examples inotify iproute2 +lz4 +lzo mbedtls +openssl"
 IUSE+=" pam pkcs11 +plugins selinux systemd test userland_BSD"
@@ -48,8 +56,13 @@ RDEPEND="${CDEPEND}
 	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.0-auth-pam-missing-header.patch
+	"${FILESDIR}"/openvpn-2.5.2-detect-python-rst2man.patch
 )
 
 pkg_setup() {

diff --git a/net-vpn/openvpn/openvpn-9999.ebuild b/net-vpn/openvpn/openvpn-9999.ebuild
index dd958ea3cc0..20cd58c60ee 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 +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,18 +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? ( >=dev-libs/openssl-0.9.8: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 )
 "
@@ -47,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
 }
 
@@ -59,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() {
@@ -107,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() {
@@ -157,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."
 }


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-04-30 18:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-02 13:45 [gentoo-commits] repo/gentoo:master commit in: net-vpn/openvpn/files/, net-vpn/openvpn/ Andreas Sturmlechner
  -- strict thread matches above, loose matches on Subject: below --
2019-03-13 21:53 Patrick McLean
2021-04-30 18:59 Thomas Deutschmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox