[OE-core] [PATCH 1/6] unfs3: Add a NFSv3 user mode server for use with runqemu

2014-01-17 Thread Jason Wessel
The user mode nfs server allows the use of runqemu without any root
privileges and may even be accelerated with kvm.

Example:

runqemu-extract-sdk 
tmp-eglibc/deploy/images/qemux86-64/core-image-minimal-qemux86-64.tar.bz2 rootfs

runqemu qemux86-64 `pwd`/rootfs nographic slirp kvm

[YOCTO #5639]

Signed-off-by: Jason Wessel jason.wes...@windriver.com
---
 meta/files/common-licenses/unfs3   |   24 +++
 .../unfs3/unfs3/alternate_rpc_ports.patch  |  156 
 .../unfs3/unfs3/fix_compile_warning.patch  |   16 ++
 .../fix_pid_race_parent_writes_child_pid.patch |   47 ++
 .../unfs3/unfs3/fix_warnings.patch |   51 +++
 .../unfs3/force_4_byte_long_on_64_bit_host.patch   |   39 +
 .../unfs3/unfs3/relative_max_socket_path_len.patch |   70 +
 .../unfs3/unfs3/rename_fh_cache.patch  |   62 
 .../unfs3/unfs3/tcp_no_delay.patch |   50 +++
 .../unfs3/unfs3/unfs3_parallel_build.patch |   36 +
 meta/recipes-devtools/unfs3/unfs3_0.9.22.bb|   48 ++
 11 files changed, 599 insertions(+)
 create mode 100644 meta/files/common-licenses/unfs3
 create mode 100644 meta/recipes-devtools/unfs3/unfs3/alternate_rpc_ports.patch
 create mode 100644 meta/recipes-devtools/unfs3/unfs3/fix_compile_warning.patch
 create mode 100644 
meta/recipes-devtools/unfs3/unfs3/fix_pid_race_parent_writes_child_pid.patch
 create mode 100644 meta/recipes-devtools/unfs3/unfs3/fix_warnings.patch
 create mode 100644 
meta/recipes-devtools/unfs3/unfs3/force_4_byte_long_on_64_bit_host.patch
 create mode 100644 
meta/recipes-devtools/unfs3/unfs3/relative_max_socket_path_len.patch
 create mode 100644 meta/recipes-devtools/unfs3/unfs3/rename_fh_cache.patch
 create mode 100644 meta/recipes-devtools/unfs3/unfs3/tcp_no_delay.patch
 create mode 100644 meta/recipes-devtools/unfs3/unfs3/unfs3_parallel_build.patch
 create mode 100644 meta/recipes-devtools/unfs3/unfs3_0.9.22.bb

diff --git a/meta/files/common-licenses/unfs3 b/meta/files/common-licenses/unfs3
new file mode 100644
index 000..7f2b53f
--- /dev/null
+++ b/meta/files/common-licenses/unfs3
@@ -0,0 +1,24 @@
+UNFS3 user-space NFSv3 server
+(C) 2003, Pascal Schmidt unfs3-ser...@ewetel.net
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice,
+   this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright notice,
+   this list of conditions and the following disclaimer in the documentation
+   and/or other materials provided with the distribution.
+3. The name of the author may not be used to endorse or promote products
+   derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/meta/recipes-devtools/unfs3/unfs3/alternate_rpc_ports.patch 
b/meta/recipes-devtools/unfs3/unfs3/alternate_rpc_ports.patch
new file mode 100644
index 000..8634121
--- /dev/null
+++ b/meta/recipes-devtools/unfs3/unfs3/alternate_rpc_ports.patch
@@ -0,0 +1,156 @@
+Add ability to specify rcp port numbers
+
+In order to run more than one unfs server on a host system, you must
+be able to specify alternate rpc port numbers.
+
+Jason Wessel jason.wes...@windriver.com
+
+---
+ daemon.c |   44 +++-
+ mount.c  |4 ++--
+ 2 files changed, 33 insertions(+), 15 deletions(-)
+
+--- a/daemon.c
 b/daemon.c
+@@ -75,6 +75,8 @@ int opt_testconfig = FALSE;
+ struct in_addr opt_bind_addr;
+ int opt_readable_executables = FALSE;
+ char *opt_pid_file = NULL;
++int nfs_prog = NFS3_PROGRAM;
++int mount_prog = MOUNTPROG;
+ 
+ /* Register with portmapper? */
+ int opt_portmapper = TRUE;
+@@ -202,7 +204,7 @@ static void remove_pid_file(void)
+ static void parse_options(int argc, char **argv)
+ {
+ int opt = 0;
+-char *optstring = bcC:de:hl:m:n:prstTuwi:;
++char *optstring = bcC:de:hl:m:n:prstTuwi:x:y:;
+ 
+ while (opt != -1) {
+   opt = getopt(argc, argv, optstring);
+@@ -257,8 +259,24 @@ static void parse_options(int argc, char
+   printf
+   (\t-r  

Re: [OE-core] [PATCH 1/6] unfs3: Add a NFSv3 user mode server for use with runqemu

2014-01-17 Thread Saul Wold

On 01/17/2014 08:37 AM, Jason Wessel wrote:

The user mode nfs server allows the use of runqemu without any root
privileges and may even be accelerated with kvm.

Example:

runqemu-extract-sdk 
tmp-eglibc/deploy/images/qemux86-64/core-image-minimal-qemux86-64.tar.bz2 rootfs

runqemu qemux86-64 `pwd`/rootfs nographic slirp kvm

[YOCTO #5639]

Signed-off-by: Jason Wessel jason.wes...@windriver.com
---
  meta/files/common-licenses/unfs3   |   24 +++
  .../unfs3/unfs3/alternate_rpc_ports.patch  |  156 
  .../unfs3/unfs3/fix_compile_warning.patch  |   16 ++
  .../fix_pid_race_parent_writes_child_pid.patch |   47 ++
  .../unfs3/unfs3/fix_warnings.patch |   51 +++
  .../unfs3/force_4_byte_long_on_64_bit_host.patch   |   39 +
  .../unfs3/unfs3/relative_max_socket_path_len.patch |   70 +
  .../unfs3/unfs3/rename_fh_cache.patch  |   62 
  .../unfs3/unfs3/tcp_no_delay.patch |   50 +++
  .../unfs3/unfs3/unfs3_parallel_build.patch |   36 +


Jason:

These unfs3 patches are missing Upstream-Status: Tag.

Thanks
Sau!


  meta/recipes-devtools/unfs3/unfs3_0.9.22.bb|   48 ++
  11 files changed, 599 insertions(+)
  create mode 100644 meta/files/common-licenses/unfs3
  create mode 100644 meta/recipes-devtools/unfs3/unfs3/alternate_rpc_ports.patch
  create mode 100644 meta/recipes-devtools/unfs3/unfs3/fix_compile_warning.patch
  create mode 100644 
meta/recipes-devtools/unfs3/unfs3/fix_pid_race_parent_writes_child_pid.patch
  create mode 100644 meta/recipes-devtools/unfs3/unfs3/fix_warnings.patch
  create mode 100644 
meta/recipes-devtools/unfs3/unfs3/force_4_byte_long_on_64_bit_host.patch
  create mode 100644 
meta/recipes-devtools/unfs3/unfs3/relative_max_socket_path_len.patch
  create mode 100644 meta/recipes-devtools/unfs3/unfs3/rename_fh_cache.patch
  create mode 100644 meta/recipes-devtools/unfs3/unfs3/tcp_no_delay.patch
  create mode 100644 
meta/recipes-devtools/unfs3/unfs3/unfs3_parallel_build.patch
  create mode 100644 meta/recipes-devtools/unfs3/unfs3_0.9.22.bb

diff --git a/meta/files/common-licenses/unfs3 b/meta/files/common-licenses/unfs3
new file mode 100644
index 000..7f2b53f
--- /dev/null
+++ b/meta/files/common-licenses/unfs3
@@ -0,0 +1,24 @@
+UNFS3 user-space NFSv3 server
+(C) 2003, Pascal Schmidt unfs3-ser...@ewetel.net
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice,
+   this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright notice,
+   this list of conditions and the following disclaimer in the documentation
+   and/or other materials provided with the distribution.
+3. The name of the author may not be used to endorse or promote products
+   derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/meta/recipes-devtools/unfs3/unfs3/alternate_rpc_ports.patch 
b/meta/recipes-devtools/unfs3/unfs3/alternate_rpc_ports.patch
new file mode 100644
index 000..8634121
--- /dev/null
+++ b/meta/recipes-devtools/unfs3/unfs3/alternate_rpc_ports.patch
@@ -0,0 +1,156 @@
+Add ability to specify rcp port numbers
+
+In order to run more than one unfs server on a host system, you must
+be able to specify alternate rpc port numbers.
+
+Jason Wessel jason.wes...@windriver.com
+
+---
+ daemon.c |   44 +++-
+ mount.c  |4 ++--
+ 2 files changed, 33 insertions(+), 15 deletions(-)
+
+--- a/daemon.c
 b/daemon.c
+@@ -75,6 +75,8 @@ int opt_testconfig = FALSE;
+ struct in_addr opt_bind_addr;
+ int opt_readable_executables = FALSE;
+ char *opt_pid_file = NULL;
++int nfs_prog = NFS3_PROGRAM;
++int mount_prog = MOUNTPROG;
+
+ /* Register with portmapper? */
+ int opt_portmapper = TRUE;
+@@ -202,7 +204,7 @@ static void remove_pid_file(void)
+ static void parse_options(int argc, char **argv)
+ {
+ int opt = 0;
+-char *optstring = bcC:de:hl:m:n:prstTuwi:;
++char *optstring = bcC:de:hl:m:n:prstTuwi:x:y:;
+
+ while (opt != -1) {
+   opt =