[arch-commits] Commit in gnupg/trunk (PKGBUILD libdns.patch)

2016-12-23 Thread Gaëtan Bisson
Date: Friday, December 23, 2016 @ 21:29:02
  Author: bisson
Revision: 284534

update patch to upstream version

Modified:
  gnupg/trunk/PKGBUILD
  gnupg/trunk/libdns.patch

--+
 PKGBUILD |4 +--
 libdns.patch |   58 -
 2 files changed, 43 insertions(+), 19 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2016-12-23 16:11:38 UTC (rev 284533)
+++ PKGBUILD2016-12-23 21:29:02 UTC (rev 284534)
@@ -6,7 +6,7 @@
 
 pkgname=gnupg
 pkgver=2.1.17
-pkgrel=2
+pkgrel=3
 pkgdesc='Complete and free implementation of the OpenPGP standard'
 url='http://www.gnupg.org/'
 license=('GPL')
@@ -23,7 +23,7 @@
 
source=("https://gnupg.org/ftp/gcrypt/${pkgname}/${pkgname}-${pkgver}.tar.bz2"{,.sig}
 'libdns.patch')
 sha1sums=('d83ab893faab35f37ace772ca29b939e6a5aa6a7' 'SKIP'
-  '704c9dd4b88c5ba6a613b2e2ad4aef4fd3a52412')
+  '4217441481d2f89783d39f50eeda7d6984a01e6d')
 
 install=install
 

Modified: libdns.patch
===
--- libdns.patch2016-12-23 16:11:38 UTC (rev 284533)
+++ libdns.patch2016-12-23 21:29:02 UTC (rev 284534)
@@ -1,17 +1,38 @@
-diff -Naur old/dirmngr/dns-stuff.c new/dirmngr/dns-stuff.c
 old/dirmngr/dns-stuff.c2016-12-20 00:19:05.0 -1000
-+++ new/dirmngr/dns-stuff.c2016-12-22 21:14:41.123388787 -1000
-@@ -181,7 +181,9 @@
+From: NIIBE Yutaka 
+Date: Fri, 23 Dec 2016 07:05:01 + (+0900)
+Subject: dirmngr: Fix for --disable-libdns usage.
+X-Git-Url: 
http://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=commitdiff_plain;h=d26c51825e2255fe58305cbc1cd74fa43f80d93e
+
+dirmngr: Fix for --disable-libdns usage.
+
+* dirmngr/dns-stuff.c (enable_recursive_resolver, set_dns_nameserver)
+(reload_dns_stuff): Conditionalize with USE_LIBDNS.
+(get_h_errno_as_gpg_error): Map HOST_NOT_FOUND to GPG_ERR_NO_NAME.
+
+--
+
+get_dns_srv assumes error code of GPG_ERR_NO_NAME when no SRV record
+available.
+
+Signed-off-by: NIIBE Yutaka 
+GnuPG-bug-id: 2889
+---
+
+diff --git a/dirmngr/dns-stuff.c b/dirmngr/dns-stuff.c
+index 491fcce..a31b073 100644
+--- a/dirmngr/dns-stuff.c
 b/dirmngr/dns-stuff.c
+@@ -181,7 +181,9 @@ void
  enable_recursive_resolver (int yes)
  {
recursive_resolver = yes;
 +#ifdef USE_LIBDNS
libdns_reinit_pending = 1;
-+#endif /*USE_LIBDNS*/
++#endif
  }
  
  
-@@ -251,8 +253,10 @@
+@@ -251,8 +253,10 @@ set_dns_nameserver (const char *ipaddr)
strncpy (tor_nameserver, ipaddr? ipaddr : DEFAULT_NAMESERVER,
 sizeof tor_nameserver -1);
tor_nameserver[sizeof tor_nameserver -1] = 0;
@@ -18,11 +39,20 @@
 +#ifdef USE_LIBDNS
libdns_reinit_pending = 1;
libdns_tor_port = 0;  /* Start again with the default port.  */
-+#endif /*USE_LIBDNS*/
++#endif
  }
  
  
-@@ -534,15 +538,15 @@
+@@ -278,7 +282,7 @@ get_h_errno_as_gpg_error (void)
+ 
+   switch (h_errno)
+ {
+-case HOST_NOT_FOUND: ec = GPG_ERR_UNKNOWN_HOST; break;
++case HOST_NOT_FOUND: ec = GPG_ERR_NO_NAME; break;
+ case TRY_AGAIN:  ec = GPG_ERR_TRY_LATER; break;
+ case NO_RECOVERY:ec = GPG_ERR_SERVER_FAILED; break;
+ case NO_DATA:ec = GPG_ERR_NO_DATA; break;
+@@ -534,15 +538,17 @@ libdns_deinit (void)
  void
  reload_dns_stuff (int force)
  {
@@ -36,15 +66,9 @@
  }
else
  libdns_reinit_pending = 1;
-+#endif /*USE_LIBDNS*/
++#else
++  (void)force;
++#endif
  }
  
  
