[gentoo-commits] repo/gentoo:master commit in: net-vpn/openvpn/files/, net-vpn/openvpn/

2021-04-30 Thread Thomas Deutschmann
commit: c86a486ae4e9a65297ef3d6025873a014a8a4c20
Author: Thomas Deutschmann  gentoo  org>
AuthorDate: Fri Apr 30 18:53:40 2021 +
Commit: Thomas Deutschmann  gentoo  org>
CommitDate: Fri Apr 30 18:58:35 2021 +
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  gentoo.org>

 .../openvpn-2.5.2-detect-python-rst2man.patch  | 14 
 net-vpn/openvpn/openvpn-2.5.2.ebuild   | 19 -
 net-vpn/openvpn/openvpn-.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 000..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} == "" ]]; 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} = "" ]]; 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-.ebuild 
b/net-vpn/openvpn/openvpn-.ebuild
index dd958ea3cc0..20cd58c60ee 100644
--- a/net-vpn/openvpn/openvpn-.ebuild
+++ b/net-vpn/openvpn/openvpn-.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} == "" ]]; 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:= 

[gentoo-commits] repo/gentoo:master commit in: net-vpn/openvpn/files/

2021-04-30 Thread Thomas Deutschmann
commit: 1f8b4d1f8eaeb437a12b4cbd520199596bf80c55
Author: Thomas Deutschmann  gentoo  org>
AuthorDate: Fri Apr 30 18:15:06 2021 +
Commit: Thomas Deutschmann  gentoo  org>
CommitDate: Fri Apr 30 18:58:34 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1f8b4d1f

net-vpn/openvpn: runscript: use /run instead of /var/run

Closes: https://bugs.gentoo.org/685316
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Thomas Deutschmann  gentoo.org>

 net-vpn/openvpn/files/openvpn-2.1.init | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/net-vpn/openvpn/files/openvpn-2.1.init 
b/net-vpn/openvpn/files/openvpn-2.1.init
index b42aa13d20d..ba05689a1e0 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"
 



[gentoo-commits] repo/gentoo:master commit in: net-vpn/openvpn/files/

2020-05-04 Thread William Hubbs
commit: 90d274133863371fb7ed0ff537f9fdc0384e4b59
Author: William Hubbs  gentoo  org>
AuthorDate: Mon May  4 13:24:51 2020 +
Commit: William Hubbs  gentoo  org>
CommitDate: Mon May  4 13:24:51 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=90d27413

net-vpn/openvpn: remove unused patches

Signed-off-by: William Hubbs  gentoo.org>

 .../files/openvpn-2.4.5-libressl-macro-fix.patch   | 63 -
 net-vpn/openvpn/files/openvpn-2.4.7-libressl.patch | 49 
 .../files/openvpn-2.5-external-cmocka.patch| 65 --
 .../openvpn/files/openvpn-external-cmocka.patch| 62 -
 4 files changed, 239 deletions(-)

diff --git a/net-vpn/openvpn/files/openvpn-2.4.5-libressl-macro-fix.patch 
b/net-vpn/openvpn/files/openvpn-2.4.5-libressl-macro-fix.patch
deleted file mode 100644
index 13b97600952..000
--- a/net-vpn/openvpn/files/openvpn-2.4.5-libressl-macro-fix.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-diff --git a/configure.ac b/configure.ac
-index 626b4dd..2a8e87f 100644
 a/configure.ac
