Patchwork [1/3] rpcbind: Dont use nss with uclibc

login
register
mail settings
Submitter Khem Raj
Date Jan. 28, 2013, 7:58 p.m.
Message ID <9496d315c6d89dd6e4147cbdfd7b974fa4ed1d43.1359402980.git.raj.khem@gmail.com>
Download mbox | patch
Permalink /patch/43569/
State Accepted
Commit a8514d619830c976ae66cb582b8050908a85a7b5
Headers show

Comments

Khem Raj - Jan. 28, 2013, 7:58 p.m.
Add defines which otherwise are missing in uclibc nss

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../rpcbind/rpcbind/0001-uclibc-nss.patch          |   30 ++++++++++
 .../rpcbind/0002-uclibc-rpcsvc-defines.patch       |   60 ++++++++++++++++++++
 meta/recipes-extended/rpcbind/rpcbind_0.2.0.bb     |    6 ++
 3 files changed, 96 insertions(+)
 create mode 100644 meta/recipes-extended/rpcbind/rpcbind/0001-uclibc-nss.patch
 create mode 100644 meta/recipes-extended/rpcbind/rpcbind/0002-uclibc-rpcsvc-defines.patch

Patch

diff --git a/meta/recipes-extended/rpcbind/rpcbind/0001-uclibc-nss.patch b/meta/recipes-extended/rpcbind/rpcbind/0001-uclibc-nss.patch
new file mode 100644
index 0000000..afa55f3
--- /dev/null
+++ b/meta/recipes-extended/rpcbind/rpcbind/0001-uclibc-nss.patch
@@ -0,0 +1,30 @@ 
+Upstream-Status: Pending
+
+From b8f0d7b7318ba344c25785d6f5cf3f8de98012d4 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Tue, 2 Feb 2010 09:36:03 +0000
+Subject: [PATCH 1/2] uclibc-nss
+
+---
+ src/rpcbind.c |    4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+diff --git a/src/rpcbind.c b/src/rpcbind.c
+index 525ffba..1fe1a60 100644
+--- a/src/rpcbind.c
++++ b/src/rpcbind.c
+@@ -67,7 +67,11 @@
+ #include <pwd.h>
+ #include <string.h>
+ #include <errno.h>
++#if defined(__UCLIBC__)
++#define __nss_configure_lookup(x,y)
++#else
+ #include <nss.h>
++#endif
+ #include "config.h"
+ #include "rpcbind.h"
+ 
+-- 
+1.6.6.1
+
diff --git a/meta/recipes-extended/rpcbind/rpcbind/0002-uclibc-rpcsvc-defines.patch b/meta/recipes-extended/rpcbind/rpcbind/0002-uclibc-rpcsvc-defines.patch
new file mode 100644
index 0000000..c54fc96
--- /dev/null
+++ b/meta/recipes-extended/rpcbind/rpcbind/0002-uclibc-rpcsvc-defines.patch
@@ -0,0 +1,60 @@ 
+Upstream-Status: Pending
+
+From 077add040c2e30d3ac507362f4afe350f47be027 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Tue, 2 Feb 2010 09:47:57 +0000
+Subject: [PATCH 2/2] uclibc-rpcsvc-defines
+
+---
+ src/security.c |   28 ++++++++++++++++++++++++++++
+ 1 files changed, 28 insertions(+), 0 deletions(-)
+
+diff --git a/src/security.c b/src/security.c
+index 0edeac6..e9fed55 100644
+--- a/src/security.c
++++ b/src/security.c
+@@ -20,6 +20,32 @@
+ /*
+  * XXX for special case checks in check_callit.
+  */
++#if defined(__UCLIBC__)
++
++#define MOUNTPROC_MNT 1
++#define MOUNTPROC_UMNT 3
++
++#define NFS_PROGRAM	100003
++#define YPPROG		100004
++#define MOUNTPROG	100005
++#define YPBINDPROG	100007
++#define YPPASSWDPROG	100009
++#define RQUOTAPROG	100011
++
++#define YPPROC_NULL	0
++#define YPPROC_DOMAIN 	1
++#define YPPROC_DOMAIN_NONACK 2
++#define YPPROC_MATCH	3
++#define YPPROC_FIRST	4
++#define YPPROC_NEXT	5
++#define YPPROC_XFR	6
++#define YPPROC_CLEAR	7
++#define YPPROC_ALL	8
++
++#define YPBINDPROC_SETDOM	2
++
++#else
++
+ #include <rpcsvc/mount.h>
+ #include <rpcsvc/rquota.h>
+ #include <rpcsvc/nfs_prot.h>
+@@ -27,6 +53,8 @@
+ #include <rpcsvc/ypclnt.h>
+ #include <rpcsvc/yppasswd.h>
+ 
++#endif
++
+ #include "rpcbind.h"
+ 
+ #ifdef LIBWRAP
+-- 
+1.6.6.1
+
diff --git a/meta/recipes-extended/rpcbind/rpcbind_0.2.0.bb b/meta/recipes-extended/rpcbind/rpcbind_0.2.0.bb
index 9fb4f51..a438063 100644
--- a/meta/recipes-extended/rpcbind/rpcbind_0.2.0.bb
+++ b/meta/recipes-extended/rpcbind/rpcbind_0.2.0.bb
@@ -13,8 +13,14 @@  LIC_FILES_CHKSUM = "file://COPYING;md5=b46486e4c4a416602693a711bb5bfa39 \
 SRC_URI = "${SOURCEFORGE_MIRROR}/rpcbind/rpcbind-${PV}.tar.bz2 \
            file://init.d \
            file://fix_host_path.patch \
+           ${UCLIBCPATCHES} \
           "
 
+UCLIBCPATCHES_libc-uclibc = "file://0001-uclibc-nss.patch \
+                             file://0002-uclibc-rpcsvc-defines.patch \
+                            "
+UCLIBCPATCHES ?= ""
+
 SRC_URI[md5sum] = "1a77ddb1aaea8099ab19c351eeb26316"
 SRC_URI[sha256sum] = "c92f263e0353887f16379d7708ef1fb4c7eedcf20448bc1e4838f59497a00de3"