[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/mbe

[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 = SSL_CTX_get0_c

[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()  {