import dracut-049-135.git20210121.el8

This commit is contained in:
CentOS Sources 2021-05-18 02:39:03 -04:00 committed by Andrew Lukoshko
parent 98aa954bb2
commit 2080f69af9
34 changed files with 1842 additions and 7 deletions

View File

@ -22,3 +22,4 @@ index 1387433a..9a0f476c 100755
for i in \
dracut-cmdline.service \
dracut-cmdline-ask.service \

26
SOURCES/0103.patch Normal file
View File

@ -0,0 +1,26 @@
From b0e5702c64f83449d62e83d70d0bb806c6abdc9a Mon Sep 17 00:00:00 2001
From: David Tardon <dtardon@redhat.com>
Date: Tue, 4 Aug 2020 14:16:19 +0200
Subject: [PATCH] match the whole string
(cherry picked from commit ae83919a7a07b5c90cae8ce8b1349efc212a7aee)
Resolves: #1552619
---
modules.d/95zfcp/parse-zfcp.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules.d/95zfcp/parse-zfcp.sh b/modules.d/95zfcp/parse-zfcp.sh
index 6e1514fd..fb4d9c9e 100755
--- a/modules.d/95zfcp/parse-zfcp.sh
+++ b/modules.d/95zfcp/parse-zfcp.sh
@@ -3,7 +3,7 @@
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
+ 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=","

29
SOURCES/0104.patch Normal file
View File

@ -0,0 +1,29 @@
From b76aac712f822e75951b10f516c99c573b89e4fe Mon Sep 17 00:00:00 2001
From: David Tardon <dtardon@redhat.com>
Date: Tue, 4 Aug 2020 14:18:54 +0200
Subject: [PATCH] match simplified rd.zfcp format too
The simplified format was introduced by commit
c8aa1d949aecaf146b0a0e1ce269f69e6048dc5a .
(cherry picked from commit d9e27b091717a1ce1c58cc911d9d7b5ec3ed901e)
Resolves: #1552619
---
modules.d/95zfcp/parse-zfcp.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules.d/95zfcp/parse-zfcp.sh b/modules.d/95zfcp/parse-zfcp.sh
index fb4d9c9e..5aa6add8 100755
--- a/modules.d/95zfcp/parse-zfcp.sh
+++ b/modules.d/95zfcp/parse-zfcp.sh
@@ -3,7 +3,7 @@
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
+ 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=","

25
SOURCES/0105.patch Normal file
View File

