summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Fiskerstrand <k_f@gentoo.org>2017-01-04 13:43:27 +0100
committerKristian Fiskerstrand <k_f@gentoo.org>2017-01-04 13:43:42 +0100
commit25dbda5817c9281c11f214be4a7e24f3d1ff24ed (patch)
treef2217033d161754a9838d1f019c185da3a0bc3bb /app-crypt/gnupg
parentdev-util/ragel: verison bump 7.0.0.9 (diff)
downloadgentoo-25dbda5817c9281c11f214be4a7e24f3d1ff24ed.tar.gz
gentoo-25dbda5817c9281c11f214be4a7e24f3d1ff24ed.tar.bz2
gentoo-25dbda5817c9281c11f214be4a7e24f3d1ff24ed.zip
app-crypt/gnupg: Fix CNAME dns regression introduced in 2.1.17
Upstream patch to fix CNAME DNS regression introduced in released 2.1.17 relating to trailing dot in name. Package-Manager: Portage-2.3.3, Repoman-2.3.1
Diffstat (limited to 'app-crypt/gnupg')
-rw-r--r--app-crypt/gnupg/files/gnupg-2.1.17-dirmngr-Strip-root-zone-suffix-from-libdns-cname-res.patch46
-rw-r--r--app-crypt/gnupg/gnupg-2.1.17-r1.ebuild (renamed from app-crypt/gnupg/gnupg-2.1.17.ebuild)6
2 files changed, 49 insertions, 3 deletions
diff --git a/app-crypt/gnupg/files/gnupg-2.1.17-dirmngr-Strip-root-zone-suffix-from-libdns-cname-res.patch b/app-crypt/gnupg/files/gnupg-2.1.17-dirmngr-Strip-root-zone-suffix-from-libdns-cname-res.patch
new file mode 100644
index 000000000000..4b715028f678
--- /dev/null
+++ b/app-crypt/gnupg/files/gnupg-2.1.17-dirmngr-Strip-root-zone-suffix-from-libdns-cname-res.patch
@@ -0,0 +1,46 @@
+From b200e636ab20d2aa93d9f71f3789db5a04af0a56 Mon Sep 17 00:00:00 2001
+From: Werner Koch <wk@gnupg.org>
+Date: Mon, 2 Jan 2017 10:00:33 +0100
+Subject: [PATCH] dirmngr: Strip root zone suffix from libdns cname results.
+
+* dirmngr/dns-stuff.c (resolve_name_libdns): Strip trailing dot.
+(get_dns_cname_libdns): Ditto.
+--
+
+Signed-off-by: Werner Koch <wk@gnupg.org>
+---
+ dirmngr/dns-stuff.c | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/dirmngr/dns-stuff.c b/dirmngr/dns-stuff.c
+index a31b073..f2e1df9 100644
+--- a/dirmngr/dns-stuff.c
++++ b/dirmngr/dns-stuff.c
+@@ -732,6 +732,10 @@ resolve_name_libdns (const char *name, unsigned short port,
+ err = gpg_error_from_syserror ();
+ goto leave;
+ }
++ /* Libdns appends the root zone part which is problematic
++ * for most other functions - strip it. */
++ if (**r_canonname && (*r_canonname)[strlen (*r_canonname)-1] == '.')
++ (*r_canonname)[strlen (*r_canonname)-1] = 0;
+ }
+
+ dai = xtrymalloc (sizeof *dai + ent->ai_addrlen -1);
+@@ -1899,6 +1903,13 @@ get_dns_cname_libdns (const char *name, char **r_cname)
+ *r_cname = xtrystrdup (cname.host);
+ if (!*r_cname)
+ err = gpg_error_from_syserror ();
++ else
++ {
++ /* Libdns appends the root zone part which is problematic
++ * for most other functions - strip it. */
++ if (**r_cname && (*r_cname)[strlen (*r_cname)-1] == '.')
++ (*r_cname)[strlen (*r_cname)-1] = 0;
++ }
+
+ leave:
+ dns_free (ans);
+--
+2.8.1
+
diff --git a/app-crypt/gnupg/gnupg-2.1.17.ebuild b/app-crypt/gnupg/gnupg-2.1.17-r1.ebuild
index 62dc0e9b34d3..d682e326589d 100644
--- a/app-crypt/gnupg/gnupg-2.1.17.ebuild
+++ b/app-crypt/gnupg/gnupg-2.1.17-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@@ -50,7 +50,8 @@ S="${WORKDIR}/${MY_P}"
src_prepare() {
default
- epatch "${FILESDIR}/${PN}-2.1.16-gpgscm-Use-shorter-socket-path-lengts-to-improve-tes.patch"
+ epatch "${FILESDIR}/${PN}-2.1.16-gpgscm-Use-shorter-socket-path-lengts-to-improve-tes.patch" \
+ "${FILESDIR}/${P}-dirmngr-Strip-root-zone-suffix-from-libdns-cname-res.patch"
epatch_user
}
@@ -81,7 +82,6 @@ src_configure() {
--enable-gpg \
--enable-gpgsm \
--enable-large-secmem \
- --without-adns \
"${myconf[@]}" \
$(use_enable bzip2) \
$(use_enable gnutls) \