public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-vpn/openvpn/, net-vpn/openvpn/files/
@ 2018-04-16 17:31 Jason Donenfeld
  0 siblings, 0 replies; 5+ messages in thread
From: Jason Donenfeld @ 2018-04-16 17:31 UTC (permalink / raw
  To: gentoo-commits

commit:     5788ebc0a13f19bb93a49f2f9b8d10902cb0fcc1
Author:     Jason A. Donenfeld <zx2c4 <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 16 17:29:55 2018 +0000
Commit:     Jason Donenfeld <zx2c4 <AT> gentoo <DOT> org>
CommitDate: Mon Apr 16 17:30:20 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5788ebc0

net-vpn/openvpn: fix compilation with libressl

Package-Manager: Portage-2.3.28, Repoman-2.3.9

 .../files/openvpn-2.4.5-libressl-macro-fix.patch   | 63 ++++++++++++++++++++++
 net-vpn/openvpn/openvpn-2.4.5.ebuild               |  1 +
 2 files changed, 64 insertions(+)

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
new file mode 100644
index 00000000000..13b97600952
--- /dev/null
+++ b/net-vpn/openvpn/files/openvpn-2.4.5-libressl-macro-fix.patch
@@ -0,0 +1,63 @@
+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 <openssl/ssl.h>]]
++
++	)
+ 
+ 	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/openvpn-2.4.5.ebuild b/net-vpn/openvpn/openvpn-2.4.5.ebuild
index 7143fb14c09..d93cd5da7e5 100644
--- a/net-vpn/openvpn/openvpn-2.4.5.ebuild
+++ b/net-vpn/openvpn/openvpn-2.4.5.ebuild
@@ -49,6 +49,7 @@ CONFIG_CHECK="~TUN"
 
 PATCHES=(
 	"${FILESDIR}/${PN}-external-cmocka.patch"
+	"${FILESDIR}/${P}-libressl-macro-fix.patch"
 )
 
 pkg_setup()  {


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

* [gentoo-commits] repo/gentoo:master commit in: net-vpn/openvpn/, net-vpn/openvpn/files/
@ 2019-02-24  0:51 Aaron Bauman
  0 siblings, 0 replies; 5+ messages in thread
From: Aaron Bauman @ 2019-02-24  0:51 UTC (permalink / raw
  To: gentoo-commits

commit:     f52b8e80566cb783ec05e419c11a1b604b645399
Author:     Stefan Strogin <stefan.strogin <AT> gmail <DOT> com>
AuthorDate: Sat Feb 23 18:23:12 2019 +0000
Commit:     Aaron Bauman <bman <AT> gentoo <DOT> org>
CommitDate: Sun Feb 24 00:51:34 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f52b8e80

net-vpn/openvpn: add patch to fix build with LibreSSL

Closes: https://bugs.gentoo.org/678604
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Stefan Strogin <stefan.strogin <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/11145
Signed-off-by: Aaron Bauman <bman <AT> gentoo.org>

 net-vpn/openvpn/files/openvpn-2.4.7-libressl.patch | 49 ++++++++++++++++++++++
 ...penvpn-2.4.7.ebuild => openvpn-2.4.7-r1.ebuild} |  1 +
 2 files changed, 50 insertions(+)

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 00000000000..210189cd4d4
--- /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/openvpn-2.4.7.ebuild b/net-vpn/openvpn/openvpn-2.4.7-r1.ebuild
similarity index 99%
rename from net-vpn/openvpn/openvpn-2.4.7.ebuild
rename to net-vpn/openvpn/openvpn-2.4.7-r1.ebuild
index 486507300fe..0ae13d41d8c 100644
--- a/net-vpn/openvpn/openvpn-2.4.7.ebuild
+++ b/net-vpn/openvpn/openvpn-2.4.7-r1.ebuild
@@ -50,6 +50,7 @@ CONFIG_CHECK="~TUN"
 PATCHES=(
 	"${FILESDIR}/${PN}-external-cmocka.patch"
 	"${FILESDIR}/${PN}-2.4.5-libressl-macro-fix.patch"
+	"${FILESDIR}/${P}-libressl.patch"
 )
 
 pkg_setup()  {


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

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

commit:     c16af66cd6e5903520a80e73c6f594449e654a5f
Author:     Stefan Strogin <stefan.strogin <AT> gmail <DOT> com>
AuthorDate: Mon Mar  4 20:24:24 2019 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Wed Mar 13 00:43:18 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c16af66c

net-vpn/openvpn: update LibreSSL patch to accepted upstream

Bug: https://bugs.gentoo.org/678604
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Stefan Strogin <stefan.strogin <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/11260
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>

 net-vpn/openvpn/files/openvpn-2.4.7-libressl.patch | 133 +++++++++++++++++----
 ...vpn-2.4.7-r1.ebuild => openvpn-2.4.7-r2.ebuild} |   0
 2 files changed, 113 insertions(+), 20 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 210189cd4d4..414f132b336 100644
--- a/net-vpn/openvpn/files/openvpn-2.4.7-libressl.patch
+++ b/net-vpn/openvpn/files/openvpn-2.4.7-libressl.patch
@@ -1,49 +1,142 @@
-From 4faf695e3c42a81131c2aae96c4a60228aa237a5 Mon Sep 17 00:00:00 2001
+From a47508606be2c6359d4b27c3b65b72dfe4786222 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
+Date: Mon, 25 Feb 2019 20:35:31 +0200
+Subject: [PATCH] Use correct ifdefs for LibreSSL support
 
-TLS 1.3 is not ready yet in LibreSSL.
-Also SSL_get1_supported_ciphers() has been just added into master (not yet
-released).
+- 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.
 
-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 | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
+ src/openvpn/ssl_openssl.c | 33 +++++++++++++++++++++------------
+ 1 file changed, 21 insertions(+), 12 deletions(-)
 
 diff --git a/src/openvpn/ssl_openssl.c b/src/openvpn/ssl_openssl.c
-index a78dae99..6a8fcef3 100644
+index ddb78da7..8bcebac4 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)
+@@ -465,7 +465,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,
++#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,
          crypto_msg(M_FATAL, "Cannot create SSL_CTX object");
      }
  
 -#if (OPENSSL_VERSION_NUMBER >= 0x1010100fL)
