unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#29970] core-updates: libtirpc, rpcbind, nfs-utils
@ 2018-01-04  0:28 Leo Famulari
  2018-01-04  0:30 ` [bug#29970] [PATCH 1/4] gnu: libtirpc: Update to 1.0.2 Leo Famulari
  0 siblings, 1 reply; 9+ messages in thread
From: Leo Famulari @ 2018-01-04  0:28 UTC (permalink / raw)
  To: 29970

[-- Attachment #1: Type: text/plain, Size: 155 bytes --]

Here are patches fixing build failures of libtirpc, rpcbind, and
nfs-utils on core-updates.

Note that this patch series introduces a new package, libnsl.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* [bug#29970] [PATCH 1/4] gnu: libtirpc: Update to 1.0.2.
  2018-01-04  0:28 [bug#29970] core-updates: libtirpc, rpcbind, nfs-utils Leo Famulari
@ 2018-01-04  0:30 ` Leo Famulari
  2018-01-04  0:30   ` [bug#29970] [PATCH 2/4] gnu: Add libnsl Leo Famulari
                     ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Leo Famulari @ 2018-01-04  0:30 UTC (permalink / raw)
  To: 29970

* gnu/packages/onc-rpc.scm (libtirpc): Update to 1.0.2.
[source]: Adjust patch list.
* gnu/packages/patches/libtirpc-CVE-2017-8779.patch: Delete file.
* gnu/packages/patches/libtirpc-missing-headers.patch: New file.
* gnu/local.mk (dist_patch_DATA): Adjust accordingly.
---
 gnu/local.mk                                       |   2 +-
 gnu/packages/onc-rpc.scm                           |   8 +-
 gnu/packages/patches/libtirpc-CVE-2017-8779.patch  | 263 ---------------------
 .../patches/libtirpc-missing-headers.patch         |  40 ++++
 4 files changed, 45 insertions(+), 268 deletions(-)
 delete mode 100644 gnu/packages/patches/libtirpc-CVE-2017-8779.patch
 create mode 100644 gnu/packages/patches/libtirpc-missing-headers.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index a9972a356..90b6ea6bb 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -824,7 +824,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/libtar-CVE-2013-4420.patch 		\
   %D%/packages/patches/libtasn1-CVE-2017-10790.patch		\
   %D%/packages/patches/libtheora-config-guess.patch		\
-  %D%/packages/patches/libtirpc-CVE-2017-8779.patch		\
+  %D%/packages/patches/libtirpc-missing-headers.patch		\
   %D%/packages/patches/libtool-skip-tests2.patch		\
   %D%/packages/patches/libusb-0.1-disable-tests.patch		\
   %D%/packages/patches/libusb-for-axoloti.patch			\
diff --git a/gnu/packages/onc-rpc.scm b/gnu/packages/onc-rpc.scm
index a76ac36ea..bd1b6f058 100644
--- a/gnu/packages/onc-rpc.scm
+++ b/gnu/packages/onc-rpc.scm
@@ -1,7 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2014, 2017 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2016 John Darrington <jmd@gnu.org>
-;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
+;;; Copyright © 2017, 2018 Leo Famulari <leo@famulari.name>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -30,16 +30,16 @@
 (define-public libtirpc
   (package
     (name "libtirpc")
-    (version "1.0.1")
+    (version "1.0.2")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://sourceforge/libtirpc/libtirpc/"
                                   version "/libtirpc-"
                                   version ".tar.bz2"))
-              (patches (search-patches "libtirpc-CVE-2017-8779.patch"))
+              (patches (search-patches "libtirpc-missing-headers.patch"))
               (sha256
                (base32
-                "17mqrdgsgp9m92pmq7bvr119svdg753prqqxmg4cnz5y657rfmji"))))
+                "1xchbxy0xql7yl7z4n1icj8r7dmly46i22fvm00vdjq64zlmqg3j"))))
     (build-system gnu-build-system)
     (arguments
      `(#:phases
diff --git a/gnu/packages/patches/libtirpc-CVE-2017-8779.patch b/gnu/packages/patches/libtirpc-CVE-2017-8779.patch
deleted file mode 100644
index 742e64df2..000000000
--- a/gnu/packages/patches/libtirpc-CVE-2017-8779.patch
+++ /dev/null
@@ -1,263 +0,0 @@
-Fix CVE-2017-8779:
-
-https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-8779
-
-Patch copied from the bug reporter's 3rd-party repository:
-
-https://github.com/guidovranken/rpcbomb/blob/master/libtirpc_patch.txt
-
-diff --git a/src/rpc_generic.c b/src/rpc_generic.c
-index 2f09a8f..589cbd5 100644
---- a/src/rpc_generic.c
-+++ b/src/rpc_generic.c
-@@ -615,6 +615,9 @@ __rpc_taddr2uaddr_af(int af, const struct netbuf *nbuf)
- 
- 	switch (af) {
- 	case AF_INET:
-+		if (nbuf->len < sizeof(*sin)) {
-+			return NULL;
-+		}
- 		sin = nbuf->buf;
- 		if (inet_ntop(af, &sin->sin_addr, namebuf, sizeof namebuf)
- 		    == NULL)
-@@ -626,6 +629,9 @@ __rpc_taddr2uaddr_af(int af, const struct netbuf *nbuf)
- 		break;
- #ifdef INET6
- 	case AF_INET6:
-+		if (nbuf->len < sizeof(*sin6)) {
-+			return NULL;
-+		}
- 		sin6 = nbuf->buf;
- 		if (inet_ntop(af, &sin6->sin6_addr, namebuf6, sizeof namebuf6)
- 		    == NULL)
-@@ -667,6 +673,8 @@ __rpc_uaddr2taddr_af(int af, const char *uaddr)
- 
- 	port = 0;
- 	sin = NULL;
-+	if (uaddr == NULL)
-+		return NULL;
- 	addrstr = strdup(uaddr);
- 	if (addrstr == NULL)
- 		return NULL;
-diff --git a/src/rpcb_prot.c b/src/rpcb_prot.c
-index 43fd385..a923c8e 100644
---- a/src/rpcb_prot.c
-+++ b/src/rpcb_prot.c
-@@ -41,6 +41,7 @@
- #include <rpc/types.h>
- #include <rpc/xdr.h>
- #include <rpc/rpcb_prot.h>
-+#include "rpc_com.h"
- 
- bool_t
- xdr_rpcb(xdrs, objp)
-@@ -53,13 +54,13 @@ xdr_rpcb(xdrs, objp)
- 	if (!xdr_u_int32_t(xdrs, &objp->r_vers)) {
- 		return (FALSE);
- 	}
--	if (!xdr_string(xdrs, &objp->r_netid, (u_int)~0)) {
-+	if (!xdr_string(xdrs, &objp->r_netid, RPC_MAXDATASIZE)) {
- 		return (FALSE);
- 	}
--	if (!xdr_string(xdrs, &objp->r_addr, (u_int)~0)) {
-+	if (!xdr_string(xdrs, &objp->r_addr, RPC_MAXDATASIZE)) {
- 		return (FALSE);
- 	}
--	if (!xdr_string(xdrs, &objp->r_owner, (u_int)~0)) {
-+	if (!xdr_string(xdrs, &objp->r_owner, RPC_MAXDATASIZE)) {
- 		return (FALSE);
- 	}
- 	return (TRUE);
-@@ -159,19 +160,19 @@ xdr_rpcb_entry(xdrs, objp)
- 	XDR *xdrs;
- 	rpcb_entry *objp;
- {
--	if (!xdr_string(xdrs, &objp->r_maddr, (u_int)~0)) {
-+	if (!xdr_string(xdrs, &objp->r_maddr, RPC_MAXDATASIZE)) {
- 		return (FALSE);
- 	}
--	if (!xdr_string(xdrs, &objp->r_nc_netid, (u_int)~0)) {
-+	if (!xdr_string(xdrs, &objp->r_nc_netid, RPC_MAXDATASIZE)) {
- 		return (FALSE);
- 	}
- 	if (!xdr_u_int32_t(xdrs, &objp->r_nc_semantics)) {
- 		return (FALSE);
- 	}
--	if (!xdr_string(xdrs, &objp->r_nc_protofmly, (u_int)~0)) {
-+	if (!xdr_string(xdrs, &objp->r_nc_protofmly, RPC_MAXDATASIZE)) {
- 		return (FALSE);
- 	}
--	if (!xdr_string(xdrs, &objp->r_nc_proto, (u_int)~0)) {
-+	if (!xdr_string(xdrs, &objp->r_nc_proto, RPC_MAXDATASIZE)) {
- 		return (FALSE);
- 	}
- 	return (TRUE);
-@@ -292,7 +293,7 @@ xdr_rpcb_rmtcallres(xdrs, p)
- 	bool_t dummy;
- 	struct r_rpcb_rmtcallres *objp = (struct r_rpcb_rmtcallres *)(void *)p;
- 
--	if (!xdr_string(xdrs, &objp->addr, (u_int)~0)) {
-+	if (!xdr_string(xdrs, &objp->addr, RPC_MAXDATASIZE)) {
- 		return (FALSE);
- 	}
- 	if (!xdr_u_int(xdrs, &objp->results.results_len)) {
-@@ -312,6 +313,11 @@ xdr_netbuf(xdrs, objp)
- 	if (!xdr_u_int32_t(xdrs, (u_int32_t *) &objp->maxlen)) {
- 		return (FALSE);
- 	}
-+
-+	if (objp->maxlen > RPC_MAXDATASIZE) {
-+		return (FALSE);
-+	}
-+
- 	dummy = xdr_bytes(xdrs, (char **)&(objp->buf),
- 			(u_int *)&(objp->len), objp->maxlen);
- 	return (dummy);
-diff --git a/src/rpcb_st_xdr.c b/src/rpcb_st_xdr.c
-index 08db745..28e6a48 100644
---- a/src/rpcb_st_xdr.c
-+++ b/src/rpcb_st_xdr.c
-@@ -37,6 +37,7 @@
- 
- 
- #include <rpc/rpc.h>
-+#include "rpc_com.h"
- 
- /* Link list of all the stats about getport and getaddr */
- 
-@@ -58,7 +59,7 @@ xdr_rpcbs_addrlist(xdrs, objp)
- 	    if (!xdr_int(xdrs, &objp->failure)) {
- 		return (FALSE);
- 	    }
--	    if (!xdr_string(xdrs, &objp->netid, (u_int)~0)) {
-+	    if (!xdr_string(xdrs, &objp->netid, RPC_MAXDATASIZE)) {
- 		return (FALSE);
- 	    }
- 
-@@ -109,7 +110,7 @@ xdr_rpcbs_rmtcalllist(xdrs, objp)
- 		IXDR_PUT_INT32(buf, objp->failure);
- 		IXDR_PUT_INT32(buf, objp->indirect);
- 	}
--	if (!xdr_string(xdrs, &objp->netid, (u_int)~0)) {
-+	if (!xdr_string(xdrs, &objp->netid, RPC_MAXDATASIZE)) {
- 		return (FALSE);
- 	}
- 	if (!xdr_pointer(xdrs, (char **)&objp->next,
-@@ -147,7 +148,7 @@ xdr_rpcbs_rmtcalllist(xdrs, objp)
- 		objp->failure = (int)IXDR_GET_INT32(buf);
- 		objp->indirect = (int)IXDR_GET_INT32(buf);
- 	}
--	if (!xdr_string(xdrs, &objp->netid, (u_int)~0)) {
-+	if (!xdr_string(xdrs, &objp->netid, RPC_MAXDATASIZE)) {
- 		return (FALSE);
- 	}
- 	if (!xdr_pointer(xdrs, (char **)&objp->next,
-@@ -175,7 +176,7 @@ xdr_rpcbs_rmtcalllist(xdrs, objp)
- 	if (!xdr_int(xdrs, &objp->indirect)) {
- 		return (FALSE);
- 	}
--	if (!xdr_string(xdrs, &objp->netid, (u_int)~0)) {
-+	if (!xdr_string(xdrs, &objp->netid, RPC_MAXDATASIZE)) {
- 		return (FALSE);
- 	}
- 	if (!xdr_pointer(xdrs, (char **)&objp->next,
-diff --git a/src/xdr.c b/src/xdr.c
-index f3fb9ad..b9a1558 100644
---- a/src/xdr.c
-+++ b/src/xdr.c
-@@ -42,8 +42,10 @@
- #include <stdlib.h>
- #include <string.h>
- 
-+#include <rpc/rpc.h>
- #include <rpc/types.h>
- #include <rpc/xdr.h>
-+#include <rpc/rpc_com.h>
- 
- typedef quad_t          longlong_t;     /* ANSI long long type */
- typedef u_quad_t        u_longlong_t;   /* ANSI unsigned long long type */
-@@ -53,7 +55,6 @@ typedef u_quad_t        u_longlong_t;   /* ANSI unsigned long long type */
-  */
- #define XDR_FALSE	((long) 0)
- #define XDR_TRUE	((long) 1)
--#define LASTUNSIGNED	((u_int) 0-1)
- 
- /*
-  * for unit alignment
-@@ -629,6 +630,7 @@ xdr_bytes(xdrs, cpp, sizep, maxsize)
- {
- 	char *sp = *cpp;  /* sp is the actual string pointer */
- 	u_int nodesize;
-+	bool_t ret, allocated = FALSE;
- 
- 	/*
- 	 * first deal with the length since xdr bytes are counted
-@@ -652,6 +654,7 @@ xdr_bytes(xdrs, cpp, sizep, maxsize)
- 		}
- 		if (sp == NULL) {
- 			*cpp = sp = mem_alloc(nodesize);
-+			allocated = TRUE;
- 		}
- 		if (sp == NULL) {
- 			warnx("xdr_bytes: out of memory");
-@@ -660,7 +663,14 @@ xdr_bytes(xdrs, cpp, sizep, maxsize)
- 		/* FALLTHROUGH */
- 
- 	case XDR_ENCODE:
--		return (xdr_opaque(xdrs, sp, nodesize));
-+		ret = xdr_opaque(xdrs, sp, nodesize);
-+		if ((xdrs->x_op == XDR_DECODE) && (ret == FALSE)) {
-+			if (allocated == TRUE) {
-+				free(sp);
-+				*cpp = NULL;
-+			}
-+		}
-+		return (ret);
- 
- 	case XDR_FREE:
- 		if (sp != NULL) {
-@@ -754,6 +764,7 @@ xdr_string(xdrs, cpp, maxsize)
- 	char *sp = *cpp;  /* sp is the actual string pointer */
- 	u_int size;
- 	u_int nodesize;
-+	bool_t ret, allocated = FALSE;
- 
- 	/*
- 	 * first deal with the length since xdr strings are counted-strings
-@@ -793,8 +804,10 @@ xdr_string(xdrs, cpp, maxsize)
- 	switch (xdrs->x_op) {
- 
- 	case XDR_DECODE:
--		if (sp == NULL)
-+		if (sp == NULL) {
- 			*cpp = sp = mem_alloc(nodesize);
-+			allocated = TRUE;
-+		}
- 		if (sp == NULL) {
- 			warnx("xdr_string: out of memory");
- 			return (FALSE);
-@@ -803,7 +816,14 @@ xdr_string(xdrs, cpp, maxsize)
- 		/* FALLTHROUGH */
- 
- 	case XDR_ENCODE:
--		return (xdr_opaque(xdrs, sp, size));
-+		ret = xdr_opaque(xdrs, sp, size);
-+		if ((xdrs->x_op == XDR_DECODE) && (ret == FALSE)) {
-+			if (allocated == TRUE) {
-+				free(sp);
-+				*cpp = NULL;
-+			}
-+		}
-+		return (ret);
- 
- 	case XDR_FREE:
- 		mem_free(sp, nodesize);
-@@ -823,7 +843,7 @@ xdr_wrapstring(xdrs, cpp)
- 	XDR *xdrs;
- 	char **cpp;
- {
--	return xdr_string(xdrs, cpp, LASTUNSIGNED);
-+	return xdr_string(xdrs, cpp, RPC_MAXDATASIZE);
- }
- 
- /*
diff --git a/gnu/packages/patches/libtirpc-missing-headers.patch b/gnu/packages/patches/libtirpc-missing-headers.patch
new file mode 100644
index 000000000..5a9671182
--- /dev/null
+++ b/gnu/packages/patches/libtirpc-missing-headers.patch
@@ -0,0 +1,40 @@
+Fix compilation failure with glibc 2.26 caused by missing type
+declarations:
+
+------
+xdr_sizeof.c: In function ‘x_inline’:
+xdr_sizeof.c:93:13: error: ‘uintptr_t’ undeclared (first use in this function)
+  if (len < (uintptr_t)xdrs->x_base) {
+------
+
+Patch copied from upstream source repository:
+
+http://git.linux-nfs.org/?p=steved/libtirpc.git;a=commit;h=acb9a37977cf0a9630eac74af9adebf35e38e719
+
+From acb9a37977cf0a9630eac74af9adebf35e38e719 Mon Sep 17 00:00:00 2001
+From: Thorsten Kukuk <kukuk@thkukuk.de>
+Date: Tue, 14 Nov 2017 10:39:08 -0500
+Subject: [PATCH] Include stdint.h from xdr_sizeof.c to avoid missing
+ declaration errors.
+
+Signed-off-by: Thorsten Kukuk <kukuk@suse.de>
+Signed-off-by: Steve Dickson <steved@redhat.com>
+---
+ src/xdr_sizeof.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/xdr_sizeof.c b/src/xdr_sizeof.c
+index d23fbd1..79d6707 100644
+--- a/src/xdr_sizeof.c
++++ b/src/xdr_sizeof.c
+@@ -39,6 +39,7 @@
+ #include <rpc/xdr.h>
+ #include <sys/types.h>
+ #include <stdlib.h>
++#include <stdint.h>
+ #include "un-namespace.h"
+ 
+ /* ARGSUSED */
+-- 
+1.8.3.1
+
-- 
2.15.1

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

* [bug#29970] [PATCH 2/4] gnu: Add libnsl.
  2018-01-04  0:30 ` [bug#29970] [PATCH 1/4] gnu: libtirpc: Update to 1.0.2 Leo Famulari
@ 2018-01-04  0:30   ` Leo Famulari
  2018-01-06 21:41     ` Marius Bakke
  2018-01-04  0:30   ` [bug#29970] [PATCH 3/4] gnu: rpcbind: Build with libnsl Leo Famulari
                     ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: Leo Famulari @ 2018-01-04  0:30 UTC (permalink / raw)
  To: 29970

* gnu/packages/onc-rpc.scm (libnsl): New variable.
---
 gnu/packages/onc-rpc.scm | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/gnu/packages/onc-rpc.scm b/gnu/packages/onc-rpc.scm
index bd1b6f058..38f2f5a1d 100644
--- a/gnu/packages/onc-rpc.scm
+++ b/gnu/packages/onc-rpc.scm
@@ -23,6 +23,8 @@
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (gnu packages)
+  #:use-module (gnu packages autotools)
+  #:use-module (gnu packages gettext)
   #:use-module (gnu packages kerberos)
   #:use-module (gnu packages pkg-config)
   #:use-module (guix build-system gnu))
@@ -95,3 +97,40 @@ IPv4 and IPv6.  ONC RPC is notably used by the network file system (NFS).")
 universal addresses.")
     (license bsd-3)))
 
+
+(define-public libnsl
+  (package
+    (name "libnsl")
+    (version "1.2.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/thkukuk/libnsl/archive/v"
+                                  version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1y6kmxmv1difzvdhx7grqzw0j2v2b74mg4kjb803m8jcgkqqx8m5"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'bootstrap
+           (lambda _
+             (invoke "sh" "autogen.sh"))))))
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("gettext" ,gettext-minimal)
+       ("libtool" ,libtool)
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("libtirpc" ,libtirpc)))
+    (synopsis "Public client interface for NIS(YP) and NIS+")
+    (description "Libnsl is the public client interface for the Network
+Information Service / Yellow Pages (NIS/YP) and NIS+.  It includes IPv6
+support.  This code was part of glibc < 2.26, but is still required by
+some applications.  Building glibc with '--enable-obsolete-nsl' will
+cause the libnsl headers and NIS+ name service modules to be included in
+glibc.")
+    (home-page "https://github.com/thkukuk/libnsl")
+    (license lgpl2.1+)))
-- 
2.15.1

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

* [bug#29970] [PATCH 3/4] gnu: rpcbind: Build with libnsl.
  2018-01-04  0:30 ` [bug#29970] [PATCH 1/4] gnu: libtirpc: Update to 1.0.2 Leo Famulari
  2018-01-04  0:30   ` [bug#29970] [PATCH 2/4] gnu: Add libnsl Leo Famulari
@ 2018-01-04  0:30   ` Leo Famulari
  2018-01-06 21:44     ` Marius Bakke
  2018-01-04  0:30   ` [bug#29970] [PATCH 4/4] gnu: nfs-utils: Adapt to changes in glibc 2.26 Leo Famulari
  2018-01-06 21:34   ` [bug#29970] [PATCH 1/4] gnu: libtirpc: Update to 1.0.2 Marius Bakke
  3 siblings, 1 reply; 9+ messages in thread
From: Leo Famulari @ 2018-01-04  0:30 UTC (permalink / raw)
  To: 29970

* gnu/packages/onc-rpc.scm (rpcbind)[inputs]: Add libnsl.
---
 gnu/packages/onc-rpc.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/onc-rpc.scm b/gnu/packages/onc-rpc.scm
index 38f2f5a1d..07841e7e2 100644
--- a/gnu/packages/onc-rpc.scm
+++ b/gnu/packages/onc-rpc.scm
@@ -87,7 +87,8 @@ IPv4 and IPv6.  ONC RPC is notably used by the network file system (NFS).")
      `(#:configure-flags
        `("--with-systemdsystemunitdir=no" "--enable-warmstarts")))
     (inputs
-     `(("libtirpc" ,libtirpc)))
+     `(("libnsl" ,libnsl)
+       ("libtirpc" ,libtirpc)))
     (native-inputs
      `(("pkg-config" ,pkg-config)))
     (home-page "http://rpcbind.sourceforge.net/")
-- 
2.15.1

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

* [bug#29970] [PATCH 4/4] gnu: nfs-utils: Adapt to changes in glibc 2.26.
  2018-01-04  0:30 ` [bug#29970] [PATCH 1/4] gnu: libtirpc: Update to 1.0.2 Leo Famulari
  2018-01-04  0:30   ` [bug#29970] [PATCH 2/4] gnu: Add libnsl Leo Famulari
  2018-01-04  0:30   ` [bug#29970] [PATCH 3/4] gnu: rpcbind: Build with libnsl Leo Famulari
@ 2018-01-04  0:30   ` Leo Famulari
  2018-01-06 21:45     ` Marius Bakke
  2018-01-06 21:34   ` [bug#29970] [PATCH 1/4] gnu: libtirpc: Update to 1.0.2 Marius Bakke
  3 siblings, 1 reply; 9+ messages in thread
From: Leo Famulari @ 2018-01-04  0:30 UTC (permalink / raw)
  To: 29970

* gnu/packages/patches/nfs-utils-missing-headers.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/nfs.scm (nfs-utils)[source]: Use it.
---
 gnu/local.mk                                         |  1 +
 gnu/packages/nfs.scm                                 |  3 ++-
 gnu/packages/patches/nfs-utils-missing-headers.patch | 19 +++++++++++++++++++
 3 files changed, 22 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/nfs-utils-missing-headers.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 90b6ea6bb..963c24d21 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -891,6 +891,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/netsurf-longer-test-timeout.patch	\
   %D%/packages/patches/newsbeuter-CVE-2017-12904.patch		\
   %D%/packages/patches/newsbeuter-CVE-2017-14500.patch		\
+  %D%/packages/patches/nfs-utils-missing-headers.patch		\
   %D%/packages/patches/ngircd-handle-zombies.patch		\
   %D%/packages/patches/ninja-zero-mtime.patch			\
   %D%/packages/patches/nss-increase-test-timeout.patch		\
diff --git a/gnu/packages/nfs.scm b/gnu/packages/nfs.scm
index 28751c400..f6bb5b3b7 100644
--- a/gnu/packages/nfs.scm
+++ b/gnu/packages/nfs.scm
@@ -1,6 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2016 John Darrington <jmd@gnu.org>
-;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
+;;; Copyright © 2017, 2018 Leo Famulari <leo@famulari.name>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -47,6 +47,7 @@
              (uri (string-append
                    "mirror://kernel.org/linux/utils/nfs-utils/" version
                    "/nfs-utils-" version ".tar.xz"))
+             (patches (search-patches "nfs-utils-missing-headers.patch"))
              (sha256
               (base32
                "1vqrqzhg9nh2wj1icp7k8v9dibgnn521b45np79nnkmqf16bbbhg"))))
diff --git a/gnu/packages/patches/nfs-utils-missing-headers.patch b/gnu/packages/patches/nfs-utils-missing-headers.patch
new file mode 100644
index 000000000..7f0542836
--- /dev/null
+++ b/gnu/packages/patches/nfs-utils-missing-headers.patch
@@ -0,0 +1,19 @@
+Fix compilation failure with glibc 2.26 caused by missing type
+declarations:
+
+------
+rpc.c: In function ‘nsm_recv_getport’:
+rpc.c:469:13: error: ‘UINT16_MAX’ undeclared (first use in this function)
+  if (port > UINT16_MAX) {
+------
+
+--- a/support/nsm/rpc.c.orig	2016-08-03 20:25:15.000000000 +0200
++++ b/support/nsm/rpc.c	2017-08-26 07:41:11.884000000 +0200
+@@ -40,6 +40,7 @@
+ 
+ #include <time.h>
+ #include <stdbool.h>
++#include <stdint.h>
+ #include <string.h>
+ #include <unistd.h>
+ #include <fcntl.h>
-- 
2.15.1

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

* [bug#29970] [PATCH 1/4] gnu: libtirpc: Update to 1.0.2.
  2018-01-04  0:30 ` [bug#29970] [PATCH 1/4] gnu: libtirpc: Update to 1.0.2 Leo Famulari
                     ` (2 preceding siblings ...)
  2018-01-04  0:30   ` [bug#29970] [PATCH 4/4] gnu: nfs-utils: Adapt to changes in glibc 2.26 Leo Famulari
@ 2018-01-06 21:34   ` Marius Bakke
  3 siblings, 0 replies; 9+ messages in thread
From: Marius Bakke @ 2018-01-06 21:34 UTC (permalink / raw)
  To: Leo Famulari, 29970

[-- Attachment #1: Type: text/plain, Size: 329 bytes --]

Leo Famulari <leo@famulari.name> writes:

> * gnu/packages/onc-rpc.scm (libtirpc): Update to 1.0.2.
> [source]: Adjust patch list.
> * gnu/packages/patches/libtirpc-CVE-2017-8779.patch: Delete file.
> * gnu/packages/patches/libtirpc-missing-headers.patch: New file.
> * gnu/local.mk (dist_patch_DATA): Adjust accordingly.

LGTM!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

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

* [bug#29970] [PATCH 2/4] gnu: Add libnsl.
  2018-01-04  0:30   ` [bug#29970] [PATCH 2/4] gnu: Add libnsl Leo Famulari
@ 2018-01-06 21:41     ` Marius Bakke
  0 siblings, 0 replies; 9+ messages in thread
From: Marius Bakke @ 2018-01-06 21:41 UTC (permalink / raw)
  To: Leo Famulari, 29970

[-- Attachment #1: Type: text/plain, Size: 919 bytes --]

Leo Famulari <leo@famulari.name> writes:

> * gnu/packages/onc-rpc.scm (libnsl): New variable.

[...]

> +    (description "Libnsl is the public client interface for the Network
> +Information Service / Yellow Pages (NIS/YP) and NIS+.  It includes IPv6
> +support.  This code was part of glibc < 2.26, but is still required by
> +some applications.  Building glibc with '--enable-obsolete-nsl' will
> +cause the libnsl headers and NIS+ name service modules to be included in
> +glibc.")

I'm not sure if mentioning this historical artifact is necessary, but no
strong opinion.

> +    (home-page "https://github.com/thkukuk/libnsl")
> +    (license lgpl2.1+)))

Some files are explicitly LGPL2.1 only, so I wonder if we should
conservatively go with that, and mention that the files under nisplus/
are LGPL2.1+ in a comment.  WDYT?

Please also mention that the code in rpcsvc/ is BSD-3.

Apart from that LGTM, thanks!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

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

* [bug#29970] [PATCH 3/4] gnu: rpcbind: Build with libnsl.
  2018-01-04  0:30   ` [bug#29970] [PATCH 3/4] gnu: rpcbind: Build with libnsl Leo Famulari
@ 2018-01-06 21:44     ` Marius Bakke
  0 siblings, 0 replies; 9+ messages in thread
From: Marius Bakke @ 2018-01-06 21:44 UTC (permalink / raw)
  To: Leo Famulari, 29970

[-- Attachment #1: Type: text/plain, Size: 109 bytes --]

Leo Famulari <leo@famulari.name> writes:

> * gnu/packages/onc-rpc.scm (rpcbind)[inputs]: Add libnsl.

LGTM!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

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

* [bug#29970] [PATCH 4/4] gnu: nfs-utils: Adapt to changes in glibc 2.26.
  2018-01-04  0:30   ` [bug#29970] [PATCH 4/4] gnu: nfs-utils: Adapt to changes in glibc 2.26 Leo Famulari
@ 2018-01-06 21:45     ` Marius Bakke
  0 siblings, 0 replies; 9+ messages in thread
From: Marius Bakke @ 2018-01-06 21:45 UTC (permalink / raw)
  To: Leo Famulari, 29970

[-- Attachment #1: Type: text/plain, Size: 223 bytes --]

Leo Famulari <leo@famulari.name> writes:

> * gnu/packages/patches/nfs-utils-missing-headers.patch: New file.
> * gnu/local.mk (dist_patch_DATA): Add it.
> * gnu/packages/nfs.scm (nfs-utils)[source]: Use it.

LGTM, thanks!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

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

end of thread, other threads:[~2018-01-06 21:46 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-04  0:28 [bug#29970] core-updates: libtirpc, rpcbind, nfs-utils Leo Famulari
2018-01-04  0:30 ` [bug#29970] [PATCH 1/4] gnu: libtirpc: Update to 1.0.2 Leo Famulari
2018-01-04  0:30   ` [bug#29970] [PATCH 2/4] gnu: Add libnsl Leo Famulari
2018-01-06 21:41     ` Marius Bakke
2018-01-04  0:30   ` [bug#29970] [PATCH 3/4] gnu: rpcbind: Build with libnsl Leo Famulari
2018-01-06 21:44     ` Marius Bakke
2018-01-04  0:30   ` [bug#29970] [PATCH 4/4] gnu: nfs-utils: Adapt to changes in glibc 2.26 Leo Famulari
2018-01-06 21:45     ` Marius Bakke
2018-01-06 21:34   ` [bug#29970] [PATCH 1/4] gnu: libtirpc: Update to 1.0.2 Marius Bakke

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).