1 |
commit: bb3aa7f0bcd810f555dbc87a6ffa141fe6fe5f24 |
2 |
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Oct 15 14:32:46 2021 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Oct 15 14:33:05 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bb3aa7f0 |
7 |
|
8 |
app-misc/ca-certificates: bump NSS to v3.71 |
9 |
|
10 |
Package-Manager: Portage-3.0.28, Repoman-3.0.3 |
11 |
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org> |
12 |
|
13 |
app-misc/ca-certificates/Manifest | 1 + |
14 |
.../ca-certificates-20210119.3.71.ebuild | 189 +++++++++++++++++++++ |
15 |
2 files changed, 190 insertions(+) |
16 |
|
17 |
diff --git a/app-misc/ca-certificates/Manifest b/app-misc/ca-certificates/Manifest |
18 |
index f060e3b22cf..fbafdb1b077 100644 |
19 |
--- a/app-misc/ca-certificates/Manifest |
20 |
+++ b/app-misc/ca-certificates/Manifest |
21 |
@@ -1,4 +1,5 @@ |
22 |
DIST ca-certificates_20210119.tar.xz 232964 BLAKE2B 593352912d2b490e3f46ea032ac1ddf1c87a7ac93859d475461cbba490918cdec853b0bb30bb253a634d8d597ca6f0304bc81122b4b31b5b31fd6a80e1faaf33 SHA512 a824209fa0ff0865872a07d8e6b901d8407f599243810fd5c820e1f69226e05b0b4f1e25e5ff3d8d398ff952529084442f026e32220961f359f6323f6bf03373 |
23 |
DIST nss-3.66.tar.gz 82401896 BLAKE2B ae369899af681e1c6ea8046098c83da08c2112b16d85a0eaee46e9d4f97dfb3f7c3e97eb681ec947b5648446c6db51e8f1396ec9bb6c731c9678ecf925e7f743 SHA512 327129cb065a8c19246e081e3cbc4798c81dc52eab6ee366eade151e9d308990592075c52a7c672165725fd855a0c539d56a803c26ef066561c584d693e0e467 |
24 |
DIST nss-3.70.tar.gz 83917362 BLAKE2B 51de2e2cf5feb11045388b0badec24509d50f8bc8abd4116cbab77ff434f86a44ad4c98e533a1dd7093a9d1be9b7deb45f0426e3a173f9b2b92995cf63f2ea51 SHA512 9766282b36560d2f73ac5e90dbc3962802d6b1e8650ff9c0afbd6d2e1ff4cf8f2bc251f972344dc8a6ac5209b917aae03cc9883cb081011a7dea7bd258a95d82 |
25 |
+DIST nss-3.71.tar.gz 83927933 BLAKE2B a8d683b9f9bff5390e0378ab0d55156f7cc69a52b0667658738e67e920548965e7a276dc4104547b2e6a1a6d18325c3f85b955b9c12d7f071d10930b5264207e SHA512 a4a724dc4e8677965b6245ea2309790d31ec7719658e2b349eb67c9008082132c76277340d15e4fdd8d2fe1f560ae6803fb038d023c3dfd2e3772fa3b77720e2 |
26 |
DIST nss-cacert-class1-class3-r2.patch 21925 BLAKE2B 7627ff9a09f084c19d72d0490676865e3cab3ca7c920ae1ce4bea2db664f37fd0aa84fcda919809a516891ab2a62e2e7a43a9d6ada4c231adfe4c216525fac7d SHA512 1ce6ff9ab310aaca9005eafb461338b291df8523cc7044e096cd75774ce746c26eed19ec6bb2643c6c67f94650f2f309463492d80a90568f38ce2557f8ada2f4 |
27 |
|
28 |
diff --git a/app-misc/ca-certificates/ca-certificates-20210119.3.71.ebuild b/app-misc/ca-certificates/ca-certificates-20210119.3.71.ebuild |
29 |
new file mode 100644 |
30 |
index 00000000000..589797be280 |
31 |
--- /dev/null |
32 |
+++ b/app-misc/ca-certificates/ca-certificates-20210119.3.71.ebuild |
33 |
@@ -0,0 +1,189 @@ |
34 |
+# Copyright 1999-2021 Gentoo Authors |
35 |
+# Distributed under the terms of the GNU General Public License v2 |
36 |
+ |
37 |
+# The Debian ca-certificates package merely takes the CA database as it exists |
38 |
+# in the nss package and repackages it for use by openssl. |
39 |
+# |
40 |
+# The issue with using the compiled debs directly is two fold: |
41 |
+# - they do not update frequently enough for us to rely on them |
42 |
+# - they pull the CA database from nss tip of tree rather than the release |
43 |
+# |
44 |
+# So we take the Debian source tools and combine them with the latest nss |
45 |
+# release to produce (largely) the same end result. The difference is that |
46 |
+# now we know our cert database is kept in sync with nss and, if need be, |
47 |
+# can be sync with nss tip of tree more frequently to respond to bugs. |
48 |
+ |
49 |
+# When triaging user reports, refer to our wiki for tips: |
50 |
+# https://wiki.gentoo.org/wiki/Certificates#Debugging_certificate_issues |
51 |
+ |
52 |
+EAPI=7 |
53 |
+ |
54 |
+PYTHON_COMPAT=( python3_{7..10} ) |
55 |
+ |
56 |
+inherit python-any-r1 |
57 |
+ |
58 |
+if [[ ${PV} == *.* ]] ; then |
59 |
+ # Compile from source ourselves. |
60 |
+ PRECOMPILED=false |
61 |
+ |
62 |
+ DEB_VER=$(ver_cut 1) |
63 |
+ NSS_VER=$(ver_cut 2-) |
64 |
+ RTM_NAME="NSS_${NSS_VER//./_}_RTM" |
65 |
+else |
66 |
+ # Debian precompiled version. |
67 |
+ PRECOMPILED=true |
68 |
+ inherit unpacker |
69 |
+fi |
70 |
+ |
71 |
+DESCRIPTION="Common CA Certificates PEM files" |
72 |
+HOMEPAGE="https://packages.debian.org/sid/ca-certificates" |
73 |
+NMU_PR="" |
74 |
+if ${PRECOMPILED} ; then |
75 |
+ SRC_URI="mirror://debian/pool/main/c/${PN}/${PN}_${PV}${NMU_PR:++nmu}${NMU_PR}_all.deb" |
76 |
+else |
77 |
+ SRC_URI="mirror://debian/pool/main/c/${PN}/${PN}_${DEB_VER}${NMU_PR:++nmu}${NMU_PR}.tar.xz |
78 |
+ https://archive.mozilla.org/pub/security/nss/releases/${RTM_NAME}/src/nss-${NSS_VER}.tar.gz |
79 |
+ cacert? ( |
80 |
+ https://dev.gentoo.org/~whissi/dist/ca-certificates/nss-cacert-class1-class3-r2.patch |
81 |
+ )" |
82 |
+fi |
83 |
+ |
84 |
+LICENSE="MPL-1.1" |
85 |
+SLOT="0" |
86 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" |
87 |
+IUSE="" |
88 |
+${PRECOMPILED} || IUSE+=" cacert" |
89 |
+ |
90 |
+# c_rehash: we run `c_rehash` |
91 |
+# debianutils: we run `run-parts` |
92 |
+CDEPEND="app-misc/c_rehash |
93 |
+ sys-apps/debianutils" |
94 |
+ |
95 |
+BDEPEND="${CDEPEND}" |
96 |
+if ! ${PRECOMPILED} ; then |
97 |
+ BDEPEND+=" ${PYTHON_DEPS}" |
98 |
+fi |
99 |
+ |
100 |
+DEPEND="" |
101 |
+if ${PRECOMPILED} ; then |
102 |
+ DEPEND+=" !<sys-apps/portage-2.1.10.41" |
103 |
+fi |
104 |
+ |
105 |
+RDEPEND="${CDEPEND} |
106 |
+ ${DEPEND}" |
107 |
+ |
108 |
+S=${WORKDIR} |
109 |
+ |
110 |
+pkg_setup() { |
111 |
+ # For the conversion to having it in CONFIG_PROTECT_MASK, |
112 |
+ # we need to tell users about it once manually first. |
113 |
+ [[ -f "${EPREFIX}"/etc/env.d/98ca-certificates ]] \ |
114 |
+ || ewarn "You should run update-ca-certificates manually after etc-update" |
115 |
+} |
116 |
+ |
117 |
+src_unpack() { |
118 |
+ if ! ${PRECOMPILED} ; then |
119 |
+ default |
120 |
+ # Initial 20200601 deb release had bad naming inside the debian source tarball. |
121 |
+ DEB_S="${WORKDIR}/${PN}-${DEB_VER}" |
122 |
+ DEB_BAD_S="${WORKDIR}/work" |
123 |
+ if [[ -d "${DEB_BAD_S}" ]] && [[ ! -d "${DEB_S}" ]] ; then |
124 |
+ mv "${DEB_BAD_S}" "${DEB_S}" |
125 |
+ fi |
126 |
+ fi |
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}" || die |
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 || die |
140 |
+ cp -p "${S}"/${PN}-${DEB_VER}/sbin/update-ca-certificates \ |
141 |
+ usr/sbin/ || die |
142 |
+ |
143 |
+ if use cacert ; then |
144 |
+ pushd "${S}"/nss-${NSS_VER} >/dev/null || die |
145 |
+ eapply "${DISTDIR}"/nss-cacert-class1-class3-r2.patch |
146 |
+ popd >/dev/null || die |
147 |
+ fi |
148 |
+ fi |
149 |
+ |
150 |
+ default |
151 |
+ eapply -p2 "${FILESDIR}"/${PN}-20150426-root.patch |
152 |
+ local relp=$(echo "${EPREFIX}" | sed -e 's:[^/]\+:..:g') |
153 |
+ sed -i \ |
154 |
+ -e '/="$ROOT/s:ROOT:ROOT'"${EPREFIX}"':' \ |
155 |
+ -e '/RELPATH="\.\./s:"$:'"${relp}"'":' \ |
156 |
+ -e 's/openssl rehash/c_rehash/' \ |
157 |
+ usr/sbin/update-ca-certificates || die |
158 |
+} |
159 |
+ |
160 |
+src_compile() { |
161 |
+ cd "image/${EPREFIX}" || die |
162 |
+ if ! ${PRECOMPILED} ; then |
163 |
+ python_setup |
164 |
+ local d="${S}/${PN}-${DEB_VER}/mozilla" c="usr/share/${PN}" |
165 |
+ # Grab the database from the nss sources. |
166 |
+ cp "${S}"/nss-${NSS_VER}/nss/lib/ckfw/builtins/{certdata.txt,nssckbi.h} "${d}" || die |
167 |
+ emake -C "${d}" |
168 |
+ |
169 |
+ # Now move the files to the same places that the precompiled would. |
170 |
+ mkdir -p etc/ssl/certs \ |
171 |
+ etc/ca-certificates/update.d \ |
172 |
+ "${c}"/mozilla \ |
173 |
+ || die |
174 |
+ if use cacert ; then |
175 |
+ mkdir -p "${c}"/cacert.org || die |
176 |
+ mv "${d}"/CA_Cert_Signing_Authority.crt \ |
177 |
+ "${c}"/cacert.org/cacert.org_class1.crt || die |
178 |
+ mv "${d}"/CAcert_Class_3_Root.crt \ |
179 |
+ "${c}"/cacert.org/cacert.org_class3.crt || die |
180 |
+ fi |
181 |
+ mv "${d}"/*.crt "${c}"/mozilla/ || die |
182 |
+ else |
183 |
+ mv usr/share/doc/{ca-certificates,${PF}} || die |
184 |
+ fi |
185 |
+ |
186 |
+ ( |
187 |
+ echo "# Automatically generated by ${CATEGORY}/${PF}" |
188 |
+ echo "# $(date -u)" |
189 |
+ echo "# Do not edit." |
190 |
+ cd "${c}" || die |
191 |
+ find * -name '*.crt' | LC_ALL=C sort |
192 |
+ ) > etc/ca-certificates.conf |
193 |
+ |
194 |
+ sh usr/sbin/update-ca-certificates --root "${S}/image" || die |
195 |
+} |
196 |
+ |
197 |
+src_install() { |
198 |
+ cp -pPR image/* "${D}"/ || die |
199 |
+ if ! ${PRECOMPILED} ; then |
200 |
+ cd ${PN}-${DEB_VER} || die |
201 |
+ doman sbin/*.8 |
202 |
+ dodoc debian/README.* examples/ca-certificates-local/README |
203 |
+ fi |
204 |
+ |
205 |
+ echo 'CONFIG_PROTECT_MASK="/etc/ca-certificates.conf"' > 98ca-certificates |
206 |
+ doenvd 98ca-certificates |
207 |
+} |
208 |
+ |
209 |
+pkg_postinst() { |
210 |
+ if [[ -d "${EROOT}/usr/local/share/ca-certificates" ]] ; then |
211 |
+ # if the user has local certs, we need to rebuild again |
212 |
+ # to include their stuff in the db. |
213 |
+ # However it's too overzealous when the user has custom certs in place. |
214 |
+ # --fresh is to clean up dangling symlinks |
215 |
+ "${EROOT}"/usr/sbin/update-ca-certificates --root "${ROOT}" |
216 |
+ fi |
217 |
+ |
218 |
+ if [[ -n "$(find -L "${EROOT}"/etc/ssl/certs/ -type l)" ]] ; then |
219 |
+ ewarn "Removing the following broken symlinks:" |
220 |
+ ewarn "$(find -L "${EROOT}"/etc/ssl/certs/ -type l -printf '%p -> %l\n' -delete)" |
221 |
+ fi |
222 |
+} |