libnss: Add new package.
PATCH v2 1/1 libnss: Add new package.
NSS is the Network Security Services library developed as part of the Mozilla project. It provides similar functions to OpenSSL but allows MPL, GPL and LGPL licensing.
--- package/Config.in | 1 + package/libnss/Config.in | 17 +++++++++ package/libnss/libnss-cross.patch | 27 ++++++++++++++ package/libnss/libnss-uclibc.patch | 19 ++++++++++ package/libnss/libnss.mk | 67 ++++++++++++++++++++++++++++++++++++ 5 files changed, 131 insertions(+), 0 deletions(-) create mode 100644 package/libnss/Config.in create mode 100644 package/libnss/libnss-cross.patch create mode 100644 package/libnss/libnss-uclibc.patch create mode 100644 package/libnss/libnss.mk
v2 - Address issues raised by Peter on the list.
package/Config.in +1 -0
@@ -249,6 +249,7 @@ menu "Crypto" source "package/beecrypt/Config.in" source "package/libgcrypt/Config.in" source "package/libgpg-error/Config.in" +source "package/libnss/Config.in" source "package/openssl/Config.in" endmenu
package/libnss/Config.in new file +17 -0
@@ -0,0 +1,17 @@ +config BR2_PACKAGE_LIBNSS + bool "libnss" + select BR2_PACKAGE_LIBNSPR + select BR2_PACKAGE_SQLITE + select BR2_PACKAGE_ZLIB + depends on BR2_LARGEFILE + help + Network Security Services (NSS) is a set of libraries designed + to support development of security-enabled client and server + applications. Applications built with NSS can support SSL v2 + and v3, TLS, PKCS #5, PKCS #7, PKCS #11, PKCS #12, S/MIME, + and X.509 v3 certificates. + + http://www.mozilla.org/projects/security/pki/nss/ + +comment "libnss requires a toolchain with LARGEFILE support" + depends on !BR2_LARGEFILE
(quoted diff) +0 -0
b/package/libnss/libnss-cross.patch
new file mode 100644
index 0000000..8a5cd10
package/libnss/libnss-cross.patch new file +9 -0
@@ -0,0 +1,27 @@ + +This patch allows us to set a value for the cross compiler via TARGETCC without +setting CC on the command line. CC is used for host tools as well as cross +compiled code so we cannot define it on the command line without breaking +the host tools build. + +Signed-off-by: Will Newton <[email protected]> + +--- libnss-3.12.9.old/mozilla/security/coreconf/Linux.mk 2011-03-01
10:31:21.517847183 +0000
++++ libnss-3.12.9/mozilla/security/coreconf/Linux.mk 2011-03-01
10:33:42.688648237 +0000
+@@ -46,9 +46,13 @@
+ IMPL_STRATEGY = _PTH
+ endif
+
+-CC = gcc +-CCC = g++ +-RANLIB = ranlib
++TARGETCC = gcc
++TARGETCCC = g++
++TARGETRANLIB = ranlib
++
++CC = $(TARGETCC)
++CCC = $(TARGETCCC)
++RANLIB = $(TARGETRANLIB)
+
+ DEFAULT_COMPILER = gcc
+
(quoted diff) +0 -0
b/package/libnss/libnss-uclibc.patch
new file mode 100644
index 0000000..17e8080
package/libnss/libnss-uclibc.patch new file +6 -0
@@ -0,0 +1,19 @@ + +uCLibc does not define RTLD_NOLOAD. + +Signed-off-by: Will Newton <[email protected]> + +--- nss-3.12.9.old/mozilla/security/nss/lib/freebl/stubs.c 2011-07-08
13:32:54.964338355 +0100
++++ nss-3.12.9/mozilla/security/nss/lib/freebl/stubs.c 2011-07-08
13:33:57.255337490 +0100
+@@ -535,6 +535,11 @@
+ return SECSuccess;
+ }
+
++/* uClibc does not define RTLD_NOLOAD. */
++#ifndef RTLD_NOLOAD
++#define RTLD_NOLOAD 0
++#endif
++
+ /*
+ * fetch the library if it's loaded. For NSS it should already be loaded
+ */
package/libnss/libnss.mk new file +67 -0
67 lines not on this page · raw message
Signature · 8 lines
1.7.3.4 -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-libnss-Add-new-package.patch Type: text/x-patch Size: 6132 bytes Desc: not available URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20110708/87ea7b8f/attachment-0001.bin>
PATCH v2 1/1 libnss: Add new package.
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Will" == Will Newton <[email protected]> writes:
Hi,
Will> NSS is the Network Security Services library developed as part of Will> the Mozilla project. It provides similar functions to OpenSSL but Will> allows MPL, GPL and LGPL licensing.
Will> +++ b/package/libnss/libnss-uclibc.patch Will> @@ -0,0 +1,19 @@
Will> +
Will> +uCLibc does not define RTLD_NOLOAD.
Will> +
Will> +Signed-off-by: Will Newton <[email protected]> Will> +
Will> +--- nss-3.12.9.old/mozilla/security/nss/lib/freebl/stubs.c 2011-07-08
Will> 13:32:54.964338355 +0100
Will> ++++ nss-3.12.9/mozilla/security/nss/lib/freebl/stubs.c 2011-07-08
Will> 13:33:57.255337490 +0100
Will> +@@ -535,6 +535,11 @@
Will> + return SECSuccess;
Will> + }
Will> +
Will> ++/* uClibc does not define RTLD_NOLOAD. */ Will> ++#ifndef RTLD_NOLOAD
Will> ++#define RTLD_NOLOAD 0
Will> ++#endif
It's not completely true (but looks like a bug to me):
git grep RTLD_NOLOAD
libc/sysdeps/linux/common/bits/dlfcn.h:#define RTLD_NOLOAD 0x00004 /* Do no
libc/sysdeps/linux/mips/bits/dlfcn.h:#define RTLD_NOLOAD 0x00008 /* Do no
The common one is within #if 0 so that doesn't count, but for mips it does. I suspect the best fix would actually be to fixup the mips header.
Thanks, I'll give it a bit of test and then commit.
Signature · 1 line
Bye, Peter Korsgaard
PATCH v2 1/1 libnss: Add new package.
In reply to Will NewtonQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Will" == Will Newton <[email protected]> writes:
Will> NSS is the Network Security Services library developed as part of Will> the Mozilla project. It provides similar functions to OpenSSL but Will> allows MPL, GPL and LGPL licensing.
Committed with minor tweaks, thanks.
Will> +define LIBNSS_INSTALL_STAGING_CMDS
Will> + $(INSTALL) -m 755 -t $(STAGING_DIR)/usr/lib/ \
Will> + $(@D)/$(LIBNSS_DISTDIR)/lib/*.so
Will> + $(INSTALL) -m 755 -d $(STAGING_DIR)/usr/include/nss
Will> + $(INSTALL) -m 644 -t $(STAGING_DIR)/usr/include/nss \
Will> + $(@D)/$(LIBNSS_DISTDIR)/public/nss/*
Will> + $(INSTALL) -m 755 -t $(STAGING_DIR)/usr/lib/ \
Will> + $(@D)/$(LIBNSS_DISTDIR)/lib/*.a
Will> +endef
Will> +
Will> +define LIBNSS_INSTALL_TARGET_CMDS
Will> + $(INSTALL) -m 755 -t $(TARGET_DIR)/usr/lib/ \
Will> + $(@D)/$(LIBNSS_DISTDIR)/lib/*.so
Will> + $(INSTALL) -m 755 -d $(STAGING_DIR)/usr/include/nss
Will> + $(INSTALL) -m 644 -t $(STAGING_DIR)/usr/include/nss \
Will> + $(@D)/$(LIBNSS_DISTDIR)/public/nss/*
Will> + $(INSTALL) -m 755 -t $(STAGING_DIR)/usr/lib/ \
Will> + $(@D)/$(LIBNSS_DISTDIR)/lib/*.a
Will> +endef
s/STAGING_DIR/TARGET_DIR/
Signature · 1 line
Bye, Peter Korsgaard