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: [gentoo-dev] [PATCH 0/5] mount-boot.eclass: revises /boot checking for dist-kernels, add checks for ESP
Date: Wed, 26 Jun 2024 22:06:21 +0200	[thread overview]
Message-ID: <38ed17cb-950a-4abd-b904-537388dbe612@gentoo.org> (raw)
In-Reply-To: <b2c825ff-81cd-4a4e-831f-b7b0e6ba6670@gentoo.org>

Part of: https://github.com/gentoo/gentoo/pull/37292

This series builds on the previous patch: "kernel-build.eclass: identify 
dist-kernels, and warn users"

Effectively, the change amounts to harmonizing the way ebuilds/eclasses 
using "dist-kernel_reinstall_initramfs" re-install the dist-kernel with 
how kernel-install.eclass installs the dist-kernel. Specifically in the 
area's of a) checking mounting status of /boot and b) handeling failure 
in /sbin/installkernel.

This addresses an annoying issue new users run into where linux-firmware 
  and intel-microcode packages are too strict in enforcing mounted /boot.

To achieve this:
- Error handling and mount-boot checking is moved from 
kernel-install.eclass to dist-kerel-utils.eclass
- In the above we run into the problem that mount-boot.eclass exports 
pkg_pretend and pkg_{pre,post}{inst,rm}. Whereas dist-kernel-utils 
exports nothing. To resolved the problem the bulk of mount-boot.eclass 
is moved into a new "inherit-safe" mount-boot-utils.eclass, which in 
turn is inherited by mount-boot.eclass for backwards compatibility.
- The new mount-boot-utils.eclass is adjusted to check not only for 
mounted /boot, but also for a mounted EFI System Partition on UEFI systems.
- linux-mod-r1.eclass is adjusted to perform the mount-boot check early 
for packages that install modules into the initramfs (currently only 
zfs-kmod). We use pkg_setup instead of the usual pkg_pretend to avoid 
exporting a new phase. The check is nonfatal, i.e. only informative, the 
same way it is when installing the kernel (via kernel-install.eclass)
- linux-firmware and intel-microcode ebuilds are adjusted to be less 
strict about mounted /boot in the USE=dist-kernel case. This mirrors how 
kernel (re-)installation works in 
kernel-install.eclass/linux-mod-r1.eclass, i.e. nonfatal informative 
warning early, and only hard fail in pkg_postinst with informative 
message on how users can trigger kernel re-installation manually.



  reply	other threads:[~2024-06-26 20:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-26 19:09 [gentoo-dev] [PATCH] kernel-build.eclass: identify dist-kernels, and warn users Andrew Nowa Ammerlaan
2024-06-26 20:06 ` Andrew Nowa Ammerlaan [this message]
2024-06-26 20:06   ` [gentoo-dev] [PATCH 1/5] mount-boot.eclass: check for ESP as well as /boot, split, eclass Andrew Nowa Ammerlaan
2024-06-26 20:07     ` [gentoo-dev] [PATCH 2/5] kernel-install.eclass: move mount-boot check to, dist-kernel-utils.eclass Andrew Nowa Ammerlaan
2024-06-26 20:08       ` [gentoo-dev] [PATCH 3/5] linux-mod-r1.eclass: check /boot if we are re-installing, dist-kernel Andrew Nowa Ammerlaan
2024-06-26 20:08         ` [gentoo-dev] [PATCH 4/5] sys-kernel/linux-firmware: complain less when /boot is not, mounted Andrew Nowa Ammerlaan
2024-06-26 20:09           ` [gentoo-dev] [PATCH 5/5] sys-firmware/intel-microcode: " Andrew Nowa Ammerlaan
2024-06-27  4:07       ` [gentoo-dev] [PATCH 2/5] kernel-install.eclass: move mount-boot check to, dist-kernel-utils.eclass Ulrich Mueller
2024-06-27 14:26         ` [gentoo-dev] [PATCH 2/5 v2] " Andrew Nowa Ammerlaan
2024-06-27  4:00     ` [gentoo-dev] [PATCH 1/5] mount-boot.eclass: check for ESP as well as /boot, split, eclass Ulrich Mueller
2024-06-27 14:24       ` [gentoo-dev] [PATCH 1/5 v2] " Andrew Nowa Ammerlaan
2024-06-28  6:33         ` Ulrich Mueller
2024-06-28  9:18           ` [gentoo-dev] [PATCH 1/5 v3] " 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=38ed17cb-950a-4abd-b904-537388dbe612@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