summaryrefslogtreecommitdiff
path: root/app-misc/ca-certificates
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-03-19 11:37:34 +0000
committerV3n3RiX <venerix@redcorelinux.org>2019-03-19 11:37:34 +0000
commitb7b97785ebbb2f11d24d14dab8b81ed274f4ce6a (patch)
tree9fd110f9fc996e8a4213eeda994a8c112491b86d /app-misc/ca-certificates
parent066d27181e9a797ad9f8fc43b49fc9a10ff2f707 (diff)
gentoo resync : 19.03.2019
Diffstat (limited to 'app-misc/ca-certificates')
-rw-r--r--app-misc/ca-certificates/Manifest2
-rw-r--r--app-misc/ca-certificates/ca-certificates-20190110.3.43.ebuild184
2 files changed, 186 insertions, 0 deletions
diff --git a/app-misc/ca-certificates/Manifest b/app-misc/ca-certificates/Manifest
index 4e337c8ec778..808561ad2d0f 100644
--- a/app-misc/ca-certificates/Manifest
+++ b/app-misc/ca-certificates/Manifest
@@ -3,7 +3,9 @@ DIST ca-certificates_20180409.tar.xz 246908 BLAKE2B b553d4347f1a5b88fe59c7269dee
DIST ca-certificates_20190110.tar.xz 243472 BLAKE2B b63e541fcf611712634f8c7fd2da5f189b999c39118047a7e2fd43ddd5e0fbefeaa08788363482a02be55a347447d4cc95f1505bf869accf9cd847578ad2e879 SHA512 9ce2661018edb120d0ef5bd3ed52c0f73f577d7607d135a31730549f5eb4176db4865cdb8bde77a78dc3efb8968846da5e72af8a833a9da2a8a7deb4f1560372
DIST nss-3.37.tar.gz 23027581 BLAKE2B 0ce7190a029321d5620dc8b9aedf1f4252c53dbef57149afbad432b6bc4b590db026505d23f5c766827d5c0179ab931b8a0435a2e9785eff3db515ed7211e512 SHA512 ad5175f126705f57092ac80421ac005bcc32bb18a4a44a527df25994fa90b3bc18af08506683564f619a22076f71232e2b3c9e6e25d6312d0bfed63684139103
DIST nss-3.42.1.tar.gz 23416408 BLAKE2B 9c008ce599f3cc4de50af3a32f680e16058a42df7a844aa8f151c729a1c783177d8410b0aa2ea9887f5e69a359d84b655b78808fd817b8ccdeae458d9c7b4488 SHA512 468e1d4ea9d2b832c7b8975443ee6fe2790b39cbbd9f8e3d8428a43f47cce0e81d5ca21e3566701b75bcd4af09110c0134e204b2850d30ecfd6347ec27e6e265
+DIST nss-3.43.tar.gz 23466026 BLAKE2B 1b43036daeedea1643a7fe1a8defa167097997efec529417c4857eaa29d453b6a588f462078f13662193d58dfd8f9566c22d729729591934ef154b9befb8f98d SHA512 e9dfba5bd6f68c5ab58fc7a6fa1b16a035be1b1b7c436cf787bdc99257c5f54c78d73d94d015bffd29420df19b2a2818166c68fe592dd7208ab5605344827fb5
DIST nss-cacert-class1-class3.patch 22950 BLAKE2B 9d5e60df5f161a3c27c41e5a9419440a54f888eda454e3cde5ebe626d4075b65cf9938b5144d0fb022377f4bd415bff5e5c67d104409860aa9391b3eb8872c68 SHA512 a5aa740bf110a3f0262e3f1ef2fc739ac2b44f042e220039d48aee8e97cd764d5c10718220364f4098aba955882bd02cadb5481512388971a8290312f88a7df0
EBUILD ca-certificates-20180409.3.37.ebuild 5675 BLAKE2B 3a9d6e7d6e98ab84e2300ac21a0420c835f1ef870cdab61772f3c704545a3974d01c88b461d490310a9bf33c88e4c1e40d58ff4618cb308e08057050b665b3dd SHA512 7789acd51276ba30fc1709526d62a939756c1b94896ffea4ea6dfbb0b1862c2ab580847fb2d4168be87fbde0c28f0aad45b689f2e426ee017e02991064dfeab4
EBUILD ca-certificates-20190110.3.42.1.ebuild 5809 BLAKE2B 5748c717301e916b4f9559542887a1d474766748d53145eded9b984fd7fa9596527f139365fad2b905330d7f54c1bd1b572af8757601ffcfa87e0539cb8c6c32 SHA512 e90b46be5b0ccb10bce56fcc2dcb522b3fd3357776ee5b6218f464d6da85c915c0698bc815ac25c08b7117316a10260b736fe3a3877358c18147e0be90684bef
+EBUILD ca-certificates-20190110.3.43.ebuild 5809 BLAKE2B 5748c717301e916b4f9559542887a1d474766748d53145eded9b984fd7fa9596527f139365fad2b905330d7f54c1bd1b572af8757601ffcfa87e0539cb8c6c32 SHA512 e90b46be5b0ccb10bce56fcc2dcb522b3fd3357776ee5b6218f464d6da85c915c0698bc815ac25c08b7117316a10260b736fe3a3877358c18147e0be90684bef
MISC metadata.xml 436 BLAKE2B f37fed732b387ea5e778bb88c349c78127b0db613def815d75e5cc2b7a7dbd049131eef33617fe3139975bd0c6bb187cf20e98c27e3ee10c3928b394fe6f02ac SHA512 dade84534ac0e574b3d127a1dc367b2f206874500057662d6139a00dc30506e1d977e3020b8e983750a8ef243bcfb34e152391d12027d88f8c116d151090ed9b
diff --git a/app-misc/ca-certificates/ca-certificates-20190110.3.43.ebuild b/app-misc/ca-certificates/ca-certificates-20190110.3.43.ebuild
new file mode 100644
index 000000000000..5bb10882fbc3
--- /dev/null
+++ b/app-misc/ca-certificates/ca-certificates-20190110.3.43.ebuild
@@ -0,0 +1,184 @@
+# Copyright 1999-2019 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.
+
+# When triaging bugs from users, here's some handy tips:
+# - To see what cert is hitting errors, use openssl:
+# openssl s_client -port 443 -CApath /etc/ssl/certs/ -host $HOSTNAME
+# Focus on the errors written to stderr.
+#
+# - Look at the upstream log as to why certs were added/removed:
+# https://hg.mozilla.org/projects/nss/log/tip/lib/ckfw/builtins/certdata.txt
+#
+# - If people want to add/remove certs, tell them to file w/mozilla:
+# https://bugzilla.mozilla.org/enter_bug.cgi?product=NSS&component=CA%20Certificates&version=trunk
+
+EAPI=6
+
+PYTHON_COMPAT=( python{2_7,3_{4,5,6,7}} )
+
+inherit eutils python-any-r1
+
+if [[ ${PV} == *.* ]] ; then
+ # Compile from source ourselves.
+ PRECOMPILED=false
+ inherit eapi7-ver
+
+ 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/~axs/distfiles/nss-cacert-class1-class3.patch
+ )"
+fi
+
+LICENSE="MPL-1.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+IUSE=""
+${PRECOMPILED} || IUSE+=" cacert"
+
+DEPEND=""
+if ${PRECOMPILED} ; then
+ DEPEND+=" !<sys-apps/portage-2.1.10.41"
+fi
+# c_rehash: we run `c_rehash`
+# debianutils: we run `run-parts`
+RDEPEND="${DEPEND}
+ app-misc/c_rehash
+ sys-apps/debianutils"
+
+if ! ${PRECOMPILED}; then
+ DEPEND+=" ${PYTHON_DEPS}"
+fi
+
+S=${WORKDIR}
+
+pkg_setup() {
+ # For the conversion to having it in CONFIG_PROTECT_MASK,
+ # we need to tell users about it once manually first.
+ [[ -f "${EPREFIX}"/etc/env.d/98ca-certificates ]] \
+ || ewarn "You should run update-ca-certificates manually after etc-update"
+}
+
+src_unpack() {
+ ${PRECOMPILED} || default
+
+ # Do all the work in the image subdir to avoid conflicting with source
+ # dirs in ${WORKDIR}. Need to perform everything in the offset #381937
+ mkdir -p "image/${EPREFIX}" || die
+ cd "image/${EPREFIX}" || die
+
+ ${PRECOMPILED} && unpacker_src_unpack
+}
+
+src_prepare() {
+ cd "image/${EPREFIX}" || die
+ if ! ${PRECOMPILED} ; then
+ mkdir -p usr/sbin || die
+ cp -p "${S}"/${PN}-${DEB_VER}/sbin/update-ca-certificates \
+ usr/sbin/ || die
+
+ if use cacert ; then
+ pushd "${S}"/nss-${NSS_VER} >/dev/null || die
+ eapply -p0 "${DISTDIR}"/nss-cacert-class1-class3.patch
+ popd >/dev/null || die
+ fi
+ fi
+
+ default
+ eapply -p2 "${FILESDIR}"/${PN}-20150426-root.patch
+ local relp=$(echo "${EPREFIX}" | sed -e 's:[^/]\+:..:g')
+ sed -i \
+ -e '/="$ROOT/s:ROOT:ROOT'"${EPREFIX}"':' \
+ -e '/RELPATH="\.\./s:"$:'"${relp}"'":' \
+ -e 's/openssl rehash/c_rehash/' \
+ usr/sbin/update-ca-certificates || die
+}
+
+src_compile() {
+ cd "image/${EPREFIX}" || die
+ if ! ${PRECOMPILED} ; then
+ python_setup
+ local d="${S}/${PN}-${DEB_VER}/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}"/CAcert_Inc..crt \
+ "${c}"/cacert.org/cacert.org_root.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}-${DEB_VER} || die
+ doman sbin/*.8
+ dodoc debian/README.* examples/ca-certificates-local/README
+ fi
+
+ echo 'CONFIG_PROTECT_MASK="/etc/ca-certificates.conf"' > 98ca-certificates
+ 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
+}