-@@ -1745,7 +1749,6 @@
- 
-   if (err)
- {
--  if (gpg_err_code (err) == GPG_ERR_NO_NAME)
- err = 0;
-   goto leave;
- }


[arch-commits] Commit in gnupg/trunk (PKGBUILD libdns.patch)

2016-12-22 Thread Gaëtan Bisson
Date: Friday, December 23, 2016 @ 07:20:38
  Author: bisson
Revision: 284518

fix FS#52234

Added:
  gnupg/trunk/libdns.patch
Modified:
  gnupg/trunk/PKGBUILD

--+
 PKGBUILD |   10 +++---
 libdns.patch |   50 ++
 2 files changed, 57 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2016-12-23 07:19:01 UTC (rev 284517)
+++ PKGBUILD2016-12-23 07:20:38 UTC (rev 284518)
@@ -6,7 +6,7 @@
 
 pkgname=gnupg
 pkgver=2.1.17
-pkgrel=1
+pkgrel=2
 pkgdesc='Complete and free implementation of the OpenPGP standard'
 url='http://www.gnupg.org/'
 license=('GPL')
@@ -20,8 +20,10 @@
   '46CC730865BB5C78EBABADCF04376F3EE0856959'
   '031EC2536E580D8EA286A9F22071B08A33BD3F06'
   'D238EA65D64C67ED4C3073F28A861B1C7EFD60D9')
-source=("https://gnupg.org/ftp/gcrypt/${pkgname}/${pkgname}-${pkgver}.tar.bz2"{,.sig})
-sha1sums=('d83ab893faab35f37ace772ca29b939e6a5aa6a7' 'SKIP')
+source=("https://gnupg.org/ftp/gcrypt/${pkgname}/${pkgname}-${pkgver}.tar.bz2"{,.sig}
+'libdns.patch')
+sha1sums=('d83ab893faab35f37ace772ca29b939e6a5aa6a7' 'SKIP'
+  '704c9dd4b88c5ba6a613b2e2ad4aef4fd3a52412')
 
 install=install
 
@@ -32,6 +34,7 @@
 prepare() {
cd "${srcdir}/${pkgname}-${pkgver}"
sed '/noinst_SCRIPTS = gpg-zip/c sbin_SCRIPTS += gpg-zip' -i 
tools/Makefile.in
+   patch -p1 -i ../libdns.patch
 }
 
 build() {
@@ -43,6 +46,7 @@
--libexecdir=/usr/lib/gnupg \
--enable-maintainer-mode \
--enable-symcryptrun \
+   --disable-libdns # FS#52234
 
make
 }

Added: libdns.patch
===
--- libdns.patch(rev 0)
+++ libdns.patch2016-12-23 07:20:38 UTC (rev 284518)
@@ -0,0 +1,50 @@
+diff -Naur old/dirmngr/dns-stuff.c new/dirmngr/dns-stuff.c
+--- old/dirmngr/dns-stuff.c2016-12-20 00:19:05.0 -1000
 new/dirmngr/dns-stuff.c2016-12-22 21:14:41.123388787 -1000
+@@ -181,7 +181,9 @@
+ enable_recursive_resolver (int yes)
+ {
+   recursive_resolver = yes;
++#ifdef USE_LIBDNS
+   libdns_reinit_pending = 1;
++#endif /*USE_LIBDNS*/
+ }
+ 
+ 
+@@ -251,8 +253,10 @@
+   strncpy (tor_nameserver, ipaddr? ipaddr : DEFAULT_NAMESERVER,
+sizeof tor_nameserver -1);
+   tor_nameserver[sizeof tor_nameserver -1] = 0;
++#ifdef USE_LIBDNS
+   libdns_reinit_pending = 1;
+   libdns_tor_port = 0;  /* Start again with the default port.  */
++#endif /*USE_LIBDNS*/
+ }
+ 
+ 
+@@ -534,15 +538,15 @@
+ void
+ reload_dns_stuff (int force)
+ {
++#ifdef USE_LIBDNS
+   if (force)
+ {
+-#ifdef USE_LIBDNS
+   libdns_deinit ();
+-#endif
+   libdns_reinit_pending = 0;
+ }
+   else
+ libdns_reinit_pending = 1;
++#endif /*USE_LIBDNS*/
+ }
+ 
+ 
+@@ -1745,7 +1749,6 @@
+ 
+   if (err)
+ {
+-  if (gpg_err_code (err) == GPG_ERR_NO_NAME)
+ err = 0;
+   goto leave;
+ }