From 60f41fb1b9665f77f9d706c75b3804b55793817b Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Wed, 13 Jun 2007 17:19:19 +0000 Subject: [PATCH] Add libnfsidmap SVN-Revision: 7607 --- libs/libnfsidmap/Makefile | 55 +++++++++++++++++++ .../patches/000-no-getgrouplist.patch | 15 +++++ 2 files changed, 70 insertions(+) create mode 100644 libs/libnfsidmap/Makefile create mode 100644 libs/libnfsidmap/patches/000-no-getgrouplist.patch diff --git a/libs/libnfsidmap/Makefile b/libs/libnfsidmap/Makefile new file mode 100644 index 000000000..7c837102c --- /dev/null +++ b/libs/libnfsidmap/Makefile @@ -0,0 +1,55 @@ +# +# Copyright (C) 2007 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# $Id: $ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libnfsidmap +PKG_VERSION:=0.20 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.citi.umich.edu/projects/nfsv4/linux/libnfsidmap/ +PKG_MD5SUM:=9233cb77876eb642374a0d2bcaba1170 + +include $(INCLUDE_DIR)/package.mk + +define Package/libnfsidmap + SECTION:=libs + CATEGORY:=Libraries + TITLE:=libnfsidmap, for compiling mount.nfs4 + DESCRIPTION:= needed for nfs-utils + URL:=http://www.citi.umich.edu/projects/nfsv4 +endef + +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 Build/InstallDev + mkdir -p $(STAGING_DIR)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/nfsidmap.h $(STAGING_DIR)/usr/include/ + mkdir -p $(STAGING_DIR)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnfsidmap.{a,so*} $(STAGING_DIR)/usr/lib + mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libnfsidmap.pc $(STAGING_DIR)/usr/lib/pkgconfig +endef + +define Build/UninstallDev + rm -rf \ + $(STAGING_DIR)/usr/include/nfsidmap.h + $(STAGING_DIR)/usr/lib/libnfsidmap.{a,so*} + $(STAGING_DIR)/usr/lib/pkgconfig/libnfsidmap.pc +endef + +$(eval $(call BuildPackage,libnfsidmap)) diff --git a/libs/libnfsidmap/patches/000-no-getgrouplist.patch b/libs/libnfsidmap/patches/000-no-getgrouplist.patch new file mode 100644 index 000000000..3f5a61750 --- /dev/null +++ b/libs/libnfsidmap/patches/000-no-getgrouplist.patch @@ -0,0 +1,15 @@ +--- libnfsidmap-0.20/nss.c~ 2007-02-05 08:13:05.000000000 -0800 ++++ libnfsidmap-0.20/nss.c 2007-06-07 15:18:45.000000000 -0700 +@@ -295,9 +295,9 @@ + ret = -ENOENT; + goto out; + } +- if (getgrouplist(pw->pw_name, pw->pw_gid, groups, ngroups) < 0) +- ret = -ERANGE; +- free(pw); ++ // if (getgrouplist(pw->pw_name, pw->pw_gid, groups, ngroups) < 0) ++ // ret = -ERANGE; ++ // free(pw); + out: + return ret; + } -- 2.30.2