Github messages for voidlinux
 help / color / mirror / Atom feed
From: ahesford <ahesford@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Merged]: dkms: improvements to post-install hook: run depmod if necessary and better handle DKMS build/install failures
Date: Sat, 11 Jul 2020 04:21:46 +0200	[thread overview]
Message-ID: <20200711022146.UAItTNM7GEbjdOrnKucyFL5FoRUg2Pegf2dT4f6smZg@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-23392@inbox.vuxu.org>

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

There's a merged pull request on the void-packages repository

dkms: improvements to post-install hook: run depmod if necessary and better handle DKMS build/install failures
https://github.com/void-linux/void-packages/pull/23392

Description:
Normally, `dkms install` will run depmod with each installed module to update module dependency lists. When force-reinstalling kernel packages, `dkms install` will not run because modules are already marked installed, but the kernel package will overwrite `modules.dep` and `modules.dep.bin` with packaged versions that do not include any modules installed by dkms. The kernel post-install hook now tracks whether depmod should be run and will do so if necessary.

To demonstrate the original problem:

1. Install `zfs` and enable the dracut zfs module with `add_dracutmodules+=" zfs "` in `dracut.conf` or a `.conf` file in `/etc/dracut.conf.d`.
2. Rerun `dracut`, e.g., with `xbps-reconfigure -f linuxX.Y` for an appropriate kernel package.
3. Confirm that `zfs.ko.gz` is in the newly generated initramfs.
4. Force-reinstall the kernel package: `xbps-install -f linuxX.Y`.
5. Confirm that `zfs.ko.gz` is *missing* from the newly generated initramfs.

With the changes in the hook, the force-installation of `linuxX.Y` should display `Generating kernel module dependency lists... done.` after "building" all DKMS modules (note: the modules were already built for the reinstalled kernel, so the `dkms build` run by the hook is basically a no-op). The resulting initramfs will contain `zfs.ko.gz` as expected.

Also, I propagated some return codes from `dkms` through the hook, which I believe was the original intention. (Before the fix, `exit $?` after an `echo` would generally always exit 0 because `echo` is unlikely to fail.)

      parent reply	other threads:[~2020-07-11  2:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-04 20:51 [PR PATCH] dkms: run depmod if necessary in kernel post-install hook ahesford
2020-07-05  1:19 ` [PR PATCH] [Updated] " ahesford
2020-07-05  1:20 ` ahesford
2020-07-11  1:34 ` [PR PATCH] [Updated] dkms: improvements to post-install hook: run depmod if necessary and better handle DKMS build/install failures ahesford
2020-07-11  1:44 ` [PR REVIEW] " ericonr
2020-07-11  1:50 ` [PR PATCH] [Updated] " ahesford
2020-07-11  2:00 ` ahesford
2020-07-11  2:01 ` [PR REVIEW] " ahesford
2020-07-11  2:18 ` [PR PATCH] [Updated] " ahesford
2020-07-11  2:21 ` ahesford [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=20200711022146.UAItTNM7GEbjdOrnKucyFL5FoRUg2Pegf2dT4f6smZg@z \
    --to=ahesford@users.noreply.github.com \
    --cc=ml@inbox.vuxu.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;
as well as URLs for NNTP newsgroup(s).