@ -0,0 +1,25 @@
From 27921953a7508209deece59d74e5a957a247278d Mon Sep 17 00:00:00 2001
From: Lukas Nykryn <lnykryn@redhat.com>
Date: Fri, 20 Nov 2020 10:33:56 +0100
Subject: [PATCH] base: hardcode rhel red
RHEL-only
Resolves: #1650258
---
modules.d/99base/module-setup.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules.d/99base/module-setup.sh b/modules.d/99base/module-setup.sh
index 3578643c..d10aa6a2 100755
--- a/modules.d/99base/module-setup.sh
+++ b/modules.d/99base/module-setup.sh
@@ -74,7 +74,7 @@ install() {
VERSION+="dracut-$DRACUT_VERSION"
PRETTY_NAME+="dracut-$DRACUT_VERSION (Initramfs)"
VERSION_ID=$DRACUT_VERSION
- ANSI_COLOR="0;34"
+ ANSI_COLOR="0;31"
[ -e "${initdir}/usr/lib" ] || mkdir -m 0755 -p ${initdir}/usr/lib
{

30
SOURCES/0106.patch Normal file
View File

@ -0,0 +1,30 @@
From dc6438116746147e55c624a58116cc7f9f254c8a Mon Sep 17 00:00:00 2001
From: Lukas Nykryn <lnykryn@redhat.com>
Date: Thu, 7 Feb 2019 16:09:43 +0100
Subject: [PATCH] 95iscsi:
/sys/devices/platform/*/flashnode_sess-*/is_boot_target sometimes does not
exist
cat: '/sys/devices/platform/host2/flashnode_sess-*/is_boot_target': No such file or directory
/usr/lib/dracut/modules.d/95iscsi/module-setup.sh: line 90: [: -eq: unary operator expected
(cherry picked from commit 94eccd15c533f9e10cb0ccdec7e8a42c29bbc8d0)
Resolves: #1552619
---
modules.d/95iscsi/module-setup.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh
index 47a92e94..dc63ef46 100755
--- a/modules.d/95iscsi/module-setup.sh
+++ b/modules.d/95iscsi/module-setup.sh
@@ -86,6 +86,7 @@ install_iscsiroot() {
iscsi_host=${host##*/}
for flash in ${host}/flashnode_sess-* ; do
+ [ ! -e "$flash/is_boot_target" ] && continue
is_boot=$(cat $flash/is_boot_target)
if [ $is_boot -eq 1 ] ; then
# qla4xxx flashnode session; skip iBFT discovery

32
SOURCES/0107.patch Normal file
View File

@ -0,0 +1,32 @@
From ba1a065c528bd5774c61a3c286e9a7ed7cc467e8 Mon Sep 17 00:00:00 2001
From: Martin Wilck <mwilck@suse.de>
Date: Thu, 21 Mar 2019 14:40:33 +0100
Subject: [PATCH] iscsi: fix error messages with iSCSI root
Fixes these error messages during intird build:
cat: '/sys/devices/platform/host2/flashnode_sess-*/is_boot_target': No such file or directory
/usr/lib/dracut/modules.d/95iscsi/module-setup.sh: line 91: [: -eq: unary operator expected
cat: '/sys/devices/platform/host3/flashnode_sess-*/is_boot_target': No such file or directory
/usr/lib/dracut/modules.d/95iscsi/module-setup.sh: line 91: [: -eq: unary operator expected
(cherry picked from commit 78efd6988ec6b39ea80ba8e432d7df1abe1c081f)
Resolves: #1552619
---
modules.d/95iscsi/module-setup.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh
index dc63ef46..618d1dc2 100755
--- a/modules.d/95iscsi/module-setup.sh
+++ b/modules.d/95iscsi/module-setup.sh
@@ -86,6 +86,7 @@ install_iscsiroot() {
iscsi_host=${host##*/}
for flash in ${host}/flashnode_sess-* ; do
+ [ -f "$flash" ] || continue
[ ! -e "$flash/is_boot_target" ] && continue
is_boot=$(cat $flash/is_boot_target)
if [ $is_boot -eq 1 ] ; then

225
SOURCES/0108.patch Normal file
View File

@ -0,0 +1,225 @@
From 0954a69e884e99af5082f93e2de30fa8dfdba83e Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.com>
Date: Mon, 25 Nov 2019 11:33:42 +0100
Subject: [PATCH] 95nvmf: add module for NVMe-oF
Add a module for booting from NVMe-oF devices.
Signed-off-by: Hannes Reinecke <hare@suse.de>
(cherry picked from commit 2f03d69f9dfdc0c905c4d9cb69ee93a5256123cb)
Resolves: #1731601
---
dracut.spec | 1 +
modules.d/95nvmf/module-setup.sh | 88 +++++++++++++++++++++++
modules.d/95nvmf/parse-nvmf-boot-connections.sh | 95 +++++++++++++++++++++++++
3 files changed, 184 insertions(+)
diff --git a/dracut.spec b/dracut.spec
index a8076c18..3db5c0cf 100644
--- a/dracut.spec
+++ b/dracut.spec
@@ -370,6 +370,7 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne
%{dracutlibdir}/modules.d/95debug
%{dracutlibdir}/modules.d/95fstab-sys
%{dracutlibdir}/modules.d/95lunmask
+%{dracutlibdir}/modules.d/95nvmf
%{dracutlibdir}/modules.d/95resume
%{dracutlibdir}/modules.d/95rootfs-block
%{dracutlibdir}/modules.d/95terminfo
diff --git a/modules.d/95nvmf/module-setup.sh b/modules.d/95nvmf/module-setup.sh
new file mode 100755
index 00000000..db43ec01
--- /dev/null
+++ b/modules.d/95nvmf/module-setup.sh
@@ -0,0 +1,88 @@
+#!/bin/bash
+
+# called by dracut
+check() {
+ require_binaries nvme || return 1
+ [ -f /etc/nvme/hostnqn ] || return 255
+ [ -f /etc/nvme/hostid ] || return 255
+
+ is_nvme_fc() {
+ local _dev=$1
+ local traddr
+
+ [[ -L "/sys/dev/block/$_dev" ]] || return 0
+ cd -P "/sys/dev/block/$_dev" || return 0
+ if [ -f partition ] ; then
+ cd ..
+ fi
+ for d in device/nvme* ; do
+ [ -L "$d" ] || continue
+ if readlink "$d" | grep -q nvme-fabrics ; then
+ traddr=$(cat "$d"/address)
+ break
+ fi
+ done
+ [[ "${traddr#traddr=nn-}" != "$traddr" ]]
+ }
+
+ [[ $hostonly ]] || [[ $mount_needs ]] && {
+ pushd . >/dev/null
+ for_each_host_dev_and_slaves is_nvme_fc
+ local _is_nvme_fc=$?
+ popd >/dev/null
+ [[ $_is_nvme_fc == 0 ]] || return 255
+ if [ ! -f /sys/class/fc/fc_udev_device/nvme_discovery ] ; then
+ if [ ! -f /etc/nvme/discovery.conf ] ; then
+ echo "No discovery arguments present"
+ return 255
+ fi
+ fi
+ }
+ return 0
+}
+
+# called by dracut
+depends() {
+ echo bash rootfs-block
+ return 0
+}
+
+# called by dracut
+installkernel() {
+ instmods nvme_fc lpfc qla2xxx
+}
+
+# called by dracut
+cmdline() {
+ local _hostnqn
+ local _hostid
+ if [ -f /etc/nvme/hostnqn ] ; then
+ _hostnqn=$(cat /etc/nvme/hostnqn)
+ echo -n " nvmf.hostnqn=${_hostnqn}"
+ fi
+ if [ -f /etc/nvme/hostid ] ; then
+ _hostid=$(cat /etc/nvme/hostid)
+ echo -n " nvmf.hostid=${_hostid}"
+ fi
+ echo ""
+}
+
+# called by dracut
+install() {
+ if [[ $hostonly_cmdline == "yes" ]]; then
+ local _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_multiple nvme
+ inst_multiple -o \
+ "$systemdsystemunitdir/nvm*-connect@.service" \
+ "$systemdsystemunitdir/nvm*-connect.target"
+ inst_hook cmdline 99 "$moddir/parse-nvmf-boot-connections.sh"
+ inst_simple "/etc/nvme/discovery.conf"
+ inst_rules /usr/lib/udev/rules.d/70-nvm*-autoconnect.rules
+ inst_rules /usr/lib/udev/rules.d/71-nvmf-iopolicy-netapp.rules
+ dracut_need_initqueue
+}
diff --git a/modules.d/95nvmf/parse-nvmf-boot-connections.sh b/modules.d/95nvmf/parse-nvmf-boot-connections.sh
new file mode 100755
index 00000000..0d16b871
--- /dev/null
+++ b/modules.d/95nvmf/parse-nvmf-boot-connections.sh
@@ -0,0 +1,95 @@
+#!/bin/sh
+#
+# Supported formats:
+# nvmf.hostnqn=<hostnqn>
+# nvmf.hostid=<hostid>
+# nvmf.discover=<transport>:<traddr>:<host-traddr>:<trsvcid>
+#
+# Examples:
+# nvmf.hostnqn=nqn.2014-08.org.nvmexpress:uuid:37303738-3034-584d-5137-333230423843
+# nvmf.discover=rdma:192.168.1.3::4420
+# nvmf.discover=fc:auto
+#
+# Note: FC does autodiscovery, so typically there is no need to
+# specify any discover parameters for FC.
+#
+
+parse_nvmf_discover() {
+ OLDIFS="$IFS"
+ IFS=:
+ trtype="none"
+ traddr="none"
+ hosttraddr="none"
+ trsvcid=4420
+
+ set $1
+ IFS="$OLDIFS"
+
+ case $# in
+ 2)
+ trtype=$1
+ traddr=$2
+ ;;
+ 3)
+ trtype=$1
+ traddr=$2
+ hosttraddr=$3
+ ;;
+ 4)
+ trtype=$1
+ traddr=$2
+ hosttraddr=$3
+ trsvcid=$4
+ ;;
+ *)
+ warn "Invalid arguments for nvmf.discover=$1"
+ return 1
+ ;;
+ esac
+ if [ -z "$traddr" ] ; then
+ warn "traddr is mandatory for $trtype"
+ return 1;
+ fi
+ [ -z "$hosttraddr" ] && hosttraddr="none"
+ [ -z "$trsvcid" ] && trsvcid="none"
+ if [ "$trtype" = "fc" ] ; then
+ if [ -z "$hosttraddr" ] ; then
+ warn "host traddr is mandatory for fc"
+ return 1
+ fi
+ elif [ "$trtype" != "rdma" ] && [ "$trtype" != "tcp" ] ; then
+ warn "unsupported transport $trtype"
+ return 1
+ elif [ -z "$trsvcid" ] ; then
+ trsvcid=4420
+ fi
+ echo "--transport=$trtype --traddr=$traddr --host-traddr=$hosttraddr --trsvcid=$trsvcid" >> /etc/nvme/discovery.conf
+}
+
+if ! getargbool 0 rd.nonvmf ; then
+ info "rd.nonvmf=0: skipping nvmf"
+ return 0
+fi
+
+nvmf_hostnqn=$(getarg nvmf.hostnqn=)
+if [ -n "$nvmf_hostnqn" ] ; then
+ echo "$nvmf_hostnqn" > /etc/nvme/hostnqn
+fi
+nvmf_hostid=$(getarg nvmf.hostid=)
+if [ -n "$nvmf_hostid" ] ; then
+ echo "$nvmf_hostid" > /etc/nvme/hostid
+fi
+
+for d in $(getargs nvmf.discover=); do
+ parse_nvmf_discover "$d"
+done
+
+# Host NQN and host id are mandatory for NVMe-oF
+[ -f "/etc/nvme/hostnqn" ] || exit 0
+[ -f "/etc/nvme/hostid" ] || exit 0
+
+if [ -f "/etc/nvme/discovery.conf" ] ; then
+ /sbin/initqueue --onetime --unique --name nvme-discover /usr/sbin/nvme connect-all
+else
+ /sbin/initqueue --finished --unique --name nvme-fc-autoconnect echo 1 > /sys/class/fc/fc_udev_device/nvme_discovery
+fi

26
SOURCES/0109.patch Normal file
View File

@ -0,0 +1,26 @@
From 605b45361ff9336bb9ac2526b5f7d50e7e33e99f Mon Sep 17 00:00:00 2001
From: Jan Macku <jamacku@redhat.com>
Date: Fri, 1 Nov 2019 14:58:56 +0100
Subject: [PATCH] Write dns values passed by ip argument to ifcfg-* files
(cherry picked from commit cb86c560b0da465e06c18df12308cb3f30fa4803)
Resolves: #1767100
---
modules.d/45ifcfg/write-ifcfg.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh
index 3bf847a5..abd111fc 100755
--- a/modules.d/45ifcfg/write-ifcfg.sh
+++ b/modules.d/45ifcfg/write-ifcfg.sh
@@ -270,7 +270,7 @@ for netup in /tmp/net.*.did-setup ; do
done
fi
i=1
- for ns in $(getargs nameserver); do
+ for ns in $(getargs nameserver) $dns1 $dns2; do
echo "DNS${i}=\"${ns}\"" >> /tmp/ifcfg/ifcfg-$netif
i=$((i+1))
done

39
SOURCES/0110.patch Normal file
View File

@ -0,0 +1,39 @@
From 96c6e40774a78f2509aab1260d0f6aaa3b413597 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Renaud=20M=C3=A9trich?= <rmetrich@redhat.com>
Date: Thu, 13 Feb 2020 11:37:13 +0100
Subject: [PATCH] dracut.sh: added help for --regenerate-all
(cherry picked from commit cdc9cd0e41615d5f5f5af7887991a311cf5c4c7a)
Resolves: #1802522
---
dracut.sh | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/dracut.sh b/dracut.sh
index 86e95449..e70dab16 100755
--- a/dracut.sh
+++ b/dracut.sh
@@ -182,8 +182,8 @@ Creates initial ramdisk images for preloading modules
--mount "[DEV] [MP] [FSTYPE] [FSOPTS]"
Mount device [DEV] on mountpoint [MP] with filesystem
[FSTYPE] and options [FSOPTS] in the initramfs
- --mount "[MP]" Same as above, but [DEV], [FSTYPE] and [FSOPTS] are
- determined by looking at the current mounts.
+ --mount "[MP]" Same as above, but [DEV], [FSTYPE] and [FSOPTS] are
+ determined by looking at the current mounts.
--add-device "[DEV]" Bring up [DEV] in initramfs
-i, --include [SOURCE] [TARGET]
Include the files in the SOURCE directory into the
@@ -234,7 +234,9 @@ Creates initial ramdisk images for preloading modules
--uefi Create an UEFI executable with the kernel cmdline and
kernel combined
--uefi-stub [FILE] Use the UEFI stub [FILE] to create an UEFI executable
- --kernel-image [FILE] location of the kernel image
+ --kernel-image [FILE] Location of the kernel image
+ --regenerate-all Regenerate all initramfs images at the default location
+ for the kernel versions found on the system
If [LIST] has multiple arguments, then you have to put these in quotes.

39
SOURCES/0111.patch Normal file
View File

@ -0,0 +1,39 @@
From 8658cfd92b50197dd4f4d3b6d136950fe007ffc0 Mon Sep 17 00:00:00 2001
From: Frank Deng <frank.deng@oracle.com>
Date: Sat, 15 Jun 2019 13:35:42 -0700
Subject: [PATCH] 35network-legacy: fix classless static route parsing
(cherry picked from commit 11e1f680656177cfbba4e06f08b6707f4a812bc0)
Resolves: #1811042
---
modules.d/35network-legacy/dhclient-script.sh | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/modules.d/35network-legacy/dhclient-script.sh b/modules.d/35network-legacy/dhclient-script.sh
index f1a60005..44633b30 100755
--- a/modules.d/35network-legacy/dhclient-script.sh
+++ b/modules.d/35network-legacy/dhclient-script.sh
@@ -126,9 +126,11 @@ parse_option_121() {
elif [ $mask -gt 8 ]; then
destination="$1.$2.0.0/$mask"
shift; shift
- else
+ elif [ $mask -gt 0 ]; then
destination="$1.0.0.0/$mask"
shift
+ else
+ destination="0.0.0.0/$mask"
fi
# Read the gateway
@@ -138,7 +140,7 @@ parse_option_121() {
# Multicast routing on Linux
# - If you set a next-hop address for a multicast group, this breaks with Cisco switches
# - If you simply leave it link-local and attach it to an interface, it works fine.
- if [ $multicast -eq 1 ]; then
+ if [ $multicast -eq 1 -o "$gateway" = "0.0.0.0" ]; then
temp_result="$destination dev $interface"
else
temp_result="$destination via $gateway dev $interface"

34
SOURCES/0112.patch Normal file
View File

@ -0,0 +1,34 @@
From 33f3c41793b8c22ae4c7158f7480b38d4eed3a73 Mon Sep 17 00:00:00 2001
From: Lukas Nykryn <lnykryn@redhat.com>
Date: Tue, 10 Mar 2020 15:18:37 +0100
Subject: [PATCH] network: fix glob matching ipv6 addresses
In this case we want to cover three cases
1) ip_address:ip_address
2) number:macaddress
3) :macaddress
We consider something an IPv6 address if it starts with number and
contains ":", but IPv6 addresses are in hexa.
(cherry picked from commit 7069132ec7e94a3274aa1b3b3b6e339066118a4d)
Resolves: #1812046
---
modules.d/40network/net-lib.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh
index 6babcccf..fc914b30 100755
--- a/modules.d/40network/net-lib.sh
+++ b/modules.d/40network/net-lib.sh
@@ -508,7 +508,7 @@ ip_to_var() {
[ -n "$6" ] && dev=$6
[ -n "$7" ] && autoconf=$7
case "$8" in
- [0-9]*:*|[0-9]*.[0-9]*.[0-9]*.[0-9]*)
+ [0-9a-fA-F]*:*|[0-9]*.[0-9]*.[0-9]*.[0-9]*)
dns1="$8"
[ -n "$9" ] && dns2="$9"
;;

37
SOURCES/0113.patch Normal file
View File

@ -0,0 +1,37 @@
From f9c068e999cc76eaa318cc0773ef9133ea986131 Mon Sep 17 00:00:00 2001
From: Sebastian Mitterle <smitterl@redhat.com>
Date: Thu, 19 Mar 2020 12:12:50 +0100
Subject: [PATCH] dasd: only install /etc/dasd.conf if present
`dasd.conf` needn't be present on system even if modules have been loaded.
Check if file exists to avoid error message during kernel update
```bash
dracut-install: ERROR: installing '/etc/dasd.conf'
dracut: FAILED: /usr/lib/dracut/dracut-install -D /var/tmp/dracut.YvVRx5/initramfs -H /etc/dasd.conf
```
(cherry picked from commit defb1611c771d9f05780aebb101baefde2f66874)
Resolves: #1815043
---
modules.d/95dasd/module-setup.sh | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/modules.d/95dasd/module-setup.sh b/modules.d/95dasd/module-setup.sh
index 0da61309..ec33a9e0 100755
--- a/modules.d/95dasd/module-setup.sh
+++ b/modules.d/95dasd/module-setup.sh
@@ -18,8 +18,9 @@ depends() {
install() {
inst_hook cmdline 30 "$moddir/parse-dasd.sh"
inst_multiple dasdinfo dasdconf.sh normalize_dasd_arg
- if [[ $hostonly ]]; then
- inst -H /etc/dasd.conf
+ conf=/etc/dasd.conf
+ if [[ $hostonly && -f $conf ]] ; then
+ inst -H $conf
fi
inst_rules 56-dasd.rules
inst_rules 59-dasd.rules

27
SOURCES/0114.patch Normal file
View File

@ -0,0 +1,27 @@
From af492162772a6ed26fbc8223012348ae4ad000e5 Mon Sep 17 00:00:00 2001
From: David Tardon <dtardon@redhat.com>
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.
(cherry picked from commit 0f89c0dff6b96c9ca09b48a2890399b145f38bdb)
Resolves: #1849021
---
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 a7f250f3..1844a035 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
}

47
SOURCES/0115.patch Normal file
View File

@ -0,0 +1,47 @@
From 8680b657da61ce533f1c91e79eadd3c46f9e98d0 Mon Sep 17 00:00:00 2001
From: "Eugene S. Sobolev" <sobolev@protei.ru>
Date: Fri, 14 Feb 2020 11:49:06 +0300
Subject: [PATCH] network/net-lib.sh: Configure all iBFT interfaces
Added boolean command line option rd.iscsi.mp
(cherry picked from commit c7ee6b3dbb8dfad61aa337b2ecf7e4eaeddc4b4b)
Resolves: #1851984
---
dracut.cmdline.7.asc | 3 +++
modules.d/40network/net-lib.sh | 6 ++++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc
index 19b5cc87..9003c430 100644
--- a/dracut.cmdline.7.asc
+++ b/dracut.cmdline.7.asc
@@ -764,6 +764,9 @@ iscsistart -b --param node.session.timeo.replacement_timeout=30
**rd.iscsi.ibft** **rd.iscsi.ibft=1**:
Turn on iBFT autoconfiguration for the interfaces
+**rd.iscsi.mp** **rd.iscsi.mp=1**:
+ Configure all iBFT interfaces, not only used for booting (multipath)
+
**rd.iscsi.waitnet=0**:
Turn off waiting for all interfaces to be up before trying to login to the iSCSI targets.
diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh
index fc914b30..f0c1c041 100755
--- a/modules.d/40network/net-lib.sh
+++ b/modules.d/40network/net-lib.sh
@@ -251,8 +251,10 @@ ibft_to_cmdline() {
[ -e ${iface}/flags ] && flags=$(read a < ${iface}/flags; echo $a)
# Skip invalid interfaces
(( $flags & 1 )) || continue
- # Skip interfaces not used for booting
- (( $flags & 2 )) || continue
+ # Skip interfaces not used for booting unless using multipath
+ if ! getargbool 0 rd.iscsi.mp ; then
+ (( $flags & 2 )) || continue
+ fi
[ -e ${iface}/dhcp ] && dhcp=$(read a < ${iface}/dhcp; echo $a)
[ -e ${iface}/origin ] && origin=$(read a < ${iface}/origin; echo $a)
[ -e ${iface}/ip-addr ] && ip=$(read a < ${iface}/ip-addr; echo $a)

29
SOURCES/0116.patch Normal file
View File

@ -0,0 +1,29 @@
From b14ba27a3cdc7a71ded3c4b424129ffd61d7be85 Mon Sep 17 00:00:00 2001
From: Denis Volkov <denis@simpletexting.net>
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
(cherry picked from commit 09a691af3b63543fe58faa02661f785b907a78a6)
Resolves: #1859513
---
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%%:*}
}

39
SOURCES/0117.patch Normal file
View File

@ -0,0 +1,39 @@
From cfa57e264efa138e99257fbfbe18449150a96c4d Mon Sep 17 00:00:00 2001
From: Lukas Nykryn <lnykryn@redhat.com>
Date: Thu, 14 Feb 2019 20:18:04 +0100
Subject: [PATCH] install: string_hash_func should not be fed with NULL
If kmod_module_get_path returns NULL, we should skip that entry,
the hash function does not like NULL pointers.
(cherry picked from commit fc141f22869bad2e5409d1cc555c1a42ea738343)
Resolves: #1868525
---
install/dracut-install.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/install/dracut-install.c b/install/dracut-install.c
index 51f79422..f8ec9a59 100644
--- a/install/dracut-install.c
+++ b/install/dracut-install.c
@@ -1248,6 +1248,9 @@ static int install_dependent_modules(struct kmod_list *modlist)
mod = kmod_module_get_module(itr);
path = kmod_module_get_path(mod);
+ if (path == NULL)
+ continue;
+
if (check_hashmap(items_failed, path))
return -1;
@@ -1257,7 +1260,7 @@ static int install_dependent_modules(struct kmod_list *modlist)
name = kmod_module_get_name(mod);
- if ((path == NULL) || (arg_mod_filter_noname && (regexec(&mod_filter_noname, name, 0, NULL, 0) == 0))) {
+ if (arg_mod_filter_noname && (regexec(&mod_filter_noname, name, 0, NULL, 0) == 0)) {
continue;
}

36
SOURCES/0118.patch Normal file
View File

@ -0,0 +1,36 @@
From 561339d4d04c5481a3239017d714f035fc5bc55a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?=
<marmarek@invisiblethingslab.com>
Date: Tue, 3 Mar 2020 21:20:34 +0100
Subject: [PATCH] Consider also drm_dev_register when looking for gpu driver
DRM drivers are filtered for drm_crtc_init symbol,
but not all drivers use it. Especially, cirrus driver
doesn't use it since Linux 5.2.
The practical result is text plymouth theme instead of graphical when in qemu.
Fix it by looking also for drm_dev_register symbol.
Suggested by @haraldh
Fixes #712
(cherry picked from commit ebeed55c073eeaf78b738fe2c91bb6327a2c3bfe)
Resolves: #1874506
---
modules.d/50drm/module-setup.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules.d/50drm/module-setup.sh b/modules.d/50drm/module-setup.sh
index 23545e34..a1711c00 100755
--- a/modules.d/50drm/module-setup.sh
+++ b/modules.d/50drm/module-setup.sh
@@ -40,6 +40,6 @@ installkernel() {
fi
done
else
- dracut_instmods -o -s "drm_crtc_init" "=drivers/gpu/drm" "=drivers/staging"
+ dracut_instmods -o -s "drm_crtc_init|drm_dev_register" "=drivers/gpu/drm" "=drivers/staging"
fi
}

27
SOURCES/0119.patch Normal file
View File

@ -0,0 +1,27 @@
From add76751a1bc290088ca650cbec0be3696beb8d6 Mon Sep 17 00:00:00 2001
From: GuoChuang <guo.chuang@zte.com.cn>
Date: Mon, 24 Aug 2020 14:03:48 +0800
Subject: [PATCH] fix graphics startup failure with the rhgb paramter in
CentOS8.2
(cherry picked from commit d76e9ad5d7b16edb3c544ed3888640bea0efbf72)
Resolves: #1874506
---
modules.d/50drm/module-setup.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules.d/50drm/module-setup.sh b/modules.d/50drm/module-setup.sh
index a1711c00..b4ead7f2 100755
--- a/modules.d/50drm/module-setup.sh
+++ b/modules.d/50drm/module-setup.sh
@@ -33,7 +33,7 @@ installkernel() {
if [[ $hostonly ]]; then
for i in /sys/bus/{pci/devices,virtio/devices,soc/devices/soc?}/*/modalias; do
[[ -e $i ]] || continue
- if hostonly="" dracut_instmods --silent -s "drm_crtc_init" -S "iw_handler_get_spy" $(<$i); then
+ if hostonly="" dracut_instmods --silent -s "drm_crtc_init|drm_dev_register" -S "iw_handler_get_spy" $(<$i); then
if strstr "$(modinfo -F filename $(<$i) 2>/dev/null)" radeon.ko; then
hostonly='' instmods amdkfd
fi

87
SOURCES/0120.patch Normal file
View File

@ -0,0 +1,87 @@
From e7f4acb6f7f902715277048be7cdba49c61189dd Mon Sep 17 00:00:00 2001
From: Rumbaut Thomas <Thomas.Rumbaut@digipolis.gent>
Date: Fri, 23 Oct 2020 12:38:04 +0200
Subject: [PATCH] Configure the runner for team interfaces
https://bugzilla.redhat.com/show_bug.cgi?id=1881463
(cherry picked from commit e4483e5917b59918260ff0f0345abbea4a537f12)
Resolves: #1881463
---
dracut.cmdline.7.asc | 6 +++++-
modules.d/35network-legacy/parse-team.sh | 18 +++++++++++++-----
2 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc
index 9003c430..e220defb 100644
--- a/dracut.cmdline.7.asc
+++ b/dracut.cmdline.7.asc
@@ -593,9 +593,13 @@ interface name. Better name it "bootnet" or "bluesocket".
Bond without parameters assumes
bond=bond0:eth0,eth1:mode=balance-rr
-**team=**__<teammaster>__:__<teamslaves>__::
+**team=**__<teammaster>__:__<teamslaves>__[:__<teamrunner>__]::
Setup team device <teammaster> on top of <teamslaves>.
<teamslaves> is a comma-separated list of physical (ethernet) interfaces.
+ <teamrunner> is the runner type to be used (see *teamd.conf*(5)); defaults to
+ activebackup.
+ Team without parameters assumes
+ team=team0:eth0,eth1:activebackup
**bridge=**__<bridgename>__:__<ethnames>__::
Setup bridge <bridgename> with <ethnames>. <ethnames> is a comma-separated
diff --git a/modules.d/35network-legacy/parse-team.sh b/modules.d/35network-legacy/parse-team.sh
index a6eef18e..03fbcf20 100755
--- a/modules.d/35network-legacy/parse-team.sh
+++ b/modules.d/35network-legacy/parse-team.sh
@@ -1,9 +1,12 @@
#!/bin/sh
#
# Format:
-# team=<teammaster>:<teamslaves>
+# team=<teammaster>:<teamslaves>[:<teamrunner>]
#
# teamslaves is a comma-separated list of physical (ethernet) interfaces
+# teamrunner is the runner type to be used (see teamd.conf(5)); defaults to activebackup
+#
+# team without parameters assumes team=team0:eth0,eth1:activebackup
#
parseteam() {
@@ -15,8 +18,11 @@ parseteam() {
done
case $# in
- 2) teammaster=$1; teamslaves=$(str_replace "$2" "," " ") ;;
- *) die "team= requires two parameters" ;;
+ 0) teammaster=team0; teamslaves="eth0 eth1"; teamrunner="activebackup" ;;
+ 1) teammaster=$1; teamslaves="eth0 eth1"; teamrunner="activebackup" ;;
+ 2) teammaster=$1; teamslaves=$(str_replace "$2" "," " "); teamrunner="activebackup" ;;
+ 3) teammaster=$1; teamslaves=$(str_replace "$2" "," " "); teamrunner=$3 ;;
+ *) die "team= requires zero to three parameters" ;;
esac
return 0
}
@@ -26,16 +32,18 @@ for team in $(getargs team); do
unset teammaster
unset teamslaves
+ unset teamrunner
parseteam "$team" || continue
echo "teammaster=$teammaster" > /tmp/team.${teammaster}.info
echo "teamslaves=\"$teamslaves\"" >> /tmp/team.${teammaster}.info
+ echo "teamrunner=\"$teamrunner\"" >> /tmp/team.${teammaster}.info
if ! [ -e /etc/teamd/${teammaster}.conf ]; then
- warn "Team master $teammaster specified, but no /etc/teamd/$teammaster.conf present. Using activebackup."
+ warn "Team master $teammaster specified, but no /etc/teamd/$teammaster.conf present. Using $teamrunner."
mkdir -p /etc/teamd
- printf -- "%s" '{"runner": {"name": "activebackup"}, "link_watch": {"name": "ethtool"}}' > "/etc/teamd/${teammaster}.conf"
+ printf -- "%s" "{\"runner\": {\"name\": \"$teamrunner\"}, \"link_watch\": {\"name\": \"ethtool\"}}" > "/tmp/${teammaster}.conf"
fi
done

42
SOURCES/0121.patch Normal file
View File

@ -0,0 +1,42 @@
From b75ab376748ee698763610769601bd81296bd060 Mon Sep 17 00:00:00 2001
From: Beniamino Galvani <bgalvani@redhat.com>
Date: Thu, 7 May 2020 07:48:12 +0200
Subject: [PATCH] network-manager: set kernel hostname from the command line
Since commit ff70adf873ef ("initrd: save hostname to a file in /run"),
the initrd generator of NetworkManager parses the hostname from 'ip='
options of the kernel command line and writes it to
/run/NetworkManager/initrd/hostname.
When that file exists, set the kernel hostname.
In presence of multiple hostnames in the command line, the last one
wins. Hostnames from command line always have precedence over ones
received through DHCP. This is a bit different from the legacy network
module that gives higher precedence to the hostname (from DHCP or
command line) of the last interface that is brought up, which depends
on the udev order.
(cherry picked from commit eb770a4a207b2e9e3080068c1df22b69ed44d4b5)
Resolves: #1881974
---
modules.d/35network-manager/nm-run.sh | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/modules.d/35network-manager/nm-run.sh b/modules.d/35network-manager/nm-run.sh
index fc5280a1..61752384 100755
--- a/modules.d/35network-manager/nm-run.sh
+++ b/modules.d/35network-manager/nm-run.sh
@@ -10,6 +10,10 @@ for i in /usr/lib/NetworkManager/system-connections/* \
else
/usr/sbin/NetworkManager --configure-and-quit=initrd --no-daemon
fi
+
+ if [ -s /run/NetworkManager/initrd/hostname ]; then
+ cat /run/NetworkManager/initrd/hostname > /proc/sys/kernel/hostname
+ fi
break
done

252
SOURCES/0122.patch Normal file
View File

@ -0,0 +1,252 @@
From f9883b51b1fafd30a91e9efda3260067a8f87ea5 Mon Sep 17 00:00:00 2001
From: Enzo Matsumiya <ematsumiya@suse.de>
Date: Mon, 3 Aug 2020 11:21:36 -0300
Subject: [PATCH] 95nvmf: add NVMe over TCP support
Add support to boot from an NVMe over TCP device.
Example of supported command line formats:
nvme.discover=tcp:192.168.1.3::4420
nvme.discover=tcp:192.168.1.3 # will use 4420 as default svcid
- Create is_nvmf() function to handle all fabrics types
- Fix parse_nvmf_discover() to correctly use the default values
- Auxiliary function to validate an IP connection
- Fix inverted result for getargbool when reading "rd.nonvmf" command line parameter
Requires rd.neednet=1
Requires adding/replacing STARTMODE in /etc/sysconfig/network/ifcfg-ethX to "nfsroot"
to avoid shutdown hanging in initiator
Signed-off-by: Enzo Matsumiya <ematsumiya@suse.de>
(cherry picked from commit 019610af266bcaef711715266bc0ca4be1044150)
Resolves: #1885417
---
modules.d/95nvmf/module-setup.sh | 25 ++++---
modules.d/95nvmf/parse-nvmf-boot-connections.sh | 97 ++++++++++++++++++-------
2 files changed, 84 insertions(+), 38 deletions(-)
diff --git a/modules.d/95nvmf/module-setup.sh b/modules.d/95nvmf/module-setup.sh
index db43ec01..418b5e0c 100755
--- a/modules.d/95nvmf/module-setup.sh
+++ b/modules.d/95nvmf/module-setup.sh
@@ -6,9 +6,9 @@ check() {
[ -f /etc/nvme/hostnqn ] || return 255
[ -f /etc/nvme/hostid ] || return 255
- is_nvme_fc() {
+ is_nvmf() {
local _dev=$1
- local traddr
+ local trtype
[[ -L "/sys/dev/block/$_dev" ]] || return 0
cd -P "/sys/dev/block/$_dev" || return 0
@@ -18,19 +18,19 @@ check() {
for d in device/nvme* ; do
[ -L "$d" ] || continue
if readlink "$d" | grep -q nvme-fabrics ; then
- traddr=$(cat "$d"/address)
- break
- fi
- done
- [[ "${traddr#traddr=nn-}" != "$traddr" ]]
+ trtype=$(cat "$d"/transport)
+ break
+ fi
+ done
+ [[ "$trtype" == "fc" ]] || [[ "$trtype" == "tcp" ]] || [[ "$trtype" == "rdma" ]]
}
[[ $hostonly ]] || [[ $mount_needs ]] && {
pushd . >/dev/null
- for_each_host_dev_and_slaves is_nvme_fc
- local _is_nvme_fc=$?
+ for_each_host_dev_and_slaves is_nvmf
+ local _is_nvmf=$?
popd >/dev/null
- [[ $_is_nvme_fc == 0 ]] || return 255
+ [[ $_is_nvmf == 0 ]] || return 255
if [ ! -f /sys/class/fc/fc_udev_device/nvme_discovery ] ; then
if [ ! -f /etc/nvme/discovery.conf ] ; then
echo "No discovery arguments present"
@@ -43,13 +43,14 @@ check() {
# called by dracut
depends() {
- echo bash rootfs-block
+ echo bash rootfs-block network
return 0
}
# called by dracut
installkernel() {
instmods nvme_fc lpfc qla2xxx
+ hostonly="" instmods nvme_tcp nvme_fabrics
}
# called by dracut
@@ -76,6 +77,8 @@ install() {
inst_simple "/etc/nvme/hostnqn"
inst_simple "/etc/nvme/hostid"
+ inst_multiple ip sed
+
inst_multiple nvme
inst_multiple -o \
"$systemdsystemunitdir/nvm*-connect@.service" \
diff --git a/modules.d/95nvmf/parse-nvmf-boot-connections.sh b/modules.d/95nvmf/parse-nvmf-boot-connections.sh
index 0d16b871..61c6dec1 100755
--- a/modules.d/95nvmf/parse-nvmf-boot-connections.sh
+++ b/modules.d/95nvmf/parse-nvmf-boot-connections.sh
@@ -8,69 +8,102 @@
# Examples:
# nvmf.hostnqn=nqn.2014-08.org.nvmexpress:uuid:37303738-3034-584d-5137-333230423843
# nvmf.discover=rdma:192.168.1.3::4420
+# nvme.discover=tcp:192.168.1.3::4420
+# nvme.discover=tcp:192.168.1.3
# nvmf.discover=fc:auto
#
# Note: FC does autodiscovery, so typically there is no need to
# specify any discover parameters for FC.
#
+type is_ip >/dev/null 2>&1 || . /lib/net-lib.sh
+
+if getargbool 0 rd.nonvmf ; then
+ warn "rd.nonvmf=0: skipping nvmf"
+ return 0
+fi
+
+initqueue --onetime modprobe --all -b -q nvme nvme_tcp nvme_core nvme_fabrics
+
+traddr="none"
+trtype="none"
+hosttraddr="none"
+trsvcid=4420
+
+validate_ip_conn() {
+ if ! getargbool 0 rd.neednet ; then
+ warn "$trtype transport requires rd.neednet=1"
+ return 1
+ fi
+
+ local_address=$(ip -o route get to $traddr | sed -n 's/.*src \([0-9a-f.:]*\).*/\1/p')
+
+ # confirm we got a local IP address
+ if ! is_ip "$local_address" ; then
+ warn "$traddr is an invalid address";
+ return 1
+ fi
+
+ ifname=$(ip -o route get to $local_address | sed -n 's/.*dev \([^ ]*\).*/\1/p')
+
+ if ip l show "$ifname" >/dev/null 2>&1 ; then
+ warn "invalid network interface $ifname"
+ return 1
+ fi
+
+ # confirm there's a route to destination
+ if ip route get "$traddr" >/dev/null 2>&1 ; then
+ warn "no route to $traddr"
+ return 1
+ fi
+}
+
parse_nvmf_discover() {
OLDIFS="$IFS"
IFS=:
- trtype="none"
- traddr="none"
- hosttraddr="none"
- trsvcid=4420
-
set $1
IFS="$OLDIFS"
case $# in
2)
- trtype=$1
- traddr=$2
+ [ -n "$1" ] && trtype=$1
+ [ -n "$2" ] && traddr=$2
;;
3)
- trtype=$1
- traddr=$2
- hosttraddr=$3
+ [ -n "$1" ] && trtype=$1
+ [ -n "$2" ] && traddr=$2
+ [ -n "$3" ] && hosttraddr=$3
;;
4)
- trtype=$1
- traddr=$2
- hosttraddr=$3
- trsvcid=$4
+ [ -n "$1" ] && trtype=$1
+ [ -n "$2" ] && traddr=$2
+ [ -n "$3" ] && hosttraddr=$3
+ [ -n "$4" ] && trsvcid=$4
;;
*)
warn "Invalid arguments for nvmf.discover=$1"
return 1
;;
esac
- if [ -z "$traddr" ] ; then
+ if [ "$traddr" = "none" ] ; then
warn "traddr is mandatory for $trtype"
return 1;
fi
- [ -z "$hosttraddr" ] && hosttraddr="none"
- [ -z "$trsvcid" ] && trsvcid="none"
if [ "$trtype" = "fc" ] ; then
- if [ -z "$hosttraddr" ] ; then
+ if [ "$hosttraddr" = "none" ] ; then
warn "host traddr is mandatory for fc"
return 1
fi
elif [ "$trtype" != "rdma" ] && [ "$trtype" != "tcp" ] ; then
warn "unsupported transport $trtype"
return 1
- elif [ -z "$trsvcid" ] ; then
- trsvcid=4420
+ fi
+ if [ "$trtype" = "tcp" ]; then
+ validate_ip_conn
fi
echo "--transport=$trtype --traddr=$traddr --host-traddr=$hosttraddr --trsvcid=$trsvcid" >> /etc/nvme/discovery.conf
}
-if ! getargbool 0 rd.nonvmf ; then
- info "rd.nonvmf=0: skipping nvmf"
- return 0
-fi
-
nvmf_hostnqn=$(getarg nvmf.hostnqn=)
if [ -n "$nvmf_hostnqn" ] ; then
echo "$nvmf_hostnqn" > /etc/nvme/hostnqn
@@ -89,7 +122,17 @@ done
[ -f "/etc/nvme/hostid" ] || exit 0
if [ -f "/etc/nvme/discovery.conf" ] ; then
- /sbin/initqueue --onetime --unique --name nvme-discover /usr/sbin/nvme connect-all
+ if [ "$trtype" = "tcp" ] ; then
+ /sbin/initqueue --settled --onetime --unique --name nvme-discover /usr/sbin/nvme connect-all
+ > /tmp/net.$ifname.did-setup
+ else
+ /sbin/initqueue --onetime --unique --name nvme-discover /usr/sbin/nvme connect-all
+ fi
else
- /sbin/initqueue --finished --unique --name nvme-fc-autoconnect echo 1 > /sys/class/fc/fc_udev_device/nvme_discovery
+ if [ "$trtype" = "tcp" ] ; then
+ /sbin/initqueue --settled --onetime --unique /usr/sbin/nvme connect-all -t tcp -a $traddr -s $trsvcid
+ > /tmp/net.$ifname.did-setup
+ else
+ /sbin/initqueue --finished --unique --name nvme-fc-autoconnect echo 1 > /sys/class/fc/fc_udev_device/nvme_discovery
+ fi
fi

