summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2020-08-15 01:57:39 +0200
committerThomas Deutschmann <whissi@gentoo.org>2020-08-15 01:57:55 +0200
commitf880165f3ad8531f8b185108094f46a47c9e2fb4 (patch)
tree01f9e4c6821a0a55b56f6a84ad0c25c111937df8 /app-crypt
parentpackage.mask: drop mask on libressl-3.2.0 (diff)
downloadgentoo-f880165f3ad8531f8b185108094f46a47c9e2fb4.tar.gz
gentoo-f880165f3ad8531f8b185108094f46a47c9e2fb4.tar.bz2
gentoo-f880165f3ad8531f8b185108094f46a47c9e2fb4.zip
app-crypt/gnupg: fix dirmngr for non-IPv6 enabled hosts
Package-Manager: Portage-3.0.2, Repoman-2.3.23 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'app-crypt')
-rw-r--r--app-crypt/gnupg/files/gnupg-2.2.20-fix-dirmngr-for-non-ipv6-enabled-hosts.patch35
-rw-r--r--app-crypt/gnupg/gnupg-2.2.20-r1.ebuild (renamed from app-crypt/gnupg/gnupg-2.2.20.ebuild)1
2 files changed, 36 insertions, 0 deletions
diff --git a/app-crypt/gnupg/files/gnupg-2.2.20-fix-dirmngr-for-non-ipv6-enabled-hosts.patch b/app-crypt/gnupg/files/gnupg-2.2.20-fix-dirmngr-for-non-ipv6-enabled-hosts.patch
new file mode 100644
index 000000000000..14a1913b3a01
--- /dev/null
+++ b/app-crypt/gnupg/files/gnupg-2.2.20-fix-dirmngr-for-non-ipv6-enabled-hosts.patch
@@ -0,0 +1,35 @@
+From 109d16e8f644da97ed9c00e6f9010a53097f587a Mon Sep 17 00:00:00 2001
+From: NIIBE Yutaka <gniibe@fsij.org>
+Date: Mon, 13 Jul 2020 10:00:58 +0900
+Subject: [PATCH] dirmngr: Handle EAFNOSUPPORT at connect_server.
+
+* dirmngr/http.c (connect_server): Skip server with EAFNOSUPPORT.
+
+--
+
+GnuPG-bug-id: 4977
+Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
+---
+ dirmngr/http.c | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/dirmngr/http.c b/dirmngr/http.c
+index f26675f9b..50b9b732b 100644
+--- a/dirmngr/http.c
++++ b/dirmngr/http.c
+@@ -3005,6 +3005,15 @@ connect_server (ctrl_t ctrl, const char *server, unsigned short port,
+ sock = my_sock_new_for_addr (ai->addr, ai->socktype, ai->protocol);
+ if (sock == ASSUAN_INVALID_FD)
+ {
++ if (errno == EAFNOSUPPORT)
++ {
++ if (ai->family == AF_INET)
++ v4_valid = 0;
++ if (ai->family == AF_INET6)
++ v6_valid = 0;
++ continue;
++ }
++
+ err = gpg_err_make (default_errsource,
+ gpg_err_code_from_syserror ());
+ log_error ("error creating socket: %s\n", gpg_strerror (err));
diff --git a/app-crypt/gnupg/gnupg-2.2.20.ebuild b/app-crypt/gnupg/gnupg-2.2.20-r1.ebuild
index 35dc9274af97..ec52f6640695 100644
--- a/app-crypt/gnupg/gnupg-2.2.20.ebuild
+++ b/app-crypt/gnupg/gnupg-2.2.20-r1.ebuild
@@ -51,6 +51,7 @@ DOCS=(
PATCHES=(
"${FILESDIR}/${PN}-2.1.20-gpgscm-Use-shorter-socket-path-lengts-to-improve-tes.patch"
+ "${FILESDIR}/${PN}-2.2.20-fix-dirmngr-for-non-ipv6-enabled-hosts.patch"
)
src_prepare() {