-+#if (OPENSSL_VERSION_NUMBER >= 0x1010100fL && !defined(LIBRESSL_VERSION_NUMBER))
++#if defined(TLS1_3_VERSION)
      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,
+@@ -2019,7 +2027,8 @@ 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)
++#if (OPENSSL_VERSION_NUMBER < 0x1010000fL) || \
++    (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER <= 0x2090000fL)
      STACK_OF(SSL_CIPHER) *sk = SSL_get_ciphers(ssl);
  #else
      STACK_OF(SSL_CIPHER) *sk = SSL_get1_supported_ciphers(ssl);
 -- 
-2.20.1
+2.21.0
 

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


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

* [gentoo-commits] repo/gentoo:master commit in: net-vpn/openvpn/, net-vpn/openvpn/files/
@ 2020-11-26  2:10 Patrick McLean
  0 siblings, 0 replies; 5+ messages in thread
From: Patrick McLean @ 2020-11-26  2:10 UTC (permalink / raw
  To: gentoo-commits

commit:     754719bf31995aef24556009bc2a422262655bad
Author:     Patrick McLean <patrick.mclean <AT> sony <DOT> com>
AuthorDate: Thu Nov 26 02:10:37 2020 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Thu Nov 26 02:10:51 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=754719bf

net-vpn/openvpn-2.5.0-r1: Add patch to fix libressl (bug #651228)

Closes: https://bugs.gentoo.org/651228
Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-3.0.10, Repoman-3.0.2
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>

 .../files/openvpn-2.5.0-auth-pam-missing-header.patch        | 12 ++++++++++++
 net-vpn/openvpn/openvpn-2.5.0-r1.ebuild                      |  5 ++++-
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/net-vpn/openvpn/files/openvpn-2.5.0-auth-pam-missing-header.patch b/net-vpn/openvpn/files/openvpn-2.5.0-auth-pam-missing-header.patch
new file mode 100644
index 00000000000..2e48bd6b387
--- /dev/null
+++ b/net-vpn/openvpn/files/openvpn-2.5.0-auth-pam-missing-header.patch
@@ -0,0 +1,12 @@
+diff --git a/src/plugins/auth-pam/auth-pam.c b/src/plugins/auth-pam/auth-pam.c
+index f537652e..29306310 100644
+--- a/src/plugins/auth-pam/auth-pam.c
++++ b/src/plugins/auth-pam/auth-pam.c
+@@ -47,6 +47,7 @@
+ #include <fcntl.h>
+ #include <signal.h>
+ #include <syslog.h>
++#include <limits.h>
+ #include "utils.h"
+ 
+ #include <openvpn-plugin.h>

diff --git a/net-vpn/openvpn/openvpn-2.5.0-r1.ebuild b/net-vpn/openvpn/openvpn-2.5.0-r1.ebuild
index 35f18565020..575fb576481 100644
--- a/net-vpn/openvpn/openvpn-2.5.0-r1.ebuild
+++ b/net-vpn/openvpn/openvpn-2.5.0-r1.ebuild
@@ -46,9 +46,12 @@ RDEPEND="${CDEPEND}
 	selinux? ( sec-policy/selinux-openvpn )
 "
 
-CONFIG_CHECK="~TUN"
+PATCHES=(
+	"${FILESDIR}/openvpn-2.5.0-auth-pam-missing-header.patch"
+)
 
 pkg_setup() {
+	local CONFIG_CHECK="~TUN"
 	linux-info_pkg_setup
 }
 


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

* [gentoo-commits] repo/gentoo:master commit in: net-vpn/openvpn/, net-vpn/openvpn/files/
@ 2023-03-11 16:26 Sam James
  0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2023-03-11 16:26 UTC (permalink / raw
  To: gentoo-commits

commit:     da23c443933f51b4a9fd9ff98175f804dc52af37
Author:     Azamat H. Hackimov <azamat.hackimov <AT> gmail <DOT> com>
AuthorDate: Mon Feb 20 14:35:51 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Mar 11 16:25:50 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=da23c443

net-vpn/openvpn: fix crushing multiple instances

In environment with multiple openvpn's instances if one of them get
crushed, trying to restart it will result to stoping ALL of other
openvpn instances. Introduced `--config "${VPNCONF}"` option to prevent
it as suggested by Zhixu Liu.

Closes: https://bugs.gentoo.org/829949
Suggested-by: Zhixu Liu <zhixu.liu <AT> gmail.com>
Signed-off-by: Azamat H. Hackimov <azamat.hackimov <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/29685
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-vpn/openvpn/files/openvpn-2.1.init                               | 5 +++--
 net-vpn/openvpn/{openvpn-2.5.2-r2.ebuild => openvpn-2.5.2-r3.ebuild} | 0
 net-vpn/openvpn/{openvpn-2.5.6.ebuild => openvpn-2.5.6-r1.ebuild}    | 0
 net-vpn/openvpn/{openvpn-2.5.7.ebuild => openvpn-2.5.7-r1.ebuild}    | 0
 4 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/net-vpn/openvpn/files/openvpn-2.1.init b/net-vpn/openvpn/files/openvpn-2.1.init
index ba05689a1e09..3af33f5e6392 100644
--- a/net-vpn/openvpn/files/openvpn-2.1.init
+++ b/net-vpn/openvpn/files/openvpn-2.1.init
@@ -1,5 +1,5 @@
 #!/sbin/openrc-run
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 VPNDIR=${VPNDIR:-/etc/openvpn}
@@ -126,7 +126,8 @@ stop() {
 
 	ebegin "Stopping ${SVCNAME}"
 	start-stop-daemon --stop --quiet \
-		--exec /usr/sbin/openvpn --pidfile "${VPNPID}"
+		--exec /usr/sbin/openvpn --pidfile "${VPNPID}" \
+		-- --config "${VPNCONF}"
 	eend $?
 }
 

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

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

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


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

end of thread, other threads:[~2023-03-11 16:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-11 16:26 [gentoo-commits] repo/gentoo:master commit in: net-vpn/openvpn/, net-vpn/openvpn/files/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2020-11-26  2:10 Patrick McLean
2019-03-13  0:43 Patrick McLean
2019-02-24  0:51 Aaron Bauman
2018-04-16 17:31 Jason Donenfeld

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