summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@stusta.de>2020-02-23 21:34:07 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-03-11 13:44:02 +0000
commitace5ed0878caa7b4cba2c469fe157fe59ae8cc6c (patch)
treeba6f61f7a99a74fffc0a6a6c2053ba01a6632a0e
parentf48d73995c6c86febcb24eb91dd1569a648cb4ae (diff)
downloadpoky-ace5ed0878caa7b4cba2c469fe157fe59ae8cc6c.tar.gz
nss: Move to meta-oe
rpm was the last user in OE-core. (From OE-Core rev: 15aa3bdf798b0e45a20f877e203f3750b623754f) Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/conf/distro/include/maintainers.inc1
-rw-r--r--meta/recipes-support/nss/nss/0001-freebl-add-a-configure-option-to-disable-ARM-HW-cryp.patch52
-rw-r--r--meta/recipes-support/nss/nss/0001-nss-fix-support-cross-compiling.patch48
-rw-r--r--meta/recipes-support/nss/nss/blank-cert9.dbbin28672 -> 0 bytes
-rw-r--r--meta/recipes-support/nss/nss/blank-key4.dbbin36864 -> 0 bytes
-rw-r--r--meta/recipes-support/nss/nss/disable-Wvarargs-with-clang.patch33
-rw-r--r--meta/recipes-support/nss/nss/nss-fix-incorrect-shebang-of-perl.patch110
-rw-r--r--meta/recipes-support/nss/nss/nss-fix-nsinstall-build.patch36
-rw-r--r--meta/recipes-support/nss/nss/nss-no-rpath-for-cross-compiling.patch26
-rw-r--r--meta/recipes-support/nss/nss/nss.pc.in11
-rw-r--r--meta/recipes-support/nss/nss/pqg.c-ULL_addend.patch23
-rw-r--r--meta/recipes-support/nss/nss/signlibs.sh20
-rw-r--r--meta/recipes-support/nss/nss/system-pkcs11.txt5
-rw-r--r--meta/recipes-support/nss/nss_3.50.bb273
14 files changed, 0 insertions, 638 deletions
diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc
index adb18228e7..f6a2936e7c 100644
--- a/meta/conf/distro/include/maintainers.inc
+++ b/meta/conf/distro/include/maintainers.inc
@@ -527,7 +527,6 @@ RECIPE_MAINTAINER_pn-nfs-utils = "Robert Yang <liezhi.yang@windriver.com>"
527RECIPE_MAINTAINER_pn-ninja = "Khem Raj <raj.khem@gmail.com>" 527RECIPE_MAINTAINER_pn-ninja = "Khem Raj <raj.khem@gmail.com>"
528RECIPE_MAINTAINER_pn-npth = "Alexander Kanavin <alex.kanavin@gmail.com>" 528RECIPE_MAINTAINER_pn-npth = "Alexander Kanavin <alex.kanavin@gmail.com>"
529RECIPE_MAINTAINER_pn-nspr = "Armin Kuster <akuster808@gmail.com>" 529RECIPE_MAINTAINER_pn-nspr = "Armin Kuster <akuster808@gmail.com>"
530RECIPE_MAINTAINER_pn-nss = "Armin Kuster <akuster808@gmail.com>"
531RECIPE_MAINTAINER_pn-nss-myhostname = "Anuj Mittal <anuj.mittal@intel.com>" 530RECIPE_MAINTAINER_pn-nss-myhostname = "Anuj Mittal <anuj.mittal@intel.com>"
532RECIPE_MAINTAINER_pn-ofono = "Ross Burton <ross.burton@intel.com>" 531RECIPE_MAINTAINER_pn-ofono = "Ross Burton <ross.burton@intel.com>"
533RECIPE_MAINTAINER_pn-opensbi = "Alistair Francis <alistair.francis@wdc.com>" 532RECIPE_MAINTAINER_pn-opensbi = "Alistair Francis <alistair.francis@wdc.com>"
diff --git a/meta/recipes-support/nss/nss/0001-freebl-add-a-configure-option-to-disable-ARM-HW-cryp.patch b/meta/recipes-support/nss/nss/0001-freebl-add-a-configure-option-to-disable-ARM-HW-cryp.patch
deleted file mode 100644
index c380c14491..0000000000
--- a/meta/recipes-support/nss/nss/0001-freebl-add-a-configure-option-to-disable-ARM-HW-cryp.patch
+++ /dev/null
@@ -1,52 +0,0 @@
1From 5595e9651aca39af945931c73eb524a0f8bd130d Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Wed, 18 Dec 2019 12:29:50 +0100
4Subject: [PATCH] freebl: add a configure option to disable ARM HW crypto
5
6Not all current hardware supports it, particularly anything
7prior to armv8 does not.
8
9Upstream-Status: Pending
10Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
11---
12 nss/lib/freebl/Makefile | 3 +++
13 1 file changed, 3 insertions(+)
14
15--- a/nss/lib/freebl/Makefile
16+++ b/nss/lib/freebl/Makefile
17@@ -125,6 +125,9 @@ else
18 DEFINES += -DNSS_X86
19 endif
20 endif
21+
22+ifdef NSS_USE_ARM_HW_CRYPTO
23+ DEFINES += -DNSS_USE_ARM_HW_CRYPTO
24 ifeq ($(CPU_ARCH),aarch64)
25 DEFINES += -DUSE_HW_AES
26 EXTRA_SRCS += aes-armv8.c gcm-aarch64.c
27@@ -146,6 +149,7 @@ ifeq ($(CPU_ARCH),arm)
28 endif
29 endif
30 endif
31+endif
32
33 ifeq ($(OS_TARGET),OSF1)
34 DEFINES += -DMP_ASSEMBLY_MULTIPLY -DMP_NO_MP_WORD
35--- a/nss/lib/freebl/gcm.c
36+++ b/nss/lib/freebl/gcm.c
37@@ -17,6 +17,7 @@
38
39 #include <limits.h>
40
41+#ifdef NSS_USE_ARM_HW_CRYPTO
42 /* old gcc doesn't support some poly64x2_t intrinsic */
43 #if defined(__aarch64__) && defined(IS_LITTLE_ENDIAN) && \
44 (defined(__clang__) || defined(__GNUC__) && __GNUC__ > 6)
45@@ -25,6 +26,7 @@
46 /* We don't test on big endian platform, so disable this on big endian. */
47 #define USE_ARM_GCM
48 #endif
49+#endif
50
51 /* Forward declarations */
52 SECStatus gcm_HashInit_hw(gcmHashContext *ghash);
diff --git a/meta/recipes-support/nss/nss/0001-nss-fix-support-cross-compiling.patch b/meta/recipes-support/nss/nss/0001-nss-fix-support-cross-compiling.patch
deleted file mode 100644
index d5403397e7..0000000000
--- a/meta/recipes-support/nss/nss/0001-nss-fix-support-cross-compiling.patch
+++ /dev/null
@@ -1,48 +0,0 @@
1From 0cf47ee432cc26a706864fcc09b2c3adc342a679 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Wed, 22 Feb 2017 11:36:11 +0200
4Subject: [PATCH] nss: fix support cross compiling
5
6Let some make variables be assigned from outside makefile.
7
8Upstream-Status: Inappropriate [configuration]
9Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
10Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
11---
12 nss/coreconf/arch.mk | 2 +-
13 nss/lib/freebl/Makefile | 6 ++++++
14 2 files changed, 7 insertions(+), 1 deletion(-)
15
16diff --git a/nss/coreconf/arch.mk b/nss/coreconf/arch.mk
17index 06c276f..9c1eb51 100644
18--- a/nss/coreconf/arch.mk
19+++ b/nss/coreconf/arch.mk
20@@ -30,7 +30,7 @@ OS_TEST := $(shell uname -m)
21 ifeq ($(OS_TEST),i86pc)
22 OS_RELEASE := $(shell uname -r)_$(OS_TEST)
23 else
24- OS_RELEASE := $(shell uname -r)
25+ OS_RELEASE ?= $(shell uname -r)
26 endif
27
28 #
29diff --git a/nss/lib/freebl/Makefile b/nss/lib/freebl/Makefile
30index 0ce1425..ebeb411 100644
31--- a/nss/lib/freebl/Makefile
32+++ b/nss/lib/freebl/Makefile
33@@ -36,6 +36,12 @@ ifdef USE_64
34 DEFINES += -DNSS_USE_64
35 endif
36
37+ifeq ($(OS_TEST),mips)
38+ifndef USE_64
39+ DEFINES += -DNS_PTR_LE_32
40+endif
41+endif
42+
43 ifdef USE_ABI32_FPU
44 DEFINES += -DNSS_USE_ABI32_FPU
45 endif
46--
472.11.0
48
diff --git a/meta/recipes-support/nss/nss/blank-cert9.db b/meta/recipes-support/nss/nss/blank-cert9.db
deleted file mode 100644
index 7d4bcf2582..0000000000
--- a/meta/recipes-support/nss/nss/blank-cert9.db
+++ /dev/null
Binary files differ
diff --git a/meta/recipes-support/nss/nss/blank-key4.db b/meta/recipes-support/nss/nss/blank-key4.db
deleted file mode 100644
index d47f08d04f..0000000000
--- a/meta/recipes-support/nss/nss/blank-key4.db
+++ /dev/null
Binary files differ
diff --git a/meta/recipes-support/nss/nss/disable-Wvarargs-with-clang.patch b/meta/recipes-support/nss/nss/disable-Wvarargs-with-clang.patch
deleted file mode 100644
index de812d27ba..0000000000
--- a/meta/recipes-support/nss/nss/disable-Wvarargs-with-clang.patch
+++ /dev/null
@@ -1,33 +0,0 @@
1clang 3.9 add this warning to rightly flag undefined
2behavior, we relegate this to be just a warning instead
3of error and keep the behavior as it was. Right fix would
4be to not pass enum to the function with variadic arguments
5as last named argument
6
7Fixes errors like
8ocsp.c:2220:22: error: passing an object that undergoes default argument promotion to 'va_start' has undefined behavior [-Werror,-Wvarargs]
9 va_start(ap, responseType0);
10 ^
11ocsp.c:2200:43: note: parameter of type 'SECOidTag' is declared here
12 SECOidTag responseType0, ...)
13
14see
15https://www.securecoding.cert.org/confluence/display/cplusplus/EXP58-CPP.+Pass+an+object+of+the+correct+type+to+va_start
16for more details
17
18Signed-off-by: Khem Raj <raj.khem@gmail.com>
19Upstream-Status: Pending
20
21Index: nss-3.37.1/nss/coreconf/Werror.mk
22===================================================================
23--- nss-3.37.1.orig/nss/coreconf/Werror.mk
24+++ nss-3.37.1/nss/coreconf/Werror.mk
25@@ -56,7 +56,7 @@ ifndef WARNING_CFLAGS
26 ifdef CC_IS_CLANG
27 # -Qunused-arguments : clang objects to arguments that it doesn't understand
28 # and fixing this would require rearchitecture
29- WARNING_CFLAGS += -Qunused-arguments
30+ WARNING_CFLAGS += -Qunused-arguments -Wno-error=varargs
31 # -Wno-parentheses-equality : because clang warns about macro expansions
32 WARNING_CFLAGS += $(call disable_warning,parentheses-equality)
33 ifdef BUILD_OPT
diff --git a/meta/recipes-support/nss/nss/nss-fix-incorrect-shebang-of-perl.patch b/meta/recipes-support/nss/nss/nss-fix-incorrect-shebang-of-perl.patch
deleted file mode 100644
index 547594d5b6..0000000000
--- a/meta/recipes-support/nss/nss/nss-fix-incorrect-shebang-of-perl.patch
+++ /dev/null
@@ -1,110 +0,0 @@
1nss: fix incorrect shebang of perl
2
3Replace incorrect shebang of perl with `#!/usr/bin/env perl'.
4
5Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
6Upstream-Status: Pending
7---
8 nss/cmd/smimetools/smime | 2 +-
9 nss/coreconf/cpdist.pl | 2 +-
10 nss/coreconf/import.pl | 2 +-
11 nss/coreconf/jniregen.pl | 2 +-
12 nss/coreconf/outofdate.pl | 2 +-
13 nss/coreconf/release.pl | 2 +-
14 nss/coreconf/version.pl | 2 +-
15 nss/tests/clean_tbx | 2 +-
16 nss/tests/path_uniq | 2 +-
17 9 files changed, 9 insertions(+), 9 deletions(-)
18
19diff --git a/nss/cmd/smimetools/smime b/nss/cmd/smimetools/smime
20--- a/nss/cmd/smimetools/smime
21+++ b/nss/cmd/smimetools/smime
22@@ -1,4 +1,4 @@
23-#!/usr/local/bin/perl
24+#!/usr/bin/env perl
25
26 # This Source Code Form is subject to the terms of the Mozilla Public
27 # License, v. 2.0. If a copy of the MPL was not distributed with this
28diff --git a/nss/coreconf/cpdist.pl b/nss/coreconf/cpdist.pl
29index 800edfb..652187f 100755
30--- a/nss/coreconf/cpdist.pl
31+++ b/nss/coreconf/cpdist.pl
32@@ -1,4 +1,4 @@
33-#! /usr/local/bin/perl
34+#!/usr/bin/env perl
35 #
36 # This Source Code Form is subject to the terms of the Mozilla Public
37 # License, v. 2.0. If a copy of the MPL was not distributed with this
38diff --git a/nss/coreconf/import.pl b/nss/coreconf/import.pl
39index dd2d177..428eaa5 100755
40--- a/nss/coreconf/import.pl
41+++ b/nss/coreconf/import.pl
42@@ -1,4 +1,4 @@
43-#! /usr/local/bin/perl
44+#!/usr/bin/env perl
45 #
46 # This Source Code Form is subject to the terms of the Mozilla Public
47 # License, v. 2.0. If a copy of the MPL was not distributed with this
48diff --git a/nss/coreconf/jniregen.pl b/nss/coreconf/jniregen.pl
49index 2039180..5f4f69c 100755
50--- a/nss/coreconf/jniregen.pl
51+++ b/nss/coreconf/jniregen.pl
52@@ -1,4 +1,4 @@
53-#!/usr/local/bin/perl
54+#!/usr/bin/env perl
55 #
56 # This Source Code Form is subject to the terms of the Mozilla Public
57 # License, v. 2.0. If a copy of the MPL was not distributed with this
58diff --git a/nss/coreconf/outofdate.pl b/nss/coreconf/outofdate.pl
59index 33d80bb..01fc097 100755
60--- a/nss/coreconf/outofdate.pl
61+++ b/nss/coreconf/outofdate.pl
62@@ -1,4 +1,4 @@
63-#!/usr/local/bin/perl
64+#!/usr/bin/env perl
65 #
66 # This Source Code Form is subject to the terms of the Mozilla Public
67 # License, v. 2.0. If a copy of the MPL was not distributed with this
68diff --git a/nss/coreconf/release.pl b/nss/coreconf/release.pl
69index 7cde19d..b5df2f6 100755
70--- a/nss/coreconf/release.pl
71+++ b/nss/coreconf/release.pl
72@@ -1,4 +1,4 @@
73-#! /usr/local/bin/perl
74+#!/usr/bin/env perl
75 #
76 # This Source Code Form is subject to the terms of the Mozilla Public
77 # License, v. 2.0. If a copy of the MPL was not distributed with this
78diff --git a/nss/coreconf/version.pl b/nss/coreconf/version.pl
79index d2a4942..79359fe 100644
80--- a/nss/coreconf/version.pl
81+++ b/nss/coreconf/version.pl
82@@ -1,4 +1,4 @@
83-#!/usr/sbin/perl
84+#!/usr/bin/env perl
85 #
86 # This Source Code Form is subject to the terms of the Mozilla Public
87 # License, v. 2.0. If a copy of the MPL was not distributed with this
88diff --git a/nss/tests/clean_tbx b/nss/tests/clean_tbx
89index 4de9555..a7def9f 100755
90--- a/nss/tests/clean_tbx
91+++ b/nss/tests/clean_tbx
92@@ -1,4 +1,4 @@
93-#! /bin/perl
94+#!/usr/bin/env perl
95
96 #######################################################################
97 #
98diff --git a/nss/tests/path_uniq b/nss/tests/path_uniq
99index f29f60a..08fbffa 100755
100--- a/nss/tests/path_uniq
101+++ b/nss/tests/path_uniq
102@@ -1,4 +1,4 @@
103-#! /bin/perl
104+#!/usr/bin/env perl
105
106 ########################################################################
107 #
108--
1091.8.1.2
110
diff --git a/meta/recipes-support/nss/nss/nss-fix-nsinstall-build.patch b/meta/recipes-support/nss/nss/nss-fix-nsinstall-build.patch
deleted file mode 100644
index 43c09d13ea..0000000000
--- a/meta/recipes-support/nss/nss/nss-fix-nsinstall-build.patch
+++ /dev/null
@@ -1,36 +0,0 @@
1Fix nss multilib build on openSUSE 11.x 32bit
2
3While building lib64-nss on openSUSE 11.x 32bit, the nsinstall will
4fail with error:
5
6* nsinstall.c:1:0: sorry, unimplemented: 64-bit mode not compiled
7
8It caused by the '-m64' option which passed to host gcc.
9
10The nsinstall was built first while nss starting to build, it only runs
11on host to install built files, it doesn't need any cross-compling or
12multilib build options. Just clean the ARCHFLAG and LDFLAGS to fix this
13error.
14
15Upstream-Status: Pending
16
17Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
18===================================================
19Index: nss-3.24/nss/coreconf/nsinstall/Makefile
20===================================================================
21--- nss-3.24.orig/nss/coreconf/nsinstall/Makefile
22+++ nss-3.24/nss/coreconf/nsinstall/Makefile
23@@ -18,6 +18,13 @@ INTERNAL_TOOLS = 1
24
25 include $(DEPTH)/coreconf/config.mk
26
27+# nsinstall is unfit for cross-compiling/multilib-build since it was
28+# always run on local host to install built files. This change intends
29+# to clean the '-m64' from ARCHFLAG and LDFLAGS.
30+ARCHFLAG =
31+LDFLAGS =
32+# CFLAGS =
33+
34 ifeq (,$(filter-out OS2 WIN%,$(OS_TARGET)))
35 PROGRAM =
36 else
diff --git a/meta/recipes-support/nss/nss/nss-no-rpath-for-cross-compiling.patch b/meta/recipes-support/nss/nss/nss-no-rpath-for-cross-compiling.patch
deleted file mode 100644
index 7661dc93a0..0000000000
--- a/meta/recipes-support/nss/nss/nss-no-rpath-for-cross-compiling.patch
+++ /dev/null
@@ -1,26 +0,0 @@
1nss:no rpath for cross compiling
2
3Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
4Upstream-Status: Inappropriate [configuration]
5---
6 nss/cmd/platlibs.mk | 4 ++--
7 1 file changed, 2 insertions(+), 2 deletions(-)
8
9diff --git a/nss/cmd/platlibs.mk b/nss/cmd/platlibs.mk
10--- a/nss/cmd/platlibs.mk
11+++ b/nss/cmd/platlibs.mk
12@@ -18,9 +18,9 @@ endif
13
14 ifeq ($(OS_ARCH), Linux)
15 ifeq ($(USE_64), 1)
16-EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib64:/opt/sun/private/lib64:$$ORIGIN/../lib'
17+#EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib64:/opt/sun/private/lib64:$$ORIGIN/../lib'
18 else
19-EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib:/opt/sun/private/lib'
20+#EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib:/opt/sun/private/lib'
21 endif
22 endif
23
24--
251.8.1.2
26
diff --git a/meta/recipes-support/nss/nss/nss.pc.in b/meta/recipes-support/nss/nss/nss.pc.in
deleted file mode 100644
index 402b4ecb33..0000000000
--- a/meta/recipes-support/nss/nss/nss.pc.in
+++ /dev/null
@@ -1,11 +0,0 @@
1prefix=OEPREFIX
2exec_prefix=OEEXECPREFIX
3libdir=OELIBDIR
4includedir=OEINCDIR
5
6Name: NSS
7Description: Network Security Services
8Version: %NSS_VERSION%
9Requires: nspr >= %NSPR_VERSION%
10Libs: -L${libdir} -lssl3 -lsmime3 -lnss3 -lsoftokn3 -lnssutil3
11Cflags: -IOEINCDIR
diff --git a/meta/recipes-support/nss/nss/pqg.c-ULL_addend.patch b/meta/recipes-support/nss/nss/pqg.c-ULL_addend.patch
deleted file mode 100644
index 3a817faaa6..0000000000
--- a/meta/recipes-support/nss/nss/pqg.c-ULL_addend.patch
+++ /dev/null
@@ -1,23 +0,0 @@
1nss does not build on mips with clang because wrong types are used?
2
3pqg.c:339:16: error: comparison of constant 18446744073709551615 with expression of type 'unsigned long' is always true [-Werror,-Wtautological-constant-out-of-range-compare]
4 if (addend < MP_DIGIT_MAX) {
5 ~~~~~~ ^ ~~~~~~~~~~~~
6
7Signed-off-by: Khem Raj <raj.khem@gmail.com>
8Upstream-Status: Pending
9Index: nss-3.37.1/nss/lib/freebl/pqg.c
10===================================================================
11--- nss-3.37.1.orig/nss/lib/freebl/pqg.c
12+++ nss-3.37.1/nss/lib/freebl/pqg.c
13@@ -326,8 +326,8 @@ generate_h_candidate(SECItem *hit, mp_in
14
15 static SECStatus
16 addToSeed(const SECItem *seed,
17- unsigned long addend,
18- int seedlen, /* g in 186-1 */
19+ unsigned long long addend,
20+ int seedlen, /* g in 186-1 */
21 SECItem *seedout)
22 {
23 mp_int s, sum, modulus, tmp;
diff --git a/meta/recipes-support/nss/nss/signlibs.sh b/meta/recipes-support/nss/nss/signlibs.sh
deleted file mode 100644
index a74e499f8c..0000000000
--- a/meta/recipes-support/nss/nss/signlibs.sh
+++ /dev/null
@@ -1,20 +0,0 @@
1#!/bin/sh
2
3# signlibs.sh
4#
5# (c)2010 Wind River Systems, Inc.
6#
7# regenerates the .chk files for the NSS libraries that require it
8# since the ones that are built have incorrect checksums that were
9# calculated on the host where they really need to be done on the
10# target
11
12CHK_FILES=`ls /lib*/*.chk /usr/lib*/*.chk 2>/dev/null`
13SIGN_BINARY=`which shlibsign`
14for I in $CHK_FILES
15do
16 DN=`dirname $I`
17 BN=`basename $I .chk`
18 FN=$DN/$BN.so
19 $SIGN_BINARY -i $FN
20done
diff --git a/meta/recipes-support/nss/nss/system-pkcs11.txt b/meta/recipes-support/nss/nss/system-pkcs11.txt
deleted file mode 100644
index 1a264e9cc4..0000000000
--- a/meta/recipes-support/nss/nss/system-pkcs11.txt
+++ /dev/null
@@ -1,5 +0,0 @@
1library=
2name=NSS Internal PKCS #11 Module
3parameters=configdir='sql:/etc/pki/nssdb' certPrefix='' keyPrefix='' secmod='secmod.db' flags= updatedir='' updateCertPrefix='' updateKeyPrefix='' updateid='' updateTokenDescription=''
4NSS=Flags=internal,critical trustOrder=75 cipherOrder=100 slotParams=(1={slotFlags=[ECC,RSA,DSA,DH,RC2,RC4,DES,RANDOM,SHA1,MD5,MD2,SSL,TLS,AES,Camellia,SEED,SHA256,SHA512] askpw=any timeout=30})
5
diff --git a/meta/recipes-support/nss/nss_3.50.bb b/meta/recipes-support/nss/nss_3.50.bb
deleted file mode 100644
index e9855d7a7e..0000000000
--- a/meta/recipes-support/nss/nss_3.50.bb
+++ /dev/null
@@ -1,273 +0,0 @@
1SUMMARY = "Mozilla's SSL and TLS implementation"
2DESCRIPTION = "Network Security Services (NSS) is a set of libraries \
3designed to support cross-platform development of \
4security-enabled client and server applications. \
5Applications built with NSS can support SSL v2 and v3, \
6TLS, PKCS 5, PKCS 7, PKCS 11, PKCS 12, S/MIME, X.509 \
7v3 certificates, and other security standards."
8HOMEPAGE = "http://www.mozilla.org/projects/security/pki/nss/"
9SECTION = "libs"
10
11DEPENDS = "sqlite3 nspr zlib nss-native"
12DEPENDS_class-native = "sqlite3-native nspr-native zlib-native"
13
14LICENSE = "MPL-2.0 | (MPL-2.0 & GPL-2.0+) | (MPL-2.0 & LGPL-2.1+)"
15
16LIC_FILES_CHKSUM = "file://nss/COPYING;md5=3b1e88e1b9c0b5a4b2881d46cce06a18 \
17 file://nss/lib/freebl/mpi/doc/LICENSE;md5=491f158d09d948466afce85d6f1fe18f \
18 file://nss/lib/freebl/mpi/doc/LICENSE-MPL;md5=5d425c8f3157dbf212db2ec53d9e5132"
19
20VERSION_DIR = "${@d.getVar('BP').upper().replace('-', '_').replace('.', '_') + '_RTM'}"
21
22SRC_URI = "http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/${VERSION_DIR}/src/${BP}.tar.gz \
23 file://nss.pc.in \
24 file://signlibs.sh \
25 file://0001-nss-fix-support-cross-compiling.patch \
26 file://nss-no-rpath-for-cross-compiling.patch \
27 file://nss-fix-incorrect-shebang-of-perl.patch \
28 file://disable-Wvarargs-with-clang.patch \
29 file://pqg.c-ULL_addend.patch \
30 file://blank-cert9.db \
31 file://blank-key4.db \
32 file://system-pkcs11.txt \
33 file://nss-fix-nsinstall-build.patch \
34 file://0001-freebl-add-a-configure-option-to-disable-ARM-HW-cryp.patch \
35 "
36
37SRC_URI[md5sum] = "e0366615e12b147cebc136c915baea37"
38SRC_URI[sha256sum] = "185df319775243f5f5daa9d49b7f9cc5f2b389435be3247c3376579bee063ba7"
39
40UPSTREAM_CHECK_URI = "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/NSS_Releases"
41UPSTREAM_CHECK_REGEX = "NSS_(?P<pver>.+)_release_notes"
42
43inherit siteinfo
44
45TD = "${S}/tentative-dist"
46TDS = "${S}/tentative-dist-staging"
47
48TARGET_CC_ARCH += "${LDFLAGS}"
49
50do_configure_prepend_libc-musl () {
51 sed -i -e '/-DHAVE_SYS_CDEFS_H/d' ${S}/nss/lib/dbm/config/config.mk
52}
53
54do_compile_prepend_class-native() {
55 export NSPR_INCLUDE_DIR=${STAGING_INCDIR_NATIVE}/nspr
56 export NSPR_LIB_DIR=${STAGING_LIBDIR_NATIVE}
57 export NSS_ENABLE_WERROR=0
58}
59
60do_compile_prepend_class-nativesdk() {
61 export LDFLAGS=""
62}
63
64do_compile_prepend_class-native() {
65 # Need to set RPATH so that chrpath will do its job correctly
66 RPATH="-Wl,-rpath-link,${STAGING_LIBDIR_NATIVE} -Wl,-rpath-link,${STAGING_BASE_LIBDIR_NATIVE} -Wl,-rpath,${STAGING_LIBDIR_NATIVE} -Wl,-rpath,${STAGING_BASE_LIBDIR_NATIVE}"
67}
68
69do_compile() {
70 export NSPR_INCLUDE_DIR=${STAGING_INCDIR}/nspr
71
72 export CROSS_COMPILE=1
73 export NATIVE_CC="${BUILD_CC}"
74 # Additional defines needed on Centos 7
75 export NATIVE_FLAGS="${BUILD_CFLAGS} -DLINUX -Dlinux"
76 export BUILD_OPT=1
77
78 export FREEBL_NO_DEPEND=1
79 export FREEBL_LOWHASH=1
80
81 export LIBDIR=${libdir}
82 export MOZILLA_CLIENT=1
83 export NS_USE_GCC=1
84 export NSS_USE_SYSTEM_SQLITE=1
85 export NSS_ENABLE_ECC=1
86
87 ${@bb.utils.contains("TUNE_FEATURES", "crypto", "export NSS_USE_ARM_HW_CRYPTO=1", "", d)}
88
89 export OS_RELEASE=3.4
90 export OS_TARGET=Linux
91 export OS_ARCH=Linux
92
93 if [ "${TARGET_ARCH}" = "powerpc" ]; then
94 OS_TEST=ppc
95 elif [ "${TARGET_ARCH}" = "powerpc64" ]; then
96 OS_TEST=ppc64
97 elif [ "${TARGET_ARCH}" = "mips" -o "${TARGET_ARCH}" = "mipsel" -o "${TARGET_ARCH}" = "mips64" -o "${TARGET_ARCH}" = "mips64el" ]; then
98 OS_TEST=mips
99 elif [ "${TARGET_ARCH}" = "aarch64_be" ]; then
100 OS_TEST="aarch64"
101 else
102 OS_TEST="${TARGET_ARCH}"
103 fi
104
105 if [ "${SITEINFO_BITS}" = "64" ]; then
106 export USE_64=1
107 elif [ "${TARGET_ARCH}" = "x86_64" -a "${SITEINFO_BITS}" = "32" ]; then
108 export USE_X32=1
109 fi
110
111 export NSS_DISABLE_GTESTS=1
112
113 # We can modify CC in the environment, but if we set it via an
114 # argument to make, nsinstall, a host program, will also build with it!
115 #
116 # nss pretty much does its own thing with CFLAGS, so we put them into CC.
117 # Optimization will get clobbered, but most of the stuff will survive.
118 # The motivation for this is to point to the correct place for debug
119 # source files and CFLAGS does that. Nothing uses CCC.
120 #
121 export CC="${CC} ${CFLAGS}"
122 make -C ./nss CCC="${CXX} -g" \
123 OS_TEST=${OS_TEST} \
124 RPATH="${RPATH}"
125}
126
127do_compile[vardepsexclude] += "SITEINFO_BITS"
128
129do_install_prepend_class-nativesdk() {
130 export LDFLAGS=""
131}
132
133do_install() {
134 export CROSS_COMPILE=1
135 export NATIVE_CC="${BUILD_CC}"
136 export BUILD_OPT=1
137
138 export FREEBL_NO_DEPEND=1
139
140 export LIBDIR=${libdir}
141 export MOZILLA_CLIENT=1
142 export NS_USE_GCC=1
143 export NSS_USE_SYSTEM_SQLITE=1
144 export NSS_ENABLE_ECC=1
145
146 export OS_RELEASE=3.4
147 export OS_TARGET=Linux
148 export OS_ARCH=Linux
149
150 if [ "${TARGET_ARCH}" = "powerpc" ]; then
151 OS_TEST=ppc
152 elif [ "${TARGET_ARCH}" = "powerpc64" ]; then
153 OS_TEST=ppc64
154 elif [ "${TARGET_ARCH}" = "mips" -o "${TARGET_ARCH}" = "mipsel" -o "${TARGET_ARCH}" = "mips64" -o "${TARGET_ARCH}" = "mips64el" ]; then
155 OS_TEST=mips
156 elif [ "${TARGET_ARCH}" = "aarch64_be" ]; then
157 CPU_ARCH=aarch64
158 OS_TEST="aarch64"
159 else
160 OS_TEST="${TARGET_ARCH}"
161 fi
162 if [ "${SITEINFO_BITS}" = "64" ]; then
163 export USE_64=1
164 elif [ "${TARGET_ARCH}" = "x86_64" -a "${SITEINFO_BITS}" = "32" ]; then
165 export USE_X32=1
166 fi
167
168 export NSS_DISABLE_GTESTS=1
169
170 make -C ./nss \
171 CCC="${CXX}" \
172 OS_TEST=${OS_TEST} \
173 SOURCE_LIB_DIR="${TD}/${libdir}" \
174 SOURCE_BIN_DIR="${TD}/${bindir}" \
175 install
176
177 install -d ${D}/${libdir}/
178 for file in ${S}/dist/*.OBJ/lib/*.so; do
179 echo "Installing `basename $file`..."
180 cp $file ${D}/${libdir}/
181 done
182
183 for shared_lib in ${TD}/${libdir}/*.so.*; do
184 if [ -f $shared_lib ]; then
185 cp $shared_lib ${D}/${libdir}
186 ln -sf $(basename $shared_lib) ${D}/${libdir}/$(basename $shared_lib .1oe)
187 fi
188 done
189 for shared_lib in ${TD}/${libdir}/*.so; do
190 if [ -f $shared_lib -a ! -e ${D}/${libdir}/$shared_lib ]; then
191 cp $shared_lib ${D}/${libdir}
192 fi
193 done
194
195 install -d ${D}/${includedir}/nss3
196 install -m 644 -t ${D}/${includedir}/nss3 dist/public/nss/*
197
198 install -d ${D}/${bindir}
199 for binary in ${TD}/${bindir}/*; do
200 install -m 755 -t ${D}/${bindir} $binary
201 done
202}
203
204do_install[vardepsexclude] += "SITEINFO_BITS"
205
206do_install_append() {
207 # Create empty .chk files for the NSS libraries at build time. They could
208 # be regenerated at target's boot time.
209 for file in libsoftokn3.chk libfreebl3.chk libnssdbm3.chk; do
210 touch ${D}/${libdir}/$file
211 chmod 755 ${D}/${libdir}/$file
212 done
213 install -D -m 755 ${WORKDIR}/signlibs.sh ${D}/${bindir}/signlibs.sh
214
215 install -d ${D}${libdir}/pkgconfig/
216 sed 's/%NSS_VERSION%/${PV}/' ${WORKDIR}/nss.pc.in | sed 's/%NSPR_VERSION%/4.9.2/' > ${D}${libdir}/pkgconfig/nss.pc
217 sed -i s:OEPREFIX:${prefix}:g ${D}${libdir}/pkgconfig/nss.pc
218 sed -i s:OEEXECPREFIX:${exec_prefix}:g ${D}${libdir}/pkgconfig/nss.pc
219 sed -i s:OELIBDIR:${libdir}:g ${D}${libdir}/pkgconfig/nss.pc
220 sed -i s:OEINCDIR:${includedir}/nss3:g ${D}${libdir}/pkgconfig/nss.pc
221}
222
223do_install_append_class-target() {
224 # It used to call certutil to create a blank certificate with empty password at
225 # build time, but the checksum of key4.db changes every time when certutil is called.
226 # It causes non-determinism issue, so provide databases with a blank certificate
227 # which are originally from output of nss in qemux86-64 build. You can get these
228 # databases by:
229 # certutil -N -d sql:/database/path/ --empty-password
230 install -d ${D}${sysconfdir}/pki/nssdb/
231 install -m 0644 ${WORKDIR}/blank-cert9.db ${D}${sysconfdir}/pki/nssdb/cert9.db
232 install -m 0644 ${WORKDIR}/blank-key4.db ${D}${sysconfdir}/pki/nssdb/key4.db
233 install -m 0644 ${WORKDIR}/system-pkcs11.txt ${D}${sysconfdir}/pki/nssdb/pkcs11.txt
234}
235
236PACKAGE_WRITE_DEPS += "nss-native"
237pkg_postinst_${PN} () {
238 if [ -n "$D" ]; then
239 for I in $D${libdir}/lib*.chk; do
240 DN=`dirname $I`
241 BN=`basename $I .chk`
242 FN=$DN/$BN.so
243 shlibsign -i $FN
244 if [ $? -ne 0 ]; then
245 exit 1
246 fi
247 done
248 else
249 signlibs.sh
250 fi
251}
252
253PACKAGES =+ "${PN}-smime"
254FILES_${PN}-smime = "\
255 ${bindir}/smime \
256"
257
258FILES_${PN} = "\
259 ${sysconfdir} \
260 ${bindir} \
261 ${libdir}/lib*.chk \
262 ${libdir}/lib*.so \
263 "
264
265FILES_${PN}-dev = "\
266 ${libdir}/nss \
267 ${libdir}/pkgconfig/* \
268 ${includedir}/* \
269 "
270
271RDEPENDS_${PN}-smime = "perl"
272
273BBCLASSEXTEND = "native nativesdk"