-+++ b/configure.ac
-@@ -948,6 +948,18 @@ if test "${with_crypto_library}" = "openssl"; then
-   EC_GROUP_order_bits
-   ]
-   )
-+  AC_CHECK_DECLS(
-+  [
-+  SSL_CTX_get_min_proto_version,
-+  SSL_CTX_get_max_proto_version,
-+  SSL_CTX_set_min_proto_version,
-+  SSL_CTX_set_max_proto_version,
-+  ],
-+  ,
-+  ,
-+  [[#include ]]
-+
-+  )
- 
-   CFLAGS="${saved_CFLAGS}"
-   LIBS="${saved_LIBS}"
-diff --git a/src/openvpn/openssl_compat.h b/src/openvpn/openssl_compat.h
-index d375fab..340d452 100644
 a/src/openvpn/openssl_compat.h
-+++ b/src/openvpn/openssl_compat.h
-@@ -661,7 +661,7 @@ EC_GROUP_order_bits(const EC_GROUP *group)
- #define RSA_F_RSA_OSSL_PRIVATE_ENCRYPT   RSA_F_RSA_EAY_PRIVATE_ENCRYPT
- #endif
- 
--#ifndef SSL_CTX_get_min_proto_version
-+#if !HAVE_DECL_SSL_CTX_GET_MIN_PROTO_VERSION
- /** Return the min SSL protocol version currently enabled in the context.
-  *  If no valid version >= TLS1.0 is found, return 0. */
- static inline int
-@@ -684,7 +684,7 @@ SSL_CTX_get_min_proto_version(SSL_CTX *ctx)
- }
- #endif /* SSL_CTX_get_min_proto_version */
- 
--#ifndef SSL_CTX_get_max_proto_version
-+#if !HAVE_DECL_SSL_CTX_GET_MAX_PROTO_VERSION
- /** Return the max SSL protocol version currently enabled in the context.
-  *  If no valid version >= TLS1.0 is found, return 0. */
- static inline int
-@@ -707,7 +707,7 @@ SSL_CTX_get_max_proto_version(SSL_CTX *ctx)
- }
- #endif /* SSL_CTX_get_max_proto_version */
- 
--#ifndef SSL_CTX_set_min_proto_version
-+#if !HAVE_DECL_SSL_CTX_SET_MIN_PROTO_VERSION
- /** Mimics SSL_CTX_set_min_proto_version for OpenSSL < 1.1 */
- static inline int
- SSL_CTX_set_min_proto_version(SSL_CTX *ctx, long tls_ver_min)
-@@ -736,7 +736,7 @@ SSL_CTX_set_min_proto_version(SSL_CTX *ctx, long 
tls_ver_min)
- }
- #endif /* SSL_CTX_set_min_proto_version */
- 
--#ifndef SSL_CTX_set_max_proto_version
-+#if !HAVE_DECL_SSL_CTX_SET_MAX_PROTO_VERSION
- /** Mimics SSL_CTX_set_max_proto_version for OpenSSL < 1.1 */
- static inline int
- SSL_CTX_set_max_proto_version(SSL_CTX *ctx, long tls_ver_max)

diff --git a/net-vpn/openvpn/files/openvpn-2.4.7-libressl.patch 
b/net-vpn/openvpn/files/openvpn-2.4.7-libressl.patch
deleted file mode 100644
index 210189cd4d4..000
--- a/net-vpn/openvpn/files/openvpn-2.4.7-libressl.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 4faf695e3c42a81131c2aae96c4a60228aa237a5 Mon Sep 17 00:00:00 2001
-From: Stefan Strogin 
-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 

- 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 && 

[gentoo-commits] repo/gentoo:master commit in: net-vpn/openvpn/files/, net-vpn/openvpn/

2019-03-13 Thread Patrick McLean
commit: 5d0eadbc6aabbd869d57e042ab41563e888e6e2c
Author: Patrick McLean  gentoo  org>
AuthorDate: Wed Mar 13 21:51:45 2019 +
Commit: Patrick McLean  gentoo  org>
CommitDate: Wed Mar 13 21:53:23 2019 +
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  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 
-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 
-Acked-by: Arne Schwabe 
-Message-Id: <20190225183531.27399-1-stefan.stro...@gmail.com>
-URL: 
https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg18239.html
-Signed-off-by: Gert Doering 
-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 >= 0x207fL
- /* 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 < 
0x207fL)
- SSL_free(ssl);
- #endif
- return;
-@@ -1209,7 +1211,9 @@ err:
- return 0;
- }
- 
--#if OPENSSL_VERSION_NUMBER > 0x1010L && !defined(OPENSSL_NO_EC) && 
!defined(LIBRESSL_VERSION_NUMBER)
-+#if ((OPENSSL_VERSION_NUMBER > 0x1010L && 
!defined(LIBRESSL_VERSION_NUMBER)) \
-+ || LIBRESSL_VERSION_NUMBER > 0x209fL) \
-+&& !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 >= 0x207fL
- /* OpenSSL 1.0.2 and up */
- X509 *cert = 

