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