From f4cf9fe05bb3f32fabea4e54dd92d368967a80da Mon Sep 17 00:00:00 2001 From: Adrian Dudau Date: Thu, 26 Jun 2014 14:36:22 +0200 Subject: initial commit for Enea Linux 4.0 Migrated from the internal git server on the daisy-enea branch Signed-off-by: Adrian Dudau --- .../nss/files/nss-3.15.1-fix-CVE-2013-1741.patch | 92 +++++++++ .../nss/files/nss-3.15.1-fix-CVE-2013-5605.patch | 18 ++ .../files/nss-fix-incorrect-shebang-of-perl.patch | 110 +++++++++++ .../files/nss-fix-support-cross-compiling.patch | 71 +++++++ .../files/nss-no-rpath-for-cross-compiling.patch | 26 +++ meta/recipes-support/nss/files/nss.pc.in | 11 ++ meta/recipes-support/nss/files/signlibs.sh | 20 ++ meta/recipes-support/nss/nss.inc | 207 +++++++++++++++++++++ meta/recipes-support/nss/nss_3.15.1.bb | 9 + 9 files changed, 564 insertions(+) create mode 100644 meta/recipes-support/nss/files/nss-3.15.1-fix-CVE-2013-1741.patch create mode 100644 meta/recipes-support/nss/files/nss-3.15.1-fix-CVE-2013-5605.patch create mode 100644 meta/recipes-support/nss/files/nss-fix-incorrect-shebang-of-perl.patch create mode 100644 meta/recipes-support/nss/files/nss-fix-support-cross-compiling.patch create mode 100644 meta/recipes-support/nss/files/nss-no-rpath-for-cross-compiling.patch create mode 100644 meta/recipes-support/nss/files/nss.pc.in create mode 100644 meta/recipes-support/nss/files/signlibs.sh create mode 100644 meta/recipes-support/nss/nss.inc create mode 100644 meta/recipes-support/nss/nss_3.15.1.bb (limited to 'meta/recipes-support/nss') diff --git a/meta/recipes-support/nss/files/nss-3.15.1-fix-CVE-2013-1741.patch b/meta/recipes-support/nss/files/nss-3.15.1-fix-CVE-2013-1741.patch new file mode 100644 index 0000000000..21da0c03b5 --- /dev/null +++ b/meta/recipes-support/nss/files/nss-3.15.1-fix-CVE-2013-1741.patch @@ -0,0 +1,92 @@ +Upstream-Status: backport +yanjun.zhu +--- a/nss/lib/util/secport.c ++++ b/nss/lib/util/secport.c +@@ -69,13 +69,22 @@ PORTCharConversionFunc ucs4Utf8ConvertFu + PORTCharConversionFunc ucs2Utf8ConvertFunc; + PORTCharConversionWSwapFunc ucs2AsciiConvertFunc; + ++/* NSPR memory allocation functions (PR_Malloc, PR_Calloc, and PR_Realloc) ++ * use the PRUint32 type for the size parameter. Before we pass a size_t or ++ * unsigned long size to these functions, we need to ensure it is <= half of ++ * the maximum PRUint32 value to avoid truncation and catch a negative size. ++ */ ++#define MAX_SIZE (PR_UINT32_MAX >> 1) ++ + void * + PORT_Alloc(size_t bytes) + { +- void *rv; ++ void *rv = NULL; + +- /* Always allocate a non-zero amount of bytes */ +- rv = (void *)PR_Malloc(bytes ? bytes : 1); ++ if (bytes <= MAX_SIZE) { ++ /* Always allocate a non-zero amount of bytes */ ++ rv = PR_Malloc(bytes ? bytes : 1); ++ } + if (!rv) { + ++port_allocFailures; + PORT_SetError(SEC_ERROR_NO_MEMORY); +@@ -86,9 +95,11 @@ PORT_Alloc(size_t bytes) + void * + PORT_Realloc(void *oldptr, size_t bytes) + { +- void *rv; ++ void *rv = NULL; + +- rv = (void *)PR_Realloc(oldptr, bytes); ++ if (bytes <= MAX_SIZE) { ++ rv = PR_Realloc(oldptr, bytes); ++ } + if (!rv) { + ++port_allocFailures; + PORT_SetError(SEC_ERROR_NO_MEMORY); +@@ -99,10 +110,12 @@ PORT_Realloc(void *oldptr, size_t bytes) + void * + PORT_ZAlloc(size_t bytes) + { +- void *rv; ++ void *rv = NULL; + +- /* Always allocate a non-zero amount of bytes */ +- rv = (void *)PR_Calloc(1, bytes ? bytes : 1); ++ if (bytes <= MAX_SIZE) { ++ /* Always allocate a non-zero amount of bytes */ ++ rv = PR_Calloc(1, bytes ? bytes : 1); ++ } + if (!rv) { + ++port_allocFailures; + PORT_SetError(SEC_ERROR_NO_MEMORY); +@@ -209,6 +222,10 @@ PORT_NewArena(unsigned long chunksize) + { + PORTArenaPool *pool; + ++ if (chunksize > MAX_SIZE) { ++ PORT_SetError(SEC_ERROR_NO_MEMORY); ++ return NULL; ++ } + pool = PORT_ZNew(PORTArenaPool); + if (!pool) { + return NULL; +@@ -224,8 +241,6 @@ PORT_NewArena(unsigned long chunksize) + return(&pool->arena); + } + +-#define MAX_SIZE 0x7fffffffUL +- + void * + PORT_ArenaAlloc(PLArenaPool *arena, size_t size) + { +@@ -330,6 +345,11 @@ PORT_ArenaGrow(PLArenaPool *arena, void + PORTArenaPool *pool = (PORTArenaPool *)arena; + PORT_Assert(newsize >= oldsize); + ++ if (newsize > MAX_SIZE) { ++ PORT_SetError(SEC_ERROR_NO_MEMORY); ++ return NULL; ++ } ++ + if (ARENAPOOL_MAGIC == pool->magic ) { + PZ_Lock(pool->lock); + /* Do we do a THREADMARK check here? */ diff --git a/meta/recipes-support/nss/files/nss-3.15.1-fix-CVE-2013-5605.patch b/meta/recipes-support/nss/files/nss-3.15.1-fix-CVE-2013-5605.patch new file mode 100644 index 0000000000..7203d02c78 --- /dev/null +++ b/meta/recipes-support/nss/files/nss-3.15.1-fix-CVE-2013-5605.patch @@ -0,0 +1,18 @@ +signed-off-by: Ryan Sleevi +Upstream-Status: Backport +reference:https://hg.mozilla.org/projects/nss/rev/e79a09364b5e + +--- a/nss/lib/ssl/ssl3con.c ++++ b/nss/lib/ssl/ssl3con.c +@@ -781,6 +781,11 @@ static SECStatus + Null_Cipher(void *ctx, unsigned char *output, int *outputLen, int maxOutputLen, + const unsigned char *input, int inputLen) + { ++ if (inputLen > maxOutputLen) { ++ *outputLen = 0; /* Match PK11_CipherOp in setting outputLen */ ++ PORT_SetError(SEC_ERROR_OUTPUT_LEN); ++ return SECFailure; ++ } + *outputLen = inputLen; + if (input != output) + PORT_Memcpy(output, input, inputLen); diff --git a/meta/recipes-support/nss/files/nss-fix-incorrect-shebang-of-perl.patch b/meta/recipes-support/nss/files/nss-fix-incorrect-shebang-of-perl.patch new file mode 100644 index 0000000000..547594d5b6 --- /dev/null +++ b/meta/recipes-support/nss/files/nss-fix-incorrect-shebang-of-perl.patch @@ -0,0 +1,110 @@ +nss: fix incorrect shebang of perl + +Replace incorrect shebang of perl with `#!/usr/bin/env perl'. + +Signed-off-by: Hongxu Jia +Upstream-Status: Pending +--- + nss/cmd/smimetools/smime | 2 +- + nss/coreconf/cpdist.pl | 2 +- + nss/coreconf/import.pl | 2 +- + nss/coreconf/jniregen.pl | 2 +- + nss/coreconf/outofdate.pl | 2 +- + nss/coreconf/release.pl | 2 +- + nss/coreconf/version.pl | 2 +- + nss/tests/clean_tbx | 2 +- + nss/tests/path_uniq | 2 +- + 9 files changed, 9 insertions(+), 9 deletions(-) + +diff --git a/nss/cmd/smimetools/smime b/nss/cmd/smimetools/smime +--- a/nss/cmd/smimetools/smime ++++ b/nss/cmd/smimetools/smime +@@ -1,4 +1,4 @@ +-#!/usr/local/bin/perl ++#!/usr/bin/env perl + + # This Source Code Form is subject to the terms of the Mozilla Public + # License, v. 2.0. If a copy of the MPL was not distributed with this +diff --git a/nss/coreconf/cpdist.pl b/nss/coreconf/cpdist.pl +index 800edfb..652187f 100755 +--- a/nss/coreconf/cpdist.pl ++++ b/nss/coreconf/cpdist.pl +@@ -1,4 +1,4 @@ +-#! /usr/local/bin/perl ++#!/usr/bin/env perl + # + # This Source Code Form is subject to the terms of the Mozilla Public + # License, v. 2.0. If a copy of the MPL was not distributed with this +diff --git a/nss/coreconf/import.pl b/nss/coreconf/import.pl +index dd2d177..428eaa5 100755 +--- a/nss/coreconf/import.pl ++++ b/nss/coreconf/import.pl +@@ -1,4 +1,4 @@ +-#! /usr/local/bin/perl ++#!/usr/bin/env perl + # + # This Source Code Form is subject to the terms of the Mozilla Public + # License, v. 2.0. If a copy of the MPL was not distributed with this +diff --git a/nss/coreconf/jniregen.pl b/nss/coreconf/jniregen.pl +index 2039180..5f4f69c 100755 +--- a/nss/coreconf/jniregen.pl ++++ b/nss/coreconf/jniregen.pl +@@ -1,4 +1,4 @@ +-#!/usr/local/bin/perl ++#!/usr/bin/env perl + # + # This Source Code Form is subject to the terms of the Mozilla Public + # License, v. 2.0. If a copy of the MPL was not distributed with this +diff --git a/nss/coreconf/outofdate.pl b/nss/coreconf/outofdate.pl +index 33d80bb..01fc097 100755 +--- a/nss/coreconf/outofdate.pl ++++ b/nss/coreconf/outofdate.pl +@@ -1,4 +1,4 @@ +-#!/usr/local/bin/perl ++#!/usr/bin/env perl + # + # This Source Code Form is subject to the terms of the Mozilla Public + # License, v. 2.0. If a copy of the MPL was not distributed with this +diff --git a/nss/coreconf/release.pl b/nss/coreconf/release.pl +index 7cde19d..b5df2f6 100755 +--- a/nss/coreconf/release.pl ++++ b/nss/coreconf/release.pl +@@ -1,4 +1,4 @@ +-#! /usr/local/bin/perl ++#!/usr/bin/env perl + # + # This Source Code Form is subject to the terms of the Mozilla Public + # License, v. 2.0. If a copy of the MPL was not distributed with this +diff --git a/nss/coreconf/version.pl b/nss/coreconf/version.pl +index d2a4942..79359fe 100644 +--- a/nss/coreconf/version.pl ++++ b/nss/coreconf/version.pl +@@ -1,4 +1,4 @@ +-#!/usr/sbin/perl ++#!/usr/bin/env perl + # + # This Source Code Form is subject to the terms of the Mozilla Public + # License, v. 2.0. If a copy of the MPL was not distributed with this +diff --git a/nss/tests/clean_tbx b/nss/tests/clean_tbx +index 4de9555..a7def9f 100755 +--- a/nss/tests/clean_tbx ++++ b/nss/tests/clean_tbx +@@ -1,4 +1,4 @@ +-#! /bin/perl ++#!/usr/bin/env perl + + ####################################################################### + # +diff --git a/nss/tests/path_uniq b/nss/tests/path_uniq +index f29f60a..08fbffa 100755 +--- a/nss/tests/path_uniq ++++ b/nss/tests/path_uniq +@@ -1,4 +1,4 @@ +-#! /bin/perl ++#!/usr/bin/env perl + + ######################################################################## + # +-- +1.8.1.2 + diff --git a/meta/recipes-support/nss/files/nss-fix-support-cross-compiling.patch b/meta/recipes-support/nss/files/nss-fix-support-cross-compiling.patch new file mode 100644 index 0000000000..f0b3550bff --- /dev/null +++ b/meta/recipes-support/nss/files/nss-fix-support-cross-compiling.patch @@ -0,0 +1,71 @@ +nss: fix support cross compiling + +Let some make variables be assigned from outside makefile. + +Signed-off-by: Hongxu Jia +Upstream-Status: Inappropriate [configuration] +--- + nss/coreconf/Linux.mk | 12 +++++++++++- + nss/coreconf/arch.mk | 2 +- + nss/lib/freebl/Makefile | 6 ++++++ + 3 files changed, 18 insertions(+), 2 deletions(-) + +diff --git a/nss/coreconf/Linux.mk b/nss/coreconf/Linux.mk +--- a/nss/coreconf/Linux.mk ++++ b/nss/coreconf/Linux.mk +@@ -16,11 +16,21 @@ ifeq ($(USE_PTHREADS),1) + IMPL_STRATEGY = _PTH + endif + ++ifndef CC + CC = gcc ++endif ++ ++ifdef CXX ++CCC = $(CXX) ++else + CCC = g++ ++endif ++ ++ifndef RANLIB + RANLIB = ranlib ++endif + +-DEFAULT_COMPILER = gcc ++DEFAULT_COMPILER = $(CC) + + ifeq ($(OS_TARGET),Android) + ifndef ANDROID_NDK +diff --git a/nss/coreconf/arch.mk b/nss/coreconf/arch.mk +index 6557348..b722412 100644 +--- a/nss/coreconf/arch.mk ++++ b/nss/coreconf/arch.mk +@@ -37,7 +37,7 @@ OS_TEST := $(shell uname -m) + ifeq ($(OS_TEST),i86pc) + OS_RELEASE := $(shell uname -r)_$(OS_TEST) + else +- OS_RELEASE := $(shell uname -r) ++ OS_RELEASE ?= $(shell uname -r) + endif + + # +diff --git a/nss/lib/freebl/Makefile b/nss/lib/freebl/Makefile +index 0d293f1..678f506 100644 +--- a/nss/lib/freebl/Makefile ++++ b/nss/lib/freebl/Makefile +@@ -36,6 +36,12 @@ ifdef USE_64 + DEFINES += -DNSS_USE_64 + endif + ++ifeq ($(OS_TEST),mips) ++ifndef USE_64 ++ DEFINES += -DNS_PTR_LE_32 ++endif ++endif ++ + ifdef USE_ABI32_FPU + DEFINES += -DNSS_USE_ABI32_FPU + endif +-- +1.8.1.2 + diff --git a/meta/recipes-support/nss/files/nss-no-rpath-for-cross-compiling.patch b/meta/recipes-support/nss/files/nss-no-rpath-for-cross-compiling.patch new file mode 100644 index 0000000000..7661dc93a0 --- /dev/null +++ b/meta/recipes-support/nss/files/nss-no-rpath-for-cross-compiling.patch @@ -0,0 +1,26 @@ +nss:no rpath for cross compiling + +Signed-off-by: Hongxu Jia +Upstream-Status: Inappropriate [configuration] +--- + nss/cmd/platlibs.mk | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/nss/cmd/platlibs.mk b/nss/cmd/platlibs.mk +--- a/nss/cmd/platlibs.mk ++++ b/nss/cmd/platlibs.mk +@@ -18,9 +18,9 @@ endif + + ifeq ($(OS_ARCH), Linux) + ifeq ($(USE_64), 1) +-EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib64:/opt/sun/private/lib64:$$ORIGIN/../lib' ++#EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib64:/opt/sun/private/lib64:$$ORIGIN/../lib' + else +-EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib:/opt/sun/private/lib' ++#EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib:/opt/sun/private/lib' + endif + endif + +-- +1.8.1.2 + diff --git a/meta/recipes-support/nss/files/nss.pc.in b/meta/recipes-support/nss/files/nss.pc.in new file mode 100644 index 0000000000..200f635c65 --- /dev/null +++ b/meta/recipes-support/nss/files/nss.pc.in @@ -0,0 +1,11 @@ +prefix=OEPREFIX +exec_prefix=OEEXECPREFIX +libdir=OELIBDIR +includedir=OEINCDIR + +Name: NSS +Description: Network Security Services +Version: %NSS_VERSION% +Requires: nspr >= %NSPR_VERSION% +Libs: -lssl3 -lsmime3 -lnss3 -lsoftokn3 -lnssutil3 +Cflags: -IOEINCDIR diff --git a/meta/recipes-support/nss/files/signlibs.sh b/meta/recipes-support/nss/files/signlibs.sh new file mode 100644 index 0000000000..1ec79f4576 --- /dev/null +++ b/meta/recipes-support/nss/files/signlibs.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +# signlibs.sh +# +# (c)2010 Wind River Systems, Inc. +# +# regenerates the .chk files for the NSS libraries that require it +# since the ones that are built have incorrect checksums that were +# calculated on the host where they really need to be done on the +# target + +CHK_FILES=`find /lib* /usr/lib* -name "*.chk"` +SIGN_BINARY=`which shlibsign` +for I in $CHK_FILES +do + DN=`dirname $I` + BN=`basename $I .chk` + FN=$DN/$BN.so + $SIGN_BINARY -i $FN +done diff --git a/meta/recipes-support/nss/nss.inc b/meta/recipes-support/nss/nss.inc new file mode 100644 index 0000000000..404deccd8a --- /dev/null +++ b/meta/recipes-support/nss/nss.inc @@ -0,0 +1,207 @@ +SUMMARY = "Mozilla's SSL and TLS implementation" +DESCRIPTION = "Network Security Services (NSS) is a set of libraries \ +designed to support cross-platform 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, X.509 \ +v3 certificates, and other security standards." +HOMEPAGE = "http://www.mozilla.org/projects/security/pki/nss/" +SECTION = "libs" + +LICENSE = "MPL-1.1 GPL-2.0 LGPL-2.1" + +LIC_FILES_CHKSUM = "file://nss/lib/freebl/mpi/doc/LICENSE;md5=491f158d09d948466afce85d6f1fe18f \ + file://nss/lib/freebl/mpi/doc/LICENSE-MPL;md5=6bf96825e3d7ce4de25621ae886cc859" +SRC_URI = "\ + file://nss-fix-support-cross-compiling.patch \ + file://nss-no-rpath-for-cross-compiling.patch \ + file://nss-fix-incorrect-shebang-of-perl.patch \ + file://nss-3.15.1-fix-CVE-2013-1741.patch \ + file://nss-3.15.1-fix-CVE-2013-5605.patch \ +" +SRC_URI_append_class-target = "\ + file://nss.pc.in \ + file://signlibs.sh \ +" +inherit siteinfo +PR = "r0" +DEPENDS = "sqlite3 nspr zlib nss-native" +DEPENDS_class-native = "sqlite3-native nspr-native zlib-native" +RDEPENDS_${PN} = "perl" + +TD = "${S}/tentative-dist" +TDS = "${S}/tentative-dist-staging" + +TARGET_CC_ARCH += "${LDFLAGS}" + +do_compile_prepend_class-native() { + export NSPR_INCLUDE_DIR=${STAGING_INCDIR_NATIVE} + export NSPR_LIB_DIR=${STAGING_LIBDIR_NATIVE} +} + +do_compile_prepend_class-nativesdk() { + export LDFLAGS="" +} + +do_compile() { + export CROSS_COMPILE=1 + export NATIVE_CC="gcc" + export BUILD_OPT=1 + + export FREEBL_NO_DEPEND=1 + export FREEBL_LOWHASH=1 + + export LIBDIR=${libdir} + export MOZILLA_CLIENT=1 + export NS_USE_GCC=1 + export NSS_USE_SYSTEM_SQLITE=1 + export NSS_ENABLE_ECC=1 + + export OS_RELEASE=3.4 + export OS_TARGET=Linux + export OS_ARCH=Linux + + if [ "${TARGET_ARCH}" = "powerpc" ]; then + OS_TEST=ppc + elif [ "${TARGET_ARCH}" = "powerpc64" ]; then + OS_TEST=ppc64 + elif [ "${TARGET_ARCH}" = "mips" -o "${TARGET_ARCH}" = "mipsel" -o "${TARGET_ARCH}" = "mips64" -o "${TARGET_ARCH}" = "mips64el" ]; then + OS_TEST=mips + else + OS_TEST="${TARGET_ARCH}" + fi + + if [ "${SITEINFO_BITS}" = "64" ]; then + export USE_64=1 + fi + + make -C ./nss CCC="${CXX}" \ + OS_TEST=${OS_TEST} \ +} + + +do_install_prepend_class-nativesdk() { + export LDFLAGS="" +} + +do_install() { + export CROSS_COMPILE=1 + export NATIVE_CC="gcc" + export BUILD_OPT=1 + + export FREEBL_NO_DEPEND=1 + + export LIBDIR=${libdir} + export MOZILLA_CLIENT=1 + export NS_USE_GCC=1 + export NSS_USE_SYSTEM_SQLITE=1 + export NSS_ENABLE_ECC=1 + + export OS_RELEASE=3.4 + export OS_TARGET=Linux + export OS_ARCH=Linux + + if [ "${TARGET_ARCH}" = "powerpc" ]; then + OS_TEST=ppc + elif [ "${TARGET_ARCH}" = "powerpc64" ]; then + OS_TEST=ppc64 + elif [ "${TARGET_ARCH}" = "mips" -o "${TARGET_ARCH}" = "mipsel" -o "${TARGET_ARCH}" = "mips64" -o "${TARGET_ARCH}" = "mips64el" ]; then + OS_TEST=mips + else + OS_TEST="${TARGET_ARCH}" + fi + if [ "${SITEINFO_BITS}" = "64" ]; then + export USE_64=1 + fi + + make -C ./nss \ + CCC="${CXX}" \ + OS_TEST=${OS_TEST} \ + SOURCE_LIB_DIR="${TD}/${libdir}" \ + SOURCE_BIN_DIR="${TD}/${bindir}" \ + install + + install -d ${D}/${libdir}/ + for file in ${S}/dist/*.OBJ/lib/*.so; do + echo "Installing `basename $file`..." + cp $file ${D}/${libdir}/ + done + + for shared_lib in ${TD}/${libdir}/*.so.*; do + if [ -f $shared_lib ]; then + cp $shared_lib ${D}/${libdir} + ln -sf $(basename $shared_lib) ${D}/${libdir}/$(basename $shared_lib .1oe) + fi + done + for shared_lib in ${TD}/${libdir}/*.so; do + if [ -f $shared_lib -a ! -e ${D}/${libdir}/$shared_lib ]; then + cp $shared_lib ${D}/${libdir} + fi + done + + install -d ${D}/${includedir}/nss3 + install -m 644 -t ${D}/${includedir}/nss3 dist/public/nss/* + + install -d ${D}/${bindir} + for binary in ${TD}/${bindir}/*; do + install -m 755 -t ${D}/${bindir} $binary + done +} + +do_install_append_class-target() { + # Create empty .chk files for the NSS libraries at build time. They could + # be regenerated at target's boot time. + for file in libsoftokn3.chk libfreebl3.chk libnssdbm3.chk; do + touch ${D}/${libdir}/$file + chmod 755 ${D}/${libdir}/$file + done + install -D -m 755 ${WORKDIR}/signlibs.sh ${D}/${bindir}/signlibs.sh + + install -d ${D}${libdir}/pkgconfig/ + sed 's/%NSS_VERSION%/${PV}/' ${WORKDIR}/nss.pc.in | sed 's/%NSPR_VERSION%/4.9.2/' > ${D}${libdir}/pkgconfig/nss.pc + sed -i s:OEPREFIX:${prefix}:g ${D}${libdir}/pkgconfig/nss.pc + sed -i s:OEEXECPREFIX:${exec_prefix}:g ${D}${libdir}/pkgconfig/nss.pc + sed -i s:OELIBDIR:${libdir}:g ${D}${libdir}/pkgconfig/nss.pc + sed -i s:OEINCDIR:${includedir}/nss3:g ${D}${libdir}/pkgconfig/nss.pc + + # Create a blank certificate + mkdir -p ${D}/etc/pki/nssdb/ + touch ./empty_password + certutil -N -d ${D}/etc/pki/nssdb/ -f ./empty_password + chmod 644 ${D}/etc/pki/nssdb/*.db + rm ./empty_password +} + +pkg_postinst_${PN} () { + if [ -n "$D" ]; then + for I in $D/${libdir}/lib*.chk; do + DN=`dirname $I` + BN=`basename $I .chk` + FN=$DN/$BN.so + shlibsign -i $FN + if [ $? -ne 0 ]; then + exit 1 + fi + done + exit 0 + fi + signlibs.sh +} + +FILES_${PN} = "\ + ${sysconfdir} \ + ${bindir} \ + ${libdir}/lib*.chk \ + ${libdir}/lib*.so \ + " +FILES_${PN}-dev = "\ + ${libdir}/nss \ + ${libdir}/pkgconfig/* \ + ${includedir}/* \ + " +FILES_${PN}-dbg = "\ + ${bindir}/.debug/* \ + ${libdir}/.debug/* \ + " + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-support/nss/nss_3.15.1.bb b/meta/recipes-support/nss/nss_3.15.1.bb new file mode 100644 index 0000000000..7b06f00cde --- /dev/null +++ b/meta/recipes-support/nss/nss_3.15.1.bb @@ -0,0 +1,9 @@ +require nss.inc + +SRC_URI += "\ + http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_15_1_RTM/src/${BPN}-${PV}.tar.gz \ +" + +SRC_URI[md5sum] = "fb68f4d210ac9397dd0d3c39c4f938eb" +SRC_URI[sha256sum] = "f994106a33d1f3210f4151bbb3419a1c28fd1cb545caa7dc9afdebd6da626284" + -- cgit v1.2.3-54-g00ecf