diff --git a/0001-feat-hwdb-add-hwdb-module-to-install-hwdb.bin-on-dem.patch b/0001-feat-hwdb-add-hwdb-module-to-install-hwdb.bin-on-dem.patch new file mode 100644 index 0000000..834f211 --- /dev/null +++ b/0001-feat-hwdb-add-hwdb-module-to-install-hwdb.bin-on-dem.patch @@ -0,0 +1,53 @@ +From 3bcb0a9f06bac7fa62dc7241860deb8b671f17cd Mon Sep 17 00:00:00 2001 +From: Pavel Valena +Date: Tue, 25 Apr 2023 14:56:59 +0200 +Subject: [PATCH 1/6] 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 + diff --git a/0001-feat-kernel-install-do-nothing-when-KERNEL_INSTALL_I.patch b/0001-feat-kernel-install-do-nothing-when-KERNEL_INSTALL_I.patch deleted file mode 100644 index de38727..0000000 --- a/0001-feat-kernel-install-do-nothing-when-KERNEL_INSTALL_I.patch +++ /dev/null @@ -1,96 +0,0 @@ -From f86d5ff72868e9df7d255e3c5e938a9e339f09fa Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= -Date: Tue, 18 Jan 2022 18:08:42 +0100 -Subject: [PATCH 01/10] feat(kernel-install): do nothing when - $KERNEL_INSTALL_INITRD_GENERATOR says so - -dracut may be installed without being actually used. This is very common in -binary distros where a package may be pulled in through dependencies, even -though the user does not need it in a particular setup. KERNEL_INSTALL_INITRD_GENERATOR -is being added in systemd's kernel-install to select which of the possibly many -initrd generation mechanisms will be used. - -For backwards compat, if it not set, continue as before. But if set to -something else, skip our kernel-install plugins. - -(Cherry-picked commit f47bcdd7342ca0d46b889e712a1c7446e18434bc from PR#1825) ---- - install.d/50-dracut.install | 31 ++++++------------------------ - install.d/51-dracut-rescue.install | 12 +++++++++--- - 2 files changed, 15 insertions(+), 28 deletions(-) - -diff --git a/install.d/50-dracut.install b/install.d/50-dracut.install -index 441414ac..efb184cd 100755 ---- a/install.d/50-dracut.install -+++ b/install.d/50-dracut.install -@@ -6,38 +6,19 @@ BOOT_DIR_ABS="$3" - KERNEL_IMAGE="$4" - - # If KERNEL_INSTALL_MACHINE_ID is defined but empty, BOOT_DIR_ABS is a fake directory. --# So, let's skip to create initrd. -+# In this case, do not create the initrd. - if ! [[ ${KERNEL_INSTALL_MACHINE_ID-x} ]]; then - exit 0 - fi - --# Do not attempt to create initramfs if the supplied image is already a UKI --if [[ "$KERNEL_INSTALL_IMAGE_TYPE" = "uki" ]]; then -+# Skip this plugin if we're using a different generator. If nothing is specified, -+# assume we're wanted since we're installed. -+if [ "${KERNEL_INSTALL_INITRD_GENERATOR:-dracut}" != "dracut" ]; then - exit 0 - fi - --# Mismatching the install layout and the --uefi/--no-uefi opts just creates a mess. --if [[ $KERNEL_INSTALL_LAYOUT == "uki" && -n $KERNEL_INSTALL_STAGING_AREA ]]; then -- BOOT_DIR_ABS="$KERNEL_INSTALL_STAGING_AREA" -- if [[ -z $KERNEL_INSTALL_UKI_GENERATOR || $KERNEL_INSTALL_UKI_GENERATOR == "dracut" ]]; then -- # No uki generator preference set or we have been chosen -- IMAGE="uki.efi" -- UEFI_OPTS="--uefi" -- elif [[ -z $KERNEL_INSTALL_INITRD_GENERATOR || $KERNEL_INSTALL_INITRD_GENERATOR == "dracut" ]]; then -- # We aren't the uki generator, but we have been requested to make the initrd -- IMAGE="initrd" -- UEFI_OPTS="--no-uefi" -- else -- exit 0 -- fi --elif [[ $KERNEL_INSTALL_LAYOUT == "bls" && -n $KERNEL_INSTALL_STAGING_AREA ]]; then -- BOOT_DIR_ABS="$KERNEL_INSTALL_STAGING_AREA" -- if [[ -z $KERNEL_INSTALL_INITRD_GENERATOR || $KERNEL_INSTALL_INITRD_GENERATOR == "dracut" ]]; then -- IMAGE="initrd" -- UEFI_OPTS="--no-uefi" -- else -- exit 0 -- fi -+if [[ -d "$BOOT_DIR_ABS" ]]; then -+ INITRD="initrd" - else - # No layout information, use users --uefi/--no-uefi preference - UEFI_OPTS="" -diff --git a/install.d/51-dracut-rescue.install b/install.d/51-dracut-rescue.install -index aa0ccdc5..be4172b5 100755 ---- a/install.d/51-dracut-rescue.install -+++ b/install.d/51-dracut-rescue.install -@@ -7,9 +7,15 @@ KERNEL_VERSION="$2" - BOOT_DIR_ABS="${3%/*}/0-rescue" - KERNEL_IMAGE="$4" - --dropindirs_sort() { -- suffix=$1 -- shift -+# Skip this plugin if we're using a different generator. If nothing is specified, -+# assume we're wanted since we're installed. -+if [ "${KERNEL_INSTALL_INITRD_GENERATOR:-dracut}" != "dracut" ]; then -+ exit 0 -+fi -+ -+dropindirs_sort() -+{ -+ suffix=$1; shift - args=("$@") - files=$( - while (($# > 0)); do --- -2.42.0 - diff --git a/0002-fix-kernel-install-do-not-generate-an-initrd-when-on.patch b/0002-fix-kernel-install-do-not-generate-an-initrd-when-on.patch deleted file mode 100644 index 858ec33..0000000 --- a/0002-fix-kernel-install-do-not-generate-an-initrd-when-on.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 9f979fc9486af3c7c924d3f9f837f06616c61829 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= -Date: Tue, 18 Jan 2022 18:58:58 +0100 -Subject: [PATCH 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 - diff --git a/0002-fix-rngd-install-system-service-file.patch b/0002-fix-rngd-install-system-service-file.patch new file mode 100644 index 0000000..633c210 --- /dev/null +++ b/0002-fix-rngd-install-system-service-file.patch @@ -0,0 +1,59 @@ +From d14d724620fe4810930d1c2f07d10fa6b8bc9557 Mon Sep 17 00:00:00 2001 +From: Pavel Valena +Date: Sun, 23 Jul 2023 19:44:17 +0200 +Subject: [PATCH 2/6] 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 + diff --git a/0003-refactor-cms-use-zdev-to-simplify-handling-CMSDASD-..patch b/0003-refactor-cms-use-zdev-to-simplify-handling-CMSDASD-..patch deleted file mode 100644 index f71e2b0..0000000 --- a/0003-refactor-cms-use-zdev-to-simplify-handling-CMSDASD-..patch +++ /dev/null @@ -1,198 +0,0 @@ -From 38412977daad049b12273966300d07211674834e Mon Sep 17 00:00:00 2001 -From: Steffen Maier -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 ---- - 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 - diff --git a/0003-revert-fix-install.d-correctly-install-pre-genned-im.patch b/0003-revert-fix-install.d-correctly-install-pre-genned-im.patch new file mode 100644 index 0000000..05caeac --- /dev/null +++ b/0003-revert-fix-install.d-correctly-install-pre-genned-im.patch @@ -0,0 +1,238 @@ +From 6fa596ca039300e5f4bb3cca14768976efe95eac Mon Sep 17 00:00:00 2001 +From: Pavel Valena +Date: Wed, 12 Jun 2024 06:30:42 +0200 +Subject: [PATCH 3/6] revert: "fix(install.d): correctly install pre-genned + image and die if no args" + +revert: "fix(install.d): simplify and use what kernel-install gives us" + +This reverts commits: + d40155385d060f8d8608fa8a4931e2e42ddc3a8f + 8388ad149c698c951089606352fdb0cdcaaf40c9 + +https://github.com/dracut-ng/dracut-ng/issues/334 + +This is temporary, until the `20-grub.install` will be able to handle initrd +from kernel staging area. +--- + install.d/50-dracut.install | 152 ++++++++++++++++++----------- + install.d/51-dracut-rescue.install | 22 +---- + 2 files changed, 97 insertions(+), 77 deletions(-) + +diff --git a/install.d/50-dracut.install b/install.d/50-dracut.install +index 14f87721..441414ac 100755 +--- a/install.d/50-dracut.install ++++ b/install.d/50-dracut.install +@@ -1,13 +1,13 @@ + #!/bin/bash + +-COMMAND="${1:?}" +-KERNEL_VERSION="${2:?}" +-#shellcheck disable=SC2034 ++COMMAND="$1" ++KERNEL_VERSION="$2" + BOOT_DIR_ABS="$3" + KERNEL_IMAGE="$4" + +-# If the initrd was provided on the kernel command line, we shouldn't generate our own. +-if [[ "$COMMAND" != "add" || "$#" -gt 4 ]]; then ++# If KERNEL_INSTALL_MACHINE_ID is defined but empty, BOOT_DIR_ABS is a fake directory. ++# So, let's skip to create initrd. ++if ! [[ ${KERNEL_INSTALL_MACHINE_ID-x} ]]; then + exit 0 + fi + +@@ -16,64 +16,102 @@ if [[ "$KERNEL_INSTALL_IMAGE_TYPE" = "uki" ]]; then + exit 0 + fi + +-if [[ "${KERNEL_INSTALL_INITRD_GENERATOR:-dracut}" = "dracut" ]]; then +- # We are the initrd generator +- IMAGE="initrd" +- UEFI_OPTS="--no-uefi" ++# 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 + else +- exit 0 ++ # No layout information, use users --uefi/--no-uefi preference ++ UEFI_OPTS="" ++ if [[ -d $BOOT_DIR_ABS ]]; then ++ IMAGE="initrd" ++ else ++ BOOT_DIR_ABS="/boot" ++ IMAGE="initramfs-${KERNEL_VERSION}.img" ++ fi + fi + +-if [[ "$KERNEL_INSTALL_UKI_GENERATOR" = "dracut" ]]; then +- # We are chosen to generate the UKI as well as initrd +- IMAGE="uki.efi" +- UEFI_OPTS="--uefi" +-fi ++ret=0 + +-if [[ -f ${KERNEL_IMAGE%/*}/$IMAGE ]]; then +- # we found an initrd or uki.efi at the same place as the kernel +- # use this and don't generate a new one +- [[ $KERNEL_INSTALL_VERBOSE == 1 ]] && echo \ +- "There is an $IMAGE image at the same place as the kernel, skipping generating a new one" +- cp --reflink=auto "${KERNEL_IMAGE%/*}/$IMAGE" "$KERNEL_INSTALL_STAGING_AREA/$IMAGE" \ +- && chown root:root "$KERNEL_INSTALL_STAGING_AREA/$IMAGE" \ +- && chmod 0600 "$KERNEL_INSTALL_STAGING_AREA/$IMAGE" \ +- && exit 0 +-fi ++case "$COMMAND" in ++ add) ++ if [[ $IMAGE == "uki.efi" ]]; then ++ IMAGE_PREGENERATED=${KERNEL_IMAGE%/*}/uki.efi ++ else ++ IMAGE_PREGENERATED=${KERNEL_IMAGE%/*}/initrd ++ fi ++ if [[ -f ${IMAGE_PREGENERATED} ]]; then ++ # we found an initrd or uki.efi at the same place as the kernel ++ # use this and don't generate a new one ++ [[ $KERNEL_INSTALL_VERBOSE == 1 ]] && echo \ ++ "There is an ${IMAGE} image at the same place as the kernel, skipping generating a new one" ++ cp --reflink=auto "$IMAGE_PREGENERATED" "$BOOT_DIR_ABS/$IMAGE" \ ++ && chown root:root "$BOOT_DIR_ABS/$IMAGE" \ ++ && chmod 0600 "$BOOT_DIR_ABS/$IMAGE" \ ++ && exit 0 ++ fi + +-if [ -n "$KERNEL_INSTALL_CONF_ROOT" ]; then +- if [ -f "$KERNEL_INSTALL_CONF_ROOT/cmdline" ]; then +- read -r -d '' -a BOOT_OPTIONS < "$KERNEL_INSTALL_CONF_ROOT/cmdline" +- fi +-elif [[ -f /etc/kernel/cmdline ]]; then +- read -r -d '' -a BOOT_OPTIONS < /etc/kernel/cmdline +-elif [[ -f /usr/lib/kernel/cmdline ]]; then +- read -r -d '' -a BOOT_OPTIONS < /usr/lib/kernel/cmdline +-else +- declare -a BOOT_OPTIONS ++ if [ -n "$KERNEL_INSTALL_CONF_ROOT" ]; then ++ if [ -f "$KERNEL_INSTALL_CONF_ROOT/cmdline" ]; then ++ read -r -d '' -a BOOT_OPTIONS < "$KERNEL_INSTALL_CONF_ROOT/cmdline" ++ fi ++ elif [[ -f /etc/kernel/cmdline ]]; then ++ read -r -d '' -a BOOT_OPTIONS < /etc/kernel/cmdline ++ elif [[ -f /usr/lib/kernel/cmdline ]]; then ++ read -r -d '' -a BOOT_OPTIONS < /usr/lib/kernel/cmdline ++ else ++ declare -a BOOT_OPTIONS + +- read -r -d '' -a line < /proc/cmdline +- for i in "${line[@]}"; do +- [[ ${i#initrd=*} != "$i" ]] && continue +- BOOT_OPTIONS+=("$i") +- done +-fi ++ read -r -d '' -a line < /proc/cmdline ++ for i in "${line[@]}"; do ++ [[ ${i#initrd=*} != "$i" ]] && continue ++ BOOT_OPTIONS+=("$i") ++ done ++ fi + +-unset noimageifnotneeded ++ unset noimageifnotneeded + +-for ((i = 0; i < "${#BOOT_OPTIONS[@]}"; i++)); do +- # shellcheck disable=SC1001 +- if [[ ${BOOT_OPTIONS[$i]} == root\=PARTUUID\=* ]]; then +- noimageifnotneeded="yes" +- break +- fi +-done ++ for ((i = 0; i < "${#BOOT_OPTIONS[@]}"; i++)); do ++ # shellcheck disable=SC1001 ++ if [[ ${BOOT_OPTIONS[$i]} == root\=PARTUUID\=* ]]; then ++ noimageifnotneeded="yes" ++ break ++ fi ++ done ++ ++ # shellcheck disable=SC2046 ++ dracut -f \ ++ ${noimageifnotneeded:+--noimageifnotneeded} \ ++ $([[ $KERNEL_INSTALL_VERBOSE == 1 ]] && echo --verbose) \ ++ $([[ -n $KERNEL_IMAGE ]] && echo --kernel-image "$KERNEL_IMAGE") \ ++ "$UEFI_OPTS" \ ++ --kver "$KERNEL_VERSION" \ ++ "$BOOT_DIR_ABS/$IMAGE" ++ ret=$? ++ ;; ++ ++ remove) ++ rm -f -- "$BOOT_DIR_ABS/$IMAGE" ++ ret=$? ++ ;; ++esac + +-# shellcheck disable=SC2046 +-dracut -f \ +- ${noimageifnotneeded:+--noimageifnotneeded} \ +- $([[ $KERNEL_INSTALL_VERBOSE == 1 ]] && echo --verbose) \ +- $([[ -n $KERNEL_IMAGE ]] && echo --kernel-image "$KERNEL_IMAGE") \ +- "$UEFI_OPTS" \ +- --kver "$KERNEL_VERSION" \ +- "$KERNEL_INSTALL_STAGING_AREA/$IMAGE" || exit 1 ++exit $ret +diff --git a/install.d/51-dracut-rescue.install b/install.d/51-dracut-rescue.install +index 25f75557..aa0ccdc5 100755 +--- a/install.d/51-dracut-rescue.install ++++ b/install.d/51-dracut-rescue.install +@@ -2,29 +2,11 @@ + + export LANG=C + +-COMMAND="${1:?}" +-KERNEL_VERSION="${2:?}" ++COMMAND="$1" ++KERNEL_VERSION="$2" + BOOT_DIR_ABS="${3%/*}/0-rescue" + KERNEL_IMAGE="$4" + +-# If the initrd was provided on the kernel command line, we shouldn't generate our own. +-if [[ "$COMMAND" = "add" && "$#" -gt 4 ]]; 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 +- exit 0 +-fi +- +-if [[ "$KERNEL_INSTALL_UKI_GENERATOR" = "dracut" ]]; then +- # Rescue images currently not compatible with UKIs +- exit 0 +-elif [[ "${KERNEL_INSTALL_INITRD_GENERATOR:-dracut}" != "dracut" ]]; then +- # We are not the initrd generator +- exit 0 +-fi +- + dropindirs_sort() { + suffix=$1 + shift +-- +2.42.0 + diff --git a/0004-feat-kernel-install-do-nothing-when-KERNEL_INSTALL_I.patch b/0004-feat-kernel-install-do-nothing-when-KERNEL_INSTALL_I.patch new file mode 100644 index 0000000..0b2b205 --- /dev/null +++ b/0004-feat-kernel-install-do-nothing-when-KERNEL_INSTALL_I.patch @@ -0,0 +1,96 @@ +From c6d18c3c71597e78572378fc4dde391f1845b8bd Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Tue, 18 Jan 2022 18:08:42 +0100 +Subject: [PATCH 4/6] feat(kernel-install): do nothing when + $KERNEL_INSTALL_INITRD_GENERATOR says so + +dracut may be installed without being actually used. This is very common in +binary distros where a package may be pulled in through dependencies, even +though the user does not need it in a particular setup. KERNEL_INSTALL_INITRD_GENERATOR +is being added in systemd's kernel-install to select which of the possibly many +initrd generation mechanisms will be used. + +For backwards compat, if it not set, continue as before. But if set to +something else, skip our kernel-install plugins. + +(Cherry-picked commit f47bcdd7342ca0d46b889e712a1c7446e18434bc from PR#1825) +--- + install.d/50-dracut.install | 31 ++++++------------------------ + install.d/51-dracut-rescue.install | 12 +++++++++--- + 2 files changed, 15 insertions(+), 28 deletions(-) + +diff --git a/install.d/50-dracut.install b/install.d/50-dracut.install +index 441414ac..efb184cd 100755 +--- a/install.d/50-dracut.install ++++ b/install.d/50-dracut.install +@@ -6,38 +6,19 @@ BOOT_DIR_ABS="$3" + KERNEL_IMAGE="$4" + + # If KERNEL_INSTALL_MACHINE_ID is defined but empty, BOOT_DIR_ABS is a fake directory. +-# So, let's skip to create initrd. ++# In this case, do not create the initrd. + if ! [[ ${KERNEL_INSTALL_MACHINE_ID-x} ]]; then + exit 0 + fi + +-# Do not attempt to create initramfs if the supplied image is already a UKI +-if [[ "$KERNEL_INSTALL_IMAGE_TYPE" = "uki" ]]; then ++# Skip this plugin if we're using a different generator. If nothing is specified, ++# assume we're wanted since we're installed. ++if [ "${KERNEL_INSTALL_INITRD_GENERATOR:-dracut}" != "dracut" ]; then + exit 0 + fi + +-# Mismatching the install layout and the --uefi/--no-uefi opts just creates a mess. +-if [[ $KERNEL_INSTALL_LAYOUT == "uki" && -n $KERNEL_INSTALL_STAGING_AREA ]]; then +- BOOT_DIR_ABS="$KERNEL_INSTALL_STAGING_AREA" +- if [[ -z $KERNEL_INSTALL_UKI_GENERATOR || $KERNEL_INSTALL_UKI_GENERATOR == "dracut" ]]; then +- # No uki generator preference set or we have been chosen +- IMAGE="uki.efi" +- UEFI_OPTS="--uefi" +- elif [[ -z $KERNEL_INSTALL_INITRD_GENERATOR || $KERNEL_INSTALL_INITRD_GENERATOR == "dracut" ]]; then +- # We aren't the uki generator, but we have been requested to make the initrd +- IMAGE="initrd" +- UEFI_OPTS="--no-uefi" +- else +- exit 0 +- fi +-elif [[ $KERNEL_INSTALL_LAYOUT == "bls" && -n $KERNEL_INSTALL_STAGING_AREA ]]; then +- BOOT_DIR_ABS="$KERNEL_INSTALL_STAGING_AREA" +- if [[ -z $KERNEL_INSTALL_INITRD_GENERATOR || $KERNEL_INSTALL_INITRD_GENERATOR == "dracut" ]]; then +- IMAGE="initrd" +- UEFI_OPTS="--no-uefi" +- else +- exit 0 +- fi ++if [[ -d "$BOOT_DIR_ABS" ]]; then ++ INITRD="initrd" + else + # No layout information, use users --uefi/--no-uefi preference + UEFI_OPTS="" +diff --git a/install.d/51-dracut-rescue.install b/install.d/51-dracut-rescue.install +index aa0ccdc5..be4172b5 100755 +--- a/install.d/51-dracut-rescue.install ++++ b/install.d/51-dracut-rescue.install +@@ -7,9 +7,15 @@ KERNEL_VERSION="$2" + BOOT_DIR_ABS="${3%/*}/0-rescue" + KERNEL_IMAGE="$4" + +-dropindirs_sort() { +- suffix=$1 +- shift ++# Skip this plugin if we're using a different generator. If nothing is specified, ++# assume we're wanted since we're installed. ++if [ "${KERNEL_INSTALL_INITRD_GENERATOR:-dracut}" != "dracut" ]; then ++ exit 0 ++fi ++ ++dropindirs_sort() ++{ ++ suffix=$1; shift + args=("$@") + files=$( + while (($# > 0)); do +-- +2.42.0 + diff --git a/0004-refactor-cms-use-consolidated-zfcp-config-with-zdev-.patch b/0004-refactor-cms-use-consolidated-zfcp-config-with-zdev-.patch deleted file mode 100644 index 0a35c9b..0000000 --- a/0004-refactor-cms-use-consolidated-zfcp-config-with-zdev-.patch +++ /dev/null @@ -1,77 +0,0 @@ -From 3a9b9a5cf507a868f8b3ec33cf686b3a552286c2 Mon Sep 17 00:00:00 2001 -From: Steffen Maier -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 ---- - 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 - diff --git a/0005-fix-kernel-install-do-not-generate-an-initrd-when-on.patch b/0005-fix-kernel-install-do-not-generate-an-initrd-when-on.patch new file mode 100644 index 0000000..2cb8de7 --- /dev/null +++ b/0005-fix-kernel-install-do-not-generate-an-initrd-when-on.patch @@ -0,0 +1,39 @@ +From 1bd81956dc050db071c5885cfbcde393370468ae Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Tue, 18 Jan 2022 18:58:58 +0100 +Subject: [PATCH 5/6] fix(kernel-install): do not generate an initrd when one + was specified + +According to the synopsis, kernel-install can be called with an +already-prepared initrd. In that case, no initrd should be generated by dracut. + +(Cherry-picked commit 0b72cf5c4eca0e0db76e3e210cfdc48e6b49bb74 from PR#1825) +--- + install.d/50-dracut.install | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/install.d/50-dracut.install b/install.d/50-dracut.install +index efb184cd..3907e303 100755 +--- a/install.d/50-dracut.install ++++ b/install.d/50-dracut.install +@@ -4,6 +4,7 @@ COMMAND="$1" + KERNEL_VERSION="$2" + BOOT_DIR_ABS="$3" + KERNEL_IMAGE="$4" ++INITRD_OPTIONS_SHIFT=4 + + # If KERNEL_INSTALL_MACHINE_ID is defined but empty, BOOT_DIR_ABS is a fake directory. + # In this case, do not create the initrd. +@@ -34,6 +35,9 @@ ret=0 + + case "$COMMAND" in + add) ++ # If the initrd was provided on the kernel command line, we shouldn't generate our own. ++ [ "$#" -gt "$INITRD_OPTIONS_SHIFT" ] && exit 0 ++ + if [[ $IMAGE == "uki.efi" ]]; then + IMAGE_PREGENERATED=${KERNEL_IMAGE%/*}/uki.efi + else +-- +2.42.0 + diff --git a/0005-refactor-cms-use-consolidated-dasd-config-with-zdev-.patch b/0005-refactor-cms-use-consolidated-dasd-config-with-zdev-.patch deleted file mode 100644 index 01f78c9..0000000 --- a/0005-refactor-cms-use-consolidated-dasd-config-with-zdev-.patch +++ /dev/null @@ -1,81 +0,0 @@ -From 74edb9758da26ef063e4686a595f1d34f07f86f7 Mon Sep 17 00:00:00 2001 -From: Steffen Maier -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 ---- - 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 - diff --git a/0006-fix-crypt-decryption-when-rd.luks.name-is-set.patch b/0006-fix-crypt-decryption-when-rd.luks.name-is-set.patch new file mode 100644 index 0000000..951d36c --- /dev/null +++ b/0006-fix-crypt-decryption-when-rd.luks.name-is-set.patch @@ -0,0 +1,25 @@ +From 6cb58e86ae65cf9922023b12e889446323a89080 Mon Sep 17 00:00:00 2001 +From: Laszlo Gombos +Date: Sat, 15 Jun 2024 15:21:44 -0400 +Subject: [PATCH 6/6] fix(crypt): decryption when rd.luks.name is set + +--- + modules.d/90crypt/parse-crypt.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/90crypt/parse-crypt.sh b/modules.d/90crypt/parse-crypt.sh +index 39fc6d21..9567a4a9 100755 +--- a/modules.d/90crypt/parse-crypt.sh ++++ b/modules.d/90crypt/parse-crypt.sh +@@ -174,7 +174,7 @@ else + } >> "$hookdir/emergency/90-crypt.sh" + fi + done +- elif getargbool 1 rd.auto; then ++ elif getargbool 1 rd.auto && [ -z "$(getargs rd.luks.name)" ]; then + if [ -z "$DRACUT_SYSTEMD" ]; then + { + printf -- 'ENV{ID_FS_TYPE}=="crypto_LUKS", RUN+="%s ' "$(command -v initqueue)" +-- +2.42.0 + diff --git a/0006-refactor-cms-use-consolidated-network-config-with-zd.patch b/0006-refactor-cms-use-consolidated-network-config-with-zd.patch deleted file mode 100644 index 74f3d4c..0000000 --- a/0006-refactor-cms-use-consolidated-network-config-with-zd.patch +++ /dev/null @@ -1,109 +0,0 @@ -From cc14fe218861f2855ca88ad03220ecb78d4aa31a Mon Sep 17 00:00:00 2001 -From: Steffen Maier -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 ---- - 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 - diff --git a/0007-refactor-cms-remove-now-unnecessary-inclusion-of-ful.patch b/0007-refactor-cms-remove-now-unnecessary-inclusion-of-ful.patch deleted file mode 100644 index ff067a0..0000000 --- a/0007-refactor-cms-remove-now-unnecessary-inclusion-of-ful.patch +++ /dev/null @@ -1,27 +0,0 @@ -From a2c1fc530d8bcbdeaf1806f4a22019052715fc98 Mon Sep 17 00:00:00 2001 -From: Steffen Maier -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 ---- - 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 - diff --git a/0008-feat-zfcp_rules-remove-zfcp-handling-consolidated-in.patch b/0008-feat-zfcp_rules-remove-zfcp-handling-consolidated-in.patch deleted file mode 100644 index b831225..0000000 --- a/0008-feat-zfcp_rules-remove-zfcp-handling-consolidated-in.patch +++ /dev/null @@ -1,222 +0,0 @@ -From 71876ea8c73090741bdf26abb89c28fb260ed575 Mon Sep 17 00:00:00 2001 -From: Steffen Maier -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 ---- - 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 - diff --git a/0009-feat-zfcp-minimize-zfcp-handling-consolidated-in-s39.patch b/0009-feat-zfcp-minimize-zfcp-handling-consolidated-in-s39.patch deleted file mode 100644 index 7f494b2..0000000 --- a/0009-feat-zfcp-minimize-zfcp-handling-consolidated-in-s39.patch +++ /dev/null @@ -1,104 +0,0 @@ -From 8d6098969aa9dc34edfd1bc96e6aa0384ae2fb99 Mon Sep 17 00:00:00 2001 -From: Steffen Maier -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 ---- - 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=**____,____,____:: - 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=**____:: - 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 and 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 - diff --git a/0010-feat-dasd_rules-remove-dasd-handling-consolidated-in.patch b/0010-feat-dasd_rules-remove-dasd-handling-consolidated-in.patch deleted file mode 100644 index 2887176..0000000 --- a/0010-feat-dasd_rules-remove-dasd-handling-consolidated-in.patch +++ /dev/null @@ -1,151 +0,0 @@ -From 7294e45b5204e47bb8ee2108e2c38c5843e64fac Mon Sep 17 00:00:00 2001 -From: Steffen Maier -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 ---- - 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 - diff --git a/0011-feat-dasd_mod-minimize-dasd-handling-consolidated-in.patch b/0011-feat-dasd_mod-minimize-dasd-handling-consolidated-in.patch deleted file mode 100644 index 6114794..0000000 --- a/0011-feat-dasd_mod-minimize-dasd-handling-consolidated-in.patch +++ /dev/null @@ -1,73 +0,0 @@ -From a82045ef34bc8c913502eba37b6b9c60709d6997 Mon Sep 17 00:00:00 2001 -From: Steffen Maier -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 ---- - 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 - diff --git a/0012-feat-dasd-minimize-dasd-handling-consolidated-in-s39.patch b/0012-feat-dasd-minimize-dasd-handling-consolidated-in-s39.patch deleted file mode 100644 index 7ab681f..0000000 --- a/0012-feat-dasd-minimize-dasd-handling-consolidated-in-s39.patch +++ /dev/null @@ -1,100 +0,0 @@ -From 1ff6be8aef787513b8143df444a1dd2d696b0944 Mon Sep 17 00:00:00 2001 -From: Steffen Maier -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 ---- - 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 - diff --git a/0013-feat-znet-use-zdev-for-consolidated-device-configura.patch b/0013-feat-znet-use-zdev-for-consolidated-device-configura.patch deleted file mode 100644 index 5181de5..0000000 --- a/0013-feat-znet-use-zdev-for-consolidated-device-configura.patch +++ /dev/null @@ -1,149 +0,0 @@ -From 86b6e2979999cf5ecce8c76c6230d1f085b3a333 Mon Sep 17 00:00:00 2001 -From: Steffen Maier -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 ---- - 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 - diff --git a/0014-docs-dracut.cmdline-generalize-description-of-rd.zne.patch b/0014-docs-dracut.cmdline-generalize-description-of-rd.zne.patch deleted file mode 100644 index e92bccd..0000000 --- a/0014-docs-dracut.cmdline-generalize-description-of-rd.zne.patch +++ /dev/null @@ -1,36 +0,0 @@ -From addb383b375fd0db07eacf8a9f5d9b4e23343855 Mon Sep 17 00:00:00 2001 -From: Steffen Maier -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 ---- - 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=**____,____,____:: -- 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. -+ is one of: qeth, lcs, ctc. -+ is a comma-separated list of ccw device bus-IDs. -+ The list consists of 3 entries with nettype qeth, and 2 for other nettype. -+ is a comma-separated list of = pairs, -+ where refers to a device sysfs attribute to which gets written. - rd.znet can be specified multiple times on the kernel command line. - - **rd.znet_ifname=**____:____:: --- -2.42.0 - diff --git a/0015-feat-qeth_rules-remove-qeth-handling-consolidated-in.patch b/0015-feat-qeth_rules-remove-qeth-handling-consolidated-in.patch deleted file mode 100644 index 827881a..0000000 --- a/0015-feat-qeth_rules-remove-qeth-handling-consolidated-in.patch +++ /dev/null @@ -1,90 +0,0 @@ -From 7ad6fef8fe110093939c422b5c3b381ebe47e4e9 Mon Sep 17 00:00:00 2001 -From: Steffen Maier -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 ---- - 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 - diff --git a/0016-fix-znet-append-to-udev-rules-so-each-rd.znet_ifname.patch b/0016-fix-znet-append-to-udev-rules-so-each-rd.znet_ifname.patch deleted file mode 100644 index a4055fb..0000000 --- a/0016-fix-znet-append-to-udev-rules-so-each-rd.znet_ifname.patch +++ /dev/null @@ -1,44 +0,0 @@ -From cbc5eece88b8f6d0e69fdfbb8f34eabb45425c86 Mon Sep 17 00:00:00 2001 -From: Steffen Maier -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 ---- - 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 - diff --git a/0017-refactor-ifcfg-delete-code-duplication-using-iface_g.patch b/0017-refactor-ifcfg-delete-code-duplication-using-iface_g.patch deleted file mode 100644 index 7bdb334..0000000 --- a/0017-refactor-ifcfg-delete-code-duplication-using-iface_g.patch +++ /dev/null @@ -1,40 +0,0 @@ -From b6913f66b6c9e9ea81fd0832405c170876bc993a Mon Sep 17 00:00:00 2001 -From: Steffen Maier -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 ---- - 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 - diff --git a/0018-feat-ifcfg-minimize-s390-specific-network-configurat.patch b/0018-feat-ifcfg-minimize-s390-specific-network-configurat.patch deleted file mode 100644 index 2a88e6a..0000000 --- a/0018-feat-ifcfg-minimize-s390-specific-network-configurat.patch +++ /dev/null @@ -1,95 +0,0 @@ -From 110fec3e41faf47277447f1c56635c5a876c1f96 Mon Sep 17 00:00:00 2001 -From: Steffen Maier -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 ---- - 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 - diff --git a/0019-fix-dracut-move-hooks-directory-from-usr-lib-to-var-.patch b/0019-fix-dracut-move-hooks-directory-from-usr-lib-to-var-.patch deleted file mode 100644 index b0a1efb..0000000 --- a/0019-fix-dracut-move-hooks-directory-from-usr-lib-to-var-.patch +++ /dev/null @@ -1,87 +0,0 @@ -From 55a56c546bde71fb42c99aadd96e98fca2199823 Mon Sep 17 00:00:00 2001 -From: Laszlo Gombos -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 ---- - 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 - diff --git a/0020-fix-systemd-explicitly-install-some-libs-that-will-n.patch b/0020-fix-systemd-explicitly-install-some-libs-that-will-n.patch deleted file mode 100644 index 0d662cd..0000000 --- a/0020-fix-systemd-explicitly-install-some-libs-that-will-n.patch +++ /dev/null @@ -1,72 +0,0 @@ -From bad2bc80cdcfac8915374497cc47ce9d5670d015 Mon Sep 17 00:00:00 2001 -From: Antonio Alvarez Feijoo -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 - diff --git a/0021-fix-nvmf-move-etc-nvme-host-nqn-id-requirement-to-ho.patch b/0021-fix-nvmf-move-etc-nvme-host-nqn-id-requirement-to-ho.patch deleted file mode 100644 index d097ade..0000000 --- a/0021-fix-nvmf-move-etc-nvme-host-nqn-id-requirement-to-ho.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 10b86edba3ffe0ce13c5f43ff0193cdf04661358 Mon Sep 17 00:00:00 2001 -From: Tomas Bzatek -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 - -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 - diff --git a/0022-feat-hwdb-add-hwdb-module-to-install-hwdb.bin-on-dem.patch b/0022-feat-hwdb-add-hwdb-module-to-install-hwdb.bin-on-dem.patch deleted file mode 100644 index 1971943..0000000 --- a/0022-feat-hwdb-add-hwdb-module-to-install-hwdb.bin-on-dem.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 0b65ac224d831cc96da940cce510523c7276a5ec Mon Sep 17 00:00:00 2001 -From: Pavel Valena -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 - diff --git a/0023-fix-rngd-install-system-service-file.patch b/0023-fix-rngd-install-system-service-file.patch deleted file mode 100644 index affedec..0000000 --- a/0023-fix-rngd-install-system-service-file.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 9df3cb58a19f38157a615c311356cfd6ae55d2d7 Mon Sep 17 00:00:00 2001 -From: Pavel Valena -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 - diff --git a/dracut.spec b/dracut.spec index 1756b4c..8ef3fc1 100644 --- a/dracut.spec +++ b/dracut.spec @@ -7,7 +7,7 @@ %global __requires_exclude pkg-config Name: dracut -Version: 101 +Version: 102 Release: 1%{?dist} Summary: Initramfs generator using udev @@ -22,75 +22,24 @@ URL: https://github.com/dracut-ng/dracut-ng/wiki/ 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(hwdb): add hwdb module to install hwdb.bin on demand +# Author: Pavel Valena +Patch0001:0001-feat-hwdb-add-hwdb-module-to-install-hwdb.bin-on-dem.patch +# fix(rngd): install system service file +# Author: Pavel Valena +Patch0002:0002-fix-rngd-install-system-service-file.patch +# revert: "fix(install.d): correctly install pre-genned image and die if no args" +# Author: Pavel Valena +Patch0003:0003-revert-fix-install.d-correctly-install-pre-genned-im.patch # feat(kernel-install): do nothing when $KERNEL_INSTALL_INITRD_GENERATOR says so # Author: Zbigniew Jędrzejewski-Szmek -Patch1: 0001-feat-kernel-install-do-nothing-when-KERNEL_INSTALL_I.patch +Patch0004:0004-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 -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 -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 -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 -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 -Patch6: 0006-refactor-cms-use-consolidated-network-config-with-zd.patch -# refactor(cms): remove now unnecessary inclusion of full s390utils-base -# Author: Steffen Maier -Patch7: 0007-refactor-cms-remove-now-unnecessary-inclusion-of-ful.patch -# feat(zfcp_rules): remove zfcp handling consolidated in s390-tools -# Author: Steffen Maier -Patch8: 0008-feat-zfcp_rules-remove-zfcp-handling-consolidated-in.patch -# feat(zfcp): minimize zfcp handling consolidated in s390-tools -# Author: Steffen Maier -Patch9: 0009-feat-zfcp-minimize-zfcp-handling-consolidated-in-s39.patch -# feat(dasd_rules): remove dasd handling consolidated in s390-tools -# Author: Steffen Maier -Patch10: 0010-feat-dasd_rules-remove-dasd-handling-consolidated-in.patch -# feat(dasd_mod): minimize dasd handling consolidated in s390-tools -# Author: Steffen Maier -Patch11: 0011-feat-dasd_mod-minimize-dasd-handling-consolidated-in.patch -# feat(dasd): minimize dasd handling consolidated in s390-tools -# Author: Steffen Maier -Patch12: 0012-feat-dasd-minimize-dasd-handling-consolidated-in-s39.patch -# feat(znet): use zdev for consolidated device configuration -# Author: Steffen Maier -Patch13: 0013-feat-znet-use-zdev-for-consolidated-device-configura.patch -# docs(dracut.cmdline): generalize description of rd.znet -# Author: Steffen Maier -Patch14: 0014-docs-dracut.cmdline-generalize-description-of-rd.zne.patch -# feat(qeth_rules): remove qeth handling consolidated in 95znet -# Author: Steffen Maier -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 -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 -Patch17: 0017-refactor-ifcfg-delete-code-duplication-using-iface_g.patch -# feat(ifcfg): minimize s390-specific network configuration aspects -# Author: Steffen Maier -Patch18: 0018-feat-ifcfg-minimize-s390-specific-network-configurat.patch -# fix(dracut): move hooks directory from /usr/lib to /var/lib +Patch0005:0005-fix-kernel-install-do-not-generate-an-initrd-when-on.patch +# fix(crypt): decryption when rd.luks.name is set # Author: Laszlo Gombos -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 -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 -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 -Patch22: 0022-feat-hwdb-add-hwdb-module-to-install-hwdb.bin-on-dem.patch -# fix(rngd): install system service file -# Author: Pavel Valena -Patch23: 0023-fix-rngd-install-system-service-file.patch +Patch0006:0006-fix-crypt-decryption-when-rd.luks.name-is-set.patch # Please use source-git to work with this spec file: # HowTo: https://packit.dev/source-git/work-with-source-git @@ -322,6 +271,7 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/ %{dracutlibdir}/modules.d/01fips %{dracutlibdir}/modules.d/01systemd-ac-power %{dracutlibdir}/modules.d/01systemd-ask-password +%{dracutlibdir}/modules.d/01systemd-bsod %{dracutlibdir}/modules.d/01systemd-coredump %{dracutlibdir}/modules.d/01systemd-creds %{dracutlibdir}/modules.d/01systemd-hostnamed @@ -374,9 +324,12 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/ %{dracutlibdir}/modules.d/90mdraid %{dracutlibdir}/modules.d/90multipath %{dracutlibdir}/modules.d/90nvdimm +%{dracutlibdir}/modules.d/90numlock %{dracutlibdir}/modules.d/90overlayfs %{dracutlibdir}/modules.d/90ppcmac +%{dracutlibdir}/modules.d/90pcmcia %{dracutlibdir}/modules.d/90qemu +%{dracutlibdir}/modules.d/90systemd-cryptsetup %{dracutlibdir}/modules.d/91crypt-gpg %{dracutlibdir}/modules.d/91crypt-loop %{dracutlibdir}/modules.d/91fido2 @@ -491,6 +444,9 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/ %{_prefix}/lib/kernel/install.d/51-dracut-rescue.install %changelog +* Fri Jun 28 2024 Pavel Valena - 102-1 +- Update to dracut 102. + * Thu May 16 2024 Pavel Valena - 101-1 - Update to dracut 101. diff --git a/sources b/sources index 975c2f3..6f44cf7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (101.tar.gz) = 827f073b749a374b703f317ba249479312043ed54af82609ce45332c27349870a68a1d9883118e0a3ecd1cbb33d64aca8bcf6aac56eb75f721fd3380bd12005b +SHA512 (102.tar.gz) = 463ad75f0508392431d58796763a41accf5a1dc17fe27d36e37d588153ca9c5b32b453faa9149524ea2dc2906805126d1e023feecb6554206595a972508f6a32