From d78da1f48855318a0eda6fcd8c670c1917e4faa2 Mon Sep 17 00:00:00 2001 From: Ben Roberts Date: Fri, 29 Apr 2016 08:39:01 +0100 Subject: [PATCH] Clone and bump net-fs/nfs-utils to include rpc.svcgssd pending gentoo #548208 (#56) --- net-fs/nfs-utils/Manifest | 1 + net-fs/nfs-utils/files/exports | 1 + .../files/nfs-utils-1.1.4-mtab-sym.patch | 39 ++++ .../files/nfs-utils-1.2.8-cross-build.patch | 48 +++++ .../files/nfs-utils-1.3.3-sysmacros.patch | 78 ++++++++ net-fs/nfs-utils/files/nfs.confd | 38 ++++ net-fs/nfs-utils/files/nfs.initd | 163 ++++++++++++++++ net-fs/nfs-utils/files/nfsclient.confd | 18 ++ net-fs/nfs-utils/files/nfsclient.initd | 34 ++++ net-fs/nfs-utils/files/nfsd.service-r1 | 15 ++ net-fs/nfs-utils/files/nfsmount.confd | 7 + net-fs/nfs-utils/files/nfsmount.initd | 48 +++++ net-fs/nfs-utils/files/nfsmount.initd-1.3.1 | 27 +++ net-fs/nfs-utils/files/proc-fs-nfsd.mount | 8 + net-fs/nfs-utils/files/rpc-gssd.service | 12 ++ net-fs/nfs-utils/files/rpc-idmapd.service | 11 ++ net-fs/nfs-utils/files/rpc-mountd.service-r1 | 10 + net-fs/nfs-utils/files/rpc-statd.service-r2 | 12 ++ net-fs/nfs-utils/files/rpc-svcgssd.service | 13 ++ net-fs/nfs-utils/files/rpc.gssd.initd | 24 +++ net-fs/nfs-utils/files/rpc.idmapd.initd | 26 +++ net-fs/nfs-utils/files/rpc.pipefs.initd | 33 ++++ net-fs/nfs-utils/files/rpc.statd.initd | 33 ++++ net-fs/nfs-utils/files/rpc.svcgssd.initd | 24 +++ .../files/var-lib-nfs-rpc_pipefs.mount | 7 + net-fs/nfs-utils/nfs-utils-1.3.3-r1.ebuild | 178 ++++++++++++++++++ 26 files changed, 908 insertions(+) create mode 100644 net-fs/nfs-utils/Manifest create mode 100644 net-fs/nfs-utils/files/exports create mode 100644 net-fs/nfs-utils/files/nfs-utils-1.1.4-mtab-sym.patch create mode 100644 net-fs/nfs-utils/files/nfs-utils-1.2.8-cross-build.patch create mode 100644 net-fs/nfs-utils/files/nfs-utils-1.3.3-sysmacros.patch create mode 100644 net-fs/nfs-utils/files/nfs.confd create mode 100644 net-fs/nfs-utils/files/nfs.initd create mode 100644 net-fs/nfs-utils/files/nfsclient.confd create mode 100644 net-fs/nfs-utils/files/nfsclient.initd create mode 100644 net-fs/nfs-utils/files/nfsd.service-r1 create mode 100644 net-fs/nfs-utils/files/nfsmount.confd create mode 100644 net-fs/nfs-utils/files/nfsmount.initd create mode 100644 net-fs/nfs-utils/files/nfsmount.initd-1.3.1 create mode 100644 net-fs/nfs-utils/files/proc-fs-nfsd.mount create mode 100644 net-fs/nfs-utils/files/rpc-gssd.service create mode 100644 net-fs/nfs-utils/files/rpc-idmapd.service create mode 100644 net-fs/nfs-utils/files/rpc-mountd.service-r1 create mode 100644 net-fs/nfs-utils/files/rpc-statd.service-r2 create mode 100644 net-fs/nfs-utils/files/rpc-svcgssd.service create mode 100644 net-fs/nfs-utils/files/rpc.gssd.initd create mode 100644 net-fs/nfs-utils/files/rpc.idmapd.initd create mode 100644 net-fs/nfs-utils/files/rpc.pipefs.initd create mode 100644 net-fs/nfs-utils/files/rpc.statd.initd create mode 100644 net-fs/nfs-utils/files/rpc.svcgssd.initd create mode 100644 net-fs/nfs-utils/files/var-lib-nfs-rpc_pipefs.mount create mode 100644 net-fs/nfs-utils/nfs-utils-1.3.3-r1.ebuild diff --git a/net-fs/nfs-utils/Manifest b/net-fs/nfs-utils/Manifest new file mode 100644 index 000000000..5004e6367 --- /dev/null +++ b/net-fs/nfs-utils/Manifest @@ -0,0 +1 @@ +DIST nfs-utils-1.3.3.tar.bz2 790969 SHA256 fe8e04f7a869975e11765085d27e91ca3f765e08811a527bb4e32056e41176eb SHA512 6361be1f8d5872a27d57b74fbf945177e8de233872f1504a7b8ac5adbb104f37113f2dfd28e5694f76f2becc8887f025ed27aad1280e781ab5c48408820d67eb WHIRLPOOL fb7eec9fe3893cb196160056476342a8a0f62d0e93fa7a9cf49c990763cfe7caa326b938e470bd3a84804fe745c31db87a4f12b58f0fbb1cac9b89faf0405e87 diff --git a/net-fs/nfs-utils/files/exports b/net-fs/nfs-utils/files/exports new file mode 100644 index 000000000..5102ef27c --- /dev/null +++ b/net-fs/nfs-utils/files/exports @@ -0,0 +1 @@ +# /etc/exports: NFS file systems being exported. See exports(5). diff --git a/net-fs/nfs-utils/files/nfs-utils-1.1.4-mtab-sym.patch b/net-fs/nfs-utils/files/nfs-utils-1.1.4-mtab-sym.patch new file mode 100644 index 000000000..c9e60afc7 --- /dev/null +++ b/net-fs/nfs-utils/files/nfs-utils-1.1.4-mtab-sym.patch @@ -0,0 +1,39 @@ +ripped from Debian + +--- nfs-utils-1.1.4/utils/mount/fstab.c ++++ nfs-utils-1.1.4/utils/mount/fstab.c +@@ -57,7 +57,7 @@ mtab_does_not_exist(void) { + return var_mtab_does_not_exist; + } + +-static int ++int + mtab_is_a_symlink(void) { + get_mtab_info(); + return var_mtab_is_a_symlink; +--- nfs-utils-1.1.4/utils/mount/fstab.h ++++ nfs-utils-1.1.4/utils/mount/fstab.h +@@ -7,6 +7,7 @@ + #define _PATH_FSTAB "/etc/fstab" + #endif + ++int mtab_is_a_symlink(void); + int mtab_is_writable(void); + int mtab_does_not_exist(void); + void reset_mtab_info(void); +--- nfs-utils-1.1.4/utils/mount/mount.c ++++ nfs-utils-1.1.4/utils/mount/mount.c +@@ -230,6 +230,13 @@ create_mtab (void) { + int flags; + mntFILE *mfp; + ++ /* Avoid writing if the mtab is a symlink to /proc/mounts, since ++ that would create a file /proc/mounts in case the proc filesystem ++ is not mounted, and the fchmod below would also fail. */ ++ if (mtab_is_a_symlink()) { ++ return EX_SUCCESS; ++ } ++ + lock_mtab(); + + mfp = nfs_setmntent (MOUNTED, "a+"); diff --git a/net-fs/nfs-utils/files/nfs-utils-1.2.8-cross-build.patch b/net-fs/nfs-utils/files/nfs-utils-1.2.8-cross-build.patch new file mode 100644 index 000000000..7317115a0 --- /dev/null +++ b/net-fs/nfs-utils/files/nfs-utils-1.2.8-cross-build.patch @@ -0,0 +1,48 @@ +this is kind of hacky, but automake doesn't make this easy +for us atm, so hack away :( + +(recent autotools will always add $(CFLAGS)/etc... to the compile) + +--- a/tools/locktest/Makefile.am ++++ b/tools/locktest/Makefile.am +@@ -1,12 +1,11 @@ + ## Process this file with automake to produce Makefile.in + + CC=$(CC_FOR_BUILD) +-LIBTOOL = @LIBTOOL@ --tag=CC ++CFLAGS=$(CFLAGS_FOR_BUILD) ++CPPFLAGS=$(CPPFLAGS_FOR_BUILD) ++LDFLAGS=$(LDFLAGS_FOR_BUILD) + + noinst_PROGRAMS = testlk + testlk_SOURCES = testlk.c +-testlk_CFLAGS=$(CFLAGS_FOR_BUILD) +-testlk_CPPFLAGS=$(CPPFLAGS_FOR_BUILD) +-testlk_LDFLAGS=$(LDFLAGS_FOR_BUILD) + + MAINTAINERCLEANFILES = Makefile.in +--- a/tools/rpcgen/Makefile.am ++++ b/tools/rpcgen/Makefile.am +@@ -1,7 +1,9 @@ + ## Process this file with automake to produce Makefile.in + + CC=$(CC_FOR_BUILD) +-LIBTOOL = @LIBTOOL@ --tag=CC ++CFLAGS=$(CFLAGS_FOR_BUILD) ++CPPFLAGS=$(CPPFLAGS_FOR_BUILD) ++LDFLAGS=$(LDFLAGS_FOR_BUILD) + + noinst_PROGRAMS = rpcgen + rpcgen_SOURCES = rpc_clntout.c rpc_cout.c rpc_hout.c rpc_main.c \ +@@ -9,10 +11,6 @@ + rpc_util.c rpc_sample.c rpc_output.h rpc_parse.h \ + rpc_scan.h rpc_util.h + +-rpcgen_CFLAGS=$(CFLAGS_FOR_BUILD) +-rpcgen_CPPLAGS=$(CPPFLAGS_FOR_BUILD) +-rpcgen_LDFLAGS=$(LDFLAGS_FOR_BUILD) +-rpcgen_LDADD=$(LIBTIRPC) + + MAINTAINERCLEANFILES = Makefile.in + + EXTRA_DIST = rpcgen.new.1 diff --git a/net-fs/nfs-utils/files/nfs-utils-1.3.3-sysmacros.patch b/net-fs/nfs-utils/files/nfs-utils-1.3.3-sysmacros.patch new file mode 100644 index 000000000..638442563 --- /dev/null +++ b/net-fs/nfs-utils/files/nfs-utils-1.3.3-sysmacros.patch @@ -0,0 +1,78 @@ +From 187f0e8298a3dd405b5aa817df129198d6f66eeb Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +Date: Thu, 14 Apr 2016 00:01:05 -0400 +Subject: [PATCH nfs-utils] fix building w/newer C libraries + +Linux C libraries are moving away from implicitly including the header +sys/sysmacros.h via sys/types.h. We would like to do this for glibc +now, but others (musl/etc...) have been doing it already. This means +any code using major/minor/makedevs functions will fail to build when +they don't include that header. + +Leverage the AC_HEADER_MAJOR macro that configure is already using to +pull in the right header. + +Signed-off-by: Mike Frysinger +--- + support/include/xcommon.h | 6 ++++++ + support/nfs/nfsexport.c | 1 + + utils/blkmapd/device-discovery.c | 1 + + utils/mountd/cache.c | 1 + + 4 files changed, 9 insertions(+) + +diff --git a/support/include/xcommon.h b/support/include/xcommon.h +index d1a4b18..23c9a13 100644 +--- a/support/include/xcommon.h ++++ b/support/include/xcommon.h +@@ -17,6 +17,12 @@ + #include + #include + ++#ifdef MAJOR_IN_MKDEV ++#include ++#elif defined(MAJOR_IN_SYSMACROS) ++#include ++#endif ++ + #define streq(s, t) (strcmp ((s), (t)) == 0) + + /* Functions in sundries.c that are used in mount.c and umount.c */ +diff --git a/support/nfs/nfsexport.c b/support/nfs/nfsexport.c +index afd7c90..4b13265 100644 +--- a/support/nfs/nfsexport.c ++++ b/support/nfs/nfsexport.c +@@ -19,6 +19,7 @@ + + #include "nfslib.h" + #include "misc.h" ++#include "xcommon.h" + + /* if /proc/net/rpc/... exists, then + * write to it, as that interface is more stable. +diff --git a/utils/blkmapd/device-discovery.c b/utils/blkmapd/device-discovery.c +index b010628..052d582 100644 +--- a/utils/blkmapd/device-discovery.c ++++ b/utils/blkmapd/device-discovery.c +@@ -51,6 +51,7 @@ + #include + + #include "device-discovery.h" ++#include "xcommon.h" + + #define EVENT_SIZE (sizeof(struct inotify_event)) + #define EVENT_BUFSIZE (1024 * EVENT_SIZE) +diff --git a/utils/mountd/cache.c b/utils/mountd/cache.c +index 7847446..ec86a22 100644 +--- a/utils/mountd/cache.c ++++ b/utils/mountd/cache.c +@@ -31,6 +31,7 @@ + #include "mountd.h" + #include "fsloc.h" + #include "pseudoflavors.h" ++#include "xcommon.h" + + #ifdef USE_BLKID + #include "blkid/blkid.h" +-- +2.7.4 + diff --git a/net-fs/nfs-utils/files/nfs.confd b/net-fs/nfs-utils/files/nfs.confd new file mode 100644 index 000000000..9dc14058c --- /dev/null +++ b/net-fs/nfs-utils/files/nfs.confd @@ -0,0 +1,38 @@ +# /etc/conf.d/nfs + +# If you wish to set the port numbers for lockd, +# please see /etc/sysctl.conf + +# Optional services to include in default `/etc/init.d/nfs start` +# For NFSv4 users, you'll want to add "rpc.idmapd" here. +NFS_NEEDED_SERVICES="" + +# Options to pass to rpc.nfsd +OPTS_RPC_NFSD="8" + +# Options to pass to rpc.mountd +# ex. OPTS_RPC_MOUNTD="-p 32767" +OPTS_RPC_MOUNTD="" + +# Options to pass to rpc.statd +# ex. OPTS_RPC_STATD="-p 32765 -o 32766" +OPTS_RPC_STATD="" + +# Options to pass to rpc.idmapd +OPTS_RPC_IDMAPD="" + +# Options to pass to rpc.gssd +OPTS_RPC_GSSD="" + +# Options to pass to rpc.svcgssd +OPTS_RPC_SVCGSSD="" + +# Options to pass to rpc.rquotad (requires sys-fs/quota) +OPTS_RPC_RQUOTAD="" + +# Timeout (in seconds) for exportfs +EXPORTFS_TIMEOUT=30 + +# Options to set in the nfsd filesystem (/proc/fs/nfsd/). +# Format is