Gentoo Archives: gentoo-commits

From: Joonas Niilola <juippis@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/nss/
Date: Thu, 03 Nov 2022 08:08:11
Message-Id: 1667462878.26b81b79032324ae209aac26bfafaed78a47ea18.juippis@gentoo
1 commit: 26b81b79032324ae209aac26bfafaed78a47ea18
2 Author: Joonas Niilola <juippis <AT> gentoo <DOT> org>
3 AuthorDate: Thu Nov 3 08:07:09 2022 +0000
4 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
5 CommitDate: Thu Nov 3 08:07:58 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=26b81b79
7
8 dev-libs/nss: drop 3.79.1
9
10 Bug: https://bugs.gentoo.org/877169
11 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
12
13 dev-libs/nss/Manifest | 1 -
14 dev-libs/nss/nss-3.79.1.ebuild | 390 -----------------------------------------
15 2 files changed, 391 deletions(-)
16
17 diff --git a/dev-libs/nss/Manifest b/dev-libs/nss/Manifest
18 index dd8aeff08fed..87f988612229 100644
19 --- a/dev-libs/nss/Manifest
20 +++ b/dev-libs/nss/Manifest
21 @@ -1,4 +1,3 @@
22 -DIST nss-3.79.1.tar.gz 84694831 BLAKE2B 209a502ba4b808bb4cb9b8775328fa26e36c55147ee5da7b8f661349129250f09685dd69919e24d7ff72cc55a2e9cbbbc9c059e543cf1b0a6a08e809be262d4c SHA512 e841efe9d0300d99b50e54c159c75df76c09c34c74bbc9b6ca007ad017b2cb91a8d33f6f4195e52bd8f3ed7be5d53f3ce7ce10825fa21abbf5dbba3db109e037
23 DIST nss-3.79.2.tar.gz 84825187 BLAKE2B 9589095a0f3af5201662fe96ba4dac73c661db3abde534941ea61d597dce1016dc06f8559e26fafc940f2b123987381e1faa22ff6a995ef3cc0a9dc4ebe7a4ad SHA512 52ca7574d2bb6e2fd874ac40f3e75d58135b103d8bd4b964a9262b5c302b4668ff7c8f5dabbef46e413fd72faeddc44057bc7b489946813331cc9a481d078181
24 DIST nss-3.84.tar.gz 84851235 BLAKE2B 5dead5ae336998db97acc6dc2a59b387aac9baeba0f2fad6eaf921bdc894867f6177179545378091d9b50b295b71409781b5ef5044222afe7a1cd2f920a7d15f SHA512 b4ed4b2e44d9f896a4a4c33f92813a84825dc4502f4e14e047f3583666c453138515e6edbcd71144c4b02a8ee16b3443803f1ff12458fd82c338ee1dd911b175
25 DIST nss-cacert-class1-class3-r2.patch 21925 BLAKE2B 7627ff9a09f084c19d72d0490676865e3cab3ca7c920ae1ce4bea2db664f37fd0aa84fcda919809a516891ab2a62e2e7a43a9d6ada4c231adfe4c216525fac7d SHA512 1ce6ff9ab310aaca9005eafb461338b291df8523cc7044e096cd75774ce746c26eed19ec6bb2643c6c67f94650f2f309463492d80a90568f38ce2557f8ada2f4
26
27 diff --git a/dev-libs/nss/nss-3.79.1.ebuild b/dev-libs/nss/nss-3.79.1.ebuild
28 deleted file mode 100644
29 index 0568f7c8439e..000000000000
30 --- a/dev-libs/nss/nss-3.79.1.ebuild
31 +++ /dev/null
32 @@ -1,390 +0,0 @@
33 -# Copyright 1999-2022 Gentoo Authors
34 -# Distributed under the terms of the GNU General Public License v2
35 -
36 -EAPI=8
37 -
38 -inherit flag-o-matic multilib toolchain-funcs multilib-minimal
39 -
40 -NSPR_VER="4.34"
41 -RTM_NAME="NSS_${PV//./_}_RTM"
42 -
43 -DESCRIPTION="Mozilla's Network Security Services library that implements PKI support"
44 -HOMEPAGE="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS"
45 -SRC_URI="https://archive.mozilla.org/pub/security/nss/releases/${RTM_NAME}/src/${P}.tar.gz
46 - cacert? ( https://dev.gentoo.org/~whissi/dist/ca-certificates/nss-cacert-class1-class3-r2.patch )"
47 -
48 -LICENSE="|| ( MPL-2.0 GPL-2 LGPL-2.1 )"
49 -SLOT="0"
50 -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~x64-solaris ~x86-solaris"
51 -IUSE="cacert test +utils cpu_flags_ppc_altivec cpu_flags_ppc_vsx"
52 -RESTRICT="!test? ( test )"
53 -# pkg-config called by nss-config -> virtual/pkgconfig in RDEPEND
54 -RDEPEND="
55 - >=dev-libs/nspr-${NSPR_VER}[${MULTILIB_USEDEP}]
56 - >=dev-db/sqlite-3.8.2[${MULTILIB_USEDEP}]
57 - >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
58 - virtual/pkgconfig
59 -"
60 -DEPEND="${RDEPEND}"
61 -BDEPEND="dev-lang/perl"
62 -
63 -S="${WORKDIR}/${P}/${PN}"
64 -
65 -MULTILIB_CHOST_TOOLS=(
66 - /usr/bin/nss-config
67 -)
68 -
69 -PATCHES=(
70 - # Custom changes for gentoo
71 - "${FILESDIR}/${PN}-3.53-gentoo-fixups.patch"
72 - "${FILESDIR}/${PN}-3.21-gentoo-fixup-warnings.patch"
73 - "${FILESDIR}/${PN}-3.23-hppa-byte_order.patch"
74 - "${FILESDIR}/${PN}-3.79-gcc-13.patch"
75 -)
76 -
77 -src_prepare() {
78 - default
79 -
80 - if use cacert ; then
81 - eapply -p2 "${DISTDIR}"/nss-cacert-class1-class3-r2.patch
82 - fi
83 -
84 - pushd coreconf >/dev/null || die
85 -
86 - # hack nspr paths
87 - echo 'INCLUDES += -I$(DIST)/include/dbm' \
88 - >> headers.mk || die "failed to append include"
89 -
90 - # modify install path
91 - sed -e '/CORE_DEPTH/s:SOURCE_PREFIX.*$:SOURCE_PREFIX = $(CORE_DEPTH)/dist:' \
92 - -i source.mk || die
93 -
94 - # Respect LDFLAGS
95 - sed -i -e 's/\$(MKSHLIB) -o/\$(MKSHLIB) \$(LDFLAGS) -o/g' rules.mk
96 -
97 - popd >/dev/null || die
98 -
99 - # Fix pkgconfig file for Prefix
100 - sed -i -e "/^PREFIX =/s:= /usr:= ${EPREFIX}/usr:" \
101 - config/Makefile || die
102 -
103 - # use host shlibsign if need be #436216
104 - if tc-is-cross-compiler ; then
105 - sed -i \
106 - -e 's:"${2}"/shlibsign:shlibsign:' \
107 - cmd/shlibsign/sign.sh || die
108 - fi
109 -
110 - # dirty hack
111 - sed -i -e "/CRYPTOLIB/s:\$(SOFTOKEN_LIB_DIR):../freebl/\$(OBJDIR):" \
112 - lib/ssl/config.mk || die
113 - sed -i -e "/CRYPTOLIB/s:\$(SOFTOKEN_LIB_DIR):../../lib/freebl/\$(OBJDIR):" \
114 - cmd/platlibs.mk || die
115 -
116 - multilib_copy_sources
117 -
118 - strip-flags
119 -}
120 -
121 -multilib_src_configure() {
122 - # Ensure we stay multilib aware
123 - sed -i -e "/@libdir@/ s:lib64:$(get_libdir):" config/Makefile || die
124 -}
125 -
126 -nssarch() {
127 - # Most of the arches are the same as $ARCH
128 - local t=${1:-${CHOST}}
129 - case ${t} in
130 - *86*-pc-solaris2*) echo "i86pc" ;;
131 - aarch64*) echo "aarch64" ;;
132 - hppa*) echo "parisc" ;;
133 - i?86*) echo "i686" ;;
134 - x86_64*) echo "x86_64" ;;
135 - *) tc-arch ${t} ;;
136 - esac
137 -}
138 -
139 -nssbits() {
140 - local cc cppflags="${1}CPPFLAGS" cflags="${1}CFLAGS"
141 - if [[ ${1} == BUILD_ ]]; then
142 - cc=$(tc-getBUILD_CC)
143 - else
144 - cc=$(tc-getCC)
145 - fi
146 - echo > "${T}"/test.c || die
147 - ${cc} ${!cppflags} ${!cflags} -c "${T}"/test.c -o "${T}/${1}test.o" || die
148 - case $(file "${T}/${1}test.o") in
149 - *32-bit*x86-64*) echo USE_X32=1;;
150 - *64-bit*|*ppc64*|*x86_64*) echo USE_64=1;;
151 - *32-bit*|*ppc*|*i386*) ;;
152 - *) die "Failed to detect whether ${cc} builds 64bits or 32bits, disable distcc if you're using it, please";;
153 - esac
154 -}
155 -
156 -multilib_src_compile() {
157 - # use ABI to determine bit'ness, or fallback if unset
158 - local buildbits mybits
159 - case "${ABI}" in
160 - n32) mybits="USE_N32=1";;
161 - x32) mybits="USE_X32=1";;
162 - s390x|*64) mybits="USE_64=1";;
163 - ${DEFAULT_ABI})
164 - einfo "Running compilation test to determine bit'ness"
165 - mybits=$(nssbits)
166 - ;;
167 - esac
168 - # bitness of host may differ from target
169 - if tc-is-cross-compiler; then
170 - buildbits=$(nssbits BUILD_)
171 - fi
172 -
173 - local makeargs=(
174 - CC="$(tc-getCC)"
175 - CCC="$(tc-getCXX)"
176 - AR="$(tc-getAR) rc \$@"
177 - RANLIB="$(tc-getRANLIB)"
178 - OPTIMIZER=
179 - ${mybits}
180 - )
181 -
182 - # Take care of nspr settings #436216
183 - local myCPPFLAGS="${CPPFLAGS} $($(tc-getPKG_CONFIG) nspr --cflags)"
184 - unset NSPR_INCLUDE_DIR
185 -
186 - export NSS_ALLOW_SSLKEYLOGFILE=1
187 - export NSS_ENABLE_WERROR=0 #567158
188 - export BUILD_OPT=1
189 - export NSS_USE_SYSTEM_SQLITE=1
190 - export NSDISTMODE=copy
191 - export FREEBL_NO_DEPEND=1
192 - export FREEBL_LOWHASH=1
193 - export NSS_SEED_ONLY_DEV_URANDOM=1
194 - export USE_SYSTEM_ZLIB=1
195 - export ZLIB_LIBS=-lz
196 - export ASFLAGS=""
197 - # Fix build failure on arm64
198 - export NS_USE_GCC=1
199 - # Detect compiler type and set proper environment value
200 - if tc-is-gcc; then
201 - export CC_IS_GCC=1
202 - elif tc-is-clang; then
203 - export CC_IS_CLANG=1
204 - fi
205 -
206 - export NSS_DISABLE_GTESTS=$(usex !test 1 0)
207 -
208 - # explicitly disable altivec/vsx if not requested
209 - # https://bugs.gentoo.org/789114
210 - case ${ARCH} in
211 - ppc*)
212 - use cpu_flags_ppc_altivec || export NSS_DISABLE_ALTIVEC=1
213 - use cpu_flags_ppc_vsx || export NSS_DISABLE_CRYPTO_VSX=1
214 - ;;
215 - esac
216 -
217 - local d
218 -
219 - # Build the host tools first.
220 - LDFLAGS="${BUILD_LDFLAGS}" \
221 - XCFLAGS="${BUILD_CFLAGS}" \
222 - NSPR_LIB_DIR="${T}/fakedir" \
223 - emake -C coreconf \
224 - CC="$(tc-getBUILD_CC)" \
225 - ${buildbits-${mybits}}
226 - makeargs+=( NSINSTALL="${PWD}/$(find -type f -name nsinstall)" )
227 -
228 - # Then build the target tools.
229 - for d in . lib/dbm ; do
230 - CPPFLAGS="${myCPPFLAGS}" \
231 - XCFLAGS="${CFLAGS} ${CPPFLAGS}" \
232 - NSPR_LIB_DIR="${T}/fakedir" \
233 - emake "${makeargs[@]}" -C ${d} OS_TEST="$(nssarch)"
234 - done
235 -}
236 -
237 -multilib_src_test() {
238 - einfo "Tests can take a *long* time, especially on a multilib system."
239 - einfo "30-45+ minutes per lib configuration. Bug #852755"
240 -
241 - # https://www.linuxfromscratch.org/blfs/view/svn/postlfs/nss.html
242 - # https://firefox-source-docs.mozilla.org/security/nss/legacy/nss_sources_building_testing/index.html#running_the_nss_test_suite
243 - # https://www-archive.mozilla.org/projects/security/pki/nss/testnss_32.html (older)
244 - export BUILD_OPT=1
245 - export HOST="localhost"
246 - export DOMSUF="localdomain"
247 - export USE_IP=TRUE
248 - export IP_ADDRESS="127.0.0.1"
249 -
250 - NSINSTALL="${PWD}/$(find -type f -name nsinstall)"
251 -
252 - cd "${BUILD_DIR}"/tests || die
253 - # Hack to get current objdir (prefixed dir where built binaries are)
254 - # Without this, at least multilib tests go wrong when building the amd64 variant
255 - # after x86.
256 - local objdir=$(find "${BUILD_DIR}"/dist -maxdepth 1 -iname Linux* | rev | cut -d/ -f1 | rev)
257 -
258 - # Can tweak to a subset of tests in future if we need to, but would prefer not
259 - OBJDIR="${objdir}" DIST="${BUILD_DIR}/dist" MOZILLA_ROOT="${BUILD_DIR}" ./all.sh || die
260 -}
261 -
262 -# Altering these 3 libraries breaks the CHK verification.
263 -# All of the following cause it to break:
264 -# - stripping
265 -# - prelink
266 -# - ELF signing
267 -# http://www.mozilla.org/projects/security/pki/nss/tech-notes/tn6.html
268 -# Either we have to NOT strip them, or we have to forcibly resign after
269 -# stripping.
270 -#local_libdir="$(get_libdir)"
271 -#export STRIP_MASK="
272 -# */${local_libdir}/libfreebl3.so*
273 -# */${local_libdir}/libnssdbm3.so*
274 -# */${local_libdir}/libsoftokn3.so*"
275 -
276 -export NSS_CHK_SIGN_LIBS="freebl3 nssdbm3 softokn3"
277 -
278 -generate_chk() {
279 - local shlibsign="$1"
280 - local libdir="$2"
281 - einfo "Resigning core NSS libraries for FIPS validation"
282 - shift 2
283 - local i
284 - for i in ${NSS_CHK_SIGN_LIBS} ; do
285 - local libname=lib${i}.so
286 - local chkname=lib${i}.chk
287 - "${shlibsign}" \
288 - -i "${libdir}"/${libname} \
289 - -o "${libdir}"/${chkname}.tmp \
290 - && mv -f \
291 - "${libdir}"/${chkname}.tmp \
292 - "${libdir}"/${chkname} \
293 - || die "Failed to sign ${libname}"
294 - done
295 -}
296 -
297 -cleanup_chk() {
298 - local libdir="$1"
299 - shift 1
300 - local i
301 - for i in ${NSS_CHK_SIGN_LIBS} ; do
302 - local libfname="${libdir}/lib${i}.so"
303 - # If the major version has changed, then we have old chk files.
304 - [ ! -f "${libfname}" -a -f "${libfname}.chk" ] \
305 - && rm -f "${libfname}.chk"
306 - done
307 -}
308 -
309 -multilib_src_install() {
310 - pushd dist >/dev/null || die
311 -
312 - dodir /usr/$(get_libdir)
313 - cp -L */lib/*$(get_libname) "${ED}"/usr/$(get_libdir) || die "copying shared libs failed"
314 - local i
315 - for i in crmf freebl nssb nssckfw ; do
316 - cp -L */lib/lib${i}.a "${ED}"/usr/$(get_libdir) || die "copying libs failed"
317 - done
318 -
319 - # Install nss-config and pkgconfig file
320 - dodir /usr/bin
321 - cp -L */bin/nss-config "${ED}"/usr/bin || die
322 - dodir /usr/$(get_libdir)/pkgconfig
323 - cp -L */lib/pkgconfig/nss.pc "${ED}"/usr/$(get_libdir)/pkgconfig || die
324 -
325 - # create an nss-softokn.pc from nss.pc for libfreebl and some private headers
326 - # bug 517266
327 - sed -e 's#Libs:#Libs: -lfreebl#' \
328 - -e 's#Cflags:#Cflags: -I${includedir}/private#' \
329 - */lib/pkgconfig/nss.pc >"${ED}"/usr/$(get_libdir)/pkgconfig/nss-softokn.pc \
330 - || die "could not create nss-softokn.pc"
331 -
332 - # all the include files
333 - insinto /usr/include/nss
334 - doins public/nss/*.{h,api}
335 - insinto /usr/include/nss/private
336 - doins private/nss/{blapi,alghmac,cmac}.h
337 -
338 - popd >/dev/null || die
339 -
340 - local f nssutils
341 - # Always enabled because we need it for chk generation.
342 - nssutils=( shlibsign )
343 -
344 - if multilib_is_native_abi ; then
345 - if use utils; then
346 - # The tests we do not need to install.
347 - #nssutils_test="bltest crmftest dbtest dertimetest
348 - #fipstest remtest sdrtest"
349 - # checkcert utils has been removed in nss-3.22:
350 - # https://bugzilla.mozilla.org/show_bug.cgi?id=1187545
351 - # https://hg.mozilla.org/projects/nss/rev/df1729d37870
352 - # certcgi has been removed in nss-3.36:
353 - # https://bugzilla.mozilla.org/show_bug.cgi?id=1426602
354 - nssutils+=(
355 - addbuiltin
356 - atob
357 - baddbdir
358 - btoa
359 - certutil
360 - cmsutil
361 - conflict
362 - crlutil
363 - derdump
364 - digest
365 - makepqg
366 - mangle
367 - modutil
368 - multinit
369 - nonspr10
370 - ocspclnt
371 - oidcalc
372 - p7content
373 - p7env
374 - p7sign
375 - p7verify
376 - pk11mode
377 - pk12util
378 - pp
379 - rsaperf
380 - selfserv
381 - signtool
382 - signver
383 - ssltap
384 - strsclnt
385 - symkeyutil
386 - tstclnt
387 - vfychain
388 - vfyserv
389 - )
390 - # install man-pages for utils (bug #516810)
391 - doman doc/nroff/*.1
392 - fi
393 - pushd dist/*/bin >/dev/null || die
394 - for f in ${nssutils[@]}; do
395 - dobin ${f}
396 - done
397 - popd >/dev/null || die
398 - fi
399 -}
400 -
401 -pkg_postinst() {
402 - multilib_pkg_postinst() {
403 - # We must re-sign the libraries AFTER they are stripped.
404 - local shlibsign="${EROOT}/usr/bin/shlibsign"
405 - # See if we can execute it (cross-compiling & such). #436216
406 - "${shlibsign}" -h >&/dev/null
407 - if [[ $? -gt 1 ]] ; then
408 - shlibsign="shlibsign"
409 - fi
410 - generate_chk "${shlibsign}" "${EROOT}"/usr/$(get_libdir)
411 - }
412 -
413 - multilib_foreach_abi multilib_pkg_postinst
414 -}
415 -
416 -pkg_postrm() {
417 - multilib_pkg_postrm() {
418 - cleanup_chk "${EROOT}"/usr/$(get_libdir)
419 - }
420 -
421 - multilib_foreach_abi multilib_pkg_postrm
422 -}