From ff27f8c57a00dc18bc56873e58b7f522aaf4cc63 Mon Sep 17 00:00:00 2001 From: Pavel Valena Date: Mar 20 2024 12:28:22 +0000 Subject: Update to dracut 060. also remove redundant script newdracut.sh. From-source-git-commit: 8069d40c0e180cd74d4e897c007096523ecce459 --- diff --git a/0001-feat-kernel-install-do-nothing-when-KERNEL_INSTALL_I.patch b/0001-feat-kernel-install-do-nothing-when-KERNEL_INSTALL_I.patch new file mode 100644 index 0000000..de38727 --- /dev/null +++ b/0001-feat-kernel-install-do-nothing-when-KERNEL_INSTALL_I.patch @@ -0,0 +1,96 @@ +From f86d5ff72868e9df7d255e3c5e938a9e339f09fa Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Tue, 18 Jan 2022 18:08:42 +0100 +Subject: [PATCH 01/10] feat(kernel-install): do nothing when + $KERNEL_INSTALL_INITRD_GENERATOR says so + +dracut may be installed without being actually used. This is very common in +binary distros where a package may be pulled in through dependencies, even +though the user does not need it in a particular setup. KERNEL_INSTALL_INITRD_GENERATOR +is being added in systemd's kernel-install to select which of the possibly many +initrd generation mechanisms will be used. + +For backwards compat, if it not set, continue as before. But if set to +something else, skip our kernel-install plugins. + +(Cherry-picked commit f47bcdd7342ca0d46b889e712a1c7446e18434bc from PR#1825) +--- + install.d/50-dracut.install | 31 ++++++------------------------ + install.d/51-dracut-rescue.install | 12 +++++++++--- + 2 files changed, 15 insertions(+), 28 deletions(-) + +diff --git a/install.d/50-dracut.install b/install.d/50-dracut.install +index 441414ac..efb184cd 100755 +--- a/install.d/50-dracut.install ++++ b/install.d/50-dracut.install +@@ -6,38 +6,19 @@ BOOT_DIR_ABS="$3" + KERNEL_IMAGE="$4" + + # If KERNEL_INSTALL_MACHINE_ID is defined but empty, BOOT_DIR_ABS is a fake directory. +-# So, let's skip to create initrd. ++# In this case, do not create the initrd. + if ! [[ ${KERNEL_INSTALL_MACHINE_ID-x} ]]; then + exit 0 + fi + +-# Do not attempt to create initramfs if the supplied image is already a UKI +-if [[ "$KERNEL_INSTALL_IMAGE_TYPE" = "uki" ]]; then ++# Skip this plugin if we're using a different generator. If nothing is specified, ++# assume we're wanted since we're installed. ++if [ "${KERNEL_INSTALL_INITRD_GENERATOR:-dracut}" != "dracut" ]; then + exit 0 + fi + +-# Mismatching the install layout and the --uefi/--no-uefi opts just creates a mess. +-if [[ $KERNEL_INSTALL_LAYOUT == "uki" && -n $KERNEL_INSTALL_STAGING_AREA ]]; then +- BOOT_DIR_ABS="$KERNEL_INSTALL_STAGING_AREA" +- if [[ -z $KERNEL_INSTALL_UKI_GENERATOR || $KERNEL_INSTALL_UKI_GENERATOR == "dracut" ]]; then +- # No uki generator preference set or we have been chosen +- IMAGE="uki.efi" +- UEFI_OPTS="--uefi" +- elif [[ -z $KERNEL_INSTALL_INITRD_GENERATOR || $KERNEL_INSTALL_INITRD_GENERATOR == "dracut" ]]; then +- # We aren't the uki generator, but we have been requested to make the initrd +- IMAGE="initrd" +- UEFI_OPTS="--no-uefi" +- else +- exit 0 +- fi +-elif [[ $KERNEL_INSTALL_LAYOUT == "bls" && -n $KERNEL_INSTALL_STAGING_AREA ]]; then +- BOOT_DIR_ABS="$KERNEL_INSTALL_STAGING_AREA" +- if [[ -z $KERNEL_INSTALL_INITRD_GENERATOR || $KERNEL_INSTALL_INITRD_GENERATOR == "dracut" ]]; then +- IMAGE="initrd" +- UEFI_OPTS="--no-uefi" +- else +- exit 0 +- fi ++if [[ -d "$BOOT_DIR_ABS" ]]; then ++ INITRD="initrd" + else + # No layout information, use users --uefi/--no-uefi preference + UEFI_OPTS="" +diff --git a/install.d/51-dracut-rescue.install b/install.d/51-dracut-rescue.install +index aa0ccdc5..be4172b5 100755 +--- a/install.d/51-dracut-rescue.install ++++ b/install.d/51-dracut-rescue.install +@@ -7,9 +7,15 @@ KERNEL_VERSION="$2" + BOOT_DIR_ABS="${3%/*}/0-rescue" + KERNEL_IMAGE="$4" + +-dropindirs_sort() { +- suffix=$1 +- shift ++# Skip this plugin if we're using a different generator. If nothing is specified, ++# assume we're wanted since we're installed. ++if [ "${KERNEL_INSTALL_INITRD_GENERATOR:-dracut}" != "dracut" ]; then ++ exit 0 ++fi ++ ++dropindirs_sort() ++{ ++ suffix=$1; shift + args=("$@") + files=$( + while (($# > 0)); do +-- +2.42.0 + diff --git a/0001-fix-dracut.sh-use-dynamically-uefi-s-sections-offset.patch b/0001-fix-dracut.sh-use-dynamically-uefi-s-sections-offset.patch deleted file mode 100644 index 351a13f..0000000 --- a/0001-fix-dracut.sh-use-dynamically-uefi-s-sections-offset.patch +++ /dev/null @@ -1,143 +0,0 @@ -From ec6972ab724c23edb47394e1211c4d3dc635ea8f Mon Sep 17 00:00:00 2001 -From: Valentin Lefebvre -Date: Mon, 13 Mar 2023 12:06:13 +0100 -Subject: [PATCH] fix(dracut.sh): use dynamically uefi's sections offset - -* Uefi section are creating by `objcopy` with hardcoded sections -offset. This commit allow to have the correct offset between -each part of the efi file, needed to create an UKI. Offsets -are simply calculated so no sections overlap, as recommended -in https://wiki.archlinux.org/title/Unified_kernel_image#Manually -Moreover, efi stub file's header is parsed to apply the correct -offsets according the section alignment factor. -* Remove EFI_SECTION_VMA_INITRD, no need anymore as initrd -section offset dynamically calculated - -Fixes dracutdevs#2275 - -Signed-off-by: Valentin Lefebvre ---- - dracut-functions.sh | 23 +++++++++++++++++++++++ - dracut.sh | 45 +++++++++++++++++++++++++++++++++++---------- - 2 files changed, 58 insertions(+), 10 deletions(-) - -diff --git a/dracut-functions.sh b/dracut-functions.sh -index 280e4e7..78547f3 100755 ---- a/dracut-functions.sh -+++ b/dracut-functions.sh -@@ -1011,3 +1011,26 @@ get_dev_module() { - fi - echo "$dev_drivers" - } -+ -+# Check if file is in PE format -+pe_file_format() { -+ if [[ $# -eq 1 ]]; then -+ local magic -+ magic=$(objdump -p "$1" \ -+ | awk '{if ($1 == "Magic"){print strtonum("0x"$2)}}') -+ magic=$(printf "0x%x" "$magic") -+ # 0x10b (PE32), 0x20b (PE32+) -+ [[ $magic == 0x20b || $magic == 0x10b ]] && return 0 -+ fi -+ return 1 -+} -+ -+# Get the sectionAlignment data from the PE header -+pe_get_section_align() { -+ local align_hex -+ [[ $# -ne "1" ]] && return 1 -+ [[ $(pe_file_format "$1") -eq 1 ]] && return 1 -+ align_hex=$(objdump -p "$1" \ -+ | awk '{if ($1 == "SectionAlignment"){print $2}}') -+ echo "$((16#$align_hex))" -+} -diff --git a/dracut.sh b/dracut.sh -index 031dd85..f42ef89 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -1447,7 +1447,6 @@ if [[ ! $print_cmdline ]]; then - exit 1 - fi - unset EFI_MACHINE_TYPE_NAME -- EFI_SECTION_VMA_INITRD=0x3000000 - case "${DRACUT_ARCH:-$(uname -m)}" in - x86_64) - EFI_MACHINE_TYPE_NAME=x64 -@@ -1457,8 +1456,6 @@ if [[ ! $print_cmdline ]]; then - ;; - aarch64) - EFI_MACHINE_TYPE_NAME=aa64 -- # aarch64 kernels are uncompressed and thus larger, so we need a bigger gap between vma sections -- EFI_SECTION_VMA_INITRD=0x4000000 - ;; - *) - dfatal "Architecture '${DRACUT_ARCH:-$(uname -m)}' not supported to create a UEFI executable" -@@ -2617,29 +2614,57 @@ if [[ $uefi == yes ]]; then - fi - fi - -+ offs=$(objdump -h "$uefi_stub" 2> /dev/null | awk 'NF==7 {size=strtonum("0x"$3);\ -+ offset=strtonum("0x"$4)} END {print size + offset}') -+ if [[ $offs -eq 0 ]]; then -+ dfatal "Failed to get the size of $uefi_stub to create UEFI image file" -+ exit 1 -+ fi -+ align=$(pe_get_section_align "$uefi_stub") -+ if [[ $? -eq 1 ]]; then -+ dfatal "Failed to get the sectionAlignment of the stub PE header to create the UEFI image file" -+ exit 1 -+ fi -+ offs=$((offs + "$align" - offs % "$align")) -+ [[ -s $dracutsysrootdir/usr/lib/os-release ]] && uefi_osrelease="$dracutsysrootdir/usr/lib/os-release" -+ [[ -s $dracutsysrootdir/etc/os-release ]] && uefi_osrelease="$dracutsysrootdir/etc/os-release" -+ [[ -s $uefi_osrelease ]] \ -+ && uefi_osrelease_offs=${offs} \ -+ && offs=$((offs + $(stat -Lc%s "$uefi_osrelease"))) \ -+ && offs=$((offs + "$align" - offs % "$align")) -+ - if [[ $kernel_cmdline ]] || [[ $hostonly_cmdline == yes && -e "${uefi_outdir}/cmdline.txt" ]]; then - echo -ne "\x00" >> "$uefi_outdir/cmdline.txt" - dinfo "Using UEFI kernel cmdline:" - dinfo "$(tr -d '\000' < "$uefi_outdir/cmdline.txt")" - uefi_cmdline="${uefi_outdir}/cmdline.txt" -+ uefi_cmdline_offs=${offs} -+ offs=$((offs + $(stat -Lc%s "$uefi_cmdline"))) -+ offs=$((offs + "$align" - offs % "$align")) - else - unset uefi_cmdline - fi - -- [[ -s $dracutsysrootdir/usr/lib/os-release ]] && uefi_osrelease="$dracutsysrootdir/usr/lib/os-release" -- [[ -s $dracutsysrootdir/etc/os-release ]] && uefi_osrelease="$dracutsysrootdir/etc/os-release" - if [[ -s ${dracutsysrootdir}${uefi_splash_image} ]]; then - uefi_splash_image="${dracutsysrootdir}${uefi_splash_image}" -+ uefi_splash_offs=${offs} -+ offs=$((offs + $(stat -Lc%s "$uefi_splash_image"))) -+ offs=$((offs + "$align" - offs % "$align")) - else - unset uefi_splash_image - fi - -+ uefi_linux_offs="${offs}" -+ offs=$((offs + $(stat -Lc%s "$kernel_image"))) -+ offs=$((offs + "$align" - offs % "$align")) -+ uefi_initrd_offs="${offs}" -+ - if objcopy \ -- ${uefi_osrelease:+--add-section .osrel="$uefi_osrelease" --change-section-vma .osrel=0x20000} \ -- ${uefi_cmdline:+--add-section .cmdline="$uefi_cmdline" --change-section-vma .cmdline=0x30000} \ -- ${uefi_splash_image:+--add-section .splash="$uefi_splash_image" --change-section-vma .splash=0x40000} \ -- --add-section .linux="$kernel_image" --change-section-vma .linux=0x2000000 \ -- --add-section .initrd="${DRACUT_TMPDIR}/initramfs.img" --change-section-vma .initrd="${EFI_SECTION_VMA_INITRD}" \ -+ ${uefi_osrelease:+--add-section .osrel="$uefi_osrelease" --change-section-vma .osrel=$(printf 0x%x "$uefi_osrelease_offs")} \ -+ ${uefi_cmdline:+--add-section .cmdline="$uefi_cmdline" --change-section-vma .cmdline=$(printf 0x%x "$uefi_cmdline_offs")} \ -+ ${uefi_splash_image:+--add-section .splash="$uefi_splash_image" --change-section-vma .splash=$(printf 0x%x "$uefi_splash_offs")} \ -+ --add-section .linux="$kernel_image" --change-section-vma .linux="$(printf 0x%x "$uefi_linux_offs")" \ -+ --add-section .initrd="${DRACUT_TMPDIR}/initramfs.img" --change-section-vma .initrd="$(printf 0x%x "$uefi_initrd_offs")" \ - "$uefi_stub" "${uefi_outdir}/linux.efi"; then - if [[ -n ${uefi_secureboot_key} && -n ${uefi_secureboot_cert} ]]; then - if sbsign \ --- -2.39.2 - diff --git a/0001-fix-make-iso-scan-trigger-udev-events.patch b/0001-fix-make-iso-scan-trigger-udev-events.patch deleted file mode 100644 index 114df3e..0000000 --- a/0001-fix-make-iso-scan-trigger-udev-events.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 7b530f26368d723dcc34fb67d687c60009b06412 Mon Sep 17 00:00:00 2001 -From: 0x5c -Date: Thu, 9 Feb 2023 05:26:30 -0500 -Subject: [PATCH] fix: make iso-scan trigger udev events - -Fixes #2183 ---- - modules.d/90dmsquash-live/iso-scan.sh | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/modules.d/90dmsquash-live/iso-scan.sh b/modules.d/90dmsquash-live/iso-scan.sh -index 886d2303..fa06b33c 100755 ---- a/modules.d/90dmsquash-live/iso-scan.sh -+++ b/modules.d/90dmsquash-live/iso-scan.sh -@@ -22,6 +22,7 @@ do_iso_scan() { - mount -t auto -o ro "$dev" "/run/initramfs/isoscan" || continue - if [ -f "/run/initramfs/isoscan/$isofile" ]; then - losetup -f "/run/initramfs/isoscan/$isofile" -+ udevadm trigger --action=add > /dev/null 2>&1 - ln -s "$dev" /run/initramfs/isoscandev - rm -f -- "$job" - exit 0 --- -2.41.0 - diff --git a/0001-fix-systemd-pcrphase-rename-systemd-pcrphase-binary-.patch b/0001-fix-systemd-pcrphase-rename-systemd-pcrphase-binary-.patch deleted file mode 100644 index 919ff80..0000000 --- a/0001-fix-systemd-pcrphase-rename-systemd-pcrphase-binary-.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 805728cabf81ddef6a550b95d08f1f6e00e0cf8b Mon Sep 17 00:00:00 2001 -From: Antonio Alvarez Feijoo -Date: Tue, 26 Sep 2023 08:12:23 +0200 -Subject: [PATCH] fix(systemd-pcrphase): rename systemd-pcrphase binary to - systemd-pcrextend - -The `systemd-pcrphase` binary has been renamed to `systemd-pcrextend` since -https://github.com/systemd/systemd/commit/32295fa0 ---- - modules.d/01systemd-pcrphase/module-setup.sh | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/modules.d/01systemd-pcrphase/module-setup.sh b/modules.d/01systemd-pcrphase/module-setup.sh -index 3dbb4974ef..b9817e6405 100755 ---- a/modules.d/01systemd-pcrphase/module-setup.sh -+++ b/modules.d/01systemd-pcrphase/module-setup.sh -@@ -6,7 +6,7 @@ - check() { - - # If the binary(s) requirements are not fulfilled the module can't be installed. -- require_binaries "$systemdutildir"/systemd-pcrphase || return 1 -+ require_binaries "$systemdutildir"/systemd-pcrextend || return 1 - - # Return 255 to only include the module, if another module requires it. - return 255 -@@ -27,7 +27,7 @@ depends() { - install() { - - inst_multiple -o \ -- "$systemdutildir"/systemd-pcrphase \ -+ "$systemdutildir"/systemd-pcrextend \ - "$systemdsystemunitdir"/systemd-pcrphase.service \ - "$systemdsystemunitdir/systemd-pcrphase.service.d/*.conf" \ - "$systemdsystemunitdir"/systemd-pcrphase-sysinit.service \ diff --git a/0001-fix-wait-12-hours-before-halt-on-media-check-fail.patch b/0001-fix-wait-12-hours-before-halt-on-media-check-fail.patch deleted file mode 100644 index 8276ca7..0000000 --- a/0001-fix-wait-12-hours-before-halt-on-media-check-fail.patch +++ /dev/null @@ -1,40 +0,0 @@ -From a1b346121da44908b2685d8ef1b5e68b57829b2b Mon Sep 17 00:00:00 2001 -From: Adam Williamson -Date: Sun, 29 Oct 2023 21:19:36 -0700 -Subject: [PATCH] fix: wait 12 hours before halt on media check fail - -If a modesetting driver has been loaded by the time the media -check happens, halting the system (as we currently do immediately -if the check fails) blanks the screen, which is confusing for -the user. This adds a warning message and a 12-hour wait before -the system is eventually halted, so the user can see the media -check failure and (presumably) reboot and fix the medium. - -It also tweaks the text of the failure message not to call it a -"CD check", since it's not 1998 any more. - -https://bugzilla.redhat.com/show_bug.cgi?id=2246410 - -Signed-off-by: Adam Williamson ---- - modules.d/90dmsquash-live/dmsquash-live-root.sh | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/modules.d/90dmsquash-live/dmsquash-live-root.sh b/modules.d/90dmsquash-live/dmsquash-live-root.sh -index e8083394..3fccda5f 100755 ---- a/modules.d/90dmsquash-live/dmsquash-live-root.sh -+++ b/modules.d/90dmsquash-live/dmsquash-live-root.sh -@@ -76,7 +76,9 @@ if [ -n "$check" ]; then - checkisomd5 --verbose "$check_dev" - fi - if [ $? -eq 1 ]; then -- die "CD check failed!" -+ warn "Media check failed! We do not recommend using this medium. System will halt in 12 hours" -+ sleep 43200 -+ die "Media check failed!" - exit 1 - fi - type plymouth > /dev/null 2>&1 && plymouth --show-splash --- -2.41.0 - diff --git a/0002-fix-systemd-pcrphase-rename-systemd-pcrphase-binary-.patch b/0002-fix-systemd-pcrphase-rename-systemd-pcrphase-binary-.patch new file mode 100644 index 0000000..fd998ae --- /dev/null +++ b/0002-fix-systemd-pcrphase-rename-systemd-pcrphase-binary-.patch @@ -0,0 +1,39 @@ +From 12f3824a30300154928c3482b02b6e1e63ce8be8 Mon Sep 17 00:00:00 2001 +From: Antonio Alvarez Feijoo +Date: Tue, 26 Sep 2023 08:12:23 +0200 +Subject: [PATCH 02/10] fix(systemd-pcrphase): rename systemd-pcrphase binary + to systemd-pcrextend + +The `systemd-pcrphase` binary has been renamed to `systemd-pcrextend` since +https://github.com/systemd/systemd/commit/32295fa0 + +(Cherry-picked 8d9b558939ebdbbbeefbb1cbcd6d6825efc901fb from PR#2526) +--- + modules.d/01systemd-pcrphase/module-setup.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/modules.d/01systemd-pcrphase/module-setup.sh b/modules.d/01systemd-pcrphase/module-setup.sh +index fa960a42..77f05eb7 100755 +--- a/modules.d/01systemd-pcrphase/module-setup.sh ++++ b/modules.d/01systemd-pcrphase/module-setup.sh +@@ -6,7 +6,7 @@ + check() { + + # If the binary(s) requirements are not fulfilled the module can't be installed. +- require_binaries "$systemdutildir"/systemd-pcrphase || return 1 ++ require_binaries "$systemdutildir"/systemd-pcrextend || return 1 + + # Return 255 to only include the module, if another module requires it. + return 255 +@@ -27,7 +27,7 @@ depends() { + install() { + + inst_multiple -o \ +- "$systemdutildir"/systemd-pcrphase \ ++ "$systemdutildir"/systemd-pcrextend \ + "$systemdsystemunitdir"/systemd-pcrphase-initrd.service \ + "$systemdsystemunitdir/systemd-pcrphase-initrd.service.d/*.conf" \ + "$systemdsystemunitdir"/initrd.target.wants/systemd-pcrphase-initrd.service +-- +2.42.0 + diff --git a/0003-fix-resume-add-new-systemd-hibernate-resume.service.patch b/0003-fix-resume-add-new-systemd-hibernate-resume.service.patch new file mode 100644 index 0000000..6945dc0 --- /dev/null +++ b/0003-fix-resume-add-new-systemd-hibernate-resume.service.patch @@ -0,0 +1,31 @@ +From 28ecd1f24f82a90852b65f57c1caa98838d25c97 Mon Sep 17 00:00:00 2001 +From: Antonio Alvarez Feijoo +Date: Tue, 26 Sep 2023 09:43:37 +0200 +Subject: [PATCH 03/10] fix(resume): add new systemd-hibernate-resume.service + +Since https://github.com/systemd/systemd/commit/a628d933, the generator only +does the initial validation of the system info and then enables the new +`systemd-hibernate-resume.service`. + +Fixes #2513 + +(Cherry-picked a2fe89116db4b286fbf515f26bd1773b5e6ee8ad from PR#2557) +--- + modules.d/95resume/module-setup.sh | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/modules.d/95resume/module-setup.sh b/modules.d/95resume/module-setup.sh +index d2551033..9204f9cb 100755 +--- a/modules.d/95resume/module-setup.sh ++++ b/modules.d/95resume/module-setup.sh +@@ -44,6 +44,7 @@ install() { + if dracut_module_included "systemd" && [[ -x $dracutsysrootdir$systemdutildir/systemd-hibernate-resume ]]; then + inst_multiple -o \ + "$systemdutildir"/system-generators/systemd-hibernate-resume-generator \ ++ "$systemdsystemunitdir"/systemd-hibernate-resume.service \ + "$systemdsystemunitdir"/systemd-hibernate-resume@.service \ + "$systemdutildir"/systemd-hibernate-resume + return 0 +-- +2.42.0 + diff --git a/0004-fix-wait-12-hours-before-halt-on-media-check-fail.patch b/0004-fix-wait-12-hours-before-halt-on-media-check-fail.patch new file mode 100644 index 0000000..4c6afe4 --- /dev/null +++ b/0004-fix-wait-12-hours-before-halt-on-media-check-fail.patch @@ -0,0 +1,42 @@ +From 5beddfca4192a28898904610a54d1cbc58d5856b Mon Sep 17 00:00:00 2001 +From: Adam Williamson +Date: Sun, 29 Oct 2023 21:19:36 -0700 +Subject: [PATCH 04/10] fix: wait 12 hours before halt on media check fail + +If a modesetting driver has been loaded by the time the media +check happens, halting the system (as we currently do immediately +if the check fails) blanks the screen, which is confusing for +the user. This adds a warning message and a 12-hour wait before +the system is eventually halted, so the user can see the media +check failure and (presumably) reboot and fix the medium. + +It also tweaks the text of the failure message not to call it a +"CD check", since it's not 1998 any more. + +https://bugzilla.redhat.com/show_bug.cgi?id=2246410 + +Signed-off-by: Adam Williamson + +(Cherry-picked a1b346121da44908b2685d8ef1b5e68b57829b2b from PR#2545) +--- + modules.d/90dmsquash-live/dmsquash-live-root.sh | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/modules.d/90dmsquash-live/dmsquash-live-root.sh b/modules.d/90dmsquash-live/dmsquash-live-root.sh +index e8083394..3fccda5f 100755 +--- a/modules.d/90dmsquash-live/dmsquash-live-root.sh ++++ b/modules.d/90dmsquash-live/dmsquash-live-root.sh +@@ -76,7 +76,9 @@ if [ -n "$check" ]; then + checkisomd5 --verbose "$check_dev" + fi + if [ $? -eq 1 ]; then +- die "CD check failed!" ++ warn "Media check failed! We do not recommend using this medium. System will halt in 12 hours" ++ sleep 43200 ++ die "Media check failed!" + exit 1 + fi + type plymouth > /dev/null 2>&1 && plymouth --show-splash +-- +2.42.0 + diff --git a/0005-feat-network-include-98-default-mac-none.link-if-it-.patch b/0005-feat-network-include-98-default-mac-none.link-if-it-.patch new file mode 100644 index 0000000..7d4fb0c --- /dev/null +++ b/0005-feat-network-include-98-default-mac-none.link-if-it-.patch @@ -0,0 +1,70 @@ +From aa45d7d857b39e0f2824b94902aa9197bee9a479 Mon Sep 17 00:00:00 2001 +From: Dusty Mabe +Date: Tue, 21 Feb 2023 22:21:35 -0500 +Subject: [PATCH 05/10] feat(network): include 98-default-mac-none.link if it + exists + +In Fedora Linux there was a new 98-default-mac-none.link file added +to set the MACAddressPolicy=none for bond/bridge/team devices. We'd +like for this policy to apply in the initramfs as well. See + +- https://fedoraproject.org/wiki/Changes/MAC_Address_Policy_none +- https://src.fedoraproject.org/rpms/systemd/pull-request/100# + +(Cherry-picked commit f6810b69ae722096184eaaf282e12a2caa6928b9 from PR#2224) +--- + modules.d/01systemd-networkd/module-setup.sh | 1 + + modules.d/35network-legacy/module-setup.sh | 6 ++++-- + modules.d/35network-manager/module-setup.sh | 6 ++++-- + 3 files changed, 9 insertions(+), 4 deletions(-) + +diff --git a/modules.d/01systemd-networkd/module-setup.sh b/modules.d/01systemd-networkd/module-setup.sh +index 7bbf83c0..f82aa933 100755 +--- a/modules.d/01systemd-networkd/module-setup.sh ++++ b/modules.d/01systemd-networkd/module-setup.sh +@@ -47,6 +47,7 @@ install() { + "$systemdnetwork"/80-container-vz.network \ + "$systemdnetwork"/80-vm-vt.network \ + "$systemdnetwork"/80-wifi-adhoc.network \ ++ "$systemdnetwork"/98-default-mac-none.link \ + "$systemdnetwork"/99-default.link \ + "$systemdsystemunitdir"/systemd-networkd.service \ + "$systemdsystemunitdir"/systemd-networkd.socket \ +diff --git a/modules.d/35network-legacy/module-setup.sh b/modules.d/35network-legacy/module-setup.sh +index 868ea8fc..a42f5797 100755 +--- a/modules.d/35network-legacy/module-setup.sh ++++ b/modules.d/35network-legacy/module-setup.sh +@@ -23,9 +23,11 @@ installkernel() { + install() { + local _arch + +- #Adding default link ++ # Adding default link and (if exists) 98-default-mac-none.link + if dracut_module_included "systemd"; then +- inst_multiple -o "${systemdnetwork}/99-default.link" ++ inst_multiple -o \ ++ "${systemdnetwork}/99-default.link" \ ++ "${systemdnetwork}/98-default-mac-none.link" + [[ $hostonly ]] && inst_multiple -H -o "${systemdnetworkconfdir}/*.link" + fi + +diff --git a/modules.d/35network-manager/module-setup.sh b/modules.d/35network-manager/module-setup.sh +index d9a244a3..1e3010a3 100755 +--- a/modules.d/35network-manager/module-setup.sh ++++ b/modules.d/35network-manager/module-setup.sh +@@ -51,8 +51,10 @@ install() { + inst_simple "$moddir"/nm-initrd.service "$systemdsystemunitdir"/nm-initrd.service + inst_simple "$moddir"/nm-wait-online-initrd.service "$systemdsystemunitdir"/nm-wait-online-initrd.service + +- # Adding default link +- inst_multiple -o "${systemdnetwork}/99-default.link" ++ # Adding default link and (if exists) 98-default-mac-none.link ++ inst_multiple -o \ ++ "${systemdnetwork}/99-default.link" \ ++ "${systemdnetwork}/98-default-mac-none.link" + [[ $hostonly ]] && inst_multiple -H -o "${systemdnetworkconfdir}/*.link" + + $SYSTEMCTL -q --root "$initdir" enable nm-initrd.service +-- +2.42.0 + diff --git a/0006-feat-kernel-modules-add-Qualcomm-IPC-router-to-enabl.patch b/0006-feat-kernel-modules-add-Qualcomm-IPC-router-to-enabl.patch new file mode 100644 index 0000000..1cc4a7a --- /dev/null +++ b/0006-feat-kernel-modules-add-Qualcomm-IPC-router-to-enabl.patch @@ -0,0 +1,52 @@ +From f38de6b6ad07edf5c534ae7a38b3fa48f5ef6153 Mon Sep 17 00:00:00 2001 +From: Jeremy Linton +Date: Fri, 6 Oct 2023 10:33:22 -0500 +Subject: [PATCH 06/10] feat(kernel-modules): add Qualcomm IPC router to enable + USB + +The x13s, and possibly other Qualcomm based devices need the QC +IPC router driver in order to enable USB. Without it, its not +possible to boot from USB-C attached disks. + +IPC in this case is Inter _Processor_ Communication and forms +the message bus used to communicate between differing processing +elements in a given system/SoC running and managing various +hardware devices. This means that while it appears this driver +should be in the dracut network modules that is incorrect +because its not for enabling host networking in the initrd, +but rather for communicating with other hardware blocks. + +Those other blocks aren't limited to modems, but any SMD (shared +memory device), which on QC based machines includes the audio DSPs, +RPM (resource power manager) and of course the application +processor cores linux is running on. + +References: +https://osmocom.org/projects/quectel-modems/wiki/Qualcomm_Linux_SMD +https://android.googlesource.com/kernel/msm/+/android-7.1.0_r0.2/Documentation/arm/msm/msm_ipc_router.txt +https://github.com/dracutdevs/dracut/pull/2531 + +Signed-off-by: Jeremy Linton + +(Cherry-picked commit a8015f7dfc682100434e3ee051bf9472a8e6cad4 from PR#2531) +--- + modules.d/90kernel-modules/module-setup.sh | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh +index e2175125..75afecc8 100755 +--- a/modules.d/90kernel-modules/module-setup.sh ++++ b/modules.d/90kernel-modules/module-setup.sh +@@ -95,7 +95,8 @@ installkernel() { + "=drivers/usb/misc" \ + "=drivers/usb/musb" \ + "=drivers/usb/phy" \ +- "=drivers/scsi/hisi_sas" ++ "=drivers/scsi/hisi_sas" \ ++ "=net/qrtr" + fi + + awk -F: '/^\// {print $1}' "$srcmods/modules.dep" 2> /dev/null | instmods +-- +2.42.0 + diff --git a/0007-fix-kernel-install-do-not-generate-an-initrd-when-on.patch b/0007-fix-kernel-install-do-not-generate-an-initrd-when-on.patch new file mode 100644 index 0000000..38e59cb --- /dev/null +++ b/0007-fix-kernel-install-do-not-generate-an-initrd-when-on.patch @@ -0,0 +1,39 @@ +From ee0c17d24940f08a41179edce58f688f807d1d75 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Tue, 18 Jan 2022 18:58:58 +0100 +Subject: [PATCH 07/10] fix(kernel-install): do not generate an initrd when one + was specified + +According to the synopsis, kernel-install can be called with an +already-prepared initrd. In that case, no initrd should be generated by dracut. + +(Cherry-picked commit 0b72cf5c4eca0e0db76e3e210cfdc48e6b49bb74 from PR#1825) +--- + install.d/50-dracut.install | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/install.d/50-dracut.install b/install.d/50-dracut.install +index efb184cd..3907e303 100755 +--- a/install.d/50-dracut.install ++++ b/install.d/50-dracut.install +@@ -4,6 +4,7 @@ COMMAND="$1" + KERNEL_VERSION="$2" + BOOT_DIR_ABS="$3" + KERNEL_IMAGE="$4" ++INITRD_OPTIONS_SHIFT=4 + + # If KERNEL_INSTALL_MACHINE_ID is defined but empty, BOOT_DIR_ABS is a fake directory. + # In this case, do not create the initrd. +@@ -34,6 +35,9 @@ ret=0 + + case "$COMMAND" in + add) ++ # If the initrd was provided on the kernel command line, we shouldn't generate our own. ++ [ "$#" -gt "$INITRD_OPTIONS_SHIFT" ] && exit 0 ++ + if [[ $IMAGE == "uki.efi" ]]; then + IMAGE_PREGENERATED=${KERNEL_IMAGE%/*}/uki.efi + else +-- +2.42.0 + diff --git a/0008-fix-pkcs11-delete-trailing-dot-on-libcryptsetup-toke.patch b/0008-fix-pkcs11-delete-trailing-dot-on-libcryptsetup-toke.patch new file mode 100644 index 0000000..08b749f --- /dev/null +++ b/0008-fix-pkcs11-delete-trailing-dot-on-libcryptsetup-toke.patch @@ -0,0 +1,28 @@ +From 461db48fc56a8521a78314e5f02ed516ed76b1ee Mon Sep 17 00:00:00 2001 +From: innovara +Date: Fri, 27 Oct 2023 11:53:49 +0100 +Subject: [PATCH 08/10] fix(pkcs11): delete trailing dot on + libcryptsetup-token-systemd-pkcs11.so + +libcryptsetup-token-systemd-pkcs11.so.* doesn't match the file libcryptsetup-token-systemd-pkcs11.so + +(Cherry-picked commit 5edaca7637d76a05429a31c28304ef3f476fe2f9 from PR#2540) +--- + modules.d/91pkcs11/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/91pkcs11/module-setup.sh b/modules.d/91pkcs11/module-setup.sh +index 547631db..5675efb5 100755 +--- a/modules.d/91pkcs11/module-setup.sh ++++ b/modules.d/91pkcs11/module-setup.sh +@@ -30,6 +30,6 @@ install() { + {"tls/$_arch/",tls/,"$_arch/",}"libffi.so.*" \ + {"tls/$_arch/",tls/,"$_arch/",}"libp11-kit.so.*" \ + {"tls/$_arch/",tls/,"$_arch/",}"libcryptsetup.so.*" \ +- {"tls/$_arch/",tls/,"$_arch/",}"/cryptsetup/libcryptsetup-token-systemd-pkcs11.so.*" ++ {"tls/$_arch/",tls/,"$_arch/",}"/cryptsetup/libcryptsetup-token-systemd-pkcs11.so*" + + } +-- +2.42.0 + diff --git a/0009-fix-pcsc-add-disable-polkit-to-pcscd.service.patch b/0009-fix-pcsc-add-disable-polkit-to-pcscd.service.patch new file mode 100644 index 0000000..6792edc --- /dev/null +++ b/0009-fix-pcsc-add-disable-polkit-to-pcscd.service.patch @@ -0,0 +1,30 @@ +From edd63a5f7542e010fb44ff62146938bda80406f7 Mon Sep 17 00:00:00 2001 +From: Manuel Fombuena +Date: Fri, 3 Nov 2023 11:53:38 +0000 +Subject: [PATCH 09/10] fix(pcsc): add --disable-polkit to pcscd.service + +Needs pcsc >= 2.0.0 + +polkit is not included in dracut and without this option, pcscd simply fails + +(Cherry-picked commit 842be0c89fe0cc8cac9efa88e68b07ae1c2d2464 from PR#2547) +--- + modules.d/91pcsc/pcscd.service | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/91pcsc/pcscd.service b/modules.d/91pcsc/pcscd.service +index 639decd2..7d4e0a2b 100644 +--- a/modules.d/91pcsc/pcscd.service ++++ b/modules.d/91pcsc/pcscd.service +@@ -5,7 +5,7 @@ Documentation=man:pcscd(8) + Requires=pcscd.socket + + [Service] +-ExecStart=/usr/sbin/pcscd --foreground --auto-exit ++ExecStart=/usr/sbin/pcscd --foreground --auto-exit --disable-polkit + ExecReload=/usr/sbin/pcscd --hotplug + + [Install] +-- +2.42.0 + diff --git a/0010-fix-pcsc-add-opensc-load-module-file.patch b/0010-fix-pcsc-add-opensc-load-module-file.patch new file mode 100644 index 0000000..78acec8 --- /dev/null +++ b/0010-fix-pcsc-add-opensc-load-module-file.patch @@ -0,0 +1,29 @@ +From 8069d40c0e180cd74d4e897c007096523ecce459 Mon Sep 17 00:00:00 2001 +From: Manuel Fombuena +Date: Fri, 3 Nov 2023 09:04:53 +0000 +Subject: [PATCH 10/10] fix(pcsc): add opensc load module file + +On Fedora, and possibly others, this file loads opensc-pkcs11.so which you need to interact with the smart card to unlock a LUKS encrypted volume. + +(Cherry-picked commit 6da61a2c0e38da4e6e880e1bb7f47d55d2c54c65 from PR#2547) +--- + modules.d/91pcsc/module-setup.sh | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/modules.d/91pcsc/module-setup.sh b/modules.d/91pcsc/module-setup.sh +index 6f8b2c88..26b463d4 100755 +--- a/modules.d/91pcsc/module-setup.sh ++++ b/modules.d/91pcsc/module-setup.sh +@@ -29,7 +29,8 @@ install() { + inst_simple "$moddir/pcscd.socket" "${systemdsystemunitdir}"/pcscd.socket + + inst_multiple -o \ +- pcscd ++ pcscd \ ++ /usr/share/p11-kit/modules/opensc.module + + # Enable systemd type unit(s) + for i in \ +-- +2.42.0 + diff --git a/1521-Never-enable-the-bluetooth-module-by-default.patch b/1521-Never-enable-the-bluetooth-module-by-default.patch deleted file mode 100644 index f815750..0000000 --- a/1521-Never-enable-the-bluetooth-module-by-default.patch +++ /dev/null @@ -1,33 +0,0 @@ -From ea8c9b1c4f39c52fc45788516dea19892cc275f7 Mon Sep 17 00:00:00 2001 -From: Adam Williamson -Date: Thu, 10 Jun 2021 08:41:30 -0700 -Subject: [PATCH] Never enable the bluetooth module by default (#1521) - -Signed-off-by: Adam Williamson ---- - modules.d/62bluetooth/module-setup.sh | 9 +-------- - 1 file changed, 1 insertion(+), 8 deletions(-) - -diff --git a/modules.d/62bluetooth/module-setup.sh b/modules.d/62bluetooth/module-setup.sh -index b8270dd5..fd22670d 100755 ---- a/modules.d/62bluetooth/module-setup.sh -+++ b/modules.d/62bluetooth/module-setup.sh -@@ -6,14 +6,7 @@ - check() { - # If the binary(s) requirements are not fulfilled the module can't be installed - require_any_binary /usr/lib/bluetooth/bluetoothd /usr/libexec/bluetooth/bluetoothd || return 1 -- -- if [[ $hostonly ]]; then -- # Include by default if a Peripheral (0x500) is found of minor class: -- # * Keyboard (0x40) -- # * Keyboard/pointing (0xC0) -- grep -qiE 'Class=0x[0-9a-f]{3}5[4c]0' /var/lib/bluetooth/*/*/info 2> /dev/null && return 0 -- fi -- -+ # disabled until https://github.com/dracutdevs/dracut/issues/1521 is resolved - return 255 - } - --- -2.32.0.rc2 - diff --git a/1825-Skip-creating-initrd-when-initrd-is-provided.patch b/1825-Skip-creating-initrd-when-initrd-is-provided.patch deleted file mode 100644 index 085ae7b..0000000 --- a/1825-Skip-creating-initrd-when-initrd-is-provided.patch +++ /dev/null @@ -1,93 +0,0 @@ -From f47bcdd7342ca0d46b889e712a1c7446e18434bc Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= -Date: Tue, 18 Jan 2022 18:08:42 +0100 -Subject: [PATCH 1/2] feat(kernel-install): do nothing when - $KERNEL_INSTALL_INITRD_GENERATOR says so - -dracut may be installed without being actually used. This is very common in -binary distros where a package may be pulled in through dependencies, even -though the user does not need it in a particular setup. KERNEL_INSTALL_INITRD_GENERATOR -is being added in systemd's kernel-install to select which of the possibly many -initrd generation mechanisms will be used. - -For backwards compat, if it not set, continue as before. But if set to -something else, skip our kernel-install plugins. ---- - install.d/50-dracut.install | 8 +++++++- - install.d/51-dracut-rescue.install | 5 +++++ - 2 files changed, 12 insertions(+), 1 deletion(-) - -diff --git a/install.d/50-dracut.install b/install.d/50-dracut.install -index 70632ec7f..552fd0338 100755 ---- a/install.d/50-dracut.install -+++ b/install.d/50-dracut.install -@@ -6,11 +6,17 @@ BOOT_DIR_ABS="$3" - KERNEL_IMAGE="$4" - - # If KERNEL_INSTALL_MACHINE_ID is defined but empty, BOOT_DIR_ABS is a fake directory. --# So, let's skip to create initrd. -+# In this case, do not create the initrd. - if ! [[ ${KERNEL_INSTALL_MACHINE_ID-x} ]]; then - exit 0 - fi - -+# Skip this plugin if we're using a different generator. If nothing is specified, -+# assume we're wanted since we're installed. -+if [ "${KERNEL_INSTALL_INITRD_GENERATOR:-dracut}" != "dracut" ]; then -+ exit 0 -+fi -+ - if [[ -d "$BOOT_DIR_ABS" ]]; then - INITRD="initrd" - else -diff --git a/install.d/51-dracut-rescue.install b/install.d/51-dracut-rescue.install -index 8bf9a6d95..93483931a 100755 ---- a/install.d/51-dracut-rescue.install -+++ b/install.d/51-dracut-rescue.install -@@ -7,6 +7,11 @@ KERNEL_VERSION="$2" - BOOT_DIR_ABS="${3%/*}/0-rescue" - KERNEL_IMAGE="$4" - -+# Skip this plugin if we're using a different generator. If nothing is specified, -+# assume we're wanted since we're installed. -+if [ "${KERNEL_INSTALL_INITRD_GENERATOR:-dracut}" != "dracut" ]; then -+ exit 0 -+fi - - dropindirs_sort() - { - -From 0b72cf5c4eca0e0db76e3e210cfdc48e6b49bb74 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= -Date: Tue, 18 Jan 2022 18:58:58 +0100 -Subject: [PATCH 2/2] fix(kernel-install): do not generate an initrd when one - was specified - -According to the synopsis, kernel-install can be called with an -already-prepared initrd. In that case, no initrd should be generated by dracut. ---- - install.d/50-dracut.install | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/install.d/50-dracut.install b/install.d/50-dracut.install -index 552fd0338..836251e92 100755 ---- a/install.d/50-dracut.install -+++ b/install.d/50-dracut.install -@@ -4,6 +4,7 @@ COMMAND="$1" - KERNEL_VERSION="$2" - BOOT_DIR_ABS="$3" - KERNEL_IMAGE="$4" -+INITRD_OPTIONS_SHIFT=4 - - # If KERNEL_INSTALL_MACHINE_ID is defined but empty, BOOT_DIR_ABS is a fake directory. - # In this case, do not create the initrd. -@@ -27,6 +28,9 @@ fi - ret=0 - case "$COMMAND" in - add) -+ # If the initrd was provided on the kernel command line, we shouldn't generate our own. -+ [ "$#" -gt "$INITRD_OPTIONS_SHIFT" ] && exit 0 -+ - INITRD_IMAGE_PREGENERATED=${KERNEL_IMAGE%/*}/initrd - if [[ -f ${INITRD_IMAGE_PREGENERATED} ]]; then - # we found an initrd at the same place as the kernel diff --git a/2134-revert-avoid-restarting-NetworkManager.patch b/2134-revert-avoid-restarting-NetworkManager.patch deleted file mode 100644 index ab03c22..0000000 --- a/2134-revert-avoid-restarting-NetworkManager.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 5dc6aede4b99f1c76219370660b5b62e935a3cb8 Mon Sep 17 00:00:00 2001 -From: Lubomir Rintel -Date: Tue, 20 Dec 2022 13:06:43 +0100 -Subject: [PATCH] revert(network-manager): avoid restarting NetworkManager - -This reverts commit 77630365aed201a729c73a9ffda0733a75f3fee4. - -Its commit message states: - - On EL8.3 the NetworkManager keep restarting even if it exits successfully - while waiting for Clevis to unlock. This patch ensures NetworkManager runs - only once in initrd. - -Yes; NetworkManager is run multiple times, so that it's able to -configure interfaces that haven't been seen previously (because bus was -slow to scan or device took time to initialize). - -It's not clear what problem was the original commit trying to fix. -I suspect there was no problem, just a misunderstanding. ---- - modules.d/35network-manager/nm-run.sh | 4 ---- - 1 file changed, 4 deletions(-) - -diff --git a/modules.d/35network-manager/nm-run.sh b/modules.d/35network-manager/nm-run.sh -index 7d8d61fa7..14b9cb1ad 100755 ---- a/modules.d/35network-manager/nm-run.sh -+++ b/modules.d/35network-manager/nm-run.sh -@@ -2,10 +2,6 @@ - - type source_hook > /dev/null 2>&1 || . /lib/dracut-lib.sh - --if [ -e /tmp/nm.done ]; then -- return --fi -- - if [ -z "$DRACUT_SYSTEMD" ]; then - # Only start NM if networking is needed - if [ -e /run/NetworkManager/initrd/neednet ]; then diff --git a/2184-add-nvmeof-module.patch b/2184-add-nvmeof-module.patch deleted file mode 100644 index f151dae..0000000 --- a/2184-add-nvmeof-module.patch +++ /dev/null @@ -1,629 +0,0 @@ -From 43e9997521d6c10ec8dae340dc117dd6cbd73a2a Mon Sep 17 00:00:00 2001 -From: Martin Wilck -Date: Fri, 16 Sep 2022 21:36:52 +0200 -Subject: [PATCH] (Cherry-picked commits: - 9664e98b5db603567d42d4d0c6e6ea1bd3d5bf24 - b3ff3f3fbce6878a754332cd4a05374e5e1156c8 - a3cf4ec92202df43adf368c7fdd12e35d304a0e4 - 03921ec09e95ea49f89ae307dcca4e2e3d1bc6d6 - e93e46520dd89a7357a15441ab6b141ff9ff9aeb - 556ef46aa96650d72b2fd850a09fa04dff64bbb8 - a93968b07567a654d18b8ef2144337d803186eca - a65fab69662d3adf52eb968411f59ebc5a173f7c - cf8986af7d9a3ce73f330de23d5312f924acea34 - 7c28e1148c086d8504caab6e70a1bcfda1bbf0b9 - b03dc850e4630c3b727f71b853a1be588507a59e - 0a4d7f9aece172f0f9a9286c94308b7e1ef8d500) - -fix(nvmf): nvme list-subsys prints the address using commas as separator - -nvme-cli 1.x printed the address using spaces as separator, but nvme-cli 2.x -prints the address using commas as separator (exact output from sysfs). E.g., -output from `cat /sys/class/nvme/nvme0/address`: - -traddr=nn-0x201700a09890f5bf:pn-0x201900a09890f5bf,host_traddr=nn-0x200000109b579ef5:pn-0x100000109b579ef5 - -Also, I suppress rd.nvmf.discover= cmdline option if all fields are empty. - -fix(nvmf): don't try to validate network connections in cmdline hook - -The cmdline hook runs before any network interfaces have been brought -up. There's no point in trying to validate the connections at this -stage. - -fix(nvmf): no need to load the nvme module - -The module "nvme" is not required for NVMeoF. - -fix(nvmf): don't create did-setup file - -did-setup files are meant to indicate that an interface setup -was successful. Don't do it here. - -fix(nvmf): don't use "finished" queue for autoconnect - -The "finished" initqueue is for testing if everything is alright, -not for triggering any actions. - -fix(nvmf): make sure "rd.nvmf.discover=fc,auto" takes precedence - -The command line may contain several rd.nvmf.discover options. -The "fc,auto" option should take precedence. - -fix(nvmf): avoid calling "exit" in a cmdline hook - -"exit" should never be executed in dracut hooks, because the -hooks are sourced by the main script. - -fix(nvmf): run cmdline hook before parse-ip-opts.sh - -This way we can set "rd.neednet" and have it seen by parse-ip-options.sh - -feat(nvmf): set rd.neednet=1 if tcp records encountered - -This is currently always the case for NBFT records. -We can do this now, as we run before parse-ip-options.sh - -fix(nvmf): install 8021q module unconditionally - -In NBFT setups, VLAN can be configured in the firmware. -Add the 8021q module in hostonly mode even if VLAN is currently -not used to be prepared for such configuration change. - -fix(nvmf): support /etc/nvme/config.json - -Since nvme-cli 2.0, configuration of subsystems to connect to is -stored under `/etc/nvme` in either `discovery.conf` or `config.json`. -Attempt discovery also if the latter exists, but not the former. -Also, install "config.json" if it's present on the root FS. - -As before, "rd.nvmf.discover=fc,auto" will force either file to be ignored, -and NBFT-defined targets take precedence if found. - -feat(nvmf): add code for parsing the NBFT - -Add code to parse the Nvme-oF Boot Firmware Table (NBFT) according -to the NVM Express Boot Specification 1.0 [1]. The implementation in -dracut follows a similar general approach as iBFT support in the -iscsi module. - -NBFT support requires two steps: - -(1) Setting up the network and routing according to the - HFI ("Host Fabric Interface") records in the NBFT, -(2) Establishing the actual NVMe-oF connection. - -(1) is accomplished by reading the NBFT using JSON output from -the "nvme nbft show" command, and transforming it into command -line options ("ip=", "rd.neednet", etc.) understood by dracut's -network module and its backends. The resulting network setup code -is backend-agnostic. It has been tested with the "network-legacy" -and "network-manager" network backend modules. The network setup -code supports IPv4 and IPv6 with static, RA, or DHCP configurations, -802.1q VLANs, and simple routing / gateway setup. - -(2) is done using the "nvme connect-all" command [2] in the netroot handler, -which is invoked by networking backends when an interface gets fully -configured. This patch adds support for "netboot=nbft". The "nbftroot" -handler calls nvmf-autoconnect.sh, which contains the actual connect -logic. nvmf-autoconnect.sh itself is preserved, because there are -other NVMe-oF setups like NVMe over FC which don't depend on the -network. - -The various ways to configure NVMe-oF are prioritized like this: - - 1 FC autoconnect from kernel commandline (rd.nvmf.discover=fc,auto) - 2 NBFT, if present - 3 discovery.conf or config.json, if present, and cmdline.d parameters, - if present (rd.nvmf.discovery=...) - 4 FC autoconnect (without kernel command line) - -The reason for this priorization is that in the initial RAM fs, we try -to activate only those connections that are necessary to mount the root -file system. This avoids confusion, possible contradicting or ambiguous -configuration, and timeouts from unavailable targets. - -A retry logic is implemented for enabling the NVMe-oF connections, -using the "settled" initqueue, the netroot handler, and eventually, the -"timeout" initqueue. This is similar to the retry logic of the iscsi module. -In the "timeout" case, connection to all possible NVMe-oF subsystems -is attempted. - -Two new command line parameters are introduced to make it possible to -change the priorities above: - - - "rd.nvmf.nonbft" causes the NBFT to be ignored, - - "rd.nvmf.nostatic" causes any statically configured NVMe-oF targets - (config.json, discovery.conf, and cmdline.d) to be ignored. - -These parameters may be helpful to skip attempts to set up broken -configurations. - -At initramfs build time, the nvmf module is now enabled if an NBFT -table is detected in the system. - -[1] https://nvmexpress.org/wp-content/uploads/NVM-Express-Boot-Specification-2022.11.15-Ratified.pdf -[2] NBFT support in nvme-cli requires the latest upstream code (> v2.4). - -Signed-off-by: Martin Wilck -Co-authored-by: John Meneghini -Co-authored-by: Charles Rose ---- - man/dracut.cmdline.7.asc | 9 + - modules.d/95nvmf/module-setup.sh | 36 ++- - modules.d/95nvmf/nbftroot.sh | 5 + - modules.d/95nvmf/nvmf-autoconnect.sh | 55 +++- - .../95nvmf/parse-nvmf-boot-connections.sh | 237 ++++++++++++++++-- - create mode 100755 modules.d/95nvmf/nbftroot.sh - -diff --git a/man/dracut.cmdline.7.asc b/man/dracut.cmdline.7.asc -index 93861c56..47a6b6c7 100644 ---- a/man/dracut.cmdline.7.asc -+++ b/man/dracut.cmdline.7.asc -@@ -898,6 +898,15 @@ NVMf - **rd.nonvmf**:: - Disable NVMf - -+**rd.nvmf.nonbft**:: -+ Disable connecting to targets from the NVMe Boot Firmware Table. Without -+ this parameter, NBFT connections will take precedence over _rd.nvmf.discover_. -+ -+**rd.nvmf.nostatic**:: -+ Disable connecting to targets that have been statically configured when -+ the initramfs was built. Targets specified with rd.nvmf.discover on the -+ kernel command line will still be tried. -+ - **rd.nvmf.hostnqn=**____:: - NVMe host NQN to use - -diff --git a/modules.d/95nvmf/module-setup.sh b/modules.d/95nvmf/module-setup.sh -index 476b7f7..1dd2ca5 100755 ---- a/modules.d/95nvmf/module-setup.sh -+++ b/modules.d/95nvmf/module-setup.sh -@@ -2,7 +2,7 @@ - - # called by dracut - check() { -- require_binaries nvme || return 1 -+ require_binaries nvme jq || return 1 - [ -f /etc/nvme/hostnqn ] || return 255 - [ -f /etc/nvme/hostid ] || return 255 - -@@ -18,24 +18,34 @@ check() { - for d in device/nvme*; do - [ -L "$d" ] || continue - if readlink "$d" | grep -q nvme-fabrics; then -- read -r trtype < "$d"/transport -+ trtype=$(cat "$d"/transport) - break - fi - done - [[ $trtype == "fc" ]] || [[ $trtype == "tcp" ]] || [[ $trtype == "rdma" ]] - } - -+ has_nbft() { -+ local f found= -+ for f in /sys/firmware/acpi/tables/NBFT*; do -+ [ -f "$f" ] || continue -+ found=1 -+ break -+ done -+ [[ $found ]] -+ } -+ - [[ $hostonly ]] || [[ $mount_needs ]] && { - pushd . > /dev/null - for_each_host_dev_and_slaves is_nvmf - local _is_nvmf=$? - popd > /dev/null || exit - [[ $_is_nvmf == 0 ]] || return 255 -- if [ ! -f /sys/class/fc/fc_udev_device/nvme_discovery ]; then -- if [ ! -f /etc/nvme/discovery.conf ]; then -- echo "No discovery arguments present" -- return 255 -- fi -+ if [ ! -f /sys/class/fc/fc_udev_device/nvme_discovery ] \ -+ && [ ! -f /etc/nvme/discovery.conf ] \ -+ && [ ! -f /etc/nvme/config.json ] && ! has_nbft; then -+ echo "No discovery arguments present" -+ return 255 - fi - } - return 0 -@@ -50,7 +60,7 @@ depends() { - # called by dracut - installkernel() { - instmods nvme_fc lpfc qla2xxx -- hostonly="" instmods nvme_tcp nvme_fabrics -+ hostonly="" instmods nvme_tcp nvme_fabrics 8021q - } - - # called by dracut -@@ -75,7 +85,7 @@ cmdline() { - for d in device/nvme*; do - [ -L "$d" ] || continue - if readlink "$d" | grep -q nvme-fabrics; then -- read -r trtype < "$d"/transport -+ trtype=$(cat "$d"/transport) - break - fi - done -@@ -98,11 +108,11 @@ cmdline() { - } - - if [ -f /etc/nvme/hostnqn ]; then -- read -r _hostnqn < /etc/nvme/hostnqn -+ _hostnqn=$(cat /etc/nvme/hostnqn) - echo -n " rd.nvmf.hostnqn=${_hostnqn}" - fi - if [ -f /etc/nvme/hostid ]; then -- read -r _hostid < /etc/nvme/hostid -+ _hostid=$(cat /etc/nvme/hostid) - echo -n " rd.nvmf.hostid=${_hostid}" - fi - -@@ -126,10 +136,12 @@ install() { - inst_multiple ip sed - - inst_script "${moddir}/nvmf-autoconnect.sh" /sbin/nvmf-autoconnect.sh -+ inst_script "${moddir}/nbftroot.sh" /sbin/nbftroot - -- inst_multiple nvme -+ inst_multiple nvme jq - inst_hook cmdline 92 "$moddir/parse-nvmf-boot-connections.sh" - inst_simple "/etc/nvme/discovery.conf" -+ inst_simple "/etc/nvme/config.json" - inst_rules /usr/lib/udev/rules.d/71-nvmf-iopolicy-netapp.rules - inst_rules "$moddir/95-nvmf-initqueue.rules" - dracut_need_initqueue -diff --git a/modules.d/95nvmf/nbftroot.sh b/modules.d/95nvmf/nbftroot.sh -new file mode 100755 -index 0000000..0f33499 ---- /dev/null -+++ b/modules.d/95nvmf/nbftroot.sh -@@ -0,0 +1,5 @@ -+#! /bin/sh -+# This script is called from /sbin/netroot -+ -+/sbin/nvmf-autoconnect.sh online -+exit 0 -diff --git a/modules.d/95nvmf/nvmf-autoconnect.sh b/modules.d/95nvmf/nvmf-autoconnect.sh -index c8f676a..35ee948 100755 ---- a/modules.d/95nvmf/nvmf-autoconnect.sh -+++ b/modules.d/95nvmf/nvmf-autoconnect.sh -@@ -1,5 +1,54 @@ --#!/bin/bash -+#!/bin/sh -+# Argument $1 is "settled", "online", or "timeout", indicating -+# the queue from which the script is called. -+# In the "timeout" case, try everything. -+# Otherwise, try options according to the priorities below. - --[ -f /sys/class/fc/fc_udev_device/nvme_discovery ] || exit 1 --echo add > /sys/class/fc/fc_udev_device/nvme_discovery -+[ "$RD_DEBUG" != yes ] || set -x -+ -+if [ "$1" = timeout ]; then -+ [ ! -f /sys/class/fc/fc_udev_device/nvme_discovery ] \ -+ || echo add > /sys/class/fc/fc_udev_device/nvme_discovery -+ /usr/sbin/nvme connect-all -+ exit 0 -+fi -+ -+NVMF_HOSTNQN_OK= -+[ ! -f "/etc/nvme/hostnqn" ] || [ ! -f "/etc/nvme/hostid" ] || NVMF_HOSTNQN_OK=1 -+ -+# Only nvme-cli 2.5 or newer supports the options --nbft and --no-nbft -+# for the connect-all command. -+# Make sure we don't use unsupported options with earlier versions. -+NBFT_SUPPORTED= -+# shellcheck disable=SC2016 -+/usr/sbin/nvme connect-all --help 2>&1 | sed -n '/[[:space:]]--nbft[[:space:]]/q1;$q0' \ -+ || NBFT_SUPPORTED=1 -+ -+if [ -e /tmp/nvmf-fc-auto ] && [ "$NVMF_HOSTNQN_OK" ] \ -+ && [ -f /sys/class/fc/fc_udev_device/nvme_discovery ]; then -+ # prio 1: cmdline override "rd.nvmf.discovery=fc,auto" -+ echo add > /sys/class/fc/fc_udev_device/nvme_discovery -+ exit 0 -+fi -+if [ "$NBFT_SUPPORTED" ] && [ -e /tmp/valid_nbft_entry_found ]; then -+ # prio 2: NBFT -+ /usr/sbin/nvme connect-all --nbft -+ exit 0 -+fi -+if [ -f /etc/nvme/discovery.conf ] || [ -f /etc/nvme/config.json ] \ -+ && [ "$NVMF_HOSTNQN_OK" ]; then -+ # prio 3: configuration from initrd and/or kernel command line -+ # We can get here even if "rd.nvmf.nonbft" was given, thus use --no-nbft -+ if [ "$NBFT_SUPPORTED" ]; then -+ /usr/sbin/nvme connect-all --no-nbft -+ else -+ /usr/sbin/nvme connect-all -+ fi -+ exit 0 -+fi -+if [ "$NVMF_HOSTNQN_OK" ] \ -+ && [ -f /sys/class/fc/fc_udev_device/nvme_discovery ]; then -+ # prio 4: no discovery entries, try NVMeoFC autoconnect -+ echo add > /sys/class/fc/fc_udev_device/nvme_discovery -+fi - exit 0 -diff --git a/modules.d/95nvmf/parse-nvmf-boot-connections.sh b/modules.d/95nvmf/parse-nvmf-boot-connections.sh -index 6b26f76..6601837 100755 ---- a/modules.d/95nvmf/parse-nvmf-boot-connections.sh -+++ b/modules.d/95nvmf/parse-nvmf-boot-connections.sh -@@ -17,13 +17,225 @@ - # specify any discover parameters for FC. - # - --type is_ip > /dev/null 2>&1 || . /lib/net-lib.sh -+command -v getarg > /dev/null || . /lib/dracut-lib.sh -+command -v is_ip > /dev/null || . /lib/net-lib.sh -+ -+## Sample NBFT output from nvme show-nbft -H -s -d -o json -+# [ -+# { -+# "filename":"/sys/firmware/acpi/tables/NBFT", -+# "host":{ -+# "nqn":"nqn.2014-08.org.nvmexpress:uuid:d6f07002-7eb5-4841-a185-400e296afae4", -+# "id":"111919da-21ea-cc4e-bafe-216d8372dd31", -+# "host_id_configured":0, -+# "host_nqn_configured":0, -+# "primary_admin_host_flag":"not indicated" -+# }, -+# "subsystem":[ -+# { -+# "index":1, -+# "num_hfis":1, -+# "hfis":[ -+# 1 -+# ], -+# "transport":"tcp", -+# "transport_address":"192.168.100.216", -+# "transport_svcid":"4420", -+# "subsys_port_id":0, -+# "nsid":1, -+# "nid_type":"uuid", -+# "nid":"424d1c8a-8ef9-4681-b2fc-8c343bd8fa69", -+# "subsys_nqn":"timberland-01", -+# "controller_id":0, -+# "asqsz":0, -+# "pdu_header_digest_required":0, -+# "data_digest_required":0 -+# } -+# ], -+# "hfi":[ -+# { -+# "index":1, -+# "transport":"tcp", -+# "pcidev":"0:0:2.0", -+# "mac_addr":"52:54:00:4f:97:e9", -+# "vlan":0, -+# "ip_origin":63, -+# "ipaddr":"192.168.100.217", -+# "subnet_mask_prefix":24, -+# "gateway_ipaddr":"0.0.0.0", -+# "route_metric":0, -+# "primary_dns_ipaddr":"0.0.0.0", -+# "secondary_dns_ipaddr":"0.0.0.0", -+# "dhcp_server_ipaddr":"", -+# "this_hfi_is_default_route":1 -+# } -+# ], -+# "discovery":[ -+# ] -+# } -+# ] -+# -+# If the IP address is derived from DHCP, it sets the field -+# "hfi.dhcp_server_ipaddr" to a non-emtpy value. -+# -+# -+ -+nbft_run_jq() { -+ local st -+ local opts="-e" -+ -+ while [ $# -gt 0 ]; do -+ case $1 in -+ -*) -+ opts="$opts $1" -+ ;; -+ *) -+ break -+ ;; -+ esac -+ shift -+ done -+ # Not quoting is intentional here. We won't get glob expressions passed. -+ # shellcheck disable=SC2086 -+ jq $opts "$1" << EOF -+$2 -+EOF -+ st=$? -+ if [ $st -ne 0 ]; then -+ warn "NBFT: jq error while processing \"$1\"" -+ return $st -+ else -+ return 0 -+ fi -+} -+ -+nbft_check_empty_address() { -+ # suppress meaningless or empty IP addresses -+ # "null" is returned by jq if no match found for expression -+ case $1 in -+ null | "::" | "0.0.0.0") ;; -+ *) -+ echo "$1" -+ ;; -+ esac -+} -+ -+nbft_parse_hfi() { -+ # false positive of shellcheck - no expansion in variable assignments -+ # shellcheck disable=2086 -+ local hfi_json=$1 -+ local mac iface ipaddr prefix vlan gateway dns1 dns2 hostname adrfam dhcp -+ -+ mac=$(nbft_run_jq -r .mac_addr "$hfi_json") || return 1 -+ iface=$(set_ifname nbft "$mac") -+ -+ vlan=$(nbft_run_jq .vlan "$hfi_json") || vlan=0 -+ # treat VLAN zero as "no vlan" -+ [ "$vlan" -ne 0 ] || vlan= -+ -+ [ ! -e /tmp/net."${iface}${vlan:+.$vlan}".has_ibft_config ] || return 0 -+ -+ dhcp=$(nbft_run_jq -r .dhcp_server_ipaddr "$hfi_json") -+ # We need to check $? here as the above is an assignment -+ # shellcheck disable=2181 -+ if [ $? -eq 0 ] && [ "$dhcp" ] && [ "$dhcp" != null ]; then -+ case $dhcp in -+ *:*) -+ echo ip="$iface${vlan:+.$vlan}:dhcp6" -+ ;; -+ *.*.*.*) -+ echo ip="$iface${vlan:+.$vlan}:dhcp" -+ ;; -+ *) -+ warn "Invalid value for dhcp_server_ipaddr: $dhcp" -+ return 1 -+ ;; -+ esac -+ else -+ ipaddr=$(nbft_run_jq -r .ipaddr "$hfi_json") || return 1 -+ -+ case $ipaddr in -+ *.*.*.*) -+ adrfam=ipv4 -+ ;; -+ *:*) -+ adrfam=ipv6 -+ ;; -+ *) -+ warn "invalid address: $ipaddr" -+ return 1 -+ ;; -+ esac -+ prefix=$(nbft_run_jq -r .subnet_mask_prefix "$hfi_json") -+ # Need to check $? here as he above is an assignment -+ # shellcheck disable=2181 -+ if [ $? -ne 0 ] && [ "$adrfam" = ipv6 ]; then -+ prefix=128 -+ fi -+ # Use brackets for IPv6 -+ if [ "$adrfam" = ipv6 ]; then -+ ipaddr="[$ipaddr]" -+ fi -+ -+ gateway=$(nbft_check_empty_address \ -+ "$(nbft_run_jq -r .gateway_ipaddr "$hfi_json")") -+ dns1=$(nbft_check_empty_address \ -+ "$(nbft_run_jq -r .primary_dns_ipaddr "$hfi_json")") -+ dns2=$(nbft_check_empty_address \ -+ "$(nbft_run_jq -r .secondary_dns_ipaddr "$hfi_json")") -+ hostname=$(nbft_run_jq -r .host_name "$hfi_json" 2> /dev/null) || hostname= -+ -+ echo "ip=$ipaddr::$gateway:$prefix:$hostname:$iface${vlan:+.$vlan}:none${dns1:+:$dns1}${dns2:+:$dns2}" -+ fi -+ -+ if [ "$vlan" ]; then -+ echo "vlan=$iface.$vlan:$iface" -+ echo "$mac" > "/tmp/net.$iface.$vlan.has_ibft_config" -+ else -+ echo "$mac" > "/tmp/net.$iface.has_ibft_config" -+ fi -+ : > /tmp/valid_nbft_entry_found -+} -+ -+nbft_parse() { -+ local nbft_json n_nbft all_hfi_json n_hfi -+ local j=0 i -+ -+ nbft_json=$(nvme nbft show -H -o json) || return 0 -+ n_nbft=$(nbft_run_jq ". | length" "$nbft_json") || return 0 -+ -+ while [ "$j" -lt "$n_nbft" ]; do -+ all_hfi_json=$(nbft_run_jq ".[$j].hfi" "$nbft_json") || continue -+ n_hfi=$(nbft_run_jq ". | length" "$all_hfi_json") || continue -+ i=0 -+ -+ while [ "$i" -lt "$n_hfi" ]; do -+ nbft_parse_hfi "$(nbft_run_jq ".[$i]" "$all_hfi_json")" -+ i=$((i + 1)) -+ done -+ j=$((j + 1)) -+ done >> /etc/cmdline.d/40-nbft.conf -+} - - if getargbool 0 rd.nonvmf; then - warn "rd.nonvmf=0: skipping nvmf" - return 0 - fi - -+if getargbool 0 rd.nvmf.nostatic; then -+ rm -f /etc/cmdline.d/95nvmf-args.conf -+ rm -f /etc/nvme/discovery.conf /etc/nvme/config.json -+fi -+ -+if ! getargbool 0 rd.nvmf.nonbft; then -+ for _x in /sys/firmware/acpi/tables/NBFT*; do -+ if [ -f "$_x" ]; then -+ nbft_parse -+ break -+ fi -+ done -+fi -+ - initqueue --onetime modprobe --all -b -q nvme_tcp nvme_core nvme_fabrics - - parse_nvmf_discover() { -@@ -66,7 +278,7 @@ parse_nvmf_discover() { - : > /tmp/nvmf_needs_network - elif [ "$trtype" = "fc" ]; then - if [ "$traddr" = "auto" ]; then -- rm /etc/nvme/discovery.conf -+ rm -f /etc/nvme/discovery.conf /etc/nvme/config.json - return 1 - fi - if [ "$hosttraddr" = "none" ]; then -@@ -94,26 +306,21 @@ if [ -n "$nvmf_hostid" ]; then - echo "$nvmf_hostid" > /etc/nvme/hostid - fi - --NVMF_FC_AUTO= -+rm -f /tmp/nvmf-fc-auto - for d in $(getargs rd.nvmf.discover -d nvmf.discover=); do - parse_nvmf_discover "$d" || { -- NVMF_FC_AUTO=1 -+ : > /tmp/nvmf-fc-auto - break - } - done - --if [ -e /tmp/nvmf_needs_network ]; then -+if [ -e /tmp/nvmf_needs_network ] || [ -e /tmp/valid_nbft_entry_found ]; then - echo "rd.neednet=1" > /etc/cmdline.d/nvmf-neednet.conf -+ # netroot is a global variable that is present in all "sourced" scripts -+ # shellcheck disable=SC2034 -+ netroot=nbft - rm -f /tmp/nvmf_needs_network - fi - --# Host NQN and host id are mandatory for NVMe-oF --if [ -f "/etc/nvme/hostnqn" ] && [ -f "/etc/nvme/hostid" ]; then -- -- # If no nvme command line arguments present, try autodiscovery -- if [ $NVMF_FC_AUTO ] || [ ! -f "/etc/nvme/discovery.conf" ]; then -- /sbin/initqueue --settled --onetime --unique --name nvme-fc-autoconnect /sbin/nvmf-autoconnect.sh -- else -- /sbin/initqueue --settled --onetime --unique --name nvme-discover /usr/sbin/nvme connect-all -- fi --fi -+/sbin/initqueue --settled --onetime --name nvmf-connect-settled /sbin/nvmf-autoconnect.sh settled -+/sbin/initqueue --timeout --onetime --name nvmf-connect-timeout /sbin/nvmf-autoconnect.sh timeout --- -2.39.1 - diff --git a/2218-add-module-driver-support-for-macbook-keyboards.patch b/2218-add-module-driver-support-for-macbook-keyboards.patch deleted file mode 100644 index b09fafa..0000000 --- a/2218-add-module-driver-support-for-macbook-keyboards.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 3c871a89c281d9ef4447576e4ea072ce38c65ac0 Mon Sep 17 00:00:00 2001 -From: Pavel Valena -Date: Tue, 21 Feb 2023 01:57:50 +0100 -Subject: [PATCH] feat(kernel-modules): driver support for macbook keyboards - -Discussed in: https://bugzilla.redhat.com/show_bug.cgi?id=2166209 ---- - modules.d/90kernel-modules/module-setup.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh -index 9bc4c27ac..5b6df776a 100755 ---- a/modules.d/90kernel-modules/module-setup.sh -+++ b/modules.d/90kernel-modules/module-setup.sh -@@ -55,7 +55,7 @@ installkernel() { - "=drivers/watchdog" - - instmods \ -- yenta_socket \ -+ yenta_socket spi_pxa2xx_platform \ - atkbd i8042 firewire-ohci pcmcia hv-vmbus \ - virtio virtio_ring virtio_pci pci_hyperv \ - "=drivers/pcmcia" diff --git a/2224-network-include-default-mac-none-link.patch b/2224-network-include-default-mac-none-link.patch deleted file mode 100644 index ddcdedf..0000000 --- a/2224-network-include-default-mac-none-link.patch +++ /dev/null @@ -1,67 +0,0 @@ -From f6810b69ae722096184eaaf282e12a2caa6928b9 Mon Sep 17 00:00:00 2001 -From: Dusty Mabe -Date: Tue, 21 Feb 2023 22:21:35 -0500 -Subject: [PATCH] feat(network): include 98-default-mac-none.link if it exists - -In Fedora Linux there was a new 98-default-mac-none.link file added -to set the MACAddressPolicy=none for bond/bridge/team devices. We'd -like for this policy to apply in the initramfs as well. See - -- https://fedoraproject.org/wiki/Changes/MAC_Address_Policy_none -- https://src.fedoraproject.org/rpms/systemd/pull-request/100# ---- - modules.d/01systemd-networkd/module-setup.sh | 1 + - modules.d/35network-legacy/module-setup.sh | 6 ++++-- - modules.d/35network-manager/module-setup.sh | 6 ++++-- - 3 files changed, 9 insertions(+), 4 deletions(-) - -diff --git a/modules.d/01systemd-networkd/module-setup.sh b/modules.d/01systemd-networkd/module-setup.sh -index 27d90101..46033549 100755 ---- a/modules.d/01systemd-networkd/module-setup.sh -+++ b/modules.d/01systemd-networkd/module-setup.sh -@@ -44,6 +44,7 @@ install() { - "$systemdnetwork"/80-container-vz.network \ - "$systemdnetwork"/80-vm-vt.network \ - "$systemdnetwork"/80-wifi-adhoc.network \ -+ "$systemdnetwork"/98-default-mac-none.link \ - "$systemdnetwork"/99-default.link \ - "$systemdsystemunitdir"/systemd-networkd.service \ - "$systemdsystemunitdir"/systemd-networkd.socket \ -diff --git a/modules.d/35network-legacy/module-setup.sh b/modules.d/35network-legacy/module-setup.sh -index 868ea8fc..a42f5797 100755 ---- a/modules.d/35network-legacy/module-setup.sh -+++ b/modules.d/35network-legacy/module-setup.sh -@@ -23,9 +23,11 @@ installkernel() { - install() { - local _arch - -- #Adding default link -+ # Adding default link and (if exists) 98-default-mac-none.link - if dracut_module_included "systemd"; then -- inst_multiple -o "${systemdnetwork}/99-default.link" -+ inst_multiple -o \ -+ "${systemdnetwork}/99-default.link" \ -+ "${systemdnetwork}/98-default-mac-none.link" - [[ $hostonly ]] && inst_multiple -H -o "${systemdnetworkconfdir}/*.link" - fi - -diff --git a/modules.d/35network-manager/module-setup.sh b/modules.d/35network-manager/module-setup.sh -index c5d568f0..6e6cd6cf 100755 ---- a/modules.d/35network-manager/module-setup.sh -+++ b/modules.d/35network-manager/module-setup.sh -@@ -51,8 +51,10 @@ install() { - inst_simple "$moddir"/nm-initrd.service "$systemdsystemunitdir"/nm-initrd.service - inst_simple "$moddir"/nm-wait-online-initrd.service "$systemdsystemunitdir"/nm-wait-online-initrd.service - -- # Adding default link -- inst_multiple -o "${systemdnetwork}/99-default.link" -+ # Adding default link and (if exists) 98-default-mac-none.link -+ inst_multiple -o \ -+ "${systemdnetwork}/99-default.link" \ -+ "${systemdnetwork}/98-default-mac-none.link" - [[ $hostonly ]] && inst_multiple -H -o "${systemdnetworkconfdir}/*.link" - - $SYSTEMCTL -q --root "$initdir" enable nm-initrd.service --- -2.39.2 - diff --git a/2233-dmsquash-live-restore-compatibility.patch b/2233-dmsquash-live-restore-compatibility.patch deleted file mode 100644 index 2c9e98a..0000000 --- a/2233-dmsquash-live-restore-compatibility.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 0e780720efe6488c4e07af39926575ee12f40339 Mon Sep 17 00:00:00 2001 -From: Laszlo Gombos -Date: Fri, 24 Feb 2023 01:57:19 +0000 -Subject: [PATCH] fix(dmsquash-live): restore compatibility with earlier - releases - -Follow-up to 40dd5c90e0efcb9ebaa9abb42a38c7316e9706bd . ---- - modules.d/90dmsquash-live/dmsquash-live-root.sh | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/modules.d/90dmsquash-live/dmsquash-live-root.sh b/modules.d/90dmsquash-live/dmsquash-live-root.sh -index 62d1b5e7c..a98e258c2 100755 ---- a/modules.d/90dmsquash-live/dmsquash-live-root.sh -+++ b/modules.d/90dmsquash-live/dmsquash-live-root.sh -@@ -403,6 +403,10 @@ fi - - ROOTFLAGS="$(getarg rootflags)" - -+if [ "$overlayfs" = required ]; then -+ echo "rd.live.overlay.overlayfs=1" > /etc/cmdline.d/dmsquash-need-overlay.conf -+fi -+ - if [ -n "$overlayfs" ]; then - if [ -n "$FSIMG" ]; then - mkdir -m 0755 -p /run/rootfsbase diff --git a/2237-kmoddir-fix-trailing-forwardslash-handling.patch b/2237-kmoddir-fix-trailing-forwardslash-handling.patch deleted file mode 100644 index 4a02d1a..0000000 --- a/2237-kmoddir-fix-trailing-forwardslash-handling.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 6fb0f4b4d54eeb1b1e89c06cc54bdcab504138da Mon Sep 17 00:00:00 2001 -From: Pavel Valena -Date: Fri, 24 Feb 2023 19:19:59 +0100 -Subject: [PATCH] fix(dracut.sh): kmoddir does not handle trailing / - -Fixes https://github.com/dracutdevs/dracut/issues/2236 - -+(/) only works in bash interactive mode. Using any non-interactive -bash run simply doesn't remove anything. - -The solution is copied from dracut-lib.sh, trim(). ---- - dracut.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/dracut.sh b/dracut.sh -index 1aa3f8e1f..0c0f85c2d 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -1033,7 +1033,7 @@ stdloglvl=$((stdloglvl + verbosity_mod_l)) - ((stdloglvl < 0)) && stdloglvl=0 - - [[ $drivers_dir_l ]] && drivers_dir=$drivers_dir_l --drivers_dir="${drivers_dir%%+(/)}" -+drivers_dir="${drivers_dir%"${drivers_dir##*[!/]}"}" - [[ $do_strip_l ]] && do_strip=$do_strip_l - [[ $do_strip ]] || do_strip=yes - [[ $aggressive_strip_l ]] && aggressive_strip=$aggressive_strip_l diff --git a/2290-remove-dependency-on-multipathd-socket.patch b/2290-remove-dependency-on-multipathd-socket.patch deleted file mode 100644 index e2f6ce8..0000000 --- a/2290-remove-dependency-on-multipathd-socket.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 71696ec83fce0b20a3cf489b970a200e44227d78 Mon Sep 17 00:00:00 2001 -From: Tianhao Chai -Date: Mon, 10 Apr 2023 20:36:12 -0400 -Subject: [PATCH] fix(multipath): remove dependency on multipathd.socket - -This reverts commit e39ff407eca1d783ab44093c44db5ee401ff5b1d, removes -an incorrect `Also=` directive from multipathd.service. - -`Also=multipathd.socket` is not the correct behavior for a -socket-activated service. This directive has been removed upstream -and dracut should do the same. - -This fixes #2289, #2175 where in the cleanup hook running multipath -binary triggers activation of multipathd.service after it is stopped -as dracut prepares to switch root in initrd-cleanup.service. ---- - modules.d/90multipath/module-setup.sh | 1 - - modules.d/90multipath/multipathd.service | 1 - - 2 files changed, 2 deletions(-) - -diff --git a/modules.d/90multipath/module-setup.sh b/modules.d/90multipath/module-setup.sh -index 370cab92b..9c3e6295f 100755 ---- a/modules.d/90multipath/module-setup.sh -+++ b/modules.d/90multipath/module-setup.sh -@@ -137,7 +137,6 @@ install() { - inst_simple "${moddir}/multipathd-configure.service" "${systemdsystemunitdir}/multipathd-configure.service" - $SYSTEMCTL -q --root "$initdir" enable multipathd-configure.service - fi -- inst_simple "${systemdsystemunitdir}/multipathd.socket" - inst_simple "${moddir}/multipathd.service" "${systemdsystemunitdir}/multipathd.service" - $SYSTEMCTL -q --root "$initdir" enable multipathd.service - else -diff --git a/modules.d/90multipath/multipathd.service b/modules.d/90multipath/multipathd.service -index e8182533d..1680cdfb3 100644 ---- a/modules.d/90multipath/multipathd.service -+++ b/modules.d/90multipath/multipathd.service -@@ -25,4 +25,3 @@ TasksMax=infinity - - [Install] - WantedBy=sysinit.target --Also=multipathd.socket diff --git a/2377-fix-kernel-modules-add-interconnect-drivers.patch b/2377-fix-kernel-modules-add-interconnect-drivers.patch deleted file mode 100644 index 12a55ae..0000000 --- a/2377-fix-kernel-modules-add-interconnect-drivers.patch +++ /dev/null @@ -1,29 +0,0 @@ -From afb5717e67727d49fae0d2a1a4169e5b247387f4 Mon Sep 17 00:00:00 2001 -From: Andrew Halaney -Date: Mon, 5 Jun 2023 12:16:24 -0500 -Subject: [PATCH] fix(kernel-modules): add interconnect drivers -Content-type: text/plain - -Many devicetree based systems require interconnect drivers to function -properly. Include those in the initramfs. - -Signed-off-by: Andrew Halaney ---- - modules.d/90kernel-modules/module-setup.sh | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh -index 5b6df776a947..e2175125946e 100755 ---- a/modules.d/90kernel-modules/module-setup.sh -+++ b/modules.d/90kernel-modules/module-setup.sh -@@ -71,6 +71,7 @@ installkernel() { - "=drivers/gpio" \ - "=drivers/hwmon" \ - "=drivers/hwspinlock" \ -+ "=drivers/interconnect" \ - "=drivers/i2c/busses" \ - "=drivers/mailbox" \ - "=drivers/memory" \ --- -2.40.1 - diff --git a/2481-remove-microcode-check-based-on-CONFIG_MICROCODE_.patch b/2481-remove-microcode-check-based-on-CONFIG_MICROCODE_.patch deleted file mode 100644 index 0882803..0000000 --- a/2481-remove-microcode-check-based-on-CONFIG_MICROCODE_.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 61b9cd16e049434597e398be61a47e0112382c5b Mon Sep 17 00:00:00 2001 -From: Antonio Alvarez Feijoo -Date: Mon, 14 Aug 2023 12:28:11 +0200 -Subject: [PATCH] fix(dracut.sh): remove microcode check based on - CONFIG_MICROCODE_[AMD|INTEL] - -`CONFIG_MICROCODE_AMD` and `CONFIG_MICROCODE_INTEL` are hidden since -https://lore.kernel.org/all/20230810160805.081212701@linutronix.de/, therefore -this check is wrong and early microcode is always disabled. ---- - dracut.sh | 11 ++++------- - 1 file changed, 4 insertions(+), 7 deletions(-) - -diff --git a/dracut.sh b/dracut.sh -index d7bf4b071..b8174fe78 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -1564,23 +1564,20 @@ fi - - if [[ $early_microcode == yes ]]; then - if [[ $hostonly ]]; then -- if [[ $(get_cpu_vendor) == "AMD" ]]; then -- check_kernel_config CONFIG_MICROCODE_AMD || unset early_microcode -- elif [[ $(get_cpu_vendor) == "Intel" ]]; then -- check_kernel_config CONFIG_MICROCODE_INTEL || unset early_microcode -+ if [[ $(get_cpu_vendor) == "AMD" || $(get_cpu_vendor) == "Intel" ]]; then -+ check_kernel_config CONFIG_MICROCODE || unset early_microcode - else - unset early_microcode - fi - else -- ! check_kernel_config CONFIG_MICROCODE_AMD \ -- && ! check_kernel_config CONFIG_MICROCODE_INTEL \ -+ ! check_kernel_config CONFIG_MICROCODE \ - && unset early_microcode - fi - # Do not complain on non-x86 architectures as it makes no sense - case "${DRACUT_ARCH:-$(uname -m)}" in - x86_64 | i?86) - [[ $early_microcode != yes ]] \ -- && dwarn "Disabling early microcode, because kernel does not support it. CONFIG_MICROCODE_[AMD|INTEL]!=y" -+ && dwarn "Disabling early microcode, because kernel does not support it. CONFIG_MICROCODE!=y" - ;; - *) ;; - esac diff --git a/2527.patch b/2527.patch deleted file mode 100644 index 5ba7966..0000000 --- a/2527.patch +++ /dev/null @@ -1,26 +0,0 @@ -From a2fe89116db4b286fbf515f26bd1773b5e6ee8ad Mon Sep 17 00:00:00 2001 -From: Antonio Alvarez Feijoo -Date: Tue, 26 Sep 2023 09:43:37 +0200 -Subject: [PATCH] fix(resume): add new systemd-hibernate-resume.service - -Since https://github.com/systemd/systemd/commit/a628d933, the generator only -does the initial validation of the system info and then enables the new -`systemd-hibernate-resume.service`. - -Fixes #2513 ---- - modules.d/95resume/module-setup.sh | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/modules.d/95resume/module-setup.sh b/modules.d/95resume/module-setup.sh -index d255103366..9204f9cb73 100755 ---- a/modules.d/95resume/module-setup.sh -+++ b/modules.d/95resume/module-setup.sh -@@ -44,6 +44,7 @@ install() { - if dracut_module_included "systemd" && [[ -x $dracutsysrootdir$systemdutildir/systemd-hibernate-resume ]]; then - inst_multiple -o \ - "$systemdutildir"/system-generators/systemd-hibernate-resume-generator \ -+ "$systemdsystemunitdir"/systemd-hibernate-resume.service \ - "$systemdsystemunitdir"/systemd-hibernate-resume@.service \ - "$systemdutildir"/systemd-hibernate-resume - return 0 diff --git a/2531.patch b/2531.patch deleted file mode 100644 index 4ddce32..0000000 --- a/2531.patch +++ /dev/null @@ -1,46 +0,0 @@ -From a8015f7dfc682100434e3ee051bf9472a8e6cad4 Mon Sep 17 00:00:00 2001 -From: Jeremy Linton -Date: Fri, 6 Oct 2023 10:33:22 -0500 -Subject: [PATCH] feat(kernel-modules): add Qualcomm IPC router to enable USB - -The x13s, and possibly other Qualcomm based devices need the QC -IPC router driver in order to enable USB. Without it, its not -possible to boot from USB-C attached disks. - -IPC in this case is Inter _Processor_ Communication and forms -the message bus used to communicate between differing processing -elements in a given system/SoC running and managing various -hardware devices. This means that while it appears this driver -should be in the dracut network modules that is incorrect -because its not for enabling host networking in the initrd, -but rather for communicating with other hardware blocks. - -Those other blocks aren't limited to modems, but any SMD (shared -memory device), which on QC based machines includes the audio DSPs, -RPM (resource power manager) and of course the application -processor cores linux is running on. - -References: -https://osmocom.org/projects/quectel-modems/wiki/Qualcomm_Linux_SMD -https://android.googlesource.com/kernel/msm/+/android-7.1.0_r0.2/Documentation/arm/msm/msm_ipc_router.txt -https://github.com/dracutdevs/dracut/pull/2531 - -Signed-off-by: Jeremy Linton ---- - modules.d/90kernel-modules/module-setup.sh | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh -index e217512594..75afecc86f 100755 ---- a/modules.d/90kernel-modules/module-setup.sh -+++ b/modules.d/90kernel-modules/module-setup.sh -@@ -95,7 +95,8 @@ installkernel() { - "=drivers/usb/misc" \ - "=drivers/usb/musb" \ - "=drivers/usb/phy" \ -- "=drivers/scsi/hisi_sas" -+ "=drivers/scsi/hisi_sas" \ -+ "=net/qrtr" - fi - - awk -F: '/^\// {print $1}' "$srcmods/modules.dep" 2> /dev/null | instmods diff --git a/2540-fix-pkcs11-libcryptsetup-token-systemd-pkcs11-so-path.patch b/2540-fix-pkcs11-libcryptsetup-token-systemd-pkcs11-so-path.patch deleted file mode 100644 index 388f5b5..0000000 --- a/2540-fix-pkcs11-libcryptsetup-token-systemd-pkcs11-so-path.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 1c762c0da6ed2bb6fa44d5e0968605cc4d45361c Mon Sep 17 00:00:00 2001 -From: innovara -Date: Fri, 27 Oct 2023 11:53:49 +0100 -Subject: [PATCH] fix(pkcs11): delete trailing dot on - libcryptsetup-token-systemd-pkcs11.so - -libcryptsetup-token-systemd-pkcs11.so.* doesn't match the file libcryptsetup-token-systemd-pkcs11.so ---- - modules.d/91pkcs11/module-setup.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/91pkcs11/module-setup.sh b/modules.d/91pkcs11/module-setup.sh -index 547631db66..5675efb580 100755 ---- a/modules.d/91pkcs11/module-setup.sh -+++ b/modules.d/91pkcs11/module-setup.sh -@@ -30,6 +30,6 @@ install() { - {"tls/$_arch/",tls/,"$_arch/",}"libffi.so.*" \ - {"tls/$_arch/",tls/,"$_arch/",}"libp11-kit.so.*" \ - {"tls/$_arch/",tls/,"$_arch/",}"libcryptsetup.so.*" \ -- {"tls/$_arch/",tls/,"$_arch/",}"/cryptsetup/libcryptsetup-token-systemd-pkcs11.so.*" -+ {"tls/$_arch/",tls/,"$_arch/",}"/cryptsetup/libcryptsetup-token-systemd-pkcs11.so*" - - } diff --git a/2547-fix-pcsc-module.patch b/2547-fix-pcsc-module.patch deleted file mode 100644 index ca8cb78..0000000 --- a/2547-fix-pcsc-module.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 6da61a2c0e38da4e6e880e1bb7f47d55d2c54c65 Mon Sep 17 00:00:00 2001 -From: Manuel Fombuena -Date: Fri, 3 Nov 2023 09:04:53 +0000 -Subject: [PATCH 1/2] fix(pcsc): add opensc load module file - -On Fedora, and possibly others, this file loads opensc-pkcs11.so which you need to interact with the smart card to unlock a LUKS encrypted volume. ---- - modules.d/91pcsc/module-setup.sh | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/modules.d/91pcsc/module-setup.sh b/modules.d/91pcsc/module-setup.sh -index 6f8b2c88e1..26b463d436 100755 ---- a/modules.d/91pcsc/module-setup.sh -+++ b/modules.d/91pcsc/module-setup.sh -@@ -29,7 +29,8 @@ install() { - inst_simple "$moddir/pcscd.socket" "${systemdsystemunitdir}"/pcscd.socket - - inst_multiple -o \ -- pcscd -+ pcscd \ -+ /usr/share/p11-kit/modules/opensc.module - - # Enable systemd type unit(s) - for i in \ - -From 842be0c89fe0cc8cac9efa88e68b07ae1c2d2464 Mon Sep 17 00:00:00 2001 -From: Manuel Fombuena -Date: Fri, 3 Nov 2023 11:53:38 +0000 -Subject: [PATCH 2/2] fix(pcsc): add --disable-polkit to pcscd.service - -Needs pcsc >= 2.0.0 - -polkit is not included in dracut and without this option, pcscd simply fails ---- - modules.d/91pcsc/pcscd.service | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/91pcsc/pcscd.service b/modules.d/91pcsc/pcscd.service -index 639decd275..7d4e0a2b30 100644 ---- a/modules.d/91pcsc/pcscd.service -+++ b/modules.d/91pcsc/pcscd.service -@@ -5,7 +5,7 @@ Documentation=man:pcscd(8) - Requires=pcscd.socket - - [Service] --ExecStart=/usr/sbin/pcscd --foreground --auto-exit -+ExecStart=/usr/sbin/pcscd --foreground --auto-exit --disable-polkit - ExecReload=/usr/sbin/pcscd --hotplug - - [Install] diff --git a/bee1c4824a8cd47ce6c01892a548bdc07b1fa678.patch b/bee1c4824a8cd47ce6c01892a548bdc07b1fa678.patch deleted file mode 100644 index 0800157..0000000 --- a/bee1c4824a8cd47ce6c01892a548bdc07b1fa678.patch +++ /dev/null @@ -1,26 +0,0 @@ -From bee1c4824a8cd47ce6c01892a548bdc07b1fa678 Mon Sep 17 00:00:00 2001 -From: Frantisek Sumsal -Date: Sat, 14 Oct 2023 23:45:57 +0200 -Subject: [PATCH] feat(systemd): install systemd-executor - -In [0] systemd gained a new binary - systemd-executor - that's used to -spawn processes forked off systemd. Let's copy it into the initrd if -it's available. - -[0] https://github.com/systemd/systemd/pull/27890 ---- - modules.d/00systemd/module-setup.sh | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/modules.d/00systemd/module-setup.sh b/modules.d/00systemd/module-setup.sh -index 554c25a08..9a13a1dbb 100755 ---- a/modules.d/00systemd/module-setup.sh -+++ b/modules.d/00systemd/module-setup.sh -@@ -34,6 +34,7 @@ install() { - "$systemdutildir"/systemd \ - "$systemdutildir"/systemd-coredump \ - "$systemdutildir"/systemd-cgroups-agent \ -+ "$systemdutildir"/systemd-executor \ - "$systemdutildir"/systemd-shutdown \ - "$systemdutildir"/systemd-reply-password \ - "$systemdutildir"/systemd-fsck \ diff --git a/dracut.spec b/dracut.spec index 4e2a2a5..2e2495b 100644 --- a/dracut.spec +++ b/dracut.spec @@ -6,12 +6,9 @@ # directory. %global __requires_exclude pkg-config -# rpmdev-bumpspec and releng automation compatible variable -%global baserelease 22 - Name: dracut -Version: 059 -Release: %{baserelease}%{?dist} +Version: 060 +Release: 1%{?dist} Summary: Initramfs generator using udev @@ -22,90 +19,48 @@ License: GPL-2.0-or-later AND LGPL-2.1-or-later AND GPL-2.0-only URL: https://github.com/dracutdevs/dracut/wiki/ -Source0: https://github.com/dracutdevs/dracut/archive/refs/tags/%{version}.tar.gz +# Currently upstream does not create releases, therefore +# source is created from commit 856e7acdb1462803c2517c8d64afb2e34c73c735 +# Reference PR: https://github.com/dracutdevs/dracut/pull/2509 +# Unpacked archive: https://github.com/pvalena/dracut-fedora/tree/v60-srpm-unpacked +Source0: dracut-%{version}.tar.xz +#Source0: https://github.com/dracutdevs/dracut/archive/refs/tags/%%{version}.tar.gz Source1: https://www.gnu.org/licenses/lgpl-2.1.txt - -# Never auto-enable bluetooth module (but it can be manually included -# for debugging) - workaround for RHBZ #1964879. -# https://github.com/dracutdevs/dracut/pull/1521 -Patch1: 1521-Never-enable-the-bluetooth-module-by-default.patch - -# Skip creating initrd when initrd already provided, -# or different generator is configured -# https://github.com/dracutdevs/dracut/pull/1825/ -Patch2: 1825-Skip-creating-initrd-when-initrd-is-provided.patch - -# Add kernel module with support for macbook keyboards -# https://github.com/dracutdevs/dracut/pull/2218 -Patch3: 2218-add-module-driver-support-for-macbook-keyboards.patch - -# fix(dmsquash-live): restore compatibility with earlier releases -# https://github.com/dracutdevs/dracut/pull/2233/ -# https://bugzilla.redhat.com/show_bug.cgi?id=2172269 -Patch4: 2233-dmsquash-live-restore-compatibility.patch - -# Fix: dracut --kmoddir fails on paths with traling / -# https://bugzilla.redhat.com/show_bug.cgi?id=2173100 -Patch5: 2237-kmoddir-fix-trailing-forwardslash-handling.patch - -# revert(network-manager): avoid restarting NetworkManager -# https://github.com/dracutdevs/dracut/pull/2134 -Patch6: 2134-revert-avoid-restarting-NetworkManager.patch - -# Support MACAddressPolicy=none for bond/bridge/team devices -# https://fedoraproject.org/wiki/Changes/MAC_Address_Policy_none -# https://github.com/dracutdevs/dracut/pull/2224 -Patch7: 2224-network-include-default-mac-none-link.patch - -# fix(multipath): remove dependency on multipathd.socket -# https://github.com/dracutdevs/dracut/pull/2290 -Patch8: 2290-remove-dependency-on-multipathd-socket.patch - -# fix(kernel-modules): add interconnect drivers -# https://github.com/dracutdevs/dracut/pull/2377 -Patch9: 2377-fix-kernel-modules-add-interconnect-drivers.patch - -# feat(nvmf): support for NVMeoF -# https://github.com/dracutdevs/dracut/pull/2184 -Patch10: 2184-add-nvmeof-module.patch - -# fix(dracut.sh): use dynamically uefi's sections offset -# https://github.com/dracutdevs/dracut/pull/2277 -Patch11: 0001-fix-dracut.sh-use-dynamically-uefi-s-sections-offset.patch - -# fix iso-scan feature by triggering udev events -# https://github.com/dracutdevs/dracut/pull/2196 -# https://bugzilla.redhat.com/show_bug.cgi?id=2131852 -Patch12: 0001-fix-make-iso-scan-trigger-udev-events.patch - -# https://bugzilla.redhat.com/show_bug.cgi?id=2246410 -# https://github.com/dracutdevs/dracut/pull/2545 -Patch13: 0001-fix-wait-12-hours-before-halt-on-media-check-fail.patch - -# Unbreak new systemd -Patch14: https://github.com/dracutdevs/dracut/commit/bee1c4824a8cd47ce6c01892a548bdc07b1fa678.patch -# https://github.com/dracutdevs/dracut/pull/2526.patch rebased -Patch15: 0001-fix-systemd-pcrphase-rename-systemd-pcrphase-binary-.patch -Patch16: https://github.com/dracutdevs/dracut/pull/2527.patch - -# Fix for kernel 6.6 -# https://bugzilla.redhat.com/show_bug.cgi?id=2249112 -# https://github.com/dracutdevs/dracut/pull/2481 -Patch17: 2481-remove-microcode-check-based-on-CONFIG_MICROCODE_.patch - -# Fix for Lenovo x13s -# https://github.com/dracutdevs/dracut/pull/2531 -Patch: 2531.patch - +# feat(kernel-install): do nothing when $KERNEL_INSTALL_INITRD_GENERATOR says so +# Author: Zbigniew Jędrzejewski-Szmek +Patch1: 0001-feat-kernel-install-do-nothing-when-KERNEL_INSTALL_I.patch +# fix(systemd-pcrphase): rename systemd-pcrphase binary to systemd-pcrextend +# Author: Antonio Alvarez Feijoo +Patch2: 0002-fix-systemd-pcrphase-rename-systemd-pcrphase-binary-.patch +# fix(resume): add new systemd-hibernate-resume.service +# Author: Antonio Alvarez Feijoo +Patch3: 0003-fix-resume-add-new-systemd-hibernate-resume.service.patch +# fix: wait 12 hours before halt on media check fail +# Author: Adam Williamson +Patch4: 0004-fix-wait-12-hours-before-halt-on-media-check-fail.patch +# feat(network): include 98-default-mac-none.link if it exists +# Author: Dusty Mabe +Patch5: 0005-feat-network-include-98-default-mac-none.link-if-it-.patch +# feat(kernel-modules): add Qualcomm IPC router to enable USB +# Author: Jeremy Linton +Patch6: 0006-feat-kernel-modules-add-Qualcomm-IPC-router-to-enabl.patch +# fix(kernel-install): do not generate an initrd when one was specified +# Author: Zbigniew Jędrzejewski-Szmek +Patch7: 0007-fix-kernel-install-do-not-generate-an-initrd-when-on.patch # fix(pkcs11): delete trailing dot on libcryptsetup-token-systemd-pkcs11.so -# https://github.com/dracutdevs/dracut/pull/2540 -Patch19: 2540-fix-pkcs11-libcryptsetup-token-systemd-pkcs11-so-path.patch - -# fix(pcsc): add opensc load module file +# Author: innovara +Patch8: 0008-fix-pkcs11-delete-trailing-dot-on-libcryptsetup-toke.patch # fix(pcsc): add --disable-polkit to pcscd.service -# https://github.com/dracutdevs/dracut/pull/2547 -Patch20: 2547-fix-pcsc-module.patch +# Author: Manuel Fombuena +Patch9: 0009-fix-pcsc-add-disable-polkit-to-pcscd.service.patch +# fix(pcsc): add opensc load module file +# Author: Manuel Fombuena +Patch10: 0010-fix-pcsc-add-opensc-load-module-file.patch + +# Please use source-git to work with this spec file: +# HowTo: https://packit.dev/source-git/work-with-source-git +# Source-git repository: https://github.com/redhat-plumbers/dracut-fedora/ BuildRequires: bash BuildRequires: git-core @@ -251,10 +206,6 @@ cp %{SOURCE1} . echo "DRACUT_VERSION=%{version}-%{release}" > $RPM_BUILD_ROOT/%{dracutlibdir}/dracut-version.sh -%if 0%{?fedora} == 0 && 0%{?rhel} == 0 && 0%{?suse_version} == 0 -rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/01fips -%endif - # we do not support dash in the initramfs rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/00dash @@ -284,6 +235,7 @@ rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/00warpclock mkdir -p $RPM_BUILD_ROOT/boot/dracut mkdir -p $RPM_BUILD_ROOT/var/lib/dracut/overlay mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log +touch $RPM_BUILD_ROOT%{_localstatedir}/log/dracut.log mkdir -p $RPM_BUILD_ROOT%{_sharedstatedir}/initramfs install -m 0644 dracut.conf.d/fedora.conf.example $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/01-dist.conf @@ -340,6 +292,7 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/ %{dracutlibdir}/modules.d/01systemd-ac-power %{dracutlibdir}/modules.d/01systemd-ask-password %{dracutlibdir}/modules.d/01systemd-coredump +%{dracutlibdir}/modules.d/01systemd-creds %{dracutlibdir}/modules.d/01systemd-hostnamed %{dracutlibdir}/modules.d/01systemd-initrd %{dracutlibdir}/modules.d/01systemd-integritysetup @@ -351,7 +304,6 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/ %{dracutlibdir}/modules.d/01systemd-pstore %{dracutlibdir}/modules.d/01systemd-repart %{dracutlibdir}/modules.d/01systemd-resolved -%{dracutlibdir}/modules.d/01systemd-rfkill %{dracutlibdir}/modules.d/01systemd-sysext %{dracutlibdir}/modules.d/01systemd-sysctl %{dracutlibdir}/modules.d/01systemd-sysusers @@ -434,6 +386,7 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/ %{dracutlibdir}/modules.d/99memstrack %{dracutlibdir}/modules.d/99fs-lib %{dracutlibdir}/modules.d/99shutdown +%attr(0644,root,root) %ghost %config(missingok,noreplace) %{_localstatedir}/log/dracut.log %dir %{_sharedstatedir}/initramfs %if %{defined _unitdir} %{_unitdir}/dracut-shutdown.service @@ -460,7 +413,6 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/ %{dracutlibdir}/modules.d/01systemd-networkd %{dracutlibdir}/modules.d/35connman %{dracutlibdir}/modules.d/35network-manager -%{dracutlibdir}/modules.d/35network-wicked %{dracutlibdir}/modules.d/40network %{dracutlibdir}/modules.d/45ifcfg %{dracutlibdir}/modules.d/90kernel-network-modules @@ -509,6 +461,9 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/ %{_prefix}/lib/kernel/install.d/51-dracut-rescue.install %changelog +* Wed Mar 20 2024 Pavel Valena - 060-1 +- Update to dracut 060. + * Mon Feb 12 2024 Pavel Valena - 059-22 - Remove network-legacy module. diff --git a/newdracut.sh b/newdracut.sh deleted file mode 100755 index 381fba5..0000000 --- a/newdracut.sh +++ /dev/null @@ -1,82 +0,0 @@ -#!/usr/bin/bash - -bash -n "$0" || exit 1 -shopt -s extglob - -patchnr() { - local nr - while [[ -n "$1" ]]; do - nr=$(cut -d'.' -f1 <<< "$1") - shift - [[ $((10#$nr)) -gt 0 ]] || echo "Invalid patch number: $nr" >&2 - echo "$nr" - done -} - -if [[ -e "$HOME/git/dracut/$1" ]]; then - srcrpm="$HOME/git/dracut/$1" -elif [[ -e "$HOME/dev/upstream/dracut/$1" ]]; then - srcrpm="$HOME/dev/upstream/dracut/$1" -else - srcrpm="$1" -fi - -[[ -f $srcrpm ]] || exit 3 - -old_release=$(rpmspec -D "_sourcedir $(pwd)" -q --srpm --qf '%{release}' dracut.spec) -old_release=${old_release%%.*} - -cp dracut.spec dracut.spec.old - -rm *.patch; git reset --hard HEAD -last_patch_nr=$(patchnr *.patch | sort -n | tail -n 1) -last_patch_nr=${last_patch_nr:-0000} -#for i in *.patch; do git rm -f $i;done - -if rpm -ivh --define "_srcrpmdir $PWD" --define "_specdir $PWD" --define "_sourcedir $PWD" "$srcrpm"; then - for nr in $(patchnr *.patch); do - [[ $((10#$nr)) -gt $((10#$last_patch_nr)) ]] && git add "${nr}.patch" - done - - new_version=$(rpmspec -D "_sourcedir $(pwd)" -q --srpm --qf '%{version}' dracut.spec) - new_release=$(rpmspec -D "_sourcedir $(pwd)" -q --srpm --qf '%{release}' dracut.spec) - new_release_full=${new_release%.*} - new_release=${new_release%%.*} - - do_print="" - while IFS=$'\n' read -r line - do - if [ -z "$do_print" ] && [ "$line" = "%changelog" ]; then - do_print="yes" - echo "* $(LANG='C' date '+%a %b %d %Y') $(git config user.name) <$(git config user.email)> - ${new_version}-${new_release_full}" - - for ((i=old_release; i> dracut.spec - - # Patch list: - # ls *.patch | tr -s ' ' '\n' | cut -d'.' -f1 | xargs -i zsh -c "nr=\$((10#{})); echo \"Patch\${nr}: {}.patch\"" - - git add dracut.spec - - msg="Resolves: $( - for ((i=old_release; i