[gentoo-commits] repo/gentoo:master commit in: net-vpn/openvpn/files/, net-vpn/openvpn/

2019-03-02 Thread Andreas Sturmlechner
commit: b2f0b933b0eae84c4160776aabc7e5f18c1cc07c
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Sat Mar  2 13:26:38 2019 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Sat Mar  2 13:44:53 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b2f0b933

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

Maintainer-timeout commit.

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

 .../files/openvpn-2.5-external-cmocka.patch| 65 ++
 net-vpn/openvpn/openvpn-.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 000..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-.ebuild 
b/net-vpn/openvpn/openvpn-.ebuild
index eb65ce756e9..66a7682edf9 100644
--- a/net-vpn/openvpn/openvpn-.ebuild
+++ b/net-vpn/openvpn/openvpn-.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()  {



[gentoo-commits] repo/gentoo:master commit in: net-vpn/openvpn/files/

2017-09-22 Thread Patrice Clement
commit: 7ac71c23e9da3c5bf8e5481e4e9b8015fa987cab
Author: Michael Mair-Keimberger  gmail  com>
AuthorDate: Wed Sep 20 12:35:25 2017 +
Commit: Patrice Clement  gentoo  org>
CommitDate: Fri Sep 22 13:57:13 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7ac71c23

net-vpn/openvpn: remove unused patch/file.

Closes: https://github.com/gentoo/gentoo/pull/5736

 .../openvpn/files/openvpn-2.4.0-fix-libressl.patch  | 21 -
 net-vpn/openvpn/files/openvpn.tmpfile   |  1 -
 2 files changed, 22 deletions(-)

diff --git a/net-vpn/openvpn/files/openvpn-2.4.0-fix-libressl.patch 
b/net-vpn/openvpn/files/openvpn-2.4.0-fix-libressl.patch
deleted file mode 100644
index 4c3aca5d5a9..000
--- a/net-vpn/openvpn/files/openvpn-2.4.0-fix-libressl.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff --git a/src/openvpn/ssl_openssl.c b/src/openvpn/ssl_openssl.c
-index 8266595..a889332 100644
 a/src/openvpn/ssl_openssl.c
-+++ b/src/openvpn/ssl_openssl.c
-@@ -508,10 +508,13 @@ tls_ctx_load_ecdh_params(struct tls_root_ctx *ctx, const 
char *curve_name
- const EC_GROUP *ecgrp = NULL;
- EVP_PKEY *pkey = NULL;
-
--/* Little hack to get private key ref from SSL_CTX, yay OpenSSL... */
--SSL ssl;
--ssl.cert = ctx->ctx->cert;
--pkey = SSL_get_privatekey();
-+SSL *ssl = SSL_new(ctx->ctx);
-+if (!ssl)
-+{
-+crypto_msg(M_FATAL, "SSL_new failed");
-+}
-+pkey = SSL_get_privatekey(ssl);
-+SSL_free(ssl);
-
- msg(D_TLS_DEBUG, "Extracting ECDH curve from private key");

diff --git a/net-vpn/openvpn/files/openvpn.tmpfile 
b/net-vpn/openvpn/files/openvpn.tmpfile
deleted file mode 100644
index d5fca71a00a..000
--- a/net-vpn/openvpn/files/openvpn.tmpfile
+++ /dev/null
@@ -1 +0,0 @@
-D /var/run/openvpn 0710 root openvpn -