1 |
commit: abe3c527bd51c009f61e85e2a86fca60ea3c4f20 |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jan 8 14:12:00 2021 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jan 8 14:15:20 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=abe3c527 |
7 |
|
8 |
sys-apps/kmod: Removed old |
9 |
|
10 |
Package-Manager: Portage-3.0.12, Repoman-3.0.2 |
11 |
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org> |
12 |
|
13 |
sys-apps/kmod/Manifest | 1 - |
14 |
sys-apps/kmod/files/kmod-26-libressl.patch | 143 -------------------- |
15 |
sys-apps/kmod/kmod-26-r5.ebuild | 201 ----------------------------- |
16 |
3 files changed, 345 deletions(-) |
17 |
|
18 |
diff --git a/sys-apps/kmod/Manifest b/sys-apps/kmod/Manifest |
19 |
index 010ee9f2330..29b9d69a8f0 100644 |
20 |
--- a/sys-apps/kmod/Manifest |
21 |
+++ b/sys-apps/kmod/Manifest |
22 |
@@ -1,3 +1,2 @@ |
23 |
-DIST kmod-26.tar.xz 552032 BLAKE2B 3e596d06b48599bf4919346475a036b058fb18a7b19d39953e24fa943b95fdbe34a29a5062f6b4fe3510e667ae873d3b9ae03b72350fa85ddbb40ca6a7730b34 SHA512 3ca276c6fc13c2dd2220ec528b8dc4ab4edee5d2b22e16b6f945c552e51f74342c01c33a53740e6af8c893d42bd4d6f629cd8fa6e15ef8bd8da30cb003ef0865 |
24 |
DIST kmod-27.tar.xz 548924 BLAKE2B 9f12bf5792d4c867e28e0776c279369c063e84269212e3f699ae6e5e69b8b2b466b5033e43e17ac64d6101592edcf3c34881916afb6ae676b49dc8838dfe1396 SHA512 e0513094935333fca1fb4c3e3493b232507a579ab00a6457cc9ed3e928363d05aad80634fb65a8287a336bf9895194c7be8ddc41bb088a6c2cca44fc1bfbdb6c |
25 |
DIST kmod-28.tar.xz 552448 BLAKE2B af41a0c5681fb94eb5264f46ed2ae666d171d4e2d0dc21419a3c2f4b12a783350a06b408fb02a7afb00fcea1cd994ee35864c1ec8b7a8cc58a8c9dcdeffaf1b3 SHA512 50646dc72675a5e17b01e327e3d41b972f18aaeac20c8b00983c4d099c6218f35c32c184a833a2d7f716755d6a86851c90913d2835874cef933bdc4a9722df9a |
26 |
|
27 |
diff --git a/sys-apps/kmod/files/kmod-26-libressl.patch b/sys-apps/kmod/files/kmod-26-libressl.patch |
28 |
deleted file mode 100644 |
29 |
index cb36ab401c2..00000000000 |
30 |
--- a/sys-apps/kmod/files/kmod-26-libressl.patch |
31 |
+++ /dev/null |
32 |
@@ -1,143 +0,0 @@ |
33 |
-From 628677e066198d8658d7edd5511a5bb27cd229f5 Mon Sep 17 00:00:00 2001 |
34 |
-From: Stefan Strogin <steils@g.o> |
35 |
-Date: Sun, 19 May 2019 03:42:01 +0300 |
36 |
-Subject: [PATCH] libkmod-signature: use PKCS#7 instead of CMS |
37 |
- |
38 |
-Linux uses either PKCS #7 or CMS for signing modules (see |
39 |
-scripts/sign-file.c). CMS is not supported by LibreSSL or older OpenSSL, |
40 |
-so PKCS #7 is used on systems with these libcrypto providers. |
41 |
- |
42 |
-CMS and PKCS #7 formats are very similar. CMS is newer but is as much as |
43 |
-possible backward compatible with PKCS #7 [1]. PKCS #7 is supported in |
44 |
-the latest OpenSSL as well as CMS. The fields used for signing kernel |
45 |
-modules are supported both in PKCS #7 and CMS. |
46 |
- |
47 |
-For now modinfo uses CMS with no alternative requiring OpenSSL 1.1.0 or |
48 |
-newer. |
49 |
- |
50 |
-Use PKCS #7 for parsing module signature information, so that modinfo |
51 |
-could be used both with OpenSSL and LibreSSL. |
52 |
- |
53 |
-[1] https://tools.ietf.org/html/rfc5652#section-1.1 |
54 |
- |
55 |
-Changes v1->v2: |
56 |
-- Don't use ifdefs for keeping redundant CMS code, just use PKCS #7 both |
57 |
-with OpenSSL and LibreSSL. |
58 |
- |
59 |
-Upstream-Status: Accepted |
60 |
-[https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git/commit/?id=628677e066198d8658d7edd5511a5bb27cd229f5] |
61 |
-Signed-off-by: Stefan Strogin <steils@g.o> |
62 |
---- |
63 |
- libkmod/libkmod-signature.c | 37 +++++++++++++++++++------------------ |
64 |
- 1 file changed, 19 insertions(+), 18 deletions(-) |
65 |
- |
66 |
-diff --git a/libkmod/libkmod-signature.c b/libkmod/libkmod-signature.c |
67 |
-index 48d0145..4e8748c 100644 |
68 |
---- a/libkmod/libkmod-signature.c |
69 |
-+++ b/libkmod/libkmod-signature.c |
70 |
-@@ -20,7 +20,7 @@ |
71 |
- #include <endian.h> |
72 |
- #include <inttypes.h> |
73 |
- #ifdef ENABLE_OPENSSL |
74 |
--#include <openssl/cms.h> |
75 |
-+#include <openssl/pkcs7.h> |
76 |
- #include <openssl/ssl.h> |
77 |
- #endif |
78 |
- #include <stdio.h> |
79 |
-@@ -122,7 +122,7 @@ static bool fill_default(const char *mem, off_t size, |
80 |
- #ifdef ENABLE_OPENSSL |
81 |
- |
82 |
- struct pkcs7_private { |
83 |
-- CMS_ContentInfo *cms; |
84 |
-+ PKCS7 *pkcs7; |
85 |
- unsigned char *key_id; |
86 |
- BIGNUM *sno; |
87 |
- }; |
88 |
-@@ -132,7 +132,7 @@ static void pkcs7_free(void *s) |
89 |
- struct kmod_signature_info *si = s; |
90 |
- struct pkcs7_private *pvt = si->private; |
91 |
- |
92 |
-- CMS_ContentInfo_free(pvt->cms); |
93 |
-+ PKCS7_free(pvt->pkcs7); |
94 |
- BN_free(pvt->sno); |
95 |
- free(pvt->key_id); |
96 |
- free(pvt); |
97 |
-@@ -197,11 +197,10 @@ static bool fill_pkcs7(const char *mem, off_t size, |
98 |
- struct kmod_signature_info *sig_info) |
99 |
- { |
100 |
- const char *pkcs7_raw; |
101 |
-- CMS_ContentInfo *cms; |
102 |
-- STACK_OF(CMS_SignerInfo) *sis; |
103 |
-- CMS_SignerInfo *si; |
104 |
-- int rc; |
105 |
-- ASN1_OCTET_STRING *key_id; |
106 |
-+ PKCS7 *pkcs7; |
107 |
-+ STACK_OF(PKCS7_SIGNER_INFO) *sis; |
108 |
-+ PKCS7_SIGNER_INFO *si; |
109 |
-+ PKCS7_ISSUER_AND_SERIAL *is; |
110 |
- X509_NAME *issuer; |
111 |
- ASN1_INTEGER *sno; |
112 |
- ASN1_OCTET_STRING *sig; |
113 |
-@@ -220,31 +219,33 @@ static bool fill_pkcs7(const char *mem, off_t size, |
114 |
- |
115 |
- in = BIO_new_mem_buf(pkcs7_raw, sig_len); |
116 |
- |
117 |
-- cms = d2i_CMS_bio(in, NULL); |
118 |
-- if (cms == NULL) { |
119 |
-+ pkcs7 = d2i_PKCS7_bio(in, NULL); |
120 |
-+ if (pkcs7 == NULL) { |
121 |
- BIO_free(in); |
122 |
- return false; |
123 |
- } |
124 |
- |
125 |
- BIO_free(in); |
126 |
- |
127 |
-- sis = CMS_get0_SignerInfos(cms); |
128 |
-+ sis = PKCS7_get_signer_info(pkcs7); |
129 |
- if (sis == NULL) |
130 |
- goto err; |
131 |
- |
132 |
-- si = sk_CMS_SignerInfo_value(sis, 0); |
133 |
-+ si = sk_PKCS7_SIGNER_INFO_value(sis, 0); |
134 |
- if (si == NULL) |
135 |
- goto err; |
136 |
- |
137 |
-- rc = CMS_SignerInfo_get0_signer_id(si, &key_id, &issuer, &sno); |
138 |
-- if (rc == 0) |
139 |
-+ is = si->issuer_and_serial; |
140 |
-+ if (is == NULL) |
141 |
- goto err; |
142 |
-+ issuer = is->issuer; |
143 |
-+ sno = is->serial; |
144 |
- |
145 |
-- sig = CMS_SignerInfo_get0_signature(si); |
146 |
-+ sig = si->enc_digest; |
147 |
- if (sig == NULL) |
148 |
- goto err; |
149 |
- |
150 |
-- CMS_SignerInfo_get0_algs(si, NULL, NULL, &dig_alg, &sig_alg); |
151 |
-+ PKCS7_SIGNER_INFO_get0_algs(si, NULL, &dig_alg, &sig_alg); |
152 |
- |
153 |
- sig_info->sig = (const char *)ASN1_STRING_get0_data(sig); |
154 |
- sig_info->sig_len = ASN1_STRING_length(sig); |
155 |
-@@ -277,7 +278,7 @@ static bool fill_pkcs7(const char *mem, off_t size, |
156 |
- if (pvt == NULL) |
157 |
- goto err3; |
158 |
- |
159 |
-- pvt->cms = cms; |
160 |
-+ pvt->pkcs7 = pkcs7; |
161 |
- pvt->key_id = key_id_str; |
162 |
- pvt->sno = sno_bn; |
163 |
- sig_info->private = pvt; |
164 |
-@@ -290,7 +291,7 @@ err3: |
165 |
- err2: |
166 |
- BN_free(sno_bn); |
167 |
- err: |
168 |
-- CMS_ContentInfo_free(cms); |
169 |
-+ PKCS7_free(pkcs7); |
170 |
- return false; |
171 |
- } |
172 |
- |
173 |
--- |
174 |
-2.21.0 |
175 |
- |
176 |
|
177 |
diff --git a/sys-apps/kmod/kmod-26-r5.ebuild b/sys-apps/kmod/kmod-26-r5.ebuild |
178 |
deleted file mode 100644 |
179 |
index 53000bb3deb..00000000000 |
180 |
--- a/sys-apps/kmod/kmod-26-r5.ebuild |
181 |
+++ /dev/null |
182 |
@@ -1,201 +0,0 @@ |
183 |
-# Copyright 1999-2020 Gentoo Authors |
184 |
-# Distributed under the terms of the GNU General Public License v2 |
185 |
- |
186 |
-EAPI=6 |
187 |
- |
188 |
-PYTHON_COMPAT=( python3_{6,7} ) |
189 |
- |
190 |
-inherit bash-completion-r1 multilib python-r1 |
191 |
- |
192 |
-if [[ ${PV} == 9999* ]]; then |
193 |
- EGIT_REPO_URI="https://git.kernel.org/pub/scm/utils/kernel/${PN}/${PN}.git" |
194 |
- inherit autotools git-r3 |
195 |
-else |
196 |
- SRC_URI="https://www.kernel.org/pub/linux/utils/kernel/kmod/${P}.tar.xz" |
197 |
- KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86" |
198 |
- inherit libtool |
199 |
-fi |
200 |
- |
201 |
-DESCRIPTION="library and tools for managing linux kernel modules" |
202 |
-HOMEPAGE="https://git.kernel.org/?p=utils/kernel/kmod/kmod.git" |
203 |
- |
204 |
-LICENSE="LGPL-2" |
205 |
-SLOT="0" |
206 |
-IUSE="debug doc libressl lzma pkcs7 python static-libs +tools zlib" |
207 |
- |
208 |
-# Upstream does not support running the test suite with custom configure flags. |
209 |
-# I was also told that the test suite is intended for kmod developers. |
210 |
-# So we have to restrict it. |
211 |
-# See bug #408915. |
212 |
-RESTRICT="test" |
213 |
- |
214 |
-# Block systemd below 217 for -static-nodes-indicate-that-creation-of-static-nodes-.patch |
215 |
-RDEPEND="!sys-apps/module-init-tools |
216 |
- !sys-apps/modutils |
217 |
- !<sys-apps/openrc-0.13.8 |
218 |
- !<sys-apps/systemd-216-r3 |
219 |
- lzma? ( >=app-arch/xz-utils-5.0.4-r1 ) |
220 |
- python? ( ${PYTHON_DEPS} ) |
221 |
- pkcs7? ( |
222 |
- !libressl? ( >=dev-libs/openssl-1.1.0:0= ) |
223 |
- libressl? ( dev-libs/libressl:0= ) |
224 |
- ) |
225 |
- zlib? ( >=sys-libs/zlib-1.2.6 )" #427130 |
226 |
-DEPEND="${RDEPEND} |
227 |
- doc? ( dev-util/gtk-doc ) |
228 |
- lzma? ( virtual/pkgconfig ) |
229 |
- python? ( |
230 |
- dev-python/cython[${PYTHON_USEDEP}] |
231 |
- virtual/pkgconfig |
232 |
- ) |
233 |
- zlib? ( virtual/pkgconfig )" |
234 |
-if [[ ${PV} == 9999* ]]; then |
235 |
- DEPEND="${DEPEND} |
236 |
- dev-libs/libxslt" |
237 |
-fi |
238 |
- |
239 |
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
240 |
- |
241 |
-DOCS="NEWS README TODO" |
242 |
- |
243 |
-PATCHES=( |
244 |
- "${FILESDIR}/${P}-libressl.patch" # bug 677960 |
245 |
-) |
246 |
- |
247 |
-src_prepare() { |
248 |
- default |
249 |
- |
250 |
- if [[ ! -e configure ]] ; then |
251 |
- if use doc; then |
252 |
- gtkdocize --copy --docdir libkmod/docs || die |
253 |
- else |
254 |
- touch libkmod/docs/gtk-doc.make |
255 |
- fi |
256 |
- eautoreconf |
257 |
- else |
258 |
- elibtoolize |
259 |
- fi |
260 |
- |
261 |
- # Restore possibility of running --enable-static wrt #472608 |
262 |
- sed -i \ |
263 |
- -e '/--enable-static is not supported by kmod/s:as_fn_error:echo:' \ |
264 |
- configure || die |
265 |
-} |
266 |
- |
267 |
-src_configure() { |
268 |
- local myeconfargs=( |
269 |
- --bindir="${EPREFIX}/bin" |
270 |
- --enable-shared |
271 |
- --with-bashcompletiondir="$(get_bashcompdir)" |
272 |
- --with-rootlibdir="${EPREFIX}/$(get_libdir)" |
273 |
- $(use_enable debug) |
274 |
- $(use_enable doc gtk-doc) |
275 |
- $(use_enable static-libs static) |
276 |
- $(use_enable tools) |
277 |
- $(use_with lzma xz) |
278 |
- $(use_with pkcs7 openssl) |
279 |
- $(use_with zlib) |
280 |
- ) |
281 |
- |
282 |
- local ECONF_SOURCE="${S}" |
283 |
- |
284 |
- kmod_configure() { |
285 |
- mkdir -p "${BUILD_DIR}" || die |
286 |
- run_in_build_dir econf "${myeconfargs[@]}" "$@" |
287 |
- } |
288 |
- |
289 |
- BUILD_DIR="${WORKDIR}/build" |
290 |
- kmod_configure --disable-python |
291 |
- |
292 |
- if use python; then |
293 |
- python_foreach_impl kmod_configure --enable-python |
294 |
- fi |
295 |
-} |
296 |
- |
297 |
-src_compile() { |
298 |
- emake -C "${BUILD_DIR}" |
299 |
- |
300 |
- if use python; then |
301 |
- local native_builddir=${BUILD_DIR} |
302 |
- |
303 |
- python_compile() { |
304 |
- emake -C "${BUILD_DIR}" -f Makefile -f - python \ |
305 |
- VPATH="${native_builddir}:${S}" \ |
306 |
- native_builddir="${native_builddir}" \ |
307 |
- libkmod_python_kmod_{kmod,list,module,_util}_la_LIBADD='$(PYTHON_LIBS) $(native_builddir)/libkmod/libkmod.la' \ |
308 |
- <<< 'python: $(pkgpyexec_LTLIBRARIES)' |
309 |
- } |
310 |
- |
311 |
- python_foreach_impl python_compile |
312 |
- fi |
313 |
-} |
314 |
- |
315 |
-src_install() { |
316 |
- emake -C "${BUILD_DIR}" DESTDIR="${D}" install |
317 |
- einstalldocs |
318 |
- |
319 |
- if use python; then |
320 |
- local native_builddir=${BUILD_DIR} |
321 |
- |
322 |
- python_install() { |
323 |
- emake -C "${BUILD_DIR}" DESTDIR="${D}" \ |
324 |
- VPATH="${native_builddir}:${S}" \ |
325 |
- install-pkgpyexecLTLIBRARIES \ |
326 |
- install-dist_pkgpyexecPYTHON |
327 |
- python_optimize |
328 |
- } |
329 |
- |
330 |
- python_foreach_impl python_install |
331 |
- fi |
332 |
- |
333 |
- find "${ED}" -name "*.la" -delete || die |
334 |
- |
335 |
- if use tools; then |
336 |
- local cmd |
337 |
- for cmd in depmod insmod modprobe rmmod; do |
338 |
- dosym ../bin/kmod /sbin/${cmd} |
339 |
- done |
340 |
- |
341 |
- # These are also usable as normal user |
342 |
- for cmd in lsmod modinfo; do |
343 |
- dosym kmod /bin/${cmd} |
344 |
- done |
345 |
- fi |
346 |
- |
347 |
- cat <<-EOF > "${T}"/usb-load-ehci-first.conf |
348 |
- softdep uhci_hcd pre: ehci_hcd |
349 |
- softdep ohci_hcd pre: ehci_hcd |
350 |
- EOF |
351 |
- |
352 |
- insinto /lib/modprobe.d |
353 |
- doins "${T}"/usb-load-ehci-first.conf #260139 |
354 |
- |
355 |
- newinitd "${FILESDIR}"/kmod-static-nodes-r1 kmod-static-nodes |
356 |
-} |
357 |
- |
358 |
-pkg_postinst() { |
359 |
- if [[ -L ${EROOT%/}/etc/runlevels/boot/static-nodes ]]; then |
360 |
- ewarn "Removing old conflicting static-nodes init script from the boot runlevel" |
361 |
- rm -f "${EROOT%/}"/etc/runlevels/boot/static-nodes |
362 |
- fi |
363 |
- |
364 |
- # Add kmod to the runlevel automatically if this is the first install of this package. |
365 |
- if [[ -z ${REPLACING_VERSIONS} ]]; then |
366 |
- if [[ ! -d ${EROOT%/}/etc/runlevels/sysinit ]]; then |
367 |
- mkdir -p "${EROOT%/}"/etc/runlevels/sysinit |
368 |
- fi |
369 |
- if [[ -x ${EROOT%/}/etc/init.d/kmod-static-nodes ]]; then |
370 |
- ln -s /etc/init.d/kmod-static-nodes "${EROOT%/}"/etc/runlevels/sysinit/kmod-static-nodes |
371 |
- fi |
372 |
- fi |
373 |
- |
374 |
- if [[ -e ${EROOT%/}/etc/runlevels/sysinit ]]; then |
375 |
- if ! has_version sys-apps/systemd && [[ ! -e ${EROOT%/}/etc/runlevels/sysinit/kmod-static-nodes ]]; then |
376 |
- ewarn |
377 |
- ewarn "You need to add kmod-static-nodes to the sysinit runlevel for" |
378 |
- ewarn "kernel modules to have required static nodes!" |
379 |
- ewarn "Run this command:" |
380 |
- ewarn "\trc-update add kmod-static-nodes sysinit" |
381 |
- fi |
382 |
- fi |
383 |
-} |