--- /dev/null
+Upstream-Status: Inappropriate [other]
+Upstream is not making further releases of this software.
+
+Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
+
+# Allow user mode NFS to work without rpcbind / portmap
+# Patch origin: Wind River
+
+---
+ rpcmisc.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+--- a/rpcmisc.c
++++ b/rpcmisc.c
+@@ -91,7 +91,8 @@ not_inetd:
+ if (transp == NULL)
+ Dprintf(L_FATAL, "cannot create udp service.");
+ for (i = 0; (vers = verstbl[i]) != 0; i++) {
+- if (!svc_register(transp, prog, vers, dispatch, IPPROTO_UDP)) {
++ if (!(svc_register(transp, prog, vers, dispatch, IPPROTO_UDP) ||
++ svc_register(transp, prog, vers, dispatch, 0))) {
+ Dprintf(L_FATAL,
+ "unable to register (%s, %d, udp).",
+ name, vers);
+@@ -110,7 +111,8 @@ not_inetd:
+ transp->xp_ops->xp_recv = auth_rendevouser;
+ #endif
+ for (i = 0; (vers = verstbl[i]) != 0; i++) {
+- if (!svc_register(transp, prog, vers, dispatch, IPPROTO_TCP)) {
++ if (!(svc_register(transp, prog, vers, dispatch, IPPROTO_TCP) ||
++ svc_register(transp, prog, vers, dispatch, 0))) {
+ Dprintf(L_FATAL,
+ "unable to register (%s, %d, tcp).",
+ name, vers);
RDEPENDS_${PN}_virtclass-native = "pseudo-native"
RDEPENDS_${PN}_virtclass-nativesdk = "pseudo-nativesdk"
BASEPV = "2.2beta47"
-PR = "r0"
+PR = "r1"
SRC_URI = "ftp://linux.mathematik.tu-darmstadt.de/pub/linux/oldstuff/people/okir/nfs-server-${BASEPV}.tar.gz \
file://001-2.2b47-2.2b51.patch \
file://020-undefined-chmod-fix.patch \
file://021-nolibwrap.patch \
file://022-add-close-on-exec-descriptors.patch \
+ file://023-no-rpc-register.patch \
"
SRC_URI[md5sum] = "79a29fe9f79b2f3241d4915767b8c511"
NFS_NFSPROG=$[ 11111 + $NFS_INSTANCE ]
# NFS port number
NFS_PORT=$[ 3049 + $NFS_INSTANCE ]
+# mountd port number
+MOUNT_PORT=$[ 3048 + $NFS_INSTANCE ]
## For debugging you would additionally add
## --debug all
-MOUNTD_OPTS="--allow-non-root --mount-pid $MOUNTPID -f $EXPORTS --rmtab $RMTAB --prog $NFS_MOUNTPROG -r"
+MOUNTD_OPTS="--allow-non-root --mount-pid $MOUNTPID -f $EXPORTS --rmtab $RMTAB --prog $NFS_MOUNTPROG -r -P $MOUNT_PORT"
NFSD_OPTS="--allow-non-root --nfs-pid $NFSPID -f $EXPORTS --prog $NFS_NFSPROG -P $NFS_PORT -r"
# Setup the exports file
if [ "$FSTYPE" = "nfs" ]; then
NFS_SERVER="192.168.7.1"
NFS_DIR=`echo $ROOTFS | sed 's/^[^:]*:\(.*\)/\1/'`
- MOUNTD_PORT=$[ 21111 + $NFS_INSTANCE ]
- NFSD_PORT=$[ 11111 + $NFS_INSTANCE ]
- UNFS_OPTS="nfsvers=2,mountprog=$MOUNTD_PORT,nfsprog=$NFSD_PORT,udp"
+ MOUNTD_RPCPORT=$[ 21111 + $NFS_INSTANCE ]
+ NFSD_RPCPORT=$[ 11111 + $NFS_INSTANCE ]
+ NFSD_PORT=$[ 3049 + $NFS_INSTANCE ]
+ MOUNTD_PORT=$[ 3048 + $NFS_INSTANCE ]
+ UNFS_OPTS="nfsvers=2,mountprog=$MOUNTD_RPCPORT,nfsprog=$NFSD_RPCPORT,udp,port=$NFSD_PORT,mountport=$MOUNTD_PORT"
PSEUDO_LOCALSTATEDIR=~/.runqemu-sdk/pseudo
export PSEUDO_LOCALSTATEDIR
- rpcbind_running=`ps ax | grep rpcbind | grep -v grep | wc -l`
- portmap_running=`ps ax | grep portmap | grep -v grep | wc -l`
- if [[ $rpcbind_running == 0 && $portmap_running == 0 ]]; then
- echo "You need to be running either rpcbind or portmap to continue"
- cleanup
- return
- fi
-
# Start the userspace NFS server
echo "runqemu-export-rootfs restart $ROOTFS"
runqemu-export-rootfs restart $ROOTFS