71
SOURCES/0123.patch Normal file
View File

@ -0,0 +1,71 @@
From 231c6e831262246af33696132c1be7c009477a96 Mon Sep 17 00:00:00 2001
From: Patrick Talbert <ptalbert@redhat.com>
Date: Fri, 30 Nov 2018 09:28:09 +0100
Subject: [PATCH] 95fcoe: Add the rd.nofcoe option to disable the FCoE module
from the command line
Images built with the fcoe module will always run the lldpad
service as part of their pre-trigger scripts if the network
is active. This prevents network installations in
environments where, for security reasons, LLDPDU frames
cause a switchport shutdown.
Add a new rd.nofcoe option to cause dracut to skip the
lldpad.sh script and the entire 95-fcoe module.
Signed-off-by: Patrick Talbert <ptalbert@redhat.com>
(cherry picked from commit 7c6d2ad916bd536dc2f082fd96ef837a5031e497)
Resolves: #1885621
---
dracut.cmdline.7.asc | 3 +++
modules.d/95fcoe/lldpad.sh | 5 +++++
modules.d/95fcoe/parse-fcoe.sh | 5 +++++
3 files changed, 13 insertions(+)
diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc
index e220defb..bf745575 100644
--- a/dracut.cmdline.7.asc
+++ b/dracut.cmdline.7.asc
@@ -779,6 +779,9 @@ iscsistart -b --param node.session.timeo.replacement_timeout=30
FCoE
~~~~
+**rd.nofcoe=0**::
+ disable FCoE and lldpad
+
**fcoe=**__<edd|interface|MAC>__:__{dcb|nodcb}__:__{fabric|vn2vn}__::
Try to connect to a FCoE SAN through the NIC specified by _<interface>_ or
_<MAC>_ or EDD settings. The second argument specifies if DCB
diff --git a/modules.d/95fcoe/lldpad.sh b/modules.d/95fcoe/lldpad.sh
index d06a3bd8..c32feeed 100755
--- a/modules.d/95fcoe/lldpad.sh
+++ b/modules.d/95fcoe/lldpad.sh
@@ -1,5 +1,10 @@
#!/bin/bash
+if ! getargbool 0 rd.nofcoe ; then
+ info "rd.nofcoe=0: skipping lldpad activation"
+ exit 0
+fi
+
# Note lldpad will stay running after switchroot, the system initscripts
# are to kill it and start a new lldpad to take over. Data is transfered
# between the 2 using a shm segment
diff --git a/modules.d/95fcoe/parse-fcoe.sh b/modules.d/95fcoe/parse-fcoe.sh
index 12701cdb..7a6ff755 100755
--- a/modules.d/95fcoe/parse-fcoe.sh
+++ b/modules.d/95fcoe/parse-fcoe.sh
@@ -13,6 +13,11 @@
# fcoe=eth0:nodcb:vn2vn
# fcoe=4a:3f:4c:04:f8:d7:nodcb:fabric
+if ! getargbool 0 rd.nofcoe ; then
+ info "rd.nofcoe=0: skipping fcoe"
+ exit 0
+fi
+
[ -z "$fcoe" ] && fcoe=$(getarg fcoe=)
# If it's not set we don't continue

