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