diff options
author | Joe Slater <jslater@windriver.com> | 2015-07-30 09:34:29 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-08-01 07:34:08 +0100 |
commit | b76c9086209ad20e55723dca0b17d89a9d627dfc (patch) | |
tree | 6c12aeaf5b24eb097112118645a87c516ca3809e /meta/recipes-support/nss/nss.inc | |
parent | 4c8f27430ad7349f127d9d17ebc1ebe62d6334b7 (diff) | |
download | poky-b76c9086209ad20e55723dca0b17d89a9d627dfc.tar.gz |
nss: advance to version 3.19.1
Picks up fixes for CVE-2015-2721 and CVE-2015-2730. Specify previously
overlooked license file COPYING. Fold nss.inc into recipe.
(From OE-Core rev: 6a68e5d9ee6122f0ed70396569eb6cd1a3297c9d)
Signed-off-by: Joe Slater <jslater@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support/nss/nss.inc')
-rw-r--r-- | meta/recipes-support/nss/nss.inc | 217 |
1 files changed, 0 insertions, 217 deletions
diff --git a/meta/recipes-support/nss/nss.inc b/meta/recipes-support/nss/nss.inc deleted file mode 100644 index 665e4e6a09..0000000000 --- a/meta/recipes-support/nss/nss.inc +++ /dev/null | |||
@@ -1,217 +0,0 @@ | |||
1 | SUMMARY = "Mozilla's SSL and TLS implementation" | ||
2 | DESCRIPTION = "Network Security Services (NSS) is a set of libraries \ | ||
3 | designed to support cross-platform development of \ | ||
4 | security-enabled client and server applications. \ | ||
5 | Applications built with NSS can support SSL v2 and v3, \ | ||
6 | TLS, PKCS 5, PKCS 7, PKCS 11, PKCS 12, S/MIME, X.509 \ | ||
7 | v3 certificates, and other security standards." | ||
8 | HOMEPAGE = "http://www.mozilla.org/projects/security/pki/nss/" | ||
9 | SECTION = "libs" | ||
10 | |||
11 | LICENSE = "MPL-2.0 | (MPL-2.0 & GPL-2.0+) | (MPL-2.0 & LGPL-2.1+)" | ||
12 | |||
13 | LIC_FILES_CHKSUM = "file://nss/lib/freebl/mpi/doc/LICENSE;md5=491f158d09d948466afce85d6f1fe18f \ | ||
14 | file://nss/lib/freebl/mpi/doc/LICENSE-MPL;md5=6bf96825e3d7ce4de25621ae886cc859" | ||
15 | SRC_URI = "\ | ||
16 | file://nss-fix-support-cross-compiling.patch \ | ||
17 | file://nss-no-rpath-for-cross-compiling.patch \ | ||
18 | file://nss-fix-incorrect-shebang-of-perl.patch \ | ||
19 | file://nss-fix-nsinstall-build.patch \ | ||
20 | " | ||
21 | SRC_URI_append = "\ | ||
22 | file://nss.pc.in \ | ||
23 | file://signlibs.sh \ | ||
24 | " | ||
25 | inherit siteinfo | ||
26 | |||
27 | DEPENDS = "sqlite3 nspr zlib nss-native" | ||
28 | DEPENDS_class-native = "sqlite3-native nspr-native zlib-native" | ||
29 | RDEPENDS_${PN}-smime = "perl" | ||
30 | |||
31 | TD = "${S}/tentative-dist" | ||
32 | TDS = "${S}/tentative-dist-staging" | ||
33 | |||
34 | TARGET_CC_ARCH += "${LDFLAGS}" | ||
35 | |||
36 | do_compile_prepend_class-native() { | ||
37 | export NSPR_INCLUDE_DIR=${STAGING_INCDIR_NATIVE} | ||
38 | export NSPR_LIB_DIR=${STAGING_LIBDIR_NATIVE} | ||
39 | } | ||
40 | |||
41 | do_compile_prepend_class-nativesdk() { | ||
42 | export LDFLAGS="" | ||
43 | } | ||
44 | |||
45 | do_compile() { | ||
46 | export CROSS_COMPILE=1 | ||
47 | export NATIVE_CC="gcc" | ||
48 | export BUILD_OPT=1 | ||
49 | |||
50 | export FREEBL_NO_DEPEND=1 | ||
51 | export FREEBL_LOWHASH=1 | ||
52 | |||
53 | export LIBDIR=${libdir} | ||
54 | export MOZILLA_CLIENT=1 | ||
55 | export NS_USE_GCC=1 | ||
56 | export NSS_USE_SYSTEM_SQLITE=1 | ||
57 | export NSS_ENABLE_ECC=1 | ||
58 | |||
59 | export OS_RELEASE=3.4 | ||
60 | export OS_TARGET=Linux | ||
61 | export OS_ARCH=Linux | ||
62 | |||
63 | if [ "${TARGET_ARCH}" = "powerpc" ]; then | ||
64 | OS_TEST=ppc | ||
65 | elif [ "${TARGET_ARCH}" = "powerpc64" ]; then | ||
66 | OS_TEST=ppc64 | ||
67 | elif [ "${TARGET_ARCH}" = "mips" -o "${TARGET_ARCH}" = "mipsel" -o "${TARGET_ARCH}" = "mips64" -o "${TARGET_ARCH}" = "mips64el" ]; then | ||
68 | OS_TEST=mips | ||
69 | else | ||
70 | OS_TEST="${TARGET_ARCH}" | ||
71 | fi | ||
72 | |||
73 | if [ "${SITEINFO_BITS}" = "64" ]; then | ||
74 | export USE_64=1 | ||
75 | elif [ "${TARGET_ARCH}" = "x86_64" -a "${SITEINFO_BITS}" = "32" ]; then | ||
76 | export USE_X32=1 | ||
77 | fi | ||
78 | |||
79 | # We can modify CC in the environment, but if we set it via an | ||
80 | # argument to make, nsinstall, a host program, will also build with it! | ||
81 | # | ||
82 | export CC="${CC} -g" | ||
83 | make -C ./nss CCC="${CXX} -g" \ | ||
84 | OS_TEST=${OS_TEST} | ||
85 | } | ||
86 | |||
87 | |||
88 | do_install_prepend_class-nativesdk() { | ||
89 | export LDFLAGS="" | ||
90 | } | ||
91 | |||
92 | do_install() { | ||
93 | export CROSS_COMPILE=1 | ||
94 | export NATIVE_CC="gcc" | ||
95 | export BUILD_OPT=1 | ||
96 | |||
97 | export FREEBL_NO_DEPEND=1 | ||
98 | |||
99 | export LIBDIR=${libdir} | ||
100 | export MOZILLA_CLIENT=1 | ||
101 | export NS_USE_GCC=1 | ||
102 | export NSS_USE_SYSTEM_SQLITE=1 | ||
103 | export NSS_ENABLE_ECC=1 | ||
104 | |||
105 | export OS_RELEASE=3.4 | ||
106 | export OS_TARGET=Linux | ||
107 | export OS_ARCH=Linux | ||
108 | |||
109 | if [ "${TARGET_ARCH}" = "powerpc" ]; then | ||
110 | OS_TEST=ppc | ||
111 | elif [ "${TARGET_ARCH}" = "powerpc64" ]; then | ||
112 | OS_TEST=ppc64 | ||
113 | elif [ "${TARGET_ARCH}" = "mips" -o "${TARGET_ARCH}" = "mipsel" -o "${TARGET_ARCH}" = "mips64" -o "${TARGET_ARCH}" = "mips64el" ]; then | ||
114 | OS_TEST=mips | ||
115 | else | ||
116 | OS_TEST="${TARGET_ARCH}" | ||
117 | fi | ||
118 | if [ "${SITEINFO_BITS}" = "64" ]; then | ||
119 | export USE_64=1 | ||
120 | elif [ "${TARGET_ARCH}" = "x86_64" -a "${SITEINFO_BITS}" = "32" ]; then | ||
121 | export USE_X32=1 | ||
122 | fi | ||
123 | |||
124 | make -C ./nss \ | ||
125 | CCC="${CXX}" \ | ||
126 | OS_TEST=${OS_TEST} \ | ||
127 | SOURCE_LIB_DIR="${TD}/${libdir}" \ | ||
128 | SOURCE_BIN_DIR="${TD}/${bindir}" \ | ||
129 | install | ||
130 | |||
131 | install -d ${D}/${libdir}/ | ||
132 | for file in ${S}/dist/*.OBJ/lib/*.so; do | ||
133 | echo "Installing `basename $file`..." | ||
134 | cp $file ${D}/${libdir}/ | ||
135 | done | ||
136 | |||
137 | for shared_lib in ${TD}/${libdir}/*.so.*; do | ||
138 | if [ -f $shared_lib ]; then | ||
139 | cp $shared_lib ${D}/${libdir} | ||
140 | ln -sf $(basename $shared_lib) ${D}/${libdir}/$(basename $shared_lib .1oe) | ||
141 | fi | ||
142 | done | ||
143 | for shared_lib in ${TD}/${libdir}/*.so; do | ||
144 | if [ -f $shared_lib -a ! -e ${D}/${libdir}/$shared_lib ]; then | ||
145 | cp $shared_lib ${D}/${libdir} | ||
146 | fi | ||
147 | done | ||
148 | |||
149 | install -d ${D}/${includedir}/nss3 | ||
150 | install -m 644 -t ${D}/${includedir}/nss3 dist/public/nss/* | ||
151 | |||
152 | install -d ${D}/${bindir} | ||
153 | for binary in ${TD}/${bindir}/*; do | ||
154 | install -m 755 -t ${D}/${bindir} $binary | ||
155 | done | ||
156 | } | ||
157 | |||
158 | do_install_append() { | ||
159 | # Create empty .chk files for the NSS libraries at build time. They could | ||
160 | # be regenerated at target's boot time. | ||
161 | for file in libsoftokn3.chk libfreebl3.chk libnssdbm3.chk; do | ||
162 | touch ${D}/${libdir}/$file | ||
163 | chmod 755 ${D}/${libdir}/$file | ||
164 | done | ||
165 | install -D -m 755 ${WORKDIR}/signlibs.sh ${D}/${bindir}/signlibs.sh | ||
166 | |||
167 | install -d ${D}${libdir}/pkgconfig/ | ||
168 | sed 's/%NSS_VERSION%/${PV}/' ${WORKDIR}/nss.pc.in | sed 's/%NSPR_VERSION%/4.9.2/' > ${D}${libdir}/pkgconfig/nss.pc | ||
169 | sed -i s:OEPREFIX:${prefix}:g ${D}${libdir}/pkgconfig/nss.pc | ||
170 | sed -i s:OEEXECPREFIX:${exec_prefix}:g ${D}${libdir}/pkgconfig/nss.pc | ||
171 | sed -i s:OELIBDIR:${libdir}:g ${D}${libdir}/pkgconfig/nss.pc | ||
172 | sed -i s:OEINCDIR:${includedir}/nss3:g ${D}${libdir}/pkgconfig/nss.pc | ||
173 | } | ||
174 | |||
175 | do_install_append_class-target() { | ||
176 | # Create a blank certificate | ||
177 | mkdir -p ${D}${sysconfdir}/pki/nssdb/ | ||
178 | touch ./empty_password | ||
179 | certutil -N -d ${D}${sysconfdir}/pki/nssdb/ -f ./empty_password | ||
180 | chmod 644 ${D}${sysconfdir}/pki/nssdb/*.db | ||
181 | rm ./empty_password | ||
182 | } | ||
183 | |||
184 | pkg_postinst_${PN} () { | ||
185 | if [ -n "$D" ]; then | ||
186 | for I in $D/${libdir}/lib*.chk; do | ||
187 | DN=`dirname $I` | ||
188 | BN=`basename $I .chk` | ||
189 | FN=$DN/$BN.so | ||
190 | shlibsign -i $FN | ||
191 | if [ $? -ne 0 ]; then | ||
192 | exit 1 | ||
193 | fi | ||
194 | done | ||
195 | exit 0 | ||
196 | fi | ||
197 | signlibs.sh | ||
198 | } | ||
199 | |||
200 | PACKAGES =+ "${PN}-smime" | ||
201 | FILES_${PN}-smime = "\ | ||
202 | ${bindir}/smime \ | ||
203 | " | ||
204 | FILES_${PN} = "\ | ||
205 | ${sysconfdir} \ | ||
206 | ${bindir} \ | ||
207 | ${libdir}/lib*.chk \ | ||
208 | ${libdir}/lib*.so \ | ||
209 | " | ||
210 | FILES_${PN}-dev = "\ | ||
211 | ${libdir}/nss \ | ||
212 | ${libdir}/pkgconfig/* \ | ||
213 | ${includedir}/* \ | ||
214 | " | ||
215 | # FILES_${PN}-dbg is populated automatically | ||
216 | |||
217 | BBCLASSEXTEND = "native nativesdk" | ||