Gentoo Archives: gentoo-commits

From: Mike Frysinger <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-misc/ca-certificates/
Date: Tue, 22 Dec 2015 23:36:07
Message-Id: 1450827342.348c4d0d51840d1052aeafd237cec1d9e4f489d5.vapier@gentoo
1 commit: 348c4d0d51840d1052aeafd237cec1d9e4f489d5
2 Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
3 AuthorDate: Tue Dec 22 23:34:23 2015 +0000
4 Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
5 CommitDate: Tue Dec 22 23:35:42 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=348c4d0d
7
8 app-misc/ca-certificates: version bump to 20151214.3.21 #568904
9
10 app-misc/ca-certificates/Manifest | 2 +
11 .../ca-certificates-20151214.3.21.ebuild | 184 +++++++++++++++++++++
12 2 files changed, 186 insertions(+)
13
14 diff --git a/app-misc/ca-certificates/Manifest b/app-misc/ca-certificates/Manifest
15 index 901ae7e..6a4d23e 100644
16 --- a/app-misc/ca-certificates/Manifest
17 +++ b/app-misc/ca-certificates/Manifest
18 @@ -1,8 +1,10 @@
19 DIST ca-certificates_20140927.tar.xz 288824 SHA256 e582724ebb9d5d6fe02d02db1773c9ca76d3aaab4b15375a0d72e9abf88a65c5 SHA512 3cd08559c52aeba763a8ecc0333c7c20838db0111e52d9adf65719f14f858611271d61801a60fb3aea4e74be4a7903c1b462bf889172f5afb774280bb615b98b WHIRLPOOL e32e54b21109b7c44266480a6a5d78693b5ef7ffae1df595c4edfe2cce85d1cd29664e6d916c5bfffb965e4bb01fce6a8327a2ead5bb0ca7cdd8afd04346a270
20 DIST ca-certificates_20141019.tar.xz 289092 SHA256 684902d3f4e9ad27829f4af0d9d2d588afed03667997579b9c2be86fcd1eb73a SHA512 5b0e8fb917f5642a5a2b4fde46a706db0c652ff3fb31a5053d9123a5b670b50c6e3cf2496915cc01c613dcbe964d6432f393c12d8a697baedfad58f9d13e568b WHIRLPOOL 6d3c0ccfbd4b1598ed529cb07390baaf741e24c8fd4762aa1786ada7188ec0c4e327513047bca2b93a488681e80b5a8fabc37b98b7f6e5e92cba62580c4cf74f
21 DIST ca-certificates_20150426.tar.xz 303256 SHA256 37dbaa93ed64cc4ae93ac295f9248fbc741bd51376438cfb1257f17efab5494f SHA512 920dfc512c018c5338bf07b6a6afcb664d9bfba659d4233ca9e87471d5e0ed05de054c96f3d7e6091549aa6deb46106a79f7f982696081f9b2164e18133eb34d WHIRLPOOL 6d068fa13ffdb1b232b1cdb99063e52e52ee9f4cd44917f4eca263f36b5d4fa3c261b45bbf51143fc08965937adc477afd88c9a909300b619d42ae72b4c4acd9
22 +DIST ca-certificates_20151214.tar.xz 293672 SHA256 59286e6403f482a24c672e09b810c7d089a73153d4772ff4a66e86053a920525 SHA512 acee5565aa7d1f0cc120a6abb6503e0ac4b4e12f5fd1cb12442ec1374ae1570ec6dc3a8f3a247fad6835a29d96e856f12c664f466e92344db3aa1ae6292a27ac WHIRLPOOL c03d214fb15a791c14f235c58296fb06f1408c98bb78049f58b3ebf7bc1c1cea4662f90a031d86de2548267feacf6a9e3fef957aa44a19e29e9a6ba803aaa3fa
23 DIST nss-3.14.1-add_spi+cacerts_ca_certs.patch 25018 SHA256 82ca25982828fd7153ad15fc6e81408c115476eeeb4045d3a71469380b56824b SHA512 2aafbd972b073061bfd66a66a4b50060691957f2910f716f7a69d22d655c499f186f05db2101bea5248a00949f339327ba8bfffec024c61c8ee908766201ae00 WHIRLPOOL c9fe397e316dac7983b187acf7227078ebd8f8da5df53f77f2564489e85f123c4d2afb88d56e8dc14b9ebfffe8a71ade4724b3c1ea683c5c4c487cb3a64eda43
24 DIST nss-3.17.2.tar.gz 6927414 SHA256 134929e44e44b968a4883f4ee513a71ae45d55b486cee41ee8e26c3cc84dab8b SHA512 a3d165bb2c578e7b5d90349729e85a2fce09260d069093080c76cce3b8a996c6489232324fd6a0c69b959321bcdf5f1806054f165cd6ce851fe4ffeb2883ae7f WHIRLPOOL 01b3cc546aa2dd0974caa2267aa9874b01cf6096f307a114393ba5a98adc216e0f2b217631b89b20752be5881f70fc1a7e94e0e90618707d5f9b9d18fd55d859
25 DIST nss-3.17.4.tar.gz 6924699 SHA256 1d98ad1881a4237ec98cbe472fc851480f0b0e954dfe224d047811fb96ff9d79 SHA512 dfc44e28c303743a72b4553f471089bc991c3cb61d5f3071082c16400d5e4f216f84a2e44536570316fe0e798c14ca370c875dad791a873034595b9e4dd70b89 WHIRLPOOL bb6e1027c5237d12fe58b4c520536022d8d4e83183a78c3421fd46bf9c3503b1f0ca4644240e383f216ec1e5174c0ae4148372db68fb9f1c10275954559d5bbf
26 DIST nss-3.19.tar.gz 6951461 SHA256 989ebdf79374f24181f060d332445b1a4baf3df39d08514c4349ba8573cefa9b SHA512 e428d206a4fd30087f275a33771a1d7e753b000e8fc3e7c746972a89d1b32300d3619f430ea15e870d82b3af52785d4dd36ae89c9c496f014f9f323ea373da14 WHIRLPOOL 3a8b58a8a28e31f65f40cfa6a9bd9ca2177a17552082d8de2189da6c92ff7ba9c90be13793666558a2bff609da738cb1f4313968077e1041b8f283d36005e76c
27 DIST nss-3.20.tar.gz 6955552 SHA256 5e38d4b9837ca338af966b97fc91c07f67ad647fb38dc4af3cfd0d84e477d15c SHA512 50f666209cadd4e463f98643ec67e35f4d1b88381e17db9eed7c67559b19799fcc27e49d72536f546d4c45bca2afa4664e5590f868775a4397a77111d68fc366 WHIRLPOOL 84f20e6764b3621762fcfcb9223a3861e1f5ff02078b19b7df2eb58430a5f96943d962dca2d3366b18cd434acf3d3be746242c5064497167d5671c50233834de
28 +DIST nss-3.21.tar.gz 6978112 SHA256 3f7a5b027d7cdd5c0e4ff7544da33fdc6f56c2f8c27fff02938fd4a6fbe87239 SHA512 0645465b5d1ab05d819355a3f4a2879499539a00d95bfab3ca14a7dcd901e510b5d9ae797386ff5a42f68b0b57f7bbec4ec9d3a85ebd508eb824aba1fb589d53 WHIRLPOOL 7504d83de606d61840e06cb855ea688eb022d5eef062bcb7ac4d1064db96b96e35ae4ce0aff9d389a2140a7c3b974aaa9a86ada52af1199d462fdb48b11b42e4
29
30 diff --git a/app-misc/ca-certificates/ca-certificates-20151214.3.21.ebuild b/app-misc/ca-certificates/ca-certificates-20151214.3.21.ebuild
31 new file mode 100644
32 index 0000000..86a6882
33 --- /dev/null
34 +++ b/app-misc/ca-certificates/ca-certificates-20151214.3.21.ebuild
35 @@ -0,0 +1,184 @@
36 +# Copyright 1999-2015 Gentoo Foundation
37 +# Distributed under the terms of the GNU General Public License v2
38 +# $Id$
39 +
40 +# The Debian ca-certificates package merely takes the CA database as it exists
41 +# in the nss package and repackages it for use by openssl.
42 +#
43 +# The issue with using the compiled debs directly is two fold:
44 +# - they do not update frequently enough for us to rely on them
45 +# - they pull the CA database from nss tip of tree rather than the release
46 +#
47 +# So we take the Debian source tools and combine them with the latest nss
48 +# release to produce (largely) the same end result. The difference is that
49 +# now we know our cert database is kept in sync with nss and, if need be,
50 +# can be sync with nss tip of tree more frequently to respond to bugs.
51 +
52 +# When triaging bugs from users, here's some handy tips:
53 +# - To see what cert is hitting errors, use openssl:
54 +# openssl s_client -port 443 -CApath /etc/ssl/certs/ -host $HOSTNAME
55 +# Focus on the errors written to stderr.
56 +#
57 +# - Look at the upstream log as to why certs were added/removed:
58 +# https://hg.mozilla.org/projects/nss/log/tip/lib/ckfw/builtins/certdata.txt
59 +#
60 +# - If people want to add/remove certs, tell them to file w/mozilla:
61 +# https://bugzilla.mozilla.org/enter_bug.cgi?product=NSS&component=CA%20Certificates&version=trunk
62 +
63 +EAPI="4"
64 +PYTHON_COMPAT=( python{2_7,3_3,3_4,3_5} )
65 +
66 +inherit eutils python-any-r1
67 +
68 +if [[ ${PV} == *.* ]] ; then
69 + # Compile from source ourselves.
70 + PRECOMPILED=false
71 + inherit versionator
72 +
73 + DEB_VER=$(get_version_component_range 1)
74 + NSS_VER=$(get_version_component_range 2-)
75 + RTM_NAME="NSS_${NSS_VER//./_}_RTM"
76 +else
77 + # Debian precompiled version.
78 + PRECOMPILED=true
79 + inherit unpacker
80 +fi
81 +
82 +DESCRIPTION="Common CA Certificates PEM files"
83 +HOMEPAGE="http://packages.debian.org/sid/ca-certificates"
84 +NMU_PR=""
85 +if ${PRECOMPILED} ; then
86 + SRC_URI="mirror://debian/pool/main/c/${PN}/${PN}_${PV}${NMU_PR:++nmu}${NMU_PR}_all.deb"
87 +else
88 + SRC_URI="mirror://debian/pool/main/c/${PN}/${PN}_${DEB_VER}${NMU_PR:++nmu}${NMU_PR}.tar.xz
89 + ftp://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/${RTM_NAME}/src/nss-${NSS_VER}.tar.gz
90 + cacert? ( https://dev.gentoo.org/~anarchy/patches/nss-3.14.1-add_spi+cacerts_ca_certs.patch )"
91 +fi
92 +
93 +LICENSE="MPL-1.1"
94 +SLOT="0"
95 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
96 +IUSE=""
97 +${PRECOMPILED} || IUSE+=" +cacert"
98 +
99 +DEPEND=""
100 +if ${PRECOMPILED} ; then
101 + # platforms like AIX don't have a good ar
102 + DEPEND+="
103 + kernel_AIX? ( app-arch/deb2targz )
104 + !<sys-apps/portage-2.1.10.41"
105 +fi
106 +# c_rehash: we run `c_rehash`; newer version for alt-cert-paths #552540
107 +# debianutils: we run `run-parts`
108 +RDEPEND="${DEPEND}
109 + >=app-misc/c_rehash-1.7-r1
110 + sys-apps/debianutils"
111 +
112 +if ! ${PRECOMPILED}; then
113 + DEPEND+=" ${PYTHON_DEPS}"
114 +fi
115 +
116 +S=${WORKDIR}
117 +
118 +pkg_setup() {
119 + # For the conversion to having it in CONFIG_PROTECT_MASK,
120 + # we need to tell users about it once manually first.
121 + [[ -f "${EPREFIX}"/etc/env.d/98ca-certificates ]] \
122 + || ewarn "You should run update-ca-certificates manually after etc-update"
123 +}
124 +
125 +src_unpack() {
126 + ${PRECOMPILED} || default
127 +
128 + # Do all the work in the image subdir to avoid conflicting with source
129 + # dirs in $WORKDIR. Need to perform everything in the offset #381937
130 + mkdir -p "image/${EPREFIX}"
131 + cd "image/${EPREFIX}" || die
132 +
133 + ${PRECOMPILED} && unpacker_src_unpack
134 +}
135 +
136 +src_prepare() {
137 + cd "image/${EPREFIX}" || die
138 + if ! ${PRECOMPILED} ; then
139 + mkdir -p usr/sbin
140 + cp -p "${S}"/${PN}/sbin/update-ca-certificates usr/sbin/ || die
141 +
142 + if use cacert ; then
143 + pushd "${S}"/nss-${NSS_VER} >/dev/null
144 + epatch "${DISTDIR}"/nss-3.14.1-add_spi+cacerts_ca_certs.patch
145 + popd >/dev/null
146 + fi
147 + fi
148 +
149 + epatch "${FILESDIR}"/${PN}-20150426-root.patch
150 + local relp=$(echo "${EPREFIX}" | sed -e 's:[^/]\+:..:g')
151 + sed -i \
152 + -e '/="$ROOT/s:ROOT:ROOT'"${EPREFIX}"':' \
153 + -e '/RELPATH="\.\./s:"$:'"${relp}"'":' \
154 + usr/sbin/update-ca-certificates || die
155 +}
156 +
157 +src_compile() {
158 + cd "image/${EPREFIX}" || die
159 + if ! ${PRECOMPILED} ; then
160 + python_setup
161 + local d="${S}/${PN}/mozilla"
162 + # Grab the database from the nss sources.
163 + cp "${S}"/nss-${NSS_VER}/nss/lib/ckfw/builtins/{certdata.txt,nssckbi.h} "${d}" || die
164 + emake -C "${d}"
165 +
166 + # Now move the files to the same places that the precompiled would.
167 + mkdir -p etc/ssl/certs etc/ca-certificates/update.d usr/share/ca-certificates/mozilla
168 + if use cacert ; then
169 + mkdir -p usr/share/ca-certificates/{cacert.org,spi-inc.org}
170 + mv "${d}"/CAcert_Inc..crt usr/share/ca-certificates/cacert.org/cacert.org_root.crt || die
171 + mv "${d}"/SPI_Inc..crt usr/share/ca-certificates/spi-inc.org/spi-cacert-2008.crt || die
172 + fi
173 + mv "${d}"/*.crt usr/share/ca-certificates/mozilla/ || die
174 + else
175 + mv usr/share/doc/{ca-certificates,${PF}} || die
176 + fi
177 +
178 + (
179 + echo "# Automatically generated by ${CATEGORY}/${PF}"
180 + echo "# $(date -u)"
181 + echo "# Do not edit."
182 + cd usr/share/ca-certificates
183 + find * -name '*.crt' | LC_ALL=C sort
184 + ) > etc/ca-certificates.conf
185 +
186 + sh usr/sbin/update-ca-certificates --root "${S}/image" || die
187 +}
188 +
189 +src_install() {
190 + cp -pPR image/* "${D}"/ || die
191 + if ! ${PRECOMPILED} ; then
192 + cd ca-certificates
193 + doman sbin/*.8
194 + dodoc debian/README.* examples/ca-certificates-local/README
195 + fi
196 +
197 + echo 'CONFIG_PROTECT_MASK="/etc/ca-certificates.conf"' > 98ca-certificates
198 + doenvd 98ca-certificates
199 +}
200 +
201 +pkg_postinst() {
202 + if [ -d "${EROOT}/usr/local/share/ca-certificates" ] ; then
203 + # if the user has local certs, we need to rebuild again
204 + # to include their stuff in the db.
205 + # However it's too overzealous when the user has custom certs in place.
206 + # --fresh is to clean up dangling symlinks
207 + "${EROOT}"/usr/sbin/update-ca-certificates --root "${ROOT}"
208 + fi
209 +
210 + local c badcerts=0
211 + for c in $(find -L "${EROOT}"etc/ssl/certs/ -type l) ; do
212 + ewarn "Broken symlink for a certificate at $c"
213 + badcerts=1
214 + done
215 + if [ ${badcerts} -eq 1 ]; then
216 + ewarn "Removing the following broken symlinks:"
217 + ewarn "$(find -L "${EROOT}"/etc/ssl/certs/ -type l -printf '%p -> %l\n' -delete)"
218 + fi
219 +}