161
SOURCES/0124.patch Normal file
View File

@ -0,0 +1,161 @@
From 4e1d7a423253d4e3476b003fc2e17c2ac44bd8ca Mon Sep 17 00:00:00 2001
From: Kairui Song <kasong@redhat.com>
Date: Thu, 10 Sep 2020 02:18:02 +0800
Subject: [PATCH] 04watchdog: split the watchdog module install
In some cases, user only want to include the watchdog module, not the
wdctl or any other userspace helper. For example, systemd have a
RebootWatchdogSec option that use watchdog to prevent reboot hangs. And
it can help prevent machines hangs when reboot directly within the
initramfs stage. So split the module installation to a standlone module.
Also when watchdog-module get included, install driver for all loaded
watchdog instaed of only install driver for active watchdog. Both
watchdog and watchdog-module return 255 in check(), so it's enabled only
when manually included, the watchdog may get configured/activated later.
Signed-off-by: Kairui Song <kasong@redhat.com>
(cherry picked from commit 39d90012a652fa4d9d2534d0168ddad8cacec248)
Resolves: #1890039
---
modules.d/04watchdog-modules/module-setup.sh | 61 ++++++++++++++++++++++++++++
modules.d/04watchdog/module-setup.sh | 50 +----------------------
2 files changed, 63 insertions(+), 48 deletions(-)
diff --git a/modules.d/04watchdog-modules/module-setup.sh b/modules.d/04watchdog-modules/module-setup.sh
new file mode 100755
index 00000000..5fbd769b
--- /dev/null
+++ b/modules.d/04watchdog-modules/module-setup.sh
@@ -0,0 +1,61 @@
+#!/bin/bash
+
+# called by dracut
+check() {
+ return 255
+}
+
+# called by dracut
+depends() {
+ return 0
+}
+
+# called by dracut
+install() {
+ return 0
+}
+
+installkernel() {
+ local -A _drivers
+ local _alldrivers _wdtdrv _wdtppath _dir
+ [[ -d /sys/class/watchdog/ ]] || return
+ for _dir in /sys/class/watchdog/*; do
+ [[ -d "$_dir" ]] || continue
+ [[ -f "$_dir/state" ]] || continue
+ # device/modalias will return driver of this device
+ _wdtdrv=$(< "$_dir/device/modalias")
+ # There can be more than one module represented by same
+ # modalias. Currently load all of them.
+ # TODO: Need to find a way to avoid any unwanted module
+ # represented by modalias
+ _wdtdrv=$(modprobe --set-version "$kernel" -R $_wdtdrv 2>/dev/null)
+ if [[ $_wdtdrv ]]; then
+ instmods $_wdtdrv
+ for i in $_wdtdrv; do
+ _drivers[$i]=1
+ done
+ fi
+ # however in some cases, we also need to check that if there is
+ # a specific driver for the parent bus/device. In such cases
+ # we also need to enable driver for parent bus/device.
+ _wdtppath=$(readlink -f "$_dir/device")
+ while [[ -d "$_wdtppath" ]] && [[ "$_wdtppath" != "/sys" ]]; do
+ _wdtppath=$(readlink -f "$_wdtppath/..")
+ [[ -f "$_wdtppath/modalias" ]] || continue
+
+ _wdtdrv=$(< "$_wdtppath/modalias")
+ _wdtdrv=$(modprobe --set-version "$kernel" -R $_wdtdrv 2>/dev/null)
+ if [[ $_wdtdrv ]]; then
+ instmods $_wdtdrv
+ for i in $_wdtdrv; do
+ _drivers[$i]=1
+ done
+ fi
+ done
+ done
+ # ensure that watchdog module is loaded as early as possible
+ _alldrivers="${!_drivers[*]}"
+ [[ $_alldrivers ]] && echo "rd.driver.pre=${_alldrivers// /,}" > ${initdir}/etc/cmdline.d/00-watchdog.conf
+
+ return 0
+}
diff --git a/modules.d/04watchdog/module-setup.sh b/modules.d/04watchdog/module-setup.sh
index 7566d651..15bcd897 100755
--- a/modules.d/04watchdog/module-setup.sh
+++ b/modules.d/04watchdog/module-setup.sh
@@ -7,7 +7,7 @@ check() {
# called by dracut
depends() {
- return 0
+ return "watchdog-modules"
}
# called by dracut
@@ -27,53 +27,7 @@ install() {
inst_hook cleanup 00 "$moddir/watchdog.sh"
inst_hook cleanup 99 "$moddir/watchdog.sh"
fi
+
inst_hook emergency 02 "$moddir/watchdog-stop.sh"
inst_multiple -o wdctl
}
-
-installkernel() {
- local -A _drivers
- local _alldrivers _active _wdtdrv _wdtppath _dir
- [[ -d /sys/class/watchdog/ ]] || return
- for _dir in /sys/class/watchdog/*; do
- [[ -d "$_dir" ]] || continue
- [[ -f "$_dir/state" ]] || continue
- _active=$(< "$_dir/state")
- ! [[ $hostonly ]] || [[ "$_active" = "active" ]] || continue
- # device/modalias will return driver of this device
- _wdtdrv=$(< "$_dir/device/modalias")
- # There can be more than one module represented by same
- # modalias. Currently load all of them.
- # TODO: Need to find a way to avoid any unwanted module
- # represented by modalias
- _wdtdrv=$(modprobe --set-version "$kernel" -R $_wdtdrv 2>/dev/null)
- if [[ $_wdtdrv ]]; then
- instmods $_wdtdrv
- for i in $_wdtdrv; do
- _drivers[$i]=1
- done
- fi
- # however in some cases, we also need to check that if there is
- # a specific driver for the parent bus/device. In such cases
- # we also need to enable driver for parent bus/device.
- _wdtppath=$(readlink -f "$_dir/device")
- while [[ -d "$_wdtppath" ]] && [[ "$_wdtppath" != "/sys" ]]; do
- _wdtppath=$(readlink -f "$_wdtppath/..")
- [[ -f "$_wdtppath/modalias" ]] || continue
-
- _wdtdrv=$(< "$_wdtppath/modalias")
- _wdtdrv=$(modprobe --set-version "$kernel" -R $_wdtdrv 2>/dev/null)
- if [[ $_wdtdrv ]]; then
- instmods $_wdtdrv
- for i in $_wdtdrv; do
- _drivers[$i]=1
- done
- fi
- done
- done
- # ensure that watchdog module is loaded as early as possible
- _alldrivers="${!_drivers[*]}"
- [[ $_alldrivers ]] && echo "rd.driver.pre=${_alldrivers// /,}" > ${initdir}/etc/cmdline.d/00-watchdog.conf
-
- return 0
-}

28
SOURCES/0125.patch Normal file
View File

@ -0,0 +1,28 @@
From d1861df7552e2679ab48e5573ac23f4f1553f0e2 Mon Sep 17 00:00:00 2001
From: Beniamino Galvani <bgalvani@redhat.com>
Date: Sun, 20 Sep 2020 09:44:08 +0200
Subject: [PATCH] dracut.spec: include the 04watchdog-modules module
Include the 04watchdog-modules module that was added in 39d90012a652
("04watchdog: split the watchdog module install").
(cherry picked from commit f3e328a7fd30c7109a3af188e84e621770bb6b85)
Resolves: #1890039
---
dracut.spec | 1 +
1 file changed, 1 insertion(+)
diff --git a/dracut.spec b/dracut.spec
index 3db5c0cf..b371118e 100644
--- a/dracut.spec
+++ b/dracut.spec
@@ -346,6 +346,7 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne
%{dracutlibdir}/modules.d/03modsign
%{dracutlibdir}/modules.d/03rescue
%{dracutlibdir}/modules.d/04watchdog
+%{dracutlibdir}/modules.d/04watchdog-modules
%{dracutlibdir}/modules.d/05busybox
%{dracutlibdir}/modules.d/06rngd
%{dracutlibdir}/modules.d/10i18n

30
SOURCES/0126.patch Normal file
View File

@ -0,0 +1,30 @@
From 8300849e5d8825c6b60dec682eec4767701e95ac Mon Sep 17 00:00:00 2001
From: Kairui Song <kasong@redhat.com>
Date: Mon, 16 Nov 2020 15:24:14 +0800
Subject: [PATCH] 95fcoe: ensure needed modules are installed
If fcoe module is loaded, the initramfs will always try load libfcoe
and bnx2fc, so also ensure they are installed if needed.
Signed-off-by: Kairui Song <kasong@redhat.com>
(cherry picked from commit 4339d47cf810d8a79f20cf2b86d15af7ec859052)
Resolves: #1898814
---
modules.d/95fcoe/module-setup.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules.d/95fcoe/module-setup.sh b/modules.d/95fcoe/module-setup.sh
index 63f45b52..c2224ec1 100755
--- a/modules.d/95fcoe/module-setup.sh
+++ b/modules.d/95fcoe/module-setup.sh
@@ -23,7 +23,7 @@ depends() {
# called by dracut
installkernel() {
- instmods fcoe 8021q edd
+ instmods fcoe libfcoe 8021q edd bnx2fc
}
get_vlan_parent() {

100
SOURCES/0127.patch Normal file
View File

@ -0,0 +1,100 @@
From 3085acbec79b3649ac906529778f86a14f330e62 Mon Sep 17 00:00:00 2001
From: Kairui Song <kasong@redhat.com>
Date: Wed, 21 Oct 2020 16:18:07 +0800
Subject: [PATCH] Add a --hostonly-nics option
Currently when network is enabled, dracut will install all network
drivers that are currently loaded, but some time only one NIC is needed
for the initramfs.
So for strict hostonly mode, add a --hostonly-nics option, user can
provide a list of NICs to be enabled, and only needed drivers for
specifed NICs will be installed so save space.
Signed-off-by: Kairui Song <kasong@redhat.com>
(cherry picked from commit 1e92f7285d42fbd3bc01f534f9bd646f6fdd9504)
Cherry-picked from: 1e92f7285d42fbd3bc01f534f9bd646f6fdd9504
Resolves: #1890041
Cherry-picked from: c69961b403c1c83bb4717e1df1470e71cd0245d1
Resolves: #1890041
---
dracut.sh | 6 ++++++
modules.d/90kernel-network-modules/module-setup.sh | 18 +++++++++++++++---
2 files changed, 21 insertions(+), 3 deletions(-)
diff --git a/dracut.sh b/dracut.sh
index e70dab16..01abe7a4 100755
--- a/dracut.sh
+++ b/dracut.sh
@@ -173,6 +173,8 @@ Creates initial ramdisk images for preloading modules
--hostonly-i18n Install only needed keyboard and font files according
to the host configuration (default).
--no-hostonly-i18n Install all keyboard and font files available.
+ --hostonly-nics [LIST]
+ Only enable listed NICs in the initramfs.
--persistent-policy [POLICY]
Use [POLICY] to address disks and partitions.
POLICY can be any directory name found in /dev/disk.
@@ -400,6 +402,7 @@ rearrange_params()
--long kernel-image: \
--long no-hostonly-i18n \
--long hostonly-i18n \
+ --long hostonly-nics: \
--long no-machineid \
-- "$@")
@@ -561,6 +564,8 @@ while :; do
hostonly_cmdline_l="yes" ;;
--hostonly-i18n)
i18n_install_all_l="no" ;;
+ --hostonly-nics)
+ hostonly_nics_l+=("$2"); PARMS_TO_STORE+=" '$2'"; shift;;
--no-hostonly-i18n)
i18n_install_all_l="yes" ;;
--no-hostonly-cmdline)
@@ -720,6 +725,7 @@ unset NPATH
(( ${#fstab_lines_l[@]} )) && fstab_lines+=( "${fstab_lines_l[@]}" )
(( ${#install_items_l[@]} )) && install_items+=" ${install_items_l[@]} "
(( ${#install_optional_items_l[@]} )) && install_optional_items+=" ${install_optional_items_l[@]} "
+(( ${#hostonly_nics_l[@]} )) && hostonly_nics+=" ${hostonly_nics_l[@]} "
# these options override the stuff in the config file
(( ${#dracutmodules_l[@]} )) && dracutmodules="${dracutmodules_l[@]}"
diff --git a/modules.d/90kernel-network-modules/module-setup.sh b/modules.d/90kernel-network-modules/module-setup.sh
index 600ef112..f36d31f7 100755
--- a/modules.d/90kernel-network-modules/module-setup.sh
+++ b/modules.d/90kernel-network-modules/module-setup.sh
@@ -14,15 +14,27 @@ depends() {
installkernel() {
# Include wired net drivers, excluding wireless
local _arch=$(uname -m)
- local _net_drivers='eth_type_trans|register_virtio_device|usbnet_open'
+ local _net_symbols='eth_type_trans|register_virtio_device|usbnet_open'
local _unwanted_drivers='/(wireless|isdn|uwb|net/ethernet|net/phy|net/team)/'
+ local _net_drivers
if [ "$_arch" = "s390" -o "$_arch" = "s390x" ]; then
- _s390drivers="=drivers/s390/net"
+ dracut_instmods -o -P ".*${_unwanted_drivers}.*" -s "$_net_symbols" "=drivers/s390/net"
fi
- dracut_instmods -o -P ".*${_unwanted_drivers}.*" -s "$_net_drivers" "=drivers/net" ${_s390drivers:+"$_s390drivers"}
+ if [[ $hostonly_mode == 'strict' ]] && [[ $hostonly_nics ]]; then
+ for _nic in $hostonly_nics; do
+ _net_drivers=$(get_dev_module /sys/class/net/$_nic)
+ if ! [[ $_net_drivers ]]; then
+ derror "--hostonly-nics contains invalid NIC '$_nic'"
+ continue
+ fi
+ hostonly="" instmods $_net_drivers
+ done
+ return 0
+ fi
+ dracut_instmods -o -P ".*${_unwanted_drivers}.*" -s "$_net_symbols" "=drivers/net"
#instmods() will take care of hostonly
instmods \
=drivers/net/phy \

35
SOURCES/0128.patch Normal file
View File

@ -0,0 +1,35 @@
From 2dbd11b81dae28a5c6291a56175c06665b615d66 Mon Sep 17 00:00:00 2001
From: David Tardon <dtardon@redhat.com>
Date: Thu, 1 Oct 2020 14:08:38 +0200
Subject: [PATCH] dracut-install: ignore bogus preload libs
If there are any nonexistent libraries listed in /etc/ld.so.preload, ldd
prints error messages like:
ERROR: ld.so: object '/usr/lib64/libfoo.so.1' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
This causes resolve_deps() to return error, which leads to symlinks
(like usr/bin/awk) not being copied into the initrd.
(cherry picked from commit 4916dfc2b94dca0e84eb7dc58a9266d02c416b4a)
Resolves: #1884149
---
install/dracut-install.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/install/dracut-install.c b/install/dracut-install.c
index f8ec9a59..baf6dcff 100644
--- a/install/dracut-install.c
+++ b/install/dracut-install.c
@@ -481,6 +481,9 @@ static int resolve_deps(const char *src)
if (strstr(buf, "cannot read header"))
break;
+ if (strstr(buf, "cannot be preloaded"))
+ break;
+
if (strstr(buf, destrootdir))
break;

26
SOURCES/0129.patch Normal file
View File

@ -0,0 +1,26 @@
From e03445a5e40bb8d6de3d401495e8645a6c1db04c Mon Sep 17 00:00:00 2001
From: Lukas Nykryn <lnykryn@redhat.com>
Date: Thu, 7 Jan 2021 11:57:56 +0100
Subject: [PATCH] 00systemd: when putting systemd-vconsole-setup.service as a
dependency ignore missing services
rhel-only
Resolves: #1906301
---
modules.d/00systemd/module-setup.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules.d/00systemd/module-setup.sh b/modules.d/00systemd/module-setup.sh
index 4ab2a896..1f0b5dad 100755
--- a/modules.d/00systemd/module-setup.sh
+++ b/modules.d/00systemd/module-setup.sh
@@ -225,7 +225,7 @@ install() {
systemd-ask-password-console.service \
systemd-ask-password-plymouth.service \
; do
- systemctl -q --root "$initdir" add-wants "$i" systemd-vconsole-setup.service
+ systemctl -q --root "$initdir" add-wants "$i" systemd-vconsole-setup.service 2>/dev/null
done
mkdir -p "$initdir/etc/systemd"

46
SOURCES/0130.patch Normal file
View File

@ -0,0 +1,46 @@
From 0e43b934b98e40efeed0781e8bdf9f805d8d7217 Mon Sep 17 00:00:00 2001
From: Javier Martinez Canillas <javierm@redhat.com>
Date: Tue, 5 May 2020 19:11:18 +0200
Subject: [PATCH] 51-dracut-rescue.install: Don't use BLS fragment shipped by
kernel package
For the GRUB and zipl bootloaders the BLS fragment that is shipped by the
kernel package is used, so the same fragment is used for the rescue entry.
But there are cases where this BLS fragment is not suitable. For example,
if the boot directory is on a btrfs subvolume the path in the linux and
initrd fiels need to be adjusted with the real path. Otherwise GRUB won't
be able to read them.
The GRUB and zipl kernel-install plugins already take care of this before
installing the BLS fragments, so just copy the installed fragment that has
the updated paths instead of using the BLS shipped by the kernel package.
Resolves: rhbz#1827882
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
(cherry picked from commit ff366790a6e30175f243d54c2922a8c781030ede)
Resolves: #1894026
---
51-dracut-rescue.install | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/51-dracut-rescue.install b/51-dracut-rescue.install
index 5ac34ef3..47eb8e7d 100755
--- a/51-dracut-rescue.install
+++ b/51-dracut-rescue.install
@@ -104,7 +104,11 @@ case "$COMMAND" in
echo "initrd $BOOT_DIR/initrd"
} > $LOADER_ENTRY
else
- cp -aT "${KERNEL_IMAGE%/*}/bls.conf" $LOADER_ENTRY
+ if [[ -e "${BLS_DIR}/${MACHINE_ID}-${KERNEL_VERSION}.conf" ]]; then
+ cp -aT "${BLS_DIR}/${MACHINE_ID}-${KERNEL_VERSION}.conf" $LOADER_ENTRY
+ else
+ cp -aT "${KERNEL_IMAGE%/*}/bls.conf" $LOADER_ENTRY
+ fi
sed -i 's/'$KERNEL_VERSION'/0-rescue-'${MACHINE_ID}'/' $LOADER_ENTRY
fi

31
SOURCES/0131.patch Normal file
View File

@ -0,0 +1,31 @@
From 1651c3074f596b80478473a126c02c27398429dd Mon Sep 17 00:00:00 2001
From: Daniel Molkentin <dmolkentin@suse.com>
Date: Thu, 18 Jul 2019 11:29:29 +0200
Subject: [PATCH] 95fcoe: Fix startup when fcoe module is included
The parse-fcoe.sh hook is sourced, and hence must not contain
exit 0 calls. Otherwise, the cmdline sequence will be interupted,
and no error will be reported to systemd. Use return instead.
Reference: boo#1136977
(cherry picked from commit 4f194276417237168f5bc929ba847a23b6a4c77f)
Resolves: #1914957
---
modules.d/95fcoe/parse-fcoe.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules.d/95fcoe/parse-fcoe.sh b/modules.d/95fcoe/parse-fcoe.sh
index 7a6ff755..8bb55c6e 100755
--- a/modules.d/95fcoe/parse-fcoe.sh
+++ b/modules.d/95fcoe/parse-fcoe.sh
@@ -15,7 +15,7 @@
if ! getargbool 0 rd.nofcoe ; then
info "rd.nofcoe=0: skipping fcoe"
- exit 0
+ return 0
fi
[ -z "$fcoe" ] && fcoe=$(getarg fcoe=)

30
SOURCES/0132.patch Normal file
View File

@ -0,0 +1,30 @@
From e96bab3e688b7fc9b6f5e6b90c6d1ea4d517bc4a Mon Sep 17 00:00:00 2001
From: Radek Vykydal <rvykydal@redhat.com>
Date: Tue, 10 Mar 2020 10:48:21 +0100
Subject: [PATCH] Fix pre-trigger stage by replacing exit with return in
lldpad.sh
Using exit makes the pre-trigger stage finish after running 03-lldpad.sh
pre-trigger hook.
(cherry picked from commit 7fb8f939a52a904b1860e303a6a7fe69ba0d2ceb)
Resolves: #1914957
---
modules.d/95fcoe/lldpad.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules.d/95fcoe/lldpad.sh b/modules.d/95fcoe/lldpad.sh
index c32feeed..444c943e 100755
--- a/modules.d/95fcoe/lldpad.sh
+++ b/modules.d/95fcoe/lldpad.sh
@@ -2,7 +2,7 @@
if ! getargbool 0 rd.nofcoe ; then
info "rd.nofcoe=0: skipping lldpad activation"
- exit 0
+ return 0
fi
# Note lldpad will stay running after switchroot, the system initscripts

27
SOURCES/0133.patch Normal file
View File

@ -0,0 +1,27 @@
From 6297e8accadcddcdd390f4e0583f9bde29f3758e Mon Sep 17 00:00:00 2001
From: Lubomir Rintel <lkundrak@v3.sk>
Date: Thu, 7 Nov 2019 14:03:23 +0100
Subject: [PATCH] spec: dracut-network is happy with either NM or dhclient
(cherry picked from commit e8638076857621b28eb4dc36cdd49a94992835b7)
Resolves: #1916174
---
dracut.spec | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dracut.spec b/dracut.spec
index b371118e..fa3e4b99 100644
--- a/dracut.spec
+++ b/dracut.spec
@@ -125,7 +125,8 @@ Requires: %{name} = %{version}-%{release}
%endif
Requires: iputils
Requires: iproute
-Requires: dhclient
+Requires: (NetworkManager >= 1.20 or dhclient)
+Suggests: NetworkManager
Obsoletes: dracut-generic < 008
Provides: dracut-generic = %{version}-%{release}

42
SOURCES/0134.patch Normal file
View File

@ -0,0 +1,42 @@
From db5fda123c2960e99cb29399bdedbd56d672c72d Mon Sep 17 00:00:00 2001
From: Thomas Blume <Thomas.Blume@suse.com>
Date: Mon, 24 Feb 2020 12:11:25 +0100
Subject: [PATCH] 95fcoe: default rd.nofcoe to false
rd.nofcoe should default to false, e.g. fcoe should be enabled unless
overwritten from the command line.
The same applies for lldapd.sh.
(cherry picked from commit 8446c8f9deefcc6c47d96a128b1e9b23d8855a96)
Resolves: #1885621
---
modules.d/95fcoe/lldpad.sh | 2 +-
modules.d/95fcoe/parse-fcoe.sh | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules.d/95fcoe/lldpad.sh b/modules.d/95fcoe/lldpad.sh
index 444c943e..7faa2e19 100755
--- a/modules.d/95fcoe/lldpad.sh
+++ b/modules.d/95fcoe/lldpad.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-if ! getargbool 0 rd.nofcoe ; then
+if getargbool 0 rd.nofcoe ; then
info "rd.nofcoe=0: skipping lldpad activation"
return 0
fi
diff --git a/modules.d/95fcoe/parse-fcoe.sh b/modules.d/95fcoe/parse-fcoe.sh
index 8bb55c6e..86f4331e 100755
--- a/modules.d/95fcoe/parse-fcoe.sh
+++ b/modules.d/95fcoe/parse-fcoe.sh
@@ -13,7 +13,7 @@
# fcoe=eth0:nodcb:vn2vn
# fcoe=4a:3f:4c:04:f8:d7:nodcb:fabric
-if ! getargbool 0 rd.nofcoe ; then
+if getargbool 0 rd.nofcoe ; then
info "rd.nofcoe=0: skipping fcoe"
return 0
fi

View File

@ -5,11 +5,11 @@
# strip the automatically generated dep here and instead co-own the
# directory.
%global __requires_exclude pkg-config
%define dist_free_release 95.git20200804
%define dist_free_release 135.git20210121
Name: dracut
Version: 049
Release: %{dist_free_release}%{?dist}.4
Release: %{dist_free_release}%{?dist}
Summary: Initramfs generator using udev
%if 0%{?fedora} || 0%{?rhel}
@ -130,6 +130,38 @@ Patch99: 0099.patch
Patch100: 0100.patch
Patch101: 0101.patch
Patch102: 0102.patch
Patch103: 0103.patch
Patch104: 0104.patch
Patch105: 0105.patch
Patch106: 0106.patch
Patch107: 0107.patch
Patch108: 0108.patch
Patch109: 0109.patch
Patch110: 0110.patch
Patch111: 0111.patch
Patch112: 0112.patch
Patch113: 0113.patch
Patch114: 0114.patch
Patch115: 0115.patch
Patch116: 0116.patch
Patch117: 0117.patch
Patch118: 0118.patch
Patch119: 0119.patch
Patch120: 0120.patch
Patch121: 0121.patch
Patch122: 0122.patch
Patch123: 0123.patch
Patch124: 0124.patch
Patch125: 0125.patch
Patch126: 0126.patch
Patch127: 0127.patch
Patch128: 0128.patch
Patch129: 0129.patch
Patch130: 0130.patch
Patch131: 0131.patch
Patch132: 0132.patch
Patch133: 0133.patch
Patch134: 0134.patch
Source1: https://www.gnu.org/licenses/lgpl-2.1.txt
@ -228,7 +260,8 @@ Requires: %{name} = %{version}-%{release}
%endif
Requires: iputils
Requires: iproute
Requires: dhclient
Requires: (NetworkManager >= 1.20 or dhclient)
Suggests: NetworkManager
Obsoletes: dracut-generic < 008
Provides: dracut-generic = %{version}-%{release}
@ -449,6 +482,7 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne
%{dracutlibdir}/modules.d/03modsign
%{dracutlibdir}/modules.d/03rescue
%{dracutlibdir}/modules.d/04watchdog
%{dracutlibdir}/modules.d/04watchdog-modules
%{dracutlibdir}/modules.d/05busybox
%{dracutlibdir}/modules.d/06rngd
%{dracutlibdir}/modules.d/10i18n
@ -473,6 +507,7 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne
%{dracutlibdir}/modules.d/95debug
%{dracutlibdir}/modules.d/95fstab-sys
%{dracutlibdir}/modules.d/95lunmask
%{dracutlibdir}/modules.d/95nvmf
%{dracutlibdir}/modules.d/95resume
%{dracutlibdir}/modules.d/95rootfs-block
%{dracutlibdir}/modules.d/95terminfo
@ -590,16 +625,60 @@ echo '# Since rhel-8.3 dracut moved to use NetworkManager
add_dracutmodules+=" network-legacy "' > /etc/dracut.conf.d/50-network-legacy.conf
%changelog
* Tue Dec 15 2020 Lukas Nykryn <lnykryn@redhat.com> - 049-95.git20200804.4
* Thu Jan 21 2021 Lukas Nykryn <lnykryn@redhat.com> - 049-135.git20210121
- 95fcoe: default rd.nofcoe to false
* Thu Jan 14 2021 Lukas Nykryn <lnykryn@redhat.com> - 049-134.git20210114
- spec: dracut-network is happy with either NM or dhclient
* Tue Jan 12 2021 Lukas Nykryn <lnykryn@redhat.com> - 049-133.git20210112
- 95fcoe: Fix startup when fcoe module is included
- Fix pre-trigger stage by replacing exit with return in
* Thu Jan 07 2021 Lukas Nykryn <lnykryn@redhat.com> - 049-131.git20210107
- 00systemd: when putting systemd-vconsole-setup.service as a
- 51-dracut-rescue.install: Don't use BLS fragment shipped by
* Thu Jan 07 2021 Lukas Nykryn <lnykryn@redhat.com> - 049-129.git20210107
- Add a --hostonly-nics option
- dracut-install: ignore bogus preload libs
* Thu Jan 07 2021 Lukas Nykryn <lnykryn@redhat.com> - 049-127.git20210107
- match the whole string
- match simplified rd.zfcp format too
- base: hardcode rhel red
- 95iscsi:
- iscsi: fix error messages with iSCSI root
- 95nvmf: add module for NVMe-oF
- Write dns values passed by ip argument to ifcfg-* files
- dracut.sh: added help for --regenerate-all
- 35network-legacy: fix classless static route parsing
- network: fix glob matching ipv6 addresses
- dasd: only install /etc/dasd.conf if present
- 90multipath: install kpartx's 11-dm-parts.rules
- network/net-lib.sh: Configure all iBFT interfaces
- Change the order of NFS servers during the boot NFS server
- install: string_hash_func should not be fed with NULL
- Consider also drm_dev_register when looking for gpu driver
- fix graphics startup failure with the rhgb paramter in
- Configure the runner for team interfaces
- network-manager: set kernel hostname from the command line
- 95nvmf: add NVMe over TCP support
- 95fcoe: Add the rd.nofcoe option to disable the FCoE module
- 04watchdog: split the watchdog module install
- dracut.spec: include the 04watchdog-modules module
- 95fcoe: ensure needed modules are installed
* Tue Dec 15 2020 Lukas Nykryn <lnykryn@redhat.com> - 049-103.git20201215
- dracut-systemd: create the initrd.target.wants directory
* Mon Nov 30 2020 Lukas Nykryn <lnykryn@redhat.com> - 049-95.git20200804.3
* Mon Nov 30 2020 Lukas Nykryn <lnykryn@redhat.com> - 049-102.git20201130
- multipathd: fix the comparison
* Mon Nov 30 2020 Lukas Nykryn <lnykryn@redhat.com> - 049-95.git20200804.2
* Mon Nov 30 2020 Lukas Nykryn <lnykryn@redhat.com> - 049-101.git20201130
- fix backport of 70b19acf
* Fri Nov 20 2020 Lukas Nykryn <lnykryn@redhat.com> - 049-95.git20200804.1
* Fri Nov 20 2020 Lukas Nykryn <lnykryn@redhat.com> - 049-100.git20201120
- multipath: require kpartx binary
- Replace ln with systemctl
- multipath: add automatic configuration for multipath