public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
Subject: Re: [gentoo-dev] [PATCH] kernel-install.eclass: run depmod after compressing modules
Date: Fri, 09 Aug 2024 18:11:07 +0200	[thread overview]
Message-ID: <6c384c1337c65f3927e9f0a601503422a5405e40.camel@gentoo.org> (raw)
In-Reply-To: <20240809154927.347120-1-andrewammerlaan@gentoo.org>

[-- Attachment #1: Type: text/plain, Size: 1368 bytes --]

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 to
> run depmod to ensure that tools such as modprobe/modinfo work.
> 
> Note that depmod is often, but *not* always, run by sys-kernel/installkernel.
> 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.
> 
> Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
> ---
>  eclass/kernel-install.eclass | 3 +++
>  1 file changed, 3 insertions(+)
> 
> 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
>  }
>  

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).

-- 
Best regards,
Michał Górny


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 512 bytes --]

  reply	other threads:[~2024-08-09 16:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-09 15:49 [gentoo-dev] [PATCH] kernel-install.eclass: run depmod after compressing modules Andrew Ammerlaan
2024-08-09 16:11 ` Michał Górny [this message]
2024-08-09 16:50   ` Andrew Nowa Ammerlaan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6c384c1337c65f3927e9f0a601503422a5405e40.camel@gentoo.org \
    --to=mgorny@gentoo.org \
    --cc=andrewammerlaan@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox