Update to dracut 101
From-source-git-commit: a24e1272faba2875f9b78fcf42109028af0869bc * switch to dracut-ng upstream fork The original dracut repository is no longer maintained, new initiative was started: https://github.com/dracut-ng/dracut-ng/ * applied additional fixes 9df3cb58a19f38157a615c311356cfd6ae55d2d7 fix(rngd): install system service file 0b65ac224d831cc96da940cce510523c7276a5ec feat(hwdb): add hwdb module to install hwdb.bin on demand 10b86edba3ffe0ce13c5f43ff0193cdf04661358 fix(nvmf): move /etc/nvme/host{nqn,id} requirement to hostonly bad2bc80cdcfac8915374497cc47ce9d5670d015 fix(systemd): explicitly install some libs that will not be statically included 55a56c546bde71fb42c99aadd96e98fca2199823 fix(dracut): move hooks directory from /usr/lib to /var/lib 110fec3e41faf47277447f1c56635c5a876c1f96 feat(ifcfg): minimize s390-specific network configuration aspects b6913f66b6c9e9ea81fd0832405c170876bc993a refactor(ifcfg): delete code duplication using iface_get_subchannels() cbc5eece88b8f6d0e69fdfbb8f34eabb45425c86 fix(znet): append to udev rules so each rd.znet_ifname is effective 7ad6fef8fe110093939c422b5c3b381ebe47e4e9 feat(qeth_rules): remove qeth handling consolidated in 95znet addb383b375fd0db07eacf8a9f5d9b4e23343855 docs(dracut.cmdline): generalize description of rd.znet 86b6e2979999cf5ecce8c76c6230d1f085b3a333 feat(znet): use zdev for consolidated device configuration 1ff6be8aef787513b8143df444a1dd2d696b0944 feat(dasd): minimize dasd handling consolidated in s390-tools a82045ef34bc8c913502eba37b6b9c60709d6997 feat(dasd_mod): minimize dasd handling consolidated in s390-tools 7294e45b5204e47bb8ee2108e2c38c5843e64fac feat(dasd_rules): remove dasd handling consolidated in s390-tools 8d6098969aa9dc34edfd1bc96e6aa0384ae2fb99 feat(zfcp): minimize zfcp handling consolidated in s390-tools 71876ea8c73090741bdf26abb89c28fb260ed575 feat(zfcp_rules): remove zfcp handling consolidated in s390-tools a2c1fc530d8bcbdeaf1806f4a22019052715fc98 refactor(cms): remove now unnecessary inclusion of full s390utils-base cc14fe218861f2855ca88ad03220ecb78d4aa31a refactor(cms): use consolidated network config with zdev from s390-tools 74edb9758da26ef063e4686a595f1d34f07f86f7 refactor(cms): use consolidated dasd config with zdev from s390-tools 3a9b9a5cf507a868f8b3ec33cf686b3a552286c2 refactor(cms): use consolidated zfcp config with zdev from s390-tools 38412977daad049b12273966300d07211674834e refactor(cms): use zdev to simplify handling CMSDASD=... boot option (Possibly also resolves other open issues.) Resolves: RHEL-26887 RHEL-34954 RHEL-35521
This commit is contained in:
parent
a1ebaf27b6
commit
e4f609fba2
@ -0,0 +1,96 @@
|
||||
From f86d5ff72868e9df7d255e3c5e938a9e339f09fa Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
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
|
||||
|
@ -1,143 +0,0 @@
|
||||
From ec6972ab724c23edb47394e1211c4d3dc635ea8f Mon Sep 17 00:00:00 2001
|
||||
From: Valentin Lefebvre <valentin.lefebvre@suse.com>
|
||||
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 <valentin.lefebvre@suse.com>
|
||||
---
|
||||
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
|
||||
|
@ -1,25 +0,0 @@
|
||||
From 7b530f26368d723dcc34fb67d687c60009b06412 Mon Sep 17 00:00:00 2001
|
||||
From: 0x5c <dev@0x5c.io>
|
||||
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
|
||||
|
@ -1,34 +0,0 @@
|
||||
From 805728cabf81ddef6a550b95d08f1f6e00e0cf8b Mon Sep 17 00:00:00 2001
|
||||
From: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
|
||||
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 \
|
@ -1,40 +0,0 @@
|
||||
From a1b346121da44908b2685d8ef1b5e68b57829b2b Mon Sep 17 00:00:00 2001
|
||||
From: Adam Williamson <awilliam@redhat.com>
|
||||
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 <awilliam@redhat.com>
|
||||
---
|
||||
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
|
||||
|
@ -0,0 +1,39 @@
|
||||
From 9f979fc9486af3c7c924d3f9f837f06616c61829 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Tue, 18 Jan 2022 18:58:58 +0100
|
||||
Subject: [PATCH 02/23] 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
|
||||
|
198
0003-refactor-cms-use-zdev-to-simplify-handling-CMSDASD-..patch
Normal file
198
0003-refactor-cms-use-zdev-to-simplify-handling-CMSDASD-..patch
Normal file
@ -0,0 +1,198 @@
|
||||
From 38412977daad049b12273966300d07211674834e Mon Sep 17 00:00:00 2001
|
||||
From: Steffen Maier <maier@linux.ibm.com>
|
||||
Date: Wed, 24 May 2023 19:02:09 +0200
|
||||
Subject: [PATCH 03/23] refactor(cms): use zdev to simplify handling
|
||||
CMSDASD=... boot option
|
||||
|
||||
This is just internal to initrd, so we can already migrate the code to
|
||||
consolidated dasd device configuration with zdev
|
||||
https://github.com/ibm-s390-linux/s390-tools/tree/master/zdev/.
|
||||
The code change is transparent to users after dracut switch root.
|
||||
|
||||
Signed-off-by: Steffen Maier <maier@linux.ibm.com>
|
||||
---
|
||||
modules.d/80cms/cmssetup.sh | 108 ++++++--------------------------
|
||||
modules.d/80cms/module-setup.sh | 3 +-
|
||||
2 files changed, 21 insertions(+), 90 deletions(-)
|
||||
|
||||
diff --git a/modules.d/80cms/cmssetup.sh b/modules.d/80cms/cmssetup.sh
|
||||
index 68e45632..23e81ca9 100755
|
||||
--- a/modules.d/80cms/cmssetup.sh
|
||||
+++ b/modules.d/80cms/cmssetup.sh
|
||||
@@ -2,34 +2,16 @@
|
||||
|
||||
type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
|
||||
|
||||
-function sysecho() {
|
||||
- file="$1"
|
||||
- shift
|
||||
- local i=1
|
||||
- while [ $i -le 10 ]; do
|
||||
- if [ ! -f "$file" ]; then
|
||||
- sleep 1
|
||||
- i=$((i + 1))
|
||||
- else
|
||||
- break
|
||||
- fi
|
||||
- done
|
||||
- local status
|
||||
- read -r status < "$file"
|
||||
- if [[ $status != "$*" ]]; then
|
||||
- [ -f "$file" ] && echo "$*" > "$file"
|
||||
- fi
|
||||
-}
|
||||
-
|
||||
function dasd_settle() {
|
||||
- local dasd_status=/sys/bus/ccw/devices/$1/status
|
||||
+ local dasd_status
|
||||
+ dasd_status=$(lszdev dasd "$1" --columns ATTRPATH:status --no-headings --active)
|
||||
if [ ! -f "$dasd_status" ]; then
|
||||
return 1
|
||||
fi
|
||||
local i=1
|
||||
while [ $i -le 60 ]; do
|
||||
local status
|
||||
- read -r status < "$dasd_status"
|
||||
+ status=$(lszdev dasd "$1" --columns ATTR:status --no-headings --active)
|
||||
case $status in
|
||||
online | unformatted)
|
||||
return 0
|
||||
@@ -43,77 +25,23 @@ function dasd_settle() {
|
||||
return 1
|
||||
}
|
||||
|
||||
-function dasd_settle_all() {
|
||||
- for dasdccw in $(while read -r line || [ -n "$line" ]; do echo "${line%%(*}"; done < /proc/dasd/devices); do
|
||||
- if ! dasd_settle "$dasdccw"; then
|
||||
- echo $"Could not access DASD $dasdccw in time"
|
||||
- return 1
|
||||
- fi
|
||||
- done
|
||||
- return 0
|
||||
-}
|
||||
-
|
||||
-# prints a canonocalized device bus ID for a given devno of any format
|
||||
-function canonicalize_devno() {
|
||||
- case ${#1} in
|
||||
- 3) echo "0.0.0${1}" ;;
|
||||
- 4) echo "0.0.${1}" ;;
|
||||
- *) echo "${1}" ;;
|
||||
- esac
|
||||
- return 0
|
||||
-}
|
||||
-
|
||||
# read file from CMS and write it to /tmp
|
||||
function readcmsfile() { # $1=dasdport $2=filename
|
||||
local dev
|
||||
- local numcpus
|
||||
local devname
|
||||
local ret=0
|
||||
if [ $# -ne 2 ]; then return; fi
|
||||
- # precondition: udevd created dasda block device node
|
||||
- if ! dasd_cio_free -d "$1"; then
|
||||
- echo $"DASD $1 could not be cleared from device blacklist"
|
||||
- return 1
|
||||
- fi
|
||||
-
|
||||
- modprobe dasd_mod dasd="$CMSDASD"
|
||||
- modprobe dasd_eckd_mod
|
||||
- udevadm settle
|
||||
-
|
||||
- # precondition: dasd_eckd_mod driver incl. dependencies loaded,
|
||||
- # dasd_mod must be loaded without setting any DASD online
|
||||
- dev=$(canonicalize_devno "$1")
|
||||
- numcpus=$(
|
||||
- while read -r line || [ -n "$line" ]; do
|
||||
- if strstr "$line" "# processors"; then
|
||||
- echo "${line##*:}"
|
||||
- break
|
||||
- fi
|
||||
- done < /proc/cpuinfo
|
||||
- )
|
||||
+ # precondition: udevd created block device node
|
||||
|
||||
- if [ "${numcpus}" -eq 1 ]; then
|
||||
- echo 1 > /sys/bus/ccw/devices/"$dev"/online
|
||||
- else
|
||||
- if ! sysecho /sys/bus/ccw/devices/"$dev"/online 1; then
|
||||
- echo $"DASD $dev could not be set online"
|
||||
- return 1
|
||||
- fi
|
||||
- udevadm settle
|
||||
- if ! dasd_settle "$dev"; then
|
||||
- echo $"Could not access DASD $dev in time"
|
||||
- return 1
|
||||
- fi
|
||||
+ dev="$1"
|
||||
+ chzdev --enable --active --yes --quiet --no-root-update --force dasd "$dev" || return 1
|
||||
+ if ! dasd_settle "$dev"; then
|
||||
+ echo $"Could not access DASD $dev in time"
|
||||
+ return 1
|
||||
fi
|
||||
|
||||
- udevadm settle
|
||||
-
|
||||
- devname=$(
|
||||
- cd /sys/bus/ccw/devices/"$dev"/block || exit
|
||||
- set -- *
|
||||
- [ -b /dev/"$1" ] && echo "$1"
|
||||
- )
|
||||
- devname=${devname:-dasda}
|
||||
+ devname=$(lszdev dasd "$dev" --columns NAMES --no-headings --active)
|
||||
+ [[ -n $devname ]] || return 1
|
||||
|
||||
[[ -d /mnt ]] || mkdir -p /mnt
|
||||
if cmsfs-fuse --to=UTF-8 -a /dev/"$devname" /mnt; then
|
||||
@@ -125,20 +53,22 @@ function readcmsfile() { # $1=dasdport $2=filename
|
||||
ret=1
|
||||
fi
|
||||
|
||||
- if ! sysecho /sys/bus/ccw/devices/"$dev"/online 0; then
|
||||
- echo $"DASD $dev could not be set offline again"
|
||||
- #return 1
|
||||
- fi
|
||||
- udevadm settle
|
||||
+ chzdev --disable --active --yes --quiet --no-root-update --force dasd "$dev"
|
||||
|
||||
# unbind all dasds to unload the dasd modules for a clean start
|
||||
(
|
||||
cd /sys/bus/ccw/drivers/dasd-eckd || exit
|
||||
- for i in *.*; do echo "$i" > unbind; done
|
||||
+ for i in *.*; do echo "$i" > unbind 2> /dev/null; done
|
||||
+ )
|
||||
+ (
|
||||
+ cd /sys/bus/ccw/drivers/dasd-fba || exit
|
||||
+ for i in *.*; do echo "$i" > unbind 2> /dev/null; done
|
||||
)
|
||||
udevadm settle
|
||||
modprobe -r dasd_eckd_mod
|
||||
udevadm settle
|
||||
+ modprobe -r dasd_fba_mod
|
||||
+ udevadm settle
|
||||
modprobe -r dasd_diag_mod
|
||||
udevadm settle
|
||||
modprobe -r dasd_mod
|
||||
diff --git a/modules.d/80cms/module-setup.sh b/modules.d/80cms/module-setup.sh
|
||||
index 2b280e0f..4872734b 100755
|
||||
--- a/modules.d/80cms/module-setup.sh
|
||||
+++ b/modules.d/80cms/module-setup.sh
|
||||
@@ -4,6 +4,7 @@
|
||||
check() {
|
||||
arch=${DRACUT_ARCH:-$(uname -m)}
|
||||
[ "$arch" = "s390" -o "$arch" = "s390x" ] || return 1
|
||||
+ require_binaries chzdev lszdev || return 1
|
||||
return 255
|
||||
}
|
||||
|
||||
@@ -28,7 +29,7 @@ install() {
|
||||
# shellcheck disable=SC2046
|
||||
inst_multiple /etc/cmsfs-fuse/filetypes.conf /etc/udev/rules.d/99-fuse.rules /etc/fuse.conf \
|
||||
cmsfs-fuse fusermount bash insmod rmmod cat normalize_dasd_arg sed \
|
||||
- $(rpm -ql s390utils-base) awk getopt
|
||||
+ $(rpm -ql s390utils-base) awk getopt chzdev lszdev
|
||||
|
||||
inst_libdir_file "gconv/*"
|
||||
#inst /usr/lib/locale/locale-archive
|
||||
--
|
||||
2.42.0
|
||||
|
@ -0,0 +1,77 @@
|
||||
From 3a9b9a5cf507a868f8b3ec33cf686b3a552286c2 Mon Sep 17 00:00:00 2001
|
||||
From: Steffen Maier <maier@linux.ibm.com>
|
||||
Date: Sat, 28 Jan 2023 01:58:29 +0100
|
||||
Subject: [PATCH 04/23] refactor(cms): use consolidated zfcp config with zdev
|
||||
from s390-tools
|
||||
|
||||
This is just internal to initrd, so we can already migrate the code to
|
||||
consolidated zfcp device configuration with zdev
|
||||
https://github.com/ibm-s390-linux/s390-tools/tree/master/zdev/.
|
||||
The code change is transparent to users after dracut switch root.
|
||||
|
||||
The generated persistent config of chzdev are pure udev rules so it has no
|
||||
dependency on other dracut modules such as zdev, or zfcp.
|
||||
|
||||
Signed-off-by: Steffen Maier <maier@linux.ibm.com>
|
||||
---
|
||||
modules.d/80cms/cmssetup.sh | 21 ++++++++++++++++-----
|
||||
modules.d/80cms/module-setup.sh | 2 +-
|
||||
2 files changed, 17 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/modules.d/80cms/cmssetup.sh b/modules.d/80cms/cmssetup.sh
|
||||
index 23e81ca9..da42ec0f 100755
|
||||
--- a/modules.d/80cms/cmssetup.sh
|
||||
+++ b/modules.d/80cms/cmssetup.sh
|
||||
@@ -117,7 +117,6 @@ processcmsfile() {
|
||||
dasd_cio_free
|
||||
fi
|
||||
|
||||
- unset _do_zfcp
|
||||
for i in ${!FCP_*}; do
|
||||
echo "${!i}" | while read -r port rest || [ -n "$port" ]; do
|
||||
case $port in
|
||||
@@ -130,12 +129,24 @@ processcmsfile() {
|
||||
port="0.0.$port"
|
||||
;;
|
||||
esac
|
||||
- echo "$port" "$rest" >> /etc/zfcp.conf
|
||||
+ # shellcheck disable=SC2086
|
||||
+ set -- $rest
|
||||
+ SAVED_IFS="$IFS"
|
||||
+ IFS=":"
|
||||
+ # Intentionally do not dynamically activate now, but only generate udev
|
||||
+ # rules, which activate the device later during udev coldplug.
|
||||
+ if [[ -z $rest ]]; then
|
||||
+ chzdev --enable --persistent \
|
||||
+ --no-settle --yes --quiet --no-root-update --force \
|
||||
+ zfcp-host "$port" 2>&1 | vinfo
|
||||
+ else
|
||||
+ chzdev --enable --persistent \
|
||||
+ --no-settle --yes --quiet --no-root-update --force \
|
||||
+ zfcp-lun "$port:$*" 2>&1 | vinfo
|
||||
+ fi
|
||||
+ IFS="$SAVED_IFS"
|
||||
done
|
||||
- _do_zfcp=1
|
||||
done
|
||||
- [[ $_do_zfcp ]] && zfcp_cio_free
|
||||
- unset _do_zfcp
|
||||
}
|
||||
|
||||
[[ $CMSDASD ]] || CMSDASD=$(getarg "CMSDASD=")
|
||||
diff --git a/modules.d/80cms/module-setup.sh b/modules.d/80cms/module-setup.sh
|
||||
index 4872734b..0dd86b80 100755
|
||||
--- a/modules.d/80cms/module-setup.sh
|
||||
+++ b/modules.d/80cms/module-setup.sh
|
||||
@@ -12,7 +12,7 @@ check() {
|
||||
depends() {
|
||||
arch=${DRACUT_ARCH:-$(uname -m)}
|
||||
[ "$arch" = "s390" -o "$arch" = "s390x" ] || return 1
|
||||
- echo znet zfcp dasd dasd_mod bash
|
||||
+ echo znet dasd dasd_mod bash
|
||||
return 0
|
||||
}
|
||||
|
||||
--
|
||||
2.42.0
|
||||
|
@ -0,0 +1,81 @@
|
||||
From 74edb9758da26ef063e4686a595f1d34f07f86f7 Mon Sep 17 00:00:00 2001
|
||||
From: Steffen Maier <maier@linux.ibm.com>
|
||||
Date: Wed, 24 May 2023 19:04:48 +0200
|
||||
Subject: [PATCH 05/23] refactor(cms): use consolidated dasd config with zdev
|
||||
from s390-tools
|
||||
|
||||
Depends on https://github.com/ibm-s390-linux/s390-tools commit
|
||||
9b2fb1d4d2e2 ("zdev: add helper to convert from dasd_mod.dasd to zdev
|
||||
config").
|
||||
|
||||
This is just internal to initrd, so it's possible to migrate the code to
|
||||
consolidated dasd device configuration with zdev
|
||||
https://github.com/ibm-s390-linux/s390-tools/tree/master/zdev/.
|
||||
The code change is transparent to users after dracut switch root.
|
||||
|
||||
The generated persistent config of chzdev are pure udev rules so it has no
|
||||
dependency on other dracut modules such as zdev, dasd, or dasd_mod.
|
||||
Instead now install the corresponding kernel device drivers here directly.
|
||||
|
||||
Signed-off-by: Steffen Maier <maier@linux.ibm.com>
|
||||
---
|
||||
modules.d/80cms/cmssetup.sh | 6 +++---
|
||||
modules.d/80cms/module-setup.sh | 6 +++---
|
||||
2 files changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/modules.d/80cms/cmssetup.sh b/modules.d/80cms/cmssetup.sh
|
||||
index da42ec0f..01cfd303 100755
|
||||
--- a/modules.d/80cms/cmssetup.sh
|
||||
+++ b/modules.d/80cms/cmssetup.sh
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
|
||||
+type zdev_parse_dasd_list > /dev/null 2>&1 || . /lib/s390-tools/zdev-from-dasd_mod.dasd
|
||||
|
||||
function dasd_settle() {
|
||||
local dasd_status
|
||||
@@ -112,9 +113,8 @@ processcmsfile() {
|
||||
fi
|
||||
|
||||
if [[ $DASD ]] && [[ $DASD != "none" ]]; then
|
||||
- echo "$DASD" | normalize_dasd_arg > /etc/dasd.conf
|
||||
- echo "options dasd_mod dasd=$DASD" > /etc/modprobe.d/dasd_mod.conf
|
||||
- dasd_cio_free
|
||||
+ echo "$DASD" | zdev_parse_dasd_list globals 2>&1 | vinfo
|
||||
+ echo "$DASD" | zdev_parse_dasd_list ranges 2>&1 | vinfo
|
||||
fi
|
||||
|
||||
for i in ${!FCP_*}; do
|
||||
diff --git a/modules.d/80cms/module-setup.sh b/modules.d/80cms/module-setup.sh
|
||||
index 0dd86b80..05b049da 100755
|
||||
--- a/modules.d/80cms/module-setup.sh
|
||||
+++ b/modules.d/80cms/module-setup.sh
|
||||
@@ -12,13 +12,13 @@ check() {
|
||||
depends() {
|
||||
arch=${DRACUT_ARCH:-$(uname -m)}
|
||||
[ "$arch" = "s390" -o "$arch" = "s390x" ] || return 1
|
||||
- echo znet dasd dasd_mod bash
|
||||
+ echo znet bash
|
||||
return 0
|
||||
}
|
||||
|
||||
# called by dracut
|
||||
installkernel() {
|
||||
- instmods zfcp
|
||||
+ instmods zfcp dasd_mod dasd_eckd_mod dasd_fba_mod dasd_diag_mod
|
||||
}
|
||||
|
||||
# called by dracut
|
||||
@@ -28,7 +28,7 @@ install() {
|
||||
inst_script "$moddir/cmsifup.sh" /sbin/cmsifup
|
||||
# shellcheck disable=SC2046
|
||||
inst_multiple /etc/cmsfs-fuse/filetypes.conf /etc/udev/rules.d/99-fuse.rules /etc/fuse.conf \
|
||||
- cmsfs-fuse fusermount bash insmod rmmod cat normalize_dasd_arg sed \
|
||||
+ cmsfs-fuse fusermount bash insmod rmmod cat /lib/s390-tools/zdev-from-dasd_mod.dasd sed \
|
||||
$(rpm -ql s390utils-base) awk getopt chzdev lszdev
|
||||
|
||||
inst_libdir_file "gconv/*"
|
||||
--
|
||||
2.42.0
|
||||
|
109
0006-refactor-cms-use-consolidated-network-config-with-zd.patch
Normal file
109
0006-refactor-cms-use-consolidated-network-config-with-zd.patch
Normal file
@ -0,0 +1,109 @@
|
||||
From cc14fe218861f2855ca88ad03220ecb78d4aa31a Mon Sep 17 00:00:00 2001
|
||||
From: Steffen Maier <maier@linux.ibm.com>
|
||||
Date: Wed, 26 Jul 2023 13:50:03 +0200
|
||||
Subject: [PATCH 06/23] refactor(cms): use consolidated network config with
|
||||
zdev from s390-tools
|
||||
|
||||
This is just internal to initrd, so we can already migrate the code to
|
||||
consolidated network device configuration with zdev
|
||||
https://github.com/ibm-s390-linux/s390-tools/tree/master/zdev/.
|
||||
The code change is transparent to users after dracut switch root.
|
||||
|
||||
The generated persistent config of chzdev are pure udev rules so it has no
|
||||
dependency on the zdev dracut module.
|
||||
|
||||
Keep the dependency on dracut module znet to at least pull in the required
|
||||
kernel device drivers.
|
||||
|
||||
Since consolidated s390 network device configuration with zdev is used,
|
||||
it takes care of all s390-specific settings.
|
||||
None of the s390-specific ifcfg variables should be used anymore.
|
||||
NETTYPE, OPTIONS, PORTNAME, and CTCPROT can be removed entirely.
|
||||
SUBCHANNELS is kept because there are some dependency chains
|
||||
(probably around the key identifiying an interface which is not HWADDR):
|
||||
|
||||
modules.d/35network-legacy/module-setup.sh
|
||||
parses (sources) each of /etc/sysconfig/network-scripts/ifcfg-*
|
||||
and if that contains SUBCHANNELS, create a symlink from the ifcfg file to
|
||||
/etc/sysconfig/network-scripts/ccw-${SUBCHANNELS}.conf
|
||||
|
||||
modules.d/35network-legacy/ifup.sh installed as /sbin/ifup
|
||||
checks during team setup if a slave interface is an s390 channel-attached
|
||||
network interface and then parses (sources)
|
||||
/etc/sysconfig/network-scripts/ccw-${SUBCHANNELS}.conf
|
||||
from above, if that file exists
|
||||
|
||||
Signed-off-by: Steffen Maier <maier@linux.ibm.com>
|
||||
---
|
||||
modules.d/80cms/cms-write-ifcfg.sh | 13 -------------
|
||||
modules.d/80cms/cmssetup.sh | 21 +++++++++++++--------
|
||||
2 files changed, 13 insertions(+), 21 deletions(-)
|
||||
|
||||
diff --git a/modules.d/80cms/cms-write-ifcfg.sh b/modules.d/80cms/cms-write-ifcfg.sh
|
||||
index ecfd53ef..91263092 100755
|
||||
--- a/modules.d/80cms/cms-write-ifcfg.sh
|
||||
+++ b/modules.d/80cms/cms-write-ifcfg.sh
|
||||
@@ -81,21 +81,8 @@ EOF
|
||||
fi
|
||||
# colons in SEARCHDNS already replaced with spaces above for /etc/resolv.conf
|
||||
[[ $SEARCHDNS ]] && echo "DOMAIN=\"$SEARCHDNS\"" >> "$IFCFGFILE"
|
||||
- [[ $NETTYPE ]] && echo "NETTYPE=$NETTYPE" >> "$IFCFGFILE"
|
||||
[[ $PEERID ]] && echo "PEERID=$PEERID" >> "$IFCFGFILE"
|
||||
- [[ $PORTNAME ]] && echo "PORTNAME=$PORTNAME" >> "$IFCFGFILE"
|
||||
- [[ $CTCPROT ]] && echo "CTCPROT=$CTCPROT" >> "$IFCFGFILE"
|
||||
[[ $MACADDR ]] && echo "MACADDR=$MACADDR" >> "$IFCFGFILE"
|
||||
- optstr=""
|
||||
- for option in LAYER2 PORTNO; do
|
||||
- [ -z "${!option}" ] && continue
|
||||
- [ -n "$optstr" ] && optstr=${optstr}" "
|
||||
- optstr=${optstr}$(echo ${option} | sed 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/')"="${!option}
|
||||
- done
|
||||
- # write single quotes since network.py removes double quotes but we need quotes
|
||||
- echo "OPTIONS='$optstr'" >> "$IFCFGFILE"
|
||||
- unset option
|
||||
- unset optstr
|
||||
unset DNS1
|
||||
unset DNS2
|
||||
echo "files /etc/sysconfig/network-scripts" >> /run/initramfs/rwtab
|
||||
diff --git a/modules.d/80cms/cmssetup.sh b/modules.d/80cms/cmssetup.sh
|
||||
index 01cfd303..5e5b9267 100755
|
||||
--- a/modules.d/80cms/cmssetup.sh
|
||||
+++ b/modules.d/80cms/cmssetup.sh
|
||||
@@ -82,13 +82,19 @@ processcmsfile() {
|
||||
SUBCHANNELS="$(echo "$SUBCHANNELS" | sed 'y/ABCDEF/abcdef/')"
|
||||
|
||||
if [[ $NETTYPE ]]; then
|
||||
- (
|
||||
- echo -n "$NETTYPE","$SUBCHANNELS"
|
||||
- [[ $PORTNAME ]] && echo -n ",portname=$PORTNAME"
|
||||
- [[ $LAYER2 ]] && echo -n ",layer2=$LAYER2"
|
||||
- [[ $NETTYPE == "ctc" ]] && [[ $CTCPROT ]] && echo -n ",protocol=$CTCPROT"
|
||||
- echo
|
||||
- ) >> /etc/ccw.conf
|
||||
+ _cms_attrs=""
|
||||
+ if [[ $PORTNAME ]]; then
|
||||
+ if [[ $NETTYPE == lcs ]]; then
|
||||
+ _cms_attrs="$_cms_attrs portno=$PORTNAME"
|
||||
+ else
|
||||
+ _cms_attrs="$_cms_attrs portname=$PORTNAME"
|
||||
+ fi
|
||||
+ fi
|
||||
+ [[ $LAYER2 ]] && _cms_attrs="$_cms_attrs layer2=$LAYER2"
|
||||
+ [[ $CTCPROT ]] && _cms_attrs="$_cms_attrs protocol=$CTCPROT"
|
||||
+ # shellcheck disable=SC2086
|
||||
+ chzdev --enable --persistent --yes --no-root-update --force \
|
||||
+ "$NETTYPE" "$SUBCHANNELS" $_cms_attrs 2>&1 | vinfo
|
||||
|
||||
OLDIFS=$IFS
|
||||
IFS=,
|
||||
@@ -109,7 +115,6 @@ processcmsfile() {
|
||||
[[ -f /etc/udev/rules.d/90-net.rules ]] \
|
||||
|| printf 'SUBSYSTEM=="net", ACTION=="online", RUN+="/sbin/initqueue --onetime --env netif=$name source_hook initqueue/online"\n' >> /etc/udev/rules.d/99-cms.rules
|
||||
udevadm control --reload
|
||||
- znet_cio_free
|
||||
fi
|
||||
|
||||
if [[ $DASD ]] && [[ $DASD != "none" ]]; then
|
||||
--
|
||||
2.42.0
|
||||
|
@ -0,0 +1,27 @@
|
||||
From a2c1fc530d8bcbdeaf1806f4a22019052715fc98 Mon Sep 17 00:00:00 2001
|
||||
From: Steffen Maier <maier@linux.ibm.com>
|
||||
Date: Thu, 8 Feb 2024 18:38:48 +0100
|
||||
Subject: [PATCH 07/23] refactor(cms): remove now unnecessary inclusion of full
|
||||
s390utils-base
|
||||
|
||||
Signed-off-by: Steffen Maier <maier@linux.ibm.com>
|
||||
---
|
||||
modules.d/80cms/module-setup.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/80cms/module-setup.sh b/modules.d/80cms/module-setup.sh
|
||||
index 05b049da..5b33cd18 100755
|
||||
--- a/modules.d/80cms/module-setup.sh
|
||||
+++ b/modules.d/80cms/module-setup.sh
|
||||
@@ -29,7 +29,7 @@ install() {
|
||||
# shellcheck disable=SC2046
|
||||
inst_multiple /etc/cmsfs-fuse/filetypes.conf /etc/udev/rules.d/99-fuse.rules /etc/fuse.conf \
|
||||
cmsfs-fuse fusermount bash insmod rmmod cat /lib/s390-tools/zdev-from-dasd_mod.dasd sed \
|
||||
- $(rpm -ql s390utils-base) awk getopt chzdev lszdev
|
||||
+ awk getopt chzdev lszdev
|
||||
|
||||
inst_libdir_file "gconv/*"
|
||||
#inst /usr/lib/locale/locale-archive
|
||||
--
|
||||
2.42.0
|
||||
|
222
0008-feat-zfcp_rules-remove-zfcp-handling-consolidated-in.patch
Normal file
222
0008-feat-zfcp_rules-remove-zfcp-handling-consolidated-in.patch
Normal file
@ -0,0 +1,222 @@
|
||||
From 71876ea8c73090741bdf26abb89c28fb260ed575 Mon Sep 17 00:00:00 2001
|
||||
From: Steffen Maier <maier@linux.ibm.com>
|
||||
Date: Fri, 20 Jan 2023 18:22:19 +0100
|
||||
Subject: [PATCH 08/23] feat(zfcp_rules): remove zfcp handling consolidated in
|
||||
s390-tools
|
||||
|
||||
These are handled by s390-tools zdev dracut module 95zdev as of
|
||||
https://github.com/ibm-s390-linux/s390-tools/commit/06a30ae529a5d6ad2369ed81da056bf3a6147bb6
|
||||
("zdev/dracut: add rd.zfcp cmdline option handling").
|
||||
|
||||
Even though this removes one implementation of parsing rd.zfcp in dracut,
|
||||
above s390-tools change introduces another implementation of parsing the
|
||||
exact same rd.zfcp syntax. Therefore, it would be good to keep the
|
||||
documentation in man/dracut.cmdline.7 of dracut as one central place
|
||||
describing all s390 device types that dracut handles.
|
||||
|
||||
This also fixes problems such as RHBZ 1552619/1745470. It was due to a
|
||||
duplicate configuration because the SUSE-specific module 95zfcp_rules does
|
||||
not have any distro-specific dependency and thus also ran in Red Hat
|
||||
distros.
|
||||
|
||||
That also caused a kind of competition with 95zfcp regarding the same hook
|
||||
registration:
|
||||
inst_hook cmdline 30 "$moddir/parse-zfcp.sh"
|
||||
"luckily" 95zfcp wins since it runs lexicographically first
|
||||
and the first one registering the hook via inst_simple wins.
|
||||
|
||||
Because commit c8aa1d949aec ("95zfcp_rules: simplified rd.zfcp commandline
|
||||
for NPIV") extended the emitted rd.zfcp syntax for hostonly-cmdline in
|
||||
95zfcp_rules, kdump initrds built with hostonly-cmdline parsed such rd.zfcp
|
||||
with 95zfcp, which did not understand the extended syntax yet and aborted
|
||||
early boot with a syntax error.
|
||||
|
||||
It also seems that parse-zfcp.sh on its own is without effect because
|
||||
create_udev_rule() [similar to what zfcp_disk_configure had generated] does
|
||||
not handle the pre-requisite of setting an FCP device (vHBA) online first.
|
||||
So the rport match does not trigger unless something else happens to set an
|
||||
FCP device online [such as rules generated by zfcp_host_configure]. Related
|
||||
to commit d40c49a8dfe2 ("fix(zfcp_rules): remove collect based udev rule
|
||||
creators").
|
||||
|
||||
module-setup.sh having copied all udev rules from the root-fs into the
|
||||
initrd conflicted with s390-tools dracut module zdev-kdump, which
|
||||
intentionally only activates the dependencies of the kdump target.
|
||||
|
||||
Signed-off-by: Steffen Maier <maier@linux.ibm.com>
|
||||
---
|
||||
modules.d/95zfcp_rules/module-setup.sh | 80 --------------------------
|
||||
modules.d/95zfcp_rules/parse-zfcp.sh | 74 ------------------------
|
||||
2 files changed, 154 deletions(-)
|
||||
delete mode 100755 modules.d/95zfcp_rules/module-setup.sh
|
||||
delete mode 100755 modules.d/95zfcp_rules/parse-zfcp.sh
|
||||
|
||||
diff --git a/modules.d/95zfcp_rules/module-setup.sh b/modules.d/95zfcp_rules/module-setup.sh
|
||||
deleted file mode 100755
|
||||
index dfa79514..00000000
|
||||
--- a/modules.d/95zfcp_rules/module-setup.sh
|
||||
+++ /dev/null
|
||||
@@ -1,80 +0,0 @@
|
||||
-#!/bin/bash
|
||||
-
|
||||
-# called by dracut
|
||||
-cmdline() {
|
||||
- is_zfcp() {
|
||||
- local _dev=$1
|
||||
- local _devpath
|
||||
- _devpath=$(
|
||||
- cd -P /sys/dev/block/"$_dev" || exit
|
||||
- echo "$PWD"
|
||||
- )
|
||||
- local _sdev _scsiid _hostno _lun _wwpn _ccw _port_type
|
||||
- local _allow_lun_scan _is_npiv
|
||||
-
|
||||
- read -r _allow_lun_scan < /sys/module/zfcp/parameters/allow_lun_scan
|
||||
- [ "${_devpath#*/sd}" == "$_devpath" ] && return 1
|
||||
- _sdev="${_devpath%%/block/*}"
|
||||
- [ -e "${_sdev}"/fcp_lun ] || return 1
|
||||
- _scsiid="${_sdev##*/}"
|
||||
- _hostno="${_scsiid%%:*}"
|
||||
- [ -d /sys/class/fc_host/host"${_hostno}" ] || return 1
|
||||
- read -r _port_type < /sys/class/fc_host/host"${_hostno}"/port_type
|
||||
- case "$_port_type" in
|
||||
- NPIV*)
|
||||
- _is_npiv=1
|
||||
- ;;
|
||||
- esac
|
||||
- read -r _ccw < "${_sdev}"/hba_id
|
||||
- if [ "$_is_npiv" ] && [ "$_allow_lun_scan" = "Y" ]; then
|
||||
- echo "rd.zfcp=${_ccw}"
|
||||
- else
|
||||
- read -r _lun < "${_sdev}"/fcp_lun
|
||||
- read -r _wwpn < "${_sdev}"/wwpn
|
||||
- echo "rd.zfcp=${_ccw},${_wwpn},${_lun}"
|
||||
- fi
|
||||
- return 0
|
||||
- }
|
||||
- [[ $hostonly ]] || [[ $mount_needs ]] && {
|
||||
- for_each_host_dev_and_slaves_all is_zfcp
|
||||
- } | sort | uniq
|
||||
-}
|
||||
-
|
||||
-# called by dracut
|
||||
-check() {
|
||||
- local _arch=${DRACUT_ARCH:-$(uname -m)}
|
||||
- local _ccw
|
||||
- [ "$_arch" = "s390" -o "$_arch" = "s390x" ] || return 1
|
||||
-
|
||||
- [[ $hostonly ]] || [[ $mount_needs ]] && {
|
||||
- found=0
|
||||
- for _ccw in /sys/bus/ccw/devices/*/host*; do
|
||||
- [ -d "$_ccw" ] || continue
|
||||
- found=$((found + 1))
|
||||
- done
|
||||
- [ $found -eq 0 ] && return 255
|
||||
- }
|
||||
- return 0
|
||||
-}
|
||||
-
|
||||
-# called by dracut
|
||||
-depends() {
|
||||
- echo bash
|
||||
- return 0
|
||||
-}
|
||||
-
|
||||
-# called by dracut
|
||||
-install() {
|
||||
- inst_hook cmdline 30 "$moddir/parse-zfcp.sh"
|
||||
- if [[ $hostonly_cmdline == "yes" ]]; then
|
||||
- local _zfcp
|
||||
-
|
||||
- for _zfcp in $(cmdline); do
|
||||
- printf "%s\n" "$_zfcp" >> "${initdir}/etc/cmdline.d/94zfcp.conf"
|
||||
- done
|
||||
- fi
|
||||
- if [[ $hostonly ]]; then
|
||||
- inst_rules_wildcard "51-zfcp-*.rules"
|
||||
- inst_rules_wildcard "41-zfcp-*.rules"
|
||||
- fi
|
||||
-}
|
||||
diff --git a/modules.d/95zfcp_rules/parse-zfcp.sh b/modules.d/95zfcp_rules/parse-zfcp.sh
|
||||
deleted file mode 100755
|
||||
index a474b81b..00000000
|
||||
--- a/modules.d/95zfcp_rules/parse-zfcp.sh
|
||||
+++ /dev/null
|
||||
@@ -1,74 +0,0 @@
|
||||
-#!/bin/bash
|
||||
-
|
||||
-create_udev_rule() {
|
||||
- local ccw=$1
|
||||
- local wwpn=$2
|
||||
- local lun=$3
|
||||
- local _rule=/etc/udev/rules.d/51-zfcp-${ccw}.rules
|
||||
- local _cu_type _dev_type
|
||||
-
|
||||
- if [ -x /sbin/cio_ignore ] && cio_ignore -i "$ccw" > /dev/null; then
|
||||
- cio_ignore -r "$ccw"
|
||||
- fi
|
||||
-
|
||||
- if [ -e /sys/bus/ccw/devices/"${ccw}" ]; then
|
||||
- read -r _cu_type < /sys/bus/ccw/devices/"${ccw}"/cutype
|
||||
- read -r _dev_type < /sys/bus/ccw/devices/"${ccw}"/devtype
|
||||
- fi
|
||||
- if [ "$_cu_type" != "1731/03" ]; then
|
||||
- return 0
|
||||
- fi
|
||||
- if [ "$_dev_type" != "1732/03" ] && [ "$_dev_type" != "1732/04" ]; then
|
||||
- return 0
|
||||
- fi
|
||||
-
|
||||
- [ -z "$wwpn" ] || [ -z "$lun" ] && return
|
||||
- m=$(sed -n "/.*${wwpn}.*${lun}.*/p" "$_rule")
|
||||
- if [ -z "$m" ]; then
|
||||
- cat >> "$_rule" << EOF
|
||||
-ACTION=="add", KERNEL=="rport-*", ATTR{port_name}=="$wwpn", SUBSYSTEMS=="ccw", KERNELS=="$ccw", ATTR{[ccw/$ccw]$wwpn/unit_add}="$lun"
|
||||
-EOF
|
||||
- fi
|
||||
-}
|
||||
-
|
||||
-if [[ -f /sys/firmware/ipl/ipl_type ]] \
|
||||
- && [[ $(< /sys/firmware/ipl/ipl_type) == "fcp" ]]; then
|
||||
- (
|
||||
- read -r _wwpn < /sys/firmware/ipl/wwpn
|
||||
- read -r _lun < /sys/firmware/ipl/lun
|
||||
- read -r _ccw < /sys/firmware/ipl/device
|
||||
-
|
||||
- create_udev_rule "$_ccw" "$_wwpn" "$_lun"
|
||||
- )
|
||||
-fi
|
||||
-
|
||||
-for zfcp_arg in $(getargs rd.zfcp); do
|
||||
- (
|
||||
- OLDIFS="$IFS"
|
||||
- IFS=","
|
||||
- # shellcheck disable=SC2086
|
||||
- set $zfcp_arg
|
||||
- IFS="$OLDIFS"
|
||||
- create_udev_rule "$1" "$2" "$3"
|
||||
- )
|
||||
-done
|
||||
-
|
||||
-for zfcp_arg in $(getargs root=) $(getargs resume=); do
|
||||
- (
|
||||
- case $zfcp_arg in
|
||||
- /dev/disk/by-path/ccw-*)
|
||||
- ccw_arg=${zfcp_arg##*/}
|
||||
- ;;
|
||||
- esac
|
||||
- if [ -n "$ccw_arg" ]; then
|
||||
- OLDIFS="$IFS"
|
||||
- IFS="-"
|
||||
- # shellcheck disable=SC2086
|
||||
- set -- $ccw_arg
|
||||
- IFS="$OLDIFS"
|
||||
- _wwpn=${4%:*}
|
||||
- _lun=${4#*:}
|
||||
- create_udev_rule "$2" "$wwpn" "$lun"
|
||||
- fi
|
||||
- )
|
||||
-done
|
||||
--
|
||||
2.42.0
|
||||
|
104
0009-feat-zfcp-minimize-zfcp-handling-consolidated-in-s39.patch
Normal file
104
0009-feat-zfcp-minimize-zfcp-handling-consolidated-in-s39.patch
Normal file
@ -0,0 +1,104 @@
|
||||
From 8d6098969aa9dc34edfd1bc96e6aa0384ae2fb99 Mon Sep 17 00:00:00 2001
|
||||
From: Steffen Maier <maier@linux.ibm.com>
|
||||
Date: Tue, 31 Jan 2023 09:14:40 +0100
|
||||
Subject: [PATCH 09/23] feat(zfcp): minimize zfcp handling consolidated in
|
||||
s390-tools
|
||||
|
||||
Parsing of rd.zfcp is handled by s390-tools zdev dracut module 95zdev as of
|
||||
https://github.com/ibm-s390-linux/s390-tools/commit/06a30ae529a5d6ad2369ed81da056bf3a6147bb6
|
||||
("zdev/dracut: add rd.zfcp cmdline option handling").
|
||||
|
||||
Even though this removes the last implementation of parsing rd.zfcp in
|
||||
dracut, above s390-tools change introduces another implementation of
|
||||
parsing the exact same rd.zfcp syntax. Therefore, it would be good to keep
|
||||
the documentation in man/dracut.cmdline.7 of dracut as one central place
|
||||
describing all s390 device types that dracut handles.
|
||||
|
||||
For the time being, keep copying /etc/zfcp.conf.
|
||||
Retain the call of zfcp_cio_free so /etc/zfcp.conf gets processed even
|
||||
with the typical cio_ignore kernel boot parameter ignoring most devices.
|
||||
Also keep handling rd.zfcp.conf=0 so users can, at boot time, ignore
|
||||
/etc/zfcp.conf already copied into initrd.
|
||||
|
||||
Preparation for consolidating persistent configuration with zdev.
|
||||
|
||||
Signed-off-by: Steffen Maier <maier@linux.ibm.com>
|
||||
---
|
||||
man/dracut.cmdline.7.asc | 12 +++++++++++-
|
||||
modules.d/95zfcp/module-setup.sh | 4 ++--
|
||||
modules.d/95zfcp/parse-zfcp.sh | 11 -----------
|
||||
3 files changed, 13 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/man/dracut.cmdline.7.asc b/man/dracut.cmdline.7.asc
|
||||
index 858991fa..01bdf10f 100644
|
||||
--- a/man/dracut.cmdline.7.asc
|
||||
+++ b/man/dracut.cmdline.7.asc
|
||||
@@ -980,12 +980,22 @@ ZFCP
|
||||
**rd.zfcp=**__<zfcp adaptor device bus ID>__,__<WWPN>__,__<FCPLUN>__::
|
||||
rd.zfcp can be specified multiple times on the kernel command
|
||||
line.
|
||||
++
|
||||
+NOTE:
|
||||
+ This parameter is no longer handled by dracut itself but with the exact
|
||||
+ same syntax by
|
||||
+ https://github.com/ibm-s390-linux/s390-tools/tree/master/zdev/dracut/95zdev.
|
||||
|
||||
**rd.zfcp=**__<zfcp adaptor device bus ID>__::
|
||||
If NPIV is enabled and the 'allow_lun_scan' parameter to the zfcp
|
||||
- module is set to 'Y' then the zfcp adaptor will be initiating a
|
||||
+ module is set to 'Y' then the zfcp driver will be initiating a
|
||||
scan internally and the <WWPN> and <FCPLUN> parameters can be omitted.
|
||||
+
|
||||
+NOTE:
|
||||
+ This parameter is no longer handled by dracut itself but with the exact
|
||||
+ same syntax by
|
||||
+ https://github.com/ibm-s390-linux/s390-tools/tree/master/zdev/dracut/95zdev.
|
||||
++
|
||||
[listing]
|
||||
.Example
|
||||
--
|
||||
diff --git a/modules.d/95zfcp/module-setup.sh b/modules.d/95zfcp/module-setup.sh
|
||||
index e1f3aa35..b547f9bc 100755
|
||||
--- a/modules.d/95zfcp/module-setup.sh
|
||||
+++ b/modules.d/95zfcp/module-setup.sh
|
||||
@@ -5,7 +5,7 @@ check() {
|
||||
arch=${DRACUT_ARCH:-$(uname -m)}
|
||||
[ "$arch" = "s390" -o "$arch" = "s390x" ] || return 1
|
||||
|
||||
- require_binaries zfcp_cio_free grep sed seq || return 1
|
||||
+ require_binaries zfcp_cio_free sed || return 1
|
||||
|
||||
return 0
|
||||
}
|
||||
@@ -23,7 +23,7 @@ installkernel() {
|
||||
# called by dracut
|
||||
install() {
|
||||
inst_hook cmdline 30 "$moddir/parse-zfcp.sh"
|
||||
- inst_multiple zfcp_cio_free grep sed seq
|
||||
+ inst_multiple zfcp_cio_free sed
|
||||
|
||||
inst_script /sbin/zfcpconf.sh
|
||||
inst_rules 56-zfcp.rules
|
||||
diff --git a/modules.d/95zfcp/parse-zfcp.sh b/modules.d/95zfcp/parse-zfcp.sh
|
||||
index 495aa67f..41216dd9 100755
|
||||
--- a/modules.d/95zfcp/parse-zfcp.sh
|
||||
+++ b/modules.d/95zfcp/parse-zfcp.sh
|
||||
@@ -2,15 +2,4 @@
|
||||
|
||||
getargbool 1 rd.zfcp.conf -d -n rd_NO_ZFCPCONF || rm /etc/zfcp.conf
|
||||
|
||||
-for zfcp_arg in $(getargs rd.zfcp -d 'rd_ZFCP='); do
|
||||
- echo "$zfcp_arg" | grep '^0\.[0-9a-fA-F]\.[0-9a-fA-F]\{4\}\(,0x[0-9a-fA-F]\{16\},0x[0-9a-fA-F]\{16\}\)\?$' > /dev/null
|
||||
- test $? -ne 0 && die "For argument 'rd.zfcp=$zfcp_arg'\nSorry, invalid format."
|
||||
- (
|
||||
- IFS=","
|
||||
- # shellcheck disable=SC2086
|
||||
- set $zfcp_arg
|
||||
- echo "$@" >> /etc/zfcp.conf
|
||||
- )
|
||||
-done
|
||||
-
|
||||
zfcp_cio_free
|
||||
--
|
||||
2.42.0
|
||||
|
151
0010-feat-dasd_rules-remove-dasd-handling-consolidated-in.patch
Normal file
151
0010-feat-dasd_rules-remove-dasd-handling-consolidated-in.patch
Normal file
@ -0,0 +1,151 @@
|
||||
From 7294e45b5204e47bb8ee2108e2c38c5843e64fac Mon Sep 17 00:00:00 2001
|
||||
From: Steffen Maier <maier@linux.ibm.com>
|
||||
Date: Thu, 23 Mar 2023 18:06:23 +0100
|
||||
Subject: [PATCH 10/23] feat(dasd_rules): remove dasd handling consolidated in
|
||||
s390-tools
|
||||
|
||||
These are handled by s390-tools zdev dracut module 95zdev as of
|
||||
https://github.com/ibm-s390-linux/s390-tools/commit/99270236805972544932feab9692ee7122a343b8
|
||||
("zdev/dracut: add rd.dasd cmdline option handling").
|
||||
|
||||
Even though this removes one implementation of parsing rd.dasd in dracut,
|
||||
above s390-tools change introduces another implementation of parsing the
|
||||
exact same rd.dasd syntax. Therefore, it would be good to keep the
|
||||
documentation in man/dracut.cmdline.7 of dracut as one central place
|
||||
describing all s390 device types that dracut handles.
|
||||
|
||||
module-setup.sh having copied all udev rules from the root-fs into the
|
||||
initrd conflicted with s390-tools dracut module zdev-kdump, which
|
||||
intentionally only activates the dependencies of the kdump target.
|
||||
|
||||
Signed-off-by: Steffen Maier <maier@linux.ibm.com>
|
||||
---
|
||||
modules.d/95dasd_rules/module-setup.sh | 65 --------------------------
|
||||
modules.d/95dasd_rules/parse-dasd.sh | 43 -----------------
|
||||
2 files changed, 108 deletions(-)
|
||||
delete mode 100755 modules.d/95dasd_rules/module-setup.sh
|
||||
delete mode 100755 modules.d/95dasd_rules/parse-dasd.sh
|
||||
|
||||
diff --git a/modules.d/95dasd_rules/module-setup.sh b/modules.d/95dasd_rules/module-setup.sh
|
||||
deleted file mode 100755
|
||||
index 06c57a48..00000000
|
||||
--- a/modules.d/95dasd_rules/module-setup.sh
|
||||
+++ /dev/null
|
||||
@@ -1,65 +0,0 @@
|
||||
-#!/bin/bash
|
||||
-
|
||||
-# called by dracut
|
||||
-cmdline() {
|
||||
- is_dasd() {
|
||||
- local _dev=$1
|
||||
- local _devpath
|
||||
- _devpath=$(
|
||||
- cd -P /sys/dev/block/"$_dev" || exit
|
||||
- echo "$PWD"
|
||||
- )
|
||||
-
|
||||
- [ "${_devpath#*/dasd}" == "$_devpath" ] && return 1
|
||||
- _ccw="${_devpath%%/block/*}"
|
||||
- echo "rd.dasd=${_ccw##*/}"
|
||||
- return 0
|
||||
- }
|
||||
- [[ $hostonly ]] || [[ $mount_needs ]] && {
|
||||
- for_each_host_dev_and_slaves_all is_dasd || return 255
|
||||
- } | sort | uniq
|
||||
-}
|
||||
-
|
||||
-# called by dracut
|
||||
-check() {
|
||||
- local _arch=${DRACUT_ARCH:-$(uname -m)}
|
||||
- local found=0
|
||||
- local bdev
|
||||
- [ "$_arch" = "s390" -o "$_arch" = "s390x" ] || return 1
|
||||
-
|
||||
- [[ $hostonly ]] || [[ $mount_needs ]] && {
|
||||
- for bdev in /sys/block/*; do
|
||||
- case "${bdev##*/}" in
|
||||
- dasd*)
|
||||
- found=$((found + 1))
|
||||
- break
|
||||
- ;;
|
||||
- esac
|
||||
- done
|
||||
- [ $found -eq 0 ] && return 255
|
||||
- }
|
||||
- return 0
|
||||
-}
|
||||
-
|
||||
-# called by dracut
|
||||
-depends() {
|
||||
- echo 'dasd_mod' bash
|
||||
- return 0
|
||||
-}
|
||||
-
|
||||
-# called by dracut
|
||||
-install() {
|
||||
- inst_hook cmdline 30 "$moddir/parse-dasd.sh"
|
||||
- if [[ $hostonly_cmdline == "yes" ]]; then
|
||||
- local _dasd
|
||||
- _dasd=$(cmdline)
|
||||
- [[ $_dasd ]] && printf "%s\n" "$_dasd" >> "${initdir}/etc/cmdline.d/95dasd.conf"
|
||||
- fi
|
||||
- if [[ $hostonly ]]; then
|
||||
- inst_rules_wildcard "51-dasd-*.rules"
|
||||
- inst_rules_wildcard "41-dasd-*.rules"
|
||||
- mark_hostonly /etc/udev/rules.d/51-dasd-*.rules
|
||||
- mark_hostonly /etc/udev/rules.d/41-dasd-*.rules
|
||||
- fi
|
||||
- inst_rules 59-dasd.rules
|
||||
-}
|
||||
diff --git a/modules.d/95dasd_rules/parse-dasd.sh b/modules.d/95dasd_rules/parse-dasd.sh
|
||||
deleted file mode 100755
|
||||
index 4454aec3..00000000
|
||||
--- a/modules.d/95dasd_rules/parse-dasd.sh
|
||||
+++ /dev/null
|
||||
@@ -1,43 +0,0 @@
|
||||
-#!/bin/bash
|
||||
-
|
||||
-allow_device() {
|
||||
- local ccw=$1
|
||||
-
|
||||
- if [ -x /sbin/cio_ignore ] && cio_ignore -i "$ccw" > /dev/null; then
|
||||
- cio_ignore -r "$ccw"
|
||||
- fi
|
||||
-}
|
||||
-
|
||||
-if [[ -f /sys/firmware/ipl/ipl_type ]] && [[ $(< /sys/firmware/ipl/ipl_type) == "ccw" ]]; then
|
||||
- allow_device "$(< /sys/firmware/ipl/device)"
|
||||
-fi
|
||||
-
|
||||
-for dasd_arg in $(getargs root=) $(getargs resume=); do
|
||||
- [[ $dasd_arg =~ /dev/disk/by-path/ccw-* ]] || continue
|
||||
-
|
||||
- ccw_dev="${dasd_arg##*/ccw-}"
|
||||
- allow_device "${ccw_dev%%-*}"
|
||||
-done
|
||||
-
|
||||
-for dasd_arg in $(getargs rd.dasd=); do
|
||||
- IFS=',' read -r -a devs <<< "$dasd_arg"
|
||||
- declare -p devs
|
||||
- for dev in "${devs[@]}"; do
|
||||
- case "$dev" in
|
||||
- autodetect | probeonly) ;;
|
||||
-
|
||||
- *-*)
|
||||
- IFS="-" read -r start end _ <<< "${dev%(ro)}"
|
||||
- prefix=${start%.*}
|
||||
- start=${start##*.}
|
||||
- for rdev in $(seq $((16#$start)) $((16#$end))); do
|
||||
- allow_device "$(printf "%s.%04x" "$prefix" "$rdev")"
|
||||
- done
|
||||
- ;;
|
||||
- *)
|
||||
- IFS="." read -r sid ssid chan _ <<< "${dev%(ro)}"
|
||||
- allow_device "$(printf "%01x.%01x.%04x" $((16#$sid)) $((16#$ssid)) $((16#$chan)))"
|
||||
- ;;
|
||||
- esac
|
||||
- done
|
||||
-done
|
||||
--
|
||||
2.42.0
|
||||
|
@ -0,0 +1,73 @@
|
||||
From a82045ef34bc8c913502eba37b6b9c60709d6997 Mon Sep 17 00:00:00 2001
|
||||
From: Steffen Maier <maier@linux.ibm.com>
|
||||
Date: Thu, 23 Mar 2023 18:22:56 +0100
|
||||
Subject: [PATCH 11/23] feat(dasd_mod): minimize dasd handling consolidated in
|
||||
s390-tools
|
||||
|
||||
Parsing of rd.dasd is handled by s390-tools zdev dracut module 95zdev as of
|
||||
https://github.com/ibm-s390-linux/s390-tools/commit/99270236805972544932feab9692ee7122a343b8
|
||||
("zdev/dracut: add rd.dasd cmdline option handling").
|
||||
|
||||
Even though this removes one implementation of parsing rd.dasd in dracut,
|
||||
above s390-tools change introduces another implementation of parsing the
|
||||
exact same rd.dasd syntax. Therefore, it would be good to keep the
|
||||
documentation in man/dracut.cmdline.7 of dracut as one central place
|
||||
describing all s390 device types that dracut handles.
|
||||
|
||||
95dasd/modules-setup.sh copies /etc/dasd.conf from root-fs into initrd.
|
||||
Retain the call of dasd_cio_free here so /etc/dasd.conf gets processed even
|
||||
with the typical cio_ignore kernel boot parameter ignoring most devices.
|
||||
|
||||
Preparation for consolidating persistent configuration with zdev.
|
||||
|
||||
Signed-off-by: Steffen Maier <maier@linux.ibm.com>
|
||||
---
|
||||
modules.d/95dasd_mod/module-setup.sh | 2 --
|
||||
modules.d/95dasd_mod/parse-dasd-mod.sh | 14 --------------
|
||||
2 files changed, 16 deletions(-)
|
||||
|
||||
diff --git a/modules.d/95dasd_mod/module-setup.sh b/modules.d/95dasd_mod/module-setup.sh
|
||||
index c59dd3ac..155eaacc 100755
|
||||
--- a/modules.d/95dasd_mod/module-setup.sh
|
||||
+++ b/modules.d/95dasd_mod/module-setup.sh
|
||||
@@ -4,7 +4,6 @@
|
||||
check() {
|
||||
local _arch=${DRACUT_ARCH:-$(uname -m)}
|
||||
[ "$_arch" = "s390" -o "$_arch" = "s390x" ] || return 1
|
||||
- require_binaries grep sed seq
|
||||
|
||||
return 0
|
||||
}
|
||||
@@ -22,6 +21,5 @@ installkernel() {
|
||||
# called by dracut
|
||||
install() {
|
||||
inst_hook cmdline 31 "$moddir/parse-dasd-mod.sh"
|
||||
- inst_multiple grep sed seq
|
||||
inst_multiple -o dasd_cio_free
|
||||
}
|
||||
diff --git a/modules.d/95dasd_mod/parse-dasd-mod.sh b/modules.d/95dasd_mod/parse-dasd-mod.sh
|
||||
index 2b86d454..b635ecf9 100755
|
||||
--- a/modules.d/95dasd_mod/parse-dasd-mod.sh
|
||||
+++ b/modules.d/95dasd_mod/parse-dasd-mod.sh
|
||||
@@ -1,18 +1,4 @@
|
||||
#!/bin/sh
|
||||
-mod_args=""
|
||||
-
|
||||
-for dasd_arg in $(getargs rd.dasd= -d rd_DASD= DASD=); do
|
||||
- mod_args="$mod_args,$dasd_arg"
|
||||
-done
|
||||
-
|
||||
-mod_args="${mod_args#*,}"
|
||||
-
|
||||
-if [ -x /sbin/dasd_cio_free -a -n "$mod_args" ]; then
|
||||
- [ -d /etc/modprobe.d ] || mkdir -m 0755 -p /etc/modprobe.d
|
||||
- echo "options dasd_mod dasd=$mod_args" >> /etc/modprobe.d/dasd_mod.conf
|
||||
-fi
|
||||
-
|
||||
-unset dasd_arg
|
||||
if [ -x /sbin/dasd_cio_free ]; then
|
||||
dasd_cio_free
|
||||
fi
|
||||
--
|
||||
2.42.0
|
||||
|
100
0012-feat-dasd-minimize-dasd-handling-consolidated-in-s39.patch
Normal file
100
0012-feat-dasd-minimize-dasd-handling-consolidated-in-s39.patch
Normal file
@ -0,0 +1,100 @@
|
||||
From 1ff6be8aef787513b8143df444a1dd2d696b0944 Mon Sep 17 00:00:00 2001
|
||||
From: Steffen Maier <maier@linux.ibm.com>
|
||||
Date: Thu, 23 Mar 2023 19:33:52 +0100
|
||||
Subject: [PATCH 12/23] feat(dasd): minimize dasd handling consolidated in
|
||||
s390-tools
|
||||
|
||||
Parsing of rd.dasd is handled by s390-tools zdev dracut module 95zdev as of
|
||||
https://github.com/ibm-s390-linux/s390-tools/commit/99270236805972544932feab9692ee7122a343b8
|
||||
("zdev/dracut: add rd.dasd cmdline option handling").
|
||||
|
||||
Even though this removes the last implementation of parsing rd.dasd in
|
||||
dracut, above s390-tools change introduces another implementation of
|
||||
parsing the exact same rd.dasd syntax. Therefore, it would be good to keep
|
||||
the documentation in man/dracut.cmdline.7 of dracut as one central place
|
||||
describing all s390 device types that dracut handles.
|
||||
|
||||
For the time being, keep copying /etc/dasd.conf.
|
||||
The corresponding call to dasd_cio_free is in 95dasd_mod/parse-dasd-mod.sh
|
||||
and indirectly triggers processing of /etc/dasd.conf even with the typical
|
||||
cio_ignore kernel boot parameter ignoring most devices.
|
||||
|
||||
Preparation for consolidating persistent configuration with zdev.
|
||||
|
||||
Signed-off-by: Steffen Maier <maier@linux.ibm.com>
|
||||
---
|
||||
man/dracut.cmdline.7.asc | 11 ++++++++++-
|
||||
modules.d/95dasd/module-setup.sh | 6 ++----
|
||||
modules.d/95dasd/parse-dasd.sh | 11 -----------
|
||||
3 files changed, 12 insertions(+), 16 deletions(-)
|
||||
delete mode 100755 modules.d/95dasd/parse-dasd.sh
|
||||
|
||||
diff --git a/man/dracut.cmdline.7.asc b/man/dracut.cmdline.7.asc
|
||||
index 01bdf10f..c31dbfc6 100644
|
||||
--- a/man/dracut.cmdline.7.asc
|
||||
+++ b/man/dracut.cmdline.7.asc
|
||||
@@ -973,7 +973,16 @@ root=virtiofs:host rw
|
||||
DASD
|
||||
~~~~
|
||||
**rd.dasd=**....::
|
||||
- same syntax as the kernel module parameter (s390 only)
|
||||
+ same syntax as the kernel module parameter (s390 only).
|
||||
+ For more details on the syntax see the IBM book
|
||||
+ "Linux on IBM Z and IBM LinuxONE - Device Drivers, Features, and Commands"
|
||||
+ https://www.ibm.com/docs/en/linux-on-systems?topic=overview-device-drivers-features-commands.
|
||||
+ This parameter can be specified multiple times.
|
||||
++
|
||||
+NOTE:
|
||||
+ This parameter is no longer handled by dracut itself but with the exact
|
||||
+ same syntax by
|
||||
+ https://github.com/ibm-s390-linux/s390-tools/tree/master/zdev/dracut/95zdev.
|
||||
|
||||
ZFCP
|
||||
~~~~
|
||||
diff --git a/modules.d/95dasd/module-setup.sh b/modules.d/95dasd/module-setup.sh
|
||||
index 180da140..825f95d8 100755
|
||||
--- a/modules.d/95dasd/module-setup.sh
|
||||
+++ b/modules.d/95dasd/module-setup.sh
|
||||
@@ -4,20 +4,18 @@
|
||||
check() {
|
||||
local _arch=${DRACUT_ARCH:-$(uname -m)}
|
||||
[ "$_arch" = "s390" -o "$_arch" = "s390x" ] || return 1
|
||||
- require_binaries normalize_dasd_arg || return 1
|
||||
+ require_binaries dasdconf.sh || return 1
|
||||
return 0
|
||||
}
|
||||
|
||||
# called by dracut
|
||||
depends() {
|
||||
- echo "dasd_mod"
|
||||
return 0
|
||||
}
|
||||
|
||||
# called by dracut
|
||||
install() {
|
||||
- inst_hook cmdline 30 "$moddir/parse-dasd.sh"
|
||||
- inst_multiple dasdinfo dasdconf.sh normalize_dasd_arg
|
||||
+ inst_multiple dasdconf.sh
|
||||
conf=/etc/dasd.conf
|
||||
if [[ $hostonly && -f $conf ]]; then
|
||||
inst -H $conf
|
||||
diff --git a/modules.d/95dasd/parse-dasd.sh b/modules.d/95dasd/parse-dasd.sh
|
||||
deleted file mode 100755
|
||||
index cda3970c..00000000
|
||||
--- a/modules.d/95dasd/parse-dasd.sh
|
||||
+++ /dev/null
|
||||
@@ -1,11 +0,0 @@
|
||||
-#!/bin/sh
|
||||
-for dasd_arg in $(getargs rd.dasd= -d rd_DASD= DASD=); do
|
||||
- (
|
||||
- local OLDIFS="$IFS"
|
||||
- IFS=","
|
||||
- # shellcheck disable=SC2086
|
||||
- set -- $dasd_arg
|
||||
- IFS="$OLDIFS"
|
||||
- echo "$@" | normalize_dasd_arg >> /etc/dasd.conf
|
||||
- )
|
||||
-done
|
||||
--
|
||||
2.42.0
|
||||
|
149
0013-feat-znet-use-zdev-for-consolidated-device-configura.patch
Normal file
149
0013-feat-znet-use-zdev-for-consolidated-device-configura.patch
Normal file
@ -0,0 +1,149 @@
|
||||
From 86b6e2979999cf5ecce8c76c6230d1f085b3a333 Mon Sep 17 00:00:00 2001
|
||||
From: Steffen Maier <maier@linux.ibm.com>
|
||||
Date: Tue, 25 Jul 2023 19:43:05 +0200
|
||||
Subject: [PATCH 13/23] feat(znet): use zdev for consolidated device
|
||||
configuration
|
||||
|
||||
Remove any distribution-specifics from s390 channel-attached network device
|
||||
configuration.
|
||||
|
||||
Similar to 95qeth_rules, copy the existing persistent network configuration
|
||||
into the initrd. This needs to go via chzdev import so chzdev updates (adds
|
||||
to) the cio_ignore persistent config inside the initrd, because other
|
||||
dracut modules such as zdev from s390-tools also import
|
||||
persistent (non-network) config into initrd and the set union of devices
|
||||
needs to end up in the cio_ignore persistent config inside the initrd.
|
||||
|
||||
Additional debugging output can be generated with e.g. dracut option
|
||||
"--stdlog 5" (or short -L5). It shows the chzdev export result, the output
|
||||
of chzdev imports, and an overview of the resulting persistent config
|
||||
within the initrd. Typically combined with "--debug" to get a shell trace
|
||||
from building an initrd (Note: --debug does not increase the log levels).
|
||||
|
||||
Note that nm-initrd-generator also parses rd.znet and rd.znet_ifname
|
||||
to fill in s390 options of a NetworkManager connection definition.
|
||||
|
||||
Signed-off-by: Steffen Maier <maier@linux.ibm.com>
|
||||
---
|
||||
modules.d/95znet/module-setup.sh | 37 +++++++++++++++++++++++--
|
||||
modules.d/95znet/parse-ccw.sh | 47 ++++++++++++++++++++++++++++++--
|
||||
2 files changed, 78 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/modules.d/95znet/module-setup.sh b/modules.d/95znet/module-setup.sh
|
||||
index df37c660..95164bba 100755
|
||||
--- a/modules.d/95znet/module-setup.sh
|
||||
+++ b/modules.d/95znet/module-setup.sh
|
||||
@@ -5,7 +5,7 @@ check() {
|
||||
arch=${DRACUT_ARCH:-$(uname -m)}
|
||||
[ "$arch" = "s390" -o "$arch" = "s390x" ] || return 1
|
||||
|
||||
- require_binaries znet_cio_free grep sed seq readlink || return 1
|
||||
+ require_binaries grep sed seq readlink chzdev || return 1
|
||||
|
||||
return 0
|
||||
}
|
||||
@@ -24,6 +24,37 @@ installkernel() {
|
||||
# called by dracut
|
||||
install() {
|
||||
inst_hook cmdline 30 "$moddir/parse-ccw.sh"
|
||||
- inst_rules 81-ccw.rules
|
||||
- inst_multiple znet_cio_free grep sed seq readlink /lib/udev/ccw_init
|
||||
+ inst_multiple grep sed seq readlink chzdev
|
||||
+ if [[ $hostonly ]]; then
|
||||
+ local _tempfile
|
||||
+ _tempfile=$(mktemp --tmpdir="${DRACUT_TMPDIR}" dracut-zdev.XXXXXX)
|
||||
+ {
|
||||
+ chzdev qeth --export - --configured --persistent --quiet --type
|
||||
+ chzdev lcs --export - --configured --persistent --quiet --type
|
||||
+ chzdev ctc --export - --configured --persistent --quiet --type
|
||||
+ } 2> /dev/null > "$_tempfile"
|
||||
+ ddebug < "$_tempfile"
|
||||
+ chzdev --import "$_tempfile" --persistent --base "/etc=$initdir/etc" \
|
||||
+ --yes --no-root-update --force 2>&1 | ddebug
|
||||
+ lszdev --configured --persistent --info \
|
||||
+ --base "/etc=$initdir/etc" 2>&1 | ddebug
|
||||
+ rm -f "$_tempfile"
|
||||
+ # these are purely generated udev rules so we have to glob expand
|
||||
+ # within $initdir and strip the $initdir prefix for mark_hostonly
|
||||
+ local -a _array
|
||||
+ # shellcheck disable=SC2155
|
||||
+ local _nullglob=$(shopt -p nullglob)
|
||||
+ shopt -u nullglob
|
||||
+ # shellcheck disable=SC2086
|
||||
+ readarray -t _array < <(
|
||||
+ ls -1 $initdir/etc/udev/rules.d/41-*.rules 2> /dev/null
|
||||
+ )
|
||||
+ [[ ${#_array[@]} -gt 0 ]] && mark_hostonly "${_array[@]#$initdir}"
|
||||
+ # shellcheck disable=SC2086
|
||||
+ readarray -t _array < <(
|
||||
+ ls -1 $initdir/etc/modprobe.d/s390x-*.conf 2> /dev/null
|
||||
+ )
|
||||
+ [[ ${#_array[@]} -gt 0 ]] && mark_hostonly "${_array[@]#$initdir}"
|
||||
+ $_nullglob
|
||||
+ fi
|
||||
}
|
||||
diff --git a/modules.d/95znet/parse-ccw.sh b/modules.d/95znet/parse-ccw.sh
|
||||
index d8953605..aacc988e 100755
|
||||
--- a/modules.d/95znet/parse-ccw.sh
|
||||
+++ b/modules.d/95znet/parse-ccw.sh
|
||||
@@ -1,7 +1,50 @@
|
||||
#!/bin/bash
|
||||
|
||||
+znet_base_args="--no-settle --yes --no-root-update --force"
|
||||
+
|
||||
+# at this point in time dracut's vinfo() only logs to journal which is hard for
|
||||
+# s390 users to find and access on a line mode console such as 3215 mode
|
||||
+# so use a vinfo alternative that still prints to the console via kmsg
|
||||
+znet_vinfo() {
|
||||
+ while read -r _znet_vinfo_line || [ -n "$_znet_vinfo_line" ]; do
|
||||
+ # Prefix "<30>" represents facility LOG_DAEMON 3 and loglevel INFO 6:
|
||||
+ # (facility << 3) | level.
|
||||
+ echo "<30>dracut: $_znet_vinfo_line" > /dev/kmsg
|
||||
+ done
|
||||
+}
|
||||
+
|
||||
for ccw_arg in $(getargs rd.ccw -d 'rd_CCW=') $(getargs rd.znet -d 'rd_ZNET='); do
|
||||
- echo "$ccw_arg" >> /etc/ccw.conf
|
||||
+ (
|
||||
+ SAVED_IFS="$IFS"
|
||||
+ IFS=","
|
||||
+ # shellcheck disable=SC2086
|
||||
+ set -- $ccw_arg
|
||||
+ IFS="$SAVED_IFS"
|
||||
+ type="$1"
|
||||
+ subchannel1="$2"
|
||||
+ subchannel2="$3"
|
||||
+ subchannel3="$4"
|
||||
+ echo "rd.znet ${ccw_arg} :" | znet_vinfo
|
||||
+ if [ "$#" -lt 3 ]; then
|
||||
+ echo "rd.znet needs at least 3 list items: type,subchannel1,subchannel2" | znet_vinfo
|
||||
+ fi
|
||||
+ if [ "$1" = "qeth" ]; then
|
||||
+ if [ "$#" -lt 4 ]; then
|
||||
+ echo "rd.znet for type qeth needs at least 4 list items: qeth,subchannel1,subchannel2,subchannel3" | znet_vinfo
|
||||
+ fi
|
||||
+ subchannels="$subchannel1:$subchannel2:$subchannel3"
|
||||
+ shift 4
|
||||
+ # shellcheck disable=SC2086
|
||||
+ chzdev --enable --persistent $znet_base_args \
|
||||
+ "$type" "$subchannels" "$@" 2>&1 | znet_vinfo
|
||||
+ else
|
||||
+ subchannels="$subchannel1:$subchannel2"
|
||||
+ shift 3
|
||||
+ # shellcheck disable=SC2086
|
||||
+ chzdev --enable --persistent $znet_base_args \
|
||||
+ "$type" "$subchannels" "$@" 2>&1 | znet_vinfo
|
||||
+ fi
|
||||
+ )
|
||||
done
|
||||
|
||||
for ifname in $(getargs rd.znet_ifname); do
|
||||
@@ -21,5 +64,3 @@ for ifname in $(getargs rd.znet_ifname); do
|
||||
} > /etc/udev/rules.d/81-ccw-ifname.rules
|
||||
fi
|
||||
done
|
||||
-
|
||||
-znet_cio_free
|
||||
--
|
||||
2.42.0
|
||||
|
@ -0,0 +1,36 @@
|
||||
From addb383b375fd0db07eacf8a9f5d9b4e23343855 Mon Sep 17 00:00:00 2001
|
||||
From: Steffen Maier <maier@linux.ibm.com>
|
||||
Date: Fri, 26 May 2023 19:25:41 +0200
|
||||
Subject: [PATCH 14/23] docs(dracut.cmdline): generalize description of rd.znet
|
||||
|
||||
As of the preceding commit ("feat(znet): use zdev for consolidated device
|
||||
configuration"), rd.znet is no longer specific to RHEL/Fedora.
|
||||
|
||||
Signed-off-by: Steffen Maier <maier@linux.ibm.com>
|
||||
---
|
||||
man/dracut.cmdline.7.asc | 9 ++++++---
|
||||
1 file changed, 6 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/man/dracut.cmdline.7.asc b/man/dracut.cmdline.7.asc
|
||||
index c31dbfc6..e6b8d988 100644
|
||||
--- a/man/dracut.cmdline.7.asc
|
||||
+++ b/man/dracut.cmdline.7.asc
|
||||
@@ -1018,9 +1018,12 @@ rd.zfcp=0.0.4000
|
||||
ZNET
|
||||
~~~~
|
||||
**rd.znet=**__<nettype>__,__<subchannels>__,__<options>__::
|
||||
- The whole parameter is appended to /etc/ccw.conf, which is used on
|
||||
- RHEL/Fedora with ccw_init, which is called from udev for certain
|
||||
- devices on z-series.
|
||||
+ Activates a channel-attached network interface on s390 architecture.
|
||||
+ <nettype> is one of: qeth, lcs, ctc.
|
||||
+ <subchannels> is a comma-separated list of ccw device bus-IDs.
|
||||
+ The list consists of 3 entries with nettype qeth, and 2 for other nettype.
|
||||
+ <options> is a comma-separated list of <name>=<value> pairs,
|
||||
+ where <name> refers to a device sysfs attribute to which <value> gets written.
|
||||
rd.znet can be specified multiple times on the kernel command line.
|
||||
|
||||
**rd.znet_ifname=**__<ifname>__:__<subchannels>__::
|
||||
--
|
||||
2.42.0
|
||||
|
@ -0,0 +1,90 @@
|
||||
From 7ad6fef8fe110093939c422b5c3b381ebe47e4e9 Mon Sep 17 00:00:00 2001
|
||||
From: Steffen Maier <maier@linux.ibm.com>
|
||||
Date: Fri, 26 May 2023 19:51:09 +0200
|
||||
Subject: [PATCH 15/23] feat(qeth_rules): remove qeth handling consolidated in
|
||||
95znet
|
||||
|
||||
Dracut module 95znet handles a superset of qeth_rules as of the preceding
|
||||
commit ("feat(znet): use zdev for consolidated device configuration").
|
||||
|
||||
The instmods list in installkernel() seemed to have been incomplete because
|
||||
qeth needs one or both of qeth_l2 and qeth_l3 but qeth intentionally does
|
||||
not depend on them so depmod cannot resolve that.
|
||||
|
||||
In contrast to the old dracut module 95znet, 95qeth_rules also did not seem
|
||||
to have parsing for the upstream dracut cmdline options "rd.znet=" and
|
||||
"rd.znet_ifname=".
|
||||
|
||||
Signed-off-by: Steffen Maier <maier@linux.ibm.com>
|
||||
---
|
||||
modules.d/95qeth_rules/module-setup.sh | 58 --------------------------
|
||||
1 file changed, 58 deletions(-)
|
||||
delete mode 100755 modules.d/95qeth_rules/module-setup.sh
|
||||
|
||||
diff --git a/modules.d/95qeth_rules/module-setup.sh b/modules.d/95qeth_rules/module-setup.sh
|
||||
deleted file mode 100755
|
||||
index a84ac151..00000000
|
||||
--- a/modules.d/95qeth_rules/module-setup.sh
|
||||
+++ /dev/null
|
||||
@@ -1,58 +0,0 @@
|
||||
-#!/bin/bash
|
||||
-
|
||||
-# called by dracut
|
||||
-check() {
|
||||
- local _arch=${DRACUT_ARCH:-$(uname -m)}
|
||||
- local _online=0
|
||||
- [ "$_arch" = "s390" -o "$_arch" = "s390x" ] || return 1
|
||||
- dracut_module_included network || return 1
|
||||
-
|
||||
- [[ $hostonly ]] && {
|
||||
- for i in /sys/devices/qeth/*/online; do
|
||||
- [ ! -f "$i" ] && continue
|
||||
- read -r _online < "$i"
|
||||
- [ "$_online" -eq 1 ] && return 0
|
||||
- done
|
||||
- }
|
||||
- return 255
|
||||
-}
|
||||
-
|
||||
-# called by dracut
|
||||
-installkernel() {
|
||||
- instmods qeth
|
||||
-}
|
||||
-
|
||||
-# called by dracut
|
||||
-install() {
|
||||
- ccwid() {
|
||||
- qeth_path=$(readlink -e -q "$1"/device)
|
||||
- basename "$qeth_path"
|
||||
- }
|
||||
-
|
||||
- inst_rules_qeth() {
|
||||
- for rule in /etc/udev/rules.d/{4,5}1-qeth-${1}.rules; do
|
||||
- # prefer chzdev generated 41- rules
|
||||
- if [ -f "$rule" ]; then
|
||||
- inst_rules "$rule"
|
||||
- break
|
||||
- fi
|
||||
- done
|
||||
- }
|
||||
-
|
||||
- has_carrier() {
|
||||
- carrier=0
|
||||
- # not readable in qeth interfaces
|
||||
- # that have just been assembled, ignore
|
||||
- # read error and assume no carrier
|
||||
- read -r carrier 2> /dev/null < "$1/carrier"
|
||||
- [ "$carrier" -eq 1 ] && return 0
|
||||
- return 1
|
||||
- }
|
||||
-
|
||||
- for dev in /sys/class/net/*; do
|
||||
- has_carrier "$dev" || continue
|
||||
- id=$(ccwid "$dev")
|
||||
- [ -n "$id" ] && inst_rules_qeth "$id"
|
||||
- done
|
||||
-
|
||||
-}
|
||||
--
|
||||
2.42.0
|
||||
|
@ -0,0 +1,44 @@
|
||||
From cbc5eece88b8f6d0e69fdfbb8f34eabb45425c86 Mon Sep 17 00:00:00 2001
|
||||
From: Steffen Maier <maier@linux.ibm.com>
|
||||
Date: Fri, 26 May 2023 19:47:35 +0200
|
||||
Subject: [PATCH 16/23] fix(znet): append to udev rules so each rd.znet_ifname
|
||||
is effective
|
||||
|
||||
Otherwise the last rd.znet_ifname statement overwrites the persistent
|
||||
network interface settings of previous such statements.
|
||||
|
||||
Signed-off-by: Steffen Maier <maier@linux.ibm.com>
|
||||
---
|
||||
modules.d/95znet/parse-ccw.sh | 14 ++++++++------
|
||||
1 file changed, 8 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/modules.d/95znet/parse-ccw.sh b/modules.d/95znet/parse-ccw.sh
|
||||
index aacc988e..ccf05bc6 100755
|
||||
--- a/modules.d/95znet/parse-ccw.sh
|
||||
+++ b/modules.d/95znet/parse-ccw.sh
|
||||
@@ -53,14 +53,16 @@ for ifname in $(getargs rd.znet_ifname); do
|
||||
warn "Invalid arguments for rd.znet_ifname="
|
||||
else
|
||||
{
|
||||
- ifname_subchannels=${ifname_subchannels//,/|}
|
||||
+ ifname_subchannels="${ifname_subchannels//,/|}"
|
||||
+ # sanitize for use in udev label: replace non-word characters by _
|
||||
+ ifname_if_label="${ifname_if//[^[:word:]]/_}"
|
||||
|
||||
- echo 'ACTION!="add|change", GOTO="ccw_ifname_end"'
|
||||
- echo 'ATTR{type}!="1", GOTO="ccw_ifname_end"'
|
||||
- echo 'SUBSYSTEM!="net", GOTO="ccw_ifname_end"'
|
||||
+ echo "ACTION!=\"add|change\", GOTO=\"ccw_ifname_${ifname_if_label}_end\""
|
||||
+ echo "ATTR{type}!=\"1\", GOTO=\"ccw_ifname_${ifname_if_label}_end\""
|
||||
+ echo "SUBSYSTEM!=\"net\", GOTO=\"ccw_ifname_${ifname_if_label}_end\""
|
||||
echo "SUBSYSTEMS==\"ccwgroup\", KERNELS==\"$ifname_subchannels\", DRIVERS==\"?*\" NAME=\"$ifname_if\""
|
||||
- echo 'LABEL="ccw_ifname_end"'
|
||||
+ echo "LABEL=\"ccw_ifname_${ifname_if_label}_end\""
|
||||
|
||||
- } > /etc/udev/rules.d/81-ccw-ifname.rules
|
||||
+ } >> /etc/udev/rules.d/81-ccw-ifname.rules
|
||||
fi
|
||||
done
|
||||
--
|
||||
2.42.0
|
||||
|
@ -0,0 +1,40 @@
|
||||
From b6913f66b6c9e9ea81fd0832405c170876bc993a Mon Sep 17 00:00:00 2001
|
||||
From: Steffen Maier <maier@linux.ibm.com>
|
||||
Date: Wed, 26 Jul 2023 12:42:03 +0200
|
||||
Subject: [PATCH 17/23] refactor(ifcfg): delete code duplication using
|
||||
iface_get_subchannels()
|
||||
|
||||
Signed-off-by: Steffen Maier <maier@linux.ibm.com>
|
||||
---
|
||||
modules.d/45ifcfg/write-ifcfg.sh | 10 ++--------
|
||||
1 file changed, 2 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh
|
||||
index 5550cce3..4ca96e98 100755
|
||||
--- a/modules.d/45ifcfg/write-ifcfg.sh
|
||||
+++ b/modules.d/45ifcfg/write-ifcfg.sh
|
||||
@@ -31,19 +31,13 @@ print_s390() {
|
||||
local NETTYPE
|
||||
local CONFIG_LINE
|
||||
local i
|
||||
- local channel
|
||||
local OLD_IFS
|
||||
|
||||
_netif="$1"
|
||||
# if we find ccw channel, then use those, instead of
|
||||
# of the MAC
|
||||
- SUBCHANNELS=$({
|
||||
- for i in /sys/class/net/"$_netif"/device/cdev[0-9]*; do
|
||||
- [ -e "$i" ] || continue
|
||||
- channel=$(readlink -f "$i")
|
||||
- printf '%s' "${channel##*/},"
|
||||
- done
|
||||
- })
|
||||
+ # [iface_get_subchannels() from /lib/net-lib.sh sourced at top of this file]
|
||||
+ SUBCHANNELS=$(iface_get_subchannels "$_netif")
|
||||
[ -n "$SUBCHANNELS" ] || return 1
|
||||
|
||||
SUBCHANNELS=${SUBCHANNELS%,}
|
||||
--
|
||||
2.42.0
|
||||
|
@ -0,0 +1,95 @@
|
||||
From 110fec3e41faf47277447f1c56635c5a876c1f96 Mon Sep 17 00:00:00 2001
|
||||
From: Steffen Maier <maier@linux.ibm.com>
|
||||
Date: Wed, 26 Jul 2023 12:59:19 +0200
|
||||
Subject: [PATCH 18/23] feat(ifcfg): minimize s390-specific network
|
||||
configuration aspects
|
||||
|
||||
Since consolidated s390 network device configuration with zdev is used,
|
||||
it takes care of all s390-specific settings.
|
||||
None of the s390-specific ifcfg variables should be used anymore.
|
||||
NETTYPE and OPTIONS can be removed entirely.
|
||||
SUBCHANNELS is kept because there are some dependency chains
|
||||
(probably around the interface identifiying key, which is not HWADDR):
|
||||
|
||||
modules.d/35network-legacy/module-setup.sh
|
||||
parses (sources) each of /etc/sysconfig/network-scripts/ifcfg-*
|
||||
and if that contains SUBCHANNELS, creates a symlink from the ifcfg file to
|
||||
/etc/sysconfig/network-scripts/ccw-${SUBCHANNELS}.conf
|
||||
|
||||
modules.d/35network-legacy/ifup.sh installed as /sbin/ifup
|
||||
checks during team setup if a slave interface is an s390 channel-attached
|
||||
network interface and then parses (sources)
|
||||
/etc/sysconfig/network-scripts/ccw-${SUBCHANNELS}.conf
|
||||
from above, if that file exists
|
||||
|
||||
Signed-off-by: Steffen Maier <maier@linux.ibm.com>
|
||||
---
|
||||
modules.d/45ifcfg/write-ifcfg.sh | 41 --------------------------------
|
||||
1 file changed, 41 deletions(-)
|
||||
|
||||
diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh
|
||||
index 4ca96e98..a7804b50 100755
|
||||
--- a/modules.d/45ifcfg/write-ifcfg.sh
|
||||
+++ b/modules.d/45ifcfg/write-ifcfg.sh
|
||||
@@ -10,28 +10,10 @@ mkdir -m 0755 -p /tmp/ifcfg/
|
||||
# shellcheck disable=SC2174
|
||||
mkdir -m 0755 -p /tmp/ifcfg-leases/
|
||||
|
||||
-get_config_line_by_subchannel() {
|
||||
- local CHANNELS
|
||||
- local line
|
||||
-
|
||||
- CHANNELS="$1"
|
||||
- while read -r line || [ -n "$line" ]; do
|
||||
- if strstr "$line" "$CHANNELS"; then
|
||||
- echo "$line"
|
||||
- return 0
|
||||
- fi
|
||||
- done < /etc/ccw.conf
|
||||
- return 1
|
||||
-}
|
||||
-
|
||||
print_s390() {
|
||||
local _netif
|
||||
local SUBCHANNELS
|
||||
- local OPTIONS
|
||||
- local NETTYPE
|
||||
- local CONFIG_LINE
|
||||
local i
|
||||
- local OLD_IFS
|
||||
|
||||
_netif="$1"
|
||||
# if we find ccw channel, then use those, instead of
|
||||
@@ -43,29 +25,6 @@ print_s390() {
|
||||
SUBCHANNELS=${SUBCHANNELS%,}
|
||||
echo "SUBCHANNELS=\"${SUBCHANNELS}\""
|
||||
|
||||
- CONFIG_LINE=$(get_config_line_by_subchannel "$SUBCHANNELS")
|
||||
- # shellcheck disable=SC2181
|
||||
- [ $? -ne 0 -o -z "$CONFIG_LINE" ] && return 0
|
||||
-
|
||||
- OLD_IFS=$IFS
|
||||
- IFS=","
|
||||
- # shellcheck disable=SC2086
|
||||
- set -- $CONFIG_LINE
|
||||
- IFS=$OLD_IFS
|
||||
- NETTYPE=$1
|
||||
- shift
|
||||
- SUBCHANNELS="$1"
|
||||
- OPTIONS=""
|
||||
- shift
|
||||
- while [ $# -gt 0 ]; do
|
||||
- case $1 in
|
||||
- *=*) OPTIONS="$OPTIONS $1" ;;
|
||||
- esac
|
||||
- shift
|
||||
- done
|
||||
- OPTIONS=${OPTIONS## }
|
||||
- echo "NETTYPE=\"${NETTYPE}\""
|
||||
- echo "OPTIONS=\"${OPTIONS}\""
|
||||
return 0
|
||||
}
|
||||
|
||||
--
|
||||
2.42.0
|
||||
|
@ -0,0 +1,87 @@
|
||||
From 55a56c546bde71fb42c99aadd96e98fca2199823 Mon Sep 17 00:00:00 2001
|
||||
From: Laszlo Gombos <laszlo.gombos@gmail.com>
|
||||
Date: Fri, 5 Apr 2024 15:50:20 +0200
|
||||
Subject: [PATCH 19/23] fix(dracut): move hooks directory from /usr/lib to
|
||||
/var/lib
|
||||
|
||||
Since https://github.com/systemd/systemd/commit/ffc1ec73, /usr is mounted as
|
||||
read-only in the initramfs by default.
|
||||
|
||||
Fixes #2588
|
||||
|
||||
Co-authored-by: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
|
||||
---
|
||||
dracut-init.sh | 2 +-
|
||||
dracut.sh | 6 +++++-
|
||||
modules.d/99base/module-setup.sh | 5 ++++-
|
||||
modules.d/99shutdown/module-setup.sh | 8 +++++---
|
||||
4 files changed, 15 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/dracut-init.sh b/dracut-init.sh
|
||||
index c37038e3..1c7ca58a 100755
|
||||
--- a/dracut-init.sh
|
||||
+++ b/dracut-init.sh
|
||||
@@ -630,7 +630,7 @@ inst_hook() {
|
||||
dfatal "No such hook type $1. Aborting initrd creation."
|
||||
exit 1
|
||||
fi
|
||||
- hook="/lib/dracut/hooks/${1}/${2}-${3##*/}"
|
||||
+ hook="/var/lib/dracut/hooks/${1}/${2}-${3##*/}"
|
||||
inst_simple "$3" "$hook"
|
||||
chmod u+x "$initdir/$hook"
|
||||
}
|
||||
diff --git a/dracut.sh b/dracut.sh
|
||||
index a0af3dd2..5d43f44c 100755
|
||||
--- a/dracut.sh
|
||||
+++ b/dracut.sh
|
||||
@@ -1883,7 +1883,11 @@ mkdir -p "${initdir}"/lib/dracut
|
||||
|
||||
if [[ $kernel_only != yes ]]; then
|
||||
mkdir -p "${initdir}/etc/cmdline.d"
|
||||
- mkdir -m 0755 "${initdir}"/lib/dracut/hooks
|
||||
+ mkdir -m 0755 -p "${initdir}"/var/lib/dracut/hooks
|
||||
+
|
||||
+ # symlink to old hooks location for compatibility
|
||||
+ ln_r /var/lib/dracut/hooks /lib/dracut/hooks
|
||||
+
|
||||
for _d in $hookdirs; do
|
||||
# shellcheck disable=SC2174
|
||||
mkdir -m 0755 -p "${initdir}/lib/dracut/hooks/$_d"
|
||||
diff --git a/modules.d/99base/module-setup.sh b/modules.d/99base/module-setup.sh
|
||||
index 54b0deb9..bfdc51d4 100755
|
||||
--- a/modules.d/99base/module-setup.sh
|
||||
+++ b/modules.d/99base/module-setup.sh
|
||||
@@ -45,7 +45,10 @@ install() {
|
||||
|
||||
[ -e "${initdir}/lib" ] || mkdir -m 0755 -p "${initdir}"/lib
|
||||
mkdir -m 0755 -p "${initdir}"/lib/dracut
|
||||
- mkdir -m 0755 -p "${initdir}"/lib/dracut/hooks
|
||||
+ mkdir -m 0755 -p "${initdir}"/var/lib/dracut/hooks
|
||||
+
|
||||
+ # symlink to old hooks location for compatibility
|
||||
+ ln_r /var/lib/dracut/hooks /lib/dracut/hooks
|
||||
|
||||
mkdir -p "${initdir}"/tmp
|
||||
|
||||
diff --git a/modules.d/99shutdown/module-setup.sh b/modules.d/99shutdown/module-setup.sh
|
||||
index 2b999024..f53017ff 100755
|
||||
--- a/modules.d/99shutdown/module-setup.sh
|
||||
+++ b/modules.d/99shutdown/module-setup.sh
|
||||
@@ -17,9 +17,11 @@ install() {
|
||||
inst_multiple umount poweroff reboot halt losetup stat sleep timeout
|
||||
inst_multiple -o kexec
|
||||
inst "$moddir/shutdown.sh" "$prefix/shutdown"
|
||||
- [ -e "${initdir}/lib" ] || mkdir -m 0755 -p "${initdir}"/lib
|
||||
- mkdir -m 0755 -p "${initdir}"/lib/dracut
|
||||
- mkdir -m 0755 -p "${initdir}"/lib/dracut/hooks
|
||||
+ mkdir -m 0755 -p "${initdir}"/var/lib/dracut/hooks
|
||||
+
|
||||
+ # symlink to old hooks location for compatibility
|
||||
+ ln_r /var/lib/dracut/hooks /lib/dracut/hooks
|
||||
+
|
||||
for _d in $hookdirs shutdown shutdown-emergency; do
|
||||
mkdir -m 0755 -p "${initdir}"/lib/dracut/hooks/"$_d"
|
||||
done
|
||||
--
|
||||
2.42.0
|
||||
|
@ -0,0 +1,72 @@
|
||||
From bad2bc80cdcfac8915374497cc47ce9d5670d015 Mon Sep 17 00:00:00 2001
|
||||
From: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
|
||||
Date: Thu, 4 Apr 2024 13:49:26 +0200
|
||||
Subject: [PATCH 20/23] fix(systemd): explicitly install some libs that will
|
||||
not be statically included
|
||||
|
||||
Some required libraries that used to be statically included are in the process
|
||||
to be opened via `dlopen()`.
|
||||
|
||||
References:
|
||||
- https://github.com/systemd/systemd/pull/31131
|
||||
- https://github.com/systemd/systemd/pull/31550
|
||||
- https://github.com/systemd/systemd/pull/32019
|
||||
|
||||
Closes #2642
|
||||
---
|
||||
modules.d/00systemd/module-setup.sh | 2 ++
|
||||
modules.d/01systemd-coredump/module-setup.sh | 7 +++++++
|
||||
modules.d/01systemd-journald/module-setup.sh | 5 +++--
|
||||
3 files changed, 12 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/modules.d/00systemd/module-setup.sh b/modules.d/00systemd/module-setup.sh
|
||||
index 66e08ea6..72341746 100755
|
||||
--- a/modules.d/00systemd/module-setup.sh
|
||||
+++ b/modules.d/00systemd/module-setup.sh
|
||||
@@ -260,6 +260,8 @@ EOF
|
||||
# Install library file(s)
|
||||
_arch=${DRACUT_ARCH:-$(uname -m)}
|
||||
inst_libdir_file \
|
||||
+ {"tls/$_arch/",tls/,"$_arch/",}"libgcrypt.so*" \
|
||||
+ {"tls/$_arch/",tls/,"$_arch/",}"libkmod.so*" \
|
||||
{"tls/$_arch/",tls/,"$_arch/",}"libnss_*"
|
||||
|
||||
}
|
||||
diff --git a/modules.d/01systemd-coredump/module-setup.sh b/modules.d/01systemd-coredump/module-setup.sh
|
||||
index 69ec9668..47666b6c 100755
|
||||
--- a/modules.d/01systemd-coredump/module-setup.sh
|
||||
+++ b/modules.d/01systemd-coredump/module-setup.sh
|
||||
@@ -40,6 +40,13 @@ install() {
|
||||
"$sysusers"/systemd-coredump.conf \
|
||||
coredumpctl
|
||||
|
||||
+ # Install library file(s)
|
||||
+ _arch=${DRACUT_ARCH:-$(uname -m)}
|
||||
+ inst_libdir_file \
|
||||
+ {"tls/$_arch/",tls/,"$_arch/",}"liblz4.so.*" \
|
||||
+ {"tls/$_arch/",tls/,"$_arch/",}"liblzma.so.*" \
|
||||
+ {"tls/$_arch/",tls/,"$_arch/",}"libzstd.so.*"
|
||||
+
|
||||
# Install the hosts local user configurations if enabled.
|
||||
if [[ $hostonly ]]; then
|
||||
inst_multiple -H -o \
|
||||
diff --git a/modules.d/01systemd-journald/module-setup.sh b/modules.d/01systemd-journald/module-setup.sh
|
||||
index 3cf2a1a1..276e7528 100755
|
||||
--- a/modules.d/01systemd-journald/module-setup.sh
|
||||
+++ b/modules.d/01systemd-journald/module-setup.sh
|
||||
@@ -53,9 +53,10 @@ install() {
|
||||
# Install library file(s)
|
||||
_arch=${DRACUT_ARCH:-$(uname -m)}
|
||||
inst_libdir_file \
|
||||
+ {"tls/$_arch/",tls/,"$_arch/",}"libgcrypt.so*" \
|
||||
{"tls/$_arch/",tls/,"$_arch/",}"liblz4.so.*" \
|
||||
- {"tls/$_arch/",tls/,"$_arch/",}"libzstd.so.*" \
|
||||
- {"tls/$_arch/",tls/,"$_arch/",}"liblzma.so.*"
|
||||
+ {"tls/$_arch/",tls/,"$_arch/",}"liblzma.so.*" \
|
||||
+ {"tls/$_arch/",tls/,"$_arch/",}"libzstd.so.*"
|
||||
|
||||
# Install the hosts local user configurations if enabled.
|
||||
if [[ $hostonly ]]; then
|
||||
--
|
||||
2.42.0
|
||||
|
@ -0,0 +1,54 @@
|
||||
From 10b86edba3ffe0ce13c5f43ff0193cdf04661358 Mon Sep 17 00:00:00 2001
|
||||
From: Tomas Bzatek <tbzatek@redhat.com>
|
||||
Date: Thu, 21 Sep 2023 14:31:07 +0200
|
||||
Subject: [PATCH 21/23] fix(nvmf): move /etc/nvme/host{nqn,id} requirement to
|
||||
hostonly
|
||||
|
||||
When creating initramfs for universal boot image such as an installer,
|
||||
we can't include any machine-specific IDs. Let's move the check
|
||||
for /etc/nvme/hostnqn and /etc/nvme/hostid files presence to
|
||||
the hostonly section to avoid unsatisfied requirements.
|
||||
|
||||
Signed-off-by: Tomas Bzatek <tbzatek@redhat.com>
|
||||
|
||||
Resolves: #2266331
|
||||
---
|
||||
modules.d/95nvmf/module-setup.sh | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/modules.d/95nvmf/module-setup.sh b/modules.d/95nvmf/module-setup.sh
|
||||
index a8f30341..6a1e3f5b 100755
|
||||
--- a/modules.d/95nvmf/module-setup.sh
|
||||
+++ b/modules.d/95nvmf/module-setup.sh
|
||||
@@ -3,8 +3,6 @@
|
||||
# called by dracut
|
||||
check() {
|
||||
require_binaries nvme jq || return 1
|
||||
- [ -f /etc/nvme/hostnqn ] || return 255
|
||||
- [ -f /etc/nvme/hostid ] || return 255
|
||||
|
||||
is_nvmf() {
|
||||
local _dev=$1
|
||||
@@ -36,6 +34,8 @@ check() {
|
||||
}
|
||||
|
||||
[[ $hostonly ]] || [[ $mount_needs ]] && {
|
||||
+ [ -f /etc/nvme/hostnqn ] || return 255
|
||||
+ [ -f /etc/nvme/hostid ] || return 255
|
||||
pushd . > /dev/null
|
||||
for_each_host_dev_and_slaves is_nvmf
|
||||
local _is_nvmf=$?
|
||||
@@ -130,8 +130,8 @@ install() {
|
||||
_nvmf_args=$(cmdline)
|
||||
[[ "$_nvmf_args" ]] && printf "%s" "$_nvmf_args" >> "${initdir}/etc/cmdline.d/95nvmf-args.conf"
|
||||
fi
|
||||
- inst_simple "/etc/nvme/hostnqn"
|
||||
- inst_simple "/etc/nvme/hostid"
|
||||
+ inst_simple -H "/etc/nvme/hostnqn"
|
||||
+ inst_simple -H "/etc/nvme/hostid"
|
||||
|
||||
inst_multiple ip sed
|
||||
|
||||
--
|
||||
2.42.0
|
||||
|
@ -0,0 +1,54 @@
|
||||
From 0b65ac224d831cc96da940cce510523c7276a5ec Mon Sep 17 00:00:00 2001
|
||||
From: Pavel Valena <pvalena@redhat.com>
|
||||
Date: Tue, 25 Apr 2023 14:56:59 +0200
|
||||
Subject: [PATCH 22/23] feat(hwdb): add hwdb module to install hwdb.bin on
|
||||
demand
|
||||
|
||||
Module to install hwdb.bin. Further extensions might make only selected
|
||||
part of hwdb installable to save space. The module is not included by default.
|
||||
|
||||
Including the module adds 2MB of compressed data (on Fedora, the file has 12MB).
|
||||
|
||||
Installing hwdb.bin is needed in case of custom HW like a keyboard/mouse, or various interfaces.
|
||||
|
||||
Original PR: https://github.com/dracutdevs/dracut/pull/1681
|
||||
---
|
||||
modules.d/95hwdb/module-setup.sh | 26 ++++++++++++++++++++++++++
|
||||
1 file changed, 26 insertions(+)
|
||||
create mode 100755 modules.d/95hwdb/module-setup.sh
|
||||
|
||||
diff --git a/modules.d/95hwdb/module-setup.sh b/modules.d/95hwdb/module-setup.sh
|
||||
new file mode 100755
|
||||
index 00000000..5d3250f3
|
||||
--- /dev/null
|
||||
+++ b/modules.d/95hwdb/module-setup.sh
|
||||
@@ -0,0 +1,26 @@
|
||||
+#!/bin/bash
|
||||
+# This file is part of dracut.
|
||||
+# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
+
|
||||
+check() {
|
||||
+ return 255
|
||||
+}
|
||||
+
|
||||
+# called by dracut
|
||||
+install() {
|
||||
+ local hwdb_bin
|
||||
+
|
||||
+ # Follow the same priority as `systemd-hwdb`; `/etc` is the default
|
||||
+ # and `/usr/lib` an alternative location.
|
||||
+ hwdb_bin="${udevconfdir}"/hwdb.bin
|
||||
+
|
||||
+ if [[ ! -r ${hwdb_bin} ]]; then
|
||||
+ hwdb_bin="${udevdir}"/hwdb.bin
|
||||
+ fi
|
||||
+
|
||||
+ if [[ $hostonly ]]; then
|
||||
+ inst_multiple -H "${hwdb_bin}"
|
||||
+ else
|
||||
+ inst_multiple "${hwdb_bin}"
|
||||
+ fi
|
||||
+}
|
||||
--
|
||||
2.42.0
|
||||
|
59
0023-fix-rngd-install-system-service-file.patch
Normal file
59
0023-fix-rngd-install-system-service-file.patch
Normal file
@ -0,0 +1,59 @@
|
||||
From 9df3cb58a19f38157a615c311356cfd6ae55d2d7 Mon Sep 17 00:00:00 2001
|
||||
From: Pavel Valena <pvalena@redhat.com>
|
||||
Date: Sun, 23 Jul 2023 19:44:17 +0200
|
||||
Subject: [PATCH 23/23] fix(rngd): install system service file
|
||||
|
||||
as there's no reason to keep a copy; there shouldn't be any modifications.
|
||||
|
||||
In case there are args stored in a separate file (Fedora and alike),
|
||||
it needs to be supplied too, but without the option to change the user.
|
||||
---
|
||||
modules.d/06rngd/module-setup.sh | 7 ++++++-
|
||||
modules.d/06rngd/rngd.service | 8 --------
|
||||
modules.d/06rngd/sysconfig | 1 +
|
||||
3 files changed, 7 insertions(+), 9 deletions(-)
|
||||
delete mode 100644 modules.d/06rngd/rngd.service
|
||||
create mode 100644 modules.d/06rngd/sysconfig
|
||||
|
||||
diff --git a/modules.d/06rngd/module-setup.sh b/modules.d/06rngd/module-setup.sh
|
||||
index aec8d576..e8bdf7f5 100755
|
||||
--- a/modules.d/06rngd/module-setup.sh
|
||||
+++ b/modules.d/06rngd/module-setup.sh
|
||||
@@ -32,7 +32,12 @@ depends() {
|
||||
|
||||
install() {
|
||||
inst rngd
|
||||
- inst_simple "${moddir}/rngd.service" "${systemdsystemunitdir}/rngd.service"
|
||||
+ inst_simple "${systemdsystemunitdir}/rngd.service"
|
||||
+
|
||||
+ if [ -r /etc/sysconfig/rngd ]; then
|
||||
+ inst_simple "${moddir}/sysconfig" "/etc/sysconfig/rngd"
|
||||
+ fi
|
||||
+
|
||||
# make sure dependent libs are installed too
|
||||
inst_libdir_file opensc-pkcs11.so
|
||||
|
||||
diff --git a/modules.d/06rngd/rngd.service b/modules.d/06rngd/rngd.service
|
||||
deleted file mode 100644
|
||||
index dd5374d7..00000000
|
||||
--- a/modules.d/06rngd/rngd.service
|
||||
+++ /dev/null
|
||||
@@ -1,8 +0,0 @@
|
||||
-[Unit]
|
||||
-Description=Hardware RNG Entropy Gatherer Daemon
|
||||
-DefaultDependencies=no
|
||||
-Before=systemd-udevd.service
|
||||
-ConditionVirtualization=!container
|
||||
-
|
||||
-[Service]
|
||||
-ExecStart=/usr/sbin/rngd -f
|
||||
diff --git a/modules.d/06rngd/sysconfig b/modules.d/06rngd/sysconfig
|
||||
new file mode 100644
|
||||
index 00000000..68047ec1
|
||||
--- /dev/null
|
||||
+++ b/modules.d/06rngd/sysconfig
|
||||
@@ -0,0 +1 @@
|
||||
+RNGD_ARGS="-x pkcs11 -x nist"
|
||||
--
|
||||
2.42.0
|
||||
|
@ -1,33 +0,0 @@
|
||||
From ea8c9b1c4f39c52fc45788516dea19892cc275f7 Mon Sep 17 00:00:00 2001
|
||||
From: Adam Williamson <awilliam@redhat.com>
|
||||
Date: Thu, 10 Jun 2021 08:41:30 -0700
|
||||
Subject: [PATCH] Never enable the bluetooth module by default (#1521)
|
||||
|
||||
Signed-off-by: Adam Williamson <awilliam@redhat.com>
|
||||
---
|
||||
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
|
||||
|
@ -1,93 +0,0 @@
|
||||
From f47bcdd7342ca0d46b889e712a1c7446e18434bc Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
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?= <zbyszek@in.waw.pl>
|
||||
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
|
@ -1,38 +0,0 @@
|
||||
From 5dc6aede4b99f1c76219370660b5b62e935a3cb8 Mon Sep 17 00:00:00 2001
|
||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
||||
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
|
@ -1,629 +0,0 @@
|
||||
From 43e9997521d6c10ec8dae340dc117dd6cbd73a2a Mon Sep 17 00:00:00 2001
|
||||
From: Martin Wilck <mwilck@suse.com>
|
||||
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 <mwilck@suse.com>
|
||||
Co-authored-by: John Meneghini <jmeneghi@redhat.com>
|
||||
Co-authored-by: Charles Rose <charles.rose@dell.com>
|
||||
---
|
||||
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=**__<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
|
||||
|
@ -1,23 +0,0 @@
|
||||
From 3c871a89c281d9ef4447576e4ea072ce38c65ac0 Mon Sep 17 00:00:00 2001
|
||||
From: Pavel Valena <pvalena@redhat.com>
|
||||
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"
|
@ -1,67 +0,0 @@
|
||||
From f6810b69ae722096184eaaf282e12a2caa6928b9 Mon Sep 17 00:00:00 2001
|
||||
From: Dusty Mabe <dusty@dustymabe.com>
|
||||
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
|
||||
|
@ -1,26 +0,0 @@
|
||||
From 0e780720efe6488c4e07af39926575ee12f40339 Mon Sep 17 00:00:00 2001
|
||||
From: Laszlo Gombos <laszlo.gombos@gmail.com>
|
||||
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
|
@ -1,28 +0,0 @@
|
||||
From 6fb0f4b4d54eeb1b1e89c06cc54bdcab504138da Mon Sep 17 00:00:00 2001
|
||||
From: Pavel Valena <pvalena@redhat.com>
|
||||
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
|
@ -1,41 +0,0 @@
|
||||
From 71696ec83fce0b20a3cf489b970a200e44227d78 Mon Sep 17 00:00:00 2001
|
||||
From: Tianhao Chai <cth451@gmail.com>
|
||||
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
|
@ -1,29 +0,0 @@
|
||||
From afb5717e67727d49fae0d2a1a4169e5b247387f4 Mon Sep 17 00:00:00 2001
|
||||
From: Andrew Halaney <ahalaney@redhat.com>
|
||||
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 <ahalaney@redhat.com>
|
||||
---
|
||||
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
|
||||
|
@ -1,45 +0,0 @@
|
||||
From 61b9cd16e049434597e398be61a47e0112382c5b Mon Sep 17 00:00:00 2001
|
||||
From: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
|
||||
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
|
26
2527.patch
26
2527.patch
@ -1,26 +0,0 @@
|
||||
From a2fe89116db4b286fbf515f26bd1773b5e6ee8ad Mon Sep 17 00:00:00 2001
|
||||
From: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
|
||||
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
|
46
2531.patch
46
2531.patch
@ -1,46 +0,0 @@
|
||||
From a8015f7dfc682100434e3ee051bf9472a8e6cad4 Mon Sep 17 00:00:00 2001
|
||||
From: Jeremy Linton <jeremy.linton@arm.com>
|
||||
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 <jeremy.linton@arm.com>
|
||||
---
|
||||
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
|
@ -1,23 +0,0 @@
|
||||
From 1c762c0da6ed2bb6fa44d5e0968605cc4d45361c Mon Sep 17 00:00:00 2001
|
||||
From: innovara <fombuena@outlook.com>
|
||||
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*"
|
||||
|
||||
}
|
@ -1,50 +0,0 @@
|
||||
From 6da61a2c0e38da4e6e880e1bb7f47d55d2c54c65 Mon Sep 17 00:00:00 2001
|
||||
From: Manuel Fombuena <mfombuena@innovara.co.uk>
|
||||
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 <mfombuena@innovara.co.uk>
|
||||
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]
|
@ -1,26 +0,0 @@
|
||||
From bee1c4824a8cd47ce6c01892a548bdc07b1fa678 Mon Sep 17 00:00:00 2001
|
||||
From: Frantisek Sumsal <frantisek@sumsal.cz>
|
||||
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 \
|
186
dracut.spec
186
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: 101
|
||||
Release: 1%{?dist}
|
||||
|
||||
Summary: Initramfs generator using udev
|
||||
|
||||
@ -20,92 +17,84 @@ Summary: Initramfs generator using udev
|
||||
# except util/* which is GPLv2
|
||||
License: GPL-2.0-or-later AND LGPL-2.1-or-later AND GPL-2.0-only
|
||||
|
||||
URL: https://github.com/dracutdevs/dracut/wiki/
|
||||
URL: https://github.com/dracut-ng/dracut-ng/wiki/
|
||||
|
||||
Source0: https://github.com/dracutdevs/dracut/archive/refs/tags/%{version}.tar.gz
|
||||
Source0: https://github.com/dracut-ng/dracut-ng/archive/refs/tags/%{version}.tar.gz
|
||||
|
||||
Source1: https://www.gnu.org/licenses/lgpl-2.1.txt
|
||||
# feat(kernel-install): do nothing when $KERNEL_INSTALL_INITRD_GENERATOR says so
|
||||
# Author: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
|
||||
Patch1: 0001-feat-kernel-install-do-nothing-when-KERNEL_INSTALL_I.patch
|
||||
# fix(kernel-install): do not generate an initrd when one was specified
|
||||
# Author: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
|
||||
Patch2: 0002-fix-kernel-install-do-not-generate-an-initrd-when-on.patch
|
||||
# refactor(cms): use zdev to simplify handling CMSDASD=... boot option
|
||||
# Author: Steffen Maier <maier@linux.ibm.com>
|
||||
Patch3: 0003-refactor-cms-use-zdev-to-simplify-handling-CMSDASD-..patch
|
||||
# refactor(cms): use consolidated zfcp config with zdev from s390-tools
|
||||
# Author: Steffen Maier <maier@linux.ibm.com>
|
||||
Patch4: 0004-refactor-cms-use-consolidated-zfcp-config-with-zdev-.patch
|
||||
# refactor(cms): use consolidated dasd config with zdev from s390-tools
|
||||
# Author: Steffen Maier <maier@linux.ibm.com>
|
||||
Patch5: 0005-refactor-cms-use-consolidated-dasd-config-with-zdev-.patch
|
||||
# refactor(cms): use consolidated network config with zdev from s390-tools
|
||||
# Author: Steffen Maier <maier@linux.ibm.com>
|
||||
Patch6: 0006-refactor-cms-use-consolidated-network-config-with-zd.patch
|
||||
# refactor(cms): remove now unnecessary inclusion of full s390utils-base
|
||||
# Author: Steffen Maier <maier@linux.ibm.com>
|
||||
Patch7: 0007-refactor-cms-remove-now-unnecessary-inclusion-of-ful.patch
|
||||
# feat(zfcp_rules): remove zfcp handling consolidated in s390-tools
|
||||
# Author: Steffen Maier <maier@linux.ibm.com>
|
||||
Patch8: 0008-feat-zfcp_rules-remove-zfcp-handling-consolidated-in.patch
|
||||
# feat(zfcp): minimize zfcp handling consolidated in s390-tools
|
||||
# Author: Steffen Maier <maier@linux.ibm.com>
|
||||
Patch9: 0009-feat-zfcp-minimize-zfcp-handling-consolidated-in-s39.patch
|
||||
# feat(dasd_rules): remove dasd handling consolidated in s390-tools
|
||||
# Author: Steffen Maier <maier@linux.ibm.com>
|
||||
Patch10: 0010-feat-dasd_rules-remove-dasd-handling-consolidated-in.patch
|
||||
# feat(dasd_mod): minimize dasd handling consolidated in s390-tools
|
||||
# Author: Steffen Maier <maier@linux.ibm.com>
|
||||
Patch11: 0011-feat-dasd_mod-minimize-dasd-handling-consolidated-in.patch
|
||||
# feat(dasd): minimize dasd handling consolidated in s390-tools
|
||||
# Author: Steffen Maier <maier@linux.ibm.com>
|
||||
Patch12: 0012-feat-dasd-minimize-dasd-handling-consolidated-in-s39.patch
|
||||
# feat(znet): use zdev for consolidated device configuration
|
||||
# Author: Steffen Maier <maier@linux.ibm.com>
|
||||
Patch13: 0013-feat-znet-use-zdev-for-consolidated-device-configura.patch
|
||||
# docs(dracut.cmdline): generalize description of rd.znet
|
||||
# Author: Steffen Maier <maier@linux.ibm.com>
|
||||
Patch14: 0014-docs-dracut.cmdline-generalize-description-of-rd.zne.patch
|
||||
# feat(qeth_rules): remove qeth handling consolidated in 95znet
|
||||
# Author: Steffen Maier <maier@linux.ibm.com>
|
||||
Patch15: 0015-feat-qeth_rules-remove-qeth-handling-consolidated-in.patch
|
||||
# fix(znet): append to udev rules so each rd.znet_ifname is effective
|
||||
# Author: Steffen Maier <maier@linux.ibm.com>
|
||||
Patch16: 0016-fix-znet-append-to-udev-rules-so-each-rd.znet_ifname.patch
|
||||
# refactor(ifcfg): delete code duplication using iface_get_subchannels()
|
||||
# Author: Steffen Maier <maier@linux.ibm.com>
|
||||
Patch17: 0017-refactor-ifcfg-delete-code-duplication-using-iface_g.patch
|
||||
# feat(ifcfg): minimize s390-specific network configuration aspects
|
||||
# Author: Steffen Maier <maier@linux.ibm.com>
|
||||
Patch18: 0018-feat-ifcfg-minimize-s390-specific-network-configurat.patch
|
||||
# fix(dracut): move hooks directory from /usr/lib to /var/lib
|
||||
# Author: Laszlo Gombos <laszlo.gombos@gmail.com>
|
||||
Patch19: 0019-fix-dracut-move-hooks-directory-from-usr-lib-to-var-.patch
|
||||
# fix(systemd): explicitly install some libs that will not be statically included
|
||||
# Author: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
|
||||
Patch20: 0020-fix-systemd-explicitly-install-some-libs-that-will-n.patch
|
||||
# fix(nvmf): move /etc/nvme/host{nqn,id} requirement to hostonly
|
||||
# Author: Tomas Bzatek <tbzatek@redhat.com>
|
||||
Patch21: 0021-fix-nvmf-move-etc-nvme-host-nqn-id-requirement-to-ho.patch
|
||||
# feat(hwdb): add hwdb module to install hwdb.bin on demand
|
||||
# Author: Pavel Valena <pvalena@redhat.com>
|
||||
Patch22: 0022-feat-hwdb-add-hwdb-module-to-install-hwdb.bin-on-dem.patch
|
||||
# fix(rngd): install system service file
|
||||
# Author: Pavel Valena <pvalena@redhat.com>
|
||||
Patch23: 0023-fix-rngd-install-system-service-file.patch
|
||||
|
||||
# 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
|
||||
|
||||
# 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
|
||||
# fix(pcsc): add --disable-polkit to pcscd.service
|
||||
# https://github.com/dracutdevs/dracut/pull/2547
|
||||
Patch20: 2547-fix-pcsc-module.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-rhel10
|
||||
|
||||
BuildRequires: bash
|
||||
BuildRequires: git-core
|
||||
@ -231,7 +220,7 @@ in a squashfs image, result in a smaller initramfs size and reduce runtime memor
|
||||
usage.
|
||||
|
||||
%prep
|
||||
%autosetup -n %{name}-%{version} -S git_am
|
||||
%autosetup -n %{name}-ng-%{version} -S git_am
|
||||
cp %{SOURCE1} .
|
||||
|
||||
%build
|
||||
@ -251,10 +240,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
|
||||
|
||||
@ -271,11 +256,8 @@ rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/81cio_ignore
|
||||
rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/91zipl
|
||||
rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/95dasd
|
||||
rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/95dasd_mod
|
||||
rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/95dasd_rules
|
||||
rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/95dcssblk
|
||||
rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/95qeth_rules
|
||||
rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/95zfcp
|
||||
rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/95zfcp_rules
|
||||
rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/95znet
|
||||
%else
|
||||
rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/00warpclock
|
||||
@ -284,6 +266,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 +323,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 +335,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
|
||||
@ -371,6 +354,7 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/
|
||||
%{dracutlibdir}/modules.d/09dbus
|
||||
%{dracutlibdir}/modules.d/10i18n
|
||||
%{dracutlibdir}/modules.d/30convertfs
|
||||
%{dracutlibdir}/modules.d/45net-lib
|
||||
%{dracutlibdir}/modules.d/45url-lib
|
||||
%{dracutlibdir}/modules.d/50drm
|
||||
%{dracutlibdir}/modules.d/50plymouth
|
||||
@ -401,6 +385,7 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/
|
||||
%{dracutlibdir}/modules.d/91tpm2-tss
|
||||
%{dracutlibdir}/modules.d/95debug
|
||||
%{dracutlibdir}/modules.d/95fstab-sys
|
||||
%{dracutlibdir}/modules.d/95hwdb
|
||||
%{dracutlibdir}/modules.d/95lunmask
|
||||
%{dracutlibdir}/modules.d/95resume
|
||||
%{dracutlibdir}/modules.d/95rootfs-block
|
||||
@ -414,11 +399,8 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/
|
||||
%{dracutlibdir}/modules.d/91zipl
|
||||
%{dracutlibdir}/modules.d/95dasd
|
||||
%{dracutlibdir}/modules.d/95dasd_mod
|
||||
%{dracutlibdir}/modules.d/95dasd_rules
|
||||
%{dracutlibdir}/modules.d/95dcssblk
|
||||
%{dracutlibdir}/modules.d/95qeth_rules
|
||||
%{dracutlibdir}/modules.d/95zfcp
|
||||
%{dracutlibdir}/modules.d/95zfcp_rules
|
||||
%endif
|
||||
%{dracutlibdir}/modules.d/96securityfs
|
||||
%{dracutlibdir}/modules.d/97masterkey
|
||||
@ -434,6 +416,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 +443,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,8 +491,10 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/
|
||||
%{_prefix}/lib/kernel/install.d/51-dracut-rescue.install
|
||||
|
||||
%changelog
|
||||
* Mon Feb 12 2024 Pavel Valena <pvalena@redhat.com> - 059-22
|
||||
* Thu May 16 2024 Pavel Valena <pvalena@redhat.com> - 101-1
|
||||
- Update to dracut 101.
|
||||
- Remove network-legacy module.
|
||||
- Additional fixes on top of rebase (see patches).
|
||||
|
||||
* Sat Jan 27 2024 Manuel Fombuena <fombuena@outlook.com> - 059-21
|
||||
- fix(pkcs11): delete trailing dot on libcryptsetup-token-systemd-pkcs11.so
|
||||
|
82
newdracut.sh
82
newdracut.sh
@ -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<new_release; i++)); do
|
||||
subject=$(grep '^Subject: ' +(0)$i.patch | head -1)
|
||||
if [ -n "$subject" ]; then
|
||||
echo "-${subject#*\[PATCH\]}"
|
||||
fi
|
||||
done
|
||||
|
||||
echo
|
||||
|
||||
elif [ -n "$do_print" ]; then
|
||||
echo "$line"
|
||||
fi
|
||||
done < dracut.spec.old >> 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<new_release; i++)); do
|
||||
resolves=$(grep '^Resolves: ' +(0)$i.patch | head -1)
|
||||
if [ -n "$resolves" ]; then
|
||||
echo "${resolves#Resolves: }"
|
||||
fi
|
||||
done | sed -e 's/rhbz#/#/g' | sort -u | tr -s '\n' ',')"
|
||||
|
||||
git commit -m "$(echo -e "dracut-${new_version}-${new_release_full}\n\n${msg%,}")"
|
||||
|
||||
fi
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (059.tar.gz) = 196bc8bf18703c72bffb51a7e0493719c58173ad2da7d121eb42f9a8de47e953af36d109214dc4a10b2dc2d3bd19e844f7f51c2bdec087e064ea11f75124032d
|
||||
SHA512 (101.tar.gz) = 827f073b749a374b703f317ba249479312043ed54af82609ce45332c27349870a68a1d9883118e0a3ecd1cbb33d64aca8bcf6aac56eb75f721fd3380bd12005b
|
||||
|
Loading…
Reference in New Issue
Block a user