aboutsummaryrefslogtreecommitdiff
path: root/net-fs
diff options
context:
space:
mode:
authorRobert Piasek <dagger@gentoo.org>2009-03-29 01:59:45 +0000
committerRobert Piasek <dagger@gentoo.org>2009-03-29 01:59:45 +0000
commit685f2a357c347ce5c91a2e0ac863f0c75074c4a7 (patch)
tree73e424af1b1c191dd2511dadea69c47a1ef44bb0 /net-fs
parentUpdate categories (diff)
downloadembedded-cross-685f2a357c347ce5c91a2e0ac863f0c75074c4a7.tar.gz
embedded-cross-685f2a357c347ce5c91a2e0ac863f0c75074c4a7.tar.bz2
embedded-cross-685f2a357c347ce5c91a2e0ac863f0c75074c4a7.zip
new ebuild for nfs-utils
Diffstat (limited to 'net-fs')
-rw-r--r--net-fs/nfs-utils/Manifest16
-rw-r--r--net-fs/nfs-utils/files/exports1
-rw-r--r--net-fs/nfs-utils/files/nfs-utils-1.1.2-mount-eacces.patch28
-rw-r--r--net-fs/nfs-utils/files/nfs-utils-1.1.2-rpcgen-ioctl.patch14
-rw-r--r--net-fs/nfs-utils/files/nfs-utils-1.1.4-ascii-man.patch16
-rw-r--r--net-fs/nfs-utils/files/nfs-utils-1.1.4-mtab-sym.patch39
-rw-r--r--net-fs/nfs-utils/files/nfs-utils-1.1.4-no-exec.patch15
-rw-r--r--net-fs/nfs-utils/files/nfs.confd30
-rwxr-xr-xnet-fs/nfs-utils/files/nfs.initd154
-rwxr-xr-xnet-fs/nfs-utils/files/nfsmount.initd42
-rwxr-xr-xnet-fs/nfs-utils/files/rpc.gssd.initd24
-rwxr-xr-xnet-fs/nfs-utils/files/rpc.idmapd.initd26
-rw-r--r--net-fs/nfs-utils/files/rpc.pipefs.initd24
-rwxr-xr-xnet-fs/nfs-utils/files/rpc.statd.initd33
-rwxr-xr-xnet-fs/nfs-utils/files/rpc.svcgssd.initd24
-rw-r--r--net-fs/nfs-utils/nfs-utils-1.1.5.ebuild116
16 files changed, 602 insertions, 0 deletions
diff --git a/net-fs/nfs-utils/Manifest b/net-fs/nfs-utils/Manifest
new file mode 100644
index 0000000..d657be1
--- /dev/null
+++ b/net-fs/nfs-utils/Manifest
@@ -0,0 +1,16 @@
+AUX exports 66 RMD160 0a61ad40dc321be39fb54d5b9fe717caa714e878 SHA1 52ed6b74643e084cfc17ff4638c2e06c86602034 SHA256 5d6356df546682e2f1a87131d1bb67de9b1f9a34d3a5742343dc64e890cf71d5
+AUX nfs-utils-1.1.2-mount-eacces.patch 1007 RMD160 675e073787f7b2ca17eb68e48cfcb655c53ef035 SHA1 7b7ce2b86de20aec00f9fd1eb9199114f9d09c81 SHA256 1fd11442bea901505ee32bc1ed043adf65297caf86d6082c0fcf278f50f44daf
+AUX nfs-utils-1.1.2-rpcgen-ioctl.patch 398 RMD160 1ff3225a3d4f3dd3e21a9d34f9839e266ee3a8fa SHA1 2f8da1c38ae4f93c600e0710d002d94f036fa09c SHA256 b769bfe5f47f1556ded750ba3cf4c0ab210d1296ce3f575b69b18b7173f4f298
+AUX nfs-utils-1.1.4-ascii-man.patch 571 RMD160 614759d4a361db8ab6ee8c8ee87fc8a93a5e6052 SHA1 745322de9b26acec667d7acf8764f12388e3a046 SHA256 5f1cd9789b4963df22df914f61a33412d61d3c8fdde9b71b8c9dd4c2506852f7
+AUX nfs-utils-1.1.4-mtab-sym.patch 1020 RMD160 72c6ebb9d02ec544b5b2d7ad3ad0c8035d248eb1 SHA1 50db1976ac25607faf8f003573f9d8529e5b4de6 SHA256 0232799d085151649a1eb1f31644105de7e5cfba888794354005499a0db277c3
+AUX nfs-utils-1.1.4-no-exec.patch 297 RMD160 59e6f4bf2c782c0c107cd135589c4abcba1a5978 SHA1 aa7239b22cf73abb1790bb9a88407cea8fd56779 SHA256 f66af9d046a3524ae8920f8e4b5d0fa206de31d4e7747bfc716a10ac86537b0f
+AUX nfs.confd 630 RMD160 3628b5df5589c700905afc8054d1ee22fb5be0b9 SHA1 b5e8e37f3611008626f3f1fc633202fbefb8c101 SHA256 9ca3b7dfbac5bedd818a3637805380f4e873ef8e809c21c26f410c86ac16e03e
+AUX nfs.initd 4165 RMD160 89bb4520cfb6149f98a97a2f4d5009b42f199761 SHA1 b7b6770fc84d509ccb55e0769b8e701cd5126cc8 SHA256 813ddf4ee84e7cc734dd4375adc6209ed3f629eab6b2370635766139b8f5500b
+AUX nfsmount.initd 1084 RMD160 7da20dd19d9d6fe8734691eb3219e6bd011737eb SHA1 521a3e95158c76800c396fbe54ef558e01520177 SHA256 f2f5b54fef59f24a1fc6a8b814dfe2cfdeeb02fd0d5041cff31650e626fe4b75
+AUX rpc.gssd.initd 567 RMD160 26d42451b9fc0e90297b5e0381d2632a57dc4c51 SHA1 041e59d915a0ab183a3e0b50abbf58394d2e89b9 SHA256 00d9c29280a83e8458c33139d04a9b38c6fdba9d7cb9b420ca83bf6b10e6435d
+AUX rpc.idmapd.initd 595 RMD160 45f3e7c83555113052a302b66ba160171f90400a SHA1 4c387d27dd11dcfe896dd937c69cd391c1936123 SHA256 3ce65326859c43983dad25ad2d4731488c488037796e39b6b5eda336e8bf81ef
+AUX rpc.pipefs.initd 788 RMD160 9ed8a4511e7ce05c67bc3a4c3c9d81ef0cfb6e45 SHA1 c184ab0c0df8b480e6f2e23dbe8360b99d1411a9 SHA256 d651ad9099ea443282476fcedf52c00f0a274eb6a9e4b58a5838780369206973
+AUX rpc.statd.initd 818 RMD160 d87fc8aed1638955444b587fc5404db671d5a8fb SHA1 bd73058b722d2f51a67bbbdec8ed029094fb9683 SHA256 0c7bd35a14da6c0c2577f09ae82a41ddb693a88157eeaf80684616f79be6c304
+AUX rpc.svcgssd.initd 584 RMD160 9488050225453f6b083be78ed3de1b042d02cfb8 SHA1 3dc09a20ca1cefd902b8709b094a4e0c0e9a407c SHA256 f1c460d8b0e91e54a551397d755135d05a3728d81de596535bf8bda074455677
+DIST nfs-utils-1.1.5.tar.bz2 605790 RMD160 9e50867b29184ebe6b6c4fb8fe35b026630d5d73 SHA1 b9d2bfe9045157af78d498ed2292eff976a78127 SHA256 9a5da7cd85dc9087222ab348ce82577c38547177d5d4dc7fccc9e939c97d47dc
+EBUILD nfs-utils-1.1.5.ebuild 3196 RMD160 37065bbc6ebca7246721ba5be01dab7c7d64c7ed SHA1 615952a867c5fc3f410c0f9ed262a58226ea3115 SHA256 7fd8261c6d5dbd93e27613df9afb04dfdb039e737bc661ad3d873558c0afe9b9
diff --git a/net-fs/nfs-utils/files/exports b/net-fs/nfs-utils/files/exports
new file mode 100644
index 0000000..5102ef2
--- /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.2-mount-eacces.patch b/net-fs/nfs-utils/files/nfs-utils-1.1.2-mount-eacces.patch
new file mode 100644
index 0000000..5f2a358
--- /dev/null
+++ b/net-fs/nfs-utils/files/nfs-utils-1.1.2-mount-eacces.patch
@@ -0,0 +1,28 @@
+http://bugs.gentoo.org/219729
+
+commit 697e28939b7d0a3e0ffe3b6bd516213a55f5a063
+Author: Jeff Layton <jlaton@redhat.com>
+Date: Mon Apr 14 09:03:13 2008 -0400
+
+ Change how mount.nfs handles EACCES errors. Currently,
+ EACCES is a non-fatal error which means the mount will be
+ retied. This caused mounts to hang for 2mins when the client
+ does not have permission to access the export. In a strict
+ interpretation, the error that should be returned is EPERM, but
+ this is not always the case. So due to the fuzzy interpretation,
+ of EPERM and EACCES, EACCESS is now a fatal error
+
+ Signed-off-by: Steve Dickson <steved@redhat.com>
+
+diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c
+index cadb1f4..cdd610e 100644
+--- a/utils/mount/stropts.c
++++ b/utils/mount/stropts.c
+@@ -252,7 +252,6 @@ static int set_mandatory_options(const char *type,
+ static int is_permanent_error(int error)
+ {
+ switch (error) {
+- case EACCES:
+ case ESTALE:
+ case ETIMEDOUT:
+ case ECONNREFUSED:
diff --git a/net-fs/nfs-utils/files/nfs-utils-1.1.2-rpcgen-ioctl.patch b/net-fs/nfs-utils/files/nfs-utils-1.1.2-rpcgen-ioctl.patch
new file mode 100644
index 0000000..2115345
--- /dev/null
+++ b/net-fs/nfs-utils/files/nfs-utils-1.1.2-rpcgen-ioctl.patch
@@ -0,0 +1,14 @@
+http://bugs.gentoo.org/174393
+
+--- tools/rpcgen/rpc_main.c
++++ tools/rpcgen/rpc_main.c
+@@ -548,6 +548,9 @@
+ #ifndef linux
+ if( !tirpcflag && inetdflag )
+ f_print(fout, "#include <sys/ttycom.h>/* TIOCNOTTY */\n");
++#else
++ if( !tirpcflag )
++ f_print(fout, "#include <sys/ioctl.h>/* TIOCNOTTY */\n");
+ #endif
+ if( Cflag && (inetdflag || pmflag ) ) {
+ f_print(fout, "#ifdef __cplusplus\n");
diff --git a/net-fs/nfs-utils/files/nfs-utils-1.1.4-ascii-man.patch b/net-fs/nfs-utils/files/nfs-utils-1.1.4-ascii-man.patch
new file mode 100644
index 0000000..83ed4aa
--- /dev/null
+++ b/net-fs/nfs-utils/files/nfs-utils-1.1.4-ascii-man.patch
@@ -0,0 +1,16 @@
+ripped from Debian
+
+http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=493659
+patch by nbreen@ofb.net (Nicholas Breen)
+
+--- nfs-utils-1.1.3/utils/mount/nfs.man
++++ nfs-utils-1.1.3/utils/mount/nfs.man
+@@ -799,7 +799,7 @@
+ and server load.
+ .P
+ However, UDP can be quite effective in specialized settings where
+-the network’s MTU is large relative to NFS’s data transfer size (such
++the network's MTU is large relative to NFS's data transfer size (such
+ as network environments that enable jumbo Ethernet frames). In such
+ environments, trimming the
+ .B rsize
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 0000000..c9e60af
--- /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.1.4-no-exec.patch b/net-fs/nfs-utils/files/nfs-utils-1.1.4-no-exec.patch
new file mode 100644
index 0000000..ea50a21
--- /dev/null
+++ b/net-fs/nfs-utils/files/nfs-utils-1.1.4-no-exec.patch
@@ -0,0 +1,15 @@
+ripped from Debian
+
+--- nfs-utils-1.1.2/utils/mount/mount.c
++++ nfs-utils-1.1.2/utils/mount/mount.c
+@@ -381,10 +381,6 @@
+ mount_error(NULL, mount_point, ENOTDIR);
+ return 1;
+ }
+- if (access(mount_point, X_OK) < 0) {
+- mount_error(NULL, mount_point, errno);
+- return 1;
+- }
+
+ return 0;
+ }
diff --git a/net-fs/nfs-utils/files/nfs.confd b/net-fs/nfs-utils/files/nfs.confd
new file mode 100644
index 0000000..98a143a
--- /dev/null
+++ b/net-fs/nfs-utils/files/nfs.confd
@@ -0,0 +1,30 @@
+# /etc/conf.d/nfs
+
+# If you wish to set the port numbers for lockd,
+# please see /etc/sysctl.conf
+
+# Number of servers to be started up by default
+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
diff --git a/net-fs/nfs-utils/files/nfs.initd b/net-fs/nfs-utils/files/nfs.initd
new file mode 100755
index 0000000..78de312
--- /dev/null
+++ b/net-fs/nfs-utils/files/nfs.initd
@@ -0,0 +1,154 @@
+#!/sbin/runscript
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/nfs.initd,v 1.18 2009/02/27 01:41:55 vapier Exp $
+
+opts="reload"
+
+# This variable is used for controlling whether or not to run exportfs -ua;
+# see stop() for more information
+restarting=no
+
+# The binary locations
+exportfs=/usr/sbin/exportfs
+ mountd=/usr/sbin/rpc.mountd
+ nfsd=/usr/sbin/rpc.nfsd
+smnotify=/usr/sbin/sm-notify
+
+depend() {
+ local myneed=""
+ if [ -e /etc/exports ] ; then
+ if awk '!/^[[:space:]]*#/ && $2 ~ /sec=/ { exit 0 } END { exit 1 }' /etc/exports ; then
+ myneed="${myneed} rpc.svcgssd"
+ fi
+ fi
+ config /etc/exports
+ need portmap rpc.statd ${myneed}
+ use ypbind net dns rpc.rquotad rpc.idmapd rpc.svcgssd
+ after quota
+}
+
+mkdir_nfsdirs() {
+ local d
+ for d in rpc_pipefs v4recovery v4root ; do
+ d="/var/lib/nfs/${d}"
+ [ ! -d "${d}" ] && mkdir -p "${d}"
+ done
+}
+
+waitfor_exportfs() {
+ local pid=$1
+ ( sleep ${EXPORTFS_TIMEOUT:-30}; kill -9 $pid 2>/dev/null ) &
+ wait $1
+}
+
+mount_nfsd() {
+ if [ -e /proc/modules ] ; then
+ # Make sure nfs support is loaded in the kernel #64709
+ if ! grep -qs nfsd /proc/filesystems ; then
+ modprobe -q nfsd
+ fi
+ # Restart idmapd if needed #220747
+ if grep -qs nfsd /proc/modules ; then
+ killall -q -HUP rpc.idmapd
+ fi
+ fi
+
+ # This is the new "kernel 2.6 way" to handle the exports file
+ if grep -qs nfsd /proc/filesystems ; then
+ if ! grep -qs "nfsd /proc/fs/nfsd" /proc/mounts ; then
+ ebegin "Mounting nfsd filesystem in /proc"
+ mount -t nfsd -o nodev,noexec,nosuid nfsd /proc/fs/nfsd
+ eend $?
+ fi
+ fi
+}
+
+start_it() {
+ ebegin "Starting NFS $1"
+ shift
+ "$@"
+ eend $?
+ ret=$((ret + $?))
+}
+start() {
+ mount_nfsd
+ mkdir_nfsdirs
+
+ # Exportfs likes to hang if networking isn't working.
+ # If that's the case, then try to kill it so the
+ # bootup process can continue.
+ if grep -qs '^[[:space:]]*/' /etc/exports ; then
+ ebegin "Exporting NFS directories"
+ ${exportfs} -r &
+ waitfor_exportfs $!
+ eend $?
+ fi
+
+ local ret=0
+ start_it mountd ${mountd} ${OPTS_RPC_MOUNTD}
+ start_it daemon ${nfsd} ${OPTS_RPC_NFSD}
+ [ -x "${smnotify}" ] && start_it smnotify ${smnotify} ${OPTS_SMNOTIFY}
+ return ${ret}
+}
+
+stop() {
+ local ret=0
+
+ # Don't check NFSSERVER variable since it might have changed,
+ # instead use --oknodo to smooth things over
+ ebegin "Stopping NFS mountd"
+ start-stop-daemon --stop --oknodo --exec ${mountd}
+ eend $?
+ ret=$((ret + $?))
+
+ # nfsd sets its process name to [nfsd] so don't look for $nfsd
+ ebegin "Stopping NFS daemon"
+ start-stop-daemon --stop --oknodo --name nfsd --user root --signal 2
+ eend $?
+ ret=$((ret + $?))
+ # in case things don't work out ... #228127
+ rpc.nfsd 0
+
+ # When restarting the NFS server, running "exportfs -ua" probably
+ # isn't what the user wants. Running it causes all entries listed
+ # in xtab to be removed from the kernel export tables, and the
+ # xtab file is cleared. This effectively shuts down all NFS
+ # activity, leaving all clients holding stale NFS filehandles,
+ # *even* when the NFS server has restarted.
+ #
+ # That's what you would want if you were shutting down the NFS
+ # server for good, or for a long period of time, but not when the
+ # NFS server will be running again in short order. In this case,
+ # then "exportfs -r" will reread the xtab, and all the current
+ # clients will be able to resume NFS activity, *without* needing
+ # to umount/(re)mount the filesystem.
+ if [ "${restarting}" = no -o "${RC_CMD}" = "restart" ] ; then
+ ebegin "Unexporting NFS directories"
+ # Exportfs likes to hang if networking isn't working.
+ # If that's the case, then try to kill it so the
+ # shutdown process can continue.
+ ${exportfs} -ua &
+ waitfor_exportfs $!
+ eend $?
+ fi
+
+ return ${ret}
+}
+
+reload() {
+ # Exportfs likes to hang if networking isn't working.
+ # If that's the case, then try to kill it so the
+ # bootup process can continue.
+ ebegin "Reloading /etc/exports"
+ ${exportfs} -r 1>&2 &
+ waitfor_exportfs $!
+ eend $?
+}
+
+restart() {
+ # See long comment in stop() regarding "restarting" and exportfs -ua
+ restarting=yes
+ svc_stop
+ svc_start
+}
diff --git a/net-fs/nfs-utils/files/nfsmount.initd b/net-fs/nfs-utils/files/nfsmount.initd
new file mode 100755
index 0000000..9ae2c52
--- /dev/null
+++ b/net-fs/nfs-utils/files/nfsmount.initd
@@ -0,0 +1,42 @@
+#!/sbin/runscript
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/nfsmount.initd,v 1.13 2009/01/31 22:15:02 vapier Exp $
+
+[ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs
+
+depend() {
+ local myneed=""
+ if [ -e /etc/fstab ] ; then
+ awk '!/^[[:space:]]*#/ && $3 == "nfs4" { exit ($4 ~ /sec=krb/ ? 10 : 20) }' /etc/fstab
+ local ret=$?
+ [ ${ret} -eq 10 ] && myneed="${myneed} rpc.gssd"
+ [ ${ret} -eq 20 ] && myneed="${myneed} rpc.idmapd"
+ fi
+ config /etc/fstab
+ need net portmap rpc.statd ${myneed}
+ use ypbind dns rpc.idmapd rpc.gssd
+}
+
+start() {
+ if [ -x /usr/sbin/sm-notify ] ; then
+ ebegin "Starting NFS sm-notify"
+ /usr/sbin/sm-notify ${OPTS_SMNOTIFY}
+ eend $?
+ fi
+
+ # Make sure nfs support is loaded in the kernel #64709
+ if [ -e /proc/modules ] && ! grep -qs 'nfs$' /proc/filesystems ; then
+ modprobe -q nfs
+ fi
+
+ ebegin "Mounting NFS filesystems"
+ mount -a -t nfs,nfs4
+ eend $?
+}
+
+stop() {
+ ebegin "Unmounting NFS filesystems"
+ umount -a -t nfs,nfs4
+ eend $?
+}
diff --git a/net-fs/nfs-utils/files/rpc.gssd.initd b/net-fs/nfs-utils/files/rpc.gssd.initd
new file mode 100755
index 0000000..f1b8f87
--- /dev/null
+++ b/net-fs/nfs-utils/files/rpc.gssd.initd
@@ -0,0 +1,24 @@
+#!/sbin/runscript
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/rpc.gssd.initd,v 1.11 2008/10/26 09:02:47 vapier Exp $
+
+[ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs
+
+depend() {
+ use ypbind net
+ need portmap rpc.pipefs
+ after quota
+}
+
+start() {
+ ebegin "Starting gssd"
+ start-stop-daemon --start --exec /usr/sbin/rpc.gssd -- ${OPTS_RPC_GSSD}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping gssd"
+ start-stop-daemon --stop --exec /usr/sbin/rpc.gssd
+ eend $?
+}
diff --git a/net-fs/nfs-utils/files/rpc.idmapd.initd b/net-fs/nfs-utils/files/rpc.idmapd.initd
new file mode 100755
index 0000000..52838b5
--- /dev/null
+++ b/net-fs/nfs-utils/files/rpc.idmapd.initd
@@ -0,0 +1,26 @@
+#!/sbin/runscript
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/rpc.idmapd.initd,v 1.8 2009/03/14 18:43:18 vapier Exp $
+
+[ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs
+
+rpc_bin=/usr/sbin/rpc.idmapd
+
+depend() {
+ use ypbind net
+ need portmap rpc.pipefs
+ after quota
+}
+
+start() {
+ ebegin "Starting idmapd"
+ ${rpc_bin} ${OPTS_RPC_IDMAPD}
+ eend $? "make sure DNOTIFY support is enabled ..."
+}
+
+stop() {
+ ebegin "Stopping idmapd"
+ start-stop-daemon --stop --exec ${rpc_bin}
+ eend $?
+}
diff --git a/net-fs/nfs-utils/files/rpc.pipefs.initd b/net-fs/nfs-utils/files/rpc.pipefs.initd
new file mode 100644
index 0000000..701ac77
--- /dev/null
+++ b/net-fs/nfs-utils/files/rpc.pipefs.initd
@@ -0,0 +1,24 @@
+#!/sbin/runscript
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/rpc.pipefs.initd,v 1.1 2008/10/26 09:02:47 vapier Exp $
+
+mount_pipefs() {
+ # if rpc_pipefs is not available, try to load sunrpc for it #219566
+ grep -qs rpc_pipefs /proc/filesystems || modprobe -q sunrpc
+ # if still not available, let's bail
+ grep -qs rpc_pipefs /proc/filesystems || return 1
+
+ # now just do it for kicks
+ mkdir -p /var/lib/nfs/rpc_pipefs
+ mount -t rpc_pipefs rpc_pipefs /var/lib/nfs/rpc_pipefs
+}
+
+start() {
+ # if things are already mounted, let's just return
+ grep -qs "rpc_pipefs /var/lib/nfs/rpc_pipefs" /proc/mounts && return 0
+
+ ebegin "Mounting RPC pipefs"
+ mount_pipefs
+ eend $?
+}
diff --git a/net-fs/nfs-utils/files/rpc.statd.initd b/net-fs/nfs-utils/files/rpc.statd.initd
new file mode 100755
index 0000000..14f8b34
--- /dev/null
+++ b/net-fs/nfs-utils/files/rpc.statd.initd
@@ -0,0 +1,33 @@
+#!/sbin/runscript
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/rpc.statd.initd,v 1.7 2009/01/31 22:16:11 vapier Exp $
+
+[ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs
+
+rpc_bin=/sbin/rpc.statd
+rpc_pid=/var/run/rpc.statd.pid
+
+depend() {
+ use ypbind net
+ need portmap
+ after quota
+}
+
+start() {
+ # Don't start rpc.statd if already started by someone else ...
+ # Don't try and kill it if it's already dead ...
+ if killall -q -0 ${rpc_bin} ; then
+ return 0
+ fi
+
+ ebegin "Starting NFS statd"
+ start-stop-daemon --start --exec ${rpc_bin} -- --no-notify ${OPTS_RPC_STATD}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping NFS statd"
+ start-stop-daemon --stop --exec ${rpc_bin} --pidfile /var/run/rpc.statd.pid
+ eend $?
+}
diff --git a/net-fs/nfs-utils/files/rpc.svcgssd.initd b/net-fs/nfs-utils/files/rpc.svcgssd.initd
new file mode 100755
index 0000000..74383e2
--- /dev/null
+++ b/net-fs/nfs-utils/files/rpc.svcgssd.initd
@@ -0,0 +1,24 @@
+#!/sbin/runscript
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/rpc.svcgssd.initd,v 1.5 2008/10/26 09:02:47 vapier Exp $
+
+[ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs
+
+depend() {
+ use ypbind net
+ need portmap rpc.pipefs
+ after quota
+}
+
+start() {
+ ebegin "Starting svcgssd"
+ start-stop-daemon --start --exec /usr/sbin/rpc.svcgssd -- ${OPTS_RPC_SVCGSSD}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping svcgssd"
+ start-stop-daemon --stop --exec /usr/sbin/rpc.svcgssd
+ eend $?
+}
diff --git a/net-fs/nfs-utils/nfs-utils-1.1.5.ebuild b/net-fs/nfs-utils/nfs-utils-1.1.5.ebuild
new file mode 100644
index 0000000..b1073e3
--- /dev/null
+++ b/net-fs/nfs-utils/nfs-utils-1.1.5.ebuild
@@ -0,0 +1,116 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/nfs-utils-1.1.5.ebuild,v 1.2 2009/03/06 09:32:03 vapier Exp $
+
+inherit eutils flag-o-matic multilib toolchain-funcs
+
+DESCRIPTION="NFS client and server daemons"
+HOMEPAGE="http://linux-nfs.org/"
+SRC_URI="mirror://sourceforge/nfs/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="nonfsv4 tcpd kerberos"
+
+# kth-krb doesn't provide the right include
+# files, and nfs-utils doesn't build against heimdal either,
+# so don't depend on virtual/krb.
+# (04 Feb 2005 agriffis)
+RDEPEND="tcpd? ( sys-apps/tcp-wrappers )
+ sys-libs/e2fsprogs-libs
+ >=net-nds/portmap-5b-r6
+ !nonfsv4? (
+ >=dev-libs/libevent-1.0b
+ >=net-libs/libnfsidmap-0.21-r1
+ kerberos? (
+ net-libs/librpcsecgss
+ net-libs/libgssglue
+ app-crypt/mit-krb5
+ )
+ )"
+# util-linux dep is to prevent man-page collision
+DEPEND="${RDEPEND}
+ >=sys-apps/util-linux-2.12r-r7"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${PN}-1.1.2-rpcgen-ioctl.patch
+ epatch "${FILESDIR}"/${PN}-1.1.4-ascii-man.patch
+ epatch "${FILESDIR}"/${PN}-1.1.4-mtab-sym.patch
+ epatch "${FILESDIR}"/${PN}-1.1.4-no-exec.patch
+}
+
+src_compile() {
+ local myconf
+ if use nonfsv4 ; then
+ myconf="--disable-gss"
+ else
+ myconf="$(use_enable kerberos gss)"
+ fi
+
+ econf \
+ --with-statedir=/var/lib/nfs \
+ --enable-nfsv3 \
+ $(use_with tcpd tcp-wrappers) \
+ $(use_enable !nonfsv4 nfsv4) \
+ ${myconf} \
+ || die "Configure failed"
+
+ if tc-is-cross-compiler; then
+ emake CC=$(tc-getCC) || die "Failed to compile"
+ else
+ emake || die "Failed to compile"
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+
+ # Don't overwrite existing xtab/etab, install the original
+ # versions somewhere safe... more info in pkg_postinst
+ dodir /usr/lib/nfs
+ keepdir /var/lib/nfs/{sm,sm.bak}
+ mv "${D}"/var/lib/nfs/* "${D}"/usr/lib/nfs
+ keepdir /var/lib/nfs
+
+ # Install some client-side binaries in /sbin
+ dodir /sbin
+ mv "${D}"/usr/sbin/rpc.statd "${D}"/sbin/ || die
+
+ dodoc ChangeLog README
+ docinto linux-nfs ; dodoc linux-nfs/*
+
+ insinto /etc
+ doins "${FILESDIR}"/exports
+
+ local f list=""
+ if use !nonfsv4 ; then
+ list="${list} rpc.idmapd rpc.pipefs"
+ use kerberos && list="${list} rpc.gssd rpc.svcgssd"
+ fi
+ for f in nfs nfsmount rpc.statd ${list} ; do
+ newinitd "${FILESDIR}"/${f}.initd ${f} || die "doinitd ${f}"
+ done
+ newconfd "${FILESDIR}"/nfs.confd nfs
+
+ # uClibc doesn't provide rpcgen like glibc, so lets steal it from nfs-utils
+ if ! use elibc_glibc ; then
+ dobin tools/rpcgen/rpcgen || die "rpcgen"
+ newdoc tools/rpcgen/README README.rpcgen
+ fi
+}
+
+pkg_postinst() {
+ # Install default xtab and friends if there's none existing.
+ # In src_install we put them in /usr/lib/nfs for safe-keeping, but
+ # the daemons actually use the files in /var/lib/nfs. This fixes
+ # bug 30486
+ local f
+ for f in "${ROOT}"/usr/$(get_libdir)/nfs/*; do
+ [[ -e ${ROOT}/var/lib/nfs/${f##*/} ]] && continue
+ einfo "Copying default ${f##*/} from /usr/$(get_libdir)/nfs to /var/lib/nfs"
+ cp -pPR "${f}" "${ROOT}"/var/lib/nfs/
+ done
+}