diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-04-14 01:05:40 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-04-14 01:05:40 +0100 |
commit | 76cba73c47c8694e74377004634daca18f2d9c08 (patch) | |
tree | 468603ebdc189bcfae77696162761b3be936baea /app-misc/ca-certificates | |
parent | 6957f5c65b02bba533954eabc0b62f5de36be206 (diff) |
gentoo resync : 14.04.2018
Diffstat (limited to 'app-misc/ca-certificates')
-rw-r--r-- | app-misc/ca-certificates/Manifest | 2 | ||||
-rw-r--r-- | app-misc/ca-certificates/ca-certificates-20170717.3.36.1.ebuild | 190 |
2 files changed, 192 insertions, 0 deletions
diff --git a/app-misc/ca-certificates/Manifest b/app-misc/ca-certificates/Manifest index a6d208fd330d..51fd7bb0e973 100644 --- a/app-misc/ca-certificates/Manifest +++ b/app-misc/ca-certificates/Manifest @@ -4,10 +4,12 @@ DIST ca-certificates_20170717.tar.xz 293028 BLAKE2B 85076cd980841f32e2544c7be020 DIST nss-3.30.2.tar.gz 9499119 BLAKE2B 720ebe79c791f80f1717548cc9a8afea455ee8d74c1489bcecf0229b6f19f5bbcc66e9625ac74b655c55897450400090c19eac92c035276c8815fcf98bac945c SHA512 02f14bc000cbde42268c4b6f42df80680b010d1491643ef9b11e0bac31a286a2e7fa251c40cb4ac70b64883a1b90efc64440ef9d797357f8a47cd37195fc5500 DIST nss-3.30.tar.gz 9500552 BLAKE2B 634734400562db5b35f170c5d138fbad45cfdc972a4154db8e2ce7f810d66ef9bad972c1204bc88bae7374d03f4d5c7845d85eb340b387189c258d09b3d7b699 SHA512 c21e9b5e4b689ea8cbc6f4d7913df43e2a78c4435e0ce092f2ce00e46079ce2268e17ec8527b283ac69eff3d96ff0165a5b42b6579bfe0a720115ff2938260d3 DIST nss-3.35.tar.gz 9620041 BLAKE2B a4115117ff017ce36f030d9f69c75111177166651968739353d112cc5d2c4732b33b8c684c5957a66bb969ecab1a15fb2cd6bb237d959d307cdee43ec638cd73 SHA512 8d466f4602427d278b6aa28af0e6bdb99326fc40c94ac6d517d1cbe7ce6b9332dadba52ea092762fac2fd6e72f17cb880cf81e1cf86bf6b4f7913a755419626d +DIST nss-3.36.1.tar.gz 23026430 BLAKE2B 76eaf5b24f8954a4e14cf556912250a3ddb7b333054a2ea4ee3d218493a8f12c77a37455aae354ef6ddd9bd55c33a269dad515806d70ef38727fa8a382d47fd4 SHA512 096fe4360b6d584a746ac6156830f8cff821fd173bd889d7a396238919328a227fa4ebb46f738970a4001773046f3dd4f4675b85ff6de8420a4a7657b3ba0c65 DIST nss-3.36.tar.gz 23025578 BLAKE2B c8dd8a4c2bcda15bfeab4e7b49e790aaa2ecc3021ab014ca4e7b9253cad2ce140bf719cc336ce74d5074722c63d5a73d4a4e75792aa779b008d635a765e0c5b8 SHA512 e4d5cc475f1fcca9a42a139a890b70dbc3fadf5ed8a626c8d6bf929a97bb91ca9a42fe967df95784e5d997a3ec5c5a87684256ddf91b8dafa827103a98ad39ae DIST nss-cacert-class1-class3.patch 22950 BLAKE2B 9d5e60df5f161a3c27c41e5a9419440a54f888eda454e3cde5ebe626d4075b65cf9938b5144d0fb022377f4bd415bff5e5c67d104409860aa9391b3eb8872c68 SHA512 a5aa740bf110a3f0262e3f1ef2fc739ac2b44f042e220039d48aee8e97cd764d5c10718220364f4098aba955882bd02cadb5481512388971a8290312f88a7df0 EBUILD ca-certificates-20161130.3.30-r1.ebuild 5945 BLAKE2B 5b6b9a89b0c9d22f6199d0e57e257c96f3420b33a457554b8fa146fe7c291fe3117c2e2eedca4029d848c6068b1e6a5572c0785db455a795ca552dc13f022632 SHA512 58c4adc50e9dd6057ebf59cb87e545297aeef88444150edc88f0485be60cf00022c9f31196c10db52426a9a62249f0b87eb92b0dcf900c1a22f0a81ce575dfe7 EBUILD ca-certificates-20161130.3.30.2.ebuild 6236 BLAKE2B 4c03bde354f763bdb5eec9a1301073d722958f4a43a70ffd44d838725a5cd40fcd165d19690298d0452df05e65e278581454b6b4d1a8467d8d9c8cb0f33643c8 SHA512 444a9cc25ce4e6d250c152d8b324548240bc759c08d6f230a3b6c274b34d65aa2e2ea9b15e87dbbb74dbe62739a345b21fb4c8c365ee2695f31d99ede256ea55 EBUILD ca-certificates-20170717.3.35.ebuild 6266 BLAKE2B 8f07707c53e433729c098b978072ef4a5a89d21fc2f35480406668adf331e17c669e0d41e86d215b5acf49ff0fde2c5f14e5d14e63f7f6aa11318acd272c72ed SHA512 1bcaebdfacff61b3fb618f060cf15b050bc896ac6330082a834f31ba52c89bb924e194a7a347ced9321d05ee86e59b8c64900559e89d495f490c47b005405582 +EBUILD ca-certificates-20170717.3.36.1.ebuild 6266 BLAKE2B 8f07707c53e433729c098b978072ef4a5a89d21fc2f35480406668adf331e17c669e0d41e86d215b5acf49ff0fde2c5f14e5d14e63f7f6aa11318acd272c72ed SHA512 1bcaebdfacff61b3fb618f060cf15b050bc896ac6330082a834f31ba52c89bb924e194a7a347ced9321d05ee86e59b8c64900559e89d495f490c47b005405582 EBUILD ca-certificates-20170717.3.36.ebuild 6266 BLAKE2B 8f07707c53e433729c098b978072ef4a5a89d21fc2f35480406668adf331e17c669e0d41e86d215b5acf49ff0fde2c5f14e5d14e63f7f6aa11318acd272c72ed SHA512 1bcaebdfacff61b3fb618f060cf15b050bc896ac6330082a834f31ba52c89bb924e194a7a347ced9321d05ee86e59b8c64900559e89d495f490c47b005405582 MISC metadata.xml 538 BLAKE2B 20dd319e6f583b4b6b93fdfc7fb965c54c7b92426715cf287611ea58ed5040ffac4afa77df2e6464a387c120a8d80d508c6e997c820eae9395ba859b13c5702e SHA512 f2779da4ea4b24e196b64d6e4c94d47e426d431508db58355a08ca420498cbbe2f322c5f8dc6e132b612baf03ee6bb1561beade226bd2f71d6afa160064d7a7c diff --git a/app-misc/ca-certificates/ca-certificates-20170717.3.36.1.ebuild b/app-misc/ca-certificates/ca-certificates-20170717.3.36.1.ebuild new file mode 100644 index 000000000000..198af98ddbf4 --- /dev/null +++ b/app-misc/ca-certificates/ca-certificates-20170717.3.36.1.ebuild @@ -0,0 +1,190 @@ +# Copyright 1999-2018 Gentoo Foundation +# 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,3_5,3_6} ) + +inherit eutils python-any-r1 + +if [[ ${PV} == *.* ]] ; then + # Compile from source ourselves. + PRECOMPILED=false + inherit versionator + + DEB_VER=$(get_version_component_range 1) + NSS_VER=$(get_version_component_range 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 ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" +IUSE="insecure_certs" +${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}" + cd "image/${EPREFIX}" || die + + ${PRECOMPILED} && unpacker_src_unpack +} + +src_prepare() { + cd "image/${EPREFIX}" || die + if ! ${PRECOMPILED} ; then + mkdir -p usr/sbin + cp -p "${S}"/${PN}/sbin/update-ca-certificates usr/sbin/ || die + + if use cacert ; then + pushd "${S}"/nss-${NSS_VER} >/dev/null + epatch "${DISTDIR}"/nss-cacert-class1-class3.patch + popd >/dev/null + 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}"'":' \ + usr/sbin/update-ca-certificates || die +} + +src_compile() { + cd "image/${EPREFIX}" || die + if ! ${PRECOMPILED} ; then + python_setup + 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 + if use cacert ; then + mkdir -p "${c}"/cacert.org + 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 + + if ! use insecure_certs ; then + elog "To prevent applications relying on system's trusted root certificate store" + elog "from using CAs where at least one major browser vendor Gentoo is following" + elog "has decided to apply trust level restrictions, the following" + elog "certificate(s) were removed:" + # Remove untrusted certs from StartCom and WoSign (bug #598072) + elog "$(find "${c}" -type f \( \ + -iname '*startcom*' \ + -o -iname '*wosign*' \ + \) -printf '%P removed; see https://bugs.gentoo.org/598072 for details\n' -delete)" + fi + + ( + echo "# Automatically generated by ${CATEGORY}/${PF}" + echo "# $(date -u)" + echo "# Do not edit." + cd "${c}" + 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 ca-certificates + 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 +} |