1 |
commit: 2509dda5a2185d54e3c190d9288494e8d0df563d |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Oct 5 07:53:20 2016 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Oct 5 07:53:54 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2509dda5 |
7 |
|
8 |
app-misc/ca-certificates: Removed old. |
9 |
|
10 |
Package-Manager: portage-2.3.1 |
11 |
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org> |
12 |
|
13 |
.../ca-certificates-20160104.3.21.ebuild | 181 --------------------- |
14 |
1 file changed, 181 deletions(-) |
15 |
|
16 |
diff --git a/app-misc/ca-certificates/ca-certificates-20160104.3.21.ebuild b/app-misc/ca-certificates/ca-certificates-20160104.3.21.ebuild |
17 |
deleted file mode 100644 |
18 |
index 3371dc7..00000000 |
19 |
--- a/app-misc/ca-certificates/ca-certificates-20160104.3.21.ebuild |
20 |
+++ /dev/null |
21 |
@@ -1,181 +0,0 @@ |
22 |
-# Copyright 1999-2015 Gentoo Foundation |
23 |
-# Distributed under the terms of the GNU General Public License v2 |
24 |
-# $Id$ |
25 |
- |
26 |
-# The Debian ca-certificates package merely takes the CA database as it exists |
27 |
-# in the nss package and repackages it for use by openssl. |
28 |
-# |
29 |
-# The issue with using the compiled debs directly is two fold: |
30 |
-# - they do not update frequently enough for us to rely on them |
31 |
-# - they pull the CA database from nss tip of tree rather than the release |
32 |
-# |
33 |
-# So we take the Debian source tools and combine them with the latest nss |
34 |
-# release to produce (largely) the same end result. The difference is that |
35 |
-# now we know our cert database is kept in sync with nss and, if need be, |
36 |
-# can be sync with nss tip of tree more frequently to respond to bugs. |
37 |
- |
38 |
-# When triaging bugs from users, here's some handy tips: |
39 |
-# - To see what cert is hitting errors, use openssl: |
40 |
-# openssl s_client -port 443 -CApath /etc/ssl/certs/ -host $HOSTNAME |
41 |
-# Focus on the errors written to stderr. |
42 |
-# |
43 |
-# - Look at the upstream log as to why certs were added/removed: |
44 |
-# https://hg.mozilla.org/projects/nss/log/tip/lib/ckfw/builtins/certdata.txt |
45 |
-# |
46 |
-# - If people want to add/remove certs, tell them to file w/mozilla: |
47 |
-# https://bugzilla.mozilla.org/enter_bug.cgi?product=NSS&component=CA%20Certificates&version=trunk |
48 |
- |
49 |
-EAPI="4" |
50 |
-PYTHON_COMPAT=( python{2_7,3_3,3_4,3_5} ) |
51 |
- |
52 |
-inherit eutils python-any-r1 |
53 |
- |
54 |
-if [[ ${PV} == *.* ]] ; then |
55 |
- # Compile from source ourselves. |
56 |
- PRECOMPILED=false |
57 |
- inherit versionator |
58 |
- |
59 |
- DEB_VER=$(get_version_component_range 1) |
60 |
- NSS_VER=$(get_version_component_range 2-) |
61 |
- RTM_NAME="NSS_${NSS_VER//./_}_RTM" |
62 |
-else |
63 |
- # Debian precompiled version. |
64 |
- PRECOMPILED=true |
65 |
- inherit unpacker |
66 |
-fi |
67 |
- |
68 |
-DESCRIPTION="Common CA Certificates PEM files" |
69 |
-HOMEPAGE="http://packages.debian.org/sid/ca-certificates" |
70 |
-NMU_PR="" |
71 |
-if ${PRECOMPILED} ; then |
72 |
- SRC_URI="mirror://debian/pool/main/c/${PN}/${PN}_${PV}${NMU_PR:++nmu}${NMU_PR}_all.deb" |
73 |
-else |
74 |
- SRC_URI="mirror://debian/pool/main/c/${PN}/${PN}_${DEB_VER}${NMU_PR:++nmu}${NMU_PR}.tar.xz |
75 |
- ftp://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/${RTM_NAME}/src/nss-${NSS_VER}.tar.gz |
76 |
- cacert? ( https://dev.gentoo.org/~anarchy/patches/nss-3.14.1-add_spi+cacerts_ca_certs.patch )" |
77 |
-fi |
78 |
- |
79 |
-LICENSE="MPL-1.1" |
80 |
-SLOT="0" |
81 |
-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" |
82 |
-IUSE="" |
83 |
-${PRECOMPILED} || IUSE+=" +cacert" |
84 |
- |
85 |
-DEPEND="" |
86 |
-if ${PRECOMPILED} ; then |
87 |
- DEPEND+=" !<sys-apps/portage-2.1.10.41" |
88 |
-fi |
89 |
-# c_rehash: we run `c_rehash`; newer version for alt-cert-paths #552540 |
90 |
-# debianutils: we run `run-parts` |
91 |
-RDEPEND="${DEPEND} |
92 |
- >=app-misc/c_rehash-1.7-r1 |
93 |
- sys-apps/debianutils" |
94 |
- |
95 |
-if ! ${PRECOMPILED}; then |
96 |
- DEPEND+=" ${PYTHON_DEPS}" |
97 |
-fi |
98 |
- |
99 |
-S=${WORKDIR} |
100 |
- |
101 |
-pkg_setup() { |
102 |
- # For the conversion to having it in CONFIG_PROTECT_MASK, |
103 |
- # we need to tell users about it once manually first. |
104 |
- [[ -f "${EPREFIX}"/etc/env.d/98ca-certificates ]] \ |
105 |
- || ewarn "You should run update-ca-certificates manually after etc-update" |
106 |
-} |
107 |
- |
108 |
-src_unpack() { |
109 |
- ${PRECOMPILED} || default |
110 |
- |
111 |
- # Do all the work in the image subdir to avoid conflicting with source |
112 |
- # dirs in $WORKDIR. Need to perform everything in the offset #381937 |
113 |
- mkdir -p "image/${EPREFIX}" |
114 |
- cd "image/${EPREFIX}" || die |
115 |
- |
116 |
- ${PRECOMPILED} && unpacker_src_unpack |
117 |
-} |
118 |
- |
119 |
-src_prepare() { |
120 |
- cd "image/${EPREFIX}" || die |
121 |
- if ! ${PRECOMPILED} ; then |
122 |
- mkdir -p usr/sbin |
123 |
- cp -p "${S}"/${PN}/sbin/update-ca-certificates usr/sbin/ || die |
124 |
- |
125 |
- if use cacert ; then |
126 |
- pushd "${S}"/nss-${NSS_VER} >/dev/null |
127 |
- epatch "${DISTDIR}"/nss-3.14.1-add_spi+cacerts_ca_certs.patch |
128 |
- popd >/dev/null |
129 |
- fi |
130 |
- fi |
131 |
- |
132 |
- epatch "${FILESDIR}"/${PN}-20150426-root.patch |
133 |
- local relp=$(echo "${EPREFIX}" | sed -e 's:[^/]\+:..:g') |
134 |
- sed -i \ |
135 |
- -e '/="$ROOT/s:ROOT:ROOT'"${EPREFIX}"':' \ |
136 |
- -e '/RELPATH="\.\./s:"$:'"${relp}"'":' \ |
137 |
- usr/sbin/update-ca-certificates || die |
138 |
-} |
139 |
- |
140 |
-src_compile() { |
141 |
- cd "image/${EPREFIX}" || die |
142 |
- if ! ${PRECOMPILED} ; then |
143 |
- python_setup |
144 |
- local d="${S}/${PN}/mozilla" |
145 |
- # Grab the database from the nss sources. |
146 |
- cp "${S}"/nss-${NSS_VER}/nss/lib/ckfw/builtins/{certdata.txt,nssckbi.h} "${d}" || die |
147 |
- emake -C "${d}" |
148 |
- |
149 |
- # Now move the files to the same places that the precompiled would. |
150 |
- mkdir -p etc/ssl/certs etc/ca-certificates/update.d usr/share/ca-certificates/mozilla |
151 |
- if use cacert ; then |
152 |
- mkdir -p usr/share/ca-certificates/{cacert.org,spi-inc.org} |
153 |
- mv "${d}"/CAcert_Inc..crt usr/share/ca-certificates/cacert.org/cacert.org_root.crt || die |
154 |
- mv "${d}"/SPI_Inc..crt usr/share/ca-certificates/spi-inc.org/spi-cacert-2008.crt || die |
155 |
- fi |
156 |
- mv "${d}"/*.crt usr/share/ca-certificates/mozilla/ || die |
157 |
- else |
158 |
- mv usr/share/doc/{ca-certificates,${PF}} || die |
159 |
- fi |
160 |
- |
161 |
- ( |
162 |
- echo "# Automatically generated by ${CATEGORY}/${PF}" |
163 |
- echo "# $(date -u)" |
164 |
- echo "# Do not edit." |
165 |
- cd usr/share/ca-certificates |
166 |
- find * -name '*.crt' | LC_ALL=C sort |
167 |
- ) > etc/ca-certificates.conf |
168 |
- |
169 |
- sh usr/sbin/update-ca-certificates --root "${S}/image" || die |
170 |
-} |
171 |
- |
172 |
-src_install() { |
173 |
- cp -pPR image/* "${D}"/ || die |
174 |
- if ! ${PRECOMPILED} ; then |
175 |
- cd ca-certificates |
176 |
- doman sbin/*.8 |
177 |
- dodoc debian/README.* examples/ca-certificates-local/README |
178 |
- fi |
179 |
- |
180 |
- echo 'CONFIG_PROTECT_MASK="/etc/ca-certificates.conf"' > 98ca-certificates |
181 |
- doenvd 98ca-certificates |
182 |
-} |
183 |
- |
184 |
-pkg_postinst() { |
185 |
- if [ -d "${EROOT}/usr/local/share/ca-certificates" ] ; then |
186 |
- # if the user has local certs, we need to rebuild again |
187 |
- # to include their stuff in the db. |
188 |
- # However it's too overzealous when the user has custom certs in place. |
189 |
- # --fresh is to clean up dangling symlinks |
190 |
- "${EROOT}"/usr/sbin/update-ca-certificates --root "${ROOT}" |
191 |
- fi |
192 |
- |
193 |
- local c badcerts=0 |
194 |
- for c in $(find -L "${EROOT}"etc/ssl/certs/ -type l) ; do |
195 |
- ewarn "Broken symlink for a certificate at $c" |
196 |
- badcerts=1 |
197 |
- done |
198 |
- if [ ${badcerts} -eq 1 ]; then |
199 |
- ewarn "Removing the following broken symlinks:" |
200 |
- ewarn "$(find -L "${EROOT}"/etc/ssl/certs/ -type l -printf '%p -> %l\n' -delete)" |
201 |
- fi |
202 |
-} |