[packages_10.03.2] nfs-kernel-server: merge r28743, r28747, r28751, r28853, r28880...
authorJo-Philipp Wich <jow@openwrt.org>
Sun, 5 Feb 2012 15:41:13 +0000 (15:41 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sun, 5 Feb 2012 15:41:13 +0000 (15:41 +0000)
SVN-Revision: 30227

net/nfs-kernel-server/Makefile
net/nfs-kernel-server/files/nfsd.init
net/nfs-kernel-server/patches/001-nfs_utils_uclibc.patch [deleted file]
net/nfs-kernel-server/patches/002-no_ttycom_h.patch [deleted file]
net/nfs-kernel-server/patches/003-no_malloc_h.patch [deleted file]
net/nfs-kernel-server/patches/100-nfs_utils_uclibc.patch [new file with mode: 0644]
net/nfs-kernel-server/patches/101-no_malloc_h.patch [new file with mode: 0644]

index 38328224d20a465c2dcc5a72aa7557e468ff3ec1..a6f8e589863b0bec97fb0747474b3c5e1c62a5af 100644 (file)
@@ -7,9 +7,9 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=nfs-kernel-server
-PKG_VERSION:=1.1.6
-PKG_RELEASE:=1
-PKG_MD5SUM:=b0d1b8ec5c8c081a340cfc77bb8670cd
+PKG_VERSION:=1.2.5
+PKG_RELEASE:=2
+PKG_MD5SUM:=8395ac770720b83c5c469f88306d7765
 
 PKG_SOURCE_URL:=@SF/nfs
 PKG_SOURCE:=nfs-utils-$(PKG_VERSION).tar.bz2
@@ -73,8 +73,10 @@ TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib $(LIBRPC)
 CONFIGURE_ARGS += \
        --disable-gss \
        --disable-nfsv4 \
+       --disable-nfsv41 \
        --enable-static \
-       --enable-shared
+       --enable-shared \
+       --disable-caps
 
 MAKE_FLAGS += \
        OPT="$(TARGET_CFLAGS)" \
@@ -88,6 +90,7 @@ HOST_CFLAGS += -Dlinux
 HOST_CONFIGURE_ARGS += \
        --disable-gss \
        --disable-nfsv4 \
+       --disable-nfsv41 \
        --without-tcp-wrappers
 
 HOST_CONFIGURE_VARS += \
index c6ee8c8e30a75ab0a907449f459e41e9615dd18f..2531d591f84ce02c5ef88f4f13bf77b1311b7e96 100644 (file)
@@ -4,6 +4,8 @@
 START=60
 STOP=60
 
+SERVICE_USE_PID=1
+
 NFS_D=/var/lib/nfs
 LOCK_D=/var/lib/nfs/sm
 
@@ -15,17 +17,19 @@ start() {
        touch $NFS_D/rmtab
 
         sysctl -w fs.nfs.nlm_tcpport=32777 fs.nfs.nlm_udpport=32777 > /dev/null
-       /usr/sbin/rpc.statd -p 32778 -o 32779
+       service_start /usr/sbin/rpc.statd -p 32778 -o 32779
        /usr/sbin/exportfs -r
        /usr/sbin/rpc.nfsd
-       /usr/sbin/rpc.mountd -p 32780
+       SERVICE_WRITE_PID=1 \
+       SERVICE_DAEMONIZE=1 \
+       service_start /usr/sbin/rpc.mountd -p 32780 -F
 }
 
 stop() {
-       killall rpc.mountd 2> /dev/null
+       service_stop /usr/sbin/rpc.mountd
        rpc.nfsd 0 2> /dev/null
        /usr/sbin/exportfs -au
-       killall rpc.statd 2> /dev/null
+       service_stop /usr/sbin/rpc.statd
        grep -q /proc/fs/nfsd /proc/mounts && \
                umount /proc/fs/nfsd
 }
diff --git a/net/nfs-kernel-server/patches/001-nfs_utils_uclibc.patch b/net/nfs-kernel-server/patches/001-nfs_utils_uclibc.patch
deleted file mode 100644 (file)
index 9a561e8..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
---- a/utils/mountd/cache.c
-+++ b/utils/mountd/cache.c
-@@ -142,6 +142,7 @@ void auth_unix_gid(FILE *f)
-       pw = getpwuid(uid);
-       if (!pw)
-               rv = -1;
-+#ifndef __UCLIBC__
-       else {
-               rv = getgrouplist(pw->pw_name, pw->pw_gid, groups, &ngroups);
-               if (rv == -1 && ngroups >= 100) {
-@@ -153,6 +154,7 @@ void auth_unix_gid(FILE *f)
-                                                 groups, &ngroups);
-               }
-       }
-+#endif /* __UCLIBC__ */
-       qword_printint(f, uid);
-       qword_printint(f, time(0)+30*60);
-       if (rv >= 0) {
---- a/support/nfs/svc_socket.c
-+++ b/support/nfs/svc_socket.c
-@@ -66,9 +66,13 @@ svc_socket (u_long number, int type, int
-   memset (&addr, 0, 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);
-+#else
-+  rpcp = getrpcbynumber (number);
-+  ret = 0;
-+#endif
-   if (ret == 0 && rpcp != NULL)
-     {
-       /* First try name.  */
diff --git a/net/nfs-kernel-server/patches/002-no_ttycom_h.patch b/net/nfs-kernel-server/patches/002-no_ttycom_h.patch
deleted file mode 100644 (file)
index 8db2a07..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
---- a/tools/rpcgen/rpc_main.c
-+++ b/tools/rpcgen/rpc_main.c
-@@ -545,13 +545,6 @@ s_output(int argc, char **argv, char *in
-         timerflag = 1;
-       }
--#ifndef linux
--      if( !tirpcflag && inetdflag )
--        f_print(fout, "#include <sys/ttycom.h>/* TIOCNOTTY */\n");
--#else
--      if( !tirpcflag )
--        f_print(fout, "#include <sys/ttycom.h>/* TIOCNOTTY */\n");
--#endif
-       if( Cflag && (inetdflag || pmflag ) ) {
-         f_print(fout, "#ifdef __cplusplus\n");
-         f_print(fout, "#include <sysent.h> /* getdtablesize, open */\n"); 
---- a/tools/rpcgen/rpc_svcout.c
-+++ b/tools/rpcgen/rpc_svcout.c
-@@ -788,7 +788,6 @@ write_rpc_svc_fg(char *infile, char *sp)
-       else {
-         f_print(fout, "%si = open(\"/dev/tty\", 2);\n", sp);
-         f_print(fout, "%sif (i >= 0) {\n", sp);
--        f_print(fout, "%s\t(void) ioctl(i, TIOCNOTTY, (char *)NULL);\n", sp);;
-         f_print(fout, "%s\t(void) close(i);\n", sp);
-         f_print(fout, "%s}\n", sp);
-       }
diff --git a/net/nfs-kernel-server/patches/003-no_malloc_h.patch b/net/nfs-kernel-server/patches/003-no_malloc_h.patch
deleted file mode 100644 (file)
index 4595749..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/tools/rpcgen/rpc_cout.c
-+++ b/tools/rpcgen/rpc_cout.c
-@@ -38,7 +38,6 @@ static char sccsid[] = "@(#)rpc_cout.c 1
- #include <stdio.h>
- #include <string.h>
- #include <stdlib.h>
--#include <malloc.h>
- #include <ctype.h>
- #include "rpc_parse.h"
- #include "rpc_util.h"
diff --git a/net/nfs-kernel-server/patches/100-nfs_utils_uclibc.patch b/net/nfs-kernel-server/patches/100-nfs_utils_uclibc.patch
new file mode 100644 (file)
index 0000000..221f25f
--- /dev/null
@@ -0,0 +1,49 @@
+--- a/support/include/sockaddr.h
++++ b/support/include/sockaddr.h
+@@ -20,7 +20,10 @@
+ #ifndef NFS_UTILS_SOCKADDR_H
+ #define NFS_UTILS_SOCKADDR_H
++/* uClibc doesn't have/need libio.h */
++#ifndef __UCLIBC__
+ #include <libio.h>
++#endif
+ #include <stdbool.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+--- a/support/nfs/svc_socket.c
++++ b/support/nfs/svc_socket.c
+@@ -40,10 +40,13 @@ int getservport(u_long number, const cha
+       char rpcdata[1024], servdata[1024];
+       struct rpcent rpcbuf, *rpcp;
+       struct servent servbuf, *servp = NULL;
+-      int ret;
+-
++      int ret=0;
++#ifndef __UCLIBC__
+       ret = getrpcbynumber_r(number, &rpcbuf, rpcdata, sizeof rpcdata,
+                               &rpcp);
++#else
++      rpcp = getrpcbynumber (number);
++#endif
+       if (ret == 0 && rpcp != NULL) {
+               /* First try name.  */
+               ret = getservbyname_r(rpcp->r_name, proto, &servbuf, servdata,
+--- a/utils/mountd/cache.c
++++ b/utils/mountd/cache.c
+@@ -162,6 +162,7 @@ static void auth_unix_gid(FILE *f)
+       pw = getpwuid(uid);
+       if (!pw)
+               rv = -1;
++#ifndef __UCLIBC__
+       else {
+               rv = getgrouplist(pw->pw_name, pw->pw_gid, groups, &ngroups);
+               if (rv == -1 && ngroups >= groups_len) {
+@@ -176,6 +177,7 @@ static void auth_unix_gid(FILE *f)
+                       }
+               }
+       }
++#endif
+       qword_printuint(f, uid);
+       qword_printuint(f, time(0) + DEFAULT_TTL);
+       if (rv >= 0) {
diff --git a/net/nfs-kernel-server/patches/101-no_malloc_h.patch b/net/nfs-kernel-server/patches/101-no_malloc_h.patch
new file mode 100644 (file)
index 0000000..afe4c98
--- /dev/null
@@ -0,0 +1,10 @@
+--- a/tools/rpcgen/rpc_cout.c
++++ b/tools/rpcgen/rpc_cout.c
+@@ -36,7 +36,6 @@ static char sccsid[] = "@(#)rpc_cout.c 1
+ #include <stdio.h>
+ #include <string.h>
+ #include <stdlib.h>
+-#include <malloc.h>
+ #include <ctype.h>
+ #include "rpc_parse.h"
+ #include "rpc_util.h"