diff options
4 files changed, 44 insertions, 13 deletions
diff --git a/meta/recipes-devtools/unfs-server/unfs-server-2.1+2.2beta47/023-no-rpc-register.patch b/meta/recipes-devtools/unfs-server/unfs-server-2.1+2.2beta47/023-no-rpc-register.patch new file mode 100644 index 0000000000..50f23fcc6c --- /dev/null +++ b/meta/recipes-devtools/unfs-server/unfs-server-2.1+2.2beta47/023-no-rpc-register.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | Upstream-Status: Inappropriate [other] | ||
2 | Upstream is not making further releases of this software. | ||
3 | |||
4 | Signed-off-by: Jason Wessel <jason.wessel@windriver.com> | ||
5 | |||
6 | # Allow user mode NFS to work without rpcbind / portmap | ||
7 | # Patch origin: Wind River | ||
8 | |||
9 | --- | ||
10 | rpcmisc.c | 6 ++++-- | ||
11 | 1 file changed, 4 insertions(+), 2 deletions(-) | ||
12 | |||
13 | --- a/rpcmisc.c | ||
14 | +++ b/rpcmisc.c | ||
15 | @@ -91,7 +91,8 @@ not_inetd: | ||
16 | if (transp == NULL) | ||
17 | Dprintf(L_FATAL, "cannot create udp service."); | ||
18 | for (i = 0; (vers = verstbl[i]) != 0; i++) { | ||
19 | - if (!svc_register(transp, prog, vers, dispatch, IPPROTO_UDP)) { | ||
20 | + if (!(svc_register(transp, prog, vers, dispatch, IPPROTO_UDP) || | ||
21 | + svc_register(transp, prog, vers, dispatch, 0))) { | ||
22 | Dprintf(L_FATAL, | ||
23 | "unable to register (%s, %d, udp).", | ||
24 | name, vers); | ||
25 | @@ -110,7 +111,8 @@ not_inetd: | ||
26 | transp->xp_ops->xp_recv = auth_rendevouser; | ||
27 | #endif | ||
28 | for (i = 0; (vers = verstbl[i]) != 0; i++) { | ||
29 | - if (!svc_register(transp, prog, vers, dispatch, IPPROTO_TCP)) { | ||
30 | + if (!(svc_register(transp, prog, vers, dispatch, IPPROTO_TCP) || | ||
31 | + svc_register(transp, prog, vers, dispatch, 0))) { | ||
32 | Dprintf(L_FATAL, | ||
33 | "unable to register (%s, %d, tcp).", | ||
34 | name, vers); | ||
diff --git a/meta/recipes-devtools/unfs-server/unfs-server_2.1+2.2beta47.bb b/meta/recipes-devtools/unfs-server/unfs-server_2.1+2.2beta47.bb index 8ed2e33f95..29c7052056 100644 --- a/meta/recipes-devtools/unfs-server/unfs-server_2.1+2.2beta47.bb +++ b/meta/recipes-devtools/unfs-server/unfs-server_2.1+2.2beta47.bb | |||
@@ -7,7 +7,7 @@ RDEPENDS_${PN} = "pseudo" | |||
7 | RDEPENDS_${PN}_virtclass-native = "pseudo-native" | 7 | RDEPENDS_${PN}_virtclass-native = "pseudo-native" |
8 | RDEPENDS_${PN}_virtclass-nativesdk = "pseudo-nativesdk" | 8 | RDEPENDS_${PN}_virtclass-nativesdk = "pseudo-nativesdk" |
9 | BASEPV = "2.2beta47" | 9 | BASEPV = "2.2beta47" |
10 | PR = "r0" | 10 | PR = "r1" |
11 | 11 | ||
12 | SRC_URI = "ftp://linux.mathematik.tu-darmstadt.de/pub/linux/oldstuff/people/okir/nfs-server-${BASEPV}.tar.gz \ | 12 | SRC_URI = "ftp://linux.mathematik.tu-darmstadt.de/pub/linux/oldstuff/people/okir/nfs-server-${BASEPV}.tar.gz \ |
13 | file://001-2.2b47-2.2b51.patch \ | 13 | file://001-2.2b47-2.2b51.patch \ |
@@ -32,6 +32,7 @@ SRC_URI = "ftp://linux.mathematik.tu-darmstadt.de/pub/linux/oldstuff/people/okir | |||
32 | file://020-undefined-chmod-fix.patch \ | 32 | file://020-undefined-chmod-fix.patch \ |
33 | file://021-nolibwrap.patch \ | 33 | file://021-nolibwrap.patch \ |
34 | file://022-add-close-on-exec-descriptors.patch \ | 34 | file://022-add-close-on-exec-descriptors.patch \ |
35 | file://023-no-rpc-register.patch \ | ||
35 | " | 36 | " |
36 | 37 | ||
37 | SRC_URI[md5sum] = "79a29fe9f79b2f3241d4915767b8c511" | 38 | SRC_URI[md5sum] = "79a29fe9f79b2f3241d4915767b8c511" |
diff --git a/scripts/runqemu-export-rootfs b/scripts/runqemu-export-rootfs index fec288accd..f8213ba4ef 100755 --- a/scripts/runqemu-export-rootfs +++ b/scripts/runqemu-export-rootfs | |||
@@ -83,10 +83,12 @@ NFS_MOUNTPROG=$[ 21111 + $NFS_INSTANCE ] | |||
83 | NFS_NFSPROG=$[ 11111 + $NFS_INSTANCE ] | 83 | NFS_NFSPROG=$[ 11111 + $NFS_INSTANCE ] |
84 | # NFS port number | 84 | # NFS port number |
85 | NFS_PORT=$[ 3049 + $NFS_INSTANCE ] | 85 | NFS_PORT=$[ 3049 + $NFS_INSTANCE ] |
86 | # mountd port number | ||
87 | MOUNT_PORT=$[ 3048 + $NFS_INSTANCE ] | ||
86 | 88 | ||
87 | ## For debugging you would additionally add | 89 | ## For debugging you would additionally add |
88 | ## --debug all | 90 | ## --debug all |
89 | MOUNTD_OPTS="--allow-non-root --mount-pid $MOUNTPID -f $EXPORTS --rmtab $RMTAB --prog $NFS_MOUNTPROG -r" | 91 | MOUNTD_OPTS="--allow-non-root --mount-pid $MOUNTPID -f $EXPORTS --rmtab $RMTAB --prog $NFS_MOUNTPROG -r -P $MOUNT_PORT" |
90 | NFSD_OPTS="--allow-non-root --nfs-pid $NFSPID -f $EXPORTS --prog $NFS_NFSPROG -P $NFS_PORT -r" | 92 | NFSD_OPTS="--allow-non-root --nfs-pid $NFSPID -f $EXPORTS --prog $NFS_NFSPROG -P $NFS_PORT -r" |
91 | 93 | ||
92 | # Setup the exports file | 94 | # Setup the exports file |
diff --git a/scripts/runqemu-internal b/scripts/runqemu-internal index ce3291f3a9..2968ed939c 100755 --- a/scripts/runqemu-internal +++ b/scripts/runqemu-internal | |||
@@ -258,21 +258,15 @@ fi | |||
258 | if [ "$FSTYPE" = "nfs" ]; then | 258 | if [ "$FSTYPE" = "nfs" ]; then |
259 | NFS_SERVER="192.168.7.1" | 259 | NFS_SERVER="192.168.7.1" |
260 | NFS_DIR=`echo $ROOTFS | sed 's/^[^:]*:\(.*\)/\1/'` | 260 | NFS_DIR=`echo $ROOTFS | sed 's/^[^:]*:\(.*\)/\1/'` |
261 | MOUNTD_PORT=$[ 21111 + $NFS_INSTANCE ] | 261 | MOUNTD_RPCPORT=$[ 21111 + $NFS_INSTANCE ] |
262 | NFSD_PORT=$[ 11111 + $NFS_INSTANCE ] | 262 | NFSD_RPCPORT=$[ 11111 + $NFS_INSTANCE ] |
263 | UNFS_OPTS="nfsvers=2,mountprog=$MOUNTD_PORT,nfsprog=$NFSD_PORT,udp" | 263 | NFSD_PORT=$[ 3049 + $NFS_INSTANCE ] |
264 | MOUNTD_PORT=$[ 3048 + $NFS_INSTANCE ] | ||
265 | UNFS_OPTS="nfsvers=2,mountprog=$MOUNTD_RPCPORT,nfsprog=$NFSD_RPCPORT,udp,port=$NFSD_PORT,mountport=$MOUNTD_PORT" | ||
264 | 266 | ||
265 | PSEUDO_LOCALSTATEDIR=~/.runqemu-sdk/pseudo | 267 | PSEUDO_LOCALSTATEDIR=~/.runqemu-sdk/pseudo |
266 | export PSEUDO_LOCALSTATEDIR | 268 | export PSEUDO_LOCALSTATEDIR |
267 | 269 | ||
268 | rpcbind_running=`ps ax | grep rpcbind | grep -v grep | wc -l` | ||
269 | portmap_running=`ps ax | grep portmap | grep -v grep | wc -l` | ||
270 | if [[ $rpcbind_running == 0 && $portmap_running == 0 ]]; then | ||
271 | echo "You need to be running either rpcbind or portmap to continue" | ||
272 | cleanup | ||
273 | return | ||
274 | fi | ||
275 | |||
276 | # Start the userspace NFS server | 270 | # Start the userspace NFS server |
277 | echo "runqemu-export-rootfs restart $ROOTFS" | 271 | echo "runqemu-export-rootfs restart $ROOTFS" |
278 | runqemu-export-rootfs restart $ROOTFS | 272 | runqemu-export-rootfs restart $ROOTFS |