From fab35137b1d5dd0563d546b259aa3d96d3556082 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Apr 28 2020 09:38:42 +0000 Subject: import dracut-049-70.git20200228.el8 --- diff --git a/SOURCES/0026.patch b/SOURCES/0026.patch index 433769d..2c2c621 100644 --- a/SOURCES/0026.patch +++ b/SOURCES/0026.patch @@ -1,115 +1,38 @@ -From f93681073cae4cfa118cfb3a2acb8cf78ce30646 Mon Sep 17 00:00:00 2001 -From: Benjamin Marzinski -Date: Tue, 3 Sep 2019 10:44:36 -0500 -Subject: [PATCH] modules.d: fix udev rules detection of multipath devices +From 95bbcaa8550534f03b332487ef3a2ed6650424fe Mon Sep 17 00:00:00 2001 +From: Frantisek Sumsal +Date: Wed, 21 Aug 2019 11:16:07 +0200 +Subject: [PATCH] git2spec: avoid malforming of SHA-1 hashes -Starting with the 0.7.7 release of the multipath tools, the multipath -udev rules always set a value in ENV{DM_MULTIPATH_DEVICE_PATH} for any -device that multipath scans. A value of 0 means that the device is not -claimed by multipath, and a value of 1 means that it is. Because of -this, udev rules that check ENV{DM_MULTIPATH_DEVICE_PATH}=="?*" will -always return True, and act as if every scanned device is claimed by -multipath. Checking ENV{DM_MULTIPATH_DEVICE_PATH}=="1" will work -correctly for both the old and new versions of the multipath tools. +When a SHA-1 hash of a specific commit is used as a tag, the regex +shenanigans later in the script can (and will) corrupt it in certain +cases. + +e.g.: +$ perl -e ' +$tag="6e8cd92261577230daa1098f7e05ec198c3c4281"; +$tag=~s/[^0-9]+?([0-9]+)/$1/; +print("$tag\n"); +' +68cd92261577230daa1098f7e05ec198c3c4281 + +(Notice the missing 'e') + +Let's fix this by limiting the regex's scope to a non-SHA-1 tags only. --- - modules.d/90dm/59-persistent-storage-dm.rules | 2 +- - modules.d/90dmraid/61-dmraid-imsm.rules | 2 +- - modules.d/90lvm/64-lvm.rules | 2 +- - modules.d/90mdraid/59-persistent-storage-md.rules | 2 +- - modules.d/90mdraid/65-md-incremental-imsm.rules | 2 +- - modules.d/95udev-rules/59-persistent-storage.rules | 2 +- - modules.d/95udev-rules/61-persistent-storage.rules | 2 +- - 7 files changed, 7 insertions(+), 7 deletions(-) + git2spec.pl | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/modules.d/90dm/59-persistent-storage-dm.rules b/modules.d/90dm/59-persistent-storage-dm.rules -index 73b09376..2be11227 100644 ---- a/modules.d/90dm/59-persistent-storage-dm.rules -+++ b/modules.d/90dm/59-persistent-storage-dm.rules -@@ -1,7 +1,7 @@ - SUBSYSTEM!="block", GOTO="dm_end" - ACTION!="add|change", GOTO="dm_end" - # Also don't process disks that are slated to be a multipath device --ENV{DM_MULTIPATH_DEVICE_PATH}=="?*", GOTO="dm_end" -+ENV{DM_MULTIPATH_DEVICE_PATH}=="1", GOTO="dm_end" - - KERNEL!="dm-[0-9]*", GOTO="dm_end" - ACTION=="add", GOTO="dm_end" -diff --git a/modules.d/90dmraid/61-dmraid-imsm.rules b/modules.d/90dmraid/61-dmraid-imsm.rules -index 72267d3c..8a6b215e 100644 ---- a/modules.d/90dmraid/61-dmraid-imsm.rules -+++ b/modules.d/90dmraid/61-dmraid-imsm.rules -@@ -5,7 +5,7 @@ - SUBSYSTEM!="block", GOTO="dm_end" - ACTION!="add|change", GOTO="dm_end" - # Also don't process disks that are slated to be a multipath device --ENV{DM_MULTIPATH_DEVICE_PATH}=="?*", GOTO="dm_end" -+ENV{DM_MULTIPATH_DEVICE_PATH}=="1", GOTO="dm_end" - - ENV{ID_FS_TYPE}=="linux_raid_member", GOTO="dm_end" - -diff --git a/modules.d/90lvm/64-lvm.rules b/modules.d/90lvm/64-lvm.rules -index 3ce0c1f6..65f65249 100644 ---- a/modules.d/90lvm/64-lvm.rules -+++ b/modules.d/90lvm/64-lvm.rules -@@ -7,7 +7,7 @@ - SUBSYSTEM!="block", GOTO="lvm_end" - ACTION!="add|change", GOTO="lvm_end" - # Also don't process disks that are slated to be a multipath device --ENV{DM_MULTIPATH_DEVICE_PATH}=="?*", GOTO="lvm_end" -+ENV{DM_MULTIPATH_DEVICE_PATH}=="1", GOTO="lvm_end" - KERNEL=="dm-[0-9]*", ACTION=="add", GOTO="lvm_end" - ENV{ID_FS_TYPE}!="LVM?_member", GOTO="lvm_end" - -diff --git a/modules.d/90mdraid/59-persistent-storage-md.rules b/modules.d/90mdraid/59-persistent-storage-md.rules -index 6ef858aa..96b10108 100644 ---- a/modules.d/90mdraid/59-persistent-storage-md.rules -+++ b/modules.d/90mdraid/59-persistent-storage-md.rules -@@ -1,7 +1,7 @@ - SUBSYSTEM!="block", GOTO="md_end" - ACTION!="add|change", GOTO="md_end" - # Also don't process disks that are slated to be a multipath device --ENV{DM_MULTIPATH_DEVICE_PATH}=="?*", GOTO="md_end" -+ENV{DM_MULTIPATH_DEVICE_PATH}=="1", GOTO="md_end" - - KERNEL!="md[0-9]*|md_d[0-9]*|md/*", KERNEL!="md*", GOTO="md_end" - -diff --git a/modules.d/90mdraid/65-md-incremental-imsm.rules b/modules.d/90mdraid/65-md-incremental-imsm.rules -index d66dd012..52f5b195 100644 ---- a/modules.d/90mdraid/65-md-incremental-imsm.rules -+++ b/modules.d/90mdraid/65-md-incremental-imsm.rules -@@ -9,7 +9,7 @@ KERNEL=="md*", ENV{ID_FS_TYPE}!="linux_raid_member", GOTO="md_end" - KERNEL=="md*", ACTION!="change", GOTO="md_end" - - # Also don't process disks that are slated to be a multipath device --ENV{DM_MULTIPATH_DEVICE_PATH}=="?*", GOTO="md_end" -+ENV{DM_MULTIPATH_DEVICE_PATH}=="1", GOTO="md_end" - - ENV{ID_FS_TYPE}=="ddf_raid_member|isw_raid_member|linux_raid_member", GOTO="md_try" - GOTO="md_end" -diff --git a/modules.d/95udev-rules/59-persistent-storage.rules b/modules.d/95udev-rules/59-persistent-storage.rules -index 47ff6edd..8d8650f7 100644 ---- a/modules.d/95udev-rules/59-persistent-storage.rules -+++ b/modules.d/95udev-rules/59-persistent-storage.rules -@@ -1,7 +1,7 @@ - SUBSYSTEM!="block", GOTO="ps_end" - ACTION!="add|change", GOTO="ps_end" - # Also don't process disks that are slated to be a multipath device --ENV{DM_MULTIPATH_DEVICE_PATH}=="?*", GOTO="ps_end" -+ENV{DM_MULTIPATH_DEVICE_PATH}=="1", GOTO="ps_end" - - KERNEL=="cciss[0-9]*", IMPORT BLKID - KERNEL=="nbd[0-9]*", IMPORT BLKID -diff --git a/modules.d/95udev-rules/61-persistent-storage.rules b/modules.d/95udev-rules/61-persistent-storage.rules -index 37148b07..895ecebd 100644 ---- a/modules.d/95udev-rules/61-persistent-storage.rules -+++ b/modules.d/95udev-rules/61-persistent-storage.rules -@@ -1,7 +1,7 @@ - SUBSYSTEM!="block", GOTO="pss_end" - ACTION!="add|change", GOTO="pss_end" - # Also don't process disks that are slated to be a multipath device --ENV{DM_MULTIPATH_DEVICE_PATH}=="?*", GOTO="pss_end" -+ENV{DM_MULTIPATH_DEVICE_PATH}=="1", GOTO="pss_end" +diff --git a/git2spec.pl b/git2spec.pl +index 7853791e..9ddc3805 100755 +--- a/git2spec.pl ++++ b/git2spec.pl +@@ -37,7 +37,7 @@ $tag=`git describe --abbrev=0 --tags` if not defined $tag; + chomp($tag); + my @patches=&create_patches($tag, $pdir); + my $num=$#patches + 2; +-$tag=~s/[^0-9]+?([0-9]+)/$1/; ++$tag=~s/[^0-9]+?([0-9]+)/$1/ if $tag !~ /\b[0-9a-f]{5,40}\b/; + my $release="$num.git$datestr"; + $release="1" if $num == 1; - ACTION=="change", KERNEL=="dm-[0-9]*", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}!="1", GOTO="do_pss" - KERNEL=="cciss[0-9]*", GOTO="do_pss" diff --git a/SOURCES/0027.patch b/SOURCES/0027.patch index 1b067dc..cf5627e 100644 --- a/SOURCES/0027.patch +++ b/SOURCES/0027.patch @@ -1,32 +1,25 @@ -From ce722c7307e48a991d8450360a1a0183dfdb4915 Mon Sep 17 00:00:00 2001 -From: Jonathan Lebon -Date: Tue, 29 Oct 2019 09:35:41 -0400 -Subject: [PATCH] 01fips: fix HMAC file path resolution +From d3f542cc9d0135a408be7ba995b8adad80bcd606 Mon Sep 17 00:00:00 2001 +From: Frantisek Sumsal +Date: Wed, 21 Aug 2019 14:06:29 +0200 +Subject: [PATCH] travis: fetch only tags -There is a small regression in #343: when handling the 'separate boot -partition' case, we're checking for the kernel image in the wrong -location: `BOOT_IMAGE` is the `/boot`-relative path to the kernel image, -so `/boot/${BOOT_IMAGE_PATH}/${BOOT_IMAGE}` expands to e.g. -`/boot/mysubdir1/mysubdir2/mysubdir1/mysubdir2/vmlinuz...`. - -We should be using `BOOT_IMAGE_NAME` here instead (and in fact, the next -if-statement does this correctly, so it might've just been accidentally -left out of #343). +The original `git pull` would try to pull & merge changes from the +master branch, which breaks CI runs on PRs based on non-master branches --- - modules.d/01fips/fips.sh | 2 +- + .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/modules.d/01fips/fips.sh b/modules.d/01fips/fips.sh -index beaa692b..c3dbcf74 100755 ---- a/modules.d/01fips/fips.sh -+++ b/modules.d/01fips/fips.sh -@@ -118,7 +118,7 @@ do_fips() - - if [ -z "$BOOT_IMAGE_NAME" ]; then - BOOT_IMAGE_NAME="vmlinuz-${KERNEL}" -- elif ! [ -e "/boot/${BOOT_IMAGE_PATH}/${BOOT_IMAGE}" ]; then -+ elif ! [ -e "/boot/${BOOT_IMAGE_PATH}/${BOOT_IMAGE_NAME}" ]; then - #if /boot is not a separate partition BOOT_IMAGE might start with /boot - BOOT_IMAGE_PATH=${BOOT_IMAGE_PATH#"/boot"} - #on some achitectures BOOT_IMAGE does not contain path to kernel +diff --git a/.travis.yml b/.travis.yml +index f913db57..efb0df1b 100644 +--- a/.travis.yml ++++ b/.travis.yml +@@ -29,7 +29,7 @@ before_script: + sudo modprobe kvm-intel nested=1 || : + sudo modprobe kvm-amd nested=1 || : + dmesg | tail || : +- - git pull --depth=100 ++ - git fetch --tags --unshallow + - | + git describe --abbrev=0 --tags || : + git describe --tags || : diff --git a/SOURCES/0028.patch b/SOURCES/0028.patch index c4791df..0203f97 100644 --- a/SOURCES/0028.patch +++ b/SOURCES/0028.patch @@ -1,33 +1,98 @@ -From b4ef00aebea4e201be493b4a9520de71b188f42d Mon Sep 17 00:00:00 2001 -From: Jonathan Lebon -Date: Tue, 29 Oct 2019 16:47:34 -0400 -Subject: [PATCH] 01fips: run sha512hmac from directory HMAC file directory +From e3b2b02c7f5b4e9f1d2a3cfe8749534959e29e3e Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Fri, 21 Jun 2019 18:39:48 +0200 +Subject: [PATCH] fs-lib: drop a bashism -That way, the HMAC file can contain a relative path instead of an -absolute one. The issue is that right now the kernel RPM bakes the -`/boot/vmlinuz-${kver}` path into the HMAC file which poses an issue for -rpm-ostree systems (and any other system where the kernel isn't simply -in the top-level `/boot`. +Bash 5 apparently longer propagates variable assignments to local variables +in front of function calls when in POSIX mode: -For now, we're hacking around this in rpm-ostree: -https://github.com/coreos/rpm-ostree/pull/1934 + [lkundrak@demiurge ~]$ cat feh.sh + print_VAR () { + echo "$VAR"; + } -Though I'd like to propose the same change in the kernel spec file. + testfunc () { + local VAR="OLD" + VAR=NEW print_VAR + } + + testfunc + [lkundrak@demiurge ~]$ bash4 --posix feh.sh + NEW + [lkundrak@demiurge ~]$ bash5 --posix feh.sh + OLD + [lkundrak@demiurge ~]$ bash5 feh.sh + NEW + [lkundrak@demiurge ~]$ + +It works the way it did in Bash 4 in non-POSIX mode, for external programs, +or for non-local variables. Don't ask me why -- it's probably some +compatibility thing for some sad old people. + +However, this precisely happens when fsck_single() is calling into the +fsck_drv_com(), assigned to _drv by fsck_able(). That ruins the +TEST-70-BONDBRIDGETEAMVLAN test's server and probably more. + +Let's pass the fsck driver binary via the function argument instead. It's +less messy anyway. + +(cherry picked from commit 43c8c4ce0471abbb8c0fc4b8be2515cebc636030) --- - modules.d/01fips/fips.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/01fips/fips.sh b/modules.d/01fips/fips.sh -index c3dbcf74..893143d0 100755 ---- a/modules.d/01fips/fips.sh -+++ b/modules.d/01fips/fips.sh -@@ -135,7 +135,7 @@ do_fips() - return 1 - fi + modules.d/99fs-lib/fs-lib.sh | 13 +++++++------ + 1 file changed, 7 insertions(+), 6 deletions(-) + +diff --git a/modules.d/99fs-lib/fs-lib.sh b/modules.d/99fs-lib/fs-lib.sh +index d39ca1b7..11e795d9 100755 +--- a/modules.d/99fs-lib/fs-lib.sh ++++ b/modules.d/99fs-lib/fs-lib.sh +@@ -44,22 +44,22 @@ fsck_able() { + ;; + ext?) + type e2fsck >/dev/null 2>&1 && +- _drv="_drv=e2fsck fsck_drv_com" && ++ _drv="fsck_drv_com e2fsck" && + return 0 + ;; + f2fs) + type fsck.f2fs >/dev/null 2>&1 && +- _drv="_drv=fsck.f2fs fsck_drv_com" && ++ _drv="fsck_drv_com fsck.f2fs" && + return 0 + ;; + jfs) + type jfs_fsck >/dev/null 2>&1 && +- _drv="_drv=jfs_fsck fsck_drv_com" && ++ _drv="fsck_drv_com jfs_fsck" && + return 0 + ;; + reiserfs) + type reiserfsck >/dev/null 2>&1 && +- _drv="_drv=reiserfsck fsck_drv_com" && ++ _drv="fsck_drv_com reiserfsck" && + return 0 + ;; + btrfs) +@@ -70,12 +70,12 @@ fsck_able() { + ;; + nfs*) + # nfs can be a nop, returning success +- _drv="_drv=none :" && ++ _drv=":" && + return 0 + ;; + *) + type fsck >/dev/null 2>&1 && +- _drv="_drv=fsck fsck_drv_std" && ++ _drv="fsck_drv_std fsck" && + return 0 + ;; + esac +@@ -97,6 +97,7 @@ fsck_drv_btrfs() { -- sha512hmac -c "${BOOT_IMAGE_HMAC}" || return 1 -+ (cd "${BOOT_IMAGE_HMAC%/*}" && sha512hmac -c "${BOOT_IMAGE_HMAC}") || return 1 - fi + # common code for checkers that follow usual subset of options and return codes + fsck_drv_com() { ++ local _drv="$1" + local _ret + local _out - info "All initrd crypto checks done" diff --git a/SOURCES/0029.patch b/SOURCES/0029.patch index ad7da76..b80d988 100644 --- a/SOURCES/0029.patch +++ b/SOURCES/0029.patch @@ -1,26 +1,79 @@ -From d07e4025e05de0461444c196102020919cdb5c2d Mon Sep 17 00:00:00 2001 -From: Jonathan Lebon -Date: Tue, 29 Oct 2019 16:53:00 -0400 -Subject: [PATCH] 01fips: add / in BOOT_IMAGE_HMAC filename for clarity +From e671c3a06a7e58461d4e9c9f3546cf6eac809300 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 4 Dec 2018 10:27:17 +0100 +Subject: [PATCH] 95iscsi/module-setup.sh: do not require 'hostname' anymore -It's already the case the `BOOT_IMAGE_PATH` today, in the non-empty -case, includes a trailing `/`, but let's add it to the path we build -here too to make it more obvious. +(cherry picked from commit ebe1821635dd99f07c817179ee5358d27aab53c5) + +[lkundrak@v3.sk: fixes TEST-30 that fails with: dracut: dracut module +'iscsi' will not be installed, because command 'hostname' could not be +found!] --- - modules.d/01fips/fips.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + modules.d/40network/netroot.sh | 2 +- + modules.d/95iscsi/module-setup.sh | 4 ++-- + modules.d/98dracut-systemd/dracut-cmdline.sh | 2 +- + modules.d/99base/init.sh | 2 +- + 4 files changed, 5 insertions(+), 5 deletions(-) -diff --git a/modules.d/01fips/fips.sh b/modules.d/01fips/fips.sh -index 893143d0..de2755b0 100755 ---- a/modules.d/01fips/fips.sh -+++ b/modules.d/01fips/fips.sh -@@ -129,7 +129,7 @@ do_fips() - fi - fi - -- BOOT_IMAGE_HMAC="/boot/${BOOT_IMAGE_PATH}.${BOOT_IMAGE_NAME}.hmac" -+ BOOT_IMAGE_HMAC="/boot/${BOOT_IMAGE_PATH}/.${BOOT_IMAGE_NAME}.hmac" - if ! [ -e "${BOOT_IMAGE_HMAC}" ]; then - warn "${BOOT_IMAGE_HMAC} does not exist" - return 1 +diff --git a/modules.d/40network/netroot.sh b/modules.d/40network/netroot.sh +index 207364cd..654cfc72 100755 +--- a/modules.d/40network/netroot.sh ++++ b/modules.d/40network/netroot.sh +@@ -66,7 +66,7 @@ if [ -z "$2" ]; then + + # Check: do we really know how to handle (net)root? + [ -z "$root" ] && die "No or empty root= argument" +- [ -z "$rootok" ] && die "Don't know how to handle 'root=$root'" ++ [ -z "$rootok" ] && die "X2 Don't know how to handle 'root=$root'" + + handler=${netroot%%:*} + handler=${handler%%4} +diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh +index 79af4a47..f6f3520d 100755 +--- a/modules.d/95iscsi/module-setup.sh ++++ b/modules.d/95iscsi/module-setup.sh +@@ -4,7 +4,7 @@ + check() { + local _rootdev + # If our prerequisites are not met, fail anyways. +- require_binaries hostname iscsi-iname iscsiadm iscsid || return 1 ++ require_binaries iscsi-iname iscsiadm iscsid || return 1 + + # If hostonly was requested, fail the check if we are not actually + # booting from root. +@@ -206,7 +206,7 @@ cmdline() { + install() { + inst_multiple -o iscsiuio + inst_libdir_file 'libgcc_s.so*' +- inst_multiple umount hostname iscsi-iname iscsiadm iscsid ++ inst_multiple umount iscsi-iname iscsiadm iscsid + + inst_multiple -o \ + $systemdsystemunitdir/iscsid.socket \ +diff --git a/modules.d/98dracut-systemd/dracut-cmdline.sh b/modules.d/98dracut-systemd/dracut-cmdline.sh +index bff9435a..89c52d13 100755 +--- a/modules.d/98dracut-systemd/dracut-cmdline.sh ++++ b/modules.d/98dracut-systemd/dracut-cmdline.sh +@@ -76,7 +76,7 @@ case "${root}${root_unset}" in + esac + + [ -z "${root}${root_unset}" ] && die "Empty root= argument" +-[ -z "$rootok" ] && die "Don't know how to handle 'root=$root'" ++[ -z "$rootok" ] && die "X1 Don't know how to handle 'root=$root'" + + export root rflags fstype netroot NEWROOT + +diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh +index e4f7cff1..3e20069f 100755 +--- a/modules.d/99base/init.sh ++++ b/modules.d/99base/init.sh +@@ -136,7 +136,7 @@ getarg 'rd.break=cmdline' -d 'rdbreak=cmdline' && emergency_shell -n cmdline "Br + source_hook cmdline + + [ -z "$root" ] && die "No or empty root= argument" +-[ -z "$rootok" ] && die "Don't know how to handle 'root=$root'" ++[ -z "$rootok" ] && die "X0 Don't know how to handle 'root=$root'" + + export root rflags fstype netroot NEWROOT + diff --git a/SOURCES/0030.patch b/SOURCES/0030.patch index 75f35bd..f0a13c5 100644 --- a/SOURCES/0030.patch +++ b/SOURCES/0030.patch @@ -1,33 +1,24 @@ -From f3acdc517f1494301a9d8c4352a50a92bc3dbbf1 Mon Sep 17 00:00:00 2001 -From: Jonathan Lebon -Date: Tue, 29 Oct 2019 16:54:10 -0400 -Subject: [PATCH] 01fips: trim off GRUB boot device from BOOT_IMAGE +From 50192de38d756203a414405e2d7552e89b1c0423 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 4 Dec 2018 10:06:12 +0100 +Subject: [PATCH] test/test-functions: correctly move server.log -E.g. in RHCOS, the `BOOT_IMAGE` from the cmdline is: - -(hd0,gpt1)/ostree/rhcos-e493371e5ee8407889029ec979955a2b86fd7e3cae5a0591b9db1cd248d966e8/vmlinuz-4.18.0-146.el8.x86_64 - -Which of course is a GRUB thing, not an actual pathname we'll be able to -resolve. In fact, we can simply scrap it off from the variable. Our code -is already able to handle both cases: whether the device refers to a -separate boot partition, or just the root filesystem with a regular -`/boot` directory. +(cherry picked from commit 712f471ebfae70fd71c0c740e9a3e120464ca7e7) --- - modules.d/01fips/fips.sh | 4 ++++ - 1 file changed, 4 insertions(+) + test/test-functions | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/test-functions b/test/test-functions +index a6254ec7..51b3df80 100644 +--- a/test/test-functions ++++ b/test/test-functions +@@ -80,7 +80,7 @@ while (($# > 0)); do + ret=$? + test_cleanup + if ((ret!=0)) && [[ -f "$TESTDIR"/server.log ]]; then +- mv [[ -f "$TESTDIR"/server.log ]] ./server${TEST_RUN_ID:+-$TEST_RUN_ID}.log ++ mv "$TESTDIR"/server.log ./server${TEST_RUN_ID:+-$TEST_RUN_ID}.log + fi + rm -fr -- "$TESTDIR" + rm -f -- .testdir${TEST_RUN_ID:+-$TEST_RUN_ID} -diff --git a/modules.d/01fips/fips.sh b/modules.d/01fips/fips.sh -index de2755b0..559952ca 100755 ---- a/modules.d/01fips/fips.sh -+++ b/modules.d/01fips/fips.sh -@@ -113,6 +113,10 @@ do_fips() - do_rhevh_check /run/initramfs/live/isolinux/vmlinuz0 || return 1 - else - BOOT_IMAGE="$(getarg BOOT_IMAGE)" -+ -+ # Trim off any leading GRUB boot device (e.g. ($root) ) -+ BOOT_IMAGE="$(echo "${BOOT_IMAGE}" | sed 's/^(.*)//')" -+ - BOOT_IMAGE_NAME="${BOOT_IMAGE##*/}" - BOOT_IMAGE_PATH="${BOOT_IMAGE%${BOOT_IMAGE_NAME}}" - diff --git a/SOURCES/0031.patch b/SOURCES/0031.patch new file mode 100644 index 0000000..b0741b9 --- /dev/null +++ b/SOURCES/0031.patch @@ -0,0 +1,43 @@ +From bf69beb6f3824b1ebed221c8255d1f5c9efd136a Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Wed, 26 Jun 2019 16:42:04 +0200 +Subject: [PATCH] test/TEST-17-LVM-THIN: fail setup if we run out of space in + the thin pool + +This condition is rather difficult to detect -- the writes will just remain +queued and get lost on shutdown, resulting in a corrupt filesystem. + +(cherry picked from commit 91c15babdf0215df59325f3086acfdf0ba247bfa) +--- + test/TEST-17-LVM-THIN/create-root.sh | 5 +++-- + test/TEST-17-LVM-THIN/test.sh | 2 +- + 2 files changed, 4 insertions(+), 3 deletions(-) + +diff --git a/test/TEST-17-LVM-THIN/create-root.sh b/test/TEST-17-LVM-THIN/create-root.sh +index 117d1341..0e52f879 100755 +--- a/test/TEST-17-LVM-THIN/create-root.sh ++++ b/test/TEST-17-LVM-THIN/create-root.sh +@@ -27,6 +27,7 @@ cp -a -t /sysroot /source/* && \ + umount /sysroot && \ + sleep 1 && \ + lvm lvchange -a n /dev/dracut/root && \ +-sleep 1 && \ +-echo "dracut-root-block-created" >/dev/sda1 ++sleep 1 ++dmsetup status |grep out_of_data_space || \ ++ echo "dracut-root-block-created" >/dev/sda1 + poweroff -f +diff --git a/test/TEST-17-LVM-THIN/test.sh b/test/TEST-17-LVM-THIN/test.sh +index af349246..1b36a216 100755 +--- a/test/TEST-17-LVM-THIN/test.sh ++++ b/test/TEST-17-LVM-THIN/test.sh +@@ -56,7 +56,7 @@ test_setup() { + ( + export initdir=$TESTDIR/overlay + . $basedir/dracut-init.sh +- inst_multiple sfdisk mke2fs poweroff cp umount ++ inst_multiple sfdisk mke2fs poweroff cp umount grep dmsetup + inst_hook initqueue 01 ./create-root.sh + inst_hook initqueue/finished 01 ./finished-false.sh + inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules + diff --git a/SOURCES/0032.patch b/SOURCES/0032.patch new file mode 100644 index 0000000..b849baf --- /dev/null +++ b/SOURCES/0032.patch @@ -0,0 +1,66 @@ +From 0f0b8c8f90cbcd56140e85b9997deda906c71118 Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Tue, 25 Jun 2019 17:39:57 +0200 +Subject: [PATCH] test/TEST-14-IMSM: detect failure to compose the test setup + root + +The dracut-root-block-created line should not be created if we fail to copy +in the required files to sysroot. Let's turn on -e to trap failures and +poweroff on them, like some other tests do. + +Also remove the &&. Not only it is unnecessary with -e, but defeats it. +From bash(1): + + The shell does not exit if the command that fails is [...] part of any + command executed in a && or || list except the command following the + final && or || [...] + +(cherry picked from commit c27ed38bb2986d31b08257782ce2b24a80415c6c) +--- + test/TEST-14-IMSM/create-root.sh | 23 +++++++++++++---------- + 1 file changed, 13 insertions(+), 10 deletions(-) + +diff --git a/test/TEST-14-IMSM/create-root.sh b/test/TEST-14-IMSM/create-root.sh +index f637ec88..a0324c6f 100755 +--- a/test/TEST-14-IMSM/create-root.sh ++++ b/test/TEST-14-IMSM/create-root.sh +@@ -1,4 +1,7 @@ + #!/bin/sh ++ ++trap 'poweroff -f' EXIT ++ + # don't let udev and this script step on eachother's toes + for x in 61-dmraid-imsm.rules 64-md-raid.rules 65-md-incremental-imsm.rules 65-md-incremental.rules 64-lvm.rules 70-mdadm.rules 99-mount-rules; do + rm -f -- "/etc/udev/rules.d/$x" +@@ -55,20 +58,20 @@ mdadm --create /dev/md0 --run --auto=yes --level=5 --raid-devices=3 \ + # wait for the array to finish initailizing, otherwise this sometimes fails + # randomly. + mdadm -W /dev/md0 ++set -e + lvm pvcreate -ff -y /dev/md0 +-lvm vgcreate dracut /dev/md0 && \ +-lvm lvcreate -l 100%FREE -n root dracut && \ +-lvm vgchange -ay && \ +-mke2fs -L root /dev/dracut/root && \ +-mkdir -p /sysroot && \ +-mount /dev/dracut/root /sysroot && \ +-cp -a -t /sysroot /source/* && \ +-umount /sysroot && \ +-lvm lvchange -a n /dev/dracut/root && \ ++lvm vgcreate dracut /dev/md0 ++lvm lvcreate -l 100%FREE -n root dracut ++lvm vgchange -ay ++mke2fs -L root /dev/dracut/root ++mkdir -p /sysroot ++mount /dev/dracut/root /sysroot ++cp -a -t /sysroot /source/* ++umount /sysroot ++lvm lvchange -a n /dev/dracut/root + udevadm settle + mdadm --detail --export /dev/md0 |grep -F MD_UUID > /tmp/mduuid + . /tmp/mduuid + echo "MD_UUID=$MD_UUID" + { echo "dracut-root-block-created"; echo MD_UUID=$MD_UUID;} > /dev/sda + mdadm --wait-clean /dev/md0 +-poweroff -f + diff --git a/SOURCES/0033.patch b/SOURCES/0033.patch new file mode 100644 index 0000000..e45f147 --- /dev/null +++ b/SOURCES/0033.patch @@ -0,0 +1,346 @@ +From e35e43c1c28a8935660fe72650614e5dc1defb65 Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Wed, 26 Jun 2019 11:47:21 +0200 +Subject: [PATCH] test: tell systemd to reboot on fatal errors + +Otherwise systemd would freeze execution, causing the test to time out +instead of failing fast. + +(cherry picked from commit 7934c6f918de2e82d0df5da557c5792c4fb7b798) +--- + test/TEST-01-BASIC/test.sh | 2 +- + test/TEST-02-SYSTEMD/test.sh | 2 +- + test/TEST-03-USR-MOUNT/test.sh | 2 +- + test/TEST-04-FULL-SYSTEMD/test.sh | 2 +- + test/TEST-10-RAID/test.sh | 2 +- + test/TEST-11-LVM/test.sh | 2 +- + test/TEST-12-RAID-DEG/test.sh | 2 +- + test/TEST-13-ENC-RAID-LVM/test.sh | 6 +++--- + test/TEST-14-IMSM/test.sh | 2 +- + test/TEST-15-BTRFSRAID/test.sh | 2 +- + test/TEST-16-DMSQUASH/test.sh | 2 +- + test/TEST-17-LVM-THIN/test.sh | 2 +- + test/TEST-20-NFS/test.sh | 4 ++-- + test/TEST-30-ISCSI/test.sh | 4 ++-- + test/TEST-31-ISCSI-MULTI/test.sh | 4 ++-- + test/TEST-40-NBD/test.sh | 4 ++-- + test/TEST-50-MULTINIC/test.sh | 4 ++-- + test/TEST-70-BONDBRIDGETEAMVLAN/test.sh | 6 +++--- + 18 files changed, 27 insertions(+), 27 deletions(-) + +diff --git a/test/TEST-01-BASIC/test.sh b/test/TEST-01-BASIC/test.sh +index ed2ae5de..ca4a8288 100755 +--- a/test/TEST-01-BASIC/test.sh ++++ b/test/TEST-01-BASIC/test.sh +@@ -15,7 +15,7 @@ test_run() { + -net none \ + -watchdog i6300esb -watchdog-action poweroff \ + -no-reboot \ +- -append "panic=1 root=LABEL=dracut rw systemd.log_level=debug systemd.log_target=console rd.retry=3 rd.debug console=ttyS0,115200n81 rd.shell=0 $DEBUGFAIL" \ ++ -append "panic=1 systemd.crash_reboot root=LABEL=dracut rw systemd.log_level=debug systemd.log_target=console rd.retry=3 rd.debug console=ttyS0,115200n81 rd.shell=0 $DEBUGFAIL" \ + -initrd $TESTDIR/initramfs.testing || return 1 + grep -F -m 1 -q dracut-root-block-success $TESTDIR/result || return 1 + } +diff --git a/test/TEST-02-SYSTEMD/test.sh b/test/TEST-02-SYSTEMD/test.sh +index 8c5eb168..848021e5 100755 +--- a/test/TEST-02-SYSTEMD/test.sh ++++ b/test/TEST-02-SYSTEMD/test.sh +@@ -11,7 +11,7 @@ test_run() { + -m 512M -smp 2 -nographic \ + -net none \ + -no-reboot \ +- -append "panic=1 root=LABEL=dracut rw loglevel=77 systemd.log_level=debug systemd.log_target=console rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 init=/sbin/init rd.shell=0 $DEBUGFAIL" \ ++ -append "panic=1 systemd.crash_reboot root=LABEL=dracut rw loglevel=77 systemd.log_level=debug systemd.log_target=console rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 init=/sbin/init rd.shell=0 $DEBUGFAIL" \ + -initrd $TESTDIR/initramfs.testing + grep -F -m 1 -q dracut-root-block-success $TESTDIR/root.ext3 || return 1 + } +diff --git a/test/TEST-03-USR-MOUNT/test.sh b/test/TEST-03-USR-MOUNT/test.sh +index 42c0da65..5d5ec8f8 100755 +--- a/test/TEST-03-USR-MOUNT/test.sh ++++ b/test/TEST-03-USR-MOUNT/test.sh +@@ -22,7 +22,7 @@ client_run() { + -net none \ + -watchdog i6300esb -watchdog-action poweroff \ + -no-reboot \ +- -append "panic=1 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 quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug rd.shell=0 $DEBUGFAIL" \ + -initrd $TESTDIR/initramfs.testing + + if (($? != 0)); then +diff --git a/test/TEST-04-FULL-SYSTEMD/test.sh b/test/TEST-04-FULL-SYSTEMD/test.sh +index 97528e4f..f65f30f2 100755 +--- a/test/TEST-04-FULL-SYSTEMD/test.sh ++++ b/test/TEST-04-FULL-SYSTEMD/test.sh +@@ -23,7 +23,7 @@ client_run() { + -m 512M -smp 2 -nographic \ + -net none \ + -no-reboot \ +- -append "panic=1 root=LABEL=dracut $client_opts rd.retry=3 console=ttyS0,115200n81 selinux=0 $DEBUGOUT rd.shell=0 $DEBUGFAIL" \ ++ -append "panic=1 systemd.crash_reboot root=LABEL=dracut $client_opts rd.retry=3 console=ttyS0,115200n81 selinux=0 $DEBUGOUT rd.shell=0 $DEBUGFAIL" \ + -initrd $TESTDIR/initramfs.testing + + if (($? != 0)); then +diff --git a/test/TEST-10-RAID/test.sh b/test/TEST-10-RAID/test.sh +index 444126b2..0beb26c3 100755 +--- a/test/TEST-10-RAID/test.sh ++++ b/test/TEST-10-RAID/test.sh +@@ -13,7 +13,7 @@ test_run() { + -m 512M -smp 2 -nographic \ + -net none \ + -no-reboot \ +- -append "panic=1 root=/dev/dracut/root rd.auto rw rd.retry=10 console=ttyS0,115200n81 selinux=0 rd.shell=0 $DEBUGFAIL" \ ++ -append "panic=1 systemd.crash_reboot root=/dev/dracut/root rd.auto rw rd.retry=10 console=ttyS0,115200n81 selinux=0 rd.shell=0 $DEBUGFAIL" \ + -initrd $TESTDIR/initramfs.testing + grep -F -m 1 -q dracut-root-block-success $DISKIMAGE || return 1 + } +diff --git a/test/TEST-11-LVM/test.sh b/test/TEST-11-LVM/test.sh +index 5c105e01..a907c4b1 100755 +--- a/test/TEST-11-LVM/test.sh ++++ b/test/TEST-11-LVM/test.sh +@@ -12,7 +12,7 @@ test_run() { + -m 512M -smp 2 -nographic \ + -net none \ + -no-reboot \ +- -append "panic=1 root=/dev/dracut/root rw rd.auto=1 quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug rd.shell=0 $DEBUGFAIL" \ ++ -append "panic=1 systemd.crash_reboot root=/dev/dracut/root rw rd.auto=1 quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug rd.shell=0 $DEBUGFAIL" \ + -initrd $TESTDIR/initramfs.testing + grep -F -m 1 -q dracut-root-block-success $TESTDIR/root.ext2 || return 1 + } +diff --git a/test/TEST-12-RAID-DEG/test.sh b/test/TEST-12-RAID-DEG/test.sh +index 4e381d84..c82cde1e 100755 +--- a/test/TEST-12-RAID-DEG/test.sh ++++ b/test/TEST-12-RAID-DEG/test.sh +@@ -20,7 +20,7 @@ client_run() { + -drive format=raw,index=3,media=disk,file=$TESTDIR/disk3.img.new \ + -net none \ + -no-reboot \ +- -append "panic=1 $* systemd.log_target=kmsg loglevel=7 root=LABEL=root rw rd.retry=20 rd.info console=ttyS0,115200n81 log_buf_len=2M selinux=0 rd.debug rd.shell=0 $DEBUGFAIL " \ ++ -append "panic=1 systemd.crash_reboot $* systemd.log_target=kmsg loglevel=7 root=LABEL=root rw rd.retry=20 rd.info console=ttyS0,115200n81 log_buf_len=2M selinux=0 rd.debug rd.shell=0 $DEBUGFAIL " \ + -initrd $TESTDIR/initramfs.testing + if ! grep -F -m 1 -q dracut-root-block-success $TESTDIR/root.ext2; then + echo "CLIENT TEST END: $@ [FAIL]" +diff --git a/test/TEST-13-ENC-RAID-LVM/test.sh b/test/TEST-13-ENC-RAID-LVM/test.sh +index 76ec36b3..99324ce9 100755 +--- a/test/TEST-13-ENC-RAID-LVM/test.sh ++++ b/test/TEST-13-ENC-RAID-LVM/test.sh +@@ -20,7 +20,7 @@ test_run() { + -m 512M -smp 2 -nographic \ + -net none \ + -no-reboot \ +- -append "panic=1 root=/dev/dracut/root rw rd.auto rd.retry=20 console=ttyS0,115200n81 selinux=0 rd.debug rootwait $LUKSARGS rd.shell=0 $DEBUGFAIL" \ ++ -append "panic=1 systemd.crash_reboot root=/dev/dracut/root rw rd.auto rd.retry=20 console=ttyS0,115200n81 selinux=0 rd.debug rootwait $LUKSARGS rd.shell=0 $DEBUGFAIL" \ + -initrd $TESTDIR/initramfs.testing + grep -F -m 1 -q dracut-root-block-success $TESTDIR/check-success.img || return 1 + echo "CLIENT TEST END: [OK]" +@@ -34,7 +34,7 @@ test_run() { + -m 512M -smp 2 -nographic \ + -net none \ + -no-reboot \ +- -append "panic=1 root=/dev/dracut/root rw quiet rd.auto rd.retry=20 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL" \ ++ -append "panic=1 systemd.crash_reboot root=/dev/dracut/root rw quiet rd.auto rd.retry=20 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL" \ + -initrd $TESTDIR/initramfs.testing + grep -F -m 1 -q dracut-root-block-success $TESTDIR/check-success.img || return 1 + echo "CLIENT TEST END: [OK]" +@@ -48,7 +48,7 @@ test_run() { + -m 512M -smp 2 -nographic \ + -net none \ + -no-reboot \ +- -append "panic=1 root=/dev/dracut/root rw quiet rd.auto rd.retry=10 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL rd.luks.uuid=failme" \ ++ -append "panic=1 systemd.crash_reboot root=/dev/dracut/root rw quiet rd.auto rd.retry=10 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL rd.luks.uuid=failme" \ + -initrd $TESTDIR/initramfs.testing + grep -F -m 1 -q dracut-root-block-success $TESTDIR/check-success.img && return 1 + echo "CLIENT TEST END: [OK]" +diff --git a/test/TEST-14-IMSM/test.sh b/test/TEST-14-IMSM/test.sh +index 8ebc285a..ed60f052 100755 +--- a/test/TEST-14-IMSM/test.sh ++++ b/test/TEST-14-IMSM/test.sh +@@ -16,7 +16,7 @@ client_run() { + -m 512M -smp 2 -nographic \ + -net none \ + -no-reboot \ +- -append "panic=1 $* root=LABEL=root rw debug rd.retry=5 rd.debug console=ttyS0,115200n81 selinux=0 rd.info rd.shell=0 $DEBUGFAIL" \ ++ -append "panic=1 systemd.crash_reboot $* root=LABEL=root rw debug rd.retry=5 rd.debug console=ttyS0,115200n81 selinux=0 rd.info rd.shell=0 $DEBUGFAIL" \ + -initrd $TESTDIR/initramfs.testing + if ! grep -F -m 1 -q dracut-root-block-success $TESTDIR/root.ext2; then + echo "CLIENT TEST END: $@ [FAIL]" +diff --git a/test/TEST-15-BTRFSRAID/test.sh b/test/TEST-15-BTRFSRAID/test.sh +index 02cb4976..dda76672 100755 +--- a/test/TEST-15-BTRFSRAID/test.sh ++++ b/test/TEST-15-BTRFSRAID/test.sh +@@ -15,7 +15,7 @@ test_run() { + -m 512M -smp 2 -nographic \ + -net none \ + -no-reboot \ +- -append "panic=1 root=LABEL=root rw rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.shell=0 $DEBUGFAIL" \ ++ -append "panic=1 systemd.crash_reboot root=LABEL=root rw rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.shell=0 $DEBUGFAIL" \ + -initrd $TESTDIR/initramfs.testing + grep -F -m 1 -q dracut-root-block-success $MARKER_DISKIMAGE || return 1 + } +diff --git a/test/TEST-16-DMSQUASH/test.sh b/test/TEST-16-DMSQUASH/test.sh +index 45d8c4c0..65d5bdbb 100755 +--- a/test/TEST-16-DMSQUASH/test.sh ++++ b/test/TEST-16-DMSQUASH/test.sh +@@ -23,7 +23,7 @@ test_run() { + -nographic \ + -net none \ + -no-reboot \ +- -append "panic=1 root=live:CDLABEL=LiveCD live rw quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.shell=0 $DEBUGFAIL" \ ++ -append "panic=1 systemd.crash_reboot root=live:CDLABEL=LiveCD live rw quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.shell=0 $DEBUGFAIL" \ + -initrd "$TESTDIR"/initramfs.testing + + # mediacheck test with qemu GUI +diff --git a/test/TEST-17-LVM-THIN/test.sh b/test/TEST-17-LVM-THIN/test.sh +index 1b36a216..c13e9063 100755 +--- a/test/TEST-17-LVM-THIN/test.sh ++++ b/test/TEST-17-LVM-THIN/test.sh +@@ -12,7 +12,7 @@ test_run() { + -m 512M -smp 2 -nographic \ + -net none \ + -no-reboot \ +- -append "panic=1 root=/dev/dracut/root rw rd.auto=1 quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug rd.shell=0 $DEBUGFAIL" \ ++ -append "panic=1 systemd.crash_reboot root=/dev/dracut/root rw rd.auto=1 quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug rd.shell=0 $DEBUGFAIL" \ + -initrd $TESTDIR/initramfs.testing + grep -F -m 1 -q dracut-root-block-success $TESTDIR/root.ext2 || return 1 + } +diff --git a/test/TEST-20-NFS/test.sh b/test/TEST-20-NFS/test.sh +index e942745a..4ad7fd77 100755 +--- a/test/TEST-20-NFS/test.sh ++++ b/test/TEST-20-NFS/test.sh +@@ -22,7 +22,7 @@ run_server() { + ${SERIAL:--serial file:"$TESTDIR"/server.log} \ + -watchdog i6300esb -watchdog-action poweroff \ + -no-reboot \ +- -append "panic=1 rd.debug loglevel=77 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0" \ ++ -append "panic=1 systemd.crash_reboot rd.debug loglevel=77 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0" \ + -initrd $TESTDIR/initramfs.server \ + -pidfile $TESTDIR/server.pid -daemonize || return 1 + sudo chmod 644 $TESTDIR/server.pid || return 1 +@@ -57,7 +57,7 @@ client_test() { + -net socket,connect=127.0.0.1:12320 \ + -watchdog i6300esb -watchdog-action poweroff \ + -no-reboot \ +- -append "panic=1 rd.shell=0 $cmdline $DEBUGFAIL rd.debug rd.retry=10 rd.info quiet ro console=ttyS0,115200n81 selinux=0" \ ++ -append "panic=1 systemd.crash_reboot rd.shell=0 $cmdline $DEBUGFAIL rd.debug rd.retry=10 rd.info quiet ro console=ttyS0,115200n81 selinux=0" \ + -initrd $TESTDIR/initramfs.testing + + if [[ $? -ne 0 ]] || ! grep -F -m 1 -q nfs-OK $TESTDIR/client.img; then +diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh +index f6cc56d5..d5a6ba58 100755 +--- a/test/TEST-30-ISCSI/test.sh ++++ b/test/TEST-30-ISCSI/test.sh +@@ -26,7 +26,7 @@ run_server() { + -net nic,macaddr=52:54:00:12:34:57,model=e1000 \ + -net socket,listen=127.0.0.1:12330 \ + -no-reboot \ +- -append "panic=1 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0 $SERVER_DEBUG" \ ++ -append "panic=1 systemd.crash_reboot root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0 $SERVER_DEBUG" \ + -initrd $TESTDIR/initramfs.server \ + -pidfile $TESTDIR/server.pid -daemonize || return 1 + sudo chmod 644 $TESTDIR/server.pid || return 1 +@@ -51,7 +51,7 @@ run_client() { + -net nic,macaddr=52:54:00:12:34:01,model=e1000 \ + -net socket,connect=127.0.0.1:12330 \ + -no-reboot \ +- -append "panic=1 rw rd.auto rd.retry=50 console=ttyS0,115200n81 selinux=0 rd.debug=0 rd.shell=0 $DEBUGFAIL $*" \ ++ -append "panic=1 systemd.crash_reboot rw rd.auto rd.retry=50 console=ttyS0,115200n81 selinux=0 rd.debug=0 rd.shell=0 $DEBUGFAIL $*" \ + -initrd $TESTDIR/initramfs.testing + if ! grep -F -m 1 -q iscsi-OK $TESTDIR/client.img; then + echo "CLIENT TEST END: $test_name [FAILED - BAD EXIT]" +diff --git a/test/TEST-31-ISCSI-MULTI/test.sh b/test/TEST-31-ISCSI-MULTI/test.sh +index 5c38249c..20db2451 100755 +--- a/test/TEST-31-ISCSI-MULTI/test.sh ++++ b/test/TEST-31-ISCSI-MULTI/test.sh +@@ -26,7 +26,7 @@ run_server() { + -net nic,macaddr=52:54:00:12:34:57,model=e1000 \ + -net socket,listen=127.0.0.1:12331 \ + -no-reboot \ +- -append "panic=1 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0 $SERVER_DEBUG" \ ++ -append "panic=1 systemd.crash_reboot root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0 $SERVER_DEBUG" \ + -initrd $TESTDIR/initramfs.server \ + -pidfile $TESTDIR/server.pid -daemonize || return 1 + sudo chmod 644 $TESTDIR/server.pid || return 1 +@@ -51,7 +51,7 @@ run_client() { + -net nic,macaddr=52:54:00:12:34:01,model=e1000 \ + -net socket,connect=127.0.0.1:12331 \ + -no-reboot \ +- -append "panic=1 rw rd.auto rd.retry=50 console=ttyS0,115200n81 selinux=0 rd.debug=0 rd.shell=0 $DEBUGFAIL $*" \ ++ -append "panic=1 systemd.crash_reboot rw rd.auto rd.retry=50 console=ttyS0,115200n81 selinux=0 rd.debug=0 rd.shell=0 $DEBUGFAIL $*" \ + -initrd $TESTDIR/initramfs.testing + if ! grep -F -m 1 -q iscsi-OK $TESTDIR/client.img; then + echo "CLIENT TEST END: $test_name [FAILED - BAD EXIT]" +diff --git a/test/TEST-40-NBD/test.sh b/test/TEST-40-NBD/test.sh +index 12736a15..19ec5b0e 100755 +--- a/test/TEST-40-NBD/test.sh ++++ b/test/TEST-40-NBD/test.sh +@@ -28,7 +28,7 @@ run_server() { + ${SERIAL:+-serial "$SERIAL"} \ + ${SERIAL:--serial file:"$TESTDIR"/server.log} \ + -no-reboot \ +- -append "panic=1 root=/dev/sda rootfstype=ext2 rw quiet console=ttyS0,115200n81 selinux=0" \ ++ -append "panic=1 systemd.crash_reboot root=/dev/sda rootfstype=ext2 rw quiet console=ttyS0,115200n81 selinux=0" \ + -initrd $TESTDIR/initramfs.server -pidfile $TESTDIR/server.pid -daemonize || return 1 + sudo chmod 644 $TESTDIR/server.pid || return 1 + +@@ -65,7 +65,7 @@ client_test() { + -net nic,macaddr=$mac,model=e1000 \ + -net socket,connect=127.0.0.1:12340 \ + -no-reboot \ +- -append "panic=1 rd.shell=0 $cmdline $DEBUGFAIL rd.auto rd.info rd.retry=10 ro console=ttyS0,115200n81 selinux=0 " \ ++ -append "panic=1 systemd.crash_reboot rd.shell=0 $cmdline $DEBUGFAIL rd.auto rd.info rd.retry=10 ro console=ttyS0,115200n81 selinux=0 " \ + -initrd $TESTDIR/initramfs.testing + + if [[ $? -ne 0 ]] || ! grep -F -m 1 -q nbd-OK $TESTDIR/flag.img; then +diff --git a/test/TEST-50-MULTINIC/test.sh b/test/TEST-50-MULTINIC/test.sh +index 495a66f2..ff2961dc 100755 +--- a/test/TEST-50-MULTINIC/test.sh ++++ b/test/TEST-50-MULTINIC/test.sh +@@ -23,7 +23,7 @@ run_server() { + ${SERIAL:--serial file:"$TESTDIR"/server.log} \ + -watchdog i6300esb -watchdog-action poweroff \ + -no-reboot \ +- -append "panic=1 loglevel=7 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0" \ ++ -append "panic=1 systemd.crash_reboot loglevel=7 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0" \ + -initrd "$TESTDIR"/initramfs.server \ + -pidfile "$TESTDIR"/server.pid -daemonize || return 1 + +@@ -63,7 +63,7 @@ client_test() { + -device e1000,netdev=n2,mac=52:54:00:12:34:99 \ + -watchdog i6300esb -watchdog-action poweroff \ + -no-reboot \ +- -append "panic=1 rd.shell=0 $cmdline $DEBUGFAIL rd.retry=5 ro console=ttyS0,115200n81 selinux=0 init=/sbin/init rd.debug systemd.log_target=console loglevel=7" \ ++ -append "panic=1 systemd.crash_reboot rd.shell=0 $cmdline $DEBUGFAIL rd.retry=5 ro console=ttyS0,115200n81 selinux=0 init=/sbin/init rd.debug systemd.log_target=console loglevel=7" \ + -initrd "$TESTDIR"/initramfs.testing + + { read OK; read IFACES; } < "$TESTDIR"/client.img +diff --git a/test/TEST-70-BONDBRIDGETEAMVLAN/test.sh b/test/TEST-70-BONDBRIDGETEAMVLAN/test.sh +index 8c11a7d3..5618baee 100755 +--- a/test/TEST-70-BONDBRIDGETEAMVLAN/test.sh ++++ b/test/TEST-70-BONDBRIDGETEAMVLAN/test.sh +@@ -31,7 +31,7 @@ run_server() { + ${SERIAL:--serial file:"$TESTDIR"/server.log} \ + -watchdog i6300esb -watchdog-action poweroff \ + -no-reboot \ +- -append "panic=1 loglevel=7 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0 rd.debug" \ ++ -append "panic=1 systemd.crash_reboot loglevel=7 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0 rd.debug" \ + -initrd "$TESTDIR"/initramfs.server \ + -pidfile "$TESTDIR"/server.pid -daemonize || return 1 + chmod 644 -- "$TESTDIR"/server.pid || return 1 +@@ -79,7 +79,7 @@ client_test() { + $nic3 -device e1000,mac=52:54:00:12:34:05,netdev=n3 \ + -watchdog i6300esb -watchdog-action poweroff \ + -no-reboot \ +- -append "panic=1 $cmdline rd.debug $DEBUGFAIL rd.retry=5 rw console=ttyS0,115200n81 selinux=0 init=/sbin/init" \ ++ -append "panic=1 systemd.crash_reboot $cmdline rd.debug $DEBUGFAIL rd.retry=5 rw console=ttyS0,115200n81 selinux=0 init=/sbin/init" \ + -initrd "$TESTDIR"/initramfs.testing + else + $testdir/run-qemu \ +@@ -95,7 +95,7 @@ client_test() { + -net nic,vlan=3,macaddr=52:54:00:12:34:05,model=e1000 \ + -watchdog i6300esb -watchdog-action poweroff \ + -no-reboot \ +- -append "panic=1 $cmdline rd.debug $DEBUGFAIL rd.retry=5 rw console=ttyS0,115200n81 selinux=0 init=/sbin/init" \ ++ -append "panic=1 systemd.crash_reboot $cmdline rd.debug $DEBUGFAIL rd.retry=5 rw console=ttyS0,115200n81 selinux=0 init=/sbin/init" \ + -initrd "$TESTDIR"/initramfs.testing + fi + + diff --git a/SOURCES/0034.patch b/SOURCES/0034.patch new file mode 100644 index 0000000..f9f8d59 --- /dev/null +++ b/SOURCES/0034.patch @@ -0,0 +1,229 @@ +From a34b1baa6ca45b420399ec4cefe3cfe225c14dcf Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Tue, 11 Jun 2019 09:56:13 +0200 +Subject: [PATCH] test/{10,12,13,14,17,30,31}: increase the disk sizes + +On Fedora 30 the paritition sizes turn out to be too small again: + + + mkdir -p /sysroot + + mount /dev/dracut/root /sysroot + + cp -a -t /sysroot /source/bin /source/dev /source/etc /source/lib /source/lib64 /source/proc /source/root /source/sbin /source/sys /source/tmp /source/usr /source/var + cp: error writing '/sysroot/usr/lib64/libkrb5.so.3.3': No space left on device + cp: error writing '/sysroot/usr/lib64/libkrb5support.so.0.1': No space left on device + +It turns out that there has been quite some size increase in some libraries, +notably glibc, though not all -- some even shrunk, ruling out a toolchain +problem. Here's are files over 1M we install on Fedora 30: + + f29 f30 + 2.7M => 6.4M /usr/lib64/{libc-2.28.so => libc-2.29.so} + 3.1M => 6.0M /usr/lib64/libcrypto.so.1.1.1c + 2.0M => 3.5M /usr/lib64/{libm-2.28.so => libm-2.29.so} + 2.9M => 2.8M /usr/lib/systemd/{libsystemd-shared-239.so => libsystemd-shared-241.so} + 1.7M => 2.5M /usr/lib64/libunistring.so.2.1.0 + 2.3M => 2.4M /usr/lib64/bind9-export/libdns-export.so.1105.0.0 + 1.2M => 2.1M /usr/bin/bash + 1.1M => 1.4M /usr/lib64/libkrb5.so.3.3 + 1.2M => 1.4M /usr/lib64/libgcrypt.so.20.2.4 + 612K => 1.1M /usr/lib64/libssl.so.1.1.1c + +This increases the image sizes to accomodate for this. There's probably +little else we can do. + +(cherry picked from commit e318ba30fbd84d510a5bbb071d868e523d965869) +--- + test/TEST-10-RAID/create-root.sh | 6 +++--- + test/TEST-10-RAID/test.sh | 2 +- + test/TEST-12-RAID-DEG/test.sh | 6 +++--- + test/TEST-13-ENC-RAID-LVM/create-root.sh | 6 +++--- + test/TEST-13-ENC-RAID-LVM/test.sh | 2 +- + test/TEST-14-IMSM/create-root.sh | 6 +++--- + test/TEST-14-IMSM/test.sh | 4 ++-- + test/TEST-17-LVM-THIN/create-root.sh | 8 ++++---- + test/TEST-17-LVM-THIN/test.sh | 2 +- + test/TEST-30-ISCSI/test.sh | 6 +++--- + test/TEST-31-ISCSI-MULTI/test.sh | 6 +++--- + 11 files changed, 27 insertions(+), 27 deletions(-) + +diff --git a/test/TEST-10-RAID/create-root.sh b/test/TEST-10-RAID/create-root.sh +index 7b5f2a76..af4cac0d 100755 +--- a/test/TEST-10-RAID/create-root.sh ++++ b/test/TEST-10-RAID/create-root.sh +@@ -8,9 +8,9 @@ udevadm control --reload + # save a partition at the beginning for future flagging purposes + sfdisk /dev/sda <keyfile +diff --git a/test/TEST-13-ENC-RAID-LVM/test.sh b/test/TEST-13-ENC-RAID-LVM/test.sh +index 99324ce9..9ffe24b1 100755 +--- a/test/TEST-13-ENC-RAID-LVM/test.sh ++++ b/test/TEST-13-ENC-RAID-LVM/test.sh +@@ -59,7 +59,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=80 ++ dd if=/dev/null of=$TESTDIR/root.ext2 bs=1M seek=134 + + kernel=$KVERSION + # Create what will eventually be our root filesystem onto an overlay +diff --git a/test/TEST-14-IMSM/create-root.sh b/test/TEST-14-IMSM/create-root.sh +index a0324c6f..0d10945b 100755 +--- a/test/TEST-14-IMSM/create-root.sh ++++ b/test/TEST-14-IMSM/create-root.sh +@@ -32,9 +32,9 @@ sfdisk -g /dev/mapper/isw*Test0 + # save a partition at the beginning for future flagging purposes + sfdisk --no-reread /dev/mapper/isw*Test0 < +Date: Thu, 27 Jun 2019 16:20:32 +0200 +Subject: [PATCH] travis: run TEST-14-IMSM on Fedora 29 + +Systemd in Fedora 30 is broken at the moment. +Fix: https://github.com/systemd/systemd/pull/12872/ + +(cherry picked from commit 7a2503ab8cec9473ad6dacf4f48b17344219f3c0) +--- + .travis.yml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/.travis.yml b/.travis.yml +index efb0df1b..de0af438 100644 +--- a/.travis.yml ++++ b/.travis.yml +@@ -19,7 +19,7 @@ env: + - IMAGE=latest TESTS=10 + - IMAGE=latest TESTS=11 + - IMAGE=latest TESTS=13 +- - IMAGE=latest TESTS=14 ++ - IMAGE=29 TESTS=14 + - IMAGE=latest TESTS=15 + - IMAGE=latest TESTS=17 + + diff --git a/SOURCES/0036.patch b/SOURCES/0036.patch new file mode 100644 index 0000000..4e3f921 --- /dev/null +++ b/SOURCES/0036.patch @@ -0,0 +1,27 @@ +From c60f4fc027272c221a887128070ac89547b6ecc3 Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Thu, 27 Jun 2019 16:22:04 +0200 +Subject: [PATCH] travis: run TEST-13-ENC-RAID-LVM on Fedora 29 + +Systemd in Fedora 30 is broken at the moment. +Fix: https://github.com/systemd/systemd/pull/12897 + +(cherry picked from commit 8238f41b34777c3c75b03a9b598d4b9e1c7bf911) +--- + .travis.yml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/.travis.yml b/.travis.yml +index de0af438..364078cf 100644 +--- a/.travis.yml ++++ b/.travis.yml +@@ -18,7 +18,7 @@ env: + - IMAGE=latest TESTS=04 + - IMAGE=latest TESTS=10 + - IMAGE=latest TESTS=11 +- - IMAGE=latest TESTS=13 ++ - IMAGE=29 TESTS=13 + - IMAGE=29 TESTS=14 + - IMAGE=latest TESTS=15 + - IMAGE=latest TESTS=17 + diff --git a/SOURCES/0037.patch b/SOURCES/0037.patch new file mode 100644 index 0000000..5d067a6 --- /dev/null +++ b/SOURCES/0037.patch @@ -0,0 +1,53 @@ +From d8f0e52ac7d05c364ca24d2058c970e5e03f82ff Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Fri, 30 Aug 2019 16:16:51 +0200 +Subject: [PATCH] all: remove debugging leftovers + +Accidentally folded into commit e671c3a06a7e5 ('95iscsi/module-setup.sh: +do not require 'hostname' anymore'). +--- + modules.d/40network/netroot.sh | 2 +- + modules.d/98dracut-systemd/dracut-cmdline.sh | 2 +- + modules.d/99base/init.sh | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/modules.d/40network/netroot.sh b/modules.d/40network/netroot.sh +index 654cfc72..207364cd 100755 +--- a/modules.d/40network/netroot.sh ++++ b/modules.d/40network/netroot.sh +@@ -66,7 +66,7 @@ if [ -z "$2" ]; then + + # Check: do we really know how to handle (net)root? + [ -z "$root" ] && die "No or empty root= argument" +- [ -z "$rootok" ] && die "X2 Don't know how to handle 'root=$root'" ++ [ -z "$rootok" ] && die "Don't know how to handle 'root=$root'" + + handler=${netroot%%:*} + handler=${handler%%4} +diff --git a/modules.d/98dracut-systemd/dracut-cmdline.sh b/modules.d/98dracut-systemd/dracut-cmdline.sh +index 89c52d13..bff9435a 100755 +--- a/modules.d/98dracut-systemd/dracut-cmdline.sh ++++ b/modules.d/98dracut-systemd/dracut-cmdline.sh +@@ -76,7 +76,7 @@ case "${root}${root_unset}" in + esac + + [ -z "${root}${root_unset}" ] && die "Empty root= argument" +-[ -z "$rootok" ] && die "X1 Don't know how to handle 'root=$root'" ++[ -z "$rootok" ] && die "Don't know how to handle 'root=$root'" + + export root rflags fstype netroot NEWROOT + +diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh +index 3e20069f..e4f7cff1 100755 +--- a/modules.d/99base/init.sh ++++ b/modules.d/99base/init.sh +@@ -136,7 +136,7 @@ getarg 'rd.break=cmdline' -d 'rdbreak=cmdline' && emergency_shell -n cmdline "Br + source_hook cmdline + + [ -z "$root" ] && die "No or empty root= argument" +-[ -z "$rootok" ] && die "X0 Don't know how to handle 'root=$root'" ++[ -z "$rootok" ] && die "Don't know how to handle 'root=$root'" + + export root rflags fstype netroot NEWROOT + + diff --git a/SOURCES/0038.patch b/SOURCES/0038.patch new file mode 100644 index 0000000..43acb72 --- /dev/null +++ b/SOURCES/0038.patch @@ -0,0 +1,31 @@ +From 8eb08e55286e77f005246d1db1bfd2adf4a0e40b Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Tue, 27 Nov 2018 15:30:48 +0100 +Subject: [PATCH] network-manager: call the online hook for connected devices + +Look for "connection-uuid" instead of "managed" to determine the devices +that are actually activated with a connection and call the online hook. + +This fixes the anaconda-net root mount, which utilizes the online hook. + +(cherry picked from commit 79a17b0112995eb60c85c64d15070c52f213b28d) +--- + modules.d/35network-manager/nm-run.sh | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/modules.d/35network-manager/nm-run.sh b/modules.d/35network-manager/nm-run.sh +index f6defa99..0f943631 100755 +--- a/modules.d/35network-manager/nm-run.sh ++++ b/modules.d/35network-manager/nm-run.sh +@@ -9,8 +9,9 @@ fi + for _i in /sys/class/net/*/ + do + state=/run/NetworkManager/devices/$(cat $_i/ifindex) +- grep -q managed=true $state 2>/dev/null || continue ++ grep -q connection-uuid= $state 2>/dev/null || continue + ifname=$(basename $_i) + sed -n 's/root-path/new_root_path/p' <$state >/tmp/dhclient.$ifname.dhcpopts ++ source_hook initqueue/online $ifname + /sbin/netroot $ifname + done + diff --git a/SOURCES/0039.patch b/SOURCES/0039.patch new file mode 100644 index 0000000..df4625b --- /dev/null +++ b/SOURCES/0039.patch @@ -0,0 +1,24 @@ +From 34011ee53e745f74d70bc5b52dade6d4ef349e90 Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Mon, 17 Jun 2019 10:07:38 +0200 +Subject: [PATCH] network-manager: remove useless use of basename + +(cherry picked from commit 5e0f8c8a4ced36268d0077acafa1db2402776fa6) +--- + modules.d/35network-manager/nm-run.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/35network-manager/nm-run.sh b/modules.d/35network-manager/nm-run.sh +index 0f943631..5f4b38ca 100755 +--- a/modules.d/35network-manager/nm-run.sh ++++ b/modules.d/35network-manager/nm-run.sh +@@ -10,7 +10,7 @@ for _i in /sys/class/net/*/ + do + state=/run/NetworkManager/devices/$(cat $_i/ifindex) + grep -q connection-uuid= $state 2>/dev/null || continue +- ifname=$(basename $_i) ++ ifname=${_i##*/} + sed -n 's/root-path/new_root_path/p' <$state >/tmp/dhclient.$ifname.dhcpopts + source_hook initqueue/online $ifname + /sbin/netroot $ifname + diff --git a/SOURCES/0040.patch b/SOURCES/0040.patch new file mode 100644 index 0000000..e2fa551 --- /dev/null +++ b/SOURCES/0040.patch @@ -0,0 +1,24 @@ +From 94c75a2a827ff09ffac18454d5c4ba4756d721d6 Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Mon, 27 May 2019 12:44:17 +0200 +Subject: [PATCH] network-manager: also read out next-server from NM state + +(cherry picked from commit 4be95b67a73e7434f92a7d7c40955eae0b59717e) +--- + modules.d/35network-manager/nm-run.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/35network-manager/nm-run.sh b/modules.d/35network-manager/nm-run.sh +index 5f4b38ca..a539d5b2 100755 +--- a/modules.d/35network-manager/nm-run.sh ++++ b/modules.d/35network-manager/nm-run.sh +@@ -11,7 +11,7 @@ do + state=/run/NetworkManager/devices/$(cat $_i/ifindex) + grep -q connection-uuid= $state 2>/dev/null || continue + ifname=${_i##*/} +- sed -n 's/root-path/new_root_path/p' <$state >/tmp/dhclient.$ifname.dhcpopts ++ sed -n 's/root-path/new_root_path/p;s/next-server/new_next_server/p' <$state >/tmp/dhclient.$ifname.dhcpopts + source_hook initqueue/online $ifname + /sbin/netroot $ifname + done + diff --git a/SOURCES/0041.patch b/SOURCES/0041.patch new file mode 100644 index 0000000..52083c3 --- /dev/null +++ b/SOURCES/0041.patch @@ -0,0 +1,30 @@ +From 68fefe6f9424d3f29e6da9133579c385e7b470b2 Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Mon, 27 May 2019 12:43:59 +0200 +Subject: [PATCH] network-manager: generate configuration with netroot= + +If the root is on network, let nm-initrd-generator create configuration +even if none was explicitly specified on the command line. + +Also do the same if /tmp/net.ifaces exists, because the anaconda plugin +creates an empty file in that location in hopes that will make us +configure the network. + +(cherry picked from commit 381ab6b7cd2d35bf7f9da63b10c20f5ef6e61a8b) +--- + modules.d/35network-manager/nm-config.sh | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/modules.d/35network-manager/nm-config.sh b/modules.d/35network-manager/nm-config.sh +index 1339ebe7..1efa737c 100755 +--- a/modules.d/35network-manager/nm-config.sh ++++ b/modules.d/35network-manager/nm-config.sh +@@ -1,3 +1,7 @@ + #!/bin/sh + ++if [ -n "$netroot" ] || [ -e /tmp/net.ifaces ]; then ++ echo rd.neednet >> /etc/cmdline.d/35-neednet.conf ++fi ++ + /usr/libexec/nm-initrd-generator -- $(getcmdline) + diff --git a/SOURCES/0042.patch b/SOURCES/0042.patch new file mode 100644 index 0000000..3bf3074 --- /dev/null +++ b/SOURCES/0042.patch @@ -0,0 +1,43 @@ +From 53cece208a44c53ecc001cb8eb769f6fb9b3d1dc Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Mon, 27 May 2019 11:12:22 +0200 +Subject: [PATCH] network: parse root=dhcp also with network-manager module + +Move the logic from network-legacy to common network code. + +(cherry picked from commit 35efada5ecffd139660b4a89f4cc3d627752c91e) +--- + modules.d/35network-legacy/module-setup.sh | 1 - + modules.d/{35network-legacy => 40network}/dhcp-root.sh | 0 + modules.d/40network/module-setup.sh | 1 + + 3 files changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/35network-legacy/module-setup.sh b/modules.d/35network-legacy/module-setup.sh +index 71abda36..5a82e998 100755 +--- a/modules.d/35network-legacy/module-setup.sh ++++ b/modules.d/35network-legacy/module-setup.sh +@@ -36,7 +36,6 @@ install() { + inst_simple -H "/etc/dhclient.conf" + cat "$moddir/dhclient.conf" >> "${initdir}/etc/dhclient.conf" + inst_hook pre-udev 60 "$moddir/net-genrules.sh" +- inst_hook cmdline 91 "$moddir/dhcp-root.sh" + inst_hook cmdline 92 "$moddir/parse-ibft.sh" + inst_hook cmdline 95 "$moddir/parse-vlan.sh" + inst_hook cmdline 96 "$moddir/parse-bond.sh" +diff --git a/modules.d/35network-legacy/dhcp-root.sh b/modules.d/40network/dhcp-root.sh +similarity index 100% +rename from modules.d/35network-legacy/dhcp-root.sh +rename to modules.d/40network/dhcp-root.sh +diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh +index e8541636..8e2a74a3 100755 +--- a/modules.d/40network/module-setup.sh ++++ b/modules.d/40network/module-setup.sh +@@ -28,6 +28,7 @@ install() { + inst_script "$moddir/netroot.sh" "/sbin/netroot" + inst_simple "$moddir/net-lib.sh" "/lib/net-lib.sh" + inst_hook pre-udev 50 "$moddir/ifname-genrules.sh" ++ inst_hook cmdline 91 "$moddir/dhcp-root.sh" + + dracut_need_initqueue + } + diff --git a/SOURCES/0043.patch b/SOURCES/0043.patch new file mode 100644 index 0000000..b59dc53 --- /dev/null +++ b/SOURCES/0043.patch @@ -0,0 +1,620 @@ +From 4e10601254bb20891dc2919416d7151583678c3d Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Mon, 10 Jun 2019 16:04:18 +0200 +Subject: [PATCH] test: copy BONDBRIDGETEAMVLAN to IFCFG + +The IFCFG test will make sure the network-legacy plugin keeps writing +out correct ifcfg files. + +This is a separate commit so that actual changes are visible in the +following one. + +(cherry picked from commit 70787ab61957741a05e4046bad49758c4e9bc1cc) +--- + test/TEST-60-IFCFG/99-idesymlinks.rules | 8 + + test/TEST-60-IFCFG/Makefile | 10 + + test/TEST-60-IFCFG/client-init.sh | 22 +++ + test/TEST-60-IFCFG/dhcpd.conf | 27 +++ + test/TEST-60-IFCFG/exports | 1 + + test/TEST-60-IFCFG/finished-false.sh | 2 + + test/TEST-60-IFCFG/hard-off.sh | 3 + + test/TEST-60-IFCFG/hosts | 5 + + test/TEST-60-IFCFG/server-init.sh | 120 ++++++++++++ + test/TEST-60-IFCFG/test.sh | 336 ++++++++++++++++++++++++++++++++ + 10 files changed, 534 insertions(+) + +diff --git a/test/TEST-60-IFCFG/99-idesymlinks.rules b/test/TEST-60-IFCFG/99-idesymlinks.rules +new file mode 100644 +index 00000000..d557790a +--- /dev/null ++++ b/test/TEST-60-IFCFG/99-idesymlinks.rules +@@ -0,0 +1,8 @@ ++ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="hda", SYMLINK+="sda" ++ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="partition", KERNEL=="hda*", SYMLINK+="sda$env{MINOR}" ++ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="hdb", SYMLINK+="sdb" ++ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="partition", KERNEL=="hdb*", SYMLINK+="sdb$env{MINOR}" ++ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="hdc", SYMLINK+="sdc" ++ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="partition", KERNEL=="hdc*", SYMLINK+="sdc$env{MINOR}" ++ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="hdd", SYMLINK+="sdd" ++ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="partition", KERNEL=="hdd*", SYMLINK+="sdd$env{MINOR}" +diff --git a/test/TEST-60-IFCFG/Makefile b/test/TEST-60-IFCFG/Makefile +new file mode 100644 +index 00000000..aad27059 +--- /dev/null ++++ b/test/TEST-60-IFCFG/Makefile +@@ -0,0 +1,10 @@ ++all: ++ @$(MAKE) -s --no-print-directory -C ../.. all ++ @V=$(V) basedir=../.. testdir=../ ./test.sh --all ++setup: ++ @$(MAKE) --no-print-directory -C ../.. all ++ @basedir=../.. testdir=../ ./test.sh --setup ++clean: ++ @basedir=../.. testdir=../ ./test.sh --clean ++run: ++ @basedir=../.. testdir=../ ./test.sh --run +diff --git a/test/TEST-60-IFCFG/client-init.sh b/test/TEST-60-IFCFG/client-init.sh +new file mode 100755 +index 00000000..8c33ff0f +--- /dev/null ++++ b/test/TEST-60-IFCFG/client-init.sh +@@ -0,0 +1,22 @@ ++#!/bin/sh ++exec >/dev/console 2>&1 ++export PATH=/sbin:/bin:/usr/sbin:/usr/bin ++strstr() { [ "${1#*$2*}" != "$1" ]; } ++CMDLINE=$(while read line; do echo $line;done < /proc/cmdline) ++export TERM=linux ++export PS1='initramfs-test:\w\$ ' ++stty sane ++echo "made it to the rootfs! Powering down." ++ ++( ++ echo OK ++ ip -o -4 address show scope global | while read n if rest; do echo $if;done | sort ++ for i in /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-*; do ++ echo $i ++ grep -v 'UUID=' $i ++ done ++ echo EOF ++) > /dev/sda ++ ++strstr "$CMDLINE" "rd.shell" && sh -i ++poweroff -f +diff --git a/test/TEST-60-IFCFG/dhcpd.conf b/test/TEST-60-IFCFG/dhcpd.conf +new file mode 100644 +index 00000000..e26bd60b +--- /dev/null ++++ b/test/TEST-60-IFCFG/dhcpd.conf +@@ -0,0 +1,27 @@ ++ddns-update-style none; ++ ++use-host-decl-names true; ++ ++subnet 192.168.50.0 netmask 255.255.255.0 { ++ option subnet-mask 255.255.255.0; ++ option routers 192.168.50.1; ++ next-server 192.168.50.1; ++ server-identifier 192.168.50.1; ++ option domain-name-servers 192.168.50.1; ++ option domain-search "example.com"; ++ option domain-name "other.com"; ++ option root-path "nfs:192.168.50.1:/nfs/client"; ++ range 192.168.50.10 192.168.50.100; ++} ++ ++subnet 192.168.51.0 netmask 255.255.255.0 { ++ option subnet-mask 255.255.255.0; ++ option routers 192.168.51.1; ++ next-server 192.168.51.1; ++ server-identifier 192.168.51.1; ++ option domain-name-servers 192.168.51.1; ++ option domain-search "example.com"; ++ option domain-name "other.com"; ++ option root-path "nfs:192.168.51.1:/nfs/client"; ++ range 192.168.51.10 192.168.51.100; ++} +diff --git a/test/TEST-60-IFCFG/exports b/test/TEST-60-IFCFG/exports +new file mode 100644 +index 00000000..ff5f29b1 +--- /dev/null ++++ b/test/TEST-60-IFCFG/exports +@@ -0,0 +1 @@ ++/nfs/client 192.168.50.0/24(rw,insecure,no_subtree_check,no_root_squash) +diff --git a/test/TEST-60-IFCFG/finished-false.sh b/test/TEST-60-IFCFG/finished-false.sh +new file mode 100755 +index 00000000..ecdbef95 +--- /dev/null ++++ b/test/TEST-60-IFCFG/finished-false.sh +@@ -0,0 +1,2 @@ ++#!/bin/sh ++exit 1 +diff --git a/test/TEST-60-IFCFG/hard-off.sh b/test/TEST-60-IFCFG/hard-off.sh +new file mode 100755 +index 00000000..12c3d5ac +--- /dev/null ++++ b/test/TEST-60-IFCFG/hard-off.sh +@@ -0,0 +1,3 @@ ++#!/bin/sh ++getarg rd.shell || poweroff -f ++getarg failme && poweroff -f +diff --git a/test/TEST-60-IFCFG/hosts b/test/TEST-60-IFCFG/hosts +new file mode 100644 +index 00000000..d02a4e9b +--- /dev/null ++++ b/test/TEST-60-IFCFG/hosts +@@ -0,0 +1,5 @@ ++127.0.0.1 localhost ++192.168.50.1 server ++192.168.50.100 client-if1 ++192.168.50.101 client-if2 ++192.168.50.102 client-if3 +diff --git a/test/TEST-60-IFCFG/server-init.sh b/test/TEST-60-IFCFG/server-init.sh +new file mode 100755 +index 00000000..b9f01c9b +--- /dev/null ++++ b/test/TEST-60-IFCFG/server-init.sh +@@ -0,0 +1,120 @@ ++#!/bin/sh ++exec /dev/console 2>&1 ++set -x ++export PATH=/sbin:/bin:/usr/sbin:/usr/bin ++export TERM=linux ++export PS1='nfstest-server:\w\$ ' ++stty sane ++echo "made it to the rootfs!" ++echo server > /proc/sys/kernel/hostname ++ ++wait_for_if_link() { ++ local cnt=0 ++ local li ++ while [ $cnt -lt 600 ]; do ++ li=$(ip -o link show dev $1 2>/dev/null) ++ [ -n "$li" ] && return 0 ++ sleep 0.1 ++ cnt=$(($cnt+1)) ++ done ++ return 1 ++} ++ ++wait_for_if_up() { ++ local cnt=0 ++ local li ++ while [ $cnt -lt 200 ]; do ++ li=$(ip -o link show up dev $1) ++ [ -n "$li" ] && return 0 ++ sleep 0.1 ++ cnt=$(($cnt+1)) ++ done ++ return 1 ++} ++ ++wait_for_route_ok() { ++ local cnt=0 ++ while [ $cnt -lt 200 ]; do ++ li=$(ip route show) ++ [ -n "$li" ] && [ -z "${li##*$1*}" ] && return 0 ++ sleep 0.1 ++ cnt=$(($cnt+1)) ++ done ++ return 1 ++} ++ ++linkup() { ++ wait_for_if_link $1 2>/dev/null\ ++ && ip link set $1 up 2>/dev/null\ ++ && wait_for_if_up $1 2>/dev/null ++} ++ ++modprobe --all -b -q 8021q ipvlan macvlan ++>/dev/watchdog ++ip addr add 127.0.0.1/8 dev lo ++linkup lo ++ip link set dev eth0 name ens3 ++ip addr add 192.168.50.1/24 dev ens3 ++linkup ens3 ++>/dev/watchdog ++ip link set dev eth1 name ens4 ++ip link add dev ens4.1 link ens4 type vlan id 1 ++ip link add dev ens4.2 link ens4 type vlan id 2 ++ip link add dev ens4.3 link ens4 type vlan id 3 ++ip link add dev ens4.4 link ens4 type vlan id 4 ++ip addr add 192.168.54.1/24 dev ens4.1 ++ip addr add 192.168.55.1/24 dev ens4.2 ++ip addr add 192.168.56.1/24 dev ens4.3 ++ip addr add 192.168.57.1/24 dev ens4.4 ++linkup ens4 ++ip link set dev ens4.1 up ++ip link set dev ens4.2 up ++ip link set dev ens4.3 up ++ip link set dev ens4.4 up ++ip link set dev eth2 name ens5 ++ip addr add 192.168.51.1/24 dev ens5 ++linkup ens5 ++ip link set dev eth3 name ens6 ++linkup ens6 ++>/dev/watchdog ++modprobe af_packet ++> /dev/watchdog ++modprobe sunrpc ++>/dev/watchdog ++mount -t rpc_pipefs sunrpc /var/lib/nfs/rpc_pipefs ++>/dev/watchdog ++[ -x /sbin/portmap ] && portmap ++>/dev/watchdog ++mkdir -p /run/rpcbind ++[ -x /sbin/rpcbind ] && rpcbind ++>/dev/watchdog ++modprobe nfsd ++>/dev/watchdog ++mount -t nfsd nfsd /proc/fs/nfsd ++>/dev/watchdog ++exportfs -r ++>/dev/watchdog ++rpc.nfsd ++>/dev/watchdog ++rpc.mountd ++>/dev/watchdog ++rpc.idmapd ++>/dev/watchdog ++exportfs -r ++>/dev/watchdog ++>/var/lib/dhcpd/dhcpd.leases ++>/dev/watchdog ++chmod 777 /var/lib/dhcpd/dhcpd.leases ++>/dev/watchdog ++dhcpd -cf /etc/dhcpd.conf -lf /var/lib/dhcpd/dhcpd.leases ens3 ens5 ++#echo -n 'V' > /dev/watchdog ++#sh -i ++#tcpdump -i ens3 ++# Wait forever for the VM to die ++echo "Serving NFS mounts" ++while :; do ++ sleep 10 ++ >/dev/watchdog ++done ++mount -n -o remount,ro / ++poweroff -f +diff --git a/test/TEST-60-IFCFG/test.sh b/test/TEST-60-IFCFG/test.sh +new file mode 100755 +index 00000000..8c11a7d3 +--- /dev/null ++++ b/test/TEST-60-IFCFG/test.sh +@@ -0,0 +1,336 @@ ++#!/bin/bash ++# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- ++# ex: ts=8 sw=4 sts=4 et filetype=sh ++TEST_DESCRIPTION="root filesystem on NFS with bridging/bonding/vlan" ++KVERSION=${KVERSION-$(uname -r)} ++ ++# Uncomment this to debug failures ++#DEBUGFAIL="rd.shell rd.break" ++#DEBUGFAIL="rd.shell rd.break rd.debug" ++#SERIAL="tcp:127.0.0.1:9999" ++ ++run_server() { ++ # Start server first ++ echo "MULTINIC TEST SETUP: Starting DHCP/NFS server" ++ ++ fsck -a "$TESTDIR"/server.ext3 || return 1 ++ ++ $testdir/run-qemu \ ++ -hda "$TESTDIR"/server.ext3 \ ++ -m 512M -smp 2 \ ++ -display none \ ++ -netdev socket,id=n0,listen=127.0.0.1:12370 \ ++ -netdev socket,id=n1,listen=127.0.0.1:12371 \ ++ -netdev socket,id=n2,listen=127.0.0.1:12372 \ ++ -netdev socket,id=n3,listen=127.0.0.1:12373 \ ++ -device e1000,netdev=n0,mac=52:54:01:12:34:56 \ ++ -device e1000,netdev=n1,mac=52:54:01:12:34:57 \ ++ -device e1000,netdev=n2,mac=52:54:01:12:34:58 \ ++ -device e1000,netdev=n3,mac=52:54:01:12:34:59 \ ++ ${SERIAL:+-serial "$SERIAL"} \ ++ ${SERIAL:--serial file:"$TESTDIR"/server.log} \ ++ -watchdog i6300esb -watchdog-action poweroff \ ++ -no-reboot \ ++ -append "panic=1 loglevel=7 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0 rd.debug" \ ++ -initrd "$TESTDIR"/initramfs.server \ ++ -pidfile "$TESTDIR"/server.pid -daemonize || return 1 ++ chmod 644 -- "$TESTDIR"/server.pid || return 1 ++ ++ # Cleanup the terminal if we have one ++ tty -s && stty sane ++ ++ echo Sleeping 10 seconds to give the server a head start ++ sleep 10 ++} ++ ++client_test() { ++ local test_name="$1" ++ local do_vlan13="$2" ++ local cmdline="$3" ++ local check="$4" ++ local CONF ++ ++ echo "CLIENT TEST START: $test_name" ++ ++ [ "$do_vlan13" != "yes" ] && unset do_vlan13 ++ ++ # Need this so kvm-qemu will boot (needs non-/dev/zero local disk) ++ if ! dd if=/dev/zero of="$TESTDIR"/client.img bs=1M count=1; then ++ echo "Unable to make client sda image" 1>&2 ++ return 1 ++ fi ++ if [[ $do_vlan13 ]]; then ++ nic1=" -netdev socket,connect=127.0.0.1:12371,id=n1" ++ nic3=" -netdev socket,connect=127.0.0.1:12373,id=n3" ++ else ++ nic1=" -netdev hubport,id=n1,hubid=2" ++ nic3=" -netdev hubport,id=n3,hubid=3" ++ fi ++ ++ if $testdir/run-qemu --help | grep -qF -m1 'netdev hubport,id=str,hubid=n[,netdev=nd]' && echo OK; then ++ $testdir/run-qemu \ ++ -hda "$TESTDIR"/client.img -m 512M -smp 2 -nographic \ ++ -netdev socket,connect=127.0.0.1:12370,id=s1 \ ++ -netdev hubport,hubid=1,id=h1,netdev=s1 \ ++ -netdev hubport,hubid=1,id=h2 -device e1000,mac=52:54:00:12:34:01,netdev=h2 \ ++ -netdev hubport,hubid=1,id=h3 -device e1000,mac=52:54:00:12:34:02,netdev=h3 \ ++ $nic1 -device e1000,mac=52:54:00:12:34:03,netdev=n1 \ ++ -netdev socket,connect=127.0.0.1:12372,id=n2 -device e1000,mac=52:54:00:12:34:04,netdev=n2 \ ++ $nic3 -device e1000,mac=52:54:00:12:34:05,netdev=n3 \ ++ -watchdog i6300esb -watchdog-action poweroff \ ++ -no-reboot \ ++ -append "panic=1 $cmdline rd.debug $DEBUGFAIL rd.retry=5 rw console=ttyS0,115200n81 selinux=0 init=/sbin/init" \ ++ -initrd "$TESTDIR"/initramfs.testing ++ else ++ $testdir/run-qemu \ ++ -hda "$TESTDIR"/client.img -m 512M -smp 2 -nographic \ ++ -net socket,vlan=0,connect=127.0.0.1:12370 \ ++ ${do_vlan13:+-net socket,vlan=1,connect=127.0.0.1:12371} \ ++ -net socket,vlan=2,connect=127.0.0.1:12372 \ ++ ${do_vlan13:+-net socket,vlan=3,connect=127.0.0.1:12373} \ ++ -net nic,vlan=0,macaddr=52:54:00:12:34:01,model=e1000 \ ++ -net nic,vlan=0,macaddr=52:54:00:12:34:02,model=e1000 \ ++ -net nic,vlan=1,macaddr=52:54:00:12:34:03,model=e1000 \ ++ -net nic,vlan=2,macaddr=52:54:00:12:34:04,model=e1000 \ ++ -net nic,vlan=3,macaddr=52:54:00:12:34:05,model=e1000 \ ++ -watchdog i6300esb -watchdog-action poweroff \ ++ -no-reboot \ ++ -append "panic=1 $cmdline rd.debug $DEBUGFAIL rd.retry=5 rw console=ttyS0,115200n81 selinux=0 init=/sbin/init" \ ++ -initrd "$TESTDIR"/initramfs.testing ++ fi ++ ++ { ++ read OK ++ if [[ "$OK" != "OK" ]]; then ++ echo "CLIENT TEST END: $test_name [FAILED - BAD EXIT]" ++ return 1 ++ fi ++ ++ while read line; do ++ [[ $line == END ]] && break ++ CONF+="$line " ++ done ++ } < "$TESTDIR"/client.img || return 1 ++ ++ if [[ "$check" != "$CONF" ]]; then ++ echo "Expected: '$check'" ++ echo ++ echo ++ echo "Got: '$CONF'" ++ echo "CLIENT TEST END: $test_name [FAILED - BAD CONF]" ++ return 1 ++ fi ++ ++ echo "CLIENT TEST END: $test_name [OK]" ++ return 0 ++} ++ ++ ++test_run() { ++ if ! run_server; then ++ echo "Failed to start server" 1>&2 ++ return 1 ++ fi ++ test_client || { kill_server; return 1; } ++} ++ ++test_client() { ++ client_test "Multiple VLAN" \ ++ "yes" \ ++ " ++vlan=vlan0001:ens5 ++vlan=vlan2:ens5 ++vlan=ens5.3:ens5 ++vlan=ens5.0004:ens5 ++ip=ens3:dhcp ++ip=192.168.54.101::192.168.54.1:24:test:vlan0001:none ++ip=192.168.55.102::192.168.55.1:24:test:vlan2:none ++ip=192.168.56.103::192.168.56.1:24:test:ens5.3:none ++ip=192.168.57.104::192.168.57.1:24:test:ens5.0004:none ++rd.neednet=1 ++root=nfs:192.168.50.1:/nfs/client bootdev=ens3 ++" \ ++ 'ens3 ens5.0004 ens5.3 vlan0001 vlan2 /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens3 # Generated by dracut initrd NAME="ens3" DEVICE="ens3" ONBOOT=yes NETBOOT=yes IPV6INIT=yes BOOTPROTO=dhcp TYPE=Ethernet /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens5.0004 # Generated by dracut initrd NAME="ens5.0004" ONBOOT=yes NETBOOT=yes BOOTPROTO=none IPADDR="192.168.57.104" PREFIX="24" GATEWAY="192.168.57.1" TYPE=Vlan DEVICE="ens5.0004" VLAN=yes PHYSDEV="ens5" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens5.3 # Generated by dracut initrd NAME="ens5.3" ONBOOT=yes NETBOOT=yes BOOTPROTO=none IPADDR="192.168.56.103" PREFIX="24" GATEWAY="192.168.56.1" TYPE=Vlan DEVICE="ens5.3" VLAN=yes PHYSDEV="ens5" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-vlan0001 # Generated by dracut initrd NAME="vlan0001" ONBOOT=yes NETBOOT=yes BOOTPROTO=none IPADDR="192.168.54.101" PREFIX="24" GATEWAY="192.168.54.1" TYPE=Vlan DEVICE="vlan0001" VLAN=yes PHYSDEV="ens5" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-vlan2 # Generated by dracut initrd NAME="vlan2" ONBOOT=yes NETBOOT=yes BOOTPROTO=none IPADDR="192.168.55.102" PREFIX="24" GATEWAY="192.168.55.1" TYPE=Vlan DEVICE="vlan2" VLAN=yes PHYSDEV="ens5" EOF ' \ ++ || return 1 ++ ++ client_test "Multiple Bonds" \ ++ "yes" \ ++ " ++bond=bond0:ens4,ens5 ++bond=bond1:ens6,ens7 ++ip=bond0:dhcp ++ip=bond1:dhcp ++rd.neednet=1 ++root=nfs:192.168.50.1:/nfs/client bootdev=bond0 ++" \ ++ 'bond0 bond1 /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-bond0 # Generated by dracut initrd NAME="bond0" DEVICE="bond0" ONBOOT=yes NETBOOT=yes IPV6INIT=yes BOOTPROTO=dhcp BONDING_OPTS="" NAME="bond0" TYPE=Bond /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-bond1 # Generated by dracut initrd NAME="bond1" DEVICE="bond1" ONBOOT=yes NETBOOT=yes IPV6INIT=yes BOOTPROTO=dhcp BONDING_OPTS="" NAME="bond1" TYPE=Bond /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens4 # Generated by dracut initrd NAME="ens4" TYPE=Ethernet ONBOOT=yes NETBOOT=yes SLAVE=yes MASTER="bond0" DEVICE="ens4" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens5 # Generated by dracut initrd NAME="ens5" TYPE=Ethernet ONBOOT=yes NETBOOT=yes SLAVE=yes MASTER="bond0" DEVICE="ens5" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens6 # Generated by dracut initrd NAME="ens6" TYPE=Ethernet ONBOOT=yes NETBOOT=yes SLAVE=yes MASTER="bond1" DEVICE="ens6" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens7 # Generated by dracut initrd NAME="ens7" TYPE=Ethernet ONBOOT=yes NETBOOT=yes SLAVE=yes MASTER="bond1" DEVICE="ens7" EOF ' \ ++ || return 1 ++ ++ client_test "Multiple Bridges" \ ++ "no" \ ++ " ++bridge=br0:ens4,ens5 ++bridge=br1:ens6,ens7 ++ip=br0:dhcp ++ip=br1:dhcp ++rd.neednet=1 ++root=nfs:192.168.50.1:/nfs/client bootdev=br0 ++" \ ++ 'br0 br1 /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-br0 # Generated by dracut initrd NAME="br0" DEVICE="br0" ONBOOT=yes NETBOOT=yes IPV6INIT=yes BOOTPROTO=dhcp TYPE=Bridge NAME="br0" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-br1 # Generated by dracut initrd NAME="br1" DEVICE="br1" ONBOOT=yes NETBOOT=yes IPV6INIT=yes BOOTPROTO=dhcp TYPE=Bridge NAME="br1" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens4 # Generated by dracut initrd NAME="ens4" TYPE=Ethernet ONBOOT=yes NETBOOT=yes BRIDGE="br0" DEVICE="ens4" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens5 # Generated by dracut initrd NAME="ens5" TYPE=Ethernet ONBOOT=yes NETBOOT=yes BRIDGE="br0" DEVICE="ens5" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens6 # Generated by dracut initrd NAME="ens6" TYPE=Ethernet ONBOOT=yes NETBOOT=yes BRIDGE="br1" DEVICE="ens6" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens7 # Generated by dracut initrd NAME="ens7" TYPE=Ethernet ONBOOT=yes NETBOOT=yes BRIDGE="br1" DEVICE="ens7" EOF ' \ ++ || return 1 ++ ++ kill_server ++ return 0 ++} ++ ++test_setup() { ++ # Make server root ++ dd if=/dev/null of="$TESTDIR"/server.ext3 bs=1M seek=120 ++ mke2fs -j -F -- "$TESTDIR"/server.ext3 ++ mkdir -- "$TESTDIR"/mnt ++ mount -o loop -- "$TESTDIR"/server.ext3 "$TESTDIR"/mnt ++ kernel=$KVERSION ++ ( ++ export initdir="$TESTDIR"/mnt ++ . "$basedir"/dracut-init.sh ++ ++ ( ++ cd "$initdir"; ++ mkdir -p -- dev sys proc run etc var/run tmp var/lib/{dhcpd,rpcbind} ++ mkdir -p -- var/lib/nfs/{v4recovery,rpc_pipefs} ++ chmod 777 -- var/lib/rpcbind var/lib/nfs ++ ) ++ ++ for _f in modules.builtin.bin modules.builtin; do ++ [[ $srcmods/$_f ]] && break ++ done || { ++ dfatal "No modules.builtin.bin and modules.builtin found!" ++ return 1 ++ } ++ ++ for _f in modules.builtin.bin modules.builtin modules.order; do ++ [[ $srcmods/$_f ]] && inst_simple "$srcmods/$_f" "/lib/modules/$kernel/$_f" ++ done ++ ++ inst_multiple sh ls shutdown poweroff stty cat ps ln ip \ ++ dmesg mkdir cp ping exportfs \ ++ modprobe rpc.nfsd rpc.mountd showmount tcpdump \ ++ /etc/services sleep mount chmod ++ for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do ++ [ -f "${_terminfodir}"/l/linux ] && break ++ done ++ inst_multiple -o "${_terminfodir}"/l/linux ++ type -P portmap >/dev/null && inst_multiple portmap ++ type -P rpcbind >/dev/null && inst_multiple rpcbind ++ [ -f /etc/netconfig ] && inst_multiple /etc/netconfig ++ type -P dhcpd >/dev/null && inst_multiple dhcpd ++ [ -x /usr/sbin/dhcpd3 ] && inst /usr/sbin/dhcpd3 /usr/sbin/dhcpd ++ instmods nfsd sunrpc ipv6 lockd af_packet 8021q ipvlan macvlan ++ inst_simple /etc/os-release ++ inst ./server-init.sh /sbin/init ++ inst ./hosts /etc/hosts ++ inst ./exports /etc/exports ++ inst ./dhcpd.conf /etc/dhcpd.conf ++ inst_multiple /etc/nsswitch.conf /etc/rpc /etc/protocols ++ ++ inst_multiple rpc.idmapd /etc/idmapd.conf ++ ++ inst_libdir_file 'libnfsidmap_nsswitch.so*' ++ inst_libdir_file 'libnfsidmap/*.so*' ++ inst_libdir_file 'libnfsidmap*.so*' ++ ++ _nsslibs=$(sed -e '/^#/d' -e 's/^.*://' -e 's/\[NOTFOUND=return\]//' /etc/nsswitch.conf \ ++ | tr -s '[:space:]' '\n' | sort -u | tr -s '[:space:]' '|') ++ _nsslibs=${_nsslibs#|} ++ _nsslibs=${_nsslibs%|} ++ ++ inst_libdir_file -n "$_nsslibs" 'libnss_*.so*' ++ ++ inst /etc/nsswitch.conf /etc/nsswitch.conf ++ inst /etc/passwd /etc/passwd ++ inst /etc/group /etc/group ++ ++ cp -a -- /etc/ld.so.conf* "$initdir"/etc ++ ldconfig -r "$initdir" ++ dracut_kernel_post ++ ) ++ ++ # Make client root inside server root ++ ( ++ export initdir="$TESTDIR"/mnt/nfs/client ++ . "$basedir"/dracut-init.sh ++ inst_multiple sh shutdown poweroff stty cat ps ln ip \ ++ mount dmesg mkdir cp ping grep ls sort ++ for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do ++ [[ -f ${_terminfodir}/l/linux ]] && break ++ done ++ inst_multiple -o "${_terminfodir}"/l/linux ++ inst_simple /etc/os-release ++ inst ./client-init.sh /sbin/init ++ ( ++ cd "$initdir" ++ mkdir -p -- dev sys proc etc run ++ mkdir -p -- var/lib/nfs/rpc_pipefs ++ ) ++ inst /etc/nsswitch.conf /etc/nsswitch.conf ++ inst /etc/passwd /etc/passwd ++ inst /etc/group /etc/group ++ ++ inst_multiple rpc.idmapd /etc/idmapd.conf ++ inst_libdir_file 'libnfsidmap_nsswitch.so*' ++ inst_libdir_file 'libnfsidmap/*.so*' ++ inst_libdir_file 'libnfsidmap*.so*' ++ ++ _nsslibs=$(sed -e '/^#/d' -e 's/^.*://' -e 's/\[NOTFOUND=return\]//' -- /etc/nsswitch.conf \ ++ | tr -s '[:space:]' '\n' | sort -u | tr -s '[:space:]' '|') ++ _nsslibs=${_nsslibs#|} ++ _nsslibs=${_nsslibs%|} ++ ++ inst_libdir_file -n "$_nsslibs" 'libnss_*.so*' ++ ++ cp -a -- /etc/ld.so.conf* "$initdir"/etc ++ ldconfig -r "$initdir" ++ ) ++ ++ umount "$TESTDIR"/mnt ++ rm -fr -- "$TESTDIR"/mnt ++ ++ # Make an overlay with needed tools for the test harness ++ ( ++ export initdir="$TESTDIR"/overlay ++ . "$basedir"/dracut-init.sh ++ inst_multiple poweroff shutdown ++ inst_hook emergency 000 ./hard-off.sh ++ inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules ++ ) ++ ++ # Make server's dracut image ++ $basedir/dracut.sh -l -i "$TESTDIR"/overlay / \ ++ --no-early-microcode \ ++ -m "udev-rules base rootfs-block fs-lib debug kernel-modules watchdog" \ ++ -d "ipvlan macvlan af_packet piix ide-gd_mod ata_piix ext3 sd_mod nfsv2 nfsv3 nfsv4 nfs_acl nfs_layout_nfsv41_files nfsd e1000 i6300esb ib700wdt" \ ++ --no-hostonly-cmdline -N \ ++ -f "$TESTDIR"/initramfs.server "$KVERSION" || return 1 ++ ++ # Make client's dracut image ++ $basedir/dracut.sh -l -i "$TESTDIR"/overlay / \ ++ --no-early-microcode \ ++ -o "plymouth" \ ++ -a "debug" \ ++ -d "ipvlan macvlan af_packet piix sd_mod sr_mod ata_piix ide-gd_mod e1000 nfsv2 nfsv3 nfsv4 nfs_acl nfs_layout_nfsv41_files sunrpc i6300esb ib700wdt" \ ++ --no-hostonly-cmdline -N \ ++ -f "$TESTDIR"/initramfs.testing "$KVERSION" || return 1 ++} ++ ++kill_server() { ++ if [[ -s "$TESTDIR"/server.pid ]]; then ++ kill -TERM -- $(cat "$TESTDIR"/server.pid) ++ rm -f -- "$TESTDIR"/server.pid ++ fi ++} ++ ++test_cleanup() { ++ kill_server ++} ++ ++. "$testdir"/test-functions + diff --git a/SOURCES/0044.patch b/SOURCES/0044.patch new file mode 100644 index 0000000..b2c4f7f --- /dev/null +++ b/SOURCES/0044.patch @@ -0,0 +1,53 @@ +From 3b89c398895abe5fc62e3c9240718310222925ef Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Mon, 10 Jun 2019 16:04:33 +0200 +Subject: [PATCH] test/IFCFG: make sure the network-legacy plugin is being used + +If the network-manager plugin is used instead, it wouldn't write out +ifcfg files and we wouldn't have anything to check. + +While at that, also enable the test. + +(cherry picked from commit 2b1b3bcdcb0ddaa18337f18da515adb6284df0ab) +--- + .travis.yml | 1 + + README.md | 1 + + test/TEST-60-IFCFG/test.sh | 2 +- + 3 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/.travis.yml b/.travis.yml +index 364078cf..37002e9a 100644 +--- a/.travis.yml ++++ b/.travis.yml +@@ -11,6 +11,7 @@ env: + - IMAGE=latest TESTS=50 + - IMAGE=latest TESTS=30 + - IMAGE=latest TESTS=31 ++ - IMAGE=latest TESTS=60 + - IMAGE=latest TESTS=70 + - IMAGE=latest TESTS=99 + - IMAGE=latest TESTS=02 +diff --git a/README.md b/README.md +index 36ae7e1b..530f1c1b 100644 +--- a/README.md ++++ b/README.md +@@ -27,4 +27,5 @@ dracut is an initramfs infrastructure. + - Test 31: [![Test 31](https://ci.centos.org/job/dracut-matrix-master/TESTS=31,label=dracut-ci-slave01/badge/icon)](https://ci.centos.org/job/dracut-matrix-master/TESTS=31,label=dracut-ci-slave01/) + - Test 40: [![Test 40](https://ci.centos.org/job/dracut-matrix-master/TESTS=40,label=dracut-ci-slave01/badge/icon)](https://ci.centos.org/job/dracut-matrix-master/TESTS=40,label=dracut-ci-slave01/) + - Test 50: [![Test 50](https://ci.centos.org/job/dracut-matrix-master/TESTS=50,label=dracut-ci-slave01/badge/icon)](https://ci.centos.org/job/dracut-matrix-master/TESTS=50,label=dracut-ci-slave01/) ++- Test 60: [![Test 60](https://ci.centos.org/job/dracut-matrix-master/TESTS=60,label=dracut-ci-slave01/badge/icon)](https://ci.centos.org/job/dracut-matrix-master/TESTS=60,label=dracut-ci-slave01/) + - Test 70: [![Test 70](https://ci.centos.org/job/dracut-matrix-master/TESTS=70,label=dracut-ci-slave01/badge/icon)](https://ci.centos.org/job/dracut-matrix-master/TESTS=70,label=dracut-ci-slave01/) +diff --git a/test/TEST-60-IFCFG/test.sh b/test/TEST-60-IFCFG/test.sh +index 8c11a7d3..8e8bd982 100755 +--- a/test/TEST-60-IFCFG/test.sh ++++ b/test/TEST-60-IFCFG/test.sh +@@ -316,7 +316,7 @@ test_setup() { + $basedir/dracut.sh -l -i "$TESTDIR"/overlay / \ + --no-early-microcode \ + -o "plymouth" \ +- -a "debug" \ ++ -a "debug network-legacy" \ + -d "ipvlan macvlan af_packet piix sd_mod sr_mod ata_piix ide-gd_mod e1000 nfsv2 nfsv3 nfsv4 nfs_acl nfs_layout_nfsv41_files sunrpc i6300esb ib700wdt" \ + --no-hostonly-cmdline -N \ + -f "$TESTDIR"/initramfs.testing "$KVERSION" || return 1 + diff --git a/SOURCES/0045.patch b/SOURCES/0045.patch new file mode 100644 index 0000000..2c2ccca --- /dev/null +++ b/SOURCES/0045.patch @@ -0,0 +1,83 @@ +From 15ff303dde65e97ba224a9f2cc6275cbaafee52c Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Mon, 10 Jun 2019 16:05:23 +0200 +Subject: [PATCH] test/BONDBRIDGETEAMVLAN: don't assert against ifcfg files + +The network-manager module writes keyfiles instead of ifcfg files. Just +check whether the configuration got actually applied correctly. + +(cherry picked from commit 9dfd73bcbd899d8da4bc680fa8b3326c47b939bd) +--- + test/TEST-70-BONDBRIDGETEAMVLAN/client-init.sh | 6 +----- + test/TEST-70-BONDBRIDGETEAMVLAN/test.sh | 12 ++++++------ + 2 files changed, 7 insertions(+), 11 deletions(-) + +diff --git a/test/TEST-70-BONDBRIDGETEAMVLAN/client-init.sh b/test/TEST-70-BONDBRIDGETEAMVLAN/client-init.sh +index 8c33ff0f..083e0f59 100755 +--- a/test/TEST-70-BONDBRIDGETEAMVLAN/client-init.sh ++++ b/test/TEST-70-BONDBRIDGETEAMVLAN/client-init.sh +@@ -10,11 +10,7 @@ echo "made it to the rootfs! Powering down." + + ( + echo OK +- ip -o -4 address show scope global | while read n if rest; do echo $if;done | sort +- for i in /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-*; do +- echo $i +- grep -v 'UUID=' $i +- done ++ ip -o -4 address show scope global |sed -n 's/^[^:]*: \([^ ]*\) *\(.*\) scope.*/\1 \2/p' |sort + echo EOF + ) > /dev/sda + +diff --git a/test/TEST-70-BONDBRIDGETEAMVLAN/test.sh b/test/TEST-70-BONDBRIDGETEAMVLAN/test.sh +index 5618baee..b6dd080c 100755 +--- a/test/TEST-70-BONDBRIDGETEAMVLAN/test.sh ++++ b/test/TEST-70-BONDBRIDGETEAMVLAN/test.sh +@@ -112,8 +112,8 @@ client_test() { + done + } < "$TESTDIR"/client.img || return 1 + +- if [[ "$check" != "$CONF" ]]; then +- echo "Expected: '$check'" ++ if [[ ! "$CONF" =~ ^$check$ ]]; then ++ echo "Expected: /^$check\$/" + echo + echo + echo "Got: '$CONF'" +@@ -150,7 +150,7 @@ ip=192.168.57.104::192.168.57.1:24:test:ens5.0004:none + rd.neednet=1 + root=nfs:192.168.50.1:/nfs/client bootdev=ens3 + " \ +- 'ens3 ens5.0004 ens5.3 vlan0001 vlan2 /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens3 # Generated by dracut initrd NAME="ens3" DEVICE="ens3" ONBOOT=yes NETBOOT=yes IPV6INIT=yes BOOTPROTO=dhcp TYPE=Ethernet /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens5.0004 # Generated by dracut initrd NAME="ens5.0004" ONBOOT=yes NETBOOT=yes BOOTPROTO=none IPADDR="192.168.57.104" PREFIX="24" GATEWAY="192.168.57.1" TYPE=Vlan DEVICE="ens5.0004" VLAN=yes PHYSDEV="ens5" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens5.3 # Generated by dracut initrd NAME="ens5.3" ONBOOT=yes NETBOOT=yes BOOTPROTO=none IPADDR="192.168.56.103" PREFIX="24" GATEWAY="192.168.56.1" TYPE=Vlan DEVICE="ens5.3" VLAN=yes PHYSDEV="ens5" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-vlan0001 # Generated by dracut initrd NAME="vlan0001" ONBOOT=yes NETBOOT=yes BOOTPROTO=none IPADDR="192.168.54.101" PREFIX="24" GATEWAY="192.168.54.1" TYPE=Vlan DEVICE="vlan0001" VLAN=yes PHYSDEV="ens5" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-vlan2 # Generated by dracut initrd NAME="vlan2" ONBOOT=yes NETBOOT=yes BOOTPROTO=none IPADDR="192.168.55.102" PREFIX="24" GATEWAY="192.168.55.1" TYPE=Vlan DEVICE="vlan2" VLAN=yes PHYSDEV="ens5" EOF ' \ ++ 'ens3 inet 192\.168\.50\.[0-9]*/24 brd 192\.168\.50\.255 ens5\.0004 inet 192\.168\.57\.104/24 brd 192\.168\.57\.255 ens5\.3 inet 192\.168\.56\.103/24 brd 192\.168\.56\.255 vlan0001 inet 192\.168\.54\.101/24 brd 192\.168\.54\.255 vlan2 inet 192\.168\.55\.102/24 brd 192\.168\.55\.255 EOF ' \ + || return 1 + + client_test "Multiple Bonds" \ +@@ -163,7 +163,7 @@ ip=bond1:dhcp + rd.neednet=1 + root=nfs:192.168.50.1:/nfs/client bootdev=bond0 + " \ +- 'bond0 bond1 /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-bond0 # Generated by dracut initrd NAME="bond0" DEVICE="bond0" ONBOOT=yes NETBOOT=yes IPV6INIT=yes BOOTPROTO=dhcp BONDING_OPTS="" NAME="bond0" TYPE=Bond /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-bond1 # Generated by dracut initrd NAME="bond1" DEVICE="bond1" ONBOOT=yes NETBOOT=yes IPV6INIT=yes BOOTPROTO=dhcp BONDING_OPTS="" NAME="bond1" TYPE=Bond /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens4 # Generated by dracut initrd NAME="ens4" TYPE=Ethernet ONBOOT=yes NETBOOT=yes SLAVE=yes MASTER="bond0" DEVICE="ens4" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens5 # Generated by dracut initrd NAME="ens5" TYPE=Ethernet ONBOOT=yes NETBOOT=yes SLAVE=yes MASTER="bond0" DEVICE="ens5" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens6 # Generated by dracut initrd NAME="ens6" TYPE=Ethernet ONBOOT=yes NETBOOT=yes SLAVE=yes MASTER="bond1" DEVICE="ens6" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens7 # Generated by dracut initrd NAME="ens7" TYPE=Ethernet ONBOOT=yes NETBOOT=yes SLAVE=yes MASTER="bond1" DEVICE="ens7" EOF ' \ ++ 'bond0 inet 192\.168\.50\.[0-9]*/24 brd 192\.168\.50\.255 bond1 inet 192\.168\.51\.[0-9]*/24 brd 192\.168\.51\.255 EOF ' \ + || return 1 + + client_test "Multiple Bridges" \ +@@ -176,7 +176,7 @@ ip=br1:dhcp + rd.neednet=1 + root=nfs:192.168.50.1:/nfs/client bootdev=br0 + " \ +- 'br0 br1 /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-br0 # Generated by dracut initrd NAME="br0" DEVICE="br0" ONBOOT=yes NETBOOT=yes IPV6INIT=yes BOOTPROTO=dhcp TYPE=Bridge NAME="br0" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-br1 # Generated by dracut initrd NAME="br1" DEVICE="br1" ONBOOT=yes NETBOOT=yes IPV6INIT=yes BOOTPROTO=dhcp TYPE=Bridge NAME="br1" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens4 # Generated by dracut initrd NAME="ens4" TYPE=Ethernet ONBOOT=yes NETBOOT=yes BRIDGE="br0" DEVICE="ens4" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens5 # Generated by dracut initrd NAME="ens5" TYPE=Ethernet ONBOOT=yes NETBOOT=yes BRIDGE="br0" DEVICE="ens5" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens6 # Generated by dracut initrd NAME="ens6" TYPE=Ethernet ONBOOT=yes NETBOOT=yes BRIDGE="br1" DEVICE="ens6" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens7 # Generated by dracut initrd NAME="ens7" TYPE=Ethernet ONBOOT=yes NETBOOT=yes BRIDGE="br1" DEVICE="ens7" EOF ' \ ++ 'br0 inet 192\.168\.50\.[0-9]*/24 brd 192\.168\.50\.255 br1 inet 192\.168\.51\.[0-9]*/24 brd 192\.168\.51\.255 EOF ' \ + || return 1 + + kill_server +@@ -260,7 +260,7 @@ test_setup() { + export initdir="$TESTDIR"/mnt/nfs/client + . "$basedir"/dracut-init.sh + inst_multiple sh shutdown poweroff stty cat ps ln ip \ +- mount dmesg mkdir cp ping grep ls sort ++ mount dmesg mkdir cp ping grep ls sort sed + for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do + [[ -f ${_terminfodir}/l/linux ]] && break + done + diff --git a/SOURCES/0046.patch b/SOURCES/0046.patch new file mode 100644 index 0000000..0a30c85 --- /dev/null +++ b/SOURCES/0046.patch @@ -0,0 +1,37 @@ +From 96976e84e2c8544ab32026f05da8a35b9c48b2e5 Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Mon, 10 Jun 2019 16:05:49 +0200 +Subject: [PATCH] test/MULTINIC: correctly note activated devices when using + network-manager + +The .did-setup files are not there. What is there is the NetworkManager +connection files. + +(cherry picked from commit 393fb1ac05ec3386a07d885e99985a647634803e) +--- + test/TEST-50-MULTINIC/client-init.sh | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/test/TEST-50-MULTINIC/client-init.sh b/test/TEST-50-MULTINIC/client-init.sh +index 529379f0..7099dcf3 100755 +--- a/test/TEST-50-MULTINIC/client-init.sh ++++ b/test/TEST-50-MULTINIC/client-init.sh +@@ -105,7 +105,17 @@ export TERM=linux + export PS1='initramfs-test:\w\$ ' + stty sane + echo "made it to the rootfs! Powering down." ++for i in /sys/class/net/*/ ++do ++ # booting with network-manager module ++ state=/run/NetworkManager/devices/$(cat $i/ifindex) ++ grep -q connection-uuid= $state 2>/dev/null || continue ++ i=${i##*/} ++ ip link show $i |grep -q master && continue ++ IFACES+="$i " ++done + for i in /run/initramfs/net.*.did-setup; do ++ # booting with network-legacy module + [ -f "$i" ] || continue + strglobin "$i" ":*:*:*:*:" && continue + i=${i%.did-setup} + diff --git a/SOURCES/0047.patch b/SOURCES/0047.patch new file mode 100644 index 0000000..e30ed6a --- /dev/null +++ b/SOURCES/0047.patch @@ -0,0 +1,115 @@ +From 08961eef2ad09e4ce38ee034baf4e8c2b3934cd1 Mon Sep 17 00:00:00 2001 +From: Benjamin Marzinski +Date: Tue, 3 Sep 2019 10:44:36 -0500 +Subject: [PATCH] modules.d: fix udev rules detection of multipath devices + +Starting with the 0.7.7 release of the multipath tools, the multipath +udev rules always set a value in ENV{DM_MULTIPATH_DEVICE_PATH} for any +device that multipath scans. A value of 0 means that the device is not +claimed by multipath, and a value of 1 means that it is. Because of +this, udev rules that check ENV{DM_MULTIPATH_DEVICE_PATH}=="?*" will +always return True, and act as if every scanned device is claimed by +multipath. Checking ENV{DM_MULTIPATH_DEVICE_PATH}=="1" will work +correctly for both the old and new versions of the multipath tools. +--- + modules.d/90dm/59-persistent-storage-dm.rules | 2 +- + modules.d/90dmraid/61-dmraid-imsm.rules | 2 +- + modules.d/90lvm/64-lvm.rules | 2 +- + modules.d/90mdraid/59-persistent-storage-md.rules | 2 +- + modules.d/90mdraid/65-md-incremental-imsm.rules | 2 +- + modules.d/95udev-rules/59-persistent-storage.rules | 2 +- + modules.d/95udev-rules/61-persistent-storage.rules | 2 +- + 7 files changed, 7 insertions(+), 7 deletions(-) + +diff --git a/modules.d/90dm/59-persistent-storage-dm.rules b/modules.d/90dm/59-persistent-storage-dm.rules +index 73b09376..2be11227 100644 +--- a/modules.d/90dm/59-persistent-storage-dm.rules ++++ b/modules.d/90dm/59-persistent-storage-dm.rules +@@ -1,7 +1,7 @@ + SUBSYSTEM!="block", GOTO="dm_end" + ACTION!="add|change", GOTO="dm_end" + # Also don't process disks that are slated to be a multipath device +-ENV{DM_MULTIPATH_DEVICE_PATH}=="?*", GOTO="dm_end" ++ENV{DM_MULTIPATH_DEVICE_PATH}=="1", GOTO="dm_end" + + KERNEL!="dm-[0-9]*", GOTO="dm_end" + ACTION=="add", GOTO="dm_end" +diff --git a/modules.d/90dmraid/61-dmraid-imsm.rules b/modules.d/90dmraid/61-dmraid-imsm.rules +index 72267d3c..8a6b215e 100644 +--- a/modules.d/90dmraid/61-dmraid-imsm.rules ++++ b/modules.d/90dmraid/61-dmraid-imsm.rules +@@ -5,7 +5,7 @@ + SUBSYSTEM!="block", GOTO="dm_end" + ACTION!="add|change", GOTO="dm_end" + # Also don't process disks that are slated to be a multipath device +-ENV{DM_MULTIPATH_DEVICE_PATH}=="?*", GOTO="dm_end" ++ENV{DM_MULTIPATH_DEVICE_PATH}=="1", GOTO="dm_end" + + ENV{ID_FS_TYPE}=="linux_raid_member", GOTO="dm_end" + +diff --git a/modules.d/90lvm/64-lvm.rules b/modules.d/90lvm/64-lvm.rules +index 3ce0c1f6..65f65249 100644 +--- a/modules.d/90lvm/64-lvm.rules ++++ b/modules.d/90lvm/64-lvm.rules +@@ -7,7 +7,7 @@ + SUBSYSTEM!="block", GOTO="lvm_end" + ACTION!="add|change", GOTO="lvm_end" + # Also don't process disks that are slated to be a multipath device +-ENV{DM_MULTIPATH_DEVICE_PATH}=="?*", GOTO="lvm_end" ++ENV{DM_MULTIPATH_DEVICE_PATH}=="1", GOTO="lvm_end" + KERNEL=="dm-[0-9]*", ACTION=="add", GOTO="lvm_end" + ENV{ID_FS_TYPE}!="LVM?_member", GOTO="lvm_end" + +diff --git a/modules.d/90mdraid/59-persistent-storage-md.rules b/modules.d/90mdraid/59-persistent-storage-md.rules +index 6ef858aa..96b10108 100644 +--- a/modules.d/90mdraid/59-persistent-storage-md.rules ++++ b/modules.d/90mdraid/59-persistent-storage-md.rules +@@ -1,7 +1,7 @@ + SUBSYSTEM!="block", GOTO="md_end" + ACTION!="add|change", GOTO="md_end" + # Also don't process disks that are slated to be a multipath device +-ENV{DM_MULTIPATH_DEVICE_PATH}=="?*", GOTO="md_end" ++ENV{DM_MULTIPATH_DEVICE_PATH}=="1", GOTO="md_end" + + KERNEL!="md[0-9]*|md_d[0-9]*|md/*", KERNEL!="md*", GOTO="md_end" + +diff --git a/modules.d/90mdraid/65-md-incremental-imsm.rules b/modules.d/90mdraid/65-md-incremental-imsm.rules +index d66dd012..52f5b195 100644 +--- a/modules.d/90mdraid/65-md-incremental-imsm.rules ++++ b/modules.d/90mdraid/65-md-incremental-imsm.rules +@@ -9,7 +9,7 @@ KERNEL=="md*", ENV{ID_FS_TYPE}!="linux_raid_member", GOTO="md_end" + KERNEL=="md*", ACTION!="change", GOTO="md_end" + + # Also don't process disks that are slated to be a multipath device +-ENV{DM_MULTIPATH_DEVICE_PATH}=="?*", GOTO="md_end" ++ENV{DM_MULTIPATH_DEVICE_PATH}=="1", GOTO="md_end" + + ENV{ID_FS_TYPE}=="ddf_raid_member|isw_raid_member|linux_raid_member", GOTO="md_try" + GOTO="md_end" +diff --git a/modules.d/95udev-rules/59-persistent-storage.rules b/modules.d/95udev-rules/59-persistent-storage.rules +index 47ff6edd..8d8650f7 100644 +--- a/modules.d/95udev-rules/59-persistent-storage.rules ++++ b/modules.d/95udev-rules/59-persistent-storage.rules +@@ -1,7 +1,7 @@ + SUBSYSTEM!="block", GOTO="ps_end" + ACTION!="add|change", GOTO="ps_end" + # Also don't process disks that are slated to be a multipath device +-ENV{DM_MULTIPATH_DEVICE_PATH}=="?*", GOTO="ps_end" ++ENV{DM_MULTIPATH_DEVICE_PATH}=="1", GOTO="ps_end" + + KERNEL=="cciss[0-9]*", IMPORT BLKID + KERNEL=="nbd[0-9]*", IMPORT BLKID +diff --git a/modules.d/95udev-rules/61-persistent-storage.rules b/modules.d/95udev-rules/61-persistent-storage.rules +index 37148b07..895ecebd 100644 +--- a/modules.d/95udev-rules/61-persistent-storage.rules ++++ b/modules.d/95udev-rules/61-persistent-storage.rules +@@ -1,7 +1,7 @@ + SUBSYSTEM!="block", GOTO="pss_end" + ACTION!="add|change", GOTO="pss_end" + # Also don't process disks that are slated to be a multipath device +-ENV{DM_MULTIPATH_DEVICE_PATH}=="?*", GOTO="pss_end" ++ENV{DM_MULTIPATH_DEVICE_PATH}=="1", GOTO="pss_end" + + ACTION=="change", KERNEL=="dm-[0-9]*", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}!="1", GOTO="do_pss" + KERNEL=="cciss[0-9]*", GOTO="do_pss" + diff --git a/SOURCES/0048.patch b/SOURCES/0048.patch new file mode 100644 index 0000000..1dd087a --- /dev/null +++ b/SOURCES/0048.patch @@ -0,0 +1,43 @@ +From b59ae228851713f645751742136e34b854b0712a Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 10 Nov 2016 13:57:26 +0100 +Subject: [PATCH] test/test-rpms.txt: add list of rpms to install + +(cherry picked from commit f432d367fc4fa7558761cb9bb4229e6c027bfa31) +--- + test/test-rpms.txt | 26 ++++++++++++++++++++++++++ + 1 file changed, 26 insertions(+) + +diff --git a/test/test-rpms.txt b/test/test-rpms.txt +new file mode 100644 +index 00000000..1723d8e9 +--- /dev/null ++++ b/test/test-rpms.txt +@@ -0,0 +1,26 @@ ++dash ++bridge-utils ++asciidoc ++mdadm ++lvm2 ++dmraid ++cryptsetup ++nfs-utils ++nbd ++dhcp-server ++scsi-target-utils ++iscsi-initiator-utils ++net-tools ++strace ++syslinux ++python-imgcreate ++genisoimage ++btrfs-progs ++bridge-utils ++kmod-devel ++gcc ++bzip2 ++xz ++tar ++wget ++rpm-build + diff --git a/SOURCES/0049.patch b/SOURCES/0049.patch new file mode 100644 index 0000000..e23f5fd --- /dev/null +++ b/SOURCES/0049.patch @@ -0,0 +1,23 @@ +From 4ef5cdc120bdbb348345c964a19affbb3ca1fa32 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Fri, 11 Nov 2016 11:40:58 +0100 +Subject: [PATCH] test/test-rpms.txt: add gzip + +(cherry picked from commit 7b4173d698be5163da1e5b5b52bafd2facba4db5) +--- + test/test-rpms.txt | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/test/test-rpms.txt b/test/test-rpms.txt +index 1723d8e9..10596da7 100644 +--- a/test/test-rpms.txt ++++ b/test/test-rpms.txt +@@ -19,6 +19,7 @@ btrfs-progs + bridge-utils + kmod-devel + gcc ++gzip + bzip2 + xz + tar + diff --git a/SOURCES/0050.patch b/SOURCES/0050.patch new file mode 100644 index 0000000..413d8b7 --- /dev/null +++ b/SOURCES/0050.patch @@ -0,0 +1,23 @@ +From fe44aa1b14f427245bdfb2026f2211a19b52f5e3 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Fri, 11 Nov 2016 12:34:00 +0100 +Subject: [PATCH] test-rpms.txt: add dhcp + +(cherry picked from commit a081e072d894c91fcf037e267cb6793c4b0356c4) +--- + test/test-rpms.txt | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/test/test-rpms.txt b/test/test-rpms.txt +index 10596da7..95376bd2 100644 +--- a/test/test-rpms.txt ++++ b/test/test-rpms.txt +@@ -8,6 +8,7 @@ cryptsetup + nfs-utils + nbd + dhcp-server ++dhcp + scsi-target-utils + iscsi-initiator-utils + net-tools + diff --git a/SOURCES/0051.patch b/SOURCES/0051.patch new file mode 100644 index 0000000..158b434 --- /dev/null +++ b/SOURCES/0051.patch @@ -0,0 +1,19 @@ +From 81babdedec8c6f7b23bbf0e3418126c4f9e5e15f Mon Sep 17 00:00:00 2001 +From: Frantisek Sumsal +Date: Tue, 10 Sep 2019 16:46:55 +0200 +Subject: [PATCH] test-rpms.txt: add util-linux into the dependency list + +--- + test/test-rpms.txt | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/test/test-rpms.txt b/test/test-rpms.txt +index 95376bd2..02577c8a 100644 +--- a/test/test-rpms.txt ++++ b/test/test-rpms.txt +@@ -26,3 +26,4 @@ xz + tar + wget + rpm-build ++util-linux + diff --git a/SOURCES/0052.patch b/SOURCES/0052.patch new file mode 100644 index 0000000..5a338e0 --- /dev/null +++ b/SOURCES/0052.patch @@ -0,0 +1,33 @@ +From 7843bc52777683f6a4ef953d8dde7171ff3b911c Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Wed, 24 Jul 2019 16:45:19 +0200 +Subject: [PATCH] [RHEL] network: default to network-legacy even in presence of + nm-initrd-generator + +In RHEL 8.2, NetworkManager will ship with the nm-initrd-generator, but +before the install bits fall into place we want to default to network-legacy. + +This unblocks the enablement of the NetworkManager bits and is intended +to be reverted later on. +--- + modules.d/40network/module-setup.sh | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh +index 8e2a74a3..bf252eb7 100755 +--- a/modules.d/40network/module-setup.sh ++++ b/modules.d/40network/module-setup.sh +@@ -8,9 +8,9 @@ check() { + # called by dracut + depends() { + echo -n "kernel-network-modules " +- if ! dracut_module_included "network-legacy" && [ -x "/usr/libexec/nm-initrd-generator" ] ; then +- echo "network-manager" +- else ++ # RHEL 8.1: Default to network-legacy unless the user chose ++ # network-manager manually ++ if ! dracut_module_included "network-manager" ; then + echo "network-legacy" + fi + return 0 + diff --git a/SOURCES/0053.patch b/SOURCES/0053.patch new file mode 100644 index 0000000..ef9e265 --- /dev/null +++ b/SOURCES/0053.patch @@ -0,0 +1,32 @@ +From dcbc74b01bfb360eecadb8e59480472b86fe63d0 Mon Sep 17 00:00:00 2001 +From: Jonathan Lebon +Date: Tue, 29 Oct 2019 09:35:41 -0400 +Subject: [PATCH] 01fips: fix HMAC file path resolution + +There is a small regression in #343: when handling the 'separate boot +partition' case, we're checking for the kernel image in the wrong +location: `BOOT_IMAGE` is the `/boot`-relative path to the kernel image, +so `/boot/${BOOT_IMAGE_PATH}/${BOOT_IMAGE}` expands to e.g. +`/boot/mysubdir1/mysubdir2/mysubdir1/mysubdir2/vmlinuz...`. + +We should be using `BOOT_IMAGE_NAME` here instead (and in fact, the next +if-statement does this correctly, so it might've just been accidentally +left out of #343). +--- + modules.d/01fips/fips.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/01fips/fips.sh b/modules.d/01fips/fips.sh +index beaa692b..c3dbcf74 100755 +--- a/modules.d/01fips/fips.sh ++++ b/modules.d/01fips/fips.sh +@@ -118,7 +118,7 @@ do_fips() + + if [ -z "$BOOT_IMAGE_NAME" ]; then + BOOT_IMAGE_NAME="vmlinuz-${KERNEL}" +- elif ! [ -e "/boot/${BOOT_IMAGE_PATH}/${BOOT_IMAGE}" ]; then ++ elif ! [ -e "/boot/${BOOT_IMAGE_PATH}/${BOOT_IMAGE_NAME}" ]; then + #if /boot is not a separate partition BOOT_IMAGE might start with /boot + BOOT_IMAGE_PATH=${BOOT_IMAGE_PATH#"/boot"} + #on some achitectures BOOT_IMAGE does not contain path to kernel + diff --git a/SOURCES/0054.patch b/SOURCES/0054.patch new file mode 100644 index 0000000..489c715 --- /dev/null +++ b/SOURCES/0054.patch @@ -0,0 +1,33 @@ +From 14310ca42f06c2156ab5cefd05dbaa47ae3b054d Mon Sep 17 00:00:00 2001 +From: Jonathan Lebon +Date: Tue, 29 Oct 2019 16:47:34 -0400 +Subject: [PATCH] 01fips: run sha512hmac from directory HMAC file directory + +That way, the HMAC file can contain a relative path instead of an +absolute one. The issue is that right now the kernel RPM bakes the +`/boot/vmlinuz-${kver}` path into the HMAC file which poses an issue for +rpm-ostree systems (and any other system where the kernel isn't simply +in the top-level `/boot`. + +For now, we're hacking around this in rpm-ostree: +https://github.com/coreos/rpm-ostree/pull/1934 + +Though I'd like to propose the same change in the kernel spec file. +--- + modules.d/01fips/fips.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/01fips/fips.sh b/modules.d/01fips/fips.sh +index c3dbcf74..893143d0 100755 +--- a/modules.d/01fips/fips.sh ++++ b/modules.d/01fips/fips.sh +@@ -135,7 +135,7 @@ do_fips() + return 1 + fi + +- sha512hmac -c "${BOOT_IMAGE_HMAC}" || return 1 ++ (cd "${BOOT_IMAGE_HMAC%/*}" && sha512hmac -c "${BOOT_IMAGE_HMAC}") || return 1 + fi + + info "All initrd crypto checks done" + diff --git a/SOURCES/0055.patch b/SOURCES/0055.patch new file mode 100644 index 0000000..2d59629 --- /dev/null +++ b/SOURCES/0055.patch @@ -0,0 +1,26 @@ +From 89dcbbe92f008f6c4ebccfedf09d32bab4a575e5 Mon Sep 17 00:00:00 2001 +From: Jonathan Lebon +Date: Tue, 29 Oct 2019 16:53:00 -0400 +Subject: [PATCH] 01fips: add / in BOOT_IMAGE_HMAC filename for clarity + +It's already the case the `BOOT_IMAGE_PATH` today, in the non-empty +case, includes a trailing `/`, but let's add it to the path we build +here too to make it more obvious. +--- + modules.d/01fips/fips.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/01fips/fips.sh b/modules.d/01fips/fips.sh +index 893143d0..de2755b0 100755 +--- a/modules.d/01fips/fips.sh ++++ b/modules.d/01fips/fips.sh +@@ -129,7 +129,7 @@ do_fips() + fi + fi + +- BOOT_IMAGE_HMAC="/boot/${BOOT_IMAGE_PATH}.${BOOT_IMAGE_NAME}.hmac" ++ BOOT_IMAGE_HMAC="/boot/${BOOT_IMAGE_PATH}/.${BOOT_IMAGE_NAME}.hmac" + if ! [ -e "${BOOT_IMAGE_HMAC}" ]; then + warn "${BOOT_IMAGE_HMAC} does not exist" + return 1 + diff --git a/SOURCES/0056.patch b/SOURCES/0056.patch new file mode 100644 index 0000000..90ac5a9 --- /dev/null +++ b/SOURCES/0056.patch @@ -0,0 +1,34 @@ +From 9e8f172dc01f7e013bb5d302ef6c90e2dc6b30c8 Mon Sep 17 00:00:00 2001 +From: Jonathan Lebon +Date: Tue, 29 Oct 2019 16:54:10 -0400 +Subject: [PATCH] 01fips: trim off GRUB boot device from BOOT_IMAGE + +E.g. in RHCOS, the `BOOT_IMAGE` from the cmdline is: + +(hd0,gpt1)/ostree/rhcos-e493371e5ee8407889029ec979955a2b86fd7e3cae5a0591b9db1cd248d966e8/vmlinuz-4.18.0-146.el8.x86_64 + +Which of course is a GRUB thing, not an actual pathname we'll be able to +resolve. In fact, we can simply scrap it off from the variable. Our code +is already able to handle both cases: whether the device refers to a +separate boot partition, or just the root filesystem with a regular +`/boot` directory. +--- + modules.d/01fips/fips.sh | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/modules.d/01fips/fips.sh b/modules.d/01fips/fips.sh +index de2755b0..559952ca 100755 +--- a/modules.d/01fips/fips.sh ++++ b/modules.d/01fips/fips.sh +@@ -113,6 +113,10 @@ do_fips() + do_rhevh_check /run/initramfs/live/isolinux/vmlinuz0 || return 1 + else + BOOT_IMAGE="$(getarg BOOT_IMAGE)" ++ ++ # Trim off any leading GRUB boot device (e.g. ($root) ) ++ BOOT_IMAGE="$(echo "${BOOT_IMAGE}" | sed 's/^(.*)//')" ++ + BOOT_IMAGE_NAME="${BOOT_IMAGE##*/}" + BOOT_IMAGE_PATH="${BOOT_IMAGE%${BOOT_IMAGE_NAME}}" + + diff --git a/SOURCES/0057.patch b/SOURCES/0057.patch new file mode 100644 index 0000000..0729b82 --- /dev/null +++ b/SOURCES/0057.patch @@ -0,0 +1,25 @@ +From 346e57c1b6af4e2cfdbaae64941f2f3b8454a944 Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn +Date: Fri, 29 Nov 2019 13:29:23 +0100 +Subject: [PATCH] always include sg module + +RHEL-only +Resolves:#1579763 +--- + modules.d/00systemd/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/00systemd/module-setup.sh b/modules.d/00systemd/module-setup.sh +index 1ed4b34f..ed177826 100755 +--- a/modules.d/00systemd/module-setup.sh ++++ b/modules.d/00systemd/module-setup.sh +@@ -18,7 +18,7 @@ depends() { + } + + installkernel() { +- hostonly='' instmods autofs4 ipv6 algif_hash hmac sha256 ++ hostonly='' instmods autofs4 ipv6 algif_hash hmac sha256 sg + instmods -s efivarfs + } + + diff --git a/SOURCES/0058.patch b/SOURCES/0058.patch new file mode 100644 index 0000000..728e07b --- /dev/null +++ b/SOURCES/0058.patch @@ -0,0 +1,44 @@ +From 8061a432844d1f780d9b18144def0faef0145c0c Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn +Date: Mon, 7 Oct 2019 16:48:09 +0200 +Subject: [PATCH] net-lib: check if addr exists before checking for dad state + +Before we check if dad is done we should first make sure, +that there is a link local address where we do the check. + +Due to this issue, on ipv6 only setups sometimes dhclient started +asking for ip address, before the link local address was present +and failed immediately. + +(cherry picked from commit daa49cc2216d6387541ef36e8427081f6b02f224) + +Resolves: #1765014 +--- + modules.d/40network/net-lib.sh | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index ad78d225..dcb53804 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -653,7 +653,8 @@ wait_for_ipv6_dad_link() { + timeout=$(($timeout*10)) + + while [ $cnt -lt $timeout ]; do +- [ -z "$(ip -6 addr show dev "$1" scope link tentative)" ] \ ++ [ -n "$(ip -6 addr show dev "$1" scope link)" ] \ ++ && [ -z "$(ip -6 addr show dev "$1" scope link tentative)" ] \ + && [ -n "$(ip -6 route list proto ra dev "$1" | grep ^default)" ] \ + && return 0 + [ -n "$(ip -6 addr show dev "$1" scope link dadfailed)" ] \ +@@ -671,7 +672,8 @@ wait_for_ipv6_dad() { + timeout=$(($timeout*10)) + + while [ $cnt -lt $timeout ]; do +- [ -z "$(ip -6 addr show dev "$1" tentative)" ] \ ++ [ -n "$(ip -6 addr show dev "$1")" ] \ ++ && [ -z "$(ip -6 addr show dev "$1" tentative)" ] \ + && [ -n "$(ip -6 route list proto ra dev "$1" | grep ^default)" ] \ + && return 0 + [ -n "$(ip -6 addr show dev "$1" dadfailed)" ] \ + diff --git a/SOURCES/0059.patch b/SOURCES/0059.patch new file mode 100644 index 0000000..625a662 --- /dev/null +++ b/SOURCES/0059.patch @@ -0,0 +1,58 @@ +From 2caaf8b9ba5b95983154bd641f0f493ff1562cc0 Mon Sep 17 00:00:00 2001 +From: Kairui Song +Date: Tue, 6 Aug 2019 15:39:31 +0800 +Subject: [PATCH] 99squash: Only start the cleaner on switch-root + +Currently it starts the cleaner early and do the clean up job if switch +root is called. It's better to just start the service only on switch +root to avoid any risk of service dependency failure and make is +simpler. + +Signed-off-by: Kairui Song +(cherry picked from commit 5d88809319049eb06e3472dcd11cca9c4557d8c2) + +Resolves: #1678248 +--- + modules.d/99squash/module-setup.sh | 3 ++- + modules.d/99squash/squash-mnt-clear.service | 11 ++++------- + 2 files changed, 6 insertions(+), 8 deletions(-) + +diff --git a/modules.d/99squash/module-setup.sh b/modules.d/99squash/module-setup.sh +index 935fd721..e7e9ed8e 100644 +--- a/modules.d/99squash/module-setup.sh ++++ b/modules.d/99squash/module-setup.sh +@@ -25,5 +25,6 @@ install() { + inst $moddir/init.sh /squash/init.sh + + inst "$moddir/squash-mnt-clear.service" "$systemdsystemunitdir/squash-mnt-clear.service" +- ln_r "$systemdsystemunitdir/squash-mnt-clear.service" "$systemdsystemunitdir/initrd.target.wants/squash-mnt-clear.service" ++ mkdir -p "$initdir$systemdsystemunitdir/initrd-switch-root.target.wants" ++ ln_r "$systemdsystemunitdir/squash-mnt-clear.service" "$systemdsystemunitdir/initrd-switch-root.target.wants/squash-mnt-clear.service" + } +diff --git a/modules.d/99squash/squash-mnt-clear.service b/modules.d/99squash/squash-mnt-clear.service +index f8d5db46..84441f60 100644 +--- a/modules.d/99squash/squash-mnt-clear.service ++++ b/modules.d/99squash/squash-mnt-clear.service +@@ -4,17 +4,14 @@ + [Unit] + Description=Cleanup squashfs mounts when switch root + DefaultDependencies=no +-After=initrd.target +-After=dracut-initqueue.service dracut-pre-pivot.service +-Before=initrd-cleanup.service ++Before=initrd-switch-root.service ++After=initrd-switch-root.target + ConditionPathExists=/squash/root +-Conflicts=initrd-switch-root.target +-IgnoreOnIsolate=true + + [Service] + Type=oneshot +-RemainAfterExit=yes ++RemainAfterExit=no + StandardInput=null + StandardOutput=syslog+console + StandardError=syslog+console +-ExecStop=/squash/clear-squash.sh ++ExecStart=/squash/clear-squash.sh + diff --git a/SOURCES/0060.patch b/SOURCES/0060.patch new file mode 100644 index 0000000..1160079 --- /dev/null +++ b/SOURCES/0060.patch @@ -0,0 +1,31 @@ +From ab679e91396a21489999c0acc9243415cb3235db Mon Sep 17 00:00:00 2001 +From: Colin Walters +Date: Tue, 7 Jan 2020 20:53:53 +0000 +Subject: [PATCH] modules/network-manager: Install `ip` + +We don't need `ip` but having it is *really* useful for people debugging +in an emergency shell. + +(cherry picked from commit 7fea85ce5f313445a260b5eb7bd7466217479d99) + +Resolves: #1784358 +--- + modules.d/35network-manager/module-setup.sh | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/modules.d/35network-manager/module-setup.sh b/modules.d/35network-manager/module-setup.sh +index 62aba3c6..d6d0f9ce 100755 +--- a/modules.d/35network-manager/module-setup.sh ++++ b/modules.d/35network-manager/module-setup.sh +@@ -26,7 +26,9 @@ install() { + + _nm_version=$(NetworkManager --version) + +- inst_multiple sed grep ++ # We don't need `ip` but having it is *really* useful for people debugging ++ # in an emergency shell. ++ inst_multiple ip sed grep + + inst NetworkManager + inst /usr/libexec/nm-initrd-generator + diff --git a/SOURCES/0061.patch b/SOURCES/0061.patch new file mode 100644 index 0000000..efbe84d --- /dev/null +++ b/SOURCES/0061.patch @@ -0,0 +1,31 @@ +From 7164155795f3f257cd119846de0b2a802a6a52c5 Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn +Date: Thu, 9 Jan 2020 10:49:52 +0100 +Subject: [PATCH] network-legacy/ifup: dhclient should be started in oneshot + mode + +since we handle the retries explicitly via rd.net.dhcp.retry + +Without -1 if user sets ip=dhcp6 and there is no dhcp on the network, +dhclient seems to wait indefinitely, ignoring rd.net.timeout.dhcp + +(cherry picked from commit 2181c80c91f05bfae5e50de2f502e363b0219bae) + +Resolves: #1787620 +--- + modules.d/35network-legacy/ifup.sh | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/modules.d/35network-legacy/ifup.sh b/modules.d/35network-legacy/ifup.sh +index b4f5bf10..bfb57ad5 100755 +--- a/modules.d/35network-legacy/ifup.sh ++++ b/modules.d/35network-legacy/ifup.sh +@@ -52,6 +52,7 @@ do_dhcp() { + dhclient "$@" \ + ${_timeout:+-timeout $_timeout} \ + -q \ ++ -1 \ + -cf /etc/dhclient.conf \ + -pf /tmp/dhclient.$netif.pid \ + -lf /tmp/dhclient.$netif.lease \ + diff --git a/SOURCES/0062.patch b/SOURCES/0062.patch new file mode 100644 index 0000000..f082cac --- /dev/null +++ b/SOURCES/0062.patch @@ -0,0 +1,26 @@ +From d20eb7b7b2a50f29ac02bd6b6d80113d495849ed Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn +Date: Wed, 8 Jan 2020 16:20:29 +0100 +Subject: [PATCH] network-legacy/ifup: fix typo when calling dhclient --timeout + +(cherry picked from commit 212043f94dde1693d777e933945138747537f12f) + +Resolves: #1787620 +--- + modules.d/35network-legacy/ifup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/35network-legacy/ifup.sh b/modules.d/35network-legacy/ifup.sh +index bfb57ad5..16b950be 100755 +--- a/modules.d/35network-legacy/ifup.sh ++++ b/modules.d/35network-legacy/ifup.sh +@@ -50,7 +50,7 @@ do_dhcp() { + while [ $_COUNT -lt $_DHCPRETRY ]; do + info "Starting dhcp for interface $netif" + dhclient "$@" \ +- ${_timeout:+-timeout $_timeout} \ ++ ${_timeout:+--timeout $_timeout} \ + -q \ + -1 \ + -cf /etc/dhclient.conf \ + diff --git a/SOURCES/0063.patch b/SOURCES/0063.patch new file mode 100644 index 0000000..54fb550 --- /dev/null +++ b/SOURCES/0063.patch @@ -0,0 +1,31 @@ +From 46a8b8e9e7f150c2a17d4adeacb25ccf003ec425 Mon Sep 17 00:00:00 2001 +From: Jonathan Lebon +Date: Tue, 21 Jan 2020 17:57:31 -0500 +Subject: [PATCH] network-legacy/ifup: nuke pid and lease files if dhclient + failed + +Otherwise we won't retry dhclient again on that interface. In +FCOS/RHCOS, we want to bake in `ip=dhcp,dhcp6` so we automatically try +getting a DHCPv6 lease if DHCPv4 failed. + +Related: https://bugzilla.redhat.com/show_bug.cgi?id=1793591 +(cherry picked from commit d0de58f23252a9da4a8badd71777e7c8418fa4b7) +--- + modules.d/35network-legacy/ifup.sh | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/modules.d/35network-legacy/ifup.sh b/modules.d/35network-legacy/ifup.sh +index 16b950be..dd18d70b 100755 +--- a/modules.d/35network-legacy/ifup.sh ++++ b/modules.d/35network-legacy/ifup.sh +@@ -62,6 +62,9 @@ do_dhcp() { + [ $_COUNT -lt $_DHCPRETRY ] && sleep 1 + done + warn "dhcp for interface $netif failed" ++ # nuke those files since we failed; we might retry dhcp again if it's e.g. ++ # `ip=dhcp,dhcp6` and we check for the PID file at the top ++ rm -f /tmp/dhclient.$netif.{pid,lease} + return 1 + } + + diff --git a/SOURCES/0064.patch b/SOURCES/0064.patch new file mode 100644 index 0000000..807d03f --- /dev/null +++ b/SOURCES/0064.patch @@ -0,0 +1,39 @@ +From 86d48f5c45d2d2c19cb575fa377763c069e57b8a Mon Sep 17 00:00:00 2001 +From: Ondrej Dubaj +Date: Thu, 29 Aug 2019 14:31:06 +0200 +Subject: [PATCH] added debug-shell to initrd in systemd version >= 240 + +--- + dracut.spec | 2 +- + modules.d/00systemd/module-setup.sh | 4 ++++ + 2 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/dracut.spec b/dracut.spec +index 92c7f7bf..0f7eb4bf 100644 +--- a/dracut.spec ++++ b/dracut.spec +@@ -88,7 +88,7 @@ Recommends: hardlink + Recommends: pigz + Recommends: kpartx + Requires: util-linux >= 2.21 +-Requires: systemd >= 219 ++Requires: systemd >= 239-23 + Requires: systemd-udev >= 219 + Requires: procps-ng + %else +diff --git a/modules.d/00systemd/module-setup.sh b/modules.d/00systemd/module-setup.sh +index ed177826..e4a3f323 100755 +--- a/modules.d/00systemd/module-setup.sh ++++ b/modules.d/00systemd/module-setup.sh +@@ -31,6 +31,10 @@ install() { + exit 1 + fi + ++ inst_multiple -o \ ++ $systemdutildir/system-generators/systemd-debug-generator \ ++ $systemdsystemunitdir/debug-shell.service ++ + inst_multiple -o \ + $systemdutildir/systemd \ + $systemdutildir/systemd-coredump \ + diff --git a/SOURCES/0065.patch b/SOURCES/0065.patch new file mode 100644 index 0000000..9796dec --- /dev/null +++ b/SOURCES/0065.patch @@ -0,0 +1,32 @@ +From 543b1cff3c84af062da4d27ba81a9d394f44e4b6 Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn +Date: Tue, 11 Feb 2020 14:14:20 +0100 +Subject: [PATCH] dhclient-script: ipv6 uses different variables for + nameservers + +new_domain_name_servers and new_domain_search is only provided vit IPv4 + +see: https://src.fedoraproject.org/rpms/dhcp/blob/HEAD/f/dhclient-script#_148 +(cherry picked from commit 962310483f473dbc8d71d70ba464d273b9808d31) + +Resolves: #1795276 +--- + modules.d/35network-legacy/dhclient-script.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/modules.d/35network-legacy/dhclient-script.sh b/modules.d/35network-legacy/dhclient-script.sh +index fc6ed0a3..f1a60005 100755 +--- a/modules.d/35network-legacy/dhclient-script.sh ++++ b/modules.d/35network-legacy/dhclient-script.sh +@@ -75,8 +75,8 @@ setup_interface() { + + setup_interface6() { + domain=$new_domain_name +- search=$(printf -- "$new_domain_search") +- namesrv=$new_domain_name_servers ++ search=$(printf -- "$new_dhcp6_domain_search") ++ namesrv=$new_dhcp6_name_servers + hostname=$new_host_name + [ -n "$new_dhcp_lease_time" ] && lease_time=$new_dhcp_lease_time + [ -n "$new_max_life" ] && lease_time=$new_max_life + diff --git a/SOURCES/0066.patch b/SOURCES/0066.patch new file mode 100644 index 0000000..6d9c266 --- /dev/null +++ b/SOURCES/0066.patch @@ -0,0 +1,36 @@ +From 3468310486d0da8d2a6c6bdcddc598b7b8ce5587 Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn +Date: Tue, 4 Feb 2020 14:18:01 +0100 +Subject: [PATCH] Revert "wait for IPv6 RA if using none/static IPv6 + assignment" + +This reverts commit c603419030136570b5944dc4620f62d07b9e82bb. + +wait_for_ipv6_dad_link is only called from dhclient script, +so the original intent "wait for IPv6 RA if using none/static IPv6 assignment" +does not seem to be correct. + +Anyway, this brings an issue on isolated networks, where you don't +have any routes outside. dhclient-script hangs on this check +and after it times out, dhclient is able to set the address normally. + +(cherry picked from commit 76f6566fd777e0ee20416061ecb795e8daef33e1) + +Resolves: #1795276 +--- + modules.d/40network/net-lib.sh | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index dcb53804..0f3ca6a8 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -655,7 +655,6 @@ wait_for_ipv6_dad_link() { + while [ $cnt -lt $timeout ]; do + [ -n "$(ip -6 addr show dev "$1" scope link)" ] \ + && [ -z "$(ip -6 addr show dev "$1" scope link tentative)" ] \ +- && [ -n "$(ip -6 route list proto ra dev "$1" | grep ^default)" ] \ + && return 0 + [ -n "$(ip -6 addr show dev "$1" scope link dadfailed)" ] \ + && return 1 + diff --git a/SOURCES/0067.patch b/SOURCES/0067.patch new file mode 100644 index 0000000..ccf1829 --- /dev/null +++ b/SOURCES/0067.patch @@ -0,0 +1,45 @@ +From 7b14ab060e50d0035e4c0b1979d49234aa8896b0 Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn +Date: Mon, 10 Feb 2020 14:03:30 +0100 +Subject: [PATCH] 40network: bump rd.net.timeout.carrier to 10 seconds + +On some devices kernel currently takes 5.2 seconds to detect carrier, +so let's make the default in dracut bit more sensible. + +See also https://bugzilla.redhat.com/show_bug.cgi?id=1772010 + +(cherry picked from commit 579fbb9fc4205dc216b9642238739d898d2ed02d) + +Resolves: #1798761 +--- + dracut.cmdline.7.asc | 2 +- + modules.d/40network/net-lib.sh | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc +index 3cee5a00..ab9a24ad 100644 +--- a/dracut.cmdline.7.asc ++++ b/dracut.cmdline.7.asc +@@ -645,7 +645,7 @@ NFS + Wait until IPv6 automatic addresses are assigned. Default is 40 seconds. + + **rd.net.timeout.carrier=**____:: +- Wait until carrier is recognized. Default is 5 seconds. ++ Wait until carrier is recognized. Default is 10 seconds. + + CIFS + ~~~ +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index 0f3ca6a8..6babcccf 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -717,7 +717,7 @@ iface_has_carrier() { + interface="/sys/class/net/$interface" + [ -d "$interface" ] || return 2 + local timeout="$(getargs rd.net.timeout.carrier=)" +- timeout=${timeout:-5} ++ timeout=${timeout:-10} + timeout=$(($timeout*10)) + + linkup "$1" + diff --git a/SOURCES/0068.patch b/SOURCES/0068.patch new file mode 100644 index 0000000..810417a --- /dev/null +++ b/SOURCES/0068.patch @@ -0,0 +1,37 @@ +From fa15223b70c04de0fdbd209a4bb1cb74876f7cfb Mon Sep 17 00:00:00 2001 +From: Jonathan Lebon +Date: Wed, 19 Feb 2020 11:11:32 -0500 +Subject: [PATCH] network-legacy/ifup: drop redundant if-statement + +No need to check that `$ret` is 0, we're already running inside an +if-statement block which checks this. + +(cherry picked from commit 7795fde44c54bfe753cc07999a4c2f9dd7e2820d) + +Resolves: #1807395 +--- + modules.d/35network-legacy/ifup.sh | 10 ++++------ + 1 file changed, 4 insertions(+), 6 deletions(-) + +diff --git a/modules.d/35network-legacy/ifup.sh b/modules.d/35network-legacy/ifup.sh +index dd18d70b..eb7d2eb4 100755 +--- a/modules.d/35network-legacy/ifup.sh ++++ b/modules.d/35network-legacy/ifup.sh +@@ -457,12 +457,10 @@ for p in $(getargs ip=); do + dhcp|on|any|dhcp6) + ;; + *) +- if [ $ret -eq 0 ]; then +- setup_net $netif +- source_hook initqueue/online $netif +- if [ -z "$manualup" ]; then +- /sbin/netroot $netif +- fi ++ setup_net $netif ++ source_hook initqueue/online $netif ++ if [ -z "$manualup" ]; then ++ /sbin/netroot $netif + fi + ;; + esac + diff --git a/SOURCES/0069.patch b/SOURCES/0069.patch new file mode 100644 index 0000000..82ee58a --- /dev/null +++ b/SOURCES/0069.patch @@ -0,0 +1,58 @@ +From d6d50a239eebf9da13a0d7892df00a0e725ef9d6 Mon Sep 17 00:00:00 2001 +From: Jonathan Lebon +Date: Wed, 19 Feb 2020 10:44:24 -0500 +Subject: [PATCH] network-legacy/ifup: fix ip=dhcp,dhcp6 setup_net logic + +Previously, we were doing `setup_net` from `ifup` for any setup that +wasn't DHCP, since those are already taken care of by `dhclient-script`. + +The issue is that the case-statement we use to detect this doesn't catch +options like `ip=dhcp,dhcp6`. + +Fix this by reworking the logic here to just check if a +`setup_net_$netif.sh` hook exists. If so, then we know that `setup_net` +will be called for this interface later. + +This was causing issues in RHCOS which now ships with `ip=dhcp,dhcp6` to +support IPv6 environments[1]. The code here would make us do `setup_net` +pre-emptively which IIUC would then cause the initqueue to finish +earlier even if we had more udev netif events to process. + +[1] https://github.com/coreos/coreos-assembler/pull/1067 + +Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1803926 +(cherry picked from commit 4985aa8c6e89451996e659a39fec7646e9e25f76) + +Cherry-picked from: 4985aa8c6e89451996e659a39fec7646e9e25f76 +Resolves: #1807395 +--- + modules.d/35network-legacy/ifup.sh | 11 +++++------ + 1 file changed, 5 insertions(+), 6 deletions(-) + +diff --git a/modules.d/35network-legacy/ifup.sh b/modules.d/35network-legacy/ifup.sh +index eb7d2eb4..61838741 100755 +--- a/modules.d/35network-legacy/ifup.sh ++++ b/modules.d/35network-legacy/ifup.sh +@@ -453,17 +453,16 @@ for p in $(getargs ip=); do + > /tmp/net.$(cat /sys/class/net/${netif}/address).up + fi + +- case $autoconf in +- dhcp|on|any|dhcp6) +- ;; +- *) ++ # and finally, finish interface set up if there isn't already a script ++ # to do so (which is the case in the dhcp path) ++ if [ ! -e $hookdir/initqueue/setup_net_$netif.sh ]; then + setup_net $netif + source_hook initqueue/online $netif + if [ -z "$manualup" ]; then + /sbin/netroot $netif + fi +- ;; +- esac ++ fi ++ + exit $ret + fi + done diff --git a/SPECS/dracut.spec b/SPECS/dracut.spec index 60f7728..1120af1 100644 --- a/SPECS/dracut.spec +++ b/SPECS/dracut.spec @@ -5,11 +5,11 @@ # strip the automatically generated dep here and instead co-own the # directory. %global __requires_exclude pkg-config -%define dist_free_release 27.git20190906 +%define dist_free_release 70.git20200228 Name: dracut Version: 049 -Release: %{dist_free_release}%{?dist}.1 +Release: %{dist_free_release}%{?dist} Summary: Initramfs generator using udev %if 0%{?fedora} || 0%{?rhel} @@ -58,6 +58,45 @@ Patch27: 0027.patch Patch28: 0028.patch Patch29: 0029.patch Patch30: 0030.patch +Patch31: 0031.patch +Patch32: 0032.patch +Patch33: 0033.patch +Patch34: 0034.patch +Patch35: 0035.patch +Patch36: 0036.patch +Patch37: 0037.patch +Patch38: 0038.patch +Patch39: 0039.patch +Patch40: 0040.patch +Patch41: 0041.patch +Patch42: 0042.patch +Patch43: 0043.patch +Patch44: 0044.patch +Patch45: 0045.patch +Patch46: 0046.patch +Patch47: 0047.patch +Patch48: 0048.patch +Patch49: 0049.patch +Patch50: 0050.patch +Patch51: 0051.patch +Patch52: 0052.patch +Patch53: 0053.patch +Patch54: 0054.patch +Patch55: 0055.patch +Patch56: 0056.patch +Patch57: 0057.patch +Patch58: 0058.patch +Patch59: 0059.patch +Patch60: 0060.patch +Patch61: 0061.patch +Patch62: 0062.patch +Patch63: 0063.patch +Patch64: 0064.patch +Patch65: 0065.patch +Patch66: 0066.patch +Patch67: 0067.patch +Patch68: 0068.patch +Patch69: 0069.patch Source1: https://www.gnu.org/licenses/lgpl-2.1.txt @@ -119,7 +158,7 @@ Recommends: hardlink Recommends: pigz Recommends: kpartx Requires: util-linux >= 2.21 -Requires: systemd >= 219 +Requires: systemd >= 239-23 Requires: systemd-udev >= 219 Requires: procps-ng %else @@ -511,9 +550,37 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne %endif %changelog -* Wed Nov 06 2019 Lukas Nykryn - 049-27.git20190906.1 +* Fri Feb 28 2020 Lukas Nykryn - 049-70.git20200228 +- network-legacy/ifup: fix ip=dhcp,dhcp6 setup_net logic + +* Tue Feb 11 2020 Lukas Nykryn - 049-68.git20200211 +- Revert "wait for IPv6 RA if using none/static IPv6 assignment" +- dhclient-script: ipv6 uses different variables for nameservers +- 40network: bump rd.net.timeout.carrier to 10 seconds + +* Wed Feb 05 2020 Lukas Nykryn - 049-65.git20200205 +- added debug-shell to initrd + +* Thu Jan 23 2020 Harald Hoyer - 049-64.git20200123 +- network-legacy/ifup: nuke pid and lease files if dhclient failed +Resolves: rhbz#1787620 + +* Tue Jan 14 2020 Lukas Nykryn - 049-63.git20200114 +- network-legacy/ifup: fix typo when calling dhclient --timeout +- network-legacy/ifup: dhclient should be started in oneshot mode +- modules/network-manager: Install `ip` + +* Fri Nov 29 2019 Lukas Nykryn - 049-60.git20191129 +- 99squash: Only start the cleaner on switch-root +- net-lib: check if addr exists before checking for dad state +- always include sg module + +* Thu Oct 31 2019 Lukas Nykryn - 049-57.git20191031 - various fixes to adapt to RHCOS and FCOS +* Tue Oct 01 2019 Lukas Nykryn - 049-53.git20191001 +- apply patches to allow enablement of nm-initrd-generator + * Fri Sep 06 2019 Lukas Nykryn - 049-27.git20190906 - modules.d: fix udev rules detection of multipath devices