From ce2a8c9d93374d9ecd2576a9eb94c5d7751011d7 Mon Sep 17 00:00:00 2001 From: "S. Lockwood-Childs" Date: Wed, 23 May 2018 09:15:29 +0000 Subject: net-fs/nfs-utils: add package * configure check needs to be for res_querydomain() not internal glibc function __res_querydomain() * missing limits.h header for PATH_MAX --- net-fs/nfs-utils/Manifest | 2 + net-fs/nfs-utils/files/exports | 1 + .../nfs-utils/files/nfs-utils-1.1.4-mtab-sym.patch | 39 +++++ .../files/nfs-utils-1.2.8-cross-build.patch | 48 ++++++ ...s-utils-2.3.1-svcgssd_undefined_reference.patch | 40 +++++ net-fs/nfs-utils/files/nfs-utils-musl.patch | 21 +++ net-fs/nfs-utils/files/nfs-utils.conf | 3 + net-fs/nfs-utils/files/nfs.confd | 38 +++++ net-fs/nfs-utils/files/nfs.initd | 162 ++++++++++++++++++ net-fs/nfs-utils/files/nfsclient.confd | 18 ++ net-fs/nfs-utils/files/nfsclient.initd | 33 ++++ net-fs/nfs-utils/files/nfsmount.confd | 7 + net-fs/nfs-utils/files/nfsmount.initd | 47 ++++++ net-fs/nfs-utils/files/nfsmount.initd-1.3.1 | 26 +++ net-fs/nfs-utils/files/rpc.gssd.initd | 23 +++ net-fs/nfs-utils/files/rpc.idmapd.initd | 25 +++ net-fs/nfs-utils/files/rpc.pipefs.initd | 32 ++++ net-fs/nfs-utils/files/rpc.statd.initd | 32 ++++ net-fs/nfs-utils/files/rpc.svcgssd.initd | 23 +++ net-fs/nfs-utils/metadata.xml | 21 +++ net-fs/nfs-utils/nfs-utils-1.3.4-r1.ebuild | 182 ++++++++++++++++++++ net-fs/nfs-utils/nfs-utils-2.3.1-r3.ebuild | 187 +++++++++++++++++++++ 22 files changed, 1010 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-2.3.1-svcgssd_undefined_reference.patch create mode 100644 net-fs/nfs-utils/files/nfs-utils-musl.patch create mode 100644 net-fs/nfs-utils/files/nfs-utils.conf 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/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/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/metadata.xml create mode 100644 net-fs/nfs-utils/nfs-utils-1.3.4-r1.ebuild create mode 100644 net-fs/nfs-utils/nfs-utils-2.3.1-r3.ebuild (limited to 'net-fs') diff --git a/net-fs/nfs-utils/Manifest b/net-fs/nfs-utils/Manifest new file mode 100644 index 00000000..47f42dda --- /dev/null +++ b/net-fs/nfs-utils/Manifest @@ -0,0 +1,2 @@ +DIST nfs-utils-1.3.4.tar.bz2 814545 BLAKE2B 4b8c5fa4c1c21858e19d05f973c6d94185cf6a15c88348dda5e47c6714f9dba00dfa05237d908479970440b2ea57287600e92cb4d49872127b3801e075d6bf1a SHA512 765c0bc55a9a0bdb2c25d8fb7189a9054fb9f2dd51726eda29f44e5d5c423e245b02307dfcfab9239276d8f44869a72732416f6e9ef5a1f80753d9243ba1b38c +DIST nfs-utils-2.3.1.tar.bz2 854899 BLAKE2B f9541b9dc103d978f21d57d8ba0c14a3b30f6ba874b112239d014076c1c72b6654e8e02b4bfea686e658dac84d1e896b872bc2054591275ef1713ae4e7b7d005 SHA512 de3e70f8656bc5b5aa98262685a9e80929c6314234d9bbb74d4c7efcb7a8b2640d48d2100850b403157ebefc8f0eb48598b48238fae795f64c7a0e9a8bff93e3 diff --git a/net-fs/nfs-utils/files/exports b/net-fs/nfs-utils/files/exports new file mode 100644 index 00000000..5102ef27 --- /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 00000000..c9e60afc --- /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 00000000..7317115a --- /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-2.3.1-svcgssd_undefined_reference.patch b/net-fs/nfs-utils/files/nfs-utils-2.3.1-svcgssd_undefined_reference.patch new file mode 100644 index 00000000..77c902f2 --- /dev/null +++ b/net-fs/nfs-utils/files/nfs-utils-2.3.1-svcgssd_undefined_reference.patch @@ -0,0 +1,40 @@ +From 1451d7585bf1c622658ccc04abac7e79ffe40263 Mon Sep 17 00:00:00 2001 +From: Justin Mitchell +Date: Mon, 8 Jan 2018 09:14:11 -0500 +Subject: [PATCH] svcgssd: Update svcgssd so that it builds + +Since a15bd948 the --enable-svcgss option no longer builds +as svcgssd references functions which were changed at that time. +Fix those, and other function changes since then. + +Signed-off-by: Justin Mitchell +Signed-off-by: Steve Dickson +--- + utils/gssd/svcgssd.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/utils/gssd/svcgssd.c b/utils/gssd/svcgssd.c +index 3514ae1..23f0c0b 100644 +--- a/utils/gssd/svcgssd.c ++++ b/utils/gssd/svcgssd.c +@@ -63,6 +63,8 @@ + #include "err_util.h" + #include "conffile.h" + ++struct state_paths etab; ++ + void + sig_die(int signal) + { +@@ -101,7 +103,7 @@ main(int argc, char *argv[]) + char *principal = NULL; + char *s; + +- conf_init(NFS_CONFFILE); ++ conf_init_file(NFS_CONFFILE); + + s = conf_get_str("svcgssd", "principal"); + if (!s) +-- +1.8.3.1 + diff --git a/net-fs/nfs-utils/files/nfs-utils-musl.patch b/net-fs/nfs-utils/files/nfs-utils-musl.patch new file mode 100644 index 00000000..19c42b1d --- /dev/null +++ b/net-fs/nfs-utils/files/nfs-utils-musl.patch @@ -0,0 +1,21 @@ +--- nfs-utils-2.3.1/configure.ac.orig 2018-05-21 11:05:01.939912918 -0700 ++++ nfs-utils-2.3.1/configure.ac 2018-05-21 11:05:10.531968707 -0700 +@@ -401,7 +401,7 @@ + fi + + dnl libdnsidmap specific checks +-AC_CHECK_LIB([resolv], [__res_querydomain], , AC_MSG_ERROR(res_querydomain needed)) ++AC_CHECK_LIB([resolv], [res_querydomain], , AC_MSG_ERROR(res_querydomain needed)) + + AC_ARG_ENABLE([ldap], + [AS_HELP_STRING([--disable-ldap],[Disable support for LDAP @<:default=detect@:>@])]) +--- nfs-utils-2.3.1/support/misc/file.c.orig 2018-05-21 18:15:37.572007979 +0000 ++++ nfs-utils-2.3.1/support/misc/file.c 2018-05-21 18:15:43.668047008 +0000 +@@ -27,6 +27,7 @@ + #include + #include + #include ++#include /* PATH_MAX */ + + #include "xlog.h" + #include "misc.h" diff --git a/net-fs/nfs-utils/files/nfs-utils.conf b/net-fs/nfs-utils/files/nfs-utils.conf new file mode 100644 index 00000000..b9b586c2 --- /dev/null +++ b/net-fs/nfs-utils/files/nfs-utils.conf @@ -0,0 +1,3 @@ +d /var/lib/nfs/rpc_pipefs +d /var/lib/nfs/v4recovery +d /var/lib/nfs/v4root diff --git a/net-fs/nfs-utils/files/nfs.confd b/net-fs/nfs-utils/files/nfs.confd new file mode 100644 index 00000000..9dc14058 --- /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