Update to 055
This commit is contained in:
parent
afa3401c37
commit
e9e950229b
@ -1,28 +0,0 @@
|
||||
From 7fb8f939a52a904b1860e303a6a7fe69ba0d2ceb Mon Sep 17 00:00:00 2001
|
||||
From: Radek Vykydal <rvykydal@redhat.com>
|
||||
Date: Tue, 10 Mar 2020 10:48:21 +0100
|
||||
Subject: [PATCH 2/2] Fix pre-trigger stage by replacing exit with return in
|
||||
lldpad.sh
|
||||
|
||||
Using exit makes the pre-trigger stage finish after running 03-lldpad.sh
|
||||
pre-trigger hook.
|
||||
---
|
||||
modules.d/95fcoe/lldpad.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/95fcoe/lldpad.sh b/modules.d/95fcoe/lldpad.sh
|
||||
index c32feee..444c943 100755
|
||||
--- a/modules.d/95fcoe/lldpad.sh
|
||||
+++ b/modules.d/95fcoe/lldpad.sh
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
if ! getargbool 0 rd.nofcoe ; then
|
||||
info "rd.nofcoe=0: skipping lldpad activation"
|
||||
- exit 0
|
||||
+ return 0
|
||||
fi
|
||||
|
||||
# Note lldpad will stay running after switchroot, the system initscripts
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,41 +0,0 @@
|
||||
From 8446c8f9deefcc6c47d96a128b1e9b23d8855a96 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Blume <Thomas.Blume@suse.com>
|
||||
Date: Mon, 24 Feb 2020 12:11:25 +0100
|
||||
Subject: [PATCH] 95fcoe: default rd.nofcoe to false
|
||||
|
||||
rd.nofcoe should default to false, e.g. fcoe should be enabled unless
|
||||
overwritten from the command line.
|
||||
The same applies for lldapd.sh.
|
||||
---
|
||||
modules.d/95fcoe/lldpad.sh | 2 +-
|
||||
modules.d/95fcoe/parse-fcoe.sh | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/modules.d/95fcoe/lldpad.sh b/modules.d/95fcoe/lldpad.sh
|
||||
index 444c943..7faa2e1 100755
|
||||
--- a/modules.d/95fcoe/lldpad.sh
|
||||
+++ b/modules.d/95fcoe/lldpad.sh
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
-if ! getargbool 0 rd.nofcoe ; then
|
||||
+if getargbool 0 rd.nofcoe ; then
|
||||
info "rd.nofcoe=0: skipping lldpad activation"
|
||||
return 0
|
||||
fi
|
||||
diff --git a/modules.d/95fcoe/parse-fcoe.sh b/modules.d/95fcoe/parse-fcoe.sh
|
||||
index 8bb55c6..86f4331 100755
|
||||
--- a/modules.d/95fcoe/parse-fcoe.sh
|
||||
+++ b/modules.d/95fcoe/parse-fcoe.sh
|
||||
@@ -13,7 +13,7 @@
|
||||
# fcoe=eth0:nodcb:vn2vn
|
||||
# fcoe=4a:3f:4c:04:f8:d7:nodcb:fabric
|
||||
|
||||
-if ! getargbool 0 rd.nofcoe ; then
|
||||
+if getargbool 0 rd.nofcoe ; then
|
||||
info "rd.nofcoe=0: skipping fcoe"
|
||||
return 0
|
||||
fi
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,27 +0,0 @@
|
||||
From 32dfd41688a0a2aee59a62dd661c808a935d91a4 Mon Sep 17 00:00:00 2001
|
||||
From: Fabian Vogt <fvogt@suse.de>
|
||||
Date: Mon, 4 May 2020 10:09:07 +0200
|
||||
Subject: [PATCH] Fix test in lsinitrd
|
||||
|
||||
If $uefi is empty, this evaluated to true previously,
|
||||
resulting in "initrd in UEFI: : 13M".
|
||||
---
|
||||
lsinitrd.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lsinitrd.sh b/lsinitrd.sh
|
||||
index b5c73f6..ea0c7f6 100755
|
||||
--- a/lsinitrd.sh
|
||||
+++ b/lsinitrd.sh
|
||||
@@ -206,7 +206,7 @@ if [ "$bin" = "MZ" ]; then
|
||||
fi
|
||||
|
||||
if (( ${#filenames[@]} <= 0 )) && [[ -z "$unpack" ]] && [[ -z "$unpackearly" ]]; then
|
||||
- if [ -n $uefi ]; then
|
||||
+ if [ -n "$uefi" ]; then
|
||||
echo -n "initrd in UEFI: $uefi: "
|
||||
du -h $image | while read a b || [ -n "$a" ]; do echo $a;done
|
||||
if [ -f "$TMPDIR/osrel.txt" ]; then
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -9,46 +9,46 @@ Signed-off-by: Anakin Zhang <benjamin93@163.com>
|
||||
1 file changed, 10 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dracut.sh b/dracut.sh
|
||||
index c14f6c0..572a60e 100755
|
||||
index 60ac46f..bab91ca 100755
|
||||
--- a/dracut.sh
|
||||
+++ b/dracut.sh
|
||||
@@ -242,6 +242,9 @@ Creates initial ramdisk images for preloading modules
|
||||
@@ -246,6 +246,9 @@ Creates initial ramdisk images for preloading modules
|
||||
--kernel-image [FILE] location of the kernel image
|
||||
--regenerate-all Regenerate all initramfs images at the default location
|
||||
for the kernel versions found on the system
|
||||
+ -e, --file-metadata [TYPE]
|
||||
+ Include file metadata in the initramfs. Specify "xattr"
|
||||
+ to include file extended attributes.
|
||||
--version Display version
|
||||
|
||||
If [LIST] has multiple arguments, then you have to put these in quotes.
|
||||
|
||||
@@ -319,7 +322,7 @@ rearrange_params()
|
||||
set -- "${newat[@]}" # Set new $@
|
||||
|
||||
TEMP=$(unset POSIXLY_CORRECT; getopt \
|
||||
@@ -341,7 +344,7 @@ rearrange_params() {
|
||||
TEMP=$(
|
||||
unset POSIXLY_CORRECT
|
||||
getopt \
|
||||
- -o "a:m:o:d:I:k:c:r:L:fvqlHhMN" \
|
||||
+ -o "a:m:o:d:I:k:c:r:L:fvqlHhMNe:" \
|
||||
--long kver: \
|
||||
--long add: \
|
||||
--long force-add: \
|
||||
@@ -408,6 +411,7 @@ rearrange_params()
|
||||
--long no-hostonly-i18n \
|
||||
@@ -432,6 +435,7 @@ rearrange_params() {
|
||||
--long hostonly-i18n \
|
||||
--long hostonly-nics: \
|
||||
--long no-machineid \
|
||||
+ --long file-metadata: \
|
||||
-- "$@")
|
||||
|
||||
if (( $? != 0 )); then
|
||||
@@ -608,6 +612,8 @@ while :; do
|
||||
kernel_image_l="$2"; PARMS_TO_STORE+=" '$2'"; shift;;
|
||||
--long version \
|
||||
-- "$@"
|
||||
)
|
||||
@@ -800,6 +804,8 @@ while :; do
|
||||
--no-machineid)
|
||||
machine_id_l="no";;
|
||||
machine_id_l="no"
|
||||
;;
|
||||
+ -e|--file-metadata)
|
||||
+ file_metadata_l="$2"; PARMS_TO_STORE+=" '$2'"; shift;;
|
||||
--) shift; break;;
|
||||
|
||||
*) # should not even reach this point
|
||||
@@ -783,6 +789,7 @@ stdloglvl=$((stdloglvl + verbosity_mod_l))
|
||||
--version)
|
||||
long_version
|
||||
exit 1
|
||||
@@ -998,6 +1004,7 @@ stdloglvl=$((stdloglvl + verbosity_mod_l))
|
||||
[[ $uefi_splash_image_l ]] && uefi_splash_image="$uefi_splash_image_l"
|
||||
[[ $kernel_image_l ]] && kernel_image="$kernel_image_l"
|
||||
[[ $machine_id_l ]] && machine_id="$machine_id_l"
|
||||
@ -56,24 +56,24 @@ index c14f6c0..572a60e 100755
|
||||
|
||||
if ! [[ $outfile ]]; then
|
||||
if [[ $machine_id != "no" ]]; then
|
||||
@@ -1988,7 +1995,7 @@ if [[ $create_early_cpio = yes ]]; then
|
||||
if ! (
|
||||
umask 077; cd "$early_cpio_dir/d"
|
||||
@@ -2324,7 +2331,7 @@ if [[ $create_early_cpio == yes ]]; then
|
||||
cd "$early_cpio_dir/d"
|
||||
find . -print0 | sort -z \
|
||||
- | cpio ${CPIO_REPRODUCIBLE:+--reproducible} --null $cpio_owner_root -H newc -o --quiet > "${DRACUT_TMPDIR}/initramfs.img"
|
||||
+ | cpio ${CPIO_REPRODUCIBLE:+--reproducible} --null $cpio_owner_root -H newc $file_metadata_opt -o --quiet > "${DRACUT_TMPDIR}/initramfs.img"
|
||||
| cpio ${CPIO_REPRODUCIBLE:+--reproducible} --null \
|
||||
- ${cpio_owner:+-R "$cpio_owner"} -H newc -o --quiet > "${DRACUT_TMPDIR}/initramfs.img"
|
||||
+ ${cpio_owner:+-R "$cpio_owner"} -H newc $file_metadata_opt -o --quiet > "${DRACUT_TMPDIR}/initramfs.img"
|
||||
); then
|
||||
dfatal "dracut: creation of $outfile failed"
|
||||
exit 1
|
||||
@@ -1998,7 +2005,7 @@ fi
|
||||
if ! (
|
||||
umask 077; cd "$initdir"
|
||||
@@ -2382,7 +2389,7 @@ if ! (
|
||||
umask 077
|
||||
cd "$initdir"
|
||||
find . -print0 | sort -z \
|
||||
- | cpio ${CPIO_REPRODUCIBLE:+--reproducible} --null $cpio_owner_root -H newc -o --quiet \
|
||||
+ | cpio ${CPIO_REPRODUCIBLE:+--reproducible} --null $cpio_owner_root -H newc $file_metadata_opt -o --quiet \
|
||||
- | cpio ${CPIO_REPRODUCIBLE:+--reproducible} --null ${cpio_owner:+-R "$cpio_owner"} -H newc -o --quiet \
|
||||
+ | cpio ${CPIO_REPRODUCIBLE:+--reproducible} --null ${cpio_owner:+-R "$cpio_owner"} -H newc $file_metadata_opt -o --quiet \
|
||||
| $compress >> "${DRACUT_TMPDIR}/initramfs.img"
|
||||
); then
|
||||
dfatal "dracut: creation of $outfile failed"
|
||||
--
|
||||
2.23.0
|
||||
1.8.3.1
|
||||
|
||||
|
||||
@ -1,359 +0,0 @@
|
||||
From 9cf7b1c529442d5abd6eaec4399d4ee77b95145e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?J=C3=B3hann=20B=2E=20Gu=C3=B0mundsson?= <johannbg@gmail.com>
|
||||
Date: Fri, 26 Feb 2021 13:44:05 +0000
|
||||
Subject: [PATCH] fix: always use mkdir -p
|
||||
|
||||
Ensuring that directory creations dont trigger error if directory
|
||||
previously existed as well as create parent directories if needed.
|
||||
|
||||
Reference:https://github.com/dracutdevs/dracut/commit/9cf7b1c529442d5abd6eaec4399d4ee77b95145e
|
||||
Conflict:context adaptation
|
||||
---
|
||||
dracut.sh | 4 +-
|
||||
modules.d/01fips/fips.sh | 2 +-
|
||||
modules.d/80cms/cmssetup.sh | 2 +-
|
||||
modules.d/90crypt/crypt-lib.sh | 2 +-
|
||||
modules.d/90dmsquash-live/dmsquash-generator.sh | 2 +-
|
||||
modules.d/90dmsquash-live/dmsquash-live-root.sh | 12 +-
|
||||
modules.d/90livenet/livenet-generator.sh | 2 +-
|
||||
modules.d/90mdraid/mdmon-pre-udev.sh | 2 +-
|
||||
modules.d/95nbd/nbd-generator.sh | 2 +-
|
||||
modules.d/95nfs/module-setup.sh | 2 +-
|
||||
modules.d/99base/init.sh | 10 +-
|
||||
modules.d/99shutdown/shutdown.sh | 4 +-
|
||||
test/TEST-03-USR-MOUNT/create-root.sh | 2 +-
|
||||
test/TEST-04-FULL-SYSTEMD/create-root.sh | 2 +-
|
||||
test/TEST-11-LVM/test.sh | 2 +-
|
||||
test/TEST-12-RAID-DEG/create-root.sh | 2 +-
|
||||
test/TEST-14-IMSM/test.sh | 2 +-
|
||||
test/TEST-17-LVM-THIN/test.sh | 2 +-
|
||||
test/TEST-20-NFS/test.sh | 2 +-
|
||||
19 files changed, 30 insertions(+), 30 deletions(-)
|
||||
|
||||
diff --git a/dracut.sh b/dracut.sh
|
||||
index 25b0192..4c1c077 100755
|
||||
--- a/dracut.sh
|
||||
+++ b/dracut.sh
|
||||
@@ -977,7 +977,7 @@ trap '
|
||||
trap 'exit 1;' SIGINT
|
||||
|
||||
readonly initdir="${DRACUT_TMPDIR}/initramfs"
|
||||
-mkdir "$initdir"
|
||||
+mkdir -p "$initdir"
|
||||
|
||||
if [[ $early_microcode = yes ]] || ( [[ $acpi_override = yes ]] && [[ -d $acpi_table_dir ]] ); then
|
||||
readonly early_cpio_dir="${DRACUT_TMPDIR}/earlycpio"
|
||||
@@ -1967,7 +1967,7 @@ dinfo "*** Creating image file '$outfile' ***"
|
||||
|
||||
if [[ $uefi = yes ]]; then
|
||||
readonly uefi_outdir="$DRACUT_TMPDIR/uefi"
|
||||
- mkdir "$uefi_outdir"
|
||||
+ mkdir -p "$uefi_outdir"
|
||||
fi
|
||||
|
||||
if [[ $DRACUT_REPRODUCIBLE ]]; then
|
||||
diff --git a/modules.d/01fips/fips.sh b/modules.d/01fips/fips.sh
|
||||
index 8fba135..b9b8d42 100755
|
||||
--- a/modules.d/01fips/fips.sh
|
||||
+++ b/modules.d/01fips/fips.sh
|
||||
@@ -44,7 +44,7 @@ mount_boot()
|
||||
|
||||
[ -e "$boot" ] || return 1
|
||||
|
||||
- mkdir /boot
|
||||
+ mkdir -p /boot
|
||||
info "Mounting $boot as /boot"
|
||||
mount -oro "$boot" /boot || return 1
|
||||
elif [ -d "$NEWROOT/boot" ]; then
|
||||
diff --git a/modules.d/80cms/cmssetup.sh b/modules.d/80cms/cmssetup.sh
|
||||
index 1cfce55..bbf49bf 100755
|
||||
--- a/modules.d/80cms/cmssetup.sh
|
||||
+++ b/modules.d/80cms/cmssetup.sh
|
||||
@@ -111,7 +111,7 @@ function readcmsfile() # $1=dasdport $2=filename
|
||||
devname=$(cd /sys/bus/ccw/devices/$dev/block; set -- *; [ -b /dev/$1 ] && echo $1)
|
||||
devname=${devname:-dasda}
|
||||
|
||||
- [[ -d /mnt ]] || mkdir /mnt
|
||||
+ [[ -d /mnt ]] || mkdir -p /mnt
|
||||
if cmsfs-fuse --to=UTF-8 -a /dev/$devname /mnt; then
|
||||
cat /mnt/$2 > /run/initramfs/$2
|
||||
umount /mnt || umount -l /mnt
|
||||
diff --git a/modules.d/90crypt/crypt-lib.sh b/modules.d/90crypt/crypt-lib.sh
|
||||
index 688ea25..12ee4af 100755
|
||||
--- a/modules.d/90crypt/crypt-lib.sh
|
||||
+++ b/modules.d/90crypt/crypt-lib.sh
|
||||
@@ -200,7 +200,7 @@ readkey() {
|
||||
local mntp="/mnt/$(str_replace "keydev-$keydev-$keypath" '/' '-')"
|
||||
|
||||
if [ ! -d "$mntp" ]; then
|
||||
- mkdir "$mntp"
|
||||
+ mkdir -p "$mntp"
|
||||
mount -r "$keydev" "$mntp" || die 'Mounting rem. dev. failed!'
|
||||
fi
|
||||
fi
|
||||
diff --git a/modules.d/90dmsquash-live/dmsquash-generator.sh b/modules.d/90dmsquash-live/dmsquash-generator.sh
|
||||
index f57b1fc..cce29b9 100755
|
||||
--- a/modules.d/90dmsquash-live/dmsquash-generator.sh
|
||||
+++ b/modules.d/90dmsquash-live/dmsquash-generator.sh
|
||||
@@ -52,7 +52,7 @@ esac
|
||||
|
||||
GENERATOR_DIR="$2"
|
||||
[ -z "$GENERATOR_DIR" ] && exit 1
|
||||
-[ -d "$GENERATOR_DIR" ] || mkdir "$GENERATOR_DIR"
|
||||
+[ -d "$GENERATOR_DIR" ] || mkdir -p "$GENERATOR_DIR"
|
||||
|
||||
getargbool 0 rd.live.overlay.readonly -d -y readonly_overlay && readonly_overlay="--readonly" || readonly_overlay=""
|
||||
getargbool 0 rd.live.overlay.overlayfs && overlayfs="yes"
|
||||
diff --git a/modules.d/90dmsquash-live/dmsquash-live-root.sh b/modules.d/90dmsquash-live/dmsquash-live-root.sh
|
||||
index 6324fe8..2b474b6 100755
|
||||
--- a/modules.d/90dmsquash-live/dmsquash-live-root.sh
|
||||
+++ b/modules.d/90dmsquash-live/dmsquash-live-root.sh
|
||||
@@ -121,7 +121,7 @@ do_live_overlay() {
|
||||
|
||||
# need to know where to look for the overlay
|
||||
if [ -z "$setup" -a -n "$devspec" -a -n "$pathspec" -a -n "$overlay" ]; then
|
||||
- mkdir -m 0755 /run/initramfs/overlayfs
|
||||
+ mkdir -m 0755 -p /run/initramfs/overlayfs
|
||||
opt=''
|
||||
[ -n "$readonly_overlay" ] && opt=-r
|
||||
mount -n -t auto $devspec /run/initramfs/overlayfs || :
|
||||
@@ -206,8 +206,8 @@ do_live_overlay() {
|
||||
fi
|
||||
fi
|
||||
if [ -n "$overlayfs" ]; then
|
||||
- mkdir -m 0755 /run/overlayfs
|
||||
- mkdir -m 0755 /run/ovlwork
|
||||
+ mkdir -m 0755 -p /run/overlayfs
|
||||
+ mkdir -m 0755 -p /run/ovlwork
|
||||
if [ -n "$readonly_overlay" ] && ! [ -h /run/overlayfs-r ]; then
|
||||
info "No persistent overlay found."
|
||||
unset -v readonly_overlay
|
||||
@@ -237,7 +237,7 @@ do_live_overlay() {
|
||||
|
||||
if [ -n "$thin_snapshot" ]; then
|
||||
modprobe dm_thin_pool
|
||||
- mkdir -m 0755 /run/initramfs/thin-overlay
|
||||
+ mkdir -m 0755 -p /run/initramfs/thin-overlay
|
||||
|
||||
# In block units (512b)
|
||||
thin_data_sz=$(( $overlay_size * 1024 * 1024 / 512 ))
|
||||
@@ -336,7 +336,7 @@ if [ -n "$FSIMG" ]; then
|
||||
if [ -n "$writable_fsimg" ]; then
|
||||
# mount the provided filesystem read/write
|
||||
echo "Unpacking live filesystem (may take some time)" > /dev/kmsg
|
||||
- mkdir -m 0755 /run/initramfs/fsimg/
|
||||
+ mkdir -m 0755 -p /run/initramfs/fsimg/
|
||||
if [ -n "$SQUASHED" ]; then
|
||||
cp -v $FSIMG /run/initramfs/fsimg/rootfs.img
|
||||
else
|
||||
@@ -384,7 +384,7 @@ fi
|
||||
ROOTFLAGS="$(getarg rootflags)"
|
||||
|
||||
if [ -n "$overlayfs" ]; then
|
||||
- mkdir -m 0755 /run/rootfsbase
|
||||
+ mkdir -m 0755 -p /run/rootfsbase
|
||||
if [ -n "$reset_overlay" ] && [ -h /run/overlayfs ]; then
|
||||
ovlfs=$(readlink /run/overlayfs)
|
||||
info "Resetting the OverlayFS overlay directory."
|
||||
diff --git a/modules.d/90livenet/livenet-generator.sh b/modules.d/90livenet/livenet-generator.sh
|
||||
index f0d1285..d825159 100755
|
||||
--- a/modules.d/90livenet/livenet-generator.sh
|
||||
+++ b/modules.d/90livenet/livenet-generator.sh
|
||||
@@ -41,7 +41,7 @@ esac
|
||||
GENERATOR_DIR="$2"
|
||||
[ -z "$GENERATOR_DIR" ] && exit 1
|
||||
|
||||
-[ -d "$GENERATOR_DIR" ] || mkdir "$GENERATOR_DIR"
|
||||
+[ -d "$GENERATOR_DIR" ] || mkdir -p "$GENERATOR_DIR"
|
||||
|
||||
getargbool 0 rd.live.overlay.readonly -d -y readonly_overlay && readonly_overlay="--readonly" || readonly_overlay=""
|
||||
getargbool 0 rd.live.overlay.overlayfs && overlayfs="yes"
|
||||
diff --git a/modules.d/90mdraid/mdmon-pre-udev.sh b/modules.d/90mdraid/mdmon-pre-udev.sh
|
||||
index fb9280d..b15cca8 100755
|
||||
--- a/modules.d/90mdraid/mdmon-pre-udev.sh
|
||||
+++ b/modules.d/90mdraid/mdmon-pre-udev.sh
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
# save state dir for mdmon/mdadm for the real root
|
||||
-[ -d /run/mdadm ] || mkdir -m 0755 /run/mdadm
|
||||
+[ -d /run/mdadm ] || mkdir -m 0755 -p /run/mdadm
|
||||
# backward compat link
|
||||
diff --git a/modules.d/95nbd/nbd-generator.sh b/modules.d/95nbd/nbd-generator.sh
|
||||
index de52d11..dccdacf 100755
|
||||
--- a/modules.d/95nbd/nbd-generator.sh
|
||||
+++ b/modules.d/95nbd/nbd-generator.sh
|
||||
@@ -9,7 +9,7 @@ type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
|
||||
GENERATOR_DIR="$2"
|
||||
[ -z "$GENERATOR_DIR" ] && exit 1
|
||||
|
||||
-[ -d "$GENERATOR_DIR" ] || mkdir "$GENERATOR_DIR"
|
||||
+[ -d "$GENERATOR_DIR" ] || mkdir -p "$GENERATOR_DIR"
|
||||
|
||||
ROOTFLAGS="$(getarg rootflags)"
|
||||
|
||||
diff --git a/modules.d/95nfs/module-setup.sh b/modules.d/95nfs/module-setup.sh
|
||||
index f9bcedd..1a2be42 100755
|
||||
--- a/modules.d/95nfs/module-setup.sh
|
||||
+++ b/modules.d/95nfs/module-setup.sh
|
||||
@@ -89,7 +89,7 @@ install() {
|
||||
if [ -f $dracutsysrootdir/lib/modprobe.d/nfs.conf ]; then
|
||||
inst_multiple /lib/modprobe.d/nfs.conf
|
||||
else
|
||||
- [ -d $initdir/etc/modprobe.d/ ] || mkdir $initdir/etc/modprobe.d
|
||||
+ [ -d $initdir/etc/modprobe.d/ ] || mkdir -p $initdir/etc/modprobe.d
|
||||
echo "alias nfs4 nfs" > $initdir/etc/modprobe.d/nfs.conf
|
||||
fi
|
||||
|
||||
diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh
|
||||
index 1111d09..106549b 100755
|
||||
--- a/modules.d/99base/init.sh
|
||||
+++ b/modules.d/99base/init.sh
|
||||
@@ -53,17 +53,17 @@ fi
|
||||
[ ! -h /dev/stderr ] && ln -s /proc/self/fd/2 /dev/stderr >/dev/null 2>&1
|
||||
|
||||
if ! ismounted /dev/pts; then
|
||||
- mkdir -m 0755 /dev/pts
|
||||
+ mkdir -m 0755 -p /dev/pts
|
||||
mount -t devpts -o gid=5,mode=620,noexec,nosuid devpts /dev/pts >/dev/null
|
||||
fi
|
||||
|
||||
if ! ismounted /dev/shm; then
|
||||
- mkdir -m 0755 /dev/shm
|
||||
+ mkdir -m 0755 -p /dev/shm
|
||||
mount -t tmpfs -o mode=1777,noexec,nosuid,nodev,strictatime tmpfs /dev/shm >/dev/null
|
||||
fi
|
||||
|
||||
if ! ismounted /run; then
|
||||
- mkdir -m 0755 /newrun
|
||||
+ mkdir -m 0755 -p /newrun
|
||||
if ! str_starts "$(readlink -f /bin/sh)" "/run/"; then
|
||||
mount -t tmpfs -o mode=0755,noexec,nosuid,nodev,strictatime tmpfs /newrun >/dev/null
|
||||
else
|
||||
@@ -99,7 +99,7 @@ if [ $UDEVVERSION -gt 166 ]; then
|
||||
[ -d /run/udev ] || mkdir -p -m 0755 /run/udev
|
||||
[ -d $UDEVRULESD ] || mkdir -p -m 0755 $UDEVRULESD
|
||||
else
|
||||
- mkdir -m 0755 /dev/.udev /dev/.udev/rules.d
|
||||
+ mkdir -m 0755 -p /dev/.udev /dev/.udev/rules.d
|
||||
export UDEVRULESD=/dev/.udev/rules.d
|
||||
fi
|
||||
|
||||
@@ -369,7 +369,7 @@ debug_on
|
||||
|
||||
if ! [ -d "$NEWROOT"/run ]; then
|
||||
NEWRUN=/dev/.initramfs
|
||||
- mkdir -m 0755 "$NEWRUN"
|
||||
+ mkdir -m 0755 -p "$NEWRUN"
|
||||
mount --rbind /run/initramfs "$NEWRUN"
|
||||
fi
|
||||
|
||||
diff --git a/modules.d/99shutdown/shutdown.sh b/modules.d/99shutdown/shutdown.sh
|
||||
index a30a126..89be9d2 100755
|
||||
--- a/modules.d/99shutdown/shutdown.sh
|
||||
+++ b/modules.d/99shutdown/shutdown.sh
|
||||
@@ -22,9 +22,9 @@ if [ "$(stat -c '%T' -f /)" = "tmpfs" ]; then
|
||||
mount -o remount,rw /
|
||||
fi
|
||||
|
||||
-mkdir /oldsys
|
||||
+mkdir -p /oldsys
|
||||
for i in sys proc run dev; do
|
||||
- mkdir /oldsys/$i
|
||||
+ mkdir -p /oldsys/$i
|
||||
mount --move /oldroot/$i /oldsys/$i
|
||||
done
|
||||
|
||||
diff --git a/test/TEST-03-USR-MOUNT/create-root.sh b/test/TEST-03-USR-MOUNT/create-root.sh
|
||||
index 238fad0..e7de853 100755
|
||||
--- a/test/TEST-03-USR-MOUNT/create-root.sh
|
||||
+++ b/test/TEST-03-USR-MOUNT/create-root.sh
|
||||
@@ -26,7 +26,7 @@ btrfs device scan /dev/sda2
|
||||
btrfs device scan /dev/sdb2
|
||||
mkdir -p /root
|
||||
mount -t btrfs /dev/sda2 /root
|
||||
-[ -d /root/usr ] || mkdir /root/usr
|
||||
+[ -d /root/usr ] || mkdir -p /root/usr
|
||||
mount -t btrfs /dev/sdb2 /root/usr
|
||||
btrfs subvolume create /root/usr/usr
|
||||
umount /root/usr
|
||||
diff --git a/test/TEST-04-FULL-SYSTEMD/create-root.sh b/test/TEST-04-FULL-SYSTEMD/create-root.sh
|
||||
index 5de376c..8c29549 100755
|
||||
--- a/test/TEST-04-FULL-SYSTEMD/create-root.sh
|
||||
+++ b/test/TEST-04-FULL-SYSTEMD/create-root.sh
|
||||
@@ -27,7 +27,7 @@ btrfs device scan /dev/sda2
|
||||
btrfs device scan /dev/sdb2
|
||||
mkdir -p /root
|
||||
mount -t btrfs /dev/sda2 /root
|
||||
-[ -d /root/usr ] || mkdir /root/usr
|
||||
+[ -d /root/usr ] || mkdir -p /root/usr
|
||||
mount -t btrfs /dev/sdb2 /root/usr
|
||||
btrfs subvolume create /root/usr/usr
|
||||
umount /root/usr
|
||||
diff --git a/test/TEST-11-LVM/test.sh b/test/TEST-11-LVM/test.sh
|
||||
index c718ad5..89f1ca2 100755
|
||||
--- a/test/TEST-11-LVM/test.sh
|
||||
+++ b/test/TEST-11-LVM/test.sh
|
||||
@@ -45,7 +45,7 @@ test_setup() {
|
||||
inst ./test-init.sh /sbin/init
|
||||
find_binary plymouth >/dev/null && inst_multiple plymouth
|
||||
cp -a /etc/ld.so.conf* $initdir/etc
|
||||
- mkdir $initdir/run
|
||||
+ mkdir -p $initdir/run
|
||||
ldconfig -r "$initdir"
|
||||
)
|
||||
|
||||
diff --git a/test/TEST-12-RAID-DEG/create-root.sh b/test/TEST-12-RAID-DEG/create-root.sh
|
||||
index c210b58..4c10fd9 100755
|
||||
--- a/test/TEST-12-RAID-DEG/create-root.sh
|
||||
+++ b/test/TEST-12-RAID-DEG/create-root.sh
|
||||
@@ -27,7 +27,7 @@ mke2fs -L root /dev/dracut/root
|
||||
mkdir -p /sysroot
|
||||
mount /dev/dracut/root /sysroot
|
||||
cp -a -t /sysroot /source/*
|
||||
-mkdir /sysroot/run
|
||||
+mkdir -p /sysroot/run
|
||||
umount /sysroot
|
||||
lvm lvchange -a n /dev/dracut/root
|
||||
udevadm settle
|
||||
diff --git a/test/TEST-14-IMSM/test.sh b/test/TEST-14-IMSM/test.sh
|
||||
index 2f153ba..5acae94 100755
|
||||
--- a/test/TEST-14-IMSM/test.sh
|
||||
+++ b/test/TEST-14-IMSM/test.sh
|
||||
@@ -83,7 +83,7 @@ test_setup() {
|
||||
inst ./test-init.sh /sbin/init
|
||||
find_binary plymouth >/dev/null && inst_multiple plymouth
|
||||
cp -a /etc/ld.so.conf* $initdir/etc
|
||||
- mkdir $initdir/run
|
||||
+ mkdir -p $initdir/run
|
||||
ldconfig -r "$initdir"
|
||||
)
|
||||
|
||||
diff --git a/test/TEST-17-LVM-THIN/test.sh b/test/TEST-17-LVM-THIN/test.sh
|
||||
index e4755f7..018dd8b 100755
|
||||
--- a/test/TEST-17-LVM-THIN/test.sh
|
||||
+++ b/test/TEST-17-LVM-THIN/test.sh
|
||||
@@ -45,7 +45,7 @@ test_setup() {
|
||||
inst ./test-init.sh /sbin/init
|
||||
find_binary plymouth >/dev/null && inst_multiple plymouth
|
||||
cp -a /etc/ld.so.conf* $initdir/etc
|
||||
- mkdir $initdir/run
|
||||
+ mkdir -p $initdir/run
|
||||
ldconfig -r "$initdir"
|
||||
)
|
||||
|
||||
diff --git a/test/TEST-20-NFS/test.sh b/test/TEST-20-NFS/test.sh
|
||||
index 9d5493c..25b0b29 100755
|
||||
--- a/test/TEST-20-NFS/test.sh
|
||||
+++ b/test/TEST-20-NFS/test.sh
|
||||
@@ -352,7 +352,7 @@ test_setup() {
|
||||
(
|
||||
export initdir=$TESTDIR/overlay
|
||||
. $basedir/dracut-init.sh
|
||||
- mkdir $TESTDIR/overlay
|
||||
+ mkdir -p $TESTDIR/overlay
|
||||
inst_multiple poweroff shutdown
|
||||
inst_hook shutdown-emergency 000 ./hard-off.sh
|
||||
inst_hook emergency 000 ./hard-off.sh
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,40 +0,0 @@
|
||||
From 96c313333d1a4f5e2c524a3a11c5b3aab24afc20 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?J=C3=B3hann=20B=2E=20Gu=C3=B0mundsson?= <johannbg@gmail.com>
|
||||
Date: Wed, 31 Mar 2021 19:17:43 +0000
|
||||
Subject: [PATCH] fix(dracut.sh): omission is an addition to other omissions in
|
||||
conf files
|
||||
|
||||
When omitting a module from the command line via -o or --omit
|
||||
it's expected that it behaves in the same manner as adding a module from the
|
||||
command line as in it does not overwrite existing omissions of other modules in
|
||||
configuration file(s).
|
||||
|
||||
Reference:https://github.com/dracutdevs/dracut/commit/96c313333d1a4f5e2c524a3a11c5b3aab24afc20
|
||||
Conflict:context adaptation
|
||||
---
|
||||
dracut.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dracut.sh b/dracut.sh
|
||||
index 4c1c077..83f2481 100755
|
||||
--- a/dracut.sh
|
||||
+++ b/dracut.sh
|
||||
@@ -732,6 +732,7 @@ unset NPATH
|
||||
|
||||
# these options add to the stuff in the config file
|
||||
(( ${#add_dracutmodules_l[@]} )) && add_dracutmodules+=" ${add_dracutmodules_l[@]} "
|
||||
+(( ${#omit_dracutmodules_l[@]} )) && omit_dracutmodules+=" ${omit_dracutmodules_l[@]} "
|
||||
(( ${#force_add_dracutmodules_l[@]} )) && force_add_dracutmodules+=" ${force_add_dracutmodules_l[@]} "
|
||||
(( ${#fscks_l[@]} )) && fscks+=" ${fscks_l[@]} "
|
||||
(( ${#add_fstab_l[@]} )) && add_fstab+=" ${add_fstab_l[@]} "
|
||||
@@ -741,7 +742,6 @@ unset NPATH
|
||||
|
||||
# these options override the stuff in the config file
|
||||
(( ${#dracutmodules_l[@]} )) && dracutmodules="${dracutmodules_l[@]}"
|
||||
-(( ${#omit_dracutmodules_l[@]} )) && omit_dracutmodules="${omit_dracutmodules_l[@]}"
|
||||
(( ${#filesystems_l[@]} )) && filesystems="${filesystems_l[@]}"
|
||||
(( ${#fw_dir_l[@]} )) && fw_dir="${fw_dir_l[@]}"
|
||||
(( ${#libdirs_l[@]} ))&& libdirs="${libdirs_l[@]}"
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
Binary file not shown.
BIN
dracut-055.tar.xz
Normal file
BIN
dracut-055.tar.xz
Normal file
Binary file not shown.
@ -1,28 +0,0 @@
|
||||
From cb9e6881dde7ec34e11f6f38727602d6d841a04f Mon Sep 17 00:00:00 2001
|
||||
From: Derek Hageman <hageman@inthat.cloud>
|
||||
Date: Thu, 30 Apr 2020 18:40:13 -0600
|
||||
Subject: [PATCH] 90crypt/module-setup.sh: fix force on multiple lines
|
||||
|
||||
The first line in crypttab with a "force" option causes all subsequent
|
||||
lines to be included as if they also had it set because the variable
|
||||
used to track it is not reset between loop iterations. So fix that by
|
||||
just setting it to empty before the check for the force option.
|
||||
---
|
||||
modules.d/90crypt/module-setup.sh | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/modules.d/90crypt/module-setup.sh b/modules.d/90crypt/module-setup.sh
|
||||
index 3bce241..e3d6338 100755
|
||||
--- a/modules.d/90crypt/module-setup.sh
|
||||
+++ b/modules.d/90crypt/module-setup.sh
|
||||
@@ -113,6 +113,7 @@ install() {
|
||||
set -- ${luksoptions}
|
||||
IFS="${OLD_IFS}"
|
||||
|
||||
+ forceentry=""
|
||||
while [ $# -gt 0 ]; do
|
||||
case $1 in
|
||||
force)
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,28 +0,0 @@
|
||||
From 7a04712ad0efa9afa3759656ea1b26db40a8a29e Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Molkentin <dmolkentin@suse.com>
|
||||
Date: Mon, 21 Jan 2019 14:40:06 +0100
|
||||
Subject: [PATCH] 95zfcp_rules/parse-zfcp.sh: remove rule existence check
|
||||
|
||||
Reference: bsc#1008352
|
||||
|
||||
Original-Patch-By: Michal Suchanek <msuchanek@suse.com>
|
||||
---
|
||||
modules.d/95zfcp_rules/parse-zfcp.sh | 2 --
|
||||
1 file changed, 2 deletions(-)
|
||||
|
||||
diff --git a/modules.d/95zfcp_rules/parse-zfcp.sh b/modules.d/95zfcp_rules/parse-zfcp.sh
|
||||
index 7defb04..2b62012 100755
|
||||
--- a/modules.d/95zfcp_rules/parse-zfcp.sh
|
||||
+++ b/modules.d/95zfcp_rules/parse-zfcp.sh
|
||||
@@ -22,8 +22,6 @@ create_udev_rule() {
|
||||
return 0;
|
||||
fi
|
||||
|
||||
- [ -e ${_rule} ] && return 0
|
||||
-
|
||||
if [ ! -f "$_rule" ] ; then
|
||||
cat > $_rule <<EOF
|
||||
ACTION=="add", SUBSYSTEM=="ccw", KERNEL=="$ccw", IMPORT{program}="collect $ccw %k ${ccw} zfcp"
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,35 +0,0 @@
|
||||
From defb1611c771d9f05780aebb101baefde2f66874 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Mitterle <smitterl@redhat.com>
|
||||
Date: Thu, 19 Mar 2020 12:12:50 +0100
|
||||
Subject: [PATCH] dasd: only install /etc/dasd.conf if present
|
||||
|
||||
`dasd.conf` needn't be present on system even if modules have been loaded.
|
||||
|
||||
Check if file exists to avoid error message during kernel update
|
||||
```bash
|
||||
dracut-install: ERROR: installing '/etc/dasd.conf'
|
||||
dracut: FAILED: /usr/lib/dracut/dracut-install -D /var/tmp/dracut.YvVRx5/initramfs -H /etc/dasd.conf
|
||||
```
|
||||
---
|
||||
modules.d/95dasd/module-setup.sh | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/modules.d/95dasd/module-setup.sh b/modules.d/95dasd/module-setup.sh
|
||||
index 2c49cd2..c71c8a0 100755
|
||||
--- a/modules.d/95dasd/module-setup.sh
|
||||
+++ b/modules.d/95dasd/module-setup.sh
|
||||
@@ -18,8 +18,9 @@ depends() {
|
||||
install() {
|
||||
inst_hook cmdline 30 "$moddir/parse-dasd.sh"
|
||||
inst_multiple dasdinfo dasdconf.sh normalize_dasd_arg
|
||||
- if [[ $hostonly ]]; then
|
||||
- inst -H /etc/dasd.conf
|
||||
+ conf=/etc/dasd.conf
|
||||
+ if [[ $hostonly && -f $conf ]] ; then
|
||||
+ inst -H $conf
|
||||
fi
|
||||
inst_rules 56-dasd.rules
|
||||
inst_rules 59-dasd.rules
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,75 +0,0 @@
|
||||
From 0386e4627779cb51f4292b3c642d90586d5e71b4 Mon Sep 17 00:00:00 2001
|
||||
From: Martin Wilck <mwilck@suse.com>
|
||||
Date: Wed, 29 Jan 2020 23:53:29 +0100
|
||||
Subject: [PATCH] dracut.sh: don't call fsfreeze on subvol of root file system
|
||||
|
||||
dracut.sh already doesn't call fsfreeze if the output file is on
|
||||
the root file system. For btrfs, however, this is not sufficient.
|
||||
Because fsfreeze is a superblock operation, and all btrfs subvolumes
|
||||
share the same superblock, fsfreeze may freeze the entire system
|
||||
if the subvolume on which the output file is written and / are
|
||||
subvolumes of the same file system. Avoid this by comparing file
|
||||
system UUIDs for btrfs.
|
||||
|
||||
Fixes: de576db3c225 ("call fsfreeze(8) on /boot to flush initramfs data & metadata to media")
|
||||
---
|
||||
dracut.sh | 36 +++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 35 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dracut.sh b/dracut.sh
|
||||
index af346f3..c14f6c0 100755
|
||||
--- a/dracut.sh
|
||||
+++ b/dracut.sh
|
||||
@@ -2075,6 +2075,40 @@ fi
|
||||
|
||||
command -v restorecon &>/dev/null && restorecon -- "$outfile"
|
||||
|
||||
+btrfs_uuid() {
|
||||
+ btrfs filesystem show "$1" | sed -n '1s/^.*uuid: //p'
|
||||
+}
|
||||
+
|
||||
+freeze_ok_for_btrfs() {
|
||||
+ local mnt uuid1 uuid2
|
||||
+ # If the output file is on btrfs, we need to make sure that it's
|
||||
+ # not on a subvolume of the same file system as the root FS.
|
||||
+ # Otherwise, fsfreeze() might freeze the entire system.
|
||||
+ # This is most conveniently checked by comparing the FS uuid.
|
||||
+
|
||||
+ [[ "$(stat -f -c %T -- "/")" == "btrfs" ]] || return 0
|
||||
+ mnt=$(stat -c %m -- "$1")
|
||||
+ uuid1=$(btrfs_uuid "$mnt")
|
||||
+ uuid2=$(btrfs_uuid "/")
|
||||
+ [[ "$uuid1" && "$uuid2" && "$uuid1" != "$uuid2" ]]
|
||||
+}
|
||||
+
|
||||
+freeze_ok_for_fstype() {
|
||||
+ local outfile=$1
|
||||
+ local fstype
|
||||
+
|
||||
+ [[ "$(stat -c %m -- "$outfile")" == "/" ]] && return 1
|
||||
+ fstype=$(stat -f -c %T -- "$outfile")
|
||||
+ case $fstype in
|
||||
+ msdos)
|
||||
+ return 1;;
|
||||
+ btrfs)
|
||||
+ freeze_ok_for_btrfs "$outfile";;
|
||||
+ *)
|
||||
+ return 0;;
|
||||
+ esac
|
||||
+}
|
||||
+
|
||||
# We sync/fsfreeze only if we're operating on a live booted system.
|
||||
# It's possible for e.g. `kernel` to be installed as an RPM BuildRequires or equivalent,
|
||||
# and there's no reason to sync, and *definitely* no reason to fsfreeze.
|
||||
@@ -2087,7 +2121,7 @@ if test -d $dracutsysrootdir/run/systemd/system; then
|
||||
fi
|
||||
|
||||
# use fsfreeze only if we're not writing to /
|
||||
- if [[ "$(stat -c %m -- "$outfile")" != "/" && "$(stat -f -c %T -- "$outfile")" != "msdos" ]]; then
|
||||
+ 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
|
||||
dinfo "dracut: warning: could not fsfreeze $(dirname "$outfile")"
|
||||
fi
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,111 +0,0 @@
|
||||
From 8e1a4dc5f8a777fc718db490414ffdc9dc755f66 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Witschel <diabonas@archlinux.org>
|
||||
Date: Sat, 18 Apr 2020 14:55:41 +0200
|
||||
Subject: [PATCH] dracut-lib.sh: quote variables in parameter expansion
|
||||
patterns
|
||||
|
||||
According to POSIX.1-2017, 2.6.2 Parameter Expansion:
|
||||
|
||||
${parameter%[word]} [...] The word shall be expanded to produce a
|
||||
pattern.
|
||||
|
||||
This means if word contains variables that itself contain special
|
||||
characters like asterisks or backslashes, these are treated as pattern
|
||||
characters unless the variable is quoted. Try e.g. the following example
|
||||
in bash, dash or (busybox) ash:
|
||||
|
||||
i='a\c'; j='\'; echo "${i%$j*}"
|
||||
|
||||
This prints "a\c" because "$j*" is expanded to "\*", escaping the
|
||||
asterisk. In contrast,
|
||||
|
||||
i='a\c'; j='\'; echo "${i%"$j"*}"
|
||||
|
||||
produces the expected result "a" because the backslash is not specially
|
||||
treated any more after quoting.
|
||||
|
||||
The quotes that this commit adds have been previously removed in commit
|
||||
f9c96cf56fed390841eac05c43826e62014c9188, citing issues with busybox
|
||||
hush without further specifying the actual error. I tested a recent
|
||||
busybox build (upstream commit 9aa751b08ab03d6396f86c3df77937a19687981b)
|
||||
and couldn't find any problems. Note that the above example always
|
||||
produces "a\c" in hush regardless of quoting $j, making hush unsuitable
|
||||
for use with dracut, but using quotes in parameter expansions generally
|
||||
works.
|
||||
|
||||
The unquoted variables break the "rd.luks.uuid/name" kernel command line
|
||||
options in dracut 050 because
|
||||
|
||||
str_replace "$luksname" '\' '\\'
|
||||
|
||||
in modules.d/90crypt/parse-crypt.sh is not able to escape the
|
||||
backslashes any more, see GH-723, GH-727: backslashes in the
|
||||
systemd-cryptsetup@.service unit name stay unescaped for use in udev
|
||||
(cf. commit 0f6d93eb9d63695a64002ec8b0421fbc9fc8a7a3), leading to
|
||||
failures in starting the unit.
|
||||
|
||||
This partially reverts commit f9c96cf56fed390841eac05c43826e62014c9188.
|
||||
---
|
||||
modules.d/99base/dracut-lib.sh | 16 ++++++++--------
|
||||
1 file changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh
|
||||
index c53cd13..c57523d 100755
|
||||
--- a/modules.d/99base/dracut-lib.sh
|
||||
+++ b/modules.d/99base/dracut-lib.sh
|
||||
@@ -24,7 +24,7 @@ debug_on() {
|
||||
|
||||
# returns OK if $1 contains literal string $2 (and isn't empty)
|
||||
strstr() {
|
||||
- [ "${1##*$2*}" != "$1" ]
|
||||
+ [ "${1##*"$2"*}" != "$1" ]
|
||||
}
|
||||
|
||||
# returns OK if $1 matches (completely) glob pattern $2
|
||||
@@ -43,18 +43,18 @@ strglobin() {
|
||||
|
||||
# returns OK if $1 contains literal string $2 at the beginning, and isn't empty
|
||||
str_starts() {
|
||||
- [ "${1#$2*}" != "$1" ]
|
||||
+ [ "${1#"$2"*}" != "$1" ]
|
||||
}
|
||||
|
||||
# returns OK if $1 contains literal string $2 at the end, and isn't empty
|
||||
str_ends() {
|
||||
- [ "${1%*$2}" != "$1" ]
|
||||
+ [ "${1%*"$2"}" != "$1" ]
|
||||
}
|
||||
|
||||
trim() {
|
||||
local var="$*"
|
||||
- var="${var#${var%%[![:space:]]*}}" # remove leading whitespace characters
|
||||
- var="${var%${var##*[![:space:]]}}" # remove trailing whitespace characters
|
||||
+ var="${var#"${var%%[![:space:]]*}"}" # remove leading whitespace characters
|
||||
+ var="${var%"${var##*[![:space:]]}"}" # remove trailing whitespace characters
|
||||
printf "%s" "$var"
|
||||
}
|
||||
|
||||
@@ -108,9 +108,9 @@ str_replace() {
|
||||
local out=''
|
||||
|
||||
while strstr "${in}" "$s"; do
|
||||
- chop="${in%%$s*}"
|
||||
+ chop="${in%%"$s"*}"
|
||||
out="${out}${chop}$r"
|
||||
- in="${in#*$s}"
|
||||
+ in="${in#*"$s"}"
|
||||
done
|
||||
echo "${out}${in}"
|
||||
}
|
||||
@@ -396,7 +396,7 @@ splitsep() {
|
||||
while [ -n "$str" -a "$#" -gt 1 ]; do
|
||||
tmp="${str%%$sep*}"
|
||||
eval "$1='${tmp}'"
|
||||
- str="${str#$tmp}"
|
||||
+ str="${str#"$tmp"}"
|
||||
str="${str#$sep}"
|
||||
shift
|
||||
done
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,32 +0,0 @@
|
||||
From 7069132ec7e94a3274aa1b3b3b6e339066118a4d Mon Sep 17 00:00:00 2001
|
||||
From: Lukas Nykryn <lnykryn@redhat.com>
|
||||
Date: Tue, 10 Mar 2020 15:18:37 +0100
|
||||
Subject: [PATCH] network: fix glob matching ipv6 addresses
|
||||
|
||||
In this case we want to cover three cases
|
||||
1) ip_address:ip_address
|
||||
2) number:macaddress
|
||||
3) :macaddress
|
||||
|
||||
We consider something an IPv6 address if it starts with number and
|
||||
contains ":", but IPv6 addresses are in hexa.
|
||||
---
|
||||
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 16730e5..7f185fd 100755
|
||||
--- a/modules.d/40network/net-lib.sh
|
||||
+++ b/modules.d/40network/net-lib.sh
|
||||
@@ -510,7 +510,7 @@ ip_to_var() {
|
||||
[ -n "$6" ] && dev=$6
|
||||
[ -n "$7" ] && autoconf=$7
|
||||
case "$8" in
|
||||
- [0-9]*:*|[0-9]*.[0-9]*.[0-9]*.[0-9]*)
|
||||
+ [0-9a-fA-F]*:*|[0-9]*.[0-9]*.[0-9]*.[0-9]*)
|
||||
dns1="$8"
|
||||
[ -n "$9" ] && dns2="$9"
|
||||
;;
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -12,7 +12,7 @@ diff --git a/modules.d/35network-legacy/net-genrules.sh b/modules.d/35network-le
|
||||
index e6035e5..b111c0b 100755
|
||||
--- a/modules.d/35network-legacy/net-genrules.sh
|
||||
+++ b/modules.d/35network-legacy/net-genrules.sh
|
||||
@@ -103,8 +103,10 @@ command -v fix_bootif >/dev/null || . /lib/net-lib.sh
|
||||
@@ -113,8 +113,10 @@ command -v fix_bootif >/dev/null || . /lib/net-lib.sh
|
||||
# Fixme: waiting for the interface as well.
|
||||
else
|
||||
cond='ACTION=="add", SUBSYSTEM=="net", ENV{DEVTYPE}!="wlan|wwan"'
|
||||
@ -21,8 +21,8 @@ index e6035e5..b111c0b 100755
|
||||
echo "$cond, $runcmd" > /etc/udev/rules.d/91-default-net.rules
|
||||
+ echo "$cond2, $runcmd" >> /etc/udev/rules.d/91-default-net.rules
|
||||
if [ "$NEEDNET" = "1" ]; then
|
||||
echo 'for i in /tmp/net.*.did-setup; do [ -f "$i" ] && exit 0; done; exit 1' >$hookdir/initqueue/finished/wait-network.sh
|
||||
fi
|
||||
# shellcheck disable=SC2016
|
||||
echo 'for i in /tmp/net.*.did-setup; do [ -f "$i" ] && exit 0; done; exit 1' > "$hookdir"/initqueue/finished/wait-network.sh
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
|
||||
72
dracut.spec
72
dracut.spec
@ -8,8 +8,8 @@
|
||||
%global __requires_exclude pkg-config
|
||||
|
||||
Name: dracut
|
||||
Version: 050
|
||||
Release: 5
|
||||
Version: 055
|
||||
Release: 1
|
||||
|
||||
Summary: Initramfs generator using udev
|
||||
|
||||
@ -24,22 +24,10 @@ URL: https://dracut.wiki.kernel.org/
|
||||
Source0: http://www.kernel.org/pub/linux/utils/boot/dracut/dracut-%{version}.tar.xz
|
||||
#Source0: https://git.kernel.org/pub/scm/boot/dracut/dracut.git/snapshot/dracut-%{version}.tar.gz
|
||||
|
||||
Patch0: systemd-skip-dependency-add-for-non-existent-units.patch
|
||||
Patch1: dracut-network-fixed-net-rules-issue-hence-systemd-r.patch
|
||||
Patch2: skip-the-broken-sd-in-initqueue.patch
|
||||
Patch3: use-sleep-replace-check-sys-block.patch
|
||||
Patch4: 0001-Fix-pre-trigger-stage-by-replacing-exit-with-return.patch
|
||||
Patch5: 0002-95fcoe-default-rd.nofcoe-to-false.patch
|
||||
Patch6: dracut-95zfcp_rules-parse-zfcp.sh-remove-rule-existence-che.patch
|
||||
Patch7: dracut-dracut.sh-don-t-call-fsfreeze-on-subvol-of-root-file.patch
|
||||
Patch8: dracut-network-fix-glob-matching-ipv6-addresses.patch
|
||||
Patch9: dracut-dasd-only-install-etc-dasd.conf-if-present.patch
|
||||
Patch10: dracut-lib.sh-quote-variables-in-parameter-expansion.patch
|
||||
Patch11: dracut-90crypt-module-setup.sh-fix-force-on-multiple-lines.patch
|
||||
Patch12: Fix-test-in-lsinitrd.patch
|
||||
Patch13: add-option-to-include-file-metadata-in-initramfs.patch
|
||||
Patch14: backport-fix-always-use-mkdir-p.patch
|
||||
Patch15: backport-fix-dracut.sh-omission-is-an-addition-to-other-omiss.patch
|
||||
Patch4: add-option-to-include-file-metadata-in-initramfs.patch
|
||||
|
||||
Source1: https://www.gnu.org/licenses/lgpl-2.1.txt
|
||||
Source2: openEuler.conf.example
|
||||
@ -69,11 +57,6 @@ BuildRequires: docbook-xsl-stylesheets libxslt
|
||||
BuildRequires: asciidoc
|
||||
%endif
|
||||
|
||||
%if 0%{?suse_version} > 9999
|
||||
Obsoletes: mkinitrd < 2.6.1
|
||||
Provides: mkinitrd = 2.6.1
|
||||
%endif
|
||||
|
||||
Obsoletes: dracut-fips <= 047
|
||||
Provides: dracut-fips = %{version}-%{release}
|
||||
Obsoletes: dracut-fips-aesni <= 047
|
||||
@ -237,6 +220,9 @@ rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/00bootchart
|
||||
# we do not support dash in the initramfs
|
||||
rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/00dash
|
||||
|
||||
# we do not support mksh in the initramfs
|
||||
rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/00mksh
|
||||
|
||||
# remove gentoo specific modules
|
||||
rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/50gensplash
|
||||
|
||||
@ -280,21 +266,17 @@ install -m 0644 dracut.conf.d/suse.conf.example $RPM_BUILD_ROOT%{dracutlibdir}
|
||||
%endif
|
||||
|
||||
%if 0%{?openEuler} == 0 && 0%{?fedora} == 0 && 0%{?rhel} == 0 && 0%{?suse_version} <= 9999
|
||||
rm -f -- $RPM_BUILD_ROOT%{_bindir}/mkinitrd
|
||||
rm -f -- $RPM_BUILD_ROOT%{_bindir}/lsinitrd
|
||||
%endif
|
||||
|
||||
%if 0%{?openEuler} || 0%{?fedora} || 0%{?rhel}
|
||||
echo 'hostonly="no"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/02-generic-image.conf
|
||||
echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/02-rescue.conf
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/kernel/postinst.d
|
||||
install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kernel/postinst.d/51-dracut-rescue-postinst.sh
|
||||
%endif
|
||||
|
||||
%files
|
||||
%if %{with doc}
|
||||
%doc README.md HACKING TODO AUTHORS NEWS dracut.html dracut.png dracut.svg
|
||||
%doc README.md AUTHORS
|
||||
%endif
|
||||
%{!?_licensedir:%global license %%doc}
|
||||
%license COPYING lgpl-2.1.txt
|
||||
@ -302,7 +284,6 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne
|
||||
%{_datadir}/bash-completion/completions/dracut
|
||||
%{_datadir}/bash-completion/completions/lsinitrd
|
||||
%if 0%{?openEuler} || 0%{?fedora} || 0%{?rhel} || 0%{?suse_version} > 9999
|
||||
%{_bindir}/mkinitrd
|
||||
%{_bindir}/lsinitrd
|
||||
%endif
|
||||
%dir %{dracutlibdir}
|
||||
@ -314,6 +295,7 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne
|
||||
%{dracutlibdir}/dracut-logger.sh
|
||||
%{dracutlibdir}/dracut-initramfs-restore
|
||||
%{dracutlibdir}/dracut-install
|
||||
%{dracutlibdir}/dracut-util
|
||||
%{dracutlibdir}/skipcpio
|
||||
%config(noreplace) %{_sysconfdir}/dracut.conf
|
||||
%if 0%{?openEuler} || 0%{?fedora} || 0%{?suse_version} || 0%{?rhel}
|
||||
@ -329,7 +311,6 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne
|
||||
%{_mandir}/man8/dracut.8*
|
||||
%{_mandir}/man8/*service.8*
|
||||
%if 0%{?openEuler} || 0%{?fedora} || 0%{?rhel} || 0%{?suse_version} > 9999
|
||||
%{_mandir}/man8/mkinitrd.8*
|
||||
%{_mandir}/man1/lsinitrd.1*
|
||||
%endif
|
||||
%{_mandir}/man7/dracut.kernel.7*
|
||||
@ -344,24 +325,47 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne
|
||||
%endif
|
||||
%{dracutlibdir}/modules.d/00bash
|
||||
%{dracutlibdir}/modules.d/00systemd
|
||||
%{dracutlibdir}/modules.d/00systemd-network-management
|
||||
%ifnarch s390 s390x
|
||||
%{dracutlibdir}/modules.d/00warpclock
|
||||
%endif
|
||||
%if 0%{?openEuler} || 0%{?fedora} || 0%{?rhel} || 0%{?suse_version}
|
||||
%{dracutlibdir}/modules.d/01fips
|
||||
%endif
|
||||
%{dracutlibdir}/modules.d/00mksh
|
||||
%{dracutlibdir}/modules.d/01systemd-ac-power
|
||||
%{dracutlibdir}/modules.d/01systemd-ask-password
|
||||
%{dracutlibdir}/modules.d/01systemd-coredump
|
||||
%{dracutlibdir}/modules.d/01systemd-hostnamed
|
||||
%{dracutlibdir}/modules.d/01systemd-initrd
|
||||
%{dracutlibdir}/modules.d/01systemd-journald
|
||||
%{dracutlibdir}/modules.d/01systemd-ldconfig
|
||||
%{dracutlibdir}/modules.d/01systemd-modules-load
|
||||
%{dracutlibdir}/modules.d/01systemd-repart
|
||||
%{dracutlibdir}/modules.d/01systemd-resolved
|
||||
%{dracutlibdir}/modules.d/01systemd-rfkill
|
||||
%{dracutlibdir}/modules.d/01systemd-sysext
|
||||
%{dracutlibdir}/modules.d/01systemd-sysctl
|
||||
%{dracutlibdir}/modules.d/01systemd-sysusers
|
||||
%{dracutlibdir}/modules.d/01systemd-timedated
|
||||
%{dracutlibdir}/modules.d/01systemd-timesyncd
|
||||
%{dracutlibdir}/modules.d/01systemd-tmpfiles
|
||||
%{dracutlibdir}/modules.d/01systemd-udevd
|
||||
%{dracutlibdir}/modules.d/01systemd-veritysetup
|
||||
%{dracutlibdir}/modules.d/03modsign
|
||||
%{dracutlibdir}/modules.d/03rescue
|
||||
%{dracutlibdir}/modules.d/04watchdog
|
||||
%{dracutlibdir}/modules.d/04watchdog-modules
|
||||
%{dracutlibdir}/modules.d/05busybox
|
||||
%{dracutlibdir}/modules.d/06dbus-broker
|
||||
%{dracutlibdir}/modules.d/06dbus-daemon
|
||||
%{dracutlibdir}/modules.d/06rngd
|
||||
%{dracutlibdir}/modules.d/09dbus
|
||||
%{dracutlibdir}/modules.d/10i18n
|
||||
%{dracutlibdir}/modules.d/30convertfs
|
||||
%{dracutlibdir}/modules.d/45url-lib
|
||||
%{dracutlibdir}/modules.d/50drm
|
||||
%{dracutlibdir}/modules.d/50plymouth
|
||||
%{dracutlibdir}/modules.d/62bluetooth
|
||||
%{dracutlibdir}/modules.d/80lvmmerge
|
||||
%{dracutlibdir}/modules.d/90btrfs
|
||||
%{dracutlibdir}/modules.d/90crypt
|
||||
@ -372,14 +376,16 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne
|
||||
%{dracutlibdir}/modules.d/90lvm
|
||||
%{dracutlibdir}/modules.d/90mdraid
|
||||
%{dracutlibdir}/modules.d/90multipath
|
||||
%{dracutlibdir}/modules.d/90stratis
|
||||
%{dracutlibdir}/modules.d/90nvdimm
|
||||
%{dracutlibdir}/modules.d/90qemu
|
||||
%{dracutlibdir}/modules.d/90ppcmac
|
||||
%{dracutlibdir}/modules.d/91crypt-gpg
|
||||
%{dracutlibdir}/modules.d/91crypt-loop
|
||||
%{dracutlibdir}/modules.d/91tpm2-tss
|
||||
%{dracutlibdir}/modules.d/95debug
|
||||
%{dracutlibdir}/modules.d/95fstab-sys
|
||||
%{dracutlibdir}/modules.d/95lunmask
|
||||
%{dracutlibdir}/modules.d/95nvmf
|
||||
%{dracutlibdir}/modules.d/95resume
|
||||
%{dracutlibdir}/modules.d/95rootfs-block
|
||||
%{dracutlibdir}/modules.d/95terminfo
|
||||
@ -410,6 +416,7 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne
|
||||
%{dracutlibdir}/modules.d/98syslog
|
||||
%{dracutlibdir}/modules.d/98usrmount
|
||||
%{dracutlibdir}/modules.d/99base
|
||||
%{dracutlibdir}/modules.d/99memstrack
|
||||
%{dracutlibdir}/modules.d/99fs-lib
|
||||
%{dracutlibdir}/modules.d/99shutdown
|
||||
%attr(0644,root,root) %ghost %config(missingok,noreplace) %{_localstatedir}/log/dracut.log
|
||||
@ -438,9 +445,10 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne
|
||||
%endif
|
||||
|
||||
%files network
|
||||
%{dracutlibdir}/modules.d/02systemd-networkd
|
||||
%{dracutlibdir}/modules.d/01systemd-networkd
|
||||
%{dracutlibdir}/modules.d/35network-manager
|
||||
%{dracutlibdir}/modules.d/35network-legacy
|
||||
%{dracutlibdir}/modules.d/35network-wicked
|
||||
%{dracutlibdir}/modules.d/40network
|
||||
%{dracutlibdir}/modules.d/45ifcfg
|
||||
%{dracutlibdir}/modules.d/90kernel-network-modules
|
||||
@ -486,10 +494,12 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne
|
||||
%{dracutlibdir}/dracut.conf.d/02-rescue.conf
|
||||
%if 0%{?openEuler} || 0%{?fedora} || 0%{?rhel}
|
||||
%{_prefix}/lib/kernel/install.d/51-dracut-rescue.install
|
||||
%{_sysconfdir}/kernel/postinst.d/51-dracut-rescue-postinst.sh
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Fri Aug 6 2021 panxiaohe <panxiaohe@huawei.com> - 055-1
|
||||
- Update to 055
|
||||
|
||||
* Thu Jul 22 2021 wangchen <wangchen137@huawei.com> - 050-5
|
||||
- Delete unnecessary gdb from BuildRequires
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ index 3ddc236..c7d7888 100755
|
||||
--- a/modules.d/98dracut-systemd/dracut-initqueue.sh
|
||||
+++ b/modules.d/98dracut-systemd/dracut-initqueue.sh
|
||||
@@ -16,6 +16,31 @@ RDRETRY=${RDRETRY:-180}
|
||||
RDRETRY=$(($RDRETRY*2))
|
||||
RDRETRY=$((RDRETRY * 2))
|
||||
export RDRETRY
|
||||
|
||||
+if getarg 'skipbadscsi' -d 'skipbadscsi'; then
|
||||
|
||||
@ -1,25 +0,0 @@
|
||||
From 3a4a212649bd89f5a07ccf87a53b3103094748a3 Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Mon, 20 Apr 2020 15:07:02 +0200
|
||||
Subject: [PATCH] systemd: skip dependency add for non-existent units
|
||||
|
||||
Fixes: https://github.com/dracutdevs/dracut/issues/795
|
||||
---
|
||||
modules.d/00systemd/module-setup.sh | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/modules.d/00systemd/module-setup.sh b/modules.d/00systemd/module-setup.sh
|
||||
index 5ebdfc3..17be74f 100755
|
||||
--- a/modules.d/00systemd/module-setup.sh
|
||||
+++ b/modules.d/00systemd/module-setup.sh
|
||||
@@ -241,6 +241,7 @@ install() {
|
||||
systemd-ask-password-console.service \
|
||||
systemd-ask-password-plymouth.service \
|
||||
; do
|
||||
+ [[ -f $systemdsystemunitdir/$i ]] || continue
|
||||
systemctl -q --root "$initdir" add-wants "$i" systemd-vconsole-setup.service
|
||||
done
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user