From 1ae0bf6ef2c6db41bf98a8b89bc125e034b1d017 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Wed, 13 Jun 2007 17:21:03 +0000 Subject: [PATCH] Add nfs-utils from #1842 SVN-Revision: 7611 --- net/nfs-utils/Makefile | 60 +++++++++++++++++++ .../patches/000-getrpcbynumber_r.patch | 15 +++++ .../patches/001-no-getgrouplist.patch | 31 ++++++++++ 3 files changed, 106 insertions(+) create mode 100644 net/nfs-utils/Makefile create mode 100644 net/nfs-utils/patches/000-getrpcbynumber_r.patch create mode 100644 net/nfs-utils/patches/001-no-getgrouplist.patch diff --git a/net/nfs-utils/Makefile b/net/nfs-utils/Makefile new file mode 100644 index 000000000..e5ab881c3 --- /dev/null +++ b/net/nfs-utils/Makefile @@ -0,0 +1,60 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# $Id: Makefile 6582 2007-03-16 20:21:39Z nbd $ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=nfs-utils +PKG_VERSION:=1.1.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://downloads.sourceforge.net/nfs/ +PKG_MD5SUM:=df88c6fe88a26f9797e74cb2d3291a2a + +PKG_BUILD_DEPENDS:=libgssapi librpcsecgss libnfsidmap libwrap + +include $(INCLUDE_DIR)/package.mk + +define Package/nfs-utils/Default + SECTION:=net + CATEGORY:=Network + URL:=http://sourceforge.net/projects/nfs/ +endef + +define Package/nfs-utils + $(call Package/nfs-utils/Default) + DEPENDS:=+libwrap +libevent +libblkid + TITLE:=updated mount utility (includes nfs4) + DESCRIPTION:=Updated mount.nfs command - allows mounting nfs4 volumes +endef + +CONFIGURE_ARGS += --disable-gss +TARGET_CFLAGS += -I$(PKG_BUILD_DIR)/lib +define Build/Compile + $(call Build/Compile/Default, \ + OPT="$(TARGET_CFLAGS)" \ + INSTALLSUID="install -m 4755" \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + all install \ + ) +endef + +define Package/Template + @if [ \! -f "$(PKG_INSTALL_DIR)/$(1)" ]; then \ + rm -f $(PKG_BUILD_DIR)/.built; \ + $(MAKE) $(PKG_BUILD_DIR)/.built; \ + fi + $(INSTALL_DIR) $(2) + $(CP) $(PKG_INSTALL_DIR)/$(1) $(2)/ +endef + +define Package/nfs-utils/install + $(call Package/Template,sbin/mount*,$(1)/sbin) +endef + +$(eval $(call BuildPackage,nfs-utils)) diff --git a/net/nfs-utils/patches/000-getrpcbynumber_r.patch b/net/nfs-utils/patches/000-getrpcbynumber_r.patch new file mode 100644 index 000000000..fa978b5df --- /dev/null +++ b/net/nfs-utils/patches/000-getrpcbynumber_r.patch @@ -0,0 +1,15 @@ +--- nfs-utils-1.1.0/support/nfs/svc_socket.c~ 2007-05-10 20:40:57.000000000 -0700 ++++ nfs-utils-1.1.0/support/nfs/svc_socket.c 2007-06-07 15:37:39.000000000 -0700 +@@ -67,8 +67,10 @@ + memset (&addr, 0, sizeof (addr)); + addr.sin_family = AF_INET; + +- ret = getrpcbynumber_r (number, &rpcbuf, rpcdata, sizeof rpcdata, +- &rpcp); ++// ret = getrpcbynumber_r (number, &rpcbuf, rpcdata, sizeof rpcdata, ++// &rpcp); ++ rpcp = getrpcbynumber (number); ++ ret = 0; + if (ret == 0 && rpcp != NULL) + { + /* First try name. */ diff --git a/net/nfs-utils/patches/001-no-getgrouplist.patch b/net/nfs-utils/patches/001-no-getgrouplist.patch new file mode 100644 index 000000000..09cfa8cef --- /dev/null +++ b/net/nfs-utils/patches/001-no-getgrouplist.patch @@ -0,0 +1,31 @@ +--- nfs-utils-1.1.0/utils/mountd/cache.c~ 2007-05-10 20:40:57.000000000 -0700 ++++ nfs-utils-1.1.0/utils/mountd/cache.c 2007-06-07 15:29:28.000000000 -0700 +@@ -131,17 +131,17 @@ + pw = getpwuid(uid); + if (!pw) + rv = -1; +- else { +- rv = getgrouplist(pw->pw_name, pw->pw_gid, groups, &ngroups); +- if (rv == -1 && ngroups >= 100) { +- groups = malloc(sizeof(gid_t)*ngroups); +- if (!groups) +- rv = -1; +- else +- rv = getgrouplist(pw->pw_name, pw->pw_gid, +- groups, &ngroups); +- } +- } ++// else { ++// rv = getgrouplist(pw->pw_name, pw->pw_gid, groups, &ngroups); ++// if (rv == -1 && ngroups >= 100) { ++// groups = malloc(sizeof(gid_t)*ngroups); ++// if (!groups) ++// rv = -1; ++// else ++// rv = getgrouplist(pw->pw_name, pw->pw_gid, ++// groups, &ngroups); ++// } ++// } + qword_printint(f, uid); + qword_printint(f, time(0)+30*60); + if (rv >= 0) { -- 2.30.2