!96 [sync] PR-95: 同步上游社区补丁
From: @openeuler-sync-bot Reviewed-by: @jiayi0118 Signed-off-by: @jiayi0118
This commit is contained in:
commit
5d911bf846
29
backport-90lvm-do-not-add-newline-to-cmdline.patch
Normal file
29
backport-90lvm-do-not-add-newline-to-cmdline.patch
Normal file
@ -0,0 +1,29 @@
|
||||
From 01b7163a591c3debec794b5f46b52156a16ee934 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Molkentin <dmolkentin@suse.com>
|
||||
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
|
||||
|
||||
@ -0,0 +1,27 @@
|
||||
From 0f89c0dff6b96c9ca09b48a2890399b145f38bdb 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.
|
||||
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
|
||||
|
||||
30
backport-91zipl-parse-zipl.sh-honor-SYSTEMD_READY.patch
Normal file
30
backport-91zipl-parse-zipl.sh-honor-SYSTEMD_READY.patch
Normal file
@ -0,0 +1,30 @@
|
||||
From 46f3156426e1b770e4876a654738e1c3e01851af Mon Sep 17 00:00:00 2001
|
||||
From: Martin Wilck <mwilck@suse.com>
|
||||
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
|
||||
|
||||
31
backport-95iscsi-fix-ipv6-target-discovery.patch
Normal file
31
backport-95iscsi-fix-ipv6-target-discovery.patch
Normal file
@ -0,0 +1,31 @@
|
||||
From 3b869230a08088a4f51d5bde8d5cfc8497779815 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Blume <Thomas.Blume@suse.com>
|
||||
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
|
||||
|
||||
@ -0,0 +1,29 @@
|
||||
From 55b0d2edafdd18c2e85f47063f0ac81652f86956 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Molkentin <dmolkentin@suse.com>
|
||||
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
|
||||
|
||||
49
backport-95iscsi-use-ip_params_for_remote_addr.patch
Normal file
49
backport-95iscsi-use-ip_params_for_remote_addr.patch
Normal file
@ -0,0 +1,49 @@
|
||||
From 6dbae7e77238dd44bedb0ca2478f985f451c05bf Mon Sep 17 00:00:00 2001
|
||||
From: Martin Wilck <mwilck@suse.com>
|
||||
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
|
||||
|
||||
52
backport-95nfs-use-ip_params_for_remote_addr.patch
Normal file
52
backport-95nfs-use-ip_params_for_remote_addr.patch
Normal file
@ -0,0 +1,52 @@
|
||||
From 880d155967bb54f61e5960347aa8bbab6da8f86d Mon Sep 17 00:00:00 2001
|
||||
From: Martin Wilck <mwilck@suse.com>
|
||||
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
|
||||
|
||||
@ -0,0 +1,61 @@
|
||||
From f84ad9e062519c43264f1a512227621b3bf1853b Mon Sep 17 00:00:00 2001
|
||||
From: Mikhail Novosyolov <m.novosyolov@rosalinux.ru>
|
||||
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 <not a path to file> ] 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 <m.novosyolov@rosalinux.ru>
|
||||
---
|
||||
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
|
||||
|
||||
@ -0,0 +1,30 @@
|
||||
From 09a691af3b63543fe58faa02661f785b907a78a6 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
|
||||
|
||||
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
|
||||
|
||||
29
backport-Do-not-start-inside-container.patch
Normal file
29
backport-Do-not-start-inside-container.patch
Normal file
@ -0,0 +1,29 @@
|
||||
From b7a7735c1d83ade0e748d336c8ab1a569f431107 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Tomasz=20Pawe=C5=82=20Gajc?= <tpgxyz@gmail.com>
|
||||
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
|
||||
|
||||
33
backport-Fix-bad-ls-parsing.patch
Normal file
33
backport-Fix-bad-ls-parsing.patch
Normal file
@ -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
|
||||
|
||||
@ -0,0 +1,36 @@
|
||||
From fea53784adf3748a9f31964272a69b31c152d8cf Mon Sep 17 00:00:00 2001
|
||||
From: mwberry <mwberry@users.noreply.github.com>
|
||||
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
|
||||
|
||||
40
backport-docs-fix-dracut.cmdline.7.patch
Normal file
40
backport-docs-fix-dracut.cmdline.7.patch
Normal file
@ -0,0 +1,40 @@
|
||||
From 67bcc4930430a1845c4f53d2afacf701fc6467a1 Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
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:__<url>__** option.
|
||||
+
|
||||
The default _pathspec_, when _auto_ or no _:<pathspec>_ is given, is
|
||||
-`/<+++<b>rd.live.dir</b>+++>/overlay-<label>-<uuid>`, where _<label>_ is the
|
||||
+`/<rd.live.dir>/overlay-<label>-<uuid>`, where _<label>_ is the
|
||||
device LABEL, and _<uuid>_ is the device UUID.
|
||||
* _none_ (the word itself) specifies that no overlay will be used, such as when
|
||||
an uncompressed, writable live root filesystem is available.
|
||||
--
|
||||
2.19.1
|
||||
|
||||
@ -0,0 +1,45 @@
|
||||
From 5a4c3469338410b6aea9452994b4b0af1ba59be7 Mon Sep 17 00:00:00 2001
|
||||
From: Kairui Song <kasong@redhat.com>
|
||||
Date: Wed, 10 Jun 2020 15:57:20 +0800
|
||||
Subject: [PATCH] dracut.sh: FIPS workaround for openssl-libs on Fedora/RHEL
|
||||
|
||||
On Fedora/RHEL, libcryto will verify both itself and libssl on start, if
|
||||
libssl is missing, FIPS self test will fail. However libssl is not a
|
||||
dependency of libcryto so dracut will not install it, unless some other
|
||||
binary or library pulls it in. Systemd requires libssl, so in most cases
|
||||
it just worked, but could fail in some corner cases where systemd is not
|
||||
used.
|
||||
|
||||
Conflict:NA
|
||||
Reference:https://github.com/dracutdevs/dracut/commit/5a4c3469338410b6aea9452994b4b0af1ba59be7
|
||||
|
||||
Signed-off-by: Kairui Song <kasong@redhat.com>
|
||||
---
|
||||
dracut.sh | 11 +++++++++++
|
||||
1 file changed, 11 insertions(+)
|
||||
|
||||
diff --git a/dracut.sh b/dracut.sh
|
||||
index 9ee722c9..e3195499 100755
|
||||
--- a/dracut.sh
|
||||
+++ b/dracut.sh
|
||||
@@ -1941,6 +1941,17 @@ if [[ $kernel_only != yes ]]; then
|
||||
break 2
|
||||
done
|
||||
done
|
||||
+
|
||||
+ # FIPS workaround for Fedora/RHEL: libcrypto needs libssl when FIPS is enabled
|
||||
+ if [[ $DRACUT_FIPS_MODE ]]; then
|
||||
+ for _dir in $libdirs; do
|
||||
+ for _f in "$dracutsysrootdir$_dir/libcrypto.so"*; do
|
||||
+ [[ -e "$_f" ]] || continue
|
||||
+ inst_libdir_file -o "libssl.so*"
|
||||
+ break 2
|
||||
+ done
|
||||
+ done
|
||||
+ fi
|
||||
fi
|
||||
|
||||
if [[ $do_strip = yes ]] && ! [[ $DRACUT_FIPS_MODE ]]; then
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@ -0,0 +1,56 @@
|
||||
From de3cb0e3214c3fbab3a94e705445b4d1c2bf0dff Mon Sep 17 00:00:00 2001
|
||||
From: Kairui Song <kasong@redhat.com>
|
||||
Date: Tue, 9 Jun 2020 03:03:18 +0800
|
||||
Subject: [PATCH] dracut.sh: Move the library workaround after squash
|
||||
|
||||
Ensure the workaround is also valid when dracut-squash module is used
|
||||
|
||||
Conflict:NA
|
||||
Reference:https://github.com/dracutdevs/dracut/commit/de3cb0e3214c3fbab3a94e705445b4d1c2bf0dff
|
||||
|
||||
Signed-off-by: Kairui Song <kasong@redhat.com>
|
||||
---
|
||||
dracut.sh | 20 +++++++++++---------
|
||||
1 file changed, 11 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/dracut.sh b/dracut.sh
|
||||
index 81c6d654..9ee722c9 100755
|
||||
--- a/dracut.sh
|
||||
+++ b/dracut.sh
|
||||
@@ -1661,15 +1661,6 @@ if [[ $kernel_only != yes ]]; then
|
||||
# Now we are done with lazy resolving, always install dependencies
|
||||
unset DRACUT_RESOLVE_LAZY
|
||||
export DRACUT_RESOLVE_DEPS=1
|
||||
-
|
||||
- # libpthread workaround: pthread_cancel wants to dlopen libgcc_s.so
|
||||
- for _dir in $libdirs; do
|
||||
- for _f in "$dracutsysrootdir$_dir/libpthread.so"*; do
|
||||
- [[ -e "$_f" ]] || continue
|
||||
- inst_libdir_file "libgcc_s.so*"
|
||||
- break 2
|
||||
- done
|
||||
- done
|
||||
fi
|
||||
|
||||
for ((i=0; i < ${#include_src[@]}; i++)); do
|
||||
@@ -1941,6 +1932,17 @@ if dracut_module_included "squash"; then
|
||||
done
|
||||
fi
|
||||
|
||||
+if [[ $kernel_only != yes ]]; then
|
||||
+ # libpthread workaround: pthread_cancel wants to dlopen libgcc_s.so
|
||||
+ for _dir in $libdirs; do
|
||||
+ for _f in "$dracutsysrootdir$_dir/libpthread.so"*; do
|
||||
+ [[ -e "$_f" ]] || continue
|
||||
+ inst_libdir_file "libgcc_s.so*"
|
||||
+ break 2
|
||||
+ done
|
||||
+ done
|
||||
+fi
|
||||
+
|
||||
if [[ $do_strip = yes ]] && ! [[ $DRACUT_FIPS_MODE ]]; then
|
||||
dinfo "*** Stripping files ***"
|
||||
find "$initdir" -type f \
|
||||
--
|
||||
2.23.0
|
||||
|
||||
60
backport-dracut.sh-fix-early-microcode-detection-logic.patch
Normal file
60
backport-dracut.sh-fix-early-microcode-detection-logic.patch
Normal file
@ -0,0 +1,60 @@
|
||||
From d8d5cb839cbddff7d73a12450055f14dce4ce1e2 Mon Sep 17 00:00:00 2001
|
||||
From: q66 <daniel@octaforge.org>
|
||||
Date: Sat, 25 Jul 2020 17:28:16 +0200
|
||||
Subject: [PATCH] dracut.sh: fix early microcode detection logic
|
||||
|
||||
This fixes two issues:
|
||||
|
||||
1) on non-x86 systems in non-hostonly config this would cause
|
||||
an annoying warning on every initramfs generation
|
||||
2) on non-x86 systems in hostonly config this would result in
|
||||
early microcode not getting disabled
|
||||
|
||||
Conflict:NA
|
||||
Reference:https://github.com/dracutdevs/dracut/commit/d8d5cb839cbddff7d73a12450055f14dce4ce1e2
|
||||
---
|
||||
dracut.sh | 23 +++++++++++++++--------
|
||||
1 file changed, 15 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/dracut.sh b/dracut.sh
|
||||
index e3195499..d5dfa77d 100755
|
||||
--- a/dracut.sh
|
||||
+++ b/dracut.sh
|
||||
@@ -1194,19 +1194,26 @@ fi
|
||||
|
||||
if [[ $early_microcode = yes ]]; then
|
||||
if [[ $hostonly ]]; then
|
||||
- [[ $(get_cpu_vendor) == "AMD" ]] \
|
||||
- && ! check_kernel_config CONFIG_MICROCODE_AMD \
|
||||
- && unset early_microcode
|
||||
- [[ $(get_cpu_vendor) == "Intel" ]] \
|
||||
- && ! check_kernel_config CONFIG_MICROCODE_INTEL \
|
||||
- && unset early_microcode
|
||||
+ if [[ $(get_cpu_vendor) == "AMD" ]]; then
|
||||
+ check_kernel_config CONFIG_MICROCODE_AMD || unset early_microcode
|
||||
+ elif [[ $(get_cpu_vendor) == "Intel" ]]; then
|
||||
+ check_kernel_config CONFIG_MICROCODE_INTEL || unset early_microcode
|
||||
+ else
|
||||
+ unset early_microcode
|
||||
+ fi
|
||||
else
|
||||
! check_kernel_config CONFIG_MICROCODE_AMD \
|
||||
&& ! check_kernel_config CONFIG_MICROCODE_INTEL \
|
||||
&& unset early_microcode
|
||||
fi
|
||||
- [[ $early_microcode != yes ]] \
|
||||
- && dwarn "Disabling early microcode, because kernel does not support it. CONFIG_MICROCODE_[AMD|INTEL]!=y"
|
||||
+ # Do not complain on non-x86 architectures as it makes no sense
|
||||
+ case $(uname -m) in
|
||||
+ x86_64|i?86)
|
||||
+ [[ $early_microcode != yes ]] \
|
||||
+ && dwarn "Disabling early microcode, because kernel does not support it. CONFIG_MICROCODE_[AMD|INTEL]!=y"
|
||||
+ ;;
|
||||
+ *) ;;
|
||||
+ esac
|
||||
fi
|
||||
|
||||
# Need to be able to have non-root users read stuff (rpcbind etc)
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@ -0,0 +1,90 @@
|
||||
From 3b92d8bf84d8dac57ffc1293f6f5c6d621ddd267 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
|
||||
Date: Sun, 23 Aug 2020 18:15:32 -0300
|
||||
Subject: [PATCH] dracut.sh: fix errors pointed out by shellcheck.
|
||||
|
||||
- use [ ] instead of calling test manually, as most of the script is
|
||||
doing.
|
||||
|
||||
- use quotes in hostonly_cmdline blocks, specially when dealing with the
|
||||
conf files, whose names are set by users/system administrators
|
||||
|
||||
- uefi_splash_image was being assigned set to `${dracutsysroot}...`, which
|
||||
is a variable that doesn't exist.
|
||||
|
||||
- we don't want the conditional to run the output of fsfreeze as
|
||||
commands. Instead, we just need to know if any of the fsfreeze commands
|
||||
failed.
|
||||
|
||||
Conflict:NA
|
||||
Reference:https://github.com/dracutdevs/dracut/commit/3b92d8bf84d8dac57ffc1293f6f5c6d621ddd267
|
||||
---
|
||||
dracut.sh | 16 ++++++++--------
|
||||
1 file changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/dracut.sh b/dracut.sh
|
||||
index c439fa02..fa2388fe 100755
|
||||
--- a/dracut.sh
|
||||
+++ b/dracut.sh
|
||||
@@ -1731,7 +1731,7 @@ fi
|
||||
if [[ $do_strip = yes ]] ; then
|
||||
# Prefer strip from elfutils for package size
|
||||
declare strip_cmd=$(command -v eu-strip)
|
||||
- test -z "$strip_cmd" && strip_cmd="strip"
|
||||
+ [ -z "$strip_cmd" ] && strip_cmd="strip"
|
||||
|
||||
for p in $strip_cmd xargs find; do
|
||||
if ! type -P $p >/dev/null; then
|
||||
@@ -1824,7 +1824,7 @@ if [[ $hostonly_cmdline == "yes" ]] ; then
|
||||
dinfo "Stored kernel commandline:"
|
||||
for conf in $initdir/etc/cmdline.d/*.conf ; do
|
||||
[ -e "$conf" ] || continue
|
||||
- dinfo "$(< $conf)"
|
||||
+ dinfo "$(< "$conf")"
|
||||
_stored_cmdline=1
|
||||
done
|
||||
fi
|
||||
@@ -2004,10 +2004,10 @@ umask 077
|
||||
if [[ $uefi = yes ]]; then
|
||||
if [[ $kernel_cmdline ]]; then
|
||||
echo -n "$kernel_cmdline" > "$uefi_outdir/cmdline.txt"
|
||||
- elif [[ $hostonly_cmdline = yes ]] && [ -d $initdir/etc/cmdline.d ];then
|
||||
- for conf in $initdir/etc/cmdline.d/*.conf ; do
|
||||
+ elif [[ $hostonly_cmdline = yes ]] && [ -d "$initdir/etc/cmdline.d" ];then
|
||||
+ for conf in "$initdir"/etc/cmdline.d/*.conf ; do
|
||||
[ -e "$conf" ] || continue
|
||||
- printf "%s " "$(< $conf)" >> "$uefi_outdir/cmdline.txt"
|
||||
+ printf "%s " "$(< "$conf")" >> "$uefi_outdir/cmdline.txt"
|
||||
done
|
||||
else
|
||||
do_print_cmdline > "$uefi_outdir/cmdline.txt"
|
||||
@@ -2020,7 +2020,7 @@ if [[ $uefi = yes ]]; then
|
||||
[[ -s $dracutsysrootdir/usr/lib/os-release ]] && uefi_osrelease="$dracutsysrootdir/usr/lib/os-release"
|
||||
[[ -s $dracutsysrootdir/etc/os-release ]] && uefi_osrelease="$dracutsysrootdir/etc/os-release"
|
||||
[[ -s "${dracutsysrootdir}${uefi_splash_image}" ]] && \
|
||||
- uefi_splash_image="${dracutsysroot}${uefi_splash_image}" || unset uefi_splash_image
|
||||
+ uefi_splash_image="${dracutsysrootdir}${uefi_splash_image}" || unset uefi_splash_image
|
||||
|
||||
if objcopy \
|
||||
${uefi_osrelease:+--add-section .osrel=$uefi_osrelease --change-section-vma .osrel=0x20000} \
|
||||
@@ -2100,7 +2100,7 @@ freeze_ok_for_fstype() {
|
||||
# and there's no reason to sync, and *definitely* no reason to fsfreeze.
|
||||
# Another case where this happens is rpm-ostree, which performs its own sync/fsfreeze
|
||||
# globally. See e.g. https://github.com/ostreedev/ostree/commit/8642ef5ab3fec3ac8eb8f193054852f83a8bc4d0
|
||||
-if test -d $dracutsysrootdir/run/systemd/system; then
|
||||
+if [ -d "$dracutsysrootdir/run/systemd/system" ]; then
|
||||
if ! sync "$outfile" 2> /dev/null; then
|
||||
dinfo "dracut: sync operation on newly created initramfs $outfile failed"
|
||||
exit 1
|
||||
@@ -2108,7 +2108,7 @@ if test -d $dracutsysrootdir/run/systemd/system; then
|
||||
|
||||
# use fsfreeze only if we're not writing to /
|
||||
if [[ "$(stat -c %m -- "$outfile")" != "/" ]] && freeze_ok_for_fstype "$outfile"; then
|
||||
- if ! $(fsfreeze -f $(dirname "$outfile") 2>/dev/null && fsfreeze -u $(dirname "$outfile") 2>/dev/null); then
|
||||
+ if ! (fsfreeze -f "$(dirname "$outfile")" 2>/dev/null && fsfreeze -u "$(dirname "$outfile")" 2>/dev/null); then
|
||||
dinfo "dracut: warning: could not fsfreeze $(dirname "$outfile")"
|
||||
fi
|
||||
fi
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@ -0,0 +1,27 @@
|
||||
From 63b05a8e6787301dce435bd414a37a8f3ae9cdde Mon Sep 17 00:00:00 2001
|
||||
From: q66 <daniel@octaforge.org>
|
||||
Date: Sat, 25 Jul 2020 17:20:40 +0200
|
||||
Subject: [PATCH] dracut.sh: fix ia32 detection for uefi executables
|
||||
|
||||
Conflict:NA
|
||||
Reference:https://github.com/dracutdevs/dracut/commit/63b05a8e6787301dce435bd414a37a8f3ae9cdde
|
||||
---
|
||||
dracut.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dracut.sh b/dracut.sh
|
||||
index d5dfa77d..8f78da06 100755
|
||||
--- a/dracut.sh
|
||||
+++ b/dracut.sh
|
||||
@@ -1153,7 +1153,7 @@ if [[ ! $print_cmdline ]]; then
|
||||
case $(uname -m) in
|
||||
x86_64)
|
||||
EFI_MACHINE_TYPE_NAME=x64;;
|
||||
- ia32)
|
||||
+ i?86)
|
||||
EFI_MACHINE_TYPE_NAME=ia32;;
|
||||
*)
|
||||
dfatal "Architecture '$(uname -m)' not supported to create a UEFI executable"
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@ -0,0 +1,32 @@
|
||||
From 3f2c76bb1456941a28d3333569d2bf18f8624617 Mon Sep 17 00:00:00 2001
|
||||
From: Martin Wilck <mwilck@suse.com>
|
||||
Date: Wed, 19 Jan 2022 10:37:19 +0100
|
||||
Subject: [PATCH] fix(40network): consistent use of "$gw" for gateway
|
||||
|
||||
Replace wrong use of $gateway with $gw.
|
||||
|
||||
Signed-off-by: Martin Wilck <mwilck@suse.com>
|
||||
|
||||
Reference:https://github.com/dracutdevs/dracut/commit/3f2c76bb1456941a28d3333569d2bf18f8624617
|
||||
Conflict:Modify context for adaption
|
||||
|
||||
---
|
||||
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 54bb6775..a294a390 100755
|
||||
--- a/modules.d/40network/net-lib.sh
|
||||
+++ b/modules.d/40network/net-lib.sh
|
||||
@@ -295,7 +295,7 @@ ibft_to_cmdline() {
|
||||
# skip not assigned ip adresses
|
||||
[ "$ip" = "0.0.0.0" ] && continue
|
||||
[ -e ${iface}/gateway ] && gw=$(read a < ${iface}/gateway; echo $a)
|
||||
- [ "$gateway" = "0.0.0.0" ] && unset $gateway
|
||||
+ [ "$gw" = "0.0.0.0" ] && unset gw
|
||||
[ -e ${iface}/subnet-mask ] && mask=$(read a < ${iface}/subnet-mask; echo $a)
|
||||
[ -e ${iface}/prefix-len ] && prefix=$(read a < ${iface}/prefix-len; echo $a)
|
||||
[ -e ${iface}/primary-dns ] && dns1=$(read a < ${iface}/primary-dns; echo $a)
|
||||
--
|
||||
2.33.0
|
||||
|
||||
27
backport-fix-dmsquash-live-iso-scan-requires-rmdir.patch
Normal file
27
backport-fix-dmsquash-live-iso-scan-requires-rmdir.patch
Normal file
@ -0,0 +1,27 @@
|
||||
From e19e38904c054664473207d2d6ef3c53bd938867 Mon Sep 17 00:00:00 2001
|
||||
From: Laszlo Gombos <laszlo.gombos@gmail.com>
|
||||
Date: Sun, 3 Oct 2021 20:53:48 -0400
|
||||
Subject: [PATCH] fix(dmsquash-live): iso-scan requires rmdir
|
||||
|
||||
Reference: https://github.com/dracutdevs/dracut/commit/e19e38904c054664473207d2d6ef3c53bd938867
|
||||
Conflict: NA
|
||||
---
|
||||
modules.d/90dmsquash-live/module-setup.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/90dmsquash-live/module-setup.sh b/modules.d/90dmsquash-live/module-setup.sh
|
||||
index 70be1852..bae9afd7 100755
|
||||
--- a/modules.d/90dmsquash-live/module-setup.sh
|
||||
+++ b/modules.d/90dmsquash-live/module-setup.sh
|
||||
@@ -22,7 +22,7 @@ installkernel() {
|
||||
|
||||
# called by dracut
|
||||
install() {
|
||||
- inst_multiple umount dmsetup blkid dd losetup blockdev find
|
||||
+ inst_multiple umount dmsetup blkid dd losetup blockdev find rmdir
|
||||
inst_multiple -o checkisomd5
|
||||
inst_hook cmdline 30 "$moddir/parse-dmsquash-live.sh"
|
||||
inst_hook cmdline 31 "$moddir/parse-iso-scan.sh"
|
||||
--
|
||||
2.27.0
|
||||
|
||||
63
backport-fix-dracut-functions.sh-ip-route-parsing.patch
Normal file
63
backport-fix-dracut-functions.sh-ip-route-parsing.patch
Normal file
@ -0,0 +1,63 @@
|
||||
From d754e1c6f081a6501cb7fdcb5caaa6c4977235af Mon Sep 17 00:00:00 2001
|
||||
From: Martin Wilck <mwilck@suse.com>
|
||||
Date: Fri, 21 Jan 2022 21:25:54 +0100
|
||||
Subject: [PATCH] fix(dracut-functions.sh): ip route parsing
|
||||
|
||||
The code for determining local interface and address works
|
||||
only for peers that are reachable in a single hop.
|
||||
|
||||
This is parsed correctly:
|
||||
192.168.110.1 dev br0 src 192.168.110.160 uid 0 \ cache
|
||||
|
||||
But this isn't:
|
||||
192.168.1.4 via 192.168.110.1 dev br0 src 192.168.110.160 uid 0 \ cache
|
||||
|
||||
Fix it.
|
||||
|
||||
Fixes: ceca74cc ("dracut-functions: add ip_params_for_remote_addr() helper")
|
||||
|
||||
Reference:https://github.com/dracutdevs/dracut/commit/d754e1c6f081a6501cb7fdcb5caaa6c4977235af
|
||||
Conflict:Modify context for adaption
|
||||
|
||||
---
|
||||
dracut-functions.sh | 20 ++++++++++++++++++--
|
||||
1 file changed, 18 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dracut-functions.sh b/dracut-functions.sh
|
||||
index 63b6c892..8503c22f 100755
|
||||
--- a/dracut-functions.sh
|
||||
+++ b/dracut-functions.sh
|
||||
@@ -731,12 +731,28 @@ btrfs_devs() {
|
||||
|
||||
iface_for_remote_addr() {
|
||||
set -- $(ip -o route get to "$1")
|
||||
- echo $3
|
||||
+ while [ $# -gt 0 ]; do
|
||||
+ case $1 in
|
||||
+ dev)
|
||||
+ echo "$2"
|
||||
+ return
|
||||
+ ;;
|
||||
+ esac
|
||||
+ shift
|
||||
+ done
|
||||
}
|
||||
|
||||
local_addr_for_remote_addr() {
|
||||
set -- $(ip -o route get to "$1")
|
||||
- echo $5
|
||||
+ while [ $# -gt 0 ]; do
|
||||
+ case $1 in
|
||||
+ src)
|
||||
+ echo "$2"
|
||||
+ return
|
||||
+ ;;
|
||||
+ esac
|
||||
+ shift
|
||||
+ done
|
||||
}
|
||||
|
||||
peer_for_addr() {
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -0,0 +1,83 @@
|
||||
From e9ed44c8864445d85018e31064cd888c358f1daf Mon Sep 17 00:00:00 2001
|
||||
From: Tao Liu <ltao@redhat.com>
|
||||
Date: Thu, 3 Nov 2022 17:21:25 +0800
|
||||
Subject: [PATCH] fix(dracut-functions.sh): suppress findmnt error msg if
|
||||
/etc/fstab not exist
|
||||
|
||||
When the rootfs of a virtual machine is virtiofs shared folder,
|
||||
the /etc/fstab file may not exist. As a result, the "findmnt --fstab"
|
||||
will complain "findmnt: can't read (null): No such file or directory"
|
||||
when trying to rebuild kdump initramfs within the vm.
|
||||
|
||||
This patch checks if /etc/fstab exist before calling "findmnt --fstab"
|
||||
to suppress the error message.
|
||||
|
||||
Before:
|
||||
$ kdumpctl rebuild
|
||||
kdump: Rebuilding /boot/initramfs-5.14.0-182.el9.x86_64kdump.img
|
||||
findmnt: can't read (null): No such file or directory
|
||||
findmnt: can't read (null): No such file or directory
|
||||
findmnt: can't read (null): No such file or directory
|
||||
|
||||
After:
|
||||
$ kdumpctl rebuild
|
||||
kdump: Rebuilding /boot/initramfs-5.14.0-182.el9.x86_64kdump.img
|
||||
|
||||
Signed-off-by: Tao Liu <ltao@redhat.com>
|
||||
|
||||
Conflict:require adaption
|
||||
Reference:https://github.com/dracutdevs/dracut/commit/e9ed44c8864445d85018e31064cd888c358f1daf
|
||||
---
|
||||
dracut-functions.sh | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
diff --git a/dracut-functions.sh b/dracut-functions.sh
|
||||
index 9220c34..b0e9fa8 100755
|
||||
--- a/dracut-functions.sh
|
||||
+++ b/dracut-functions.sh
|
||||
@@ -357,6 +357,7 @@ find_block_device() {
|
||||
done; return 1; } && return 0
|
||||
fi
|
||||
# fall back to /etc/fstab
|
||||
+ [[ ! -f "$dracutsysrootdir"/etc/fstab ]] && return 1
|
||||
|
||||
findmnt -e --fstab -v -n -o 'MAJ:MIN,SOURCE' --target "$_find_mpt" | { \
|
||||
while read _majmin _dev || [ -n "$_dev" ]; do
|
||||
@@ -403,6 +404,8 @@ find_mp_fstype() {
|
||||
done; return 1; } && return 0
|
||||
fi
|
||||
|
||||
+ [[ ! -f "$dracutsysrootdir"/etc/fstab ]] && return 1
|
||||
+
|
||||
findmnt --fstab -e -v -n -o 'FSTYPE' --target "$1" | { \
|
||||
while read _fs || [ -n "$_fs" ]; do
|
||||
[[ $_fs ]] || continue
|
||||
@@ -439,6 +442,8 @@ find_dev_fstype() {
|
||||
done; return 1; } && return 0
|
||||
fi
|
||||
|
||||
+ [[ ! -f "$dracutsysrootdir"/etc/fstab ]] && return 1
|
||||
+
|
||||
findmnt --fstab -e -v -n -o 'FSTYPE' --source "$_find_dev" | { \
|
||||
while read _fs || [ -n "$_fs" ]; do
|
||||
[[ $_fs ]] || continue
|
||||
@@ -463,6 +468,8 @@ find_mp_fsopts() {
|
||||
findmnt -e -v -n -o 'OPTIONS' --target "$1" 2>/dev/null && return 0
|
||||
fi
|
||||
|
||||
+ [[ ! -f "$dracutsysrootdir"/etc/fstab ]] && return 1
|
||||
+
|
||||
findmnt --fstab -e -v -n -o 'OPTIONS' --target "$1"
|
||||
}
|
||||
|
||||
@@ -484,6 +491,8 @@ find_dev_fsopts() {
|
||||
findmnt -e -v -n -o 'OPTIONS' --source "$_find_dev" 2>/dev/null && return 0
|
||||
fi
|
||||
|
||||
+ [[ ! -f "$dracutsysrootdir"/etc/fstab ]] && return 1
|
||||
+
|
||||
findmnt --fstab -e -v -n -o 'OPTIONS' --source "$_find_dev"
|
||||
}
|
||||
|
||||
--
|
||||
2.23.0
|
||||
@ -0,0 +1,45 @@
|
||||
From e2fdb30b56305aed9d3be32f394352c7c3fdbcef Mon Sep 17 00:00:00 2001
|
||||
From: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
|
||||
Date: Tue, 16 Aug 2022 08:23:19 +0200
|
||||
Subject: [PATCH] fix(dracut-init.sh): add missing hostonly code in the
|
||||
inst_multiple function
|
||||
|
||||
It seems that commit https://github.com/dracutdevs/dracut/commit/4ef45f13 forgot
|
||||
to add the code to handle the hostonly parameter in the inst_multiple function.
|
||||
|
||||
Conflict:require adaption
|
||||
Reference:https://github.com/dracutdevs/dracut/commit/e2fdb30b56305aed9d3be32f394352c7c3fdbcef
|
||||
---
|
||||
dracut-init.sh | 17 ++++++++++++-----
|
||||
1 file changed, 12 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/dracut-init.sh b/dracut-init.sh
|
||||
index 3443c63..9bfcefe 100644
|
||||
--- a/dracut-init.sh
|
||||
+++ b/dracut-init.sh
|
||||
@@ -238,11 +238,18 @@ inst_symlink() {
|
||||
}
|
||||
|
||||
inst_multiple() {
|
||||
- local _ret
|
||||
- $DRACUT_INSTALL ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} -a ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} "$@"
|
||||
- _ret=$?
|
||||
- (($_ret != 0)) && derror FAILED: $DRACUT_INSTALL ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} -a ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@" || :
|
||||
- return $_ret
|
||||
+ local _ret _hostonly_install
|
||||
+ if [[ $1 == "-H" ]]; then
|
||||
+ _hostonly_install="-H"
|
||||
+ shift
|
||||
+ fi
|
||||
+ if $DRACUT_INSTALL ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} -a ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@"; then
|
||||
+ return 0
|
||||
+ else
|
||||
+ _ret=$?
|
||||
+ derror FAILED: "$DRACUT_INSTALL" ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} -a ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@"
|
||||
+ return $_ret
|
||||
+ fi
|
||||
}
|
||||
|
||||
dracut_install() {
|
||||
--
|
||||
2.23.0
|
||||
@ -0,0 +1,28 @@
|
||||
From b12ee558f5660073ad26415794570188e8a427b0 Mon Sep 17 00:00:00 2001
|
||||
From: Marcos Mello <marcosfrm@gmail.com>
|
||||
Date: Sun, 6 Nov 2022 12:43:47 -0300
|
||||
Subject: [PATCH] fix(dracut-init.sh): instmods: wrong variable name
|
||||
|
||||
It worked most of the time because `dracut-install -o` returns 0 in normal circumstances.
|
||||
|
||||
Conflict:require adaption
|
||||
Reference:https://github.com/dracutdevs/dracut/commit/b12ee558f5660073ad26415794570188e8a427b0
|
||||
---
|
||||
dracut-init.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dracut-init.sh b/dracut-init.sh
|
||||
index 837267a..3443c63 100644
|
||||
--- a/dracut-init.sh
|
||||
+++ b/dracut-init.sh
|
||||
@@ -995,7 +995,7 @@ instmods() {
|
||||
-m "$@"
|
||||
fi
|
||||
|
||||
- [[ "$optional" ]] && return 0
|
||||
+ [[ "$_optional" ]] && return 0
|
||||
return $_ret
|
||||
}
|
||||
|
||||
--
|
||||
2.23.0
|
||||
@ -0,0 +1,49 @@
|
||||
From 9ef73b6ad08c19c3906564e5a15c7908ed9a81c8 Mon Sep 17 00:00:00 2001
|
||||
From: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
|
||||
Date: Mon, 4 Apr 2022 11:55:59 +0200
|
||||
Subject: [PATCH] fix(dracut-install): copy files preserving ownership
|
||||
attributes
|
||||
|
||||
While the "clone copy" operation changes the ownership of the cloned
|
||||
files, the "normal copy" using cp does not preserve it.
|
||||
|
||||
Reference:https://github.com/dracutdevs/dracut/commit/9ef73b6ad08c19c3906564e5a15c7908ed9a81c8
|
||||
Conflict:Modify context for adaption
|
||||
|
||||
---
|
||||
install/dracut-install.c | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/install/dracut-install.c b/install/dracut-install.c
|
||||
index d7a1cd9b..7c6d91c1 100644
|
||||
--- a/install/dracut-install.c
|
||||
+++ b/install/dracut-install.c
|
||||
@@ -312,10 +312,10 @@ static int cp(const char *src, const char *dst)
|
||||
pid = fork();
|
||||
if (pid == 0) {
|
||||
if (geteuid() == 0 && no_xattr == false)
|
||||
- execlp("cp", "cp", "--reflink=auto", "--sparse=auto", "--preserve=mode,xattr,timestamps", "-fL", src, dst,
|
||||
+ execlp("cp", "cp", "--reflink=auto", "--sparse=auto", "--preserve=mode,xattr,timestamps,ownership", "-fL", src, dst,
|
||||
NULL);
|
||||
else
|
||||
- execlp("cp", "cp", "--reflink=auto", "--sparse=auto", "--preserve=mode,timestamps", "-fL", src, dst,
|
||||
+ execlp("cp", "cp", "--reflink=auto", "--sparse=auto", "--preserve=mode,timestamps,ownership", "-fL", src, dst,
|
||||
NULL);
|
||||
_exit(EXIT_FAILURE);
|
||||
}
|
||||
@@ -324,10 +324,10 @@ static int cp(const char *src, const char *dst)
|
||||
if (errno != EINTR) {
|
||||
ret = -1;
|
||||
if (geteuid() == 0 && no_xattr == false)
|
||||
- log_error("Failed: cp --reflink=auto --sparse=auto --preserve=mode,xattr,timestamps -fL %s %s", src,
|
||||
+ log_error("Failed: cp --reflink=auto --sparse=auto --preserve=mode,xattr,timestamps,ownership -fL %s %s", src,
|
||||
dst);
|
||||
else
|
||||
- log_error("Failed: cp --reflink=auto --sparse=auto --preserve=mode,timestamps -fL %s %s", src,
|
||||
+ log_error("Failed: cp --reflink=auto --sparse=auto --preserve=mode,timestamps,ownership -fL %s %s", src,
|
||||
dst);
|
||||
break;
|
||||
}
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -0,0 +1,80 @@
|
||||
From 2f791b401b287f67f2421452b5f82cdb5285a637 Mon Sep 17 00:00:00 2001
|
||||
From: runsisi <runsisi@hust.edu.cn>
|
||||
Date: Sat, 6 Aug 2022 10:15:48 +0800
|
||||
Subject: [PATCH] fix(dracut-install): use stripped kernel module path as hash
|
||||
key
|
||||
|
||||
in install_dependent_modules we use &path[kerneldirlen] as the key for inserting,
|
||||
let's do the same for checking.
|
||||
|
||||
otherwise installing kernel module has circular dependency from a custom kernel
|
||||
module directory will cause infinite recursion and segfault.
|
||||
|
||||
$ grep ipmi kbuilt/lib/modules/5.10.121/modules.dep
|
||||
kernel/drivers/char/ipmi/ipmi_msghandler.ko:
|
||||
kernel/drivers/char/ipmi/ipmi_devintf.ko: kernel/drivers/char/ipmi/ipmi_msghandler.ko
|
||||
|
||||
$ grep ipmi kbuilt/lib/modules/5.10.121/modules.softdep
|
||||
softdep ipmi_msghandler post: ipmi_devintf
|
||||
|
||||
$ ./dracut-install -D /tmp --kerneldir ~/working/kernel/linux-5.10.121/kbuilt/lib/modules/5.10.121 -m ipmi-devintf
|
||||
Segmentation fault (core dumped)
|
||||
|
||||
(gdb) b install_dependent_modules
|
||||
Breakpoint 1 at 0x7db0: file src/install/dracut-install.c, line 1513.
|
||||
(gdb) bt
|
||||
#0 install_dependent_modules (modlist=0x0) at src/install/dracut-install.c:1513
|
||||
#1 0x000055555555c027 in install_dependent_modules (modlist=modlist@entry=0x555555579e90) at src/install/dracut-install.c:1553
|
||||
#2 0x000055555555bf1c in install_dependent_modules (modlist=0x5555555799d0) at src/install/dracut-install.c:1548
|
||||
#3 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x55555557a3f0) at src/install/dracut-install.c:1554
|
||||
#4 0x000055555555bf1c in install_dependent_modules (modlist=0x555555579d60) at src/install/dracut-install.c:1548
|
||||
#5 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x55555557b170) at src/install/dracut-install.c:1554
|
||||
#6 0x000055555555bf1c in install_dependent_modules (modlist=0x55555557a0f0) at src/install/dracut-install.c:1548
|
||||
#7 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x555555575320) at src/install/dracut-install.c:1554
|
||||
#8 0x000055555555bf1c in install_dependent_modules (modlist=0x55555557ab30) at src/install/dracut-install.c:1548
|
||||
#9 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x55555557dd60) at src/install/dracut-install.c:1554
|
||||
#10 0x000055555555bf1c in install_dependent_modules (modlist=0x55555557b640) at src/install/dracut-install.c:1548
|
||||
#11 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x55555557e0f0) at src/install/dracut-install.c:1554
|
||||
#12 0x000055555555bf1c in install_dependent_modules (modlist=0x55555557b9d0) at src/install/dracut-install.c:1548
|
||||
#13 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x555555574340) at src/install/dracut-install.c:1554
|
||||
#14 0x000055555555bf1c in install_dependent_modules (modlist=0x55555557cf70) at src/install/dracut-install.c:1548
|
||||
#15 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x5555555768d0) at src/install/dracut-install.c:1554
|
||||
#16 0x000055555555bf1c in install_dependent_modules (modlist=0x55555557d750) at src/install/dracut-install.c:1548
|
||||
#17 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x55555557e700) at src/install/dracut-install.c:1554
|
||||
#18 0x000055555555bf1c in install_dependent_modules (modlist=0x55555557de90) at src/install/dracut-install.c:1548
|
||||
#19 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x555555581c90) at src/install/dracut-install.c:1554
|
||||
#20 0x000055555555bf1c in install_dependent_modules (modlist=0x555555571e60) at src/install/dracut-install.c:1548
|
||||
#21 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x55555556b620) at src/install/dracut-install.c:1554
|
||||
#22 0x000055555555bf1c in install_dependent_modules (modlist=0x555555583000) at src/install/dracut-install.c:1548
|
||||
#23 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x55555556b640) at src/install/dracut-install.c:1554
|
||||
#24 0x000055555555bf1c in install_dependent_modules (modlist=0x555555571b40) at src/install/dracut-install.c:1548
|
||||
#25 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x555555574100) at src/install/dracut-install.c:1554
|
||||
#26 0x000055555555c4b0 in install_module (mod=mod@entry=0x555555573bc0) at src/install/dracut-install.c:1617
|
||||
#27 0x000055555555c93d in install_modules (argc=argc@entry=1, argv=argv@entry=0x7fffffffd6e0) at src/install/dracut-install.c:1952
|
||||
#28 0x000055555555862a in main (argc=<optimized out>, argv=0x7fffffffd6a8) at src/install/dracut-install.c:2090
|
||||
|
||||
Signed-off-by: runsisi <runsisi@hust.edu.cn>
|
||||
|
||||
Reference:https://github.com/dracutdevs/dracut/commit/2f791b401b287f67f2421452b5f82cdb5285a637
|
||||
Conflict:Modify context for adaption
|
||||
|
||||
---
|
||||
install/dracut-install.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/install/dracut-install.c b/install/dracut-install.c
|
||||
index 8c0c1f7..ee8c326 100644
|
||||
--- a/install/dracut-install.c
|
||||
+++ b/install/dracut-install.c
|
||||
@@ -1488,7 +1488,7 @@ static int install_dependent_modules(struct kmod_list *modlist)
|
||||
if (check_hashmap(items_failed, path))
|
||||
return -1;
|
||||
|
||||
- if (check_hashmap(items, path)) {
|
||||
+ if (check_hashmap(items, &path[kerneldirlen])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -0,0 +1,43 @@
|
||||
From b2d7561b98d08c7e4018aa22dc36dc1242e50f09 Mon Sep 17 00:00:00 2001
|
||||
From: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
|
||||
Date: Mon, 10 Oct 2022 10:25:33 +0200
|
||||
Subject: [PATCH] fix(dracut): replace invalid lzo command with lzop for LZO
|
||||
compression
|
||||
|
||||
Fixes issue #1999
|
||||
|
||||
Conflict:require adaption
|
||||
Reference:https://github.com/dracutdevs/dracut/commit/b2d7561b98d08c7e4018aa22dc36dc1242e50f09
|
||||
---
|
||||
dracut.conf.5.asc | 2 +-
|
||||
dracut.sh | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dracut.conf.5.asc b/dracut.conf.5.asc
|
||||
index 937f542..36878e4 100644
|
||||
--- a/dracut.conf.5.asc
|
||||
+++ b/dracut.conf.5.asc
|
||||
@@ -80,7 +80,7 @@ Configuration files must have the extension .conf; other extensions are ignored.
|
||||
Specify additional files to include in the initramfs, separated by spaces,
|
||||
if they exist.
|
||||
|
||||
-*compress=*"__{bzip2|lzma|xz|gzip|lzo|lz4|zstd|<compressor [args ...]>}__"::
|
||||
+*compress=*"__{bzip2|lzma|xz|gzip|lzop|lz4|zstd|<compressor [args ...]>}__"::
|
||||
Compress the generated initramfs using the passed compression program. If
|
||||
you pass it just the name of a compression program, it will call that
|
||||
program with known-working arguments. If you pass arguments, it will be called
|
||||
diff --git a/dracut.sh b/dracut.sh
|
||||
index e1ba53e..03c5985 100755
|
||||
--- a/dracut.sh
|
||||
+++ b/dracut.sh
|
||||
@@ -596,7 +596,7 @@ while :; do
|
||||
--bzip2) compress_l="bzip2";;
|
||||
--lzma) compress_l="lzma";;
|
||||
--xz) compress_l="xz";;
|
||||
- --lzo) compress_l="lzo";;
|
||||
+ --lzo) compress_l="lzop";;
|
||||
--lz4) compress_l="lz4";;
|
||||
--zstd) compress_l="zstd";;
|
||||
--no-compress) _no_compress_l="cat";;
|
||||
--
|
||||
2.23.0
|
||||
27
backport-fix-dracut.sh-change-misspelled-variable-name.patch
Normal file
27
backport-fix-dracut.sh-change-misspelled-variable-name.patch
Normal file
@ -0,0 +1,27 @@
|
||||
From acfd97a94385c33cd6cef4e5a37f233ea4081288 Mon Sep 17 00:00:00 2001
|
||||
From: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
|
||||
Date: Thu, 9 Sep 2021 11:34:18 +0200
|
||||
Subject: [PATCH] fix(dracut.sh): change misspelled variable name
|
||||
|
||||
Reference:https://github.com/dracutdevs/dracut/commit/acfd97a94385c33cd6cef4e5a37f233ea4081288
|
||||
Conflict:context adaptation
|
||||
---
|
||||
dracut.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dracut.sh b/dracut.sh
|
||||
index 3826c73e..19d21ed9 100755
|
||||
--- a/dracut.sh
|
||||
+++ b/dracut.sh
|
||||
@@ -2336,7 +2336,7 @@ fi
|
||||
|
||||
if ! [[ $compress ]]; then
|
||||
# check all known compressors, if none specified
|
||||
- for i in $DRACUT_COMPRESS_PIGZ $DRACUT_COMPRESS_GZIP $DRACUT_COMPRESS_LZ4 $DRACUT_COMPRESS_LZOP $DRACUT_COMPRESS_ZSTD $DRACUT_COMPRESS_LZMA $DRACUT_COMPRESS_XZ $DRACUT_COMPRESS_LBZIP2 $OMPRESS_BZIP2 $DRACUT_COMPRESS_CAT; do
|
||||
+ for i in $DRACUT_COMPRESS_PIGZ $DRACUT_COMPRESS_GZIP $DRACUT_COMPRESS_LZ4 $DRACUT_COMPRESS_LZOP $DRACUT_COMPRESS_ZSTD $DRACUT_COMPRESS_LZMA $DRACUT_COMPRESS_XZ $DRACUT_COMPRESS_LBZIP2 $DRACUT_COMPRESS_BZIP2 $DRACUT_COMPRESS_CAT; do
|
||||
command -v "$i" &>/dev/null || continue
|
||||
compress="$i"
|
||||
break
|
||||
--
|
||||
2.27.0
|
||||
|
||||
@ -0,0 +1,49 @@
|
||||
From 7de9ffc0574790ecbad74b5a000ecd022d7736d4 Mon Sep 17 00:00:00 2001
|
||||
From: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
|
||||
Date: Thu, 14 Oct 2021 17:10:27 +0200
|
||||
Subject: [PATCH] fix(dracut.sh): do not ignore invalid config file or dir path
|
||||
|
||||
Fix issue #1136
|
||||
|
||||
Reference: https://github.com/dracutdevs/dracut/commit/7de9ffc0574790ecbad74b5a000ecd022d7736d4
|
||||
Conflict: Context adaptation
|
||||
---
|
||||
dracut.sh | 10 ++++++++--
|
||||
1 file changed, 8 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dracut.sh b/dracut.sh
|
||||
index fecd8a3..7276550 100755
|
||||
--- a/dracut.sh
|
||||
+++ b/dracut.sh
|
||||
@@ -692,20 +692,26 @@ export DRACUT_LOG_LEVEL=warning
|
||||
[[ $dracutbasedir ]] || dracutbasedir=$dracutsysrootdir/usr/lib/dracut
|
||||
|
||||
# if we were not passed a config file, try the default one
|
||||
-if [[ ! -f $conffile ]]; then
|
||||
+if [[ -z $conffile ]]; then
|
||||
if [[ $allowlocal ]]; then
|
||||
conffile="$dracutbasedir/dracut.conf"
|
||||
else
|
||||
conffile="$dracutsysrootdir/etc/dracut.conf"
|
||||
fi
|
||||
+elif [[ ! -f $conffile ]]; then
|
||||
+ printf "%s\n" "dracut: Configuration file '$conffile' not found." >&2
|
||||
+ exit 1
|
||||
fi
|
||||
|
||||
-if [[ ! -d $confdir ]]; then
|
||||
+if [[ -z $confdir ]]; then
|
||||
if [[ $allowlocal ]]; then
|
||||
confdir="$dracutbasedir/dracut.conf.d"
|
||||
else
|
||||
confdir="$dracutsysrootdir/etc/dracut.conf.d"
|
||||
fi
|
||||
+elif [[ ! -d $confdir ]]; then
|
||||
+ printf "%s\n" "dracut: Configuration directory '$confdir' not found." >&2
|
||||
+ exit 1
|
||||
fi
|
||||
|
||||
# source our config file
|
||||
--
|
||||
2.27.0
|
||||
|
||||
27
backport-fix-dracut.sh-remove-wrong-in-loop-sequence.patch
Normal file
27
backport-fix-dracut.sh-remove-wrong-in-loop-sequence.patch
Normal file
@ -0,0 +1,27 @@
|
||||
From f1245b5bc13a98ef0dcc679dcef6148214e09503 Mon Sep 17 00:00:00 2001
|
||||
From: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
|
||||
Date: Wed, 8 Sep 2021 14:02:01 +0200
|
||||
Subject: [PATCH] fix(dracut.sh): remove wrong $ in loop sequence
|
||||
|
||||
Reference:https://github.com/dracutdevs/dracut/commit/f1245b5bc13a98ef0dcc679dcef6148214e09503
|
||||
Conflict:context adaptation
|
||||
---
|
||||
dracut.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dracut.sh b/dracut.sh
|
||||
index 78917763..3826c73e 100755
|
||||
--- a/dracut.sh
|
||||
+++ b/dracut.sh
|
||||
@@ -2336,7 +2336,7 @@ fi
|
||||
|
||||
if ! [[ $compress ]]; then
|
||||
# check all known compressors, if none specified
|
||||
- for i in $DRACUT_COMPRESS_PIGZ $DRACUT_COMPRESS_GZIP $DRACUT_COMPRESS_LZ4 $DRACUT_COMPRESS_LZOP $ $DRACUT_COMPRESS_ZSTD $DRACUT_COMPRESS_LZMA $DRACUT_COMPRESS_XZ $DRACUT_COMPRESS_LBZIP2 $OMPRESS_BZIP2 $DRACUT_COMPRESS_CAT; do
|
||||
+ for i in $DRACUT_COMPRESS_PIGZ $DRACUT_COMPRESS_GZIP $DRACUT_COMPRESS_LZ4 $DRACUT_COMPRESS_LZOP $DRACUT_COMPRESS_ZSTD $DRACUT_COMPRESS_LZMA $DRACUT_COMPRESS_XZ $DRACUT_COMPRESS_LBZIP2 $OMPRESS_BZIP2 $DRACUT_COMPRESS_CAT; do
|
||||
command -v "$i" &>/dev/null || continue
|
||||
compress="$i"
|
||||
break
|
||||
--
|
||||
2.27.0
|
||||
|
||||
42
backport-fix-i18n-create-the-keyboard-symlinks-again.patch
Normal file
42
backport-fix-i18n-create-the-keyboard-symlinks-again.patch
Normal file
@ -0,0 +1,42 @@
|
||||
From 9e1c7f3deadd387adaa97b189593b4ba3d7c6d5a Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Tue, 16 Feb 2021 14:17:50 +0100
|
||||
Subject: [PATCH] fix(i18n): create the keyboard symlinks again
|
||||
|
||||
Invalid space broke the creation of the keyboard subdirectories,
|
||||
leading to a symbolic link
|
||||
|
||||
usr/share/consolefonts,consoletrans,keymaps,unimaps ->
|
||||
/usr/lib/kbd/consolefonts,consoletrans,keymaps,unimaps
|
||||
|
||||
in the created initramfs.
|
||||
|
||||
With this fix the correct symlinks are created again:
|
||||
|
||||
usr/share/consolefonts -> /usr/lib/kbd/consolefonts
|
||||
usr/share/consoletrans -> /usr/lib/kbd/consoletrans
|
||||
usr/share/keymaps -> /usr/lib/kbd/keymaps
|
||||
usr/share/unimaps -> /usr/lib/kbd/unimaps
|
||||
|
||||
Conflict:NA
|
||||
Reference:https://github.com/dracutdevs/dracut/commit/9e1c7f3deadd387adaa97b189593b4ba3d7c6d5a
|
||||
---
|
||||
modules.d/10i18n/module-setup.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/10i18n/module-setup.sh b/modules.d/10i18n/module-setup.sh
|
||||
index 04a402f1..b55804ea 100755
|
||||
--- a/modules.d/10i18n/module-setup.sh
|
||||
+++ b/modules.d/10i18n/module-setup.sh
|
||||
@@ -110,7 +110,7 @@ install() {
|
||||
|
||||
if [[ ${kbddir} != "/usr/share" ]]; then
|
||||
inst_dir /usr/share
|
||||
- for _src in $(eval echo "{ ${KBDSUBDIRS} }"); do
|
||||
+ for _src in $(eval echo "{${KBDSUBDIRS}}"); do
|
||||
[ ! -e "${initdir}/usr/share/${_src}" ] && ln -s "${kbddir}/${_src}" "${initdir}/usr/share/${_src}"
|
||||
done
|
||||
fi
|
||||
--
|
||||
2.19.1
|
||||
|
||||
75
backport-fix-i18n-get-rid-of-eval-calls.patch
Normal file
75
backport-fix-i18n-get-rid-of-eval-calls.patch
Normal file
@ -0,0 +1,75 @@
|
||||
From 5387ed24c8b33da1214232d57ab1831e117aaba0 Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Tue, 16 Feb 2021 15:16:41 +0100
|
||||
Subject: [PATCH] fix(i18n): get rid of `eval` calls
|
||||
|
||||
By changing KBDSUBDIRS to a bash array, all kinds of `eval` quirks are
|
||||
avoided.
|
||||
|
||||
Conflict:NA
|
||||
Reference:https://github.com/dracutdevs/dracut/commit/5387ed24c8b33da1214232d57ab1831e117aaba0
|
||||
---
|
||||
modules.d/10i18n/module-setup.sh | 26 ++++++++++++--------------
|
||||
1 file changed, 12 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/modules.d/10i18n/module-setup.sh b/modules.d/10i18n/module-setup.sh
|
||||
index b55804ea..d6688b47 100755
|
||||
--- a/modules.d/10i18n/module-setup.sh
|
||||
+++ b/modules.d/10i18n/module-setup.sh
|
||||
@@ -22,7 +22,7 @@ install() {
|
||||
[[ -f "$dracutsysrootdir"/etc/vconsole.conf ]] && . "$dracutsysrootdir"/etc/vconsole.conf
|
||||
fi
|
||||
|
||||
- KBDSUBDIRS=consolefonts,consoletrans,keymaps,unimaps
|
||||
+ KBDSUBDIRS=(consolefonts consoletrans keymaps unimaps)
|
||||
DEFAULT_FONT="${i18n_default_font:-eurlatgr}"
|
||||
I18N_CONF="/etc/locale.conf"
|
||||
VCONFIG_CONF="/etc/vconsole.conf"
|
||||
@@ -110,7 +110,7 @@ install() {
|
||||
|
||||
if [[ ${kbddir} != "/usr/share" ]]; then
|
||||
inst_dir /usr/share
|
||||
- for _src in $(eval echo "{${KBDSUBDIRS}}"); do
|
||||
+ for _src in "${KBDSUBDIRS[@]}"; do
|
||||
[ ! -e "${initdir}/usr/share/${_src}" ] && ln -s "${kbddir}/${_src}" "${initdir}/usr/share/${_src}"
|
||||
done
|
||||
fi
|
||||
@@ -119,10 +119,9 @@ install() {
|
||||
install_all_kbd() {
|
||||
local rel f
|
||||
|
||||
- for __src in $(eval echo $dracutsysrootdir${kbddir}/{${KBDSUBDIRS}}); do
|
||||
- _src=${__src#$dracutsysrootdir}
|
||||
- inst_dir "$_src"
|
||||
- $DRACUT_CP -L -t "${initdir}/${_src}" "$__src"/*
|
||||
+ for _src in "${KBDSUBDIRS[@]}"; do
|
||||
+ inst_dir "${kbddir}/$_src"
|
||||
+ $DRACUT_CP -L -t "${initdir}/${kbddir}/$_src" "${dracutsysrootdir}${kbddir}/$_src"/*
|
||||
done
|
||||
|
||||
# remove unnecessary files
|
||||
@@ -242,14 +241,13 @@ install() {
|
||||
}
|
||||
|
||||
checks() {
|
||||
- for kbddir in ${kbddir} /usr/lib/kbd /lib/kbd /usr/share /usr/share/kbd
|
||||
- do
|
||||
- [[ -d "$dracutsysrootdir${kbddir}" ]] && \
|
||||
- for dir in ${KBDSUBDIRS//,/ }
|
||||
- do
|
||||
- [[ -d "$dracutsysrootdir${kbddir}/${dir}" ]] && continue
|
||||
- false
|
||||
- done && break
|
||||
+ for kbddir in ${kbddir} /usr/lib/kbd /lib/kbd /usr/share /usr/share/kbd; do
|
||||
+ if [[ -d "$dracutsysrootdir${kbddir}" ]]; then
|
||||
+ for dir in "${KBDSUBDIRS[@]}"; do
|
||||
+ [[ -d "$dracutsysrootdir${kbddir}/${dir}" ]] && continue
|
||||
+ false
|
||||
+ done && break
|
||||
+ fi
|
||||
kbddir=''
|
||||
done
|
||||
|
||||
--
|
||||
2.19.1
|
||||
|
||||
@ -0,0 +1,31 @@
|
||||
From 7103c4bce9240d5896a0d207c216e0f6270ad2e8 Mon Sep 17 00:00:00 2001
|
||||
From: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
|
||||
Date: Wed, 6 Apr 2022 10:25:23 +0200
|
||||
Subject: [PATCH] fix(ifcfg): avoid calling unavailable dracut-logger functions
|
||||
|
||||
The dracut-logger functions are only available during the initrd
|
||||
generation. For internal initrd scripts that run at boot,
|
||||
dracut-lib provides warn() and info().
|
||||
|
||||
Reference:https://github.com/dracutdevs/dracut/commit/7103c4bce9240d5896a0d207c216e0f6270ad2e8
|
||||
Conflict:NA
|
||||
|
||||
---
|
||||
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 345863f9..854d294d 100755
|
||||
--- a/modules.d/45ifcfg/write-ifcfg.sh
|
||||
+++ b/modules.d/45ifcfg/write-ifcfg.sh
|
||||
@@ -104,7 +104,7 @@ interface_bind() {
|
||||
local _macaddr="$2"
|
||||
|
||||
if [ ! -e "/sys/class/net/$_netif" ]; then
|
||||
- derror "Cannot find network interface '$_netif'!"
|
||||
+ warn "Cannot find network interface '$_netif'!"
|
||||
return 1
|
||||
fi
|
||||
|
||||
--
|
||||
2.23.0
|
||||
@ -0,0 +1,34 @@
|
||||
From 319dc7fe10585a19d1a051f8ad1ba0190f86ff1f Mon Sep 17 00:00:00 2001
|
||||
From: Wenchao Hao <haowenchao@huawei.com>
|
||||
Date: Fri, 29 Apr 2022 14:09:02 +0800
|
||||
Subject: [PATCH] fix(iscsi): do not exit in handle_netroot() if discovery
|
||||
failed
|
||||
|
||||
User may specify multiple netroot in cmdline, failed to connect one netroot
|
||||
do not mean all netroot are not accessible. So if one netroot failed, do
|
||||
not exit the discovery and login flow.
|
||||
|
||||
Conflict:context conflict
|
||||
Reference:https://github.com/dracutdevs/dracut/commit/319dc7fe10585a19d1a051f8ad1ba0190f86ff1f
|
||||
|
||||
Signed-off-by: Wenchao Hao <haowenchao@huawei.com>
|
||||
---
|
||||
modules.d/95iscsi/iscsiroot.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh
|
||||
index ac43b48..05ba183 100755
|
||||
--- a/modules.d/95iscsi/iscsiroot.sh
|
||||
+++ b/modules.d/95iscsi/iscsiroot.sh
|
||||
@@ -217,7 +217,7 @@ handle_netroot()
|
||||
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
|
||||
+ [ -z "$targets" ] && warn "Target discovery to $iscsi_target_ip:${iscsi_target_port:+$iscsi_target_port} failed with status $?" && return 1
|
||||
|
||||
found=
|
||||
for target in $targets; do
|
||||
--
|
||||
2.32.0
|
||||
|
||||
@ -0,0 +1,51 @@
|
||||
From 9491e599282d0d6bb12063eddbd192c0d2ce8acf Mon Sep 17 00:00:00 2001
|
||||
From: Luca BRUNO <luca.bruno@coreos.com>
|
||||
Date: Thu, 23 Sep 2021 09:05:44 +0000
|
||||
Subject: [PATCH] fix(multipath): drop ExecStop= setting from service unit
|
||||
|
||||
This removes the 'ExecStop=' field from `multipathd.service`.
|
||||
Sometimes CI runs do encounter a failure related to this
|
||||
service in initrd, which seems to be stemming from a socket
|
||||
I/O race between the client and the server on shutdown.
|
||||
It looks like the client (`multipathd shutdown`) can lose the race,
|
||||
hit an I/O error, and cause the whole unit to fail (even if the server
|
||||
managed to shutdown properly already).
|
||||
|
||||
Notably, the upstream unit does not have such stop command
|
||||
as the daemon can already perform a graceful exit through
|
||||
its signal handler.
|
||||
|
||||
As such, this commit partially re-aligns the two units,
|
||||
trying to sidestep any of the existing races.
|
||||
|
||||
Conflict:NA
|
||||
Reference:https://github.com/dracutdevs/dracut/commit/9491e599282d0d6bb12063eddbd192c0d2ce8acf
|
||||
|
||||
Refs:
|
||||
* https://github.com/coreos/fedora-coreos-tracker/issues/803
|
||||
* https://github.com/opensvc/multipath-tools/blob/0.8.7/multipathd/multipathd.service
|
||||
---
|
||||
modules.d/90multipath/multipathd.service | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/modules.d/90multipath/multipathd.service b/modules.d/90multipath/multipathd.service
|
||||
index b544de21..75c51305 100644
|
||||
--- a/modules.d/90multipath/multipathd.service
|
||||
+++ b/modules.d/90multipath/multipathd.service
|
||||
@@ -14,11 +14,11 @@ ConditionKernelCommandLine=!rd_NO_MULTIPATH
|
||||
ConditionKernelCommandLine=!multipath=off
|
||||
|
||||
[Service]
|
||||
-Type=simple
|
||||
+Type=notify
|
||||
+NotifyAccess=main
|
||||
ExecStartPre=-/sbin/modprobe dm-multipath
|
||||
ExecStart=/sbin/multipathd -s -d
|
||||
ExecReload=/sbin/multipathd reconfigure
|
||||
-ExecStop=/sbin/multipathd shutdown
|
||||
|
||||
[Install]
|
||||
WantedBy=sysinit.target
|
||||
--
|
||||
2.32.0
|
||||
|
||||
@ -0,0 +1,37 @@
|
||||
From 3c244c7ca3555b526883dc20104c469b39085cbe Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Fri, 23 Apr 2021 11:11:27 +0200
|
||||
Subject: [PATCH] fix(multipath): stop multipath before udev db cleanup
|
||||
|
||||
All device-mapper based devices, including device-mapper-multipath,
|
||||
do reuse the udev db from the initramfs after switching to the root fs.
|
||||
|
||||
Therefore device-mapper devices have to be correctly initialized before
|
||||
the udev daemon is stopped, to have the correct entries in the udev db.
|
||||
|
||||
See also https://bugzilla.redhat.com/show_bug.cgi?id=1949076
|
||||
|
||||
Conflict:NA
|
||||
Reference:https://github.com/dracutdevs/dracut/commit/3c244c7ca
|
||||
---
|
||||
modules.d/90multipath/multipathd.service | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/modules.d/90multipath/multipathd.service b/modules.d/90multipath/multipathd.service
|
||||
index 646c7c14..b544de21 100644
|
||||
--- a/modules.d/90multipath/multipathd.service
|
||||
+++ b/modules.d/90multipath/multipathd.service
|
||||
@@ -4,8 +4,10 @@ Before=iscsi.service iscsid.service lvm2-activation-early.service
|
||||
Wants=systemd-udev-trigger.service systemd-udev-settle.service local-fs-pre.target
|
||||
After=systemd-udev-trigger.service systemd-udev-settle.service
|
||||
Before=local-fs-pre.target
|
||||
+Before=initrd-cleanup.service
|
||||
DefaultDependencies=no
|
||||
Conflicts=shutdown.target
|
||||
+Conflicts=initrd-cleanup.service
|
||||
ConditionKernelCommandLine=!nompath
|
||||
ConditionKernelCommandLine=!rd.multipath=0
|
||||
ConditionKernelCommandLine=!rd_NO_MULTIPATH
|
||||
--
|
||||
2.32.0
|
||||
|
||||
@ -0,0 +1,27 @@
|
||||
From 2c26b703223bb65822954264bcd6ca7934c98b4a Mon Sep 17 00:00:00 2001
|
||||
From: Martin Wilck <mwilck@suse.com>
|
||||
Date: Sat, 17 Sep 2022 23:56:08 +0200
|
||||
Subject: [PATCH] fix(network): avoid double brackets around IPv6 address
|
||||
|
||||
This code would add brackets twice. Fix it.
|
||||
|
||||
Conflict:require adaption
|
||||
Reference:https://github.com/dracutdevs/dracut/commit/2c26b703223bb65822954264bcd6ca7934c98b4a
|
||||
---
|
||||
modules.d/40network/net-lib.sh | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh
|
||||
index 96df17f..2c4a0e8 100755
|
||||
--- a/modules.d/40network/net-lib.sh
|
||||
+++ b/modules.d/40network/net-lib.sh
|
||||
@@ -289,7 +289,6 @@ ibft_to_cmdline() {
|
||||
[ -e ${iface}/hostname ] && hostname=$(read a < ${iface}/hostname; echo $a)
|
||||
if [ "$family" = "ipv6" ] ; then
|
||||
if [ -n "$ip" ] ; then
|
||||
- ip="[$ip]"
|
||||
[ -n "$prefix" ] || prefix=64
|
||||
ip="[${ip}/${prefix}]"
|
||||
mask=
|
||||
--
|
||||
2.23.0
|
||||
@ -0,0 +1,42 @@
|
||||
From f4e9ea879f38bea92069e9397028caa5d81e5aee Mon Sep 17 00:00:00 2001
|
||||
From: Martin Wilck <mwilck@suse.com>
|
||||
Date: Sat, 17 Sep 2022 23:05:39 +0200
|
||||
Subject: [PATCH] fix(network): don't use same ifname multiple times
|
||||
|
||||
If multiple ibft interfaces exist, set_ifname() may reuse the same
|
||||
name (usually "ibft0"), because it's usually called cmdline time,
|
||||
when no interfaces exist in sysfs yet. Remember the number used
|
||||
set and don't use it again.
|
||||
|
||||
Conflict:require adaption
|
||||
Reference:https://github.com/dracutdevs/dracut/commit/f4e9ea879f38bea92069e9397028caa5d81e5aee
|
||||
---
|
||||
modules.d/40network/net-lib.sh | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh
|
||||
index 2c4a0e8..fa4aac0 100755
|
||||
--- a/modules.d/40network/net-lib.sh
|
||||
+++ b/modules.d/40network/net-lib.sh
|
||||
@@ -207,9 +207,10 @@ set_ifname() {
|
||||
for n in $(getargs ifname=); do
|
||||
strstr "$n" "$mac" && echo ${n%%:*} && return
|
||||
done
|
||||
+ [ ! -f "/tmp/set_ifname_$name" ] || read -r num < "/tmp/set_ifname_$name"
|
||||
# otherwise, pick a new name and use that
|
||||
while :; do
|
||||
- num=$(($num+1));
|
||||
+ num=$((num+1));
|
||||
[ -e /sys/class/net/$name$num ] && continue
|
||||
for n in $(getargs ifname=); do
|
||||
[ "$name$num" = "${n%%:*}" ] && continue 2
|
||||
@@ -217,6 +218,7 @@ set_ifname() {
|
||||
break
|
||||
done
|
||||
echo "ifname=$name$num:$mac" >> /etc/cmdline.d/45-ifname.conf
|
||||
+ echo "$num" > "/tmp/set_ifname_$name"
|
||||
echo "$name$num"
|
||||
}
|
||||
|
||||
--
|
||||
2.23.0
|
||||
@ -0,0 +1,29 @@
|
||||
From d9c3c77437d91d7d66369a3ef701ffc5e501346d Mon Sep 17 00:00:00 2001
|
||||
From: Glenn Morris <rgm@stanford.edu>
|
||||
Date: Wed, 8 Dec 2021 14:08:35 -0800
|
||||
Subject: [PATCH] fix(network-manager): skip non-directories in /sys/class/net
|
||||
|
||||
There can be files in this directory, eg "bonding_masters" if a
|
||||
network bond is in use.
|
||||
|
||||
Reference: https://github.com/dracutdevs/dracut/commit/d9c3c77437d91d7d66369a3ef701ffc5e501346d
|
||||
Conflict: Context adaptation
|
||||
---
|
||||
modules.d/35network-manager/nm-run.sh | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/modules.d/35network-manager/nm-run.sh b/modules.d/35network-manager/nm-run.sh
|
||||
index 8d6942c9a..7d8d61fa7 100755
|
||||
--- a/modules.d/35network-manager/nm-run.sh
|
||||
+++ b/modules.d/35network-manager/nm-run.sh
|
||||
@@ -15,6 +15,7 @@ done
|
||||
|
||||
for _i in /sys/class/net/*
|
||||
do
|
||||
+ [ -d "$_i" ] || continue
|
||||
state=/run/NetworkManager/devices/$(cat $_i/ifindex)
|
||||
grep -q connection-uuid= $state 2>/dev/null || continue
|
||||
ifname=${_i##*/}
|
||||
--
|
||||
2.27.0
|
||||
|
||||
@ -0,0 +1,28 @@
|
||||
From d615934311e25146bb37943bf1385a19dfdbd9e8 Mon Sep 17 00:00:00 2001
|
||||
From: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
|
||||
Date: Wed, 20 Apr 2022 15:33:51 +0200
|
||||
Subject: [PATCH] fix(nfs): give /run/rpcbind ownership to rpc user
|
||||
|
||||
Avoid errors when rpcbind tries to write to the /run/rpcbind directory.
|
||||
|
||||
Reference:https://github.com/dracutdevs/dracut/commit/d615934311e25146bb37943bf1385a19dfdbd9e8
|
||||
Conflict:NA
|
||||
|
||||
---
|
||||
modules.d/95nfs/nfs-start-rpc.sh | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/modules.d/95nfs/nfs-start-rpc.sh b/modules.d/95nfs/nfs-start-rpc.sh
|
||||
index fd64ca27..69fcfd5a 100755
|
||||
--- a/modules.d/95nfs/nfs-start-rpc.sh
|
||||
+++ b/modules.d/95nfs/nfs-start-rpc.sh
|
||||
@@ -9,6 +9,7 @@ if modprobe sunrpc || strstr "$(cat /proc/filesystems)" rpc_pipefs; then
|
||||
command -v portmap >/dev/null && [ -z "$(pidof portmap)" ] && portmap
|
||||
if command -v rpcbind >/dev/null && [ -z "$(pidof rpcbind)" ]; then
|
||||
mkdir -p /run/rpcbind
|
||||
+ chown rpc:rpc /run/rpcbind
|
||||
rpcbind
|
||||
fi
|
||||
|
||||
--
|
||||
2.23.0
|
||||
@ -0,0 +1,34 @@
|
||||
From a7a4b76c4ad5794f5f8a24ecd5b495f1512d05f7 Mon Sep 17 00:00:00 2001
|
||||
From: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
|
||||
Date: Fri, 1 Apr 2022 10:04:30 +0200
|
||||
Subject: [PATCH] fix(resume): correct call to block_is_netdevice function
|
||||
|
||||
The block_is_netdevice function requires the device in <maj:min>
|
||||
format, but the swap_devs array is populated with the content of
|
||||
/proc/swaps, which prints the devices using their paths from /dev.
|
||||
|
||||
This causes the check method to never detect if swap is mounted on a
|
||||
network device.
|
||||
|
||||
Reference:https://github.com/dracutdevs/dracut/commit/a7a4b76c4ad5794f5f8a24ecd5b495f1512d05f7
|
||||
Conflict:Modify context for adaption
|
||||
|
||||
---
|
||||
modules.d/95resume/module-setup.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/95resume/module-setup.sh b/modules.d/95resume/module-setup.sh
|
||||
index 7e629435..5e891048 100755
|
||||
--- a/modules.d/95resume/module-setup.sh
|
||||
+++ b/modules.d/95resume/module-setup.sh
|
||||
@@ -5,7 +5,7 @@ check() {
|
||||
swap_on_netdevice() {
|
||||
local _dev
|
||||
for _dev in "${swap_devs[@]}"; do
|
||||
- block_is_netdevice $_dev && return 0
|
||||
+ block_is_netdevice "$(get_maj_min "$_dev")" && return 0
|
||||
done
|
||||
return 1
|
||||
}
|
||||
--
|
||||
2.23.0
|
||||
@ -0,0 +1,64 @@
|
||||
From aa05b741e3c0ca708a0e76445a9aa94b52bc1974 Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Fri, 12 Feb 2021 13:26:10 +0100
|
||||
Subject: [PATCH] fix: shellcheck for modules.d/10i18n/module-setup.sh
|
||||
|
||||
Conflict:NA
|
||||
Reference:https://github.com/dracutdevs/dracut/commit/aa05b741e3c0ca708a0e76445a9aa94b52bc1974
|
||||
---
|
||||
modules.d/10i18n/module-setup.sh | 15 +++++++++------
|
||||
1 file changed, 9 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/modules.d/10i18n/module-setup.sh b/modules.d/10i18n/module-setup.sh
|
||||
index dd45b666..04a402f1 100755
|
||||
--- a/modules.d/10i18n/module-setup.sh
|
||||
+++ b/modules.d/10i18n/module-setup.sh
|
||||
@@ -19,7 +19,7 @@ install() {
|
||||
if dracut_module_included "systemd"; then
|
||||
unset FONT
|
||||
unset KEYMAP
|
||||
- [[ -f $dracutsysrootdir/etc/vconsole.conf ]] && . $dracutsysrootdir/etc/vconsole.conf
|
||||
+ [[ -f "$dracutsysrootdir"/etc/vconsole.conf ]] && . "$dracutsysrootdir"/etc/vconsole.conf
|
||||
fi
|
||||
|
||||
KBDSUBDIRS=consolefonts,consoletrans,keymaps,unimaps
|
||||
@@ -38,13 +38,14 @@ install() {
|
||||
for map in $MAPS; do
|
||||
KEYMAPS="$KEYMAPS $map "
|
||||
case $map in
|
||||
- *.gz) cmd=zgrep;;
|
||||
- *.bz2) cmd=bzgrep;;
|
||||
- *) cmd=grep ;;
|
||||
+ *.gz) cmd="zgrep";;
|
||||
+ *.bz2) cmd="bzgrep";;
|
||||
+ *) cmd="grep";;
|
||||
esac
|
||||
|
||||
- for INCL in $($cmd "^include " $map | while read a a b || [ -n "$a" ]; do echo ${a//\"/}; done); do
|
||||
+ for INCL in $($cmd "^include " $map | while read _ a _ || [ -n "$a" ]; do echo ${a//\"/}; done); do
|
||||
for FN in $(find $dracutsysrootdir${kbddir}/keymaps -type f -name $INCL\*); do
|
||||
+ [[ -f $FN ]] || continue
|
||||
strstr "$KEYMAPS" " $FN " || findkeymap $FN
|
||||
done
|
||||
done
|
||||
@@ -81,6 +82,8 @@ install() {
|
||||
gather_vars() {
|
||||
local item map value
|
||||
|
||||
+ # FIXME: double check
|
||||
+ # shellcheck disable=SC2068
|
||||
for item in $@
|
||||
do
|
||||
item=(${item/:/ })
|
||||
@@ -107,7 +110,7 @@ install() {
|
||||
|
||||
if [[ ${kbddir} != "/usr/share" ]]; then
|
||||
inst_dir /usr/share
|
||||
- for _src in $(eval echo {${KBDSUBDIRS}}); do
|
||||
+ for _src in $(eval echo "{ ${KBDSUBDIRS} }"); do
|
||||
[ ! -e "${initdir}/usr/share/${_src}" ] && ln -s "${kbddir}/${_src}" "${initdir}/usr/share/${_src}"
|
||||
done
|
||||
fi
|
||||
--
|
||||
2.19.1
|
||||
|
||||
149
backport-fix-shutdown-add-timeout-to-umount-calls.patch
Normal file
149
backport-fix-shutdown-add-timeout-to-umount-calls.patch
Normal file
@ -0,0 +1,149 @@
|
||||
From 38ef31939056dea30017d782988ba1a46df4784a Mon Sep 17 00:00:00 2001
|
||||
From: Petr Pavlu <petr.pavlu@suse.com>
|
||||
Date: Tue, 9 Feb 2021 13:13:25 +0100
|
||||
Subject: [PATCH] fix(shutdown): add timeout to umount calls
|
||||
|
||||
When terminating a system, the shutdown module attempts to unmount all
|
||||
file systems from under /oldroot. This reaps remaining file systems that
|
||||
systemd cannot unmount and detaches /oldroot itself.
|
||||
|
||||
In case that running umount for some file system repeatedly fails, the
|
||||
module reports this error and continues the processing in order to
|
||||
shutdown the system. This handles a condition when the umount command
|
||||
actually terminates but it can happen in some cases that it waits
|
||||
indefinitely.
|
||||
|
||||
An example with NFS mounts:
|
||||
# mount -t nfs 192.168.0.1:/srv/nfs/dir /mnt/nfs
|
||||
# mkdir /mnt/nfs/dir2
|
||||
# mount -t nfs 192.168.0.1:/srv/nfs/dir2 /mnt/nfs/dir2
|
||||
# touch /mnt/nfs/dir2/file
|
||||
# systemd-run -pKillMode=none -pSendSIGKILL=no tail -f /mnt/nfs/dir2/file
|
||||
Running as unit: run-r367825c967ca4d88a793ae4793c02f8b.service
|
||||
# systemctl poweroff
|
||||
|
||||
The invoked tail command escapes normal termination by systemd and
|
||||
prevents stopping mnt-nfs.mount and mnt-nfs-dir2.mount as it makes the
|
||||
mounts busy. Systemd then again attempts to unmount these file systems
|
||||
in systemd-shutdown but this fails as well. The utility tries to unmount
|
||||
/mnt/nfs/dir2 but the kernel waits indefinitely doing a path lookup for
|
||||
/mnt/nfs because network is no longer available at that point. The
|
||||
systemd-shutdown gives up after 90 seconds. Finally, the control is
|
||||
transferred to dracut which tries to unmount the file systems in the
|
||||
same way and ends up indefinitely waiting on umount to finish.
|
||||
|
||||
This situation causes that the system hangs during shutdown. The patch
|
||||
improves the shutdown module to add a timeout of 90 seconds for the
|
||||
umount operation and continue with the shutdown if it gets reached,
|
||||
similarly to what systemd-shutdown does.
|
||||
|
||||
Conflict:NA
|
||||
Reference:https://github.com/dracutdevs/dracut/commit/38ef31939056dea30017d782988ba1a46df4784a
|
||||
---
|
||||
dracut.cmdline.7.asc | 6 ++++
|
||||
modules.d/99shutdown/module-setup.sh | 2 +-
|
||||
modules.d/99shutdown/shutdown.sh | 44 +++++++++++++++++++++++-----
|
||||
3 files changed, 43 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc
|
||||
index 0951c0e0..4e598b6b 100644
|
||||
--- a/dracut.cmdline.7.asc
|
||||
+++ b/dracut.cmdline.7.asc
|
||||
@@ -167,6 +167,12 @@ Misc
|
||||
specify the controlling terminal for the console.
|
||||
This is useful, if you have multiple "console=" arguments.
|
||||
|
||||
+**rd.shutdown.timeout.umount=**__<seconds>__::
|
||||
+ specify how long dracut should wait for an individual umount to finish
|
||||
+ during shutdown. This avoids the system from blocking when unmounting a file
|
||||
+ system cannot complete and waits indefinitely. Value '0' means to wait
|
||||
+ 'forever'. The default is 90 seconds.
|
||||
+
|
||||
[[dracutkerneldebug]]
|
||||
Debug
|
||||
~~~~~
|
||||
diff --git a/modules.d/99shutdown/module-setup.sh b/modules.d/99shutdown/module-setup.sh
|
||||
index dfd6caa2..ff9b7734 100755
|
||||
--- a/modules.d/99shutdown/module-setup.sh
|
||||
+++ b/modules.d/99shutdown/module-setup.sh
|
||||
@@ -14,7 +14,7 @@ depends() {
|
||||
# called by dracut
|
||||
install() {
|
||||
local _d
|
||||
- inst_multiple umount poweroff reboot halt losetup stat sleep
|
||||
+ 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
|
||||
diff --git a/modules.d/99shutdown/shutdown.sh b/modules.d/99shutdown/shutdown.sh
|
||||
index a30a126f..90a0b9e1 100755
|
||||
--- a/modules.d/99shutdown/shutdown.sh
|
||||
+++ b/modules.d/99shutdown/shutdown.sh
|
||||
@@ -46,28 +46,56 @@ warn "Killing all remaining processes"
|
||||
|
||||
killall_proc_mountpoint /oldroot || sleep 0.2
|
||||
|
||||
+# Timeout for umount calls. The value can be set to 0 to wait forever.
|
||||
+_umount_timeout=$(getarg rd.shutdown.timeout.umount)
|
||||
+_umount_timeout=${_umount_timeout:-90s}
|
||||
+_timed_out_umounts=""
|
||||
+
|
||||
umount_a() {
|
||||
+ local _verbose="n"
|
||||
+ if [ "$1" = "-v" ]; then
|
||||
+ _verbose="y"; shift
|
||||
+ exec 7>&2
|
||||
+ else
|
||||
+ exec 7>/dev/null
|
||||
+ fi
|
||||
+
|
||||
local _did_umount="n"
|
||||
while read a mp a || [ -n "$mp" ]; do
|
||||
- if strstr "$mp" oldroot; then
|
||||
- if umount "$mp"; then
|
||||
- _did_umount="y"
|
||||
- warn "Unmounted $mp."
|
||||
- fi
|
||||
+ strstr "$mp" oldroot || continue
|
||||
+ strstr "$_timed_out_umounts" " $mp " && continue
|
||||
+
|
||||
+ # Unmount the file system. The operation uses a timeout to avoid waiting
|
||||
+ # indefinitely if this is e.g. a stuck NFS mount. The command is
|
||||
+ # invoked in a subshell to silence also the "Killed" message that might
|
||||
+ # be produced by the shell.
|
||||
+ (set +m; timeout --signal=KILL "$_umount_timeout" umount "$mp") 2>&7
|
||||
+ local ret=$?
|
||||
+ if [ $ret -eq 0 ]; then
|
||||
+ _did_umount="y"
|
||||
+ warn "Unmounted $mp."
|
||||
+ elif [ $ret -eq 137 ]; then
|
||||
+ _timed_out_umounts="$_timed_out_umounts $mp "
|
||||
+ warn "Unmounting $mp timed out."
|
||||
+ elif [ "$_verbose" = "y" ]; then
|
||||
+ warn "Unmounting $mp failed with status $ret."
|
||||
fi
|
||||
done </proc/mounts
|
||||
- losetup -D
|
||||
+
|
||||
+ losetup -D 2>&7
|
||||
+
|
||||
+ exec 7>&-
|
||||
[ "$_did_umount" = "y" ] && return 0
|
||||
return 1
|
||||
}
|
||||
|
||||
_cnt=0
|
||||
while [ $_cnt -le 40 ]; do
|
||||
- umount_a 2>/dev/null || break
|
||||
+ umount_a || break
|
||||
_cnt=$(($_cnt+1))
|
||||
done
|
||||
|
||||
-[ $_cnt -ge 40 ] && umount_a
|
||||
+[ $_cnt -ge 40 ] && umount_a -v
|
||||
|
||||
if strstr "$(cat /proc/mounts)" "/oldroot"; then
|
||||
warn "Cannot umount /oldroot"
|
||||
--
|
||||
2.19.1
|
||||
|
||||
29
backport-fix-skipcpio-edit-skipcpio.c-strstr-memmem.patch
Normal file
29
backport-fix-skipcpio-edit-skipcpio.c-strstr-memmem.patch
Normal file
@ -0,0 +1,29 @@
|
||||
From 68dd8af21d34c5c2cb8631f7c02c6a6cf1aa6122 Mon Sep 17 00:00:00 2001
|
||||
From: realtime-neil <neil@rtr.ai>
|
||||
Date: Mon, 25 Jan 2021 22:44:07 +0000
|
||||
Subject: [PATCH] fix(skipcpio): edit skipcpio.c: strstr -> memmem
|
||||
|
||||
because CPIO_END might follow a NULL byte in buf
|
||||
|
||||
Conflict:NA
|
||||
Reference:https://github.com/dracutdevs/dracut/commit/68dd8af21d34c5c2cb8631f7c02c6a6cf1aa6122
|
||||
---
|
||||
skipcpio/skipcpio.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/skipcpio/skipcpio.c b/skipcpio/skipcpio.c
|
||||
index 30699816..dea216c5 100644
|
||||
--- a/skipcpio/skipcpio.c
|
||||
+++ b/skipcpio/skipcpio.c
|
||||
@@ -72,7 +72,7 @@ int main(int argc, char **argv)
|
||||
if (s <= 0)
|
||||
break;
|
||||
|
||||
- h = strstr(buf, CPIO_END);
|
||||
+ h = memmem(buf, sizeof(buf), CPIO_END, sizeof(CPIO_END));
|
||||
if (h) {
|
||||
pos = (h - buf) + pos + CPIO_ENDLEN;
|
||||
fseek(f, pos, SEEK_SET);
|
||||
--
|
||||
2.19.1
|
||||
|
||||
29
backport-lvm-fix-removal-of-pvscan-from-udev-rules.patch
Normal file
29
backport-lvm-fix-removal-of-pvscan-from-udev-rules.patch
Normal file
@ -0,0 +1,29 @@
|
||||
From 07417b7fc5cb261187519c916e4735189f20f4c6 Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Tsoy <alexander@tsoy.me>
|
||||
Date: Sat, 23 May 2020 18:03:47 +0300
|
||||
Subject: [PATCH] lvm: fix removal of pvscan from udev rules
|
||||
|
||||
udev rules provided by lvm 2.02.128 and newer uses '+=' instead of '='.
|
||||
|
||||
Conflict:NA
|
||||
Reference:https://github.com/dracutdevs/dracut/commit/07417b7fc5cb261187519c916e4735189f20f4c6
|
||||
---
|
||||
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 d6d2c185..52c803f7 100755
|
||||
--- a/modules.d/90lvm/module-setup.sh
|
||||
+++ b/modules.d/90lvm/module-setup.sh
|
||||
@@ -101,7 +101,7 @@ install() {
|
||||
sed -i -e 's/^ENV{SYSTEMD_ALIAS}=.*/# No LVM pvscan in dracut - lvmetad is not running yet/' \
|
||||
${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules
|
||||
sed -i -e 's/^ENV{ID_MODEL}=.*//' ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules
|
||||
- sed -i -e 's/^ENV{SYSTEMD_WANTS}=.*//' ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules
|
||||
+ sed -i -e 's/^ENV{SYSTEMD_WANTS}+\?=.*//' ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules
|
||||
else
|
||||
sed -i -e 's/.*lvm pvscan.*/# No LVM pvscan for in dracut - lvmetad is not running yet/' \
|
||||
${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@ -0,0 +1,30 @@
|
||||
From fe02bc78accf4aaa39ab33adcdb5aaa71df90b30 Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Tsoy <alexander@tsoy.me>
|
||||
Date: Sat, 23 May 2020 21:42:18 +0300
|
||||
Subject: [PATCH] lvm: remove unnecessary ${initdir} from lvm_scan.sh
|
||||
|
||||
lvm_scan.sh runs in the initramfs, so paths should not be prefixed with
|
||||
${initdir}.
|
||||
|
||||
Conflict:NA
|
||||
Reference:https://github.com/dracutdevs/dracut/commit/fe02bc78accf4aaa39ab33adcdb5aaa71df90b30
|
||||
---
|
||||
modules.d/90lvm/lvm_scan.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/90lvm/lvm_scan.sh b/modules.d/90lvm/lvm_scan.sh
|
||||
index 61a18b24..ff8e66e2 100755
|
||||
--- a/modules.d/90lvm/lvm_scan.sh
|
||||
+++ b/modules.d/90lvm/lvm_scan.sh
|
||||
@@ -91,7 +91,7 @@ export LVM_SUPPRESS_LOCKING_FAILURE_MESSAGES=1
|
||||
if [ -n "$SNAPSHOT" ] ; then
|
||||
# HACK - this should probably be done elsewhere or turned into a function
|
||||
# Enable read-write LVM locking
|
||||
- sed -i -e 's/\(^[[:space:]]*\)locking_type[[:space:]]*=[[:space:]]*[[:digit:]]/\1locking_type = 1/' ${initdir}/etc/lvm/lvm.conf
|
||||
+ sed -i -e 's/\(^[[:space:]]*\)locking_type[[:space:]]*=[[:space:]]*[[:digit:]]/\1locking_type = 1/' /etc/lvm/lvm.conf
|
||||
|
||||
# Expected SNAPSHOT format "<orig lv name>:<snap lv name>"
|
||||
ORIG_LV=${SNAPSHOT%%:*}
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@ -0,0 +1,40 @@
|
||||
From acc782bad5c77a8e105c9c5a8fc8873bc2ff06ec Mon Sep 17 00:00:00 2001
|
||||
From: Norbert Lange <norbert.lange@andritz.com>
|
||||
Date: Mon, 6 Jul 2020 18:16:13 +0200
|
||||
Subject: [PATCH] mount-root.sh: fix writing fstab file with missing fsck flag
|
||||
|
||||
if the kernel argument rootflags is set, then dracut will
|
||||
not parse the rootfs fstab and rootfsck wil not be set.
|
||||
|
||||
if the filesystem can be fsck'ed then its unmounted,
|
||||
and an entry to the local fstab is written, omitting the last
|
||||
field.
|
||||
|
||||
mounting /sysroot using fstab will then fail.
|
||||
|
||||
This change makes sure that the filed is always written.
|
||||
|
||||
Conflict:NA
|
||||
Reference:https://github.com/dracutdevs/dracut/commit/acc782bad5c77a8e105c9c5a8fc8873bc2ff06ec
|
||||
|
||||
Signed-off-by: Norbert Lange <norbert.lange@andritz.com>
|
||||
---
|
||||
modules.d/95rootfs-block/mount-root.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/95rootfs-block/mount-root.sh b/modules.d/95rootfs-block/mount-root.sh
|
||||
index 0eddbcd5..6503b517 100755
|
||||
--- a/modules.d/95rootfs-block/mount-root.sh
|
||||
+++ b/modules.d/95rootfs-block/mount-root.sh
|
||||
@@ -116,7 +116,7 @@ mount_root() {
|
||||
ran_fsck=1
|
||||
fi
|
||||
|
||||
- echo "${root#block:} $NEWROOT $rootfs ${rflags:-defaults} 0 $rootfsck" >> /etc/fstab
|
||||
+ echo "${root#block:} $NEWROOT $rootfs ${rflags:-defaults} 0 ${rootfsck:-0}" >> /etc/fstab
|
||||
|
||||
if ! ismounted "$NEWROOT"; then
|
||||
info "Mounting ${root#block:} with -o ${rflags}"
|
||||
--
|
||||
2.23.0
|
||||
|
||||
52
dracut.spec
52
dracut.spec
@ -9,7 +9,7 @@
|
||||
|
||||
Name: dracut
|
||||
Version: 050
|
||||
Release: 7
|
||||
Release: 8
|
||||
|
||||
Summary: Initramfs generator using udev
|
||||
|
||||
@ -64,6 +64,53 @@ Patch0035: backport-95resume-Do-not-resume-on-iSCSI-FCoE-or-NBD.patch
|
||||
Patch0036: backport-fix-mdraid-allow-UUID-comparison-for-more-than-one-U.patch
|
||||
Patch0037: backport-fix-resume-check-for-presence-of-sys-power-resume.patch
|
||||
Patch0038: backport-dracut.sh-add-check-for-invalid-configuration-files.patch
|
||||
Patch0039: backport-95iscsi-fix-missing-space-when-compiling-cmdline-arg.patch
|
||||
Patch0040: backport-dracut.sh-Move-the-library-workaround-after-squash.patch
|
||||
Patch0041: backport-dracut.sh-FIPS-workaround-for-openssl-libs-on-Fedora.patch
|
||||
Patch0042: backport-91zipl-parse-zipl.sh-honor-SYSTEMD_READY.patch
|
||||
Patch0043: backport-95iscsi-fix-ipv6-target-discovery.patch
|
||||
Patch0044: backport-dracut.sh-fix-early-microcode-detection-logic.patch
|
||||
Patch0045: backport-dracut.sh-fix-ia32-detection-for-uefi-executables.patch
|
||||
Patch0046: backport-95iscsi-use-ip_params_for_remote_addr.patch
|
||||
Patch0047: backport-95nfs-use-ip_params_for_remote_addr.patch
|
||||
Patch0048: backport-lvm-remove-unnecessary-initdir-from-lvm_scan.sh.patch
|
||||
Patch0049: backport-lvm-fix-removal-of-pvscan-from-udev-rules.patch
|
||||
Patch0050: backport-mount-root.sh-fix-writing-fstab-file-with-missing-fs.patch
|
||||
Patch0051: backport-Change-the-order-of-NFS-servers-during-the-boot.patch
|
||||
Patch0052: backport-Allow-DRACUT_INSTALL-to-be-not-an-absolute-path.patch
|
||||
Patch0053: backport-UEFI-Mode-only-write-kernel-cmdline-to-UEFI-binary.patch
|
||||
Patch0054: backport-90lvm-do-not-add-newline-to-cmdline.patch
|
||||
Patch0055: backport-dracut.sh-fix-errors-pointed-out-by-shellcheck.patch
|
||||
Patch0056: backport-Do-not-start-inside-container.patch
|
||||
Patch0057: backport-fix-skipcpio-edit-skipcpio.c-strstr-memmem.patch
|
||||
Patch0058: backport-fix-shellcheck-for-modules.d-10i18n-module-setup.sh.patch
|
||||
Patch0059: backport-fix-i18n-create-the-keyboard-symlinks-again.patch
|
||||
Patch0060: backport-fix-i18n-get-rid-of-eval-calls.patch
|
||||
Patch0061: backport-Fix-bad-ls-parsing.patch
|
||||
Patch0062: backport-fix-shutdown-add-timeout-to-umount-calls.patch
|
||||
Patch0063: backport-docs-fix-dracut.cmdline.7.patch
|
||||
Patch0064: backport-fix-dracut.sh-remove-wrong-in-loop-sequence.patch
|
||||
Patch0065: backport-fix-dracut.sh-change-misspelled-variable-name.patch
|
||||
Patch0066: backport-fix-dmsquash-live-iso-scan-requires-rmdir.patch
|
||||
Patch0067: backport-fix-network-manager-skip-non-directories-in-sys-class-net.patch
|
||||
Patch0068: backport-fix-dracut.sh-do-not-ignore-invalid-config-file-or-dir-path.patch
|
||||
Patch0069: backport-fix-iscsi-do-not-exit-in-handle_netroot-if-discovery.patch
|
||||
Patch0070: backport-fix-multipath-drop-ExecStop-setting-from-service-uni.patch
|
||||
Patch0071: backport-90multipath-install-kpartx-s-11-dm-parts.rules.patch
|
||||
Patch0072: backport-fix-multipath-stop-multipath-before-udev-db-cleanup.patch
|
||||
Patch0073: backport-fix-40network-consistent-use-of-gw-for-gateway.patch
|
||||
Patch0074: backport-fix-dracut-functions.sh-ip-route-parsing.patch
|
||||
Patch0075: backport-fix-dracut-install-copy-files-preserving-ownership-a.patch
|
||||
Patch0076: backport-fix-ifcfg-avoid-calling-unavailable-dracut-logger-functions.patch
|
||||
Patch0077: backport-fix-resume-correct-call-to-block_is_netdevice-function.patch
|
||||
Patch0078: backport-fix-nfs-give-run-rpcbind-ownership-to-rpc-user.patch
|
||||
Patch0079: backport-fix-dracut-install-use-stripped-kernel-module-path-as-hash-key.patch
|
||||
Patch0080: backport-fix-dracut-init.sh-instmods-wrong-variable-name.patch
|
||||
Patch0081: backport-fix-dracut-functions.sh-suppress-findmnt-error-msg-if-etc-fstab-not-exist.patch
|
||||
Patch0082: backport-fix-dracut-replace-invalid-lzo-command-with-lzop-for-LZO-compression.patch
|
||||
Patch0083: backport-fix-network-avoid-double-brackets-around-IPv6-address.patch
|
||||
Patch0084: backport-fix-network-don-t-use-same-ifname-multiple-times.patch
|
||||
Patch0085: backport-fix-dracut-init.sh-add-missing-hostonly-code-in-the-inst_multiple-function.patch
|
||||
|
||||
Source1: https://www.gnu.org/licenses/lgpl-2.1.txt
|
||||
Source2: openEuler.conf.example
|
||||
@ -514,6 +561,9 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Thu Feb 22 2024 hongjinghao <hongjinghao@huawei.com> - 050-8
|
||||
- backport patchs from upstream
|
||||
|
||||
* Tue Dec 19 2023 zhangruifang <zhangruifang@h-partners.com> - 050-7
|
||||
- backport patchs from upstream
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user