Patchwork [04/11] rpcbind: Dont use nss with uclibc

login
register
mail settings
Submitter Khem Raj
Date Jan. 24, 2013, 9:07 p.m.
Message ID <42bd84e2dd6a8f88e8e8433ccf0d0c4d4866cc6e.1359061155.git.raj.khem@gmail.com>
Download mbox | patch
Permalink /patch/43317/
State New
Headers show

Comments

Khem Raj - Jan. 24, 2013, 9:07 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     |    8 +++
 3 files changed, 98 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
Richard Purdie - Jan. 25, 2013, 2:20 p.m.
On Thu, 2013-01-24 at 13:07 -0800, Khem Raj wrote:
> 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     |    8 +++
>  3 files changed, 98 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
> 
> 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..7b723df 100644
> --- a/meta/recipes-extended/rpcbind/rpcbind_0.2.0.bb
> +++ b/meta/recipes-extended/rpcbind/rpcbind_0.2.0.bb
> @@ -13,8 +13,16 @@ 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 ?= ""
> +
> +LDFLAGS += "-lssl"

The LDFLAGS change should really be marked as ublibc too...

Cheers,

Richard
Khem Raj - Jan. 25, 2013, 5:22 p.m.
On Fri, Jan 25, 2013 at 6:20 AM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
>> +
>> +LDFLAGS += "-lssl"
>
> The LDFLAGS change should really be marked as ublibc too...
>

actually this change is not needed at all since I change libtirpc to
not need ssl so I have removed it and pushed a new
patch into the pull tree rebased on todays master.

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..7b723df 100644
--- a/meta/recipes-extended/rpcbind/rpcbind_0.2.0.bb
+++ b/meta/recipes-extended/rpcbind/rpcbind_0.2.0.bb
@@ -13,8 +13,16 @@  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 ?= ""
+
+LDFLAGS += "-lssl"
+
 SRC_URI[md5sum] = "1a77ddb1aaea8099ab19c351eeb26316"
 SRC_URI[sha256sum] = "c92f263e0353887f16379d7708ef1fb4c7eedcf20448bc1e4838f59497a00de3"