• [gentoo-dev] [PATCH 3/5] linux-mod-r1.eclass: check /boot if we are re-

    From Andrew Nowa Ammerlaan@21:1/5 to All on Wed Jun 26 22:10:01 2024
    From 3c5267472fb72223336063007173157a5de3f0cc Mon Sep 17 00:00:00 2001
    From: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
    Date: Tue, 25 Jun 2024 16:15:05 +0200
    Subject: [PATCH] linux-mod-r1.eclass: check /boot if we are re-installing
    dist-kernel

    Previous commit already adds the check when we call dist-kernel_reinstall_initramfs, but lets do it a bit earlier as well.

    As in dist-kernel-utils.eclass, make the check nonfatal because when users notice the problem they can correct it and manually re-install the
    kernel via
    emerge --config ...

    We don't have a pkg_pretend phase in this eclass, so we use the pkg_setup
    phase instead to avoid introducing a new phase here.

    Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
    ---
    eclass/linux-mod-r1.eclass | 13 ++++++++++++-
    1 file changed, 12 insertions(+), 1 deletion(-)

    diff --git a/eclass/linux-mod-r1.eclass b/eclass/linux-mod-r1.eclass
    index 43c5a7d7b140b..9911a6ddee123 100644
    --- a/eclass/linux-mod-r1.eclass
    +++ b/eclass/linux-mod-r1.eclass
    @@ -132,6 +132,7 @@ IDEPEND="
    "

    if [[ ${MODULES_INITRAMFS_IUSE} ]]; then
    + inherit mount-boot-utils
    IUSE+=" ${MODULES_INITRAMFS_IUSE}"
    IDEPEND+="
    ${MODULES_INITRAMFS_IUSE#+}? (
    @@ -328,9 +329,19 @@ fi
    # 3. perform various sanity checks to fail early on issues
    linux-mod-r1_pkg_setup() {
    debug-print-function ${FUNCNAME[0]} "${@}"
    - [[ ${MERGE_TYPE} != binary ]] || return 0
    _MODULES_GLOBAL[ran:pkg_setup]=1
    _modules_check_function ${#} 0 0 || return 0
    +
    + if [[ -z ${ROOT} && ${MODULES_INITRAMFS_IUSE} ]] &&
    + use dist-kernel && use ${MODULES_INITRAMFS_IUSE#+}
    + then
    + # Check, but don't die because we can fix the problem and then + # emerge --config ... to re-run installation.
    +
  • From Andrew Nowa Ammerlaan@21:1/5 to All on Wed Jun 26 22:10:01 2024
    From 45a34aecafa64a666976e3d3d7944f8c8ff1e058 Mon Sep 17 00:00:00 2001
    From: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
    Date: Tue, 25 Jun 2024 16:32:42 +0200
    Subject: [PATCH] sys-kernel/linux-firmware: complain less when /boot is not
    mounted

    when using dist-kernel we can correct the problem and then
    emerge --config ...

    Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
    ---
    .../linux-firmware-20240410.ebuild | 21 +++++++++++++------
    .../linux-firmware-20240513.ebuild | 21 +++++++++++++------
    .../linux-firmware-20240610.ebuild | 21 +++++++++++++------
    .../linux-firmware-99999999.ebuild | 21 +++++++++++++------
    4 files changed, 60 insertions(+), 24 deletions(-)

    diff --git a/sys-kernel/linux-firmware/linux-firmware-20240410.ebuild b/sys-kernel/linux-firmware/linux-firmware-20240410.ebuild
    index 1bb6954d00c88..b8bbed17f1a6d 100644
    --- a/sys-kernel/linux-firmware/linux-firmware-20240410.ebuild
    +++ b/sys-kernel/linux-firmware/linux-firmware-20240410.ebuild
    @@ -69,7 +69,15 @@ QA_PREBUILT="*"
    PATCHES=( "${FILESDIR}"/${PN}-copy-firmware-r4.patch )

    pkg_pretend() {
    - use initramfs && mount-boot_pkg_pretend
    + if use initramfs; then
    + if [[ -z ${ROOT} ]] && use dist-kernel; then
    + # Check, but don't die because we can fix the problem and then
    + # emerge --config ... to re-run installation.
    + nonfatal
  • From Andrew Nowa Ammerlaan@21:1/5 to All on Wed Jun 26 22:10:01 2024
    From c5cf62a41038e344312d8758a4ba232fcd726053 Mon Sep 17 00:00:00 2001
    From: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
    Date: Tue, 25 Jun 2024 16:36:46 +0200
    Subject: [PATCH] sys-firmware/intel-microcode: complain less when /boot
    is not
    mounted

    When using dist-kernel users can correct the problem and then
    emerge --config ...

    Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
    ---
    .../intel-microcode-20240312_p20240312.ebuild | 21 +++++++++++++------
    .../intel-microcode-20240514_p20240514.ebuild | 21 +++++++++++++------
    .../intel-microcode-20240531_p20240526.ebuild | 21 +++++++++++++------
    3 files changed, 45 insertions(+), 18 deletions(-)

    diff --git a/sys-firmware/intel-microcode/intel-microcode-20240312_p20240312.ebuild b/sys-firmware/intel-microcode/intel-microcode-20240312_p20240312.ebuild
    index 957da662f92e3..5e2d305fc9ed6 100644
    --- a/sys-firmware/intel-microcode/intel-microcode-20240312_p20240312.ebuild +++ b/sys-firmware/intel-microcode/intel-microcode-20240312_p20240312.ebuild
    @@ -83,7 +83,15 @@ MICROCODE_SIGNATURES_DEFAULT=""
    # exclude specific CPU: MICROCODE_SIGNATURES="-s !0x00000686"

    pkg_pretend() {
    - use initramfs && mount-boot_pkg_pretend
    + if use initramfs; then
    + if [[ -z ${ROOT} ]] && use dist-kernel; then
    + # Check, but don't die because we can fix the problem and then
    + # emerge --config ... to re-run installation.
    + non