1 |
commit: 233901ffcd714b9444c25b00f616cbf7786492f5 |
2 |
Author: orbea <orbea <AT> riseup <DOT> net> |
3 |
AuthorDate: Fri Jul 1 13:43:55 2022 +0000 |
4 |
Commit: Quentin Retornaz <gentoo <AT> retornaz <DOT> com> |
5 |
CommitDate: Sat Jul 2 21:58:43 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=233901ff |
7 |
|
8 |
net-wireless/crda: Removed |
9 |
|
10 |
The ebuild from ::gentoo should work with libressl 3.5.x. |
11 |
|
12 |
Closes: https://github.com/gentoo/libressl/issues/427 |
13 |
Signed-off-by: orbea <orbea <AT> riseup.net> |
14 |
Closes: https://github.com/gentoo/libressl/pull/428 |
15 |
Signed-off-by: Quentin Retornaz <gentoo <AT> retornaz.com> |
16 |
|
17 |
net-wireless/crda/Manifest | 1 - |
18 |
net-wireless/crda/crda-4.14.ebuild | 81 ------ |
19 |
.../crda/files/crda-4.14-do-not-compress-doc.patch | 36 --- |
20 |
.../crda-4.14-openssl-1.1.0-compatibility.patch | 314 --------------------- |
21 |
net-wireless/crda/files/crda-4.14-python-3.patch | 95 ------- |
22 |
net-wireless/crda/files/crda-cflags.patch | 33 --- |
23 |
net-wireless/crda/files/crda-ldflags.patch | 11 - |
24 |
net-wireless/crda/files/crda-libreg-link.patch | 30 -- |
25 |
net-wireless/crda/files/crda-libressl.patch | 11 - |
26 |
net-wireless/crda/files/crda-no-ldconfig.patch | 28 -- |
27 |
net-wireless/crda/files/crda-no-werror.patch | 32 --- |
28 |
net-wireless/crda/metadata.xml | 11 - |
29 |
12 files changed, 683 deletions(-) |
30 |
|
31 |
diff --git a/net-wireless/crda/Manifest b/net-wireless/crda/Manifest |
32 |
deleted file mode 100644 |
33 |
index ea58350..0000000 |
34 |
--- a/net-wireless/crda/Manifest |
35 |
+++ /dev/null |
36 |
@@ -1 +0,0 @@ |
37 |
-DIST crda-4.14.tar.gz 72753 BLAKE2B 79e96bc41103eb221d841c74081c2abf507c46ae7790d5d8201dbc49260bc833630b95f74da5500817e07f1b4108713867071bd82ecc4c46d202d1e0ea865675 SHA512 0d52cf62589ec2debfd66de95b82b03a1c15048d8425cf5ef43c3e1f51ce1311a6d898fd5f69badcceb3181d35c836db197c6f070654dab351b01e96a1dd1053 |
38 |
|
39 |
diff --git a/net-wireless/crda/crda-4.14.ebuild b/net-wireless/crda/crda-4.14.ebuild |
40 |
deleted file mode 100644 |
41 |
index fe6e080..0000000 |
42 |
--- a/net-wireless/crda/crda-4.14.ebuild |
43 |
+++ /dev/null |
44 |
@@ -1,81 +0,0 @@ |
45 |
-# Copyright 1999-2021 Gentoo Authors |
46 |
-# Distributed under the terms of the GNU General Public License v2 |
47 |
- |
48 |
-EAPI=7 |
49 |
- |
50 |
-PYTHON_COMPAT=( python3_{6..9} ) |
51 |
-inherit toolchain-funcs python-any-r1 udev |
52 |
- |
53 |
-DESCRIPTION="Central Regulatory Domain Agent for wireless networks" |
54 |
-HOMEPAGE="https://wireless.wiki.kernel.org/en/developers/regulatory/crda" |
55 |
-SRC_URI="https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/crda.git/snapshot/${P}.tar.gz" |
56 |
- |
57 |
-LICENSE="ISC" |
58 |
-SLOT="0" |
59 |
-KEYWORDS="~alpha amd64 arm arm64 ~ia64 ~mips ppc ppc64 sparc x86" |
60 |
-IUSE="gcrypt" |
61 |
- |
62 |
-RDEPEND="!gcrypt? ( dev-libs/openssl:0= ) |
63 |
- gcrypt? ( dev-libs/libgcrypt:0= ) |
64 |
- dev-libs/libnl:3 |
65 |
- net-wireless/wireless-regdb" |
66 |
-DEPEND="${RDEPEND}" |
67 |
-BDEPEND="${PYTHON_DEPS} |
68 |
- $(python_gen_any_dep 'dev-python/m2crypto[${PYTHON_USEDEP}]') |
69 |
- virtual/pkgconfig" |
70 |
- |
71 |
-python_check_deps() { |
72 |
- has_version -b "dev-python/m2crypto[${PYTHON_USEDEP}]" |
73 |
-} |
74 |
- |
75 |
-PATCHES=( |
76 |
- "${FILESDIR}"/${PN}-no-ldconfig.patch |
77 |
- "${FILESDIR}"/${PN}-no-werror.patch |
78 |
- "${FILESDIR}"/${PN}-cflags.patch |
79 |
- "${FILESDIR}"/${PN}-libreg-link.patch #542436 |
80 |
- "${FILESDIR}"/${PN}-4.14-python-3.patch |
81 |
- "${FILESDIR}"/${PN}-4.14-openssl-1.1.0-compatibility.patch #652428 |
82 |
- "${FILESDIR}"/${PN}-libressl.patch |
83 |
- "${FILESDIR}"/${PN}-ldflags.patch |
84 |
- "${FILESDIR}"/${PN}-4.14-do-not-compress-doc.patch |
85 |
-) |
86 |
- |
87 |
-src_prepare() { |
88 |
- default |
89 |
- sed -i \ |
90 |
- -e "s:\<pkg-config\>:$(tc-getPKG_CONFIG):" \ |
91 |
- Makefile || die |
92 |
-} |
93 |
- |
94 |
-_emake() { |
95 |
- # The source hardcodes /usr/lib/crda/ paths (ignoring all make vars |
96 |
- # that look like it should change it). We want to use /usr/lib/ |
97 |
- # anyways as this file is not ABI specific and we want to share it |
98 |
- # among all ABIs rather than pointlessly duplicate it. |
99 |
- # |
100 |
- # The trailing slash on SBINDIR is required by the source. |
101 |
- emake \ |
102 |
- PREFIX="${EPREFIX}/usr" \ |
103 |
- SBINDIR='$(PREFIX)/sbin/' \ |
104 |
- LIBDIR='$(PREFIX)/'"$(get_libdir)" \ |
105 |
- UDEV_RULE_DIR="$(get_udevdir)/rules.d" \ |
106 |
- REG_BIN="${SYSROOT}"/usr/lib/crda/regulatory.bin \ |
107 |
- USE_OPENSSL=$(usex gcrypt 0 1) \ |
108 |
- CC="$(tc-getCC)" \ |
109 |
- V=1 \ |
110 |
- WERROR= \ |
111 |
- "$@" |
112 |
-} |
113 |
- |
114 |
-src_compile() { |
115 |
- _emake all_noverify |
116 |
-} |
117 |
- |
118 |
-src_test() { |
119 |
- _emake verify |
120 |
-} |
121 |
- |
122 |
-src_install() { |
123 |
- _emake DESTDIR="${D}" install |
124 |
- keepdir /etc/wireless-regdb/pubkeys |
125 |
-} |
126 |
|
127 |
diff --git a/net-wireless/crda/files/crda-4.14-do-not-compress-doc.patch b/net-wireless/crda/files/crda-4.14-do-not-compress-doc.patch |
128 |
deleted file mode 100644 |
129 |
index 428bafb..0000000 |
130 |
--- a/net-wireless/crda/files/crda-4.14-do-not-compress-doc.patch |
131 |
+++ /dev/null |
132 |
@@ -1,36 +0,0 @@ |
133 |
-diff --git a/Makefile b/Makefile |
134 |
-index 335d17d..683a379 100644 |
135 |
---- a/Makefile |
136 |
-+++ b/Makefile |
137 |
-@@ -157,11 +157,7 @@ verify: $(REG_BIN) regdbdump |
138 |
- LD_LIBRARY_PATH=.:$(LD_LIBRARY_PATH) \ |
139 |
- ./regdbdump $(REG_BIN) >/dev/null |
140 |
- |
141 |
--%.gz: % |
142 |
-- @$(NQ) ' GZIP' $< |
143 |
-- $(Q)gzip < $< > $@ |
144 |
-- |
145 |
--install: install-libreg install-libreg-headers crda crda.8.gz regdbdump.8.gz |
146 |
-+install: install-libreg install-libreg-headers crda crda.8 regdbdump.8 |
147 |
- $(NQ) ' INSTALL crda' |
148 |
- $(Q)$(MKDIR) $(DESTDIR)/$(SBINDIR) |
149 |
- $(Q)$(INSTALL) -m 755 -t $(DESTDIR)/$(SBINDIR) crda |
150 |
-@@ -177,13 +173,13 @@ install: install-libreg install-libreg-headers crda crda.8.gz regdbdump.8.gz |
151 |
- $(Q)$(INSTALL) -m 644 -t \ |
152 |
- $(DESTDIR)/$(UDEV_RULE_DIR)/ \ |
153 |
- udev/$(UDEV_LEVEL)regulatory.rules |
154 |
-- $(NQ) ' INSTALL crda.8.gz' |
155 |
-+ $(NQ) ' INSTALL crda.8' |
156 |
- $(Q)$(MKDIR) $(DESTDIR)$(MANDIR)/man8/ |
157 |
-- $(Q)$(INSTALL) -m 644 -t $(DESTDIR)/$(MANDIR)/man8/ crda.8.gz |
158 |
-- $(NQ) ' INSTALL regdbdump.8.gz' |
159 |
-- $(Q)$(INSTALL) -m 644 -t $(DESTDIR)/$(MANDIR)/man8/ regdbdump.8.gz |
160 |
-+ $(Q)$(INSTALL) -m 644 -t $(DESTDIR)/$(MANDIR)/man8/ crda.8 |
161 |
-+ $(NQ) ' INSTALL regdbdump.8' |
162 |
-+ $(Q)$(INSTALL) -m 644 -t $(DESTDIR)/$(MANDIR)/man8/ regdbdump.8 |
163 |
- |
164 |
- clean: |
165 |
- $(Q)rm -f $(LIBREG) crda regdbdump intersect db2rd optimize \ |
166 |
-- *.o *~ *.pyc keys.c *.gz \ |
167 |
-+ *.o *~ *.pyc keys.c \ |
168 |
- udev/$(UDEV_LEVEL)regulatory.rules udev/regulatory.rules.parsed |
169 |
|
170 |
diff --git a/net-wireless/crda/files/crda-4.14-openssl-1.1.0-compatibility.patch b/net-wireless/crda/files/crda-4.14-openssl-1.1.0-compatibility.patch |
171 |
deleted file mode 100644 |
172 |
index a9999da..0000000 |
173 |
--- a/net-wireless/crda/files/crda-4.14-openssl-1.1.0-compatibility.patch |
174 |
+++ /dev/null |
175 |
@@ -1,314 +0,0 @@ |
176 |
-From 338637ac08c19708eb35523894b44bbe3c726cfa Mon Sep 17 00:00:00 2001 |
177 |
-From: quentin <quentin@×××××××.io> |
178 |
-Date: Mon, 2 Apr 2018 18:07:50 +0200 |
179 |
-Subject: [PATCH] crda: Fix for OpenSSL 1.1.0: BIGNUM now opaque |
180 |
- |
181 |
-OpenSSL 1.1.0 makes most of OpenSSL's structures opaque, and provides |
182 |
-functions to manipulate them. This means it's no longer possible to |
183 |
-construct an OpenSSL BIGNUM directly from scratch, as was done in |
184 |
-keys-ssl.c. |
185 |
- |
186 |
-Use BN_bin2bn() (available since OpenSSL 0.9.8) to build the bignum from |
187 |
-its big-endian representation as a byte array. |
188 |
- |
189 |
-This also allows factoring the code in utils/key2pub.py as it's now the |
190 |
-same mechanism as with libgcrypt. |
191 |
- |
192 |
-This was tested with OpenSSL 1.1.0g. |
193 |
- |
194 |
-Signed-off-by: Quentin Minster <quentin@×××××××.io> |
195 |
---- |
196 |
- Makefile | 12 +++---- |
197 |
- reglib.c | 44 +++++++++++++++++------ |
198 |
- utils/key2pub.py | 107 ++++++------------------------------------------------- |
199 |
- 3 files changed, 49 insertions(+), 114 deletions(-) |
200 |
- |
201 |
-diff --git a/Makefile b/Makefile |
202 |
-index a3ead30..a4e7373 100644 |
203 |
---- a/Makefile |
204 |
-+++ b/Makefile |
205 |
-@@ -38,18 +38,16 @@ all: all_noverify verify |
206 |
- |
207 |
- all_noverify: $(LIBREG) crda intersect regdbdump db2rd optimize |
208 |
- |
209 |
-+$(LIBREG): keys.c |
210 |
-+ |
211 |
- ifeq ($(USE_OPENSSL),1) |
212 |
- CFLAGS += -DUSE_OPENSSL -DPUBKEY_DIR=\"$(RUNTIME_PUBKEY_DIR)\" `pkg-config --cflags openssl` |
213 |
- LDLIBS += `pkg-config --libs openssl` |
214 |
- |
215 |
--$(LIBREG): keys-ssl.c |
216 |
-- |
217 |
- else |
218 |
- CFLAGS += -DUSE_GCRYPT |
219 |
- LDLIBS += -lgcrypt |
220 |
- |
221 |
--$(LIBREG): keys-gcrypt.c |
222 |
-- |
223 |
- endif |
224 |
- MKDIR ?= mkdir -p |
225 |
- INSTALL ?= install |
226 |
-@@ -109,10 +107,10 @@ $(REG_BIN): |
227 |
- $(NQ) |
228 |
- $(Q) exit 1 |
229 |
- |
230 |
--keys-%.c: utils/key2pub.py $(wildcard $(PUBKEY_DIR)/*.pem) |
231 |
-+keys.c: utils/key2pub.py $(wildcard $(PUBKEY_DIR)/*.pem) |
232 |
- $(NQ) ' GEN ' $@ |
233 |
- $(NQ) ' Trusted pubkeys:' $(wildcard $(PUBKEY_DIR)/*.pem) |
234 |
-- $(Q)./utils/key2pub.py --$* $(wildcard $(PUBKEY_DIR)/*.pem) $@ |
235 |
-+ $(Q)./utils/key2pub.py $(wildcard $(PUBKEY_DIR)/*.pem) $@ |
236 |
- |
237 |
- $(LIBREG): regdb.h reglib.h reglib.c |
238 |
- $(NQ) ' CC ' $@ |
239 |
-@@ -187,5 +185,5 @@ install: install-libreg install-libreg-headers crda crda.8.gz regdbdump.8.gz |
240 |
- |
241 |
- clean: |
242 |
- $(Q)rm -f $(LIBREG) crda regdbdump intersect db2rd optimize \ |
243 |
-- *.o *~ *.pyc keys-*.c *.gz \ |
244 |
-+ *.o *~ *.pyc keys.c *.gz \ |
245 |
- udev/$(UDEV_LEVEL)regulatory.rules udev/regulatory.rules.parsed |
246 |
-diff --git a/reglib.c b/reglib.c |
247 |
-index e00e9b8..00f7f56 100644 |
248 |
---- a/reglib.c |
249 |
-+++ b/reglib.c |
250 |
-@@ -22,6 +22,7 @@ |
251 |
- #include <openssl/rsa.h> |
252 |
- #include <openssl/sha.h> |
253 |
- #include <openssl/pem.h> |
254 |
-+#include <openssl/bn.h> |
255 |
- #endif |
256 |
- |
257 |
- #ifdef USE_GCRYPT |
258 |
-@@ -30,12 +31,8 @@ |
259 |
- |
260 |
- #include "reglib.h" |
261 |
- |
262 |
--#ifdef USE_OPENSSL |
263 |
--#include "keys-ssl.c" |
264 |
--#endif |
265 |
-- |
266 |
--#ifdef USE_GCRYPT |
267 |
--#include "keys-gcrypt.c" |
268 |
-+#if defined(USE_OPENSSL) || defined(USE_GCRYPT) |
269 |
-+#include "keys.c" |
270 |
- #endif |
271 |
- |
272 |
- int debug = 0; |
273 |
-@@ -81,7 +78,8 @@ reglib_array_len(size_t baselen, unsigned int elemcount, size_t elemlen) |
274 |
- #ifdef USE_OPENSSL |
275 |
- int reglib_verify_db_signature(uint8_t *db, size_t dblen, size_t siglen) |
276 |
- { |
277 |
-- RSA *rsa; |
278 |
-+ RSA *rsa = NULL; |
279 |
-+ BIGNUM *rsa_e = NULL, *rsa_n = NULL; |
280 |
- uint8_t hash[SHA_DIGEST_LENGTH]; |
281 |
- unsigned int i; |
282 |
- int ok = 0; |
283 |
-@@ -102,15 +100,35 @@ int reglib_verify_db_signature(uint8_t *db, size_t dblen, size_t siglen) |
284 |
- goto out; |
285 |
- } |
286 |
- |
287 |
-- rsa->e = &keys[i].e; |
288 |
-- rsa->n = &keys[i].n; |
289 |
-+ rsa_e = BN_bin2bn(keys[i].e, keys[i].len_e, NULL); |
290 |
-+ if (!rsa_e) { |
291 |
-+ fprintf(stderr, "Failed to convert value for RSA e.\n"); |
292 |
-+ goto out; |
293 |
-+ } |
294 |
-+ rsa_n = BN_bin2bn(keys[i].n, keys[i].len_n, NULL); |
295 |
-+ if (!rsa_n) { |
296 |
-+ fprintf(stderr, "Failed to convert value for RSA n.\n"); |
297 |
-+ goto out; |
298 |
-+ } |
299 |
-+ |
300 |
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L |
301 |
-+ rsa->e = rsa_e; |
302 |
-+ rsa->n = rsa_n; |
303 |
-+#else |
304 |
-+ if (RSA_set0_key(rsa, rsa_n, rsa_e, NULL) != 1) { |
305 |
-+ fprintf(stderr, "Failed to set RSA key.\n"); |
306 |
-+ goto out; |
307 |
-+ } |
308 |
-+#endif |
309 |
-+ /* BIGNUMs now owned by the RSA object */ |
310 |
-+ rsa_e = NULL; |
311 |
-+ rsa_n = NULL; |
312 |
- |
313 |
- ok = RSA_verify(NID_sha1, hash, SHA_DIGEST_LENGTH, |
314 |
- db + dblen, siglen, rsa) == 1; |
315 |
- |
316 |
-- rsa->e = NULL; |
317 |
-- rsa->n = NULL; |
318 |
- RSA_free(rsa); |
319 |
-+ rsa = NULL; |
320 |
- } |
321 |
- if (!ok && (pubkey_dir = opendir(PUBKEY_DIR))) { |
322 |
- while (!ok && (nextfile = readdir(pubkey_dir))) { |
323 |
-@@ -123,6 +141,7 @@ int reglib_verify_db_signature(uint8_t *db, size_t dblen, size_t siglen) |
324 |
- ok = RSA_verify(NID_sha1, hash, SHA_DIGEST_LENGTH, |
325 |
- db + dblen, siglen, rsa) == 1; |
326 |
- RSA_free(rsa); |
327 |
-+ rsa = NULL; |
328 |
- fclose(keyfile); |
329 |
- } |
330 |
- } |
331 |
-@@ -133,6 +152,9 @@ int reglib_verify_db_signature(uint8_t *db, size_t dblen, size_t siglen) |
332 |
- fprintf(stderr, "Database signature verification failed.\n"); |
333 |
- |
334 |
- out: |
335 |
-+ RSA_free(rsa); |
336 |
-+ BN_free(rsa_e); |
337 |
-+ BN_free(rsa_n); |
338 |
- return ok; |
339 |
- } |
340 |
- #endif /* USE_OPENSSL */ |
341 |
-diff --git a/utils/key2pub.py b/utils/key2pub.py |
342 |
-index 9bb04cd..1919270 100755 |
343 |
---- a/utils/key2pub.py |
344 |
-+++ b/utils/key2pub.py |
345 |
-@@ -9,84 +9,7 @@ except ImportError as e: |
346 |
- sys.stderr.write('On Debian GNU/Linux the package is called "python-m2crypto".\n') |
347 |
- sys.exit(1) |
348 |
- |
349 |
--def print_ssl_64(output, name, val): |
350 |
-- while val[0:1] == b'\0': |
351 |
-- val = val[1:] |
352 |
-- while len(val) % 8: |
353 |
-- val = b'\0' + val |
354 |
-- vnew = [] |
355 |
-- while len(val): |
356 |
-- vnew.append((val[0:1], val[1:2], val[2:3], val[3:4], val[4:5], val[5:6], val[6:7], val[7:8])) |
357 |
-- val = val[8:] |
358 |
-- vnew.reverse() |
359 |
-- output.write('static BN_ULONG %s[%d] = {\n' % (name, len(vnew))) |
360 |
-- idx = 0 |
361 |
-- for v1, v2, v3, v4, v5, v6, v7, v8 in vnew: |
362 |
-- if not idx: |
363 |
-- output.write('\t') |
364 |
-- output.write('0x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x, ' % (ord(v1), ord(v2), ord(v3), ord(v4), ord(v5), ord(v6), ord(v7), ord(v8))) |
365 |
-- idx += 1 |
366 |
-- if idx == 2: |
367 |
-- idx = 0 |
368 |
-- output.write('\n') |
369 |
-- if idx: |
370 |
-- output.write('\n') |
371 |
-- output.write('};\n\n') |
372 |
-- |
373 |
--def print_ssl_32(output, name, val): |
374 |
-- while val[0:1] == b'\0': |
375 |
-- val = val[1:] |
376 |
-- while len(val) % 4: |
377 |
-- val = b'\0' + val |
378 |
-- vnew = [] |
379 |
-- while len(val): |
380 |
-- vnew.append((val[0:1], val[1:2], val[2:3], val[3:4])) |
381 |
-- val = val[4:] |
382 |
-- vnew.reverse() |
383 |
-- output.write('static BN_ULONG %s[%d] = {\n' % (name, len(vnew))) |
384 |
-- idx = 0 |
385 |
-- for v1, v2, v3, v4 in vnew: |
386 |
-- if not idx: |
387 |
-- output.write('\t') |
388 |
-- output.write('0x%.2x%.2x%.2x%.2x, ' % (ord(v1), ord(v2), ord(v3), ord(v4))) |
389 |
-- idx += 1 |
390 |
-- if idx == 4: |
391 |
-- idx = 0 |
392 |
-- output.write('\n') |
393 |
-- if idx: |
394 |
-- output.write('\n') |
395 |
-- output.write('};\n\n') |
396 |
-- |
397 |
--def print_ssl(output, name, val): |
398 |
-- import struct |
399 |
-- output.write('#include <stdint.h>\n') |
400 |
-- if len(struct.pack('@L', 0)) == 8: |
401 |
-- return print_ssl_64(output, name, val) |
402 |
-- else: |
403 |
-- return print_ssl_32(output, name, val) |
404 |
-- |
405 |
--def print_ssl_keys(output, n): |
406 |
-- output.write(r''' |
407 |
--struct pubkey { |
408 |
-- struct bignum_st e, n; |
409 |
--}; |
410 |
-- |
411 |
--#define KEY(data) { \ |
412 |
-- .d = data, \ |
413 |
-- .top = sizeof(data)/sizeof(data[0]), \ |
414 |
--} |
415 |
-- |
416 |
--#define KEYS(e,n) { KEY(e), KEY(n), } |
417 |
-- |
418 |
--static struct pubkey keys[] = { |
419 |
--''') |
420 |
-- for n in range(n + 1): |
421 |
-- output.write(' KEYS(e_%d, n_%d),\n' % (n, n)) |
422 |
-- output.write('};\n') |
423 |
-- pass |
424 |
-- |
425 |
--def print_gcrypt(output, name, val): |
426 |
-- output.write('#include <stdint.h>\n') |
427 |
-+def print_bignum(output, name, val): |
428 |
- while val[0:1] == b'\0': |
429 |
- val = val[1:] |
430 |
- output.write('static const uint8_t %s[%d] = {\n' % (name, len(val))) |
431 |
-@@ -103,11 +26,11 @@ def print_gcrypt(output, name, val): |
432 |
- output.write('\n') |
433 |
- output.write('};\n\n') |
434 |
- |
435 |
--def print_gcrypt_keys(output, n): |
436 |
-+def print_keys(output, n): |
437 |
- output.write(r''' |
438 |
- struct key_params { |
439 |
- const uint8_t *e, *n; |
440 |
-- uint32_t len_e, len_n; |
441 |
-+ const uint32_t len_e, len_n; |
442 |
- }; |
443 |
- |
444 |
- #define KEYS(_e, _n) { \ |
445 |
-@@ -120,25 +43,17 @@ static const struct key_params __attribute__ ((unused)) keys[] = { |
446 |
- for n in range(n + 1): |
447 |
- output.write(' KEYS(e_%d, n_%d),\n' % (n, n)) |
448 |
- output.write('};\n') |
449 |
-- |
450 |
- |
451 |
--modes = { |
452 |
-- '--ssl': (print_ssl, print_ssl_keys), |
453 |
-- '--gcrypt': (print_gcrypt, print_gcrypt_keys), |
454 |
--} |
455 |
- |
456 |
--try: |
457 |
-- mode = sys.argv[1] |
458 |
-- files = sys.argv[2:-1] |
459 |
-- outfile = sys.argv[-1] |
460 |
--except IndexError: |
461 |
-- mode = None |
462 |
-+files = sys.argv[1:-1] |
463 |
-+outfile = sys.argv[-1] |
464 |
- |
465 |
--if not mode in modes: |
466 |
-- print('Usage: %s [%s] input-file... output-file' % (sys.argv[0], '|'.join(modes.keys()))) |
467 |
-+if len(files) == 0: |
468 |
-+ print('Usage: %s input-file... output-file' % sys.argv[0]) |
469 |
- sys.exit(2) |
470 |
- |
471 |
- output = open(outfile, 'w') |
472 |
-+output.write('#include <stdint.h>\n\n\n') |
473 |
- |
474 |
- # load key |
475 |
- idx = 0 |
476 |
-@@ -148,10 +63,10 @@ for f in files: |
477 |
- except RSA.RSAError: |
478 |
- key = RSA.load_key(f) |
479 |
- |
480 |
-- modes[mode][0](output, 'e_%d' % idx, key.e[4:]) |
481 |
-- modes[mode][0](output, 'n_%d' % idx, key.n[4:]) |
482 |
-+ print_bignum(output, 'e_%d' % idx, key.e[4:]) |
483 |
-+ print_bignum(output, 'n_%d' % idx, key.n[4:]) |
484 |
- idx += 1 |
485 |
- |
486 |
--modes[mode][1](output, idx - 1) |
487 |
-+print_keys(output, idx - 1) |
488 |
- |
489 |
- output.close() |
490 |
|
491 |
diff --git a/net-wireless/crda/files/crda-4.14-python-3.patch b/net-wireless/crda/files/crda-4.14-python-3.patch |
492 |
deleted file mode 100644 |
493 |
index df22a6a..0000000 |
494 |
--- a/net-wireless/crda/files/crda-4.14-python-3.patch |
495 |
+++ /dev/null |
496 |
@@ -1,95 +0,0 @@ |
497 |
-diff --git a/utils/key2pub.py b/utils/key2pub.py |
498 |
-index 9bb04cd..632e6a6 100755 |
499 |
---- a/utils/key2pub.py |
500 |
-+++ b/utils/key2pub.py |
501 |
-@@ -3,20 +3,20 @@ |
502 |
- import sys |
503 |
- try: |
504 |
- from M2Crypto import RSA |
505 |
--except ImportError, e: |
506 |
-+except ImportError as e: |
507 |
- sys.stderr.write('ERROR: Failed to import the "M2Crypto" module: %s\n' % e.message) |
508 |
- sys.stderr.write('Please install the "M2Crypto" Python module.\n') |
509 |
- sys.stderr.write('On Debian GNU/Linux the package is called "python-m2crypto".\n') |
510 |
- sys.exit(1) |
511 |
- |
512 |
- def print_ssl_64(output, name, val): |
513 |
-- while val[0] == '\0': |
514 |
-+ while val[0:1] == b'\0': |
515 |
- val = val[1:] |
516 |
- while len(val) % 8: |
517 |
-- val = '\0' + val |
518 |
-+ val = b'\0' + val |
519 |
- vnew = [] |
520 |
- while len(val): |
521 |
-- vnew.append((val[0], val[1], val[2], val[3], val[4], val[5], val[6], val[7])) |
522 |
-+ vnew.append((val[0:1], val[1:2], val[2:3], val[3:4], val[4:5], val[5:6], val[6:7], val[7:8])) |
523 |
- val = val[8:] |
524 |
- vnew.reverse() |
525 |
- output.write('static BN_ULONG %s[%d] = {\n' % (name, len(vnew))) |
526 |
-@@ -34,13 +34,13 @@ def print_ssl_64(output, name, val): |
527 |
- output.write('};\n\n') |
528 |
- |
529 |
- def print_ssl_32(output, name, val): |
530 |
-- while val[0] == '\0': |
531 |
-+ while val[0:1] == b'\0': |
532 |
- val = val[1:] |
533 |
- while len(val) % 4: |
534 |
-- val = '\0' + val |
535 |
-+ val = b'\0' + val |
536 |
- vnew = [] |
537 |
- while len(val): |
538 |
-- vnew.append((val[0], val[1], val[2], val[3], )) |
539 |
-+ vnew.append((val[0:1], val[1:2], val[2:3], val[3:4])) |
540 |
- val = val[4:] |
541 |
- vnew.reverse() |
542 |
- output.write('static BN_ULONG %s[%d] = {\n' % (name, len(vnew))) |
543 |
-@@ -80,21 +80,21 @@ struct pubkey { |
544 |
- |
545 |
- static struct pubkey keys[] = { |
546 |
- ''') |
547 |
-- for n in xrange(n + 1): |
548 |
-+ for n in range(n + 1): |
549 |
- output.write(' KEYS(e_%d, n_%d),\n' % (n, n)) |
550 |
- output.write('};\n') |
551 |
- pass |
552 |
- |
553 |
- def print_gcrypt(output, name, val): |
554 |
- output.write('#include <stdint.h>\n') |
555 |
-- while val[0] == '\0': |
556 |
-+ while val[0:1] == b'\0': |
557 |
- val = val[1:] |
558 |
- output.write('static const uint8_t %s[%d] = {\n' % (name, len(val))) |
559 |
- idx = 0 |
560 |
- for v in val: |
561 |
- if not idx: |
562 |
- output.write('\t') |
563 |
-- output.write('0x%.2x, ' % ord(v)) |
564 |
-+ output.write('0x%.2x, ' % (v if sys.version_info[0] >=3 else ord(v))) |
565 |
- idx += 1 |
566 |
- if idx == 8: |
567 |
- idx = 0 |
568 |
-@@ -117,7 +117,7 @@ struct key_params { |
569 |
- |
570 |
- static const struct key_params __attribute__ ((unused)) keys[] = { |
571 |
- ''') |
572 |
-- for n in xrange(n + 1): |
573 |
-+ for n in range(n + 1): |
574 |
- output.write(' KEYS(e_%d, n_%d),\n' % (n, n)) |
575 |
- output.write('};\n') |
576 |
- |
577 |
-@@ -135,7 +135,7 @@ except IndexError: |
578 |
- mode = None |
579 |
- |
580 |
- if not mode in modes: |
581 |
-- print 'Usage: %s [%s] input-file... output-file' % (sys.argv[0], '|'.join(modes.keys())) |
582 |
-+ print('Usage: %s [%s] input-file... output-file' % (sys.argv[0], '|'.join(modes.keys()))) |
583 |
- sys.exit(2) |
584 |
- |
585 |
- output = open(outfile, 'w') |
586 |
-@@ -153,3 +153,5 @@ for f in files: |
587 |
- idx += 1 |
588 |
- |
589 |
- modes[mode][1](output, idx - 1) |
590 |
-+ |
591 |
-+output.close() |
592 |
|
593 |
diff --git a/net-wireless/crda/files/crda-cflags.patch b/net-wireless/crda/files/crda-cflags.patch |
594 |
deleted file mode 100644 |
595 |
index 6edbded..0000000 |
596 |
--- a/net-wireless/crda/files/crda-cflags.patch |
597 |
+++ /dev/null |
598 |
@@ -1,33 +0,0 @@ |
599 |
-From c5b0741ea7fc12e9f6a2a309296ed412a999d0f7 Mon Sep 17 00:00:00 2001 |
600 |
-From: Mike Frysinger <vapier@××××××××.org> |
601 |
-Date: Wed, 4 Mar 2015 14:09:50 -0500 |
602 |
-Subject: [PATCH] clean up CFLAGS handling |
603 |
- |
604 |
-Rather than append -O2 -g all the time to the user's CFLAGS (and thus |
605 |
-clobbering whatever they have set up), initialize the default value to |
606 |
-that and let the user override it entirely. |
607 |
- |
608 |
-Signed-off-by: Mike Frysinger <vapier@g.o> |
609 |
---- |
610 |
- Makefile | 4 ++-- |
611 |
- 1 file changed, 2 insertions(+), 2 deletions(-) |
612 |
- |
613 |
-diff --git a/Makefile b/Makefile |
614 |
-index 5f988f4..8e345a1 100644 |
615 |
---- a/Makefile |
616 |
-+++ b/Makefile |
617 |
-@@ -26,9 +26,9 @@ PUBKEY_DIR?=pubkeys |
618 |
- RUNTIME_PUBKEY_DIR?=/etc/wireless-regdb/pubkeys |
619 |
- |
620 |
- WERROR = -Werror |
621 |
--CFLAGS += -O2 -fpic |
622 |
-+CFLAGS ?= -O2 -g |
623 |
-+CFLAGS += -fpic |
624 |
- CFLAGS += -std=gnu99 -Wall $(WERROR) -pedantic |
625 |
--CFLAGS += -Wall -g |
626 |
- LDLIBREG += -lreg |
627 |
- LDLIBS += $(LDLIBREG) |
628 |
- LDLIBS += -lm |
629 |
--- |
630 |
-2.3.1 |
631 |
- |
632 |
|
633 |
diff --git a/net-wireless/crda/files/crda-ldflags.patch b/net-wireless/crda/files/crda-ldflags.patch |
634 |
deleted file mode 100644 |
635 |
index 5ba9165..0000000 |
636 |
--- a/net-wireless/crda/files/crda-ldflags.patch |
637 |
+++ /dev/null |
638 |
@@ -1,11 +0,0 @@ |
639 |
---- /Makefile |
640 |
-+++ /Makefile |
641 |
-@@ -115,7 +115,7 @@ |
642 |
- |
643 |
- $(LIBREG): regdb.h reglib.h reglib.c |
644 |
- $(NQ) ' CC ' $@ |
645 |
-- $(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -shared -Wl,-soname,$(LIBREG) $^ $(filter-out -lreg,$(LDLIBS)) |
646 |
-+ $(Q)$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ -shared -Wl,-soname,$(LIBREG) $^ $(filter-out -lreg,$(LDLIBS)) |
647 |
- |
648 |
- install-libreg-headers: |
649 |
- $(NQ) ' INSTALL libreg-headers' |
650 |
|
651 |
diff --git a/net-wireless/crda/files/crda-libreg-link.patch b/net-wireless/crda/files/crda-libreg-link.patch |
652 |
deleted file mode 100644 |
653 |
index 0aa1b6e..0000000 |
654 |
--- a/net-wireless/crda/files/crda-libreg-link.patch |
655 |
+++ /dev/null |
656 |
@@ -1,30 +0,0 @@ |
657 |
-https://bugs.gentoo.org/542436 |
658 |
- |
659 |
-From f56ab87b25f2228a67ac592a1c18793c72dd03eb Mon Sep 17 00:00:00 2001 |
660 |
-From: Mike Frysinger <vapier@g.o> |
661 |
-Date: Sat, 7 Mar 2015 22:29:33 -0500 |
662 |
-Subject: [PATCH crda] libreg: link against crypto libs |
663 |
- |
664 |
-Since libreg uses funcs from the crypto lib, make sure we link them. |
665 |
- |
666 |
-Signed-off-by: Mike Frysinger <vapier@g.o> |
667 |
---- |
668 |
- Makefile | 2 +- |
669 |
- 1 file changed, 1 insertion(+), 1 deletion(-) |
670 |
- |
671 |
-diff --git a/Makefile b/Makefile |
672 |
-index 8e345a1..77708e6 100644 |
673 |
---- a/Makefile |
674 |
-+++ b/Makefile |
675 |
-@@ -117,7 +117,7 @@ keys-%.c: utils/key2pub.py $(wildcard $(PUBKEY_DIR)/*.pem) |
676 |
- |
677 |
- $(LIBREG): regdb.h reglib.h reglib.c |
678 |
- $(NQ) ' CC ' $@ |
679 |
-- $(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -shared -Wl,-soname,$(LIBREG) $^ |
680 |
-+ $(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -shared -Wl,-soname,$(LIBREG) $^ $(filter-out -lreg,$(LDLIBS)) |
681 |
- |
682 |
- install-libreg-headers: |
683 |
- $(NQ) ' INSTALL libreg-headers' |
684 |
--- |
685 |
-2.3.1 |
686 |
- |
687 |
|
688 |
diff --git a/net-wireless/crda/files/crda-libressl.patch b/net-wireless/crda/files/crda-libressl.patch |
689 |
deleted file mode 100644 |
690 |
index 817f2e0..0000000 |
691 |
--- a/net-wireless/crda/files/crda-libressl.patch |
692 |
+++ /dev/null |
693 |
@@ -1,11 +0,0 @@ |
694 |
---- crda-3.18/reglib.c 2018-10-26 12:39:19.128083735 +1100 |
695 |
-+++ crda-3.18.a/reglib.c 2018-10-26 12:42:39.737916626 +1100 |
696 |
-@@ -111,7 +111,7 @@ int reglib_verify_db_signature(uint8_t * |
697 |
- goto out; |
698 |
- } |
699 |
- |
700 |
--#if OPENSSL_VERSION_NUMBER < 0x10100000L |
701 |
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL) |
702 |
- rsa->e = rsa_e; |
703 |
- rsa->n = rsa_n; |
704 |
- #else |
705 |
|
706 |
diff --git a/net-wireless/crda/files/crda-no-ldconfig.patch b/net-wireless/crda/files/crda-no-ldconfig.patch |
707 |
deleted file mode 100644 |
708 |
index a5cc420..0000000 |
709 |
--- a/net-wireless/crda/files/crda-no-ldconfig.patch |
710 |
+++ /dev/null |
711 |
@@ -1,28 +0,0 @@ |
712 |
-From b11d83df189670defe4a29c624f2930351c13df2 Mon Sep 17 00:00:00 2001 |
713 |
-From: Mike Frysinger <vapier@g.o> |
714 |
-Date: Wed, 4 Mar 2015 13:56:36 -0500 |
715 |
-Subject: [PATCH] do not run ldconfig |
716 |
- |
717 |
-Let the distro/user deal with ldconfig updating. Running it blindly like |
718 |
-this breaks DESTDIR installs as `ldconfig` only operates on system paths. |
719 |
- |
720 |
-Signed-off-by: Mike Frysinger <vapier@g.o> |
721 |
---- |
722 |
- Makefile | 1 - |
723 |
- 1 file changed, 1 deletion(-) |
724 |
- |
725 |
-diff --git a/Makefile b/Makefile |
726 |
-index a3ead30..46c683d 100644 |
727 |
---- a/Makefile |
728 |
-+++ b/Makefile |
729 |
-@@ -127,7 +127,6 @@ install-libreg: |
730 |
- $(NQ) ' INSTALL libreg' |
731 |
- $(Q)mkdir -p $(DESTDIR)/$(LIBDIR) |
732 |
- $(Q)cp $(LIBREG) $(DESTDIR)/$(LIBDIR)/ |
733 |
-- $(Q)ldconfig |
734 |
- |
735 |
- %.o: %.c regdb.h $(LIBREG) |
736 |
- $(NQ) ' CC ' $@ |
737 |
--- |
738 |
-2.3.1 |
739 |
- |
740 |
|
741 |
diff --git a/net-wireless/crda/files/crda-no-werror.patch b/net-wireless/crda/files/crda-no-werror.patch |
742 |
deleted file mode 100644 |
743 |
index 6abb78c..0000000 |
744 |
--- a/net-wireless/crda/files/crda-no-werror.patch |
745 |
+++ /dev/null |
746 |
@@ -1,32 +0,0 @@ |
747 |
-From 37384d22ba0ab622a5848a9a794084e6064fc905 Mon Sep 17 00:00:00 2001 |
748 |
-From: Mike Frysinger <vapier@××××××××.org> |
749 |
-Date: Wed, 4 Mar 2015 14:03:44 -0500 |
750 |
-Subject: [PATCH] allow people to turn off -Werror |
751 |
- |
752 |
-Forcing -Werror at build time easily breaks across compiler settings, |
753 |
-compiler versions, architectures, C libraries, etc... Add a knob so |
754 |
-distro peeps can turn it off. |
755 |
- |
756 |
-Signed-off-by: Mike Frysinger <vapier@g.o> |
757 |
---- |
758 |
- Makefile | 3 ++- |
759 |
- 1 file changed, 2 insertions(+), 1 deletion(-) |
760 |
- |
761 |
-diff --git a/Makefile b/Makefile |
762 |
-index 46c683d..5f988f4 100644 |
763 |
---- a/Makefile |
764 |
-+++ b/Makefile |
765 |
-@@ -25,8 +25,9 @@ UDEV_RULE_DIR?=/lib/udev/rules.d/ |
766 |
- PUBKEY_DIR?=pubkeys |
767 |
- RUNTIME_PUBKEY_DIR?=/etc/wireless-regdb/pubkeys |
768 |
- |
769 |
-+WERROR = -Werror |
770 |
- CFLAGS += -O2 -fpic |
771 |
--CFLAGS += -std=gnu99 -Wall -Werror -pedantic |
772 |
-+CFLAGS += -std=gnu99 -Wall $(WERROR) -pedantic |
773 |
- CFLAGS += -Wall -g |
774 |
- LDLIBREG += -lreg |
775 |
- LDLIBS += $(LDLIBREG) |
776 |
--- |
777 |
-2.3.1 |
778 |
- |
779 |
|
780 |
diff --git a/net-wireless/crda/metadata.xml b/net-wireless/crda/metadata.xml |
781 |
deleted file mode 100644 |
782 |
index f89b1f5..0000000 |
783 |
--- a/net-wireless/crda/metadata.xml |
784 |
+++ /dev/null |
785 |
@@ -1,11 +0,0 @@ |
786 |
-<?xml version="1.0" encoding="UTF-8"?> |
787 |
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
788 |
-<pkgmetadata> |
789 |
- <maintainer type="person"> |
790 |
- <email>zerochaos@g.o</email> |
791 |
- <name>Rick Farina</name> |
792 |
- </maintainer> |
793 |
- <use> |
794 |
- <flag name="gcrypt">Use libgcrypt instead of openssl for key checking</flag> |
795 |
- </use> |
796 |
-</pkgmetadata> |