Gentoo Archives: gentoo-commits

From: Quentin Retornaz <gentoo@××××××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/libressl:master commit in: app-crypt/sbsigntools/, app-crypt/sbsigntools/files/
Date: Sun, 03 Jul 2022 17:47:35
Message-Id: 1656870419.f5a727dda0d2bb9c7653530fa7dee5ca54b96c17.quentin@gentoo
1 commit: f5a727dda0d2bb9c7653530fa7dee5ca54b96c17
2 Author: orbea <orbea <AT> riseup <DOT> net>
3 AuthorDate: Sat Jul 2 23:22:44 2022 +0000
4 Commit: Quentin Retornaz <gentoo <AT> retornaz <DOT> com>
5 CommitDate: Sun Jul 3 17:46:59 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=f5a727dd
7
8 app-crypt/sbsigntools: Remove package
9
10 Works with libressl-3.5.x and sbsigntools-0.9.4::gentoo.
11
12 Signed-off-by: orbea <orbea <AT> riseup.net>
13 Signed-off-by: Quentin Retornaz <gentoo <AT> retornaz.com>
14
15 app-crypt/sbsigntools/Manifest | 2 -
16 .../sbsigntools-0.9.1-openssl-1.1.0-compat.patch | 152 -------------------
17 .../files/sbsigntools-0.9.2-libressl.patch | 161 ---------------------
18 app-crypt/sbsigntools/metadata.xml | 10 --
19 app-crypt/sbsigntools/sbsigntools-0.9.2.ebuild | 48 ------
20 5 files changed, 373 deletions(-)
21
22 diff --git a/app-crypt/sbsigntools/Manifest b/app-crypt/sbsigntools/Manifest
23 deleted file mode 100644
24 index 564b3aa..0000000
25 --- a/app-crypt/sbsigntools/Manifest
26 +++ /dev/null
27 @@ -1,2 +0,0 @@
28 -DIST sbsigntool-0.8-ccan.tar.gz 113537 BLAKE2B 8fbf27463d30c1895930628a145be2d521ae4f6adb7af3299bf2f5f4319fd643df0a07347ef6851bd41d233af4c3fc5f77002771af1c43aa0f20665aef2390b8 SHA512 6857096879f116f1802eb6b44789cbea7bb24440bc0f16503aeadf5f276fa45943f322f844dbb9abee717655205d82b830143be3a7f4424fd4146b9360674a09
29 -DIST sbsigntools-0.9.2.tar.gz 56525 BLAKE2B 0bce1f534aa960672eab6a415e287b79ff9f18eb947e2217ad4533081f8b854e160b57828afbb56423b2dcab723d3a8aacb2e6affeb2057d17ce3c1761d96b11 SHA512 060753ed9c8db794e4755cc66c1940a2ccc89f4ddf0e825da1f1e6eaa75fc67c21060ee4b5dfb0c757b69e6f5959bfa68156d9f95a945cf63c6a20f1414a2c27
30
31 diff --git a/app-crypt/sbsigntools/files/sbsigntools-0.9.1-openssl-1.1.0-compat.patch b/app-crypt/sbsigntools/files/sbsigntools-0.9.1-openssl-1.1.0-compat.patch
32 deleted file mode 100644
33 index 2f9364f..0000000
34 --- a/app-crypt/sbsigntools/files/sbsigntools-0.9.1-openssl-1.1.0-compat.patch
35 +++ /dev/null
36 @@ -1,152 +0,0 @@
37 -diff --git a/src/fileio.c b/src/fileio.c
38 -index 032eb1e..09bc3aa 100644
39 ---- a/src/fileio.c
40 -+++ b/src/fileio.c
41 -@@ -40,6 +40,7 @@
42 - #include <openssl/pem.h>
43 - #include <openssl/err.h>
44 - #include <openssl/engine.h>
45 -+#include <openssl/ui.h>
46 -
47 - #include <ccan/talloc/talloc.h>
48 - #include <ccan/read_write_all/read_write_all.h>
49 -diff --git a/src/idc.c b/src/idc.c
50 -index 236cefd..6d87bd4 100644
51 ---- a/src/idc.c
52 -+++ b/src/idc.c
53 -@@ -238,7 +238,11 @@ struct idc *IDC_get(PKCS7 *p7, BIO *bio)
54 -
55 - /* extract the idc from the signed PKCS7 'other' data */
56 - str = p7->d.sign->contents->d.other->value.asn1_string;
57 -+#if OPENSSL_VERSION_NUMBER < 0x10100000L
58 - idcbuf = buf = ASN1_STRING_data(str);
59 -+#else
60 -+ idcbuf = buf = ASN1_STRING_get0_data(str);
61 -+#endif
62 - idc = d2i_IDC(NULL, &buf, ASN1_STRING_length(str));
63 -
64 - /* If we were passed a BIO, write the idc data, minus type and length,
65 -@@ -289,7 +293,11 @@ int IDC_check_hash(struct idc *idc, struct image *image)
66 - }
67 -
68 - /* check hash against the one we calculated from the image */
69 -+#if OPENSSL_VERSION_NUMBER < 0x10100000L
70 - buf = ASN1_STRING_data(str);
71 -+#else
72 -+ buf = ASN1_STRING_get0_data(str);
73 -+#endif
74 - if (memcmp(buf, sha, sizeof(sha))) {
75 - fprintf(stderr, "Hash doesn't match image\n");
76 - fprintf(stderr, " got: %s\n", sha256_str(buf));
77 -diff --git a/src/sbattach.c b/src/sbattach.c
78 -index a0c01b8..e89a23e 100644
79 ---- a/src/sbattach.c
80 -+++ b/src/sbattach.c
81 -@@ -231,6 +231,7 @@ int main(int argc, char **argv)
82 - return EXIT_FAILURE;
83 - }
84 -
85 -+#if OPENSSL_VERSION_NUMBER < 0x10100000L
86 - ERR_load_crypto_strings();
87 - OpenSSL_add_all_digests();
88 - OPENSSL_config(NULL);
89 -@@ -239,6 +240,7 @@ int main(int argc, char **argv)
90 - * module isn't present). In either case ignore the errors
91 - * (malloc will cause other failures out lower down */
92 - ERR_clear_error();
93 -+#endif
94 -
95 - image = image_load(image_filename);
96 - if (!image) {
97 -diff --git a/src/sbkeysync.c b/src/sbkeysync.c
98 -index 7b17f40..419b1e7 100644
99 ---- a/src/sbkeysync.c
100 -+++ b/src/sbkeysync.c
101 -@@ -208,7 +208,11 @@ static int x509_key_parse(struct key *key, uint8_t *data, size_t len)
102 - goto out;
103 -
104 - key->id_len = ASN1_STRING_length(serial);
105 -+#if OPENSSL_VERSION_NUMBER < 0x10100000L
106 - key->id = talloc_memdup(key, ASN1_STRING_data(serial), key->id_len);
107 -+#else
108 -+ key->id = talloc_memdup(key, ASN1_STRING_get0_data(serial), key->id_len);
109 -+#endif
110 -
111 - key->description = talloc_array(key, char, description_len);
112 - X509_NAME_oneline(X509_get_subject_name(x509),
113 -@@ -927,6 +931,7 @@ int main(int argc, char **argv)
114 - return EXIT_FAILURE;
115 - }
116 -
117 -+#if OPENSSL_VERSION_NUMBER < 0x10100000L
118 - ERR_load_crypto_strings();
119 - OpenSSL_add_all_digests();
120 - OpenSSL_add_all_ciphers();
121 -@@ -936,6 +941,7 @@ int main(int argc, char **argv)
122 - * module isn't present). In either case ignore the errors
123 - * (malloc will cause other failures out lower down */
124 - ERR_clear_error();
125 -+#endif
126 -
127 - ctx->filesystem_keys = init_keyset(ctx);
128 - ctx->firmware_keys = init_keyset(ctx);
129 -diff --git a/src/sbsign.c b/src/sbsign.c
130 -index ff1fdfd..78d8d64 100644
131 ---- a/src/sbsign.c
132 -+++ b/src/sbsign.c
133 -@@ -188,6 +188,7 @@ int main(int argc, char **argv)
134 -
135 - talloc_steal(ctx, ctx->image);
136 -
137 -+#if OPENSSL_VERSION_NUMBER < 0x10100000L
138 - ERR_load_crypto_strings();
139 - OpenSSL_add_all_digests();
140 - OpenSSL_add_all_ciphers();
141 -@@ -197,6 +198,7 @@ int main(int argc, char **argv)
142 - * module isn't present). In either case ignore the errors
143 - * (malloc will cause other failures out lower down */
144 - ERR_clear_error();
145 -+#endif
146 - if (engine)
147 - pkey = fileio_read_engine_key(engine, keyfilename);
148 - else
149 -diff --git a/src/sbvarsign.c b/src/sbvarsign.c
150 -index 7dcbe51..9319c8b 100644
151 ---- a/src/sbvarsign.c
152 -+++ b/src/sbvarsign.c
153 -@@ -509,6 +509,7 @@ int main(int argc, char **argv)
154 - return EXIT_FAILURE;
155 - }
156 -
157 -+#if OPENSSL_VERSION_NUMBER < 0x10100000L
158 - /* initialise openssl */
159 - OpenSSL_add_all_digests();
160 - OpenSSL_add_all_ciphers();
161 -@@ -519,6 +520,7 @@ int main(int argc, char **argv)
162 - * module isn't present). In either case ignore the errors
163 - * (malloc will cause other failures out lower down */
164 - ERR_clear_error();
165 -+#endif
166 -
167 - /* set up the variable signing context */
168 - varname = argv[optind];
169 -diff --git a/src/sbverify.c b/src/sbverify.c
170 -index 3920d91..d0b203a 100644
171 ---- a/src/sbverify.c
172 -+++ b/src/sbverify.c
173 -@@ -250,6 +250,7 @@ int main(int argc, char **argv)
174 - verbose = false;
175 - detached_sig_filename = NULL;
176 -
177 -+#if OPENSSL_VERSION_NUMBER < 0x10100000L
178 - OpenSSL_add_all_digests();
179 - ERR_load_crypto_strings();
180 - OPENSSL_config(NULL);
181 -@@ -258,6 +259,7 @@ int main(int argc, char **argv)
182 - * module isn't present). In either case ignore the errors
183 - * (malloc will cause other failures out lower down */
184 - ERR_clear_error();
185 -+#endif
186 -
187 - for (;;) {
188 - int idx;
189
190 diff --git a/app-crypt/sbsigntools/files/sbsigntools-0.9.2-libressl.patch b/app-crypt/sbsigntools/files/sbsigntools-0.9.2-libressl.patch
191 deleted file mode 100644
192 index 226f7fd..0000000
193 --- a/app-crypt/sbsigntools/files/sbsigntools-0.9.2-libressl.patch
194 +++ /dev/null
195 @@ -1,161 +0,0 @@
196 -diff --git a/src/fileio.c b/src/fileio.c
197 -index 032eb1e..09bc3aa 100644
198 ---- a/src/fileio.c
199 -+++ b/src/fileio.c
200 -@@ -40,6 +40,7 @@
201 - #include <openssl/pem.h>
202 - #include <openssl/err.h>
203 - #include <openssl/engine.h>
204 -+#include <openssl/ui.h>
205 -
206 - #include <ccan/talloc/talloc.h>
207 - #include <ccan/read_write_all/read_write_all.h>
208 -diff --git a/src/idc.c b/src/idc.c
209 -index 236cefd..18c670a 100644
210 ---- a/src/idc.c
211 -+++ b/src/idc.c
212 -@@ -238,7 +238,11 @@ struct idc *IDC_get(PKCS7 *p7, BIO *bio)
213 -
214 - /* extract the idc from the signed PKCS7 'other' data */
215 - str = p7->d.sign->contents->d.other->value.asn1_string;
216 -+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
217 - idcbuf = buf = ASN1_STRING_data(str);
218 -+#else
219 -+ idcbuf = buf = ASN1_STRING_get0_data(str);
220 -+#endif
221 - idc = d2i_IDC(NULL, &buf, ASN1_STRING_length(str));
222 -
223 - /* If we were passed a BIO, write the idc data, minus type and length,
224 -@@ -289,7 +293,11 @@ int IDC_check_hash(struct idc *idc, struct image *image)
225 - }
226 -
227 - /* check hash against the one we calculated from the image */
228 -+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
229 - buf = ASN1_STRING_data(str);
230 -+#else
231 -+ buf = ASN1_STRING_get0_data(str);
232 -+#endif
233 - if (memcmp(buf, sha, sizeof(sha))) {
234 - fprintf(stderr, "Hash doesn't match image\n");
235 - fprintf(stderr, " got: %s\n", sha256_str(buf));
236 -diff --git a/src/sbattach.c b/src/sbattach.c
237 -index a0c01b8..fe5a18e 100644
238 ---- a/src/sbattach.c
239 -+++ b/src/sbattach.c
240 -@@ -231,6 +231,7 @@ int main(int argc, char **argv)
241 - return EXIT_FAILURE;
242 - }
243 -
244 -+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
245 - ERR_load_crypto_strings();
246 - OpenSSL_add_all_digests();
247 - OPENSSL_config(NULL);
248 -@@ -239,6 +240,7 @@ int main(int argc, char **argv)
249 - * module isn't present). In either case ignore the errors
250 - * (malloc will cause other failures out lower down */
251 - ERR_clear_error();
252 -+#endif
253 -
254 - image = image_load(image_filename);
255 - if (!image) {
256 -diff --git a/src/sbkeysync.c b/src/sbkeysync.c
257 -index 7b17f40..753ca52 100644
258 ---- a/src/sbkeysync.c
259 -+++ b/src/sbkeysync.c
260 -@@ -208,7 +208,11 @@ static int x509_key_parse(struct key *key, uint8_t *data, size_t len)
261 - goto out;
262 -
263 - key->id_len = ASN1_STRING_length(serial);
264 -+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
265 - key->id = talloc_memdup(key, ASN1_STRING_data(serial), key->id_len);
266 -+#else
267 -+ key->id = talloc_memdup(key, ASN1_STRING_get0_data(serial), key->id_len);
268 -+#endif
269 -
270 - key->description = talloc_array(key, char, description_len);
271 - X509_NAME_oneline(X509_get_subject_name(x509),
272 -@@ -927,6 +931,7 @@ int main(int argc, char **argv)
273 - return EXIT_FAILURE;
274 - }
275 -
276 -+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
277 - ERR_load_crypto_strings();
278 - OpenSSL_add_all_digests();
279 - OpenSSL_add_all_ciphers();
280 -@@ -936,6 +941,7 @@ int main(int argc, char **argv)
281 - * module isn't present). In either case ignore the errors
282 - * (malloc will cause other failures out lower down */
283 - ERR_clear_error();
284 -+#endif
285 -
286 - ctx->filesystem_keys = init_keyset(ctx);
287 - ctx->firmware_keys = init_keyset(ctx);
288 -diff --git a/src/sbsign.c b/src/sbsign.c
289 -index ff1fdfd..5754113 100644
290 ---- a/src/sbsign.c
291 -+++ b/src/sbsign.c
292 -@@ -188,6 +188,7 @@ int main(int argc, char **argv)
293 -
294 - talloc_steal(ctx, ctx->image);
295 -
296 -+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
297 - ERR_load_crypto_strings();
298 - OpenSSL_add_all_digests();
299 - OpenSSL_add_all_ciphers();
300 -@@ -197,6 +198,7 @@ int main(int argc, char **argv)
301 - * module isn't present). In either case ignore the errors
302 - * (malloc will cause other failures out lower down */
303 - ERR_clear_error();
304 -+#endif
305 - if (engine)
306 - pkey = fileio_read_engine_key(engine, keyfilename);
307 - else
308 -diff --git a/src/sbvarsign.c b/src/sbvarsign.c
309 -index ebf625c..43a1a61 100644
310 ---- a/src/sbvarsign.c
311 -+++ b/src/sbvarsign.c
312 -@@ -509,6 +509,7 @@ int main(int argc, char **argv)
313 - return EXIT_FAILURE;
314 - }
315 -
316 -+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
317 - /* initialise openssl */
318 - OpenSSL_add_all_digests();
319 - OpenSSL_add_all_ciphers();
320 -@@ -519,6 +520,7 @@ int main(int argc, char **argv)
321 - * module isn't present). In either case ignore the errors
322 - * (malloc will cause other failures out lower down */
323 - ERR_clear_error();
324 -+#endif
325 -
326 - /* set up the variable signing context */
327 - varname = argv[optind];
328 -diff --git a/src/sbverify.c b/src/sbverify.c
329 -index 3920d91..3d9c0a1 100644
330 ---- a/src/sbverify.c
331 -+++ b/src/sbverify.c
332 -@@ -56,7 +56,7 @@
333 - #include <openssl/pem.h>
334 - #include <openssl/x509v3.h>
335 -
336 --#if OPENSSL_VERSION_NUMBER < 0x10100000L
337 -+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
338 - #define X509_OBJECT_get0_X509(obj) ((obj)->data.x509)
339 - #define X509_OBJECT_get_type(obj) ((obj)->type)
340 - #define X509_STORE_CTX_get0_cert(ctx) ((ctx)->cert)
341 -@@ -250,6 +250,7 @@ int main(int argc, char **argv)
342 - verbose = false;
343 - detached_sig_filename = NULL;
344 -
345 -+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
346 - OpenSSL_add_all_digests();
347 - ERR_load_crypto_strings();
348 - OPENSSL_config(NULL);
349 -@@ -258,6 +259,7 @@ int main(int argc, char **argv)
350 - * module isn't present). In either case ignore the errors
351 - * (malloc will cause other failures out lower down */
352 - ERR_clear_error();
353 -+#endif
354 -
355 - for (;;) {
356 - int idx;
357
358 diff --git a/app-crypt/sbsigntools/metadata.xml b/app-crypt/sbsigntools/metadata.xml
359 deleted file mode 100644
360 index 20001d6..0000000
361 --- a/app-crypt/sbsigntools/metadata.xml
362 +++ /dev/null
363 @@ -1,10 +0,0 @@
364 -<?xml version="1.0" encoding="UTF-8"?>
365 -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
366 -<pkgmetadata>
367 - <maintainer type="person">
368 - <email>tamiko@g.o</email>
369 - </maintainer>
370 - <upstream>
371 - <remote-id type="launchpad">ubuntu</remote-id>
372 - </upstream>
373 -</pkgmetadata>
374
375 diff --git a/app-crypt/sbsigntools/sbsigntools-0.9.2.ebuild b/app-crypt/sbsigntools/sbsigntools-0.9.2.ebuild
376 deleted file mode 100644
377 index 92c0ab7..0000000
378 --- a/app-crypt/sbsigntools/sbsigntools-0.9.2.ebuild
379 +++ /dev/null
380 @@ -1,48 +0,0 @@
381 -# Copyright 1999-2021 Gentoo Authors
382 -# Distributed under the terms of the GNU General Public License v2
383 -
384 -EAPI="7"
385 -
386 -MY_PN="${PN::-1}"
387 -
388 -inherit autotools toolchain-funcs
389 -
390 -DESCRIPTION="Utilities for signing and verifying files for UEFI Secure Boot"
391 -HOMEPAGE="https://git.kernel.org/cgit/linux/kernel/git/jejb/sbsigntools.git/"
392 -SRC_URI="https://git.kernel.org/pub/scm/linux/kernel/git/jejb/${PN}.git/snapshot/${P}.tar.gz
393 - https://dev.gentoo.org/~tamiko/distfiles/${MY_PN}-0.8-ccan.tar.gz"
394 -
395 -LICENSE="GPL-3 LGPL-3 LGPL-2.1 CC0-1.0"
396 -SLOT="0"
397 -KEYWORDS="amd64 ~arm64 x86"
398 -IUSE=""
399 -
400 -RDEPEND="
401 - dev-libs/openssl:0=
402 - sys-apps/util-linux"
403 -DEPEND="${RDEPEND}
404 - sys-apps/help2man
405 - sys-boot/gnu-efi
406 - sys-libs/binutils-libs
407 - virtual/pkgconfig"
408 -
409 -src_prepare() {
410 - eapply "${FILESDIR}"/"${P}"-libressl.patch
411 - mv "${WORKDIR}"/lib/ccan "${S}"/lib || die "mv failed"
412 - rmdir "${WORKDIR}"/lib || die "rmdir failed"
413 -
414 - local iarch
415 - case ${ARCH} in
416 - amd64) iarch=x86_64 ;;
417 - arm64) iarch=aarch64 ;;
418 - ia64) iarch=ia64 ;;
419 - x86) iarch=ia32 ;;
420 - *) die "unsupported architecture: ${ARCH}" ;;
421 - esac
422 - sed -i "/^EFI_ARCH=/s:=.*:=${iarch}:" configure.ac || die
423 - sed -i 's/-m64$/& -march=x86-64/' tests/Makefile.am || die
424 - sed -i "/^AR /s:=.*:= $(tc-getAR):" lib/ccan/Makefile.in || die #481480
425 -
426 - default
427 - eautoreconf
428 -}