Control: tags 954587 + patch
Control: tags 954587 + pending

Dear maintainer,

I've prepared an NMU for yp-tools (versioned as 3.3-5.3) and
uploaded it to mentors for sponsoring. Please feel free to tell me if I
should remove it.

--
Regards
Sudip

diff -Nru yp-tools-3.3/debian/changelog yp-tools-3.3/debian/changelog
--- yp-tools-3.3/debian/changelog       2020-02-27 21:00:19.000000000 +0000
+++ yp-tools-3.3/debian/changelog       2020-03-30 18:58:41.000000000 +0100
@@ -1,3 +1,10 @@
+yp-tools (3.3-5.3) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTBFS for RES_USE_INET6. (Closes: #954587)
+
+ -- Sudip Mukherjee <sudipm.mukher...@gmail.com>  Mon, 30 Mar 2020 18:58:41 
+0100
+
 yp-tools (3.3-5.2) unstable; urgency=medium
 
   * Non-maintainer upload.
diff -Nru yp-tools-3.3/debian/patches/fix_inet6.patch 
yp-tools-3.3/debian/patches/fix_inet6.patch
--- yp-tools-3.3/debian/patches/fix_inet6.patch 1970-01-01 01:00:00.000000000 
+0100
+++ yp-tools-3.3/debian/patches/fix_inet6.patch 2020-03-30 18:58:41.000000000 
+0100
@@ -0,0 +1,60 @@
+Description: Fix FTBFS with RES_USE_INET6
+ RES_USE_INET6 has been removed from glibc and according to:
+ 
https://gitlab.com/freedesktop-sdk/mirrors/sourceware/glibc/-/commit/3f8b44be0a658266adff5ece1e4bc3ce097a5dbe
+ (_res.options & DEPRECATED_RES_USE_INET6) will return false.
+
+Author: Sudip Mukherjee <sudipm.mukher...@gmail.com>
+Bug-Debian: https://bugs.debian.org/954587
+
+---
+
+--- yp-tools-3.3.orig/nss_nis6/nis-hosts.c
++++ yp-tools-3.3/nss_nis6/nis-hosts.c
+@@ -229,8 +229,7 @@ _nss_nis6_gethostent_r (struct hostent *
+   __libc_lock_lock (lock);
+ 
+   status = internal_nis6_gethostent_r (host, buffer, buflen, errnop, h_errnop,
+-                      ((_res.options & RES_USE_INET6) ? AF_INET6 : AF_INET),
+-                      ((_res.options & RES_USE_INET6) ? AI_V4MAPPED : 0 ));
++                      AF_INET, 0 );
+ 
+   __libc_lock_unlock (lock);
+ 
+@@ -348,8 +347,7 @@ _nss_nis6_gethostbyname2_r (const char *
+     }
+ 
+   return internal_gethostbyname2_r (name, af, host, buffer, buflen, errnop,
+-                                  h_errnop,
+-                      ((_res.options & RES_USE_INET6) ? AI_V4MAPPED : 0));
++                                  h_errnop, 0);
+ }
+ 
+ 
+@@ -357,16 +355,6 @@ enum nss_status
+ _nss_nis6_gethostbyname_r (const char *name, struct hostent *host, char 
*buffer,
+                         size_t buflen, int *errnop, int *h_errnop)
+ {
+-  if (_res.options & RES_USE_INET6)
+-    {
+-      enum nss_status status;
+-
+-      status = internal_gethostbyname2_r (name, AF_INET6, host, buffer, 
buflen,
+-                                        errnop, h_errnop, AI_V4MAPPED);
+-      if (status == NSS_STATUS_SUCCESS)
+-      return status;
+-    }
+-
+   return internal_gethostbyname2_r (name, AF_INET, host, buffer, buflen,
+                                   errnop, h_errnop, 0);
+ }
+@@ -430,9 +418,7 @@ _nss_nis6_gethostbyaddr_r (const void *a
+     ++p;
+   free (result);
+ 
+-  int parse_res = parse_line (p, host, data, buflen, errnop, af,
+-                            ((_res.options & RES_USE_INET6)
+-                             ? AI_V4MAPPED : 0));
++  int parse_res = parse_line (p, host, data, buflen, errnop, af, 0);
+   if (__glibc_unlikely (parse_res < 1))
+     {
+       if (parse_res == -1)
diff -Nru yp-tools-3.3/debian/patches/series yp-tools-3.3/debian/patches/series
--- yp-tools-3.3/debian/patches/series  2020-02-27 20:57:30.000000000 +0000
+++ yp-tools-3.3/debian/patches/series  2020-03-23 22:19:26.000000000 +0000
@@ -4,3 +4,4 @@
 gcc7.patch
 do_ypcall_tr-cast-align.patch
 fix_ftbfs.patch
+fix_inet6.patch

Reply via email to