[oe-commits] Bernhard Reutner-Fischer : nfs-utils: add version 1.2.3

git version control git at git.openembedded.org
Thu May 5 18:46:02 UTC 2011


Module: openembedded.git
Branch: aldot/fixes
Commit: b291d8177ca9f414d230dcf8e19718d0ec9fd29b
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=b291d8177ca9f414d230dcf8e19718d0ec9fd29b

Author: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
Date:   Thu May  5 20:33:24 2011 +0200

nfs-utils: add version 1.2.3

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>

---

 recipes/nfs-utils/files/nfs-utils-uclibc.patch     |   90 ++++++++++++++++++++
 .../files/shortopt-mode-for-install.patch          |   34 ++++++++
 recipes/nfs-utils/nfs-utils_1.2.3.bb               |   49 +++++++++++
 3 files changed, 173 insertions(+), 0 deletions(-)

diff --git a/recipes/nfs-utils/files/nfs-utils-uclibc.patch b/recipes/nfs-utils/files/nfs-utils-uclibc.patch
new file mode 100644
index 0000000..eaa9cc3
--- /dev/null
+++ b/recipes/nfs-utils/files/nfs-utils-uclibc.patch
@@ -0,0 +1,90 @@
+diff -rdup nfs-utils-1.2.3.oorig/configure.ac nfs-utils-1.2.3/configure.ac
+--- nfs-utils-1.2.3.oorig/configure.ac	2010-09-28 14:24:16.000000000 +0200
++++ nfs-utils-1.2.3/configure.ac	2011-05-05 19:59:24.639099548 +0200
+@@ -360,6 +360,27 @@ AC_CHECK_SIZEOF(size_t)
+ AC_CHECK_SIZEOF(socklen_t)
+ 
+ 
++dnl ### A macro to determine whether statfs64 is defined.
++AC_DEFUN([AC_STATFS64],
++[AC_MSG_CHECKING(for statfs64 in sys/(statfs|vfs).h)
++AC_CACHE_VAL(ac_cv_type_statfs64,
++[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#ifdef __linux__
++#include <linux/types.h>
++#include <sys/statfs.h>
++#else
++#include <sys/vfs.h>
++#endif]], [[struct statfs64 st;]])],[ac_cv_type_statfs64=yes],[ac_cv_type_statfs64=no])])
++AC_MSG_RESULT($ac_cv_type_statfs64)
++if test "$ac_cv_type_statfs64" = yes
++then
++	AC_DEFINE([HAVE_STATFS64], 1, [Define if statfs64 is available in sys/statfs.h or sys/vfs.h.])
++else
++	AC_DEFINE_UNQUOTED(statfs64, statfs, [Define to statfs64 replacement. Attention: Just use small exports!])
++fi
++])
++AC_STATFS64
++
++
+ dnl *************************************************************
+ dnl Export some path names to config.h
+ dnl *************************************************************
+diff -rdup nfs-utils-1.2.3.oorig/support/include/sockaddr.h nfs-utils-1.2.3/support/include/sockaddr.h
+--- nfs-utils-1.2.3.oorig/support/include/sockaddr.h	2010-09-28 14:24:16.000000000 +0200
++++ nfs-utils-1.2.3/support/include/sockaddr.h	2011-05-05 19:41:55.007099092 +0200
+@@ -20,7 +20,10 @@
+ #ifndef NFS_UTILS_SOCKADDR_H
+ #define NFS_UTILS_SOCKADDR_H
+ 
++#include <features.h>
++#ifndef __UCLIBC__
+ #include <libio.h>
++#endif
+ #include <stdbool.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+diff -rdup nfs-utils-1.2.3.oorig/support/nfs/svc_socket.c nfs-utils-1.2.3/support/nfs/svc_socket.c
+--- nfs-utils-1.2.3.oorig/support/nfs/svc_socket.c	2010-09-28 14:24:16.000000000 +0200
++++ nfs-utils-1.2.3/support/nfs/svc_socket.c	2011-05-04 19:37:53.575074050 +0200
+@@ -67,8 +67,13 @@ svc_socket (u_long number, int type, int
+   memset (&addr, 0, sizeof (addr));
+   addr.sin_family = AF_INET;
+ 
++#if defined __UCLIBC__ && !defined __UCLIBC_HAS_REENTRANT_RPC__
++  rpcp = getrpcbynumber (number);
++  ret = 0;
++#else
+   ret = getrpcbynumber_r (number, &rpcbuf, rpcdata, sizeof rpcdata,
+ 			  &rpcp);
++#endif
+   if (ret == 0 && rpcp != NULL)
+     {
+       /* First try name.  */
+diff -rdup nfs-utils-1.2.3.oorig/utils/exportfs/exportfs.c nfs-utils-1.2.3/utils/exportfs/exportfs.c
+--- nfs-utils-1.2.3.oorig/utils/exportfs/exportfs.c	2010-09-28 14:24:16.000000000 +0200
++++ nfs-utils-1.2.3/utils/exportfs/exportfs.c	2011-05-05 19:46:26.511099210 +0200
+@@ -32,6 +32,10 @@
+ #include "exportfs.h"
+ #include "xlog.h"
+ 
++/* #if defined __UCLIBC__ && !defined __UCLIBC_HAS_LFS__
++# define statfs64 statfs
++#endif */
++
+ static void	export_all(int verbose);
+ static void	exportfs(char *arg, char *options, int verbose);
+ static void	unexportfs(char *arg, int verbose);
+diff -rdup nfs-utils-1.2.3.oorig/utils/mountd/cache.c nfs-utils-1.2.3/utils/mountd/cache.c
+--- nfs-utils-1.2.3.oorig/utils/mountd/cache.c	2010-09-28 14:24:16.000000000 +0200
++++ nfs-utils-1.2.3/utils/mountd/cache.c	2011-05-05 19:49:18.123099455 +0200
+@@ -37,6 +37,10 @@
+ #include "blkid/blkid.h"
+ #endif
+ 
++
++#if defined __UCLIBC__ && !defined __UCLIBC_HAS_LFS__
++# define statfs64 statfs
++#endif
+ /*
+  * Invoked by RPC service loop
+  */
diff --git a/recipes/nfs-utils/files/shortopt-mode-for-install.patch b/recipes/nfs-utils/files/shortopt-mode-for-install.patch
new file mode 100644
index 0000000..7f65a75
--- /dev/null
+++ b/recipes/nfs-utils/files/shortopt-mode-for-install.patch
@@ -0,0 +1,34 @@
+diff -rdup nfs-utils-1.2.3.oorig/tools/mountstats/Makefile.am nfs-utils-1.2.3/tools/mountstats/Makefile.am
+--- nfs-utils-1.2.3.oorig/tools/mountstats/Makefile.am	2010-09-28 14:24:16.000000000 +0200
++++ nfs-utils-1.2.3/tools/mountstats/Makefile.am	2011-05-05 20:15:42.359099997 +0200
+@@ -8,6 +8,6 @@ EXTRA_DIST	= $(man8_MANS) $(PYTHON_FILES
+ all-local: $(PYTHON_FILES)
+ 
+ install-data-hook:
+-	$(INSTALL) --mode 755 mountstats.py $(DESTDIR)$(sbindir)/mountstats
++	$(INSTALL) -m 755 mountstats.py $(DESTDIR)$(sbindir)/mountstats
+ 
+ MAINTAINERCLEANFILES=Makefile.in
+diff -rdup nfs-utils-1.2.3.oorig/tools/mountstats/Makefile.in nfs-utils-1.2.3/tools/mountstats/Makefile.in
+--- nfs-utils-1.2.3.oorig/tools/mountstats/Makefile.in	2010-09-28 14:32:33.000000000 +0200
++++ nfs-utils-1.2.3/tools/mountstats/Makefile.in	2011-05-05 20:15:24.307099774 +0200
+@@ -496,7 +496,7 @@ uninstall-man: uninstall-man8
+ all-local: $(PYTHON_FILES)
+ 
+ install-data-hook:
+-	$(INSTALL) --mode 755 mountstats.py $(DESTDIR)$(sbindir)/mountstats
++	$(INSTALL) -m 755 mountstats.py $(DESTDIR)$(sbindir)/mountstats
+ 
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
+ # Otherwise a system limit (for SysV at least) may be exceeded.
+diff -rdup nfs-utils-1.2.3.oorig/tools/nfs-iostat/Makefile.am nfs-utils-1.2.3/tools/nfs-iostat/Makefile.am
+--- nfs-utils-1.2.3.oorig/tools/nfs-iostat/Makefile.am	2010-09-28 14:24:16.000000000 +0200
++++ nfs-utils-1.2.3/tools/nfs-iostat/Makefile.am	2011-05-05 20:22:05.767100057 +0200
+@@ -8,6 +8,6 @@ EXTRA_DIST	= $(man8_MANS) $(PYTHON_FILES
+ all-local: $(PYTHON_FILES)
+ 
+ install-data-hook:
+-	$(INSTALL) --mode 755 nfs-iostat.py $(DESTDIR)$(sbindir)/nfsiostat
++	$(INSTALL) -m 755 nfs-iostat.py $(DESTDIR)$(sbindir)/nfsiostat
+ 
+ MAINTAINERCLEANFILES=Makefile.in
diff --git a/recipes/nfs-utils/nfs-utils_1.2.3.bb b/recipes/nfs-utils/nfs-utils_1.2.3.bb
new file mode 100644
index 0000000..5316135
--- /dev/null
+++ b/recipes/nfs-utils/nfs-utils_1.2.3.bb
@@ -0,0 +1,49 @@
+DESCRIPTION = "userspace utilities for kernel nfs"
+PRIORITY = "optional"
+SECTION = "console/network"
+LICENSE = "GPLv2"
+
+PR = "r0"
+
+DEPENDS = "util-linux-ng tcp-wrappers libevent"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/nfs/nfs-utils-${PV}.tar.bz2 \
+	file://nfs-utils-uclibc.patch \
+	file://shortopt-mode-for-install.patch \
+	file://nfsserver \
+   "
+
+#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_${PN} = "portmap"
+RRECOMMENDS_${PN} = "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 \
+		--disable-nfsv4 \
+		--disable-gss \
+		--disable-uuid \
+		--disable-tirpc \
+		--with-statedir=/var/lib/nfs"
+
+do_install_append() {
+	install -D -m 0755 ${WORKDIR}/nfsserver ${D}${sysconfdir}/init.d/nfsserver
+
+	rm -f ${D}${sbindir}/rpcdebug
+}
+
+PACKAGES =+ "nfs-utils-client"
+FILES_nfs-utils-client = "${base_sbindir}/*mount.nfs*"
+
+SRC_URI[md5sum] = "1131dc5f27c4f3905a6e7ee0d594fd4d"
+SRC_URI[sha256sum] = "5575ece941097cbfa67fbe0d220dfa11b73f5e6d991e7939c9339bd72259ff19"





More information about the Openembedded-commits mailing list