public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Andrew Nowa Ammerlaan <andrewammerlaan@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] [PATCH] kernel-install.eclass: run depmod after compressing modules
Date: Fri, 9 Aug 2024 18:50:52 +0200	[thread overview]
Message-ID: <bd66347f-29c3-4d9d-bc92-78dba9345299@gentoo.org> (raw)
In-Reply-To: <6c384c1337c65f3927e9f0a601503422a5405e40.camel@gentoo.org>

On 09/08/2024 18:11, Michał Górny wrote:
> 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?  

Either works, but doing it in ED ensures that the 
gentoo-kernel-bin[modules-compress] install image is the same as the 
gentoo-kernel[modules-compress] install image.

> Won't that
> cause file collisions (even if we circumvent them via CONFIG_PROTECT).

No, it does not install any files that we are not installing anyway, it 
just updates them.



      reply	other threads:[~2024-08-09 16:51 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
2024-08-09 16:50   ` Andrew Nowa Ammerlaan [this message]

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=bd66347f-29c3-4d9d-bc92-78dba9345299@gentoo.org \
    --to=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