From 4abdce35f5539a447e8242bf18c26c8785fe2453 Mon Sep 17 00:00:00 2001 From: Ronan Le Martret Date: Thu, 6 Jun 2013 14:50:07 +0200 Subject: [PATCH] -solve nss. --- meta-tizen-ivi/recipes-tizen/nss/nss-extraconf.inc | 37 +++++ .../recipes-tizen/nss/nss/ecl-curve.h.patch | 149 +++++++++++++++++++++ .../recipes-tizen/nss/nss/native_cc.patch | 50 +++++++ meta-tizen-ivi/recipes-tizen/nss/nss/nss.pc.in | 11 ++ .../recipes-tizen/nss/nss/nss.spec.patch | 114 ++++++++++++++++ .../recipes-tizen/nss/nss/skip_signing.patch | 18 +++ 6 files changed, 379 insertions(+) create mode 100644 meta-tizen-ivi/recipes-tizen/nss/nss/ecl-curve.h.patch create mode 100644 meta-tizen-ivi/recipes-tizen/nss/nss/native_cc.patch create mode 100644 meta-tizen-ivi/recipes-tizen/nss/nss/nss.pc.in create mode 100644 meta-tizen-ivi/recipes-tizen/nss/nss/nss.spec.patch create mode 100644 meta-tizen-ivi/recipes-tizen/nss/nss/skip_signing.patch diff --git a/meta-tizen-ivi/recipes-tizen/nss/nss-extraconf.inc b/meta-tizen-ivi/recipes-tizen/nss/nss-extraconf.inc index e69de29..ad3d769 100644 --- a/meta-tizen-ivi/recipes-tizen/nss/nss-extraconf.inc +++ b/meta-tizen-ivi/recipes-tizen/nss/nss-extraconf.inc @@ -0,0 +1,37 @@ +SRC_URI += "file://native_cc.patch \ + file://skip_signing.patch \ + file://nss.spec.patch \ + file://ecl-curve.h.patch \ + " + + +export TARGET_ARCH +export STAGING_INCDIR +export STAGING_LIBDIR +export CFLAGS +export TARGET_CC +export CC +export CXX +export RANLIB +export BUILD_CC +export BUILD_CFLAGS + +PARALLEL_MAKE = "" + +USE64BIT_x86-64 = "USE_64=1" +USE64BIT_mips64 = "USE_64=1" +USE64BIT_mips64el = "USE_64=1" +USE64BIT ?= "" + +DEPENDS = "nspr nspr-native" + +do_patch_append () { + echo RLM begining of do_patch + + #cat ${WORKDIR}/native_cc.patch | patch -s -p1 --fuzz=2 + #cat ${WORKDIR}/skip_signing.patch | patch -s -p1 --fuzz=2 + cat ${WORKDIR}/ecl-curve.h.patch | patch -s -p1 --fuzz=2 + cat ${WORKDIR}/nss.spec.patch | patch -s -p1 --fuzz=2 + + echo RLM end of do_patch +} \ No newline at end of file diff --git a/meta-tizen-ivi/recipes-tizen/nss/nss/ecl-curve.h.patch b/meta-tizen-ivi/recipes-tizen/nss/nss/ecl-curve.h.patch new file mode 100644 index 0000000..9111ffc --- /dev/null +++ b/meta-tizen-ivi/recipes-tizen/nss/nss/ecl-curve.h.patch @@ -0,0 +1,149 @@ +diff --git a/mozilla/security/nss/lib/freebl/ecl/ecl-curve.h b/mozilla/security/nss/lib/freebl/ecl/ecl-curve.h +index e69de29..3a01dc8 100644 +--- a/mozilla/security/nss/lib/freebl/ecl/ecl-curve.h ++++ b/mozilla/security/nss/lib/freebl/ecl/ecl-curve.h +@@ -0,0 +1,144 @@ ++/* ++ * ***** BEGIN LICENSE BLOCK ***** ++ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 ++ * ++ * The contents of this file are subject to the Mozilla Public License Version ++ * 1.1 (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * http://www.mozilla.org/MPL/ ++ * ++ * Software distributed under the License is distributed on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License ++ * for the specific language governing rights and limitations under the ++ * License. ++ * ++ * The Original Code is the elliptic curve math library. ++ * ++ * The Initial Developer of the Original Code is ++ * Sun Microsystems, Inc. ++ * Portions created by the Initial Developer are Copyright (C) 2003 ++ * the Initial Developer. All Rights Reserved. ++ * ++ * Contributor(s): ++ * Douglas Stebila , Sun Microsystems Laboratories ++ * ++ * Alternatively, the contents of this file may be used under the terms of ++ * either the GNU General Public License Version 2 or later (the "GPL"), or ++ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), ++ * in which case the provisions of the GPL or the LGPL are applicable instead ++ * of those above. If you wish to allow use of your version of this file only ++ * under the terms of either the GPL or the LGPL, and not to allow others to ++ * use your version of this file under the terms of the MPL, indicate your ++ * decision by deleting the provisions above and replace them with the notice ++ * and other provisions required by the GPL or the LGPL. If you do not delete ++ * the provisions above, a recipient may use your version of this file under ++ * the terms of any one of the MPL, the GPL or the LGPL. ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#include "ecl-exp.h" ++#include ++ ++#ifndef __ecl_curve_h_ ++#define __ecl_curve_h_ ++ ++#ifdef NSS_ECC_MORE_THAN_SUITE_B ++#error This source file is for Basic ECC only . ++#endif ++ ++static const ECCurveParams ecCurve_NIST_P256 = { ++ "NIST-P256", ECField_GFp, 256, ++ "FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF", ++ "FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC", ++ "5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B", ++ "6B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C296", ++ "4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5", ++ "FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551", 1 ++}; ++ ++static const ECCurveParams ecCurve_NIST_P384 = { ++ "NIST-P384", ECField_GFp, 384, ++ "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFF", ++ "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFC", ++ "B3312FA7E23EE7E4988E056BE3F82D19181D9C6EFE8141120314088F5013875AC656398D8A2ED19D2A85C8EDD3EC2AEF", ++ "AA87CA22BE8B05378EB1C71EF320AD746E1D3B628BA79B9859F741E082542A385502F25DBF55296C3A545E3872760AB7", ++ "3617DE4A96262C6F5D9E98BF9292DC29F8F41DBD289A147CE9DA3113B5F0B8C00A60B1CE1D7E819D7A431D7C90EA0E5F", ++ "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC7634D81F4372DDF581A0DB248B0A77AECEC196ACCC52973", ++ 1 ++}; ++ ++static const ECCurveParams ecCurve_NIST_P521 = { ++ "NIST-P521", ECField_GFp, 521, ++ "01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF", ++ "01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC", ++ "0051953EB9618E1C9A1F929A21A0B68540EEA2DA725B99B315F3B8B489918EF109E156193951EC7E937B1652C0BD3BB1BF073573DF883D2C34F1EF451FD46B503F00", ++ "00C6858E06B70404E9CD9E3ECB662395B4429C648139053FB521F828AF606B4D3DBAA14B5E77EFE75928FE1DC127A2FFA8DE3348B3C1856A429BF97E7E31C2E5BD66", ++ "011839296A789A3BC0045C8A5FB42C7D1BD998F54449579B446817AFBD17273E662C97EE72995EF42640C550B9013FAD0761353C7086A272C24088BE94769FD16650", ++ "01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA51868783BF2F966B7FCC0148F709A5D03BB5C9B8899C47AEBB6FB71E91386409", ++ 1 ++}; ++ ++/* mapping between ECCurveName enum and pointers to ECCurveParams */ ++static const ECCurveParams *ecCurve_map[] = { ++ NULL, /* ECCurve_noName */ ++ NULL, /* ECCurve_NIST_P192 */ ++ NULL, /* ECCurve_NIST_P224 */ ++ &ecCurve_NIST_P256, /* ECCurve_NIST_P256 */ ++ &ecCurve_NIST_P384, /* ECCurve_NIST_P384 */ ++ &ecCurve_NIST_P521, /* ECCurve_NIST_P521 */ ++ NULL, /* ECCurve_NIST_K163 */ ++ NULL, /* ECCurve_NIST_B163 */ ++ NULL, /* ECCurve_NIST_K233 */ ++ NULL, /* ECCurve_NIST_B233 */ ++ NULL, /* ECCurve_NIST_K283 */ ++ NULL, /* ECCurve_NIST_B283 */ ++ NULL, /* ECCurve_NIST_K409 */ ++ NULL, /* ECCurve_NIST_B409 */ ++ NULL, /* ECCurve_NIST_K571 */ ++ NULL, /* ECCurve_NIST_B571 */ ++ NULL, /* ECCurve_X9_62_PRIME_192V2 */ ++ NULL, /* ECCurve_X9_62_PRIME_192V3 */ ++ NULL, /* ECCurve_X9_62_PRIME_239V1 */ ++ NULL, /* ECCurve_X9_62_PRIME_239V2 */ ++ NULL, /* ECCurve_X9_62_PRIME_239V3 */ ++ NULL, /* ECCurve_X9_62_CHAR2_PNB163V1 */ ++ NULL, /* ECCurve_X9_62_CHAR2_PNB163V2 */ ++ NULL, /* ECCurve_X9_62_CHAR2_PNB163V3 */ ++ NULL, /* ECCurve_X9_62_CHAR2_PNB176V1 */ ++ NULL, /* ECCurve_X9_62_CHAR2_TNB191V1 */ ++ NULL, /* ECCurve_X9_62_CHAR2_TNB191V2 */ ++ NULL, /* ECCurve_X9_62_CHAR2_TNB191V3 */ ++ NULL, /* ECCurve_X9_62_CHAR2_PNB208W1 */ ++ NULL, /* ECCurve_X9_62_CHAR2_TNB239V1 */ ++ NULL, /* ECCurve_X9_62_CHAR2_TNB239V2 */ ++ NULL, /* ECCurve_X9_62_CHAR2_TNB239V3 */ ++ NULL, /* ECCurve_X9_62_CHAR2_PNB272W1 */ ++ NULL, /* ECCurve_X9_62_CHAR2_PNB304W1 */ ++ NULL, /* ECCurve_X9_62_CHAR2_TNB359V1 */ ++ NULL, /* ECCurve_X9_62_CHAR2_PNB368W1 */ ++ NULL, /* ECCurve_X9_62_CHAR2_TNB431R1 */ ++ NULL, /* ECCurve_SECG_PRIME_112R1 */ ++ NULL, /* ECCurve_SECG_PRIME_112R2 */ ++ NULL, /* ECCurve_SECG_PRIME_128R1 */ ++ NULL, /* ECCurve_SECG_PRIME_128R2 */ ++ NULL, /* ECCurve_SECG_PRIME_160K1 */ ++ NULL, /* ECCurve_SECG_PRIME_160R1 */ ++ NULL, /* ECCurve_SECG_PRIME_160R2 */ ++ NULL, /* ECCurve_SECG_PRIME_192K1 */ ++ NULL, /* ECCurve_SECG_PRIME_224K1 */ ++ NULL, /* ECCurve_SECG_PRIME_256K1 */ ++ NULL, /* ECCurve_SECG_CHAR2_113R1 */ ++ NULL, /* ECCurve_SECG_CHAR2_113R2 */ ++ NULL, /* ECCurve_SECG_CHAR2_131R1 */ ++ NULL, /* ECCurve_SECG_CHAR2_131R2 */ ++ NULL, /* ECCurve_SECG_CHAR2_163R1 */ ++ NULL, /* ECCurve_SECG_CHAR2_193R1 */ ++ NULL, /* ECCurve_SECG_CHAR2_193R2 */ ++ NULL, /* ECCurve_SECG_CHAR2_239K1 */ ++ NULL, /* ECCurve_WTLS_1 */ ++ NULL, /* ECCurve_WTLS_8 */ ++ NULL, /* ECCurve_WTLS_9 */ ++ NULL /* ECCurve_pastLastCurve */ ++}; ++ ++#endif diff --git a/meta-tizen-ivi/recipes-tizen/nss/nss/native_cc.patch b/meta-tizen-ivi/recipes-tizen/nss/nss/native_cc.patch new file mode 100644 index 0000000..62748a2 --- /dev/null +++ b/meta-tizen-ivi/recipes-tizen/nss/nss/native_cc.patch @@ -0,0 +1,50 @@ +diff --git a/mozilla/security/coreconf/Linux.mk b/mozilla/security/coreconf/Linux.mk +index caf05a8..1bd7614 100644 +--- a/mozilla/security/coreconf/Linux.mk ++++ b/mozilla/security/coreconf/Linux.mk +@@ -98,6 +98,9 @@ endif + endif + endif + ++ifdef NATIVE_FLAGS ++ override ARCHFLAG= ++endif + + LIBC_TAG = _glibc + +diff --git a/mozilla/security/coreconf/mkdepend/Makefile b/mozilla/security/coreconf/mkdepend/Makefile +index ab280e6..e222ba7 100644 +--- a/mozilla/security/coreconf/mkdepend/Makefile ++++ b/mozilla/security/coreconf/mkdepend/Makefile +@@ -64,11 +64,11 @@ INSTALL = true + endif + + ifdef NATIVE_CC +-CC=$(NATIVE_CC) ++override CC=$(NATIVE_CC) + endif + + ifdef NATIVE_FLAGS +-OS_CFLAGS=$(NATIVE_FLAGS) ++override OS_CFLAGS=$(NATIVE_FLAGS) + endif + + include $(DEPTH)/coreconf/rules.mk +diff --git a/mozilla/security/coreconf/nsinstall/Makefile b/mozilla/security/coreconf/nsinstall/Makefile +index c794890..0a57640 100644 +--- a/mozilla/security/coreconf/nsinstall/Makefile ++++ b/mozilla/security/coreconf/nsinstall/Makefile +@@ -58,11 +58,11 @@ INSTALL = true + endif + + ifdef NATIVE_CC +-CC=$(NATIVE_CC) ++override CC=$(NATIVE_CC) + endif + + ifdef NATIVE_FLAGS +-OS_CFLAGS=$(NATIVE_FLAGS) ++override OS_CFLAGS=$(NATIVE_FLAGS) + endif + + include $(DEPTH)/coreconf/rules.mk diff --git a/meta-tizen-ivi/recipes-tizen/nss/nss/nss.pc.in b/meta-tizen-ivi/recipes-tizen/nss/nss/nss.pc.in new file mode 100644 index 0000000..abbc850 --- /dev/null +++ b/meta-tizen-ivi/recipes-tizen/nss/nss/nss.pc.in @@ -0,0 +1,11 @@ +prefix=OEPREFIX +exec_prefix=OEEXECPREFIX +libdir=OELIBDIR +includedir=OEINCDIR + +Name: NSS +Description: Mozilla Network Security Services +Version: @VERSION@ +Requires: nspr +Libs: -L${libdir} -lnss3 -lnssutil3 -lsmime3 -lssl3 +Cflags: -I${includedir} -I${includedir}/mozilla/nss diff --git a/meta-tizen-ivi/recipes-tizen/nss/nss/nss.spec.patch b/meta-tizen-ivi/recipes-tizen/nss/nss/nss.spec.patch new file mode 100644 index 0000000..e69dc07 --- /dev/null +++ b/meta-tizen-ivi/recipes-tizen/nss/nss/nss.spec.patch @@ -0,0 +1,114 @@ +diff --git a/packaging/nss.spec b/packaging/nss.spec +index 146efe7..475326f 100644 +--- a/packaging/nss.spec ++++ b/packaging/nss.spec +@@ -135,8 +135,8 @@ FREEBL_NO_DEPEND=1 + export FREEBL_NO_DEPEND + + # Enable compiler optimizations and disable debugging code +-BUILD_OPT=1 +-export BUILD_OPT ++#BUILD_OPT=1 ++#export BUILD_OPT + + # Generate symbolic info for debuggers + XCFLAGS=$RPM_OPT_FLAGS +@@ -151,11 +151,11 @@ PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 + export PKG_CONFIG_ALLOW_SYSTEM_LIBS + export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS + +-NSPR_INCLUDE_DIR=`/usr/bin/pkg-config --cflags-only-I nspr | sed 's/-I//'` +-NSPR_LIB_DIR=`/usr/bin/pkg-config --libs-only-L nspr | sed 's/-L//'` ++#NSPR_INCLUDE_DIR=`/usr/bin/pkg-config --cflags-only-I nspr | sed 's/-I//'` ++#NSPR_LIB_DIR=`/usr/bin/pkg-config --libs-only-L nspr | sed 's/-L//'` + +-export NSPR_INCLUDE_DIR +-export NSPR_LIB_DIR ++#export NSPR_INCLUDE_DIR ++#export NSPR_LIB_DIR + + %ifarch x86_64 ppc64 ia64 s390x sparc64 + USE_64=1 +@@ -165,9 +165,79 @@ export USE_64 + # NSS_ENABLE_ECC=1 + # export NSS_ENABLE_ECC + +-%{__make} -C ./mozilla/security/coreconf +-%{__make} -C ./mozilla/security/dbm +-%{__make} -C ./mozilla/security/nss ++#export INCLUDES="-I${STAGING_INCDIR}" ++ ++%{__make} -C ./mozilla/security/coreconf \ ++ MOZILLA_CLIENT=1 \ ++ BUILD_OPT=1 \ ++ SKIP_SHLIBSIGN=1 \ ++ OS_TARGET="Linux" \ ++ OS_TARGET_RELEASE="3.1" \ ++ OS_TEST="${TARGET_ARCH}" \ ++ NSPR_INCLUDE_DIR="${STAGING_INCDIR}/nspr4" \ ++ NSPR_LIB_DIR="${STAGING_LIBDIR}" \ ++ SQLITE3_INCLUDE_DIR="${STAGING_INCDIR}" \ ++ OPTIMIZER="${CFLAGS}" \ ++ NS_USE_GCC=1 \ ++ NSS_USE_SYSTEM_SQLITE=1 \ ++ NSS_ENABLE_ECC=1 \ ++ DEFAULT_COMPILER="${TARGET_CC}" \ ++ CC="${CC}" \ ++ CCC="${CXX}" \ ++ CXX="${CXX}" \ ++ RANLIB="${RANLIB}" \ ++ NATIVE_CC="${BUILD_CC}" \ ++ NATIVE_FLAGS="${BUILD_CFLAGS}" \ ++ ${USE64BIT} ++ ++ ++ ++%{__make} -C ./mozilla/security/dbm \ ++ MOZILLA_CLIENT=1 \ ++ BUILD_OPT=1 \ ++ SKIP_SHLIBSIGN=1 \ ++ OS_TARGET="Linux" \ ++ OS_TARGET_RELEASE="3.1" \ ++ OS_TEST="${TARGET_ARCH}" \ ++ NSPR_INCLUDE_DIR="${STAGING_INCDIR}/nspr4" \ ++ NSPR_LIB_DIR="${STAGING_LIBDIR}" \ ++ SQLITE3_INCLUDE_DIR="${STAGING_INCDIR}" \ ++ OPTIMIZER="${CFLAGS}" \ ++ NS_USE_GCC=1 \ ++ NSS_USE_SYSTEM_SQLITE=1 \ ++ NSS_ENABLE_ECC=1 \ ++ DEFAULT_COMPILER="${TARGET_CC}" \ ++ CC="${CC}" \ ++ CCC="${CXX}" \ ++ CXX="${CXX}" \ ++ RANLIB="${RANLIB}" \ ++ NATIVE_CC="${BUILD_CC}" \ ++ NATIVE_FLAGS="${BUILD_CFLAGS}" \ ++ ${USE64BIT} ++ ++ ++%{__make} -C ./mozilla/security/nss \ ++ MOZILLA_CLIENT=1 \ ++ BUILD_OPT=1 \ ++ SKIP_SHLIBSIGN=1 \ ++ OS_TARGET="Linux" \ ++ OS_TARGET_RELEASE="3.1" \ ++ OS_TEST="${TARGET_ARCH}" \ ++ NSPR_INCLUDE_DIR="${STAGING_INCDIR}/nspr4" \ ++ NSPR_LIB_DIR="${STAGING_LIBDIR}" \ ++ SQLITE3_INCLUDE_DIR="${STAGING_INCDIR}" \ ++ OPTIMIZER="${CFLAGS}" \ ++ NS_USE_GCC=1 \ ++ NSS_USE_SYSTEM_SQLITE=1 \ ++ NSS_ENABLE_ECC=1 \ ++ DEFAULT_COMPILER="${TARGET_CC}" \ ++ CC="${CC}" \ ++ CCC="${CXX}" \ ++ CXX="${CXX}" \ ++ RANLIB="${RANLIB}" \ ++ NATIVE_CC="${BUILD_CC}" \ ++ NATIVE_FLAGS="${BUILD_CFLAGS}" \ ++ ${USE64BIT} + + + # enable the following line to force a test failure diff --git a/meta-tizen-ivi/recipes-tizen/nss/nss/skip_signing.patch b/meta-tizen-ivi/recipes-tizen/nss/nss/skip_signing.patch new file mode 100644 index 0000000..64e440d --- /dev/null +++ b/meta-tizen-ivi/recipes-tizen/nss/nss/skip_signing.patch @@ -0,0 +1,18 @@ +# HG changeset patch +# User Ted Mielczarek +# Date 1314190279 14400 +# Node ID a993dd883a502a15d0a8acebb7bf31fdbd0fd18f +# Parent 5a4a2b65e7b4950aa7cadc03aac43489ee314ba7 +[mq]: skip-shlibsigh + +diff --git a/security/nss/cmd/shlibsign/Makefile b/security/nss/cmd/shlibsign/Makefile +--- a/security/nss/cmd/shlibsign/Makefile ++++ b/security/nss/cmd/shlibsign/Makefile +@@ -120,5 +120,6 @@ + $(call core_abspath,$(NSPR_LIB_DIR)) $(call core_abspath,$<) + endif + ++ifndef SKIP_SHLIBSIGN + libs install :: $(CHECKLOC) +- ++endif -- 2.7.4