1 |
commit: 26c99295c5d5ed67f6be2a04445d36be70f18ce3 |
2 |
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Sep 26 16:23:19 2015 +0000 |
4 |
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Sep 26 17:45:28 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=26c99295 |
7 |
|
8 |
app-misc/ca-certificates: version bump to 20150426.3.20 |
9 |
|
10 |
app-misc/ca-certificates/Manifest | 2 + |
11 |
.../ca-certificates-20150426.3.20.ebuild | 190 +++++++++++++++++++++ |
12 |
.../files/ca-certificates-20150426-root.patch | 49 ++++++ |
13 |
3 files changed, 241 insertions(+) |
14 |
|
15 |
diff --git a/app-misc/ca-certificates/Manifest b/app-misc/ca-certificates/Manifest |
16 |
index 436f77d..901ae7e 100644 |
17 |
--- a/app-misc/ca-certificates/Manifest |
18 |
+++ b/app-misc/ca-certificates/Manifest |
19 |
@@ -1,6 +1,8 @@ |
20 |
DIST ca-certificates_20140927.tar.xz 288824 SHA256 e582724ebb9d5d6fe02d02db1773c9ca76d3aaab4b15375a0d72e9abf88a65c5 SHA512 3cd08559c52aeba763a8ecc0333c7c20838db0111e52d9adf65719f14f858611271d61801a60fb3aea4e74be4a7903c1b462bf889172f5afb774280bb615b98b WHIRLPOOL e32e54b21109b7c44266480a6a5d78693b5ef7ffae1df595c4edfe2cce85d1cd29664e6d916c5bfffb965e4bb01fce6a8327a2ead5bb0ca7cdd8afd04346a270 |
21 |
DIST ca-certificates_20141019.tar.xz 289092 SHA256 684902d3f4e9ad27829f4af0d9d2d588afed03667997579b9c2be86fcd1eb73a SHA512 5b0e8fb917f5642a5a2b4fde46a706db0c652ff3fb31a5053d9123a5b670b50c6e3cf2496915cc01c613dcbe964d6432f393c12d8a697baedfad58f9d13e568b WHIRLPOOL 6d3c0ccfbd4b1598ed529cb07390baaf741e24c8fd4762aa1786ada7188ec0c4e327513047bca2b93a488681e80b5a8fabc37b98b7f6e5e92cba62580c4cf74f |
22 |
+DIST ca-certificates_20150426.tar.xz 303256 SHA256 37dbaa93ed64cc4ae93ac295f9248fbc741bd51376438cfb1257f17efab5494f SHA512 920dfc512c018c5338bf07b6a6afcb664d9bfba659d4233ca9e87471d5e0ed05de054c96f3d7e6091549aa6deb46106a79f7f982696081f9b2164e18133eb34d WHIRLPOOL 6d068fa13ffdb1b232b1cdb99063e52e52ee9f4cd44917f4eca263f36b5d4fa3c261b45bbf51143fc08965937adc477afd88c9a909300b619d42ae72b4c4acd9 |
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 |
|
29 |
diff --git a/app-misc/ca-certificates/ca-certificates-20150426.3.20.ebuild b/app-misc/ca-certificates/ca-certificates-20150426.3.20.ebuild |
30 |
new file mode 100644 |
31 |
index 0000000..2431504 |
32 |
--- /dev/null |
33 |
+++ b/app-misc/ca-certificates/ca-certificates-20150426.3.20.ebuild |
34 |
@@ -0,0 +1,190 @@ |
35 |
+# Copyright 1999-2015 Gentoo Foundation |
36 |
+# Distributed under the terms of the GNU General Public License v2 |
37 |
+# $Id$ |
38 |
+ |
39 |
+# The Debian ca-certificates package merely takes the CA database as it exists |
40 |
+# in the nss package and repackages it for use by openssl. |
41 |
+# |
42 |
+# The issue with using the compiled debs directly is two fold: |
43 |
+# - they do not update frequently enough for us to rely on them |
44 |
+# - they pull the CA database from nss tip of tree rather than the release |
45 |
+# |
46 |
+# So we take the Debian source tools and combine them with the latest nss |
47 |
+# release to produce (largely) the same end result. The difference is that |
48 |
+# now we know our cert database is kept in sync with nss and, if need be, |
49 |
+# can be sync with nss tip of tree more frequently to respond to bugs. |
50 |
+ |
51 |
+# When triaging bugs from users, here's some handy tips: |
52 |
+# - To see what cert is hitting errors, use openssl: |
53 |
+# openssl s_client -port 443 -CApath /etc/ssl/certs/ -host $HOSTNAME |
54 |
+# Focus on the errors written to stderr. |
55 |
+# |
56 |
+# - Look at the upstream log as to why certs were added/removed: |
57 |
+# https://hg.mozilla.org/projects/nss/log/tip/lib/ckfw/builtins/certdata.txt |
58 |
+# |
59 |
+# - If people want to add/remove certs, tell them to file w/mozilla: |
60 |
+# https://bugzilla.mozilla.org/enter_bug.cgi?product=NSS&component=CA%20Certificates&version=trunk |
61 |
+ |
62 |
+EAPI="4" |
63 |
+PYTHON_COMPAT=( python2_7 ) |
64 |
+ |
65 |
+inherit eutils python-any-r1 |
66 |
+ |
67 |
+if [[ ${PV} == *.* ]] ; then |
68 |
+ # Compile from source ourselves. |
69 |
+ PRECOMPILED=false |
70 |
+ inherit versionator |
71 |
+ |
72 |
+ DEB_VER=$(get_version_component_range 1) |
73 |
+ NSS_VER=$(get_version_component_range 2-) |
74 |
+ RTM_NAME="NSS_${NSS_VER//./_}_RTM" |
75 |
+else |
76 |
+ # Debian precompiled version. |
77 |
+ PRECOMPILED=true |
78 |
+ inherit unpacker |
79 |
+fi |
80 |
+ |
81 |
+DESCRIPTION="Common CA Certificates PEM files" |
82 |
+HOMEPAGE="http://packages.debian.org/sid/ca-certificates" |
83 |
+NMU_PR="" |
84 |
+if ${PRECOMPILED} ; then |
85 |
+ SRC_URI="mirror://debian/pool/main/c/${PN}/${PN}_${PV}${NMU_PR:++nmu}${NMU_PR}_all.deb" |
86 |
+else |
87 |
+ SRC_URI="mirror://debian/pool/main/c/${PN}/${PN}_${DEB_VER}${NMU_PR:++nmu}${NMU_PR}.tar.xz |
88 |
+ ftp://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/${RTM_NAME}/src/nss-${NSS_VER}.tar.gz |
89 |
+ cacert? ( https://dev.gentoo.org/~anarchy/patches/nss-3.14.1-add_spi+cacerts_ca_certs.patch )" |
90 |
+fi |
91 |
+ |
92 |
+LICENSE="MPL-1.1" |
93 |
+SLOT="0" |
94 |
+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" |
95 |
+IUSE="libressl" |
96 |
+${PRECOMPILED} || IUSE+=" +cacert" |
97 |
+ |
98 |
+DEPEND="" |
99 |
+if ${PRECOMPILED} ; then |
100 |
+ # platforms like AIX don't have a good ar |
101 |
+ DEPEND+=" |
102 |
+ kernel_AIX? ( app-arch/deb2targz ) |
103 |
+ !<sys-apps/portage-2.1.10.41" |
104 |
+fi |
105 |
+# openssl: we run `c_rehash`; newer version for alt-cert-paths #552540 |
106 |
+# debianutils: we run `run-parts` |
107 |
+RDEPEND="${DEPEND} |
108 |
+ !libressl? ( >=dev-libs/openssl-1.0.1o:0 ) |
109 |
+ libressl? ( |
110 |
+ app-misc/c_rehash |
111 |
+ dev-libs/libressl |
112 |
+ ) |
113 |
+ sys-apps/debianutils" |
114 |
+ |
115 |
+if ! ${PRECOMPILED}; then |
116 |
+ DEPEND+=" ${PYTHON_DEPS}" |
117 |
+fi |
118 |
+ |
119 |
+S=${WORKDIR} |
120 |
+ |
121 |
+pkg_setup() { |
122 |
+ # For the conversion to having it in CONFIG_PROTECT_MASK, |
123 |
+ # we need to tell users about it once manually first. |
124 |
+ [[ -f "${EPREFIX}"/etc/env.d/98ca-certificates ]] \ |
125 |
+ || ewarn "You should run update-ca-certificates manually after etc-update" |
126 |
+} |
127 |
+ |
128 |
+src_unpack() { |
129 |
+ ${PRECOMPILED} || default |
130 |
+ |
131 |
+ mv ${PN}-*/ ${PN} || die |
132 |
+ |
133 |
+ # Do all the work in the image subdir to avoid conflicting with source |
134 |
+ # dirs in $WORKDIR. Need to perform everything in the offset #381937 |
135 |
+ mkdir -p "image/${EPREFIX}" |
136 |
+ cd "image/${EPREFIX}" || die |
137 |
+ |
138 |
+ ${PRECOMPILED} && unpacker_src_unpack |
139 |
+} |
140 |
+ |
141 |
+src_prepare() { |
142 |
+ cd "image/${EPREFIX}" || die |
143 |
+ if ! ${PRECOMPILED} ; then |
144 |
+ mkdir -p usr/sbin |
145 |
+ cp -p "${S}"/${PN}/sbin/update-ca-certificates usr/sbin/ || die |
146 |
+ |
147 |
+ if use cacert ; then |
148 |
+ pushd "${S}"/nss-${NSS_VER} >/dev/null |
149 |
+ epatch "${DISTDIR}"/nss-3.14.1-add_spi+cacerts_ca_certs.patch |
150 |
+ popd >/dev/null |
151 |
+ fi |
152 |
+ fi |
153 |
+ |
154 |
+ epatch "${FILESDIR}"/${PN}-20150426-root.patch |
155 |
+ local relp=$(echo "${EPREFIX}" | sed -e 's:[^/]\+:..:g') |
156 |
+ sed -i \ |
157 |
+ -e '/="$ROOT/s:ROOT/:ROOT'"${EPREFIX}"'/:' \ |
158 |
+ -e '/RELPATH="\.\./s:"$:'"${relp}"'":' \ |
159 |
+ usr/sbin/update-ca-certificates || die |
160 |
+} |
161 |
+ |
162 |
+src_compile() { |
163 |
+ cd "image/${EPREFIX}" || die |
164 |
+ if ! ${PRECOMPILED} ; then |
165 |
+ python_setup |
166 |
+ local d="${S}/${PN}/mozilla" |
167 |
+ # Grab the database from the nss sources. |
168 |
+ cp "${S}"/nss-${NSS_VER}/nss/lib/ckfw/builtins/{certdata.txt,nssckbi.h} "${d}" || die |
169 |
+ emake -C "${d}" |
170 |
+ |
171 |
+ # Now move the files to the same places that the precompiled would. |
172 |
+ mkdir -p etc/ssl/certs etc/ca-certificates/update.d usr/share/ca-certificates/mozilla |
173 |
+ if use cacert ; then |
174 |
+ mkdir -p usr/share/ca-certificates/{cacert.org,spi-inc.org} |
175 |
+ mv "${d}"/CAcert_Inc..crt usr/share/ca-certificates/cacert.org/cacert.org_root.crt || die |
176 |
+ mv "${d}"/SPI_Inc..crt usr/share/ca-certificates/spi-inc.org/spi-cacert-2008.crt || die |
177 |
+ fi |
178 |
+ mv "${d}"/*.crt usr/share/ca-certificates/mozilla/ || die |
179 |
+ else |
180 |
+ mv usr/share/doc/{ca-certificates,${PF}} || die |
181 |
+ fi |
182 |
+ |
183 |
+ ( |
184 |
+ echo "# Automatically generated by ${CATEGORY}/${PF}" |
185 |
+ echo "# $(date -u)" |
186 |
+ echo "# Do not edit." |
187 |
+ cd usr/share/ca-certificates |
188 |
+ find * -name '*.crt' | LC_ALL=C sort |
189 |
+ ) > etc/ca-certificates.conf |
190 |
+ |
191 |
+ sh usr/sbin/update-ca-certificates --root "${S}/image" || die |
192 |
+} |
193 |
+ |
194 |
+src_install() { |
195 |
+ cp -pPR image/* "${D}"/ || die |
196 |
+ if ! ${PRECOMPILED} ; then |
197 |
+ cd ca-certificates |
198 |
+ doman sbin/*.8 |
199 |
+ dodoc debian/README.* examples/ca-certificates-local/README |
200 |
+ fi |
201 |
+ |
202 |
+ echo 'CONFIG_PROTECT_MASK="/etc/ca-certificates.conf"' > 98ca-certificates |
203 |
+ doenvd 98ca-certificates |
204 |
+} |
205 |
+ |
206 |
+pkg_postinst() { |
207 |
+ if [ -d "${EROOT}/usr/local/share/ca-certificates" ] ; then |
208 |
+ # if the user has local certs, we need to rebuild again |
209 |
+ # to include their stuff in the db. |
210 |
+ # However it's too overzealous when the user has custom certs in place. |
211 |
+ # --fresh is to clean up dangling symlinks |
212 |
+ "${EROOT}"/usr/sbin/update-ca-certificates --root "${ROOT}" |
213 |
+ fi |
214 |
+ |
215 |
+ local c badcerts=0 |
216 |
+ for c in $(find -L "${EROOT}"etc/ssl/certs/ -type l) ; do |
217 |
+ ewarn "Broken symlink for a certificate at $c" |
218 |
+ badcerts=1 |
219 |
+ done |
220 |
+ if [ $badcerts -eq 1 ]; then |
221 |
+ ewarn "Removing the following broken symlinks:" |
222 |
+ ewarn "$(find -L "${EROOT}"/etc/ssl/certs/ -type l -printf '%p -> %l\n' -delete)" |
223 |
+ fi |
224 |
+} |
225 |
|
226 |
diff --git a/app-misc/ca-certificates/files/ca-certificates-20150426-root.patch b/app-misc/ca-certificates/files/ca-certificates-20150426-root.patch |
227 |
new file mode 100644 |
228 |
index 0000000..6e41ac3 |
229 |
--- /dev/null |
230 |
+++ b/app-misc/ca-certificates/files/ca-certificates-20150426-root.patch |
231 |
@@ -0,0 +1,49 @@ |
232 |
+add a --root option so we can generate with DESTDIR installs |
233 |
+ |
234 |
+--- a/image/usr/sbin/update-ca-certificates |
235 |
++++ b/image/usr/sbin/update-ca-certificates |
236 |
+@@ -30,6 +30,8 @@ LOCALCERTSDIR=/usr/local/share/ca-certificates |
237 |
+ CERTBUNDLE=ca-certificates.crt |
238 |
+ ETCCERTSDIR=/etc/ssl/certs |
239 |
+ HOOKSDIR=/etc/ca-certificates/update.d |
240 |
++ROOT="" |
241 |
++RELPATH="" |
242 |
+ |
243 |
+ while [ $# -gt 0 ]; |
244 |
+ do |
245 |
+@@ -59,13 +61,25 @@ do |
246 |
+ --hooksdir) |
247 |
+ shift |
248 |
+ HOOKSDIR="$1";; |
249 |
++ --root|-r) |
250 |
++ shift |
251 |
++ # Needed as c_rehash wants to read the files directly. |
252 |
++ # This gets us from $CERTSCONF to $CERTSDIR. |
253 |
++ RELPATH="../../.." |
254 |
++ ROOT=$(readlink -f "$1");; |
255 |
+ --help|-h|*) |
256 |
+- echo "$0: [--verbose] [--fresh]" |
257 |
++ echo "$0: [--verbose] [--fresh] [--root <dir>]" |
258 |
+ exit;; |
259 |
+ esac |
260 |
+ shift |
261 |
+ done |
262 |
+ |
263 |
++CERTSCONF="$ROOT$CERTSCONF" |
264 |
++CERTSDIR="$ROOT$CERTSDIR" |
265 |
++LOCALCERTSDIR="$ROOT$LOCALCERTSDIR" |
266 |
++ETCCERTSDIR="$ROOT$ETCCERTSDIR" |
267 |
++HOOKSDIR="$ROOT$HOOKSDIR" |
268 |
++ |
269 |
+ if [ ! -s "$CERTSCONF" ] |
270 |
+ then |
271 |
+ fresh=1 |
272 |
+@@ -94,7 +107,7 @@ add() { |
273 |
+ -e 's/,/_/g').pem" |
274 |
+ if ! test -e "$PEM" || [ "$(readlink "$PEM")" != "$CERT" ] |
275 |
+ then |
276 |
+- ln -sf "$CERT" "$PEM" |
277 |
++ ln -sf "${RELPATH}${CERT#$ROOT}" "$PEM" |
278 |
+ echo "+$PEM" >> "$ADDED" |
279 |
+ fi |
280 |
+ # Add trailing newline to certificate, if it is missing (#635570) |