From 3451dc818787031b8dfd69db4baf213a4a085024 Mon Sep 17 00:00:00 2001 From: Qing He Date: Wed, 7 Jul 2010 13:55:23 +0800 Subject: nfs-utils: upgrade to version 1.2.2 from 1.0.6 changes: - there are several new dependencies: tirpc, libcap libgss, libnfsimap, libevent and libwrap. disable tirpc, libgss, libwrap - several changes are in upstream now, include the bzero change and stat-include change, remove the patches - a new build system is used, custom macros are now moved to aclocal/, acinclude and rpcgen fixes are not necessary any more - rebase uclibc patch - enable nfsv41, nfsv3 and nfsv4 are default turned on - do_compile is no longer needed - the install target has changed a lot, instead of updating the file list manually, try to use oe_runmake install for installation. Several files are built against build environment, they are removed from the packages. Signed-off-by: Qing He --- .../nfs-utils/files/nfs-utils-1.0.6-uclibc.patch | 18 --- meta/packages/nfs-utils/files/nfsserver | 161 --------------------- .../nfs-utils/files/uclibc_bzero_fix.patch | 17 --- .../nfs-utils-1.0.6/acinclude-lossage.patch | 142 ------------------ .../nfs-utils/nfs-utils-1.0.6/forgotten-defines | 5 - .../nfs-utils/nfs-utils-1.0.6/kernel-2.6.18+.patch | 13 -- .../nfs-utils/nfs-utils-1.0.6/rpcgen-lossage.patch | 11 -- .../nfs-utils/nfs-utils-1.0.6/stat-include.patch | 11 -- .../nfs-utils/nfs-utils-1.0.6-uclibc.patch | 18 +++ meta/packages/nfs-utils/nfs-utils/nfsserver | 161 +++++++++++++++++++++ meta/packages/nfs-utils/nfs-utils_1.0.6.bb | 78 ---------- meta/packages/nfs-utils/nfs-utils_1.2.2.bb | 54 +++++++ 12 files changed, 233 insertions(+), 456 deletions(-) delete mode 100644 meta/packages/nfs-utils/files/nfs-utils-1.0.6-uclibc.patch delete mode 100644 meta/packages/nfs-utils/files/nfsserver delete mode 100644 meta/packages/nfs-utils/files/uclibc_bzero_fix.patch delete mode 100644 meta/packages/nfs-utils/nfs-utils-1.0.6/acinclude-lossage.patch delete mode 100644 meta/packages/nfs-utils/nfs-utils-1.0.6/forgotten-defines delete mode 100644 meta/packages/nfs-utils/nfs-utils-1.0.6/kernel-2.6.18+.patch delete mode 100644 meta/packages/nfs-utils/nfs-utils-1.0.6/rpcgen-lossage.patch delete mode 100644 meta/packages/nfs-utils/nfs-utils-1.0.6/stat-include.patch create mode 100644 meta/packages/nfs-utils/nfs-utils/nfs-utils-1.0.6-uclibc.patch create mode 100644 meta/packages/nfs-utils/nfs-utils/nfsserver delete mode 100644 meta/packages/nfs-utils/nfs-utils_1.0.6.bb create mode 100644 meta/packages/nfs-utils/nfs-utils_1.2.2.bb diff --git a/meta/packages/nfs-utils/files/nfs-utils-1.0.6-uclibc.patch b/meta/packages/nfs-utils/files/nfs-utils-1.0.6-uclibc.patch deleted file mode 100644 index ebd3276be..000000000 --- a/meta/packages/nfs-utils/files/nfs-utils-1.0.6-uclibc.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- ./support/nfs/svc_socket.c.orig 2004-12-12 06:43:52.000000000 +0000 -+++ ./support/nfs/svc_socket.c 2004-12-12 06:50:04.000000000 +0000 -@@ -66,6 +66,7 @@ - __bzero ((char *) &addr, sizeof (addr)); - addr.sin_family = AF_INET; - -+#ifndef __UCLIBC__ /* neither getrpcbynumber() nor getrpcbynumber_r() is SuSv3 */ - ret = getrpcbynumber_r (number, &rpcbuf, rpcdata, sizeof rpcdata, - &rpcp); - if (ret == 0 && rpcp != NULL) -@@ -99,6 +100,7 @@ - } - } - else -+#endif - { - if (bindresvport (sock, &addr)) - { diff --git a/meta/packages/nfs-utils/files/nfsserver b/meta/packages/nfs-utils/files/nfsserver deleted file mode 100644 index 9d02e8584..000000000 --- a/meta/packages/nfs-utils/files/nfsserver +++ /dev/null @@ -1,161 +0,0 @@ -#!/bin/sh -### BEGIN INIT INFO -# Provides: nfs-kernel-server -# Required-Start: $remote_fs $portmap hwclock -# Required-Stop: $remote_fs $portmap hwclock -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: Kernel NFS server support -# Description: NFS is a popular protocol for file sharing across -# TCP/IP networks. This service provides NFS server -# functionality, which is configured via the -# /etc/exports file. -### END INIT INFO -# -# Startup script for nfs-utils -# -# -# The environment variable NFS_SERVERS may be set in /etc/default/nfsd -# Other control variables may be overridden here too -test -r /etc/default/nfsd && . /etc/default/nfsd -# -# Location of executables: -test -x "$NFS_MOUNTD" || NFS_MOUNTD=/usr/sbin/mountd -test -x "$NFS_NFSD" || NFS_NFSD=/usr/sbin/nfsd -test -x "$NFS_STATD" || NFS_STATD=/usr/sbin/statd -# -# The user mode program must also exist (it just starts the kernel -# threads using the kernel module code). -test -x "$NFS_MOUNTD" || exit 0 -test -x "$NFS_NFSD" || exit 0 -# -# Default is 8 threads, value is settable between 1 and the truely -# ridiculous 99 -test "$NFS_SERVERS" -gt 0 && test "$NFS_SERVERS" -lt 100 || NFS_SERVERS=8 -# -# The default state directory is /var/lib/nfs -test -n "$NFS_STATEDIR" || NFS_STATEDIR=/var/lib/nfs -# -#---------------------------------------------------------------------- -# Startup and shutdown functions. -# Actual startup/shutdown is at the end of this file. -#directories -create_directories(){ - echo -n 'creating NFS state directory: ' - mkdir -p "$NFS_STATEDIR" - ( cd "$NFS_STATEDIR" - umask 077 - mkdir -p sm sm.bak - test -w sm/state || { - rm -f sm/state - :>sm/state - } - umask 022 - for file in xtab etab smtab rmtab - do - test -w "$file" || { - rm -f "$file" - :>"$file" - } - done - ) - echo done -} -#mountd -start_mountd(){ - echo -n 'starting mountd: ' - start-stop-daemon --start --exec "$NFS_MOUNTD" -- "-f /etc/exports $@" - echo done -} -stop_mountd(){ - echo -n 'stopping mountd: ' - start-stop-daemon --stop --quiet --exec "$NFS_MOUNTD" - echo done -} -# -#nfsd -start_nfsd(){ - echo -n "starting $1 nfsd kernel threads: " - start-stop-daemon --start --exec "$NFS_NFSD" -- "$@" - echo done -} -delay_nfsd(){ - for delay in 0 1 2 3 4 5 6 7 8 9 - do - if pidof nfsd >/dev/null - then - echo -n . - sleep 1 - else - return 0 - fi - done - return 1 -} -stop_nfsd(){ - # WARNING: this kills any process with the executable - # name 'nfsd'. - echo -n 'stopping nfsd: ' - start-stop-daemon --stop --quiet --signal 1 --name nfsd - if delay_nfsd || { - echo failed - echo ' using signal 9: ' - start-stop-daemon --stop --quiet --signal 9 --name nfsd - delay_nfsd - } - then - echo done - # This will remove, recursively, dependencies - echo -n 'removing nfsd kernel module: ' - if modprobe -r nfsd - then - echo done - else - echo failed - fi - else - echo failed - fi -} - -#statd -start_statd(){ - echo -n "starting statd: " - start-stop-daemon --start --exec "$NFS_STATD" - echo done -} -stop_statd(){ - # WARNING: this kills any process with the executable - # name 'statd'. - echo -n 'stopping statd: ' - start-stop-daemon --stop --quiet --signal 1 --name statd - echo done -} -#---------------------------------------------------------------------- -# -# supported options: -# start -# stop -# reload: reloads the exports file -# restart: stops and starts mountd -#FIXME: need to create the /var/lib/nfs/... directories -case "$1" in -start) create_directories - start_nfsd "$NFS_SERVERS" - start_mountd - start_statd - test -r /etc/exports && exportfs -a;; -stop) exportfs -ua - stop_statd - stop_mountd - stop_nfsd;; -reload) test -r /etc/exports && exportfs -r;; -restart)exportfs -ua - stop_mountd - stop_statd - # restart does not restart the kernel threads, - # only the user mode processes - start_mountd - start_statd - test -r /etc/exports && exportfs -a;; -esac diff --git a/meta/packages/nfs-utils/files/uclibc_bzero_fix.patch b/meta/packages/nfs-utils/files/uclibc_bzero_fix.patch deleted file mode 100644 index 2006192d2..000000000 --- a/meta/packages/nfs-utils/files/uclibc_bzero_fix.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- - support/nfs/svc_socket.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: nfs-utils-1.0.6/support/nfs/svc_socket.c -=================================================================== ---- nfs-utils-1.0.6.orig/support/nfs/svc_socket.c 2007-05-27 16:14:09.000000000 +0100 -+++ nfs-utils-1.0.6/support/nfs/svc_socket.c 2007-05-28 22:43:55.000000000 +0100 -@@ -63,7 +63,7 @@ svc_socket (u_long number, int type, int - } - } - -- __bzero ((char *) &addr, sizeof (addr)); -+ memset ((char *) &addr,0, sizeof (addr)); - addr.sin_family = AF_INET; - - #ifndef __UCLIBC__ /* neither getrpcbynumber() nor getrpcbynumber_r() is SuSv3 */ diff --git a/meta/packages/nfs-utils/nfs-utils-1.0.6/acinclude-lossage.patch b/meta/packages/nfs-utils/nfs-utils-1.0.6/acinclude-lossage.patch deleted file mode 100644 index 0d2d7f382..000000000 --- a/meta/packages/nfs-utils/nfs-utils-1.0.6/acinclude-lossage.patch +++ /dev/null @@ -1,142 +0,0 @@ ---- nfs-utils-1.0.6/acinclude.m4.old 2004-11-07 12:28:58.000000000 +0000 -+++ nfs-utils-1.0.6/acinclude.m4 2000-10-11 22:49:45.000000000 +0100 -@@ -0,0 +1,139 @@ -+dnl aclocal.m4 -- custom autoconf macros for various purposes -+dnl Updated for Autoconf v2 -+dnl -+dnl ******** save/restore stuff ********** -+define(AC_KNFSD_SAVE, -+ [AC_LANG_SAVE -+ save_LDFLAGS=$LDFLAGS -+ save_CFLAGS=$CFLAGS -+ save_CXXFLAGS=$CXXFLAGS -+ save_LIBS=$LIBS -+])dnl -+define(AC_KNFSD_RESTORE, -+ [LDFLAGS=$save_LDFLAGS -+ CFLAGS=$save_CFLAGS -+ CXXFLAGS=$save_CXXFLAGS -+ LIBS=$save_LIBS -+ AC_LANG_RESTORE -+])dnl -+dnl *********** GNU libc 2 *************** -+define(AC_GNULIBC, -+ [AC_MSG_CHECKING(for GNU libc2) -+ AC_CACHE_VAL(knfsd_cv_glibc2, -+ [AC_TRY_CPP([ -+ #include -+ #if !defined(__GLIBC__) -+ # error Nope -+ #endif], knfsd_cv_glibc2=yes, knfsd_cv_glibc2=no)]) -+ AC_MSG_RESULT($knfsd_cv_glibc2) -+ if test $knfsd_cv_glibc2 = yes; then -+ CFLAGS="$CFLAGS -D_GNU_SOURCE" -+ CXXFLAGS="$CXXFLAGS -D_GNU_SOURCE" -+ fi -+]) dnl -+dnl -+dnl ************* egcs ******************* -+define(AC_PROG_EGCS, -+ [AC_MSG_CHECKING(for egcs) -+ AC_CACHE_VAL(knfsd_cv_prog_EGCS, -+ [case `$CC --version 2>/dev/null` in -+ egcs*) -+ knfsd_cv_prog_EGCS=yes;; -+ *) -+ knfsd_cv_prog_EGCS=no;; -+ esac -+ ]) -+ AC_MSG_RESULT($knfsd_cv_prog_EGCS) -+ test $knfsd_cv_prog_EGCS = yes && AC_DEFINE(HAVE_EGCS) -+]) dnl -+dnl *********** sizeof(dev_t) ************** -+dnl ** We have to kludge this rather than use AC_CHECK_SIZEOF because -+dnl ** we have to include sys/types.h. Ugh. -+define(AC_DEV_T_SIZE, -+ [AC_MSG_CHECKING(size of dev_t) -+ AC_CACHE_VAL(ac_cv_sizeof_dev_t, -+ [AC_TRY_LINK( -+ [#include -+ #include -+ main() -+ { -+ FILE *f=fopen("conftestval", "w"); -+ if (!f) exit(1); -+ fprintf(f, "%d\n", sizeof(dev_t)); -+ exit(0); -+ }], ac_cv_sizeof_dev_t=`cat conftestval`, ac_cv_sizeof_dev_t=0)]) -+ AC_MSG_RESULT($ac_cv_sizeof_dev_t) -+ AC_DEFINE(SIZEOF_DEV_T,$ac_cv_sizeof_dev_t) -+ ]) -+dnl *********** sizeof(xxx_t) ************** -+dnl ** Overwrite the AC_CHECK_SIZEOF macro as we must include sys/types.h -+define([AC_CHECK_SIZEOF], -+ [changequote(<<, >>)dnl -+ define(<>,translit(sizeof_$1, [a-z *], [A-Z_P]))dnl -+ define(<>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl -+ changequote([, ])dnl -+ AC_MSG_CHECKING(size of $1) -+ AC_CACHE_VAL(AC_CV_NAME, -+ [AC_TRY_RUN( -+ [#include -+ #include -+ main() -+ { -+ FILE *f=fopen("conftestval", "w"); -+ if (!f) exit(1); -+ fprintf(f, "%d\n", sizeof($1)); -+ exit(0); -+ }], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0)]) -+ AC_MSG_RESULT($AC_CV_NAME) -+ AC_DEFINE_UNQUOTED(AC_TYPE_NAME,$AC_CV_NAME) -+ undefine([AC_TYPE_NAME])dnl -+ undefine([AC_CV_NAME])dnl -+ ]) -+dnl *********** BSD vs. POSIX signal handling ************** -+define([AC_BSD_SIGNALS], -+ [AC_MSG_CHECKING(for BSD signal semantics) -+ AC_CACHE_VAL(knfsd_cv_bsd_signals, -+ [AC_TRY_RUN([ -+ #include -+ #include -+ #include -+ -+ static int counter = 0; -+ static RETSIGTYPE handler(int num) { counter++; } -+ -+ int main() -+ { -+ int s; -+ if ((s = fork()) < 0) return 1; -+ if (s != 0) { -+ if (wait(&s) < 0) return 1; -+ return WIFSIGNALED(s)? 1 : 0; -+ } -+ -+ signal(SIGHUP, handler); -+ kill(getpid(), SIGHUP); kill(getpid(), SIGHUP); -+ return (counter == 2)? 0 : 1; -+ } -+ ], knfsd_cv_bsd_signals=yes, knfsd_cv_bsd_signals=no)]) dnl -+ AC_MSG_RESULT($knfsd_cv_bsd_signals) -+ test $knfsd_cv_bsd_signals = yes && AC_DEFINE(HAVE_BSD_SIGNALS) -+])dnl -+dnl *********** the tcp wrapper library *************** -+define(AC_TCP_WRAPPER, -+ [AC_MSG_CHECKING(for the tcp wrapper library) -+ AC_CACHE_VAL(knfsd_cv_tcp_wrapper, -+ [old_LIBS="$LIBS" -+ LIBS="$LIBS -lwrap $LIBNSL" -+ AC_TRY_LINK([ -+ int deny_severity = 0; -+ int allow_severity = 0;], -+ [return hosts_ctl ("nfsd", "", "")], -+ knfsd_cv_tcp_wrapper=yes, knfsd_cv_tcp_wrapper=no) -+ LIBS="$old_LIBS"]) -+ AC_MSG_RESULT($knfsd_cv_tcp_wrapper) -+ if test "$knfsd_cv_tcp_wrapper" = yes; then -+ CFLAGS="$CFLAGS -DHAVE_TCP_WRAPPER" -+ CXXFLAGS="$CXXFLAGS -DHAVE_TCP_WRAPPER" -+ LIBWRAP="-lwrap" -+ fi -+]) dnl diff --git a/meta/packages/nfs-utils/nfs-utils-1.0.6/forgotten-defines b/meta/packages/nfs-utils/nfs-utils-1.0.6/forgotten-defines deleted file mode 100644 index a18333100..000000000 --- a/meta/packages/nfs-utils/nfs-utils-1.0.6/forgotten-defines +++ /dev/null @@ -1,5 +0,0 @@ - -/* This defines the location of the NFS state files - * Warning: these must match definitions in config.mk! - */ -#define NFS_STATEDIR "/var/lib/nfs" diff --git a/meta/packages/nfs-utils/nfs-utils-1.0.6/kernel-2.6.18+.patch b/meta/packages/nfs-utils/nfs-utils-1.0.6/kernel-2.6.18+.patch deleted file mode 100644 index 219bed094..000000000 --- a/meta/packages/nfs-utils/nfs-utils-1.0.6/kernel-2.6.18+.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- nfs-utils-1.0.6/tools/getkversion/getkversion.c.orig 2007-02-22 12:33:54.000000000 +0000 -+++ nfs-utils-1.0.6/tools/getkversion/getkversion.c 2007-02-22 12:33:56.000000000 +0000 -@@ -12,6 +12,10 @@ - int - main(void) /* This is for Dan Popp ;) */ - { -+ -+#ifdef UTS_RELEASE - printf("%s\n", UTS_RELEASE); -+#endif -+ - return 0; - } diff --git a/meta/packages/nfs-utils/nfs-utils-1.0.6/rpcgen-lossage.patch b/meta/packages/nfs-utils/nfs-utils-1.0.6/rpcgen-lossage.patch deleted file mode 100644 index d1e1fb700..000000000 --- a/meta/packages/nfs-utils/nfs-utils-1.0.6/rpcgen-lossage.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- nfs-utils-1.0.6/config.mk.in.old 2004-11-07 12:30:05.000000000 +0000 -+++ nfs-utils-1.0.6/config.mk.in 2004-11-07 12:30:19.000000000 +0000 -@@ -52,7 +52,7 @@ - LN_S = ln -sf - RANLIB = @RANLIB@ - INDENT = indent --RPCGEN = $(TOP)bin/rpcgen -+RPCGEN = rpcgen - GETKVER = $(TOP)tools/getkversion - INSTALL = install - MAN2PS = groff -Tps -man diff --git a/meta/packages/nfs-utils/nfs-utils-1.0.6/stat-include.patch b/meta/packages/nfs-utils/nfs-utils-1.0.6/stat-include.patch deleted file mode 100644 index d0ae02246..000000000 --- a/meta/packages/nfs-utils/nfs-utils-1.0.6/stat-include.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- nfs-utils-1.0.6/utils/statd/statd.c~ 2003-09-11 20:24:29.000000000 -1000 -+++ nfs-utils-1.0.6/utils/statd/statd.c 2005-03-27 03:11:03.025582700 -1000 -@@ -19,6 +19,7 @@ - #include - #include - #include -+#include - #include - #include "statd.h" - #include "version.h" - diff --git a/meta/packages/nfs-utils/nfs-utils/nfs-utils-1.0.6-uclibc.patch b/meta/packages/nfs-utils/nfs-utils/nfs-utils-1.0.6-uclibc.patch new file mode 100644 index 000000000..336dc0e26 --- /dev/null +++ b/meta/packages/nfs-utils/nfs-utils/nfs-utils-1.0.6-uclibc.patch @@ -0,0 +1,18 @@ +--- ./support/nfs/svc_socket.c.orig 2004-12-12 06:43:52.000000000 +0000 ++++ ./support/nfs/svc_socket.c 2004-12-12 06:50:04.000000000 +0000 +@@ -66,6 +66,7 @@ + memset ((char *) &addr, sizeof (addr)); + addr.sin_family = AF_INET; + ++#ifndef __UCLIBC__ /* neither getrpcbynumber() nor getrpcbynumber_r() is SuSv3 */ + ret = getrpcbynumber_r (number, &rpcbuf, rpcdata, sizeof rpcdata, + &rpcp); + if (ret == 0 && rpcp != NULL) +@@ -99,6 +100,7 @@ + } + } + else ++#endif + { + if (bindresvport (sock, &addr)) + { diff --git a/meta/packages/nfs-utils/nfs-utils/nfsserver b/meta/packages/nfs-utils/nfs-utils/nfsserver new file mode 100644 index 000000000..9d02e8584 --- /dev/null +++ b/meta/packages/nfs-utils/nfs-utils/nfsserver @@ -0,0 +1,161 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: nfs-kernel-server +# Required-Start: $remote_fs $portmap hwclock +# Required-Stop: $remote_fs $portmap hwclock +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Kernel NFS server support +# Description: NFS is a popular protocol for file sharing across +# TCP/IP networks. This service provides NFS server +# functionality, which is configured via the +# /etc/exports file. +### END INIT INFO +# +# Startup script for nfs-utils +# +# +# The environment variable NFS_SERVERS may be set in /etc/default/nfsd +# Other control variables may be overridden here too +test -r /etc/default/nfsd && . /etc/default/nfsd +# +# Location of executables: +test -x "$NFS_MOUNTD" || NFS_MOUNTD=/usr/sbin/mountd +test -x "$NFS_NFSD" || NFS_NFSD=/usr/sbin/nfsd +test -x "$NFS_STATD" || NFS_STATD=/usr/sbin/statd +# +# The user mode program must also exist (it just starts the kernel +# threads using the kernel module code). +test -x "$NFS_MOUNTD" || exit 0 +test -x "$NFS_NFSD" || exit 0 +# +# Default is 8 threads, value is settable between 1 and the truely +# ridiculous 99 +test "$NFS_SERVERS" -gt 0 && test "$NFS_SERVERS" -lt 100 || NFS_SERVERS=8 +# +# The default state directory is /var/lib/nfs +test -n "$NFS_STATEDIR" || NFS_STATEDIR=/var/lib/nfs +# +#---------------------------------------------------------------------- +# Startup and shutdown functions. +# Actual startup/shutdown is at the end of this file. +#directories +create_directories(){ + echo -n 'creating NFS state directory: ' + mkdir -p "$NFS_STATEDIR" + ( cd "$NFS_STATEDIR" + umask 077 + mkdir -p sm sm.bak + test -w sm/state || { + rm -f sm/state + :>sm/state + } + umask 022 + for file in xtab etab smtab rmtab + do + test -w "$file" || { + rm -f "$file" + :>"$file" + } + done + ) + echo done +} +#mountd +start_mountd(){ + echo -n 'starting mountd: ' + start-stop-daemon --start --exec "$NFS_MOUNTD" -- "-f /etc/exports $@" + echo done +} +stop_mountd(){ + echo -n 'stopping mountd: ' + start-stop-daemon --stop --quiet --exec "$NFS_MOUNTD" + echo done +} +# +#nfsd +start_nfsd(){ + echo -n "starting $1 nfsd kernel threads: " + start-stop-daemon --start --exec "$NFS_NFSD" -- "$@" + echo done +} +delay_nfsd(){ + for delay in 0 1 2 3 4 5 6 7 8 9 + do + if pidof nfsd >/dev/null + then + echo -n . + sleep 1 + else + return 0 + fi + done + return 1 +} +stop_nfsd(){ + # WARNING: this kills any process with the executable + # name 'nfsd'. + echo -n 'stopping nfsd: ' + start-stop-daemon --stop --quiet --signal 1 --name nfsd + if delay_nfsd || { + echo failed + echo ' using signal 9: ' + start-stop-daemon --stop --quiet --signal 9 --name nfsd + delay_nfsd + } + then + echo done + # This will remove, recursively, dependencies + echo -n 'removing nfsd kernel module: ' + if modprobe -r nfsd + then + echo done + else + echo failed + fi + else + echo failed + fi +} + +#statd +start_statd(){ + echo -n "starting statd: " + start-stop-daemon --start --exec "$NFS_STATD" + echo done +} +stop_statd(){ + # WARNING: this kills any process with the executable + # name 'statd'. + echo -n 'stopping statd: ' + start-stop-daemon --stop --quiet --signal 1 --name statd + echo done +} +#---------------------------------------------------------------------- +# +# supported options: +# start +# stop +# reload: reloads the exports file +# restart: stops and starts mountd +#FIXME: need to create the /var/lib/nfs/... directories +case "$1" in +start) create_directories + start_nfsd "$NFS_SERVERS" + start_mountd + start_statd + test -r /etc/exports && exportfs -a;; +stop) exportfs -ua + stop_statd + stop_mountd + stop_nfsd;; +reload) test -r /etc/exports && exportfs -r;; +restart)exportfs -ua + stop_mountd + stop_statd + # restart does not restart the kernel threads, + # only the user mode processes + start_mountd + start_statd + test -r /etc/exports && exportfs -a;; +esac diff --git a/meta/packages/nfs-utils/nfs-utils_1.0.6.bb b/meta/packages/nfs-utils/nfs-utils_1.0.6.bb deleted file mode 100644 index 1ffb96a46..000000000 --- a/meta/packages/nfs-utils/nfs-utils_1.0.6.bb +++ /dev/null @@ -1,78 +0,0 @@ -DESCRIPTION = "userspace utilities for kernel nfs" -HOMEPAGE = "http://nfs.sourceforge.net/" -SECTION = "console/network" -PRIORITY = "optional" -LICENSE = "GPLv2+" -PR = "r14" - -SRC_URI = "${SOURCEFORGE_MIRROR}/nfs/nfs-utils-${PV}.tar.gz \ - file://acinclude-lossage.patch;patch=1 \ - file://rpcgen-lossage.patch;patch=1 \ - file://stat-include.patch;patch=1 \ - file://nfs-utils-1.0.6-uclibc.patch;patch=1 \ - file://kernel-2.6.18+.patch;patch=1 \ - file://uclibc_bzero_fix.patch;patch=1 \ - file://nfsserver \ - file://forgotten-defines" - -S = "${WORKDIR}/nfs-utils-${PV}/" - -PARALLEL_MAKE = "" - -# Only kernel-module-nfsd is required here (but can be built-in) - the nfsd module will -# pull in the remainder of the dependencies. -RDEPENDS = "portmap" -RRECOMMENDS = "kernel-module-nfsd" - -INITSCRIPT_NAME = "nfsserver" -# The server has no dependencies at the user run levels, so just put -# it in at the default levels. It must be terminated before the network -# in the shutdown levels, but that works fine. -INITSCRIPT_PARAMS = "defaults" - -inherit autotools update-rc.d - -EXTRA_OECONF = "--with-statduser=nobody \ - --enable-nfsv3 \ - --with-statedir=/var/lib/nfs" - -do_compile() { - # UGLY HACK ALERT - cat ${WORKDIR}/forgotten-defines >> ${S}/support/include/config.h - oe_runmake 'BUILD=1' -} - -INHIBIT_AUTO_STAGE = "1" - -do_install() { - install -d ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/nfsserver ${D}${sysconfdir}/init.d/nfsserver - - install -d ${D}${sbindir} - install -m 0755 ${S}/utils/exportfs/exportfs ${D}${sbindir}/exportfs - install -m 0755 ${S}/utils/lockd/lockd ${D}${sbindir}/lockd - install -m 0755 ${S}/utils/mountd/mountd ${D}${sbindir}/mountd - install -m 0755 ${S}/utils/nfsd/nfsd ${D}${sbindir}/nfsd - install -m 0755 ${S}/utils/nfsstat/nfsstat ${D}${sbindir}/nfsstat - install -m 0755 ${S}/utils/nhfsstone/nhfsgraph ${D}${sbindir}/nhfsgraph - install -m 0755 ${S}/utils/nhfsstone/nhfsnums ${D}${sbindir}/nhfsnums - install -m 0755 ${S}/utils/nhfsstone/nhfsrun ${D}${sbindir}/nhfsrun - install -m 0755 ${S}/utils/nhfsstone/nhfsstone ${D}${sbindir}/nhfsstone - install -m 0755 ${S}/utils/rquotad/rquotad ${D}${sbindir}/rquotad - install -m 0755 ${S}/utils/showmount/showmount ${D}${sbindir}/showmount - install -m 0755 ${S}/utils/statd/statd ${D}${sbindir}/statd - - install -d ${D}${mandir}/man8 - install -m 0644 ${S}/utils/exportfs/exportfs.man ${D}${mandir}/man8/exportfs.8 - install -m 0644 ${S}/utils/lockd/lockd.man ${D}${mandir}/man8/lockd.8 - install -m 0644 ${S}/utils/mountd/mountd.man ${D}${mandir}/man8/mountd.8 - install -m 0644 ${S}/utils/nfsd/nfsd.man ${D}${mandir}/man8/nfsd.8 - install -m 0644 ${S}/utils/nfsstat/nfsstat.man ${D}${mandir}/man8/nfsstat.8 - install -m 0644 ${S}/utils/nhfsstone/nhfsgraph.man ${D}${mandir}/man8/nhfsgraph.8 - install -m 0644 ${S}/utils/nhfsstone/nhfsnums.man ${D}${mandir}/man8/nhfsnums.8 - install -m 0644 ${S}/utils/nhfsstone/nhfsrun.man ${D}${mandir}/man8/nhfsrun.8 - install -m 0644 ${S}/utils/nhfsstone/nhfsstone.man ${D}${mandir}/man8/nhfsstone.8 - install -m 0644 ${S}/utils/rquotad/rquotad.man ${D}${mandir}/man8/rquotad.8 - install -m 0644 ${S}/utils/showmount/showmount.man ${D}${mandir}/man8/showmount.8 - install -m 0644 ${S}/utils/statd/statd.man ${D}${mandir}/man8/statd.8 -} diff --git a/meta/packages/nfs-utils/nfs-utils_1.2.2.bb b/meta/packages/nfs-utils/nfs-utils_1.2.2.bb new file mode 100644 index 000000000..cbcddd8c7 --- /dev/null +++ b/meta/packages/nfs-utils/nfs-utils_1.2.2.bb @@ -0,0 +1,54 @@ +DESCRIPTION = "userspace utilities for kernel nfs" +HOMEPAGE = "http://nfs.sourceforge.net/" +SECTION = "console/network" +PRIORITY = "optional" + +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3" + +# util-linux for libblkid +DEPENDS = "libcap libnfsidmap libevent util-linux" +RDEPENDS = "portmap" +RRECOMMENDS = "kernel-module-nfsd" + +PR = "r0" + +SRC_URI = "${SOURCEFORGE_MIRROR}/nfs/nfs-utils-${PV}.tar.bz2 \ + file://nfs-utils-1.0.6-uclibc.patch \ + file://nfsserver" + +S = "${WORKDIR}/nfs-utils-${PV}/" + +PARALLEL_MAKE = "" + +# Only kernel-module-nfsd is required here (but can be built-in) - the nfsd module will +# pull in the remainder of the dependencies. + +INITSCRIPT_NAME = "nfsserver" +# The server has no dependencies at the user run levels, so just put +# it in at the default levels. It must be terminated before the network +# in the shutdown levels, but that works fine. +INITSCRIPT_PARAMS = "defaults" + +inherit autotools update-rc.d + +# --enable-uuid is need for cross-compiling +EXTRA_OECONF = "--with-statduser=nobody \ + --enable-nfsv41 \ + --enable-uuid \ + --disable-gss \ + --disable-tirpc \ + --without-tcp-wrappers \ + --with-statedir=/var/lib/nfs" + +INHIBIT_AUTO_STAGE = "1" + +do_install_append () { + install -d ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/nfsserver ${D}${sysconfdir}/init.d/nfsserver + + # the following are built by CC_FOR_BUILD + rm -f ${D}${sbindir}/rpcdebug + rm -f ${D}${sbindir}/rpcgen + rm -f ${D}${sbindir}/locktest +} -- cgit v1.2.3