1 |
polynomial-c 14/02/22 10:42:36 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: nss-3.15.5.ebuild |
5 |
Log: |
6 |
Version bump |
7 |
|
8 |
(Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key 0x981CA6FC) |
9 |
|
10 |
Revision Changes Path |
11 |
1.351 dev-libs/nss/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/nss/ChangeLog?rev=1.351&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/nss/ChangeLog?rev=1.351&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/nss/ChangeLog?r1=1.350&r2=1.351 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/dev-libs/nss/ChangeLog,v |
20 |
retrieving revision 1.350 |
21 |
retrieving revision 1.351 |
22 |
diff -u -r1.350 -r1.351 |
23 |
--- ChangeLog 1 Feb 2014 04:57:05 -0000 1.350 |
24 |
+++ ChangeLog 22 Feb 2014 10:42:36 -0000 1.351 |
25 |
@@ -1,6 +1,11 @@ |
26 |
# ChangeLog for dev-libs/nss |
27 |
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/nss/ChangeLog,v 1.350 2014/02/01 04:57:05 vapier Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/nss/ChangeLog,v 1.351 2014/02/22 10:42:36 polynomial-c Exp $ |
30 |
+ |
31 |
+*nss-3.15.5 (22 Feb 2014) |
32 |
+ |
33 |
+ 22 Feb 2014; Lars Wendler <polynomial-c@g.o> +nss-3.15.5.ebuild: |
34 |
+ Version bump. |
35 |
|
36 |
*nss-3.15.4-r1 (01 Feb 2014) |
37 |
|
38 |
|
39 |
|
40 |
|
41 |
1.1 dev-libs/nss/nss-3.15.5.ebuild |
42 |
|
43 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/nss/nss-3.15.5.ebuild?rev=1.1&view=markup |
44 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/nss/nss-3.15.5.ebuild?rev=1.1&content-type=text/plain |
45 |
|
46 |
Index: nss-3.15.5.ebuild |
47 |
=================================================================== |
48 |
# Copyright 1999-2014 Gentoo Foundation |
49 |
# Distributed under the terms of the GNU General Public License v2 |
50 |
# $Header: /var/cvsroot/gentoo-x86/dev-libs/nss/nss-3.15.5.ebuild,v 1.1 2014/02/22 10:42:36 polynomial-c Exp $ |
51 |
|
52 |
EAPI=5 |
53 |
inherit eutils flag-o-matic multilib toolchain-funcs |
54 |
|
55 |
NSPR_VER="4.10" |
56 |
RTM_NAME="NSS_${PV//./_}_RTM" |
57 |
# Rev of https://git.fedorahosted.org/cgit/nss-pem.git |
58 |
PEM_GIT_REV="3ade37c5c4ca5a6094e3f4b2e4591405db1867dd" |
59 |
PEM_P="${PN}-pem-${PEM_GIT_REV}" |
60 |
|
61 |
DESCRIPTION="Mozilla's Network Security Services library that implements PKI support" |
62 |
HOMEPAGE="http://www.mozilla.org/projects/security/pki/nss/" |
63 |
SRC_URI="ftp://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/${RTM_NAME}/src/${P}.tar.gz |
64 |
cacert? ( http://dev.gentoo.org/~anarchy/patches/${PN}-3.14.1-add_spi+cacerts_ca_certs.patch ) |
65 |
nss-pem? ( https://git.fedorahosted.org/cgit/nss-pem.git/snapshot/${PEM_P}.tar.bz2 )" |
66 |
|
67 |
LICENSE="|| ( MPL-2.0 GPL-2 LGPL-2.1 )" |
68 |
SLOT="0" |
69 |
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris" |
70 |
IUSE="+cacert +nss-pem utils" |
71 |
|
72 |
DEPEND="virtual/pkgconfig |
73 |
>=dev-libs/nspr-${NSPR_VER}" |
74 |
RDEPEND=">=dev-libs/nspr-${NSPR_VER} |
75 |
>=dev-db/sqlite-3.5 |
76 |
sys-libs/zlib" |
77 |
|
78 |
RESTRICT="test" |
79 |
|
80 |
S="${WORKDIR}/${P}/${PN}" |
81 |
|
82 |
src_setup() { |
83 |
export LC_ALL="C" |
84 |
} |
85 |
|
86 |
src_unpack() { |
87 |
unpack ${A} |
88 |
if use nss-pem ; then |
89 |
mv "${PEM_P}"/nss/lib/ckfw/pem/ "${S}"/lib/ckfw/ || die |
90 |
fi |
91 |
} |
92 |
|
93 |
src_prepare() { |
94 |
# Custom changes for gentoo |
95 |
epatch "${FILESDIR}/${PN}-3.15-gentoo-fixups.patch" |
96 |
epatch "${FILESDIR}/${PN}-3.15-gentoo-fixup-warnings.patch" |
97 |
use cacert && epatch "${DISTDIR}/${PN}-3.14.1-add_spi+cacerts_ca_certs.patch" |
98 |
use nss-pem && epatch "${FILESDIR}/${PN}-3.15.4-enable-pem.patch" |
99 |
epatch "${FILESDIR}/${PN}-3.15-x32.patch" |
100 |
epatch "${FILESDIR}/nss-3.14.2-solaris-gcc.patch" |
101 |
cd coreconf |
102 |
# hack nspr paths |
103 |
echo 'INCLUDES += -I$(DIST)/include/dbm' \ |
104 |
>> headers.mk || die "failed to append include" |
105 |
|
106 |
# modify install path |
107 |
sed -e 's:SOURCE_PREFIX = $(CORE_DEPTH)/\.\./dist:SOURCE_PREFIX = $(CORE_DEPTH)/dist:' \ |
108 |
-i source.mk |
109 |
|
110 |
# Respect LDFLAGS |
111 |
sed -i -e 's/\$(MKSHLIB) -o/\$(MKSHLIB) \$(LDFLAGS) -o/g' rules.mk |
112 |
|
113 |
# Ensure we stay multilib aware |
114 |
sed -i -e "/@libdir@/ s:lib64:$(get_libdir):" "${S}"/config/Makefile |
115 |
|
116 |
# Fix pkgconfig file for Prefix |
117 |
sed -i -e "/^PREFIX =/s:= /usr:= ${EPREFIX}/usr:" \ |
118 |
"${S}"/config/Makefile |
119 |
|
120 |
# use host shlibsign if need be #436216 |
121 |
if tc-is-cross-compiler ; then |
122 |
sed -i \ |
123 |
-e 's:"${2}"/shlibsign:shlibsign:' \ |
124 |
"${S}"/cmd/shlibsign/sign.sh |
125 |
fi |
126 |
|
127 |
# dirty hack |
128 |
cd "${S}" |
129 |
sed -i -e "/CRYPTOLIB/s:\$(SOFTOKEN_LIB_DIR):../freebl/\$(OBJDIR):" \ |
130 |
lib/ssl/config.mk |
131 |
sed -i -e "/CRYPTOLIB/s:\$(SOFTOKEN_LIB_DIR):../../lib/freebl/\$(OBJDIR):" \ |
132 |
cmd/platlibs.mk |
133 |
} |
134 |
|
135 |
nssarch() { |
136 |
# Most of the arches are the same as $ARCH |
137 |
local t=${1:-${CHOST}} |
138 |
case ${t} in |
139 |
aarch64*)echo "aarch64";; |
140 |
hppa*) echo "parisc";; |
141 |
i?86*) echo "i686";; |
142 |
x86_64*) echo "x86_64";; |
143 |
*) tc-arch ${t};; |
144 |
esac |
145 |
} |
146 |
|
147 |
nssbits() { |
148 |
local cc="${1}CC" cppflags="${1}CPPFLAGS" cflags="${1}CFLAGS" |
149 |
echo > "${T}"/test.c || die |
150 |
${!cc} ${!cppflags} ${!cflags} -c "${T}"/test.c -o "${T}"/test.o || die |
151 |
case $(file "${T}"/test.o) in |
152 |
*32-bit*x86-64*) echo USE_x32=1;; |
153 |
*64-bit*|*ppc64*|*x86_64*) echo USE_64=1;; |
154 |
*32-bit*|*ppc*|*i386*) ;; |
155 |
*) die "Failed to detect whether your arch is 64bits or 32bits, disable distcc if you're using it, please";; |
156 |
esac |
157 |
} |
158 |
|
159 |
src_compile() { |
160 |
strip-flags |
161 |
|
162 |
tc-export AR RANLIB {BUILD_,}{CC,PKG_CONFIG} |
163 |
local makeargs=( |
164 |
CC="${CC}" |
165 |
AR="${AR} rc \$@" |
166 |
RANLIB="${RANLIB}" |
167 |
OPTIMIZER= |
168 |
$(nssbits) |
169 |
) |
170 |
|
171 |
# Take care of nspr settings #436216 |
172 |
append-cppflags $(${PKG_CONFIG} nspr --cflags) |
173 |
append-ldflags $(${PKG_CONFIG} nspr --libs-only-L) |
174 |
unset NSPR_INCLUDE_DIR |
175 |
export NSPR_LIB_DIR=${T}/fake-dir |
176 |
|
177 |
# Do not let `uname` be used. |
178 |
if use kernel_linux ; then |
179 |
makeargs+=( |
180 |
OS_TARGET=Linux |
181 |
OS_RELEASE=2.6 |
182 |
OS_TEST="$(nssarch)" |
183 |
) |
184 |
fi |
185 |
|
186 |
export BUILD_OPT=1 |
187 |
export NSS_USE_SYSTEM_SQLITE=1 |
188 |
export NSDISTMODE=copy |
189 |
export NSS_ENABLE_ECC=1 |
190 |
export XCFLAGS="${CFLAGS} ${CPPFLAGS}" |
191 |
export FREEBL_NO_DEPEND=1 |
192 |
export ASFLAGS="" |
193 |
|
194 |
local d |
195 |
|
196 |
# Build the host tools first. |
197 |
LDFLAGS="${BUILD_LDFLAGS}" \ |
198 |
XCFLAGS="${BUILD_CFLAGS}" \ |
199 |
emake -j1 -C coreconf \ |
200 |
CC="${BUILD_CC}" \ |
201 |
$(nssbits BUILD_) \ |
202 |
|| die |
203 |
makeargs+=( NSINSTALL="${PWD}/$(find -type f -name nsinstall)" ) |
204 |
|
205 |
# Then build the target tools. |
206 |
for d in . lib/dbm ; do |
207 |
emake -j1 "${makeargs[@]}" -C ${d} || die "${d} make failed" |
208 |
done |
209 |
} |
210 |
|
211 |
# Altering these 3 libraries breaks the CHK verification. |
212 |
# All of the following cause it to break: |
213 |
# - stripping |
214 |
# - prelink |
215 |
# - ELF signing |
216 |
# http://www.mozilla.org/projects/security/pki/nss/tech-notes/tn6.html |
217 |
# Either we have to NOT strip them, or we have to forcibly resign after |
218 |
# stripping. |
219 |
#local_libdir="$(get_libdir)" |
220 |
#export STRIP_MASK=" |
221 |
# */${local_libdir}/libfreebl3.so* |
222 |
# */${local_libdir}/libnssdbm3.so* |
223 |
# */${local_libdir}/libsoftokn3.so*" |
224 |
|
225 |
export NSS_CHK_SIGN_LIBS="freebl3 nssdbm3 softokn3" |
226 |
|
227 |
generate_chk() { |
228 |
local shlibsign="$1" |
229 |
local libdir="$2" |
230 |
einfo "Resigning core NSS libraries for FIPS validation" |
231 |
shift 2 |
232 |
local i |
233 |
for i in ${NSS_CHK_SIGN_LIBS} ; do |
234 |
local libname=lib${i}.so |
235 |
local chkname=lib${i}.chk |
236 |
"${shlibsign}" \ |
237 |
-i "${libdir}"/${libname} \ |
238 |
-o "${libdir}"/${chkname}.tmp \ |
239 |
&& mv -f \ |
240 |
"${libdir}"/${chkname}.tmp \ |
241 |
"${libdir}"/${chkname} \ |
242 |
|| die "Failed to sign ${libname}" |
243 |
done |
244 |
} |
245 |
|
246 |
cleanup_chk() { |
247 |
local libdir="$1" |
248 |
shift 1 |
249 |
local i |
250 |
for i in ${NSS_CHK_SIGN_LIBS} ; do |
251 |
local libfname="${libdir}/lib${i}.so" |
252 |
# If the major version has changed, then we have old chk files. |
253 |
[ ! -f "${libfname}" -a -f "${libfname}.chk" ] \ |
254 |
&& rm -f "${libfname}.chk" |
255 |
done |
256 |
} |
257 |
|
258 |
src_install() { |
259 |
cd "${S}"/dist |
260 |
|
261 |
dodir /usr/$(get_libdir) |
262 |
cp -L */lib/*$(get_libname) "${ED}"/usr/$(get_libdir) || die "copying shared libs failed" |
263 |
# We generate these after stripping the libraries, else they don't match. |
264 |
#cp -L */lib/*.chk "${ED}"/usr/$(get_libdir) || die "copying chk files failed" |
265 |
cp -L */lib/libcrmf.a "${ED}"/usr/$(get_libdir) || die "copying libs failed" |
266 |
|
267 |
# Install nss-config and pkgconfig file |
268 |
dodir /usr/bin |
269 |
cp -L */bin/nss-config "${ED}"/usr/bin |
270 |
dodir /usr/$(get_libdir)/pkgconfig |
271 |
cp -L */lib/pkgconfig/nss.pc "${ED}"/usr/$(get_libdir)/pkgconfig |
272 |
|
273 |
# all the include files |
274 |
insinto /usr/include/nss |
275 |
doins public/nss/*.h |
276 |
|
277 |
local f nssutils |
278 |
# Always enabled because we need it for chk generation. |
279 |
nssutils="shlibsign" |
280 |
if use utils; then |
281 |
# The tests we do not need to install. |
282 |
#nssutils_test="bltest crmftest dbtest dertimetest |
283 |
#fipstest remtest sdrtest" |
284 |
nssutils="addbuiltin atob baddbdir btoa certcgi certutil checkcert |
285 |
cmsutil conflict crlutil derdump digest makepqg mangle modutil multinit |
286 |
nonspr10 ocspclnt oidcalc p7content p7env p7sign p7verify pk11mode |
287 |
pk12util pp rsaperf selfserv shlibsign signtool signver ssltap strsclnt |
288 |
symkeyutil tstclnt vfychain vfyserv" |
289 |
fi |
290 |
cd "${S}"/dist/*/bin/ |
291 |
for f in ${nssutils}; do |
292 |
dobin ${f} |
293 |
done |
294 |
|
295 |
# Prelink breaks the CHK files. We don't have any reliable way to run |
296 |
# shlibsign after prelink. |
297 |
local l libs=() liblist |
298 |
for l in ${NSS_CHK_SIGN_LIBS} ; do |
299 |
libs+=("${EPREFIX}/usr/$(get_libdir)/lib${l}.so") |
300 |
done |
301 |
liblist=$(printf '%s:' "${libs[@]}") |
302 |
echo -e "PRELINK_PATH_MASK=${liblist%:}" > "${T}/90nss" |
303 |
doenvd "${T}/90nss" |
304 |
} |
305 |
|
306 |
pkg_postinst() { |
307 |
# We must re-sign the libraries AFTER they are stripped. |
308 |
local shlibsign="${EROOT}/usr/bin/shlibsign" |
309 |
# See if we can execute it (cross-compiling & such). #436216 |
310 |
"${shlibsign}" -h >&/dev/null |
311 |
if [[ $? -gt 1 ]] ; then |
312 |
shlibsign="shlibsign" |
313 |
fi |
314 |
generate_chk "${shlibsign}" "${EROOT}"/usr/$(get_libdir) |
315 |
} |
316 |
|
317 |
pkg_postrm() { |
318 |
cleanup_chk "${EROOT}"/usr/$(get_libdir) |
319 |
} |