From e37aecb42764d47b923dd3280385bd5438f466b6 Mon Sep 17 00:00:00 2001 From: hongjinghao Date: Thu, 22 Feb 2024 10:04:30 +0800 Subject: [PATCH] backport patchs from upstream --- ...-90lvm-do-not-add-newline-to-cmdline.patch | 29 ++++ ...h-install-kpartx-s-11-dm-parts.rules.patch | 27 ++++ ...pl-parse-zipl.sh-honor-SYSTEMD_READY.patch | 30 ++++ ...rt-95iscsi-fix-ipv6-target-discovery.patch | 31 ++++ ...ing-space-when-compiling-cmdline-arg.patch | 29 ++++ ...5iscsi-use-ip_params_for_remote_addr.patch | 49 ++++++ ...-95nfs-use-ip_params_for_remote_addr.patch | 52 ++++++ ...T_INSTALL-to-be-not-an-absolute-path.patch | 61 +++++++ ...order-of-NFS-servers-during-the-boot.patch | 30 ++++ backport-Do-not-start-inside-container.patch | 29 ++++ backport-Fix-bad-ls-parsing.patch | 33 ++++ ...-write-kernel-cmdline-to-UEFI-binary.patch | 36 +++++ backport-docs-fix-dracut.cmdline.7.patch | 40 +++++ ...orkaround-for-openssl-libs-on-Fedora.patch | 45 ++++++ ...-the-library-workaround-after-squash.patch | 56 +++++++ ...-fix-early-microcode-detection-logic.patch | 60 +++++++ ...fix-errors-pointed-out-by-shellcheck.patch | 90 +++++++++++ ...-ia32-detection-for-uefi-executables.patch | 27 ++++ ...ork-consistent-use-of-gw-for-gateway.patch | 32 ++++ ...msquash-live-iso-scan-requires-rmdir.patch | 27 ++++ ...dracut-functions.sh-ip-route-parsing.patch | 63 ++++++++ ...mnt-error-msg-if-etc-fstab-not-exist.patch | 83 ++++++++++ ...y-code-in-the-inst_multiple-function.patch | 45 ++++++ ...init.sh-instmods-wrong-variable-name.patch | 28 ++++ ...ll-copy-files-preserving-ownership-a.patch | 49 ++++++ ...ipped-kernel-module-path-as-hash-key.patch | 80 ++++++++++ ...ommand-with-lzop-for-LZO-compression.patch | 43 +++++ ...t.sh-change-misspelled-variable-name.patch | 27 ++++ ...nore-invalid-config-file-or-dir-path.patch | 49 ++++++ ...cut.sh-remove-wrong-in-loop-sequence.patch | 27 ++++ ...n-create-the-keyboard-symlinks-again.patch | 42 +++++ backport-fix-i18n-get-rid-of-eval-calls.patch | 75 +++++++++ ...-unavailable-dracut-logger-functions.patch | 31 ++++ ...-exit-in-handle_netroot-if-discovery.patch | 34 ++++ ...op-ExecStop-setting-from-service-uni.patch | 51 ++++++ ...top-multipath-before-udev-db-cleanup.patch | 37 +++++ ...-double-brackets-around-IPv6-address.patch | 27 ++++ ...don-t-use-same-ifname-multiple-times.patch | 42 +++++ ...kip-non-directories-in-sys-class-net.patch | 29 ++++ ...ve-run-rpcbind-ownership-to-rpc-user.patch | 28 ++++ ...-call-to-block_is_netdevice-function.patch | 34 ++++ ...for-modules.d-10i18n-module-setup.sh.patch | 64 ++++++++ ...shutdown-add-timeout-to-umount-calls.patch | 149 ++++++++++++++++++ ...ipcpio-edit-skipcpio.c-strstr-memmem.patch | 29 ++++ ...ix-removal-of-pvscan-from-udev-rules.patch | 29 ++++ ...unnecessary-initdir-from-lvm_scan.sh.patch | 30 ++++ ...x-writing-fstab-file-with-missing-fs.patch | 40 +++++ dracut.spec | 52 +++++- 48 files changed, 2129 insertions(+), 1 deletion(-) create mode 100644 backport-90lvm-do-not-add-newline-to-cmdline.patch create mode 100644 backport-90multipath-install-kpartx-s-11-dm-parts.rules.patch create mode 100644 backport-91zipl-parse-zipl.sh-honor-SYSTEMD_READY.patch create mode 100644 backport-95iscsi-fix-ipv6-target-discovery.patch create mode 100644 backport-95iscsi-fix-missing-space-when-compiling-cmdline-arg.patch create mode 100644 backport-95iscsi-use-ip_params_for_remote_addr.patch create mode 100644 backport-95nfs-use-ip_params_for_remote_addr.patch create mode 100644 backport-Allow-DRACUT_INSTALL-to-be-not-an-absolute-path.patch create mode 100644 backport-Change-the-order-of-NFS-servers-during-the-boot.patch create mode 100644 backport-Do-not-start-inside-container.patch create mode 100644 backport-Fix-bad-ls-parsing.patch create mode 100644 backport-UEFI-Mode-only-write-kernel-cmdline-to-UEFI-binary.patch create mode 100644 backport-docs-fix-dracut.cmdline.7.patch create mode 100644 backport-dracut.sh-FIPS-workaround-for-openssl-libs-on-Fedora.patch create mode 100644 backport-dracut.sh-Move-the-library-workaround-after-squash.patch create mode 100644 backport-dracut.sh-fix-early-microcode-detection-logic.patch create mode 100644 backport-dracut.sh-fix-errors-pointed-out-by-shellcheck.patch create mode 100644 backport-dracut.sh-fix-ia32-detection-for-uefi-executables.patch create mode 100644 backport-fix-40network-consistent-use-of-gw-for-gateway.patch create mode 100644 backport-fix-dmsquash-live-iso-scan-requires-rmdir.patch create mode 100644 backport-fix-dracut-functions.sh-ip-route-parsing.patch create mode 100644 backport-fix-dracut-functions.sh-suppress-findmnt-error-msg-if-etc-fstab-not-exist.patch create mode 100644 backport-fix-dracut-init.sh-add-missing-hostonly-code-in-the-inst_multiple-function.patch create mode 100644 backport-fix-dracut-init.sh-instmods-wrong-variable-name.patch create mode 100644 backport-fix-dracut-install-copy-files-preserving-ownership-a.patch create mode 100644 backport-fix-dracut-install-use-stripped-kernel-module-path-as-hash-key.patch create mode 100644 backport-fix-dracut-replace-invalid-lzo-command-with-lzop-for-LZO-compression.patch create mode 100644 backport-fix-dracut.sh-change-misspelled-variable-name.patch create mode 100644 backport-fix-dracut.sh-do-not-ignore-invalid-config-file-or-dir-path.patch create mode 100644 backport-fix-dracut.sh-remove-wrong-in-loop-sequence.patch create mode 100644 backport-fix-i18n-create-the-keyboard-symlinks-again.patch create mode 100644 backport-fix-i18n-get-rid-of-eval-calls.patch create mode 100644 backport-fix-ifcfg-avoid-calling-unavailable-dracut-logger-functions.patch create mode 100644 backport-fix-iscsi-do-not-exit-in-handle_netroot-if-discovery.patch create mode 100644 backport-fix-multipath-drop-ExecStop-setting-from-service-uni.patch create mode 100644 backport-fix-multipath-stop-multipath-before-udev-db-cleanup.patch create mode 100644 backport-fix-network-avoid-double-brackets-around-IPv6-address.patch create mode 100644 backport-fix-network-don-t-use-same-ifname-multiple-times.patch create mode 100644 backport-fix-network-manager-skip-non-directories-in-sys-class-net.patch create mode 100644 backport-fix-nfs-give-run-rpcbind-ownership-to-rpc-user.patch create mode 100644 backport-fix-resume-correct-call-to-block_is_netdevice-function.patch create mode 100644 backport-fix-shellcheck-for-modules.d-10i18n-module-setup.sh.patch create mode 100644 backport-fix-shutdown-add-timeout-to-umount-calls.patch create mode 100644 backport-fix-skipcpio-edit-skipcpio.c-strstr-memmem.patch create mode 100644 backport-lvm-fix-removal-of-pvscan-from-udev-rules.patch create mode 100644 backport-lvm-remove-unnecessary-initdir-from-lvm_scan.sh.patch create mode 100644 backport-mount-root.sh-fix-writing-fstab-file-with-missing-fs.patch diff --git a/backport-90lvm-do-not-add-newline-to-cmdline.patch b/backport-90lvm-do-not-add-newline-to-cmdline.patch new file mode 100644 index 0000000..5b6b739 --- /dev/null +++ b/backport-90lvm-do-not-add-newline-to-cmdline.patch @@ -0,0 +1,29 @@ +From 01b7163a591c3debec794b5f46b52156a16ee934 Mon Sep 17 00:00:00 2001 +From: Daniel Molkentin +Date: Wed, 5 Aug 2020 19:32:35 +0200 +Subject: [PATCH] 90lvm: do not add newline to cmdline + +Fixes #862 + +Conflict:NA +Reference:https://github.com/dracutdevs/dracut/commit/01b7163a591c3debec794b5f46b52156a16ee934 +--- + modules.d/90lvm/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh +index 52c803f7..1eeba79d 100755 +--- a/modules.d/90lvm/module-setup.sh ++++ b/modules.d/90lvm/module-setup.sh +@@ -36,7 +36,7 @@ cmdline() { + eval $(dmsetup splitname --nameprefixes --noheadings --rows "$dev" 2>/dev/null) + [[ ${DM_VG_NAME} ]] && [[ ${DM_LV_NAME} ]] || return 1 + if ! [[ ${_activated[${DM_VG_NAME}/${DM_LV_NAME}]} ]]; then +- printf " rd.lvm.lv=%s\n" "${DM_VG_NAME}/${DM_LV_NAME} " ++ printf " rd.lvm.lv=%s " "${DM_VG_NAME}/${DM_LV_NAME} " + _activated["${DM_VG_NAME}/${DM_LV_NAME}"]=1 + fi + done +-- +2.23.0 + diff --git a/backport-90multipath-install-kpartx-s-11-dm-parts.rules.patch b/backport-90multipath-install-kpartx-s-11-dm-parts.rules.patch new file mode 100644 index 0000000..e6f87fc --- /dev/null +++ b/backport-90multipath-install-kpartx-s-11-dm-parts.rules.patch @@ -0,0 +1,27 @@ +From 0f89c0dff6b96c9ca09b48a2890399b145f38bdb Mon Sep 17 00:00:00 2001 +From: David Tardon +Date: Fri, 13 Nov 2020 10:45:59 +0100 +Subject: [PATCH] 90multipath: install kpartx's 11-dm-parts.rules + +This makes /dev/disk/by-uuid links point to the right device. +Conflict:NA +Reference:https://github.com/dracutdevs/dracut/commit/0f89c0dff6b96c9ca09b48a2890399b145f38bdb +--- + modules.d/90multipath/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/90multipath/module-setup.sh b/modules.d/90multipath/module-setup.sh +index 2bb7444b..d6627426 100755 +--- a/modules.d/90multipath/module-setup.sh ++++ b/modules.d/90multipath/module-setup.sh +@@ -125,6 +125,6 @@ install() { + inst_rules 40-multipath.rules 56-multipath.rules \ + 62-multipath.rules 65-multipath.rules \ + 66-kpartx.rules 67-kpartx-compat.rules \ +- 11-dm-mpath.rules ++ 11-dm-mpath.rules 11-dm-parts.rules + } + +-- +2.32.0 + diff --git a/backport-91zipl-parse-zipl.sh-honor-SYSTEMD_READY.patch b/backport-91zipl-parse-zipl.sh-honor-SYSTEMD_READY.patch new file mode 100644 index 0000000..9ca12f9 --- /dev/null +++ b/backport-91zipl-parse-zipl.sh-honor-SYSTEMD_READY.patch @@ -0,0 +1,30 @@ +From 46f3156426e1b770e4876a654738e1c3e01851af Mon Sep 17 00:00:00 2001 +From: Martin Wilck +Date: Fri, 26 Jun 2020 18:50:47 +0200 +Subject: [PATCH] 91zipl: parse-zipl.sh: honor SYSTEMD_READY + +The zipl partition should not be mounted if SYSTEMD_READY=0 is set. +Otherwise booting issues with multipath will result. + +Conflict:NA +Reference:https://github.com/dracutdevs/dracut/commit/46f3156426e1b770e4876a654738e1c3e01851af +--- + modules.d/91zipl/parse-zipl.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/91zipl/parse-zipl.sh b/modules.d/91zipl/parse-zipl.sh +index 308f228b..ddab0ea9 100755 +--- a/modules.d/91zipl/parse-zipl.sh ++++ b/modules.d/91zipl/parse-zipl.sh +@@ -31,7 +31,7 @@ if [ -n "$zipl_arg" ] ; then + esac + if [ "$zipl_env" ] ; then + { +- printf 'ACTION=="add|change", SUBSYSTEM=="block", %s=="%s", RUN+="/sbin/initqueue --settled --onetime --unique --name install_zipl_cmdline /sbin/install_zipl_cmdline.sh %s"\n' \ ++ printf 'ACTION=="add|change", SUBSYSTEM=="block", %s=="%s", ENV{SYSTEMD_READY}!="0", RUN+="/sbin/initqueue --settled --onetime --unique --name install_zipl_cmdline /sbin/install_zipl_cmdline.sh %s"\n' \ + ${zipl_env} ${zipl_val} ${zipl_arg} + echo "[ -f /tmp/install.zipl.cmdline-done ]" >$hookdir/initqueue/finished/wait-zipl-conf.sh + } >> /etc/udev/rules.d/99zipl-conf.rules +-- +2.23.0 + diff --git a/backport-95iscsi-fix-ipv6-target-discovery.patch b/backport-95iscsi-fix-ipv6-target-discovery.patch new file mode 100644 index 0000000..52d142b --- /dev/null +++ b/backport-95iscsi-fix-ipv6-target-discovery.patch @@ -0,0 +1,31 @@ +From 3b869230a08088a4f51d5bde8d5cfc8497779815 Mon Sep 17 00:00:00 2001 +From: Thomas Blume +Date: Mon, 6 Jul 2020 15:16:35 +0200 +Subject: [PATCH] 95iscsi: fix ipv6 target discovery + +ipv6 addresses need square brackets, otherwise the iscsi discovery and log-in, +which adds the iscsi port after another colon will get confused and fail. + +Conflict:NA +Reference:https://github.com/dracutdevs/dracut/commit/3b869230a08088a4f51d5bde8d5cfc8497779815 +--- + modules.d/95iscsi/iscsiroot.sh | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh +index cc2ed2cc..ac43b487 100755 +--- a/modules.d/95iscsi/iscsiroot.sh ++++ b/modules.d/95iscsi/iscsiroot.sh +@@ -213,6 +213,9 @@ handle_netroot() + echo "iscsi_lun=$iscsi_lun . /bin/mount-lun.sh " > $hookdir/mount/01-$$-iscsi.sh + fi + ++ if strglobin $iscsi_target_ip '*:*:*' && ! strglobin $iscsi_target_ip '['; then ++ iscsi_target_ip="[$iscsi_target_ip]" ++ fi + targets=$(iscsiadm -m discovery -t st -p $iscsi_target_ip:${iscsi_target_port:+$iscsi_target_port} | sed 's/^.*iqn/iqn/') + [ -z "$targets" ] && echo "Target discovery to $iscsi_target_ip:${iscsi_target_port:+$iscsi_target_port} failed with status $?" && exit 1 + +-- +2.23.0 + diff --git a/backport-95iscsi-fix-missing-space-when-compiling-cmdline-arg.patch b/backport-95iscsi-fix-missing-space-when-compiling-cmdline-arg.patch new file mode 100644 index 0000000..9eabb28 --- /dev/null +++ b/backport-95iscsi-fix-missing-space-when-compiling-cmdline-arg.patch @@ -0,0 +1,29 @@ +From 55b0d2edafdd18c2e85f47063f0ac81652f86956 Mon Sep 17 00:00:00 2001 +From: Daniel Molkentin +Date: Wed, 10 Jun 2020 22:36:56 +0200 +Subject: [PATCH] 95iscsi: fix missing space when compiling cmdline args + +Conflict:NA +Reference:https://github.com/dracutdevs/dracut/commit/55b0d2edafdd18c2e85f47063f0ac81652f86956 + +Reference: bsc#1172816 +--- + modules.d/95iscsi/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh +index 19a8bdbd..8b6300d5 100755 +--- a/modules.d/95iscsi/module-setup.sh ++++ b/modules.d/95iscsi/module-setup.sh +@@ -65,7 +65,7 @@ install_ibft() { + if [ ${d##*/} = "ibft" ] && [ "$ibft_mod" != "bnx2i" ] ; then + echo -n "rd.iscsi.ibft=1 " + fi +- echo -n "rd.iscsi.firmware=1" ++ echo -n "rd.iscsi.firmware=1 " + fi + done + } +-- +2.23.0 + diff --git a/backport-95iscsi-use-ip_params_for_remote_addr.patch b/backport-95iscsi-use-ip_params_for_remote_addr.patch new file mode 100644 index 0000000..f93ef2a --- /dev/null +++ b/backport-95iscsi-use-ip_params_for_remote_addr.patch @@ -0,0 +1,49 @@ +From 6dbae7e77238dd44bedb0ca2478f985f451c05bf Mon Sep 17 00:00:00 2001 +From: Martin Wilck +Date: Fri, 10 Jul 2020 18:09:05 +0200 +Subject: [PATCH] 95iscsi: use ip_params_for_remote_addr() + +Use the new helper function. + +Conflict:NA +Reference:https://github.com/dracutdevs/dracut/commit/6dbae7e77238dd44bedb0ca2478f985f451c05bf +--- + modules.d/95iscsi/module-setup.sh | 22 +--------------------- + 1 file changed, 1 insertion(+), 21 deletions(-) + +diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh +index 8b6300d5..dfacd797 100755 +--- a/modules.d/95iscsi/module-setup.sh ++++ b/modules.d/95iscsi/module-setup.sh +@@ -120,27 +120,7 @@ install_iscsiroot() { + done + + [ -z "$iscsi_address" ] && return +- local_address=$(ip -o route get to $iscsi_address | sed -n 's/.*src \([0-9a-f.:]*\).*/\1/p') +- ifname=$(ip -o route get to $iscsi_address | sed -n 's/.*dev \([^ ]*\).*/\1/p') +- +- # follow ifcfg settings for boot protocol +- for _path in \ +- "/etc/sysconfig/network-scripts/ifcfg-$ifname" \ +- "/etc/sysconfig/network/ifcfg-$ifname" \ +- ; do +- [ -f "$_path" ] && bootproto=$(sed -n "s/BOOTPROTO='\?\([[:alpha:]]*6\?\)4\?/\1/p" "$_path") +- done +- +- if [ $bootproto ]; then +- printf 'ip=%s:%s ' ${ifname} ${bootproto} +- else +- printf 'ip=%s:static ' ${ifname} +- fi +- +- if [ -e /sys/class/net/$ifname/address ] ; then +- ifmac=$(cat /sys/class/net/$ifname/address) +- printf 'ifname=%s:%s ' ${ifname} ${ifmac} +- fi ++ ip_params_for_remote_addr "$iscsi_address" + + if [ -n "$iscsi_address" -a -n "$iscsi_targetname" ] ; then + if [ -n "$iscsi_port" -a "$iscsi_port" -eq 3260 ] ; then +-- +2.23.0 + diff --git a/backport-95nfs-use-ip_params_for_remote_addr.patch b/backport-95nfs-use-ip_params_for_remote_addr.patch new file mode 100644 index 0000000..9fda753 --- /dev/null +++ b/backport-95nfs-use-ip_params_for_remote_addr.patch @@ -0,0 +1,52 @@ +From 880d155967bb54f61e5960347aa8bbab6da8f86d Mon Sep 17 00:00:00 2001 +From: Martin Wilck +Date: Sat, 11 Jul 2020 00:19:09 +0200 +Subject: [PATCH] 95nfs: use ip_params_for_remote_addr() + +Use the new helper function. + +Conflict:NA +Reference:https://github.com/dracutdevs/dracut/commit/880d155967bb54f61e5960347aa8bbab6da8f86d +--- + modules.d/95nfs/module-setup.sh | 17 ++--------------- + 1 file changed, 2 insertions(+), 15 deletions(-) + +diff --git a/modules.d/95nfs/module-setup.sh b/modules.d/95nfs/module-setup.sh +index d9a91fdf..4a8e140b 100755 +--- a/modules.d/95nfs/module-setup.sh ++++ b/modules.d/95nfs/module-setup.sh +@@ -47,7 +47,6 @@ cmdline() { + local nfs_root + local nfs_address + local lookup +- local ifname + + ### nfsroot= ### + nfs_device=$(findmnt -t nfs4 -n -o SOURCE /) +@@ -69,21 +68,9 @@ cmdline() { + lookup=$(host "${nfs_device%%:*}"| grep " address " | head -n1) + nfs_address=${lookup##* } + fi +- ifname=$(ip -o route get to $nfs_address | sed -n 's/.*dev \([^ ]*\).*/\1/p') +- if [ -d /sys/class/net/$ifname/bonding ]; then +- dinfo "Found bonded interface '${ifname}'. Make sure to provide an appropriate 'bond=' cmdline." +- return +- elif [ -e /sys/class/net/$ifname/address ] ; then +- ifmac=$(cat /sys/class/net/$ifname/address) +- printf 'ifname=%s:%s ' ${ifname} ${ifmac} +- fi + +- bootproto=$(sed -n "/BOOTPROTO/s/BOOTPROTO='\([[:alpha:]]*6\?\)4\?'/\1/p" /etc/sysconfig/network/ifcfg-$ifname) +- if [ $bootproto ]; then +- printf 'ip=%s:%s ' ${ifname} ${bootproto} +- else +- printf 'ip=%s:static ' ${ifname} +- fi ++ [[ $nfs_address ]] || return ++ ip_params_for_remote_addr "$nfs_address" + } + + # called by dracut +-- +2.23.0 + diff --git a/backport-Allow-DRACUT_INSTALL-to-be-not-an-absolute-path.patch b/backport-Allow-DRACUT_INSTALL-to-be-not-an-absolute-path.patch new file mode 100644 index 0000000..851e402 --- /dev/null +++ b/backport-Allow-DRACUT_INSTALL-to-be-not-an-absolute-path.patch @@ -0,0 +1,61 @@ +From f84ad9e062519c43264f1a512227621b3bf1853b Mon Sep 17 00:00:00 2001 +From: Mikhail Novosyolov +Date: Fri, 27 Mar 2020 16:16:07 +0300 +Subject: [PATCH] Allow $DRACUT_INSTALL to be not an absolute path + +/usr/sbin/dracut-install is a symlink: +$ file /usr/sbin/dracut-install +/usr/sbin/dracut-install: symbolic link to ../lib/dracut/dracut-install + +It resulted to "dracut-install not found" error: + ++++ for p in $DRACUT_PATH ++++ [[ -L /sbin/dracut-install ]] ++++ [[ -x /sbin/dracut-install ]] ++++ for p in $DRACUT_PATH ++++ [[ -L /bin/dracut-install ]] ++++ [[ -x /bin/dracut-install ]] ++++ for p in $DRACUT_PATH ++++ [[ -L /usr/sbin/dracut-install ]] ++++ printf '%s\n' dracut-install ++++ return 0 +++ DRACUT_INSTALL=dracut-install +++ [[ -n dracut-install ]] +++ [[ -n dracut-install ]] +++ DRINSTALLPARTS=0 +++ for i in $DRACUT_INSTALL +++ DRINSTALLPARTS=1 +++ [[ 1 = 1 ]] +++ [[ -x dracut-install ]] +++ dfatal 'dracut-install not found!' +++ set +x +dracut: dracut-install not found! + +[ -x ] is not correct and will always be false. +But actually it is available. Let's just allow it to be not an absolute path. +Maybe some other places can be improved to avoid DRACUT_INSTALL being not an absolute path. + +Conflict:NA +Reference:https://github.com/dracutdevs/dracut/commit/f84ad9e062519c43264f1a512227621b3bf1853b + +Signed-off-by: Mikhail Novosyolov +--- + dracut-init.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dracut-init.sh b/dracut-init.sh +index a8348b79..837267aa 100644 +--- a/dracut-init.sh ++++ b/dracut-init.sh +@@ -183,7 +183,7 @@ for i in $DRACUT_INSTALL ; do + DRINSTALLPARTS=$(($DRINSTALLPARTS+1)) + done + +-if [[ $DRINSTALLPARTS = 1 ]] && ! [[ -x $DRACUT_INSTALL ]]; then ++if [[ $DRINSTALLPARTS = 1 ]] && ! command -v "$DRACUT_INSTALL" > /dev/null 2>&1 ; then + dfatal "dracut-install not found!" + exit 10 + fi +-- +2.23.0 + diff --git a/backport-Change-the-order-of-NFS-servers-during-the-boot.patch b/backport-Change-the-order-of-NFS-servers-during-the-boot.patch new file mode 100644 index 0000000..25c4a89 --- /dev/null +++ b/backport-Change-the-order-of-NFS-servers-during-the-boot.patch @@ -0,0 +1,30 @@ +From 09a691af3b63543fe58faa02661f785b907a78a6 Mon Sep 17 00:00:00 2001 +From: Denis Volkov +Date: Tue, 4 Aug 2020 19:51:27 +0500 +Subject: [PATCH] Change the order of NFS servers during the boot NFS server + provided by DHCP in next-server option has higher priority than DHCP-server + itself + +Conflict:NA +Reference:https://github.com/dracutdevs/dracut/commit/09a691af3b63543fe58faa02661f785b907a78a6 +--- + modules.d/95nfs/nfs-lib.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/95nfs/nfs-lib.sh b/modules.d/95nfs/nfs-lib.sh +index 1ba4f5ff..95844f58 100755 +--- a/modules.d/95nfs/nfs-lib.sh ++++ b/modules.d/95nfs/nfs-lib.sh +@@ -112,8 +112,8 @@ nfsroot_from_dhcp() { + [ -n "$new_root_path" ] && nfsroot_to_var "$nfs:$new_root_path" + [ -z "$path" ] && [ "$(getarg root=)" = "/dev/nfs" ] && path=/tftpboot/%s + [ -z "$server" ] && server=$srv +- [ -z "$server" ] && server=$new_dhcp_server_identifier + [ -z "$server" ] && server=$new_next_server ++ [ -z "$server" ] && server=$new_dhcp_server_identifier + [ -z "$server" ] && server=${new_root_path%%:*} + } + +-- +2.23.0 + diff --git a/backport-Do-not-start-inside-container.patch b/backport-Do-not-start-inside-container.patch new file mode 100644 index 0000000..118212a --- /dev/null +++ b/backport-Do-not-start-inside-container.patch @@ -0,0 +1,29 @@ +From b7a7735c1d83ade0e748d336c8ab1a569f431107 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tomasz=20Pawe=C5=82=20Gajc?= +Date: Wed, 26 Aug 2020 11:19:24 +0200 +Subject: [PATCH] Do not start inside container + +Host should take care of good entropy pool +#791 + +Conflict:NA +Reference:https://github.com/dracutdevs/dracut/commit/b7a7735c1d83ade0e748d336c8ab1a569f431107 +--- + modules.d/06rngd/rngd.service | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/modules.d/06rngd/rngd.service b/modules.d/06rngd/rngd.service +index 570fbedb..dd5374d7 100644 +--- a/modules.d/06rngd/rngd.service ++++ b/modules.d/06rngd/rngd.service +@@ -2,6 +2,7 @@ + Description=Hardware RNG Entropy Gatherer Daemon + DefaultDependencies=no + Before=systemd-udevd.service ++ConditionVirtualization=!container + + [Service] + ExecStart=/usr/sbin/rngd -f +-- +2.23.0 + diff --git a/backport-Fix-bad-ls-parsing.patch b/backport-Fix-bad-ls-parsing.patch new file mode 100644 index 0000000..dbcd0eb --- /dev/null +++ b/backport-Fix-bad-ls-parsing.patch @@ -0,0 +1,33 @@ +From c409108b0489e7d70f5f6a830d874a9384d4f8d2 Mon Sep 17 00:00:00 2001 +From: foopub <45460217+foopub@users.noreply.github.com> +Date: Wed, 3 Feb 2021 17:41:08 +0000 +Subject: [PATCH] Fix bad ls parsing + +This used to cause some echo write/invalid argument errors. Simplest fix is to use readlink with -f for absolute path and -n to remove trailing newline. +See previous discussion here: +https://github.com/void-linux/void-packages/issues/13024 + +Conflict:NA +Reference:https://github.com/dracutdevs/dracut/commit/c409108b0489e7d70f5f6a830d874a9384d4f8d2 +--- + modules.d/95resume/resume.sh | 6 +----- + 1 file changed, 1 insertion(+), 5 deletions(-) + +diff --git a/modules.d/95resume/resume.sh b/modules.d/95resume/resume.sh +index 8d366755..e7becd0a 100755 +--- a/modules.d/95resume/resume.sh ++++ b/modules.d/95resume/resume.sh +@@ -14,9 +14,5 @@ PATH=/usr/sbin:/usr/bin:/sbin:/bin + esac + [ -x "$(command -v resume)" ] && command resume $a_splash "$resume" + +- # parsing the output of ls is Bad, but until there is a better way... +- ls -lH "$resume" | ( +- read x x x x maj min x; +- echo "${maj%,}:$min"> /sys/power/resume) +- >/.resume ++ (readlink -fn $resume > /sys/power/resume)>/.resume + } +-- +2.19.1 + diff --git a/backport-UEFI-Mode-only-write-kernel-cmdline-to-UEFI-binary.patch b/backport-UEFI-Mode-only-write-kernel-cmdline-to-UEFI-binary.patch new file mode 100644 index 0000000..bbbce0d --- /dev/null +++ b/backport-UEFI-Mode-only-write-kernel-cmdline-to-UEFI-binary.patch @@ -0,0 +1,36 @@ +From fea53784adf3748a9f31964272a69b31c152d8cf Mon Sep 17 00:00:00 2001 +From: mwberry +Date: Sat, 30 May 2020 17:55:35 -0700 +Subject: [PATCH] UEFI Mode: only write kernel cmdline to UEFI binary + +The kernel command line was being written both into +/etc/cmdline.d/01-default.conf and the UEFI executable. +During boot, getcmdline would concatenate these two +resulting in all arguments being duplicated. Some +args, such as ip=, are sensitive to the number of +times they are specified. + +Conflict:NA +Reference:https://github.com/dracutdevs/dracut/commit/fea53784adf3748a9f31964272a69b31c152d8cf +--- + dracut.sh | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/dracut.sh b/dracut.sh +index 12f75670..c439fa02 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1620,7 +1620,9 @@ if [[ $kernel_only != yes ]]; then + (( ${#install_items[@]} > 0 )) && inst_multiple ${install_items[@]} + (( ${#install_optional_items[@]} > 0 )) && inst_multiple -o ${install_optional_items[@]} + +- [[ $kernel_cmdline ]] && printf "%s\n" "$kernel_cmdline" >> "${initdir}/etc/cmdline.d/01-default.conf" ++ if [[ $kernel_cmdline ]] && [[ $uefi != yes ]]; then ++ printf "%s\n" "$kernel_cmdline" >> "${initdir}/etc/cmdline.d/01-default.conf" ++ fi + + for line in "${fstab_lines[@]}"; do + line=($line) +-- +2.23.0 + diff --git a/backport-docs-fix-dracut.cmdline.7.patch b/backport-docs-fix-dracut.cmdline.7.patch new file mode 100644 index 0000000..581ef2f --- /dev/null +++ b/backport-docs-fix-dracut.cmdline.7.patch @@ -0,0 +1,40 @@ +From 67bcc4930430a1845c4f53d2afacf701fc6467a1 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 11 Feb 2021 09:01:54 +0100 +Subject: [PATCH] docs: fix dracut.cmdline.7 + +``` +asciidoc: WARNING: dracut.cmdline.7.asc: line 1115: nested inline passthrough +``` + +Conflict:Delete the second paragraph +Reference:https://github.com/dracutdevs/dracut/commit/67bcc4930430a1845c4f53d2afacf701fc6467a1 +--- + dracut.cmdline.7.asc | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc +index 4e598b6b..b4cbbbcd 100644 +--- a/dracut.cmdline.7.asc ++++ b/dracut.cmdline.7.asc +@@ -176,7 +176,7 @@ Misc + [[dracutkerneldebug]] + Debug + ~~~~~ +-If you are dropped to an emergency shell, the file ++If you are dropped to an emergency shell, the file + _/run/initramfs/rdsosreport.txt_ is created, which can be saved to a (to be + mounted by hand) partition (usually /boot) or a USB stick. Additional debugging + info can be produced by adding **rd.debug** to the kernel command line. +@@ -1109,7 +1109,7 @@ used to persist the changes made to the device specified by the + **root=live:____** option. + + + The default _pathspec_, when _auto_ or no _:_ is given, is +-`/<+++rd.live.dir+++>/overlay-