From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 26D7015800A for ; Fri, 1 Sep 2023 08:02:24 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 696212BC013; Fri, 1 Sep 2023 08:02:23 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 52C362BC013 for ; Fri, 1 Sep 2023 08:02:23 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 65D48335DB0 for ; Fri, 1 Sep 2023 08:02:22 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9CA89EA2 for ; Fri, 1 Sep 2023 08:02:20 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1693555265.b69557536f8d69548ec9b99f30a7dda253fe0d63.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-misc/ca-certificates/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-misc/ca-certificates/Manifest app-misc/ca-certificates/ca-certificates-20230311.3.93.ebuild X-VCS-Directories: app-misc/ca-certificates/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: b69557536f8d69548ec9b99f30a7dda253fe0d63 X-VCS-Branch: master Date: Fri, 1 Sep 2023 08:02:20 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 1c4386ae-ffbe-443e-991b-cb6438250113 X-Archives-Hash: d7839b91f4a3cceb2c70dd05e4e773ac commit: b69557536f8d69548ec9b99f30a7dda253fe0d63 Author: Sam James gentoo org> AuthorDate: Fri Sep 1 08:01:05 2023 +0000 Commit: Sam James gentoo org> CommitDate: Fri Sep 1 08:01:05 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b6955753 app-misc/ca-certificates: add 20230311.3.93 Signed-off-by: Sam James gentoo.org> app-misc/ca-certificates/Manifest | 1 + .../ca-certificates-20230311.3.93.ebuild | 206 +++++++++++++++++++++ 2 files changed, 207 insertions(+) diff --git a/app-misc/ca-certificates/Manifest b/app-misc/ca-certificates/Manifest index 3a148c82e7d6..1433db38d3b9 100644 --- a/app-misc/ca-certificates/Manifest +++ b/app-misc/ca-certificates/Manifest @@ -4,4 +4,5 @@ DIST nss-3.88.1.tar.gz 71607211 BLAKE2B ff84d3153a01519a52e83be5327453d8e6a81e1f DIST nss-3.89.1.tar.gz 71624456 BLAKE2B fca6e09375ba2ce4a6f0bf189cabb9cdb1ba7cb5ebc1a49d47a2d6b509936a60d7f1867f71cdcfa6a81c0cbbf298513981a9b16ac23bbc464c7004bb40b830b4 SHA512 aeece4e8bc28113fc53997b29c89d40b4be74fee4f5d27c4e065d2fa6701038442f4eeeb1fcf98befedb03537a5a48a4701fe270f56197da57946529f9fa02dd DIST nss-3.89.tar.gz 71617802 BLAKE2B 92428a635167f311b258411420c8073fafdbadef5b1fc4ff8400e41834fc67a03f2151265d5bbfb64ae53b9a8acb29750352f6c2c83d1cd9a2f89a2139ad34c9 SHA512 1db06d4575f2c16d2a0629007981211e714f99c014c0a6256dd33d0caf8c809ba8d5be204d018f9d1cc99b9fcd055ac1fb99b399486ed43c9cf3f55f2747de82 DIST nss-3.90.tar.gz 72211928 BLAKE2B 9518bed4f8ca5f9dd1c3d15e255f9954fabc30762ff6db7e45ab54fd0d7d7a34e2c021ecc76b5dcac97c571914e9af116a8c1361a5f2f055a31db168518a99a7 SHA512 e41f4de73f4971c8f35dffe3926b6845ef12a1ce7e8f3fe682e643ddb791a009d079c1706f66d065333af884726840dbc96d4e44762f9c3e48b8d919c09ae625 +DIST nss-3.93.tar.gz 72281331 BLAKE2B 99e50f450a451f2b0bc0aad9b0fba405c987d88546d4aad6c490cb43dc274f23eb99d03d5fa8cf7ef16585abebfdae942fe1092d3f1c86816ba35e16ed3d490f SHA512 d96f13a70e825b39efadfe7c973c24c1e5ad43319bd813599010383e2b8434181f53489672f68fe79e2cb0c4d4ea0088499e588c3524eccf9298aafc57b94951 DIST nss-cacert-class1-class3-r2.patch 21925 BLAKE2B 7627ff9a09f084c19d72d0490676865e3cab3ca7c920ae1ce4bea2db664f37fd0aa84fcda919809a516891ab2a62e2e7a43a9d6ada4c231adfe4c216525fac7d SHA512 1ce6ff9ab310aaca9005eafb461338b291df8523cc7044e096cd75774ce746c26eed19ec6bb2643c6c67f94650f2f309463492d80a90568f38ce2557f8ada2f4 diff --git a/app-misc/ca-certificates/ca-certificates-20230311.3.93.ebuild b/app-misc/ca-certificates/ca-certificates-20230311.3.93.ebuild new file mode 100644 index 000000000000..cd5ede09c08f --- /dev/null +++ b/app-misc/ca-certificates/ca-certificates-20230311.3.93.ebuild @@ -0,0 +1,206 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# The Debian ca-certificates package merely takes the CA database as it exists +# in the nss package and repackages it for use by openssl. +# +# The issue with using the compiled debs directly is two fold: +# - they do not update frequently enough for us to rely on them +# - they pull the CA database from nss tip of tree rather than the release +# +# So we take the Debian source tools and combine them with the latest nss +# release to produce (largely) the same end result. The difference is that +# now we know our cert database is kept in sync with nss and, if need be, +# can be sync with nss tip of tree more frequently to respond to bugs. + +# Where possible, bump to stable/LTS releases of NSS for the last part +# of the version (when not using a pure Debian release). + +# When triaging user reports, refer to our wiki for tips: +# https://wiki.gentoo.org/wiki/Certificates#Debugging_certificate_issues + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) + +inherit python-any-r1 + +if [[ ${PV} == *.* ]] ; then + # Compile from source ourselves. + PRECOMPILED=false + + DEB_VER=$(ver_cut 1) + NSS_VER=$(ver_cut 2-) + RTM_NAME="NSS_${NSS_VER//./_}_RTM" +else + # Debian precompiled version. + PRECOMPILED=true + inherit unpacker +fi + +DESCRIPTION="Common CA Certificates PEM files" +HOMEPAGE="https://packages.debian.org/sid/ca-certificates" +NMU_PR="" +if ${PRECOMPILED} ; then + SRC_URI="mirror://debian/pool/main/c/${PN}/${PN}_${PV}${NMU_PR:++nmu}${NMU_PR}_all.deb" +else + SRC_URI=" + mirror://debian/pool/main/c/${PN}/${PN}_${DEB_VER}${NMU_PR:++nmu}${NMU_PR}.tar.xz + https://archive.mozilla.org/pub/security/nss/releases/${RTM_NAME}/src/nss-${NSS_VER}.tar.gz + cacert? ( + https://dev.gentoo.org/~whissi/dist/ca-certificates/nss-cacert-class1-class3-r2.patch + ) + " +fi + +LICENSE="MPL-1.1" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +IUSE="" +${PRECOMPILED} || IUSE+=" cacert" + +# c_rehash: we run `c_rehash` +# debianutils: we run `run-parts` +CDEPEND=" + sys-apps/debianutils" + +BDEPEND="${CDEPEND}" +if ! ${PRECOMPILED} ; then + BDEPEND+=" ${PYTHON_DEPS}" +fi + +DEPEND="" +if ${PRECOMPILED} ; then + DEPEND+=" !/dev/null || die + eapply "${DISTDIR}"/nss-cacert-class1-class3-r2.patch + popd >/dev/null || die + fi + fi + + default + eapply -p2 "${FILESDIR}"/${PN}-20150426-root.patch + + pushd "${S}/${PN}" >/dev/null || die + # We patch out the dep on cryptography as it's not particularly useful + # for us. Please see the discussion in bug #821706. Not to be removed lightly! + eapply "${FILESDIR}"/${PN}-20230311.3.89-no-cryptography.patch + popd >/dev/null || die + + local relp=$(echo "${EPREFIX}" | sed -e 's:[^/]\+:..:g') + sed -i \ + -e '/="$ROOT/s:ROOT:ROOT'"${EPREFIX}"':' \ + -e '/RELPATH="\.\./s:"$:'"${relp}"'":' \ + usr/sbin/update-ca-certificates || die +} + +src_compile() { + cd "image/${EPREFIX}" || die + + if ! ${PRECOMPILED} ; then + local d="${S}/${PN}/mozilla" c="usr/share/${PN}" + + # Grab the database from the nss sources. + cp "${S}"/nss-${NSS_VER}/nss/lib/ckfw/builtins/{certdata.txt,nssckbi.h} "${d}" || die + emake -C "${d}" + + # Now move the files to the same places that the precompiled would. + mkdir -p etc/ssl/certs \ + etc/ca-certificates/update.d \ + "${c}"/mozilla \ + || die + if use cacert ; then + mkdir -p "${c}"/cacert.org || die + mv "${d}"/CA_Cert_Signing_Authority.crt \ + "${c}"/cacert.org/cacert.org_class1.crt || die + mv "${d}"/CAcert_Class_3_Root.crt \ + "${c}"/cacert.org/cacert.org_class3.crt || die + fi + mv "${d}"/*.crt "${c}"/mozilla/ || die + else + mv usr/share/doc/{ca-certificates,${PF}} || die + fi + + ( + echo "# Automatically generated by ${CATEGORY}/${PF}" + echo "# $(date -u)" + echo "# Do not edit." + cd "${c}" || die + find * -name '*.crt' | LC_ALL=C sort + ) > etc/ca-certificates.conf + + sh usr/sbin/update-ca-certificates --root "${S}/image" || die +} + +src_install() { + cp -pPR image/* "${D}"/ || die + if ! ${PRECOMPILED} ; then + cd ${PN} || die + doman sbin/*.8 + dodoc debian/README.* examples/ca-certificates-local/README + fi + + echo 'CONFIG_PROTECT_MASK="/etc/ca-certificates.conf"' > 98ca-certificates || die + doenvd 98ca-certificates +} + +pkg_postinst() { + if [[ -d "${EROOT}/usr/local/share/ca-certificates" ]] ; then + # If the user has local certs, we need to rebuild again + # to include their stuff in the db. + # However it's too overzealous when the user has custom certs in place. + # --fresh is to clean up dangling symlinks + "${EROOT}"/usr/sbin/update-ca-certificates --root "${ROOT}" + fi + + if [[ -n "$(find -L "${EROOT}"/etc/ssl/certs/ -type l)" ]] ; then + ewarn "Removing the following broken symlinks:" + ewarn "$(find -L "${EROOT}"/etc/ssl/certs/ -type l -printf '%p -> %l\n' -delete)" + fi +}