From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id D97A3159C9B for ; Fri, 9 Aug 2024 16:11:22 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 70D722BC118; Fri, 9 Aug 2024 16:11:18 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 2F13F2BC0B6 for ; Fri, 9 Aug 2024 16:11:18 +0000 (UTC) Message-ID: <6c384c1337c65f3927e9f0a601503422a5405e40.camel@gentoo.org> Subject: Re: [gentoo-dev] [PATCH] kernel-install.eclass: run depmod after compressing modules From: =?UTF-8?Q?Micha=C5=82_G=C3=B3rny?= To: gentoo-dev@lists.gentoo.org Cc: Andrew Ammerlaan Date: Fri, 09 Aug 2024 18:11:07 +0200 In-Reply-To: <20240809154927.347120-1-andrewammerlaan@gentoo.org> References: <20240809154927.347120-1-andrewammerlaan@gentoo.org> Organization: Gentoo Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-AndD6CmFFdOWuk410Qe+" User-Agent: Evolution 3.52.4 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 X-Archives-Salt: 61283651-84f1-4531-a319-3c8ce1b1fea0 X-Archives-Hash: 38d01ea4f0674cecf36f4386fa3162af --=-AndD6CmFFdOWuk410Qe+ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, 2024-08-09 at 17:49 +0200, Andrew Ammerlaan wrote: > (de)compressing modules changes the path of the module files so we need t= o > run depmod to ensure that tools such as modprobe/modinfo work. >=20 > Note that depmod is often, but *not* always, run by sys-kernel/installker= nel. > Systemd installs a hook to do this, but there is no equivalent on openrc > systems. So instead just ensure that the tree of modules we install is > consistent here in the eclass. >=20 > Signed-off-by: Andrew Ammerlaan > --- > eclass/kernel-install.eclass | 3 +++ > 1 file changed, 3 insertions(+) >=20 > diff --git a/eclass/kernel-install.eclass b/eclass/kernel-install.eclass > index 496e258815d2..930640188c26 100644 > --- a/eclass/kernel-install.eclass > +++ b/eclass/kernel-install.eclass > @@ -796,6 +796,9 @@ kernel-install_compress_modules() { > find "${ED}/lib/modules/${KV_FULL}" -name '*.ko' -print0 | > xargs -0 -P "$(makeopts_jobs)" -n 128 "${compress[@]}" > assert "Compressing kernel modules failed" > + > + # Module paths have changed, run depmod > + depmod --all --basedir "${ED}" ${KV_FULL} || die > fi > } > =20 Are you actually supposed to run it on ED and not EROOT? Won't that cause file collisions (even if we circumvent them via CONFIG_PROTECT). --=20 Best regards, Micha=C5=82 G=C3=B3rny --=-AndD6CmFFdOWuk410Qe+ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- iQFGBAABCgAwFiEEx2qEUJQJjSjMiybFY5ra4jKeJA4FAma2P5sSHG1nb3JueUBn ZW50b28ub3JnAAoJEGOa2uIyniQO1b8H/0LWjTp0XIT/xplkA1HO/4F6eFeheZNp wb5i+LSw+5ZJzaAW9k9fd0R/wLo1L8zEaIppRc2NW/0SBPno1a+6PD+1eatXNHgS MauEhhx/dOpeiUsMFWQbQSFAyON08z4ysfY/X6pa4XrjoQCt6MQCnv12CAboilAB sD9Oa6OFcdFK98B5m+Vc0BmgNyzX6bCgDeeyuuEe82rXCoEVCHFbUmloTEePW3Gs RJ0cgahredPhT/Dsn9nluNJi4tUcSiP1vfAx4u5RVOzOTdNsLzen5OyCBTAvFUMw /uVQU58t9I6aMlXnn9b4BViFa4FUVCcAgWgLjPMtZ2OX1E2mHL4hGpU= =Fycn -----END PGP SIGNATURE----- --=-AndD6CmFFdOWuk410Qe+--