From 5f0dd725fe275d7f61a8331c368c82bc5f0f5368 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mar 13 2020 10:05:00 +0000 Subject: dracut-050-25.git20200313 network-manager: ensure that nm-run.sh is executed for rd.neednet --- diff --git a/0001-Fix-pre-trigger-stage-by-replacing-exit-with-return-.patch b/0001-Fix-pre-trigger-stage-by-replacing-exit-with-return-.patch deleted file mode 100644 index cd16587..0000000 --- a/0001-Fix-pre-trigger-stage-by-replacing-exit-with-return-.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 7fb8f939a52a904b1860e303a6a7fe69ba0d2ceb Mon Sep 17 00:00:00 2001 -From: Radek Vykydal -Date: Tue, 10 Mar 2020 10:48:21 +0100 -Subject: [PATCH] Fix pre-trigger stage by replacing exit with return in - lldpad.sh - -Using exit makes the pre-trigger stage finish after running 03-lldpad.sh -pre-trigger hook. ---- - modules.d/95fcoe/lldpad.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/95fcoe/lldpad.sh b/modules.d/95fcoe/lldpad.sh -index c32feeed..444c943e 100755 ---- a/modules.d/95fcoe/lldpad.sh -+++ b/modules.d/95fcoe/lldpad.sh -@@ -2,7 +2,7 @@ - - if ! getargbool 0 rd.nofcoe ; then - info "rd.nofcoe=0: skipping lldpad activation" -- exit 0 -+ return 0 - fi - - # Note lldpad will stay running after switchroot, the system initscripts --- -2.25.1 - diff --git a/0001.patch b/0001.patch new file mode 100644 index 0000000..3ff9a99 --- /dev/null +++ b/0001.patch @@ -0,0 +1,27 @@ +From 3ba12b22491de49853685bec5bb345e624c119ab Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Wed, 4 Mar 2020 14:39:22 +0100 +Subject: [PATCH] test/TEST-35-ISCSI-MULTI: bump disk space + +--- + test/TEST-35-ISCSI-MULTI/test.sh | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/test/TEST-35-ISCSI-MULTI/test.sh b/test/TEST-35-ISCSI-MULTI/test.sh +index e96c9c56..740ab918 100755 +--- a/test/TEST-35-ISCSI-MULTI/test.sh ++++ b/test/TEST-35-ISCSI-MULTI/test.sh +@@ -144,9 +144,9 @@ test_setup() { + fi + + # Create the blank file to use as a root filesystem +- dd if=/dev/null of=$TESTDIR/root.ext3 bs=1M seek=45 +- dd if=/dev/null of=$TESTDIR/iscsidisk2.img bs=1M seek=45 +- dd if=/dev/null of=$TESTDIR/iscsidisk3.img bs=1M seek=45 ++ dd if=/dev/null of=$TESTDIR/root.ext3 bs=1M seek=90 ++ dd if=/dev/null of=$TESTDIR/iscsidisk2.img bs=1M seek=90 ++ dd if=/dev/null of=$TESTDIR/iscsidisk3.img bs=1M seek=90 + + kernel=$KVERSION + # Create what will eventually be our root filesystem onto an overlay + diff --git a/0002.patch b/0002.patch new file mode 100644 index 0000000..05dd7c1 --- /dev/null +++ b/0002.patch @@ -0,0 +1,33 @@ +From 9e68789d66a6a383e5c46f687350897705c7994f Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Wed, 4 Mar 2020 14:39:39 +0100 +Subject: [PATCH] dracut.spec: add version check for deprecated files + +--- + dracut.spec | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/dracut.spec b/dracut.spec +index e336a25c..03b41471 100644 +--- a/dracut.spec ++++ b/dracut.spec +@@ -278,8 +278,7 @@ rm -f -- $RPM_BUILD_ROOT%{_mandir}/man1/lsinitrd.1* + 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 + +-%if 0%{?fedora} || 0%{?rhel} +-# FIXME: remove after F30 ++%if 0%{?fedora} <= 30 || 0%{?rhel} <= 8 + 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 +@@ -475,7 +474,7 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne + %files config-rescue + %{dracutlibdir}/dracut.conf.d/02-rescue.conf + %{_prefix}/lib/kernel/install.d/51-dracut-rescue.install +-%if 0%{?fedora} || 0%{?rhel} ++%if 0%{?fedora} <= 30 || 0%{?rhel} <= 8 + # FIXME: remove after F30 + %{_sysconfdir}/kernel/postinst.d/51-dracut-rescue-postinst.sh + %endif + diff --git a/0003.patch b/0003.patch new file mode 100644 index 0000000..c9fdebd --- /dev/null +++ b/0003.patch @@ -0,0 +1,76 @@ +From eb8a7a96351b6e1cfd9dc34f1e854333a8f4a4e0 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= + +Date: Fri, 6 Mar 2020 08:46:36 +0700 +Subject: [PATCH] Makefile: merge main-version and git-version earlier + +With GNU Make 4.3 on both ArchLinux, and VoidLinux, +GITVERION is always empty because of bad substitution. +Change '\#' to simply '#' can fix it, +but we don't need that complation. + +We can merge DRACUT_MAIN_VERSION and GITVERSION into DRACUT_FULL_VERSION. +Because, GITVERSION will be attached back to DRACUT_MAIN_VERSION in all +situation. + +While we're at it, detect if we're in git worktree by: +limiting GIT_CEILING_DIRECTORIES to parent directory of +dracut's top level directory; instead of checking for .git directory, +in order to support git-worktree, in such case, .git will be a file, see +gitrepository-layout(5) +--- + Makefile | 13 +++++++------ + 1 file changed, 7 insertions(+), 6 deletions(-) + +diff --git a/Makefile b/Makefile +index 22b584f1..c69e2dfc 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,8 +1,9 @@ + -include dracut-version.sh + +-DRACUT_MAIN_VERSION ?= $(shell [ -d .git ] && git describe --abbrev=0 --tags --always 2>/dev/null || :) ++DRACUT_MAIN_VERSION ?= $(shell env GIT_CEILING_DIRECTORIES=$(CWD)/.. git describe --abbrev=0 --tags --always 2>/dev/null || :) + DRACUT_MAIN_VERSION ?= $(DRACUT_VERSION) +-GITVERSION ?= $(shell [ -d .git ] && { v=$$(git describe --tags --always 2>/dev/null); [ -n "$$v" ] && [ $${v\#*-} != $$v ] && echo -$${v\#*-}; } ) ++DRACUT_FULL_VERSION ?= $(shell env GIT_CEILING_DIRECTORIES=$(CWD)/.. git describe --tags --always 2>/dev/null || :) ++DRACUT_FULL_VERSION ?= $(DRACUT_VERSION) + + -include Makefile.inc + +@@ -92,14 +93,14 @@ endif + + %.xml: %.asc + @rm -f -- "$@" +- asciidoc -a "version=$(DRACUT_MAIN_VERSION)$(GITVERSION)" -d manpage -b docbook -o "$@" $< ++ asciidoc -a "version=$(DRACUT_FULL_VERSION)" -d manpage -b docbook -o "$@" $< + + dracut.8: dracut.usage.asc dracut.8.asc + + dracut.html: dracut.asc $(manpages) dracut.css dracut.usage.asc + @rm -f -- dracut.xml + asciidoc -a "mainversion=$(DRACUT_MAIN_VERSION)" \ +- -a "version=$(DRACUT_MAIN_VERSION)$(GITVERSION)" \ ++ -a "version=$(DRACUT_FULL_VERSION)" \ + -a numbered \ + -d book -b docbook -o dracut.xml dracut.asc + @rm -f -- dracut.html +@@ -112,7 +113,7 @@ dracut.html: dracut.asc $(manpages) dracut.css dracut.usage.asc + dracut.pc: Makefile.inc Makefile + @echo "Name: dracut" > dracut.pc + @echo "Description: dracut" >> dracut.pc +- @echo "Version: $(DRACUT_MAIN_VERSION)$(GITVERSION)" >> dracut.pc ++ @echo "Version: $(DRACUT_FULL_VERSION)" >> dracut.pc + @echo "dracutdir=$(pkglibdir)" >> dracut.pc + @echo "dracutmodulesdir=$(pkglibdir)/modules.d" >> dracut.pc + @echo "dracutconfdir=$(pkglibdir)/dracut.conf.d" >> dracut.pc +@@ -182,7 +183,7 @@ endif + + dracut-version.sh: + @rm -f dracut-version.sh +- @echo "DRACUT_VERSION=$(DRACUT_MAIN_VERSION)$(GITVERSION)" > dracut-version.sh ++ @echo "DRACUT_VERSION=$(DRACUT_FULL_VERSION)" > dracut-version.sh + + clean: + $(RM) *~ + diff --git a/0004.patch b/0004.patch new file mode 100644 index 0000000..fe51c52 --- /dev/null +++ b/0004.patch @@ -0,0 +1,54 @@ +From 7ef5ead6f4cf4834b84ea6d9546b77ddc0da394b Mon Sep 17 00:00:00 2001 +From: Martin Wilck +Date: Thu, 30 Jan 2020 13:48:11 +0100 +Subject: [PATCH] Add module "90nvdimm" for NVDIMM support + +Detection of persistent memory devices works mostly out of the box +already. Only the "provider" modules for ndbus devices, which are responsible +to extract information of available NVDIMM devices and their configuration +from system firmware, are only indirectly linked into the module stack. +Examples for such modules are nfit.ko, nd_e820.ko, and virtio-pmem.ko. + +Add a module that resolves these dependencies. +--- + modules.d/90nvdimm/module-setup.sh | 31 +++++++++++++++++++++++++++++++ + 1 file changed, 31 insertions(+) + +diff --git a/modules.d/90nvdimm/module-setup.sh b/modules.d/90nvdimm/module-setup.sh +new file mode 100755 +index 00000000..6d58efd7 +--- /dev/null ++++ b/modules.d/90nvdimm/module-setup.sh +@@ -0,0 +1,31 @@ ++#!/bin/bash ++ ++# called by dracut ++check() { ++ if [[ ! $hostonly ]]; then ++ return 0 ++ fi ++ [[ $DRACUT_KERNEL_MODALIASES && -f "$DRACUT_KERNEL_MODALIASES" ]] && \ ++ grep -q libnvdimm "$DRACUT_KERNEL_MODALIASES" && return 0 ++ return 255 ++} ++ ++# called by dracut ++depends() { ++ return 0 ++} ++ ++# called by dracut ++installkernel() { ++ # Directories to search for NVDIMM "providers" (firmware drivers) ++ # These modules call "nvdimm_bus_register()". ++ local _provider_dirs='=drivers/nvdimm =drivers/acpi =arch/powerpc' ++ ++ #instmods() will take care of hostonly ++ dracut_instmods -o -s nvdimm_bus_register $_provider_dirs ++} ++ ++# called by dracut ++install() { ++ inst_multiple -o ndctl ++} + diff --git a/0005.patch b/0005.patch new file mode 100644 index 0000000..81831de --- /dev/null +++ b/0005.patch @@ -0,0 +1,25 @@ +From 18420d9ce5bb738473d127affb96a5c6a44ba2ac Mon Sep 17 00:00:00 2001 +From: Martin Wilck +Date: Thu, 30 Jan 2020 15:44:28 +0100 +Subject: [PATCH] 90kernel-modules: remove nfit from static module list + +The 90nvdimm module now resolves the nfit dependency when it's +necessary, so it's not necessary any more to pack it always. +--- + modules.d/90kernel-modules/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh +index 2ca4b719..bc3810cc 100755 +--- a/modules.d/90kernel-modules/module-setup.sh ++++ b/modules.d/90kernel-modules/module-setup.sh +@@ -28,7 +28,7 @@ installkernel() { + hostonly='' instmods sr_mod sd_mod scsi_dh ata_piix + instmods \ + scsi_dh_rdac scsi_dh_emc scsi_dh_alua \ +- =ide nvme vmd nfit \ ++ =ide nvme vmd \ + virtio_blk + + dracut_instmods -o -s "${_blockfuncs}" "=drivers" + diff --git a/0006.patch b/0006.patch new file mode 100644 index 0000000..b3d9df6 --- /dev/null +++ b/0006.patch @@ -0,0 +1,22 @@ +From 5a720ebf6711a119649645de673bcb247e09a1ba Mon Sep 17 00:00:00 2001 +From: Martin Wilck +Date: Fri, 6 Mar 2020 10:26:43 +0100 +Subject: [PATCH] dracut.spec: add 90nvdimm + +--- + dracut.spec | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/dracut.spec b/dracut.spec +index 03b41471..0369dde6 100644 +--- a/dracut.spec ++++ b/dracut.spec +@@ -364,6 +364,7 @@ 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/90nvdimm + %{dracutlibdir}/modules.d/90stratis + %{dracutlibdir}/modules.d/90ppcmac + %{dracutlibdir}/modules.d/90qemu + diff --git a/0007.patch b/0007.patch new file mode 100644 index 0000000..db2e06c --- /dev/null +++ b/0007.patch @@ -0,0 +1,70 @@ +From db9b5851f3bca0844890d529c7560c89ef81b92a Mon Sep 17 00:00:00 2001 +From: Daniel Molkentin +Date: Wed, 30 Oct 2019 09:30:32 +0100 +Subject: [PATCH] 99base: Remove duplicate nfsroot_to_var from dracut-lib.sh + +It already lives in nfs-lib.sh, which is the more correct library scope. + +Fixes #17 +--- + modules.d/95nfs/parse-nfsroot.sh | 1 + + modules.d/99base/dracut-lib.sh | 33 --------------------------------- + 2 files changed, 1 insertion(+), 33 deletions(-) + +diff --git a/modules.d/95nfs/parse-nfsroot.sh b/modules.d/95nfs/parse-nfsroot.sh +index f715767b..44a69d48 100755 +--- a/modules.d/95nfs/parse-nfsroot.sh ++++ b/modules.d/95nfs/parse-nfsroot.sh +@@ -24,6 +24,7 @@ + # + + type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh ++ . /lib/nfs-lib.sh + + # This script is sourced, so root should be set. But let's be paranoid + [ -z "$root" ] && root=$(getarg root=) +diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh +index 207a2b5c..c53cd13b 100755 +--- a/modules.d/99base/dracut-lib.sh ++++ b/modules.d/99base/dracut-lib.sh +@@ -579,39 +579,6 @@ else + } + fi + +-# root=nfs:[:][:] +-# root=nfs4:[:][:] +-nfsroot_to_var() { +- # strip nfs[4]: +- local arg="$@:" +- nfs="${arg%%:*}" +- arg="${arg##$nfs:}" +- +- # check if we have a server +- if strstr "$arg" ':/' ; then +- server="${arg%%:/*}" +- arg="/${arg##*:/}" +- fi +- +- path="${arg%%:*}" +- +- # rest are options +- options="${arg##$path}" +- # strip leading ":" +- options="${options##:}" +- # strip ":" +- options="${options%%:}" +- +- # Does it really start with '/'? +- [ -n "${path%%/*}" ] && path="error"; +- +- #Fix kernel legacy style separating path and options with ',' +- if [ "$path" != "${path#*,}" ] ; then +- options=${path#*,} +- path=${path%%,*} +- fi +-} +- + # Create udev rule match for a device with its device name, or the udev property + # ID_FS_UUID or ID_FS_LABEL + # + diff --git a/0008.patch b/0008.patch new file mode 100644 index 0000000..f6e89f1 --- /dev/null +++ b/0008.patch @@ -0,0 +1,26 @@ +From 7a04712ad0efa9afa3759656ea1b26db40a8a29e Mon Sep 17 00:00:00 2001 +From: Daniel Molkentin +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 +--- + 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 7defb04f..2b62012b 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 < +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 af346f3a..c14f6c0b 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 + diff --git a/0010.patch b/0010.patch new file mode 100644 index 0000000..4cec891 --- /dev/null +++ b/0010.patch @@ -0,0 +1,38 @@ +From bc1e69b691e6d25722b64e1df58a35e3be977801 Mon Sep 17 00:00:00 2001 +From: Topi Miettinen +Date: Sun, 1 Mar 2020 10:45:16 +0200 +Subject: [PATCH] Use TMPDIR if available + +Use environment variable TMPDIR (typically /run/user/$UID) as default +temporary directory, if available. This should be more private +location than /var/tmp. Path specified with --tmpdir is takes +precedence over TMPDIR and /var/tmp is still used as last resort if +neither TMPDIR is set nor --tmpdir is used. + +Signed-off-by: Topi Miettinen +--- + dracut.sh | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/dracut.sh b/dracut.sh +index c14f6c0b..ab82cbc9 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -140,7 +140,7 @@ Creates initial ramdisk images for preloading modules + --confdir [DIR] Specify configuration directory to use *.conf files + from. Default: /etc/dracut.conf.d + --tmpdir [DIR] Temporary directory to be used instead of default +- /var/tmp. ++ ${TMPDIR:-/var/tmp}. + -r, --sysroot [DIR] Specify sysroot directory to collect files from. + -l, --local Local mode. Use modules from the current working + directory instead of the system-wide installed in +@@ -765,6 +765,7 @@ stdloglvl=$((stdloglvl + verbosity_mod_l)) + [[ $dracutbasedir ]] || dracutbasedir=$dracutsysrootdir/usr/lib/dracut + [[ $fw_dir ]] || fw_dir="$dracutsysrootdir/lib/firmware/updates:$dracutsysrootdir/lib/firmware:$dracutsysrootdir/lib/firmware/$kernel" + [[ $tmpdir_l ]] && tmpdir="$tmpdir_l" ++[[ $tmpdir ]] && tmpdir="$TMPDIR" + [[ $tmpdir ]] || tmpdir=$dracutsysrootdir/var/tmp + [[ $INITRD_COMPRESS ]] && compress=$INITRD_COMPRESS + [[ $compress_l ]] && compress=$compress_l + diff --git a/0011.patch b/0011.patch new file mode 100644 index 0000000..7753b55 --- /dev/null +++ b/0011.patch @@ -0,0 +1,17 @@ +From 2293609dcba01f5bf256b4245896927d4719a273 Mon Sep 17 00:00:00 2001 +From: Daniel Molkentin +Date: Tue, 24 Jul 2018 19:38:30 +0200 +Subject: [PATCH] 95dcssblk: fix script permissions + +--- + modules.d/95dcssblk/module-setup.sh | 0 + modules.d/95dcssblk/parse-dcssblk.sh | 0 + 2 files changed, 0 insertions(+), 0 deletions(-) + +diff --git a/modules.d/95dcssblk/module-setup.sh b/modules.d/95dcssblk/module-setup.sh +old mode 100644 +new mode 100755 +diff --git a/modules.d/95dcssblk/parse-dcssblk.sh b/modules.d/95dcssblk/parse-dcssblk.sh +old mode 100644 +new mode 100755 + diff --git a/0012.patch b/0012.patch new file mode 100644 index 0000000..a956e76 --- /dev/null +++ b/0012.patch @@ -0,0 +1,32 @@ +From a76aa8e39016a8564adb0f18f93bbf2e15d3243f Mon Sep 17 00:00:00 2001 +From: Alexander Tsoy +Date: Sun, 8 Mar 2020 05:47:50 +0300 +Subject: [PATCH] Makefile: fix VERSION again + +The variable is not undefined anymore after the first assignment, so +we should check if variable is empty instead. +--- + Makefile | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index c69e2dfc..02e2c4b5 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,9 +1,13 @@ + -include dracut-version.sh + + DRACUT_MAIN_VERSION ?= $(shell env GIT_CEILING_DIRECTORIES=$(CWD)/.. git describe --abbrev=0 --tags --always 2>/dev/null || :) +-DRACUT_MAIN_VERSION ?= $(DRACUT_VERSION) ++ifeq ($(DRACUT_MAIN_VERSION),) ++DRACUT_MAIN_VERSION = $(DRACUT_VERSION) ++endif + DRACUT_FULL_VERSION ?= $(shell env GIT_CEILING_DIRECTORIES=$(CWD)/.. git describe --tags --always 2>/dev/null || :) +-DRACUT_FULL_VERSION ?= $(DRACUT_VERSION) ++ifeq ($(DRACUT_FULL_VERSION),) ++DRACUT_FULL_VERSION = $(DRACUT_VERSION) ++endif + + -include Makefile.inc + + diff --git a/0013.patch b/0013.patch new file mode 100644 index 0000000..47e7aaf --- /dev/null +++ b/0013.patch @@ -0,0 +1,26 @@ +From 7fb8f939a52a904b1860e303a6a7fe69ba0d2ceb Mon Sep 17 00:00:00 2001 +From: Radek Vykydal +Date: Tue, 10 Mar 2020 10:48:21 +0100 +Subject: [PATCH] Fix pre-trigger stage by replacing exit with return in + lldpad.sh + +Using exit makes the pre-trigger stage finish after running 03-lldpad.sh +pre-trigger hook. +--- + modules.d/95fcoe/lldpad.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/95fcoe/lldpad.sh b/modules.d/95fcoe/lldpad.sh +index c32feeed..444c943e 100755 +--- a/modules.d/95fcoe/lldpad.sh ++++ b/modules.d/95fcoe/lldpad.sh +@@ -2,7 +2,7 @@ + + if ! getargbool 0 rd.nofcoe ; then + info "rd.nofcoe=0: skipping lldpad activation" +- exit 0 ++ return 0 + fi + + # Note lldpad will stay running after switchroot, the system initscripts + diff --git a/0014.patch b/0014.patch new file mode 100644 index 0000000..f357af7 --- /dev/null +++ b/0014.patch @@ -0,0 +1,39 @@ +From 8446c8f9deefcc6c47d96a128b1e9b23d8855a96 Mon Sep 17 00:00:00 2001 +From: Thomas Blume +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 444c943e..7faa2e19 100755 +--- a/modules.d/95fcoe/lldpad.sh ++++ b/modules.d/95fcoe/lldpad.sh +@@ -1,6 +1,6 @@ + #!/bin/bash + +-if ! getargbool 0 rd.nofcoe ; then ++if getargbool 0 rd.nofcoe ; then + info "rd.nofcoe=0: skipping lldpad activation" + return 0 + fi +diff --git a/modules.d/95fcoe/parse-fcoe.sh b/modules.d/95fcoe/parse-fcoe.sh +index 8bb55c6e..86f4331e 100755 +--- a/modules.d/95fcoe/parse-fcoe.sh ++++ b/modules.d/95fcoe/parse-fcoe.sh +@@ -13,7 +13,7 @@ + # fcoe=eth0:nodcb:vn2vn + # fcoe=4a:3f:4c:04:f8:d7:nodcb:fabric + +-if ! getargbool 0 rd.nofcoe ; then ++if getargbool 0 rd.nofcoe ; then + info "rd.nofcoe=0: skipping fcoe" + return 0 + fi + diff --git a/0015.patch b/0015.patch new file mode 100644 index 0000000..c758eb3 --- /dev/null +++ b/0015.patch @@ -0,0 +1,25 @@ +From 058739bf6941f4e96cc734fe4582abbb55baac38 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Wed, 11 Mar 2020 12:38:01 +0100 +Subject: [PATCH] README.md: fix github action badge links + +--- + README.md | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/README.md b/README.md +index c0ee79e2..9948bf97 100644 +--- a/README.md ++++ b/README.md +@@ -4,8 +4,8 @@ dracut + dracut is an event driven initramfs infrastructure. + + [![Build Status](https://travis-ci.org/dracutdevs/dracut.svg?branch=master)](https://travis-ci.org/dracutdevs/dracut) +-![Fedora-30](https://github.com/dracutdevs/dracut/workflows/Fedora-30/badge.svg?branch=master) +-![Fedora-31](https://github.com/dracutdevs/dracut/workflows/Fedora-31/badge.svg?branch=master) ++[![Fedora-30](https://github.com/dracutdevs/dracut/workflows/Fedora-30/badge.svg?branch=master)](https://github.com/dracutdevs/dracut/actions?query=workflow%3AFedora-30) ++[![Fedora-31](https://github.com/dracutdevs/dracut/workflows/Fedora-31/badge.svg?branch=master)](https://github.com/dracutdevs/dracut/actions?query=workflow%3AFedora-31) + + dracut (the tool) is used to create an initramfs image by copying tools + and files from an installed system and combining it with the + diff --git a/0016.patch b/0016.patch new file mode 100644 index 0000000..2f938e2 --- /dev/null +++ b/0016.patch @@ -0,0 +1,28 @@ +From 0402b3777b1c64bd716f588ff7457b905e98489d Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Wed, 11 Mar 2020 12:56:52 +0100 +Subject: [PATCH] btrfs: force preload btrfs module + +fixes https://github.com/dracutdevs/dracut/issues/658 + +raid6_pq and xor takes time doing benchmarking + +[ 3.983009] request_module fs-btrfs succeeded, but still no fs? +--- + modules.d/90btrfs/module-setup.sh | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/modules.d/90btrfs/module-setup.sh b/modules.d/90btrfs/module-setup.sh +index b0d0058b..66a254e1 100755 +--- a/modules.d/90btrfs/module-setup.sh ++++ b/modules.d/90btrfs/module-setup.sh +@@ -48,5 +48,7 @@ install() { + + inst_multiple -o btrfsck btrfs-zero-log + inst $(command -v btrfs) /sbin/btrfs ++ # Hack for slow machines ++ # see https://github.com/dracutdevs/dracut/issues/658 ++ echo "rd.driver.pre=btrfs" > ${initdir}/etc/cmdline.d/00-btrfs.conf + } +- + diff --git a/0017.patch b/0017.patch new file mode 100644 index 0000000..51c10e8 --- /dev/null +++ b/0017.patch @@ -0,0 +1,39 @@ +From fc6f458c3becd55277d1ab87d1608f0fe1fccf08 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Wed, 11 Mar 2020 13:14:26 +0100 +Subject: [PATCH] TEST-12-RAID-DEG/create-root.sh: more udevadm settle + +--- + test/TEST-12-RAID-DEG/create-root.sh | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/test/TEST-12-RAID-DEG/create-root.sh b/test/TEST-12-RAID-DEG/create-root.sh +index c210b582..f40d2500 100755 +--- a/test/TEST-12-RAID-DEG/create-root.sh ++++ b/test/TEST-12-RAID-DEG/create-root.sh +@@ -20,7 +20,7 @@ echo "The passphrase is test" + set -e + cryptsetup luksOpen /dev/md0 dracut_crypt_test /tmp/mduuid + . /tmp/mduuid ++udevadm settle + eval $(udevadm info --query=env --name=/dev/md0|while read line || [ -n "$line" ]; do [ "$line" != "${line#*ID_FS_UUID*}" ] && echo $line; done;) + { echo "dracut-root-block-created"; echo MD_UUID=$MD_UUID; echo "ID_FS_UUID=$ID_FS_UUID";} | dd oflag=direct,dsync of=/dev/sda + diff --git a/0018.patch b/0018.patch new file mode 100644 index 0000000..825bae8 --- /dev/null +++ b/0018.patch @@ -0,0 +1,46 @@ +From 3dcaa97ca4dcfa8092252a22df62c60941e59ce3 Mon Sep 17 00:00:00 2001 +From: Beniamino Galvani +Date: Wed, 11 Mar 2020 09:40:50 +0100 +Subject: [PATCH] network-manager: ensure that nm-run.sh is executed when + needed + +The network-manager command line hook must install a +initqueue/finished hook to ensure that nm-run.sh is executed when +there are network connections to activate. + +Fixes: #694 +--- + modules.d/35network-manager/nm-config.sh | 11 +++++++++++ + modules.d/35network-manager/nm-run.sh | 2 ++ + 2 files changed, 13 insertions(+) + +diff --git a/modules.d/35network-manager/nm-config.sh b/modules.d/35network-manager/nm-config.sh +index 1efa737c..39a1c8bd 100755 +--- a/modules.d/35network-manager/nm-config.sh ++++ b/modules.d/35network-manager/nm-config.sh +@@ -5,3 +5,14 @@ if [ -n "$netroot" ] || [ -e /tmp/net.ifaces ]; then + fi + + /usr/libexec/nm-initrd-generator -- $(getcmdline) ++ ++if getargbool 0 rd.neednet; then ++ for i in /usr/lib/NetworkManager/system-connections/* \ ++ /run/NetworkManager/system-connections/* \ ++ /etc/NetworkManager/system-connections/* \ ++ /etc/sysconfig/network-scripts/ifcfg-*; do ++ [ -f "$i" ] || continue ++ echo '[ -f /tmp/nm.done ]' >$hookdir/initqueue/finished/nm.sh ++ break ++ done ++fi +diff --git a/modules.d/35network-manager/nm-run.sh b/modules.d/35network-manager/nm-run.sh +index 4079b735..fc5280a1 100755 +--- a/modules.d/35network-manager/nm-run.sh ++++ b/modules.d/35network-manager/nm-run.sh +@@ -22,3 +22,5 @@ do + source_hook initqueue/online $ifname + /sbin/netroot $ifname + done ++ ++> /tmp/nm.done + diff --git a/0019.patch b/0019.patch new file mode 100644 index 0000000..33328e9 --- /dev/null +++ b/0019.patch @@ -0,0 +1,344 @@ +From a22ab24d5371cbd73b18b27e98e980e45e39ff5f Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 12 Mar 2020 11:55:37 +0100 +Subject: [PATCH] test: use dd from /dev/zero, instead of creating files with a + hole + +--- + test/TEST-01-BASIC/test.sh | 2 +- + test/TEST-02-SYSTEMD/test.sh | 2 +- + test/TEST-03-USR-MOUNT/test.sh | 4 ++-- + test/TEST-04-FULL-SYSTEMD/test.sh | 4 ++-- + test/TEST-10-RAID/test.sh | 2 +- + test/TEST-11-LVM/test.sh | 2 +- + test/TEST-12-RAID-DEG/test.sh | 10 +++++----- + test/TEST-13-ENC-RAID-LVM/test.sh | 2 +- + test/TEST-14-IMSM/test.sh | 8 ++++---- + test/TEST-15-BTRFSRAID/test.sh | 2 +- + test/TEST-17-LVM-THIN/test.sh | 2 +- + test/TEST-20-NFS/test.sh | 2 +- + test/TEST-30-ISCSI/test.sh | 10 +++++----- + test/TEST-35-ISCSI-MULTI/test.sh | 10 +++++----- + test/TEST-40-NBD/test.sh | 8 ++++---- + test/TEST-50-MULTINIC/test.sh | 2 +- + test/TEST-60-BONDBRIDGEVLANIFCFG/test.sh | 2 +- + 17 files changed, 37 insertions(+), 37 deletions(-) + +diff --git a/test/TEST-01-BASIC/test.sh b/test/TEST-01-BASIC/test.sh +index c47098ea..668a35d8 100755 +--- a/test/TEST-01-BASIC/test.sh ++++ b/test/TEST-01-BASIC/test.sh +@@ -20,7 +20,7 @@ test_run() { + test_setup() { + rm -f -- $TESTDIR/root.ext3 + # Create the blank file to use as a root filesystem +- dd if=/dev/null of=$TESTDIR/root.ext3 bs=1M seek=80 ++ dd if=/dev/zero of=$TESTDIR/root.ext3 bs=1M count=80 + + kernel=$KVERSION + # Create what will eventually be our root filesystem onto an overlay +diff --git a/test/TEST-02-SYSTEMD/test.sh b/test/TEST-02-SYSTEMD/test.sh +index cf1fcaa5..5c0a54de 100755 +--- a/test/TEST-02-SYSTEMD/test.sh ++++ b/test/TEST-02-SYSTEMD/test.sh +@@ -16,7 +16,7 @@ test_run() { + test_setup() { + rm -f -- $TESTDIR/root.ext3 + # Create the blank file to use as a root filesystem +- dd if=/dev/null of=$TESTDIR/root.ext3 bs=1M seek=80 ++ dd if=/dev/zero of=$TESTDIR/root.ext3 bs=1M count=80 + + kernel=$KVERSION + # Create what will eventually be our root filesystem onto an overlay +diff --git a/test/TEST-03-USR-MOUNT/test.sh b/test/TEST-03-USR-MOUNT/test.sh +index 5de7f4a1..5190f220 100755 +--- a/test/TEST-03-USR-MOUNT/test.sh ++++ b/test/TEST-03-USR-MOUNT/test.sh +@@ -41,8 +41,8 @@ test_setup() { + rm -f -- $TESTDIR/root.btrfs + rm -f -- $TESTDIR/usr.btrfs + # Create the blank file to use as a root filesystem +- dd if=/dev/null of=$TESTDIR/root.btrfs bs=1M seek=160 +- dd if=/dev/null of=$TESTDIR/usr.btrfs bs=1M seek=160 ++ dd if=/dev/zero of=$TESTDIR/root.btrfs bs=1M count=160 ++ dd if=/dev/zero of=$TESTDIR/usr.btrfs bs=1M count=160 + + kernel=$KVERSION + # Create what will eventually be our root filesystem onto an overlay +diff --git a/test/TEST-04-FULL-SYSTEMD/test.sh b/test/TEST-04-FULL-SYSTEMD/test.sh +index 3a544d7c..e3b23327 100755 +--- a/test/TEST-04-FULL-SYSTEMD/test.sh ++++ b/test/TEST-04-FULL-SYSTEMD/test.sh +@@ -42,8 +42,8 @@ test_setup() { + rm -f -- $TESTDIR/root.btrfs + rm -f -- $TESTDIR/usr.btrfs + # Create the blank file to use as a root filesystem +- dd if=/dev/null of=$TESTDIR/root.btrfs bs=1M seek=320 +- dd if=/dev/null of=$TESTDIR/usr.btrfs bs=1M seek=320 ++ dd if=/dev/zero of=$TESTDIR/root.btrfs bs=1M count=320 ++ dd if=/dev/zero of=$TESTDIR/usr.btrfs bs=1M count=320 + + export kernel=$KVERSION + # Create what will eventually be our root filesystem onto an overlay +diff --git a/test/TEST-10-RAID/test.sh b/test/TEST-10-RAID/test.sh +index 981c1b9d..4203cfdc 100755 +--- a/test/TEST-10-RAID/test.sh ++++ b/test/TEST-10-RAID/test.sh +@@ -19,7 +19,7 @@ test_setup() { + DISKIMAGE=$TESTDIR/TEST-10-RAID-root.img + # Create the blank file to use as a root filesystem + rm -f -- $DISKIMAGE +- dd if=/dev/null of=$DISKIMAGE bs=1M seek=128 ++ dd if=/dev/zero of=$DISKIMAGE bs=1M count=128 + + kernel=$KVERSION + # Create what will eventually be our root filesystem onto an overlay +diff --git a/test/TEST-11-LVM/test.sh b/test/TEST-11-LVM/test.sh +index c718ad57..22643758 100755 +--- a/test/TEST-11-LVM/test.sh ++++ b/test/TEST-11-LVM/test.sh +@@ -16,7 +16,7 @@ test_run() { + + test_setup() { + # Create the blank file to use as a root filesystem +- dd if=/dev/null of=$TESTDIR/root.ext2 bs=1M seek=80 ++ dd if=/dev/zero of=$TESTDIR/root.ext2 bs=1M count=80 + + kernel=$KVERSION + # Create what will eventually be our root filesystem onto an overlay +diff --git a/test/TEST-12-RAID-DEG/test.sh b/test/TEST-12-RAID-DEG/test.sh +index f8dc08d9..09eb28bb 100755 +--- a/test/TEST-12-RAID-DEG/test.sh ++++ b/test/TEST-12-RAID-DEG/test.sh +@@ -25,7 +25,7 @@ client_run() { + return 1; + fi + rm -f -- $TESTDIR/marker.img +- dd if=/dev/null of=$TESTDIR/marker.img bs=1M seek=40 ++ dd if=/dev/zero of=$TESTDIR/marker.img bs=1M count=40 + + echo "CLIENT TEST END: $@ [OK]" + return 0 +@@ -56,10 +56,10 @@ test_run() { + test_setup() { + # Create the blank file to use as a root filesystem + rm -f -- $TESTDIR/marker.img +- dd if=/dev/null of=$TESTDIR/marker.img bs=1M seek=40 +- dd if=/dev/null of=$TESTDIR/disk1.img bs=1M seek=35 +- dd if=/dev/null of=$TESTDIR/disk2.img bs=1M seek=35 +- dd if=/dev/null of=$TESTDIR/disk3.img bs=1M seek=35 ++ dd if=/dev/zero of=$TESTDIR/marker.img bs=1M count=40 ++ dd if=/dev/zero of=$TESTDIR/disk1.img bs=1M count=35 ++ dd if=/dev/zero of=$TESTDIR/disk2.img bs=1M count=35 ++ dd if=/dev/zero of=$TESTDIR/disk3.img bs=1M count=35 + + kernel=$KVERSION + # Create what will eventually be our root filesystem onto an overlay +diff --git a/test/TEST-13-ENC-RAID-LVM/test.sh b/test/TEST-13-ENC-RAID-LVM/test.sh +index 580ade85..16ee8e66 100755 +--- a/test/TEST-13-ENC-RAID-LVM/test.sh ++++ b/test/TEST-13-ENC-RAID-LVM/test.sh +@@ -50,7 +50,7 @@ test_run() { + test_setup() { + # Create the blank file to use as a root filesystem + rm -f -- $TESTDIR/root.ext2 +- dd if=/dev/null of=$TESTDIR/root.ext2 bs=1M seek=134 ++ dd if=/dev/zero of=$TESTDIR/root.ext2 bs=1M count=134 + + kernel=$KVERSION + # Create what will eventually be our root filesystem onto an overlay +diff --git a/test/TEST-14-IMSM/test.sh b/test/TEST-14-IMSM/test.sh +index 2f153ba3..1f822e4e 100755 +--- a/test/TEST-14-IMSM/test.sh ++++ b/test/TEST-14-IMSM/test.sh +@@ -11,7 +11,7 @@ client_run() { + echo "CLIENT TEST START: $@" + + rm -f -- $TESTDIR/marker.img +- dd if=/dev/null of=$TESTDIR/marker.img bs=1M seek=1 ++ dd if=/dev/zero of=$TESTDIR/marker.img bs=1M count=1 + + $testdir/run-qemu \ + -drive format=raw,index=0,media=disk,file=$TESTDIR/marker.img \ +@@ -53,9 +53,9 @@ test_setup() { + rm -f -- $TESTDIR/marker.img + rm -f -- $TESTDIR/disk1 + rm -f -- $TESTDIR/disk2 +- dd if=/dev/null of=$TESTDIR/marker.img bs=1M seek=1 +- dd if=/dev/null of=$TESTDIR/disk1 bs=1M seek=104 +- dd if=/dev/null of=$TESTDIR/disk2 bs=1M seek=104 ++ dd if=/dev/zero of=$TESTDIR/marker.img bs=1M count=1 ++ dd if=/dev/zero of=$TESTDIR/disk1 bs=1M count=104 ++ dd if=/dev/zero of=$TESTDIR/disk2 bs=1M count=104 + + kernel=$KVERSION + # Create what will eventually be our root filesystem onto an overlay +diff --git a/test/TEST-15-BTRFSRAID/test.sh b/test/TEST-15-BTRFSRAID/test.sh +index 435e52be..227daaba 100755 +--- a/test/TEST-15-BTRFSRAID/test.sh ++++ b/test/TEST-15-BTRFSRAID/test.sh +@@ -21,7 +21,7 @@ test_setup() { + # Create the blank file to use as a root filesystem + DISKIMAGE=$TESTDIR/TEST-15-BTRFSRAID-root.img + rm -f -- $DISKIMAGE +- dd if=/dev/null of=$DISKIMAGE bs=1M seek=1024 ++ dd if=/dev/zero of=$DISKIMAGE bs=1M count=1024 + + kernel=$KVERSION + # Create what will eventually be our root filesystem onto an overlay +diff --git a/test/TEST-17-LVM-THIN/test.sh b/test/TEST-17-LVM-THIN/test.sh +index e4755f78..8ab30a45 100755 +--- a/test/TEST-17-LVM-THIN/test.sh ++++ b/test/TEST-17-LVM-THIN/test.sh +@@ -16,7 +16,7 @@ test_run() { + + test_setup() { + # Create the blank file to use as a root filesystem +- dd if=/dev/null of=$TESTDIR/root.ext2 bs=1M seek=92 ++ dd if=/dev/zero of=$TESTDIR/root.ext2 bs=1M count=92 + + kernel=$KVERSION + # Create what will eventually be our root filesystem onto an overlay +diff --git a/test/TEST-20-NFS/test.sh b/test/TEST-20-NFS/test.sh +index 9d5493c7..53d1d804 100755 +--- a/test/TEST-20-NFS/test.sh ++++ b/test/TEST-20-NFS/test.sh +@@ -225,7 +225,7 @@ test_run() { + + test_setup() { + # Make server root +- dd if=/dev/null of=$TESTDIR/server.ext3 bs=1M seek=120 ++ dd if=/dev/zero of=$TESTDIR/server.ext3 bs=1M count=120 + mke2fs -j -F $TESTDIR/server.ext3 + mkdir $TESTDIR/mnt + mount -o loop $TESTDIR/server.ext3 $TESTDIR/mnt +diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh +index a8aee221..2f37f5c9 100755 +--- a/test/TEST-30-ISCSI/test.sh ++++ b/test/TEST-30-ISCSI/test.sh +@@ -129,9 +129,9 @@ test_setup() { + fi + + # Create the blank file to use as a root filesystem +- dd if=/dev/null of=$TESTDIR/root.ext3 bs=1M seek=45 +- dd if=/dev/null of=$TESTDIR/iscsidisk2.img bs=1M seek=45 +- dd if=/dev/null of=$TESTDIR/iscsidisk3.img bs=1M seek=45 ++ dd if=/dev/zero of=$TESTDIR/root.ext3 bs=1M count=45 ++ dd if=/dev/zero of=$TESTDIR/iscsidisk2.img bs=1M count=45 ++ dd if=/dev/zero of=$TESTDIR/iscsidisk3.img bs=1M count=45 + + kernel=$KVERSION + # Create what will eventually be our root filesystem onto an overlay +@@ -182,7 +182,7 @@ test_setup() { + + + # Need this so kvm-qemu will boot (needs non-/dev/zero local disk) +- if ! dd if=/dev/null of=$TESTDIR/client.img bs=1M seek=1; then ++ if ! dd if=/dev/zero of=$TESTDIR/client.img bs=1M count=1; then + echo "Unable to make client sdb image" 1>&2 + return 1 + fi +@@ -198,7 +198,7 @@ test_setup() { + rm -- $TESTDIR/client.img + + # Make server root +- dd if=/dev/null of=$TESTDIR/server.ext3 bs=1M seek=60 ++ dd if=/dev/zero of=$TESTDIR/server.ext3 bs=1M count=60 + mkfs.ext3 -j -F $TESTDIR/server.ext3 + mkdir $TESTDIR/mnt + mount -o loop $TESTDIR/server.ext3 $TESTDIR/mnt +diff --git a/test/TEST-35-ISCSI-MULTI/test.sh b/test/TEST-35-ISCSI-MULTI/test.sh +index 740ab918..54700609 100755 +--- a/test/TEST-35-ISCSI-MULTI/test.sh ++++ b/test/TEST-35-ISCSI-MULTI/test.sh +@@ -144,9 +144,9 @@ test_setup() { + fi + + # Create the blank file to use as a root filesystem +- dd if=/dev/null of=$TESTDIR/root.ext3 bs=1M seek=90 +- dd if=/dev/null of=$TESTDIR/iscsidisk2.img bs=1M seek=90 +- dd if=/dev/null of=$TESTDIR/iscsidisk3.img bs=1M seek=90 ++ dd if=/dev/zero of=$TESTDIR/root.ext3 bs=1M count=90 ++ dd if=/dev/zero of=$TESTDIR/iscsidisk2.img bs=1M count=90 ++ dd if=/dev/zero of=$TESTDIR/iscsidisk3.img bs=1M count=90 + + kernel=$KVERSION + # Create what will eventually be our root filesystem onto an overlay +@@ -197,7 +197,7 @@ test_setup() { + + + # Need this so kvm-qemu will boot (needs non-/dev/zero local disk) +- if ! dd if=/dev/null of=$TESTDIR/client.img bs=1M seek=1; then ++ if ! dd if=/dev/zero of=$TESTDIR/client.img bs=1M count=1; then + echo "Unable to make client sdb image" 1>&2 + return 1 + fi +@@ -213,7 +213,7 @@ test_setup() { + rm -- $TESTDIR/client.img + + # Make server root +- dd if=/dev/null of=$TESTDIR/server.ext3 bs=1M seek=60 ++ dd if=/dev/zero of=$TESTDIR/server.ext3 bs=1M count=60 + mkfs.ext3 -j -F $TESTDIR/server.ext3 + mkdir $TESTDIR/mnt + mount -o loop $TESTDIR/server.ext3 $TESTDIR/mnt +diff --git a/test/TEST-40-NBD/test.sh b/test/TEST-40-NBD/test.sh +index f06c36c3..b6c45f01 100755 +--- a/test/TEST-40-NBD/test.sh ++++ b/test/TEST-40-NBD/test.sh +@@ -209,8 +209,8 @@ client_run() { + + make_encrypted_root() { + # Create the blank file to use as a root filesystem +- dd if=/dev/null of=$TESTDIR/encrypted.ext2 bs=1M seek=80 +- dd if=/dev/null of=$TESTDIR/flag.img bs=1M seek=1 ++ dd if=/dev/zero of=$TESTDIR/encrypted.ext2 bs=1M count=80 ++ dd if=/dev/zero of=$TESTDIR/flag.img bs=1M count=1 + + kernel=$KVERSION + # Create what will eventually be our root filesystem onto an overlay +@@ -280,7 +280,7 @@ make_encrypted_root() { + } + + make_client_root() { +- dd if=/dev/null of=$TESTDIR/nbd.ext2 bs=1M seek=120 ++ dd if=/dev/zero of=$TESTDIR/nbd.ext2 bs=1M count=120 + mke2fs -F -j $TESTDIR/nbd.ext2 + mkdir $TESTDIR/mnt + if ! mount -o loop $TESTDIR/nbd.ext2 $TESTDIR/mnt; then +@@ -325,7 +325,7 @@ make_client_root() { + } + + make_server_root() { +- dd if=/dev/null of=$TESTDIR/server.ext2 bs=1M seek=120 ++ dd if=/dev/zero of=$TESTDIR/server.ext2 bs=1M count=120 + mke2fs -F $TESTDIR/server.ext2 + mkdir $TESTDIR/mnt + mount -o loop $TESTDIR/server.ext2 $TESTDIR/mnt +diff --git a/test/TEST-50-MULTINIC/test.sh b/test/TEST-50-MULTINIC/test.sh +index b4326d5a..be87caab 100755 +--- a/test/TEST-50-MULTINIC/test.sh ++++ b/test/TEST-50-MULTINIC/test.sh +@@ -173,7 +173,7 @@ test_client() { + + test_setup() { + # Make server root +- dd if=/dev/null of="$TESTDIR"/server.ext3 bs=1M seek=120 ++ dd if=/dev/zero of="$TESTDIR"/server.ext3 bs=1M count=120 + mke2fs -j -F -- "$TESTDIR"/server.ext3 + mkdir -- "$TESTDIR"/mnt + mount -o loop -- "$TESTDIR"/server.ext3 "$TESTDIR"/mnt +diff --git a/test/TEST-60-BONDBRIDGEVLANIFCFG/test.sh b/test/TEST-60-BONDBRIDGEVLANIFCFG/test.sh +index 72826a5d..accfa006 100755 +--- a/test/TEST-60-BONDBRIDGEVLANIFCFG/test.sh ++++ b/test/TEST-60-BONDBRIDGEVLANIFCFG/test.sh +@@ -199,7 +199,7 @@ root=nfs:192.168.50.1:/nfs/client bootdev=br0 + + test_setup() { + # Make server root +- dd if=/dev/null of="$TESTDIR"/server.ext3 bs=1M seek=120 ++ dd if=/dev/zero of="$TESTDIR"/server.ext3 bs=1M count=120 + mke2fs -j -F -- "$TESTDIR"/server.ext3 + mkdir -- "$TESTDIR"/mnt + mount -o loop -- "$TESTDIR"/server.ext3 "$TESTDIR"/mnt + diff --git a/0020.patch b/0020.patch new file mode 100644 index 0000000..ce54716 --- /dev/null +++ b/0020.patch @@ -0,0 +1,53 @@ +From d5bfaf58ab2098737bad92008916d39a0ec361db Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 12 Mar 2020 12:50:08 +0100 +Subject: [PATCH] github actions: use test container directly + +--- + .github/workflows/fedora-30.yml | 6 ++++-- + .github/workflows/fedora-31.yml | 6 ++++-- + 2 files changed, 8 insertions(+), 4 deletions(-) + +diff --git a/.github/workflows/fedora-30.yml b/.github/workflows/fedora-30.yml +index 345ed0d4..1a3d3e8d 100644 +--- a/.github/workflows/fedora-30.yml ++++ b/.github/workflows/fedora-30.yml +@@ -13,7 +13,9 @@ on: + jobs: + test: + runs-on: ubuntu-latest +- #container: quay.io/haraldh/dracut-fedora:30 ++ container: ++ image: quay.io/haraldh/dracut-fedora:30 ++ options: "--privileged" + timeout-minutes: 45 + strategy: + matrix: +@@ -45,4 +47,4 @@ jobs: + fetch-depth: 0 + + - name: "TEST-${{ matrix.test }}" +- run: docker run --privileged -v $(pwd)/:/dracut quay.io/haraldh/dracut-fedora:30 /dracut/fedora-test-github.sh "TEST-${{ matrix.test }}" ${{ matrix.test }} ++ run: ./fedora-test-github.sh "TEST-${{ matrix.test }}" ${{ matrix.test }} +diff --git a/.github/workflows/fedora-31.yml b/.github/workflows/fedora-31.yml +index 20ad62c2..aa829df2 100644 +--- a/.github/workflows/fedora-31.yml ++++ b/.github/workflows/fedora-31.yml +@@ -13,7 +13,9 @@ on: + jobs: + test: + runs-on: ubuntu-latest +- #container: quay.io/haraldh/dracut-fedora:30 ++ container: ++ image: quay.io/haraldh/dracut-fedora:31 ++ options: "--privileged" + timeout-minutes: 45 + strategy: + matrix: +@@ -51,4 +53,4 @@ jobs: + fetch-depth: 0 + + - name: "TEST-${{ matrix.test }}" +- run: docker run --privileged -v $(pwd)/:/dracut quay.io/haraldh/dracut-fedora:31 /dracut/fedora-test-github.sh "TEST-${{ matrix.test }}" ${{ matrix.test }} ++ run: ./fedora-test-github.sh "TEST-${{ matrix.test }}" ${{ matrix.test }} + diff --git a/0021.patch b/0021.patch new file mode 100644 index 0000000..4163d10 --- /dev/null +++ b/0021.patch @@ -0,0 +1,23 @@ +From 3b396a7d5092cec4c7b185bda63906069b8ec320 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 12 Mar 2020 13:22:10 +0100 +Subject: [PATCH] TEST-41-NBD-NM/Makefile: should be based on TEST-40-NBD not + TEST-20-NFS + +--- + test/TEST-41-NBD-NM/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/TEST-41-NBD-NM/Makefile b/test/TEST-41-NBD-NM/Makefile +index b19122a1..47c90c31 100644 +--- a/test/TEST-41-NBD-NM/Makefile ++++ b/test/TEST-41-NBD-NM/Makefile +@@ -1,6 +1,6 @@ + .PHONY: all setup clean run + +-BASETEST=../TEST-20-NFS ++BASETEST=../TEST-40-NBD + + all: + @$(MAKE) NM=1 -s --no-print-directory -C $(BASETEST) all + diff --git a/0022.patch b/0022.patch new file mode 100644 index 0000000..c0b5bef --- /dev/null +++ b/0022.patch @@ -0,0 +1,30 @@ +From 7069132ec7e94a3274aa1b3b3b6e339066118a4d Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn +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 16730e5b..7f185fdd 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" + ;; + diff --git a/0023.patch b/0023.patch new file mode 100644 index 0000000..0badac7 --- /dev/null +++ b/0023.patch @@ -0,0 +1,90 @@ +From ca8ca19091a1822ee813657764263f76ffaa4ebb Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 12 Mar 2020 13:01:46 +0100 +Subject: [PATCH] .travis.yml: reformat + +--- + .travis.yml | 56 ++++++++++++++++++++++++++++---------------------------- + 1 file changed, 28 insertions(+), 28 deletions(-) + +diff --git a/.travis.yml b/.travis.yml +index e9f62a98..a82e1778 100644 +--- a/.travis.yml ++++ b/.travis.yml +@@ -2,34 +2,34 @@ language: generic + dist: bionic + sudo: required + services: +-- docker ++ - docker + env: + matrix: +- - IMAGE=latest +- - IMAGE=latest TESTS=01 +- - IMAGE=latest TESTS=12 +- - IMAGE=latest TESTS=20 +- - IMAGE=latest TESTS=21 +- - IMAGE=latest TESTS=50 +- - IMAGE=latest TESTS=51 +- - IMAGE=latest TESTS=30 +- - IMAGE=latest TESTS=31 +- - IMAGE=latest TESTS=35 +- - IMAGE=latest TESTS=36 +- - IMAGE=latest TESTS=40 +- - IMAGE=latest TESTS=41 +- - IMAGE=latest TESTS=60 +- - IMAGE=latest TESTS=61 +- - IMAGE=latest TESTS=99 +- - IMAGE=latest TESTS=02 +- - IMAGE=latest TESTS=03 +- - IMAGE=latest TESTS=04 +- - IMAGE=latest TESTS=10 +- - IMAGE=latest TESTS=11 +- - IMAGE=latest TESTS=13 +- - IMAGE=latest TESTS=14 +- - IMAGE=latest TESTS=15 +- - IMAGE=latest TESTS=17 ++ - IMAGE=latest ++ - IMAGE=latest TESTS=01 ++ - IMAGE=latest TESTS=12 ++ - IMAGE=latest TESTS=20 ++ - IMAGE=latest TESTS=21 ++ - IMAGE=latest TESTS=50 ++ - IMAGE=latest TESTS=51 ++ - IMAGE=latest TESTS=30 ++ - IMAGE=latest TESTS=31 ++ - IMAGE=latest TESTS=35 ++ - IMAGE=latest TESTS=36 ++ - IMAGE=latest TESTS=40 ++ - IMAGE=latest TESTS=41 ++ - IMAGE=latest TESTS=60 ++ - IMAGE=latest TESTS=61 ++ - IMAGE=latest TESTS=99 ++ - IMAGE=latest TESTS=02 ++ - IMAGE=latest TESTS=03 ++ - IMAGE=latest TESTS=04 ++ - IMAGE=latest TESTS=10 ++ - IMAGE=latest TESTS=11 ++ - IMAGE=latest TESTS=13 ++ - IMAGE=latest TESTS=14 ++ - IMAGE=latest TESTS=15 ++ - IMAGE=latest TESTS=17 + + before_script: + - docker pull quay.io/haraldh/dracut-fedora:$IMAGE +@@ -44,12 +44,12 @@ before_script: + + script: + ## The test container is created with https://github.com/dracutdevs/fedora-container +-- docker run --privileged -it -v $(pwd)/:/dracut quay.io/haraldh/dracut-fedora:$IMAGE /dracut/fedora-test.sh $IMAGE-$$ "$TESTS" ++ - docker run --privileged -it -v $(pwd)/:/dracut quay.io/haraldh/dracut-fedora:$IMAGE /dracut/fedora-test.sh $IMAGE-$$ "$TESTS" + + notifications: + webhooks: + urls: +- - https://webhooks.gitter.im/e/effa917ca3e0ed5fd00e ++ - https://webhooks.gitter.im/e/effa917ca3e0ed5fd00e + on_success: change # options: [always|never|change] default: always + on_failure: always # options: [always|never|change] default: always + on_start: never # options: [always|never|change] default: always + diff --git a/0024.patch b/0024.patch new file mode 100644 index 0000000..7aaed97 --- /dev/null +++ b/0024.patch @@ -0,0 +1,23 @@ +From 91418b13dc679947bb4d22ae6badcbf41b56c645 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 12 Mar 2020 13:44:08 +0100 +Subject: [PATCH] TEST-03-USR-MOUNT/test.sh: increase loglevel + +to debug the spurious fails +--- + test/TEST-03-USR-MOUNT/test.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/TEST-03-USR-MOUNT/test.sh b/test/TEST-03-USR-MOUNT/test.sh +index 5190f220..3bb479e4 100755 +--- a/test/TEST-03-USR-MOUNT/test.sh ++++ b/test/TEST-03-USR-MOUNT/test.sh +@@ -19,7 +19,7 @@ client_run() { + -drive format=raw,index=1,media=disk,file=$TESTDIR/usr.btrfs \ + -drive format=raw,index=2,media=disk,file=$TESTDIR/result \ + -watchdog i6300esb -watchdog-action poweroff \ +- -append "panic=1 systemd.crash_reboot root=LABEL=dracut $client_opts quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug rd.shell=0 $DEBUGFAIL" \ ++ -append "panic=1 systemd.crash_reboot root=LABEL=dracut $client_opts loglevel=7 rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug rd.shell=0 $DEBUGFAIL" \ + -initrd $TESTDIR/initramfs.testing + + if ! grep -F -m 1 -q dracut-root-block-success $TESTDIR/result; then diff --git a/dracut.spec b/dracut.spec index 61cb8ff..c5f90db 100644 --- a/dracut.spec +++ b/dracut.spec @@ -5,7 +5,7 @@ # strip the automatically generated dep here and instead co-own the # directory. %global __requires_exclude pkg-config -%define dist_free_release 2 +%define dist_free_release 25.git20200313 Name: dracut Version: 050 @@ -28,13 +28,33 @@ URL: https://dracut.wiki.kernel.org/ # Source can be generated by # http://git.kernel.org/?p=boot/dracut/dracut.git;a=snapshot;h=%%{version};sf=tgz Source0: http://www.kernel.org/pub/linux/utils/boot/dracut/dracut-%{version}.tar.xz +Patch1: 0001.patch +Patch2: 0002.patch +Patch3: 0003.patch +Patch4: 0004.patch +Patch5: 0005.patch +Patch6: 0006.patch +Patch7: 0007.patch +Patch8: 0008.patch +Patch9: 0009.patch +Patch10: 0010.patch +Patch11: 0011.patch +Patch12: 0012.patch +Patch13: 0013.patch +Patch14: 0014.patch +Patch15: 0015.patch +Patch16: 0016.patch +Patch17: 0017.patch +Patch18: 0018.patch +Patch19: 0019.patch +Patch20: 0020.patch +Patch21: 0021.patch +Patch22: 0022.patch +Patch23: 0023.patch +Patch24: 0024.patch Source1: https://www.gnu.org/licenses/lgpl-2.1.txt -# Fix pre-trigger stage by replacing exit with return in lldpad.sh -# https://github.com/dracutdevs/dracut/pull/754 -Patch0: 0001-Fix-pre-trigger-stage-by-replacing-exit-with-return-.patch - BuildRequires: bash BuildRequires: git BuildRequires: pkgconfig(libkmod) >= 23 @@ -283,8 +303,7 @@ rm -f -- $RPM_BUILD_ROOT%{_mandir}/man1/lsinitrd.1* 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 -%if 0%{?fedora} <=30 || 0%{?rhel} <= 8 -# FIXME: remove after F30 +%if 0%{?fedora} <= 30 || 0%{?rhel} <= 8 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 @@ -370,6 +389,7 @@ 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/90nvdimm %{dracutlibdir}/modules.d/90stratis %{dracutlibdir}/modules.d/90ppcmac %{dracutlibdir}/modules.d/90qemu @@ -486,6 +506,9 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne %endif %changelog +* Fri Mar 13 2020 Harald Hoyer - 050-25.git20200313 +- network-manager: ensure that nm-run.sh is executed for rd.neednet + * Tue Mar 10 2020 Adam Williamson - 050-2 - Backport fix for pre-trigger stage early exit from upstream (#1811070)