diff --git a/.dracut.metadata b/.dracut.metadata new file mode 100644 index 0000000..491ba7f --- /dev/null +++ b/.dracut.metadata @@ -0,0 +1 @@ +b55aaf37ee1ab768877491530ba168b4bdf267ae SOURCES/dracut-033.tar.bz2 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..41b060f --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/dracut-033.tar.bz2 diff --git a/SOURCES/0001-dracut.sh-harden-host_modalias-reading.patch b/SOURCES/0001-dracut.sh-harden-host_modalias-reading.patch new file mode 100644 index 0000000..f0e196f --- /dev/null +++ b/SOURCES/0001-dracut.sh-harden-host_modalias-reading.patch @@ -0,0 +1,26 @@ +From ffecc452321bbef2c0e1efca09c2077775448141 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 13 Sep 2013 16:33:01 +0200 +Subject: [PATCH] dracut.sh: harden host_modalias reading + +Some weird PPC driver make their modulias unreadable + +$ cat /sys/devices/vio/4000/modalias +cat: /sys/devices/vio/4000/modalias: No such device +--- + dracut.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dracut.sh b/dracut.sh +index bd905e32..fd278466 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -921,7 +921,7 @@ if [[ $hostonly ]]; then + declare -A host_modalias + find /sys/devices/ -name modalias -print > "$initdir/.modalias" + while read m; do +- host_modalias["$(<"$m")"]=1 ++ modalias="$(<"$m")" && [[ $modalias ]] && host_modalias["$modalias"]=1 + done < "$initdir/.modalias" + rm -f -- "$initdir/.modalias" + diff --git a/SOURCES/0002-ifup-do-not-dhcp-on-network-interface-of-secondary-s.patch b/SOURCES/0002-ifup-do-not-dhcp-on-network-interface-of-secondary-s.patch new file mode 100644 index 0000000..e704f26 --- /dev/null +++ b/SOURCES/0002-ifup-do-not-dhcp-on-network-interface-of-secondary-s.patch @@ -0,0 +1,35 @@ +From da63c0de561ce9ed158cc2438a1cc5fbb38c3758 Mon Sep 17 00:00:00 2001 +From: WANG Chao <chaowang@redhat.com> +Date: Fri, 13 Sep 2013 22:28:44 +0800 +Subject: [PATCH] ifup: do not dhcp on network interface of secondary stack + +Configure cmdline to: + ip=br0:dhcp bridge=br0:bond0 bond=bond0:eth0 + +By default ifup bond0 will run dhcp on bond0, which is wrong. bond0 +isn't the top interface. we should really run dhcp on br0. + +So if we ifup an network interface on secondary stack, we should not +dhcp. Fix this issue with this patch. +--- + modules.d/40network/ifup.sh | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index 32616470..9f6f4494 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -336,6 +336,13 @@ for p in $(getargs ip=); do + exit 0 + done + ++# netif isn't the top stack? Then we should exit here. ++# eg. netif is bond0. br0 is on top of it. dhcp br0 is correct but dhcp ++# bond0 doesn't make sense. ++if [ -n "$DO_BOND_SETUP" -o -n "$DO_TEAM_SETUP" -o -n "$DO_VLAN_SETUP" ]; then ++ exit 0 ++fi ++ + # no ip option directed at our interface? + if [ ! -e /tmp/setup_net_${netif}.ok ]; then + do_dhcp -4 diff --git a/SOURCES/0003-dracut.sh-also-search-uevent-s-for-MODALIAS.patch b/SOURCES/0003-dracut.sh-also-search-uevent-s-for-MODALIAS.patch new file mode 100644 index 0000000..001c384 --- /dev/null +++ b/SOURCES/0003-dracut.sh-also-search-uevent-s-for-MODALIAS.patch @@ -0,0 +1,28 @@ +From af34b260474c551a45a6fa4ae8719622f1e35910 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 13 Sep 2013 17:34:18 +0200 +Subject: [PATCH] dracut.sh: also search uevent's for MODALIAS + +--- + dracut.sh | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/dracut.sh b/dracut.sh +index fd278466..ce39151c 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -923,6 +923,14 @@ if [[ $hostonly ]]; then + while read m; do + modalias="$(<"$m")" && [[ $modalias ]] && host_modalias["$modalias"]=1 + done < "$initdir/.modalias" ++ find /sys/devices/ -name uevent -print > "$initdir/.modalias" ++ while read m; do ++ while read line; do ++ [[ "$line" != MODALIAS\=* ]] && continue ++ modalias="${line##MODALIAS=}" && [[ $modalias ]] && host_modalias["$modalias"]=1 ++ done < "$m" ++ done < "$initdir/.modalias" ++ + rm -f -- "$initdir/.modalias" + + # check /proc/modules diff --git a/SOURCES/0004-dracut.sh-we-don-t-need-to-read-the-modalias-files.patch b/SOURCES/0004-dracut.sh-we-don-t-need-to-read-the-modalias-files.patch new file mode 100644 index 0000000..bafd3de --- /dev/null +++ b/SOURCES/0004-dracut.sh-we-don-t-need-to-read-the-modalias-files.patch @@ -0,0 +1,32 @@ +From 72ce014bc79933379cb864cef665114ac5d4ccfa Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 13 Sep 2013 17:51:29 +0200 +Subject: [PATCH] dracut.sh: we don't need to read the modalias files + +udev does only parse the uevent MODALIAS line, so whatever is in the +modalias files would not trigger any module load. +--- + dracut.sh | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +diff --git a/dracut.sh b/dracut.sh +index ce39151c..196b3ad4 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -919,15 +919,12 @@ if [[ $hostonly ]]; then + fi + # record all host modaliases + declare -A host_modalias +- find /sys/devices/ -name modalias -print > "$initdir/.modalias" +- while read m; do +- modalias="$(<"$m")" && [[ $modalias ]] && host_modalias["$modalias"]=1 +- done < "$initdir/.modalias" + find /sys/devices/ -name uevent -print > "$initdir/.modalias" + while read m; do + while read line; do + [[ "$line" != MODALIAS\=* ]] && continue + modalias="${line##MODALIAS=}" && [[ $modalias ]] && host_modalias["$modalias"]=1 ++ break + done < "$m" + done < "$initdir/.modalias" + diff --git a/SOURCES/0005-Add-option-to-turn-on-off-prelinking.patch b/SOURCES/0005-Add-option-to-turn-on-off-prelinking.patch new file mode 100644 index 0000000..92e0325 --- /dev/null +++ b/SOURCES/0005-Add-option-to-turn-on-off-prelinking.patch @@ -0,0 +1,118 @@ +From 96f48da50cdc049c635cca8466b38084a3de0f48 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 17 Sep 2013 12:23:20 -0500 +Subject: [PATCH] Add option to turn on/off prelinking + +--prelink, --noprelink + +do_prelink=[yes|no] +--- + dracut.8.asc | 6 ++++++ + dracut.conf.5.asc | 3 +++ + dracut.sh | 34 ++++++++++++++++++++++------------ + 3 files changed, 31 insertions(+), 12 deletions(-) + +diff --git a/dracut.8.asc b/dracut.8.asc +index ee9d8de2..76fc75c4 100644 +--- a/dracut.8.asc ++++ b/dracut.8.asc +@@ -269,6 +269,12 @@ example: + **--nostrip**:: + do not strip binaries in the initramfs + ++**--prelink**:: ++ prelink binaries in the initramfs (default) ++ ++**--noprelink**:: ++ do not prelink binaries in the initramfs ++ + **--hardlink**:: + hardlink files in the initramfs (default) + +diff --git a/dracut.conf.5.asc b/dracut.conf.5.asc +index a32516c4..63991d4f 100644 +--- a/dracut.conf.5.asc ++++ b/dracut.conf.5.asc +@@ -67,6 +67,9 @@ Configuration files must have the extension .conf; other extensions are ignored. + *do_strip=*"__{yes|no}__":: + Strip binaries in the initramfs (default=yes) + ++*do_prelink=*"__{yes|no}__":: ++ Prelink binaries in the initramfs (default=yes) ++ + *hostonly=*"__{yes|no}__":: + Host-Only mode: Install only what is needed for booting the local host + instead of a generic host and generate host-specific configuration. +diff --git a/dracut.sh b/dracut.sh +index 196b3ad4..177e66d5 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -97,6 +97,8 @@ Creates initial ramdisk images for preloading modules + --kernel-cmdline [PARAMETERS] Specify default kernel command line parameters + --strip Strip binaries in the initramfs + --nostrip Do not strip binaries in the initramfs ++ --prelink Prelink binaries in the initramfs ++ --noprelink Do not prelink binaries in the initramfs + --hardlink Hardlink files in the initramfs + --nohardlink Do not hardlink files in the initramfs + --prefix [DIR] Prefix initramfs files with [DIR] +@@ -315,6 +317,8 @@ TEMP=$(unset POSIXLY_CORRECT; getopt \ + --long kernel-cmdline: \ + --long strip \ + --long nostrip \ ++ --long prelink \ ++ --long noprelink \ + --long hardlink \ + --long nohardlink \ + --long noprefix \ +@@ -394,6 +398,8 @@ while :; do + --no-early-microcode) early_microcode_l="no";; + --strip) do_strip_l="yes";; + --nostrip) do_strip_l="no";; ++ --prelink) do_prelink_l="yes";; ++ --noprelink) do_prelink_l="no";; + --hardlink) do_hardlink_l="yes";; + --nohardlink) do_hardlink_l="no";; + --noprefix) prefix_l="/";; +@@ -651,6 +657,8 @@ stdloglvl=$((stdloglvl + verbosity_mod_l)) + [[ $drivers_dir_l ]] && drivers_dir=$drivers_dir_l + [[ $do_strip_l ]] && do_strip=$do_strip_l + [[ $do_strip ]] || do_strip=yes ++[[ $do_prelink_l ]] && do_prelink=$do_prelink_l ++[[ $do_prelink ]] || do_prelink=yes + [[ $do_hardlink_l ]] && do_hardlink=$do_hardlink_l + [[ $do_hardlink ]] || do_hardlink=yes + [[ $prefix_l ]] && prefix=$prefix_l +@@ -1251,18 +1259,20 @@ if [[ $kernel_only != yes ]]; then + fi + fi + +-PRELINK_BIN="$(command -v prelink)" +-if [[ $UID = 0 ]] && [[ $PRELINK_BIN ]]; then +- if [[ $DRACUT_FIPS_MODE ]]; then +- dinfo "*** Installing prelink files ***" +- inst_multiple -o prelink /etc/prelink.conf /etc/prelink.conf.d/*.conf /etc/prelink.cache +- else +- dinfo "*** Pre-linking files ***" +- inst_multiple -o prelink /etc/prelink.conf /etc/prelink.conf.d/*.conf +- chroot "$initdir" "$PRELINK_BIN" -a +- rm -f -- "$initdir/$PRELINK_BIN" +- rm -fr -- "$initdir"/etc/prelink.* +- dinfo "*** Pre-linking files done ***" ++if [[ $do_prelink == yes ]]; then ++ PRELINK_BIN="$(command -v prelink)" ++ if [[ $UID = 0 ]] && [[ $PRELINK_BIN ]]; then ++ if [[ $DRACUT_FIPS_MODE ]]; then ++ dinfo "*** Installing prelink files ***" ++ inst_multiple -o prelink /etc/prelink.conf /etc/prelink.conf.d/*.conf /etc/prelink.cache ++ else ++ dinfo "*** Pre-linking files ***" ++ inst_multiple -o prelink /etc/prelink.conf /etc/prelink.conf.d/*.conf ++ chroot "$initdir" "$PRELINK_BIN" -a ++ rm -f -- "$initdir/$PRELINK_BIN" ++ rm -fr -- "$initdir"/etc/prelink.* ++ dinfo "*** Pre-linking files done ***" ++ fi + fi + fi + diff --git a/SOURCES/0006-add-etc-system-fips-for-dracut-fips-subpackage.patch b/SOURCES/0006-add-etc-system-fips-for-dracut-fips-subpackage.patch new file mode 100644 index 0000000..ba8a2a6 --- /dev/null +++ b/SOURCES/0006-add-etc-system-fips-for-dracut-fips-subpackage.patch @@ -0,0 +1,32 @@ +From 764b5209942dc435c7c611b0008975aa13738374 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 2 Oct 2013 12:36:25 +0200 +Subject: [PATCH] add /etc/system-fips for dracut-fips subpackage + +--- + dracut.spec | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/dracut.spec b/dracut.spec +index 87340d7a..b1cf9fef 100644 +--- a/dracut.spec ++++ b/dracut.spec +@@ -271,6 +271,10 @@ echo 'hostonly="no"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/02-generic-i + echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/02-rescue.conf + %endif + ++%if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version} ++> $RPM_BUILD_ROOT/etc/system-fips ++%endif ++ + # create compat symlink + mkdir -p $RPM_BUILD_ROOT/sbin + ln -s /usr/bin/dracut $RPM_BUILD_ROOT/sbin/dracut +@@ -413,6 +417,7 @@ rm -rf -- $RPM_BUILD_ROOT + %defattr(-,root,root,0755) + %{dracutlibdir}/modules.d/01fips + %{dracutlibdir}/dracut.conf.d/40-fips.conf ++%config(missingok) /etc/system-fips + %endif + + %files fips-aesni diff --git a/SOURCES/0007-dracut-Generlize-microcode-early-cpio-usage.patch b/SOURCES/0007-dracut-Generlize-microcode-early-cpio-usage.patch new file mode 100644 index 0000000..f1890bb --- /dev/null +++ b/SOURCES/0007-dracut-Generlize-microcode-early-cpio-usage.patch @@ -0,0 +1,69 @@ +From 4b1aa19fa0fad0e607961995dbbe971be2ef9f81 Mon Sep 17 00:00:00 2001 +From: Thomas Renninger <trenn@suse.de> +Date: Fri, 27 Sep 2013 20:10:37 +0200 +Subject: [PATCH] dracut: Generlize microcode early cpio usage + +ACPI early table override also may need to place files into an early cpio. +Reflect this in variable and file names. +This change is renaming only and does not introduce any real change. + +Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> +Signed-off-by: Thomas Renninger <trenn@suse.de> +--- + dracut.sh | 17 +++++++++-------- + 1 file changed, 9 insertions(+), 8 deletions(-) + +diff --git a/dracut.sh b/dracut.sh +index 177e66d5..b3b80886 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -704,9 +704,9 @@ readonly initdir="$(mktemp --tmpdir="$TMPDIR/" -d -t initramfs.XXXXXX)" + } + + if [[ $early_microcode = yes ]]; then +- readonly microcode_dir="$(mktemp --tmpdir="$TMPDIR/" -d -t early_microcode.XXXXXX)" +- [ -d "$microcode_dir" ] || { +- printf "%s\n" "dracut: mktemp --tmpdir=\"$TMPDIR/\" -d -t early_microcode.XXXXXX failed." >&2 ++ readonly early_cpio_dir="$(mktemp --tmpdir="$TMPDIR/" -d -t early_cpio.XXXXXX)" ++ [ -d "$early_cpio_dir" ] || { ++ printf "%s\n" "dracut: mktemp --tmpdir=\"$TMPDIR/\" -d -t early_cpio.XXXXXX failed." >&2 + exit 1 + } + fi +@@ -715,7 +715,7 @@ trap ' + ret=$?; + [[ $outfile ]] && [[ -f $outfile.$$ ]] && rm -f -- "$outfile.$$"; + [[ $keep ]] && echo "Not removing $initdir." >&2 || { [[ $initdir ]] && rm -rf -- "$initdir"; }; +- [[ $keep ]] && echo "Not removing $microcode_dir." >&2 || { [[ $microcode_dir ]] && rm -Rf -- "$microcode_dir"; }; ++ [[ $keep ]] && echo "Not removing $early_cpio_dir." >&2 || { [[ $early_cpio_dir ]] && rm -Rf -- "$early_cpio_dir"; }; + [[ $_dlogdir ]] && rm -Rf -- "$_dlogdir"; + exit $ret; + ' EXIT +@@ -1311,7 +1311,7 @@ if [[ $early_microcode = yes ]]; then + dinfo "*** Generating early-microcode cpio image ***" + ucode_dir=(amd-ucode intel-ucode) + ucode_dest=(AuthenticAMD.bin GenuineIntel.bin) +- _dest_dir="$microcode_dir/d/kernel/x86/microcode" ++ _dest_dir="$early_cpio_dir/d/kernel/x86/microcode" + _dest_idx="0 1" + mkdir -p $_dest_dir + if [[ $hostonly ]]; then +@@ -1331,14 +1331,15 @@ if [[ $early_microcode = yes ]]; then + fi + done + done +- (cd "$microcode_dir/d"; find . -print0 | cpio --null -o -H newc --quiet >../ucode.cpio) ++ create_early_cpio="yes" + fi + + rm -f -- "$outfile" + dinfo "*** Creating image file ***" +-if [[ $early_microcode = yes ]]; then ++if [[ $create_early_cpio = yes ]]; then + # The microcode blob is _before_ the initramfs blob, not after +- mv $microcode_dir/ucode.cpio $outfile.$$ ++ (cd "$early_cpio_dir/d"; find . -print0 | cpio --null -o -H newc --quiet >../early.cpio) ++ mv $early_cpio_dir/early.cpio $outfile.$$ + fi + if ! ( umask 077; cd "$initdir"; find . -print0 | cpio --null -R 0:0 -H newc -o --quiet| \ + $compress >> "$outfile.$$"; ); then diff --git a/SOURCES/0008-dracut-Do-not-create-early_cpio-if-no-suitable-micro.patch b/SOURCES/0008-dracut-Do-not-create-early_cpio-if-no-suitable-micro.patch new file mode 100644 index 0000000..b64c736 --- /dev/null +++ b/SOURCES/0008-dracut-Do-not-create-early_cpio-if-no-suitable-micro.patch @@ -0,0 +1,44 @@ +From ff33b576767d5e020c9f2685a0f5b0acb35a781c Mon Sep 17 00:00:00 2001 +From: Thomas Renninger <trenn@suse.de> +Date: Fri, 27 Sep 2013 20:10:38 +0200 +Subject: [PATCH] dracut: Do not create early_cpio if no suitable microcode + exist in hostonly case + +Intel microcodes only exist for very specific family/model/stepping CPUs. +If no microcode gets added, there is no need to create an empty +(only directories) cpio later that gets glued to the initrd. + +This also fixes: + +*** Constructing GenuineIntel.bin **** +cat: /lib/firmware/intel-ucode/06-3c-03: No such file or directory + +in hostonly mode if there is no suitable microcode for the CPU. + +Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> +Signed-off-by: Thomas Renninger <trenn@suse.de> +--- + dracut.sh | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/dracut.sh b/dracut.sh +index b3b80886..e43227e8 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1326,12 +1326,15 @@ if [[ $early_microcode = yes ]]; then + dinfo "*** Constructing ${ucode_dest[$idx]} ****" + if [[ $hostonly ]]; then + _src=$(get_ucode_file) ++ if ! [[ -r $_fwdir/$_fw/$_src ]];then ++ break; ++ fi + fi + cat $_fwdir/$_fw/$_src > $_dest_dir/${ucode_dest[$idx]} ++ create_early_cpio="yes" + fi + done + done +- create_early_cpio="yes" + fi + + rm -f -- "$outfile" diff --git a/SOURCES/0009-dracut-Implement-ACPI-table-overriding.patch b/SOURCES/0009-dracut-Implement-ACPI-table-overriding.patch new file mode 100644 index 0000000..c89141d --- /dev/null +++ b/SOURCES/0009-dracut-Implement-ACPI-table-overriding.patch @@ -0,0 +1,45 @@ +From ebc7f823c0013dfe7fcefe82db48bf4832f5dcec Mon Sep 17 00:00:00 2001 +From: Thomas Renninger <trenn@suse.de> +Date: Fri, 27 Sep 2013 20:10:39 +0200 +Subject: [PATCH] dracut: Implement ACPI table overriding + +An example config file for this feature could be: + +/etc/dracut.conf.d/03-acpi-override.conf + +with this content: +acpi_override="yes" +acpi_table_dir="/etc/dracut.conf.d/acpi_tables" + +Then all files ending with *.aml will be put into the early cpio +(kernel/firmware/acpi) and will be used to replace the BIOS provided tables +if the kernel supports this feature. + +Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> +Signed-off-by: Thomas Renninger <trenn@suse.de> +--- + dracut.sh | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/dracut.sh b/dracut.sh +index e43227e8..b4b3e13d 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1337,6 +1337,17 @@ if [[ $early_microcode = yes ]]; then + done + fi + ++if [[ $acpi_override = yes ]] && [[ -d $acpi_table_dir ]]; then ++ dinfo "*** Packaging ACPI tables to override BIOS provided ones ***" ++ _dest_dir="$early_cpio_dir/d/kernel/firmware/acpi" ++ mkdir -p $_dest_dir ++ for table in $acpi_table_dir/*.aml; do ++ dinfo " Adding ACPI table: $table" ++ cp $table $_dest_dir ++ create_early_cpio="yes" ++ done ++fi ++ + rm -f -- "$outfile" + dinfo "*** Creating image file ***" + if [[ $create_early_cpio = yes ]]; then diff --git a/SOURCES/0010-dracut.conf.5.asc-Add-ACPI-table-override-and-uncomp.patch b/SOURCES/0010-dracut.conf.5.asc-Add-ACPI-table-override-and-uncomp.patch new file mode 100644 index 0000000..295ea5b --- /dev/null +++ b/SOURCES/0010-dracut.conf.5.asc-Add-ACPI-table-override-and-uncomp.patch @@ -0,0 +1,37 @@ +From 54011e3591216503dd93d1028ff209a6a4851a57 Mon Sep 17 00:00:00 2001 +From: Thomas Renninger <trenn@suse.de> +Date: Fri, 27 Sep 2013 20:10:40 +0200 +Subject: [PATCH] dracut.conf.5.asc: Add ACPI table override and uncompressed + cpio doc + +Signed-off-by: Thomas Renninger <trenn@suse.de> +--- + dracut.conf.5.asc | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +diff --git a/dracut.conf.5.asc b/dracut.conf.5.asc +index 63991d4f..c9c854a9 100644 +--- a/dracut.conf.5.asc ++++ b/dracut.conf.5.asc +@@ -125,6 +125,21 @@ If chrooted to another root other than the real root device, use --fstab and pro + *no_kernel=*"{yes|no}":: + Do not install kernel drivers and firmware files (default=no) + ++*acpi_override=*"{yes|no}":: ++ [WARNING] ONLY USE THIS IF YOU KNOW WHAT YOU ARE DOING! + ++ Override BIOS provided ACPI tables. For further documentation read ++ Documentation/acpi/initrd_table_override.txt in the kernel sources. ++ Search for ACPI table files (must have .aml suffix) in acpi_table_dir= ++ directory (see below) and add them to a separate uncompressed cpio ++ archive. This cpio archive gets glued (concatenated, uncompressed one ++ must be the first one) to the compressed cpio archive. The first, ++ uncompressed cpio archive is for data which the kernel must be able ++ to access very early (and cannot make use of uncompress alogrithms yet) ++ like microcode or ACPI tables (default=no). ++ ++*acpi_table_dir=*"__<dir>__":: ++ Directory to search for ACPI tables if acpi_override= is set to yes. ++ + *early_microcode=*"{yes|no}":: + Combine early microcode with ramdisk (default=no) + diff --git a/SOURCES/0011-dracut-bash-completion.sh-add-prelink-noprelink.patch b/SOURCES/0011-dracut-bash-completion.sh-add-prelink-noprelink.patch new file mode 100644 index 0000000..8b4274d --- /dev/null +++ b/SOURCES/0011-dracut-bash-completion.sh-add-prelink-noprelink.patch @@ -0,0 +1,22 @@ +From eaa4d30d5abd753bd08322e4b7e5ebd8a52dd75a Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 2 Oct 2013 12:47:34 +0200 +Subject: [PATCH] dracut-bash-completion.sh: add --prelink --noprelink + +--- + dracut-bash-completion.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dracut-bash-completion.sh b/dracut-bash-completion.sh +index f822058d..d796c358 100644 +--- a/dracut-bash-completion.sh ++++ b/dracut-bash-completion.sh +@@ -34,7 +34,7 @@ _dracut() { + --local --hostonly --no-hostonly --fstab --help --bzip2 --lzma + --xz --no-compress --gzip --list-modules --show-modules --keep + --printsize --regenerate-all --noimageifnotneeded --early-microcode +- --no-early-microcode --print-cmdline' ++ --no-early-microcode --print-cmdline --prelink --noprelink' + + [ARG]='-a -m -o -d -I -k -c -L --kver --add --force-add --add-drivers + --omit-drivers --modules --omit --drivers --filesystems --install diff --git a/SOURCES/0012-dracut.sh-bail-out-early-if-destination-dir-is-not-w.patch b/SOURCES/0012-dracut.sh-bail-out-early-if-destination-dir-is-not-w.patch new file mode 100644 index 0000000..ad7ba64 --- /dev/null +++ b/SOURCES/0012-dracut.sh-bail-out-early-if-destination-dir-is-not-w.patch @@ -0,0 +1,64 @@ +From cf9f56be9c0ab44e5ae5d5abde01151b33206fc2 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 2 Oct 2013 12:48:11 +0200 +Subject: [PATCH] dracut.sh: bail out early, if destination dir is not + writeable + +--- + dracut.sh | 36 +++++++++++++++++++----------------- + 1 file changed, 19 insertions(+), 17 deletions(-) + +diff --git a/dracut.sh b/dracut.sh +index b4b3e13d..e135dfc8 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -824,9 +824,25 @@ if [[ -d $srcmods ]]; then + } + fi + +-if [[ -f $outfile && ! $force && ! $print_cmdline ]]; then +- dfatal "Will not override existing initramfs ($outfile) without --force" +- exit 1 ++if [[ ! $print_cmdline ]]; then ++ if [[ -f $outfile && ! $force ]]; then ++ dfatal "Will not override existing initramfs ($outfile) without --force" ++ exit 1 ++ fi ++ ++ outdir=${outfile%/*} ++ [[ $outdir ]] || outdir="/" ++ ++ if [[ ! -d "$outdir" ]]; then ++ dfatal "Can't write to $outdir: Directory $outdir does not exist or is not accessible." ++ exit 1 ++ elif [[ ! -w "$outdir" ]]; then ++ dfatal "No permission to write to $outdir." ++ exit 1 ++ elif [[ -f "$outfile" && ! -w "$outfile" ]]; then ++ dfatal "No permission to write $outfile." ++ exit 1 ++ fi + fi + + # Need to be able to have non-root users read stuff (rpcbind etc) +@@ -1041,20 +1057,6 @@ if [[ $print_cmdline ]]; then + exit 0 + fi + +-outdir=${outfile%/*} +-[[ $outdir ]] || outdir="/" +- +-if [[ ! -d "$outdir" ]]; then +- dfatal "Can't write to $outdir: Directory $outdir does not exist or is not accessible." +- exit 1 +-elif [[ ! -w "$outdir" ]]; then +- dfatal "No permission to write to $outdir." +- exit 1 +-elif [[ -f "$outfile" && ! -w "$outfile" ]]; then +- dfatal "No permission to write $outfile." +- exit 1 +-fi +- + # Create some directory structure first + [[ $prefix ]] && mkdir -m 0755 -p "${initdir}${prefix}" + diff --git a/SOURCES/0013-dracut-logger.sh-do-not-log-to-syslog-kmsg-journal-f.patch b/SOURCES/0013-dracut-logger.sh-do-not-log-to-syslog-kmsg-journal-f.patch new file mode 100644 index 0000000..5b96ef3 --- /dev/null +++ b/SOURCES/0013-dracut-logger.sh-do-not-log-to-syslog-kmsg-journal-f.patch @@ -0,0 +1,44 @@ +From d87da4c7776d0e16b8ce6c3a583d21209c3db144 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 2 Oct 2013 12:48:57 +0200 +Subject: [PATCH] dracut-logger.sh: do not log to syslog/kmsg/journal for UID + != 0 + +Don't clutter the system log with user actions. + +Also check, if systemd-cat works, before using it. +--- + dracut-logger.sh | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/dracut-logger.sh b/dracut-logger.sh +index b052581e..f679dc94 100755 +--- a/dracut-logger.sh ++++ b/dracut-logger.sh +@@ -140,11 +140,16 @@ dlog_init() { + fi + fi + ++ if (( $UID != 0 )); then ++ kmsgloglvl=0 ++ sysloglvl=0 ++ fi ++ + if (( $sysloglvl > 0 )); then + if [[ -d /run/systemd/journal ]] \ + && type -P systemd-cat &>/dev/null \ +- && (( $UID == 0 )) \ +- && systemctl is-active systemd-journald.socket &>/dev/null; then ++ && systemctl --quiet is-active systemd-journald.socket &>/dev/null \ ++ && { echo "dracut-$DRACUT_VERSION" | systemd-cat -t 'dracut' &>/dev/null; } ; then + readonly _dlogdir="$(mktemp --tmpdir="$TMPDIR/" -d -t dracut-log.XXXXXX)" + readonly _systemdcatfile="$_dlogdir/systemd-cat" + mkfifo "$_systemdcatfile" +@@ -153,6 +158,7 @@ dlog_init() { + exec 15>"$_systemdcatfile" + elif ! [ -S /dev/log -a -w /dev/log ] || ! command -v logger >/dev/null; then + # We cannot log to syslog, so turn this facility off. ++ kmsgloglvl=$sysloglvl + sysloglvl=0 + ret=1 + errmsg="No '/dev/log' or 'logger' included for syslog logging" diff --git a/SOURCES/0014-lvm-mdraid-Fix-LVM-on-MD-activation.patch b/SOURCES/0014-lvm-mdraid-Fix-LVM-on-MD-activation.patch new file mode 100644 index 0000000..9060752 --- /dev/null +++ b/SOURCES/0014-lvm-mdraid-Fix-LVM-on-MD-activation.patch @@ -0,0 +1,43 @@ +From 32b970339f5439300fe6155352ec1f17c5e48d78 Mon Sep 17 00:00:00 2001 +From: Peter Rajnoha <prajnoha@redhat.com> +Date: Fri, 4 Oct 2013 10:41:24 +0200 +Subject: [PATCH] lvm/mdraid: Fix LVM on MD activation + +The 69-dm-lvm-metad.rules set some udev env. variables that makes it +possible to detect the right time to activate LVM on MD. The MD is very +similar to DM during activation - it's usable only after proper device +activation - the CHANGE event. We need to make a difference between a +CHANGE event that comes from this activation and CHANGE event that is +the outcome of the WATCH udev rule (otherwise we'd end up with LVM +activation done on each CHANGE event - which is wrong). + +So we need the udev databse to be persistent during pivot to root fs +even for MD devices. +--- + modules.d/90lvm/module-setup.sh | 2 +- + modules.d/90mdraid/59-persistent-storage-md.rules | 1 + + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh +index 2ef9a514..f98ffffd 100755 +--- a/modules.d/90lvm/module-setup.sh ++++ b/modules.d/90lvm/module-setup.sh +@@ -82,7 +82,7 @@ install() { + } > "${initdir}/etc/lvm/lvm.conf" + fi + +- inst_rules 11-dm-lvm.rules ++ inst_rules 11-dm-lvm.rules 69-dm-lvm-metad.rules + # Gentoo ebuild for LVM2 prior to 2.02.63-r1 doesn't install above rules + # files, but provides the one below: + inst_rules 64-device-mapper.rules +diff --git a/modules.d/90mdraid/59-persistent-storage-md.rules b/modules.d/90mdraid/59-persistent-storage-md.rules +index bea93257..6ef858aa 100644 +--- a/modules.d/90mdraid/59-persistent-storage-md.rules ++++ b/modules.d/90mdraid/59-persistent-storage-md.rules +@@ -20,4 +20,5 @@ IMPORT{program}="/sbin/mdadm --detail --export $tempnode" + IMPORT BLKID + OPTIONS+="link_priority=100" + OPTIONS+="watch" ++OPTIONS+="db_persist" + LABEL="md_end" diff --git a/SOURCES/0015-bcache-optionally-install-the-tools-and-rules.patch b/SOURCES/0015-bcache-optionally-install-the-tools-and-rules.patch new file mode 100644 index 0000000..eb6793c --- /dev/null +++ b/SOURCES/0015-bcache-optionally-install-the-tools-and-rules.patch @@ -0,0 +1,24 @@ +From a5659901e87ef70b3cf8ea8b254e3d0f9fa88d96 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 9 Oct 2013 09:50:15 +0200 +Subject: [PATCH] bcache: optionally install the tools and rules + +--- + modules.d/90bcache/module-setup.sh | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/modules.d/90bcache/module-setup.sh b/modules.d/90bcache/module-setup.sh +index b02b8b4e..a5a57edb 100755 +--- a/modules.d/90bcache/module-setup.sh ++++ b/modules.d/90bcache/module-setup.sh +@@ -27,7 +27,7 @@ installkernel() { + } + + install() { +- blkid -k | { while read line; do [[ $line == bcache ]] && exit 0; done; exit 1; } || inst_multiple probe-bcache +- inst_multiple ${udevdir}/bcache-register +- inst_rules 61-bcache.rules ++ blkid -k | { while read line; do [[ $line == bcache ]] && exit 0; done; exit 1; } || inst_multiple -o probe-bcache ++ inst_multiple -o ${udevdir}/bcache-register ++ inst_rules 61-bcache.rules 69-bcache.rules + } diff --git a/SOURCES/0016-dracut-functions.sh-inst_rules-do-not-install-rules-.patch b/SOURCES/0016-dracut-functions.sh-inst_rules-do-not-install-rules-.patch new file mode 100644 index 0000000..de96cd1 --- /dev/null +++ b/SOURCES/0016-dracut-functions.sh-inst_rules-do-not-install-rules-.patch @@ -0,0 +1,25 @@ +From 31b89c8c2bfb5a0336268cc66bd663429122feb3 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 4 Oct 2013 13:32:15 +0200 +Subject: [PATCH] dracut-functions.sh:inst_rules() do not install rules in CWD + +--- + dracut-functions.sh | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/dracut-functions.sh b/dracut-functions.sh +index cf33af56..45e09118 100755 +--- a/dracut-functions.sh ++++ b/dracut-functions.sh +@@ -882,7 +882,10 @@ inst_rules() { + fi + done + fi +- for r in '' ./ $dracutbasedir/rules.d/; do ++ for r in '' $dracutbasedir/rules.d/; do ++ # skip rules without an absolute path ++ [[ "${r}$_rule" != /* ]] && continue ++ + if [[ -f ${r}$_rule ]]; then + _found="${r}$_rule" + inst_rule_programs "$_found" diff --git a/SOURCES/0017-mdraid-module-setup.sh-install-configs-from-etc-mdad.patch b/SOURCES/0017-mdraid-module-setup.sh-install-configs-from-etc-mdad.patch new file mode 100644 index 0000000..3049402 --- /dev/null +++ b/SOURCES/0017-mdraid-module-setup.sh-install-configs-from-etc-mdad.patch @@ -0,0 +1,30 @@ +From fdaa69db2061cc83845f631e6e3216e55b2eb235 Mon Sep 17 00:00:00 2001 +From: Alexander Tsoy <alexander@tsoy.me> +Date: Thu, 3 Oct 2013 14:54:42 +0400 +Subject: [PATCH] mdraid/module-setup.sh: install configs from + /etc/mdadm.conf.d + +/etc/mdadm.conf.d directory is supported since mdadm-3.3 +--- + modules.d/90mdraid/module-setup.sh | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/modules.d/90mdraid/module-setup.sh b/modules.d/90mdraid/module-setup.sh +index 5df2274b..45767c67 100755 +--- a/modules.d/90mdraid/module-setup.sh ++++ b/modules.d/90mdraid/module-setup.sh +@@ -93,6 +93,14 @@ install() { + else + [ -f /etc/mdadm/mdadm.conf ] && inst /etc/mdadm/mdadm.conf /etc/mdadm.conf + fi ++ if [ -d /etc/mdadm.conf.d ]; then ++ local f ++ inst_dir /etc/mdadm.conf.d ++ for f in /etc/mdadm.conf.d/*.conf; do ++ [ -f "$f" ] || continue ++ inst "$f" ++ done ++ fi + fi + + inst_hook pre-udev 30 "$moddir/mdmon-pre-udev.sh" diff --git a/SOURCES/0018-mdraid-module-setup.sh-fixes-for-mdadm-3.2.6.patch b/SOURCES/0018-mdraid-module-setup.sh-fixes-for-mdadm-3.2.6.patch new file mode 100644 index 0000000..b738eaa --- /dev/null +++ b/SOURCES/0018-mdraid-module-setup.sh-fixes-for-mdadm-3.2.6.patch @@ -0,0 +1,51 @@ +From 4fde4d06474cdf321958592edf3f856446927d29 Mon Sep 17 00:00:00 2001 +From: Alexander Tsoy <alexander@tsoy.me> +Date: Sun, 29 Sep 2013 01:31:01 +0400 +Subject: [PATCH] mdraid/module-setup.sh: fixes for mdadm-3.2.6+ + +mdadm-3.2.6+: +Incremental assembly rule contains "--offroot" arg. Update +regexp to catch this variant. + +mdadm-3.3+: +Rules was splitted into two files: 63-md-raid-arrays.rules +and 64-md-raid-assembly.rules. Install them both and edit +the latter. +--- + modules.d/90mdraid/module-setup.sh | 11 ++++++++++- + 1 file changed, 10 insertions(+), 1 deletion(-) + +diff --git a/modules.d/90mdraid/module-setup.sh b/modules.d/90mdraid/module-setup.sh +index 45767c67..34aae1e3 100755 +--- a/modules.d/90mdraid/module-setup.sh ++++ b/modules.d/90mdraid/module-setup.sh +@@ -59,6 +59,7 @@ cmdline() { + } + + install() { ++ local rule rule_path + inst_multiple cat + inst_multiple -o mdmon + inst $(command -v partx) /sbin/partx +@@ -67,12 +68,20 @@ install() { + cmdline >> "${initdir}/etc/cmdline.d/90mdraid.conf" + echo >> "${initdir}/etc/cmdline.d/90mdraid.conf" + ++ # <mdadm-3.3 udev rule + inst_rules 64-md-raid.rules ++ # >=mdadm-3.3 udev rules ++ inst_rules 63-md-raid-arrays.rules 64-md-raid-assembly.rules + # remove incremental assembly from stock rules, so they don't shadow + # 65-md-inc*.rules and its fine-grained controls, or cause other problems + # when we explicitly don't want certain components to be incrementally + # assembled +- sed -i -r -e '/RUN\+?="[[:alpha:]/]*mdadm[[:blank:]]+(--incremental|-I)[[:blank:]]+(\$env\{DEVNAME\}|\$tempnode)"/d' "${initdir}${udevdir}/rules.d/64-md-raid.rules" ++ for rule in 64-md-raid.rules 64-md-raid-assembly.rules; do ++ rule_path="${initdir}${udevdir}/rules.d/${rule}" ++ [ -f "${rule_path}" ] && sed -i -r \ ++ -e '/RUN\+?="[[:alpha:]/]*mdadm[[:blank:]]+(--incremental|-I)[[:blank:]]+(\$env\{DEVNAME\}|\$tempnode|\$devnode)/d' \ ++ "${rule_path}" ++ done + + inst_rules "$moddir/65-md-incremental-imsm.rules" + diff --git a/SOURCES/0019-fcoe-add-FCoE-UEFI-boot-device-support.patch b/SOURCES/0019-fcoe-add-FCoE-UEFI-boot-device-support.patch new file mode 100644 index 0000000..11cb154 --- /dev/null +++ b/SOURCES/0019-fcoe-add-FCoE-UEFI-boot-device-support.patch @@ -0,0 +1,240 @@ +From 1b827040f8b3e1e4fec19de76526fe0620654502 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Mon, 7 Oct 2013 14:24:36 +0200 +Subject: [PATCH] fcoe: add FCoE UEFI boot device support + +--- + modules.d/95fcoe/module-setup.sh | 1 + + modules.d/95fcoe/parse-uefifcoe.sh | 35 +++++++ + modules.d/99base/module-setup.sh | 1 + + modules.d/99base/uefi-lib.sh | 155 +++++++++++++++++++++++++++++ + 4 files changed, 192 insertions(+) + create mode 100755 modules.d/95fcoe/parse-uefifcoe.sh + create mode 100755 modules.d/99base/uefi-lib.sh + +diff --git a/modules.d/95fcoe/module-setup.sh b/modules.d/95fcoe/module-setup.sh +index d3c58cc6..08ba4eac 100755 +--- a/modules.d/95fcoe/module-setup.sh ++++ b/modules.d/95fcoe/module-setup.sh +@@ -32,6 +32,7 @@ install() { + inst "$moddir/fcoe-up.sh" "/sbin/fcoe-up" + inst "$moddir/fcoe-edd.sh" "/sbin/fcoe-edd" + inst "$moddir/fcoe-genrules.sh" "/sbin/fcoe-genrules.sh" ++ inst_hook cmdline 20 "$moddir/parse-uefifcoe.sh" + inst_hook cmdline 99 "$moddir/parse-fcoe.sh" + dracut_need_initqueue + } +diff --git a/modules.d/95fcoe/parse-uefifcoe.sh b/modules.d/95fcoe/parse-uefifcoe.sh +new file mode 100755 +index 00000000..e03bcb39 +--- /dev/null ++++ b/modules.d/95fcoe/parse-uefifcoe.sh +@@ -0,0 +1,35 @@ ++#!/bin/bash ++# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- ++# ex: ts=8 sw=4 sts=4 et filetype=sh ++ ++command -v getarg >/dev/null || . /lib/dracut-lib.sh ++command -v get_fcoe_boot_mac >/dev/null || . /lib/uefi-lib.sh ++command -v set_ifname >/dev/null || . /lib/net-lib.sh ++ ++print_fcoe_uefi_conf() ++{ ++ local mac dev vlan ++ mac=$(get_fcoe_boot_mac) ++ [ -z "$mac" ] && continue ++ dev=$(set_ifname fcoe $mac) ++ vlan=$(get_fcoe_boot_vlan) ++ if [ "$vlan" -ne "0" ]; then ++ case "$vlan" in ++ [0-9]*) ++ printf "%s\n" "vlan=$dev.$vlan:$dev" ++ dev="$dev.$vlan" ++ ;; ++ *) ++ printf "%s\n" "vlan=$vlan:$dev" ++ dev="$vlan" ++ ;; ++ esac ++ fi ++ # fcoe=eth0:nodcb ++ printf "%s\n" "$dev:nodcb" ++} ++ ++ ++if [ -e /sys/firmware/efi/vars/FcoeBootDevice-a0ebca23-5f9c-447a-a268-22b6c158c2ac/data ]; then ++ print_fcoe_uefi_conf > /etc/cmdline.d/40-fcoe-uefi.conf ++fi +diff --git a/modules.d/99base/module-setup.sh b/modules.d/99base/module-setup.sh +index 52ce4004..d33a0fb4 100755 +--- a/modules.d/99base/module-setup.sh ++++ b/modules.d/99base/module-setup.sh +@@ -42,6 +42,7 @@ install() { + mkdir -p ${initdir}/tmp + + inst_simple "$moddir/dracut-lib.sh" "/lib/dracut-lib.sh" ++ inst_simple "$moddir/uefi-lib.sh" "/lib/uefi-lib.sh" + + if ! dracut_module_included "systemd"; then + inst_multiple switch_root || dfatal "Failed to install switch_root" +diff --git a/modules.d/99base/uefi-lib.sh b/modules.d/99base/uefi-lib.sh +new file mode 100755 +index 00000000..faedbac5 +--- /dev/null ++++ b/modules.d/99base/uefi-lib.sh +@@ -0,0 +1,155 @@ ++#!/bin/bash ++# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- ++# ex: ts=8 sw=4 sts=4 et filetype=sh ++# ++# Copyright 2013 Red Hat, Inc. All rights reserved. ++# Copyright 2013 Harald Hoyer <harald@redhat.com> ++# ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see <http://www.gnu.org/licenses/>. ++# ++ ++getbyte () { ++ local IFS= LC_CTYPE=C res c ++ read -r -n 1 -d '' c ++ res=$? ++ # the single quote in the argument of the printf ++ # yields the numeric value of $c (ASCII since LC_CTYPE=C) ++ [[ -n $c ]] && c=$(printf '%u' "'$c") || c=0 ++ printf "$c" ++ return $res ++} ++ ++getword () { ++ local b1 b2 val ++ b1=$(getbyte) || return 1 ++ b2=$(getbyte) || return 1 ++ (( val = b2 * 256 + b1 )) ++ echo $val ++ return 0 ++} ++ ++# Acpi(PNP0A08,0x0)/Pci(0x3,0x0)/Pci(0x0,0x0)/MAC(90E2BA265ED4,0x0)/Vlan(172)/Fibre(0x4EA06104A0CC0050,0x0) ++uefi_device_path() ++{ ++ local IFS= LC_CTYPE=C res tt len type hextype first ++ first=1 ++ ++ while :; do ++ type=$(getbyte) || return 1 ++ subtype=$(getbyte) || return 1 ++ len=$(getword) || return 1 ++ hextype=$(printf "%02x%02x" "$type" "$subtype") ++ if [[ $first == 1 ]]; then ++ first=0 ++ elif [[ $hextype != "7fff" ]]; then ++ printf "/" ++ fi ++ case $hextype in ++ 0101) ++ # PCI ++ tt=$(getword) ++ printf "PCI(0x%x,0x%x)" $(($tt / 256)) $(($tt & 255)) ++ ;; ++ 0201) ++ # ACPI ++ printf "Acpi(0x%x,0x%x)" $(($(getword) + $(getword) * 65536)) $(($(getword) + $(getword) * 65536)) ++ ;; ++ 0303) ++ # FIBRE ++ getword &>/dev/null ++ getword &>/dev/null ++ printf "Fibre(0x%x%x%x%x%x%x%x%x,0x%x)" \ ++ $(getbyte) $(getbyte) $(getbyte) $(getbyte) \ ++ $(getbyte) $(getbyte) $(getbyte) $(getbyte) \ ++ $(( $(getword) + $(getword) * 65536 + 4294967296 * ( $(getword) + $(getword) * 65536 ) )) ++ ;; ++ 030b) ++ # MAC ++ printf "MAC(%02x%02x%02x%02x%02x%02x," $(getbyte) $(getbyte) $(getbyte) $(getbyte) $(getbyte) $(getbyte) ++ read -r -N 26 tt || return 1 ++ printf "0x%x)" $(getbyte) ++ ;; ++ 0314) ++ # VLAN ++ printf "VLAN(%d)" $(getword) ++ ;; ++ 7fff) ++ # END ++ printf "\n" ++ return 0 ++ ;; ++ *) ++ printf "Unknown(Type:%d SubType:%d len=%d)" "$type" "$subtype" "$len" ++ read -r -N $(($len-4)) tt || return 1 ++ ;; ++ esac ++ done ++} ++ ++get_fcoe_boot_mac() ++{ ++ data=${1:-/sys/firmware/efi/vars/FcoeBootDevice-a0ebca23-5f9c-447a-a268-22b6c158c2ac/data} ++ [ -f $data ] || return 1 ++ local IFS= LC_CTYPE=C tt len type hextype ++ first=1 ++ ++ while :; do ++ type=$(getbyte) || return 1 ++ subtype=$(getbyte) || return 1 ++ len=$(getword) || return 1 ++ hextype=$(printf "%02x%02x" "$type" "$subtype") ++ case $hextype in ++ 030b) ++ # MAC ++ printf "%02x:%02x:%02x:%02x:%02x:%02x" $(getbyte) $(getbyte) $(getbyte) $(getbyte) $(getbyte) $(getbyte) ++ read -r -N 27 tt || return 1 ++ ;; ++ 7fff) ++ # END ++ return 0 ++ ;; ++ *) ++ read -r -N $(($len-4)) tt || return 1 ++ ;; ++ esac ++ done < $data ++} ++ ++get_fcoe_boot_vlan() ++{ ++ data=${1:-/sys/firmware/efi/vars/FcoeBootDevice-a0ebca23-5f9c-447a-a268-22b6c158c2ac/data} ++ [ -f $data ] || return 1 ++ local IFS= LC_CTYPE=C tt len type hextype ++ first=1 ++ ++ while :; do ++ type=$(getbyte) || return 1 ++ subtype=$(getbyte) || return 1 ++ len=$(getword) || return 1 ++ hextype=$(printf "%02x%02x" "$type" "$subtype") ++ case $hextype in ++ 0314) ++ # VLAN ++ printf "%d" $(getword) ++ ;; ++ 7fff) ++ # END ++ return 0 ++ ;; ++ *) ++ read -r -N $(($len-4)) tt || return 1 ++ ;; ++ esac ++ done < $data ++} diff --git a/SOURCES/0020-rootfs-block-add-support-for-the-rootfallback-kernel.patch b/SOURCES/0020-rootfs-block-add-support-for-the-rootfallback-kernel.patch new file mode 100644 index 0000000..a9fcf63 --- /dev/null +++ b/SOURCES/0020-rootfs-block-add-support-for-the-rootfallback-kernel.patch @@ -0,0 +1,94 @@ +From 4584826e9a25fdddb876f07875423196d9fc8840 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Mon, 7 Oct 2013 15:06:22 +0200 +Subject: [PATCH] rootfs-block: add support for the rootfallback= kernel + cmdline option + +--- + dracut.cmdline.7.asc | 6 ++++ + modules.d/95rootfs-block/module-setup.sh | 3 +- + modules.d/95rootfs-block/rootfallback.sh | 46 ++++++++++++++++++++++++ + 3 files changed, 54 insertions(+), 1 deletion(-) + create mode 100755 modules.d/95rootfs-block/rootfallback.sh + +diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc +index 09c47e85..4b2ab035 100644 +--- a/dracut.cmdline.7.asc ++++ b/dracut.cmdline.7.asc +@@ -69,6 +69,12 @@ rootfstype=ext3 + force mounting _/_ and _/usr_ (if it is a separate device) read-write. + See also ro option. + ++**rootfallback=**_<path to blockdevice>_:: ++ specify the block device to use as the root filesystem, if the normal root cannot be found. ++ This can only be a simple block device with a simple file system, for which the filesystem ++ driver is either compiled in, or added manually to the initramfs. ++ This parameter can be specified multiple times. ++ + **rd.auto** **rd.auto=1**:: + enable autoassembly of special devices like cryptoLUKS, dmraid, mdraid or lvm. + Default is off as of dracut version >= 024. +diff --git a/modules.d/95rootfs-block/module-setup.sh b/modules.d/95rootfs-block/module-setup.sh +index f066a79c..7e714eb0 100755 +--- a/modules.d/95rootfs-block/module-setup.sh ++++ b/modules.d/95rootfs-block/module-setup.sh +@@ -44,5 +44,6 @@ install() { + inst_hook pre-udev 30 "$moddir/block-genrules.sh" + inst_hook mount 99 "$moddir/mount-root.sh" + fi +-} + ++ inst_hook initqueue/timeout 99 "$moddir/rootfallback.sh" ++} +diff --git a/modules.d/95rootfs-block/rootfallback.sh b/modules.d/95rootfs-block/rootfallback.sh +new file mode 100755 +index 00000000..246ce9a4 +--- /dev/null ++++ b/modules.d/95rootfs-block/rootfallback.sh +@@ -0,0 +1,46 @@ ++#!/bin/sh ++# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- ++# ex: ts=8 sw=4 sts=4 et filetype=sh ++ ++type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh ++ ++for root in $(getargs rootfallback=); do ++ case "$root" in ++ block:LABEL=*|LABEL=*) ++ root="${root#block:}" ++ root="$(echo $root | sed 's,/,\\x2f,g')" ++ root="/dev/disk/by-label/${root#LABEL=}" ++ ;; ++ block:UUID=*|UUID=*) ++ root="${root#block:}" ++ root="${root#UUID=}" ++ root="$(echo $root | tr "[:upper:]" "[:lower:]")" ++ root="/dev/disk/by-uuid/${root#UUID=}" ++ ;; ++ block:PARTUUID=*|PARTUUID=*) ++ root="${root#block:}" ++ root="${root#PARTUUID=}" ++ root="$(echo $root | tr "[:upper:]" "[:lower:]")" ++ root="/dev/disk/by-partuuid/${root}" ++ ;; ++ block:PARTLABEL=*|PARTLABEL=*) ++ root="${root#block:}" ++ root="/dev/disk/by-partlabel/${root#PARTLABEL=}" ++ ;; ++ esac ++ ++ if ! [ -b "$root" ]; then ++ warn "Could not find rootfallback $root" ++ continue ++ fi ++ ++ if mount "$root" /sysroot; then ++ info "Mounted rootfallback $root" ++ exit 0 ++ else ++ warn "Failed to mount rootfallback $root" ++ exit 1 ++ fi ++done ++ ++[ -e "$job" ] && rm -f "$job" diff --git a/SOURCES/0021-btrfs-use-inst_hook-to-install-the-timeout-hook.patch b/SOURCES/0021-btrfs-use-inst_hook-to-install-the-timeout-hook.patch new file mode 100644 index 0000000..328413d --- /dev/null +++ b/SOURCES/0021-btrfs-use-inst_hook-to-install-the-timeout-hook.patch @@ -0,0 +1,23 @@ +From 6ea78f9f4eb405e6743e8be67836f9134d11e77b Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Mon, 7 Oct 2013 15:06:50 +0200 +Subject: [PATCH] btrfs: use inst_hook to install the timeout hook + +--- + modules.d/90btrfs/module-setup.sh | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/modules.d/90btrfs/module-setup.sh b/modules.d/90btrfs/module-setup.sh +index 638a0505..a2805946 100755 +--- a/modules.d/90btrfs/module-setup.sh ++++ b/modules.d/90btrfs/module-setup.sh +@@ -39,8 +39,7 @@ install() { + fi + + if ! dracut_module_included "systemd"; then +- inst_script "$moddir/btrfs_timeout.sh" \ +- /usr/lib/dracut/hooks/initqueue/timeout/btrfs_timeout.sh ++ inst_hook initqueue/timeout 10 "$moddir/btrfs_timeout.sh" + fi + + inst_multiple -o btrfsck btrfs-zero-log diff --git a/SOURCES/0022-lvm-install-thin-utils-for-non-hostonly.patch b/SOURCES/0022-lvm-install-thin-utils-for-non-hostonly.patch new file mode 100644 index 0000000..3ff05e2 --- /dev/null +++ b/SOURCES/0022-lvm-install-thin-utils-for-non-hostonly.patch @@ -0,0 +1,38 @@ +From 52d3c1b7267b6930fe6a835b4000546c5f106d0e Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 8 Oct 2013 10:30:00 +0200 +Subject: [PATCH] lvm: install thin utils for non-hostonly + +--- + modules.d/90lvm/module-setup.sh | 18 +++++++++++------- + 1 file changed, 11 insertions(+), 7 deletions(-) + +diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh +index f98ffffd..514addc1 100755 +--- a/modules.d/90lvm/module-setup.sh ++++ b/modules.d/90lvm/module-setup.sh +@@ -52,13 +52,17 @@ install() { + + inst lvm + +- get_host_lvs | while read line; do +- printf "%s" " rd.lvm.lv=$line" +- if ! [[ $_needthin ]]; then +- [[ "$(lvs --noheadings -o segtype ${line%%/*} 2>/dev/null)" == *thin* ]] && _needthin=1 +- fi +- done >> "${initdir}/etc/cmdline.d/90lvm.conf" +- echo >> "${initdir}/etc/cmdline.d/90lvm.conf" ++ if [[ $hostonly ]]; then ++ get_host_lvs | while read line; do ++ printf "%s" " rd.lvm.lv=$line" ++ if ! [[ $_needthin ]]; then ++ [[ "$(lvs --noheadings -o segtype ${line%%/*} 2>/dev/null)" == *thin* ]] && _needthin=1 ++ fi ++ done >> "${initdir}/etc/cmdline.d/90lvm.conf" ++ echo >> "${initdir}/etc/cmdline.d/90lvm.conf" ++ else ++ _needthin=1 ++ fi + + inst_rules "$moddir/64-lvm.rules" + diff --git a/SOURCES/0023-dracut.sh-do-not-bail-out-if-kernel-modules-dir-is-m.patch b/SOURCES/0023-dracut.sh-do-not-bail-out-if-kernel-modules-dir-is-m.patch new file mode 100644 index 0000000..0f4b236 --- /dev/null +++ b/SOURCES/0023-dracut.sh-do-not-bail-out-if-kernel-modules-dir-is-m.patch @@ -0,0 +1,38 @@ +From f0df0f3fcd0e79a697ec8bd45b9ce2e420f2820a Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 8 Oct 2013 15:03:40 +0200 +Subject: [PATCH] dracut.sh: do not bail out, if kernel modules dir is missing + +and only print a warning message +--- + dracut.sh | 11 ++++++----- + 1 file changed, 6 insertions(+), 5 deletions(-) + +diff --git a/dracut.sh b/dracut.sh +index e135dfc8..d9533dd0 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -496,17 +496,18 @@ if [[ $regenerate_all == "yes" ]]; then + ((ret+=$?)) + done + exit $ret +-elif [[ $kernel ]]; then +- if ! [[ -d /lib/modules/$kernel ]] && [[ $no_kernel != yes ]]; then +- printf -- "Kernel version $kernel has no modules in /lib/modules/$kernel\n" >&2 +- exit 1 +- fi + fi + + if ! [[ $kernel ]]; then + kernel=$(uname -r) + fi + ++if [[ $kernel ]]; then ++ if ! [[ -d /lib/modules/$kernel ]] && [[ $no_kernel != yes ]]; then ++ printf -- "Kernel version $kernel has no module directory /lib/modules/$kernel\n" >&2 ++ fi ++fi ++ + if ! [[ $outfile ]]; then + [[ -f /etc/machine-id ]] && read MACHINE_ID < /etc/machine-id + diff --git a/SOURCES/0024-dmsquash-live-add-dev-mapper-live-base.patch b/SOURCES/0024-dmsquash-live-add-dev-mapper-live-base.patch new file mode 100644 index 0000000..2216c06 --- /dev/null +++ b/SOURCES/0024-dmsquash-live-add-dev-mapper-live-base.patch @@ -0,0 +1,47 @@ +From 86fff83927ad194def97c60c2eef80099ebb1238 Mon Sep 17 00:00:00 2001 +From: "Brian C. Lane" <bcl@redhat.com> +Date: Tue, 8 Oct 2013 15:13:44 +0200 +Subject: [PATCH] dmsquash-live: add /dev/mapper/live-base + +This is similar to the reason for adding the +/run/initramfs/live-baseloop symlink -- access to the original live +image without overlays. + +livemedia-creator does not create a osmin.img, so there is no mountable +device for it to use when rsyncing the live image to the target. It +needs a device that points to the original live image without overlays. + +Note that lmc won't be creating osmin.img, since really isn't needed any +longer. Its purpose was to provide a minimal image that could be dd'd to +the target. Now that we use rsync this is no longer necessary. + +The included patch adds a /dev/mapper/live-base device that Anaconda can +use whether or not there is an osmin present. +--- + modules.d/90dmsquash-live/dmsquash-live-root.sh | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/modules.d/90dmsquash-live/dmsquash-live-root.sh b/modules.d/90dmsquash-live/dmsquash-live-root.sh +index 8951f80c..5705e8df 100755 +--- a/modules.d/90dmsquash-live/dmsquash-live-root.sh ++++ b/modules.d/90dmsquash-live/dmsquash-live-root.sh +@@ -144,6 +144,9 @@ do_live_overlay() { + over=$OVERLAY_LOOPDEV + fi + echo 0 $sz snapshot $base $over p 8 | dmsetup create live-rw ++ ++ # Create a device that always points to a ro base image ++ echo 0 $sz linear $base 0 | dmsetup create --readonly live-base + } + + # live cd helper function +@@ -225,9 +228,6 @@ if [ -n "$ROOTFLAGS" ]; then + ROOTFLAGS="-o $ROOTFLAGS" + fi + +-if [ -b "$BASE_LOOPDEV" ]; then +- ln -s $BASE_LOOPDEV /run/initramfs/live-baseloop +-fi + ln -s /dev/mapper/live-rw /dev/root + printf 'mount %s /dev/mapper/live-rw %s\n' "$ROOTFLAGS" "$NEWROOT" > $hookdir/mount/01-$$-live.sh + diff --git a/SOURCES/0025-Doc-cleanup-extend-and-split-and-reuse.patch b/SOURCES/0025-Doc-cleanup-extend-and-split-and-reuse.patch new file mode 100644 index 0000000..c04aa4e --- /dev/null +++ b/SOURCES/0025-Doc-cleanup-extend-and-split-and-reuse.patch @@ -0,0 +1,3212 @@ +From 84fe197facb96947638c518639c0913ecad1599b Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 8 Oct 2013 14:59:47 +0200 +Subject: [PATCH] Doc: cleanup, extend and split and reuse + +--- + Makefile | 8 +- + dracut.8.asc | 61 +-- + dracut.asc | 888 +------------------------------------------ + dracut.cmdline.7.asc | 414 +++++++++++--------- + dracut.css | 434 +-------------------- + dracut.modules.7.asc | 293 ++++++++++++++ + dracut.spec | 1 + + dracut.usage.asc | 526 +++++++++++++++++++++++++ + 8 files changed, 1084 insertions(+), 1541 deletions(-) + create mode 100644 dracut.modules.7.asc + create mode 100644 dracut.usage.asc + +diff --git a/Makefile b/Makefile +index 124a41b1..e7da9484 100644 +--- a/Makefile ++++ b/Makefile +@@ -21,7 +21,8 @@ man1pages = lsinitrd.1 + man5pages = dracut.conf.5 + + man7pages = dracut.cmdline.7 \ +- dracut.bootup.7 ++ dracut.bootup.7 \ ++ dracut.modules.7 + + man8pages = dracut.8 \ + dracut-catimages.8 \ +@@ -37,7 +38,6 @@ man8pages = dracut.8 \ + + manpages = $(man1pages) $(man5pages) $(man7pages) $(man8pages) + +- + .PHONY: install clean archive rpm testimage test all check AUTHORS doc dracut-version.sh + + all: dracut-version.sh dracut-install +@@ -76,7 +76,9 @@ endif + %.xml: %.asc + asciidoc -d manpage -b docbook -o $@ $< + +-dracut.html: dracut.asc $(manpages) dracut.css ++dracut.8: dracut.usage.asc dracut.8.asc ++ ++dracut.html: dracut.asc $(manpages) dracut.css dracut.usage.asc + asciidoc -a numbered -d book -b docbook -o dracut.xml dracut.asc + xsltproc -o dracut.html --xinclude -nonet \ + --stringparam custom.css.source dracut.css \ +diff --git a/dracut.8.asc b/dracut.8.asc +index 76fc75c4..584514c0 100644 +--- a/dracut.8.asc ++++ b/dracut.8.asc +@@ -10,7 +10,7 @@ dracut - low-level tool for generating an initramfs image + + SYNOPSIS + -------- +-*dracut* ['OPTION...'] [<image> [_<kernel version>_]] ++*dracut* [__OPTION...__] [__<image>__ [__<kernel version>__]] + + DESCRIPTION + ----------- +@@ -37,53 +37,10 @@ Additional debugging info can be produced by adding **rd.debug** to the kernel c + _/run/initramfs/rdsosreport.txt_ contains all logs and the output of some tools. + It should be attached to any report about dracut problems. + +-EXAMPLE +-------- +- +-To create a initramfs image, the most simple command is: +----- +-# dracut +----- +- +-This will generate a general purpose initramfs image, with all possible +-functionality resulting of the combination of the installed dracut modules and +-system tools. The image is /boot/initramfs-_++<kernel version>++_.img and +-contains the kernel modules of the currently active kernel with version +-_++<kernel version>++_. +- +-If the initramfs image already exists, dracut will display an error message, and +-to overwrite the existing image, you have to use the --force option. +----- +-# dracut --force +----- +- +-If you want to specify another filename for the resulting image you would issue +-a command like: +----- +-# dracut foobar.img +----- +- +-To generate an image for a specific kernel version, the command would be: +----- +-# dracut foobar.img 2.6.40-1.rc5.f20 +----- +- +-A shortcut to generate the image at the default location for a specific kernel +-version is: +----- +-# dracut --kver 2.6.40-1.rc5.f20 +----- +- +-If you want to create lighter, smaller initramfs images, you may want to specify +-the --hostonly or -H option. Using this option, the resulting image will +-contain only those dracut modules, kernel modules and filesystems, which are +-needed to boot this specific machine. This has the drawback, that you can't put +-the disk on another controller or machine, and that you can't switch to another +-root filesystem, without recreating the initramfs image. The usage of the +---hostonly option is only for experts and you will have to keep the broken +-pieces. At least keep a copy of a general purpose image (and corresponding +-kernel) as a fallback to rescue your system. ++USAGE ++----- + ++include::dracut.usage.asc[] + + OPTIONS + ------- +@@ -337,7 +294,7 @@ provide a valid _/etc/fstab_. + **-N, --no-hostonly**:: + Disable Host-Only mode + +-**--persistent-policy** _<policy>_:: ++**--persistent-policy** _<policy>_:: + Use _<policy>_ to address disks and partitions. + _<policy>_ can be any directory name found in /dev/disk. + E.g. "by-uuid", "by-label" +@@ -345,7 +302,7 @@ provide a valid _/etc/fstab_. + **--fstab**:: + Use _/etc/fstab_ instead of _/proc/self/mountinfo_. + +-**--add-fstab** _<filename>_ :: ++**--add-fstab** _<filename>_:: + Add entries of _<filename>_ to the initramfs /etc/fstab. + + **--mount** "_<device>_ _<mountpoint>_ _<filesystem type>_ _<filesystem options>_":: +@@ -358,13 +315,13 @@ provide a valid _/etc/fstab_. + LVM or an encrypted partition. + [NB --device can be used for compatibility with earlier releases] + +-**-i, --include** _<SOURCE>_ _<TARGET>_:: ++**-i, --include** _<SOURCE>_ _<TARGET>_:: + include the files in the SOURCE directory into the + TARGET directory in the final initramfs. If SOURCE is a file, it will be + installed to TARGET in the final initramfs. This parameter can be specified + multiple times. + +-**-I, --install** _<file list>_:: ++**-I, --install** _<file list>_:: + install the space separated list of files into the initramfs. + + + [NOTE] +@@ -481,7 +438,7 @@ _/etc/conf.d/_:: + _/etc/cmdline_:: + Can contain additional command line options. Deprecated, better use /etc/cmdline.d/*.conf. + +-_/etc/cmdline.d/*.conf:: ++_/etc/cmdline.d/*.conf_:: + Can contain additional command line options. + + AVAILABILITY +diff --git a/dracut.asc b/dracut.asc +index c0116581..031b2014 100644 +--- a/dracut.asc ++++ b/dracut.asc +@@ -1,7 +1,7 @@ + dracut + ====== + Harald Hoyer <harald@redhat.com> +-v2.0, March 2011 ++v3.0, October 2013 + + :language: bash + +@@ -145,885 +145,10 @@ This ensures, that all devices are disassembled and unmounted cleanly. + + = User Manual + +-== Creating an initramfs Image +-To create a initramfs image, the most simple command is: +----- +-# dracut +----- +- +-This will generate a general purpose initramfs image, with all possible +-functionality resulting of the combination of the installed dracut modules and +-system tools. The image is /boot/initramfs-_++<kernel version>++_.img and +-contains the kernel modules of the currently active kernel with version +-_++<kernel version>++_. +- +-If the initramfs image already exists, dracut will display an error message, and +-to overwrite the existing image, you have to use the --force option. +----- +-# dracut --force +----- +- +-If you want to specify another filename for the resulting image you would issue +-a command like: +----- +-# dracut foobar.img +----- +- +-To generate an image for a specific kernel version, the command would be: +----- +-# dracut foobar.img 2.6.40-1.rc5.f20 +----- +- +-A shortcut to generate the image at the default location for a specific kernel +-version is: +----- +-# dracut --kver 2.6.40-1.rc5.f20 +----- +- +-If you want to create lighter, smaller initramfs images, you may want to specify +-the --host-only or -H option. Using this option, the resulting image will +-contain only those dracut modules, kernel modules and filesystems, which are +-needed to boot this specific machine. This has the drawback, that you can't put +-the disk on another controller or machine, and that you can't switch to another +-root filesystem, without recreating the initramfs image. The usage of the +---host-only option is only for experts and you will have to keep the broken +-pieces. At least keep a copy of a general purpose image (and corresponding +-kernel) as a fallback to rescue your system. +- +-=== Inspecting the Contents +-To see the contents of the image created by dracut, you can use the lsinitrd tool. +----- +-# lsinitrd /boot/initramfs-$(uname -r).img | less +----- +- +-To display the contents of a file in the initramfs also use the lsinitrd tool: +----- +-# lsinitrd /boot/initramfs-$(uname -r).img /etc/ld.so.conf +-include ld.so.conf.d/*.conf +----- +- +-=== Adding dracut Modules +-Some dracut modules are turned off by default and have to be activated manually. +-You can do this by adding the dracut modules to the configuration file +-_/etc/dracut.conf_ or _/etc/dracut.conf.d/myconf.conf_. See <<dracutconf5>>. +-You can also add dracut modules on the command line +-by using the -a or --add option: +----- +-# dracut --add bootchart initramfs-bootchart.img +----- +- +-To see a list of available dracut modules, use the --list-modules option: +----- +-# dracut --list-modules +----- +- +-or, if you have a dracut version earlier than +008+, issue the command: +----- +-# for mod in /usr/lib/dracut/modules.d/*; do echo ${mod##*/??}; done +----- +- +-=== Omitting dracut Modules +-Sometimes you don't want a dracut module to be included for reasons of speed, +-size or functionality. To do this, either specify the omit_dracutmodules +-variable in the _dracut.conf_ or _/etc/dracut.conf.d/myconf.conf_ configuration +-file (see <<dracutconf5>>), or use the -o or --omit option +-on the command line: +----- +-# dracut -o "multipath lvm" no-multipath-lvm.img +----- +- +-=== Adding Kernel Modules +-If you need a special kernel module in the initramfs, which is not +-automatically picked up by dracut, you have the use the --add-drivers option +-on the command line or the drivers vaiable in the _/etc/dracut.conf_ +-or _/etc/dracut.conf.d/myconf.conf_ configuration file (see <<dracutconf5>>): +----- +-# dracut --add-drivers mymod initramfs-with-mymod.img +----- +- +-== Boot parameters +-The generated initramfs.img file normally does not contain any system +-configuration files (except for some special exceptions), so the configuration +-has to be done on the kernel command line. With this flexibility, you can easily +-boot from a changed root partition, without the need to recompile the initramfs +-image. So, you could completly change your root partition (move it inside a md +-raid with encryption and LVM on top), as long as you specify the correct +-filesystem LABEL or UUID on the kernel command line for your root device, dracut +-will find it and boot from it. +- +-The kernel command line usually can be configured in _/boot/grub/grub.conf_, if +-grub is your bootloader and it also can be edited in the real boot process in +-the grub menu. +- +-The kernel command line can also be provided by the dhcp server with the +-root-path option. See <<NetworkBoot>>. +- +-For a full reference of all kernel command line parameters, see <<dracut8>>. +- +-=== Specifying the root Device +-This is the only option dracut really needs to boot from your root partition. +-Because your root partition can live in various environments, there are a lot of +-formats for the root= option. The most basic one is root=_++<path to device +-node>++_: +----- +-root=/dev/sda2 +----- +- +-Because device node names can change, dependent on the drive ordering, you are +-encouraged to use the filesystem identifier (UUID) or filesystem label (LABEL) +-to specify your root partition: +----- +-root=UUID=19e9dda3-5a38-484d-a9b0-fa6b067d0331 +----- +- +-or +- +----- +-root=LABEL=myrootpartitionlabel +----- +- +-To see all UUIDs or LABELs on your system, do: +----- +-# ls -l /dev/disk/by-uuid +----- +- +-or +- +----- +-# ls -l /dev/disk/by-label +----- +- +-If your root partition is on the network see <<NetworkBoot>>. +- +-=== Keyboard Settings +-If you have to input passwords for encrypted disk volumes, you might want to set +-the keyboard layout and specify a display font. +- +-A typical german kernel command would contain: +----- +-vconsole.font=latarcyrheb-sun16 vconsole.keymap=de-latin1-nodeadkeys locale.LANG=de_DE.UTF-8 +----- +- +-Setting these options can override the setting stored on your system, if you use +-a modern init system, like systemd. +- +-For dracut versions prior to version +008+ the line would look like: +----- +-LANG=de_DE.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=de-latin1-nodeadkeys +----- +- +-=== Blacklisting Kernel Modules +-Sometimes it is required to prevent the automatic kernel module loading of a +-specific kernel module. To do this, just add rd.blacklist=_++<kernel module +-name>++_, with _++<kernel module name>++_ not containing the _.ko_ +-suffix, to the kernel command line. For example: +----- +-rd.driver.blacklist=mptsas rd.driver.blacklist=nouveau +----- +- +-The option can be specified multiple times on the kernel command line. +- +-=== Speeding up the Boot Process +-If you want to speed up the boot process, you can specify as much information +-for dracut on the kernel command as possible. For example, you can tell dracut, +-that you root partition is not on a LVM volume or not on a raid partition, or +-that it lives inside a specific crypto LUKS encrypted volume. By default, dracut +-searches everywhere. A typical dracut kernel command line for a plain primary or +-logical partition would contain: +----- +-rd.luks=0 rd.lvm=0 rd.md=0 rd.dm=0 +----- +- +-On systems with dracut version prior to +008+ the line would look like: +----- +-rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM +----- +- +-This turns off every automatic assembly of LVM, MD raids, DM raids and crypto LUKS. +- +-Of course, you could also omit the dracut modules in the initramfs creation +-process, but then you would lose the posibility to turn it on on demand. +- +- +-[[Injecting]] +-=== Injecting custom Files +-To add your own files to the initramfs image, you have several possibilities. +- +-The --include option let you specify a source path and a target path. For example +----- +-# dracut --include cmdline-preset /etc/cmdline.d/mycmdline.conf initramfs-cmdline-pre.img +----- +-will create an initramfs image, where the file cmdline-preset will be copied +-inside the initramfs to _/etc/cmdline.d/mycmdline.conf_. --include can only be specified once. +- +- +----- +-# mkdir rd.live.overlay +-# mkdir rd.live.overlay/etc +-# mkdir rd.live.overlay/etc/conf.d +-# mkdir rd.live.overlay/etc/cmdline.d +-# echo "ip=auto" >> rd.live.overlay/etc/cmdline.d/mycmdline.conf +-# echo export FOO=testtest >> rd.live.overlay/etc/conf.d/testvar.conf +-# echo export BAR=testtest >> rd.live.overlay/etc/conf.d/testvar.conf +-# tree rd.live.overlay/ +-rd.live.overlay/ +-└── etc +- ├── cmdline.d +- │ └── mycmdline.conf +- └── conf.d +- └── testvar.conf +- +-# dracut --include rd.live.overlay / initramfs-rd.live.overlay.img +----- +- +-This will put the contents of the rd.live.overlay directory into the root of the +-initramfs image. +- +-The --install option let you specify several files, which will get installed in +-the initramfs image at the same location, as they are present on initramfs +-creation time. +- +- +----- +-# dracut --install 'strace fsck.ext3 ssh' initramfs-dbg.img +----- +- +-This will create an initramfs with the strace, fsck.ext3 and ssh executables, +-together with the libraries needed to start those. The --install option can be +-specified multiple times. +- +- +-[[NetworkBoot]] +-== Network Boot +- +-If your root partition is on a network drive, you have to have the network +-dracut modules installed to create a network aware initramfs image. +- +-On a Red Hat Enterprise Linux or Fedora system, this means, you have to install +-the _dracut-network_ rpm package: +- +- +----- +-# yum install dracut-network +----- +- +-The resulting initramfs image can be served by a boot manager residing on your +-local hard drive or it can be served by a PXE/TFTP server. +- +-How to setup your PXE/TFTP server can be found in the +-http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Storage_Administration_Guide/[Red +-Hat Enterprise Linux Storage Administration Guide]. +- +-If you specify ip=auto on the kernel command line, then dracut asks a dhcp +-server about the ip adress for the machine. The dhcp server can also serve an +-additional root-path, which will set the root device for dracut. With this +-mechanism, you have static configuration on your client machine and a +-centralized boot configuration on your TFTP/DHCP server. If you can't pass a +-kernel command line, then you can inject _/etc/cmdline.d/mycmdline.conf_, with a method described +-in <<Injecting>>. +- +- +- +- +-=== Reducing the Image Size +- +-To reduce the size of the initramfs, you should create it with by ommitting all +-dracut modules, which you know, you don't need to boot the machine. +- +-You can also specify the exact dracut and kernel modules to produce a very tiny +-initramfs image. +- +-For example for a NFS image, you would do: +- +- +----- +-# dracut -m "nfs network base" initramfs-nfs-only.img +----- +- +-Then you would boot from this image with your target machine and reduce the size +-once more by creating it on the target machine with the --host-only option: +- +- +----- +-# dracut -m "nfs network base" --host-only initramfs-nfs-host-only.img +----- +- +-This will reduce the size of the initramfs image significantly. +- +- +- +-=== NFS Root Device +- +-FIXME +- +-=== iSCSI Root Device +- +-FIXME +- +-=== FCoE Root Device +- +-FIXME +- +-== Troubleshooting +- +-If the boot process does not succeed, you have several options to debug the +-situation. Some of the basic operations are covered here. For more information +-you should also visit: +-http://fedoraproject.org/wiki/How_to_debug_Dracut_problems +- +- +-[[identifying-your-problem-area]] +-=== Identifying your problem area +-. Remove ''rhgb'' and ''quiet'' from the kernel command line +-. Add ''rd.shell'' to the kernel command line. This will present a shell should +-dracut be unable to locate your root device +-. Add ''rd.shell rd.debug log_buf_len=1M'' to the kernel command line so that +-dracut shell commands are printed as they are executed +-. With dracut >= 002-11, you can inspect the rd.debug output with: +-+ +----- +-# less /run/initramfs/init.log +-# dmesg | less +----- +-. With dracut >= 022 and systemd, you can inspect the rd.debug output with: +----- +-# journalctl -ab +----- +-. With dracut >= 025 the file /run/initramfs/rdsosreport.txt is generated, which contains all the logs and the output of all significant tools, which are mentioned later. +- +-If you want to save that output, simply mount /boot by hand or insert an USB stick and mount that. +-Then you can store the output for later inspection. +- +-[[information-to-include-in-your-report]] +-=== Information to include in your report +- +-[[all-bug-reports]] +-==== All bug reports +-In all cases, the following should be mentioned and attached to your bug report: +- +-* The exact kernel command-line used. Typically from the bootloader +-configuration file (e.g. _/etc/grub.conf_) or from _/proc/cmdline_. +-* A copy of your disk partition information from _/etc/fstab_, which might be +-obtained booting an old working initramfs or a rescue medium. +-* A device listing from device-mapper. This can be obtained by running the +-command +-+ +----- +-# dmsetup ls --tree +----- +-+ +-* A list of block device attributes. This can be obtained by running the commands: +-+ +----- +-# blkid -p +-# blkid -p -o udev +----- +-* Turn on dracut debugging (see _the 'debugging dracut' section_), and attach +-all relevant information from the boot log. This can be obtained by running the +-command +-+ +----- +-# dmesg|grep dracut +----- +-+ +-* If you use a dracut configuration file, please include _/etc/dracut.conf_ and +-all files in _/etc/dracut.conf.d/*.conf_ +- +-[[logical-volume-management-related-problems]] +-==== Logical Volume Management related problems +-As well as the information from <<all-bug-reports>> include the following +-information: +- +-* Include physical volume information by running the command: +-+ +----- +-# lvm pvdisplay +----- +-+ +-* Include volume group information by running the command: +-+ +----- +-# lvm vgdisplay +----- +-+ +-* Include logical volume information by running the command: +-+ +----- +-# lvm lvdisplay +----- +- +-[[software-raid-related-problems]] +-==== Software RAID related problems +-As well as the information from <<all-bug-reports>>, include the following +-information: +- +-* If using software RAID disk partitions, please include the output of +-+ +----- +-# cat /proc/mdstat +----- +- +-[[network-root-device-related-problems]] +-==== Network root device related problems +-This section details information to include when experiencing problems on a +-system whose root device is located on a network attached volume (e.g. iSCSI, +-NFS or NBD). As well as the information from <<all-bug-reports>>, include the +-following information: +- +- +-* Please include the output of +-+ +----- +-# /sbin/ifup <interfacename> +-# ip addr show +----- +- +-[[debugging-dracut]] +-=== Debugging dracut +- +- +-[[configure-a-serial-console]] +-==== Configure a serial console +- +-Successfully debugging dracut will require some form of console +-logging during the system boot. This section documents configuring a +-serial console connection to record boot messages. +- +-. First, enable serial console output for both the kernel and the bootloader. +-. Open the file _/etc/grub.conf_ for editing. Below the line ''timeout=5'', add +-the following: +-+ +----- +-serial --unit=0 --speed=9600 +-terminal --timeout=5 serial console +----- +-+ +-. Also in _/etc/grub.conf_, add the following boot arguemnts to the ''kernel'' +-line: +-+ +----- +-console=tty0 console=ttyS0,9600 +----- +-+ +-. When finished, the _/etc/grub.conf_ file should look similar to the example +-below. +-+ +----- +-default=0 +-timeout=5 +-serial --unit=0 --speed=9600 +-terminal --timeout=5 serial console +-title Fedora (2.6.29.5-191.fc11.x86_64) +- root (hd0,0) +- kernel /vmlinuz-2.6.29.5-191.fc11.x86_64 ro root=/dev/mapper/vg_uc1-lv_root console=tty0 console=ttyS0,9600 +- initrd /dracut-2.6.29.5-191.fc11.x86_64.img +----- +-+ +-. More detailed information on how to configure the kernel for console output +-can be found at +-http://www.faqs.org/docs/Linux-HOWTO/Remote-Serial-Console-HOWTO.html#CONFIGURE-KERNEL. +-. Redirecting non-interactive output +-+ +--- +-NOTE: You can redirect all non-interactive output to _/dev/kmsg_ and the kernel +-will put it out on the console when it reaches the kernel buffer by doing +- +----- +-# exec >/dev/kmsg 2>&1 </dev/console +----- +--- +- +-[[using-the-dracut-shell]] +-==== Using the dracut shell +- +-dracut offers a shell for interactive debugging in the event dracut fails to +-locate your root filesystem. To enable the shell: +- +-. Add the boot parameter ''rd.shell'' to your bootloader configuration file +-(e.g. _/etc/grub.conf_) +-. Remove the boot arguments ''rhgb'' and ''quiet'' +-+ +-A sample _/etc/grub.conf_ bootloader configuration file is listed below. +-+ +----- +-default=0 +-timeout=5 +-serial --unit=0 --speed=9600 +-terminal --timeout=5 serial console +-title Fedora (2.6.29.5-191.fc11.x86_64) +- root (hd0,0) +- kernel /vmlinuz-2.6.29.5-191.fc11.x86_64 ro root=/dev/mapper/vg_uc1-lv_root console=tty0 rd.shell +- initrd /dracut-2.6.29.5-191.fc11.x86_64.img +----- +-+ +-. If system boot fails, you will be dropped into a shell as seen in the example below. +-+ +----- +-No root device found +-Dropping to debug shell. +- +-# +----- +-+ +-. Use this shell prompt to gather the information requested above (see <<all-bug-reports>>). +- +-[[accessing-the-root-volume-from-the-dracut-shell]] +-==== Accessing the root volume from the dracut shell +-From the dracut debug shell, you can manually perform the task of locating and +-preparing your root volume for boot. The required steps will depend on how your +-root volume is configured. Common scenarios include: +- +-* A block device (e.g. _/dev/sda7_) +-* A LVM logical volume (e.g. _/dev/VolGroup00/LogVol00_) +-* An encrypted device (e.g. _/dev/mapper/luks-4d5972ea-901c-4584-bd75-1da802417d83_) +-* A network attached device (e.g. netroot=iscsi:@192.168.0.4::3260::iqn.2009-02.org.fedoraproject:for.all) +- +-The exact method for locating and preparing will vary. However, to continue with +-a successful boot, the objective is to locate your root volume and create a +-symlink _/dev/root_ which points to the file system. For example, the following +-example demonstrates accessing and booting a root volume that is an encrypted +-LVM Logical volume. +- +-. Inspect your partitions using parted +-+ +----- +-# parted /dev/sda -s p +-Model: ATA HTS541060G9AT00 (scsi) +-Disk /dev/sda: 60.0GB +-Sector size (logical/physical): 512B/512B +-Partition Table: msdos +-Number Start End Size Type File system Flags +-1 32.3kB 10.8GB 107MB primary ext4 boot +-2 10.8GB 55.6GB 44.7GB logical lvm +----- +-+ +-. You recall that your root volume was a LVM logical volume. Scan and activate +-any logical volumes. +-+ +----- +-# lvm vgscan +-# lvm vgchange -ay +----- +-+ +-. You should see any logical volumes now using the command blkid: +-+ +----- +-# blkid +-/dev/sda1: UUID="3de247f3-5de4-4a44-afc5-1fe179750cf7" TYPE="ext4" +-/dev/sda2: UUID="Ek4dQw-cOtq-5MJu-OGRF-xz5k-O2l8-wdDj0I" TYPE="LVM2_member" +-/dev/mapper/linux-root: UUID="def0269e-424b-4752-acf3-1077bf96ad2c" TYPE="crypto_LUKS" +-/dev/mapper/linux-home: UUID="c69127c1-f153-4ea2-b58e-4cbfa9257c5e" TYPE="ext3" +-/dev/mapper/linux-swap: UUID="47b4d329-975c-4c08-b218-f9c9bf3635f1" TYPE="swap" +----- +-+ +-. From the output above, you recall that your root volume exists on an encrypted +-block device. Following the guidance disk encryption guidance from the +-Installation Guide, you unlock your encrypted root volume. +-+ +----- +-# UUID=$(cryptsetup luksUUID /dev/mapper/linux-root) +-# cryptsetup luksOpen /dev/mapper/linux-root luks-$UUID +-Enter passphrase for /dev/mapper/linux-root: +-Key slot 0 unlocked. +----- +-+ +-. Next, make a symbolic link to the unlocked root volume +-+ +----- +-# ln -s /dev/mapper/luks-$UUID /dev/root +----- +-+ +-. With the root volume available, you may continue booting the system by exiting +-the dracut shell +-+ +----- +-# exit +----- +- +-[[additional-dracut-boot-parameters]] +-==== Additional dracut boot parameters +-For more debugging options, see <<dracutkerneldebug>> in <<dracutcmdline7>>. +- +- +-[[debugging-dracut-on-shutdown]] +-==== Debugging dracut on shutdown +- +-To debug the shutdown sequence on systemd systems, you can _rd.break_ +-on _pre-shutdown_ or _shutdown_. +- +-To do this from an already booted system: +----- +-# mkdir -p /run/initramfs/etc/cmdline.d +-# echo "rd.break=pre-shutdown" > /run/initramfs/etc/cmdline.d/debug.conf +-# touch /run/initramfs/.need_shutdown +----- +- +-This will give you a dracut shell after the system pivot'ed back in the initramfs. +- +- +-= Developer Manual +- +-== dracut Components +- +-dracut uses a modular system to build and extend the initramfs image. All +-modules are located in _/usr/lib/dracut/modules.d_ or in _<git-src>/modules.d_. +-The most basic dracut module is _99base_. In _99base_ the initial shell script +-init is defined, which gets run by the kernel after initramfs loading. Although +-you can replace init with your own version of _99base_, this is not encouraged. +-Instead you should use, if possible, the hooks of dracut. All hooks, and the +-point of time in which they are executed, are described in <<stages>>. +- +-The main script, which creates the initramfs is dracut itsself. It parses all +-arguments and sets up the directory, in which everything is installed. It then +-executes all check, install, installkernel scripts found in the modules, which +-are to be processed. After everything is installed, the install directory is +-archived and compressed to the final initramfs image. All helper functions used +-by check, install and installkernel are found in in the file _dracut-functions_. +-These shell functions are available to all module installer (install, +-installkernel) scripts, without the need to source _dracut-functions_. +- +-A module can check the preconditions for install and installkernel with the +-check script. Also dependencies can be expressed with check. If a module passed +-check, install and installkernel will be called to install all of the necessary +-files for the module. To split between kernel and non-kernel parts of the +-installation, all kernel module related parts have to be in installkernel. All +-other files found in a module directory are module specific and mostly are hook +-scripts and udev rules. +- +- +-[[stages]] +-== Boot Process Stages +- +-dracut modules can insert custom script at various points, to control the boot +-process. +-These hooks are plain directories containing shell scripts ending with ".sh", +-which are sourced by init. +-Common used functions are in _dracut-lib.sh_, which can be sourced by any script. +- +-=== Hook: cmdline +- +-The _cmdline_ hook is a place to insert scripts to parse the kernel command line +-and prepare the later actions, like setting up udev rules and configuration +-files. +- +-In this hook the most important environment variable is defined: root. The +-second one is rootok, which indicates, that a module claimed to be able to parse +-the root defined. So for example, **root=**__iscsi:....__ will be claimed by the +-iscsi dracut module, which then sets rootok. +- +-=== Hook: pre-udev +- +-This hook is executed right after the cmdline hook and a check if root and +-rootok were set. Here modules can take action with the final root, and before +-udev has been run. +- +-=== Start Udev +- +-Now udev is started and the logging for udev is setup. +- +-=== Hook: pre-trigger +- +-In this hook, you can set udev environment variables with **udevadm control +---property=KEY=_value_** or control the further execution of udev with +-udevadm. +- +-=== Trigger Udev +- +-udev is triggered by calling udevadm trigger, which sends add events for all +-devices and subsystems. +- +-=== Main Loop +- +-In the main loop of dracut loops until udev has settled and +-all scripts in _initqueue/finished_ returned true. +-In this loop there are three hooks, where scripts can be inserted +-by calling /sbin/initqueue. +- +-==== Initqueue +- +-This hook gets executed every time a script is inserted here, regardless of the +-udev state. +- +-==== Initqueue settled +- +-This hooks (initqueue/settled) gets executed every time udev has settled. +- +- +-==== Initqueue timeout +- +-This hooks (initqueue/timeout) gets executed, when the main loop counter becomes half of the +-rd.retry counter. +- +-==== Initqueue finished +- +-This hook (initqueue/finished) is called after udev has settled and +-if all scripts herein return 0 the main loop will be ended. +-Abritary scripts can be added here, to loop in the +-initqueue until something happens, which a dracut module wants to wait for. +- +-=== Hook: pre-mount +- +-Before the root device is mounted all scripts in the hook pre-mount are +-executed. In some cases (e.g. NFS) the real root device is already mounted, +-though. +- +-=== Hook: mount +- +-This hook is mainly to mount the real root device. +- +-=== Hook: pre-pivot +- +-This hook is called before cleanup hook, This is a good place for +-actions other than cleanups which need to be called before pivot. +- +-=== Hook: cleanup +- +-This hook is the last hook and is called before init finally switches root to +-the real root device. This is a good place to clean up and kill processes not +-needed anymore. +- +- +-=== Cleanup and switch_root +- +-Init (or systemd) kills all udev processes, cleans up the environment, +-sets up the arguments for the real init process and finally calls switch_root. +-switch_root removes the whole filesystem hierarchy of the initramfs, +-chroot()s to the real root device and calls /sbin/init with the specified arguments. +- +-To ensure all files in the initramfs hierarchy can be removed, all processes +-still running from the initramfs should not have any open file descriptors left. +- +-== Network Infrastructure +- +-FIXME +- +-== Writing a Module +- +-A simple example module is _96insmodpost_, which modprobes a kernel module after +-udev has settled and the basic device drivers have been loaded. +- +-All module installation information is in the file module-setup.sh. +- +-First we create a check() function, which just exits with 0 indicating that this +-module should be included by default. +- +-check(): +----- +-return 0 +----- +- +-The we create the install() function, which installs a cmdline hook with +-priority number 20 called _parse-insmodpost.sh_. It also installs the +-_insmodpost.sh_ script in _/sbin_. +- +-install(): +----- +-inst_hook cmdline 20 "$moddir/parse-insmodpost.sh" +-inst_simple "$moddir/insmodpost.sh" /sbin/insmodpost.sh +----- +- +-The _pase-instmodpost.sh_ parses the kernel command line for a argument +-rd.driver.post, blacklists the module from being autoloaded and installs the +-hook _insmodpost.sh_ in the _initqueue/settled_. +- +-_parse-insmodpost.sh_: +----- +-for p in $(getargs rd.driver.post=); do +- echo "blacklist $p" >> /etc/modprobe.d/initramfsblacklist.conf +- _do_insmodpost=1 +-done +- +-[ -n "$_do_insmodpost" ] && /sbin/initqueue --settled --unique --onetime /sbin/insmodpost.sh +-unset _do_insmodpost +- +----- +- +-_insmodpost.sh_, which is called in the _initqueue/settled_ hook will just +-modprobe the kernel modules specified in all rd.driver.post kernel command line +-parameters. It runs after udev has settled and is only called once (--onetime). +- +-_insmodpost.sh_: +----- +-. /lib/dracut-lib.sh +- +-for p in $(getargs rd.driver.post=); do +- modprobe $p +-done +- +----- +- +- +- +-=== check() +- +-_check()_ is called by dracut to evaluate the inclusion of a dracut module in +-the initramfs. +- +-$hostonly:: If the $hostonly variable is set, then the module check() function +-should be in "hostonly" mode, which means, that the check() should only return +-0, if the module is really needed to boot this specific host. +- +-check() should return with: +- +-0:: Include the dracut module in the initramfs. +- +-1:: Do not include the dracut module. The requirements are not fullfilled +-(missing tools, etc.) +- +-255:: Only include the dracut module, if another module requires it or if +-explicitly specified in the config file or on the argument list. +- +- +- +-=== depends() +- +-The function depends() should echo all other dracut module names the module +-depends on. +- +- +- +-=== install() +- +-inst_multiple +- +-inst +- +-inst_hook +- +-inst_rules +- +- +- +- +- +-=== installkernel() +- +-instmods +- +- +- +-=== Creation Functions +- +-FIXME +- +- +-=== Initramfs Functions +- +-FIXME +- +- +-=== Network Modules +- +-FIXME +- + :leveloffset: 1 +-[[dracutbootup7]] +-include::dracut.bootup.7.asc[] +- +-:leveloffset: 1 +-[[dracut8]] + include::dracut.8.asc[] + ++:leveloffset: 1 + [[dracutconf5]] + include::dracut.conf.5.asc[] + +@@ -1036,6 +161,15 @@ include::lsinitrd.1.asc[] + [[mkinitrd8]] + include::mkinitrd.8.asc[] + ++= Developer Manual ++ ++:leveloffset: 1 ++[[dracutmodules7]] ++include::dracut.modules.7.asc[] ++ ++[[dracutbootup7]] ++include::dracut.bootup.7.asc[] ++ + :leveloffset: 0 + [appendix] + License +diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc +index 4b2ab035..19bfb939 100644 +--- a/dracut.cmdline.7.asc ++++ b/dracut.cmdline.7.asc +@@ -31,16 +31,16 @@ line is the value, which is honored. + + Standard + ~~~~~~~~ +-**init=**_<path to real init>_:: ++**init=**__<path to real init>__:: + specify the path to the init programm to be started after the initramfs has + finished + +-**root=**_<path to blockdevice>_:: ++**root=**__<path to blockdevice>__:: + specify the block device to use as the root filesystem. + + +-E.g.: +-+ +----- ++[listing] ++.Example ++-- + root=/dev/sda1 + root=/dev/disk/by-path/pci-0000:00:1f.1-scsi-0:0:1:0-part1 + root=/dev/disk/by-label/Root +@@ -48,15 +48,17 @@ root=LABEL=Root + root=/dev/disk/by-uuid/3f5ad593-4546-4a94-a374-bcfb68aa11f7 + root=UUID=3f5ad593-4546-4a94-a374-bcfb68aa11f7 + root=PARTUUID=3f5ad593-4546-4a94-a374-bcfb68aa11f7 +----- ++-- + +-**rootfstype=**_<filesystem type>_:: "auto" if not specified, e.g.: ++**rootfstype=**__<filesystem type>__:: "auto" if not specified. + + +----- ++[listing] ++.Example ++-- + rootfstype=ext3 +----- ++-- + +-**rootflags=**_<mount options>_:: ++**rootflags=**__<mount options>__:: + specify additional mount options for the root filesystem. If not set, + _/etc/fstab_ of the real root will be parsed for special mount options and + mounted accordingly. +@@ -69,7 +71,7 @@ rootfstype=ext3 + force mounting _/_ and _/usr_ (if it is a separate device) read-write. + See also ro option. + +-**rootfallback=**_<path to blockdevice>_:: ++**rootfallback=**__<path to blockdevice>__:: + specify the block device to use as the root filesystem, if the normal root cannot be found. + This can only be a simple block device with a simple file system, for which the filesystem + driver is either compiled in, or added manually to the initramfs. +@@ -83,16 +85,16 @@ rootfstype=ext3 + do not honor special mount options for the root filesystem found in + _/etc/fstab_ of the real root. + +-**resume=**_<path to resume partition>_:: ++**resume=**__<path to resume partition>__:: + resume from a swap partition + + +-E.g.: +-+ +----- ++[listing] ++.Example ++-- + resume=/dev/disk/by-path/pci-0000:00:1f.1-scsi-0:0:1:0-part1 + resume=/dev/disk/by-uuid/3f5ad593-4546-4a94-a374-bcfb68aa11f7 + resume=UUID=3f5ad593-4546-4a94-a374-bcfb68aa11f7 +----- ++-- + + **rd.skipfsck**:: + skip fsck for rootfs and _/usr_. If you're mounting _/usr_ read-only and +@@ -102,19 +104,19 @@ resume=UUID=3f5ad593-4546-4a94-a374-bcfb68aa11f7 + + Misc + ~~~~ +-**rd.driver.blacklist=**_<drivername>[,<drivername>,...]_:: ++**rd.driver.blacklist=**__<drivername>__[,__<drivername>__,...]:: + do not load kernel module <drivername>. This parameter can be specified + multiple times. + +-**rd.driver.pre=**_<drivername>[,<drivername>,...]_:: ++**rd.driver.pre=**__<drivername>__[,__<drivername>__,...]:: + force loading kernel module <drivername>. This parameter can be specified + multiple times. + +-**rd.driver.post=**_<drivername>[,<drivername>,...]_:: ++**rd.driver.post=**__<drivername>__[,__<drivername>__,...]:: + force loading kernel module <drivername> after all automatic loading modules + have been loaded. This parameter can be specified multiple times. + +-**rd.retry=**_<seconds>_:: ++**rd.retry=**__<seconds>__:: + specify how long dracut should wait for devices to appear. + The default is 30 seconds. After 2/3 of the time, degraded raids are force + started. If you have hardware, which takes a very long time to announce its +@@ -123,7 +125,7 @@ Misc + **rd.noverifyssl**:: + accept self-signed certificates for ssl downloads. + +-**rd.ctty=**_<terminal device>_**:: ++**rd.ctty=**__<terminal device>__:: + specify the controlling terminal for the console. + This is useful, if you have multiple "console=" arguments. + +@@ -150,17 +152,20 @@ It should be attached to any report about dracut problems. + If "quiet" is set, it also logs to the console. + + **rd.memdebug=[0-3]**:: +- Print memory usage info at various points, set the verbose level from 0 to 3 ++ Print memory usage info at various points, set the verbose level from 0 to 3. + + Higher level means more debugging output: +++ ++---- + 0 - no output + 1 - partial /proc/meminfo + 2 - /proc/meminfo + 3 - /proc/meminfo + /proc/slabinfo ++---- + + **rd.break**:: + drop to a shell at the end + +-**rd.break=**_{cmdline|pre-udev|pre-trigger|initqueue|pre-mount|mount|pre-pivot|cleanup}_:: ++**rd.break=**__{cmdline|pre-udev|pre-trigger|initqueue|pre-mount|mount|pre-pivot|cleanup}__:: + drop to a shell on defined breakpoint + + **rd.udev.info**:: +@@ -171,50 +176,56 @@ It should be attached to any report about dracut problems. + + I18N + ~~~~ +-**vconsole.keymap=**_<keymap base file name>_:: ++**rd.vconsole.keymap=**__<keymap base file name>__:: + keyboard translation table loaded by loadkeys; taken from keymaps directory; +- will be written as KEYMAP to _/etc/vconsole.conf_ in the initramfs, e.g.: ++ will be written as KEYMAP to _/etc/vconsole.conf_ in the initramfs. + + +----- +-vconsole.keymap=de-latin1-nodeadkeys +----- ++[listing] ++.Example ++-- ++rd.vconsole.keymap=de-latin1-nodeadkeys ++-- + +-**vconsole.keymap.ext=**_<list of keymap base file names>_:: ++**rd.vconsole.keymap.ext=**__<list of keymap base file names>__:: + list of extra keymaps to bo loaded (sep. by space); will be written as + EXT_KEYMAP to _/etc/vconsole.conf_ in the initramfs + +-**vconsole.unicode**[=_{0|1}_]:: ++**rd.vconsole.unicode**:: + boolean, indicating UTF-8 mode; will be written as UNICODE to + _/etc/vconsole.conf_ in the initramfs + +-**vconsole.font=**_<font base file name>_:: ++**rd.vconsole.font=**__<font base file name>__:: + console font; taken from consolefonts directory; will be written as FONT to +- _/etc/vconsole.conf_ in the initramfs; e.g.: ++ _/etc/vconsole.conf_ in the initramfs. + + +----- +-vconsole.font=LatArCyrHeb-16 +----- ++[listing] ++.Example ++-- ++rd.vconsole.font=LatArCyrHeb-16 ++-- + +-**vconsole.font.map=**_<console map base file name>_:: ++**rd.vconsole.font.map=**__<console map base file name>__:: + see description of '-m' parameter in setfont manual; taken from consoletrans + directory; will be written as FONT_MAP to _/etc/vconsole.conf_ in the + initramfs + +-**vconsole.font.unimap=**_<unicode table base file name>_:: ++**rd.vconsole.font.unimap=**__<unicode table base file name>__:: + see description of '-u' parameter in setfont manual; taken from unimaps + directory; will be written as FONT_UNIMAP to _/etc/vconsole.conf_ in the + initramfs + +-**locale.LANG=**_<locale>_:: ++**rd.locale.LANG=**__<locale>__:: + taken from the environment; if no UNICODE is defined we set its value in + basis of LANG value (whether it ends with ".utf8" (or similar) or not); will +- be written as LANG to _/etc/locale.conf_ in the initramfs; e.g.: ++ be written as LANG to _/etc/locale.conf_ in the initramfs. + + +----- +-locale.LANG=pl_PL.utf8 +----- ++[listing] ++.Example ++-- ++rd.locale.LANG=pl_PL.utf8 ++-- + +-**locale.LC_ALL=**_<locale>_:: ++**rd.locale.LC_ALL=**__<locale>__:: + taken from the environment; will be written as LC_ALL to _/etc/locale.conf_ + in the initramfs + +@@ -223,11 +234,11 @@ LVM + **rd.lvm=0**:: + disable LVM detection + +-**rd.lvm.vg=**_<volume group name>_:: ++**rd.lvm.vg=**__<volume group name>__:: + only activate the volume groups with the given name. rd.lvm.vg can be + specified multiple times on the kernel command line. + +-**rd.lvm.lv=**_<logical volume name>_:: ++**rd.lvm.lv=**__<logical volume name>__:: + only activate the logical volumes with the given name. rd.lvm.lv can be + specified multiple times on the kernel command line. + +@@ -239,14 +250,14 @@ crypto LUKS + **rd.luks=0**:: + disable crypto LUKS detection + +-**rd.luks.uuid=**_<luks uuid>_:: ++**rd.luks.uuid=**__<luks uuid>__:: + only activate the LUKS partitions with the given UUID. Any "luks-" of the + LUKS UUID is removed before comparing to _<luks uuid>_. + The comparisons also matches, if _<luks uuid>_ is only the beginning of the + LUKS UUID, so you don't have to specify the full UUID. + This parameter can be specified multiple times. + +-**rd.luks.allow-discards=**_<luks uuid>_:: ++**rd.luks.allow-discards=**__<luks uuid>__:: + Allow using of discards (TRIM) requests for LUKS partitions with the given UUID. + Any "luks-" of the LUKS UUID is removed before comparing to _<luks uuid>_. + The comparisons also matches, if _<luks uuid>_ is only the beginning of the +@@ -261,16 +272,18 @@ crypto LUKS + + crypto LUKS - key on removable device support + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +-**rd.luks.key=**_<keypath>:<keydev>:<luksdev>_:: ++**rd.luks.key=**__<keypath>__:__<keydev>__:__<luksdev>__:: + _keypath_ is a path to key file to look for. It's REQUIRED. When _keypath_ ends with '.gpg' it's considered to be key encrypted symmetrically with GPG. You will be prompted for password on boot. GPG support comes with 'crypt-gpg' module which needs to be added explicitly. + + + _keydev_ is a device on which key file resides. It might be kernel name of devices (should start with "/dev/"), UUID (prefixed with "UUID=") or label (prefix with "LABEL="). You don't have to specify full UUID. Just its beginning will suffice, even if its ambiguous. All matching devices will be probed. This parameter is recommended, but not required. If not present, all block devices will be probed, which may significantly increase boot time. + + + If _luksdev_ is given, the specified key will only be applied for that LUKS device. Possible values are the same as for _keydev_. Unless you have several LUKS devices, you don't have to specify this parameter. The simplest usage is: + + +----- ++[listing] ++.Example ++-- + rd.luks.key=/foo/bar.key +----- ++-- + + + As you see, you can skip colons in such a case. + + +@@ -281,20 +294,20 @@ to crypsetup luksFormat with _-d -_, too! + + Here follows example for key encrypted with GPG: + +----- +-gpg --quiet --decrypt rootkey.gpg \ +-| cryptsetup -d - -v \ +---cipher serpent-cbc-essiv:sha256 \ ++[listing] ++-- ++gpg --quiet --decrypt rootkey.gpg | \ ++cryptsetup -d - -v --cipher serpent-cbc-essiv:sha256 \ + --key-size 256 luksFormat /dev/sda3 +----- ++-- + + If you use plain keys, just add path to _-d_ option: + +----- +-cryptsetup -d rootkey.key -v \ +---cipher serpent-cbc-essiv:sha256 \ +---key-size 256 luksFormat /dev/sda3 +----- ++[listing] ++-- ++cryptsetup -d rootkey.key -v --cipher serpent-cbc-essiv:sha256 \ ++ --key-size 256 luksFormat /dev/sda3 ++-- + =============================== + + MD RAID +@@ -314,7 +327,7 @@ MD RAID + **rd.md.waitclean=1**:: + wait for any resync, recovery, or reshape activity to finish before continuing + +-**rd.md.uuid=**_<md raid uuid>_:: ++**rd.md.uuid=**__<md raid uuid>__:: + only activate the raid sets with the given UUID. This parameter can be + specified multiple times. + +@@ -323,7 +336,7 @@ DM RAID + **rd.dm=0**:: + disable DM RAID detection + +-**rd.dm.uuid=**_<dm raid uuid>_:: ++**rd.dm.uuid=**__<dm raid uuid>__:: + only activate the raid sets with the given UUID. This parameter can be + specified multiple times. + +@@ -332,15 +345,17 @@ FIPS + **rd.fips**:: + enable FIPS + +-**boot=**_<boot device>_:: +- specify the device, where /boot is located. e.g. ++**boot=**__<boot device>__:: ++ specify the device, where /boot is located. + + +----- ++[listing] ++.Example ++-- + boot=/dev/sda1 + boot=/dev/disk/by-path/pci-0000:00:1f.1-scsi-0:0:1:0-part1 + boot=UUID=<uuid> + boot=LABEL=<label> +----- ++-- + + **rd.fips.skipkernel**:: + skip checksum check of the kernel image. Useful, if the kernel image is not +@@ -348,7 +363,66 @@ boot=LABEL=<label> + + Network + ~~~~~~~ +-**ip=**_{dhcp|on|any|dhcp6|auto6|ibft}_:: ++ ++[IMPORTANT] ++===================== ++It is recommended to either bind an interface to a MAC with the **ifname** argument, ++or to use the systemd-udevd predictable network interface names. ++ ++Predictable network interface device names based on: ++ ++- firmware/bios-provided index numbers for on-board devices ++- firmware-provided pci-express hotplug slot index number ++- physical/geographical location of the hardware ++- the interface's MAC address ++ ++See: http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames ++ ++Two character prefixes based on the type of interface: ++ ++en:: ethernet ++wl:: wlan ++ww:: wwan ++ ++Type of names: ++ ++o<index>:: on-board device index number ++s<slot>[f<function>][d<dev_id>]:: hotplug slot index number ++x<MAC>:: MAC address ++[P<domain>]p<bus>s<slot>[f<function>][d<dev_id>]:: PCI geographical location ++[P<domain>]p<bus>s<slot>[f<function>][u<port>][..][c<config>][i<interface>]:: USB port number chain ++ ++All multi-function PCI devices will carry the [f<function>] number in the ++device name, including the function 0 device. ++ ++When using PCI geography, The PCI domain is only prepended when it is not 0. ++ ++For USB devices the full chain of port numbers of hubs is composed. If the ++name gets longer than the maximum number of 15 characters, the name is not ++exported. ++The usual USB configuration == 1 and interface == 0 values are suppressed. ++ ++PCI ethernet card with firmware index "1":: ++* eno1 ++ ++PCI ethernet card in hotplug slot with firmware index number:: ++* ens1 ++ ++PCI ethernet multi-function card with 2 ports:: ++* enp2s0f0 ++* enp2s0f1 ++ ++PCI wlan card:: ++* wlp3s0 ++ ++USB built-in 3G modem:: ++* wwp0s29u1u4i6 ++ ++USB Android phone:: ++* enp0s29u1u2 ++===================== ++ ++**ip=**__{dhcp|on|any|dhcp6|auto6|ibft}__:: + dhcp|on|any::: get ip from dhcp server from all interfaces. If root=dhcp, loop + sequentially through all interfaces (eth0, eth1, ...) and use the first with + a valid DHCP root-path. +@@ -359,7 +433,7 @@ Network + + ibft::: iBFT autoconfiguration + +-**ip=**_<interface>_:_{dhcp|on|any|dhcp6|auto6}_[:[_<mtu>_][:_<macaddr>_]]:: ++**ip=**__<interface>__:__{dhcp|on|any|dhcp6|auto6}__[:[__<mtu>__][:__<macaddr>__]]:: + This parameter can be specified multiple times. + + + ===================== +@@ -370,16 +444,7 @@ cannot be used in conjunction with the **ifname** argument for the + same <interface>. + ===================== + +-[IMPORTANT] +-===================== +-It is recommended to either bind <interface> to a MAC with the **ifname** +-argument. Or use biosdevname to name your interfaces, which will then have names according to their hardware location. +- +-em<port>::: for embedded NICs +-p<slot>#<port>_<virtual instance>::: for cards in PCI slots +-===================== +- +-**ip=**_<client-IP>_:_<server-IP>_:_<gateway-IP>_:_<netmask>_:_<client_hostname>_:_<interface>_:_{none|off|dhcp|on|any|dhcp6|auto6|ibft}_[:[_<mtu>_][:_<macaddr>_]]:: ++**ip=**__<client-IP>__:__<server-IP>__:__<gateway-IP>__:__<netmask>__:__<client_hostname>__:__<interface>__:__{none|off|dhcp|on|any|dhcp6|auto6|ibft}__:[:[__<mtu>__][:__<macaddr>__]]:: + explicit network configuration. If you want do define a IPv6 address, put it + in brackets (e.g. [2001:DB8::1]). This parameter can be specified multiple + times. +@@ -390,25 +455,14 @@ cannot be used in conjunction with the **ifname** argument for the + same <interface>. + ===================== + +-[IMPORTANT] +-===================== +-It is recommended to either bind <interface> to a MAC with the **ifname** +-argument. Or use biosdevname to name your interfaces, which will then have names according to their hardware location. +- +-em<port>::: for embedded NICs +-p<slot>#<port>_<virtual instance>::: for cards in PCI slots +-===================== +- +-**ifname=**_<interface>_:_<MAC>_:: ++**ifname=**__<interface>__:__<MAC>__:: + Assign network device name <interface> (ie "bootnet") to the NIC with MAC <MAC>. + + +-[IMPORTANT] +- +-Do **not** use the default kernel naming scheme for the interface name, ++WARNING: Do **not** use the default kernel naming scheme for the interface name, + as it can conflict with the kernel names. So, don't use "eth[0-9]+" for the + interface name. Better name it "bootnet" or "bluesocket". + +-**bootdev=**_<interface>_:: ++**bootdev=**__<interface>__:: + specify network interface to use routing and netroot information from. + Required if multiple ip= lines are used. + +@@ -421,12 +475,12 @@ interface name. Better name it "bootnet" or "bluesocket". + **rd.neednet=1**:: + boolean, bring up network even without netroot set + +-**vlan=_<vlanname>_:_<phydevice>_**:: ++**vlan=**__<vlanname>__:__<phydevice>__:: + Setup vlan device named <vlanname> on <phydeivce>. + We support the four styles of vlan names: VLAN_PLUS_VID (vlan0005), VLAN_PLUS_VID_NO_PAD (vlan5), + DEV_PLUS_VID (eth0.0005), DEV_PLUS_VID_NO_PAD (eth0.5) + +-**bond=_<bondname>_[:_<bondslaves>_:[:_<options>_]]**:: ++**bond=**__<bondname>__[:__<bondslaves>__:[:__<options>__]]:: + Setup bonding device <bondname> on top of <bondslaves>. + <bondslaves> is a comma-separated list of physical (ethernet) interfaces. + <options> is a comma-separated list on bonding options (modinfo bonding for details) +@@ -434,68 +488,63 @@ interface name. Better name it "bootnet" or "bluesocket". + then its values should be separated by semicolon. + Bond without parameters assumes bond=bond0:eth0,eth1:mode=balance-rr + +-**team =_<teammaster>_:_<teamslaves>_**:: ++**team=**__<teammaster>__:__<teamslaves>__:: + Setup team device <teammaster> on top of <teamslaves>. + <teamslaves> is a comma-separated list of physical (ethernet) interfaces. + +-**bridge=_<bridgename>_:_<ethnames>_**:: ++**bridge=**__<bridgename>__:__<ethnames>__:: + Setup bridge <bridgename> with <ethnames>. <ethnames> is a comma-separated + list of physical (ethernet) interfaces. Bridge without parameters assumes bridge=br0:eth0 + +- + NFS + ~~~ +-**root=**[_<server-ip>_:]_<root-dir>_[:_<nfs-options>_]:: ++**root=**\[_<server-ip>_:]__<root-dir>__[:__<nfs-options>__]:: + mount nfs share from <server-ip>:/<root-dir>, if no server-ip is given, use + dhcp next_server. if server-ip is an IPv6 address it has to be put in + brackets, e.g. [2001:DB8::1]. NFS options can be appended with the prefix + ":" or "," and are seperated by ",". + +-**root=**nfs:[_<server-ip>_:]_<root-dir>_[:_<nfs-options>_], **root=**nfs4:[_<server-ip>_:]_<root-dir>_[:_<nfs-options>_], **root=**_{dhcp|dhcp6}_:: ++**root=**nfs:\[_<server-ip>_:]__<root-dir>__[:__<nfs-options>__], **root=**nfs4:\[_<server-ip>_:]__<root-dir>__[:__<nfs-options>__], **root=**__{dhcp|dhcp6}__:: + root=dhcp alone directs initrd to look at the DHCP root-path where NFS + options can be specified. + + +----- ++[listing] ++.Example ++-- + root-path=<server-ip>:<root-dir>[,<nfs-options>] + root-path=nfs:<server-ip>:<root-dir>[,<nfs-options>] + root-path=nfs4:<server-ip>:<root-dir>[,<nfs-options>] +----- ++-- + +-**root=**_/dev/nfs_ nfsroot=[_<server-ip>_:]_<root-dir>_[:_<nfs-options>_]:: ++**root=**_/dev/nfs_ nfsroot=\[_<server-ip>_:]__<root-dir>__[:__<nfs-options>__]:: + _Deprecated!_ kernel Documentation_/filesystems/nfsroot.txt_ defines this + method. This is supported by dracut, but not recommended. + +-**rd.nfs.domain=**_<NFSv4 domain name>_:: ++**rd.nfs.domain=**__<NFSv4 domain name>__:: + Set the NFSv4 domain name. Will overwrite the settings in _/etc/idmap.conf_. + + CIFS + ~~~ +-**root=**cifs://[_<username>_[:_<password>_]@]_<server-ip>_:_<root-dir>_:: ++**root=**cifs://[__<username>__[:__<password>__]@]__<server-ip>__:__<root-dir>__:: + mount cifs share from <server-ip>:/<root-dir>, if no server-ip is given, use + dhcp next_server. if server-ip is an IPv6 address it has to be put in + brackets, e.g. [2001:DB8::1]. If a username or password are not specified + as part of the root, then they must be passed on the command line through + cifsuser/cifspass. + + +-[WARNING] +-==== +-Passwords specified on the kernel command line are visible for all users via the file _/proc/cmdline_ and via dmesg or can be sniffed on the network, when using DHCP with DHCP root-path. +-==== ++WARNING: Passwords specified on the kernel command line are visible for all users via the file _/proc/cmdline_ and via dmesg or can be sniffed on the network, when using DHCP with DHCP root-path. + +-**cifsuser=_<username>_:: ++**cifsuser**=__<username>__:: + Set the cifs username, if not specified as part of the root. + +-**cifspass=_<password>_:: ++**cifspass**=__<password>__:: + Set the cifs password, if not specified as part of the root. + + +-[WARNING] +-==== +-Passwords specified on the kernel command line are visible for all users via the file _/proc/cmdline_ and via dmesg or can be sniffed on the network, when using DHCP with DHCP root-path. +-==== ++WARNING: Passwords specified on the kernel command line are visible for all users via the file _/proc/cmdline_ and via dmesg or can be sniffed on the network, when using DHCP with DHCP root-path. + + iSCSI + ~~~~~ +-**root=**iscsi:[_<username>_:_<password>_[:_<reverse>_:_<password>_]@][_<servername>_]:[_<protocol>_]:[_<port>_][:[_<iscsi_iface_name>_]:[_<netdev_name>_]]:[_<LUN>_]:_<targetname>_:: ++**root=**iscsi:[__<username>__:__<password>__[:__<reverse>__:__<password>__]@][__<servername>__]:[__<protocol>__]:[__<port>__][:[__<iscsi_iface_name>__]:[__<netdev_name>__]]:[__<LUN>__]:__<targetname>__:: + protocol defaults to "6", LUN defaults to "0". If the "servername" field is + provided by BOOTP or DHCP, then that field is used in conjunction with other + associated fields to contact the boot server in the Boot stage. However, if +@@ -503,85 +552,84 @@ iSCSI + used in the Discovery Service stage in conjunction with other associated + fields. See + link:$$http://tools.ietf.org/html/rfc4173#section-5$$[rfc4173]. +- e.g.: + + +----- ++WARNING: Passwords specified on the kernel command line are visible for all users via the file _/proc/cmdline_ and via dmesg or can be sniffed on the network, when using DHCP with DHCP root-path. +++ ++[listing] ++.Example ++-- + root=iscsi:192.168.50.1::::iqn.2009-06.dracut:target0 +----- ++-- + + +-If servername is an IPv6 address, it has to be put in brackets. e.g.: ++If servername is an IPv6 address, it has to be put in brackets: + + +----- ++[listing] ++.Example ++-- + root=iscsi:[2001:DB8::1]::::iqn.2009-06.dracut:target0 +----- +-+ +-[WARNING] +-==== +-Passwords specified on the kernel command line are visible for all users via the file _/proc/cmdline_ and via dmesg or can be sniffed on the network, when using DHCP with DHCP root-path. +-==== ++-- + +-**root=**_???_ **netroot=**iscsi:[_<username>_:_<password>_[:_<reverse>_:_<password>_]@][_<servername>_]:[_<protocol>_]:[_<port>_][:[_<iscsi_iface_name>_]:[_<netdev_name>_]]:[_<LUN>_]:_<targetname>_ ...:: +- multiple netroot options allow setting up multiple iscsi disks. e.g.: ++**root=**__???__ **netroot=**iscsi:[__<username>__:__<password>__[:__<reverse>__:__<password>__]@][__<servername>__]:[__<protocol>__]:[__<port>__][:[__<iscsi_iface_name>__]:[__<netdev_name>__]]:[__<LUN>__]:__<targetname>__ ...:: ++ multiple netroot options allow setting up multiple iscsi disks: + + +----- ++[listing] ++.Example ++-- + root=UUID=12424547 + netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target0 + netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target1 +----- ++-- + + +-If servername is an IPv6 address, it has to be put in brackets. e.g.: ++If servername is an IPv6 address, it has to be put in brackets: + + +----- ++[listing] ++.Example ++-- + netroot=iscsi:[2001:DB8::1]::::iqn.2009-06.dracut:target0 +----- ++-- + + +-[WARNING] +-==== +-Passwords specified on the kernel command line are visible for all users via the file _/proc/cmdline_ and via dmesg or can be sniffed on the network, when using DHCP with DHCP root-path. You may want to use rd.iscsi.firmware. +-==== ++WARNING: Passwords specified on the kernel command line are visible for all users via the file _/proc/cmdline_ and via dmesg or can be sniffed on the network, when using DHCP with DHCP root-path. You may want to use rd.iscsi.firmware. + +-**root=**_???_ **rd.iscsi.initiator=**_<initiator>_ **rd.iscsi.target.name=**_<target name>_ **rd.iscsi.target.ip=**_<target ip>_ **rd.iscsi.target.port=**_<target port>_ **rd.iscsi.target.group=**_<target group>_ **rd.iscsi.username=**_<username>_ **rd.iscsi.password=**_<password>_ **rd.iscsi.in.username=**_<in username>_ **rd.iscsi.in.password=**_<in password>_:: ++**root=**__???__ **rd.iscsi.initiator=**__<initiator>__ **rd.iscsi.target.name=**__<target name>__ **rd.iscsi.target.ip=**__<target ip>__ **rd.iscsi.target.port=**__<target port>__ **rd.iscsi.target.group=**__<target group>__ **rd.iscsi.username=**__<username>__ **rd.iscsi.password=**__<password>__ **rd.iscsi.in.username=**__<in username>__ **rd.iscsi.in.password=**__<in password>__:: + manually specify all iscsistart parameter (see **+iscsistart --help+**) + + +-[WARNING] +-==== +-Passwords specified on the kernel command line are visible for all users via the file _/proc/cmdline_ and via dmesg or can be sniffed on the network, when using DHCP with DHCP root-path. You may want to use rd.iscsi.firmware. +-==== ++WARNING: Passwords specified on the kernel command line are visible for all users via the file _/proc/cmdline_ and via dmesg or can be sniffed on the network, when using DHCP with DHCP root-path. You may want to use rd.iscsi.firmware. + + **root=**_???_ **netroot=**iscsi **rd.iscsi.firmware=1**:: + will read the iscsi parameter from the BIOS firmware + +-**rd.iscsi.param=**_<param>_:: ++**rd.iscsi.param=**__<param>__:: + <param> will be passed as "--param <param>" to iscsistart. + This parameter can be specified multiple times. +- e.g.: + + +----- ++[listing] ++.Example ++-- + "netroot=iscsi rd.iscsi.firmware=1 rd.iscsi.param=node.session.timeo.replacement_timeout=30" +----- ++-- + + + will result in + + +----- ++[listing] ++-- + iscsistart -b --param node.session.timeo.replacement_timeout=30 +----- ++-- + + FCoE + ~~~~ +-**fcoe=**_<edd|interface|MAC>_:_{dcb|nodcb}_:: ++**fcoe=**__<edd|interface|MAC>__:__{dcb|nodcb}__:: + Try to connect to a FCoE SAN through the NIC specified by _<interface>_ or + _<MAC>_ or EDD settings. For the second argument, currently only nodcb is + supported. This parameter can be specified multiple times. + + +-[NOTE] +-letters in the MAC-address must be lowercase! ++NOTE: letters in the MAC-address must be lowercase! + + NBD + ~~~ +-**root=**??? **netroot=**nbd:_<server>_:_<port>_[:_<fstype>_[:_<mountopts>_[:_<nbdopts>_]]]:: ++**root=**??? **netroot=**nbd:__<server>__:__<port>__[:__<fstype>__[:__<mountopts>__[:__<nbdopts>__]]]:: + mount nbd share from <server> + +-**root=dhcp** with **dhcp** **root-path=**nbd:_<server>_:_<port>_[:_<fstype>_[:_<mountopts>_[:_<nbdopts>_]]]:: ++**root=dhcp** with **dhcp** **root-path=**nbd:__<server>__:__<port>__[:__<fstype>__[:__<mountopts>__[:__<nbdopts>__]]]:: + root=dhcp alone directs initrd to look at the DHCP root-path where NBD + options can be specified. This syntax is only usable in cases where you are + directly mounting the volume as the rootfs. +@@ -593,25 +641,29 @@ DASD + + ZFCP + ~~~~ +-**rd.zfcp=**_<zfcp adaptor device bus ID>_,_<WWPN>_,_<FCPLUN>_:: +- rd.zfcp can be specified multiple times on the kernel command line. e.g.: ++**rd.zfcp=**__<zfcp adaptor device bus ID>__,__<WWPN>__,__<FCPLUN>__:: ++ rd.zfcp can be specified multiple times on the kernel command line. + + +----- ++[listing] ++.Example ++-- + rd.zfcp=0.0.4000,0x5005076300C213e9,0x5022000000000000 +----- ++-- + + **rd.zfcp.conf=0**:: + ignore zfcp.conf included in the initramfs + + ZNET + ~~~~ +-**rd.znet=**_<nettype>_,_<subchannels>_,_<options>_:: +- rd.znet can be specified multiple times on the kernel command line. e.g.: ++**rd.znet=**__<nettype>__,__<subchannels>__,__<options>__:: ++ rd.znet can be specified multiple times on the kernel command line. + + +----- ++[listing] ++.Example ++-- + rd.znet=qeth,0.0.0600,0.0.0601,0.0.0602,layer2=1,portname=foo + rd.znet=ctc,0.0.0600,0.0.0601,protocol=bar +----- ++-- + + Plymouth Boot Splash + ~~~~~~~~~~~~~~~~~~~~ +@@ -623,33 +675,41 @@ Plymouth Boot Splash + + Kernel keys + ~~~~~~~~~~~ +-**masterkey=**_<kernel master key path name>_:: +- Set the path name of the kernel master key. e.g.: ++**masterkey=**__<kernel master key path name>__:: ++ Set the path name of the kernel master key. + + +----- ++[listing] ++.Example ++-- + masterkey=/etc/keys/kmk-trusted.blob +----- ++-- + +-**masterkeytype=**_<kernel master key type>_:: +- Set the type of the kernel master key. e.g.: ++**masterkeytype=**__<kernel master key type>__:: ++ Set the type of the kernel master key. + + +----- ++[listing] ++.Example ++-- + masterkeytype=trusted +----- ++-- + +-**evmkey=**_<EVM key path name>_:: +- Set the path name of the EVM key. e.g.: ++**evmkey=**__<EVM key path name>__:: ++ Set the path name of the EVM key. + + +----- ++[listing] ++.Example ++-- + evmkey=/etc/keys/evm-trusted.blob +----- ++-- + +-**ecryptfskey=**_<eCryptfs key path name>_:: +- Set the path name of the eCryptfs key. e.g.: ++**ecryptfskey=**__<eCryptfs key path name>__:: ++ Set the path name of the eCryptfs key. + + +----- ++[listing] ++.Example ++-- + ecryptfskey=/etc/keys/ecryptfs-trusted.blob +----- ++-- + + Deprecated, renamed Options + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ +diff --git a/dracut.css b/dracut.css +index e419a067..357ede1b 100644 +--- a/dracut.css ++++ b/dracut.css +@@ -14,45 +14,6 @@ body { + color:black; + } + +-body.toc_embeded { +- /*for web hosting system only*/ +- margin-left: 300px; +-} +- +-object.toc, iframe.toc { +- /*for web hosting system only*/ +- border-style:none; +- position:fixed; +- width:290px; +- height:99.99%; +- top:0; +- left:0; +- z-index: 100; +- border-style:none; +- border-right:1px solid #999; +-} +- +-/* Hide web menu */ +- +-body.notoc { +- margin-left: 3em; +-} +- +-iframe.notoc { +- border-style:none; +- border: none; +- padding: 0em; +- position:fixed; +- width: 21px; +- height: 29px; +- top: 0px; +- left:0; +- overflow: hidden; +- margin: 0em; +- margin-left: -3px; +-} +-/* End hide web menu */ +- + /* desktop styles */ + body.desktop { + margin-left: 26em; +@@ -166,7 +127,6 @@ h1 { + margin-bottom: 0em; + font-size: 3.0em; + font-weight: bold; +- background: #003d6e url(../images/h1-bg.png) top left repeat-x; + color: white; + text-align: center; + padding: 0.7em; +@@ -480,106 +440,14 @@ h3.author { + font-weight:bold; + } + +-/* inline syntax highlighting */ +-.perl_Alert { +- color: #0000ff; +-} +- +-.perl_BaseN { +- color: #007f00; +-} +- +-.perl_BString { +- color: #5C3566; +-} +- +-.perl_Char { +- color: #ff00ff; +-} +- +-.perl_Comment { +- color: #FF00FF; +-} +- +- +-.perl_DataType { +- color: #0000ff; +-} +- +- +-.perl_DecVal { +- color: #00007f; +-} +- +- +-.perl_Error { +- color: #ff0000; +-} +- +- +-.perl_Float { +- color: #00007f; +-} +- +- +-.perl_Function { +- color: #007f00; +-} +- +- +-.perl_IString { +- color: #5C3566; +-} +- +- +-.perl_Keyword { +- color: #002F5D; +-} +- +- +-.perl_Operator { +- color: #ffa500; +-} +- +- +-.perl_Others { +- color: #b03060; +-} +- +- +-.perl_RegionMarker { +- color: #96b9ff; +-} +- +- +-.perl_Reserved { +- color: #9b30ff; +-} +- +- +-.perl_String { +- color: #5C3566; +-} +- +- +-.perl_Variable { +- color: #0000ff; +-} +- +- +-.perl_Warning { +- color: #0000ff; +-} + + /*Lists*/ + ul { + padding-left:1.6em; +- list-style-image:url(../images/dot.png); + list-style-type: circle; + } + + ul ul { +- list-style-image:url(../images/dot2.png); + list-style-type: circle; + } + +@@ -769,21 +637,6 @@ code { + word-wrap: break-word; /* Internet Explorer 5.5+ */ + } + +-/*Notifications*/ +-div.warning:before { +- content:url(../images/warning.png); +- padding-left: 5px; +-} +- +-div.note:before { +- content:url(../images/note.png); +- padding-left: 5px; +-} +- +-div.important:before { +- content:url(../images/important.png); +- padding-left: 5px; +-} + + div.warning, div.note, div.important { + color: black; +@@ -792,7 +645,8 @@ div.warning, div.note, div.important { + background: none; + background-color: white; + margin-bottom: 1em; +- border-bottom: 1px solid #aaaaaa; ++ padding-left: 1em; ++ border-left: 2px solid #aaaaaa; + } + + div.warning h2, div.note h2,div.important h2 { +@@ -817,20 +671,6 @@ div.admonition_header { + font-size: 1.0em; + } + +-div.warning div.admonition_header { +- background: url(../images/red.png) top left repeat-x; +- background-color: #590000; +-} +- +-div.note div.admonition_header { +- background: url(../images/green.png) top right repeat-x; +- background-color: #597800; +-} +- +-div.important div.admonition_header { +- background: url(../images/yellow.png) top right repeat-x; +- background-color: #a6710f; +-} + + div.warning p, div.warning div.para, + div.note p, div.note div.para, +@@ -1131,266 +971,6 @@ ul li p:last-child, ul li div.para:last-child { + padding-bottom:0em; + } + +-/*document navigation*/ +-.docnav a, .docnav strong { +- border:none; +- text-decoration:none; +- font-weight:normal; +-} +- +-.docnav { +- list-style:none; +- margin:0em; +- padding:0em; +- position:relative; +- width:100%; +- padding-bottom:2em; +- padding-top:1em; +- border-top:1px dotted #ccc; +-} +- +-.docnav li { +- list-style:none; +- margin:0em; +- padding:0em; +- display:inline; +- font-size:.8em; +-} +- +-.docnav li:before { +- content:" "; +-} +- +-.docnav li.previous, .docnav li.next { +- position:absolute; +- top:1em; +-} +- +-.docnav li.up, .docnav li.home { +- margin:0em 1.5em; +-} +- +-.docnav li.previous { +- left:0px; +- text-align:left; +-} +- +-.docnav li.next { +- right:0px; +- text-align:right; +-} +- +-.docnav li.previous strong, .docnav li.next strong { +- height:22px; +- display:block; +-} +- +-.docnav { +- margin:0 auto; +- text-align:center; +-} +- +-.docnav li.next a strong { +- background: url(../images/stock-go-forward.png) top right no-repeat; +- padding-top:3px; +- padding-bottom:4px; +- padding-right:28px; +- font-size:1.2em; +-} +- +-.docnav li.previous a strong { +- background: url(../images/stock-go-back.png) top left no-repeat; +- padding-top:3px; +- padding-bottom:4px; +- padding-left:28px; +- padding-right:0.5em; +- font-size:1.2em; +-} +- +-.docnav li.home a strong { +- background: url(../images/stock-home.png) top left no-repeat; +- padding:5px; +- padding-left:28px; +- font-size:1.2em; +-} +- +-.docnav li.up a strong { +- background: url(../images/stock-go-up.png) top left no-repeat; +- padding:5px; +- padding-left:28px; +- font-size:1.2em; +-} +- +-.docnav a:link, .docnav a:visited { +- color:#666; +-} +- +-.docnav a:hover, .docnav a:focus, .docnav a:active { +- color:black; +-} +- +-.docnav a { +- max-width: 10em; +- overflow:hidden; +-} +- +-.docnav a:link strong { +- text-decoration:none; +-} +- +-.docnav { +- margin:0 auto; +- text-align:center; +-} +- +-ul.docnav { +- margin-bottom: 1em; +-} +-/* Reports */ +-.reports ul { +- list-style:none; +- margin:0em; +- padding:0em; +-} +- +-.reports li{ +- margin:0em; +- padding:0em; +-} +- +-.reports li.odd { +- background-color: #eeeeee; +- margin:0em; +- padding:0em; +-} +- +-.reports dl { +- display:inline; +- margin:0em; +- padding:0em; +- float:right; +- margin-right: 17em; +- margin-top:-1.3em; +-} +- +-.reports dt { +- display:inline; +- margin:0em; +- padding:0em; +-} +- +-.reports dd { +- display:inline; +- margin:0em; +- padding:0em; +- padding-right:.5em; +-} +- +-.reports h2, .reports h3{ +- display:inline; +- padding-right:.5em; +- font-size:10pt; +- font-weight:normal; +-} +- +-.reports div.progress { +- display:inline; +- float:right; +- width:16em; +- background:#c00 url(../images/shine.png) top left repeat-x; +- margin:0em; +- margin-top:-1.3em; +- padding:0em; +- border:none; +-} +- +-/*uniform*/ +-body.results, body.reports { +- max-width:57em ; +- padding:0em; +-} +- +-/*Progress Bar*/ +-div.progress { +- display:block; +- float:left; +- width:16em; +- background:#c00 url(../images/shine.png) top left repeat-x; +- height:1em; +-} +- +-div.progress span { +- height:1em; +- float:left; +-} +- +-div.progress span.translated { +- background:#6c3 url(../images/shine.png) top left repeat-x; +-} +- +-div.progress span.fuzzy { +- background:#ff9f00 url(../images/shine.png) top left repeat-x; +-} +- +- +-/*Results*/ +- +-.results ul { +- list-style:none; +- margin:0em; +- padding:0em; +-} +- +-.results li{ +- margin:0em; +- padding:0em; +-} +- +-.results li.odd { +- background-color: #eeeeee; +- margin:0em; +- padding:0em; +-} +- +-.results dl { +- display:inline; +- margin:0em; +- padding:0em; +- float:right; +- margin-right: 17em; +- margin-top:-1.3em; +-} +- +-.results dt { +- display:inline; +- margin:0em; +- padding:0em; +-} +- +-.results dd { +- display:inline; +- margin:0em; +- padding:0em; +- padding-right:.5em; +-} +- +-.results h2, .results h3 { +- display:inline; +- padding-right:.5em; +- font-size:10pt; +- font-weight:normal; +-} +- +-.results div.progress { +- display:inline; +- float:right; +- width:16em; +- background:#c00 url(../images/shine.png) top left repeat-x; +- margin:0em; +- margin-top:-1.3em; +- padding:0em; +- border:none; +-} + + /* Dirty EVIL Mozilla hack for round corners */ + pre { +@@ -1423,12 +1003,6 @@ span.remark { + background-color: #ff00ff; + } + +-.draft { +- background-image: url(../images/watermark-draft.png); +- background-repeat: repeat-y; +- background-position: center; +-} +- + .foreignphrase { + font-style: inherit; + } +@@ -1513,10 +1087,6 @@ h1 { + color:#3c6eb4 + } + +-.producttitle { +- background: #3c6eb4 url(../images/h1-bg.png) top left repeat; +-} +- + .section h1.title { + color:#3c6eb4; + } +diff --git a/dracut.modules.7.asc b/dracut.modules.7.asc +new file mode 100644 +index 00000000..4cb2aa15 +--- /dev/null ++++ b/dracut.modules.7.asc +@@ -0,0 +1,293 @@ ++DRACUT.MODULES(7) ++================= ++:doctype: manpage ++:man source: dracut ++:man manual: dracut ++ ++NAME ++---- ++dracut.modules - dracut modules ++ ++DESCRIPTION ++----------- ++== dracut Components ++ ++dracut uses a modular system to build and extend the initramfs image. All ++modules are located in _/usr/lib/dracut/modules.d_ or in _<git-src>/modules.d_. ++The most basic dracut module is _99base_. In _99base_ the initial shell script ++init is defined, which gets run by the kernel after initramfs loading. Although ++you can replace init with your own version of _99base_, this is not encouraged. ++Instead you should use, if possible, the hooks of dracut. All hooks, and the ++point of time in which they are executed, are described in <<stages>>. ++ ++The main script, which creates the initramfs is dracut itsself. It parses all ++arguments and sets up the directory, in which everything is installed. It then ++executes all check, install, installkernel scripts found in the modules, which ++are to be processed. After everything is installed, the install directory is ++archived and compressed to the final initramfs image. All helper functions used ++by check, install and installkernel are found in in the file _dracut-functions_. ++These shell functions are available to all module installer (install, ++installkernel) scripts, without the need to source _dracut-functions_. ++ ++A module can check the preconditions for install and installkernel with the ++check script. Also dependencies can be expressed with check. If a module passed ++check, install and installkernel will be called to install all of the necessary ++files for the module. To split between kernel and non-kernel parts of the ++installation, all kernel module related parts have to be in installkernel. All ++other files found in a module directory are module specific and mostly are hook ++scripts and udev rules. ++ ++ ++[[stages]] ++== Boot Process Stages ++ ++dracut modules can insert custom script at various points, to control the boot ++process. ++These hooks are plain directories containing shell scripts ending with ".sh", ++which are sourced by init. ++Common used functions are in _dracut-lib.sh_, which can be sourced by any script. ++ ++=== Hook: cmdline ++ ++The _cmdline_ hook is a place to insert scripts to parse the kernel command line ++and prepare the later actions, like setting up udev rules and configuration ++files. ++ ++In this hook the most important environment variable is defined: root. The ++second one is rootok, which indicates, that a module claimed to be able to parse ++the root defined. So for example, **root=**__iscsi:....__ will be claimed by the ++iscsi dracut module, which then sets rootok. ++ ++=== Hook: pre-udev ++ ++This hook is executed right after the cmdline hook and a check if root and ++rootok were set. Here modules can take action with the final root, and before ++udev has been run. ++ ++=== Start Udev ++ ++Now udev is started and the logging for udev is setup. ++ ++=== Hook: pre-trigger ++ ++In this hook, you can set udev environment variables with **udevadm control ++--property=KEY=_value_** or control the further execution of udev with ++udevadm. ++ ++=== Trigger Udev ++ ++udev is triggered by calling udevadm trigger, which sends add events for all ++devices and subsystems. ++ ++=== Main Loop ++ ++In the main loop of dracut loops until udev has settled and ++all scripts in _initqueue/finished_ returned true. ++In this loop there are three hooks, where scripts can be inserted ++by calling /sbin/initqueue. ++ ++==== Initqueue ++ ++This hook gets executed every time a script is inserted here, regardless of the ++udev state. ++ ++==== Initqueue settled ++ ++This hooks (initqueue/settled) gets executed every time udev has settled. ++ ++==== Initqueue timeout ++ ++This hooks (initqueue/timeout) gets executed, when the main loop counter becomes half of the ++rd.retry counter. ++ ++==== Initqueue finished ++ ++This hook (initqueue/finished) is called after udev has settled and ++if all scripts herein return 0 the main loop will be ended. ++Abritary scripts can be added here, to loop in the ++initqueue until something happens, which a dracut module wants to wait for. ++ ++=== Hook: pre-mount ++ ++Before the root device is mounted all scripts in the hook pre-mount are ++executed. In some cases (e.g. NFS) the real root device is already mounted, ++though. ++ ++=== Hook: mount ++ ++This hook is mainly to mount the real root device. ++ ++=== Hook: pre-pivot ++ ++This hook is called before cleanup hook, This is a good place for ++actions other than cleanups which need to be called before pivot. ++ ++=== Hook: cleanup ++ ++This hook is the last hook and is called before init finally switches root to ++the real root device. This is a good place to clean up and kill processes not ++needed anymore. ++ ++ ++=== Cleanup and switch_root ++ ++Init (or systemd) kills all udev processes, cleans up the environment, ++sets up the arguments for the real init process and finally calls switch_root. ++switch_root removes the whole filesystem hierarchy of the initramfs, ++chroot()s to the real root device and calls /sbin/init with the specified arguments. ++ ++To ensure all files in the initramfs hierarchy can be removed, all processes ++still running from the initramfs should not have any open file descriptors left. ++ ++== Network Infrastructure ++ ++FIXME ++ ++== Writing a Module ++ ++A simple example module is _96insmodpost_, which modprobes a kernel module after ++udev has settled and the basic device drivers have been loaded. ++ ++All module installation information is in the file module-setup.sh. ++ ++First we create a check() function, which just exits with 0 indicating that this ++module should be included by default. ++ ++check(): ++---- ++return 0 ++---- ++ ++The we create the install() function, which installs a cmdline hook with ++priority number 20 called _parse-insmodpost.sh_. It also installs the ++_insmodpost.sh_ script in _/sbin_. ++ ++install(): ++---- ++inst_hook cmdline 20 "$moddir/parse-insmodpost.sh" ++inst_simple "$moddir/insmodpost.sh" /sbin/insmodpost.sh ++---- ++ ++The _pase-instmodpost.sh_ parses the kernel command line for a argument ++rd.driver.post, blacklists the module from being autoloaded and installs the ++hook _insmodpost.sh_ in the _initqueue/settled_. ++ ++_parse-insmodpost.sh_: ++---- ++for p in $(getargs rd.driver.post=); do ++ echo "blacklist $p" >> /etc/modprobe.d/initramfsblacklist.conf ++ _do_insmodpost=1 ++done ++ ++[ -n "$_do_insmodpost" ] && /sbin/initqueue --settled --unique --onetime /sbin/insmodpost.sh ++unset _do_insmodpost ++ ++---- ++ ++_insmodpost.sh_, which is called in the _initqueue/settled_ hook will just ++modprobe the kernel modules specified in all rd.driver.post kernel command line ++parameters. It runs after udev has settled and is only called once (--onetime). ++ ++_insmodpost.sh_: ++---- ++. /lib/dracut-lib.sh ++ ++for p in $(getargs rd.driver.post=); do ++ modprobe $p ++done ++ ++---- ++ ++ ++=== module-setup.sh: check() ++ ++_check()_ is called by dracut to evaluate the inclusion of a dracut module in ++the initramfs. ++ ++$hostonly:: If the $hostonly variable is set, then the module check() function ++should be in "hostonly" mode, which means, that the check() should only return ++0, if the module is really needed to boot this specific host. ++ ++check() should return with: ++ ++0:: Include the dracut module in the initramfs. ++ ++1:: Do not include the dracut module. The requirements are not fullfilled ++(missing tools, etc.) ++ ++255:: Only include the dracut module, if another module requires it or if ++explicitly specified in the config file or on the argument list. ++ ++ ++=== module-setup.sh: depends() ++ ++The function depends() should echo all other dracut module names the module ++depends on. ++ ++=== module-setup.sh: cmdline() ++ ++This function should print the kernel command line options needed to boot the current ++machine setup. It should start with a space and should not print a newline. ++ ++=== module-setup.sh: install() ++ ++The install() function is called to install everything non-kernel related. To install ++binaries, scripts, and other files, you can use the functions mentioned in <<creation>>. ++ ++To address a file in the current module directory, use the variable "$moddir". ++ ++=== module-setup.sh: installkernel() ++ ++In installkernel() all kernel related files should be installed. You can use all of the functions ++mentioned in <<creation>> to install files. ++ ++=== [[creation]]Creation Functions ++ ++==== inst_multiple [-o] <file> [ <file> ...] ++ ++installs multiple binaries and files. If executables are specified without a path, dracut ++will search the path PATH=/usr/sbin:/sbin:/usr/bin:/bin for the binary. If the option "-o" ++is given as the first parameter, a missing file does not lead to an error. ++ ++==== inst <src> [<dst>] ++ ++installs _one_ file <src> either to the same place in the initramfs or to an optional <dst>. ++ ++==== inst_hook <hookdir> <prio> <src> ++ ++installs an executable/script <src> in the dracut hook <hookdir> with priority <prio>. ++ ++==== inst_rules <udevrule> [ <udevrule> ...] ++ ++installs one ore more udev rules. Non-existant udev rules are reported, but do not let dracut fail. ++ ++==== instmods <kernelmodule> [ <kernelmodule> ... ] ++ ++instmods should be used only in the installkernel() function. ++ ++instmods installs one or more kernel modules in the initramfs. <kernelmodule> can also be a whole ++subsystem, if prefixed with a "=", like "=drivers/net/team". ++ ++instmods will not install the kernel module, if $hostonly is set and the kernel module is not currently ++needed by any /sys/*...*/uevent MODALIAS. ++To install a kernel module regardless of the hostonly mode use the form: ++---- ++hostonly='' instmods <kernelmodule> ++---- ++ ++=== Initramfs Functions ++ ++FIXME ++ ++ ++=== Network Modules ++ ++FIXME ++ ++AUTHOR ++------ ++Harald Hoyer ++ ++SEE ALSO ++-------- ++*dracut*(8) +diff --git a/dracut.spec b/dracut.spec +index b1cf9fef..8dfc7535 100644 +--- a/dracut.spec ++++ b/dracut.spec +@@ -316,6 +316,7 @@ rm -rf -- $RPM_BUILD_ROOT + %endif + %{_mandir}/man7/dracut.kernel.7* + %{_mandir}/man7/dracut.cmdline.7* ++%{_mandir}/man7/dracut.modules.7* + %{_mandir}/man7/dracut.bootup.7* + %{_mandir}/man5/dracut.conf.5* + %if %{defined _unitdir} +diff --git a/dracut.usage.asc b/dracut.usage.asc +new file mode 100644 +index 00000000..6d37920f +--- /dev/null ++++ b/dracut.usage.asc +@@ -0,0 +1,526 @@ ++To create a initramfs image, the most simple command is: ++---- ++# dracut ++---- ++ ++This will generate a general purpose initramfs image, with all possible ++functionality resulting of the combination of the installed dracut modules and ++system tools. The image is /boot/initramfs-_++<kernel version>++_.img and ++contains the kernel modules of the currently active kernel with version ++_++<kernel version>++_. ++ ++If the initramfs image already exists, dracut will display an error message, and ++to overwrite the existing image, you have to use the --force option. ++---- ++# dracut --force ++---- ++ ++If you want to specify another filename for the resulting image you would issue ++a command like: ++---- ++# dracut foobar.img ++---- ++ ++To generate an image for a specific kernel version, the command would be: ++---- ++# dracut foobar.img 2.6.40-1.rc5.f20 ++---- ++ ++A shortcut to generate the image at the default location for a specific kernel ++version is: ++---- ++# dracut --kver 2.6.40-1.rc5.f20 ++---- ++ ++If you want to create lighter, smaller initramfs images, you may want to specify ++the --hostonly or -H option. Using this option, the resulting image will ++contain only those dracut modules, kernel modules and filesystems, which are ++needed to boot this specific machine. This has the drawback, that you can't put ++the disk on another controller or machine, and that you can't switch to another ++root filesystem, without recreating the initramfs image. The usage of the ++--hostonly option is only for experts and you will have to keep the broken ++pieces. At least keep a copy of a general purpose image (and corresponding ++kernel) as a fallback to rescue your system. ++ ++=== Inspecting the Contents ++To see the contents of the image created by dracut, you can use the lsinitrd tool. ++---- ++# lsinitrd | less ++---- ++ ++To display the contents of a file in the initramfs also use the lsinitrd tool: ++---- ++# lsinitrd -f /etc/ld.so.conf ++include ld.so.conf.d/*.conf ++---- ++ ++=== Adding dracut Modules ++Some dracut modules are turned off by default and have to be activated manually. ++You can do this by adding the dracut modules to the configuration file ++_/etc/dracut.conf_ or _/etc/dracut.conf.d/myconf.conf_. See *dracut.conf*(5). ++You can also add dracut modules on the command line ++by using the -a or --add option: ++---- ++# dracut --add bootchart initramfs-bootchart.img ++---- ++ ++To see a list of available dracut modules, use the --list-modules option: ++---- ++# dracut --list-modules ++---- ++ ++=== Omitting dracut Modules ++Sometimes you don't want a dracut module to be included for reasons of speed, ++size or functionality. To do this, either specify the omit_dracutmodules ++variable in the _dracut.conf_ or _/etc/dracut.conf.d/myconf.conf_ configuration ++file (see *dracut.conf*(5)), or use the -o or --omit option ++on the command line: ++---- ++# dracut -o "multipath lvm" no-multipath-lvm.img ++---- ++ ++=== Adding Kernel Modules ++If you need a special kernel module in the initramfs, which is not ++automatically picked up by dracut, you have the use the --add-drivers option ++on the command line or the drivers vaiable in the _/etc/dracut.conf_ ++or _/etc/dracut.conf.d/myconf.conf_ configuration file (see *dracut.conf*(5)): ++---- ++# dracut --add-drivers mymod initramfs-with-mymod.img ++---- ++ ++=== Boot parameters ++An initramfs generated without the "hostonly" mode, does not contain any system ++configuration files (except for some special exceptions), so the configuration ++has to be done on the kernel command line. With this flexibility, you can easily ++boot from a changed root partition, without the need to recompile the initramfs ++image. So, you could completly change your root partition (move it inside a md ++raid with encryption and LVM on top), as long as you specify the correct ++filesystem LABEL or UUID on the kernel command line for your root device, dracut ++will find it and boot from it. ++ ++The kernel command line usually can be configured in _/boot/grub/grub.conf_, if ++grub is your bootloader and it also can be edited in the real boot process in ++the grub menu. ++ ++The kernel command line can also be provided by the dhcp server with the ++root-path option. See <<NetworkBoot>>. ++ ++For a full reference of all kernel command line parameters, see *dracut.cmdline*(5). ++ ++To get a quick start for the suitable kernel command line on your system, use the ++__--print-cmdline__ option: ++---- ++# dracut --print-cmdline ++ root=UUID=8b8b6f91-95c7-4da2-831b-171e12179081 rootflags=rw,relatime,discard,data=ordered rootfstype=ext4 ++---- ++ ++==== Specifying the root Device ++This is the only option dracut really needs to boot from your root partition. ++Because your root partition can live in various environments, there are a lot of ++formats for the root= option. The most basic one is root=_++<path to device ++node>++_: ++---- ++root=/dev/sda2 ++---- ++ ++Because device node names can change, dependent on the drive ordering, you are ++encouraged to use the filesystem identifier (UUID) or filesystem label (LABEL) ++to specify your root partition: ++---- ++root=UUID=19e9dda3-5a38-484d-a9b0-fa6b067d0331 ++---- ++ ++or ++ ++---- ++root=LABEL=myrootpartitionlabel ++---- ++ ++To see all UUIDs or LABELs on your system, do: ++---- ++# ls -l /dev/disk/by-uuid ++---- ++ ++or ++ ++---- ++# ls -l /dev/disk/by-label ++---- ++ ++If your root partition is on the network see <<NetworkBoot>>. ++ ++==== Keyboard Settings ++If you have to input passwords for encrypted disk volumes, you might want to set ++the keyboard layout and specify a display font. ++ ++A typical german kernel command would contain: ++---- ++rd.vconsole.font=latarcyrheb-sun16 rd.vconsole.keymap=de-latin1-nodeadkeys rd.locale.LANG=de_DE.UTF-8 ++---- ++ ++Setting these options can override the setting stored on your system, if you use ++a modern init system, like systemd. ++ ++==== Blacklisting Kernel Modules ++Sometimes it is required to prevent the automatic kernel module loading of a ++specific kernel module. To do this, just add rd.blacklist=_++<kernel module ++name>++_, with _++<kernel module name>++_ not containing the _.ko_ ++suffix, to the kernel command line. For example: ++---- ++rd.driver.blacklist=mptsas rd.driver.blacklist=nouveau ++---- ++ ++The option can be specified multiple times on the kernel command line. ++ ++==== Speeding up the Boot Process ++If you want to speed up the boot process, you can specify as much information ++for dracut on the kernel command as possible. For example, you can tell dracut, ++that you root partition is not on a LVM volume or not on a raid partition, or ++that it lives inside a specific crypto LUKS encrypted volume. By default, dracut ++searches everywhere. A typical dracut kernel command line for a plain primary or ++logical partition would contain: ++---- ++rd.luks=0 rd.lvm=0 rd.md=0 rd.dm=0 ++---- ++ ++This turns off every automatic assembly of LVM, MD raids, DM raids and crypto LUKS. ++ ++Of course, you could also omit the dracut modules in the initramfs creation ++process, but then you would lose the posibility to turn it on on demand. ++ ++ ++[[Injecting]] ++=== Injecting custom Files ++To add your own files to the initramfs image, you have several possibilities. ++ ++The --include option let you specify a source path and a target path. For example ++---- ++# dracut --include cmdline-preset /etc/cmdline.d/mycmdline.conf initramfs-cmdline-pre.img ++---- ++will create an initramfs image, where the file cmdline-preset will be copied ++inside the initramfs to _/etc/cmdline.d/mycmdline.conf_. --include can only be specified once. ++ ++ ++---- ++# mkdir -p rd.live.overlay/etc/cmdline.d ++# mkdir -p rd.live.overlay/etc/conf.d ++# echo "ip=auto" >> rd.live.overlay/etc/cmdline.d/mycmdline.conf ++# echo export FOO=testtest >> rd.live.overlay/etc/conf.d/testvar.conf ++# echo export BAR=testtest >> rd.live.overlay/etc/conf.d/testvar.conf ++# tree rd.live.overlay/ ++rd.live.overlay/ ++`-- etc ++ |-- cmdline.d ++ | `-- mycmdline.conf ++ `-- conf.d ++ `-- testvar.conf ++ ++# dracut --include rd.live.overlay / initramfs-rd.live.overlay.img ++---- ++ ++This will put the contents of the rd.live.overlay directory into the root of the ++initramfs image. ++ ++The --install option let you specify several files, which will get installed in ++the initramfs image at the same location, as they are present on initramfs ++creation time. ++ ++ ++---- ++# dracut --install 'strace fsck.ext3 ssh' initramfs-dbg.img ++---- ++ ++This will create an initramfs with the strace, fsck.ext3 and ssh executables, ++together with the libraries needed to start those. The --install option can be ++specified multiple times. ++ ++ ++[[NetworkBoot]] ++=== Network Boot ++ ++If your root partition is on a network drive, you have to have the network ++dracut modules installed to create a network aware initramfs image. ++ ++On a Red Hat Enterprise Linux or Fedora system, this means, you have to install ++the _dracut-network_ rpm package: ++ ++ ++---- ++# yum install dracut-network ++---- ++ ++The resulting initramfs image can be served by a boot manager residing on your ++local hard drive or it can be served by a PXE/TFTP server. ++ ++How to setup your PXE/TFTP server can be found in the ++http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Storage_Administration_Guide/[Red ++Hat Enterprise Linux Storage Administration Guide]. ++ ++If you specify ip=auto on the kernel command line, then dracut asks a dhcp ++server about the ip adress for the machine. The dhcp server can also serve an ++additional root-path, which will set the root device for dracut. With this ++mechanism, you have static configuration on your client machine and a ++centralized boot configuration on your TFTP/DHCP server. If you can't pass a ++kernel command line, then you can inject _/etc/cmdline.d/mycmdline.conf_, with a method described ++in <<Injecting>>. ++ ++==== Reducing the Image Size ++ ++To reduce the size of the initramfs, you should create it with by ommitting all ++dracut modules, which you know, you don't need to boot the machine. ++ ++You can also specify the exact dracut and kernel modules to produce a very tiny ++initramfs image. ++ ++For example for a NFS image, you would do: ++ ++ ++---- ++# dracut -m "nfs network base" initramfs-nfs-only.img ++---- ++ ++Then you would boot from this image with your target machine and reduce the size ++once more by creating it on the target machine with the --host-only option: ++ ++ ++---- ++# dracut -m "nfs network base" --host-only initramfs-nfs-host-only.img ++---- ++ ++This will reduce the size of the initramfs image significantly. ++ ++ ++== Troubleshooting ++ ++If the boot process does not succeed, you have several options to debug the ++situation. Some of the basic operations are covered here. For more information ++you should also visit: ++http://fedoraproject.org/wiki/How_to_debug_Dracut_problems ++ ++ ++[[identifying-your-problem-area]] ++=== Identifying your problem area ++. Remove ''rhgb'' and ''quiet'' from the kernel command line ++. Add ''rd.shell'' to the kernel command line. This will present a shell should ++dracut be unable to locate your root device ++. Add ''rd.shell rd.debug log_buf_len=1M'' to the kernel command line so that ++dracut shell commands are printed as they are executed ++. The file /run/initramfs/rdsosreport.txt is generated, ++which contains all the logs and the output of all significant tools, which are mentioned later. ++ ++If you want to save that output, simply mount /boot by hand or insert an USB stick and mount that. ++Then you can store the output for later inspection. ++ ++[[information-to-include-in-your-report]] ++=== Information to include in your report ++ ++[[all-bug-reports]] ++==== All bug reports ++In all cases, the following should be mentioned and attached to your bug report: ++ ++* The exact kernel command-line used. Typically from the bootloader ++configuration file (e.g. _/etc/grub.conf_) or from _/proc/cmdline_. ++* A copy of your disk partition information from _/etc/fstab_, which might be ++obtained booting an old working initramfs or a rescue medium. ++* Turn on dracut debugging (see _the 'debugging dracut' section_), and attach ++the file /run/initramfs/rdsosreport.txt. ++* If you use a dracut configuration file, please include _/etc/dracut.conf_ and ++all files in _/etc/dracut.conf.d/*.conf_ ++ ++[[network-root-device-related-problems]] ++==== Network root device related problems ++This section details information to include when experiencing problems on a ++system whose root device is located on a network attached volume (e.g. iSCSI, ++NFS or NBD). As well as the information from <<all-bug-reports>>, include the ++following information: ++ ++ ++* Please include the output of +++ ++---- ++# /sbin/ifup <interfacename> ++# ip addr show ++---- ++ ++[[debugging-dracut]] ++=== Debugging dracut ++ ++ ++[[configure-a-serial-console]] ++==== Configure a serial console ++ ++Successfully debugging dracut will require some form of console ++logging during the system boot. This section documents configuring a ++serial console connection to record boot messages. ++ ++. First, enable serial console output for both the kernel and the bootloader. ++. Open the file _/etc/grub.conf_ for editing. Below the line ''timeout=5'', add ++the following: +++ ++---- ++serial --unit=0 --speed=9600 ++terminal --timeout=5 serial console ++---- +++ ++. Also in _/etc/grub.conf_, add the following boot arguemnts to the ''kernel'' ++line: +++ ++---- ++console=tty0 console=ttyS0,9600 ++---- +++ ++. When finished, the _/etc/grub.conf_ file should look similar to the example ++below. +++ ++---- ++default=0 ++timeout=5 ++serial --unit=0 --speed=9600 ++terminal --timeout=5 serial console ++title Fedora (2.6.29.5-191.fc11.x86_64) ++ root (hd0,0) ++ kernel /vmlinuz-2.6.29.5-191.fc11.x86_64 ro root=/dev/mapper/vg_uc1-lv_root console=tty0 console=ttyS0,9600 ++ initrd /dracut-2.6.29.5-191.fc11.x86_64.img ++---- +++ ++. More detailed information on how to configure the kernel for console output ++can be found at ++http://www.faqs.org/docs/Linux-HOWTO/Remote-Serial-Console-HOWTO.html#CONFIGURE-KERNEL. ++. Redirecting non-interactive output +++ ++-- ++NOTE: You can redirect all non-interactive output to _/dev/kmsg_ and the kernel ++will put it out on the console when it reaches the kernel buffer by doing ++ ++---- ++# exec >/dev/kmsg 2>&1 </dev/console ++---- ++-- ++ ++[[using-the-dracut-shell]] ++==== Using the dracut shell ++ ++dracut offers a shell for interactive debugging in the event dracut fails to ++locate your root filesystem. To enable the shell: ++ ++. Add the boot parameter ''rd.shell'' to your bootloader configuration file ++(e.g. _/etc/grub.conf_) ++. Remove the boot arguments ''rhgb'' and ''quiet'' +++ ++A sample _/etc/grub.conf_ bootloader configuration file is listed below. +++ ++---- ++default=0 ++timeout=5 ++serial --unit=0 --speed=9600 ++terminal --timeout=5 serial console ++title Fedora (2.6.29.5-191.fc11.x86_64) ++ root (hd0,0) ++ kernel /vmlinuz-2.6.29.5-191.fc11.x86_64 ro root=/dev/mapper/vg_uc1-lv_root console=tty0 rd.shell ++ initrd /dracut-2.6.29.5-191.fc11.x86_64.img ++---- +++ ++. If system boot fails, you will be dropped into a shell as seen in the example below. +++ ++---- ++No root device found ++Dropping to debug shell. ++ ++# ++---- +++ ++. Use this shell prompt to gather the information requested above (see <<all-bug-reports>>). ++ ++[[accessing-the-root-volume-from-the-dracut-shell]] ++==== Accessing the root volume from the dracut shell ++From the dracut debug shell, you can manually perform the task of locating and ++preparing your root volume for boot. The required steps will depend on how your ++root volume is configured. Common scenarios include: ++ ++* A block device (e.g. _/dev/sda7_) ++* A LVM logical volume (e.g. _/dev/VolGroup00/LogVol00_) ++* An encrypted device (e.g. _/dev/mapper/luks-4d5972ea-901c-4584-bd75-1da802417d83_) ++* A network attached device (e.g. netroot=iscsi:@192.168.0.4::3260::iqn.2009-02.org.fedoraproject:for.all) ++ ++The exact method for locating and preparing will vary. However, to continue with ++a successful boot, the objective is to locate your root volume and create a ++symlink _/dev/root_ which points to the file system. For example, the following ++example demonstrates accessing and booting a root volume that is an encrypted ++LVM Logical volume. ++ ++. Inspect your partitions using parted +++ ++---- ++# parted /dev/sda -s p ++Model: ATA HTS541060G9AT00 (scsi) ++Disk /dev/sda: 60.0GB ++Sector size (logical/physical): 512B/512B ++Partition Table: msdos ++Number Start End Size Type File system Flags ++1 32.3kB 10.8GB 107MB primary ext4 boot ++2 10.8GB 55.6GB 44.7GB logical lvm ++---- +++ ++. You recall that your root volume was a LVM logical volume. Scan and activate ++any logical volumes. +++ ++---- ++# lvm vgscan ++# lvm vgchange -ay ++---- +++ ++. You should see any logical volumes now using the command blkid: +++ ++---- ++# blkid ++/dev/sda1: UUID="3de247f3-5de4-4a44-afc5-1fe179750cf7" TYPE="ext4" ++/dev/sda2: UUID="Ek4dQw-cOtq-5MJu-OGRF-xz5k-O2l8-wdDj0I" TYPE="LVM2_member" ++/dev/mapper/linux-root: UUID="def0269e-424b-4752-acf3-1077bf96ad2c" TYPE="crypto_LUKS" ++/dev/mapper/linux-home: UUID="c69127c1-f153-4ea2-b58e-4cbfa9257c5e" TYPE="ext3" ++/dev/mapper/linux-swap: UUID="47b4d329-975c-4c08-b218-f9c9bf3635f1" TYPE="swap" ++---- +++ ++. From the output above, you recall that your root volume exists on an encrypted ++block device. Following the guidance disk encryption guidance from the ++Installation Guide, you unlock your encrypted root volume. +++ ++---- ++# UUID=$(cryptsetup luksUUID /dev/mapper/linux-root) ++# cryptsetup luksOpen /dev/mapper/linux-root luks-$UUID ++Enter passphrase for /dev/mapper/linux-root: ++Key slot 0 unlocked. ++---- +++ ++. Next, make a symbolic link to the unlocked root volume +++ ++---- ++# ln -s /dev/mapper/luks-$UUID /dev/root ++---- +++ ++. With the root volume available, you may continue booting the system by exiting ++the dracut shell +++ ++---- ++# exit ++---- ++ ++[[additional-dracut-boot-parameters]] ++==== Additional dracut boot parameters ++For more debugging options, see *dracut.cmdline*(7). ++ ++ ++[[debugging-dracut-on-shutdown]] ++==== Debugging dracut on shutdown ++ ++To debug the shutdown sequence on systemd systems, you can _rd.break_ ++on _pre-shutdown_ or _shutdown_. ++ ++To do this from an already booted system: ++---- ++# mkdir -p /run/initramfs/etc/cmdline.d ++# echo "rd.break=pre-shutdown" > /run/initramfs/etc/cmdline.d/debug.conf ++# touch /run/initramfs/.need_shutdown ++---- ++ ++This will give you a dracut shell after the system pivot'ed back in the initramfs. ++ diff --git a/SOURCES/0026-lvm-fix-thin-recognition.patch b/SOURCES/0026-lvm-fix-thin-recognition.patch new file mode 100644 index 0000000..05324f3 --- /dev/null +++ b/SOURCES/0026-lvm-fix-thin-recognition.patch @@ -0,0 +1,37 @@ +From 1a21ed8d1dbec162986fff9f30d5efc68107524e Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 16 Oct 2013 11:30:08 +0200 +Subject: [PATCH] lvm: fix thin recognition + +The global var setting was happening in a pipe and did not have an +effect. + +Use <<<$() instead. + +< <() cannot be used, because dracut is called in chroot's environments, +where /dev/fd does not point to /proc/self/fd, but bash wants +/dev/fd/<num> for this construct. +--- + modules.d/90lvm/module-setup.sh | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh +index 514addc1..50d9b98e 100755 +--- a/modules.d/90lvm/module-setup.sh ++++ b/modules.d/90lvm/module-setup.sh +@@ -53,12 +53,13 @@ install() { + inst lvm + + if [[ $hostonly ]]; then +- get_host_lvs | while read line; do ++ while read line; do ++ [[ -n "$line" ]] || continue + printf "%s" " rd.lvm.lv=$line" + if ! [[ $_needthin ]]; then + [[ "$(lvs --noheadings -o segtype ${line%%/*} 2>/dev/null)" == *thin* ]] && _needthin=1 + fi +- done >> "${initdir}/etc/cmdline.d/90lvm.conf" ++ done <<<$(get_host_lvs) >> "${initdir}/etc/cmdline.d/90lvm.conf" + echo >> "${initdir}/etc/cmdline.d/90lvm.conf" + else + _needthin=1 diff --git a/SOURCES/0027-dracut-functions.sh-check_block_and_slaves-skip-LVM-.patch b/SOURCES/0027-dracut-functions.sh-check_block_and_slaves-skip-LVM-.patch new file mode 100644 index 0000000..e5f2b4c --- /dev/null +++ b/SOURCES/0027-dracut-functions.sh-check_block_and_slaves-skip-LVM-.patch @@ -0,0 +1,50 @@ +From 8e3620568cd4e2c7e8db52fcf3f6e25cc4608aaf Mon Sep 17 00:00:00 2001 +From: Marian Csontos <mcsontos@redhat.com> +Date: Fri, 18 Oct 2013 14:40:40 +0200 +Subject: [PATCH] dracut-functions.sh:check_block_and_slaves*() skip LVM + internal devs + +Not every device in /dev/mapper should be examined. +If it is an LVM device, touch only devices which have /dev/VG/LV symlink. +--- + dracut-functions.sh | 16 ++++++++++++++-- + 1 file changed, 14 insertions(+), 2 deletions(-) + +diff --git a/dracut-functions.sh b/dracut-functions.sh +index 45e09118..2e6e8456 100755 +--- a/dracut-functions.sh ++++ b/dracut-functions.sh +@@ -579,7 +579,7 @@ host_fs_all() + check_block_and_slaves() { + local _x + [[ -b /dev/block/$2 ]] || return 1 # Not a block device? So sorry. +- "$1" $2 && return ++ if ! lvm_internal_dev $2; then "$1" $2 && return; fi + check_vol_slaves "$@" && return 0 + if [[ -f /sys/dev/block/$2/../dev ]]; then + check_block_and_slaves $1 $(<"/sys/dev/block/$2/../dev") && return 0 +@@ -595,7 +595,7 @@ check_block_and_slaves() { + check_block_and_slaves_all() { + local _x _ret=1 + [[ -b /dev/block/$2 ]] || return 1 # Not a block device? So sorry. +- if "$1" $2; then ++ if ! lvm_internal_dev $2 && "$1" $2; then + _ret=0 + fi + check_vol_slaves "$@" && return 0 +@@ -1672,3 +1672,15 @@ get_ucode_file () + printf "%02x-%02x-%02x" ${family} ${model} ${stepping} + fi + } ++ ++# Not every device in /dev/mapper should be examined. ++# If it is an LVM device, touch only devices which have /dev/VG/LV symlink. ++lvm_internal_dev() { ++ local dev_dm_dir=/sys/dev/block/$1/dm ++ [[ ! -f $dev_dm_dir/uuid || $(<$dev_dm_dir/uuid) != LVM-* ]] && return 1 # Not an LVM device ++ local DM_VG_NAME DM_LV_NAME DM_LV_LAYER ++ eval $(dmsetup splitname --nameprefixes --noheadings --rows "$(<$dev_dm_dir/name)" 2>/dev/null) ++ [[ ${DM_VG_NAME} ]] && [[ ${DM_LV_NAME} ]] || return 0 # Better skip this! ++ [[ ${DM_LV_LAYER} ]] || [[ ! -L /dev/${DM_VG_NAME}/${DM_LV_NAME} ]] ++} ++ diff --git a/SOURCES/0028-Add-lzo-lz4-compression-and-read-INITRD_COMPRESS.patch b/SOURCES/0028-Add-lzo-lz4-compression-and-read-INITRD_COMPRESS.patch new file mode 100644 index 0000000..abca0f6 --- /dev/null +++ b/SOURCES/0028-Add-lzo-lz4-compression-and-read-INITRD_COMPRESS.patch @@ -0,0 +1,105 @@ +From 123feea1fab225478046db43454b10453df95b51 Mon Sep 17 00:00:00 2001 +From: P J P <ppandit@redhat.com> +Date: Fri, 11 Oct 2013 19:26:51 +0530 +Subject: [PATCH] Add lzo, lz4 compression and read INITRD_COMPRESS + +This patch adds support for lzop(1) & lz4(1) compression +algorithms to compress iniramfs image file. Both are supported +by the Linux kernel. + +Linux kernel exports user's choice of initramfs compression +algorithm as a shell environment variable: INITRD_COMPRESS. +This patch adds support to read this variable and duly compress +the initramfs image file. + +Environment variable INITRD_COMPRESS has less precedence than the +command line options --gzip, etc. Ie. command line options could +override the compression algorithm defined by $INITRD_COMPRESS. + +Signed-off-by: P J P <ppandit@redhat.com> + +[Edited-by: Harald Hoyer: add documentation about lzo and lz4] +--- + dracut.8.asc | 16 ++++++++++++++++ + dracut.sh | 13 +++++++++++++ + 2 files changed, 29 insertions(+) + +diff --git a/dracut.8.asc b/dracut.8.asc +index 584514c0..2ea67447 100644 +--- a/dracut.8.asc ++++ b/dracut.8.asc +@@ -365,6 +365,22 @@ Make sure your kernel has xz decompression support compiled in, otherwise you + will not be able to boot. Equivalent to "lzma --compress=xz --check=crc32 --lzma2=dict=1MiB" + ==== + ++**--lzo**:: ++ Compress the generated initramfs using lzop. ++[WARNING] ++==== ++Make sure your kernel has lzo decompression support compiled in, otherwise you ++will not be able to boot. ++==== ++ ++**--lz4**:: ++ Compress the generated initramfs using lz4. ++[WARNING] ++==== ++Make sure your kernel has lz4 decompression support compiled in, otherwise you ++will not be able to boot. ++==== ++ + **--compress** _<compressor>_:: + Compress the generated initramfs using the passed compression program. If + you pass it just the name of a compression program, it will call that +diff --git a/dracut.sh b/dracut.sh +index d9533dd0..173a259a 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -165,6 +165,12 @@ Creates initial ramdisk images for preloading modules + --xz Compress the generated initramfs using xz. + Make sure that your kernel has xz support compiled + in, otherwise you will not be able to boot. ++ --lzo Compress the generated initramfs using lzop. ++ Make sure that your kernel has lzo support compiled ++ in, otherwise you will not be able to boot. ++ --lz4 Compress the generated initramfs using lz4. ++ Make sure that your kernel has lz4 support compiled ++ in, otherwise you will not be able to boot. + --compress [COMPRESSION] Compress the generated initramfs with the + passed compression program. Make sure your kernel + knows how to decompress the generated initramfs, +@@ -342,6 +348,8 @@ TEMP=$(unset POSIXLY_CORRECT; getopt \ + --long bzip2 \ + --long lzma \ + --long xz \ ++ --long lzo \ ++ --long lz4 \ + --long no-compress \ + --long gzip \ + --long list-modules \ +@@ -430,6 +438,8 @@ while :; do + --bzip2) compress_l="bzip2";; + --lzma) compress_l="lzma";; + --xz) compress_l="xz";; ++ --lzo) compress_l="lzo";; ++ --lz4) compress_l="lz4";; + --no-compress) _no_compress_l="cat";; + --gzip) compress_l="gzip";; + --list-modules) do_list="yes";; +@@ -673,6 +683,7 @@ stdloglvl=$((stdloglvl + verbosity_mod_l)) + [[ $fw_dir ]] || fw_dir="/lib/firmware/updates /lib/firmware" + [[ $tmpdir_l ]] && tmpdir="$tmpdir_l" + [[ $tmpdir ]] || tmpdir=/var/tmp ++[[ $INITRD_COMPRESS ]] && compress=$INITRD_COMPRESS + [[ $compress_l ]] && compress=$compress_l + [[ $show_modules_l ]] && show_modules=$show_modules_l + [[ $nofscks_l ]] && nofscks="yes" +@@ -689,6 +700,8 @@ case $compress in + lzma) compress="lzma -9";; + xz) compress="xz --check=crc32 --lzma2=dict=1MiB";; + gzip) compress="gzip -9"; command -v pigz > /dev/null 2>&1 && compress="pigz -9";; ++ lzo) compress="lzop -9";; ++ lz4) compress="lz4 -9";; + esac + if [[ $_no_compress_l = "cat" ]]; then + compress="cat" diff --git a/SOURCES/0029-git2spec.pl-remove-.git-date-from-release-string.patch b/SOURCES/0029-git2spec.pl-remove-.git-date-from-release-string.patch new file mode 100644 index 0000000..8537e95 --- /dev/null +++ b/SOURCES/0029-git2spec.pl-remove-.git-date-from-release-string.patch @@ -0,0 +1,23 @@ +From 9bd3573ddba40e4ee7b01f4e906126dbdc494f28 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 18 Oct 2013 15:34:44 +0200 +Subject: [PATCH] git2spec.pl: remove ".git$(date)" from release string + +--- + git2spec.pl | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/git2spec.pl b/git2spec.pl +index 0d8adb4a..b8442951 100755 +--- a/git2spec.pl ++++ b/git2spec.pl +@@ -20,8 +20,7 @@ chomp($tag); + my @patches=&create_patches($tag, $pdir); + my $num=$#patches + 2; + $tag=~s/[^0-9]+?([0-9]+)/$1/; +-my $release="$num.git$datestr"; +-$release="1" if $num == 1; ++my $release="$num"; + + while(<>) { + if (/^Version:/) { diff --git a/SOURCES/0030-kernel-modules-ARM-add-mmc_block-usb_storage-to-stat.patch b/SOURCES/0030-kernel-modules-ARM-add-mmc_block-usb_storage-to-stat.patch new file mode 100644 index 0000000..e90bd26 --- /dev/null +++ b/SOURCES/0030-kernel-modules-ARM-add-mmc_block-usb_storage-to-stat.patch @@ -0,0 +1,23 @@ +From 88fc0b8750c827ecdeacd70893905db5d6c9b87d Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 18 Oct 2013 14:56:51 +0200 +Subject: [PATCH] kernel-modules(ARM): add mmc_block usb_storage to statis list + of kernel mods + +--- + modules.d/90kernel-modules/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh +index e7e2ca07..366235ca 100755 +--- a/modules.d/90kernel-modules/module-setup.sh ++++ b/modules.d/90kernel-modules/module-setup.sh +@@ -48,7 +48,7 @@ installkernel() { + # arm specific modules + hostonly='' instmods sdhci_esdhc_imx mmci sdhci_tegra mvsdio omap omapdrm \ + omap_hsmmc panel-tfp410 sdhci_dove ahci_platform pata_imx sata_mv \ +- ehci-tegra ++ ehci-tegra mmc_block usb_storage + fi + + # install virtual machine support diff --git a/SOURCES/0031-lvm-always-install-thin-utils-for-lvm.patch b/SOURCES/0031-lvm-always-install-thin-utils-for-lvm.patch new file mode 100644 index 0000000..0de6b98 --- /dev/null +++ b/SOURCES/0031-lvm-always-install-thin-utils-for-lvm.patch @@ -0,0 +1,75 @@ +From 37e899aad1a9623d4932d689b4082832fa3660d8 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Mon, 21 Oct 2013 09:09:26 +0200 +Subject: [PATCH] lvm: always install thin utils for lvm + +--- + modules.d/90lvm/module-setup.sh | 34 ++++++++------------------------- + 1 file changed, 8 insertions(+), 26 deletions(-) + +diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh +index 50d9b98e..f1c19a22 100755 +--- a/modules.d/90lvm/module-setup.sh ++++ b/modules.d/90lvm/module-setup.sh +@@ -22,7 +22,8 @@ depends() { + return 0 + } + +-get_host_lvs() { ++# called by dracut ++cmdline() { + local _activated + declare -A _activated + +@@ -35,35 +36,20 @@ get_host_lvs() { + eval $(dmsetup splitname --nameprefixes --noheadings --rows "$dev" 2>/dev/null) + [[ ${DM_VG_NAME} ]] && [[ ${DM_LV_NAME} ]] || return 1 + if ! [[ ${_activated[${DM_VG_NAME}/${DM_LV_NAME}]} ]]; then +- printf "%s\n" "${DM_VG_NAME}/${DM_LV_NAME} " ++ printf " rd.lvm.lv=%s\n" "${DM_VG_NAME}/${DM_LV_NAME} " + _activated["${DM_VG_NAME}/${DM_LV_NAME}"]=1 + fi + done + } + +-cmdline() { +- get_host_lvs | while read line; do +- printf " rd.lvm.lv=$line" +- done +-} +- ++# called by dracut + install() { +- local _i _needthin ++ local _i + + inst lvm + +- if [[ $hostonly ]]; then +- while read line; do +- [[ -n "$line" ]] || continue +- printf "%s" " rd.lvm.lv=$line" +- if ! [[ $_needthin ]]; then +- [[ "$(lvs --noheadings -o segtype ${line%%/*} 2>/dev/null)" == *thin* ]] && _needthin=1 +- fi +- done <<<$(get_host_lvs) >> "${initdir}/etc/cmdline.d/90lvm.conf" +- echo >> "${initdir}/etc/cmdline.d/90lvm.conf" +- else +- _needthin=1 +- fi ++ cmdline >> "${initdir}/etc/cmdline.d/90lvm.conf" ++ echo >> "${initdir}/etc/cmdline.d/90lvm.conf" + + inst_rules "$moddir/64-lvm.rules" + +@@ -99,9 +85,5 @@ install() { + + inst_libdir_file "libdevmapper-event-lvm*.so" + +- if [[ $_needthin ]]; then +- inst_multiple -o thin_dump thin_restore thin_check thin_repair +- fi +- ++ inst_multiple -o thin_dump thin_restore thin_check thin_repair + } +- diff --git a/SOURCES/0032-dracut.spec-move-sbin-dracut-to-usr-sbin-dracut.patch b/SOURCES/0032-dracut.spec-move-sbin-dracut-to-usr-sbin-dracut.patch new file mode 100644 index 0000000..8710a3b --- /dev/null +++ b/SOURCES/0032-dracut.spec-move-sbin-dracut-to-usr-sbin-dracut.patch @@ -0,0 +1,33 @@ +From 8eee542b4014166ef52efc20ab499aed4fe231d3 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Mon, 21 Oct 2013 09:43:04 +0200 +Subject: [PATCH] dracut.spec: move /sbin/dracut to /usr/sbin/dracut + +--- + dracut.spec | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/dracut.spec b/dracut.spec +index 8dfc7535..596d7283 100644 +--- a/dracut.spec ++++ b/dracut.spec +@@ -276,8 +276,8 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/ + %endif + + # create compat symlink +-mkdir -p $RPM_BUILD_ROOT/sbin +-ln -s /usr/bin/dracut $RPM_BUILD_ROOT/sbin/dracut ++mkdir -p $RPM_BUILD_ROOT%{_sbindir} ++ln -sr $RPM_BUILD_ROOT%{_bindir}/dracut $RPM_BUILD_ROOT%{_sbindir}/dracut + + %clean + rm -rf -- $RPM_BUILD_ROOT +@@ -287,7 +287,7 @@ rm -rf -- $RPM_BUILD_ROOT + %doc README HACKING TODO COPYING AUTHORS NEWS dracut.html dracut.png dracut.svg + %{_bindir}/dracut + # compat symlink +-/sbin/dracut ++%{_sbindir}/dracut + %{_datadir}/bash-completion/completions/dracut + %{_datadir}/bash-completion/completions/lsinitrd + %if 0%{?fedora} > 12 || 0%{?rhel} >= 6 || 0%{?suse_version} > 9999 diff --git a/SOURCES/0033-usrmount-module-setup.sh-fixed-typo.patch b/SOURCES/0033-usrmount-module-setup.sh-fixed-typo.patch new file mode 100644 index 0000000..5a71168 --- /dev/null +++ b/SOURCES/0033-usrmount-module-setup.sh-fixed-typo.patch @@ -0,0 +1,22 @@ +From 352a49a21d5093955e45c0ccb84c258d4b375aad Mon Sep 17 00:00:00 2001 +From: Alexander Tsoy <alexander@tsoy.me> +Date: Fri, 25 Oct 2013 17:06:44 +0200 +Subject: [PATCH] usrmount/module-setup.sh: fixed typo + +--- + modules.d/98usrmount/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/98usrmount/module-setup.sh b/modules.d/98usrmount/module-setup.sh +index a6680693..1dde9376 100755 +--- a/modules.d/98usrmount/module-setup.sh ++++ b/modules.d/98usrmount/module-setup.sh +@@ -6,7 +6,7 @@ check() { + local _init + [[ $mount_needs ]] && return 1 + _init=$(readlink -f /sbin/init) +- [[ "$init" == "${init##/usr}" ]] && return 255 ++ [[ "$_init" == "${_init##/usr}" ]] && return 255 + return 0 + } + diff --git a/SOURCES/0034-Handle-crypto-modules-with-and-without-modaliases.patch b/SOURCES/0034-Handle-crypto-modules-with-and-without-modaliases.patch new file mode 100644 index 0000000..1a5ee5c --- /dev/null +++ b/SOURCES/0034-Handle-crypto-modules-with-and-without-modaliases.patch @@ -0,0 +1,85 @@ +From ee916b72cc6ec89adf68d5b538044ebb5edcdbbd Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 30 Oct 2013 12:22:52 +0100 +Subject: [PATCH] Handle crypto modules with and without modaliases + +If new kernels have modules split out, handle the case, where modules +have to modalias and just install them. + +Also add the crypto drivers and names to host_modalias. +--- + dracut-functions.sh | 14 ++++++++++---- + dracut.sh | 5 +++++ + modules.d/01fips/fips.sh | 1 - + 3 files changed, 15 insertions(+), 5 deletions(-) + +diff --git a/dracut-functions.sh b/dracut-functions.sh +index 2e6e8456..38095ba4 100755 +--- a/dracut-functions.sh ++++ b/dracut-functions.sh +@@ -1480,7 +1480,7 @@ dracut_kernel_post() { + + module_is_host_only() { + local _mod=$1 +- local _modenc a i ++ local _modenc a i _k _s _v _aliases + _mod=${_mod##*/} + _mod=${_mod%.ko} + _modenc=${_mod//-/_} +@@ -1497,19 +1497,25 @@ module_is_host_only() { + # this covers the case, where a new module is introduced + # or a module was renamed + # or a module changed from builtin to a module ++ + if [[ -d /lib/modules/$kernel_current ]]; then + # if the modinfo can be parsed, but the module + # is not loaded, then we can safely return 1 + modinfo -F filename "$_mod" &>/dev/null && return 1 + fi + +- # Finally check all modalias, if we install for a kernel +- # different from the current one +- for a in $(modinfo -k $kernel -F alias $_mod 2>/dev/null); do ++ _aliases=$(modinfo -k $kernel -F alias $_mod 2>/dev/null) ++ ++ # if the module has no aliases, install it ++ [[ $_aliases ]] || return 0 ++ ++ # finally check all modalias ++ for a in $_aliases; do + for i in "${!host_modalias[@]}"; do + [[ $i == $a ]] && return 0 + done + done ++ + fi + + return 1 +diff --git a/dracut.sh b/dracut.sh +index 173a259a..c6a388ab 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -968,6 +968,11 @@ if [[ $hostonly ]]; then + + rm -f -- "$initdir/.modalias" + ++ while read _k _s _v; do ++ [ "$_k" != "name" -a "$_k" != "driver" ] && continue ++ host_modalias["$_v"]=1 ++ done </proc/crypto ++ + # check /proc/modules + declare -A host_modules + while read m rest; do +diff --git a/modules.d/01fips/fips.sh b/modules.d/01fips/fips.sh +index f0a4c5c2..98dd1c2f 100755 +--- a/modules.d/01fips/fips.sh ++++ b/modules.d/01fips/fips.sh +@@ -96,7 +96,6 @@ do_fips() + _found=0 + while read _k _s _v; do + [ "$_k" != "name" -a "$_k" != "driver" ] && continue +- [ "$_k" = "driver" ] && _v=$(str_replace "$_v" "_" "-") + [ "$_v" != "$_module" ] && continue + _found=1 + break diff --git a/SOURCES/0035-fips-include-crct10dif_generic.patch b/SOURCES/0035-fips-include-crct10dif_generic.patch new file mode 100644 index 0000000..1bc6a25 --- /dev/null +++ b/SOURCES/0035-fips-include-crct10dif_generic.patch @@ -0,0 +1,23 @@ +From eb27e4cc31ff995c5e70442d559fd22377e8a211 Mon Sep 17 00:00:00 2001 +From: Kyle McMartin <kmcmarti@redhat.com> +Date: Wed, 30 Oct 2013 12:35:27 +0100 +Subject: [PATCH] fips: include crct10dif_generic + +Resolves: rhbz#1024455 +--- + modules.d/01fips/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh +index d08e3f74..1ab4999a 100755 +--- a/modules.d/01fips/module-setup.sh ++++ b/modules.d/01fips/module-setup.sh +@@ -13,7 +13,7 @@ depends() { + installkernel() { + local _fipsmodules _mod + _fipsmodules="aead aes_generic aes-x86_64 ansi_cprng arc4 blowfish camellia cast6 cbc ccm " +- _fipsmodules+="chainiv crc32c cryptomgr crypto_null ctr cts deflate des des3_ede dm-crypt dm-mod " ++ _fipsmodules+="chainiv crc32c crct10dif_generic cryptomgr crypto_null ctr cts deflate des des3_ede dm-crypt dm-mod " + _fipsmodules+="ecb eseqiv fcrypt gcm ghash_generic hmac khazad lzo md4 md5 michael_mic rmd128 " + _fipsmodules+="rmd160 rmd256 rmd320 rot13 salsa20 seed seqiv serpent sha1 sha224 sha256 sha256_generic " + _fipsmodules+="sha384 sha512 sha512_generic tcrypt tea tnepres twofish wp256 wp384 wp512 xeta xtea xts zlib" diff --git a/SOURCES/0036-resume-fix-swap-detection-in-hostonly.patch b/SOURCES/0036-resume-fix-swap-detection-in-hostonly.patch new file mode 100644 index 0000000..efc3e2f --- /dev/null +++ b/SOURCES/0036-resume-fix-swap-detection-in-hostonly.patch @@ -0,0 +1,28 @@ +From ccad388c2578ba3e3539c87268a06c73f42b762f Mon Sep 17 00:00:00 2001 +From: Alexander Tsoy <alexander@tsoy.me> +Date: Wed, 9 Oct 2013 06:39:46 +0400 +Subject: [PATCH] resume: fix swap detection in hostonly + +Check for other possible fs types. This fixes swap detection when using +TuxOnIce kernel. + +Note that parse-resume.sh generate udev rules with support for +ID_FS_TYPE=suspend, but we do not include it here, because it is +libvolume_id thing and host_fs_types is populated using blkid. +--- + modules.d/95resume/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/95resume/module-setup.sh b/modules.d/95resume/module-setup.sh +index 518ebf06..a1ddb460 100755 +--- a/modules.d/95resume/module-setup.sh ++++ b/modules.d/95resume/module-setup.sh +@@ -6,7 +6,7 @@ check() { + # No point trying to support resume, if no swap partition exist + [[ $hostonly ]] || [[ $mount_needs ]] && { + for fs in "${host_fs_types[@]}"; do +- [[ $fs = swap ]] && return 0 ++ [[ $fs =~ ^(swap|swsuspend|swsupend)$ ]] && return 0 + done + return 255 + } diff --git a/SOURCES/0037-resume-remove-resume-genrules.sh.patch b/SOURCES/0037-resume-remove-resume-genrules.sh.patch new file mode 100644 index 0000000..28438fd --- /dev/null +++ b/SOURCES/0037-resume-remove-resume-genrules.sh.patch @@ -0,0 +1,88 @@ +From c35826c0e7623852be8735acf8cc13e6bf829208 Mon Sep 17 00:00:00 2001 +From: Alexander Tsoy <alexander@tsoy.me> +Date: Wed, 9 Oct 2013 07:02:56 +0400 +Subject: [PATCH] resume: remove resume-genrules.sh + +parse-resume.sh already contains all the code from resume-genrules.sh. +Also parse-resume.sh is executed before resume-genrules.sh, so there is +no point to keep the latter. + +This fixes the following error messages: +dracut-initqueue: ln: failed to create symbolic link '/dev/resume': File exists +dracut-initqueue: rm: cannot remove '/lib/dracut/hooks/initqueue/settled/resume.sh': No such file or directory +dracut-initqueue: rm: cannot remove '/lib/dracut/hooks/initqueue/timeout/resume.sh': No such file or directory +--- + modules.d/95resume/module-setup.sh | 1 - + modules.d/95resume/resume-genrules.sh | 51 --------------------------- + 2 files changed, 52 deletions(-) + delete mode 100755 modules.d/95resume/resume-genrules.sh + +diff --git a/modules.d/95resume/module-setup.sh b/modules.d/95resume/module-setup.sh +index a1ddb460..c4e93636 100755 +--- a/modules.d/95resume/module-setup.sh ++++ b/modules.d/95resume/module-setup.sh +@@ -30,7 +30,6 @@ install() { + inst_hook cmdline 10 "$moddir/parse-resume.sh" + else + inst_script "$moddir/parse-resume.sh" /lib/dracut/parse-resume.sh +- inst_hook pre-udev 30 "$moddir/resume-genrules.sh" + fi + + inst_script "$moddir/resume.sh" /lib/dracut/resume.sh +diff --git a/modules.d/95resume/resume-genrules.sh b/modules.d/95resume/resume-genrules.sh +deleted file mode 100755 +index c542c715..00000000 +--- a/modules.d/95resume/resume-genrules.sh ++++ /dev/null +@@ -1,51 +0,0 @@ +-#!/bin/sh +-# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +-# ex: ts=8 sw=4 sts=4 et filetype=sh +- +-case "$splash" in +- quiet ) +- a_splash="-P splash=y" +- ;; +- * ) +- a_splash="-P splash=n" +- ;; +-esac +- +-if [ -n "$resume" ]; then +- { +- printf "KERNEL==\"%s\", ACTION==\"add|change\", SYMLINK+=\"/dev/resume\"\n" \ +- ${resume#/dev/}; +- printf "SYMLINK==\"%s\", ACTION==\"add|change\", SYMLINK+=\"/dev/resume\"\n" \ +- ${resume#/dev/}; +- } >> /etc/udev/rules.d/99-resume-link.rules +- +- { +- if [ -x /usr/sbin/resume ]; then +- printf "KERNEL==\"%s\", ACTION==\"add|change\", ENV{ID_FS_TYPE}==\"suspend|swsuspend|swsupend\", RUN+=\"/sbin/initqueue --finished --unique --name 00resume /usr/sbin/resume %s \'%s\'\"\n" \ +- ${resume#/dev/} "$a_splash" "$resume"; +- printf "SYMLINK==\"%s\", ACTION==\"add|change\", ENV{ID_FS_TYPE}==\"suspend|swsuspend|swsupend\", RUN+=\"/sbin/initqueue --finished --unique --name 00resume /usr/sbin/resume %s \'%s\'\"\n" \ +- ${resume#/dev/} "$a_splash" "$resume"; +- fi +- printf "KERNEL==\"%s\", ACTION==\"add|change\", ENV{ID_FS_TYPE}==\"suspend|swsuspend|swsupend\", RUN+=\"/sbin/initqueue --finished --unique --name 00resume echo %%M:%%m > /sys/power/resume\"\n" \ +- ${resume#/dev/}; +- printf "SYMLINK==\"%s\", ACTION==\"add|change\", ENV{ID_FS_TYPE}==\"suspend|swsuspend|swsupend\", RUN+=\"/sbin/initqueue --finished --unique --name 00resume echo %%M:%%m > /sys/power/resume\"\n" \ +- ${resume#/dev/}; +- } >> /etc/udev/rules.d/99-resume.rules +- +- printf '[ -e "%s" ] && { ln -s "%s" /dev/resume; rm "$job" "%s/initqueue/timeout/resume.sh"; }\n' \ +- "$resume" "$resume" "$hookdir" >> $hookdir/initqueue/settled/resume.sh +- +- printf 'warn "Cancelling resume operation. Device not found."; cancel_wait_for_dev /dev/resume; rm "$job" "%s/initqueue/settled/resume.sh";' \ +- "$hookdir" >> $hookdir/initqueue/timeout/resume.sh +- +- wait_for_dev "/dev/resume" +- +-elif ! getarg noresume; then +- { +- if [ -x /usr/sbin/resume ]; then +- printf "SUBSYSTEM==\"block\", ACTION==\"add|change\", ENV{ID_FS_TYPE}==\"suspend|swsuspend|swsupend\", RUN+=\"/sbin/initqueue --finished --unique --name 00resume /usr/sbin/resume %s \$tempnode\"\n" "$a_splash" +- fi +- echo "SUBSYSTEM==\"block\", ACTION==\"add|change\", ENV{ID_FS_TYPE}==\"suspend|swsuspend|swsupend\"," \ +- " RUN+=\"/sbin/initqueue --finished --unique --name 00resume echo %M:%m > /sys/power/resume\""; +- } >> /etc/udev/rules.d/99-resume.rules +-fi diff --git a/SOURCES/0038-iscsi-nbd-do-not-try-to-mount-the-whole-disk-if-root.patch b/SOURCES/0038-iscsi-nbd-do-not-try-to-mount-the-whole-disk-if-root.patch new file mode 100644 index 0000000..7ff37a2 --- /dev/null +++ b/SOURCES/0038-iscsi-nbd-do-not-try-to-mount-the-whole-disk-if-root.patch @@ -0,0 +1,61 @@ +From 65ba6c44d8f578a6fde7377cfcd7448202ba01e0 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 30 Oct 2013 17:36:54 +0100 +Subject: [PATCH] iscsi/nbd: do not try to mount the whole disk, if root= is + missing + +only mount the whole disk for root=dhcp +--- + modules.d/95iscsi/iscsiroot.sh | 11 ++--------- + modules.d/95nbd/nbdroot.sh | 2 +- + 2 files changed, 3 insertions(+), 10 deletions(-) + +diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh +index 5181f523..738fff44 100755 +--- a/modules.d/95iscsi/iscsiroot.sh ++++ b/modules.d/95iscsi/iscsiroot.sh +@@ -40,14 +40,6 @@ modprobe crc32c 2>/dev/null + [ -e /sys/module/bnx2i ] && iscsiuio + + if getargbool 0 rd.iscsi.firmware -d -y iscsi_firmware ; then +- if [ -z "$root" -o -n "${root%%block:*}" ]; then +- # if root is not specified try to mount the whole iSCSI LUN +- printf 'ENV{DEVTYPE}!="partition", SYMLINK=="disk/by-path/*-iscsi-*-*", SYMLINK+="root"\n' >> /etc/udev/rules.d/99-iscsi-root.rules +- udevadm control --reload +- write_fs_tab /dev/root +- wait_for_dev /dev/root +- fi +- + for p in $(getargs rd.iscsi.param -d iscsi_param); do + iscsi_param="$iscsi_param --param $p" + done +@@ -55,6 +47,7 @@ if getargbool 0 rd.iscsi.firmware -d -y iscsi_firmware ; then + iscsistart -b $iscsi_param + echo 'started' > "/tmp/iscsistarted-iscsi" + echo 'started' > "/tmp/iscsistarted-firmware" ++ need_shutdown + exit 0 + fi + +@@ -137,7 +130,7 @@ handle_netroot() + + # FIXME $iscsi_protocol?? + +- if [ -z "$root" -o -n "${root%%block:*}" ]; then ++ if [ "$root" = "dhcp" ]; then + # if root is not specified try to mount the whole iSCSI LUN + printf 'SYMLINK=="disk/by-path/*-iscsi-*-%s", SYMLINK+="root"\n' $iscsi_lun >> /etc/udev/rules.d/99-iscsi-root.rules + udevadm control --reload +diff --git a/modules.d/95nbd/nbdroot.sh b/modules.d/95nbd/nbdroot.sh +index 823da0ea..2e9d9174 100755 +--- a/modules.d/95nbd/nbdroot.sh ++++ b/modules.d/95nbd/nbdroot.sh +@@ -97,7 +97,7 @@ done + + # If we didn't get a root= on the command line, then we need to + # add the udev rules for mounting the nbd0 device +-if [ -z "$root" -o -n "${root%%block:*}" -o "$root" = "block:/dev/root" ]; then ++if [ "$root" = "block:/dev/root" -o "$root" = "dhcp" ]; then + printf 'KERNEL=="nbd0", ENV{DEVTYPE}!="partition", ENV{ID_FS_TYPE}=="?*", SYMLINK+="root"\n' >> /etc/udev/rules.d/99-nbd-root.rules + udevadm control --reload + type write_fs_tab >/dev/null 2>&1 || . /lib/fs-lib.sh diff --git a/SOURCES/0039-fips-also-install-etc-system-fips-in-the-initramfs.patch b/SOURCES/0039-fips-also-install-etc-system-fips-in-the-initramfs.patch new file mode 100644 index 0000000..d4b5fd1 --- /dev/null +++ b/SOURCES/0039-fips-also-install-etc-system-fips-in-the-initramfs.patch @@ -0,0 +1,20 @@ +From 20ff2d37cc14f72a97325b12ebb7437efbaf0a8e Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Mon, 4 Nov 2013 17:29:15 +0100 +Subject: [PATCH] fips: also install /etc/system-fips in the initramfs + +--- + modules.d/01fips/module-setup.sh | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh +index 1ab4999a..35cfdc5a 100755 +--- a/modules.d/01fips/module-setup.sh ++++ b/modules.d/01fips/module-setup.sh +@@ -41,5 +41,6 @@ install() { + libssl.so 'hmaccalc/sha512hmac.hmac' libssl.so.10 + + inst_multiple -o prelink ++ inst_simple /etc/system-fips + } + diff --git a/SOURCES/0040-dracut-functions.sh-Avoid-loading-unnecessary-32-bit.patch b/SOURCES/0040-dracut-functions.sh-Avoid-loading-unnecessary-32-bit.patch new file mode 100644 index 0000000..d8e9977 --- /dev/null +++ b/SOURCES/0040-dracut-functions.sh-Avoid-loading-unnecessary-32-bit.patch @@ -0,0 +1,43 @@ +From 03bf7758aa08e6533f438b4a60b4d5bd1847b1cd Mon Sep 17 00:00:00 2001 +From: Colin Guthrie <colin@mageia.org> +Date: Sat, 2 Nov 2013 11:26:30 +0000 +Subject: [PATCH] dracut-functions.sh: Avoid loading unnecessary 32-bit + libraries for 64-bit initrds + +Due to the 'inst_libdir_file "libnss_files*"' in the udev-rules module +this caues the /usr/lib/libnss_files-2.18.so* to be included. This is a +32-bit library and pulls in a 32-bit version of glibc also even on a +64-bit system. + +This is due to the fact that ldconfig -pN will print [/usr]/lib paths +from the cache as well as [/usr]/lib64. As we handle these paths +specifically we should ignore these results from the cache. + +Also there was a missing space when appending the ldconfig paths +onto our list meaning the last builtin and first ldconfig path +were unusable. +--- + dracut-functions.sh | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/dracut-functions.sh b/dracut-functions.sh +index 38095ba4..2872516a 100755 +--- a/dracut-functions.sh ++++ b/dracut-functions.sh +@@ -65,6 +65,7 @@ ldconfig_paths() + printf "%s\n" ${d%/*}; + done + ); do ++ [[ "$i" = "/lib" || "$i" = "/usr/lib" || "$i" = "/lib64" || "$i" = "/usr/lib64" ]] && continue + a["$i"]=1; + done; + printf "%s\n" ${!a[@]} +@@ -81,7 +82,7 @@ if ! [[ $libdirs ]] ; then + [[ -d /usr/lib ]] && libdirs+=" /usr/lib" + fi + +- libdirs+="$(ldconfig_paths)" ++ libdirs+=" $(ldconfig_paths)" + + export libdirs + fi diff --git a/SOURCES/0041-systemd-do-not-exit-the-initqueue-if-systemd-asks-a-.patch b/SOURCES/0041-systemd-do-not-exit-the-initqueue-if-systemd-asks-a-.patch new file mode 100644 index 0000000..336875c --- /dev/null +++ b/SOURCES/0041-systemd-do-not-exit-the-initqueue-if-systemd-asks-a-.patch @@ -0,0 +1,27 @@ +From 52592ce022550fbf6c7576f5c8b8be1f2b6d72c8 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Mon, 11 Nov 2013 16:57:32 +0100 +Subject: [PATCH] systemd: do not exit the initqueue, if systemd asks a + password + +this prevents bailing out the initqueue, while passwords are still to be +asked +--- + modules.d/98systemd/dracut-initqueue.sh | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/modules.d/98systemd/dracut-initqueue.sh b/modules.d/98systemd/dracut-initqueue.sh +index d7ebf2b2..64e81541 100755 +--- a/modules.d/98systemd/dracut-initqueue.sh ++++ b/modules.d/98systemd/dracut-initqueue.sh +@@ -52,6 +52,10 @@ while :; do + # no more udev jobs and queues empty. + sleep 0.5 + ++ for i in /run/systemd/ask-password/ask.*; do ++ [ -e "$i" ] && continue ++ done ++ + if [ $main_loop -gt $((2*$RDRETRY/3)) ]; then + for job in $hookdir/initqueue/timeout/*.sh; do + [ -e "$job" ] || break diff --git a/SOURCES/0042-kernel-modules-add-ohci-pci-to-the-list-of-forced-mo.patch b/SOURCES/0042-kernel-modules-add-ohci-pci-to-the-list-of-forced-mo.patch new file mode 100644 index 0000000..e9e15fa --- /dev/null +++ b/SOURCES/0042-kernel-modules-add-ohci-pci-to-the-list-of-forced-mo.patch @@ -0,0 +1,30 @@ +From 1dd604efb199af87ba0079eed809483559c9b04f Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 14 Nov 2013 10:07:04 +0100 +Subject: [PATCH] kernel-modules: add ohci-pci to the list of forced module + installs + +--- + modules.d/90kernel-modules/module-setup.sh | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh +index 366235ca..510b43e1 100755 +--- a/modules.d/90kernel-modules/module-setup.sh ++++ b/modules.d/90kernel-modules/module-setup.sh +@@ -35,9 +35,12 @@ installkernel() { + return 0 + } + +- hostonly='' instmods sr_mod sd_mod scsi_dh ata_piix \ +- ehci-hcd ehci-pci ehci-platform ohci-hcd uhci-hcd xhci-hcd hid_generic \ +- unix ++ hostonly='' instmods \ ++ sr_mod sd_mod scsi_dh ata_piix hid_generic unix \ ++ ehci-hcd ehci-pci ehci-platform \ ++ ohci-hcd ohci-pci \ ++ uhci-hcd \ ++ xhci-hcd + + instmods yenta_socket scsi_dh_rdac scsi_dh_emc \ + atkbd i8042 usbhid hid-apple hid-sunplus hid-cherry hid-logitech \ diff --git a/SOURCES/0043-lvm-do-not-run-pvscan-for-lvmetad-update.patch b/SOURCES/0043-lvm-do-not-run-pvscan-for-lvmetad-update.patch new file mode 100644 index 0000000..c6bf25a --- /dev/null +++ b/SOURCES/0043-lvm-do-not-run-pvscan-for-lvmetad-update.patch @@ -0,0 +1,36 @@ +From 05b79aaa9dde30d4f179303a81084b59898406b6 Mon Sep 17 00:00:00 2001 +From: Peter Rajnoha <prajnoha@redhat.com> +Date: Mon, 25 Nov 2013 14:38:00 +0100 +Subject: [PATCH] lvm: do not run pvscan for lvmetad update + +The lvmetad daemon is not yet running in initramfs so there's no +need to run pvscan (or instantiate any lvm2-pvscan systemd service). +If pvscan was called in this case (either directly or via systemd +instantiated service), it would fail because there's no lvmetad +daemon to update. This could cause confusion, especially in systemd +instantiated service which is run only once! +--- + modules.d/90lvm/module-setup.sh | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh +index f1c19a22..7e3d44fa 100755 +--- a/modules.d/90lvm/module-setup.sh ++++ b/modules.d/90lvm/module-setup.sh +@@ -74,6 +74,16 @@ install() { + fi + + inst_rules 11-dm-lvm.rules 69-dm-lvm-metad.rules ++ ++ # Do not run lvmetad update via pvscan in udev rule - lvmetad is not running yet in dracut! ++ if grep -q SYSTEMD_WANTS ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules; then ++ sed -i -e 's/^ENV{SYSTEMD_ALIAS}=.*/# No LVM pvscan in dracut - lvmetad is not running yet/' ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules ++ sed -i -e 's/^ENV{ID_MODEL}=.*//' ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules ++ sed -i -e 's/^ENV{SYSTEMD_WANTS}=.*//' ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules ++ else ++ sed -i -e 's/.*lvm pvscan.*/# No LVM pvscan for in dracut - lvmetad is not running yet/' ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules ++ fi ++ + # Gentoo ebuild for LVM2 prior to 2.02.63-r1 doesn't install above rules + # files, but provides the one below: + inst_rules 64-device-mapper.rules diff --git a/SOURCES/0044-fips-fix-RHEV-vmlinuz-check.patch b/SOURCES/0044-fips-fix-RHEV-vmlinuz-check.patch new file mode 100644 index 0000000..323a773 --- /dev/null +++ b/SOURCES/0044-fips-fix-RHEV-vmlinuz-check.patch @@ -0,0 +1,39 @@ +From e590f5beec5bc282898e38b8d1016288cfc4af9f Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 8 Nov 2013 15:06:18 +0100 +Subject: [PATCH] fips: fix RHEV vmlinuz check + +--- + modules.d/01fips/fips.sh | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/modules.d/01fips/fips.sh b/modules.d/01fips/fips.sh +index 98dd1c2f..7fa48f13 100755 +--- a/modules.d/01fips/fips.sh ++++ b/modules.d/01fips/fips.sh +@@ -60,8 +60,8 @@ do_rhevh_check() + KERNEL=$(uname -r) + kpath=${1} + +- # If we're on RHEV-H, the kernel is in /dev/.initramfs/live/vmlinuz0 +- HMAC_SUM_ORIG=$(cat /boot/.vmlinuz-${KERNEL}.hmac | while read a b; do printf "%s\n" $a; done) ++ # If we're on RHEV-H, the kernel is in /run/initramfs/live/vmlinuz0 ++ HMAC_SUM_ORIG=$(cat $NEWROOT/boot/.vmlinuz-${KERNEL}.hmac | while read a b; do printf "%s\n" $a; done) + HMAC_SUM_CALC=$(sha512hmac $kpath | while read a b; do printf "%s\n" $a; done || return 1) + if [ -z "$HMAC_SUM_ORIG" ] || [ -z "$HMAC_SUM_CALC" ] || [ "${HMAC_SUM_ORIG}" != "${HMAC_SUM_CALC}" ]; then + warn "HMAC sum mismatch" +@@ -111,10 +111,10 @@ do_fips() + rmmod tcrypt + + info "Checking integrity of kernel" +- if [ -e "$NEWROOT/dev/.initramfs/live/vmlinuz0" ]; then +- do_rhevh_check "$NEWROOT/dev/.initramfs/live/vmlinuz0" || return 1 +- elif [ -e "$NEWROOT/dev/.initramfs/live/isolinux/vmlinuz0" ]; then +- do_rhevh_check "$NEWROOT/dev/.initramfs/live/isolinux/vmlinuz0" || return 1 ++ if [ -e "/run/initramfs/live/vmlinuz0" ]; then ++ do_rhevh_check /run/initramfs/live/vmlinuz0 || return 1 ++ elif [ -e "/run/initramfs/live/isolinux/vmlinuz0" ]; then ++ do_rhevh_check /run/initramfs/live/isolinux/vmlinuz0 || return 1 + else + sha512hmac -c "/boot/.vmlinuz-${KERNEL}.hmac" || return 1 + fi diff --git a/SOURCES/0045-dracut.cmdline.7.asc-document-server-ip-of-ip-parame.patch b/SOURCES/0045-dracut.cmdline.7.asc-document-server-ip-of-ip-parame.patch new file mode 100644 index 0000000..9fc3864 --- /dev/null +++ b/SOURCES/0045-dracut.cmdline.7.asc-document-server-ip-of-ip-parame.patch @@ -0,0 +1,28 @@ +From 15962471fed6c1f074f532d2e74c3583b1d38128 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Mon, 2 Dec 2013 10:30:52 +0100 +Subject: [PATCH] dracut.cmdline.7.asc: document "server-ip" of "ip=" parameter + +--- + dracut.cmdline.7.asc | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc +index 19bfb939..6a5fc8f6 100644 +--- a/dracut.cmdline.7.asc ++++ b/dracut.cmdline.7.asc +@@ -444,10 +444,12 @@ cannot be used in conjunction with the **ifname** argument for the + same <interface>. + ===================== + +-**ip=**__<client-IP>__:__<server-IP>__:__<gateway-IP>__:__<netmask>__:__<client_hostname>__:__<interface>__:__{none|off|dhcp|on|any|dhcp6|auto6|ibft}__:[:[__<mtu>__][:__<macaddr>__]]:: ++**ip=**__<client-IP>__:[__<peer>__]:__<gateway-IP>__:__<netmask>__:__<client_hostname>__:__<interface>__:__{none|off|dhcp|on|any|dhcp6|auto6|ibft}__:[:[__<mtu>__][:__<macaddr>__]]:: + explicit network configuration. If you want do define a IPv6 address, put it + in brackets (e.g. [2001:DB8::1]). This parameter can be specified multiple +- times. ++ times. __<peer>__ is optional and is the address of the remote endpoint ++ for pointopoint interfaces and it may be followed by a slash and a decimal number, ++ encoding the network prefix length. + + + ===================== + <macaddr>::: optionally **set** <macaddr> on the <interface>. This diff --git a/SOURCES/0046-dracut.sh-_get_fs_type-if-block-device-exists-return.patch b/SOURCES/0046-dracut.sh-_get_fs_type-if-block-device-exists-return.patch new file mode 100644 index 0000000..70b469d --- /dev/null +++ b/SOURCES/0046-dracut.sh-_get_fs_type-if-block-device-exists-return.patch @@ -0,0 +1,31 @@ +From fb67162559469fedd84950eee6808962ceaf48a7 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Mon, 2 Dec 2013 10:32:00 +0100 +Subject: [PATCH] dracut.sh:_get_fs_type() if block device exists return early + +even, if no ID_FS_TYPE was found, return if the block device exists +--- + dracut.sh | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/dracut.sh b/dracut.sh +index c6a388ab..5f14d503 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -985,12 +985,12 @@ unset rest + + _get_fs_type() { + [[ $1 ]] || return +- if [[ -b /dev/block/$1 ]] && ID_FS_TYPE=$(get_fs_env "/dev/block/$1"); then +- host_fs_types["$(readlink -f "/dev/block/$1")"]="$ID_FS_TYPE" ++ if [[ -b /dev/block/$1 ]]; then ++ ID_FS_TYPE=$(get_fs_env "/dev/block/$1") && host_fs_types["$(readlink -f "/dev/block/$1")"]="$ID_FS_TYPE" + return 1 + fi +- if [[ -b $1 ]] && ID_FS_TYPE=$(get_fs_env "$1"); then +- host_fs_types["$(readlink -f "$1")"]="$ID_FS_TYPE" ++ if [[ -b $1 ]]; then ++ ID_FS_TYPE=$(get_fs_env "$1") && host_fs_types["$(readlink -f "$1")"]="$ID_FS_TYPE" + return 1 + fi + if fstype=$(find_dev_fstype "$1"); then diff --git a/SOURCES/0047-network-net-lib.sh-wait_for_if_up-wait-for-state-UP.patch b/SOURCES/0047-network-net-lib.sh-wait_for_if_up-wait-for-state-UP.patch new file mode 100644 index 0000000..4682451 --- /dev/null +++ b/SOURCES/0047-network-net-lib.sh-wait_for_if_up-wait-for-state-UP.patch @@ -0,0 +1,23 @@ +From 243b8e14a2cdd317717ad8db5bb82aae9a8d7d14 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Mon, 2 Dec 2013 10:34:18 +0100 +Subject: [PATCH] network/net-lib.sh:wait_for_if_up() wait for "state UP" + +really wait for "state UP", otherwise it returns earlier than we want +--- + modules.d/40network/net-lib.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index 88e72ece..0aa312a0 100644 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -443,7 +443,7 @@ wait_for_if_up() { + local li + while [ $cnt -lt 200 ]; do + li=$(ip -o link show up dev $1) +- [ -n "$li" ] && return 0 ++ [ -n "$li" ] && [ -z "${li##*state UP*}" ] && return 0 + sleep 0.1 + cnt=$(($cnt+1)) + done diff --git a/SOURCES/0048-network-net-lib.sh-iface_has_link-fixup.patch b/SOURCES/0048-network-net-lib.sh-iface_has_link-fixup.patch new file mode 100644 index 0000000..52ed2b2 --- /dev/null +++ b/SOURCES/0048-network-net-lib.sh-iface_has_link-fixup.patch @@ -0,0 +1,73 @@ +From 34397fe702ae21a3566e166b4001e8121766d5a7 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Mon, 2 Dec 2013 10:36:42 +0100 +Subject: [PATCH] network/net-lib.sh:iface_has_link() fixup + +Just echo'ing the flags IFF_UP|IFF_RUNNING does _not_ reflect the +carrier state immediately. So wait for it to really show up. +--- + modules.d/40network/net-lib.sh | 47 +++++++++++++++++----------------- + 1 file changed, 23 insertions(+), 24 deletions(-) + +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index 0aa312a0..7544401f 100644 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -28,30 +28,6 @@ iface_for_mac() { + done + } + +-iface_has_link() { +- local interface="$1" flags="" +- [ -n "$interface" ] || return 2 +- interface="/sys/class/net/$interface" +- [ -d "$interface" ] || return 2 +- flags=$(cat $interface/flags) +- echo $(($flags|0x41)) > $interface/flags # 0x41: IFF_UP|IFF_RUNNING +- [ "$(cat $interface/carrier)" = 1 ] || return 1 +- # XXX Do we need to reset the flags here? anaconda never bothered.. +-} +- +-find_iface_with_link() { +- local iface_path="" iface="" +- for iface_path in /sys/class/net/*; do +- iface=${iface_path##*/} +- str_starts "$iface" "lo" && continue +- if iface_has_link $iface; then +- echo "$iface" +- return 0 +- fi +- done +- return 1 +-} +- + # get the iface name for the given identifier - either a MAC, IP, or iface name + iface_name() { + case $1 in +@@ -483,3 +459,26 @@ type hostname >/dev/null 2>&1 || \ + hostname() { + cat /proc/sys/kernel/hostname + } ++ ++iface_has_link() { ++ local interface="$1" flags="" ++ [ -n "$interface" ] || return 2 ++ interface="/sys/class/net/$interface" ++ [ -d "$interface" ] || return 2 ++ linkup "$1" ++ [ "$(cat $interface/carrier)" = 1 ] || return 1 ++ # XXX Do we need to reset the flags here? anaconda never bothered.. ++} ++ ++find_iface_with_link() { ++ local iface_path="" iface="" ++ for iface_path in /sys/class/net/*; do ++ iface=${iface_path##*/} ++ str_starts "$iface" "lo" && continue ++ if iface_has_link $iface; then ++ echo "$iface" ++ return 0 ++ fi ++ done ++ return 1 ++} diff --git a/SOURCES/0049-network-ifup.sh-before-doing-dhcp-check-if-the-link-.patch b/SOURCES/0049-network-ifup.sh-before-doing-dhcp-check-if-the-link-.patch new file mode 100644 index 0000000..b581d9b --- /dev/null +++ b/SOURCES/0049-network-ifup.sh-before-doing-dhcp-check-if-the-link-.patch @@ -0,0 +1,25 @@ +From 7aa989a4fd5c29da18e9e57fb94dec253516b0c4 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Mon, 2 Dec 2013 10:38:21 +0100 +Subject: [PATCH] network/ifup.sh: before doing dhcp, check, if the link has a + carrier + +--- + modules.d/40network/ifup.sh | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index 9f6f4494..2edcfe69 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -87,6 +87,10 @@ do_dhcp() { + # dhclient-script will mark the netif up and generate the online + # event for nfsroot + # XXX add -V vendor class and option parsing per kernel ++ if ! iface_has_link $netif; then ++ echo "No carrier detected" ++ return 1 ++ fi + echo "Starting dhcp for interface $netif" + dhclient "$@" -1 -q -cf /etc/dhclient.conf -pf /tmp/dhclient.$netif.pid -lf /tmp/dhclient.$netif.lease $netif \ + || echo "dhcp failed" diff --git a/SOURCES/0050-base-dracut-lib.sh-wait_for_dev-relax-requirement.patch b/SOURCES/0050-base-dracut-lib.sh-wait_for_dev-relax-requirement.patch new file mode 100644 index 0000000..2dfcbda --- /dev/null +++ b/SOURCES/0050-base-dracut-lib.sh-wait_for_dev-relax-requirement.patch @@ -0,0 +1,39 @@ +From 32c431bb48601a699d8da0b2ff22299ab3888183 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Mon, 2 Dec 2013 10:39:36 +0100 +Subject: [PATCH] base/dracut-lib.sh:wait_for_dev() relax requirement + +Do not "require" the devices, but "want" them. This might boot more +systems, where: +- the UUID changed +- swap devices do not show up +--- + modules.d/99base/dracut-lib.sh | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh +index 74d7d352..7249c589 100755 +--- a/modules.d/99base/dracut-lib.sh ++++ b/modules.d/99base/dracut-lib.sh +@@ -856,9 +856,9 @@ wait_for_dev() + + if [ -n "$DRACUT_SYSTEMD" ]; then + _name=$(dev_unit_name "$1") +- if ! [ -L ${PREFIX}/etc/systemd/system/initrd.target.requires/${_name}.device ]; then +- [ -d ${PREFIX}/etc/systemd/system/initrd.target.requires ] || mkdir -p ${PREFIX}/etc/systemd/system/initrd.target.requires +- ln -s ../${_name}.device ${PREFIX}/etc/systemd/system/initrd.target.requires/${_name}.device ++ if ! [ -L ${PREFIX}/etc/systemd/system/initrd.target.wants/${_name}.device ]; then ++ [ -d ${PREFIX}/etc/systemd/system/initrd.target.wants ] || mkdir -p ${PREFIX}/etc/systemd/system/initrd.target.wants ++ ln -s ../${_name}.device ${PREFIX}/etc/systemd/system/initrd.target.wants/${_name}.device + fi + + mkdir -p ${PREFIX}/etc/systemd/system/${_name}.device.d +@@ -878,7 +878,7 @@ cancel_wait_for_dev() + rm -f -- "$hookdir/emergency/80-${_name}.sh" + if [ -n "$DRACUT_SYSTEMD" ]; then + _name=$(dev_unit_name "$1") +- rm -f -- ${PREFIX}/etc/systemd/system/initrd.target.requires/${_name}.device ++ rm -f -- ${PREFIX}/etc/systemd/system/initrd.target.wants/${_name}.device + rm -f -- ${PREFIX}/etc/systemd/system/${_name}.device.d/timeout.conf + /sbin/initqueue --onetime --unique --name daemon-reload systemctl daemon-reload + fi diff --git a/SOURCES/0051-dracut.sh-skip-crypt-swaps-with-password-files.patch b/SOURCES/0051-dracut.sh-skip-crypt-swaps-with-password-files.patch new file mode 100644 index 0000000..543ed1b --- /dev/null +++ b/SOURCES/0051-dracut.sh-skip-crypt-swaps-with-password-files.patch @@ -0,0 +1,22 @@ +From 7f61e2c8957081d929a4f4fba8645b6b6e71d043 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Mon, 2 Dec 2013 11:05:21 +0100 +Subject: [PATCH] dracut.sh: skip crypt swaps with password files + +--- + dracut.sh | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/dracut.sh b/dracut.sh +index 5f14d503..b03522bf 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -945,6 +945,8 @@ if [[ $hostonly ]]; then + [[ $_mapper = \#* ]] && continue + [[ "$_d" -ef /dev/mapper/"$_mapper" ]] || continue + [[ "$_o" ]] || _o="$_p" ++ # skip entries with password files ++ [[ "$_p" == /* ]] && [[ -f $_p ]] && continue 2 + # skip mkswap swap + [[ $_o == *swap* ]] && continue 2 + done < /etc/crypttab diff --git a/SOURCES/0052-Fixup-script-permissions.patch b/SOURCES/0052-Fixup-script-permissions.patch new file mode 100644 index 0000000..27f821f --- /dev/null +++ b/SOURCES/0052-Fixup-script-permissions.patch @@ -0,0 +1,46 @@ +From 411d2aedd602d2b1c85b42bf6de2b18b5a7a249a Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke <hare@suse.de> +Date: Fri, 29 Nov 2013 13:13:53 +0100 +Subject: [PATCH] Fixup script permissions + +Scripts with a shebang should be marked as executable. + +Signed-off-by: Hannes Reinecke <hare@suse.de> +--- + modules.d/03modsign/load-modsign-keys.sh | 0 + modules.d/03modsign/module-setup.sh | 0 + modules.d/40network/net-lib.sh | 0 + modules.d/40network/parse-vlan.sh | 0 + modules.d/50drm/module-setup.sh | 0 + modules.d/91crypt-loop/crypt-loop-lib.sh | 0 + modules.d/98pollcdrom/pollcdrom.sh | 0 + 7 files changed, 0 insertions(+), 0 deletions(-) + mode change 100644 => 100755 modules.d/03modsign/load-modsign-keys.sh + mode change 100644 => 100755 modules.d/03modsign/module-setup.sh + mode change 100644 => 100755 modules.d/40network/net-lib.sh + mode change 100644 => 100755 modules.d/40network/parse-vlan.sh + mode change 100644 => 100755 modules.d/50drm/module-setup.sh + mode change 100644 => 100755 modules.d/91crypt-loop/crypt-loop-lib.sh + mode change 100644 => 100755 modules.d/98pollcdrom/pollcdrom.sh + +diff --git a/modules.d/03modsign/load-modsign-keys.sh b/modules.d/03modsign/load-modsign-keys.sh +old mode 100644 +new mode 100755 +diff --git a/modules.d/03modsign/module-setup.sh b/modules.d/03modsign/module-setup.sh +old mode 100644 +new mode 100755 +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +old mode 100644 +new mode 100755 +diff --git a/modules.d/40network/parse-vlan.sh b/modules.d/40network/parse-vlan.sh +old mode 100644 +new mode 100755 +diff --git a/modules.d/50drm/module-setup.sh b/modules.d/50drm/module-setup.sh +old mode 100644 +new mode 100755 +diff --git a/modules.d/91crypt-loop/crypt-loop-lib.sh b/modules.d/91crypt-loop/crypt-loop-lib.sh +old mode 100644 +new mode 100755 +diff --git a/modules.d/98pollcdrom/pollcdrom.sh b/modules.d/98pollcdrom/pollcdrom.sh +old mode 100644 +new mode 100755 diff --git a/SOURCES/0053-Remove-shebang-from-shell-completion-files.patch b/SOURCES/0053-Remove-shebang-from-shell-completion-files.patch new file mode 100644 index 0000000..384dfe1 --- /dev/null +++ b/SOURCES/0053-Remove-shebang-from-shell-completion-files.patch @@ -0,0 +1,34 @@ +From ff3d291a68b912194a7f72a084359ab13853b753 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke <hare@suse.de> +Date: Fri, 29 Nov 2013 13:13:54 +0100 +Subject: [PATCH] Remove shebang from shell-completion files + +Shell-completion files are meant to be sourced, not executed. +So they shouldn't have a shebang at the start. + +Signed-off-by: Hannes Reinecke <hare@suse.de> +--- + dracut-bash-completion.sh | 2 +- + lsinitrd-bash-completion.sh | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/dracut-bash-completion.sh b/dracut-bash-completion.sh +index d796c358..9f359c6e 100644 +--- a/dracut-bash-completion.sh ++++ b/dracut-bash-completion.sh +@@ -1,4 +1,4 @@ +-#!/bin/bash ++# + # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- + # ex: ts=8 sw=4 sts=4 et filetype=sh + # +diff --git a/lsinitrd-bash-completion.sh b/lsinitrd-bash-completion.sh +index 78ab1654..3df2965f 100644 +--- a/lsinitrd-bash-completion.sh ++++ b/lsinitrd-bash-completion.sh +@@ -1,4 +1,4 @@ +-#!/bin/bash ++# + # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- + # ex: ts=8 sw=4 sts=4 et filetype=sh + # diff --git a/SOURCES/0054-i18n-introduce-i18n_install_all-to-install-everythin.patch b/SOURCES/0054-i18n-introduce-i18n_install_all-to-install-everythin.patch new file mode 100644 index 0000000..515454f --- /dev/null +++ b/SOURCES/0054-i18n-introduce-i18n_install_all-to-install-everythin.patch @@ -0,0 +1,127 @@ +From dac45f997e6868ffba23610167c8bcb7476b0f96 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 5 Dec 2013 16:42:05 +0100 +Subject: [PATCH] i18n: introduce i18n_install_all, to install everything + +if i18n_install_all is set to "yes", then install all keyboard layouts +and fonts regardless of the hostonly setting. + +This way, people can switch keyboard layouts, without having to recreate +the initramfs. +--- + dracut.conf.5.asc | 14 ++++++++++++-- + dracut.conf.d/fedora.conf.example | 1 + + modules.d/10i18n/module-setup.sh | 31 +++++++++++++++++-------------- + 3 files changed, 30 insertions(+), 16 deletions(-) + +diff --git a/dracut.conf.5.asc b/dracut.conf.5.asc +index c9c854a9..30b7e030 100644 +--- a/dracut.conf.5.asc ++++ b/dracut.conf.5.asc +@@ -122,10 +122,10 @@ If chrooted to another root other than the real root device, use --fstab and pro + *kernel_only=*"__{yes|no}__":: + Only install kernel drivers and firmware files. (default=no) + +-*no_kernel=*"{yes|no}":: ++*no_kernel=*"__{yes|no}__":: + Do not install kernel drivers and firmware files (default=no) + +-*acpi_override=*"{yes|no}":: ++*acpi_override=*"__{yes|no}__":: + [WARNING] ONLY USE THIS IF YOU KNOW WHAT YOU ARE DOING! + + Override BIOS provided ACPI tables. For further documentation read + Documentation/acpi/initrd_table_override.txt in the kernel sources. +@@ -158,6 +158,16 @@ If chrooted to another root other than the real root device, use --fstab and pro + *show_modules=*"__{yes|no}__":: + Print the name of the included modules to standard output during build. + ++*i18n_vars="__<variable mapping>__":: ++ Distribution specific variable mapping. ++ See dracut/modules.d/10i18n/README for a detailed description. ++ ++*i18n_default_font=*"__<fontname>__":: ++ The font <fontname> to install, if not specified otherwise. Default is "LatArCyrHeb-16". ++ ++*i18n_install_all=*"__{yes|no}__":: ++ Install everything regardless of generic or hostonly mode. ++ + Files + ----- + _/etc/dracut.conf_:: +diff --git a/dracut.conf.d/fedora.conf.example b/dracut.conf.d/fedora.conf.example +index 1a56a864..495e8fb3 100644 +--- a/dracut.conf.d/fedora.conf.example ++++ b/dracut.conf.d/fedora.conf.example +@@ -3,6 +3,7 @@ + # i18n + i18n_vars="/etc/sysconfig/keyboard:KEYTABLE-KEYMAP /etc/sysconfig/i18n:SYSFONT-FONT,FONTACM-FONT_MAP,FONT_UNIMAP" + i18n_default_font="latarcyrheb-sun16" ++i18n_install_all="yes" + stdloglvl=3 + sysloglvl=5 + install_items+=" vi /etc/virc ps grep cat rm " +diff --git a/modules.d/10i18n/module-setup.sh b/modules.d/10i18n/module-setup.sh +index 2a837280..413ee123 100755 +--- a/modules.d/10i18n/module-setup.sh ++++ b/modules.d/10i18n/module-setup.sh +@@ -18,15 +18,11 @@ depends() { + + install() { + if dracut_module_included "systemd"; then +- [[ -f /etc/vconsole.conf ]] || return 0 + unset FONT + unset KEYMAP +- . /etc/vconsole.conf +- # if vconsole.conf has no settings, do not include anything +- [[ $FONT ]] || [[ $KEYMAP ]] || return 0 ++ [[ -f /etc/vconsole.conf ]] && . /etc/vconsole.conf + fi + +- inst_multiple -o $systemdutildir/systemd-vconsole-setup + KBDSUBDIRS=consolefonts,consoletrans,keymaps,unimaps + DEFAULT_FONT="${i18n_default_font:-LatArCyrHeb-16}" + I18N_CONF="/etc/locale.conf" +@@ -207,10 +203,20 @@ install() { + inst_simple ${kbddir}/unimaps/${FONT_UNIMAP}.uni + fi + +- mksubdirs ${initdir}${I18N_CONF} +- mksubdirs ${initdir}${VCONFIG_CONF} +- print_vars LC_ALL LANG >> ${initdir}${I18N_CONF} +- print_vars KEYMAP EXT_KEYMAPS UNICODE FONT FONT_MAP FONT_UNIMAP >> ${initdir}${VCONFIG_CONF} ++ if dracut_module_included "systemd" && [[ -f ${I18N_CONF} ]]; then ++ inst_simple ${I18N_CONF} ++ else ++ mksubdirs ${initdir}${I18N_CONF} ++ print_vars LC_ALL LANG >> ${initdir}${I18N_CONF} ++ fi ++ ++ if dracut_module_included "systemd" && [[ -f ${VCONFIG_CONF} ]]; then ++ inst_simple ${VCONFIG_CONF} ++ else ++ mksubdirs ${initdir}${VCONFIG_CONF} ++ print_vars KEYMAP EXT_KEYMAPS UNICODE FONT FONT_MAP FONT_UNIMAP >> ${initdir}${VCONFIG_CONF} ++ fi ++ + return 0 + } + +@@ -234,16 +240,13 @@ install() { + return 0 + } + +- if checks +- then ++ if checks; then + install_base + +- if [[ ${hostonly} ]] +- then ++ if [[ ${hostonly} ]] && ! [[ ${i18n_install_all} ]]; then + install_local_i18n || install_all_kbd + else + install_all_kbd + fi + fi + } +- diff --git a/SOURCES/0055-Run-xz-and-lzma-with-multiple-threads.patch b/SOURCES/0055-Run-xz-and-lzma-with-multiple-threads.patch new file mode 100644 index 0000000..aedc08c --- /dev/null +++ b/SOURCES/0055-Run-xz-and-lzma-with-multiple-threads.patch @@ -0,0 +1,35 @@ +From 90441c4476481e4e05edacf44903aeac2feecd6d Mon Sep 17 00:00:00 2001 +From: Vratislav Podzimek <vpodzime@redhat.com> +Date: Wed, 13 Nov 2013 13:20:39 +0100 +Subject: [PATCH] Run 'xz' and 'lzma' with multiple threads + +This speeds up compression a lot on multicore systems. + +https://bugzilla.redhat.com/show_bug.cgi?id=1029786 + +[Edited-by: Harald Hoyer: use getconf for cpu_count] +--- + dracut.sh | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/dracut.sh b/dracut.sh +index b03522bf..59d3e4b2 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -693,12 +693,14 @@ stdloglvl=$((stdloglvl + verbosity_mod_l)) + # eliminate IFS hackery when messing with fw_dir + fw_dir=${fw_dir//:/ } + ++cpu_count=$(getconf _NPROCESSORS_ONLN) ++ + # handle compression options. + [[ $compress ]] || compress="gzip" + case $compress in + bzip2) compress="bzip2 -9";; +- lzma) compress="lzma -9";; +- xz) compress="xz --check=crc32 --lzma2=dict=1MiB";; ++ lzma) compress="lzma -9 ${cpu_count:+-T$cpu_count}";; ++ xz) compress="xz --check=crc32 --lzma2=dict=1MiB ${cpu_count:+-T$cpu_count}";; + gzip) compress="gzip -9"; command -v pigz > /dev/null 2>&1 && compress="pigz -9";; + lzo) compress="lzop -9";; + lz4) compress="lz4 -9";; diff --git a/SOURCES/0056-iscsi-nbd-do-not-fail-in-hostonly-mode.patch b/SOURCES/0056-iscsi-nbd-do-not-fail-in-hostonly-mode.patch new file mode 100644 index 0000000..5596c1c --- /dev/null +++ b/SOURCES/0056-iscsi-nbd-do-not-fail-in-hostonly-mode.patch @@ -0,0 +1,36 @@ +From d014032c62b22ef88be6123532b8f4fc545580ff Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Mon, 11 Nov 2013 16:57:09 +0100 +Subject: [PATCH] iscsi,nbd: do not fail in hostonly mode + +--- + modules.d/95iscsi/module-setup.sh | 2 +- + modules.d/95nbd/module-setup.sh | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh +index 502e8345..c6901c08 100755 +--- a/modules.d/95iscsi/module-setup.sh ++++ b/modules.d/95iscsi/module-setup.sh +@@ -23,7 +23,7 @@ check() { + + [[ $hostonly ]] || [[ $mount_needs ]] && { + pushd . >/dev/null +- for_each_host_dev_and_slaves is_iscsi || return 1 ++ for_each_host_dev_and_slaves is_iscsi || return 255 + popd >/dev/null + } + return 0 +diff --git a/modules.d/95nbd/module-setup.sh b/modules.d/95nbd/module-setup.sh +index 7b781803..3ac00f60 100755 +--- a/modules.d/95nbd/module-setup.sh ++++ b/modules.d/95nbd/module-setup.sh +@@ -14,7 +14,7 @@ check() { + + _rootdev=$(find_root_block_device) + [[ -b /dev/block/$_rootdev ]] || return 1 +- check_block_and_slaves is_nbd "$_rootdev" || return 1 ++ check_block_and_slaves is_nbd "$_rootdev" || return 255 + } + + return 0 diff --git a/SOURCES/0057-dracut.sh-fixed-PATH-shortener.patch b/SOURCES/0057-dracut.sh-fixed-PATH-shortener.patch new file mode 100644 index 0000000..ef88f53 --- /dev/null +++ b/SOURCES/0057-dracut.sh-fixed-PATH-shortener.patch @@ -0,0 +1,22 @@ +From 8d7bd6af195ef6a7bd5caa89995084a8b484207c Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Sat, 2 Nov 2013 13:14:40 +0100 +Subject: [PATCH] dracut.sh: fixed PATH shortener + +--- + dracut.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dracut.sh b/dracut.sh +index 59d3e4b2..bb7e91e6 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -533,7 +533,7 @@ for i in /usr/sbin /sbin /usr/bin /bin; do + if [ -L "$i" ]; then + rl=$(readlink -f $i) + fi +- if [[ "$NPATH" != "*:$rl*" ]] ; then ++ if [[ "$NPATH" != *:$rl* ]] ; then + NPATH+=":$rl" + fi + done diff --git a/SOURCES/0058-dracut.modules.7.asc-removed-empty-section.patch b/SOURCES/0058-dracut.modules.7.asc-removed-empty-section.patch new file mode 100644 index 0000000..fb628c7 --- /dev/null +++ b/SOURCES/0058-dracut.modules.7.asc-removed-empty-section.patch @@ -0,0 +1,21 @@ +From 5a36d29f8a63da9b62b5ee655f11f03e25dc5ef9 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Sat, 2 Nov 2013 13:20:32 +0100 +Subject: [PATCH] dracut.modules.7.asc: removed empty section + +--- + dracut.modules.7.asc | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/dracut.modules.7.asc b/dracut.modules.7.asc +index 4cb2aa15..17acdb4d 100644 +--- a/dracut.modules.7.asc ++++ b/dracut.modules.7.asc +@@ -10,7 +10,6 @@ dracut.modules - dracut modules + + DESCRIPTION + ----------- +-== dracut Components + + dracut uses a modular system to build and extend the initramfs image. All + modules are located in _/usr/lib/dracut/modules.d_ or in _<git-src>/modules.d_. diff --git a/SOURCES/0059-lvm-install-thin-tools-only-when-needed-in-hostonly.patch b/SOURCES/0059-lvm-install-thin-tools-only-when-needed-in-hostonly.patch new file mode 100644 index 0000000..5db0966 --- /dev/null +++ b/SOURCES/0059-lvm-install-thin-tools-only-when-needed-in-hostonly.patch @@ -0,0 +1,26 @@ +From 53b20afabbc034b4fe1e09f0b7d4f7d04f0584c5 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 5 Dec 2013 15:57:42 +0100 +Subject: [PATCH] lvm: install thin tools, only when needed in hostonly + +--- + modules.d/90lvm/module-setup.sh | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh +index 7e3d44fa..877631bb 100755 +--- a/modules.d/90lvm/module-setup.sh ++++ b/modules.d/90lvm/module-setup.sh +@@ -95,5 +95,11 @@ install() { + + inst_libdir_file "libdevmapper-event-lvm*.so" + +- inst_multiple -o thin_dump thin_restore thin_check thin_repair ++ if [[ $hostonly ]] && type -P lvs &>/dev/null; then ++ for dev in "${!host_fs_types[@]}"; do ++ if [[ "$(lvs --noheadings -o segtype "$dev" 2>/dev/null)" == *thin* ]] ; then ++ inst_multiple -o thin_dump thin_restore thin_check thin_repair ++ fi ++ done ++ fi + } diff --git a/SOURCES/0060-systemd-dracut-initqueue.sh-fixed-waiting-in-the-loo.patch b/SOURCES/0060-systemd-dracut-initqueue.sh-fixed-waiting-in-the-loo.patch new file mode 100644 index 0000000..739cac4 --- /dev/null +++ b/SOURCES/0060-systemd-dracut-initqueue.sh-fixed-waiting-in-the-loo.patch @@ -0,0 +1,25 @@ +From a1e9e9364a98032a83e166173930c141c8baa4c6 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 5 Dec 2013 18:38:35 +0100 +Subject: [PATCH] systemd/dracut-initqueue.sh: fixed waiting in the loop if PW + asked + +continue the main loop instead of the for loop, if a password is +currently asked +--- + modules.d/98systemd/dracut-initqueue.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/98systemd/dracut-initqueue.sh b/modules.d/98systemd/dracut-initqueue.sh +index 64e81541..1e05dcd0 100755 +--- a/modules.d/98systemd/dracut-initqueue.sh ++++ b/modules.d/98systemd/dracut-initqueue.sh +@@ -53,7 +53,7 @@ while :; do + sleep 0.5 + + for i in /run/systemd/ask-password/ask.*; do +- [ -e "$i" ] && continue ++ [ -e "$i" ] && continue 2 + done + + if [ $main_loop -gt $((2*$RDRETRY/3)) ]; then diff --git a/SOURCES/0061-base-rdsosreport.sh-add-ip-a-output.patch b/SOURCES/0061-base-rdsosreport.sh-add-ip-a-output.patch new file mode 100644 index 0000000..ac40102 --- /dev/null +++ b/SOURCES/0061-base-rdsosreport.sh-add-ip-a-output.patch @@ -0,0 +1,22 @@ +From be10aecb17b1f71682cfc364553cf35f150a1045 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 10 Dec 2013 12:58:37 +0100 +Subject: [PATCH] base/rdsosreport.sh: add "ip a" output + +--- + modules.d/99base/rdsosreport.sh | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/modules.d/99base/rdsosreport.sh b/modules.d/99base/rdsosreport.sh +index bfa55bbb..5e11166e 100755 +--- a/modules.d/99base/rdsosreport.sh ++++ b/modules.d/99base/rdsosreport.sh +@@ -42,6 +42,8 @@ command -v dmsetup >/dev/null 2>/dev/null && dmsetup ls --tree + + cat /proc/mdstat + ++command -v ip >/dev/null 2>/dev/null && ip addr ++ + if command -v journalctl >/dev/null 2>/dev/null; then + journalctl -ab --no-pager -o short-monotonic + else diff --git a/SOURCES/0062-lvm-fixed-lvm-thin-check.patch b/SOURCES/0062-lvm-fixed-lvm-thin-check.patch new file mode 100644 index 0000000..84691f1 --- /dev/null +++ b/SOURCES/0062-lvm-fixed-lvm-thin-check.patch @@ -0,0 +1,31 @@ +From 793beab60c416e0edf7331fa2e6881b08f2bece0 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 13 Dec 2013 11:05:39 +0100 +Subject: [PATCH] lvm: fixed lvm thin check + +--- + modules.d/90lvm/module-setup.sh | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh +index 877631bb..f0c9b964 100755 +--- a/modules.d/90lvm/module-setup.sh ++++ b/modules.d/90lvm/module-setup.sh +@@ -97,9 +97,16 @@ install() { + + if [[ $hostonly ]] && type -P lvs &>/dev/null; then + for dev in "${!host_fs_types[@]}"; do +- if [[ "$(lvs --noheadings -o segtype "$dev" 2>/dev/null)" == *thin* ]] ; then ++ [ -e /sys/block/${dev#/dev/}/dm/name ] || continue ++ dev=$(</sys/block/${dev#/dev/}/dm/name) ++ eval $(dmsetup splitname --nameprefixes --noheadings --rows "$dev" 2>/dev/null) ++ [[ ${DM_VG_NAME} ]] && [[ ${DM_LV_NAME} ]] || continue ++ if [[ "$(lvs --noheadings -o segtype ${DM_VG_NAME} 2>/dev/null)" == *thin* ]] ; then + inst_multiple -o thin_dump thin_restore thin_check thin_repair ++ break + fi + done ++ else ++ inst_multiple -o thin_dump thin_restore thin_check thin_repair + fi + } diff --git a/SOURCES/0063-test-TEST-17-LVM-THIN-add-test-case-for-lvm-thin-poo.patch b/SOURCES/0063-test-TEST-17-LVM-THIN-add-test-case-for-lvm-thin-poo.patch new file mode 100644 index 0000000..71d19c1 --- /dev/null +++ b/SOURCES/0063-test-TEST-17-LVM-THIN-add-test-case-for-lvm-thin-poo.patch @@ -0,0 +1,232 @@ +From a34d3dcaa8947c8df6a3b809e42e6868d08ba649 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Mon, 16 Dec 2013 13:15:48 +0100 +Subject: [PATCH] test/TEST-17-LVM-THIN: add test case for lvm thin pools + +--- + test/TEST-17-LVM-THIN/.testdir | 1 + + test/TEST-17-LVM-THIN/99-idesymlinks.rules | 8 ++ + test/TEST-17-LVM-THIN/Makefile | 10 +++ + test/TEST-17-LVM-THIN/create-root.sh | 31 ++++++++ + test/TEST-17-LVM-THIN/finished-false.sh | 2 + + test/TEST-17-LVM-THIN/hard-off.sh | 3 + + test/TEST-17-LVM-THIN/test-init.sh | 17 +++++ + test/TEST-17-LVM-THIN/test.sh | 88 ++++++++++++++++++++++ + 8 files changed, 160 insertions(+) + create mode 100644 test/TEST-17-LVM-THIN/.testdir + create mode 100644 test/TEST-17-LVM-THIN/99-idesymlinks.rules + create mode 100644 test/TEST-17-LVM-THIN/Makefile + create mode 100755 test/TEST-17-LVM-THIN/create-root.sh + create mode 100755 test/TEST-17-LVM-THIN/finished-false.sh + create mode 100755 test/TEST-17-LVM-THIN/hard-off.sh + create mode 100755 test/TEST-17-LVM-THIN/test-init.sh + create mode 100755 test/TEST-17-LVM-THIN/test.sh + +diff --git a/test/TEST-17-LVM-THIN/.testdir b/test/TEST-17-LVM-THIN/.testdir +new file mode 100644 +index 00000000..9af2638c +--- /dev/null ++++ b/test/TEST-17-LVM-THIN/.testdir +@@ -0,0 +1 @@ ++TESTDIR="/var/tmp/dracut-test.uElZSK" +diff --git a/test/TEST-17-LVM-THIN/99-idesymlinks.rules b/test/TEST-17-LVM-THIN/99-idesymlinks.rules +new file mode 100644 +index 00000000..d557790a +--- /dev/null ++++ b/test/TEST-17-LVM-THIN/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-17-LVM-THIN/Makefile b/test/TEST-17-LVM-THIN/Makefile +new file mode 100644 +index 00000000..aad27059 +--- /dev/null ++++ b/test/TEST-17-LVM-THIN/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-17-LVM-THIN/create-root.sh b/test/TEST-17-LVM-THIN/create-root.sh +new file mode 100755 +index 00000000..740704f6 +--- /dev/null ++++ b/test/TEST-17-LVM-THIN/create-root.sh +@@ -0,0 +1,31 @@ ++#!/bin/sh ++# don't let udev and this script step on eachother's toes ++for x in 64-lvm.rules 70-mdadm.rules 99-mount-rules; do ++ > "/etc/udev/rules.d/$x" ++done ++rm -f -- /etc/lvm/lvm.conf ++udevadm control --reload ++# save a partition at the beginning for future flagging purposes ++sfdisk -C 2560 -H 2 -S 32 -L /dev/sda <<EOF ++,1 ++,800 ++,800 ++,800 ++EOF ++for i in sda2 sda3 sda4; do ++lvm pvcreate -ff -y /dev/$i ; ++done && \ ++lvm vgcreate dracut /dev/sda[234] && \ ++lvm lvcreate -l 16 -T dracut/mythinpool && \ ++lvm lvcreate -V1G -T dracut/mythinpool -n root && \ ++lvm vgchange -ay && \ ++mke2fs /dev/dracut/root && \ ++mkdir -p /sysroot && \ ++mount /dev/dracut/root /sysroot && \ ++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 ++poweroff -f +diff --git a/test/TEST-17-LVM-THIN/finished-false.sh b/test/TEST-17-LVM-THIN/finished-false.sh +new file mode 100755 +index 00000000..ecdbef95 +--- /dev/null ++++ b/test/TEST-17-LVM-THIN/finished-false.sh +@@ -0,0 +1,2 @@ ++#!/bin/sh ++exit 1 +diff --git a/test/TEST-17-LVM-THIN/hard-off.sh b/test/TEST-17-LVM-THIN/hard-off.sh +new file mode 100755 +index 00000000..12c3d5ac +--- /dev/null ++++ b/test/TEST-17-LVM-THIN/hard-off.sh +@@ -0,0 +1,3 @@ ++#!/bin/sh ++getarg rd.shell || poweroff -f ++getarg failme && poweroff -f +diff --git a/test/TEST-17-LVM-THIN/test-init.sh b/test/TEST-17-LVM-THIN/test-init.sh +new file mode 100755 +index 00000000..fd03aa5c +--- /dev/null ++++ b/test/TEST-17-LVM-THIN/test-init.sh +@@ -0,0 +1,17 @@ ++#!/bin/sh ++export PATH=/sbin:/bin:/usr/sbin:/usr/bin ++strstr() { [ "${1#*$2*}" != "$1" ]; } ++CMDLINE=$(while read line; do echo $line;done < /proc/cmdline) ++plymouth --quit ++exec >/dev/console 2>&1 ++echo "dracut-root-block-success" >/dev/sda1 ++export TERM=linux ++export PS1='initramfs-test:\w\$ ' ++[ -f /etc/mtab ] || ln -sfn /proc/mounts /etc/mtab ++[ -f /etc/fstab ] || ln -sfn /proc/mounts /etc/fstab ++stty sane ++echo "made it to the rootfs!" ++strstr "$CMDLINE" "rd.shell" && sh -i ++echo "Powering down." ++mount -n -o remount,ro / ++poweroff -f +diff --git a/test/TEST-17-LVM-THIN/test.sh b/test/TEST-17-LVM-THIN/test.sh +new file mode 100755 +index 00000000..0cfce199 +--- /dev/null ++++ b/test/TEST-17-LVM-THIN/test.sh +@@ -0,0 +1,88 @@ ++#!/bin/bash ++TEST_DESCRIPTION="root filesystem on LVM PV with thin pool" ++ ++KVERSION=${KVERSION-$(uname -r)} ++ ++# Uncomment this to debug failures ++#DEBUGFAIL="rd.break rd.shell" ++ ++test_run() { ++ $testdir/run-qemu \ ++ -hda $TESTDIR/root.ext2 \ ++ -m 256M -smp 2 -nographic \ ++ -net none -kernel /boot/vmlinuz-$KVERSION \ ++ -append "root=/dev/dracut/root rw rd.auto=1 quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL" \ ++ -initrd $TESTDIR/initramfs.testing ++ grep -F -m 1 -q dracut-root-block-success $TESTDIR/root.ext2 || return 1 ++} ++ ++test_setup() { ++ # Create the blank file to use as a root filesystem ++ dd if=/dev/null of=$TESTDIR/root.ext2 bs=1M seek=80 ++ ++ kernel=$KVERSION ++ # Create what will eventually be our root filesystem onto an overlay ++ ( ++ export initdir=$TESTDIR/overlay/source ++ . $basedir/dracut-functions.sh ++ inst_multiple sh df free ls shutdown poweroff stty cat ps ln ip route \ ++ mount dmesg ifconfig dhclient mkdir cp ping dhclient ++ for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do ++ [ -f ${_terminfodir}/l/linux ] && break ++ done ++ inst_multiple -o ${_terminfodir}/l/linux ++ inst "$basedir/modules.d/40network/dhclient-script.sh" "/sbin/dhclient-script" ++ inst "$basedir/modules.d/40network/ifup.sh" "/sbin/ifup" ++ inst_multiple grep ++ inst_simple /etc/os-release ++ inst ./test-init.sh /sbin/init ++ find_binary plymouth >/dev/null && inst_multiple plymouth ++ (cd "$initdir"; mkdir -p dev sys proc etc var/run tmp ) ++ cp -a /etc/ld.so.conf* $initdir/etc ++ mkdir $initdir/run ++ sudo ldconfig -r "$initdir" ++ ) ++ ++ # second, install the files needed to make the root filesystem ++ ( ++ export initdir=$TESTDIR/overlay ++ . $basedir/dracut-functions.sh ++ inst_multiple sfdisk mke2fs poweroff cp umount ++ 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 ++ ) ++ ++ # create an initramfs that will create the target root filesystem. ++ # We do it this way so that we do not risk trashing the host mdraid ++ # devices, volume groups, encrypted partitions, etc. ++ $basedir/dracut.sh -l -i $TESTDIR/overlay / \ ++ -m "dash lvm mdraid udev-rules base rootfs-block kernel-modules" \ ++ -d "piix ide-gd_mod ata_piix ext2 sd_mod" \ ++ -f $TESTDIR/initramfs.makeroot $KVERSION || return 1 ++ rm -rf -- $TESTDIR/overlay ++ # Invoke KVM and/or QEMU to actually create the target filesystem. ++ $testdir/run-qemu -hda $TESTDIR/root.ext2 -m 256M -smp 2 -nographic -net none \ ++ -kernel "/boot/vmlinuz-$kernel" \ ++ -append "root=/dev/fakeroot rw rootfstype=ext2 quiet console=ttyS0,115200n81 selinux=0" \ ++ -initrd $TESTDIR/initramfs.makeroot || return 1 ++ grep -F -m 1 -q dracut-root-block-created $TESTDIR/root.ext2 || return 1 ++ ( ++ export initdir=$TESTDIR/overlay ++ . $basedir/dracut-functions.sh ++ inst_multiple poweroff shutdown ++ inst_hook emergency 000 ./hard-off.sh ++ inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules ++ ) ++ sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ ++ -o "plymouth network" \ ++ -a "debug" -I lvs \ ++ -d "piix ide-gd_mod ata_piix ext2 sd_mod" \ ++ -f $TESTDIR/initramfs.testing $KVERSION || return 1 ++} ++ ++test_cleanup() { ++ return 0 ++} ++ ++. $testdir/test-functions diff --git a/SOURCES/0064-test-TEST-17-LVM-THIN-remove-.testdir.patch b/SOURCES/0064-test-TEST-17-LVM-THIN-remove-.testdir.patch new file mode 100644 index 0000000..86d8ee0 --- /dev/null +++ b/SOURCES/0064-test-TEST-17-LVM-THIN-remove-.testdir.patch @@ -0,0 +1,17 @@ +From 998f4bb72048e7c56d919ba43b8776d82e14b698 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 17 Dec 2013 13:36:55 +0100 +Subject: [PATCH] test/TEST-17-LVM-THIN: remove .testdir + +--- + test/TEST-17-LVM-THIN/.testdir | 1 - + 1 file changed, 1 deletion(-) + delete mode 100644 test/TEST-17-LVM-THIN/.testdir + +diff --git a/test/TEST-17-LVM-THIN/.testdir b/test/TEST-17-LVM-THIN/.testdir +deleted file mode 100644 +index 9af2638c..00000000 +--- a/test/TEST-17-LVM-THIN/.testdir ++++ /dev/null +@@ -1 +0,0 @@ +-TESTDIR="/var/tmp/dracut-test.uElZSK" diff --git a/SOURCES/0065-iscsi-do-iscsi_firmware-regardless-of-network.patch b/SOURCES/0065-iscsi-do-iscsi_firmware-regardless-of-network.patch new file mode 100644 index 0000000..d21c508 --- /dev/null +++ b/SOURCES/0065-iscsi-do-iscsi_firmware-regardless-of-network.patch @@ -0,0 +1,66 @@ +From 937456c65b0e641a6494a39acb5a001b2c9ed992 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 18 Dec 2013 12:26:05 +0100 +Subject: [PATCH] iscsi: do iscsi_firmware regardless of network + +Do the iscsi_firmware iscsistart at least once, even if the network is +not up, to activate offload HBA iSCSI. + +https://bugzilla.redhat.com/show_bug.cgi?id=1031160 +--- + modules.d/95iscsi/iscsiroot.sh | 12 +++++++----- + modules.d/95iscsi/parse-iscsiroot.sh | 2 +- + test/TEST-30-ISCSI/test.sh | 2 +- + 3 files changed, 9 insertions(+), 7 deletions(-) + +diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh +index 738fff44..ef090f7f 100755 +--- a/modules.d/95iscsi/iscsiroot.sh ++++ b/modules.d/95iscsi/iscsiroot.sh +@@ -44,13 +44,15 @@ if getargbool 0 rd.iscsi.firmware -d -y iscsi_firmware ; then + iscsi_param="$iscsi_param --param $p" + done + +- iscsistart -b $iscsi_param +- echo 'started' > "/tmp/iscsistarted-iscsi" +- echo 'started' > "/tmp/iscsistarted-firmware" +- need_shutdown +- exit 0 ++ if ! [ -e /tmp/iscsistarted-firmware ] && iscsistart -b $iscsi_param; then ++ echo 'started' > "/tmp/iscsistarted-iscsi" ++ echo 'started' > "/tmp/iscsistarted-firmware" ++ need_shutdown ++ fi ++ [ "$netif" = dummy ] && exit 0 + fi + ++ + handle_netroot() + { + local iscsi_initiator iscsi_target_name iscsi_target_ip iscsi_target_port +diff --git a/modules.d/95iscsi/parse-iscsiroot.sh b/modules.d/95iscsi/parse-iscsiroot.sh +index 0c8b524b..77bd9913 100755 +--- a/modules.d/95iscsi/parse-iscsiroot.sh ++++ b/modules.d/95iscsi/parse-iscsiroot.sh +@@ -64,7 +64,7 @@ if [ -n "$iscsi_firmware" ] ; then + netroot=${netroot:-iscsi} + modprobe -q iscsi_boot_sysfs 2>/dev/null + modprobe -q iscsi_ibft +- echo "[ -f '/tmp/iscsistarted-firmware' ]" > $hookdir/initqueue/finished/iscsi_firmware_started.sh ++ initqueue --onetime --settled /sbin/iscsiroot dummy "$netroot" "$NEWROOT" + fi + + # If it's not iscsi we don't continue +diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh +index 4c299564..f5977839 100755 +--- a/test/TEST-30-ISCSI/test.sh ++++ b/test/TEST-30-ISCSI/test.sh +@@ -69,7 +69,7 @@ do_test_run() { + || return 1 + + run_client "netroot=iscsi" \ +- "root=LABEL=sysroot ip=192.168.50.101::192.168.50.1:255.255.255.0:iscsi-1:ens3:off" \ ++ "iscsi_firmware root=LABEL=sysroot ip=192.168.50.101::192.168.50.1:255.255.255.0:iscsi-1:ens3:off" \ + "netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target1 netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target2" \ + || return 1 + return 0 diff --git a/SOURCES/0066-dracut-lib-wait_for_dev-prevent-systemd-daemon-reloa.patch b/SOURCES/0066-dracut-lib-wait_for_dev-prevent-systemd-daemon-reloa.patch new file mode 100644 index 0000000..aa71c88 --- /dev/null +++ b/SOURCES/0066-dracut-lib-wait_for_dev-prevent-systemd-daemon-reloa.patch @@ -0,0 +1,127 @@ +From db110a036a13e5c99e073128ec8aa7b1fdc7e992 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 18 Dec 2013 12:28:51 +0100 +Subject: [PATCH] dracut-lib/wait_for_dev(): prevent systemd daemon-reload + +prevent a systemd daemon-reload, if it is not necessary to do. +--- + modules.d/98systemd/dracut-cmdline.sh | 2 -- + modules.d/98systemd/module-setup.sh | 2 ++ + modules.d/98systemd/rootfs-generator.sh | 30 +++++++++++++++++++++++++ + modules.d/99base/dracut-lib.sh | 30 ++++++++++++++++++++----- + 4 files changed, 56 insertions(+), 8 deletions(-) + create mode 100755 modules.d/98systemd/rootfs-generator.sh + +diff --git a/modules.d/98systemd/dracut-cmdline.sh b/modules.d/98systemd/dracut-cmdline.sh +index 50b8d6c9..36406d9d 100755 +--- a/modules.d/98systemd/dracut-cmdline.sh ++++ b/modules.d/98systemd/dracut-cmdline.sh +@@ -66,8 +66,6 @@ case "$root" in + rootok=1 ;; + esac + +-[ "${root%%:*}" = "block" ] && wait_for_dev "${root#block:}" +- + [ -z "$root" ] && die "No or empty root= argument" + [ -z "$rootok" ] && die "Don't know how to handle 'root=$root'" + +diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh +index a5ac2a53..7b3dfa40 100755 +--- a/modules.d/98systemd/module-setup.sh ++++ b/modules.d/98systemd/module-setup.sh +@@ -178,6 +178,8 @@ install() { + inst_script "$moddir/dracut-mount.sh" /bin/dracut-mount + inst_script "$moddir/dracut-pre-pivot.sh" /bin/dracut-pre-pivot + ++ inst_script "$moddir/rootfs-generator.sh" /lib/systemd/system-generators/dracut-rootfs-generator ++ + inst_rules 99-systemd.rules + + for i in \ +diff --git a/modules.d/98systemd/rootfs-generator.sh b/modules.d/98systemd/rootfs-generator.sh +new file mode 100755 +index 00000000..3770c6b1 +--- /dev/null ++++ b/modules.d/98systemd/rootfs-generator.sh +@@ -0,0 +1,30 @@ ++#!/bin/sh ++# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- ++# ex: ts=8 sw=4 sts=4 et filetype=sh ++ ++type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh ++root=$(getarg root=) ++case "$root" in ++ block:LABEL=*|LABEL=*) ++ root="${root#block:}" ++ root="$(echo $root | sed 's,/,\\x2f,g')" ++ root="block:/dev/disk/by-label/${root#LABEL=}" ++ rootok=1 ;; ++ block:UUID=*|UUID=*) ++ root="${root#block:}" ++ root="block:/dev/disk/by-uuid/${root#UUID=}" ++ rootok=1 ;; ++ block:PARTUUID=*|PARTUUID=*) ++ root="${root#block:}" ++ root="block:/dev/disk/by-partuuid/${root#PARTUUID=}" ++ rootok=1 ;; ++ block:PARTLABEL=*|PARTLABEL=*) ++ root="${root#block:}" ++ root="block:/dev/disk/by-partlabel/${root#PARTLABEL=}" ++ rootok=1 ;; ++ /dev/*) ++ root="block:${root}" ++ rootok=1 ;; ++esac ++ ++[ "${root%%:*}" = "block" ] && wait_for_dev -n "${root#block:}" +diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh +index 7249c589..a3476ab3 100755 +--- a/modules.d/99base/dracut-lib.sh ++++ b/modules.d/99base/dracut-lib.sh +@@ -846,7 +846,18 @@ dev_unit_name() + wait_for_dev() + { + local _name ++ local _needreload ++ local _noreload ++ ++ if [ "$1" = "-n" ]; then ++ _noreload=1 ++ shift ++ fi ++ + _name="$(str_replace "$1" '/' '\x2f')" ++ ++ [ -e "${PREFIX}$hookdir/initqueue/finished/devexists-${_name}.sh" ] && return 0 ++ + printf '[ -e "%s" ]\n' $1 \ + >> "${PREFIX}$hookdir/initqueue/finished/devexists-${_name}.sh" + { +@@ -859,14 +870,21 @@ wait_for_dev() + if ! [ -L ${PREFIX}/etc/systemd/system/initrd.target.wants/${_name}.device ]; then + [ -d ${PREFIX}/etc/systemd/system/initrd.target.wants ] || mkdir -p ${PREFIX}/etc/systemd/system/initrd.target.wants + ln -s ../${_name}.device ${PREFIX}/etc/systemd/system/initrd.target.wants/${_name}.device ++ _needreload=1 + fi + +- mkdir -p ${PREFIX}/etc/systemd/system/${_name}.device.d +- { +- echo "[Unit]" +- echo "JobTimeoutSec=3600" +- } > ${PREFIX}/etc/systemd/system/${_name}.device.d/timeout.conf +- [ -z "$PREFIX" ] && /sbin/initqueue --onetime --unique --name daemon-reload systemctl daemon-reload ++ if ! [ -f ${PREFIX}/etc/systemd/system/${_name}.device.d/timeout.conf ]; then ++ mkdir -p ${PREFIX}/etc/systemd/system/${_name}.device.d ++ { ++ echo "[Unit]" ++ echo "JobTimeoutSec=3600" ++ } > ${PREFIX}/etc/systemd/system/${_name}.device.d/timeout.conf ++ _needreload=1 ++ fi ++ ++ if [ -z "$PREFIX" ] && [ "$_needreload" = 1 ] && [ -z "$_noreload" ]; then ++ /sbin/initqueue --onetime --unique --name daemon-reload systemctl daemon-reload ++ fi + fi + } + diff --git a/SOURCES/0067-kernel-modules-add-more-block-driver.patch b/SOURCES/0067-kernel-modules-add-more-block-driver.patch new file mode 100644 index 0000000..ee9110f --- /dev/null +++ b/SOURCES/0067-kernel-modules-add-more-block-driver.patch @@ -0,0 +1,23 @@ +From 04220f9affcbd59dd8d95fd716bd9443eb2ea81d Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 19 Dec 2013 12:37:47 +0100 +Subject: [PATCH] kernel-modules: add more block driver + +e.g. nvme +--- + modules.d/90kernel-modules/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh +index 510b43e1..f4db6aa8 100755 +--- a/modules.d/90kernel-modules/module-setup.sh ++++ b/modules.d/90kernel-modules/module-setup.sh +@@ -5,7 +5,7 @@ + installkernel() { + if [[ -z $drivers ]]; then + block_module_filter() { +- local _blockfuncs='ahci_init_controller|ata_scsi_ioctl|scsi_add_host|blk_init_queue|register_mtd_blktrans|scsi_esp_register|register_virtio_device|usb_stor_disconnect' ++ local _blockfuncs='ahci_init_controller|ata_scsi_ioctl|scsi_add_host|blk_cleanup_queue|register_mtd_blktrans|scsi_esp_register|register_virtio_device|usb_stor_disconnect' + # subfunctions inherit following FDs + local _merge=8 _side2=9 + function bmf1() { diff --git a/SOURCES/0068-network-include-usbnet-drivers.patch b/SOURCES/0068-network-include-usbnet-drivers.patch new file mode 100644 index 0000000..8975b15 --- /dev/null +++ b/SOURCES/0068-network-include-usbnet-drivers.patch @@ -0,0 +1,22 @@ +From 9a177f8d51afd332fe6528d5cbe80d78d7b74a9e Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 19 Dec 2013 17:06:48 +0100 +Subject: [PATCH] network: include usbnet drivers + +--- + modules.d/40network/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh +index d2833d0f..508dbab1 100755 +--- a/modules.d/40network/module-setup.sh ++++ b/modules.d/40network/module-setup.sh +@@ -23,7 +23,7 @@ installkernel() { + # Include wired net drivers, excluding wireless + + net_module_filter() { +- local _net_drivers='eth_type_trans|register_virtio_device' ++ local _net_drivers='eth_type_trans|register_virtio_device|usbnet_open' + local _unwanted_drivers='/(wireless|isdn|uwb)/' + local _ret + # subfunctions inherit following FDs diff --git a/SOURCES/0069-systemd-dracut-initqueue.sh-fstab-is-not-a-directory.patch b/SOURCES/0069-systemd-dracut-initqueue.sh-fstab-is-not-a-directory.patch new file mode 100644 index 0000000..ce7145b --- /dev/null +++ b/SOURCES/0069-systemd-dracut-initqueue.sh-fstab-is-not-a-directory.patch @@ -0,0 +1,22 @@ +From 866e663fbdedcf520388218151d0f666857b6f92 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 7 Jan 2014 16:39:48 +0100 +Subject: [PATCH] systemd/dracut-initqueue.sh: fstab is not a directory + +--- + modules.d/98systemd/dracut-initqueue.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/98systemd/dracut-initqueue.sh b/modules.d/98systemd/dracut-initqueue.sh +index 1e05dcd0..37bc18f1 100755 +--- a/modules.d/98systemd/dracut-initqueue.sh ++++ b/modules.d/98systemd/dracut-initqueue.sh +@@ -67,7 +67,7 @@ while :; do + + main_loop=$(($main_loop+1)) + if [ $main_loop -gt $RDRETRY ]; then +- if ! [ -d /sysroot/etc/fstab ] || ! [ -e /sysroot/sbin/init ] ; then ++ if ! [ -f /sysroot/etc/fstab ] || ! [ -e /sysroot/sbin/init ] ; then + action_on_fail "Could not boot." && break + fi + warn "Not all disks have been found." diff --git a/SOURCES/0070-iscsi-iscsiroot.sh-do-not-trust-iscsistart-return-va.patch b/SOURCES/0070-iscsi-iscsiroot.sh-do-not-trust-iscsistart-return-va.patch new file mode 100644 index 0000000..86a5d20 --- /dev/null +++ b/SOURCES/0070-iscsi-iscsiroot.sh-do-not-trust-iscsistart-return-va.patch @@ -0,0 +1,23 @@ +From 7faae1264db2d015135985c52bc2b8a2ae0636eb Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 7 Jan 2014 16:40:50 +0100 +Subject: [PATCH] iscsi/iscsiroot.sh: do not trust iscsistart return value + +--- + modules.d/95iscsi/iscsiroot.sh | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh +index ef090f7f..abdea5cf 100755 +--- a/modules.d/95iscsi/iscsiroot.sh ++++ b/modules.d/95iscsi/iscsiroot.sh +@@ -44,7 +44,8 @@ if getargbool 0 rd.iscsi.firmware -d -y iscsi_firmware ; then + iscsi_param="$iscsi_param --param $p" + done + +- if ! [ -e /tmp/iscsistarted-firmware ] && iscsistart -b $iscsi_param; then ++ if ! [ -e /tmp/iscsistarted-firmware ]; then ++ iscsistart -b $iscsi_param + echo 'started' > "/tmp/iscsistarted-iscsi" + echo 'started' > "/tmp/iscsistarted-firmware" + need_shutdown diff --git a/SOURCES/0071-dracut.sh-add-missing-piece-for-option-add-device.patch b/SOURCES/0071-dracut.sh-add-missing-piece-for-option-add-device.patch new file mode 100644 index 0000000..7b8dee4 --- /dev/null +++ b/SOURCES/0071-dracut.sh-add-missing-piece-for-option-add-device.patch @@ -0,0 +1,21 @@ +From ea9b961e8cffc30f131d62d21bcbd18b0482b7f6 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 8 Jan 2014 15:37:18 +0100 +Subject: [PATCH] dracut.sh: add missing piece for option --add-device + +--- + dracut.sh | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/dracut.sh b/dracut.sh +index bb7e91e6..9a6521ec 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -307,6 +307,7 @@ TEMP=$(unset POSIXLY_CORRECT; getopt \ + --long add-fstab: \ + --long mount: \ + --long device: \ ++ --long add-device: \ + --long nofscks: \ + --long ro-mnt \ + --long kmoddir: \ diff --git a/SOURCES/0072-dracut.sh-add-boot-efi-to-device-paths.patch b/SOURCES/0072-dracut.sh-add-boot-efi-to-device-paths.patch new file mode 100644 index 0000000..6e45edf --- /dev/null +++ b/SOURCES/0072-dracut.sh-add-boot-efi-to-device-paths.patch @@ -0,0 +1,26 @@ +From 82286609c9736a967f36f0d77cdc585da7f3f506 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 8 Jan 2014 15:38:44 +0100 +Subject: [PATCH] dracut.sh: add /boot/efi to device paths + +Add /boot/efi to device paths, so the filesystem driver is included +and it can be repaired in the initramfs. +--- + dracut.sh | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/dracut.sh b/dracut.sh +index 9a6521ec..cf027e7d 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -917,7 +917,9 @@ if [[ $hostonly ]]; then + "/usr/sbin" \ + "/usr/lib" \ + "/usr/lib64" \ +- "/boot"; ++ "/boot" \ ++ "/boot/efi" \ ++ ; + do + mp=$(readlink -f "$mp") + mountpoint "$mp" >/dev/null 2>&1 || continue diff --git a/SOURCES/0073-documentation-line-wrap.patch b/SOURCES/0073-documentation-line-wrap.patch new file mode 100644 index 0000000..9c941d7 --- /dev/null +++ b/SOURCES/0073-documentation-line-wrap.patch @@ -0,0 +1,672 @@ +From 81564fcefcf1554fa3a0f2145b9e18d149228344 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 9 Jan 2014 12:17:01 +0100 +Subject: [PATCH] documentation: line wrap + +--- + dracut.8.asc | 16 +++--- + dracut.asc | 12 +++-- + dracut.bootup.7.asc | 3 +- + dracut.cmdline.7.asc | 125 +++++++++++++++++++++++++++---------------- + dracut.conf.5.asc | 18 ++++--- + dracut.modules.7.asc | 45 +++++++++------- + dracut.usage.asc | 45 ++++++++++------ + mkinitrd.8.asc | 4 +- + 8 files changed, 165 insertions(+), 103 deletions(-) + +diff --git a/dracut.8.asc b/dracut.8.asc +index 2ea67447..b2946753 100644 +--- a/dracut.8.asc ++++ b/dracut.8.asc +@@ -33,9 +33,9 @@ For a complete list of kernel command line options see *dracut.cmdline*(7). + If you are dropped to an emergency shell, while booting your initramfs, + the file _/run/initramfs/rdsosreport.txt_ is created, which can be safed to a + (to be mounted by hand) partition (usually /boot) or a USB stick. +-Additional debugging info can be produced by adding **rd.debug** to the kernel command line. +-_/run/initramfs/rdsosreport.txt_ contains all logs and the output of some tools. +-It should be attached to any report about dracut problems. ++Additional debugging info can be produced by adding **rd.debug** to the kernel ++command line. _/run/initramfs/rdsosreport.txt_ contains all logs and the output ++of some tools. It should be attached to any report about dracut problems. + + USAGE + ----- +@@ -362,7 +362,8 @@ will not be able to boot. Equivalent to "lzma --compress=lzma -9" + [WARNING] + ==== + Make sure your kernel has xz decompression support compiled in, otherwise you +-will not be able to boot. Equivalent to "lzma --compress=xz --check=crc32 --lzma2=dict=1MiB" ++will not be able to boot. Equivalent to ++"lzma --compress=xz --check=crc32 --lzma2=dict=1MiB" + ==== + + **--lzo**:: +@@ -423,8 +424,8 @@ will not be able to boot. + ---- + + **--regenerate-all**:: +- Regenerate all initramfs images at the default location with the kernel versions found on the system. +- Additional parameters are passed through. ++ Regenerate all initramfs images at the default location with the kernel ++ versions found on the system. Additional parameters are passed through. + + FILES + ----- +@@ -452,7 +453,8 @@ _/etc/conf.d/_:: + set in the configuration files. + + _/etc/cmdline_:: +- Can contain additional command line options. Deprecated, better use /etc/cmdline.d/*.conf. ++ Can contain additional command line options. Deprecated, better use ++ /etc/cmdline.d/*.conf. + + _/etc/cmdline.d/*.conf_:: + Can contain additional command line options. +diff --git a/dracut.asc b/dracut.asc +index 031b2014..b047a337 100644 +--- a/dracut.asc ++++ b/dracut.asc +@@ -125,12 +125,14 @@ started looks like <<dracutbootup7>>. + + == Dracut on shutdown + +-On a systemd driven system, the dracut initramfs is also used for the shutdown procedure. ++On a systemd driven system, the dracut initramfs is also used for the shutdown ++procedure. + + The following steps are executed during a shutdown: + + * systemd switches to the shutdown.target +-* systemd starts /lib/systemd/system/shutdown.target.wants/dracut-shutdown.service ++* systemd starts ++ /lib/systemd/system/shutdown.target.wants/dracut-shutdown.service + * dracut-shutdown.service executes /usr/lib/dracut/dracut-initramfs-restore + which unpacks the initramfs to /run/initramfs + * systemd finishes shutdown.target +@@ -138,8 +140,10 @@ The following steps are executed during a shutdown: + * systemd tries to unmount everything and mounts the remaining read-only + * systemd checks, if there is a /run/initramfs/shutdown executable + * if yes, it does a pivot_root to /run/initramfs and executes ./shutdown. +- The old root is then mounted on /oldroot. /usr/lib/dracut/modules.d/99shutdown/shutdown.sh is the shutdown executable. +-* shutdown will try to umount every /oldroot mount and calls the various shutdown hooks from the dracut modules ++ The old root is then mounted on /oldroot. ++ /usr/lib/dracut/modules.d/99shutdown/shutdown.sh is the shutdown executable. ++* shutdown will try to umount every /oldroot mount and calls the various ++ shutdown hooks from the dracut modules + + This ensures, that all devices are disassembled and unmounted cleanly. + +diff --git a/dracut.bootup.7.asc b/dracut.bootup.7.asc +index c35af195..d7edc1e7 100644 +--- a/dracut.bootup.7.asc ++++ b/dracut.bootup.7.asc +@@ -11,7 +11,8 @@ dracut.bootup - boot ordering in the initramfs + DESCRIPTION + ----------- + +-This flow chart illustrates the ordering of the services, if systemd is used in the dracut initramfs. ++This flow chart illustrates the ordering of the services, if systemd is used in ++the dracut initramfs. + ---- + + systemd-journal.socket +diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc +index 6a5fc8f6..8ac53414 100644 +--- a/dracut.cmdline.7.asc ++++ b/dracut.cmdline.7.asc +@@ -72,14 +72,14 @@ rootfstype=ext3 + See also ro option. + + **rootfallback=**__<path to blockdevice>__:: +- specify the block device to use as the root filesystem, if the normal root cannot be found. +- This can only be a simple block device with a simple file system, for which the filesystem +- driver is either compiled in, or added manually to the initramfs. +- This parameter can be specified multiple times. ++ specify the block device to use as the root filesystem, if the normal root ++ cannot be found. This can only be a simple block device with a simple file ++ system, for which the filesystem driver is either compiled in, or added ++ manually to the initramfs. This parameter can be specified multiple times. + + **rd.auto** **rd.auto=1**:: +- enable autoassembly of special devices like cryptoLUKS, dmraid, mdraid or lvm. +- Default is off as of dracut version >= 024. ++ enable autoassembly of special devices like cryptoLUKS, dmraid, mdraid or ++ lvm. Default is off as of dracut version >= 024. + + **rd.fstab=0**:: + do not honor special mount options for the root filesystem found in +@@ -132,9 +132,10 @@ Misc + [[dracutkerneldebug]] + Debug + ~~~~~ +-If you are dropped to an emergency shell, the file _/run/initramfs/rdsosreport.txt_ is created, +-which can be safed to a (to be mounted by hand) partition (usually /boot) or a USB stick. +-Additional debugging info can be produced by adding **rd.debug** to the kernel command line. ++If you are dropped to an emergency shell, the file ++_/run/initramfs/rdsosreport.txt_ is created, which can be safed to a (to be ++mounted by hand) partition (usually /boot) or a USB stick. Additional debugging ++info can be produced by adding **rd.debug** to the kernel command line. + _/run/initramfs/rdsosreport.txt_ contains all logs and the output of some tools. + It should be attached to any report about dracut problems. + +@@ -146,13 +147,15 @@ It should be attached to any report about dracut problems. + + **rd.debug**:: + set -x for the dracut shell. +- If systemd is active in the initramfs, all output is logged to the systemd journal, +- which you can inspect with "journalctl -ab". +- If systemd is not active, the logs are written to dmesg and _/run/initramfs/init.log_. ++ If systemd is active in the initramfs, all output is logged to the systemd ++ journal, which you can inspect with "journalctl -ab". ++ If systemd is not active, the logs are written to dmesg and ++ _/run/initramfs/init.log_. + If "quiet" is set, it also logs to the console. + + **rd.memdebug=[0-3]**:: +- Print memory usage info at various points, set the verbose level from 0 to 3. + ++ Print memory usage info at various points, set the verbose level from 0 to 3. +++ + Higher level means more debugging output: + + + ---- +@@ -258,10 +261,10 @@ crypto LUKS + This parameter can be specified multiple times. + + **rd.luks.allow-discards=**__<luks uuid>__:: +- Allow using of discards (TRIM) requests for LUKS partitions with the given UUID. +- Any "luks-" of the LUKS UUID is removed before comparing to _<luks uuid>_. +- The comparisons also matches, if _<luks uuid>_ is only the beginning of the +- LUKS UUID, so you don't have to specify the full UUID. ++ Allow using of discards (TRIM) requests for LUKS partitions with the given ++ UUID. Any "luks-" of the LUKS UUID is removed before comparing to ++ _<luks uuid>_. The comparisons also matches, if _<luks uuid>_ is only the ++ beginning of the LUKS UUID, so you don't have to specify the full UUID. + This parameter can be specified multiple times. + + **rd.luks.allow-discards**:: +@@ -273,11 +276,21 @@ crypto LUKS + crypto LUKS - key on removable device support + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + **rd.luks.key=**__<keypath>__:__<keydev>__:__<luksdev>__:: +- _keypath_ is a path to key file to look for. It's REQUIRED. When _keypath_ ends with '.gpg' it's considered to be key encrypted symmetrically with GPG. You will be prompted for password on boot. GPG support comes with 'crypt-gpg' module which needs to be added explicitly. +-+ +-_keydev_ is a device on which key file resides. It might be kernel name of devices (should start with "/dev/"), UUID (prefixed with "UUID=") or label (prefix with "LABEL="). You don't have to specify full UUID. Just its beginning will suffice, even if its ambiguous. All matching devices will be probed. This parameter is recommended, but not required. If not present, all block devices will be probed, which may significantly increase boot time. +-+ +-If _luksdev_ is given, the specified key will only be applied for that LUKS device. Possible values are the same as for _keydev_. Unless you have several LUKS devices, you don't have to specify this parameter. The simplest usage is: ++ _keypath_ is a path to key file to look for. It's REQUIRED. When _keypath_ ++ ends with '.gpg' it's considered to be key encrypted symmetrically with GPG. ++ You will be prompted for password on boot. GPG support comes with ++ 'crypt-gpg' module which needs to be added explicitly. +++ ++_keydev_ is a device on which key file resides. It might be kernel name of ++devices (should start with "/dev/"), UUID (prefixed with "UUID=") or label ++(prefix with "LABEL="). You don't have to specify full UUID. Just its beginning ++will suffice, even if its ambiguous. All matching devices will be probed. ++This parameter is recommended, but not required. If not present, all block ++devices will be probed, which may significantly increase boot time. +++ ++If _luksdev_ is given, the specified key will only be applied for that LUKS ++device. Possible values are the same as for _keydev_. Unless you have several ++LUKS devices, you don't have to specify this parameter. The simplest usage is: + + + [listing] + .Example +@@ -325,7 +338,8 @@ MD RAID + ignore mdadm.conf included in initramfs + + **rd.md.waitclean=1**:: +- wait for any resync, recovery, or reshape activity to finish before continuing ++ wait for any resync, recovery, or reshape activity to finish before ++ continuing + + **rd.md.uuid=**__<md raid uuid>__:: + only activate the raid sets with the given UUID. This parameter can be +@@ -366,8 +380,8 @@ Network + + [IMPORTANT] + ===================== +-It is recommended to either bind an interface to a MAC with the **ifname** argument, +-or to use the systemd-udevd predictable network interface names. ++It is recommended to either bind an interface to a MAC with the **ifname** ++argument, or to use the systemd-udevd predictable network interface names. + + Predictable network interface device names based on: + +@@ -376,7 +390,8 @@ Predictable network interface device names based on: + - physical/geographical location of the hardware + - the interface's MAC address + +-See: http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames ++See: ++http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames + + Two character prefixes based on the type of interface: + +@@ -423,9 +438,9 @@ USB Android phone:: + ===================== + + **ip=**__{dhcp|on|any|dhcp6|auto6|ibft}__:: +- dhcp|on|any::: get ip from dhcp server from all interfaces. If root=dhcp, loop +- sequentially through all interfaces (eth0, eth1, ...) and use the first with +- a valid DHCP root-path. ++ dhcp|on|any::: get ip from dhcp server from all interfaces. If root=dhcp, ++ loop sequentially through all interfaces (eth0, eth1, ...) and use the first ++ with a valid DHCP root-path. + + auto6::: IPv6 autoconfiguration + +@@ -448,8 +463,8 @@ same <interface>. + explicit network configuration. If you want do define a IPv6 address, put it + in brackets (e.g. [2001:DB8::1]). This parameter can be specified multiple + times. __<peer>__ is optional and is the address of the remote endpoint +- for pointopoint interfaces and it may be followed by a slash and a decimal number, +- encoding the network prefix length. ++ for pointopoint interfaces and it may be followed by a slash and a decimal ++ number, encoding the network prefix length. + + + ===================== + <macaddr>::: optionally **set** <macaddr> on the <interface>. This +@@ -458,7 +473,8 @@ same <interface>. + ===================== + + **ifname=**__<interface>__:__<MAC>__:: +- Assign network device name <interface> (ie "bootnet") to the NIC with MAC <MAC>. ++ Assign network device name <interface> (ie "bootnet") to the NIC with ++ MAC <MAC>. + + + WARNING: Do **not** use the default kernel naming scheme for the interface name, + as it can conflict with the kernel names. So, don't use "eth[0-9]+" for the +@@ -479,16 +495,18 @@ interface name. Better name it "bootnet" or "bluesocket". + + **vlan=**__<vlanname>__:__<phydevice>__:: + Setup vlan device named <vlanname> on <phydeivce>. +- We support the four styles of vlan names: VLAN_PLUS_VID (vlan0005), VLAN_PLUS_VID_NO_PAD (vlan5), +- DEV_PLUS_VID (eth0.0005), DEV_PLUS_VID_NO_PAD (eth0.5) ++ We support the four styles of vlan names: VLAN_PLUS_VID (vlan0005), ++ VLAN_PLUS_VID_NO_PAD (vlan5), DEV_PLUS_VID (eth0.0005), ++ DEV_PLUS_VID_NO_PAD (eth0.5) + + **bond=**__<bondname>__[:__<bondslaves>__:[:__<options>__]]:: + Setup bonding device <bondname> on top of <bondslaves>. + <bondslaves> is a comma-separated list of physical (ethernet) interfaces. +- <options> is a comma-separated list on bonding options (modinfo bonding for details) +- in format compatible with initscripts. If <options> includes multi-valued arp_ip_target option, +- then its values should be separated by semicolon. +- Bond without parameters assumes bond=bond0:eth0,eth1:mode=balance-rr ++ <options> is a comma-separated list on bonding options (modinfo bonding for ++ details) in format compatible with initscripts. If <options> includes ++ multi-valued arp_ip_target option, then its values should be separated by ++ semicolon. Bond without parameters assumes ++ bond=bond0:eth0,eth1:mode=balance-rr + + **team=**__<teammaster>__:__<teamslaves>__:: + Setup team device <teammaster> on top of <teamslaves>. +@@ -496,7 +514,8 @@ interface name. Better name it "bootnet" or "bluesocket". + + **bridge=**__<bridgename>__:__<ethnames>__:: + Setup bridge <bridgename> with <ethnames>. <ethnames> is a comma-separated +- list of physical (ethernet) interfaces. Bridge without parameters assumes bridge=br0:eth0 ++ list of physical (ethernet) interfaces. Bridge without parameters assumes ++ bridge=br0:eth0 + + NFS + ~~~ +@@ -534,7 +553,9 @@ CIFS + as part of the root, then they must be passed on the command line through + cifsuser/cifspass. + + +-WARNING: Passwords specified on the kernel command line are visible for all users via the file _/proc/cmdline_ and via dmesg or can be sniffed on the network, when using DHCP with DHCP root-path. ++WARNING: Passwords specified on the kernel command line are visible for all ++users via the file _/proc/cmdline_ and via dmesg or can be sniffed on the ++network, when using DHCP with DHCP root-path. + + **cifsuser**=__<username>__:: + Set the cifs username, if not specified as part of the root. +@@ -542,7 +563,9 @@ WARNING: Passwords specified on the kernel command line are visible for all user + **cifspass**=__<password>__:: + Set the cifs password, if not specified as part of the root. + + +-WARNING: Passwords specified on the kernel command line are visible for all users via the file _/proc/cmdline_ and via dmesg or can be sniffed on the network, when using DHCP with DHCP root-path. ++WARNING: Passwords specified on the kernel command line are visible for all ++users via the file _/proc/cmdline_ and via dmesg or can be sniffed on the ++network, when using DHCP with DHCP root-path. + + iSCSI + ~~~~~ +@@ -555,7 +578,9 @@ iSCSI + fields. See + link:$$http://tools.ietf.org/html/rfc4173#section-5$$[rfc4173]. + + +-WARNING: Passwords specified on the kernel command line are visible for all users via the file _/proc/cmdline_ and via dmesg or can be sniffed on the network, when using DHCP with DHCP root-path. ++WARNING: Passwords specified on the kernel command line are visible for all ++users via the file _/proc/cmdline_ and via dmesg or can be sniffed on the ++network, when using DHCP with DHCP root-path. + + + [listing] + .Example +@@ -590,12 +615,18 @@ If servername is an IPv6 address, it has to be put in brackets: + netroot=iscsi:[2001:DB8::1]::::iqn.2009-06.dracut:target0 + -- + + +-WARNING: Passwords specified on the kernel command line are visible for all users via the file _/proc/cmdline_ and via dmesg or can be sniffed on the network, when using DHCP with DHCP root-path. You may want to use rd.iscsi.firmware. ++WARNING: Passwords specified on the kernel command line are visible for all ++users via the file _/proc/cmdline_ and via dmesg or can be sniffed on the ++network, when using DHCP with DHCP root-path. ++You may want to use rd.iscsi.firmware. + + **root=**__???__ **rd.iscsi.initiator=**__<initiator>__ **rd.iscsi.target.name=**__<target name>__ **rd.iscsi.target.ip=**__<target ip>__ **rd.iscsi.target.port=**__<target port>__ **rd.iscsi.target.group=**__<target group>__ **rd.iscsi.username=**__<username>__ **rd.iscsi.password=**__<password>__ **rd.iscsi.in.username=**__<in username>__ **rd.iscsi.in.password=**__<in password>__:: + manually specify all iscsistart parameter (see **+iscsistart --help+**) + + +-WARNING: Passwords specified on the kernel command line are visible for all users via the file _/proc/cmdline_ and via dmesg or can be sniffed on the network, when using DHCP with DHCP root-path. You may want to use rd.iscsi.firmware. ++WARNING: Passwords specified on the kernel command line are visible for all ++users via the file _/proc/cmdline_ and via dmesg or can be sniffed on the ++network, when using DHCP with DHCP root-path. ++You may want to use rd.iscsi.firmware. + + **root=**_???_ **netroot=**iscsi **rd.iscsi.firmware=1**:: + will read the iscsi parameter from the BIOS firmware +@@ -715,7 +746,8 @@ ecryptfskey=/etc/keys/ecryptfs-trusted.blob + + Deprecated, renamed Options + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ +-Here is a list of options, which were used in dracut prior to version 008, and their new replacement. ++Here is a list of options, which were used in dracut prior to version 008, and ++their new replacement. + + rdbreak:: rd.break + +@@ -849,7 +881,8 @@ _/etc/conf.d/_:: + set in the configuration files. + + _/etc/cmdline_:: +- Can contain additional command line options. Deprecated, better use /etc/cmdline.d/*.conf. ++ Can contain additional command line options. Deprecated, better use ++ /etc/cmdline.d/*.conf. + + _/etc/cmdline.d/*.conf_:: + Can contain additional command line options. +diff --git a/dracut.conf.5.asc b/dracut.conf.5.asc +index 30b7e030..5c941188 100644 +--- a/dracut.conf.5.asc ++++ b/dracut.conf.5.asc +@@ -10,17 +10,19 @@ dracut.conf - configuration file(s) for dracut + + SYNOPSIS + -------- +-_/etc/dracut.conf_ _/etc/dracut.conf.d/*.conf_ _/usr/lib/dracut/dracut.conf.d/*.conf_ ++_/etc/dracut.conf_ _/etc/dracut.conf.d/*.conf_ ++_/usr/lib/dracut/dracut.conf.d/*.conf_ + + Description + ----------- + _dracut.conf_ is loaded during the initialisation phase of dracut. Command line + parameter will overwrite any values set here. + +-_*.conf_ files are read from /usr/lib/dracut/dracut.conf.d and /etc/dracut.conf.d. +-Files with the same name in /etc/dracut.conf.d will replace files in /usr/lib/dracut/dracut.conf.d. +-The files are then read in alphanumerical order and will overwrite parameters set in +-_/etc/dracut.conf_. Each line specifies an attribute and a value. A '#' ++_*.conf_ files are read from /usr/lib/dracut/dracut.conf.d and ++/etc/dracut.conf.d. Files with the same name in /etc/dracut.conf.d will replace ++files in /usr/lib/dracut/dracut.conf.d. ++The files are then read in alphanumerical order and will overwrite parameters ++set in _/etc/dracut.conf_. Each line specifies an attribute and a value. A '#' + indicates the beginning of a comment; following characters, up to the end of the + line are not interpreted. + +@@ -84,7 +86,8 @@ Configuration files must have the extension .conf; other extensions are ignored. + + [WARNING] + ==== +-If chrooted to another root other than the real root device, use --fstab and provide a valid _/etc/fstab_. ++If chrooted to another root other than the real root device, use --fstab and ++provide a valid _/etc/fstab_. + ==== + + *use_fstab=*"__{yes|no}__":: +@@ -163,7 +166,8 @@ If chrooted to another root other than the real root device, use --fstab and pro + See dracut/modules.d/10i18n/README for a detailed description. + + *i18n_default_font=*"__<fontname>__":: +- The font <fontname> to install, if not specified otherwise. Default is "LatArCyrHeb-16". ++ The font <fontname> to install, if not specified otherwise. ++ Default is "LatArCyrHeb-16". + + *i18n_install_all=*"__{yes|no}__":: + Install everything regardless of generic or hostonly mode. +diff --git a/dracut.modules.7.asc b/dracut.modules.7.asc +index 17acdb4d..e94670f3 100644 +--- a/dracut.modules.7.asc ++++ b/dracut.modules.7.asc +@@ -96,8 +96,8 @@ This hooks (initqueue/settled) gets executed every time udev has settled. + + ==== Initqueue timeout + +-This hooks (initqueue/timeout) gets executed, when the main loop counter becomes half of the +-rd.retry counter. ++This hooks (initqueue/timeout) gets executed, when the main loop counter becomes ++half of the rd.retry counter. + + ==== Initqueue finished + +@@ -133,7 +133,8 @@ needed anymore. + Init (or systemd) kills all udev processes, cleans up the environment, + sets up the arguments for the real init process and finally calls switch_root. + switch_root removes the whole filesystem hierarchy of the initramfs, +-chroot()s to the real root device and calls /sbin/init with the specified arguments. ++chroot()s to the real root device and calls /sbin/init with the specified ++arguments. + + To ensure all files in the initramfs hierarchy can be removed, all processes + still running from the initramfs should not have any open file descriptors left. +@@ -225,50 +226,56 @@ depends on. + + === module-setup.sh: cmdline() + +-This function should print the kernel command line options needed to boot the current +-machine setup. It should start with a space and should not print a newline. ++This function should print the kernel command line options needed to boot the ++current machine setup. It should start with a space and should not print a ++newline. + + === module-setup.sh: install() + +-The install() function is called to install everything non-kernel related. To install +-binaries, scripts, and other files, you can use the functions mentioned in <<creation>>. ++The install() function is called to install everything non-kernel related. ++To install binaries, scripts, and other files, you can use the functions ++mentioned in <<creation>>. + + To address a file in the current module directory, use the variable "$moddir". + + === module-setup.sh: installkernel() + +-In installkernel() all kernel related files should be installed. You can use all of the functions +-mentioned in <<creation>> to install files. ++In installkernel() all kernel related files should be installed. You can use all ++of the functions mentioned in <<creation>> to install files. + + === [[creation]]Creation Functions + + ==== inst_multiple [-o] <file> [ <file> ...] + +-installs multiple binaries and files. If executables are specified without a path, dracut +-will search the path PATH=/usr/sbin:/sbin:/usr/bin:/bin for the binary. If the option "-o" +-is given as the first parameter, a missing file does not lead to an error. ++installs multiple binaries and files. If executables are specified without a ++path, dracut will search the path PATH=/usr/sbin:/sbin:/usr/bin:/bin for the ++binary. If the option "-o" is given as the first parameter, a missing file does ++not lead to an error. + + ==== inst <src> [<dst>] + +-installs _one_ file <src> either to the same place in the initramfs or to an optional <dst>. ++installs _one_ file <src> either to the same place in the initramfs or to an ++optional <dst>. + + ==== inst_hook <hookdir> <prio> <src> + +-installs an executable/script <src> in the dracut hook <hookdir> with priority <prio>. ++installs an executable/script <src> in the dracut hook <hookdir> with priority ++<prio>. + + ==== inst_rules <udevrule> [ <udevrule> ...] + +-installs one ore more udev rules. Non-existant udev rules are reported, but do not let dracut fail. ++installs one ore more udev rules. Non-existant udev rules are reported, but do ++not let dracut fail. + + ==== instmods <kernelmodule> [ <kernelmodule> ... ] + + instmods should be used only in the installkernel() function. + +-instmods installs one or more kernel modules in the initramfs. <kernelmodule> can also be a whole +-subsystem, if prefixed with a "=", like "=drivers/net/team". ++instmods installs one or more kernel modules in the initramfs. <kernelmodule> ++can also be a whole subsystem, if prefixed with a "=", like "=drivers/net/team". + +-instmods will not install the kernel module, if $hostonly is set and the kernel module is not currently +-needed by any /sys/*...*/uevent MODALIAS. ++instmods will not install the kernel module, if $hostonly is set and the kernel ++module is not currently needed by any /sys/*...*/uevent MODALIAS. + To install a kernel module regardless of the hostonly mode use the form: + ---- + hostonly='' instmods <kernelmodule> +diff --git a/dracut.usage.asc b/dracut.usage.asc +index 6d37920f..0b874e60 100644 +--- a/dracut.usage.asc ++++ b/dracut.usage.asc +@@ -43,7 +43,8 @@ pieces. At least keep a copy of a general purpose image (and corresponding + kernel) as a fallback to rescue your system. + + === Inspecting the Contents +-To see the contents of the image created by dracut, you can use the lsinitrd tool. ++To see the contents of the image created by dracut, you can use the lsinitrd ++tool. + ---- + # lsinitrd | less + ---- +@@ -105,10 +106,11 @@ the grub menu. + The kernel command line can also be provided by the dhcp server with the + root-path option. See <<NetworkBoot>>. + +-For a full reference of all kernel command line parameters, see *dracut.cmdline*(5). ++For a full reference of all kernel command line parameters, ++see *dracut.cmdline*(5). + +-To get a quick start for the suitable kernel command line on your system, use the +-__--print-cmdline__ option: ++To get a quick start for the suitable kernel command line on your system, ++use the __--print-cmdline__ option: + ---- + # dracut --print-cmdline + root=UUID=8b8b6f91-95c7-4da2-831b-171e12179081 rootflags=rw,relatime,discard,data=ordered rootfstype=ext4 +@@ -183,7 +185,8 @@ logical partition would contain: + rd.luks=0 rd.lvm=0 rd.md=0 rd.dm=0 + ---- + +-This turns off every automatic assembly of LVM, MD raids, DM raids and crypto LUKS. ++This turns off every automatic assembly of LVM, MD raids, DM raids and ++crypto LUKS. + + Of course, you could also omit the dracut modules in the initramfs creation + process, but then you would lose the posibility to turn it on on demand. +@@ -193,12 +196,14 @@ process, but then you would lose the posibility to turn it on on demand. + === Injecting custom Files + To add your own files to the initramfs image, you have several possibilities. + +-The --include option let you specify a source path and a target path. For example ++The --include option let you specify a source path and a target path. ++For example + ---- + # dracut --include cmdline-preset /etc/cmdline.d/mycmdline.conf initramfs-cmdline-pre.img + ---- + will create an initramfs image, where the file cmdline-preset will be copied +-inside the initramfs to _/etc/cmdline.d/mycmdline.conf_. --include can only be specified once. ++inside the initramfs to _/etc/cmdline.d/mycmdline.conf_. --include can only ++be specified once. + + + ---- +@@ -261,8 +266,8 @@ server about the ip adress for the machine. The dhcp server can also serve an + additional root-path, which will set the root device for dracut. With this + mechanism, you have static configuration on your client machine and a + centralized boot configuration on your TFTP/DHCP server. If you can't pass a +-kernel command line, then you can inject _/etc/cmdline.d/mycmdline.conf_, with a method described +-in <<Injecting>>. ++kernel command line, then you can inject _/etc/cmdline.d/mycmdline.conf_, with a ++method described in <<Injecting>>. + + ==== Reducing the Image Size + +@@ -306,10 +311,11 @@ dracut be unable to locate your root device + . Add ''rd.shell rd.debug log_buf_len=1M'' to the kernel command line so that + dracut shell commands are printed as they are executed + . The file /run/initramfs/rdsosreport.txt is generated, +-which contains all the logs and the output of all significant tools, which are mentioned later. ++which contains all the logs and the output of all significant tools, which are ++mentioned later. + +-If you want to save that output, simply mount /boot by hand or insert an USB stick and mount that. +-Then you can store the output for later inspection. ++If you want to save that output, simply mount /boot by hand or insert an USB ++stick and mount that. Then you can store the output for later inspection. + + [[information-to-include-in-your-report]] + === Information to include in your report +@@ -420,7 +426,8 @@ title Fedora (2.6.29.5-191.fc11.x86_64) + initrd /dracut-2.6.29.5-191.fc11.x86_64.img + ---- + + +-. If system boot fails, you will be dropped into a shell as seen in the example below. ++. If system boot fails, you will be dropped into a shell as seen in the example ++below. + + + ---- + No root device found +@@ -429,7 +436,8 @@ Dropping to debug shell. + # + ---- + + +-. Use this shell prompt to gather the information requested above (see <<all-bug-reports>>). ++. Use this shell prompt to gather the information requested above ++(see <<all-bug-reports>>). + + [[accessing-the-root-volume-from-the-dracut-shell]] + ==== Accessing the root volume from the dracut shell +@@ -439,8 +447,10 @@ root volume is configured. Common scenarios include: + + * A block device (e.g. _/dev/sda7_) + * A LVM logical volume (e.g. _/dev/VolGroup00/LogVol00_) +-* An encrypted device (e.g. _/dev/mapper/luks-4d5972ea-901c-4584-bd75-1da802417d83_) +-* A network attached device (e.g. netroot=iscsi:@192.168.0.4::3260::iqn.2009-02.org.fedoraproject:for.all) ++* An encrypted device ++ (e.g. _/dev/mapper/luks-4d5972ea-901c-4584-bd75-1da802417d83_) ++* A network attached device ++ (e.g. _netroot=iscsi:@192.168.0.4::3260::iqn.2009-02.org.example:for.all_) + + The exact method for locating and preparing will vary. However, to continue with + a successful boot, the objective is to locate your root volume and create a +@@ -522,5 +532,6 @@ To do this from an already booted system: + # touch /run/initramfs/.need_shutdown + ---- + +-This will give you a dracut shell after the system pivot'ed back in the initramfs. ++This will give you a dracut shell after the system pivot'ed back in the ++initramfs. + +diff --git a/mkinitrd.8.asc b/mkinitrd.8.asc +index 25661c8d..146a6d0f 100644 +--- a/mkinitrd.8.asc ++++ b/mkinitrd.8.asc +@@ -41,8 +41,8 @@ OPTIONS + + **--preload=<module>**:: + preload the kernel module <module> in the initramfs before any other kernel +- modules are loaded. This can be used to ensure a certain device naming, which +- should in theory be avoided and the use of symbolic links in /dev is ++ modules are loaded. This can be used to ensure a certain device naming, ++ which should in theory be avoided and the use of symbolic links in /dev is + encouraged. + + **--nocompress**:: diff --git a/SOURCES/0074-network-include-all-ethernet-drivers.patch b/SOURCES/0074-network-include-all-ethernet-drivers.patch new file mode 100644 index 0000000..f687fa5 --- /dev/null +++ b/SOURCES/0074-network-include-all-ethernet-drivers.patch @@ -0,0 +1,35 @@ +From d1e9a5e3840b569aa8de6daba0e9ffd40b315a23 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 15 Jan 2014 14:35:53 +0100 +Subject: [PATCH] network: include all ethernet drivers + +--- + modules.d/40network/module-setup.sh | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh +index 508dbab1..a5e796f4 100755 +--- a/modules.d/40network/module-setup.sh ++++ b/modules.d/40network/module-setup.sh +@@ -24,7 +24,7 @@ installkernel() { + + net_module_filter() { + local _net_drivers='eth_type_trans|register_virtio_device|usbnet_open' +- local _unwanted_drivers='/(wireless|isdn|uwb)/' ++ local _unwanted_drivers='/(wireless|isdn|uwb|net/ethernet|net/phy|net/team)/' + local _ret + # subfunctions inherit following FDs + local _merge=8 _side2=9 +@@ -64,7 +64,11 @@ installkernel() { + | net_module_filter | instmods + + #instmods() will take care of hostonly +- instmods =drivers/net/phy ecb arc4 bridge stp llc ipv6 bonding 8021q af_packet virtio_net =drivers/net/team ++ instmods \ ++ =drivers/net/phy \ ++ =drivers/net/team \ ++ =drivers/net/ethernet \ ++ ecb arc4 bridge stp llc ipv6 bonding 8021q af_packet virtio_net + } + + install() { diff --git a/SOURCES/0075-dracut-install-dracut-fix-ldd-output-parsing.patch b/SOURCES/0075-dracut-install-dracut-fix-ldd-output-parsing.patch new file mode 100644 index 0000000..d5b8774 --- /dev/null +++ b/SOURCES/0075-dracut-install-dracut-fix-ldd-output-parsing.patch @@ -0,0 +1,43 @@ +From cb97abc7bb304a9eb8d6f6c29eaa62e9525117fb Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 17 Jan 2014 11:52:43 +0100 +Subject: [PATCH] dracut-install,dracut: fix ldd output parsing + +dracut-install could not handle output like: + /lib/$LIB/liblsp.so => /lib/lib64/liblsp.so (0x00007faf00727000) + +also unset LD_PRELOAD, so we get a clean environment +--- + dracut.sh | 1 + + install/dracut-install.c | 6 +++++- + 2 files changed, 6 insertions(+), 1 deletion(-) + +diff --git a/dracut.sh b/dracut.sh +index cf027e7d..8d572a33 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -545,6 +545,7 @@ export LC_ALL=C + export LANG=C + unset NPATH + unset LD_LIBRARY_PATH ++unset LD_PRELOAD + unset GREP_OPTIONS + + export DRACUT_LOG_LEVEL=warning +diff --git a/install/dracut-install.c b/install/dracut-install.c +index 6b9c613b..c5e4b05f 100644 +--- a/install/dracut-install.c ++++ b/install/dracut-install.c +@@ -391,7 +391,11 @@ static int resolve_deps(const char *src) + if (strstr(buf, destrootdir)) + break; + +- p = strchr(buf, '/'); ++ p = strstr(buf, "=>"); ++ if (!p) ++ p = buf; ++ ++ p = strchr(p, '/'); + if (p) { + for (q = p; *q && *q != ' ' && *q != '\n'; q++) ; + *q = '\0'; diff --git a/SOURCES/0076-systemd-add-71-seat.rules-73-seat-late.rules.patch b/SOURCES/0076-systemd-add-71-seat.rules-73-seat-late.rules.patch new file mode 100644 index 0000000..ab83c79 --- /dev/null +++ b/SOURCES/0076-systemd-add-71-seat.rules-73-seat-late.rules.patch @@ -0,0 +1,23 @@ +From aa6ab2747106225b562e9b87f13703d0dee5679f Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 17 Jan 2014 13:40:42 +0100 +Subject: [PATCH] systemd: add 71-seat.rules 73-seat-late.rules + +otherwise plymouth does not work +--- + modules.d/98systemd/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh +index 7b3dfa40..7178d2ba 100755 +--- a/modules.d/98systemd/module-setup.sh ++++ b/modules.d/98systemd/module-setup.sh +@@ -180,7 +180,7 @@ install() { + + inst_script "$moddir/rootfs-generator.sh" /lib/systemd/system-generators/dracut-rootfs-generator + +- inst_rules 99-systemd.rules ++ inst_rules 71-seat.rules 73-seat-late.rules 99-systemd.rules + + for i in \ + emergency.target \ diff --git a/SOURCES/0077-systemd-add-seat-udev-rules-and-mask-loginctl.patch b/SOURCES/0077-systemd-add-seat-udev-rules-and-mask-loginctl.patch new file mode 100644 index 0000000..c937c81 --- /dev/null +++ b/SOURCES/0077-systemd-add-seat-udev-rules-and-mask-loginctl.patch @@ -0,0 +1,23 @@ +From 254f437848ca7e73535a9a5bf21478b0a62568f4 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 17 Jan 2014 14:01:33 +0100 +Subject: [PATCH] systemd: add seat udev rules and mask loginctl + +--- + modules.d/98systemd/module-setup.sh | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh +index 7178d2ba..a99c699d 100755 +--- a/modules.d/98systemd/module-setup.sh ++++ b/modules.d/98systemd/module-setup.sh +@@ -180,6 +180,9 @@ install() { + + inst_script "$moddir/rootfs-generator.sh" /lib/systemd/system-generators/dracut-rootfs-generator + ++ inst_binary true ++ ln_r $(type -P true) "/usr/bin/loginctl" ++ ln_r $(type -P true) "/bin/loginctl" + inst_rules 71-seat.rules 73-seat-late.rules 99-systemd.rules + + for i in \ diff --git a/SOURCES/0078-systemd-module-setup.sh-make-use-of-ln_r.patch b/SOURCES/0078-systemd-module-setup.sh-make-use-of-ln_r.patch new file mode 100644 index 0000000..74b902b --- /dev/null +++ b/SOURCES/0078-systemd-module-setup.sh-make-use-of-ln_r.patch @@ -0,0 +1,32 @@ +From 834f33440ff9890235908c46d1d24f4f72f0739c Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 17 Jan 2014 14:01:57 +0100 +Subject: [PATCH] systemd/module-setup.sh: make use of "ln_r" + +--- + modules.d/98systemd/module-setup.sh | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh +index a99c699d..511b883f 100755 +--- a/modules.d/98systemd/module-setup.sh ++++ b/modules.d/98systemd/module-setup.sh +@@ -160,15 +160,15 @@ install() { + egrep '^systemd-journal:' "$initdir/etc/passwd" 2>/dev/null >> "$initdir/etc/passwd" + egrep '^systemd-journal:' /etc/group >> "$initdir/etc/group" + +- ln -fs $systemdutildir/systemd "$initdir/init" +- ln -fs $systemdutildir/systemd "$initdir/sbin/init" ++ ln_r $systemdutildir/systemd "/init" ++ ln_r $systemdutildir/systemd "/sbin/init" + + inst_script "$moddir/dracut-emergency.sh" /bin/dracut-emergency + inst_simple "$moddir/emergency.service" ${systemdsystemunitdir}/emergency.service + inst_simple "$moddir/dracut-emergency.service" ${systemdsystemunitdir}/dracut-emergency.service + inst_simple "$moddir/emergency.service" ${systemdsystemunitdir}/rescue.service + +- ln -fs initrd.target "${initdir}${systemdsystemunitdir}/default.target" ++ ln_r "${systemdsystemunitdir}/initrd.target" "${systemdsystemunitdir}/default.target" + + inst_script "$moddir/dracut-cmdline.sh" /bin/dracut-cmdline + inst_script "$moddir/dracut-pre-udev.sh" /bin/dracut-pre-udev diff --git a/SOURCES/0079-network-add-rd.bootif-0-to-ignore-BOOTIF.patch b/SOURCES/0079-network-add-rd.bootif-0-to-ignore-BOOTIF.patch new file mode 100644 index 0000000..1ec4e74 --- /dev/null +++ b/SOURCES/0079-network-add-rd.bootif-0-to-ignore-BOOTIF.patch @@ -0,0 +1,41 @@ +From 5183c9a58815970a5edc667cb6f531d7dace22ff Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 17 Jan 2014 14:37:55 +0100 +Subject: [PATCH] network: add rd.bootif=0 to ignore BOOTIF + +https://bugzilla.redhat.com/show_bug.cgi?id=1044623 +--- + dracut.cmdline.7.asc | 6 ++++++ + modules.d/40network/parse-ip-opts.sh | 2 +- + 2 files changed, 7 insertions(+), 1 deletion(-) + +diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc +index 8ac53414..963ba074 100644 +--- a/dracut.cmdline.7.asc ++++ b/dracut.cmdline.7.asc +@@ -484,6 +484,12 @@ interface name. Better name it "bootnet" or "bluesocket". + specify network interface to use routing and netroot information from. + Required if multiple ip= lines are used. + ++**BOOTIF=**__<MAC>__:: ++ specify network interface to use routing and netroot information from. ++ ++**rd.bootif=0**:: ++ Disable BOOTIF parsing, which is provided by PXE ++ + **nameserver=**__<IP>__ [**nameserver=**__<IP>__ ...]:: + specify nameserver(s) to use + +diff --git a/modules.d/40network/parse-ip-opts.sh b/modules.d/40network/parse-ip-opts.sh +index 4bf286d8..7e735741 100755 +--- a/modules.d/40network/parse-ip-opts.sh ++++ b/modules.d/40network/parse-ip-opts.sh +@@ -108,7 +108,7 @@ for p in $(getargs ip=); do + done + + # put BOOTIF in IFACES to make sure it comes up +-if BOOTIF="$(getarg BOOTIF=)"; then ++if getargbool 1 "rd.bootif" && BOOTIF="$(getarg BOOTIF=)"; then + BOOTDEV=$(fix_bootif $BOOTIF) + IFACES="$BOOTDEV $IFACES" + fi diff --git a/SOURCES/0080-iscsi-call-iscsistart-b-until-it-succeeds.patch b/SOURCES/0080-iscsi-call-iscsistart-b-until-it-succeeds.patch new file mode 100644 index 0000000..238e841 --- /dev/null +++ b/SOURCES/0080-iscsi-call-iscsistart-b-until-it-succeeds.patch @@ -0,0 +1,49 @@ +From 9bdbbe90efb11dfb840f9e9de0daf6388fa0f47f Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 17 Jan 2014 14:45:15 +0100 +Subject: [PATCH] iscsi: call "iscsistart -b" until it succeeds + +--- + modules.d/95iscsi/iscsiroot.sh | 11 ++++++++++- + modules.d/95iscsi/parse-iscsiroot.sh | 2 +- + 2 files changed, 11 insertions(+), 2 deletions(-) + +diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh +index abdea5cf..156003c0 100755 +--- a/modules.d/95iscsi/iscsiroot.sh ++++ b/modules.d/95iscsi/iscsiroot.sh +@@ -45,11 +45,20 @@ if getargbool 0 rd.iscsi.firmware -d -y iscsi_firmware ; then + done + + if ! [ -e /tmp/iscsistarted-firmware ]; then +- iscsistart -b $iscsi_param ++ if ! iscsistart -f | vinfo; then ++ warn "iscistart: Could not get list of targets from firmware." ++ exit 1 ++ fi ++ ++ if ! iscsistart -b $iscsi_param 2>&1 | vinfo; then ++ warn "\`iscsistart -b $iscsi_param\´ failed" ++ exit 1 ++ fi + echo 'started' > "/tmp/iscsistarted-iscsi" + echo 'started' > "/tmp/iscsistarted-firmware" + need_shutdown + fi ++ + [ "$netif" = dummy ] && exit 0 + fi + +diff --git a/modules.d/95iscsi/parse-iscsiroot.sh b/modules.d/95iscsi/parse-iscsiroot.sh +index 77bd9913..e463addb 100755 +--- a/modules.d/95iscsi/parse-iscsiroot.sh ++++ b/modules.d/95iscsi/parse-iscsiroot.sh +@@ -64,7 +64,7 @@ if [ -n "$iscsi_firmware" ] ; then + netroot=${netroot:-iscsi} + modprobe -q iscsi_boot_sysfs 2>/dev/null + modprobe -q iscsi_ibft +- initqueue --onetime --settled /sbin/iscsiroot dummy "$netroot" "$NEWROOT" ++ initqueue --settled /sbin/iscsiroot dummy "$netroot" "$NEWROOT" + fi + + # If it's not iscsi we don't continue diff --git a/SOURCES/0081-base-dracut-lib.sh-halt-the-machine-in-systemd-mode-.patch b/SOURCES/0081-base-dracut-lib.sh-halt-the-machine-in-systemd-mode-.patch new file mode 100644 index 0000000..b4fb4b8 --- /dev/null +++ b/SOURCES/0081-base-dracut-lib.sh-halt-the-machine-in-systemd-mode-.patch @@ -0,0 +1,55 @@ +From 779f980658ab223773ef065ac3f833aacd374c53 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 17 Jan 2014 15:27:47 +0100 +Subject: [PATCH] base/dracut-lib.sh: "halt" the machine in systemd mode for + die() + +and only go in emergency shell if "rd.debug" is specified + +https://bugzilla.redhat.com/show_bug.cgi?id=1053655 +--- + modules.d/99base/dracut-lib.sh | 19 ++++++++++++++++--- + 1 file changed, 16 insertions(+), 3 deletions(-) + +diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh +index a3476ab3..e74b93fa 100755 +--- a/modules.d/99base/dracut-lib.sh ++++ b/modules.d/99base/dracut-lib.sh +@@ -1,4 +1,4 @@ +-#!/bin/sh ++!/bin/sh + # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- + # ex: ts=8 sw=4 sts=4 et filetype=sh + +@@ -430,8 +430,15 @@ die() { + echo "warn dracut: Refusing to continue"; + } >> $hookdir/emergency/01-die.sh + [ -d /run/initramfs ] || mkdir -p -- /run/initramfs ++ + > /run/initramfs/.die +- emergency_shell ++ ++ getargbool 0 "rd.debug=" && emergency_shell ++ ++ if [ -n "$DRACUT_SYSTEMD" ]; then ++ systemctl --no-block --force halt ++ fi ++ + exit 1 + } + +@@ -1045,7 +1052,13 @@ emergency_shell() + # cause a kernel panic + exit 1 + fi +- [ -e /run/initramfs/.die ] && exit 1 ++ ++ if [ -e /run/initramfs/.die ]; then ++ if [ -n "$DRACUT_SYSTEMD" ]; then ++ systemctl --no-block --force halt ++ fi ++ exit 1 ++ fi + } + + action_on_fail() diff --git a/SOURCES/0082-systemd-rootfs-generator.sh-exit-0.patch b/SOURCES/0082-systemd-rootfs-generator.sh-exit-0.patch new file mode 100644 index 0000000..65b3328 --- /dev/null +++ b/SOURCES/0082-systemd-rootfs-generator.sh-exit-0.patch @@ -0,0 +1,19 @@ +From 9d47a90b12dd5aa34488be2d5e6ff082c6713b8d Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 17 Jan 2014 12:16:41 +0100 +Subject: [PATCH] systemd/rootfs-generator.sh: exit 0 + +--- + modules.d/98systemd/rootfs-generator.sh | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/modules.d/98systemd/rootfs-generator.sh b/modules.d/98systemd/rootfs-generator.sh +index 3770c6b1..555027f3 100755 +--- a/modules.d/98systemd/rootfs-generator.sh ++++ b/modules.d/98systemd/rootfs-generator.sh +@@ -28,3 +28,5 @@ case "$root" in + esac + + [ "${root%%:*}" = "block" ] && wait_for_dev -n "${root#block:}" ++ ++exit 0 diff --git a/SOURCES/0083-systemd-rootfs-generator.sh-ignore-legacy-root-dev-n.patch b/SOURCES/0083-systemd-rootfs-generator.sh-ignore-legacy-root-dev-n.patch new file mode 100644 index 0000000..5b56cb7 --- /dev/null +++ b/SOURCES/0083-systemd-rootfs-generator.sh-ignore-legacy-root-dev-n.patch @@ -0,0 +1,22 @@ +From 0ab5e8adc8c7132c4f858bcfe7bd7f8c493282d9 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 17 Jan 2014 13:40:05 +0100 +Subject: [PATCH] systemd/rootfs-generator.sh: ignore legacy root=/dev/nfs + +--- + modules.d/98systemd/rootfs-generator.sh | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/modules.d/98systemd/rootfs-generator.sh b/modules.d/98systemd/rootfs-generator.sh +index 555027f3..9810026d 100755 +--- a/modules.d/98systemd/rootfs-generator.sh ++++ b/modules.d/98systemd/rootfs-generator.sh +@@ -22,6 +22,8 @@ case "$root" in + root="${root#block:}" + root="block:/dev/disk/by-partlabel/${root#PARTLABEL=}" + rootok=1 ;; ++ /dev/nfs) # ignore legacy /dev/nfs ++ ;; + /dev/*) + root="block:${root}" + rootok=1 ;; diff --git a/SOURCES/0084-dracut-lib.sh-fixed-shebang.patch b/SOURCES/0084-dracut-lib.sh-fixed-shebang.patch new file mode 100644 index 0000000..deba8eb --- /dev/null +++ b/SOURCES/0084-dracut-lib.sh-fixed-shebang.patch @@ -0,0 +1,19 @@ +From d11012969527a027ad2db8d06e374fb8f04e7f45 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Mon, 20 Jan 2014 14:59:46 +0100 +Subject: [PATCH] dracut-lib.sh: fixed shebang + +--- + modules.d/99base/dracut-lib.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh +index e74b93fa..cd628519 100755 +--- a/modules.d/99base/dracut-lib.sh ++++ b/modules.d/99base/dracut-lib.sh +@@ -1,4 +1,4 @@ +-!/bin/sh ++#!/bin/sh + # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- + # ex: ts=8 sw=4 sts=4 et filetype=sh + diff --git a/SOURCES/0085-iscsi-more-iscsiroot-fixes.patch b/SOURCES/0085-iscsi-more-iscsiroot-fixes.patch new file mode 100644 index 0000000..657254b --- /dev/null +++ b/SOURCES/0085-iscsi-more-iscsiroot-fixes.patch @@ -0,0 +1,147 @@ +From 6c7c8d8a071694efd0c7e450fa78e71224a8ced4 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 22 Jan 2014 17:05:22 +0100 +Subject: [PATCH] iscsi: more iscsiroot fixes + +handle iscsiroot with firmware more gracefully +--- + modules.d/95iscsi/iscsiroot.sh | 68 +++++++++++++++++++--------- + modules.d/95iscsi/parse-iscsiroot.sh | 6 +-- + 2 files changed, 50 insertions(+), 24 deletions(-) + +diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh +index 156003c0..68687102 100755 +--- a/modules.d/95iscsi/iscsiroot.sh ++++ b/modules.d/95iscsi/iscsiroot.sh +@@ -31,36 +31,45 @@ iroot="$2" + # If it's not iscsi we don't continue + [ "${iroot%%:*}" = "iscsi" ] || exit 1 + +-iroot=${iroot#iscsi:} ++iroot=${iroot#iscsi} ++iroot=${iroot#:} + + # XXX modprobe crc32c should go in the cmdline parser, but I haven't yet + # figured out a way how to check whether this is built-in or not + modprobe crc32c 2>/dev/null + +-[ -e /sys/module/bnx2i ] && iscsiuio +- +-if getargbool 0 rd.iscsi.firmware -d -y iscsi_firmware ; then +- for p in $(getargs rd.iscsi.param -d iscsi_param); do +- iscsi_param="$iscsi_param --param $p" +- done ++if [ -e /sys/module/bnx2i ] && ! [ -e /tmp/iscsiuio-started ]; then ++ iscsiuio ++ > /tmp/iscsiuio-started ++fi + ++handle_firmware() ++{ + if ! [ -e /tmp/iscsistarted-firmware ]; then +- if ! iscsistart -f | vinfo; then ++ if ! iscsistart -f; then + warn "iscistart: Could not get list of targets from firmware." +- exit 1 ++ return 1 + fi + +- if ! iscsistart -b $iscsi_param 2>&1 | vinfo; then ++ for p in $(getargs rd.iscsi.param -d iscsi_param); do ++ iscsi_param="$iscsi_param --param $p" ++ done ++ ++ if ! iscsistart -b $iscsi_param; then + warn "\`iscsistart -b $iscsi_param\´ failed" +- exit 1 + fi +- echo 'started' > "/tmp/iscsistarted-iscsi" +- echo 'started' > "/tmp/iscsistarted-firmware" ++ ++ if [ -d /sys/class/iscsi_session ]; then ++ echo 'started' > "/tmp/iscsistarted-iscsi" ++ echo 'started' > "/tmp/iscsistarted-firmware" ++ else ++ return 1 ++ fi ++ + need_shutdown + fi +- +- [ "$netif" = dummy ] && exit 0 +-fi ++ return 0 ++} + + + handle_netroot() +@@ -171,21 +180,38 @@ handle_netroot() + + netroot_enc=$(str_replace "$1" '/' '\2f') + echo 'started' > "/tmp/iscsistarted-iscsi:${netroot_enc}" +- + } + ++ret=0 ++ + # loop over all netroot parameter + if getarg netroot; then + for nroot in $(getargs netroot); do +- [ "${netroot%%:*}" = "iscsi" ] || continue +- handle_netroot ${nroot##iscsi:} ++ [ "${nroot%%:*}" = "iscsi" ] || continue ++ nroot="${nroot##iscsi:}" ++ if [ -n "$nroot" ]; then ++ handle_netroot "$nroot" ++ ret=$(($ret + $?)) ++ fi + done ++ if getargbool 0 rd.iscsi.firmware -d -y iscsi_firmware ; then ++ handle_firmware ++ ret=$(($ret + $?)) ++ fi + else +- handle_netroot $iroot ++ if [ -n "$iroot" ]; then ++ handle_netroot "$iroot" ++ ret=$? ++ else ++ if getargbool 0 rd.iscsi.firmware -d -y iscsi_firmware ; then ++ handle_firmware ++ ret=$? ++ fi ++ fi + fi + + need_shutdown + + # now we have a root filesystem somewhere in /dev/sda* + # let the normal block handler handle root= +-exit 0 ++exit $ret +diff --git a/modules.d/95iscsi/parse-iscsiroot.sh b/modules.d/95iscsi/parse-iscsiroot.sh +index e463addb..4be9d561 100755 +--- a/modules.d/95iscsi/parse-iscsiroot.sh ++++ b/modules.d/95iscsi/parse-iscsiroot.sh +@@ -61,10 +61,10 @@ fi + + # iscsi_firmware does not need argument checking + if [ -n "$iscsi_firmware" ] ; then +- netroot=${netroot:-iscsi} ++ netroot=${netroot:-iscsi:} + modprobe -q iscsi_boot_sysfs 2>/dev/null + modprobe -q iscsi_ibft +- initqueue --settled /sbin/iscsiroot dummy "$netroot" "$NEWROOT" ++ initqueue --onetime --timeout "/sbin/iscsiroot dummy '$netroot' '$NEWROOT'" + fi + + # If it's not iscsi we don't continue +@@ -88,7 +88,7 @@ fi + + if [ -n "$netroot" ] && [ "$root" != "/dev/root" ] && [ "$root" != "dhcp" ]; then + if ! getargbool 1 rd.neednet >/dev/null || ! getarg "ip="; then +- initqueue --onetime --settled /sbin/iscsiroot dummy "$netroot" "$NEWROOT" ++ initqueue --onetime --settled "/sbin/iscsiroot dummy '$netroot' '$NEWROOT'" + fi + fi + diff --git a/SOURCES/0086-iscsiroot-touch-the-right-marker-file.patch b/SOURCES/0086-iscsiroot-touch-the-right-marker-file.patch new file mode 100644 index 0000000..fe95bcc --- /dev/null +++ b/SOURCES/0086-iscsiroot-touch-the-right-marker-file.patch @@ -0,0 +1,22 @@ +From 56a5975f91cf897d09ac3b5b74342fff48e7aea3 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 24 Jan 2014 16:35:08 +0100 +Subject: [PATCH] iscsiroot: touch the right marker file + +--- + modules.d/95iscsi/iscsiroot.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh +index 68687102..60a180dd 100755 +--- a/modules.d/95iscsi/iscsiroot.sh ++++ b/modules.d/95iscsi/iscsiroot.sh +@@ -60,7 +60,7 @@ handle_firmware() + fi + + if [ -d /sys/class/iscsi_session ]; then +- echo 'started' > "/tmp/iscsistarted-iscsi" ++ echo 'started' > "/tmp/iscsistarted-iscsi:" + echo 'started' > "/tmp/iscsistarted-firmware" + else + return 1 diff --git a/SOURCES/0087-lvm-lvm_scan.sh-handle-one-LV-at-a-time-with-lvchang.patch b/SOURCES/0087-lvm-lvm_scan.sh-handle-one-LV-at-a-time-with-lvchang.patch new file mode 100644 index 0000000..9b36b84 --- /dev/null +++ b/SOURCES/0087-lvm-lvm_scan.sh-handle-one-LV-at-a-time-with-lvchang.patch @@ -0,0 +1,32 @@ +From 3c4e663251aa64d7946e8a2c91a8bc5eae444182 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 24 Jan 2014 16:37:13 +0100 +Subject: [PATCH] lvm:lvm_scan.sh handle one LV at a time with lvchange + +--- + modules.d/90lvm/lvm_scan.sh | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) + +diff --git a/modules.d/90lvm/lvm_scan.sh b/modules.d/90lvm/lvm_scan.sh +index 85ecd4df..f87831c7 100755 +--- a/modules.d/90lvm/lvm_scan.sh ++++ b/modules.d/90lvm/lvm_scan.sh +@@ -107,11 +107,13 @@ fi + if [ -n "$LVS" ] ; then + info "Scanning devices $lvmdevs for LVM logical volumes $LVS" + lvm lvscan --ignorelockingfailure 2>&1 | vinfo +- if [ -z "$sysinit" ]; then +- lvm lvchange --yes -ay --ignorelockingfailure $nopoll --ignoremonitoring $LVS 2>&1 | vinfo +- else +- lvm lvchange --yes -ay $sysinit $LVS 2>&1 | vinfo +- fi ++ for LV in $LVS; do ++ if [ -z "$sysinit" ]; then ++ lvm lvchange --yes -ay --ignorelockingfailure $nopoll --ignoremonitoring $LV 2>&1 | vinfo ++ else ++ lvm lvchange --yes -ay $sysinit $LV 2>&1 | vinfo ++ fi ++ done + fi + + if [ -z "$LVS" -o -n "$VGS" ]; then diff --git a/SOURCES/0088-dracut-logger.sh-systemd-cat-only-understands-prio-0.patch b/SOURCES/0088-dracut-logger.sh-systemd-cat-only-understands-prio-0.patch new file mode 100644 index 0000000..c4a5f78 --- /dev/null +++ b/SOURCES/0088-dracut-logger.sh-systemd-cat-only-understands-prio-0.patch @@ -0,0 +1,31 @@ +From 74c9df58f25736aea0da8c56e15d047dc6a9cb5a Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 22 Jan 2014 11:48:45 +0100 +Subject: [PATCH] dracut-logger.sh: systemd-cat only understands prio 0-7 + +--- + dracut-logger.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/dracut-logger.sh b/dracut-logger.sh +index f679dc94..70b0da4c 100755 +--- a/dracut-logger.sh ++++ b/dracut-logger.sh +@@ -154,7 +154,7 @@ dlog_init() { + readonly _systemdcatfile="$_dlogdir/systemd-cat" + mkfifo "$_systemdcatfile" + readonly _dlogfd=15 +- systemd-cat -t 'dracut' <"$_systemdcatfile" & ++ systemd-cat -t 'dracut' --level-prefix=true <"$_systemdcatfile" & + exec 15>"$_systemdcatfile" + elif ! [ -S /dev/log -a -w /dev/log ] || ! command -v logger >/dev/null; then + # We cannot log to syslog, so turn this facility off. +@@ -330,7 +330,7 @@ _do_dlog() { + + if (( $lvl <= $sysloglvl )); then + if [[ "$_dlogfd" ]]; then +- echo "<$(_dlvl2syslvl $lvl)>$msg" >&$_dlogfd ++ printf -- "<%s>%s\n" "$(($(_dlvl2syslvl $lvl) & 7))" "$msg" >&$_dlogfd + else + logger -t "dracut[$$]" -p $(_lvl2syspri $lvl) -- "$msg" + fi diff --git a/SOURCES/0089-Use-builtin-xz-lzma-option-to-use-all-cores-for-mult.patch b/SOURCES/0089-Use-builtin-xz-lzma-option-to-use-all-cores-for-mult.patch new file mode 100644 index 0000000..6da7935 --- /dev/null +++ b/SOURCES/0089-Use-builtin-xz-lzma-option-to-use-all-cores-for-mult.patch @@ -0,0 +1,34 @@ +From dfaeee7341acba43367dd26bce9143d8a5c08ac5 Mon Sep 17 00:00:00 2001 +From: Koen Kooi <koen@dominion.thruhere.net> +Date: Fri, 10 Jan 2014 21:41:43 +0100 +Subject: [PATCH] Use builtin xz/lzma option to use all cores for multihreaded + compression + +This removes the dependency on 'getconf' as well, which is not installed by default on my embedded systems. + +Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> +--- + dracut.sh | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/dracut.sh b/dracut.sh +index 8d572a33..ad57218d 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -695,14 +695,12 @@ stdloglvl=$((stdloglvl + verbosity_mod_l)) + # eliminate IFS hackery when messing with fw_dir + fw_dir=${fw_dir//:/ } + +-cpu_count=$(getconf _NPROCESSORS_ONLN) +- + # handle compression options. + [[ $compress ]] || compress="gzip" + case $compress in + bzip2) compress="bzip2 -9";; +- lzma) compress="lzma -9 ${cpu_count:+-T$cpu_count}";; +- xz) compress="xz --check=crc32 --lzma2=dict=1MiB ${cpu_count:+-T$cpu_count}";; ++ lzma) compress="lzma -9 -T0";; ++ xz) compress="xz --check=crc32 --lzma2=dict=1MiB -T0";; + gzip) compress="gzip -9"; command -v pigz > /dev/null 2>&1 && compress="pigz -9";; + lzo) compress="lzop -9";; + lz4) compress="lz4 -9";; diff --git a/SOURCES/0090-dracut-initramfs-restore-lsinitrd-add-LZ4-support.patch b/SOURCES/0090-dracut-initramfs-restore-lsinitrd-add-LZ4-support.patch new file mode 100644 index 0000000..8de7492 --- /dev/null +++ b/SOURCES/0090-dracut-initramfs-restore-lsinitrd-add-LZ4-support.patch @@ -0,0 +1,87 @@ +From a0b85db18e163a14144230ae67c43ac23246b7ea Mon Sep 17 00:00:00 2001 +From: Koen Kooi <koen@dominion.thruhere.net> +Date: Thu, 16 Jan 2014 11:00:54 +0100 +Subject: [PATCH] dracut-initramfs-restore,lsinitrd: add LZ4 support + +Dracut claims to have LZ4 support, but trying to use it will result in an xzcat failure at the end due to missing CAT support. + +The lz4 command chokes on '--', so abstract that out into the CAT select. + +Something similar will need to be done for LZO. + +Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> +--- + dracut-initramfs-restore.sh | 2 ++ + lsinitrd.sh | 22 ++++++++++++---------- + 2 files changed, 14 insertions(+), 10 deletions(-) + +diff --git a/dracut-initramfs-restore.sh b/dracut-initramfs-restore.sh +index ec5fe180..f29c8146 100644 +--- a/dracut-initramfs-restore.sh ++++ b/dracut-initramfs-restore.sh +@@ -20,6 +20,8 @@ if zcat "$IMG" | cpio -id --quiet >/dev/null; then + rm -f -- .need_shutdown + elif xzcat "$IMG" | cpio -id --quiet >/dev/null; then + rm -f -- .need_shutdown ++elif lz4 -d -c "$IMG" | cpio -id --quiet >/dev/null; then ++ rm -f -- .need_shutdown + else + # something failed, so we clean up + echo "Unpacking of $IMG to /run/initramfs failed" >&2 +diff --git a/lsinitrd.sh b/lsinitrd.sh +index 584c29a9..f9f243bb 100755 +--- a/lsinitrd.sh ++++ b/lsinitrd.sh +@@ -106,15 +106,17 @@ fi + read -N 6 bin < "$image" + case $bin in + $'\x1f\x8b'*) +- CAT="zcat";; ++ CAT="zcat --";; + BZh*) +- CAT="bzcat";; ++ CAT="bzcat --";; + $'\x71\xc7'*|070701) +- CAT="cat";; ++ CAT="cat --";; ++ $'\x04\x22'*) ++ CAT="lz4 -d -c";; + *) +- CAT="xzcat"; ++ CAT="xzcat --"; + if echo "test"|xz|xzcat --single-stream >/dev/null 2>&1; then +- CAT="xzcat --single-stream" ++ CAT="xzcat --single-stream --" + fi + ;; + esac +@@ -126,7 +128,7 @@ if (( ${#filenames[@]} > 0 )); then + for f in ${!filenames[@]}; do + [[ $nofileinfo ]] || echo "initramfs:/$f" + [[ $nofileinfo ]] || echo "========================================================================" +- $CAT -- $image | cpio --extract --verbose --quiet --to-stdout $f 2>/dev/null ++ $CAT $image | cpio --extract --verbose --quiet --to-stdout $f 2>/dev/null + ((ret+=$?)) + [[ $nofileinfo ]] || echo "========================================================================" + [[ $nofileinfo ]] || echo +@@ -134,16 +136,16 @@ if (( ${#filenames[@]} > 0 )); then + else + echo "Image: $image: $(du -h $image | while read a b; do echo $a;done)" + echo "========================================================================" +- version=$($CAT -- "$image" | cpio --extract --verbose --quiet --to-stdout -- '*lib/dracut/dracut-*' 2>/dev/null) ++ version=$($CAT "$image" | cpio --extract --verbose --quiet --to-stdout -- '*lib/dracut/dracut-*' 2>/dev/null) + ((ret+=$?)) + echo "$version with dracut modules:" +- $CAT -- "$image" | cpio --extract --verbose --quiet --to-stdout -- '*lib/dracut/modules.txt' 2>/dev/null ++ $CAT "$image" | cpio --extract --verbose --quiet --to-stdout -- '*lib/dracut/modules.txt' 2>/dev/null + ((ret+=$?)) + echo "========================================================================" + if [ "$sorted" -eq 1 ]; then +- $CAT -- "$image" | cpio --extract --verbose --quiet --list | sort -n -k5 ++ $CAT "$image" | cpio --extract --verbose --quiet --list | sort -n -k5 + else +- $CAT -- "$image" | cpio --extract --verbose --quiet --list | sort -k9 ++ $CAT "$image" | cpio --extract --verbose --quiet --list | sort -k9 + fi + ((ret+=$?)) + echo "========================================================================" diff --git a/SOURCES/0091-Revert-dmraid-let-dmraid-setup-the-partitions.patch b/SOURCES/0091-Revert-dmraid-let-dmraid-setup-the-partitions.patch new file mode 100644 index 0000000..cb5250f --- /dev/null +++ b/SOURCES/0091-Revert-dmraid-let-dmraid-setup-the-partitions.patch @@ -0,0 +1,38 @@ +From b1cdf7c5d4df3221504c34010985254f4261b3dd Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 24 Jan 2014 11:55:27 +0100 +Subject: [PATCH] Revert "dmraid: let dmraid setup the partitions" + +This reverts commit fbf717086e8b02947a27f55d1759cccd1cb89e99. + +dmraid seems to use "p" as a seperator by default. + +Reverting to kpartx, until this is fixed. +--- + modules.d/90dmraid/dmraid.sh | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/modules.d/90dmraid/dmraid.sh b/modules.d/90dmraid/dmraid.sh +index dfd0f1cb..3753ddd7 100755 +--- a/modules.d/90dmraid/dmraid.sh ++++ b/modules.d/90dmraid/dmraid.sh +@@ -27,7 +27,8 @@ if [ -n "$DM_RAIDS" ] || getargbool 0 rd.auto; then + for s in $SETS; do + if [ "${s##$r}" != "$s" ]; then + info "Activating $s" +- dmraid -ay -i --rm_partitions "$s" 2>&1 | vinfo ++ dmraid -ay -i -p --rm_partitions "$s" 2>&1 | vinfo ++ [ -e "/dev/mapper/$s" ] && kpartx -a "/dev/mapper/$s" 2>&1 | vinfo + udevsettle + fi + done +@@ -36,7 +37,8 @@ if [ -n "$DM_RAIDS" ] || getargbool 0 rd.auto; then + # scan and activate all DM RAIDS + for s in $SETS; do + info "Activating $s" +- dmraid -ay -i --rm_partitions "$s" 2>&1 | vinfo ++ dmraid -ay -i -p --rm_partitions "$s" 2>&1 | vinfo ++ [ -e "/dev/mapper/$s" ] && kpartx -a "/dev/mapper/$s" 2>&1 | vinfo + done + fi + diff --git a/SOURCES/0092-dracut.sh-create-early-cpio-dir-for-acpi-tables.patch b/SOURCES/0092-dracut.sh-create-early-cpio-dir-for-acpi-tables.patch new file mode 100644 index 0000000..27e698f --- /dev/null +++ b/SOURCES/0092-dracut.sh-create-early-cpio-dir-for-acpi-tables.patch @@ -0,0 +1,22 @@ +From 0d4bb7ce8928b67a2e835931bc85f317feabd32e Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 24 Jan 2014 15:26:43 +0100 +Subject: [PATCH] dracut.sh: create early cpio dir for acpi tables + +--- + dracut.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dracut.sh b/dracut.sh +index ad57218d..55862751 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -719,7 +719,7 @@ readonly initdir="$(mktemp --tmpdir="$TMPDIR/" -d -t initramfs.XXXXXX)" + exit 1 + } + +-if [[ $early_microcode = yes ]]; then ++if [[ $early_microcode = yes ]] || ( [[ $acpi_override = yes ]] && [[ -d $acpi_table_dir ]] ); then + readonly early_cpio_dir="$(mktemp --tmpdir="$TMPDIR/" -d -t early_cpio.XXXXXX)" + [ -d "$early_cpio_dir" ] || { + printf "%s\n" "dracut: mktemp --tmpdir=\"$TMPDIR/\" -d -t early_cpio.XXXXXX failed." >&2 diff --git a/SOURCES/0093-dracut.sh-set-file-owners-of-early-cpio-files-to-0-0.patch b/SOURCES/0093-dracut.sh-set-file-owners-of-early-cpio-files-to-0-0.patch new file mode 100644 index 0000000..e1f7bfc --- /dev/null +++ b/SOURCES/0093-dracut.sh-set-file-owners-of-early-cpio-files-to-0-0.patch @@ -0,0 +1,26 @@ +From 87862728daaefd56708fe2100c22a90ebf361fac Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 24 Jan 2014 15:27:15 +0100 +Subject: [PATCH] dracut.sh: set file owners of early cpio files to 0:0 + +--- + dracut.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/dracut.sh b/dracut.sh +index 55862751..0ac2b050 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1379,10 +1379,10 @@ rm -f -- "$outfile" + dinfo "*** Creating image file ***" + if [[ $create_early_cpio = yes ]]; then + # The microcode blob is _before_ the initramfs blob, not after +- (cd "$early_cpio_dir/d"; find . -print0 | cpio --null -o -H newc --quiet >../early.cpio) ++ (cd "$early_cpio_dir/d"; find . -print0 | cpio --null -R 0:0 -H newc -o --quiet >../early.cpio) + mv $early_cpio_dir/early.cpio $outfile.$$ + fi +-if ! ( umask 077; cd "$initdir"; find . -print0 | cpio --null -R 0:0 -H newc -o --quiet| \ ++if ! ( umask 077; cd "$initdir"; find . -print0 | cpio --null -R 0:0 -H newc -o --quiet | \ + $compress >> "$outfile.$$"; ); then + dfatal "dracut: creation of $outfile.$$ failed" + exit 1 diff --git a/SOURCES/0094-add-skipcpio-utility.patch b/SOURCES/0094-add-skipcpio-utility.patch new file mode 100644 index 0000000..3b8a7e3 --- /dev/null +++ b/SOURCES/0094-add-skipcpio-utility.patch @@ -0,0 +1,190 @@ +From a3dc6a721873f0365612a5acee952a5f7d33853a Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 24 Jan 2014 15:27:51 +0100 +Subject: [PATCH] add skipcpio utility + +skipcpio skips a cpio archive at the beginning of a file. + +It is used for skipping an early cpio archive for lsinitrd. +--- + Makefile | 13 ++++- + skipcpio/skipcpio.c | 123 ++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 135 insertions(+), 1 deletion(-) + create mode 100644 skipcpio/skipcpio.c + +diff --git a/Makefile b/Makefile +index e7da9484..5441d8f4 100644 +--- a/Makefile ++++ b/Makefile +@@ -40,7 +40,7 @@ manpages = $(man1pages) $(man5pages) $(man7pages) $(man8pages) + + .PHONY: install clean archive rpm testimage test all check AUTHORS doc dracut-version.sh + +-all: dracut-version.sh dracut-install ++all: dracut-version.sh dracut-install skipcpio/skipcpio + + DRACUT_INSTALL_OBJECTS = \ + install/dracut-install.o \ +@@ -61,8 +61,15 @@ install/dracut-install: $(DRACUT_INSTALL_OBJECTS) + dracut-install: install/dracut-install + ln -fs $< $@ + ++SKIPCPIO_OBJECTS= \ ++ skipcpio/skipcpio.o ++ ++skipcpio/skipcpio.o: skipcpio/skipcpio.c ++skipcpio/skipcpio: skipcpio/skipcpio.o ++ + indent: + indent -i8 -nut -br -linux -l120 install/dracut-install.c ++ indent -i8 -nut -br -linux -l120 skipcpio/skipcpio.c + + doc: $(manpages) dracut.html + +@@ -136,6 +143,9 @@ endif + if [ -f install/dracut-install ]; then \ + install -m 0755 install/dracut-install $(DESTDIR)$(pkglibdir)/dracut-install; \ + fi ++ if [ -f skipcpio/skipcpio ]; then \ ++ install -m 0755 skipcpio/skipcpio $(DESTDIR)$(pkglibdir)/skipcpio; \ ++ fi + mkdir -p $(DESTDIR)${prefix}/lib/kernel/install.d + install -m 0755 50-dracut.install $(DESTDIR)${prefix}/lib/kernel/install.d/50-dracut.install + install -m 0755 51-dracut-rescue.install $(DESTDIR)${prefix}/lib/kernel/install.d/51-dracut-rescue.install +@@ -155,6 +165,7 @@ clean: + $(RM) dracut-*.rpm dracut-*.tar.bz2 + $(RM) dracut-version.sh + $(RM) dracut-install install/dracut-install $(DRACUT_INSTALL_OBJECTS) ++ $(RM) skipcpio/skipcpio $(SKIPCPIO_OBJECTS) + $(RM) $(manpages) dracut.html + $(MAKE) -C test clean + +diff --git a/skipcpio/skipcpio.c b/skipcpio/skipcpio.c +new file mode 100644 +index 00000000..fbf391bf +--- /dev/null ++++ b/skipcpio/skipcpio.c +@@ -0,0 +1,123 @@ ++/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ ++ ++/* dracut-install.c -- install files and executables ++ ++ Copyright (C) 2012 Harald Hoyer ++ Copyright (C) 2012 Red Hat, Inc. All rights reserved. ++ ++ This program is free software: you can redistribute it and/or modify ++ under the terms of the GNU Lesser General Public License as published by ++ the Free Software Foundation; either version 2.1 of the License, or ++ (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this program; If not, see <http://www.gnu.org/licenses/>. ++*/ ++ ++#define PROGRAM_VERSION_STRING "1" ++ ++#ifndef _GNU_SOURCE ++#define _GNU_SOURCE ++#endif ++ ++#include <stdbool.h> ++#include <stdio.h> ++#include <stdlib.h> ++#include <unistd.h> ++#include <string.h> ++ ++#define CPIO_END "TRAILER!!!" ++#define CPIO_ENDLEN (sizeof(CPIO_END)-1) ++ ++static char buf[CPIO_ENDLEN * 2 + 1]; ++ ++int main(int argc, char **argv) ++{ ++ FILE *f; ++ size_t s; ++ long pos = 0; ++ ++ if (argc != 2) { ++ fprintf(stderr, "Usage: %s <file>\n", argv[0]); ++ exit(1); ++ } ++ ++ f = fopen(argv[1], "r"); ++ ++ if (f == NULL) { ++ fprintf(stderr, "Cannot open file '%s'\n", argv[1]); ++ exit(1); ++ } ++ ++ s = fread(buf, 6, 1, f); ++ if (s <= 0) { ++ fprintf(stderr, "Read error from file '%s'\n", argv[1]); ++ fclose(f); ++ exit(1); ++ } ++ fseek(f, 0, SEEK_SET); ++ ++ /* check, if this is a cpio archive */ ++ if ((buf[0] == 0x71 && buf[1] == 0xc7) ++ || (buf[0] == '0' && buf[1] == '7' && buf[0] == '0' && buf[1] == '7' && buf[0] == '0' && buf[1] == '1')) { ++ ++ /* Search for CPIO_END */ ++ do { ++ char *h; ++ fseek(f, pos, SEEK_SET); ++ buf[sizeof(buf) - 1] = 0; ++ s = fread(buf, CPIO_ENDLEN, 2, f); ++ if (s <= 0) ++ break; ++ ++ h = strstr(buf, CPIO_END); ++ if (h) { ++ pos = (h - buf) + pos + CPIO_ENDLEN; ++ fseek(f, pos, SEEK_SET); ++ break; ++ } ++ pos += CPIO_ENDLEN; ++ } while (!feof(f)); ++ ++ if (feof(f)) { ++ /* CPIO_END not found, just cat the whole file */ ++ fseek(f, 0, SEEK_SET); ++ } else { ++ /* skip zeros */ ++ while (!feof(f)) { ++ size_t i; ++ ++ buf[sizeof(buf) - 1] = 0; ++ s = fread(buf, 1, sizeof(buf) - 1, f); ++ if (s <= 0) ++ break; ++ ++ for (i = 0; (i < s) && (buf[i] == 0); i++) ; ++ ++ if (buf[i] != 0) { ++ pos += i; ++ fseek(f, pos, SEEK_SET); ++ break; ++ } ++ ++ pos += s; ++ } ++ } ++ } ++ /* cat out the rest */ ++ while (!feof(f)) { ++ s = fread(buf, 1, sizeof(buf), f); ++ if (s <= 0) ++ break; ++ ++ s = fwrite(buf, 1, s, stdout); ++ if (s <= 0) ++ break; ++ } ++ fclose(f); ++} diff --git a/SOURCES/0095-dracut.sh-add-early_cpio-marker-file-to-the-early-cp.patch b/SOURCES/0095-dracut.sh-add-early_cpio-marker-file-to-the-early-cp.patch new file mode 100644 index 0000000..d0f5b56 --- /dev/null +++ b/SOURCES/0095-dracut.sh-add-early_cpio-marker-file-to-the-early-cp.patch @@ -0,0 +1,21 @@ +From eb7c58eced499d5e894971b451d8fb940c829393 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 24 Jan 2014 15:29:24 +0100 +Subject: [PATCH] dracut.sh: add early_cpio marker file to the early cpio + +--- + dracut.sh | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/dracut.sh b/dracut.sh +index 0ac2b050..58acb647 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1378,6 +1378,7 @@ fi + rm -f -- "$outfile" + dinfo "*** Creating image file ***" + if [[ $create_early_cpio = yes ]]; then ++ echo 1 > "$early_cpio_dir/d/early_cpio" + # The microcode blob is _before_ the initramfs blob, not after + (cd "$early_cpio_dir/d"; find . -print0 | cpio --null -R 0:0 -H newc -o --quiet >../early.cpio) + mv $early_cpio_dir/early.cpio $outfile.$$ diff --git a/SOURCES/0096-lsinitrd.sh-make-use-of-the-skipcpio-utility.patch b/SOURCES/0096-lsinitrd.sh-make-use-of-the-skipcpio-utility.patch new file mode 100644 index 0000000..1c0d422 --- /dev/null +++ b/SOURCES/0096-lsinitrd.sh-make-use-of-the-skipcpio-utility.patch @@ -0,0 +1,147 @@ +From 815b9c16a4e90b67bab008da678d73faa74f8e0c Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 24 Jan 2014 15:30:22 +0100 +Subject: [PATCH] lsinitrd.sh: make use of the skipcpio utility + +With the skipcpio utility, the whole contents of an initramfs with an +early cpio image can be displayed. +--- + lsinitrd.sh | 96 +++++++++++++++++++++++++++++++++++++++++------------ + 1 file changed, 75 insertions(+), 21 deletions(-) + +diff --git a/lsinitrd.sh b/lsinitrd.sh +index f9f243bb..70e12f81 100755 +--- a/lsinitrd.sh ++++ b/lsinitrd.sh +@@ -33,6 +33,9 @@ usage() + } >&2 + } + ++ ++[[ $dracutbasedir ]] || dracutbasedir=/usr/lib/dracut ++ + sorted=0 + declare -A filenames + +@@ -103,14 +106,72 @@ if ! [[ -f "$image" ]]; then + exit 1 + fi + ++extract_files() ++{ ++ (( ${#filenames[@]} == 1 )) && nofileinfo=1 ++ for f in ${!filenames[@]}; do ++ [[ $nofileinfo ]] || echo "initramfs:/$f" ++ [[ $nofileinfo ]] || echo "========================================================================" ++ $CAT $image | cpio --extract --verbose --quiet --to-stdout $f 2>/dev/null ++ ((ret+=$?)) ++ [[ $nofileinfo ]] || echo "========================================================================" ++ [[ $nofileinfo ]] || echo ++ done ++} ++ ++list_files() ++{ ++ echo "========================================================================" ++ if [ "$sorted" -eq 1 ]; then ++ $CAT "$image" | cpio --extract --verbose --quiet --list | sort -n -k5 ++ else ++ $CAT "$image" | cpio --extract --verbose --quiet --list | sort -k9 ++ fi ++ ((ret+=$?)) ++ echo "========================================================================" ++} ++ ++ ++if (( ${#filenames[@]} <= 0 )); then ++ echo "Image: $image: $(du -h $image | while read a b; do echo $a;done)" ++ echo "========================================================================" ++fi ++ + read -N 6 bin < "$image" ++case $bin in ++ $'\x71\xc7'*|070701) ++ CAT="cat --" ++ is_early=$(cpio --extract --verbose --quiet --to-stdout -- 'early_cpio' < "$image" 2>/dev/null) ++ if [[ "$is_early" ]]; then ++ if (( ${#filenames[@]} > 0 )); then ++ extract_files ++ else ++ echo "Early CPIO image" ++ list_files ++ fi ++ SKIP="$dracutbasedir/skipcpio" ++ if ! [[ -x $SKIP ]]; then ++ echo ++ echo "'$SKIP' not found, cannot display remaining contents!" >&2 ++ echo ++ exit 0 ++ fi ++ fi ++ ;; ++esac ++ ++if [[ $SKIP ]]; then ++ read -N 6 bin < <($SKIP "$image") ++fi ++ + case $bin in + $'\x1f\x8b'*) + CAT="zcat --";; + BZh*) + CAT="bzcat --";; + $'\x71\xc7'*|070701) +- CAT="cat --";; ++ CAT="cat --" ++ ;; + $'\x04\x22'*) + CAT="lz4 -d -c";; + *) +@@ -121,34 +182,27 @@ case $bin in + ;; + esac + ++skipcpio() ++{ ++ $SKIP "$@" | $ORIG_CAT ++} ++ ++if [[ $SKIP ]]; then ++ ORIG_CAT="$CAT" ++ CAT=skipcpio ++fi ++ + ret=0 + + if (( ${#filenames[@]} > 0 )); then +- (( ${#filenames[@]} == 1 )) && nofileinfo=1 +- for f in ${!filenames[@]}; do +- [[ $nofileinfo ]] || echo "initramfs:/$f" +- [[ $nofileinfo ]] || echo "========================================================================" +- $CAT $image | cpio --extract --verbose --quiet --to-stdout $f 2>/dev/null +- ((ret+=$?)) +- [[ $nofileinfo ]] || echo "========================================================================" +- [[ $nofileinfo ]] || echo +- done ++ extract_files + else +- echo "Image: $image: $(du -h $image | while read a b; do echo $a;done)" +- echo "========================================================================" +- version=$($CAT "$image" | cpio --extract --verbose --quiet --to-stdout -- '*lib/dracut/dracut-*' 2>/dev/null) ++ version=$($CAT "$image" | cpio --extract --verbose --quiet --to-stdout -- 'lib/dracut/dracut-*' 'usr/lib/dracut/dracut-*' 2>/dev/null) + ((ret+=$?)) + echo "$version with dracut modules:" + $CAT "$image" | cpio --extract --verbose --quiet --to-stdout -- '*lib/dracut/modules.txt' 2>/dev/null + ((ret+=$?)) +- echo "========================================================================" +- if [ "$sorted" -eq 1 ]; then +- $CAT "$image" | cpio --extract --verbose --quiet --list | sort -n -k5 +- else +- $CAT "$image" | cpio --extract --verbose --quiet --list | sort -k9 +- fi +- ((ret+=$?)) +- echo "========================================================================" ++ list_files + fi + + exit $ret diff --git a/SOURCES/0097-network-dhclient-script.sh-set-lease-time.patch b/SOURCES/0097-network-dhclient-script.sh-set-lease-time.patch new file mode 100644 index 0000000..72ca57d --- /dev/null +++ b/SOURCES/0097-network-dhclient-script.sh-set-lease-time.patch @@ -0,0 +1,37 @@ +From ade113d75b07ba294facbe943b859624fa45efb9 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 28 Jan 2014 12:12:43 +0100 +Subject: [PATCH] network/dhclient-script.sh: set lease time + +The dracut dhclient-script.sh should set address lifetimes to the DHCP +lease time, so that other stuff (like NetworkManager!) knows that the +address is temporary and was created by DHCP. + +https://bugzilla.redhat.com/show_bug.cgi?id=1058519 +--- + modules.d/40network/dhclient-script.sh | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/modules.d/40network/dhclient-script.sh b/modules.d/40network/dhclient-script.sh +index 07c3d9be..70a2b710 100755 +--- a/modules.d/40network/dhclient-script.sh ++++ b/modules.d/40network/dhclient-script.sh +@@ -12,6 +12,7 @@ setup_interface() { + search=$(printf -- "$new_domain_search") + namesrv=$new_domain_name_servers + hostname=$new_host_name ++ lease_time=$new_dhcp_lease_time + + [ -f /tmp/net.$netif.override ] && . /tmp/net.$netif.override + +@@ -29,7 +30,9 @@ setup_interface() { + fi + fi + +- ip addr add $ip${mask:+/$mask} ${bcast:+broadcast $bcast} dev $netif ++ ip addr add $ip${mask:+/$mask} ${bcast:+broadcast $bcast} \ ++ valid_lft ${lease_time} preferred_lft ${lease_time} \ ++ dev $netif + + [ -n "$gw" ] && echo ip route add default via $gw dev $netif > /tmp/net.$netif.gw + diff --git a/SOURCES/0098-dracut-lib.sh-bugfix-for-pidof-function.patch b/SOURCES/0098-dracut-lib.sh-bugfix-for-pidof-function.patch new file mode 100644 index 0000000..abfce22 --- /dev/null +++ b/SOURCES/0098-dracut-lib.sh-bugfix-for-pidof-function.patch @@ -0,0 +1,26 @@ +From 37a18fda1146ac619165af8dbbbda3cbfb8ad18b Mon Sep 17 00:00:00 2001 +From: Stig Telfer <stelfer@cray.com> +Date: Fri, 24 Jan 2014 15:19:11 +0000 +Subject: [PATCH] dracut-lib.sh: bugfix for pidof function + +It appears there is a simple substitution error in the pidof shell function which causes it to fail to find processes. In my case, processes started by 95nfs are not terminated in the cleanup hook. This causes knock-on effects disturbing the root filesystem service dependencies. + +Enjoy, +Stig Telfer +--- + modules.d/99base/dracut-lib.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh +index cd628519..61e5a81a 100755 +--- a/modules.d/99base/dracut-lib.sh ++++ b/modules.d/99base/dracut-lib.sh +@@ -969,7 +969,7 @@ if ! command -v pidof >/dev/null 2>/dev/null; then + for i in /proc/*/exe; do + [ -e "$i" ] || return 1 + if [ -n "$_exe" ]; then +- [ "$i" -ef "$_cmd" ] || continue ++ [ "$i" -ef "$_exe" ] || continue + else + _rl=$(readlink -f "$i"); + [ "${_rl%/$_cmd}" != "$_rl" ] || continue diff --git a/SOURCES/0099-dracut-lib.sh-bugfix-for-pidof-function.patch b/SOURCES/0099-dracut-lib.sh-bugfix-for-pidof-function.patch new file mode 100644 index 0000000..eac4b9a --- /dev/null +++ b/SOURCES/0099-dracut-lib.sh-bugfix-for-pidof-function.patch @@ -0,0 +1,23 @@ +From 2f117f4db3425229f9a9b107682ad05b8ba613ea Mon Sep 17 00:00:00 2001 +From: Stig Telfer <stelfer@cray.com> +Date: Fri, 24 Jan 2014 15:48:32 +0000 +Subject: [PATCH] dracut-lib.sh: bugfix for pidof function + +In follow-up, the patch requires a second mod: kernel tasks have a /proc/.../exe that links to nothing and derails the for loop: +--- + modules.d/99base/dracut-lib.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh +index 61e5a81a..d892c26d 100755 +--- a/modules.d/99base/dracut-lib.sh ++++ b/modules.d/99base/dracut-lib.sh +@@ -967,7 +967,7 @@ if ! command -v pidof >/dev/null 2>/dev/null; then + [ -z "$_cmd" ] && return 1 + _exe=$(type -P "$1") + for i in /proc/*/exe; do +- [ -e "$i" ] || return 1 ++ [ -e "$i" ] || continue + if [ -n "$_exe" ]; then + [ "$i" -ef "$_exe" ] || continue + else diff --git a/SOURCES/0100-iscsi-iscsiroot.sh-beautify-warning.patch b/SOURCES/0100-iscsi-iscsiroot.sh-beautify-warning.patch new file mode 100644 index 0000000..3c37c81 --- /dev/null +++ b/SOURCES/0100-iscsi-iscsiroot.sh-beautify-warning.patch @@ -0,0 +1,22 @@ +From f812e271cb9d51365b70f0ee82bb2fd30209ba06 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 28 Jan 2014 12:14:07 +0100 +Subject: [PATCH] iscsi/iscsiroot.sh: beautify warning + +--- + modules.d/95iscsi/iscsiroot.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh +index 60a180dd..8b743323 100755 +--- a/modules.d/95iscsi/iscsiroot.sh ++++ b/modules.d/95iscsi/iscsiroot.sh +@@ -56,7 +56,7 @@ handle_firmware() + done + + if ! iscsistart -b $iscsi_param; then +- warn "\`iscsistart -b $iscsi_param\´ failed" ++ warn "'iscsistart -b $iscsi_param' failed" + fi + + if [ -d /sys/class/iscsi_session ]; then diff --git a/SOURCES/0101-dracut.spec-add-skipcpio.patch b/SOURCES/0101-dracut.spec-add-skipcpio.patch new file mode 100644 index 0000000..02f677d --- /dev/null +++ b/SOURCES/0101-dracut.spec-add-skipcpio.patch @@ -0,0 +1,21 @@ +From 40cf35ef4ef959838729c12d4d0d73e03476914b Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 28 Jan 2014 12:21:33 +0100 +Subject: [PATCH] dracut.spec: add skipcpio + +--- + dracut.spec | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/dracut.spec b/dracut.spec +index 596d7283..d6f1a884 100644 +--- a/dracut.spec ++++ b/dracut.spec +@@ -302,6 +302,7 @@ rm -rf -- $RPM_BUILD_ROOT + %{dracutlibdir}/dracut-logger.sh + %{dracutlibdir}/dracut-initramfs-restore + %{dracutlibdir}/dracut-install ++%{dracutlibdir}/skipcpio + %config(noreplace) %{_sysconfdir}/dracut.conf + %if 0%{?fedora} || 0%{?suse_version} || 0%{?rhel} + %{dracutlibdir}/dracut.conf.d/01-dist.conf diff --git a/SOURCES/0102-systemd-ensure-autofs4-and-ipv6-are-included.patch b/SOURCES/0102-systemd-ensure-autofs4-and-ipv6-are-included.patch new file mode 100644 index 0000000..4e70414 --- /dev/null +++ b/SOURCES/0102-systemd-ensure-autofs4-and-ipv6-are-included.patch @@ -0,0 +1,29 @@ +From 657e832da0f7fb99e60dab9bb934071d81519dc5 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= <crrodriguez@opensuse.org> +Date: Mon, 16 Dec 2013 03:40:58 +0000 +Subject: [PATCH] systemd: ensure autofs4 and ipv6 are included + +Systemd tries to load this modules very early. +Even though they are not strictly required it it is a good +thing to have them around. + +[Edited-by: Harald Hoyer: moved to installkernel() ] +--- + modules.d/98systemd/module-setup.sh | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh +index 511b883f..91a6559d 100755 +--- a/modules.d/98systemd/module-setup.sh ++++ b/modules.d/98systemd/module-setup.sh +@@ -17,6 +17,10 @@ depends() { + return 0 + } + ++installkernel() { ++ instmods autofs4 ipv6 ++} ++ + install() { + local _mods + diff --git a/SOURCES/0103-dracut-functions.sh-also-search-in-the-updates-direc.patch b/SOURCES/0103-dracut-functions.sh-also-search-in-the-updates-direc.patch new file mode 100644 index 0000000..4c282ea --- /dev/null +++ b/SOURCES/0103-dracut-functions.sh-also-search-in-the-updates-direc.patch @@ -0,0 +1,22 @@ +From 27acb483e8f73ceb24eacca067dbea178d53aa2f Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 30 Jan 2014 14:27:18 +0100 +Subject: [PATCH] dracut-functions.sh: also search in the updates directory + +--- + dracut-functions.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dracut-functions.sh b/dracut-functions.sh +index 2872516a..96a20d52 100755 +--- a/dracut-functions.sh ++++ b/dracut-functions.sh +@@ -1530,7 +1530,7 @@ find_kernel_modules_by_path () { + _OLDIFS=$IFS + IFS=: + while read a rest; do +- [[ $a = */$1/* ]] || continue ++ [[ $a = */$1/* ]] || [[ $a = */updates/* ]] || continue + printf "%s\n" "$srcmods/$a" + done < "$srcmods/modules.dep" + IFS=$_OLDIFS diff --git a/SOURCES/0104-dracut.sh-only-set-the-owner-of-files-to-0-0-if-gene.patch b/SOURCES/0104-dracut.sh-only-set-the-owner-of-files-to-0-0-if-gene.patch new file mode 100644 index 0000000..01df545 --- /dev/null +++ b/SOURCES/0104-dracut.sh-only-set-the-owner-of-files-to-0-0-if-gene.patch @@ -0,0 +1,36 @@ +From 286fbebdaf4bc4954a3206ca11f1d14f9267a7fd Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 30 Jan 2014 16:11:40 +0100 +Subject: [PATCH] dracut.sh: only set the owner of files to 0:0, if generated + as non-root + +If the root user generates the initramfs image, preserve the ownership +of the files. This of course cannot be done for non-root users +generating an initramfs image. +--- + dracut.sh | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/dracut.sh b/dracut.sh +index 58acb647..4e239936 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1377,13 +1377,16 @@ fi + + rm -f -- "$outfile" + dinfo "*** Creating image file ***" ++ ++[[ "$UID" != 0 ]] && cpio_owner_root="-R 0:0" ++ + if [[ $create_early_cpio = yes ]]; then + echo 1 > "$early_cpio_dir/d/early_cpio" + # The microcode blob is _before_ the initramfs blob, not after +- (cd "$early_cpio_dir/d"; find . -print0 | cpio --null -R 0:0 -H newc -o --quiet >../early.cpio) ++ (cd "$early_cpio_dir/d"; find . -print0 | cpio --null $cpio_owner_root -H newc -o --quiet >../early.cpio) + mv $early_cpio_dir/early.cpio $outfile.$$ + fi +-if ! ( umask 077; cd "$initdir"; find . -print0 | cpio --null -R 0:0 -H newc -o --quiet | \ ++if ! ( umask 077; cd "$initdir"; find . -print0 | cpio --null $cpio_owner_root -H newc -o --quiet | \ + $compress >> "$outfile.$$"; ); then + dfatal "dracut: creation of $outfile.$$ failed" + exit 1 diff --git a/SOURCES/0105-dracut.conf.d-fedora.conf.example-turn-on-early_micr.patch b/SOURCES/0105-dracut.conf.d-fedora.conf.example-turn-on-early_micr.patch new file mode 100644 index 0000000..ff8177b --- /dev/null +++ b/SOURCES/0105-dracut.conf.d-fedora.conf.example-turn-on-early_micr.patch @@ -0,0 +1,19 @@ +From c6fe81559e88b211fcd17a4687c1707a8434f3ff Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 30 Jan 2014 16:51:13 +0100 +Subject: [PATCH] dracut.conf.d/fedora.conf.example: turn on early_microcode by + default + +--- + dracut.conf.d/fedora.conf.example | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/dracut.conf.d/fedora.conf.example b/dracut.conf.d/fedora.conf.example +index 495e8fb3..2364b049 100644 +--- a/dracut.conf.d/fedora.conf.example ++++ b/dracut.conf.d/fedora.conf.example +@@ -13,3 +13,4 @@ systemdsystemunitdir=/usr/lib/systemd/system + systemdsystemconfdir=/etc/systemd/system + udevdir=/usr/lib/udev + hostonly="yes" ++early_microcode="yes" diff --git a/SOURCES/0106-network-understand-ip-.-dns1-dns2.patch b/SOURCES/0106-network-understand-ip-.-dns1-dns2.patch new file mode 100644 index 0000000..c8c925c --- /dev/null +++ b/SOURCES/0106-network-understand-ip-.-dns1-dns2.patch @@ -0,0 +1,50 @@ +From b4b60da8dcdd6bc6f1e66ece90e1070b07db0cf4 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 30 Jan 2014 13:50:02 +0100 +Subject: [PATCH] network: understand ip=.....:<dns1>:<dns2> + +--- + modules.d/40network/net-lib.sh | 23 +++++++++++++++++------ + 1 file changed, 17 insertions(+), 6 deletions(-) + +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index 7544401f..36fad122 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -339,7 +339,7 @@ ip_to_var() { + fi + done + +- unset ip srv gw mask hostname dev autoconf macaddr mtu ++ unset ip srv gw mask hostname dev autoconf macaddr mtu dns1 dns2 + case $# in + 0) autoconf="error" ;; + 1) autoconf=$1 ;; +@@ -347,11 +347,22 @@ ip_to_var() { + 3) [ -n "$1" ] && dev=$1; [ -n "$2" ] && autoconf=$2; [ -n "$3" ] && mtu=$3 ;; + 4) [ -n "$1" ] && dev=$1; [ -n "$2" ] && autoconf=$2; [ -n "$3" ] && mtu=$3; [ -n "$4" ] && macaddr=$4 ;; + *) [ -n "$1" ] && ip=$1; [ -n "$2" ] && srv=$2; [ -n "$3" ] && gw=$3; [ -n "$4" ] && mask=$4; +- [ -n "$5" ] && hostname=$5; [ -n "$6" ] && dev=$6; [ -n "$7" ] && autoconf=$7; [ -n "$8" ] && mtu=$8; +- if [ -n "${9}" -a -n "${10}" -a -n "${11}" -a -n "${12}" -a -n "${13}" -a -n "${14}" ]; then +- macaddr="${9}:${10}:${11}:${12}:${13}:${14}" +- fi +- ;; ++ [ -n "$5" ] && hostname=$5; [ -n "$6" ] && dev=$6; [ -n "$7" ] && autoconf=$7; ++ case "$8" in ++ [0-9]*:*|[0-9]*.[0-9]*.[0-9]*.[0-9]*) ++ dns1="$mtu"; unset $mtu ++ [ -n "$9" ] && dns2="$9" ++ ;; ++ [0-9]*) ++ mtu="$8" ++ ;; ++ *) ++ if [ -n "${9}" -a -n "${10}" -a -n "${11}" -a -n "${12}" -a -n "${13}" -a -n "${14}" ]; then ++ macaddr="${9}:${10}:${11}:${12}:${13}:${14}" ++ fi ++ ;; ++ esac ++ ;; + esac + + # ip=<ipv4-address> means anaconda-style static config argument cluster: diff --git a/SOURCES/0107-network-ifup.sh-handle-dns1-and-dns2-from-ip-setting.patch b/SOURCES/0107-network-ifup.sh-handle-dns1-and-dns2-from-ip-setting.patch new file mode 100644 index 0000000..981750c --- /dev/null +++ b/SOURCES/0107-network-ifup.sh-handle-dns1-and-dns2-from-ip-setting.patch @@ -0,0 +1,72 @@ +From b397bb7c1953419162639308f3d70d6a1ddc9213 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 30 Jan 2014 17:12:24 +0100 +Subject: [PATCH] network/ifup.sh: handle $dns1 and $dns2 from "ip=" settings + +--- + dracut.cmdline.7.asc | 7 +++++++ + modules.d/40network/ifup.sh | 21 ++++++++++++--------- + 2 files changed, 19 insertions(+), 9 deletions(-) + +diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc +index 963ba074..985285b4 100644 +--- a/dracut.cmdline.7.asc ++++ b/dracut.cmdline.7.asc +@@ -472,6 +472,13 @@ cannot be used in conjunction with the **ifname** argument for the + same <interface>. + ===================== + ++**ip=**__<client-IP>__:[__<peer>__]:__<gateway-IP>__:__<netmask>__:__<client_hostname>__:__<interface>__:__{none|off|dhcp|on|any|dhcp6|auto6|ibft}__[:[__<dns1>__][:__<dns2>__]]:: ++ explicit network configuration. If you want do define a IPv6 address, put it ++ in brackets (e.g. [2001:DB8::1]). This parameter can be specified multiple ++ times. __<peer>__ is optional and is the address of the remote endpoint ++ for pointopoint interfaces and it may be followed by a slash and a decimal ++ number, encoding the network prefix length. ++ + **ifname=**__<interface>__:__<MAC>__:: + Assign network device name <interface> (ie "bootnet") to the NIC with + MAC <MAC>. +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index 2edcfe69..b33981b2 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -264,18 +264,15 @@ if [ "$netif" = "$vlanname" ] && [ ! -e /tmp/net.$vlanname.up ]; then + ip link set "$vlanname" up + fi + +-# setup nameserver +-namesrv=$(getargs nameserver) +-if [ -n "$namesrv" ] ; then +- for s in $namesrv; do +- echo nameserver $s +- done +-fi >> /tmp/net.$netif.resolv.conf +- + # No ip lines default to dhcp + ip=$(getarg ip) + + if [ -z "$ip" ]; then ++ namesrv=$(getargs nameserver) ++ for s in $namesrv; do ++ echo nameserver $s >> /tmp/net.$netif.resolv.conf ++ done ++ + if [ "$netroot" = "dhcp6" ]; then + do_dhcp -6 + else +@@ -307,8 +304,14 @@ for p in $(getargs ip=); do + [ "$use_bridge" != 'true' ] && \ + [ "$use_vlan" != 'true' ] && continue + ++ # setup nameserver ++ namesrv="$dns1 $dns2 $(getargs nameserver)" ++ for s in $namesrv; do ++ echo nameserver $s >> /tmp/net.$netif.resolv.conf ++ done ++ + # Store config for later use +- for i in ip srv gw mask hostname macaddr; do ++ for i in ip srv gw mask hostname macaddr dns1 dns2; do + eval '[ "$'$i'" ] && echo '$i'="$'$i'"' + done > /tmp/net.$netif.override + diff --git a/SOURCES/0108-network-net-lib.sh-parse-ibft-nameserver-settings.patch b/SOURCES/0108-network-net-lib.sh-parse-ibft-nameserver-settings.patch new file mode 100644 index 0000000..44c1f86 --- /dev/null +++ b/SOURCES/0108-network-net-lib.sh-parse-ibft-nameserver-settings.patch @@ -0,0 +1,34 @@ +From 3d47b5124c9539740a4b3cfd587765879b3226cc Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 30 Jan 2014 17:11:43 +0100 +Subject: [PATCH] network/net-lib.sh: parse ibft nameserver settings + +--- + modules.d/40network/net-lib.sh | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index 36fad122..1b51c856 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -185,6 +185,7 @@ ibft_to_cmdline() { + for iface in /sys/firmware/ibft/ethernet*; do + local mac="" dev="" + local dhcp="" ip="" gw="" mask="" hostname="" ++ local dns1 dns2 + + [ -e ${iface}/mac ] || continue + mac=$(read a < ${iface}/mac; echo $a) +@@ -203,9 +204,11 @@ ibft_to_cmdline() { + [ "$ip" = "0.0.0.0" ] && continue + [ -e ${iface}/gateway ] && gw=$(read a < ${iface}/gateway; echo $a) + [ -e ${iface}/subnet-mask ] && mask=$(read a < ${iface}/subnet-mask; echo $a) ++ [ -e ${iface}/primary-dns ] && dns1=$(read a < ${iface}/primary-dns; echo $a) ++ [ -e ${iface}/secondary-dns ] && dns2=$(read a < ${iface}/secondary-dns; echo $a) + [ -e ${iface}/hostname ] && hostname=$(read a < ${iface}/hostname; echo $a) + if [ -n "$ip" ] && [ -n "$mask" ]; then +- echo "ip=$ip::$gw:$mask:$hostname:$dev:none" ++ echo "ip=$ip::$gw:$mask:$hostname:$dev:none${dns1:+:$dns1}${dns2:+:$dns2}" + else + warn "${iface} does not contain a valid iBFT configuration" + warn "ip-addr=$ip" diff --git a/SOURCES/0109-dmsquash-live-dmsquash-liveiso-genrules.sh-s-loop0-l.patch b/SOURCES/0109-dmsquash-live-dmsquash-liveiso-genrules.sh-s-loop0-l.patch new file mode 100644 index 0000000..d244031 --- /dev/null +++ b/SOURCES/0109-dmsquash-live-dmsquash-liveiso-genrules.sh-s-loop0-l.patch @@ -0,0 +1,25 @@ +From 5676a6d877fec50cf969369045788ff3ac59fdc0 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 28 Jan 2014 18:33:36 +0100 +Subject: [PATCH] dmsquash-live/dmsquash-liveiso-genrules.sh: + s/loop0/loop-control/ + +If loop is a kernel module, /dev/loop0 will never show up as a udev +event, if the loop module is not manually loaded somewhere. +--- + modules.d/90dmsquash-live/dmsquash-liveiso-genrules.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/90dmsquash-live/dmsquash-liveiso-genrules.sh b/modules.d/90dmsquash-live/dmsquash-liveiso-genrules.sh +index 30ea1805..0f913d79 100755 +--- a/modules.d/90dmsquash-live/dmsquash-liveiso-genrules.sh ++++ b/modules.d/90dmsquash-live/dmsquash-liveiso-genrules.sh +@@ -3,7 +3,7 @@ + # ex: ts=8 sw=4 sts=4 et filetype=sh + if [ "${root%%:*}" = "liveiso" ]; then + { +- printf 'KERNEL=="loop0", RUN+="/sbin/initqueue --settled --onetime --unique /sbin/dmsquash-live-root `/sbin/losetup -f --show %s`"\n' \ ++ printf 'KERNEL=="loop-control", RUN+="/sbin/initqueue --settled --onetime --unique /sbin/dmsquash-live-root `/sbin/losetup -f --show %s`"\n' \ + ${root#liveiso:} + } >> /etc/udev/rules.d/99-liveiso-mount.rules + fi diff --git a/SOURCES/0110-base-rdsosreport.sh-add-dracut-version-to-rdsosrepor.patch b/SOURCES/0110-base-rdsosreport.sh-add-dracut-version-to-rdsosrepor.patch new file mode 100644 index 0000000..d3a98b3 --- /dev/null +++ b/SOURCES/0110-base-rdsosreport.sh-add-dracut-version-to-rdsosrepor.patch @@ -0,0 +1,43 @@ +From c127eb8021b4b40b2cc32d393515bf56fe441ee2 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 31 Jan 2014 15:33:05 +0100 +Subject: [PATCH] base/rdsosreport.sh: add dracut version to rdsosreport + +--- + modules.d/99base/rdsosreport.sh | 16 +++++++++------- + 1 file changed, 9 insertions(+), 7 deletions(-) + +diff --git a/modules.d/99base/rdsosreport.sh b/modules.d/99base/rdsosreport.sh +index 5e11166e..3e2ac87d 100755 +--- a/modules.d/99base/rdsosreport.sh ++++ b/modules.d/99base/rdsosreport.sh +@@ -8,13 +8,7 @@ exec >/run/initramfs/rdsosreport.txt 2>&1 + + set -x + +-cat /proc/self/mountinfo +-cat /proc/mounts +- +-blkid +-blkid -o udev +- +-ls -l /dev/disk/by* ++cat /lib/dracut/dracut-* + + cat /proc/cmdline + +@@ -26,6 +20,14 @@ for _i in /etc/cmdline.d/*.conf; do + cat $_i + done + ++cat /proc/self/mountinfo ++cat /proc/mounts ++ ++blkid ++blkid -o udev ++ ++ls -l /dev/disk/by* ++ + for _i in /etc/conf.d/*.conf; do + [ -f "$_i" ] || break + echo $_i diff --git a/SOURCES/0111-fcoe-move-uefi-parsing-to-fcoe-uefi-module.patch b/SOURCES/0111-fcoe-move-uefi-parsing-to-fcoe-uefi-module.patch new file mode 100644 index 0000000..19f0406 --- /dev/null +++ b/SOURCES/0111-fcoe-move-uefi-parsing-to-fcoe-uefi-module.patch @@ -0,0 +1,57 @@ +From 8bde20bc6553f306a549f80742995daad31baa55 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 12 Dec 2013 09:20:53 +0100 +Subject: [PATCH] fcoe: move uefi parsing to fcoe-uefi module + +--- + modules.d/95fcoe-uefi/module-setup.sh | 22 +++++++++++++++++++ + .../{95fcoe => 95fcoe-uefi}/parse-uefifcoe.sh | 0 + modules.d/95fcoe/module-setup.sh | 1 - + 3 files changed, 22 insertions(+), 1 deletion(-) + create mode 100755 modules.d/95fcoe-uefi/module-setup.sh + rename modules.d/{95fcoe => 95fcoe-uefi}/parse-uefifcoe.sh (100%) + +diff --git a/modules.d/95fcoe-uefi/module-setup.sh b/modules.d/95fcoe-uefi/module-setup.sh +new file mode 100755 +index 00000000..007aa59a +--- /dev/null ++++ b/modules.d/95fcoe-uefi/module-setup.sh +@@ -0,0 +1,22 @@ ++#!/bin/bash ++# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- ++# ex: ts=8 sw=4 sts=4 et filetype=sh ++ ++# called by dracut ++check() { ++ [[ $hostonly ]] || [[ $mount_needs ]] && return 1 ++ ++ return 0 ++} ++ ++# called by dracut ++depends() { ++ echo fcoe bash ++ return 0 ++} ++ ++# called by dracut ++install() { ++ inst_hook cmdline 20 "$moddir/parse-uefifcoe.sh" ++} ++ +diff --git a/modules.d/95fcoe/parse-uefifcoe.sh b/modules.d/95fcoe-uefi/parse-uefifcoe.sh +similarity index 100% +rename from modules.d/95fcoe/parse-uefifcoe.sh +rename to modules.d/95fcoe-uefi/parse-uefifcoe.sh +diff --git a/modules.d/95fcoe/module-setup.sh b/modules.d/95fcoe/module-setup.sh +index 08ba4eac..d3c58cc6 100755 +--- a/modules.d/95fcoe/module-setup.sh ++++ b/modules.d/95fcoe/module-setup.sh +@@ -32,7 +32,6 @@ install() { + inst "$moddir/fcoe-up.sh" "/sbin/fcoe-up" + inst "$moddir/fcoe-edd.sh" "/sbin/fcoe-edd" + inst "$moddir/fcoe-genrules.sh" "/sbin/fcoe-genrules.sh" +- inst_hook cmdline 20 "$moddir/parse-uefifcoe.sh" + inst_hook cmdline 99 "$moddir/parse-fcoe.sh" + dracut_need_initqueue + } diff --git a/SOURCES/0112-move-uefi-lib-to-a-seperate-module.patch b/SOURCES/0112-move-uefi-lib-to-a-seperate-module.patch new file mode 100644 index 0000000..e711792 --- /dev/null +++ b/SOURCES/0112-move-uefi-lib-to-a-seperate-module.patch @@ -0,0 +1,92 @@ +From c26eb3eb3ace56e336817d007da039c058cf330f Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 12 Dec 2013 09:49:06 +0100 +Subject: [PATCH] move uefi-lib to a seperate module + +--- + modules.d/95fcoe-uefi/module-setup.sh | 4 +--- + modules.d/95fcoe/module-setup.sh | 5 ----- + modules.d/99base/module-setup.sh | 1 - + modules.d/99uefi-lib/module-setup.sh | 19 +++++++++++++++++++ + modules.d/{99base => 99uefi-lib}/uefi-lib.sh | 0 + 5 files changed, 20 insertions(+), 9 deletions(-) + create mode 100755 modules.d/99uefi-lib/module-setup.sh + rename modules.d/{99base => 99uefi-lib}/uefi-lib.sh (100%) + +diff --git a/modules.d/95fcoe-uefi/module-setup.sh b/modules.d/95fcoe-uefi/module-setup.sh +index 007aa59a..653d88eb 100755 +--- a/modules.d/95fcoe-uefi/module-setup.sh ++++ b/modules.d/95fcoe-uefi/module-setup.sh +@@ -4,14 +4,12 @@ + + # called by dracut + check() { +- [[ $hostonly ]] || [[ $mount_needs ]] && return 1 +- + return 0 + } + + # called by dracut + depends() { +- echo fcoe bash ++ echo fcoe uefi-lib + return 0 + } + +diff --git a/modules.d/95fcoe/module-setup.sh b/modules.d/95fcoe/module-setup.sh +index d3c58cc6..fe8e40aa 100755 +--- a/modules.d/95fcoe/module-setup.sh ++++ b/modules.d/95fcoe/module-setup.sh +@@ -3,11 +3,6 @@ + # ex: ts=8 sw=4 sts=4 et filetype=sh + + check() { +- # FIXME +- # If hostonly was requested, fail the check until we have some way of +- # knowing we are booting from FCoE +- [[ $hostonly ]] || [[ $mount_needs ]] && return 1 +- + for i in dcbtool fipvlan lldpad ip readlink; do + type -P $i >/dev/null || return 1 + done +diff --git a/modules.d/99base/module-setup.sh b/modules.d/99base/module-setup.sh +index d33a0fb4..52ce4004 100755 +--- a/modules.d/99base/module-setup.sh ++++ b/modules.d/99base/module-setup.sh +@@ -42,7 +42,6 @@ install() { + mkdir -p ${initdir}/tmp + + inst_simple "$moddir/dracut-lib.sh" "/lib/dracut-lib.sh" +- inst_simple "$moddir/uefi-lib.sh" "/lib/uefi-lib.sh" + + if ! dracut_module_included "systemd"; then + inst_multiple switch_root || dfatal "Failed to install switch_root" +diff --git a/modules.d/99uefi-lib/module-setup.sh b/modules.d/99uefi-lib/module-setup.sh +new file mode 100755 +index 00000000..4a856eaa +--- /dev/null ++++ b/modules.d/99uefi-lib/module-setup.sh +@@ -0,0 +1,19 @@ ++#!/bin/bash ++# module-setup for img-lib ++ ++# called by dracut ++check() { ++ return 255 ++} ++ ++# called by dracut ++depends() { ++ echo bash ++ return 0 ++} ++ ++# called by dracut ++install() { ++ inst_simple "$moddir/uefi-lib.sh" "/lib/uefi-lib.sh" ++} ++ +diff --git a/modules.d/99base/uefi-lib.sh b/modules.d/99uefi-lib/uefi-lib.sh +similarity index 100% +rename from modules.d/99base/uefi-lib.sh +rename to modules.d/99uefi-lib/uefi-lib.sh diff --git a/SOURCES/0113-dracut.spec-add-95fcoe-uefi-and-99uefi-lib.patch b/SOURCES/0113-dracut.spec-add-95fcoe-uefi-and-99uefi-lib.patch new file mode 100644 index 0000000..b36d2fc --- /dev/null +++ b/SOURCES/0113-dracut.spec-add-95fcoe-uefi-and-99uefi-lib.patch @@ -0,0 +1,22 @@ +From 3bb36e45126e6c1d92b2cbe9b6f54261475ecdff Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Mon, 16 Dec 2013 12:30:26 +0100 +Subject: [PATCH] dracut.spec: add 95fcoe-uefi and 99uefi-lib + +--- + dracut.spec | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/dracut.spec b/dracut.spec +index d6f1a884..302cfc5d 100644 +--- a/dracut.spec ++++ b/dracut.spec +@@ -413,6 +413,8 @@ rm -rf -- $RPM_BUILD_ROOT + %{dracutlibdir}/modules.d/95ssh-client + %{dracutlibdir}/modules.d/45ifcfg + %{dracutlibdir}/modules.d/95znet ++%{dracutlibdir}/modules.d/95fcoe-uefi ++%{dracutlibdir}/modules.d/99uefi-lib + + %if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version} + %files fips diff --git a/SOURCES/0114-fcoe-uefi-do-not-include-if-fcoe-utils-not-installed.patch b/SOURCES/0114-fcoe-uefi-do-not-include-if-fcoe-utils-not-installed.patch new file mode 100644 index 0000000..4ca08ab --- /dev/null +++ b/SOURCES/0114-fcoe-uefi-do-not-include-if-fcoe-utils-not-installed.patch @@ -0,0 +1,28 @@ +From d802e985aed9dbe48f7b9165f3eddd0be7d47c27 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 7 Jan 2014 14:34:55 +0100 +Subject: [PATCH] fcoe-uefi: do not include, if fcoe utils not installed + +--- + modules.d/95fcoe-uefi/module-setup.sh | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/modules.d/95fcoe-uefi/module-setup.sh b/modules.d/95fcoe-uefi/module-setup.sh +index 653d88eb..c91f7754 100755 +--- a/modules.d/95fcoe-uefi/module-setup.sh ++++ b/modules.d/95fcoe-uefi/module-setup.sh +@@ -4,6 +4,9 @@ + + # called by dracut + check() { ++ for i in dcbtool fipvlan lldpad ip readlink; do ++ type -P $i >/dev/null || return 1 ++ done + return 0 + } + +@@ -17,4 +20,3 @@ depends() { + install() { + inst_hook cmdline 20 "$moddir/parse-uefifcoe.sh" + } +- diff --git a/SOURCES/0115-network-fix-dns-parsing-in-ip-parameter.patch b/SOURCES/0115-network-fix-dns-parsing-in-ip-parameter.patch new file mode 100644 index 0000000..0c172e6 --- /dev/null +++ b/SOURCES/0115-network-fix-dns-parsing-in-ip-parameter.patch @@ -0,0 +1,22 @@ +From 36d3274050935419c90fd0c0ba71ec26bf4a1b4c Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 7 Feb 2014 15:41:50 +0100 +Subject: [PATCH] network:fix dns parsing in ip= parameter + +--- + modules.d/40network/net-lib.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index 1b51c856..8948a476 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -353,7 +353,7 @@ ip_to_var() { + [ -n "$5" ] && hostname=$5; [ -n "$6" ] && dev=$6; [ -n "$7" ] && autoconf=$7; + case "$8" in + [0-9]*:*|[0-9]*.[0-9]*.[0-9]*.[0-9]*) +- dns1="$mtu"; unset $mtu ++ dns1="$8" + [ -n "$9" ] && dns2="$9" + ;; + [0-9]*) diff --git a/SOURCES/0116-skipcpio-return-something-at-end-of-program.patch b/SOURCES/0116-skipcpio-return-something-at-end-of-program.patch new file mode 100644 index 0000000..5b2ce5a --- /dev/null +++ b/SOURCES/0116-skipcpio-return-something-at-end-of-program.patch @@ -0,0 +1,22 @@ +From dc662386dc22b049c311e49c859c05a15647c4fa Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= <crrodriguez@opensuse.org> +Date: Tue, 28 Jan 2014 16:41:08 -0300 +Subject: [PATCH] skipcpio: return something at end of program + +Otherwise the compiler emits a warning and the return vale is +in theory undefined. +--- + skipcpio/skipcpio.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/skipcpio/skipcpio.c b/skipcpio/skipcpio.c +index fbf391bf..c9120617 100644 +--- a/skipcpio/skipcpio.c ++++ b/skipcpio/skipcpio.c +@@ -120,4 +120,6 @@ int main(int argc, char **argv) + break; + } + fclose(f); ++ ++ return EXIT_SUCCESS; + } diff --git a/SOURCES/0117-skipcpio-fixed-signatured-check.patch b/SOURCES/0117-skipcpio-fixed-signatured-check.patch new file mode 100644 index 0000000..82273be --- /dev/null +++ b/SOURCES/0117-skipcpio-fixed-signatured-check.patch @@ -0,0 +1,22 @@ +From 226004e007314a0fbb340aec0d5cf0db418a7d5c Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 29 Jan 2014 08:35:47 +0100 +Subject: [PATCH] skipcpio: fixed signatured check + +--- + skipcpio/skipcpio.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/skipcpio/skipcpio.c b/skipcpio/skipcpio.c +index c9120617..ac0578ea 100644 +--- a/skipcpio/skipcpio.c ++++ b/skipcpio/skipcpio.c +@@ -64,7 +64,7 @@ int main(int argc, char **argv) + + /* check, if this is a cpio archive */ + if ((buf[0] == 0x71 && buf[1] == 0xc7) +- || (buf[0] == '0' && buf[1] == '7' && buf[0] == '0' && buf[1] == '7' && buf[0] == '0' && buf[1] == '1')) { ++ || (buf[0] == '0' && buf[1] == '7' && buf[2] == '0' && buf[3] == '7' && buf[4] == '0' && buf[5] == '1')) { + + /* Search for CPIO_END */ + do { diff --git a/SOURCES/0118-network-ifup-do-not-ifup-an-already-setup-network-in.patch b/SOURCES/0118-network-ifup-do-not-ifup-an-already-setup-network-in.patch new file mode 100644 index 0000000..3d738ce --- /dev/null +++ b/SOURCES/0118-network-ifup-do-not-ifup-an-already-setup-network-in.patch @@ -0,0 +1,26 @@ +From 0c0ca2d9bce27b3005b9893a699ea325b0161c00 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 4 Feb 2014 12:02:05 +0100 +Subject: [PATCH] network/ifup: do not ifup an already setup network interface + +--- + modules.d/40network/ifup.sh | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index b33981b2..3a03d052 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -80,7 +80,11 @@ fi + # in netroot case we prefer netroot to bringup $netif automaticlly + [ -n "$2" -a "$2" = "-m" ] && [ -z "$netroot" ] && manualup="$2" + [ -z "$netroot" ] && [ -z "$manualup" ] && exit 0 +-[ -n "$manualup" ] && >/tmp/net.$netif.manualup ++if [ -n "$manualup" ]; then ++ >/tmp/net.$netif.manualup ++else ++ [ -f /tmp/net.${iface}.did-setup ] && exit 0 ++fi + + # Run dhclient + do_dhcp() { diff --git a/SOURCES/0119-network-ifup-do-not-run-dhclient-twice-on-the-same-i.patch b/SOURCES/0119-network-ifup-do-not-run-dhclient-twice-on-the-same-i.patch new file mode 100644 index 0000000..7bf032a --- /dev/null +++ b/SOURCES/0119-network-ifup-do-not-run-dhclient-twice-on-the-same-i.patch @@ -0,0 +1,23 @@ +From 054447fa23017df5a1774ce30082cb383be97cfa Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 4 Feb 2014 12:02:34 +0100 +Subject: [PATCH] network/ifup: do not run dhclient twice on the same interface + +--- + modules.d/40network/ifup.sh | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index 3a03d052..33ec81d1 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -91,6 +91,9 @@ do_dhcp() { + # dhclient-script will mark the netif up and generate the online + # event for nfsroot + # XXX add -V vendor class and option parsing per kernel ++ ++ [ -e /tmp/dhclient.$netif.pid ] && return 0 ++ + if ! iface_has_link $netif; then + echo "No carrier detected" + return 1 diff --git a/SOURCES/0120-nfs-nfsroot-symlink-dev-null-to-dev-nfs-as-a-marker-.patch b/SOURCES/0120-nfs-nfsroot-symlink-dev-null-to-dev-nfs-as-a-marker-.patch new file mode 100644 index 0000000..2972fff --- /dev/null +++ b/SOURCES/0120-nfs-nfsroot-symlink-dev-null-to-dev-nfs-as-a-marker-.patch @@ -0,0 +1,23 @@ +From 37a09c9cb6f22309820dd7a9ab26ea99bb7af72d Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 5 Feb 2014 13:06:29 +0100 +Subject: [PATCH] nfs/nfsroot: symlink /dev/null to /dev/nfs, as a marker for + root=/dev/nfs + +--- + modules.d/95nfs/nfsroot.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/95nfs/nfsroot.sh b/modules.d/95nfs/nfsroot.sh +index f04159e3..d0719efe 100755 +--- a/modules.d/95nfs/nfsroot.sh ++++ b/modules.d/95nfs/nfsroot.sh +@@ -16,7 +16,7 @@ NEWROOT="$3" + nfs_to_var $root $netif + [ -z "$server" ] && die "Required parameter 'server' is missing" + +-mount_nfs $root $NEWROOT $netif && { [ -e /dev/root ] || ln -s null /dev/root ; } ++mount_nfs $root $NEWROOT $netif && { [ -e /dev/root ] || ln -s null /dev/root ; [ -e /dev/nfs ] || ln -s null /dev/nfs; } + + [ -f $NEWROOT/etc/fstab ] && cat $NEWROOT/etc/fstab > /dev/null + diff --git a/SOURCES/0121-systemd-dracut-pre-pivot-run-for-dev-nfs-root-and-cl.patch b/SOURCES/0121-systemd-dracut-pre-pivot-run-for-dev-nfs-root-and-cl.patch new file mode 100644 index 0000000..179a873 --- /dev/null +++ b/SOURCES/0121-systemd-dracut-pre-pivot-run-for-dev-nfs-root-and-cl.patch @@ -0,0 +1,37 @@ +From 80f75fed99eb969e1d8ba9f16e28dec2446a7544 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 5 Feb 2014 13:08:54 +0100 +Subject: [PATCH] systemd/dracut-pre-pivot: run for /dev/{nfs,root} and cleanup + /dev/nfs + +dracut-pre-pivot was not cleaning up /dev/nfs and did not run to clean +up /dev/root. +--- + modules.d/98systemd/dracut-pre-pivot.service | 2 ++ + modules.d/98systemd/dracut-pre-pivot.sh | 1 + + 2 files changed, 3 insertions(+) + +diff --git a/modules.d/98systemd/dracut-pre-pivot.service b/modules.d/98systemd/dracut-pre-pivot.service +index dd4e49b4..6db1f2c0 100644 +--- a/modules.d/98systemd/dracut-pre-pivot.service ++++ b/modules.d/98systemd/dracut-pre-pivot.service +@@ -19,6 +19,8 @@ ConditionDirectoryNotEmpty=|/lib/dracut/hooks/cleanup + ConditionKernelCommandLine=|rd.break=pre-pivot + ConditionKernelCommandLine=|rd.break=cleanup + ConditionKernelCommandLine=|rd.break ++ConditionPathExists=|/dev/root ++ConditionPathExists=|/dev/nfs + + [Service] + Environment=DRACUT_SYSTEMD=1 +diff --git a/modules.d/98systemd/dracut-pre-pivot.sh b/modules.d/98systemd/dracut-pre-pivot.sh +index 8c7554ea..e62a1cec 100755 +--- a/modules.d/98systemd/dracut-pre-pivot.sh ++++ b/modules.d/98systemd/dracut-pre-pivot.sh +@@ -24,5 +24,6 @@ getarg rd.break -d rdbreak && emergency_shell -n switch_root "Break before switc + + # remove helper symlink + [ -h /dev/root ] && rm -f -- /dev/root ++[ -h /dev/nfs ] && rm -f -- /dev/nfs + + exit 0 diff --git a/SOURCES/0122-new_dhcp_next_server-is-really-new_next_server.patch b/SOURCES/0122-new_dhcp_next_server-is-really-new_next_server.patch new file mode 100644 index 0000000..2683500 --- /dev/null +++ b/SOURCES/0122-new_dhcp_next_server-is-really-new_next_server.patch @@ -0,0 +1,25 @@ +From 99ed45c2181819be473ae275bbf88df556cdff1c Mon Sep 17 00:00:00 2001 +From: "Brian C. Lane" <bcl@redhat.com> +Date: Wed, 5 Feb 2014 12:10:39 -0800 +Subject: [PATCH] new_dhcp_next_server is really new_next_server + +The variable that dhclient sets doesn't have dhcp in the name. This +could cause problems with setups where the server is not the same as the +dhcp server. +--- + modules.d/95nfs/nfs-lib.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/95nfs/nfs-lib.sh b/modules.d/95nfs/nfs-lib.sh +index f5fc56d7..9ced2e69 100755 +--- a/modules.d/95nfs/nfs-lib.sh ++++ b/modules.d/95nfs/nfs-lib.sh +@@ -97,7 +97,7 @@ nfsroot_from_dhcp() { + [ -z "$path" ] && [ "$(getarg root=)" == "/dev/nfs" ] && path=/tftpboot/%s + [ -z "$server" ] && server=$srv + [ -z "$server" ] && server=$new_dhcp_server_identifier +- [ -z "$server" ] && server=$new_dhcp_next_server ++ [ -z "$server" ] && server=$new_next_server + [ -z "$server" ] && server=${new_root_path%%:*} + } + diff --git a/SOURCES/0123-dracut.sh-Fix-variable-name-typo.patch b/SOURCES/0123-dracut.sh-Fix-variable-name-typo.patch new file mode 100644 index 0000000..8d78600 --- /dev/null +++ b/SOURCES/0123-dracut.sh-Fix-variable-name-typo.patch @@ -0,0 +1,30 @@ +From 361eaeaf073d4d6f778d54ca4060f6b880e265f2 Mon Sep 17 00:00:00 2001 +From: Colin Guthrie <colin@mageia.org> +Date: Wed, 5 Feb 2014 10:06:51 +0000 +Subject: [PATCH] dracut.sh: Fix variable name typo. + +This caused the root_dev variable not to be set which in turn meant that +the root device was not whitelisted in 99base/module-setup.sh when injecting +compile-time devexists hooks in hostonly initrds. This ties the generated +initrd to the root fs device (typically the UUID) rather than relying solely +only the root= kernel command line. + +While it is hostonly, not hardcoding e.g. UUIDs is still desirable. Any +swap partition on the host device is still added however. +--- + dracut.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dracut.sh b/dracut.sh +index 4e239936..89df9cd8 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -926,7 +926,7 @@ if [[ $hostonly ]]; then + _bdev=$(readlink -f "/dev/block/$_dev") + [[ -b $_bdev ]] && _dev=$_bdev + push host_devs $_dev +- [[ "$_mp" == "/" ]] && root_dev="$_dev" ++ [[ "$mp" == "/" ]] && root_dev="$_dev" + push host_devs "$_dev" + done + diff --git a/SOURCES/0124-kernel-modules-add-sdhci_acpi-to-the-static-list-of-.patch b/SOURCES/0124-kernel-modules-add-sdhci_acpi-to-the-static-list-of-.patch new file mode 100644 index 0000000..4212601 --- /dev/null +++ b/SOURCES/0124-kernel-modules-add-sdhci_acpi-to-the-static-list-of-.patch @@ -0,0 +1,27 @@ +From 9bbea8caf83fac26c800e154b5b72b0333b23e1b Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 12 Feb 2014 11:22:14 +0100 +Subject: [PATCH] kernel-modules: add sdhci_acpi to the static list of kernel + modules + +Thanks Adam Williamson! + +https://bugzilla.redhat.com/show_bug.cgi?id=1063556 +--- + modules.d/90kernel-modules/module-setup.sh | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh +index f4db6aa8..a7803d00 100755 +--- a/modules.d/90kernel-modules/module-setup.sh ++++ b/modules.d/90kernel-modules/module-setup.sh +@@ -45,7 +45,8 @@ installkernel() { + instmods yenta_socket scsi_dh_rdac scsi_dh_emc \ + atkbd i8042 usbhid hid-apple hid-sunplus hid-cherry hid-logitech \ + hid-logitech-dj hid-microsoft firewire-ohci \ +- pcmcia usb_storage nvme hid-hyperv hv-vmbus ++ pcmcia usb_storage nvme hid-hyperv hv-vmbus \ ++ sdhci_acpi + + if [[ "$(uname -p)" == arm* ]]; then + # arm specific modules diff --git a/SOURCES/0125-dracut-functions.sh-find_kernel_modules_by_path-fixe.patch b/SOURCES/0125-dracut-functions.sh-find_kernel_modules_by_path-fixe.patch new file mode 100644 index 0000000..e0d3b49 --- /dev/null +++ b/SOURCES/0125-dracut-functions.sh-find_kernel_modules_by_path-fixe.patch @@ -0,0 +1,24 @@ +From 64c88c2f1d9576afc8b22a9d0c0feea5b51dfb64 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Mon, 17 Feb 2014 13:27:46 +0100 +Subject: [PATCH] dracut-functions.sh:find_kernel_modules_by_path() fixed + updates search + +"updates/*" path does not start with "/" +--- + dracut-functions.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dracut-functions.sh b/dracut-functions.sh +index 96a20d52..bddcdcf2 100755 +--- a/dracut-functions.sh ++++ b/dracut-functions.sh +@@ -1530,7 +1530,7 @@ find_kernel_modules_by_path () { + _OLDIFS=$IFS + IFS=: + while read a rest; do +- [[ $a = */$1/* ]] || [[ $a = */updates/* ]] || continue ++ [[ $a = */$1/* ]] || [[ $a = updates/* ]] || continue + printf "%s\n" "$srcmods/$a" + done < "$srcmods/modules.dep" + IFS=$_OLDIFS diff --git a/SOURCES/0126-iscsi-for-iBFT-read-the-initiator-name-from-the-corr.patch b/SOURCES/0126-iscsi-for-iBFT-read-the-initiator-name-from-the-corr.patch new file mode 100644 index 0000000..3ff74e1 --- /dev/null +++ b/SOURCES/0126-iscsi-for-iBFT-read-the-initiator-name-from-the-corr.patch @@ -0,0 +1,26 @@ +From 84dfea4d2a9660c7cecfafb6955d075306da2bcb Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 19 Feb 2014 11:49:34 +0100 +Subject: [PATCH] iscsi: for iBFT read the initiator-name from the correct file + +/sys/firmware/ibft/initiator-name should be +/sys/firmware/ibft/initiator/initiator-name + +https://github.com/haraldh/dracut/issues/12 +--- + modules.d/95iscsi/iscsiroot.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh +index 8b743323..54f49903 100755 +--- a/modules.d/95iscsi/iscsiroot.sh ++++ b/modules.d/95iscsi/iscsiroot.sh +@@ -125,7 +125,7 @@ handle_netroot() + + if [ -z $iscsi_initiator ]; then + if [ -f /sys/firmware/ibft/initiator/initiator-name ]; then +- iscsi_initiator=$(while read line; do echo $line;done < /sys/firmware/ibft/initiator-name) ++ iscsi_initiator=$(while read line; do echo $line;done < /sys/firmware/ibft/initiator/initiator-name) + fi + fi + diff --git a/SOURCES/0127-fcoe-uefi-try-all-FcoeBootDevice-variables-for-a-Dev.patch b/SOURCES/0127-fcoe-uefi-try-all-FcoeBootDevice-variables-for-a-Dev.patch new file mode 100644 index 0000000..5c9caac --- /dev/null +++ b/SOURCES/0127-fcoe-uefi-try-all-FcoeBootDevice-variables-for-a-Dev.patch @@ -0,0 +1,45 @@ +From 346fab9500e8da9f5f48fb07248bbd2fb6348968 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 19 Feb 2014 15:20:34 +0100 +Subject: [PATCH] fcoe-uefi: try all FcoeBootDevice-* variables for a + DevicePath + +try to read the DevicePath from all FcoeBootDevice-* UEFI variables +until one has a MAC. +--- + modules.d/95fcoe-uefi/parse-uefifcoe.sh | 15 ++++++++------- + 1 file changed, 8 insertions(+), 7 deletions(-) + +diff --git a/modules.d/95fcoe-uefi/parse-uefifcoe.sh b/modules.d/95fcoe-uefi/parse-uefifcoe.sh +index e03bcb39..0799cdd6 100755 +--- a/modules.d/95fcoe-uefi/parse-uefifcoe.sh ++++ b/modules.d/95fcoe-uefi/parse-uefifcoe.sh +@@ -9,10 +9,10 @@ command -v set_ifname >/dev/null || . /lib/net-lib.sh + print_fcoe_uefi_conf() + { + local mac dev vlan +- mac=$(get_fcoe_boot_mac) +- [ -z "$mac" ] && continue ++ mac=$(get_fcoe_boot_mac "$1") ++ [ -z "$mac" ] && return 1 + dev=$(set_ifname fcoe $mac) +- vlan=$(get_fcoe_boot_vlan) ++ vlan=$(get_fcoe_boot_vlan "$1") + if [ "$vlan" -ne "0" ]; then + case "$vlan" in + [0-9]*) +@@ -27,9 +27,10 @@ print_fcoe_uefi_conf() + fi + # fcoe=eth0:nodcb + printf "%s\n" "$dev:nodcb" ++ return 0 + } + +- +-if [ -e /sys/firmware/efi/vars/FcoeBootDevice-a0ebca23-5f9c-447a-a268-22b6c158c2ac/data ]; then +- print_fcoe_uefi_conf > /etc/cmdline.d/40-fcoe-uefi.conf +-fi ++for i in /sys/firmware/efi/vars/FcoeBootDevice-*/data; do ++ [ -e "$i" ] || continue ++ print_fcoe_uefi_conf $i > /etc/cmdline.d/40-fcoe-uefi.conf && break ++done diff --git a/SOURCES/0128-dracut.sh-write-directly-to-the-output-file.patch b/SOURCES/0128-dracut.sh-write-directly-to-the-output-file.patch new file mode 100644 index 0000000..61e7cee --- /dev/null +++ b/SOURCES/0128-dracut.sh-write-directly-to-the-output-file.patch @@ -0,0 +1,42 @@ +From 6381b9445980aae6c8533fe74603c902a9125fc5 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 19 Feb 2014 15:22:39 +0100 +Subject: [PATCH] dracut.sh: write directly to the output file + +Because we already remove the output file before writing to it, we don't +have to play games and write to a temporary file first. +--- + dracut.sh | 9 +++------ + 1 file changed, 3 insertions(+), 6 deletions(-) + +diff --git a/dracut.sh b/dracut.sh +index 89df9cd8..c4bf4ebc 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -729,7 +729,6 @@ fi + # clean up after ourselves no matter how we die. + trap ' + ret=$?; +- [[ $outfile ]] && [[ -f $outfile.$$ ]] && rm -f -- "$outfile.$$"; + [[ $keep ]] && echo "Not removing $initdir." >&2 || { [[ $initdir ]] && rm -rf -- "$initdir"; }; + [[ $keep ]] && echo "Not removing $early_cpio_dir." >&2 || { [[ $early_cpio_dir ]] && rm -Rf -- "$early_cpio_dir"; }; + [[ $_dlogdir ]] && rm -Rf -- "$_dlogdir"; +@@ -1383,15 +1382,13 @@ dinfo "*** Creating image file ***" + if [[ $create_early_cpio = yes ]]; then + echo 1 > "$early_cpio_dir/d/early_cpio" + # The microcode blob is _before_ the initramfs blob, not after +- (cd "$early_cpio_dir/d"; find . -print0 | cpio --null $cpio_owner_root -H newc -o --quiet >../early.cpio) +- mv $early_cpio_dir/early.cpio $outfile.$$ ++ (cd "$early_cpio_dir/d"; find . -print0 | cpio --null $cpio_owner_root -H newc -o --quiet > $outfile) + fi + if ! ( umask 077; cd "$initdir"; find . -print0 | cpio --null $cpio_owner_root -H newc -o --quiet | \ +- $compress >> "$outfile.$$"; ); then +- dfatal "dracut: creation of $outfile.$$ failed" ++ $compress >> "$outfile"; ); then ++ dfatal "dracut: creation of $outfile failed" + exit 1 + fi +-mv -- "$outfile.$$" "$outfile" + dinfo "*** Creating image file done ***" + + if (( maxloglvl >= 5 )); then diff --git a/SOURCES/0129-systemd-add-sys-kernel-config.mount.patch b/SOURCES/0129-systemd-add-sys-kernel-config.mount.patch new file mode 100644 index 0000000..e80334c --- /dev/null +++ b/SOURCES/0129-systemd-add-sys-kernel-config.mount.patch @@ -0,0 +1,31 @@ +From a367bed83602ce482132f36dfb6047261fb930db Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 5 Feb 2014 13:58:33 +0100 +Subject: [PATCH] systemd: add sys-kernel-config.mount + +--- + modules.d/98systemd/module-setup.sh | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh +index 91a6559d..5081a5ab 100755 +--- a/modules.d/98systemd/module-setup.sh ++++ b/modules.d/98systemd/module-setup.sh +@@ -41,6 +41,7 @@ install() { + $systemdutildir/systemd-modules-load \ + $systemdutildir/systemd-vconsole-setup \ + $systemdutildir/system-generators/systemd-fstab-generator \ ++ \ + $systemdsystemunitdir/cryptsetup.target \ + $systemdsystemunitdir/emergency.target \ + $systemdsystemunitdir/sysinit.target \ +@@ -69,6 +70,9 @@ install() { + $systemdsystemunitdir/timers.target \ + $systemdsystemunitdir/paths.target \ + $systemdsystemunitdir/umount.target \ ++ \ ++ $systemdsystemunitdir/sys-kernel-config.mount \ ++ \ + $systemdsystemunitdir/kmod-static-nodes.service \ + $systemdsystemunitdir/systemd-tmpfiles-setup-dev.service \ + $systemdsystemunitdir/systemd-ask-password-console.path \ diff --git a/SOURCES/0130-systemd-add-70-uaccess.rules.patch b/SOURCES/0130-systemd-add-70-uaccess.rules.patch new file mode 100644 index 0000000..63d34a7 --- /dev/null +++ b/SOURCES/0130-systemd-add-70-uaccess.rules.patch @@ -0,0 +1,22 @@ +From da41507de95445d776787da82a2476837ebc9305 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 25 Feb 2014 12:33:30 +0100 +Subject: [PATCH] systemd: add 70-uaccess.rules + +--- + modules.d/98systemd/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh +index 5081a5ab..429781b2 100755 +--- a/modules.d/98systemd/module-setup.sh ++++ b/modules.d/98systemd/module-setup.sh +@@ -191,7 +191,7 @@ install() { + inst_binary true + ln_r $(type -P true) "/usr/bin/loginctl" + ln_r $(type -P true) "/bin/loginctl" +- inst_rules 71-seat.rules 73-seat-late.rules 99-systemd.rules ++ inst_rules 70-uaccess.rules 71-seat.rules 73-seat-late.rules 99-systemd.rules + + for i in \ + emergency.target \ diff --git a/SOURCES/0131-Add-flag-to-toggle-hostonly-cmdline-storing-in-the-i.patch b/SOURCES/0131-Add-flag-to-toggle-hostonly-cmdline-storing-in-the-i.patch new file mode 100644 index 0000000..fd6f795 --- /dev/null +++ b/SOURCES/0131-Add-flag-to-toggle-hostonly-cmdline-storing-in-the-i.patch @@ -0,0 +1,250 @@ +From 81c9e224820fa284806690fc64ac39c58e8760a3 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 25 Feb 2014 12:35:32 +0100 +Subject: [PATCH] Add flag to toggle hostonly cmdline storing in the initramfs + +--hostonly-cmdline: + Store kernel command line arguments needed in the initramfs + +--no-hostonly-cmdline: + Do not store kernel command line arguments needed in the initramfs +--- + dracut.8.asc | 6 +++++ + dracut.conf.5.asc | 3 +++ + dracut.sh | 27 ++++++++++++++++----- + modules.d/90crypt/module-setup.sh | 6 +++-- + modules.d/90dmraid/module-setup.sh | 6 +++-- + modules.d/90lvm/module-setup.sh | 6 +++-- + modules.d/90mdraid/module-setup.sh | 6 +++-- + modules.d/95rootfs-block/module-setup.sh | 31 +++++++++++++++--------- + 8 files changed, 66 insertions(+), 25 deletions(-) + +diff --git a/dracut.8.asc b/dracut.8.asc +index b2946753..ba125c0d 100644 +--- a/dracut.8.asc ++++ b/dracut.8.asc +@@ -294,6 +294,12 @@ provide a valid _/etc/fstab_. + **-N, --no-hostonly**:: + Disable Host-Only mode + ++**--hostonly-cmdline**: ++ Store kernel command line arguments needed in the initramfs ++ ++**--no-hostonly-cmdline**: ++ Do not store kernel command line arguments needed in the initramfs ++ + **--persistent-policy** _<policy>_:: + Use _<policy>_ to address disks and partitions. + _<policy>_ can be any directory name found in /dev/disk. +diff --git a/dracut.conf.5.asc b/dracut.conf.5.asc +index 5c941188..be62da98 100644 +--- a/dracut.conf.5.asc ++++ b/dracut.conf.5.asc +@@ -76,6 +76,9 @@ Configuration files must have the extension .conf; other extensions are ignored. + Host-Only mode: Install only what is needed for booting the local host + instead of a generic host and generate host-specific configuration. + ++*hostonly_cmdline*"__{yes|no}__":: ++ If set, store the kernel command line arguments needed in the initramfs ++ + *persistent_policy=*"__<policy>__":: + Use _<policy>_ to address disks and partitions. + _<policy>_ can be any directory name found in /dev/disk. +diff --git a/dracut.sh b/dracut.sh +index c4bf4ebc..1c5e6889 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -136,6 +136,10 @@ Creates initial ramdisk images for preloading modules + -H, --hostonly Host-Only mode: Install only what is needed for + booting the local host instead of a generic host. + -N, --no-hostonly Disables Host-Only mode ++ --hostonly-cmdline Store kernel command line arguments needed ++ in the initramfs ++ --no-hostonly-cmdline Do not store kernel command line arguments needed ++ in the initramfs + --persistent-policy [POLICY] + Use [POLICY] to address disks and partitions. + POLICY can be any directory name found in /dev/disk. +@@ -376,7 +380,8 @@ while :; do + -a|--add) push add_dracutmodules_l "$2"; shift;; + --force-add) push force_add_dracutmodules_l "$2"; shift;; + --add-drivers) push add_drivers_l "$2"; shift;; +- --omit-drivers) push omit_drivers_l "$2"; shift;; ++ --omit-drivers) ++ push omit_drivers_l "$2"; shift;; + -m|--modules) push dracutmodules_l "$2"; shift;; + -o|--omit) push omit_dracutmodules_l "$2"; shift;; + -d|--drivers) push drivers_l "$2"; shift;; +@@ -389,7 +394,8 @@ while :; do + --mount) push fstab_lines "$2"; shift;; + --add-device|--device) + push add_device_l "$2"; shift;; +- --kernel-cmdline) push kernel_cmdline_l "$2"; shift;; ++ --kernel-cmdline) ++ push kernel_cmdline_l "$2"; shift;; + --nofscks) nofscks_l="yes";; + --ro-mnt) ro_mnt_l="yes";; + -k|--kmoddir) drivers_dir_l="$2"; shift;; +@@ -402,9 +408,12 @@ while :; do + -f|--force) force=yes;; + --kernel-only) kernel_only="yes"; no_kernel="no";; + --no-kernel) kernel_only="no"; no_kernel="yes";; +- --print-cmdline) print_cmdline="yes"; hostonly_l="yes"; kernel_only="yes"; no_kernel="yes";; +- --early-microcode) early_microcode_l="yes";; +- --no-early-microcode) early_microcode_l="no";; ++ --print-cmdline) ++ print_cmdline="yes"; hostonly_l="yes"; kernel_only="yes"; no_kernel="yes";; ++ --early-microcode) ++ early_microcode_l="yes";; ++ --no-early-microcode) ++ early_microcode_l="no";; + --strip) do_strip_l="yes";; + --nostrip) do_strip_l="no";; + --prelink) do_prelink_l="yes";; +@@ -430,11 +439,16 @@ while :; do + hostonly_l="yes" ;; + -N|--no-hostonly|--no-host-only) + hostonly_l="no" ;; ++ --hostonly-cmdline) ++ hostonly_cmdline_l="yes" ;; ++ --no-hostonly-cmdline) ++ hostonly_cmdline_l="no" ;; + --persistent-policy) + persistent_policy_l="$2"; shift;; + --fstab) use_fstab_l="yes" ;; + -h|--help) long_usage; exit 1 ;; +- -i|--include) push include_src "$2" ++ -i|--include) ++ push include_src "$2" + shift;; + --bzip2) compress_l="bzip2";; + --lzma) compress_l="lzma";; +@@ -677,6 +691,7 @@ stdloglvl=$((stdloglvl + verbosity_mod_l)) + [[ $prefix_l ]] && prefix=$prefix_l + [[ $prefix = "/" ]] && unset prefix + [[ $hostonly_l ]] && hostonly=$hostonly_l ++[[ $hostonly_cmdline_l ]] && hostonly_cmdline=$hostonly_cmdline_l + [[ $persistent_policy_l ]] && persistent_policy=$persistent_policy_l + [[ $use_fstab_l ]] && use_fstab=$use_fstab_l + [[ $mdadmconf_l ]] && mdadmconf=$mdadmconf_l +diff --git a/modules.d/90crypt/module-setup.sh b/modules.d/90crypt/module-setup.sh +index 18583915..267d39d5 100755 +--- a/modules.d/90crypt/module-setup.sh ++++ b/modules.d/90crypt/module-setup.sh +@@ -46,8 +46,10 @@ cmdline() { + + install() { + +- cmdline >> "${initdir}/etc/cmdline.d/90crypt.conf" +- echo >> "${initdir}/etc/cmdline.d/90crypt.conf" ++ if [[ $hostonly_cmdline == "yes" ]]; then ++ cmdline >> "${initdir}/etc/cmdline.d/90crypt.conf" ++ echo >> "${initdir}/etc/cmdline.d/90crypt.conf" ++ fi + + inst_multiple cryptsetup rmdir readlink umount + inst_script "$moddir"/cryptroot-ask.sh /sbin/cryptroot-ask +diff --git a/modules.d/90dmraid/module-setup.sh b/modules.d/90dmraid/module-setup.sh +index 11181cf5..b230cb0e 100755 +--- a/modules.d/90dmraid/module-setup.sh ++++ b/modules.d/90dmraid/module-setup.sh +@@ -61,8 +61,10 @@ cmdline() { + install() { + local _i + +- cmdline >> "${initdir}/etc/cmdline.d/90dmraid.conf" +- echo >> "${initdir}/etc/cmdline.d/90dmraid.conf" ++ if [[ $hostonly_cmdline == "yes" ]]; then ++ cmdline >> "${initdir}/etc/cmdline.d/90dmraid.conf" ++ echo >> "${initdir}/etc/cmdline.d/90dmraid.conf" ++ fi + + inst_multiple dmraid + inst_multiple -o kpartx +diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh +index f0c9b964..1c962d54 100755 +--- a/modules.d/90lvm/module-setup.sh ++++ b/modules.d/90lvm/module-setup.sh +@@ -48,8 +48,10 @@ install() { + + inst lvm + +- cmdline >> "${initdir}/etc/cmdline.d/90lvm.conf" +- echo >> "${initdir}/etc/cmdline.d/90lvm.conf" ++ if [[ $hostonly_cmdline == "yes" ]]; then ++ cmdline >> "${initdir}/etc/cmdline.d/90lvm.conf" ++ echo >> "${initdir}/etc/cmdline.d/90lvm.conf" ++ fi + + inst_rules "$moddir/64-lvm.rules" + +diff --git a/modules.d/90mdraid/module-setup.sh b/modules.d/90mdraid/module-setup.sh +index 34aae1e3..1e03847f 100755 +--- a/modules.d/90mdraid/module-setup.sh ++++ b/modules.d/90mdraid/module-setup.sh +@@ -65,8 +65,10 @@ install() { + inst $(command -v partx) /sbin/partx + inst $(command -v mdadm) /sbin/mdadm + +- cmdline >> "${initdir}/etc/cmdline.d/90mdraid.conf" +- echo >> "${initdir}/etc/cmdline.d/90mdraid.conf" ++ if [[ $hostonly_cmdline == "yes" ]]; then ++ cmdline >> "${initdir}/etc/cmdline.d/90mdraid.conf" ++ echo >> "${initdir}/etc/cmdline.d/90mdraid.conf" ++ fi + + # <mdadm-3.3 udev rule + inst_rules 64-md-raid.rules +diff --git a/modules.d/95rootfs-block/module-setup.sh b/modules.d/95rootfs-block/module-setup.sh +index 7e714eb0..5bb704a4 100755 +--- a/modules.d/95rootfs-block/module-setup.sh ++++ b/modules.d/95rootfs-block/module-setup.sh +@@ -10,17 +10,8 @@ depends() { + echo fs-lib + } + +-cmdline() { +- local dev=/dev/block/$(find_root_block_device) +- if [ -e $dev ]; then +- printf " root=%s" "$(shorten_persistent_dev "$(get_persistent_dev "$dev")")" +- printf " rootflags=%s" "$(find_mp_fsopts /)" +- printf " rootfstype=%s" "$(find_mp_fstype /)" +- fi +-} +- +-install() { + ++cmdline_journal() { + if [[ $hostonly ]]; then + for dev in "${!host_fs_types[@]}"; do + [[ ${host_fs_types[$dev]} = "reiserfs" ]] || [[ ${host_fs_types[$dev]} = "xfs" ]] || continue +@@ -32,10 +23,28 @@ install() { + fi + + if [ -n "$journaldev" ]; then +- printf "%s\n" "root.journaldev=$journaldev" >> "${initdir}/etc/cmdline.d/95root-journaldev.conf" ++ printf " root.journaldev=%s" "$journaldev" + fi + done + fi ++ return 0 ++} ++ ++cmdline() { ++ local dev=/dev/block/$(find_root_block_device) ++ if [ -e $dev ]; then ++ printf " root=%s" "$(shorten_persistent_dev "$(get_persistent_dev "$dev")")" ++ printf " rootflags=%s" "$(find_mp_fsopts /)" ++ printf " rootfstype=%s" "$(find_mp_fstype /)" ++ fi ++ cmdline_journal ++} ++ ++install() { ++ if [[ $hostonly_cmdline == "yes" ]]; then ++ journaldev=$(cmdline_journal) ++ [[ $journaldev ]] && printf "%s\n" "$journaldev" >> "${initdir}/etc/cmdline.d/95root-journaldev.conf" ++ fi + + inst_multiple umount + inst_multiple tr diff --git a/SOURCES/0132-default-conf-set-hostonly_cmdline-no.patch b/SOURCES/0132-default-conf-set-hostonly_cmdline-no.patch new file mode 100644 index 0000000..8ddccec --- /dev/null +++ b/SOURCES/0132-default-conf-set-hostonly_cmdline-no.patch @@ -0,0 +1,19 @@ +From c2c437edbaab1630a9308dc81ffbfe0262f52d64 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 25 Feb 2014 12:34:41 +0100 +Subject: [PATCH] default conf: set hostonly_cmdline == "no" + +--- + dracut.conf.d/fedora.conf.example | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/dracut.conf.d/fedora.conf.example b/dracut.conf.d/fedora.conf.example +index 2364b049..ff4e3b27 100644 +--- a/dracut.conf.d/fedora.conf.example ++++ b/dracut.conf.d/fedora.conf.example +@@ -13,4 +13,5 @@ systemdsystemunitdir=/usr/lib/systemd/system + systemdsystemconfdir=/etc/systemd/system + udevdir=/usr/lib/udev + hostonly="yes" ++hostonly_cmdline="no" + early_microcode="yes" diff --git a/SOURCES/0133-systemd-rootfs-generator.sh-generate-units-in-run-sy.patch b/SOURCES/0133-systemd-rootfs-generator.sh-generate-units-in-run-sy.patch new file mode 100644 index 0000000..536c54a --- /dev/null +++ b/SOURCES/0133-systemd-rootfs-generator.sh-generate-units-in-run-sy.patch @@ -0,0 +1,65 @@ +From 5a3b267d06cc81fcb7e0374c7656a1f48d031497 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 25 Feb 2014 12:54:28 +0100 +Subject: [PATCH] systemd/rootfs-generator.sh: generate units in + /run/systemd/generator + +Generate the units in /run/systemd/generator, so they are picked up by +systemd. + +https://bugzilla.redhat.com/show_bug.cgi?id=1069133 +https://bugzilla.redhat.com/show_bug.cgi?id=949697 +--- + modules.d/98systemd/rootfs-generator.sh | 33 ++++++++++++++++++++++++- + 1 file changed, 32 insertions(+), 1 deletion(-) + +diff --git a/modules.d/98systemd/rootfs-generator.sh b/modules.d/98systemd/rootfs-generator.sh +index 9810026d..a11ce595 100755 +--- a/modules.d/98systemd/rootfs-generator.sh ++++ b/modules.d/98systemd/rootfs-generator.sh +@@ -3,6 +3,37 @@ + # ex: ts=8 sw=4 sts=4 et filetype=sh + + type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh ++ ++generator_wait_for_dev() ++{ ++ local _name ++ ++ _name="$(str_replace "$1" '/' '\x2f')" ++ ++ [ -e "$hookdir/initqueue/finished/devexists-${_name}.sh" ] && return 0 ++ ++ printf '[ -e "%s" ]\n' $1 \ ++ >> "$hookdir/initqueue/finished/devexists-${_name}.sh" ++ { ++ printf '[ -e "%s" ] || ' $1 ++ printf 'warn "\"%s\" does not exist"\n' $1 ++ } >> "$hookdir/emergency/80-${_name}.sh" ++ ++ _name=$(dev_unit_name "$1") ++ if ! [ -L /run/systemd/generator/initrd.target.wants/${_name}.device ]; then ++ [ -d /run/systemd/generator/initrd.target.wants ] || mkdir -p /run/systemd/generator/initrd.target.wants ++ ln -s ../${_name}.device /run/systemd/generator/initrd.target.wants/${_name}.device ++ fi ++ ++ if ! [ -f /run/systemd/generator/${_name}.device.d/timeout.conf ]; then ++ mkdir -p /run/systemd/generator/${_name}.device.d ++ { ++ echo "[Unit]" ++ echo "JobTimeoutSec=3600" ++ } > /run/systemd/generator/${_name}.device.d/timeout.conf ++ fi ++} ++ + root=$(getarg root=) + case "$root" in + block:LABEL=*|LABEL=*) +@@ -29,6 +60,6 @@ case "$root" in + rootok=1 ;; + esac + +-[ "${root%%:*}" = "block" ] && wait_for_dev -n "${root#block:}" ++[ "${root%%:*}" = "block" ] && generator_wait_for_dev "${root#block:}" + + exit 0 diff --git a/SOURCES/0134-ifcfg-write-ifcfg.sh-do-not-bind-s390-to-MAC-if-SUBC.patch b/SOURCES/0134-ifcfg-write-ifcfg.sh-do-not-bind-s390-to-MAC-if-SUBC.patch new file mode 100644 index 0000000..5327ce4 --- /dev/null +++ b/SOURCES/0134-ifcfg-write-ifcfg.sh-do-not-bind-s390-to-MAC-if-SUBC.patch @@ -0,0 +1,54 @@ +From ea6bc75ccbb626c62062bdf2d3ca2a90dbb9467d Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 25 Feb 2014 13:05:11 +0100 +Subject: [PATCH] ifcfg/write-ifcfg.sh: do not bind s390 to MAC if SUBCHANNELS + set + +If SUBCHANNELS are set, do not specify HWADDR, because the SUBCHANNELS +are the identifier for the interface. + +https://bugzilla.redhat.com/show_bug.cgi?id=1056438 +--- + modules.d/45ifcfg/write-ifcfg.sh | 13 ++++++------- + 1 file changed, 6 insertions(+), 7 deletions(-) + +diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh +index dcb2aefa..d9e9f3af 100755 +--- a/modules.d/45ifcfg/write-ifcfg.sh ++++ b/modules.d/45ifcfg/write-ifcfg.sh +@@ -55,9 +55,9 @@ print_s390() { + + SUBCHANNELS=${SUBCHANNELS%,} + echo "SUBCHANNELS=\"${SUBCHANNELS}\"" +- CONFIG_LINE=$(get_config_line_by_subchannel $SUBCHANNELS) + +- [ $? -ne 0 -o -z "$CONFIG_LINE" ] && return ++ CONFIG_LINE=$(get_config_line_by_subchannel $SUBCHANNELS) ++ [ $? -ne 0 -o -z "$CONFIG_LINE" ] && return 0 + + OLD_IFS=$IFS + IFS="," +@@ -77,6 +77,7 @@ print_s390() { + OPTIONS=${OPTIONS## } + echo "NETTYPE=\"${NETTYPE}\"" + echo "OPTIONS=\"${OPTIONS}\"" ++ return 0 + } + + for netup in /tmp/net.*.did-setup ; do +@@ -159,12 +160,10 @@ for netup in /tmp/net.*.did-setup ; do + if [ -z "$bridge" ] && [ -z "$bond" ] && [ -z "$vlan" ]; then + # standard interface + { +- if [ -n "$macaddr" ]; then +- echo "MACADDR=\"$macaddr\"" +- else +- echo "HWADDR=\"$(cat /sys/class/net/$netif/address)\"" ++ [ -n "$macaddr" ] && echo "MACADDR=\"$macaddr\"" ++ if ! print_s390 $netif; then ++ [ -n "$macaddr" ] || echo "HWADDR=\"$(cat /sys/class/net/$netif/address)\"" + fi +- print_s390 $netif + echo "TYPE=Ethernet" + echo "NAME=\"$netif\"" + [ -n "$mtu" ] && echo "MTU=\"$mtu\"" diff --git a/SOURCES/0135-network-net-lib.sh-wait_for_ipv6_auto-also-wait-for-.patch b/SOURCES/0135-network-net-lib.sh-wait_for_ipv6_auto-also-wait-for-.patch new file mode 100644 index 0000000..f80747f --- /dev/null +++ b/SOURCES/0135-network-net-lib.sh-wait_for_ipv6_auto-also-wait-for-.patch @@ -0,0 +1,28 @@ +From 61fe0031683c8e1c36ca6ca3022ef6243bfae268 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 25 Feb 2014 13:31:29 +0100 +Subject: [PATCH] network/net-lib.sh:wait_for_ipv6_auto() also wait for the + tentative flag + +Wait until the tentative flag is cleared. + +https://bugzilla.redhat.com/show_bug.cgi?id=1069263 +--- + modules.d/40network/net-lib.sh | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index 8948a476..4e1b0192 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -456,7 +456,9 @@ wait_for_ipv6_auto() { + local li + while [ $cnt -lt 400 ]; do + li=$(ip -6 addr show dev $1) +- strstr "$li" "dynamic" && return 0 ++ if ! strstr "$li" "tentative"; then ++ strstr "$li" "dynamic" && return 0 ++ fi + sleep 0.1 + cnt=$(($cnt+1)) + done diff --git a/SOURCES/0136-network-dhclient-script.sh-DHCP-IPv6-interface-setup.patch b/SOURCES/0136-network-dhclient-script.sh-DHCP-IPv6-interface-setup.patch new file mode 100644 index 0000000..e7a1daa --- /dev/null +++ b/SOURCES/0136-network-dhclient-script.sh-DHCP-IPv6-interface-setup.patch @@ -0,0 +1,86 @@ +From 54c9094e2e25b13fa90a7fcce574e6e4a52df973 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 25 Feb 2014 14:04:05 +0100 +Subject: [PATCH] network/dhclient-script.sh:DHCP IPv6 interface setup + +configure IPv6 interface for DHCP6 + +https://bugzilla.redhat.com/show_bug.cgi?id=1064365 +--- + modules.d/40network/dhclient-script.sh | 49 ++++++++++++++++++++++++++ + 1 file changed, 49 insertions(+) + +diff --git a/modules.d/40network/dhclient-script.sh b/modules.d/40network/dhclient-script.sh +index 70a2b710..a9c25238 100755 +--- a/modules.d/40network/dhclient-script.sh ++++ b/modules.d/40network/dhclient-script.sh +@@ -48,6 +48,31 @@ setup_interface() { + [ -n "$hostname" ] && echo "echo ${hostname%.$domain}${domain:+.$domain} > /proc/sys/kernel/hostname" > /tmp/net.$netif.hostname + } + ++setup_interface6() { ++ domain=$new_domain_name ++ search=$(printf -- "$new_domain_search") ++ namesrv=$new_domain_name_servers ++ hostname=$new_host_name ++ lease_time=$new_dhcp_lease_time ++ ++ [ -f /tmp/net.$netif.override ] && . /tmp/net.$netif.override ++ ++ ip -6 addr add ${new_ip6_address}/${new_ip6_prefixlen} \ ++ dev ${netif} scope global valid_lft ${lease_time} \ ++ preferred_lft ${lease_time} ++ ++ [ -n "${search}${domain}" ] && echo "search $search $domain" > /tmp/net.$netif.resolv.conf ++ if [ -n "$namesrv" ] ; then ++ for s in $namesrv; do ++ echo nameserver $s ++ done ++ fi >> /tmp/net.$netif.resolv.conf ++ ++ # Note: hostname can be fqdn OR short hostname, so chop off any ++ # trailing domain name and explicity add any domain if set. ++ [ -n "$hostname" ] && echo "echo ${hostname%.$domain}${domain:+.$domain} > /proc/sys/kernel/hostname" > /tmp/net.$netif.hostname ++} ++ + PATH=/usr/sbin:/usr/bin:/sbin:/bin + + export PS4="dhclient.$interface.$$ + " +@@ -66,6 +91,7 @@ case $reason in + echo "dhcp: PREINIT $netif up" + linkup $netif + ;; ++ + BOUND) + echo "dhcp: BOND setting $netif" + unset layer2 +@@ -95,6 +121,29 @@ case $reason in + echo "rm -f -- $hookdir/initqueue/setup_net_$netif.sh" + } > $hookdir/initqueue/setup_net_$netif.sh + ++ echo "[ -f /tmp/setup_net_$netif.ok ]" > $hookdir/initqueue/finished/dhclient-$netif.sh ++ >/tmp/net.$netif.up ++ ;; ++ ++ BOUND6) ++ echo "dhcp: BOND6 setting $netif" ++ setup_interface6 ++ ++ set | while read line; do ++ [ "${line#new_}" = "$line" ] && continue ++ echo "$line" ++ done >/tmp/dhclient.$netif.dhcpopts ++ ++ { ++ echo '. /lib/net-lib.sh' ++ echo "setup_net $netif" ++ echo "source_hook initqueue/online $netif" ++ [ -e /tmp/net.$netif.manualup ] || echo "/sbin/netroot $netif" ++ echo "> /tmp/setup_net_$netif.ok" ++ echo "> /tmp/setup_net_\$(cat /sys/class/net/$netif/address).ok" ++ echo "rm -f -- $hookdir/initqueue/setup_net_$netif.sh" ++ } > $hookdir/initqueue/setup_net_$netif.sh ++ + echo "[ -f /tmp/setup_net_$netif.ok ]" > $hookdir/initqueue/finished/dhclient-$netif.sh + >/tmp/net.$netif.up + ;; diff --git a/SOURCES/0137-network-IPv6-status-wait-for-tentative-flag-to-be-cl.patch b/SOURCES/0137-network-IPv6-status-wait-for-tentative-flag-to-be-cl.patch new file mode 100644 index 0000000..59773d4 --- /dev/null +++ b/SOURCES/0137-network-IPv6-status-wait-for-tentative-flag-to-be-cl.patch @@ -0,0 +1,57 @@ +From 30e20744477c18a70c4f487275f2a8e957fca555 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 27 Feb 2014 12:11:20 +0100 +Subject: [PATCH] network: IPv6 status, wait for tentative flag to be cleared + +also do not arping the IPv6 address. +--- + modules.d/40network/ifup.sh | 1 + + modules.d/40network/net-lib.sh | 16 ++++++++++++++-- + 2 files changed, 15 insertions(+), 2 deletions(-) + +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index 33ec81d1..e4391068 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -136,6 +136,7 @@ do_static() { + if strstr $ip '*:*:*'; then + # note no ip addr flush for ipv6 + ip addr add $ip/$mask ${srv:+peer $srv} dev $netif ++ wait_for_ipv6_dad $netif + else + ip addr flush dev $netif + ip addr add $ip/$mask ${srv:+peer $srv} brd + dev $netif +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index 4e1b0192..a5867118 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -123,8 +123,8 @@ setup_net() { + read layer2 < /sys/class/net/$netif/device/layer2 + fi + +- if [ "$layer2" != "0" ] && [ -n "$dest" ] && ! arping -q -f -w 60 -I $netif $dest ; then +- info "Resolving $dest via ARP on $netif failed" ++ if [ "$layer2" != "0" ] && [ -n "$dest" ] && ! strstr "$dest" ":"; then ++ arping -q -f -w 60 -I $netif $dest || info "Resolving $dest via ARP on $netif failed" + fi + unset layer2 + +@@ -451,6 +451,18 @@ wait_for_route_ok() { + return 1 + } + ++wait_for_ipv6_dad() { ++ local cnt=0 ++ local li ++ while [ $cnt -lt 500 ]; do ++ li=$(ip -6 addr show dev $1) ++ strstr "$li" "tentative" || return 0 ++ sleep 0.1 ++ cnt=$(($cnt+1)) ++ done ++ return 1 ++} ++ + wait_for_ipv6_auto() { + local cnt=0 + local li diff --git a/SOURCES/0138-network-merge-setup_net_-netif.ok-and-net.-netif.did.patch b/SOURCES/0138-network-merge-setup_net_-netif.ok-and-net.-netif.did.patch new file mode 100644 index 0000000..f82f00b --- /dev/null +++ b/SOURCES/0138-network-merge-setup_net_-netif.ok-and-net.-netif.did.patch @@ -0,0 +1,152 @@ +From 853897808af835b23edacbd815087df3543d835f Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 28 Feb 2014 10:36:12 +0100 +Subject: [PATCH] network: merge setup_net_$netif.ok and net.$netif.did-setup + +one marker per interface is enough +--- + modules.d/40network/dhclient-script.sh | 8 ++------ + modules.d/40network/ifup.sh | 9 ++++++--- + modules.d/40network/net-genrules.sh | 2 +- + modules.d/40network/net-lib.sh | 6 ++++++ + modules.d/45ifcfg/write-ifcfg.sh | 4 +++- + 5 files changed, 18 insertions(+), 11 deletions(-) + +diff --git a/modules.d/40network/dhclient-script.sh b/modules.d/40network/dhclient-script.sh +index a9c25238..822cce95 100755 +--- a/modules.d/40network/dhclient-script.sh ++++ b/modules.d/40network/dhclient-script.sh +@@ -116,12 +116,10 @@ case $reason in + echo "setup_net $netif" + echo "source_hook initqueue/online $netif" + [ -e /tmp/net.$netif.manualup ] || echo "/sbin/netroot $netif" +- echo "> /tmp/setup_net_$netif.ok" +- echo "> /tmp/setup_net_\$(cat /sys/class/net/$netif/address).ok" + echo "rm -f -- $hookdir/initqueue/setup_net_$netif.sh" + } > $hookdir/initqueue/setup_net_$netif.sh + +- echo "[ -f /tmp/setup_net_$netif.ok ]" > $hookdir/initqueue/finished/dhclient-$netif.sh ++ echo "[ -f /tmp/net.$netif.did-setup ]" > $hookdir/initqueue/finished/dhclient-$netif.sh + >/tmp/net.$netif.up + ;; + +@@ -139,12 +137,10 @@ case $reason in + echo "setup_net $netif" + echo "source_hook initqueue/online $netif" + [ -e /tmp/net.$netif.manualup ] || echo "/sbin/netroot $netif" +- echo "> /tmp/setup_net_$netif.ok" +- echo "> /tmp/setup_net_\$(cat /sys/class/net/$netif/address).ok" + echo "rm -f -- $hookdir/initqueue/setup_net_$netif.sh" + } > $hookdir/initqueue/setup_net_$netif.sh + +- echo "[ -f /tmp/setup_net_$netif.ok ]" > $hookdir/initqueue/finished/dhclient-$netif.sh ++ echo "[ -f /tmp/net.$netif.did-setup ]" > $hookdir/initqueue/finished/dhclient-$netif.sh + >/tmp/net.$netif.up + ;; + *) echo "dhcp: $reason";; +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index e4391068..02dfc947 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -83,7 +83,9 @@ fi + if [ -n "$manualup" ]; then + >/tmp/net.$netif.manualup + else +- [ -f /tmp/net.${iface}.did-setup ] && exit 0 ++ [ -e /tmp/net.${netif}.did-setup ] && exit 0 ++ [ -e /sys/class/net/$netif/address ] && \ ++ [ -e /tmp/net.$(cat /sys/class/net/$netif/address).did-setup ] && exit 0 + fi + + # Run dhclient +@@ -145,7 +147,6 @@ do_static() { + [ -n "$gw" ] && echo ip route add default via $gw dev $netif > /tmp/net.$netif.gw + [ -n "$hostname" ] && echo "echo $hostname > /proc/sys/kernel/hostname" > /tmp/net.$netif.hostname + +- > /tmp/setup_net_${netif}.ok + return 0 + } + +@@ -334,6 +335,8 @@ for p in $(getargs ip=); do + do_static ;; + esac + ++ > /tmp/net.${netif}.up ++ + case $autoconf in + dhcp|on|any|dhcp6) + ;; +@@ -359,7 +362,7 @@ if [ -n "$DO_BOND_SETUP" -o -n "$DO_TEAM_SETUP" -o -n "$DO_VLAN_SETUP" ]; then + fi + + # no ip option directed at our interface? +-if [ ! -e /tmp/setup_net_${netif}.ok ]; then ++if [ ! -e /tmp/net.${netif}.up ]; then + do_dhcp -4 + fi + +diff --git a/modules.d/40network/net-genrules.sh b/modules.d/40network/net-genrules.sh +index c4def61b..af2f09c1 100755 +--- a/modules.d/40network/net-genrules.sh ++++ b/modules.d/40network/net-genrules.sh +@@ -89,7 +89,7 @@ command -v fix_bootif >/dev/null || . /lib/net-lib.sh + + for iface in $wait_ifaces; do + if [ "$bootdev" = "$iface" ] || [ "$NEEDNET" = "1" ]; then +- echo "[ -f /tmp/setup_net_${iface}.ok ]" >$hookdir/initqueue/finished/wait-$iface.sh ++ echo "[ -f /tmp/net.${iface}.did-setup ]" >$hookdir/initqueue/finished/wait-$iface.sh + fi + done + # Default: We don't know the interface to use, handle all +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index a5867118..7430e4ce 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -82,12 +82,16 @@ ifdown() { + ip addr flush dev $netif + echo "#empty" > /etc/resolv.conf + rm -f -- /tmp/net.$netif.did-setup ++ [ -e /sys/class/net/$netif/address ] && \ ++ rm -f -- /tmp/net.$(cat /sys/class/net/$netif/address).did-setup + # TODO: send "offline" uevent? + } + + setup_net() { + local netif="$1" f="" gw_ip="" netroot_ip="" iface="" IFACES="" + [ -e /tmp/net.$netif.did-setup ] && return ++ [ -e /sys/class/net/$netif/address ] && \ ++ [ -e /tmp/net.$(cat /sys/class/net/$netif/address).did-setup ] && return + [ -e "/tmp/net.ifaces" ] && read IFACES < /tmp/net.ifaces + [ -z "$IFACES" ] && IFACES="$netif" + # run the scripts written by ifup +@@ -129,6 +133,8 @@ setup_net() { + unset layer2 + + > /tmp/net.$netif.did-setup ++ [ -e /sys/class/net/$netif/address ] && \ ++ > /tmp/net.$(cat /sys/class/net/$netif/address).did-setup + } + + save_netinfo() { +diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh +index d9e9f3af..e2fa4850 100755 +--- a/modules.d/45ifcfg/write-ifcfg.sh ++++ b/modules.d/45ifcfg/write-ifcfg.sh +@@ -85,6 +85,7 @@ for netup in /tmp/net.*.did-setup ; do + + netif=${netup%%.did-setup} + netif=${netif##*/net.} ++ strstr "$netif" ":*:*:*:*:" && continue + [ -e /tmp/ifcfg/ifcfg-$netif ] && continue + unset bridge + unset bond +@@ -111,7 +112,8 @@ for netup in /tmp/net.*.did-setup ; do + if [ "$netif" = "$vlanname" ]; then + vlan=yes + fi +- cat /sys/class/net/$netif/address > /tmp/net.$netif.hwaddr ++ [ -e /sys/class/net/$netif/address ] && \ ++ cat /sys/class/net/$netif/address > /tmp/net.$netif.hwaddr + { + echo "# Generated by dracut initrd" + echo "DEVICE=\"$netif\"" diff --git a/SOURCES/0139-systemd-add-systemd-sysctl-service.patch b/SOURCES/0139-systemd-add-systemd-sysctl-service.patch new file mode 100644 index 0000000..b6aaaca --- /dev/null +++ b/SOURCES/0139-systemd-add-systemd-sysctl-service.patch @@ -0,0 +1,30 @@ +From 61bad12d4415c00e9b0d3d0c8c321a82f5de8644 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 28 Feb 2014 12:03:24 +0100 +Subject: [PATCH] systemd: add systemd-sysctl service + +https://bugzilla.redhat.com/show_bug.cgi?id=1070086 +--- + modules.d/98systemd/module-setup.sh | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh +index 429781b2..52edd80e 100755 +--- a/modules.d/98systemd/module-setup.sh ++++ b/modules.d/98systemd/module-setup.sh +@@ -94,6 +94,7 @@ install() { + $systemdsystemunitdir/systemd-journald.service \ + $systemdsystemunitdir/systemd-vconsole-setup.service \ + $systemdsystemunitdir/systemd-random-seed-load.service \ ++ $systemdsystemunitdir/systemd-sysctl.service \ + \ + $systemdsystemunitdir/sysinit.target.wants/systemd-modules-load.service \ + $systemdsystemunitdir/sysinit.target.wants/systemd-ask-password-console.path \ +@@ -105,6 +106,7 @@ install() { + $systemdsystemunitdir/sysinit.target.wants/systemd-udev-trigger.service \ + $systemdsystemunitdir/sysinit.target.wants/kmod-static-nodes.service \ + $systemdsystemunitdir/sysinit.target.wants/systemd-tmpfiles-setup-dev.service \ ++ $systemdsystemunitdir/sysinit.target.wants/systemd-sysctl.service \ + \ + $systemdsystemunitdir/ctrl-alt-del.target \ + $systemdsystemunitdir/syslog.socket \ diff --git a/SOURCES/0140-add-default-values-in-fstab_lines.patch b/SOURCES/0140-add-default-values-in-fstab_lines.patch new file mode 100644 index 0000000..ce5175f --- /dev/null +++ b/SOURCES/0140-add-default-values-in-fstab_lines.patch @@ -0,0 +1,61 @@ +From d52c4a761a5232f9d92cae90259fbb00e3859a9f Mon Sep 17 00:00:00 2001 +From: Dave Young <dyoung@redhat.com> +Date: Thu, 27 Feb 2014 10:44:23 +0800 +Subject: [PATCH] add default values in fstab_lines + +It's useful for passing a full fstab line including like fs_passno so fsck +can take effect. + +Previously it's assumed that there's no fs_freq and fs_passno in fstab lines +so original code just append "0 0" at the end of each fstab lines. + +Improve this issue by assign default value in case they are not passed in. +Three field are handled here: +fs_mntops: default to "defaults" +fs_freq: default to "0" +fs_passno: default to "2" + +Signed-off-by: Dave Young <dyoung@redhat.com> +--- + dracut.8.asc | 10 +++++++--- + dracut.sh | 6 +++++- + 2 files changed, 12 insertions(+), 4 deletions(-) + +diff --git a/dracut.8.asc b/dracut.8.asc +index ba125c0d..f97074a2 100644 +--- a/dracut.8.asc ++++ b/dracut.8.asc +@@ -311,9 +311,13 @@ provide a valid _/etc/fstab_. + **--add-fstab** _<filename>_:: + Add entries of _<filename>_ to the initramfs /etc/fstab. + +-**--mount** "_<device>_ _<mountpoint>_ _<filesystem type>_ _<filesystem options>_":: +- Mount _<device>_ on _<mountpoint>_ with _<filesystem type>_ and _<filesystem +- options>_ in the initramfs ++**--mount** "_<device>_ _<mountpoint>_ _<filesystem type>_ [_<filesystem options>_ [_<dump frequency>_ [_<fsck order>_]]]":: ++ Mount _<device>_ on _<mountpoint>_ with _<filesystem type>_ in the ++ initramfs. _<filesystem options>_, _<dump options>_ and _<fsck order>_ can ++ be specified, see fstab manpage for the details. ++ The default _<filesystem options>_ is "defaults". ++ The default _<dump frequency>_ is "0". ++ the default _<fsck order>_ is "2". + + **--add-device** _<device>_ :: + Bring up _<device>_ in initramfs, _<device>_ should be the device name. +diff --git a/dracut.sh b/dracut.sh +index 1c5e6889..2d5b7dc7 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1234,7 +1234,11 @@ if [[ $kernel_only != yes ]]; then + [[ $kernel_cmdline ]] && printf "%s\n" "$kernel_cmdline" >> "${initdir}/etc/cmdline.d/01-default.conf" + + while pop fstab_lines line; do +- printf "%s\n" "$line 0 0" >> "${initdir}/etc/fstab" ++ line=($line) ++ [ -z "${line[3]}" ] && line[3]="defaults" ++ [ -z "${line[4]}" ] && line[4]="0" ++ [ -z "${line[5]}" ] && line[5]="2" ++ echo "${line[@]}" >> "${initdir}/etc/fstab" + done + + for f in $add_fstab; do diff --git a/SOURCES/0141-test-add-missing-Makefile.testdir.patch b/SOURCES/0141-test-add-missing-Makefile.testdir.patch new file mode 100644 index 0000000..23ef699 --- /dev/null +++ b/SOURCES/0141-test-add-missing-Makefile.testdir.patch @@ -0,0 +1,28 @@ +From 8482be832cc24bf2676dca3dcebd2ee82396ab37 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 28 Feb 2014 12:57:57 +0100 +Subject: [PATCH] test: add missing Makefile.testdir + +--- + test/Makefile.testdir | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + create mode 100644 test/Makefile.testdir + +diff --git a/test/Makefile.testdir b/test/Makefile.testdir +new file mode 100644 +index 00000000..33c2a9a4 +--- /dev/null ++++ b/test/Makefile.testdir +@@ -0,0 +1,12 @@ ++.PHONY: all setup clean run ++ ++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/SOURCES/0142-test-Makefile-add-SKIP-env-to-skip-certain-tests.patch b/SOURCES/0142-test-Makefile-add-SKIP-env-to-skip-certain-tests.patch new file mode 100644 index 0000000..520ff52 --- /dev/null +++ b/SOURCES/0142-test-Makefile-add-SKIP-env-to-skip-certain-tests.patch @@ -0,0 +1,21 @@ +From e96c0100113eb35a476fdb7949d5e347a81281a2 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 28 Feb 2014 13:25:39 +0100 +Subject: [PATCH] test/Makefile: add SKIP env to skip certain tests + +--- + test/Makefile | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/test/Makefile b/test/Makefile +index 97a7aad8..f71f8540 100644 +--- a/test/Makefile ++++ b/test/Makefile +@@ -6,6 +6,7 @@ check: + [ -d $$i ] || continue ; \ + [ -f $$i/Makefile ] || continue ; \ + if [ -n "$$TESTS" ]; then t=$${i##TEST-}; t=$${t%%-*}; [ "$${TESTS#*$$t*}" != "$$TESTS" ] || continue; fi; \ ++ if [ -n "$$SKIP" ]; then t=$${i##TEST-}; t=$${t%%-*}; [ "$${SKIP#*$$t*}" != "$$SKIP" ] && continue; fi; \ + $(MAKE) -C $$i all ; \ + done + diff --git a/SOURCES/0143-test-TEST-50-MULTINIC-client-init.sh-skip-MAC-marker.patch b/SOURCES/0143-test-TEST-50-MULTINIC-client-init.sh-skip-MAC-marker.patch new file mode 100644 index 0000000..6a22426 --- /dev/null +++ b/SOURCES/0143-test-TEST-50-MULTINIC-client-init.sh-skip-MAC-marker.patch @@ -0,0 +1,21 @@ +From dccf47fd55e99700c930a23327bfb6647501c38a Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 28 Feb 2014 13:26:13 +0100 +Subject: [PATCH] test/TEST-50-MULTINIC/client-init.sh: skip MAC marker files + +--- + test/TEST-50-MULTINIC/client-init.sh | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/test/TEST-50-MULTINIC/client-init.sh b/test/TEST-50-MULTINIC/client-init.sh +index f13c3790..51f8b642 100755 +--- a/test/TEST-50-MULTINIC/client-init.sh ++++ b/test/TEST-50-MULTINIC/client-init.sh +@@ -9,6 +9,7 @@ export PS1='initramfs-test:\w\$ ' + stty sane + echo "made it to the rootfs! Powering down." + for i in /run/initramfs/net.*.did-setup; do ++ strstr "$i" ":*:*:*:*:" && continue + i=${i%.did-setup} + IFACES+="${i##*/net.} " + done diff --git a/SOURCES/0144-Add-no-hostonly-cmdline-option-handling-for-getopt.patch b/SOURCES/0144-Add-no-hostonly-cmdline-option-handling-for-getopt.patch new file mode 100644 index 0000000..a3f0c0e --- /dev/null +++ b/SOURCES/0144-Add-no-hostonly-cmdline-option-handling-for-getopt.patch @@ -0,0 +1,26 @@ +From e2e32cd02febaf26b9cd0b17de9f02256dd72cb2 Mon Sep 17 00:00:00 2001 +From: WANG Chao <chaowang@redhat.com> +Date: Mon, 3 Mar 2014 15:22:00 +0800 +Subject: [PATCH] Add -[-no]-hostonly-cmdline option handling for getopt + +commit ab9457e introduce such new options but it missed to add these +options to getopt arguments. + +Signed-off-by: WANG Chao <chaowang@redhat.com> +--- + dracut.sh | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/dracut.sh b/dracut.sh +index 2d5b7dc7..78d7fadd 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -347,6 +347,8 @@ TEMP=$(unset POSIXLY_CORRECT; getopt \ + --long host-only \ + --long no-hostonly \ + --long no-host-only \ ++ --long hostonly-cmdline \ ++ --long no-hostonly-cmdline \ + --long persistent-policy: \ + --long fstab \ + --long help \ diff --git a/SOURCES/0145-dracut-don-t-let-devices-timeout.patch b/SOURCES/0145-dracut-don-t-let-devices-timeout.patch new file mode 100644 index 0000000..e93f0fd --- /dev/null +++ b/SOURCES/0145-dracut-don-t-let-devices-timeout.patch @@ -0,0 +1,37 @@ +From 711030d61d8dbf195d416fbd23759feac0303c15 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 4 Mar 2014 13:46:14 +0100 +Subject: [PATCH] dracut: don't let devices timeout + +https://bugzilla.redhat.com/show_bug.cgi?id=949697 +--- + modules.d/98systemd/rootfs-generator.sh | 2 +- + modules.d/99base/dracut-lib.sh | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/modules.d/98systemd/rootfs-generator.sh b/modules.d/98systemd/rootfs-generator.sh +index a11ce595..2c098951 100755 +--- a/modules.d/98systemd/rootfs-generator.sh ++++ b/modules.d/98systemd/rootfs-generator.sh +@@ -29,7 +29,7 @@ generator_wait_for_dev() + mkdir -p /run/systemd/generator/${_name}.device.d + { + echo "[Unit]" +- echo "JobTimeoutSec=3600" ++ echo "JobTimeoutSec=0" + } > /run/systemd/generator/${_name}.device.d/timeout.conf + fi + } +diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh +index d892c26d..62facda1 100755 +--- a/modules.d/99base/dracut-lib.sh ++++ b/modules.d/99base/dracut-lib.sh +@@ -884,7 +884,7 @@ wait_for_dev() + mkdir -p ${PREFIX}/etc/systemd/system/${_name}.device.d + { + echo "[Unit]" +- echo "JobTimeoutSec=3600" ++ echo "JobTimeoutSec=0" + } > ${PREFIX}/etc/systemd/system/${_name}.device.d/timeout.conf + _needreload=1 + fi diff --git a/SOURCES/0146-Do-not-wait_for_dev-if-hostonly_cmdline-not-set.patch b/SOURCES/0146-Do-not-wait_for_dev-if-hostonly_cmdline-not-set.patch new file mode 100644 index 0000000..68da951 --- /dev/null +++ b/SOURCES/0146-Do-not-wait_for_dev-if-hostonly_cmdline-not-set.patch @@ -0,0 +1,73 @@ +From 84c66ac857b3cb6f5fa3ba597d298350753d79bf Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 6 Mar 2014 09:54:36 +0100 +Subject: [PATCH] Do not wait_for_dev if hostonly_cmdline not set + +--- + dracut.sh | 2 +- + modules.d/99base/module-setup.sh | 40 +++++++++++++++++--------------- + 2 files changed, 22 insertions(+), 20 deletions(-) + +diff --git a/dracut.sh b/dracut.sh +index 78d7fadd..95f18dbf 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1076,7 +1076,7 @@ export initdir dracutbasedir dracutmodules \ + debug host_fs_types host_devs sshkey add_fstab \ + DRACUT_VERSION udevdir prefix filesystems drivers \ + systemdutildir systemdsystemunitdir systemdsystemconfdir \ +- host_modalias host_modules ++ host_modalias host_modules hostonly_cmdline + + mods_to_load="" + # check all our modules to see if they should be sourced. +diff --git a/modules.d/99base/module-setup.sh b/modules.d/99base/module-setup.sh +index 52ce4004..fddf4b06 100755 +--- a/modules.d/99base/module-setup.sh ++++ b/modules.d/99base/module-setup.sh +@@ -92,24 +92,26 @@ install() { + ln -sf initrd-release $initdir/etc/os-release + + ## save host_devs which we need bring up +- if [[ -f "$initdir/lib/dracut/need-initqueue" ]] || ! dracut_module_included "systemd"; then +- ( +- if dracut_module_included "systemd"; then +- DRACUT_SYSTEMD=1 +- fi +- PREFIX="$initdir" +- +- . "$moddir/dracut-lib.sh" +- +- for _dev in ${host_devs[@]}; do +- [[ "$_dev" == "$root_dev" ]] && continue +- _pdev=$(get_persistent_dev $_dev) +- +- case "$_pdev" in +- /dev/?*) wait_for_dev $_pdev;; +- *) ;; +- esac +- done +- ) ++ if [[ $hostonly_cmdline == "yes" ]]; then ++ if [[ -f "$initdir/lib/dracut/need-initqueue" ]] || ! dracut_module_included "systemd"; then ++ ( ++ if dracut_module_included "systemd"; then ++ DRACUT_SYSTEMD=1 ++ fi ++ PREFIX="$initdir" ++ ++ . "$moddir/dracut-lib.sh" ++ ++ for _dev in ${host_devs[@]}; do ++ [[ "$_dev" == "$root_dev" ]] && continue ++ _pdev=$(get_persistent_dev $_dev) ++ ++ case "$_pdev" in ++ /dev/?*) wait_for_dev $_pdev;; ++ *) ;; ++ esac ++ done ++ ) ++ fi + fi + } diff --git a/SOURCES/0147-systemd-dracut-shutdown.service-make-failure-non-fat.patch b/SOURCES/0147-systemd-dracut-shutdown.service-make-failure-non-fat.patch new file mode 100644 index 0000000..0141bf7 --- /dev/null +++ b/SOURCES/0147-systemd-dracut-shutdown.service-make-failure-non-fat.patch @@ -0,0 +1,21 @@ +From af1154fdce0e6fe0e8cb1216cc5e2f420eb03975 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 12 Mar 2014 15:39:08 +0100 +Subject: [PATCH] systemd/dracut-shutdown.service: make failure non-fatal + +--- + modules.d/98systemd/dracut-shutdown.service | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/98systemd/dracut-shutdown.service b/modules.d/98systemd/dracut-shutdown.service +index e733300c..3b8b6da6 100644 +--- a/modules.d/98systemd/dracut-shutdown.service ++++ b/modules.d/98systemd/dracut-shutdown.service +@@ -15,6 +15,6 @@ ConditionPathExists=/run/initramfs/.need_shutdown + ConditionPathExists=!/run/initramfs/bin/sh + + [Service] +-ExecStart=/usr/lib/dracut/dracut-initramfs-restore ++ExecStart=-/usr/lib/dracut/dracut-initramfs-restore + Type=oneshot + RemainAfterExit=yes diff --git a/SOURCES/0148-network-dhclient-script-do-PREINIT6-for-DHCP6.patch b/SOURCES/0148-network-dhclient-script-do-PREINIT6-for-DHCP6.patch new file mode 100644 index 0000000..83c94ce --- /dev/null +++ b/SOURCES/0148-network-dhclient-script-do-PREINIT6-for-DHCP6.patch @@ -0,0 +1,75 @@ +From 89f2586ae93e948cb9c41f971423431e8cccf236 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Mon, 17 Mar 2014 13:00:17 +0100 +Subject: [PATCH] network:dhclient-script do PREINIT6 for DHCP6 + +--- + modules.d/40network/dhclient-script.sh | 29 ++++++++++++++------------ + modules.d/40network/ifup.sh | 1 + + 2 files changed, 17 insertions(+), 13 deletions(-) + +diff --git a/modules.d/40network/dhclient-script.sh b/modules.d/40network/dhclient-script.sh +index 822cce95..50e89326 100755 +--- a/modules.d/40network/dhclient-script.sh ++++ b/modules.d/40network/dhclient-script.sh +@@ -2,6 +2,17 @@ + # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- + # ex: ts=8 sw=4 sts=4 et filetype=sh + ++PATH=/usr/sbin:/usr/bin:/sbin:/bin ++ ++type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh ++type ip_to_var >/dev/null 2>&1 || . /lib/net-lib.sh ++ ++# We already need a set netif here ++netif=$interface ++ ++# Huh? Interface configured? ++[ -f "/tmp/net.$netif.up" ] && exit 0 ++ + setup_interface() { + ip=$new_ip_address + mtu=$new_interface_mtu +@@ -73,25 +84,17 @@ setup_interface6() { + [ -n "$hostname" ] && echo "echo ${hostname%.$domain}${domain:+.$domain} > /proc/sys/kernel/hostname" > /tmp/net.$netif.hostname + } + +-PATH=/usr/sbin:/usr/bin:/sbin:/bin +- +-export PS4="dhclient.$interface.$$ + " +-exec >>/run/initramfs/loginit.pipe 2>>/run/initramfs/loginit.pipe +-type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh +-type ip_to_var >/dev/null 2>&1 || . /lib/net-lib.sh +- +-# We already need a set netif here +-netif=$interface +- +-# Huh? Interface configured? +-[ -f "/tmp/net.$netif.up" ] && exit 0 +- + case $reason in + PREINIT) + echo "dhcp: PREINIT $netif up" + linkup $netif + ;; + ++ PREINIT6) ++ echo "dhcp: PREINIT $netif up" ++ linkup $netif ++ ;; ++ + BOUND) + echo "dhcp: BOND setting $netif" + unset layer2 +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index 02dfc947..51b0d528 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -328,6 +328,7 @@ for p in $(getargs ip=); do + dhcp|on|any) + do_dhcp -4 ;; + dhcp6) ++ load_ipv6 + do_dhcp -6 ;; + auto6) + do_ipv6auto ;; diff --git a/SOURCES/0149-shutdown-if-kexec-failed-do-a-simple-reboot.patch b/SOURCES/0149-shutdown-if-kexec-failed-do-a-simple-reboot.patch new file mode 100644 index 0000000..d09b426 --- /dev/null +++ b/SOURCES/0149-shutdown-if-kexec-failed-do-a-simple-reboot.patch @@ -0,0 +1,21 @@ +From 9d75fd3b62be29813c9c30a88e3f1bacc921847a Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 18 Mar 2014 13:21:22 +0100 +Subject: [PATCH] shutdown: if kexec failed, do a simple reboot + +--- + modules.d/99shutdown/shutdown.sh | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/modules.d/99shutdown/shutdown.sh b/modules.d/99shutdown/shutdown.sh +index 162abcb9..1daf2ca3 100755 +--- a/modules.d/99shutdown/shutdown.sh ++++ b/modules.d/99shutdown/shutdown.sh +@@ -113,6 +113,7 @@ case "$ACTION" in + kexec) + kexec -e + warn "$ACTION failed!" ++ reboot -f -d -n + ;; + *) + warn "Shutdown called with argument '$ACTION'. Rebooting!" diff --git a/SOURCES/0150-dracut-initramfs-restore-fix-unpacking-with-early-mi.patch b/SOURCES/0150-dracut-initramfs-restore-fix-unpacking-with-early-mi.patch new file mode 100644 index 0000000..3daca33 --- /dev/null +++ b/SOURCES/0150-dracut-initramfs-restore-fix-unpacking-with-early-mi.patch @@ -0,0 +1,40 @@ +From c2196a25b7ff4bd54f3cab64392535b755e4ff88 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 20 Mar 2014 13:18:13 +0100 +Subject: [PATCH] dracut-initramfs-restore: fix unpacking with early microcode + +(cherry picked from commit 0626cbe923732d45739ea6da4b816c78c44503ef) +--- + dracut-initramfs-restore.sh | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +diff --git a/dracut-initramfs-restore.sh b/dracut-initramfs-restore.sh +index f29c8146..0dd1938d 100644 +--- a/dracut-initramfs-restore.sh ++++ b/dracut-initramfs-restore.sh +@@ -6,6 +6,10 @@ set -e + + KERNEL_VERSION="$(uname -r)" + ++[[ $dracutbasedir ]] || dracutbasedir=/usr/lib/dracut ++SKIP="$dracutbasedir/skipcpio" ++[[ -x $SKIP ]] || SKIP=cat ++ + [[ -f /etc/machine-id ]] && read MACHINE_ID < /etc/machine-id + + if [[ $MACHINE_ID ]] && [[ -d /boot/${MACHINE_ID} || -L /boot/${MACHINE_ID} ]] ; then +@@ -16,11 +20,11 @@ fi + cd /run/initramfs + + [ -f .need_shutdown -a -f "$IMG" ] || exit 1 +-if zcat "$IMG" | cpio -id --quiet >/dev/null; then ++if $SKIP "$IMG" | zcat | cpio -id --no-absolute-filenames --quiet >/dev/null; then + rm -f -- .need_shutdown +-elif xzcat "$IMG" | cpio -id --quiet >/dev/null; then ++elif $SKIP "$IMG" | xzcat | cpio -id --no-absolute-filenames --quiet >/dev/null; then + rm -f -- .need_shutdown +-elif lz4 -d -c "$IMG" | cpio -id --quiet >/dev/null; then ++elif $SKIP "$IMG" | lz4 -d -c | cpio -id --no-absolute-filenames --quiet >/dev/null; then + rm -f -- .need_shutdown + else + # something failed, so we clean up diff --git a/SOURCES/0151-fcoe-wait-for-lldpad-to-be-ready.patch b/SOURCES/0151-fcoe-wait-for-lldpad-to-be-ready.patch new file mode 100644 index 0000000..610970e --- /dev/null +++ b/SOURCES/0151-fcoe-wait-for-lldpad-to-be-ready.patch @@ -0,0 +1,45 @@ +From bdb6683d6feb744c85b416ea4cb48e7c6a49aaa9 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 25 Mar 2014 15:28:19 +0100 +Subject: [PATCH] fcoe: wait for lldpad to be ready + +https://bugzilla.redhat.com/show_bug.cgi?id=1080353 +--- + modules.d/95fcoe/fcoe-up.sh | 10 ++++++++-- + modules.d/95fcoe/module-setup.sh | 2 +- + 2 files changed, 9 insertions(+), 3 deletions(-) + +diff --git a/modules.d/95fcoe/fcoe-up.sh b/modules.d/95fcoe/fcoe-up.sh +index ecb1593d..60642cfd 100755 +--- a/modules.d/95fcoe/fcoe-up.sh ++++ b/modules.d/95fcoe/fcoe-up.sh +@@ -31,8 +31,14 @@ if [ "$dcb" = "dcb" ]; then + # are to kill it and start a new lldpad to take over. Data is transfered + # between the 2 using a shm segment + lldpad -d +- # stupid tools, need sleep +- sleep 1 ++ # wait for lldpad to be ready ++ i=0 ++ while [ $i -lt 60 ]; do ++ lldptool -p && break ++ info "Waiting for lldpad to be ready" ++ sleep 1 ++ i=$(($i+1)) ++ done + dcbtool sc "$netif" dcb on + sleep 1 + dcbtool sc "$netif" app:fcoe e:1 a:1 w:1 +diff --git a/modules.d/95fcoe/module-setup.sh b/modules.d/95fcoe/module-setup.sh +index fe8e40aa..3ffaf5a5 100755 +--- a/modules.d/95fcoe/module-setup.sh ++++ b/modules.d/95fcoe/module-setup.sh +@@ -20,7 +20,7 @@ installkernel() { + } + + install() { +- inst_multiple ip dcbtool fipvlan lldpad readlink ++ inst_multiple ip dcbtool fipvlan lldpad readlink lldptool + + mkdir -m 0755 -p "$initdir/var/lib/lldpad" + diff --git a/SOURCES/0152-network-handle-ip-dhcp6-for-all-interfaces.patch b/SOURCES/0152-network-handle-ip-dhcp6-for-all-interfaces.patch new file mode 100644 index 0000000..5b4c6e6 --- /dev/null +++ b/SOURCES/0152-network-handle-ip-dhcp6-for-all-interfaces.patch @@ -0,0 +1,28 @@ +From 42896820ba1bba0da86e783ac6e1e4951a9acf88 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 25 Mar 2014 15:39:56 +0100 +Subject: [PATCH] network: handle "ip=dhcp6" for all interfaces + +https://bugzilla.redhat.com/show_bug.cgi?id=1064365 +--- + modules.d/40network/ifup.sh | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index 51b0d528..ede01883 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -364,7 +364,12 @@ fi + + # no ip option directed at our interface? + if [ ! -e /tmp/net.${netif}.up ]; then +- do_dhcp -4 ++ if getargs 'ip=dhcp6'; then ++ load_ipv6 ++ do_dhcp -6 ++ else ++ do_dhcp -4 ++ fi + fi + + exit 0 diff --git a/SOURCES/0153-lsinitrd.sh-prevent-construct.patch b/SOURCES/0153-lsinitrd.sh-prevent-construct.patch new file mode 100644 index 0000000..e3bd53e --- /dev/null +++ b/SOURCES/0153-lsinitrd.sh-prevent-construct.patch @@ -0,0 +1,83 @@ +From 7031115695bf014f39b4efc32a3e71a11daebfbc Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 27 Mar 2014 09:27:53 +0100 +Subject: [PATCH] lsinitrd.sh: prevent < <$() construct +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Running dracut in a chroot environment, which has /dev not correctly +setup will result in errors like: + +/usr/bin/lsinitrd: line 164: /dev/fd/62: No such file or directory +cpio: Malformed number �5�OK�� +cpio: Malformed number 5�OK�� +cpio: Malformed number �OK�� + +This is because bash wants /dev/fd/<num> for constructs like: +foo < <$(bar) +--- + lsinitrd.sh | 49 +++++++++++++++++++++++++++++-------------------- + 1 file changed, 29 insertions(+), 20 deletions(-) + +diff --git a/lsinitrd.sh b/lsinitrd.sh +index 70e12f81..2fbebd8e 100755 +--- a/lsinitrd.sh ++++ b/lsinitrd.sh +@@ -160,27 +160,36 @@ case $bin in + ;; + esac + +-if [[ $SKIP ]]; then +- read -N 6 bin < <($SKIP "$image") +-fi + +-case $bin in +- $'\x1f\x8b'*) +- CAT="zcat --";; +- BZh*) +- CAT="bzcat --";; +- $'\x71\xc7'*|070701) +- CAT="cat --" +- ;; +- $'\x04\x22'*) +- CAT="lz4 -d -c";; +- *) +- CAT="xzcat --"; +- if echo "test"|xz|xzcat --single-stream >/dev/null 2>&1; then +- CAT="xzcat --single-stream --" +- fi +- ;; +-esac ++CAT=$({ ++ if [[ $SKIP ]]; then ++ $SKIP "$image" ++ else ++ cat "$image" ++ fi } | { ++ read -N 6 bin ++ case $bin in ++ $'\x1f\x8b'*) ++ echo "zcat --" ++ ;; ++ BZh*) ++ echo "bzcat --" ++ ;; ++ $'\x71\xc7'*|070701) ++ echo "cat --" ++ ;; ++ $'\x04\x22'*) ++ echo "lz4 -d -c" ++ ;; ++ *) ++ if echo "test"|xz|xzcat --single-stream >/dev/null 2>&1; then ++ echo "xzcat --single-stream --" ++ else ++ echo "xzcat --" ++ fi ++ ;; ++ esac ++ }) + + skipcpio() + { diff --git a/SOURCES/0154-network-DCHPv6-set-valid_lft-and-preferred_lft.patch b/SOURCES/0154-network-DCHPv6-set-valid_lft-and-preferred_lft.patch new file mode 100644 index 0000000..82e88dd --- /dev/null +++ b/SOURCES/0154-network-DCHPv6-set-valid_lft-and-preferred_lft.patch @@ -0,0 +1,35 @@ +From 69acbc47356b56a03a331b8be57ed83af2687c8d Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 27 Mar 2014 12:31:23 +0100 +Subject: [PATCH] network: DCHPv6: set valid_lft and preferred_lft + +https://bugzilla.redhat.com/show_bug.cgi?id=1064365 +--- + modules.d/40network/dhclient-script.sh | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +diff --git a/modules.d/40network/dhclient-script.sh b/modules.d/40network/dhclient-script.sh +index 50e89326..ba05250d 100755 +--- a/modules.d/40network/dhclient-script.sh ++++ b/modules.d/40network/dhclient-script.sh +@@ -64,13 +64,17 @@ setup_interface6() { + search=$(printf -- "$new_domain_search") + namesrv=$new_domain_name_servers + hostname=$new_host_name +- lease_time=$new_dhcp_lease_time ++ [ -n "$new_dhcp_lease_time" ] && lease_time=$new_dhcp_lease_time ++ [ -n "$new_max_life" ] && lease_time=$new_max_life ++ preferred_lft=$lease_time ++ [ -n "$new_preferred_life" ] && preferred_lft=$new_preferred_life + + [ -f /tmp/net.$netif.override ] && . /tmp/net.$netif.override + + ip -6 addr add ${new_ip6_address}/${new_ip6_prefixlen} \ +- dev ${netif} scope global valid_lft ${lease_time} \ +- preferred_lft ${lease_time} ++ dev ${netif} scope global \ ++ ${lease_time:+valid_lft $lease_time} \ ++ ${preferred_lft:+preferred_lft ${preferred_lft}} + + [ -n "${search}${domain}" ] && echo "search $search $domain" > /tmp/net.$netif.resolv.conf + if [ -n "$namesrv" ] ; then diff --git a/SOURCES/0155-dm-add-dm-cache-modules.patch b/SOURCES/0155-dm-add-dm-cache-modules.patch new file mode 100644 index 0000000..654a470 --- /dev/null +++ b/SOURCES/0155-dm-add-dm-cache-modules.patch @@ -0,0 +1,23 @@ +From db1b5a38e9e80b2093763b7c3cdf65ddb02cd705 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 27 Mar 2014 12:34:40 +0100 +Subject: [PATCH] dm: add dm-cache modules + +https://bugzilla.redhat.com/show_bug.cgi?id=1081435 +--- + modules.d/90dm/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/90dm/module-setup.sh b/modules.d/90dm/module-setup.sh +index fa38e856..1fd92987 100755 +--- a/modules.d/90dm/module-setup.sh ++++ b/modules.d/90dm/module-setup.sh +@@ -13,7 +13,7 @@ depends() { + + installkernel() { + instmods =drivers/md +- instmods dm_mod ++ instmods dm_mod dm-cache dm-cache-mq dm-cache-cleaner + } + + install() { diff --git a/SOURCES/0156-fcoe-workaround-fcoe-timing-issues.patch b/SOURCES/0156-fcoe-workaround-fcoe-timing-issues.patch new file mode 100644 index 0000000..88c1f5d --- /dev/null +++ b/SOURCES/0156-fcoe-workaround-fcoe-timing-issues.patch @@ -0,0 +1,55 @@ +From 4c2d48d5c4449789018024c3d9f402f5108e9a68 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Mon, 31 Mar 2014 16:21:49 +0200 +Subject: [PATCH] fcoe: workaround fcoe timing issues + +--- + modules.d/95fcoe/fcoe-genrules.sh | 2 +- + modules.d/95fcoe/fcoe-up.sh | 23 ++++++++++++++++++++--- + 2 files changed, 21 insertions(+), 4 deletions(-) + +diff --git a/modules.d/95fcoe/fcoe-genrules.sh b/modules.d/95fcoe/fcoe-genrules.sh +index 80894ed2..fa3af6df 100755 +--- a/modules.d/95fcoe/fcoe-genrules.sh ++++ b/modules.d/95fcoe/fcoe-genrules.sh +@@ -13,4 +13,4 @@ + else + printf 'ACTION=="add", SUBSYSTEM=="net", NAME=="%s", RUN+="/sbin/initqueue --onetime --unique --name fcoe-up-$env{INTERFACE} /sbin/fcoe-up $env{INTERFACE} %s"\n' "$fcoe_interface" "$fcoe_dcb" + fi +-} > /etc/udev/rules.d/92-fcoe.rules ++} >> /etc/udev/rules.d/92-fcoe.rules +diff --git a/modules.d/95fcoe/fcoe-up.sh b/modules.d/95fcoe/fcoe-up.sh +index 60642cfd..edbfcc84 100755 +--- a/modules.d/95fcoe/fcoe-up.sh ++++ b/modules.d/95fcoe/fcoe-up.sh +@@ -39,10 +39,27 @@ if [ "$dcb" = "dcb" ]; then + sleep 1 + i=$(($i+1)) + done +- dcbtool sc "$netif" dcb on +- sleep 1 +- dcbtool sc "$netif" app:fcoe e:1 a:1 w:1 ++ ++ # on some systems lldpad needs some time ++ # sleep until we find a better solution ++ sleep 30 ++ ++ while [ $i -lt 60 ]; do ++ dcbtool sc "$netif" dcb on && break ++ info "Retrying to turn dcb on" ++ sleep 1 ++ i=$(($i+1)) ++ done ++ ++ while [ $i -lt 60 ]; do ++ dcbtool sc "$netif" app:fcoe e:1 a:1 w:1 && break ++ info "Retrying to turn fcoe on" ++ sleep 1 ++ i=$(($i+1)) ++ done ++ + sleep 1 ++ + fipvlan "$netif" -c -s + elif [ "$netdriver" = "bnx2x" ]; then + # If driver is bnx2x, do not use /sys/module/fcoe/parameters/create but fipvlan diff --git a/SOURCES/0157-Add-legacy-flag-l-to-lz4-and-update-magic-number.patch b/SOURCES/0157-Add-legacy-flag-l-to-lz4-and-update-magic-number.patch new file mode 100644 index 0000000..56a7f6b --- /dev/null +++ b/SOURCES/0157-Add-legacy-flag-l-to-lz4-and-update-magic-number.patch @@ -0,0 +1,39 @@ +From 07c4a2fce5ddc0b6266526911586f1bd36f5700f Mon Sep 17 00:00:00 2001 +From: Alexander Tsoy <alexander@tsoy.me> +Date: Wed, 26 Feb 2014 15:50:17 +0400 +Subject: [PATCH] Add legacy flag (-l) to lz4 and update magic number + +Linux kernel does not support the new default lz4 format. + +https://bugs.gentoo.org/show_bug.cgi?id=502102 +--- + dracut.sh | 2 +- + lsinitrd.sh | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/dracut.sh b/dracut.sh +index 95f18dbf..a5fcf389 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -720,7 +720,7 @@ case $compress in + xz) compress="xz --check=crc32 --lzma2=dict=1MiB -T0";; + gzip) compress="gzip -9"; command -v pigz > /dev/null 2>&1 && compress="pigz -9";; + lzo) compress="lzop -9";; +- lz4) compress="lz4 -9";; ++ lz4) compress="lz4 -l -9";; + esac + if [[ $_no_compress_l = "cat" ]]; then + compress="cat" +diff --git a/lsinitrd.sh b/lsinitrd.sh +index 2fbebd8e..7b12ab96 100755 +--- a/lsinitrd.sh ++++ b/lsinitrd.sh +@@ -178,7 +178,7 @@ CAT=$({ + $'\x71\xc7'*|070701) + echo "cat --" + ;; +- $'\x04\x22'*) ++ $'\x02\x21'*) + echo "lz4 -d -c" + ;; + *) diff --git a/SOURCES/0158-fs-lib-always-install-fsck.-fs-if-present.patch b/SOURCES/0158-fs-lib-always-install-fsck.-fs-if-present.patch new file mode 100644 index 0000000..d87dbd2 --- /dev/null +++ b/SOURCES/0158-fs-lib-always-install-fsck.-fs-if-present.patch @@ -0,0 +1,40 @@ +From 4b07c26d33c5b2ab1e4d2e98c88e787bdf032917 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 4 Apr 2014 11:33:02 +0200 +Subject: [PATCH] fs-lib: always install fsck.$fs, if present + +--- + modules.d/99fs-lib/module-setup.sh | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/modules.d/99fs-lib/module-setup.sh b/modules.d/99fs-lib/module-setup.sh +index c9c88b7d..249aa84a 100755 +--- a/modules.d/99fs-lib/module-setup.sh ++++ b/modules.d/99fs-lib/module-setup.sh +@@ -15,10 +15,10 @@ echo_fs_helper() { + local dev=$1 fs=$2 + case "$fs" in + xfs) +- echo -n " xfs_db xfs_repair xfs_check xfs_metadump " ++ echo -n " xfs_db xfs_repair xfs_check xfs_metadump" + ;; + ext?) +- echo -n " fsck.$fs e2fsck " ++ echo -n " e2fsck " + ;; + jfs) + echo -n " jfs_fsck " +@@ -29,10 +29,10 @@ echo_fs_helper() { + btrfs) + echo -n " btrfsck " + ;; +- *) +- [[ -x fsck.$fs ]] && echo -n " fsck.$fs " +- ;; + esac ++ ++ echo -n " fsck.$fs " ++ return 0 + } + + include_fs_helper_modules() { diff --git a/SOURCES/0159-ifcfg-write-ifcfg.sh-turn-on-IPV6INIT-if-any-inet6-a.patch b/SOURCES/0159-ifcfg-write-ifcfg.sh-turn-on-IPV6INIT-if-any-inet6-a.patch new file mode 100644 index 0000000..441787d --- /dev/null +++ b/SOURCES/0159-ifcfg-write-ifcfg.sh-turn-on-IPV6INIT-if-any-inet6-a.patch @@ -0,0 +1,25 @@ +From f1ea5376ed00e4e18b3829e4f267973bb9816f72 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 3 Apr 2014 08:53:09 +0200 +Subject: [PATCH] ifcfg/write-ifcfg.sh: turn on IPV6INIT, if any inet6 address + is found + +If "ip -6 addr" finds any inet6 address, assume IPV6INIT=yes for the +ifcfg file. +--- + modules.d/45ifcfg/write-ifcfg.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh +index e2fa4850..486c69a3 100755 +--- a/modules.d/45ifcfg/write-ifcfg.sh ++++ b/modules.d/45ifcfg/write-ifcfg.sh +@@ -122,7 +122,7 @@ for netup in /tmp/net.*.did-setup ; do + echo "UUID=\"$uuid\"" + if [ -f /tmp/dhclient.$netif.lease ]; then + [ -f /tmp/dhclient.$netif.dhcpopts ] && . /tmp/dhclient.$netif.dhcpopts +- strstr "$ip" '*:*:*' && echo "IPV6INIT=yes" ++ strstr "$(ip -6 addr show dev $netif)" 'inet6' && echo "IPV6INIT=yes" + if [ -f /tmp/net.$netif.has_ibft_config ]; then + echo "BOOTPROTO=ibft" + else diff --git a/SOURCES/0160-dracut-functions.sh-add-lib-modules-extras-weak-upda.patch b/SOURCES/0160-dracut-functions.sh-add-lib-modules-extras-weak-upda.patch new file mode 100644 index 0000000..177661a --- /dev/null +++ b/SOURCES/0160-dracut-functions.sh-add-lib-modules-extras-weak-upda.patch @@ -0,0 +1,24 @@ +From e1021bd2c1ece36c5a92b7282e0f452d9d1ececc Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Mon, 28 Apr 2014 12:45:44 +0200 +Subject: [PATCH] dracut-functions.sh: add /lib/modules/*/{extras|weak-updates} + for kernel modules + +https://bugzilla.redhat.com/show_bug.cgi?id=1086291 +--- + dracut-functions.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dracut-functions.sh b/dracut-functions.sh +index bddcdcf2..cb43f7ad 100755 +--- a/dracut-functions.sh ++++ b/dracut-functions.sh +@@ -1530,7 +1530,7 @@ find_kernel_modules_by_path () { + _OLDIFS=$IFS + IFS=: + while read a rest; do +- [[ $a = */$1/* ]] || [[ $a = updates/* ]] || continue ++ [[ $a = */$1/* ]] || [[ $a = updates/* ]] || [[ $a = extra/* ]] || [[ $a = weak-updates/* ]] ||continue + printf "%s\n" "$srcmods/$a" + done < "$srcmods/modules.dep" + IFS=$_OLDIFS diff --git a/SOURCES/0161-fstab-do-not-mount-and-fsck-from-fstab-if-using-syst.patch b/SOURCES/0161-fstab-do-not-mount-and-fsck-from-fstab-if-using-syst.patch new file mode 100644 index 0000000..af4f6ad --- /dev/null +++ b/SOURCES/0161-fstab-do-not-mount-and-fsck-from-fstab-if-using-syst.patch @@ -0,0 +1,37 @@ +From f077a200564b7197048003685a153aa1b2b3e306 Mon Sep 17 00:00:00 2001 +From: WANG Chao <chaowang@redhat.com> +Date: Tue, 1 Apr 2014 15:20:49 +0800 +Subject: [PATCH] fstab: do not mount and fsck from fstab if using systemd + +If using systemd in initramfs, we could run into a race condition when +dracut and systemd both are trying to mount and run fsck for the same +filesystem, and mount or fsck could be a failure. + +To fix such failure, we should use systemd to mount/fsck from /etc/fstab +only. + +v2: check $DRACUT_SYSTEMD suggested by Alexander Tsoy + +Signed-off-by: WANG Chao <chaowang@redhat.com> +(cherry picked from commit e920bfb1e8a5917e7b0f360d1c51d200db3acbfd) +--- + modules.d/95fstab-sys/mount-sys.sh | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/modules.d/95fstab-sys/mount-sys.sh b/modules.d/95fstab-sys/mount-sys.sh +index 12711a07..a2378101 100755 +--- a/modules.d/95fstab-sys/mount-sys.sh ++++ b/modules.d/95fstab-sys/mount-sys.sh +@@ -27,7 +27,11 @@ fstab_mount() { + return 0 + } + +-[ -f /etc/fstab ] && fstab_mount /etc/fstab ++# systemd will mount and run fsck from /etc/fstab and we don't want to ++# run into a race condition. ++if [ -z "$DRACUT_SYSTEMD" ]; then ++ [ -f /etc/fstab ] && fstab_mount /etc/fstab ++fi + + # prefer $NEWROOT/etc/fstab.sys over local /etc/fstab.sys + if [ -f $NEWROOT/etc/fstab.sys ]; then diff --git a/SOURCES/0162-lvm-module-setup.sh-check-for-existance-of-69-dm-lvm.patch b/SOURCES/0162-lvm-module-setup.sh-check-for-existance-of-69-dm-lvm.patch new file mode 100644 index 0000000..2e50ea7 --- /dev/null +++ b/SOURCES/0162-lvm-module-setup.sh-check-for-existance-of-69-dm-lvm.patch @@ -0,0 +1,29 @@ +From 915618bc4fbbc631bf7661506b85fc5758f3ce26 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 3 Apr 2014 08:54:27 +0200 +Subject: [PATCH] lvm:module-setup.sh: check for existance of + 69-dm-lvm-metad.rules + +Before modifying 69-dm-lvm-metad.rules, we should check for the +existance first. Otherwise this results in error messages on +distributions (debian), which do not ship these rules. + +(cherry picked from commit 12819a579900b9691e2bfaf14e76fbb025851530) +--- + modules.d/90lvm/module-setup.sh | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh +index 1c962d54..4a49fc7d 100755 +--- a/modules.d/90lvm/module-setup.sh ++++ b/modules.d/90lvm/module-setup.sh +@@ -78,7 +78,8 @@ install() { + inst_rules 11-dm-lvm.rules 69-dm-lvm-metad.rules + + # Do not run lvmetad update via pvscan in udev rule - lvmetad is not running yet in dracut! +- if grep -q SYSTEMD_WANTS ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules; then ++ if [[ -f ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules ]] && \ ++ grep -q SYSTEMD_WANTS ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules; then + sed -i -e 's/^ENV{SYSTEMD_ALIAS}=.*/# No LVM pvscan in dracut - lvmetad is not running yet/' ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules + sed -i -e 's/^ENV{ID_MODEL}=.*//' ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules + sed -i -e 's/^ENV{SYSTEMD_WANTS}=.*//' ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules diff --git a/SOURCES/0163-dracut-initqueue-service-runs-before-remote-fs-pre.t.patch b/SOURCES/0163-dracut-initqueue-service-runs-before-remote-fs-pre.t.patch new file mode 100644 index 0000000..25bb693 --- /dev/null +++ b/SOURCES/0163-dracut-initqueue-service-runs-before-remote-fs-pre.t.patch @@ -0,0 +1,38 @@ +From 251d5b65e331b89249d4ce1b626a738874dfef06 Mon Sep 17 00:00:00 2001 +From: WANG Chao <chaowang@redhat.com> +Date: Thu, 3 Apr 2014 15:49:26 +0800 +Subject: [PATCH] dracut-initqueue service runs before remote-fs-pre.target + +With the following commit, dracut doesn't mount anything from /etc/fstab + +commit e920bfb +Author: WANG Chao <chaowang@redhat.com> +Date: Tue Apr 1 15:20:49 2014 +0800 + + fstab: do not mount and fsck from fstab if using systemd + +But systemd doesn't mount nfs at all, because no unit is pulling in +remote-fs.target. + +dracut must pull in these remote fs mount and all these remote mounts +should start only after network is up (ie. after dracut-initqueue). + +Signed-off-by: WANG Chao <chaowang@redhat.com> +(cherry picked from commit b31250e7e6e6e104674dc304ba74965bb56074d6) +--- + modules.d/98systemd/dracut-initqueue.service | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/modules.d/98systemd/dracut-initqueue.service b/modules.d/98systemd/dracut-initqueue.service +index 03dcc4eb..1b9e701b 100644 +--- a/modules.d/98systemd/dracut-initqueue.service ++++ b/modules.d/98systemd/dracut-initqueue.service +@@ -11,6 +11,8 @@ + Description=dracut initqueue hook + Documentation=man:dracut-initqueue.service(8) + DefaultDependencies=no ++Before=remote-fs-pre.target ++Wants=remote-fs-pre.target + After=systemd-udev-trigger.service + Wants=systemd-udev-trigger.service + ConditionPathExists=/etc/initrd-release diff --git a/SOURCES/0164-ifcfg-do-not-bind-persistent-interface-names-to-HWAD.patch b/SOURCES/0164-ifcfg-do-not-bind-persistent-interface-names-to-HWAD.patch new file mode 100644 index 0000000..152850e --- /dev/null +++ b/SOURCES/0164-ifcfg-do-not-bind-persistent-interface-names-to-HWAD.patch @@ -0,0 +1,63 @@ +From b990775b6f2fc8eb52d283b0745bea4a71ef751a Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 4 Apr 2014 12:48:03 +0200 +Subject: [PATCH] ifcfg: do not bind persistent interface names to HWADDR + +(cherry picked from commit fb0e5184a6506185998fd12d151f7d34d07c07b3) +--- + modules.d/40network/net-lib.sh | 27 +++++++++++++++++++++++++++ + modules.d/45ifcfg/write-ifcfg.sh | 6 +++++- + 2 files changed, 32 insertions(+), 1 deletion(-) + +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index 7430e4ce..5d4ae32c 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -516,3 +516,30 @@ find_iface_with_link() { + done + return 1 + } ++ ++is_persistent_ethernet_name() { ++ [ -f /sys/class/net/$netif/addr_assign_type ] || return 1 ++ [ "$(cat /sys/class/net/$netif/addr_assign_type)" = "0" ] || return 1 ++ ++ case "$1" in ++ # udev persistent interface names ++ eth[0-9]|eth[0-9][0-9]|eth[0-9][0-9][0-9]*) ++ ;; ++ eno[0-9]|eno[0-9][0-9]|eno[0-9][0-9][0-9]*) ++ ;; ++ ens[0-9]|ens[0-9][0-9]|ens[0-9][0-9][0-9]*) ++ ;; ++ enp[0-9]s[0-9]*|enp[0-9][0-9]s[0-9]*|enp[0-9][0-9][0-9]*s[0-9]*) ++ ;; ++ enP*p[0-9]s[0-9]*|enP*p[0-9][0-9]s[0-9]*|enP*p[0-9][0-9][0-9]*s[0-9]*) ++ ;; ++ # biosdevname ++ em[0-9]|em[0-9][0-9]|em[0-9][0-9][0-9]*) ++ ;; ++ p[0-9]p[0-9]*|p[0-9][0-9]p[0-9]*|p[0-9][0-9][0-9]*p[0-9]*) ++ ;; ++ *) ++ return 1 ++ esac ++ return 0 ++} +diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh +index 486c69a3..2631fbe2 100755 +--- a/modules.d/45ifcfg/write-ifcfg.sh ++++ b/modules.d/45ifcfg/write-ifcfg.sh +@@ -164,7 +164,11 @@ for netup in /tmp/net.*.did-setup ; do + { + [ -n "$macaddr" ] && echo "MACADDR=\"$macaddr\"" + if ! print_s390 $netif; then +- [ -n "$macaddr" ] || echo "HWADDR=\"$(cat /sys/class/net/$netif/address)\"" ++ if [ -z "$macaddr" ] && \ ++ ! is_persistent_ethernet_name "$netif" && \ ++ [ -f /sys/class/net/$netif/address ]; then ++ echo "HWADDR=\"$(cat /sys/class/net/$netif/address)\"" ++ fi + fi + echo "TYPE=Ethernet" + echo "NAME=\"$netif\"" diff --git a/SOURCES/0165-ifcfg-only-bind-to-HWADDR-if-addr_assign_type-0.patch b/SOURCES/0165-ifcfg-only-bind-to-HWADDR-if-addr_assign_type-0.patch new file mode 100644 index 0000000..c768dda --- /dev/null +++ b/SOURCES/0165-ifcfg-only-bind-to-HWADDR-if-addr_assign_type-0.patch @@ -0,0 +1,41 @@ +From 0506080aee1da03e867b1ab3f182d19bfbeae443 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 4 Apr 2014 12:52:39 +0200 +Subject: [PATCH] ifcfg: only bind to HWADDR, if addr_assign_type == 0 + +/sys/class/net/$netif/addr_assign_type is != 0 for random MAC address +interfaces + +(cherry picked from commit 2e094b20a6875fdb0a7ef8772e3d7688ad91c036) +--- + modules.d/40network/net-lib.sh | 3 --- + modules.d/45ifcfg/write-ifcfg.sh | 2 ++ + 2 files changed, 2 insertions(+), 3 deletions(-) + +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index 5d4ae32c..d53e1a6e 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -518,9 +518,6 @@ find_iface_with_link() { + } + + is_persistent_ethernet_name() { +- [ -f /sys/class/net/$netif/addr_assign_type ] || return 1 +- [ "$(cat /sys/class/net/$netif/addr_assign_type)" = "0" ] || return 1 +- + case "$1" in + # udev persistent interface names + eth[0-9]|eth[0-9][0-9]|eth[0-9][0-9][0-9]*) +diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh +index 2631fbe2..5dc351d5 100755 +--- a/modules.d/45ifcfg/write-ifcfg.sh ++++ b/modules.d/45ifcfg/write-ifcfg.sh +@@ -166,6 +166,8 @@ for netup in /tmp/net.*.did-setup ; do + if ! print_s390 $netif; then + if [ -z "$macaddr" ] && \ + ! is_persistent_ethernet_name "$netif" && \ ++ [ -f /sys/class/net/$netif/addr_assign_type ] && \ ++ [ "$(cat /sys/class/net/$netif/addr_assign_type)" = "0" ] && \ + [ -f /sys/class/net/$netif/address ]; then + echo "HWADDR=\"$(cat /sys/class/net/$netif/address)\"" + fi diff --git a/SOURCES/0166-dracut-lib.sh-fixed-return-value-of-pidof.patch b/SOURCES/0166-dracut-lib.sh-fixed-return-value-of-pidof.patch new file mode 100644 index 0000000..259941c --- /dev/null +++ b/SOURCES/0166-dracut-lib.sh-fixed-return-value-of-pidof.patch @@ -0,0 +1,38 @@ +From e5f6899a550d749f25a19043b6842609e327cceb Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 7 May 2014 13:33:14 +0200 +Subject: [PATCH] dracut-lib.sh: fixed return value of pidof() + +pidof always returned with 0, so any "while pidof" loop would not +terminate. + +Thanks "Consus" for the hint! + +(cherry picked from commit 4e58a1ffc760e5c54e6cae5924a2439cae196848) +--- + modules.d/99base/dracut-lib.sh | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh +index 62facda1..66977e73 100755 +--- a/modules.d/99base/dracut-lib.sh ++++ b/modules.d/99base/dracut-lib.sh +@@ -962,6 +962,7 @@ if ! command -v pidof >/dev/null 2>/dev/null; then + local _cmd + local _exe + local _rl ++ local _ret=1 + local i + _cmd="$1" + [ -z "$_cmd" ] && return 1 +@@ -976,8 +977,9 @@ if ! command -v pidof >/dev/null 2>/dev/null; then + fi + i=${i%/exe} + echo ${i##/proc/} ++ _ret=0 + done +- return 0 ++ return $_ret + } + fi + diff --git a/SOURCES/0167-Do-not-log-to-kmsg-syslog-and-files-for-print-cmdlin.patch b/SOURCES/0167-Do-not-log-to-kmsg-syslog-and-files-for-print-cmdlin.patch new file mode 100644 index 0000000..73813bf --- /dev/null +++ b/SOURCES/0167-Do-not-log-to-kmsg-syslog-and-files-for-print-cmdlin.patch @@ -0,0 +1,36 @@ +From a2a9a17cc6424c7b3899353ced9c425ef59f975a Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 7 May 2014 14:54:56 +0200 +Subject: [PATCH] Do not log to kmsg/syslog and files for "--print-cmdline" + +(cherry picked from commit 535f61ca4ab55aa58d9bcf3d537cc4c0d800f6c8) +--- + dracut.sh | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/dracut.sh b/dracut.sh +index a5fcf389..705f090a 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -758,6 +758,13 @@ trap 'exit 1;' SIGINT + export DRACUT_KERNEL_LAZY="1" + export DRACUT_RESOLVE_LAZY="1" + ++if [[ $print_cmdline ]]; then ++ stdloglvl=0 ++ sysloglvl=0 ++ fileloglvl=0 ++ kmsgloglvl=0 ++fi ++ + if [[ -f $dracutbasedir/dracut-functions.sh ]]; then + . $dracutbasedir/dracut-functions.sh + else +@@ -831,6 +838,7 @@ for ((i=0; i < ${#dracut_args[@]}; i++)); do + dracut_args[$i]="\"${dracut_args[$i]}\"" + #" keep vim happy + done ++ + dinfo "Executing: $0 ${dracut_args[@]}" + + [[ $do_list = yes ]] && { diff --git a/SOURCES/0168-ifcfg-write-ifcfg.sh-IPV6INIT-yes-check-also-for-non.patch b/SOURCES/0168-ifcfg-write-ifcfg.sh-IPV6INIT-yes-check-also-for-non.patch new file mode 100644 index 0000000..91ae963 --- /dev/null +++ b/SOURCES/0168-ifcfg-write-ifcfg.sh-IPV6INIT-yes-check-also-for-non.patch @@ -0,0 +1,25 @@ +From d38488e8d561a80b34e532e31c00c0801c104a23 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Mon, 12 May 2014 13:53:38 +0200 +Subject: [PATCH] ifcfg/write-ifcfg.sh: "IPV6INIT=yes" check also for non-dhcp + +(cherry picked from commit 1230f3bcffd8837e8846e60376ea2a88ef5ab257) +--- + modules.d/45ifcfg/write-ifcfg.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh +index 5dc351d5..457a9ac4 100755 +--- a/modules.d/45ifcfg/write-ifcfg.sh ++++ b/modules.d/45ifcfg/write-ifcfg.sh +@@ -120,9 +120,9 @@ for netup in /tmp/net.*.did-setup ; do + echo "ONBOOT=yes" + echo "NETBOOT=yes" + echo "UUID=\"$uuid\"" ++ strstr "$(ip -6 addr show dev $netif)" 'inet6' && echo "IPV6INIT=yes" + if [ -f /tmp/dhclient.$netif.lease ]; then + [ -f /tmp/dhclient.$netif.dhcpopts ] && . /tmp/dhclient.$netif.dhcpopts +- strstr "$(ip -6 addr show dev $netif)" 'inet6' && echo "IPV6INIT=yes" + if [ -f /tmp/net.$netif.has_ibft_config ]; then + echo "BOOTPROTO=ibft" + else diff --git a/SOURCES/0169-cms-cmssetup.sh-convert-SUBCHANNELS-to-lowercase.patch b/SOURCES/0169-cms-cmssetup.sh-convert-SUBCHANNELS-to-lowercase.patch new file mode 100644 index 0000000..bc27371 --- /dev/null +++ b/SOURCES/0169-cms-cmssetup.sh-convert-SUBCHANNELS-to-lowercase.patch @@ -0,0 +1,24 @@ +From 705c84321daeb847cecba7f1e1f8f3e23f8165f8 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Mon, 12 May 2014 14:36:08 +0200 +Subject: [PATCH] cms/cmssetup.sh: convert SUBCHANNELS to lowercase + +In udev rules, the channels need to be expressed in lower case. + +(cherry picked from commit 56d57a70ec89740dc6ddc09ea23b6fc4c3a6a531) +--- + modules.d/80cms/cmssetup.sh | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/modules.d/80cms/cmssetup.sh b/modules.d/80cms/cmssetup.sh +index 36955bc3..c9e13314 100755 +--- a/modules.d/80cms/cmssetup.sh ++++ b/modules.d/80cms/cmssetup.sh +@@ -144,6 +144,7 @@ function dasd_settle_all() { + processcmsfile() + { + source /tmp/cms.conf ++ SUBCHANNELS="$(echo $SUBCHANNELS | sed 'y/ABCDEF/abcdef/')" + + if [[ $NETTYPE ]]; then + ( diff --git a/SOURCES/0170-mdraid-module-setup.sh-fixed-print-cmdline-for-empty.patch b/SOURCES/0170-mdraid-module-setup.sh-fixed-print-cmdline-for-empty.patch new file mode 100644 index 0000000..34dcf96 --- /dev/null +++ b/SOURCES/0170-mdraid-module-setup.sh-fixed-print-cmdline-for-empty.patch @@ -0,0 +1,30 @@ +From ec158d758b880fc966f3f3e6b819ffcfbff7227d Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 14 May 2014 16:38:49 +0200 +Subject: [PATCH] mdraid/module-setup.sh: fixed print-cmdline for empty UUID + +fixes + +/usr/lib/dracut/modules.d/90mdraid/module-setup.sh: line 60: +_activated["${UUID}"]: bad array subscript + +Thanks to Jan ONDREJ for spotting this! + +(cherry picked from commit 19bb14c3467233f8c98f76b3fa57047a3a31e1a3) +--- + modules.d/90mdraid/module-setup.sh | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/modules.d/90mdraid/module-setup.sh b/modules.d/90mdraid/module-setup.sh +index 1e03847f..815a3ebc 100755 +--- a/modules.d/90mdraid/module-setup.sh ++++ b/modules.d/90mdraid/module-setup.sh +@@ -50,6 +50,8 @@ cmdline() { + done + ) + ++ [[ -z "$UUID" ]] && continue ++ + if ! [[ ${_activated[${UUID}]} ]]; then + printf "%s" " rd.md.uuid=${UUID}" + _activated["${UUID}"]=1 diff --git a/SOURCES/0171-ifcfg-write-ifcfg.sh-include-net-lib.sh.patch b/SOURCES/0171-ifcfg-write-ifcfg.sh-include-net-lib.sh.patch new file mode 100644 index 0000000..f68a004 --- /dev/null +++ b/SOURCES/0171-ifcfg-write-ifcfg.sh-include-net-lib.sh.patch @@ -0,0 +1,25 @@ +From 2a20064e44d14b2c84bf52fde9dfd3b43832a74b Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 16 May 2014 13:32:47 +0200 +Subject: [PATCH] ifcfg/write-ifcfg.sh: include net-lib.sh + +otherwise is_persistent_ethernet_name() is missing + +(cherry picked from commit 8fa1afb65cef30d56ce2e141b0b594cf780120a1) +--- + modules.d/45ifcfg/write-ifcfg.sh | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh +index 457a9ac4..7f997a2a 100755 +--- a/modules.d/45ifcfg/write-ifcfg.sh ++++ b/modules.d/45ifcfg/write-ifcfg.sh +@@ -3,6 +3,8 @@ + # ex: ts=8 sw=4 sts=4 et filetype=sh + + # NFS root might have reached here before /tmp/net.ifaces was written ++type is_persistent_ethernet_name >/dev/null 2>&1 || . /lib/net-lib.sh ++ + udevadm settle --timeout=30 + + if [ -e /tmp/bridge.info ]; then diff --git a/SOURCES/0172-nbd-nbdroot.sh-call-nbd-client-with-systemd-mark.patch b/SOURCES/0172-nbd-nbdroot.sh-call-nbd-client-with-systemd-mark.patch new file mode 100644 index 0000000..476b79b --- /dev/null +++ b/SOURCES/0172-nbd-nbdroot.sh-call-nbd-client-with-systemd-mark.patch @@ -0,0 +1,27 @@ +From 1175816c301dfc88f6ef4ecc009e1475a0d5362d Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 16 May 2014 13:33:33 +0200 +Subject: [PATCH] nbd/nbdroot.sh: call nbd-client with "--systemd-mark" + +otherwise nbd-client will get killed by systemd + +(cherry picked from commit 056a3f2427b6747d83fc48c5d1e3f85b4058c18f) +--- + modules.d/95nbd/nbdroot.sh | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/modules.d/95nbd/nbdroot.sh b/modules.d/95nbd/nbdroot.sh +index 2e9d9174..ddb38192 100755 +--- a/modules.d/95nbd/nbdroot.sh ++++ b/modules.d/95nbd/nbdroot.sh +@@ -111,6 +111,10 @@ if [ "$root" = "block:/dev/root" -o "$root" = "dhcp" ]; then + fi + fi + ++if strstr "$(nbd-client --help 2>&1)" "systemd-mark"; then ++ preopts="--systemd-mark $preopts" ++fi ++ + nbd-client $preopts "$nbdserver" $nbdport /dev/nbd0 $opts || exit 1 + + # NBD doesn't emit uevents when it gets connected, so kick it diff --git a/SOURCES/0173-fcoe-uefi-parse-uefifcoe.sh-fixed-parameter-generati.patch b/SOURCES/0173-fcoe-uefi-parse-uefifcoe.sh-fixed-parameter-generati.patch new file mode 100644 index 0000000..906bb64 --- /dev/null +++ b/SOURCES/0173-fcoe-uefi-parse-uefifcoe.sh-fixed-parameter-generati.patch @@ -0,0 +1,26 @@ +From e92a7a25321d46da1c1f9d015a20b3759de10be4 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 20 May 2014 11:22:26 +0200 +Subject: [PATCH] fcoe-uefi/parse-uefifcoe.sh: fixed parameter generation from + UEFI + +"fcoe=" was missing for the parameter specifying the interface + +(cherry picked from commit 142710269279db70fceb3e76a077f3d6a89a84a5) +--- + modules.d/95fcoe-uefi/parse-uefifcoe.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/95fcoe-uefi/parse-uefifcoe.sh b/modules.d/95fcoe-uefi/parse-uefifcoe.sh +index 0799cdd6..7b8f1a6f 100755 +--- a/modules.d/95fcoe-uefi/parse-uefifcoe.sh ++++ b/modules.d/95fcoe-uefi/parse-uefifcoe.sh +@@ -26,7 +26,7 @@ print_fcoe_uefi_conf() + esac + fi + # fcoe=eth0:nodcb +- printf "%s\n" "$dev:nodcb" ++ printf "fcoe=%s\n" "$dev:nodcb" + return 0 + } + diff --git a/SOURCES/0174-dracut-functions.sh-print_vars-fix-for-values-with-s.patch b/SOURCES/0174-dracut-functions.sh-print_vars-fix-for-values-with-s.patch new file mode 100644 index 0000000..7d88245 --- /dev/null +++ b/SOURCES/0174-dracut-functions.sh-print_vars-fix-for-values-with-s.patch @@ -0,0 +1,37 @@ +From 40a5d2c0291d4ec7d8c501fce8fb9d412235fdbb Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 20 May 2014 11:27:42 +0200 +Subject: [PATCH] dracut-functions.sh:print_vars() fix for values with spaces +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +for a variable with spaces, e.g.: +EXT_KEYMAPS='backspace keypad euro2' + +The following would occur: +print_vars: eval printf -v _value %s '$EXT_KEYMAPS' +print_vars: printf -v _value %s backspace keypad euro2 +print_vars: [[ -n backspacekeypadeuro2 ]] +print_vars: printf '%s=\"%s\"\n' EXT_KEYMAPS backspacekeypadeuro2 + +Thanks to Sebastian Köln for the fix! + +(cherry picked from commit 7a94a4326f0641396125acb2b444b562224457a1) +--- + dracut-functions.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dracut-functions.sh b/dracut-functions.sh +index cb43f7ad..915f70fa 100755 +--- a/dracut-functions.sh ++++ b/dracut-functions.sh +@@ -176,7 +176,7 @@ print_vars() { + + for _var in "$@" + do +- eval printf -v _value "%s" "\$$_var" ++ eval printf -v _value "%s" \""\$$_var"\" + [[ ${_value} ]] && printf '%s="%s"\n' "$_var" "$_value" + done + } diff --git a/SOURCES/0175-98systemd-fixup-rootfs-generator-installation-path.patch b/SOURCES/0175-98systemd-fixup-rootfs-generator-installation-path.patch new file mode 100644 index 0000000..0e830e7 --- /dev/null +++ b/SOURCES/0175-98systemd-fixup-rootfs-generator-installation-path.patch @@ -0,0 +1,29 @@ +From e23057d5376158fb4d7618f3c6f664e415670cf8 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke <hare@suse.de> +Date: Tue, 20 May 2014 11:20:10 +0200 +Subject: [PATCH] 98systemd: fixup rootfs-generator installation path + +The rootfs-generator was installed in the wrong path +in the initrd, cause it never to be run. + +References: bnc#878714 + +Signed-off-by: Hannes Reinecke <hare@suse.de> +(cherry picked from commit ed2005fa5ba7d618bbb2c63bac616fba32a17a5d) +--- + modules.d/98systemd/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh +index 52edd80e..36a0505b 100755 +--- a/modules.d/98systemd/module-setup.sh ++++ b/modules.d/98systemd/module-setup.sh +@@ -188,7 +188,7 @@ install() { + inst_script "$moddir/dracut-mount.sh" /bin/dracut-mount + inst_script "$moddir/dracut-pre-pivot.sh" /bin/dracut-pre-pivot + +- inst_script "$moddir/rootfs-generator.sh" /lib/systemd/system-generators/dracut-rootfs-generator ++ inst_script "$moddir/rootfs-generator.sh" $systemdutildir/system-generators/dracut-rootfs-generator + + inst_binary true + ln_r $(type -P true) "/usr/bin/loginctl" diff --git a/SOURCES/0176-dracut-pre-pivot-pulls-in-remote-fs.target.patch b/SOURCES/0176-dracut-pre-pivot-pulls-in-remote-fs.target.patch new file mode 100644 index 0000000..4f7272a --- /dev/null +++ b/SOURCES/0176-dracut-pre-pivot-pulls-in-remote-fs.target.patch @@ -0,0 +1,29 @@ +From 2fed6038bb9c30b903464b838b05a2ceb3412a6b Mon Sep 17 00:00:00 2001 +From: WANG Chao <chaowang@redhat.com> +Date: Fri, 4 Apr 2014 14:37:42 +0800 +Subject: [PATCH] dracut-pre-pivot pulls in remote-fs.target + +It turns out that commit f30b74e (dracut-initqueue service runs before +remote-fs-pre.target) is partial fix for remote fs mounts. Because no +one pulls in remote-fs.target, we can never start remote fs mounts. +Now pull in remote-fs.target in dracut-pre-pivot. + +Signed-off-by: WANG Chao <chaowang@redhat.com> +(cherry picked from commit ce7f408dfd473b3c2f4fdb9ddc2b2131e08007d3) +--- + modules.d/98systemd/dracut-pre-pivot.service | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/modules.d/98systemd/dracut-pre-pivot.service b/modules.d/98systemd/dracut-pre-pivot.service +index 6db1f2c0..d7c7b1d7 100644 +--- a/modules.d/98systemd/dracut-pre-pivot.service ++++ b/modules.d/98systemd/dracut-pre-pivot.service +@@ -13,6 +13,8 @@ Documentation=man:dracut-pre-pivot.service(8) + After=initrd.target initrd-parse-etc.service sysroot.mount + After=dracut-initqueue.service dracut-pre-mount.service dracut-mount.service + Before=initrd-cleanup.service ++Wants=remote-fs.target ++After=remote-fs.target + ConditionPathExists=/etc/initrd-release + ConditionDirectoryNotEmpty=|/lib/dracut/hooks/pre-pivot + ConditionDirectoryNotEmpty=|/lib/dracut/hooks/cleanup diff --git a/SOURCES/0177-kernel-modules-Fix-storage-module-selection-for-sdhc.patch b/SOURCES/0177-kernel-modules-Fix-storage-module-selection-for-sdhc.patch new file mode 100644 index 0000000..d11c4df --- /dev/null +++ b/SOURCES/0177-kernel-modules-Fix-storage-module-selection-for-sdhc.patch @@ -0,0 +1,50 @@ +From 9c45cb9c117505191f2678e25edac481ff6da9f2 Mon Sep 17 00:00:00 2001 +From: Peter Robinson <pbrobinson@gmail.com> +Date: Fri, 23 May 2014 11:54:01 +0100 +Subject: [PATCH] kernel-modules: Fix storage module selection for + sdhci/mmc/ahci + +Currently the block driver detection for generic initrd doesn't include +the SD/MMC drivers so we fail to boot generic images on any device using +those platforms as boot devices when using a generic initrd. Add logic +to detect those modules. This primarily fixes embedded ARM devices but +also likely intel tablets/dev boards and enterprise hypervisors that +have the ability to boot from SD. + +Also the ahci_init_controller misses a number of drivers that use the +libahci_platform module for the init so this fixes some missing achi +moduless too. + +Finally it cleans up the ARM storage module hacks that the above now +deals with in a more generic manner. + +Signed-off-by: <pbrobinson@gmail.com> +(cherry picked from commit 827ec27a9c36755095dda899eff75cdae78b2120) +--- + modules.d/90kernel-modules/module-setup.sh | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh +index a7803d00..603a7a19 100755 +--- a/modules.d/90kernel-modules/module-setup.sh ++++ b/modules.d/90kernel-modules/module-setup.sh +@@ -5,7 +5,7 @@ + installkernel() { + if [[ -z $drivers ]]; then + block_module_filter() { +- local _blockfuncs='ahci_init_controller|ata_scsi_ioctl|scsi_add_host|blk_cleanup_queue|register_mtd_blktrans|scsi_esp_register|register_virtio_device|usb_stor_disconnect' ++ local _blockfuncs='ahci_platform_get_resources|ata_scsi_ioctl|scsi_add_host|blk_cleanup_queue|register_mtd_blktrans|scsi_esp_register|register_virtio_device|usb_stor_disconnect|mmc_add_host|sdhci_pltfm_init' + # subfunctions inherit following FDs + local _merge=8 _side2=9 + function bmf1() { +@@ -50,9 +50,7 @@ installkernel() { + + if [[ "$(uname -p)" == arm* ]]; then + # arm specific modules +- hostonly='' instmods sdhci_esdhc_imx mmci sdhci_tegra mvsdio omap omapdrm \ +- omap_hsmmc panel-tfp410 sdhci_dove ahci_platform pata_imx sata_mv \ +- ehci-tegra mmc_block usb_storage ++ hostonly='' instmods omapdrm panel-tfp410 + fi + + # install virtual machine support diff --git a/SOURCES/0178-bonding-use-hwaddr-of-the-slave-rather-than-the-mast.patch b/SOURCES/0178-bonding-use-hwaddr-of-the-slave-rather-than-the-mast.patch new file mode 100644 index 0000000..e2c1ac1 --- /dev/null +++ b/SOURCES/0178-bonding-use-hwaddr-of-the-slave-rather-than-the-mast.patch @@ -0,0 +1,50 @@ +From 5f5c07eca2bd44967e9043fefca3dae91db010f9 Mon Sep 17 00:00:00 2001 +From: Alex Harpin <development@landsofshadow.co.uk> +Date: Tue, 6 May 2014 23:41:17 +0100 +Subject: [PATCH] bonding: use hwaddr of the slave rather than the master + +When a bonded interface is brought up, any slaves included in the bond +have their hardware address set to that of the bond master. Although +this allows an interface to be brought up on start up, when the +configuration file is imported into the booted system it prevents +the bonded interface being successfully restarted. + +The fix involves obtaining the hardware address of the slaves before +they are added to the bond and then using this value in the +configuration file. + +(cherry picked from commit 83c9ff7dbb465bedb10119bb2883d34266922180) +--- + modules.d/40network/ifup.sh | 1 + + modules.d/45ifcfg/write-ifcfg.sh | 6 +++++- + 2 files changed, 6 insertions(+), 1 deletion(-) + +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index ede01883..fd84e4cd 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -188,6 +188,7 @@ if [ -e /tmp/bond.${netif}.info ]; then + + for slave in $bondslaves ; do + ip link set $slave down ++ cat /sys/class/net/$slave/address > /tmp/net.${netif}.${slave}.hwaddr + echo "+$slave" > /sys/class/net/$bondname/bonding/slaves + linkup $slave + done +diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh +index 7f997a2a..fb388bcb 100755 +--- a/modules.d/45ifcfg/write-ifcfg.sh ++++ b/modules.d/45ifcfg/write-ifcfg.sh +@@ -206,7 +206,11 @@ for netup in /tmp/net.*.did-setup ; do + echo "TYPE=Ethernet" + echo "ONBOOT=yes" + echo "NETBOOT=yes" +- echo "HWADDR=\"$(cat /sys/class/net/$slave/address)\"" ++ if [ -e /tmp/net.${netif}.${slave}.hwaddr ]; then ++ echo "HWADDR=\"$(cat /tmp/net.${netif}.${slave}.hwaddr)\"" ++ else ++ echo "HWADDR=\"$(cat /sys/class/net/$slave/address)\"" ++ fi + echo "SLAVE=yes" + echo "MASTER=\"$netif\"" + echo "NAME=\"$slave\"" diff --git a/SOURCES/0179-network-ifup.sh-Don-t-try-to-modprobe-ipv6-if-alread.patch b/SOURCES/0179-network-ifup.sh-Don-t-try-to-modprobe-ipv6-if-alread.patch new file mode 100644 index 0000000..5858e6d --- /dev/null +++ b/SOURCES/0179-network-ifup.sh-Don-t-try-to-modprobe-ipv6-if-alread.patch @@ -0,0 +1,28 @@ +From 962bb116632480313c4b5094e554926968d8b946 Mon Sep 17 00:00:00 2001 +From: Vasiliy Tolstov <v.tolstov@selfip.ru> +Date: Mon, 26 May 2014 15:28:43 +0400 +Subject: [PATCH] network/ifup.sh: Don't try to modprobe ipv6, if already + available + +Signed-off-by: Vasiliy Tolstov <v.tolstov@selfip.ru> + +[Edited-by: Harald Hoyer] +Simplified logic. + +(cherry picked from commit 28f3f537c4ffb101c26def41c9a6a0278f9b4437) +--- + modules.d/40network/ifup.sh | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index fd84e4cd..79127f24 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -106,6 +106,7 @@ do_dhcp() { + } + + load_ipv6() { ++ [ -d /proc/sys/net/ipv6 ] && return + modprobe ipv6 + i=0 + while [ ! -d /proc/sys/net/ipv6 ]; do diff --git a/SOURCES/0180-iscsi-correctly-install-the-timeout-iscsiroot-dummy-.patch b/SOURCES/0180-iscsi-correctly-install-the-timeout-iscsiroot-dummy-.patch new file mode 100644 index 0000000..abda465 --- /dev/null +++ b/SOURCES/0180-iscsi-correctly-install-the-timeout-iscsiroot-dummy-.patch @@ -0,0 +1,25 @@ +From b66bfd5b98d3e8411df2ebfa1390d81dc5f83c09 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 11 Jun 2014 14:55:11 +0200 +Subject: [PATCH] iscsi: correctly install the timeout iscsiroot dummy call + +initqueue parses $1 as the executable command + +(cherry picked from commit 486a8f33e2edaf249e3a09c98a910094e201cf9e) +--- + modules.d/95iscsi/parse-iscsiroot.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/95iscsi/parse-iscsiroot.sh b/modules.d/95iscsi/parse-iscsiroot.sh +index 4be9d561..52a4805a 100755 +--- a/modules.d/95iscsi/parse-iscsiroot.sh ++++ b/modules.d/95iscsi/parse-iscsiroot.sh +@@ -64,7 +64,7 @@ if [ -n "$iscsi_firmware" ] ; then + netroot=${netroot:-iscsi:} + modprobe -q iscsi_boot_sysfs 2>/dev/null + modprobe -q iscsi_ibft +- initqueue --onetime --timeout "/sbin/iscsiroot dummy '$netroot' '$NEWROOT'" ++ initqueue --onetime --timeout /sbin/iscsiroot dummy "'$netroot'" "'$NEWROOT'" + fi + + # If it's not iscsi we don't continue diff --git a/SOURCES/0181-iscsi-correctly-install-the-settled-iscsiroot-dummy-.patch b/SOURCES/0181-iscsi-correctly-install-the-settled-iscsiroot-dummy-.patch new file mode 100644 index 0000000..7e2112f --- /dev/null +++ b/SOURCES/0181-iscsi-correctly-install-the-settled-iscsiroot-dummy-.patch @@ -0,0 +1,25 @@ +From 98b104e88799ad461d9322faaee4c831d35c96c4 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 11 Jun 2014 14:58:55 +0200 +Subject: [PATCH] iscsi: correctly install the settled iscsiroot dummy call + +initqueue parses $1 as the executable command + +(cherry picked from commit bb8c16d12178373f17553294603ff5187e318b51) +--- + modules.d/95iscsi/parse-iscsiroot.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/95iscsi/parse-iscsiroot.sh b/modules.d/95iscsi/parse-iscsiroot.sh +index 52a4805a..b48be387 100755 +--- a/modules.d/95iscsi/parse-iscsiroot.sh ++++ b/modules.d/95iscsi/parse-iscsiroot.sh +@@ -88,7 +88,7 @@ fi + + if [ -n "$netroot" ] && [ "$root" != "/dev/root" ] && [ "$root" != "dhcp" ]; then + if ! getargbool 1 rd.neednet >/dev/null || ! getarg "ip="; then +- initqueue --onetime --settled "/sbin/iscsiroot dummy '$netroot' '$NEWROOT'" ++ initqueue --onetime --settled /sbin/iscsiroot dummy "'$netroot'" "'$NEWROOT'" + fi + fi + diff --git a/SOURCES/0182-deprecate-ip-ibft-kernel-command-line-parameter.patch b/SOURCES/0182-deprecate-ip-ibft-kernel-command-line-parameter.patch new file mode 100644 index 0000000..d5020db --- /dev/null +++ b/SOURCES/0182-deprecate-ip-ibft-kernel-command-line-parameter.patch @@ -0,0 +1,81 @@ +From 6db59a1630f80ab4a5d6a701f3063aa5a6aaccc9 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 20 Jun 2014 14:27:09 +0200 +Subject: [PATCH] deprecate "ip=ibft" kernel command line parameter + +rd.iscsi.ibft[=1] should be used instead. + +Thing is, 'ip=ibft' is not really an ip setting, but rather a marker +that iBFT should be evaluated. + +Also removed the trigger of the warning: +"Warning: Please supply bootdev argument for multiple ip= lines" + +(cherry picked from commit 5580e4c176c92624054691a8e12cffe8622cc1a0) +--- + dracut.cmdline.7.asc | 7 ++++--- + modules.d/40network/parse-ibft.sh | 6 +++--- + modules.d/40network/parse-ip-opts.sh | 4 ++++ + 3 files changed, 11 insertions(+), 6 deletions(-) + +diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc +index 985285b4..10550eef 100644 +--- a/dracut.cmdline.7.asc ++++ b/dracut.cmdline.7.asc +@@ -437,7 +437,7 @@ USB Android phone:: + * enp0s29u1u2 + ===================== + +-**ip=**__{dhcp|on|any|dhcp6|auto6|ibft}__:: ++**ip=**__{dhcp|on|any|dhcp6|auto6}__:: + dhcp|on|any::: get ip from dhcp server from all interfaces. If root=dhcp, + loop sequentially through all interfaces (eth0, eth1, ...) and use the first + with a valid DHCP root-path. +@@ -446,8 +446,6 @@ USB Android phone:: + + dhcp6::: IPv6 DHCP + +- ibft::: iBFT autoconfiguration +- + **ip=**__<interface>__:__{dhcp|on|any|dhcp6|auto6}__[:[__<mtu>__][:__<macaddr>__]]:: + This parameter can be specified multiple times. + + +@@ -661,6 +659,9 @@ will result in + iscsistart -b --param node.session.timeo.replacement_timeout=30 + -- + ++**rd.iscsi.ibft** **rd.iscsi.ibft=1**: ++ Turn on iBFT autoconfiguration for the interfaces ++ + FCoE + ~~~~ + **fcoe=**__<edd|interface|MAC>__:__{dcb|nodcb}__:: +diff --git a/modules.d/40network/parse-ibft.sh b/modules.d/40network/parse-ibft.sh +index 9776c755..643313dc 100755 +--- a/modules.d/40network/parse-ibft.sh ++++ b/modules.d/40network/parse-ibft.sh +@@ -5,6 +5,6 @@ + command -v getarg >/dev/null || . /lib/dracut-lib.sh + command -v ibft_to_cmdline >/dev/null || . /lib/net-lib.sh + +-# If ibft is requested, read ibft vals and write ip=XXX cmdline args +-[ "ibft" = "$(getarg ip=)" ] && ibft_to_cmdline +- ++if getargbool 0 rd.iscsi.ibft -d "ip=ibft"; then ++ ibft_to_cmdline ++fi +diff --git a/modules.d/40network/parse-ip-opts.sh b/modules.d/40network/parse-ip-opts.sh +index 7e735741..b029d007 100755 +--- a/modules.d/40network/parse-ip-opts.sh ++++ b/modules.d/40network/parse-ip-opts.sh +@@ -25,6 +25,10 @@ fi + if [ -z "$NEEDBOOTDEV" ] ; then + count=0 + for p in $(getargs ip=); do ++ case "$p" in ++ ibft) ++ continue;; ++ esac + count=$(( $count + 1 )) + done + [ $count -gt 1 ] && NEEDBOOTDEV=1 diff --git a/SOURCES/0183-systemd-Optionally-include-efivarsfs-module.patch b/SOURCES/0183-systemd-Optionally-include-efivarsfs-module.patch new file mode 100644 index 0000000..33a744d --- /dev/null +++ b/SOURCES/0183-systemd-Optionally-include-efivarsfs-module.patch @@ -0,0 +1,24 @@ +From 7cab5fbf59bb0d1f654e7fbc888513367f4ea65d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= <crrodriguez@opensuse.org> +Date: Mon, 16 Jun 2014 01:13:44 -0400 +Subject: [PATCH] systemd: Optionally, include efivarsfs module + +It is, however not an error if this module can't be found. + +(cherry picked from commit f46c2fff717d0036bf3cd4d6c1c9af28eb46ceb1) +--- + modules.d/98systemd/module-setup.sh | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh +index 36a0505b..19be587a 100755 +--- a/modules.d/98systemd/module-setup.sh ++++ b/modules.d/98systemd/module-setup.sh +@@ -19,6 +19,7 @@ depends() { + + installkernel() { + instmods autofs4 ipv6 ++ instmods -s efivarfs + } + + install() { diff --git a/SOURCES/0184-98systemd-also-install-systemd-journald-dev-log.sock.patch b/SOURCES/0184-98systemd-also-install-systemd-journald-dev-log.sock.patch new file mode 100644 index 0000000..bbb3d30 --- /dev/null +++ b/SOURCES/0184-98systemd-also-install-systemd-journald-dev-log.sock.patch @@ -0,0 +1,25 @@ +From 8c1807bc970f50a034251f6e157d97ad58a9c48f Mon Sep 17 00:00:00 2001 +From: Daniel Schaal <farbing@web.de> +Date: Thu, 19 Jun 2014 11:38:25 +0200 +Subject: [PATCH] 98systemd: also install systemd-journald-dev-log.socket + +The /dev/log socket was moved to /run on systemd 214, install the +newly added socket unit. + +(cherry picked from commit 7eb0bc7bc4fdcf4ee9cde0e919eff2497c22beab) +--- + modules.d/98systemd/module-setup.sh | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh +index 19be587a..0de9d614 100755 +--- a/modules.d/98systemd/module-setup.sh ++++ b/modules.d/98systemd/module-setup.sh +@@ -103,6 +103,7 @@ install() { + $systemdsystemunitdir/sockets.target.wants/systemd-udevd-control.socket \ + $systemdsystemunitdir/sockets.target.wants/systemd-udevd-kernel.socket \ + $systemdsystemunitdir/sockets.target.wants/systemd-journald.socket \ ++ $systemdsystemunitdir/sockets.target.wants/systemd-journald-dev-log.socket \ + $systemdsystemunitdir/sysinit.target.wants/systemd-udevd.service \ + $systemdsystemunitdir/sysinit.target.wants/systemd-udev-trigger.service \ + $systemdsystemunitdir/sysinit.target.wants/kmod-static-nodes.service \ diff --git a/SOURCES/0185-lsinitrd.sh-don-t-choke-on-LZO-compressed-images.patch b/SOURCES/0185-lsinitrd.sh-don-t-choke-on-LZO-compressed-images.patch new file mode 100644 index 0000000..d3facb2 --- /dev/null +++ b/SOURCES/0185-lsinitrd.sh-don-t-choke-on-LZO-compressed-images.patch @@ -0,0 +1,29 @@ +From 491dbfe072a6ac15da28c581eba2b885cf235051 Mon Sep 17 00:00:00 2001 +From: Tobias Geerinckx <tobias.geerinckx@gmail.com> +Date: Tue, 3 Jun 2014 04:59:34 +0200 +Subject: [PATCH] lsinitrd.sh: don't choke on LZO-compressed images + +lsinitrd (and hence dracut) currently fail to list the contents of any +LZO-compressed image, and merely spit out misleading xzcat errors. + +I guess no-one actually uses them. + +(cherry picked from commit 773d6a7ded0cc717ecfb7bed6e3f52ceedfb1834) +--- + lsinitrd.sh | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/lsinitrd.sh b/lsinitrd.sh +index 7b12ab96..b36b34e2 100755 +--- a/lsinitrd.sh ++++ b/lsinitrd.sh +@@ -181,6 +181,9 @@ CAT=$({ + $'\x02\x21'*) + echo "lz4 -d -c" + ;; ++ $'\x89'LZO$'\0'*) ++ echo "lzop -d -c" ++ ;; + *) + if echo "test"|xz|xzcat --single-stream >/dev/null 2>&1; then + echo "xzcat --single-stream --" diff --git a/SOURCES/0186-usable_root-only-check-for-ld-.so.patch b/SOURCES/0186-usable_root-only-check-for-ld-.so.patch new file mode 100644 index 0000000..f3686fd --- /dev/null +++ b/SOURCES/0186-usable_root-only-check-for-ld-.so.patch @@ -0,0 +1,41 @@ +From 49fe9bc014993d1dd4a7f26e1904d7359398a6dd Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 24 Jun 2014 18:54:35 +0200 +Subject: [PATCH] usable_root(): only check for ld-*.so + +current systemd allows booting with only /usr on the root partition + +see, if we can find an elf loader + +(cherry picked from commit 7e59d550425833e9ecaa892ef9f1a9fe8160065a) +--- + modules.d/99base/dracut-lib.sh | 15 +++++++++++---- + 1 file changed, 11 insertions(+), 4 deletions(-) + +diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh +index 66977e73..417cfd8e 100755 +--- a/modules.d/99base/dracut-lib.sh ++++ b/modules.d/99base/dracut-lib.sh +@@ -730,11 +730,18 @@ $(readlink -e -q "$d")" || return 255 + + + usable_root() { +- local _d +- [ -d $1 ] || return 1 +- for _d in proc sys dev; do +- [ -e "$1"/$_d ] || return 1 ++ local _i ++ ++ [ -d "$1" ] || return 1 ++ ++ for _i in "$1"/usr/lib*/ld-*.so "$1"/lib*/ld-*.so; do ++ [ -e "$_i" ] && return 0 + done ++ ++ for _i in proc sys dev; do ++ [ -e "$1"/$_i ] || return 1 ++ done ++ + return 0 + } + diff --git a/SOURCES/0187-print-out-what-kernel-command-line-parameters-are-us.patch b/SOURCES/0187-print-out-what-kernel-command-line-parameters-are-us.patch new file mode 100644 index 0000000..aa117b6 --- /dev/null +++ b/SOURCES/0187-print-out-what-kernel-command-line-parameters-are-us.patch @@ -0,0 +1,27 @@ +From 6a9d47ce27452c56487b6c6d1a078abb7e904f67 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 24 Jun 2014 18:55:49 +0200 +Subject: [PATCH] print out, what kernel command line parameters are used + +(cherry picked from commit fbc4620f059afec6169533259e24bc06479d18f9) + +Conflicts: + modules.d/98systemd/dracut-cmdline.sh +--- + modules.d/98systemd/dracut-cmdline.sh | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/modules.d/98systemd/dracut-cmdline.sh b/modules.d/98systemd/dracut-cmdline.sh +index 36406d9d..8a5ab2ff 100755 +--- a/modules.d/98systemd/dracut-cmdline.sh ++++ b/modules.d/98systemd/dracut-cmdline.sh +@@ -15,6 +15,9 @@ type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh + [ -f /etc/initrd-release ] && . /etc/initrd-release + [ -n "$VERSION" ] && info "dracut-$VERSION" + ++info "Using kernel command line parameters:" ++getcmdline | vinfo ++ + getargbool 0 rd.udev.log-priority=info -d rd.udev.info -d -n -y rdudevinfo && echo 'udev_log="info"' >> /etc/udev/udev.conf + getargbool 0 rd.udev.log-priority=debug -d rd.udev.debug -d -n -y rdudevdebug && echo 'udev_log="debug"' >> /etc/udev/udev.conf + diff --git a/SOURCES/0188-kernel-modules-add-tegra-arm-modules.patch b/SOURCES/0188-kernel-modules-add-tegra-arm-modules.patch new file mode 100644 index 0000000..be2f788 --- /dev/null +++ b/SOURCES/0188-kernel-modules-add-tegra-arm-modules.patch @@ -0,0 +1,23 @@ +From f679f53b2ada8ab6a9d294f049517b407686f519 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 25 Jun 2014 12:02:30 +0200 +Subject: [PATCH] kernel-modules: add tegra arm modules + +(cherry picked from commit 54483dd773a67061746a146d276cb40953468132) +--- + modules.d/90kernel-modules/module-setup.sh | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh +index 603a7a19..da3b1f3f 100755 +--- a/modules.d/90kernel-modules/module-setup.sh ++++ b/modules.d/90kernel-modules/module-setup.sh +@@ -51,6 +51,8 @@ installkernel() { + if [[ "$(uname -p)" == arm* ]]; then + # arm specific modules + hostonly='' instmods omapdrm panel-tfp410 ++ instmods i2c-tegra gpio-regulator as3722-regulator \ ++ phy-tegra-usb ehci-tegra sdhci-tegra + fi + + # install virtual machine support diff --git a/SOURCES/0189-Add-rd.cmdline-ask-kernel-command-line-parameter.patch b/SOURCES/0189-Add-rd.cmdline-ask-kernel-command-line-parameter.patch new file mode 100644 index 0000000..5620098 --- /dev/null +++ b/SOURCES/0189-Add-rd.cmdline-ask-kernel-command-line-parameter.patch @@ -0,0 +1,142 @@ +From 9c2daa5d3aa1b98d5a005a78a7a2d332e7422034 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 27 Jun 2014 12:02:14 +0200 +Subject: [PATCH] Add "rd.cmdline=ask" kernel command line parameter + +prompts the user for additional kernel command line parameters + +(cherry picked from commit f232f6623d2b761c1538192c97e13842e5037adc) + +Conflicts: + dracut.cmdline.7.asc + modules.d/98systemd/dracut-cmdline.sh + modules.d/99base/init.sh +--- + dracut.cmdline.7.asc | 4 +++ + .../98systemd/dracut-cmdline-ask.service | 33 +++++++++++++++++++ + modules.d/98systemd/dracut-cmdline-ask.sh | 20 +++++++++++ + modules.d/98systemd/module-setup.sh | 2 ++ + modules.d/99base/init.sh | 8 +++++ + 5 files changed, 67 insertions(+) + create mode 100644 modules.d/98systemd/dracut-cmdline-ask.service + create mode 100755 modules.d/98systemd/dracut-cmdline-ask.sh + +diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc +index 10550eef..24bf4491 100644 +--- a/dracut.cmdline.7.asc ++++ b/dracut.cmdline.7.asc +@@ -81,6 +81,10 @@ rootfstype=ext3 + enable autoassembly of special devices like cryptoLUKS, dmraid, mdraid or + lvm. Default is off as of dracut version >= 024. + ++ ++**rd.cmdline=ask**:: ++ prompts the user for additional kernel command line parameters ++ + **rd.fstab=0**:: + do not honor special mount options for the root filesystem found in + _/etc/fstab_ of the real root. +diff --git a/modules.d/98systemd/dracut-cmdline-ask.service b/modules.d/98systemd/dracut-cmdline-ask.service +new file mode 100644 +index 00000000..9993671c +--- /dev/null ++++ b/modules.d/98systemd/dracut-cmdline-ask.service +@@ -0,0 +1,33 @@ ++# This file is part of systemd. ++# ++# systemd is free software; you can redistribute it and/or modify it ++# under the terms of the GNU Lesser General Public License as published by ++# the Free Software Foundation; either version 2.1 of the License, or ++# (at your option) any later version. ++ ++# See systemd.special(7) for details ++ ++[Unit] ++Description=dracut ask for additional cmdline parameters ++DefaultDependencies=no ++Before=dracut-cmdline.service ++After=systemd-journald.socket ++Wants=systemd-journald.socket ++ConditionPathExists=/etc/initrd-release ++ConditionKernelCommandLine=rd.cmdline=ask ++ ++[Service] ++Environment=DRACUT_SYSTEMD=1 ++Environment=NEWROOT=/sysroot ++Type=oneshot ++ExecStart=-/bin/dracut-cmdline-ask ++StandardInput=tty ++StandardOutput=inherit ++StandardError=inherit ++RemainAfterExit=yes ++KillMode=process ++IgnoreSIGPIPE=no ++ ++# Bash ignores SIGTERM, so we send SIGHUP instead, to ensure that bash ++# terminates cleanly. ++KillSignal=SIGHUP +diff --git a/modules.d/98systemd/dracut-cmdline-ask.sh b/modules.d/98systemd/dracut-cmdline-ask.sh +new file mode 100755 +index 00000000..024d60ee +--- /dev/null ++++ b/modules.d/98systemd/dracut-cmdline-ask.sh +@@ -0,0 +1,20 @@ ++#!/bin/bash ++# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- ++# ex: ts=8 sw=4 sts=4 et filetype=sh ++ ++sleep 0.5 ++echo ++sleep 0.5 ++echo ++sleep 0.5 ++echo ++echo ++echo ++echo ++echo "Enter additional kernel command line parameter (end with ctrl-d or .)" ++while read -e -p "> " line; do ++ [[ "$line" == "." ]] && break ++ [[ "$line" ]] && printf -- "%s\n" "$line" >> /etc/cmdline.d/99-cmdline-ask.conf ++done ++ ++exit 0 +diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh +index 0de9d614..015597f4 100755 +--- a/modules.d/98systemd/module-setup.sh ++++ b/modules.d/98systemd/module-setup.sh +@@ -183,6 +183,7 @@ install() { + ln_r "${systemdsystemunitdir}/initrd.target" "${systemdsystemunitdir}/default.target" + + inst_script "$moddir/dracut-cmdline.sh" /bin/dracut-cmdline ++ inst_script "$moddir/dracut-cmdline-ask.sh" /bin/dracut-cmdline-ask + inst_script "$moddir/dracut-pre-udev.sh" /bin/dracut-pre-udev + inst_script "$moddir/dracut-pre-trigger.sh" /bin/dracut-pre-trigger + inst_script "$moddir/dracut-initqueue.sh" /bin/dracut-initqueue +@@ -212,6 +213,7 @@ install() { + mkdir -p "${initdir}/$systemdsystemunitdir/initrd.target.wants" + for i in \ + dracut-cmdline.service \ ++ dracut-cmdline-ask.service \ + dracut-initqueue.service \ + dracut-mount.service \ + dracut-pre-mount.service \ +diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh +index ae73fd2c..9ee3e9dc 100755 +--- a/modules.d/99base/init.sh ++++ b/modules.d/99base/init.sh +@@ -115,6 +115,14 @@ fi + + source_conf /etc/conf.d + ++if getarg "rd.cmdline=ask"; then ++ echo "Enter additional kernel command line parameter (end with ctrl-d or .)" ++ while read -p "> " line; do ++ [ "$line" = "." ] && break ++ echo "$line" >> /etc/cmdline.d/99-cmdline-ask.conf ++ done ++fi ++ + # run scriptlets to parse the command line + make_trace_mem "hook cmdline" '1+:mem' '1+:iomem' '3+:slab' + getarg 'rd.break=cmdline' -d 'rdbreak=cmdline' && emergency_shell -n cmdline "Break before cmdline" diff --git a/SOURCES/0190-base-init.sh-use-loop-counter-with-unique-varname.patch b/SOURCES/0190-base-init.sh-use-loop-counter-with-unique-varname.patch new file mode 100644 index 0000000..a88dbfb --- /dev/null +++ b/SOURCES/0190-base-init.sh-use-loop-counter-with-unique-varname.patch @@ -0,0 +1,36 @@ +From ef6665ec410fe89af700e3257942083f4ea629a8 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 27 Jun 2014 18:05:37 +0200 +Subject: [PATCH] base/init.sh: use loop counter with unique varname + +$i can be polluted too easily + +(cherry picked from commit 6525182bfc06abfffd71dafc06c5faca6c55eace) +--- + modules.d/99base/init.sh | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh +index 9ee3e9dc..dcc62d2a 100755 +--- a/modules.d/99base/init.sh ++++ b/modules.d/99base/init.sh +@@ -231,7 +231,7 @@ source_hook pre-mount + getarg 'rd.break=mount' -d 'rdbreak=mount' && emergency_shell -n mount "Break mount" + # mount scripts actually try to mount the root filesystem, and may + # be sourced any number of times. As soon as one suceeds, no more are sourced. +-i=0 ++_i_mount=0 + while :; do + if ismounted "$NEWROOT"; then + usable_root "$NEWROOT" && break; +@@ -247,8 +247,8 @@ while :; do + fi + done + +- i=$(($i+1)) +- [ $i -gt 20 ] \ ++ _i_mount=$(($_i_mount+1)) ++ [ $_i_mount -gt 20 ] \ + && { flock -s 9 ; action_on_fail "Can't mount root filesystem" && break; } 9>/.console_lock + done + diff --git a/SOURCES/0191-ifcfg-depends-on-network.patch b/SOURCES/0191-ifcfg-depends-on-network.patch new file mode 100644 index 0000000..af02459 --- /dev/null +++ b/SOURCES/0191-ifcfg-depends-on-network.patch @@ -0,0 +1,22 @@ +From b201a3f405222ce210a364555fb2b69d07db3281 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Mon, 30 Jun 2014 11:28:08 +0200 +Subject: [PATCH] ifcfg: depends on network + +(cherry picked from commit f1a38e5294b76c60b7614ec29ed56eccc4ed078a) +--- + modules.d/45ifcfg/module-setup.sh | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/modules.d/45ifcfg/module-setup.sh b/modules.d/45ifcfg/module-setup.sh +index ce53e5ed..4299fea1 100755 +--- a/modules.d/45ifcfg/module-setup.sh ++++ b/modules.d/45ifcfg/module-setup.sh +@@ -8,6 +8,7 @@ check() { + } + + depends() { ++ echo "network" + return 0 + } + diff --git a/SOURCES/0192-test-add-udev-settle-after-sfdisk.patch b/SOURCES/0192-test-add-udev-settle-after-sfdisk.patch new file mode 100644 index 0000000..9a0c693 --- /dev/null +++ b/SOURCES/0192-test-add-udev-settle-after-sfdisk.patch @@ -0,0 +1,151 @@ +From 932169bc349be88cd31bb3bd0e19c02a532b8241 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Mon, 30 Jun 2014 11:29:37 +0200 +Subject: [PATCH] test: add udev settle after sfdisk + +(cherry picked from commit e54d961160f12e30917c1a6360f7ba32ecb0f83d) +--- + test/TEST-01-BASIC/create-root.sh | 1 + + test/TEST-02-SYSTEMD/create-root.sh | 1 + + test/TEST-03-USR-MOUNT/create-root.sh | 1 + + test/TEST-04-FULL-SYSTEMD/create-root.sh | 1 + + test/TEST-10-RAID/create-root.sh | 1 + + test/TEST-11-LVM/create-root.sh | 1 + + test/TEST-12-RAID-DEG/create-root.sh | 1 + + test/TEST-13-ENC-RAID-LVM/create-root.sh | 1 + + test/TEST-15-BTRFSRAID/create-root.sh | 9 +++++---- + test/TEST-17-LVM-THIN/create-root.sh | 1 + + 10 files changed, 14 insertions(+), 4 deletions(-) + +diff --git a/test/TEST-01-BASIC/create-root.sh b/test/TEST-01-BASIC/create-root.sh +index 96e3c339..3a62afd1 100755 +--- a/test/TEST-01-BASIC/create-root.sh ++++ b/test/TEST-01-BASIC/create-root.sh +@@ -12,6 +12,7 @@ sfdisk -C 2560 -H 2 -S 32 -L /dev/sda <<EOF + , + EOF + ++udevadm settle + mkfs.ext3 -L dracut /dev/sda2 + mkdir -p /root + mount /dev/sda2 /root +diff --git a/test/TEST-02-SYSTEMD/create-root.sh b/test/TEST-02-SYSTEMD/create-root.sh +index 682e472b..b102106e 100755 +--- a/test/TEST-02-SYSTEMD/create-root.sh ++++ b/test/TEST-02-SYSTEMD/create-root.sh +@@ -12,6 +12,7 @@ sfdisk -C 2560 -H 2 -S 32 -L /dev/sda <<EOF + , + EOF + ++udevadm settle + mkfs.ext3 -L dracut /dev/sda2 + mkdir -p /root + mount /dev/sda2 /root +diff --git a/test/TEST-03-USR-MOUNT/create-root.sh b/test/TEST-03-USR-MOUNT/create-root.sh +index 961392f6..f3cecafb 100755 +--- a/test/TEST-03-USR-MOUNT/create-root.sh ++++ b/test/TEST-03-USR-MOUNT/create-root.sh +@@ -17,6 +17,7 @@ sfdisk -C 5120 -H 2 -S 32 -L /dev/sdb <<EOF + , + EOF + ++udevadm settle + modprobe btrfs + mkfs.btrfs -L dracut /dev/sda2 + mkfs.btrfs -L dracutusr /dev/sdb2 +diff --git a/test/TEST-04-FULL-SYSTEMD/create-root.sh b/test/TEST-04-FULL-SYSTEMD/create-root.sh +index fb462abf..86ad4491 100755 +--- a/test/TEST-04-FULL-SYSTEMD/create-root.sh ++++ b/test/TEST-04-FULL-SYSTEMD/create-root.sh +@@ -17,6 +17,7 @@ sfdisk -C 10240 -H 2 -S 32 -L /dev/sdb <<EOF + , + EOF + ++udevadm settle + + mkfs.btrfs -L dracut /dev/sda2 + mkfs.btrfs -L dracutusr /dev/sdb2 +diff --git a/test/TEST-10-RAID/create-root.sh b/test/TEST-10-RAID/create-root.sh +index 68face8a..50554132 100755 +--- a/test/TEST-10-RAID/create-root.sh ++++ b/test/TEST-10-RAID/create-root.sh +@@ -12,6 +12,7 @@ sfdisk -C 2560 -H 2 -S 32 -L /dev/sda <<EOF + ,800 + ,800 + EOF ++udevadm settle + mdadm --create /dev/md0 --run --auto=yes --level=5 --raid-devices=3 /dev/sda2 /dev/sda3 /dev/sda4 + # wait for the array to finish initailizing, otherwise this sometimes fails + # randomly. +diff --git a/test/TEST-11-LVM/create-root.sh b/test/TEST-11-LVM/create-root.sh +index 0ab04968..a97fa587 100755 +--- a/test/TEST-11-LVM/create-root.sh ++++ b/test/TEST-11-LVM/create-root.sh +@@ -12,6 +12,7 @@ sfdisk -C 1280 -H 2 -S 32 -L /dev/sda <<EOF + ,400 + ,400 + EOF ++udevadm settle + for i in sda2 sda3 sda4; do + lvm pvcreate -ff -y /dev/$i ; + done && \ +diff --git a/test/TEST-12-RAID-DEG/create-root.sh b/test/TEST-12-RAID-DEG/create-root.sh +index 7561be19..699c27c0 100755 +--- a/test/TEST-12-RAID-DEG/create-root.sh ++++ b/test/TEST-12-RAID-DEG/create-root.sh +@@ -15,6 +15,7 @@ sfdisk -C 1280 -H 2 -S 32 -L /dev/sda <<EOF + ,400 + ,400 + EOF ++udevadm settle + mdadm --create /dev/md0 --run --auto=yes --level=5 --raid-devices=3 /dev/sdb /dev/sdc /dev/sdd + # wait for the array to finish initailizing, otherwise this sometimes fails + # randomly. +diff --git a/test/TEST-13-ENC-RAID-LVM/create-root.sh b/test/TEST-13-ENC-RAID-LVM/create-root.sh +index 4260e86a..af83c238 100755 +--- a/test/TEST-13-ENC-RAID-LVM/create-root.sh ++++ b/test/TEST-13-ENC-RAID-LVM/create-root.sh +@@ -13,6 +13,7 @@ sfdisk -C 2560 -H 2 -S 32 -L /dev/sda <<EOF + ,800 + ,800 + EOF ++udevadm settle + echo -n test >keyfile + cryptsetup -q luksFormat /dev/sda2 /keyfile + cryptsetup -q luksFormat /dev/sda3 /keyfile +diff --git a/test/TEST-15-BTRFSRAID/create-root.sh b/test/TEST-15-BTRFSRAID/create-root.sh +index 69f9280c..b92f9c00 100755 +--- a/test/TEST-15-BTRFSRAID/create-root.sh ++++ b/test/TEST-15-BTRFSRAID/create-root.sh +@@ -15,14 +15,15 @@ sfdisk -C 327800 -H 2 -S 32 -L /dev/sda <<EOF + ,5120 + ,5120 + EOF ++udevadm settle + mkfs.btrfs -draid10 -mraid10 -L root /dev/sda5 /dev/sda6 /dev/sda7 /dev/sda8 + udevadm settle + btrfs device scan + udevadm settle + set -e +-mkdir -p /sysroot +-mount -t btrfs /dev/sda8 /sysroot +-cp -a -t /sysroot /source/* +-umount /sysroot ++mkdir -p /sysroot ++mount -t btrfs /dev/sda8 /sysroot ++cp -a -t /sysroot /source/* ++umount /sysroot + echo "dracut-root-block-created" >/dev/sda1 + poweroff -f +diff --git a/test/TEST-17-LVM-THIN/create-root.sh b/test/TEST-17-LVM-THIN/create-root.sh +index 740704f6..416c3c3f 100755 +--- a/test/TEST-17-LVM-THIN/create-root.sh ++++ b/test/TEST-17-LVM-THIN/create-root.sh +@@ -12,6 +12,7 @@ sfdisk -C 2560 -H 2 -S 32 -L /dev/sda <<EOF + ,800 + ,800 + EOF ++udevadm settle + for i in sda2 sda3 sda4; do + lvm pvcreate -ff -y /dev/$i ; + done && \ diff --git a/SOURCES/0193-TEST-15-BTRFSRAID-install-etc-os-release.patch b/SOURCES/0193-TEST-15-BTRFSRAID-install-etc-os-release.patch new file mode 100644 index 0000000..5ae8cf3 --- /dev/null +++ b/SOURCES/0193-TEST-15-BTRFSRAID-install-etc-os-release.patch @@ -0,0 +1,24 @@ +From 17e74416c892494900f282e283211ab9a22f76db Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Mon, 30 Jun 2014 11:29:56 +0200 +Subject: [PATCH] TEST-15-BTRFSRAID: install /etc/os-release + +makes systemd switch-root happy + +(cherry picked from commit 44537b7bf89f297a8f188c93a2148d55cb7799e7) +--- + test/TEST-15-BTRFSRAID/test.sh | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/test/TEST-15-BTRFSRAID/test.sh b/test/TEST-15-BTRFSRAID/test.sh +index e6ff3517..3fc1d459 100755 +--- a/test/TEST-15-BTRFSRAID/test.sh ++++ b/test/TEST-15-BTRFSRAID/test.sh +@@ -37,6 +37,7 @@ test_setup() { + inst "$basedir/modules.d/40network/ifup.sh" "/sbin/ifup" + inst_multiple grep + inst ./test-init.sh /sbin/init ++ inst_simple /etc/os-release + find_binary plymouth >/dev/null && inst_multiple plymouth + (cd "$initdir"; mkdir -p dev sys proc etc var/run tmp ) + cp -a /etc/ld.so.conf* $initdir/etc diff --git a/SOURCES/0194-lvm-module-setup.sh-check-for-existance-of-69-dm-lvm.patch b/SOURCES/0194-lvm-module-setup.sh-check-for-existance-of-69-dm-lvm.patch new file mode 100644 index 0000000..a2c9a15 --- /dev/null +++ b/SOURCES/0194-lvm-module-setup.sh-check-for-existance-of-69-dm-lvm.patch @@ -0,0 +1,41 @@ +From 0c81abbe79938423d41093b620175d97b435feb5 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 3 Jul 2014 15:04:17 +0200 +Subject: [PATCH] lvm:module-setup.sh: check for existance of + 69-dm-lvm-metad.rules + +fixup for 12819a579900b9691e2bfaf14e76fbb025851530 + +(cherry picked from commit fecc1d69e5a12c305d93e7dca64bd690a1fe8ff5) +--- + modules.d/90lvm/module-setup.sh | 17 ++++++++++------- + 1 file changed, 10 insertions(+), 7 deletions(-) + +diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh +index 4a49fc7d..0c5890a7 100755 +--- a/modules.d/90lvm/module-setup.sh ++++ b/modules.d/90lvm/module-setup.sh +@@ -78,13 +78,16 @@ install() { + inst_rules 11-dm-lvm.rules 69-dm-lvm-metad.rules + + # Do not run lvmetad update via pvscan in udev rule - lvmetad is not running yet in dracut! +- if [[ -f ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules ]] && \ +- grep -q SYSTEMD_WANTS ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules; then +- sed -i -e 's/^ENV{SYSTEMD_ALIAS}=.*/# No LVM pvscan in dracut - lvmetad is not running yet/' ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules +- sed -i -e 's/^ENV{ID_MODEL}=.*//' ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules +- sed -i -e 's/^ENV{SYSTEMD_WANTS}=.*//' ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules +- else +- sed -i -e 's/.*lvm pvscan.*/# No LVM pvscan for in dracut - lvmetad is not running yet/' ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules ++ if [[ -f ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules ]]; then ++ if grep -q SYSTEMD_WANTS ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules; then ++ sed -i -e 's/^ENV{SYSTEMD_ALIAS}=.*/# No LVM pvscan in dracut - lvmetad is not running yet/' \ ++ ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules ++ sed -i -e 's/^ENV{ID_MODEL}=.*//' ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules ++ sed -i -e 's/^ENV{SYSTEMD_WANTS}=.*//' ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules ++ else ++ sed -i -e 's/.*lvm pvscan.*/# No LVM pvscan for in dracut - lvmetad is not running yet/' \ ++ ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules ++ fi + fi + + # Gentoo ebuild for LVM2 prior to 2.02.63-r1 doesn't install above rules diff --git a/SOURCES/0195-dracut.sh-always-copy-prelink-files-in-FIPS-mode.patch b/SOURCES/0195-dracut.sh-always-copy-prelink-files-in-FIPS-mode.patch new file mode 100644 index 0000000..7e3cfe9 --- /dev/null +++ b/SOURCES/0195-dracut.sh-always-copy-prelink-files-in-FIPS-mode.patch @@ -0,0 +1,49 @@ +From bb232c88fa47ac8970d50dc97affe7cc65bc1ce9 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 8 Jul 2014 11:50:04 +0200 +Subject: [PATCH] dracut.sh: always copy prelink files in FIPS mode + +regardless of the the prelink={yes|no} switch + +(cherry picked from commit 6cd7001b35c66a12787bc0943b9a7e83a3d443c0) +--- + dracut.sh | 26 ++++++++++++-------------- + 1 file changed, 12 insertions(+), 14 deletions(-) + +diff --git a/dracut.sh b/dracut.sh +index 705f090a..79974286 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1314,20 +1314,18 @@ if [[ $kernel_only != yes ]]; then + fi + fi + +-if [[ $do_prelink == yes ]]; then +- PRELINK_BIN="$(command -v prelink)" +- if [[ $UID = 0 ]] && [[ $PRELINK_BIN ]]; then +- if [[ $DRACUT_FIPS_MODE ]]; then +- dinfo "*** Installing prelink files ***" +- inst_multiple -o prelink /etc/prelink.conf /etc/prelink.conf.d/*.conf /etc/prelink.cache +- else +- dinfo "*** Pre-linking files ***" +- inst_multiple -o prelink /etc/prelink.conf /etc/prelink.conf.d/*.conf +- chroot "$initdir" "$PRELINK_BIN" -a +- rm -f -- "$initdir/$PRELINK_BIN" +- rm -fr -- "$initdir"/etc/prelink.* +- dinfo "*** Pre-linking files done ***" +- fi ++PRELINK_BIN="$(command -v prelink)" ++if [[ $UID = 0 ]] && [[ $PRELINK_BIN ]]; then ++ if [[ $DRACUT_FIPS_MODE ]]; then ++ dinfo "*** Installing prelink files ***" ++ inst_multiple -o prelink /etc/prelink.conf /etc/prelink.conf.d/*.conf /etc/prelink.cache ++ elif [[ $do_prelink == yes ]]; then ++ dinfo "*** Pre-linking files ***" ++ inst_multiple -o prelink /etc/prelink.conf /etc/prelink.conf.d/*.conf ++ chroot "$initdir" "$PRELINK_BIN" -a ++ rm -f -- "$initdir/$PRELINK_BIN" ++ rm -fr -- "$initdir"/etc/prelink.* ++ dinfo "*** Pre-linking files done ***" + fi + fi + diff --git a/SOURCES/0196-dracut-functions.sh-speed-up-ldconfig_paths.patch b/SOURCES/0196-dracut-functions.sh-speed-up-ldconfig_paths.patch new file mode 100644 index 0000000..b0f96e4 --- /dev/null +++ b/SOURCES/0196-dracut-functions.sh-speed-up-ldconfig_paths.patch @@ -0,0 +1,30 @@ +From 8bf70609de708380c1184bb27a561f6f253650b6 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 8 Jul 2014 12:54:21 +0200 +Subject: [PATCH] dracut-functions.sh: speed up ldconfig_paths() + +(cherry picked from commit 5ea0be0a8c83969fd0041b3e647f82fcfb365e44) +--- + dracut-functions.sh | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +diff --git a/dracut-functions.sh b/dracut-functions.sh +index 915f70fa..00025567 100755 +--- a/dracut-functions.sh ++++ b/dracut-functions.sh +@@ -60,12 +60,11 @@ ldconfig_paths() + local a i + declare -A a + for i in $( +- ldconfig -pN 2>/dev/null | while read a b c d; do +- [[ "$c" != "=>" ]] && continue +- printf "%s\n" ${d%/*}; ++ ldconfig -pN 2>/dev/null | grep -F '=>' | grep -E -v '/(lib|lib64|usr/lib|usr/lib64)/[^/]*$' | while read a b c d; do ++ d=${d%/*} ++ printf "%s\n" "$d"; + done + ); do +- [[ "$i" = "/lib" || "$i" = "/usr/lib" || "$i" = "/lib64" || "$i" = "/usr/lib64" ]] && continue + a["$i"]=1; + done; + printf "%s\n" ${!a[@]} diff --git a/SOURCES/0197-Installing-an-OS-with-VLAN-enabled-to-an-ISCSI-LUN-f.patch b/SOURCES/0197-Installing-an-OS-with-VLAN-enabled-to-an-ISCSI-LUN-f.patch new file mode 100644 index 0000000..17b21c8 --- /dev/null +++ b/SOURCES/0197-Installing-an-OS-with-VLAN-enabled-to-an-ISCSI-LUN-f.patch @@ -0,0 +1,43 @@ +From 7b8f2e7a7bdd412dd1bd776967462de8a51683b9 Mon Sep 17 00:00:00 2001 +From: "Praveen_Paladugu@Dell.com" <Praveen_Paladugu@Dell.com> +Date: Tue, 10 Jun 2014 10:35:16 -0500 +Subject: [PATCH] Installing an OS with VLAN enabled to an ISCSI LUN (from + ibft) + +When installing OS to a VLAN enabled iscsi LUN (extracted from iBFT), "/tmp/net.{xyz}.has_ibft_config" is not being set properly. + +Then anaconda installer requires 'BOOTPROTO="ibft"' populated in ifcfg of the vlan interface (ex: ibft0.20), for it to properly populate the kernel parameters post installation. The setting 'BOOTPROTO="ibft"' is populated by write-ifcfg.sh script only if the corresponding interface has a file /tmp/net.{xyz}.has_inft_config + +To get around this issue, in ibft_to_cmdline() function in net-lib.sh file, I made the following changes to populate the has_ibft_config file for the vlan interface(ex: ibft0.20): + +(cherry picked from commit f4eb0d98048d51a0782d4a7137f699de174a65e4) +--- + modules.d/40network/net-lib.sh | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index d53e1a6e..90337f3c 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -233,15 +233,20 @@ ibft_to_cmdline() { + case "$vlan" in + [0-9]*) + echo "vlan=$dev.$vlan:$dev" ++ echo $mac > /tmp/net.${dev}.${vlan}.has_ibft_config + ;; + *) + echo "vlan=$vlan:$dev" ++ echo $mac > /tmp/net.${vlan}.has_ibft_config + ;; + esac ++ else ++ echo $mac > /tmp/net.${dev}.has_ibft_config + fi ++ else ++ echo $mac > /tmp/net.${dev}.has_ibft_config + fi + +- echo $mac > /tmp/net.${dev}.has_ibft_config + done + ) >> /etc/cmdline.d/40-ibft.conf + } diff --git a/SOURCES/0198-ARM-update-modules-for-ARM-host-only-options.patch b/SOURCES/0198-ARM-update-modules-for-ARM-host-only-options.patch new file mode 100644 index 0000000..0611e20 --- /dev/null +++ b/SOURCES/0198-ARM-update-modules-for-ARM-host-only-options.patch @@ -0,0 +1,28 @@ +From 1e9926c12da04f1d31ad985dc564896124886cd8 Mon Sep 17 00:00:00 2001 +From: Peter Robinson <pbrobinson@gmail.com> +Date: Sun, 20 Jul 2014 22:20:04 +0100 +Subject: [PATCH] ARM: update modules for ARM host only options + +(cherry picked from commit 611c895772c73ebb5f769942bca5d5991adc169e) +--- + modules.d/90kernel-modules/module-setup.sh | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh +index da3b1f3f..fba2bc1a 100755 +--- a/modules.d/90kernel-modules/module-setup.sh ++++ b/modules.d/90kernel-modules/module-setup.sh +@@ -50,9 +50,10 @@ installkernel() { + + if [[ "$(uname -p)" == arm* ]]; then + # arm specific modules +- hostonly='' instmods omapdrm panel-tfp410 +- instmods i2c-tegra gpio-regulator as3722-regulator \ +- phy-tegra-usb ehci-tegra sdhci-tegra ++ hostonly='' instmods \ ++ connector-hdmi connector-dvi encoder-tfp410 \ ++ encoder-tpd12s015 i2c-tegra gpio-regulator \ ++ as3722-regulator orion-ehci ehci-tegra + fi + + # install virtual machine support diff --git a/SOURCES/0199-base-dracut-lib-pidof-turn-off-debugging.patch b/SOURCES/0199-base-dracut-lib-pidof-turn-off-debugging.patch new file mode 100644 index 0000000..bea8333 --- /dev/null +++ b/SOURCES/0199-base-dracut-lib-pidof-turn-off-debugging.patch @@ -0,0 +1,41 @@ +From e502fd3099159479c303b9ab22e344d3a07ab7a7 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 22 Jul 2014 11:51:08 +0200 +Subject: [PATCH] base/dracut-lib:pidof() turn off debugging + +(cherry picked from commit ad8638e04e4ac3641afee0e273c91aa3fb6d4278) +--- + modules.d/99base/dracut-lib.sh | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh +index 417cfd8e..be724df0 100755 +--- a/modules.d/99base/dracut-lib.sh ++++ b/modules.d/99base/dracut-lib.sh +@@ -966,13 +966,17 @@ wait_for_loginit() + # pidof version for root + if ! command -v pidof >/dev/null 2>/dev/null; then + pidof() { ++ debug_off + local _cmd + local _exe + local _rl + local _ret=1 + local i + _cmd="$1" +- [ -z "$_cmd" ] && return 1 ++ if [ -z "$_cmd" ]; then ++ debug_on ++ return 1 ++ fi + _exe=$(type -P "$1") + for i in /proc/*/exe; do + [ -e "$i" ] || continue +@@ -986,6 +990,7 @@ if ! command -v pidof >/dev/null 2>/dev/null; then + echo ${i##/proc/} + _ret=0 + done ++ debug_on + return $_ret + } + fi diff --git a/SOURCES/0200-network-add-rd.route-parameter.patch b/SOURCES/0200-network-add-rd.route-parameter.patch new file mode 100644 index 0000000..746c5e0 --- /dev/null +++ b/SOURCES/0200-network-add-rd.route-parameter.patch @@ -0,0 +1,126 @@ +From c504204de548d45a0fd0e84ba22e29f94e670dbc Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 22 Jul 2014 11:03:56 +0200 +Subject: [PATCH] network: add rd.route parameter + +(cherry picked from commit 7b46244bb94e3dfd635a8d222044ae7fc920240d) +--- + dracut.cmdline.7.asc | 15 +++++++++++- + modules.d/40network/net-lib.sh | 42 ++++++++++++++++++++++++++++++++ + modules.d/45ifcfg/write-ifcfg.sh | 3 +++ + 3 files changed, 59 insertions(+), 1 deletion(-) + +diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc +index 24bf4491..bce86084 100644 +--- a/dracut.cmdline.7.asc ++++ b/dracut.cmdline.7.asc +@@ -489,6 +489,19 @@ WARNING: Do **not** use the default kernel naming scheme for the interface name, + as it can conflict with the kernel names. So, don't use "eth[0-9]+" for the + interface name. Better name it "bootnet" or "bluesocket". + ++**rd.route=**__<net>__/__<netmask>__:__<gateway>__[:__<interface>__]:: ++ Add a static route with route options, which are separated by a colon. ++ IPv6 addresses have to be put in brackets. +++ ++[listing] ++.Example ++-- ++ rd.route=192.168.200.0/24:192.168.100.222:ens10 ++ rd.route=192.168.200.0/24:192.168.100.222 ++ rd.route=192.168.200.0/24::ens10 ++ rd.route=[2001:DB8:3::/8]:[2001:DB8:2::1]:ens10 ++-- ++ + **bootdev=**__<interface>__:: + specify network interface to use routing and netroot information from. + Required if multiple ip= lines are used. +@@ -536,7 +549,7 @@ NFS + ~~~ + **root=**\[_<server-ip>_:]__<root-dir>__[:__<nfs-options>__]:: + mount nfs share from <server-ip>:/<root-dir>, if no server-ip is given, use +- dhcp next_server. if server-ip is an IPv6 address it has to be put in ++ dhcp next_server. If server-ip is an IPv6 address it has to be put in + brackets, e.g. [2001:DB8::1]. NFS options can be appended with the prefix + ":" or "," and are seperated by ",". + +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index 90337f3c..c8f92048 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -89,6 +89,7 @@ ifdown() { + + setup_net() { + local netif="$1" f="" gw_ip="" netroot_ip="" iface="" IFACES="" ++ local _p + [ -e /tmp/net.$netif.did-setup ] && return + [ -e /sys/class/net/$netif/address ] && \ + [ -e /tmp/net.$(cat /sys/class/net/$netif/address).did-setup ] && return +@@ -103,6 +104,20 @@ setup_net() { + [ -e /tmp/net.$netif.resolv.conf ] && \ + cp -f /tmp/net.$netif.resolv.conf /etc/resolv.conf + ++ # add static route ++ for _p in $(getargs rd.route); do ++ route_to_var "$_p" || continue ++ [ -n "$route_dev" ] && [ "$route_dev" != "$netif"] && continue ++ ip route add "$route_mask" ${route_gw:+via "$route_gw"} ${route_dev:+dev "$route_dev"} ++ if strstr ":" "$route_mask"; then ++ printf -- "%s\n" "$route_mask ${route_gw:+via $route_gw} ${route_dev:+dev $route_dev}" \ ++ > /tmp/net.route6."$netif" ++ else ++ printf -- "%s\n" "$route_mask ${route_gw:+via $route_gw} ${route_dev:+dev $route_dev}" \ ++ > /tmp/net.route."$netif" ++ fi ++ done ++ + # Handle STP Timeout: arping the default gateway. + # (or the root server, if a) it's local or b) there's no gateway.) + # Note: This assumes that if no router is present the +@@ -400,6 +415,33 @@ ip_to_var() { + fi + } + ++route_to_var() { ++ local v=${1}: ++ local i ++ set -- ++ while [ -n "$v" ]; do ++ if [ "${v#\[*:*:*\]:}" != "$v" ]; then ++ # handle IPv6 address ++ i="${v%%\]:*}" ++ i="${i##\[}" ++ set -- "$@" "$i" ++ v=${v#\[$i\]:} ++ else ++ set -- "$@" "${v%%:*}" ++ v=${v#*:} ++ fi ++ done ++ ++ unset route_mask route_gw route_dev ++ case $# in ++ 2) [ -n "$1" ] && route_mask="$1"; [ -n "$2" ] && route_gw="$2" ++ return 0;; ++ 3) [ -n "$1" ] && route_mask="$1"; [ -n "$2" ] && route_gw="$2"; [ -n "$3" ] && route_dev="$3" ++ return 0;; ++ *) return 1;; ++ esac ++} ++ + parse_ifname_opts() { + local IFS=: + set $1 +diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh +index fb388bcb..5e333e45 100755 +--- a/modules.d/45ifcfg/write-ifcfg.sh ++++ b/modules.d/45ifcfg/write-ifcfg.sh +@@ -268,6 +268,9 @@ for netup in /tmp/net.*.did-setup ; do + echo "DNS${i}=\"${ns}\"" >> /tmp/ifcfg/ifcfg-$netif + i=$((i+1)) + done ++ ++ [ -f /tmp/net.route6."$netif" ] && cp /tmp/net.route6."$netif" /tmp/ifcfg/route6-"$netif" ++ [ -f /tmp/net.route."$netif" ] && cp /tmp/net.route."$netif" /tmp/ifcfg/route-"$netif" + done + + # Pass network opts diff --git a/SOURCES/0201-udev-rules-add-uaccess-and-seat-rules.patch b/SOURCES/0201-udev-rules-add-uaccess-and-seat-rules.patch new file mode 100644 index 0000000..d345b19 --- /dev/null +++ b/SOURCES/0201-udev-rules-add-uaccess-and-seat-rules.patch @@ -0,0 +1,22 @@ +From 2a1bdab6e874e182793ccd7e20feb552bf53a282 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 29 Jul 2014 14:39:38 +0200 +Subject: [PATCH] udev-rules: add uaccess and seat rules + +plymouth needs the seat rules, also without systemd +--- + modules.d/95udev-rules/module-setup.sh | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/modules.d/95udev-rules/module-setup.sh b/modules.d/95udev-rules/module-setup.sh +index 2cdcc1bf..094479a3 100755 +--- a/modules.d/95udev-rules/module-setup.sh ++++ b/modules.d/95udev-rules/module-setup.sh +@@ -31,6 +31,7 @@ install() { + 60-pcmcia.rules \ + 50-udev.rules 95-late.rules \ + 50-firmware.rules \ ++ 70-uaccess.rules 71-seat.rules 73-seat-late.rules \ + 75-net-description.rules 80-net-name-slot.rules \ + "$moddir/59-persistent-storage.rules" \ + "$moddir/61-persistent-storage.rules" diff --git a/SOURCES/0202-testsuite-mods-for-kvm-nested-in-kvm.patch b/SOURCES/0202-testsuite-mods-for-kvm-nested-in-kvm.patch new file mode 100644 index 0000000..771a322 --- /dev/null +++ b/SOURCES/0202-testsuite-mods-for-kvm-nested-in-kvm.patch @@ -0,0 +1,98 @@ +From 1e03d8eb646938732e66e0babf93c93f1b466e44 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 29 Jul 2014 16:27:35 +0200 +Subject: [PATCH] testsuite mods for kvm nested in kvm + +--- + test/TEST-01-BASIC/test.sh | 1 + + test/TEST-02-SYSTEMD/test.sh | 2 +- + test/TEST-03-USR-MOUNT/test.sh | 9 ++++----- + test/TEST-12-RAID-DEG/test.sh | 2 +- + test/TEST-14-IMSM/test.sh | 2 +- + 5 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/test/TEST-01-BASIC/test.sh b/test/TEST-01-BASIC/test.sh +index f857fd4c..5ee6d234 100755 +--- a/test/TEST-01-BASIC/test.sh ++++ b/test/TEST-01-BASIC/test.sh +@@ -87,6 +87,7 @@ test_setup() { + ) + sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ + -a "debug watchdog" \ ++ -o "plymouth" \ + -d "piix ide-gd_mod ata_piix ext3 sd_mod i6300esb ib700wdt" \ + -f $TESTDIR/initramfs.testing $KVERSION || return 1 + +diff --git a/test/TEST-02-SYSTEMD/test.sh b/test/TEST-02-SYSTEMD/test.sh +index cc9da27f..2ccf8e69 100755 +--- a/test/TEST-02-SYSTEMD/test.sh ++++ b/test/TEST-02-SYSTEMD/test.sh +@@ -83,7 +83,7 @@ test_setup() { + ) + sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ + -a "debug systemd" \ +- -o "network" \ ++ -o "network plymouth" \ + -d "piix ide-gd_mod ata_piix ext3 sd_mod" \ + -f $TESTDIR/initramfs.testing $KVERSION || return 1 + +diff --git a/test/TEST-03-USR-MOUNT/test.sh b/test/TEST-03-USR-MOUNT/test.sh +index b3d709eb..ef74d402 100755 +--- a/test/TEST-03-USR-MOUNT/test.sh ++++ b/test/TEST-03-USR-MOUNT/test.sh +@@ -5,7 +5,7 @@ TEST_DESCRIPTION="root filesystem on a btrfs filesystem with /usr subvolume" + KVERSION=${KVERSION-$(uname -r)} + + # Uncomment this to debug failures +-#DEBUGFAIL="rd.shell rd.break" ++#DEBUGFAIL="rd.shell rd.break=cmdline" + + client_run() { + local test_name="$1"; shift +@@ -20,8 +20,7 @@ client_run() { + -hdc $TESTDIR/result \ + -m 256M -smp 2 -nographic \ + -net none -kernel /boot/vmlinuz-$KVERSION \ +- -watchdog i6300esb -watchdog-action poweroff \ +- -append "root=LABEL=dracut $client_opts quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL" \ ++ -append "root=LABEL=dracut $client_opts rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 $DEBUGFAIL" \ + -initrd $TESTDIR/initramfs.testing + + if (($? != 0)); then +@@ -121,8 +120,8 @@ test_setup() { + inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules + ) + sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ +- -a "debug watchdog" \ +- -o "network" \ ++ -a "debug" \ ++ -o "network plymouth" \ + -d "piix ide-gd_mod ata_piix btrfs sd_mod i6300esb ib700wdt" \ + -f $TESTDIR/initramfs.testing $KVERSION || return 1 + +diff --git a/test/TEST-12-RAID-DEG/test.sh b/test/TEST-12-RAID-DEG/test.sh +index dfcf3dc1..26316210 100755 +--- a/test/TEST-12-RAID-DEG/test.sh ++++ b/test/TEST-12-RAID-DEG/test.sh +@@ -19,7 +19,7 @@ client_run() { + -hdc $TESTDIR/disk2.img.new \ + -hdd $TESTDIR/disk3.img.new \ + -net none -kernel /boot/vmlinuz-$KVERSION \ +- -append "$* root=LABEL=root rw rd.retry=10 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL " \ ++ -append "$* root=LABEL=root rw rd.retry=20 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $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-14-IMSM/test.sh b/test/TEST-14-IMSM/test.sh +index 9353a924..532c3489 100755 +--- a/test/TEST-14-IMSM/test.sh ++++ b/test/TEST-14-IMSM/test.sh +@@ -15,7 +15,7 @@ client_run() { + -hdc $TESTDIR/disk2 \ + -m 256M -nographic \ + -net none -kernel /boot/vmlinuz-$KVERSION \ +- -append "$* root=LABEL=root rw debug rd.retry=5 rd.debug console=ttyS0,115200n81 selinux=0 rd.info $DEBUGFAIL" \ ++ -append "$* root=LABEL=root rw debug rd.retry=20 rd.debug console=ttyS0,115200n81 selinux=0 rd.info $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/SOURCES/0203-add-kate-and-emacs-per-directory-config-files.patch b/SOURCES/0203-add-kate-and-emacs-per-directory-config-files.patch new file mode 100644 index 0000000..5a43a22 --- /dev/null +++ b/SOURCES/0203-add-kate-and-emacs-per-directory-config-files.patch @@ -0,0 +1,72 @@ +From 4de30f02c8c20238053d2c0978980160fa7e3264 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 29 Aug 2014 13:33:40 +0200 +Subject: [PATCH] add kate and emacs per directory config files + +--- + .dir-locals.el | 2 ++ + .kateconfig | 1 + + .kateproject | 9 +++++++++ + install/.kateconfig | 1 + + skipcpio/.dir-locals.el | 2 ++ + skipcpio/.kateconfig | 1 + + 6 files changed, 16 insertions(+) + create mode 100644 .dir-locals.el + create mode 100644 .kateconfig + create mode 100644 .kateproject + create mode 100644 install/.kateconfig + create mode 100644 skipcpio/.dir-locals.el + create mode 100644 skipcpio/.kateconfig + +diff --git a/.dir-locals.el b/.dir-locals.el +new file mode 100644 +index 00000000..c9ac3af3 +--- /dev/null ++++ b/.dir-locals.el +@@ -0,0 +1,2 @@ ++(setq sh-basic-offset: 4) ++(setq indent-tabs-mode nil) +diff --git a/.kateconfig b/.kateconfig +new file mode 100644 +index 00000000..86b4ce58 +--- /dev/null ++++ b/.kateconfig +@@ -0,0 +1 @@ ++kate: space-indent on; tab-width 4; indent-width 4; replace-tabs on; eol unix; +diff --git a/.kateproject b/.kateproject +new file mode 100644 +index 00000000..7a847552 +--- /dev/null ++++ b/.kateproject +@@ -0,0 +1,9 @@ ++{ ++ "name": "Kate" ++ , "files": [ { "git": 1 } ] ++ , "build": { ++ "directory": "build" ++ , "build": "make -j $(getconf _NPROCESSORS_ONLN) all" ++ , "clean": "make clean" ++ } ++} +diff --git a/install/.kateconfig b/install/.kateconfig +new file mode 100644 +index 00000000..12215289 +--- /dev/null ++++ b/install/.kateconfig +@@ -0,0 +1 @@ ++kate: space-indent on; tab-width 8; indent-width 8; replace-tabs on; eol unix; +diff --git a/skipcpio/.dir-locals.el b/skipcpio/.dir-locals.el +new file mode 100644 +index 00000000..fd49d53a +--- /dev/null ++++ b/skipcpio/.dir-locals.el +@@ -0,0 +1,2 @@ ++(setq c-basic-offset 8) ++(setq indent-tabs-mode nil) +diff --git a/skipcpio/.kateconfig b/skipcpio/.kateconfig +new file mode 100644 +index 00000000..12215289 +--- /dev/null ++++ b/skipcpio/.kateconfig +@@ -0,0 +1 @@ ++kate: space-indent on; tab-width 8; indent-width 8; replace-tabs on; eol unix; diff --git a/SOURCES/0204-ssh-client-handle-etc-ssh-ssh_config.patch b/SOURCES/0204-ssh-client-handle-etc-ssh-ssh_config.patch new file mode 100644 index 0000000..99dc291 --- /dev/null +++ b/SOURCES/0204-ssh-client-handle-etc-ssh-ssh_config.patch @@ -0,0 +1,34 @@ +From 828fd83bc1816bacb24b13106f935b2fbd0964a4 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 29 Aug 2014 14:06:57 +0200 +Subject: [PATCH] ssh-client: handle /etc/ssh/ssh_config + +- disable ProxyCommand +- install the GlobalKnownHostsFile + +https://bugzilla.redhat.com/show_bug.cgi?id=1086778 +--- + modules.d/95ssh-client/module-setup.sh | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/modules.d/95ssh-client/module-setup.sh b/modules.d/95ssh-client/module-setup.sh +index 66e5307d..f60e9631 100755 +--- a/modules.d/95ssh-client/module-setup.sh ++++ b/modules.d/95ssh-client/module-setup.sh +@@ -41,7 +41,15 @@ inst_sshenv() + + # Copy over root and system-wide ssh configs. + [[ -f /root/.ssh/config ]] && inst_simple /root/.ssh/config +- [[ -f /etc/ssh/ssh_config ]] && inst_simple /etc/ssh/ssh_config ++ if [[ -f /etc/ssh/ssh_config ]]; then ++ inst_simple /etc/ssh/ssh_config ++ sed -i -e 's/\(^[[:space:]]*\)ProxyCommand/\1# ProxyCommand/' ${initdir}/etc/ssh/ssh_config ++ while read key val; do ++ [[ key != "GlobalKnownHostsFile" ]] && continue ++ inst_simple "$val" ++ break ++ done < /etc/ssh/ssh_config ++ fi + + return 0 + } diff --git a/SOURCES/0205-dracut-lib.sh-cancel_wait_for_dev-fixed-double-escap.patch b/SOURCES/0205-dracut-lib.sh-cancel_wait_for_dev-fixed-double-escap.patch new file mode 100644 index 0000000..3077830 --- /dev/null +++ b/SOURCES/0205-dracut-lib.sh-cancel_wait_for_dev-fixed-double-escap.patch @@ -0,0 +1,22 @@ +From 8715aa00a9f046ff923dffb1f36e9a6d09f31249 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 21 Aug 2014 16:38:35 +0200 +Subject: [PATCH] dracut-lib.sh:cancel_wait_for_dev() fixed double escape + +--- + modules.d/99base/dracut-lib.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh +index be724df0..b0ac08a0 100755 +--- a/modules.d/99base/dracut-lib.sh ++++ b/modules.d/99base/dracut-lib.sh +@@ -905,7 +905,7 @@ wait_for_dev() + cancel_wait_for_dev() + { + local _name +- _name="$(str_replace "$1" '/' '\\x2f')" ++ _name="$(str_replace "$1" '/' '\x2f')" + rm -f -- "$hookdir/initqueue/finished/devexists-${_name}.sh" + rm -f -- "$hookdir/emergency/80-${_name}.sh" + if [ -n "$DRACUT_SYSTEMD" ]; then diff --git a/SOURCES/0206-Do-not-reload-systemd-with-wait_for_dev.patch b/SOURCES/0206-Do-not-reload-systemd-with-wait_for_dev.patch new file mode 100644 index 0000000..e94278f --- /dev/null +++ b/SOURCES/0206-Do-not-reload-systemd-with-wait_for_dev.patch @@ -0,0 +1,102 @@ +From 5648ff27e2df826bfb5721f115de83497ac5fb58 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 5 Feb 2014 13:12:29 +0100 +Subject: [PATCH] Do not reload systemd with wait_for_dev + +--- + modules.d/90dmsquash-live/dmsquash-live-genrules.sh | 2 +- + modules.d/90dmsquash-live/parse-dmsquash-live.sh | 2 +- + modules.d/90livenet/parse-livenet.sh | 2 +- + modules.d/90lvm/parse-lvm.sh | 2 +- + modules.d/95iscsi/iscsiroot.sh | 2 +- + modules.d/95nbd/nbdroot.sh | 2 +- + modules.d/95nbd/parse-nbdroot.sh | 2 +- + 7 files changed, 7 insertions(+), 7 deletions(-) + +diff --git a/modules.d/90dmsquash-live/dmsquash-live-genrules.sh b/modules.d/90dmsquash-live/dmsquash-live-genrules.sh +index b27fccc3..0f51ed46 100755 +--- a/modules.d/90dmsquash-live/dmsquash-live-genrules.sh ++++ b/modules.d/90dmsquash-live/dmsquash-live-genrules.sh +@@ -9,7 +9,7 @@ case "$root" in + printf 'SYMLINK=="%s", RUN+="/sbin/initqueue --settled --onetime --unique /sbin/dmsquash-live-root $env{DEVNAME}"\n' \ + ${root#live:/dev/} + } >> /etc/udev/rules.d/99-live-squash.rules +- wait_for_dev "${root#live:}" ++ wait_for_dev -n "${root#live:}" + ;; + live:*) + if [ -f "${root#live:}" ]; then +diff --git a/modules.d/90dmsquash-live/parse-dmsquash-live.sh b/modules.d/90dmsquash-live/parse-dmsquash-live.sh +index a5564e20..6e54dfe7 100755 +--- a/modules.d/90dmsquash-live/parse-dmsquash-live.sh ++++ b/modules.d/90dmsquash-live/parse-dmsquash-live.sh +@@ -56,4 +56,4 @@ info "root was $liveroot, is now $root" + # make sure that init doesn't complain + [ -z "$root" ] && root="live" + +-wait_for_dev /dev/mapper/live-rw ++wait_for_dev -n /dev/mapper/live-rw +diff --git a/modules.d/90livenet/parse-livenet.sh b/modules.d/90livenet/parse-livenet.sh +index 6c847baa..a6b28423 100755 +--- a/modules.d/90livenet/parse-livenet.sh ++++ b/modules.d/90livenet/parse-livenet.sh +@@ -27,7 +27,7 @@ if get_url_handler "$liveurl" >/dev/null; then + netroot="livenet:$liveurl" + root="livenet" # quiet complaints from init + rootok=1 +- wait_for_dev /dev/root ++ wait_for_dev -n /dev/root + else + info "livenet: no url handler for $liveurl" + fi +diff --git a/modules.d/90lvm/parse-lvm.sh b/modules.d/90lvm/parse-lvm.sh +index 74e1d43b..d69cb455 100755 +--- a/modules.d/90lvm/parse-lvm.sh ++++ b/modules.d/90lvm/parse-lvm.sh +@@ -13,7 +13,7 @@ if ! getargbool 1 rd.lvm -d -n rd_NO_LVM \ + rm -f -- /etc/udev/rules.d/64-lvm*.rules + else + for dev in $LV_DEVS; do +- wait_for_dev "/dev/$dev" ++ wait_for_dev -n "/dev/$dev" + done + fi + +diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh +index 54f49903..1de6fb75 100755 +--- a/modules.d/95iscsi/iscsiroot.sh ++++ b/modules.d/95iscsi/iscsiroot.sh +@@ -156,7 +156,7 @@ handle_netroot() + printf 'SYMLINK=="disk/by-path/*-iscsi-*-%s", SYMLINK+="root"\n' $iscsi_lun >> /etc/udev/rules.d/99-iscsi-root.rules + udevadm control --reload + write_fs_tab /dev/root +- wait_for_dev /dev/root ++ wait_for_dev -n /dev/root + + # install mount script + [ -z "$DRACUT_SYSTEMD" ] && \ +diff --git a/modules.d/95nbd/nbdroot.sh b/modules.d/95nbd/nbdroot.sh +index ddb38192..8bfbebcb 100755 +--- a/modules.d/95nbd/nbdroot.sh ++++ b/modules.d/95nbd/nbdroot.sh +@@ -102,7 +102,7 @@ if [ "$root" = "block:/dev/root" -o "$root" = "dhcp" ]; then + udevadm control --reload + type write_fs_tab >/dev/null 2>&1 || . /lib/fs-lib.sh + write_fs_tab /dev/root "$nbdfstype" "$fsopts" +- wait_for_dev /dev/root ++ wait_for_dev -n /dev/root + + if [ -z "$DRACUT_SYSTEMD" ]; then + printf '/bin/mount %s\n' \ +diff --git a/modules.d/95nbd/parse-nbdroot.sh b/modules.d/95nbd/parse-nbdroot.sh +index 49c44b6f..fe5a7fa4 100755 +--- a/modules.d/95nbd/parse-nbdroot.sh ++++ b/modules.d/95nbd/parse-nbdroot.sh +@@ -61,6 +61,6 @@ rootok=1 + # Shut up init error check + if [ -z "$root" ]; then + root=block:/dev/root +- wait_for_dev /dev/root ++ wait_for_dev -n /dev/root + fi + diff --git a/SOURCES/0207-lsinird-Adding-option-m-mod-to-list-dracut-modules-i.patch b/SOURCES/0207-lsinird-Adding-option-m-mod-to-list-dracut-modules-i.patch new file mode 100644 index 0000000..4c9a668 --- /dev/null +++ b/SOURCES/0207-lsinird-Adding-option-m-mod-to-list-dracut-modules-i.patch @@ -0,0 +1,126 @@ +From 564c0c4577dfd676472f4a41798909470fee6744 Mon Sep 17 00:00:00 2001 +From: Hari Bathini <hbathini@linux.vnet.ibm.com> +Date: Mon, 2 Jun 2014 16:27:37 +0530 +Subject: [PATCH] lsinird: Adding option "-m|--mod" to list dracut modules in + the image + +This patch adds option "-m|--mod" to lsinitrd to list dracut +modules in the image because sometimes having an option to +only list the dracut modules in the image could be handy. + +Sample output: +-------------- + +[hbathini@localhost dracut]$ sudo ./lsinitrd.sh initramfs-3.11.10-100.fc18.x86_64.img -m +Image: initramfs-3.11.10-100.fc18.x86_64.img: 33M +======================================================================== +Version: dracut-029-1.fc18.2 + +dracut modules: +i18n +network +ifcfg +drm +plymouth +btrfs +crypt +dm +dmraid +kernel-modules +lvm +mdraid +cifs +iscsi +nfs +resume +rootfs-block +terminfo +udev-rules +biosdevname +systemd +usrmount +base +fs-lib +shutdown +======================================================================== + +Signed-off-by: Hari Bathini <hbathini@linux.vnet.ibm.com> +(cherry picked from commit 05d2a14526042417a4a2b1b3d003738b51ab3df7) +--- + lsinitrd.sh | 29 ++++++++++++++++++++++++----- + 1 file changed, 24 insertions(+), 5 deletions(-) + +diff --git a/lsinitrd.sh b/lsinitrd.sh +index b36b34e2..b086a635 100755 +--- a/lsinitrd.sh ++++ b/lsinitrd.sh +@@ -27,6 +27,7 @@ usage() + echo + echo "-h, --help print a help message and exit." + echo "-s, --size sort the contents of the initramfs by size." ++ echo "-m, --mod list modules." + echo "-f, --file <filename> print the contents of <filename>." + echo "-k, --kver <kernel version> inspect the initramfs of <kernel version>." + echo +@@ -37,13 +38,15 @@ usage() + [[ $dracutbasedir ]] || dracutbasedir=/usr/lib/dracut + + sorted=0 ++modules=0 + declare -A filenames + + unset POSIXLY_CORRECT + TEMP=$(getopt \ +- -o "shf:k:" \ ++ -o "shmf:k:" \ + --long kver: \ + --long file: \ ++ --long mod \ + --long help \ + --long size \ + -- "$@") +@@ -61,6 +64,7 @@ while (($# > 0)); do + -f|--file) filenames[${2#/}]=1; shift;; + -s|--size) sorted=1;; + -h|--help) usage; exit 0;; ++ -m|--mod) modules=1;; + --) shift;break;; + *) usage; exit 1;; + esac +@@ -119,6 +123,13 @@ extract_files() + done + } + ++list_modules() ++{ ++ echo "dracut modules:" ++ $CAT "$image" | cpio --extract --verbose --quiet --to-stdout -- 'lib/dracut/modules.txt' 'usr/lib/dracut/modules.txt' 2>/dev/null ++ ((ret+=$?)) ++} ++ + list_files() + { + echo "========================================================================" +@@ -211,10 +222,18 @@ if (( ${#filenames[@]} > 0 )); then + else + version=$($CAT "$image" | cpio --extract --verbose --quiet --to-stdout -- 'lib/dracut/dracut-*' 'usr/lib/dracut/dracut-*' 2>/dev/null) + ((ret+=$?)) +- echo "$version with dracut modules:" +- $CAT "$image" | cpio --extract --verbose --quiet --to-stdout -- '*lib/dracut/modules.txt' 2>/dev/null +- ((ret+=$?)) +- list_files ++ echo "Version: $version" ++ echo ++ if [ "$modules" -eq 1 ]; then ++ list_modules ++ echo "========================================================================" ++ else ++ echo -n "Arguments: " ++ $CAT "$image" | cpio --extract --verbose --quiet --to-stdout -- 'lib/dracut/build-parameter.txt' 'usr/lib/dracut/build-parameter.txt' 2>/dev/null ++ echo ++ list_modules ++ list_files ++ fi + fi + + exit $ret diff --git a/SOURCES/0208-dracut.sh-also-mkdir-run-lock-which-is-copied-to.patch b/SOURCES/0208-dracut.sh-also-mkdir-run-lock-which-is-copied-to.patch new file mode 100644 index 0000000..1c2b203 --- /dev/null +++ b/SOURCES/0208-dracut.sh-also-mkdir-run-lock-which-is-copied-to.patch @@ -0,0 +1,23 @@ +From c2ce987e383cac856d4e6c84a715324e148bd3c5 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 16 Oct 2013 11:31:54 +0200 +Subject: [PATCH] dracut.sh: also mkdir /run/lock, which is copied to + +(cherry picked from commit 68b736b50fbd6bb952d9499296ec70a218e1f5da) +--- + dracut.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dracut.sh b/dracut.sh +index 79974286..bcdc2d8a 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1129,7 +1129,7 @@ if [[ $kernel_only != yes ]]; then + fi + done + +- for d in dev proc sys sysroot root run run/lock run/initramfs; do ++ for d in dev proc sys sysroot root run run/log run/lock run/initramfs; do + if [ -L "/$d" ]; then + inst_symlink "/$d" + else diff --git a/SOURCES/0209-dracut.sh-no-need-to-make-subdirs-in-run.patch b/SOURCES/0209-dracut.sh-no-need-to-make-subdirs-in-run.patch new file mode 100644 index 0000000..19d100b --- /dev/null +++ b/SOURCES/0209-dracut.sh-no-need-to-make-subdirs-in-run.patch @@ -0,0 +1,23 @@ +From c46be834925dfa2b686e9f946792d94bf2ddbeab Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 16 Oct 2013 11:39:17 +0200 +Subject: [PATCH] dracut.sh: no need to make subdirs in run + +(cherry picked from commit 8d89fc6bb1b5b1f4c8be0694a1e1200a09ae07d1) +--- + dracut.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dracut.sh b/dracut.sh +index bcdc2d8a..7d5c9e07 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1129,7 +1129,7 @@ if [[ $kernel_only != yes ]]; then + fi + done + +- for d in dev proc sys sysroot root run run/log run/lock run/initramfs; do ++ for d in dev proc sys sysroot root run; do + if [ -L "/$d" ]; then + inst_symlink "/$d" + else diff --git a/SOURCES/0210-dracut-functions.sh-do-not-force-require-modules.bui.patch b/SOURCES/0210-dracut-functions.sh-do-not-force-require-modules.bui.patch new file mode 100644 index 0000000..d4b1e24 --- /dev/null +++ b/SOURCES/0210-dracut-functions.sh-do-not-force-require-modules.bui.patch @@ -0,0 +1,42 @@ +From 52923f5f2a3890449d59aa8a251f9116ab260e7f Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 5 Dec 2013 15:06:06 +0100 +Subject: [PATCH] dracut-functions.sh: do not force require modules.builtin* + +(cherry picked from commit b29cb51654db13706c7356aa827e554456b25b0a) +--- + dracut-functions.sh | 7 ------- + dracut.sh | 2 +- + 2 files changed, 1 insertion(+), 8 deletions(-) + +diff --git a/dracut-functions.sh b/dracut-functions.sh +index 00025567..8a0cd301 100755 +--- a/dracut-functions.sh ++++ b/dracut-functions.sh +@@ -1455,13 +1455,6 @@ dracut_kernel_post() { + wait $_pid + fi + +- 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 +diff --git a/dracut.sh b/dracut.sh +index 7d5c9e07..f560dd1e 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -518,7 +518,7 @@ if [[ $regenerate_all == "yes" ]]; then + + cd /lib/modules + for i in *; do +- [[ -f $i/modules.builtin ]] || continue ++ [[ -f $i/modules.dep ]] || [[ -f $i/modules.dep.bin ]] || continue + dracut --kver="$i" "${dracut_args[@]}" + ((ret+=$?)) + done diff --git a/SOURCES/0211-Make-logfile-configurable.patch b/SOURCES/0211-Make-logfile-configurable.patch new file mode 100644 index 0000000..616d52f --- /dev/null +++ b/SOURCES/0211-Make-logfile-configurable.patch @@ -0,0 +1,68 @@ +From 81a6e87f0f183c1ddf8808bb52be09e3070caefd Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke <hare@suse.de> +Date: Fri, 29 Nov 2013 13:13:49 +0100 +Subject: [PATCH] Make logfile configurable + +Add '--logfile' option to make the log file configurable during +runtime. + +Signed-off-by: Hannes Reinecke <hare@suse.de> +(cherry picked from commit ee54b8404c10e29e5bddb633a4c7becb7acb0632) +--- + dracut.8.asc | 6 ++++++ + dracut.sh | 4 ++++ + 2 files changed, 10 insertions(+) + +diff --git a/dracut.8.asc b/dracut.8.asc +index f97074a2..14ce26b6 100644 +--- a/dracut.8.asc ++++ b/dracut.8.asc +@@ -275,6 +275,12 @@ Default: + + **--sshkey** _<sshkey file>_:: ssh key file used with ssh-client module. + ++**--logfile** _<logfile>_:: logfile to use; overrides any setting from ++ the configuration files. +++ ++Default: ++ _/var/log/dracut.log_ ++ + **-l, --local**:: + activates the local mode. dracut will use modules from the current working + directory instead of the system-wide installed modules in +diff --git a/dracut.sh b/dracut.sh +index f560dd1e..8e5e86f7 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -187,6 +187,7 @@ Creates initial ramdisk images for preloading modules + --keep Keep the temporary initramfs for debugging purposes + --printsize Print out the module install size + --sshkey [SSHKEY] Add ssh key to initramfs (use with ssh-client module) ++ --logfile [FILE] Logfile to use (overrides configuration setting) + + If [LIST] has multiple arguments, then you have to put these in quotes. + +@@ -340,6 +341,7 @@ TEMP=$(unset POSIXLY_CORRECT; getopt \ + --long debug \ + --long profile \ + --long sshkey: \ ++ --long logfile: \ + --long verbose \ + --long quiet \ + --long local \ +@@ -430,6 +432,7 @@ while :; do + --debug) debug="yes";; + --profile) profile="yes";; + --sshkey) sshkey="$2"; shift;; ++ --logfile) logfile_l="$2"; shift;; + -v|--verbose) ((verbosity_mod_l++));; + -q|--quiet) ((verbosity_mod_l--));; + -l|--local) +@@ -709,6 +712,7 @@ stdloglvl=$((stdloglvl + verbosity_mod_l)) + [[ $ro_mnt_l ]] && ro_mnt="yes" + [[ $early_microcode_l ]] && early_microcode=$early_microcode_l + [[ $early_microcode ]] || early_microcode=no ++[[ $logfile_l ]] && logfile="$logfile_l" + # eliminate IFS hackery when messing with fw_dir + fw_dir=${fw_dir//:/ } + diff --git a/SOURCES/0212-Dracut-Add-a-new-argument-rebuild.patch b/SOURCES/0212-Dracut-Add-a-new-argument-rebuild.patch new file mode 100644 index 0000000..84577ab --- /dev/null +++ b/SOURCES/0212-Dracut-Add-a-new-argument-rebuild.patch @@ -0,0 +1,440 @@ +From f2c5c5c961a91765640f381ec37af085dc91312b Mon Sep 17 00:00:00 2001 +From: Hari Bathini <hbathini@linux.vnet.ibm.com> +Date: Thu, 16 Jan 2014 12:11:27 +0530 +Subject: [PATCH] Dracut: Add a new argument "--rebuild" + +Add "rebuild" option to dracut to append the current arguments +to those with which the input initramfs image was built. This +option helps in incrementally building initramfs for testing. + + Usage: dracut [output_file] --rebuild input_file + +If optional output file is not provided, input file provided to +rebuild will be used as output file. + +This patch alters the creation of the initramfs image by adding +the file "/tmp/params.txt" to the image. Command line parameters +excluding "--rebuild", input & output image names and "kernel +version" are stored in this file. In case "--rebuild" parameter +is specified, "/tmp/params.txt" file, if present in input image, +is read and its contents "prepend"ed to the current command line +parameters, that is if such a file is already present. Also, it +stores the cumulative parameters to the file "/tmp/params.txt", +in the new image. This patch has been tested successfully on a +PowerBox with f19. It does not alter the behaviour of any of the +existing options. + +Signed-off-by: Manik Bajpai <manibajp@linux.vnet.ibm.com> +Signed-off-by: Hari Bathini <hbathini@linux.vnet.ibm.com> + +[Edited-by: Harald Hoyer] +Simplified the cpio extraction process by using 'lsinitrd'. + +(cherry picked from commit 659dc319d950999f8d191a81fdc4d3114e9213de) +--- + dracut.sh | 342 +++++++++++++++++++++++++++++++++--------------------- + 1 file changed, 210 insertions(+), 132 deletions(-) + +diff --git a/dracut.sh b/dracut.sh +index 8e5e86f7..eff096e5 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -70,6 +70,7 @@ Creates initial ramdisk images for preloading modules + --kver [VERSION] Set kernel version to [VERSION]. + -f, --force Overwrite existing initramfs file. + -a, --add [LIST] Add a space-separated list of dracut modules. ++ --rebuild Append arguments to those of existing image and rebuild + -m, --modules [LIST] Specify a space-separated list of dracut modules to + call when building the initramfs. Modules are located + in /usr/lib/dracut/modules.d. +@@ -283,132 +284,213 @@ dropindirs_sort() + } + } + ++rearrange_params() ++{ ++ # Workaround -i, --include taking 2 arguments ++ set -- "${@/--include/++include}" ++ ++ # This prevents any long argument ending with "-i" ++ # -i, like --opt-i but I think we can just prevent that ++ set -- "${@/%-i/++include}" ++ ++ TEMP=$(unset POSIXLY_CORRECT; getopt \ ++ -o "a:m:o:d:I:k:c:L:fvqlHhMN" \ ++ --long kver: \ ++ --long add: \ ++ --long force-add: \ ++ --long add-drivers: \ ++ --long omit-drivers: \ ++ --long modules: \ ++ --long omit: \ ++ --long drivers: \ ++ --long filesystems: \ ++ --long install: \ ++ --long fwdir: \ ++ --long libdirs: \ ++ --long fscks: \ ++ --long add-fstab: \ ++ --long mount: \ ++ --long device: \ ++ --long add-device: \ ++ --long nofscks: \ ++ --long ro-mnt \ ++ --long kmoddir: \ ++ --long conf: \ ++ --long confdir: \ ++ --long tmpdir: \ ++ --long stdlog: \ ++ --long compress: \ ++ --long prefix: \ ++ --long rebuild: \ ++ --long force \ ++ --long kernel-only \ ++ --long no-kernel \ ++ --long print-cmdline \ ++ --long kernel-cmdline: \ ++ --long strip \ ++ --long nostrip \ ++ --long prelink \ ++ --long noprelink \ ++ --long hardlink \ ++ --long nohardlink \ ++ --long noprefix \ ++ --long mdadmconf \ ++ --long nomdadmconf \ ++ --long lvmconf \ ++ --long nolvmconf \ ++ --long debug \ ++ --long profile \ ++ --long sshkey: \ ++ --long logfile: \ ++ --long verbose \ ++ --long quiet \ ++ --long local \ ++ --long hostonly \ ++ --long host-only \ ++ --long no-hostonly \ ++ --long no-host-only \ ++ --long hostonly-cmdline \ ++ --long no-hostonly-cmdline \ ++ --long persistent-policy: \ ++ --long fstab \ ++ --long help \ ++ --long bzip2 \ ++ --long lzma \ ++ --long xz \ ++ --long lzo \ ++ --long lz4 \ ++ --long no-compress \ ++ --long gzip \ ++ --long list-modules \ ++ --long show-modules \ ++ --long keep \ ++ --long printsize \ ++ --long regenerate-all \ ++ --long noimageifnotneeded \ ++ --long early-microcode \ ++ --long no-early-microcode \ ++ -- "$@") ++ ++ if (( $? != 0 )); then ++ usage ++ exit 1 ++ fi ++} ++ + verbosity_mod_l=0 + unset kernel + unset outfile + +-# Workaround -i, --include taking 2 arguments +-set -- "${@/--include/++include}" +- +-# This prevents any long argument ending with "-i" +-# -i, like --opt-i but I think we can just prevent that +-set -- "${@/%-i/++include}" +- +-TEMP=$(unset POSIXLY_CORRECT; getopt \ +- -o "a:m:o:d:I:k:c:L:fvqlHhMN" \ +- --long kver: \ +- --long add: \ +- --long force-add: \ +- --long add-drivers: \ +- --long omit-drivers: \ +- --long modules: \ +- --long omit: \ +- --long drivers: \ +- --long filesystems: \ +- --long install: \ +- --long fwdir: \ +- --long libdirs: \ +- --long fscks: \ +- --long add-fstab: \ +- --long mount: \ +- --long device: \ +- --long add-device: \ +- --long nofscks: \ +- --long ro-mnt \ +- --long kmoddir: \ +- --long conf: \ +- --long confdir: \ +- --long tmpdir: \ +- --long stdlog: \ +- --long compress: \ +- --long prefix: \ +- --long force \ +- --long kernel-only \ +- --long no-kernel \ +- --long print-cmdline \ +- --long kernel-cmdline: \ +- --long strip \ +- --long nostrip \ +- --long prelink \ +- --long noprelink \ +- --long hardlink \ +- --long nohardlink \ +- --long noprefix \ +- --long mdadmconf \ +- --long nomdadmconf \ +- --long lvmconf \ +- --long nolvmconf \ +- --long debug \ +- --long profile \ +- --long sshkey: \ +- --long logfile: \ +- --long verbose \ +- --long quiet \ +- --long local \ +- --long hostonly \ +- --long host-only \ +- --long no-hostonly \ +- --long no-host-only \ +- --long hostonly-cmdline \ +- --long no-hostonly-cmdline \ +- --long persistent-policy: \ +- --long fstab \ +- --long help \ +- --long bzip2 \ +- --long lzma \ +- --long xz \ +- --long lzo \ +- --long lz4 \ +- --long no-compress \ +- --long gzip \ +- --long list-modules \ +- --long show-modules \ +- --long keep \ +- --long printsize \ +- --long regenerate-all \ +- --long noimageifnotneeded \ +- --long early-microcode \ +- --long no-early-microcode \ +- -- "$@") +- +-if (( $? != 0 )); then +- usage +- exit 1 ++rearrange_params "$@" ++eval set -- "$TEMP" ++ ++# parse command line args to check if '--rebuild' option is present ++unset append_args_l ++unset rebuild_file ++while : ++do ++ if [ "$1" == "--" ]; then ++ shift; break ++ fi ++ if [ "$1" == "--rebuild" ]; then ++ append_args_l="yes" ++ rebuild_file=$2 ++ if [ ! -e $rebuild_file ]; then ++ echo "Image file '$rebuild_file', for rebuild, does not exist!" ++ exit 1 ++ fi ++ abs_rebuild_file=$(readlink -f "$rebuild_file") && rebuild_file="$abs_rebuild_file" ++ shift; continue ++ fi ++ shift ++done ++ ++# get output file name and kernel version from command line arguments ++while (($# > 0)); do ++ case ${1%%=*} in ++ ++include) ++ shift 2;; ++ *) ++ if ! [[ ${outfile+x} ]]; then ++ outfile=$1 ++ elif ! [[ ${kernel+x} ]]; then ++ kernel=$1 ++ else ++ printf "\nUnknown arguments: %s\n\n" "$*" >&2 ++ usage; exit 1; ++ fi ++ ;; ++ esac ++ shift ++done ++ ++# extract input image file provided with rebuild option to get previous parameters, if any ++if [[ $append_args_l == "yes" ]]; then ++ unset rebuild_param ++ ++ # determine resultant file ++ if ! [[ $outfile ]]; then ++ outfile=$rebuild_file ++ fi ++ ++ if ! rebuild_param=$(lsinitrd $rebuild_file '*lib/dracut/build-parameter.txt'); then ++ echo "Image '$rebuild_file' has no rebuild information stored" ++ exit 1 ++ fi ++ ++ # prepend previous parameters to current command line args ++ if [[ $rebuild_param ]]; then ++ TEMP="$rebuild_param $TEMP" ++ eval set -- "$TEMP" ++ rearrange_params "$@" ++ fi ++ ++ # clean the temporarily used scratch-pad directory ++ rm -rf $scratch_dir + fi + ++unset PARMS_TO_STORE ++PARMS_TO_STORE="" ++ + eval set -- "$TEMP" + + while :; do ++ if [ $1 != "--" ] && [ $1 != "--rebuild" ]; then ++ PARMS_TO_STORE+=" $1"; ++ fi + case $1 in +- --kver) kernel="$2"; shift;; +- -a|--add) push add_dracutmodules_l "$2"; shift;; +- --force-add) push force_add_dracutmodules_l "$2"; shift;; +- --add-drivers) push add_drivers_l "$2"; shift;; +- --omit-drivers) +- push omit_drivers_l "$2"; shift;; +- -m|--modules) push dracutmodules_l "$2"; shift;; +- -o|--omit) push omit_dracutmodules_l "$2"; shift;; +- -d|--drivers) push drivers_l "$2"; shift;; +- --filesystems) push filesystems_l "$2"; shift;; +- -I|--install) push install_items_l "$2"; shift;; +- --fwdir) push fw_dir_l "$2"; shift;; +- --libdirs) push libdirs_l "$2"; shift;; +- --fscks) push fscks_l "$2"; shift;; +- --add-fstab) push add_fstab_l "$2"; shift;; +- --mount) push fstab_lines "$2"; shift;; ++ --kver) kernel="$2"; PARMS_TO_STORE+=" '$2'"; shift;; ++ -a|--add) push add_dracutmodules_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;; ++ --force-add) push force_add_dracutmodules_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;; ++ --add-drivers) push add_drivers_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;; ++ --omit-drivers) push omit_drivers_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;; ++ -m|--modules) push dracutmodules_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;; ++ -o|--omit) push omit_dracutmodules_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;; ++ -d|--drivers) push drivers_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;; ++ --filesystems) push filesystems_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;; ++ -I|--install) push install_items_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;; ++ --fwdir) push fw_dir_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;; ++ --libdirs) push libdirs_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;; ++ --fscks) push fscks_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;; ++ --add-fstab) push add_fstab_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;; ++ --mount) push fstab_lines "$2"; PARMS_TO_STORE+=" '$2'"; shift;; + --add-device|--device) +- push add_device_l "$2"; shift;; +- --kernel-cmdline) +- push kernel_cmdline_l "$2"; shift;; ++ push add_device_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;; ++ --kernel-cmdline) push kernel_cmdline_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;; + --nofscks) nofscks_l="yes";; + --ro-mnt) ro_mnt_l="yes";; +- -k|--kmoddir) drivers_dir_l="$2"; shift;; +- -c|--conf) conffile="$2"; shift;; +- --confdir) confdir="$2"; shift;; +- --tmpdir) tmpdir_l="$2"; shift;; +- -L|--stdlog) stdloglvl_l="$2"; shift;; +- --compress) compress_l="$2"; shift;; +- --prefix) prefix_l="$2"; shift;; ++ -k|--kmoddir) drivers_dir_l="$2"; PARMS_TO_STORE+=" '$2'"; shift;; ++ -c|--conf) conffile="$2"; PARMS_TO_STORE+=" '$2'"; shift;; ++ --confdir) confdir="$2"; PARMS_TO_STORE+=" '$2'"; shift;; ++ --tmpdir) tmpdir_l="$2"; PARMS_TO_STORE+=" '$2'"; shift;; ++ -L|--stdlog) stdloglvl_l="$2"; PARMS_TO_STORE+=" '$2'"; shift;; ++ --compress) compress_l="$2"; PARMS_TO_STORE+=" '$2'"; shift;; ++ --prefix) prefix_l="$2"; PARMS_TO_STORE+=" '$2'"; shift;; ++ --rebuild) if [ $rebuild_file == $outfile ]; then ++ force=yes ++ fi ++ shift ++ ;; + -f|--force) force=yes;; + --kernel-only) kernel_only="yes"; no_kernel="no";; + --no-kernel) kernel_only="no"; no_kernel="yes";; +@@ -431,7 +513,7 @@ while :; do + --nolvmconf) lvmconf_l="no";; + --debug) debug="yes";; + --profile) profile="yes";; +- --sshkey) sshkey="$2"; shift;; ++ --sshkey) sshkey="$2"; PARMS_TO_STORE+=" '$2'"; shift;; + --logfile) logfile_l="$2"; shift;; + -v|--verbose) ((verbosity_mod_l++));; + -q|--quiet) ((verbosity_mod_l--));; +@@ -449,11 +531,10 @@ while :; do + --no-hostonly-cmdline) + hostonly_cmdline_l="no" ;; + --persistent-policy) +- persistent_policy_l="$2"; shift;; ++ persistent_policy_l="$2"; PARMS_TO_STORE+=" '$2'"; shift;; + --fstab) use_fstab_l="yes" ;; + -h|--help) long_usage; exit 1 ;; +- -i|--include) +- push include_src "$2" ++ -i|--include) push include_src "$2"; PARMS_TO_STORE+=" '$2'"; + shift;; + --bzip2) compress_l="bzip2";; + --lzma) compress_l="lzma";; +@@ -483,21 +564,12 @@ done + # the old fashioned way + + while (($# > 0)); do +- case ${1%%=*} in +- ++include) push include_src "$2" +- push include_target "$3" +- shift 2;; +- *) +- if ! [[ ${outfile+x} ]]; then +- outfile=$1 +- elif ! [[ ${kernel+x} ]]; then +- kernel=$1 +- else +- printf "\nUnknown arguments: %s\n\n" "$*" >&2 +- usage; exit 1; +- fi +- ;; +- esac ++ if [ ${1%%=*} == "++include" ]; then ++ push include_src "$2" ++ push include_target "$3" ++ PARMS_TO_STORE+=" --include '$2' '$3'" ++ shift 2 ++ fi + shift + done + +@@ -1405,6 +1477,12 @@ if [[ $acpi_override = yes ]] && [[ -d $acpi_table_dir ]]; then + done + fi + ++dinfo "*** Store current command line parameters ***" ++if ! ( echo $PARMS_TO_STORE > $initdir/lib/dracut/build-parameter.txt ); then ++ dfatal "Could not store the current command line parameters" ++ exit 1 ++fi ++ + rm -f -- "$outfile" + dinfo "*** Creating image file ***" + diff --git a/SOURCES/0213-network-net-lib.sh-parse_iscsi_root-do-not-enforce-t.patch b/SOURCES/0213-network-net-lib.sh-parse_iscsi_root-do-not-enforce-t.patch new file mode 100644 index 0000000..d5c7b9e --- /dev/null +++ b/SOURCES/0213-network-net-lib.sh-parse_iscsi_root-do-not-enforce-t.patch @@ -0,0 +1,152 @@ +From f86fa29cda6dcea1320de29864173d4de47c5bb7 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 9 Sep 2014 13:33:16 +0200 +Subject: [PATCH] network/net-lib.sh:parse_iscsi_root() do not enforce target + name + +https://bugzilla.redhat.com/show_bug.cgi?id=1078867 + +cherry-picked from 29763cb72d17fe8d22766170ec06b32419829243 +--- + modules.d/40network/net-lib.sh | 112 +++++++++++++++------------------ + 1 file changed, 50 insertions(+), 62 deletions(-) + +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index c8f92048..e2901dad 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -271,66 +271,46 @@ parse_iscsi_root() + local v + v=${1#iscsi:} + +-# extract authentication info ++ # extract authentication info + case "$v" in +- *@*:*:*:*:*) +- authinfo=${v%%@*} +- v=${v#*@} +- # allow empty authinfo to allow having an @ in iscsi_target_name like this: +- # netroot=iscsi:@192.168.1.100::3260::iqn.2009-01.com.example:testdi@sk +- if [ -n "$authinfo" ]; then +- OLDIFS="$IFS" +- IFS=: +- set $authinfo +- IFS="$OLDIFS" +- if [ $# -gt 4 ]; then +- warn "Wrong authentication info in iscsi: parameter!" +- return 1 +- fi +- iscsi_username=$1 +- iscsi_password=$2 +- if [ $# -gt 2 ]; then +- iscsi_in_username=$3 +- iscsi_in_password=$4 +- fi +- fi +- ;; +- esac +- +-# extract target ip +- case "$v" in +- [[]*[]]:*) +- iscsi_target_ip=${v#[[]} +- iscsi_target_ip=${iscsi_target_ip%%[]]*} +- v=${v#[[]$iscsi_target_ip[]]:} +- ;; +- *) +- iscsi_target_ip=${v%%[:]*} +- v=${v#$iscsi_target_ip:} +- ;; ++ *@*:*:*:*:*) ++ authinfo=${v%%@*} ++ v=${v#*@} ++ # allow empty authinfo to allow having an @ in iscsi_target_name like this: ++ # netroot=iscsi:@192.168.1.100::3260::iqn.2009-01.com.example:testdi@sk ++ if [ -n "$authinfo" ]; then ++ OLDIFS="$IFS" ++ IFS=: ++ set $authinfo ++ IFS="$OLDIFS" ++ if [ $# -gt 4 ]; then ++ warn "Wrong authentication info in iscsi: parameter!" ++ return 1 ++ fi ++ iscsi_username=$1 ++ iscsi_password=$2 ++ if [ $# -gt 2 ]; then ++ iscsi_in_username=$3 ++ iscsi_in_password=$4 ++ fi ++ fi ++ ;; + esac + +-# extract target name ++ # extract target ip + case "$v" in +- *:iqn.*) +- iscsi_target_name=iqn.${v##*:iqn.} +- v=${v%:iqn.*}: +- ;; +- *:eui.*) +- iscsi_target_name=iqn.${v##*:eui.} +- v=${v%:iqn.*}: +- ;; +- *:naa.*) +- iscsi_target_name=iqn.${v##*:naa.} +- v=${v%:iqn.*}: +- ;; +- *) +- warn "Invalid iscii target name, should begin with 'iqn.' or 'eui.' or 'naa.'" +- return 1 +- ;; ++ [[]*[]]:*) ++ iscsi_target_ip=${v#[[]} ++ iscsi_target_ip=${iscsi_target_ip%%[]]*} ++ v=${v#[[]$iscsi_target_ip[]]:} ++ ;; ++ *) ++ iscsi_target_ip=${v%%[:]*} ++ v=${v#$iscsi_target_ip:} ++ ;; + esac + +-# parse the rest ++ # parse the rest + OLDIFS="$IFS" + IFS=: + set $v +@@ -338,17 +318,25 @@ parse_iscsi_root() + + iscsi_protocol=$1; shift # ignored + iscsi_target_port=$1; shift +- if [ $# -eq 3 ]; then +- iscsi_iface_name=$1; shift +- fi +- if [ $# -eq 2 ]; then +- iscsi_netdev_name=$1; shift ++ ++ if [ $# -gt 3 ] && [ -n "$1$2" ]; then ++ iscsi_iface_name=$1; shift ++ iscsi_netdev_name=$1; shift + fi ++ + iscsi_lun=$1; shift +- if [ $# -ne 0 ]; then +- warn "Invalid parameter in iscsi: parameter!" +- return 1 ++ ++ if [ $# -gt 2 ]; then ++ warn "Invalid parameter in iscsi: parameter!" ++ return 1 + fi ++ ++ if [ $# -eq 2 ]; then ++ iscsi_target_name="$1:$2" ++ else ++ iscsi_target_name="$1" ++ fi ++ + } + + ip_to_var() { diff --git a/SOURCES/0214-replaced-ip-auto-with-ip-dhcp-in-the-documentation.patch b/SOURCES/0214-replaced-ip-auto-with-ip-dhcp-in-the-documentation.patch new file mode 100644 index 0000000..8722604 --- /dev/null +++ b/SOURCES/0214-replaced-ip-auto-with-ip-dhcp-in-the-documentation.patch @@ -0,0 +1,32 @@ +From e03b09212aaf33eab2dc8a330053448810c3546d Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 9 Sep 2014 13:35:13 +0200 +Subject: [PATCH] replaced ip=auto with ip=dhcp in the documentation + +https://bugzilla.redhat.com/show_bug.cgi?id=1086931 +--- + dracut.usage.asc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/dracut.usage.asc b/dracut.usage.asc +index 0b874e60..bee9e2e1 100644 +--- a/dracut.usage.asc ++++ b/dracut.usage.asc +@@ -209,7 +209,7 @@ be specified once. + ---- + # mkdir -p rd.live.overlay/etc/cmdline.d + # mkdir -p rd.live.overlay/etc/conf.d +-# echo "ip=auto" >> rd.live.overlay/etc/cmdline.d/mycmdline.conf ++# echo "ip=dhcp" >> rd.live.overlay/etc/cmdline.d/mycmdline.conf + # echo export FOO=testtest >> rd.live.overlay/etc/conf.d/testvar.conf + # echo export BAR=testtest >> rd.live.overlay/etc/conf.d/testvar.conf + # tree rd.live.overlay/ +@@ -261,7 +261,7 @@ How to setup your PXE/TFTP server can be found in the + http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Storage_Administration_Guide/[Red + Hat Enterprise Linux Storage Administration Guide]. + +-If you specify ip=auto on the kernel command line, then dracut asks a dhcp ++If you specify ip=dhcp on the kernel command line, then dracut asks a dhcp + server about the ip adress for the machine. The dhcp server can also serve an + additional root-path, which will set the root device for dracut. With this + mechanism, you have static configuration on your client machine and a diff --git a/SOURCES/0215-Support-spaces-in-mount_nfs-1109933.patch b/SOURCES/0215-Support-spaces-in-mount_nfs-1109933.patch new file mode 100644 index 0000000..99b27e8 --- /dev/null +++ b/SOURCES/0215-Support-spaces-in-mount_nfs-1109933.patch @@ -0,0 +1,34 @@ +From 17c1f640faf694e482cc657c9f40b5f61a23e301 Mon Sep 17 00:00:00 2001 +From: "Brian C. Lane" <bcl@redhat.com> +Date: Thu, 21 Aug 2014 11:31:51 -0700 +Subject: [PATCH] Support spaces in mount_nfs (#1109933) + +nfs paths may contain spaces, make sure they are preserved when passed +to nfs_to_var and mount. + +Related: rhbz#1109933 +(cherry picked from commit 7e692cfd43ac7f70dd58a0b083f33d6e80d3908c) +--- + modules.d/95nfs/nfs-lib.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/modules.d/95nfs/nfs-lib.sh b/modules.d/95nfs/nfs-lib.sh +index 9ced2e69..bf7d044b 100755 +--- a/modules.d/95nfs/nfs-lib.sh ++++ b/modules.d/95nfs/nfs-lib.sh +@@ -125,7 +125,7 @@ munge_nfs_options() { + mount_nfs() { + local nfsroot="$1" mntdir="$2" netif="$3" + local nfs="" server="" path="" options="" +- nfs_to_var $nfsroot $netif ++ nfs_to_var "$nfsroot" $netif + munge_nfs_options + if [ "$nfs" = "nfs4" ]; then + options=$options${nfslock:+,$nfslock} +@@ -136,5 +136,5 @@ mount_nfs() { + && warn "Locks unsupported on NFSv{2,3}, using nolock" 1>&2 + options=$options,nolock + fi +- mount -t $nfs -o$options $server:$path $mntdir ++ mount -t $nfs -o$options "$server:$path" "$mntdir" + } diff --git a/SOURCES/0216-fixed-bridge-setup.patch b/SOURCES/0216-fixed-bridge-setup.patch new file mode 100644 index 0000000..0c14aed --- /dev/null +++ b/SOURCES/0216-fixed-bridge-setup.patch @@ -0,0 +1,172 @@ +From 19bb8937ed492afdbde7076b74010e1fb2f3a7c4 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 1 Aug 2014 13:16:29 +0200 +Subject: [PATCH] fixed bridge setup + +renamed "ethnames" in bridge.info to "bridgeslaves" + +fixed ifcfg generation + +(cherry picked from commit 2db6d7111870c5d16d812d9cddc23558f3f4a202) +--- + modules.d/40network/ifup.sh | 4 +-- + modules.d/40network/net-genrules.sh | 2 +- + modules.d/40network/parse-bridge.sh | 18 ++++++------- + modules.d/45ifcfg/write-ifcfg.sh | 42 +++++++---------------------- + 4 files changed, 22 insertions(+), 44 deletions(-) + +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index 79127f24..43e84a2c 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -60,7 +60,7 @@ fi + # bridge this interface? + if [ -e /tmp/bridge.info ]; then + . /tmp/bridge.info +- for ethname in $ethnames ; do ++ for ethname in $bridgeslaves ; do + if [ "$netif" = "$ethname" ]; then + if [ "$netif" = "$bondname" ] && [ -n "$DO_BOND_SETUP" ] ; then + : # We need to really setup bond (recursive call) +@@ -236,7 +236,7 @@ if [ -e /tmp/bridge.info ]; then + if [ "$netif" = "$bridgename" ] && [ ! -e /tmp/net.$bridgename.up ]; then + brctl addbr $bridgename + brctl setfd $bridgename 0 +- for ethname in $ethnames ; do ++ for ethname in $bridgeslaves ; do + if [ "$ethname" = "$bondname" ] ; then + DO_BOND_SETUP=yes ifup $bondname -m + elif [ "$ethname" = "$teammaster" ] ; then +diff --git a/modules.d/40network/net-genrules.sh b/modules.d/40network/net-genrules.sh +index af2f09c1..a43e3df1 100755 +--- a/modules.d/40network/net-genrules.sh ++++ b/modules.d/40network/net-genrules.sh +@@ -16,7 +16,7 @@ command -v fix_bootif >/dev/null || . /lib/net-lib.sh + # bridge: attempt only the defined interface + if [ -e /tmp/bridge.info ]; then + . /tmp/bridge.info +- IFACES="$IFACES ${ethnames%% *}" ++ IFACES="$IFACES ${bridgeslaves%% *}" + MASTER_IFACES="$MASTER_IFACES $bridgename" + fi + +diff --git a/modules.d/40network/parse-bridge.sh b/modules.d/40network/parse-bridge.sh +index 8c305c0f..a9101094 100755 +--- a/modules.d/40network/parse-bridge.sh ++++ b/modules.d/40network/parse-bridge.sh +@@ -3,9 +3,9 @@ + # ex: ts=8 sw=4 sts=4 et filetype=sh + # + # Format: +-# bridge=<bridgename>:<ethnames> ++# bridge=<bridgename>:<bridgeslaves> + # +-# <ethnames> is a comma-separated list of physical (ethernet) interfaces ++# <bridgeslaves> is a comma-separated list of physical (ethernet) interfaces + # bridge without parameters assumes bridge=br0:eth0 + # + +@@ -25,20 +25,20 @@ parsebridge() { + v=${v#*:} + done + +- unset bridgename ethnames ++ unset bridgename bridgeslaves + case $# in +- 0) bridgename=br0; ethnames=$iface ;; ++ 0) bridgename=br0; bridgeslaves=$iface ;; + 1) die "bridge= requires two parameters" ;; +- 2) bridgename=$1; ethnames=$(str_replace "$2" "," " ") ;; ++ 2) bridgename=$1; bridgeslaves=$(str_replace "$2" "," " ") ;; + *) die "bridge= requires two parameters" ;; + esac + } + +-unset bridgename ethnames ++unset bridgename bridgeslaves + + iface=eth0 + +-# Parse bridge for bridgename and ethnames ++# Parse bridge for bridgename and bridgeslaves + if bridge="$(getarg bridge)"; then + # Read bridge= parameters if they exist + if [ -n "$bridge" ]; then +@@ -47,9 +47,9 @@ if bridge="$(getarg bridge)"; then + # Simple default bridge + if [ -z "$bridgename" ]; then + bridgename=br0 +- ethnames=$iface ++ bridgeslaves=$iface + fi + echo "bridgename=$bridgename" > /tmp/bridge.info +- echo "ethnames=\"$ethnames\"" >> /tmp/bridge.info ++ echo "bridgeslaves=\"$bridgeslaves\"" >> /tmp/bridge.info + return + fi +diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh +index 5e333e45..c1cd23c3 100755 +--- a/modules.d/45ifcfg/write-ifcfg.sh ++++ b/modules.d/45ifcfg/write-ifcfg.sh +@@ -214,6 +214,7 @@ for netup in /tmp/net.*.did-setup ; do + echo "SLAVE=yes" + echo "MASTER=\"$netif\"" + echo "NAME=\"$slave\"" ++ echo "UUID=\"$(cat /proc/sys/kernel/random/uuid)\"" + } >> /tmp/ifcfg/ifcfg-$slave + done + fi +@@ -224,44 +225,21 @@ for netup in /tmp/net.*.did-setup ; do + echo "TYPE=Bridge" + echo "NAME=\"$netif\"" + } >> /tmp/ifcfg/ifcfg-$netif +- if [ "$ethname" = "$bondname" ] ; then +- { +- echo "# Generated by dracut initrd" +- echo "DEVICE=\"$bondname\"" +- echo "ONBOOT=yes" +- echo "NETBOOT=yes" +- # This variable is an indicator of a bond interface for initscripts +- echo "BONDING_OPTS=\"$bondoptions\"" +- echo "BRIDGE=\"$netif\"" +- echo "NAME=\"$bondname\"" +- } >> /tmp/ifcfg/ifcfg-$bondname +- for slave in $bondslaves ; do +- # write separate ifcfg file for the raw eth interface +- { +- echo "# Generated by dracut initrd" +- echo "DEVICE=\"$slave\"" +- echo "TYPE=Ethernet" +- echo "ONBOOT=yes" +- echo "NETBOOT=yes" +- echo "HWADDR=\"$(cat /sys/class/net/$slave/address)\"" +- echo "SLAVE=yes" +- echo "MASTER=\"$bondname\"" +- echo "NAME=\"$slave\"" +- } >> /tmp/ifcfg/ifcfg-$slave +- done +- else ++ for slave in $bridgeslaves ; do + # write separate ifcfg file for the raw eth interface + { + echo "# Generated by dracut initrd" +- echo "DEVICE=\"$ethname\"" ++ echo "DEVICE=\"$slave\"" + echo "TYPE=Ethernet" + echo "ONBOOT=yes" + echo "NETBOOT=yes" +- echo "HWADDR=\"$(cat /sys/class/net/$ethname/address)\"" +- echo "BRIDGE=\"$netif\"" +- echo "NAME=\"$ethname\"" +- } >> /tmp/ifcfg/ifcfg-$ethname +- fi ++ echo "HWADDR=\"$(cat /sys/class/net/$slave/address)\"" ++ echo "SLAVE=yes" ++ echo "MASTER=\"$bridgename\"" ++ echo "NAME=\"$slave\"" ++ echo "UUID=\"$(cat /proc/sys/kernel/random/uuid)\"" ++ } >> /tmp/ifcfg/ifcfg-$slave ++ done + fi + i=1 + for ns in $(getargs nameserver); do diff --git a/SOURCES/0217-bridging-update-the-ifcfg-files-generated-for-bridge.patch b/SOURCES/0217-bridging-update-the-ifcfg-files-generated-for-bridge.patch new file mode 100644 index 0000000..12df46c --- /dev/null +++ b/SOURCES/0217-bridging-update-the-ifcfg-files-generated-for-bridge.patch @@ -0,0 +1,30 @@ +From 4fa660ba8f768861f8f8d5b3b8c82837ffcc6bb3 Mon Sep 17 00:00:00 2001 +From: Alex Harpin <development@landsofshadow.co.uk> +Date: Sat, 2 Aug 2014 20:08:25 +0100 +Subject: [PATCH] bridging: update the ifcfg files generated for bridge slaves + +Update the ifcfg files generated for bridge slaves so they reference +the bridge they are part of. Related to early patch submitted as a +fix for Bug #1123552. + +Bug #1123552 https://bugzilla.redhat.com/show_bug.cgi?id=1123552 + +(cherry picked from commit 32125a976bb6ff67768ca813446743b781ba012f) +--- + modules.d/45ifcfg/write-ifcfg.sh | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh +index c1cd23c3..48e75a63 100755 +--- a/modules.d/45ifcfg/write-ifcfg.sh ++++ b/modules.d/45ifcfg/write-ifcfg.sh +@@ -234,8 +234,7 @@ for netup in /tmp/net.*.did-setup ; do + echo "ONBOOT=yes" + echo "NETBOOT=yes" + echo "HWADDR=\"$(cat /sys/class/net/$slave/address)\"" +- echo "SLAVE=yes" +- echo "MASTER=\"$bridgename\"" ++ echo "BRIDGE=\"$bridgename\"" + echo "NAME=\"$slave\"" + echo "UUID=\"$(cat /proc/sys/kernel/random/uuid)\"" + } >> /tmp/ifcfg/ifcfg-$slave diff --git a/SOURCES/0218-ifcfg-write-ifcfg.sh-bind-bond-and-bridge-interfaces.patch b/SOURCES/0218-ifcfg-write-ifcfg.sh-bind-bond-and-bridge-interfaces.patch new file mode 100644 index 0000000..0dfbfbf --- /dev/null +++ b/SOURCES/0218-ifcfg-write-ifcfg.sh-bind-bond-and-bridge-interfaces.patch @@ -0,0 +1,118 @@ +From efaa5b05dfb3578999c31a1bbbc053706ec89ddb Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 12 Sep 2014 09:48:00 +0200 +Subject: [PATCH] ifcfg/write-ifcfg.sh: bind bond and bridge interfaces to HW + +either by s390 SUBCHANNELS or HWADDR, if the interface name is not +persistent. + +Previously, this was bound unconditionally with HWADDR. + +(cherry picked from commit 80043e21c16db168ad087a162f1fa97cae866c8d) +--- + modules.d/45ifcfg/write-ifcfg.sh | 47 ++++++++++++++++++-------------- + 1 file changed, 26 insertions(+), 21 deletions(-) + +diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh +index 48e75a63..aed30698 100755 +--- a/modules.d/45ifcfg/write-ifcfg.sh ++++ b/modules.d/45ifcfg/write-ifcfg.sh +@@ -82,6 +82,20 @@ print_s390() { + return 0 + } + ++interface_bind() { ++ local netif="$1" ++ local macaddr="$2" ++ if ! print_s390 $netif; then ++ if [ -z "$macaddr" ] && \ ++ ! is_persistent_ethernet_name "$netif" && \ ++ [ -f /sys/class/net/$netif/addr_assign_type ] && \ ++ [ "$(cat /sys/class/net/$netif/addr_assign_type)" = "0" ] && \ ++ [ -f /sys/class/net/$netif/address ]; then ++ echo "HWADDR=\"$(cat /sys/class/net/$netif/address)\"" ++ fi ++ fi ++} ++ + for netup in /tmp/net.*.did-setup ; do + [ -f $netup ] || continue + +@@ -114,8 +128,7 @@ for netup in /tmp/net.*.did-setup ; do + if [ "$netif" = "$vlanname" ]; then + vlan=yes + fi +- [ -e /sys/class/net/$netif/address ] && \ +- cat /sys/class/net/$netif/address > /tmp/net.$netif.hwaddr ++ + { + echo "# Generated by dracut initrd" + echo "DEVICE=\"$netif\"" +@@ -165,15 +178,7 @@ for netup in /tmp/net.*.did-setup ; do + # standard interface + { + [ -n "$macaddr" ] && echo "MACADDR=\"$macaddr\"" +- if ! print_s390 $netif; then +- if [ -z "$macaddr" ] && \ +- ! is_persistent_ethernet_name "$netif" && \ +- [ -f /sys/class/net/$netif/addr_assign_type ] && \ +- [ "$(cat /sys/class/net/$netif/addr_assign_type)" = "0" ] && \ +- [ -f /sys/class/net/$netif/address ]; then +- echo "HWADDR=\"$(cat /sys/class/net/$netif/address)\"" +- fi +- fi ++ interface_bind "$netif" "$macaddr" + echo "TYPE=Ethernet" + echo "NAME=\"$netif\"" + [ -n "$mtu" ] && echo "MTU=\"$mtu\"" +@@ -200,22 +205,20 @@ for netup in /tmp/net.*.did-setup ; do + + for slave in $bondslaves ; do + # write separate ifcfg file for the raw eth interface +- { ++ ( + echo "# Generated by dracut initrd" + echo "DEVICE=\"$slave\"" + echo "TYPE=Ethernet" + echo "ONBOOT=yes" + echo "NETBOOT=yes" +- if [ -e /tmp/net.${netif}.${slave}.hwaddr ]; then +- echo "HWADDR=\"$(cat /tmp/net.${netif}.${slave}.hwaddr)\"" +- else +- echo "HWADDR=\"$(cat /sys/class/net/$slave/address)\"" +- fi + echo "SLAVE=yes" + echo "MASTER=\"$netif\"" + echo "NAME=\"$slave\"" + echo "UUID=\"$(cat /proc/sys/kernel/random/uuid)\"" +- } >> /tmp/ifcfg/ifcfg-$slave ++ [ -e /tmp/net.$slave.override ] && . /tmp/net.$slave.override ++ [ -n "$macaddr" ] && echo "MACADDR=\"$macaddr\"" ++ interface_bind "$slave" "$macaddr" ++ ) >> /tmp/ifcfg/ifcfg-$slave + done + fi + +@@ -227,17 +230,19 @@ for netup in /tmp/net.*.did-setup ; do + } >> /tmp/ifcfg/ifcfg-$netif + for slave in $bridgeslaves ; do + # write separate ifcfg file for the raw eth interface +- { ++ ( + echo "# Generated by dracut initrd" + echo "DEVICE=\"$slave\"" + echo "TYPE=Ethernet" + echo "ONBOOT=yes" + echo "NETBOOT=yes" +- echo "HWADDR=\"$(cat /sys/class/net/$slave/address)\"" + echo "BRIDGE=\"$bridgename\"" + echo "NAME=\"$slave\"" + echo "UUID=\"$(cat /proc/sys/kernel/random/uuid)\"" +- } >> /tmp/ifcfg/ifcfg-$slave ++ [ -e /tmp/net.$slave.override ] && . /tmp/net.$slave.override ++ [ -n "$macaddr" ] && echo "MACADDR=\"$macaddr\"" ++ interface_bind "$slave" "$macaddr" ++ ) >> /tmp/ifcfg/ifcfg-$slave + done + fi + i=1 diff --git a/SOURCES/0219-cms-cmssetup.sh-fixed-indention.patch b/SOURCES/0219-cms-cmssetup.sh-fixed-indention.patch new file mode 100644 index 0000000..dd2b179 --- /dev/null +++ b/SOURCES/0219-cms-cmssetup.sh-fixed-indention.patch @@ -0,0 +1,316 @@ +From 49a23aa4261a896303d7923d5c94c9840739022f Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 12 Sep 2014 09:57:13 +0200 +Subject: [PATCH] cms/cmssetup.sh: fixed indention + +(cherry picked from commit d68163551226d302677e358e721560d8d651a30f) +--- + modules.d/80cms/cmssetup.sh | 260 ++++++++++++++++++------------------ + 1 file changed, 130 insertions(+), 130 deletions(-) + +diff --git a/modules.d/80cms/cmssetup.sh b/modules.d/80cms/cmssetup.sh +index c9e13314..7dd481b5 100755 +--- a/modules.d/80cms/cmssetup.sh ++++ b/modules.d/80cms/cmssetup.sh +@@ -44,147 +44,147 @@ function dasd_settle() { + } + + function dasd_settle_all() { +- for dasdccw in $(while read line; do echo ${line%%(*}; done < /proc/dasd/devices) ; do ++ for dasdccw in $(while read line; do echo "${line%%(*}"; done < /proc/dasd/devices) ; do + if ! dasd_settle $dasdccw ; then + echo $"Could not access DASD $dasdccw in time" + return 1 + fi + done + return 0 +- } ++} + + # prints a canonocalized device bus ID for a given devno of any format +- function canonicalize_devno() +- { +- case ${#1} in +- 3) echo "0.0.0${1}" ;; +- 4) echo "0.0.${1}" ;; +- *) echo "${1}" ;; +- esac +- return 0 +- } ++function canonicalize_devno() ++{ ++ case ${#1} in ++ 3) echo "0.0.0${1}" ;; ++ 4) echo "0.0.${1}" ;; ++ *) echo "${1}" ;; ++ esac ++ return 0 ++} + + # read file from CMS and write it to /tmp +- function readcmsfile() # $1=dasdport $2=filename +- { +- local dev +- local numcpus +- local devname +- local ret=0 +- if [ $# -ne 2 ]; then return; fi ++function readcmsfile() # $1=dasdport $2=filename ++{ ++ local dev ++ local numcpus ++ local devname ++ local ret=0 ++ if [ $# -ne 2 ]; then return; fi + # precondition: udevd created dasda block device node +- if ! dasd_cio_free -d $1 ; then +- echo $"DASD $1 could not be cleared from device blacklist" +- return 1 +- fi ++ if ! dasd_cio_free -d $1 ; then ++ echo $"DASD $1 could not be cleared from device blacklist" ++ return 1 ++ fi + +- modprobe dasd_mod dasd=$CMSDASD +- modprobe dasd_eckd_mod +- udevadm settle ++ modprobe dasd_mod dasd=$CMSDASD ++ modprobe dasd_eckd_mod ++ udevadm settle + + # precondition: dasd_eckd_mod driver incl. dependencies loaded, + # dasd_mod must be loaded without setting any DASD online +- dev=$(canonicalize_devno $1) +- numcpus=$( +- while read line; do +- if strstr "$line" "# processors"; then +- echo ${line##*:}; +- break; +- fi; +- done < /proc/cpuinfo +- ) +- +- if [ ${numcpus} -eq 1 ]; then +- echo 1 > /sys/bus/ccw/devices/$dev/online +- else +- if ! sysecho /sys/bus/ccw/devices/$dev/online 1; then +- echo $"DASD $dev could not be set online" +- return 1 +- fi +- udevadm settle +- if ! dasd_settle $dev ; then +- echo $"Could not access DASD $dev in time" +- return 1 +- fi ++ dev=$(canonicalize_devno $1) ++ numcpus=$( ++ while read line; do ++ if strstr "$line" "# processors"; then ++ echo ${line##*:}; ++ break; ++ fi; ++ done < /proc/cpuinfo ++ ) ++ ++ if [ ${numcpus} -eq 1 ]; then ++ echo 1 > /sys/bus/ccw/devices/$dev/online ++ else ++ if ! sysecho /sys/bus/ccw/devices/$dev/online 1; then ++ echo $"DASD $dev could not be set online" ++ return 1 + fi +- + udevadm settle ++ if ! dasd_settle $dev ; then ++ echo $"Could not access DASD $dev in time" ++ return 1 ++ fi ++ fi + +- devname=$(cd /sys/bus/ccw/devices/$dev/block; set -- *; [ -b /dev/$1 ] && echo $1) +- devname=${devname:-dasda} ++ udevadm settle + +- [[ -d /mnt ]] || mkdir /mnt +- if cmsfs-fuse --to=UTF-8 -a /dev/$devname /mnt; then +- cat /mnt/$2 > /run/initramfs/$2 +- umount /mnt || umount -l /mnt +- udevadm settle +- else +- echo $"Could not read conf file $2 on CMS DASD $1." +- ret=1 +- fi ++ devname=$(cd /sys/bus/ccw/devices/$dev/block; set -- *; [ -b /dev/$1 ] && echo $1) ++ devname=${devname:-dasda} + +- if ! sysecho /sys/bus/ccw/devices/$dev/online 0; then +- echo $"DASD $dev could not be set offline again" +- #return 1 +- fi ++ [[ -d /mnt ]] || mkdir /mnt ++ if cmsfs-fuse --to=UTF-8 -a /dev/$devname /mnt; then ++ cat /mnt/$2 > /run/initramfs/$2 ++ umount /mnt || umount -l /mnt + udevadm settle ++ else ++ echo $"Could not read conf file $2 on CMS DASD $1." ++ ret=1 ++ fi ++ ++ if ! sysecho /sys/bus/ccw/devices/$dev/online 0; then ++ echo $"DASD $dev could not be set offline again" ++ #return 1 ++ fi ++ udevadm settle + + # unbind all dasds to unload the dasd modules for a clean start +- ( cd /sys/bus/ccw/drivers/dasd-eckd; for i in *.*; do echo $i > unbind;done) +- udevadm settle +- modprobe -r dasd_eckd_mod +- udevadm settle +- modprobe -r dasd_diag_mod +- udevadm settle +- modprobe -r dasd_mod +- udevadm settle +- return $ret +- } +- +- processcmsfile() +- { +- source /tmp/cms.conf +- SUBCHANNELS="$(echo $SUBCHANNELS | sed 'y/ABCDEF/abcdef/')" +- +- if [[ $NETTYPE ]]; then +- ( +- echo -n $NETTYPE,$SUBCHANNELS +- [[ $PORTNAME ]] && echo -n ",portname=$PORTNAME" +- [[ $LAYER2 ]] && echo -n ",layer2=$LAYER2" +- [[ "$NETTYPE" = "ctc" ]] && [[ $CTCPROT ]] && echo -n ",protocol=$CTCPROT" +- echo +- ) >> /etc/ccw.conf +- +- OLDIFS=$IFS +- IFS=, +- read -a subch_array <<< "indexzero,$SUBCHANNELS" +- IFS=$OLDIFS +- devbusid=${subch_array[1]} +- if [ "$NETTYPE" = "ctc" ]; then +- driver="ctcm" +- else +- driver=$NETTYPE +- fi +- +- printf 'SUBSYSTEM=="net", ACTION=="add", DRIVERS=="%s", KERNELS=="%s", ENV{INTERFACE}=="?*", RUN+="/sbin/initqueue --onetime --unique --name cmsifup-$env{INTERFACE} /sbin/cmsifup $env{INTERFACE}"\n' "$driver" "$devbusid" > /etc/udev/rules.d/99-cms.rules +- # remove the default net rules +- rm -f -- /etc/udev/rules.d/91-default-net.rules +- [[ -f /etc/udev/rules.d/90-net.rules ]] \ +- || printf 'SUBSYSTEM=="net", ACTION=="online", RUN+="/sbin/initqueue --onetime --env netif=$env{INTERFACE} source_hook initqueue/online"\n' >> /etc/udev/rules.d/99-cms.rules +- udevadm control --reload +- znet_cio_free +- fi ++ ( cd /sys/bus/ccw/drivers/dasd-eckd; for i in *.*; do echo $i > unbind;done) ++ udevadm settle ++ modprobe -r dasd_eckd_mod ++ udevadm settle ++ modprobe -r dasd_diag_mod ++ udevadm settle ++ modprobe -r dasd_mod ++ udevadm settle ++ return $ret ++} + +- if [[ $DASD ]]; then +- echo $DASD | normalize_dasd_arg > /etc/dasd.conf +- echo "options dasd_mod dasd=$DASD" > /etc/modprobe.d/dasd_mod.conf +- dasd_cio_free ++processcmsfile() ++{ ++ source /tmp/cms.conf ++ SUBCHANNELS="$(echo $SUBCHANNELS | sed 'y/ABCDEF/abcdef/')" ++ ++ if [[ $NETTYPE ]]; then ++ ( ++ echo -n $NETTYPE,$SUBCHANNELS ++ [[ $PORTNAME ]] && echo -n ",portname=$PORTNAME" ++ [[ $LAYER2 ]] && echo -n ",layer2=$LAYER2" ++ [[ "$NETTYPE" = "ctc" ]] && [[ $CTCPROT ]] && echo -n ",protocol=$CTCPROT" ++ echo ++ ) >> /etc/ccw.conf ++ ++ OLDIFS=$IFS ++ IFS=, ++ read -a subch_array <<< "indexzero,$SUBCHANNELS" ++ IFS=$OLDIFS ++ devbusid=${subch_array[1]} ++ if [ "$NETTYPE" = "ctc" ]; then ++ driver="ctcm" ++ else ++ driver=$NETTYPE + fi + +- unset _do_zfcp +- for i in ${!FCP_*}; do +- echo "${!i}" | while read port rest; do +- case $port in ++ printf 'SUBSYSTEM=="net", ACTION=="add", DRIVERS=="%s", KERNELS=="%s", ENV{INTERFACE}=="?*", RUN+="/sbin/initqueue --onetime --unique --name cmsifup-$env{INTERFACE} /sbin/cmsifup $env{INTERFACE}"\n' "$driver" "$devbusid" > /etc/udev/rules.d/99-cms.rules ++ # remove the default net rules ++ rm -f -- /etc/udev/rules.d/91-default-net.rules ++ [[ -f /etc/udev/rules.d/90-net.rules ]] \ ++ || printf 'SUBSYSTEM=="net", ACTION=="online", RUN+="/sbin/initqueue --onetime --env netif=$env{INTERFACE} source_hook initqueue/online"\n' >> /etc/udev/rules.d/99-cms.rules ++ udevadm control --reload ++ znet_cio_free ++ fi ++ ++ if [[ $DASD ]]; then ++ echo $DASD | normalize_dasd_arg > /etc/dasd.conf ++ echo "options dasd_mod dasd=$DASD" > /etc/modprobe.d/dasd_mod.conf ++ dasd_cio_free ++ fi ++ ++ unset _do_zfcp ++ for i in ${!FCP_*}; do ++ echo "${!i}" | while read port rest; do ++ case $port in + *.*.*) + ;; + *.*) +@@ -193,23 +193,23 @@ function dasd_settle_all() { + *) + port="0.0.$port" + ;; +- esac +- echo $port $rest >> /etc/zfcp.conf +- done +- _do_zfcp=1 ++ esac ++ echo $port $rest >> /etc/zfcp.conf + done +- [[ $_do_zfcp ]] && zfcp_cio_free +- unset _do_zfcp +- } ++ _do_zfcp=1 ++ done ++ [[ $_do_zfcp ]] && zfcp_cio_free ++ unset _do_zfcp ++} + +- [[ $CMSDASD ]] || CMSDASD=$(getarg "CMSDASD=") +- [[ $CMSCONFFILE ]] || CMSCONFFILE=$(getarg "CMSCONFFILE=") ++[[ $CMSDASD ]] || CMSDASD=$(getarg "CMSDASD=") ++[[ $CMSCONFFILE ]] || CMSCONFFILE=$(getarg "CMSCONFFILE=") + + # Parse configuration +- if [ -n "$CMSDASD" -a -n "$CMSCONFFILE" ]; then +- if readcmsfile $CMSDASD $CMSCONFFILE; then +- ln -s /run/initramfs/$CMSCONFFILE /tmp/$CMSCONFFILE +- ln -s /run/initramfs/$CMSCONFFILE /tmp/cms.conf +- processcmsfile +- fi ++if [ -n "$CMSDASD" -a -n "$CMSCONFFILE" ]; then ++ if readcmsfile $CMSDASD $CMSCONFFILE; then ++ ln -s /run/initramfs/$CMSCONFFILE /tmp/$CMSCONFFILE ++ ln -s /run/initramfs/$CMSCONFFILE /tmp/cms.conf ++ processcmsfile + fi ++fi diff --git a/SOURCES/0220-cms-cmssetup.sh-understand-DASD-none.patch b/SOURCES/0220-cms-cmssetup.sh-understand-DASD-none.patch new file mode 100644 index 0000000..0fba9f9 --- /dev/null +++ b/SOURCES/0220-cms-cmssetup.sh-understand-DASD-none.patch @@ -0,0 +1,26 @@ +From b44b3ed0363e138117f3b16565e4d8b79eeb76c8 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 12 Sep 2014 09:59:03 +0200 +Subject: [PATCH] cms/cmssetup.sh: understand DASD="none" + +Treat DASD="none" as unset. + +https://bugzilla.redhat.com/show_bug.cgi?id=1096979 +(cherry picked from commit 2f954621ccde0bc9160cd90142865e7586e25b00) +--- + modules.d/80cms/cmssetup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/80cms/cmssetup.sh b/modules.d/80cms/cmssetup.sh +index 7dd481b5..6259ff41 100755 +--- a/modules.d/80cms/cmssetup.sh ++++ b/modules.d/80cms/cmssetup.sh +@@ -175,7 +175,7 @@ processcmsfile() + znet_cio_free + fi + +- if [[ $DASD ]]; then ++ if [[ $DASD ]] && [[ $DASD != "none" ]]; then + echo $DASD | normalize_dasd_arg > /etc/dasd.conf + echo "options dasd_mod dasd=$DASD" > /etc/modprobe.d/dasd_mod.conf + dasd_cio_free diff --git a/SOURCES/0221-qemu-install-virtio_console-kernel-module.patch b/SOURCES/0221-qemu-install-virtio_console-kernel-module.patch new file mode 100644 index 0000000..a356241 --- /dev/null +++ b/SOURCES/0221-qemu-install-virtio_console-kernel-module.patch @@ -0,0 +1,25 @@ +From c5c57f3f19aea96ab99636d35e2c901cc0b5b8d0 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 12 Sep 2014 10:03:59 +0200 +Subject: [PATCH] qemu: install virtio_console kernel module + +https://bugzilla.redhat.com/show_bug.cgi?id=1097999 +(cherry picked from commit 5058ae2d295cfd68a6b99e7f6c75227164ca7722) +--- + modules.d/90qemu/module-setup.sh | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/modules.d/90qemu/module-setup.sh b/modules.d/90qemu/module-setup.sh +index 0dbf0818..67796429 100755 +--- a/modules.d/90qemu/module-setup.sh ++++ b/modules.d/90qemu/module-setup.sh +@@ -22,5 +22,8 @@ check() { + + installkernel() { + # qemu specific modules +- hostonly='' instmods virtio_blk virtio virtio_ring virtio_pci ata_piix ata_generic pata_acpi cdrom sr_mod ahci virtio_scsi ++ hostonly='' instmods \ ++ ata_piix ata_generic pata_acpi cdrom sr_mod ahci \ ++ virtio_blk virtio virtio_ring virtio_pci \ ++ virtio_scsi virtio_console + } diff --git a/SOURCES/0222-dracut-functions.sh-exit-for-missing-force-add-or-ad.patch b/SOURCES/0222-dracut-functions.sh-exit-for-missing-force-add-or-ad.patch new file mode 100644 index 0000000..0795823 --- /dev/null +++ b/SOURCES/0222-dracut-functions.sh-exit-for-missing-force-add-or-ad.patch @@ -0,0 +1,37 @@ +From 815ab93fe9f57aa3e17066d9564ce5350f95b35a Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 12 Sep 2014 10:19:28 +0200 +Subject: [PATCH] dracut-functions.sh: exit for missing --force-add or --add + dracut modules + +Better exit with fail early, so there is no surprise on reboot. + +(cherry picked from commit a49cac2e65eb1beb8b0442b74aaa4851d184c0ce) +--- + dracut-functions.sh | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/dracut-functions.sh b/dracut-functions.sh +index 8a0cd301..6e0b44ae 100755 +--- a/dracut-functions.sh ++++ b/dracut-functions.sh +@@ -1314,11 +1314,17 @@ for_each_module_dir() { + + # Report any missing dracut modules, the user has specified + _modcheck="$add_dracutmodules $force_add_dracutmodules" +- [[ $dracutmodules != all ]] && _modcheck="$m $dracutmodules" ++ [[ $dracutmodules != all ]] && _modcheck="$_modcheck $dracutmodules" + for _mod in $_modcheck; do + [[ " $mods_to_load " == *\ $_mod\ * ]] && continue +- [[ " $omit_dracutmodules " == *\ $_mod\ * ]] && continue ++ ++ [[ " $force_add_dracutmodules " != *\ $_mod\ * ]] \ ++ && [[ " $omit_dracutmodules " == *\ $_mod\ * ]] \ ++ && continue ++ + derror "dracut module '$_mod' cannot be found or installed." ++ [[ " $force_add_dracutmodules " == *\ $_mod\ * ]] && exit 1 ++ [[ " $add_dracutmodules " == *\ $_mod\ * ]] && exit 1 + done + } + diff --git a/SOURCES/0223-do-ip-route-replace-default-instead-of-add.patch b/SOURCES/0223-do-ip-route-replace-default-instead-of-add.patch new file mode 100644 index 0000000..d05e9fd --- /dev/null +++ b/SOURCES/0223-do-ip-route-replace-default-instead-of-add.patch @@ -0,0 +1,47 @@ +From aa5313ca0e17bb08dd0629c3f9385672408caceb Mon Sep 17 00:00:00 2001 +From: Will Woods <wwoods@redhat.com> +Date: Thu, 28 Aug 2014 13:44:47 -0400 +Subject: [PATCH] do 'ip route replace default' instead of 'add' + +When you define the gateway for an interface, dracut sets it up with: + + ip route add default via $gw dev $netif + +If a default route is already set (e.g. if you have multiple NICs), this +will fail with the message "RTNETLINK answers: File exists". + +So, if your first NIC isn't usable as a default route + +Using "ip route replace default" instead allows ifup/dhclient-script to +correctly change the default route to the new interface. +--- + modules.d/40network/dhclient-script.sh | 2 +- + modules.d/40network/ifup.sh | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/modules.d/40network/dhclient-script.sh b/modules.d/40network/dhclient-script.sh +index ba05250d..885303a2 100755 +--- a/modules.d/40network/dhclient-script.sh ++++ b/modules.d/40network/dhclient-script.sh +@@ -45,7 +45,7 @@ setup_interface() { + valid_lft ${lease_time} preferred_lft ${lease_time} \ + dev $netif + +- [ -n "$gw" ] && echo ip route add default via $gw dev $netif > /tmp/net.$netif.gw ++ [ -n "$gw" ] && echo ip route replace default via $gw dev $netif > /tmp/net.$netif.gw + + [ -n "${search}${domain}" ] && echo "search $search $domain" > /tmp/net.$netif.resolv.conf + if [ -n "$namesrv" ] ; then +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index 43e84a2c..67b1d9f8 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -145,7 +145,7 @@ do_static() { + ip addr add $ip/$mask ${srv:+peer $srv} brd + dev $netif + fi + +- [ -n "$gw" ] && echo ip route add default via $gw dev $netif > /tmp/net.$netif.gw ++ [ -n "$gw" ] && echo ip route replace default via $gw dev $netif > /tmp/net.$netif.gw + [ -n "$hostname" ] && echo "echo $hostname > /proc/sys/kernel/hostname" > /tmp/net.$netif.hostname + + return 0 diff --git a/SOURCES/0224-network-net-lib.sh-is_persistent_ethernet_name-eth-i.patch b/SOURCES/0224-network-net-lib.sh-is_persistent_ethernet_name-eth-i.patch new file mode 100644 index 0000000..ccb0759 --- /dev/null +++ b/SOURCES/0224-network-net-lib.sh-is_persistent_ethernet_name-eth-i.patch @@ -0,0 +1,25 @@ +From 0630273048326cb7cc51b67f0f134b6badb7b6c7 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 23 Oct 2014 14:34:33 +0200 +Subject: [PATCH] network/net-lib.sh:is_persistent_ethernet_name() eth* is not + +eth* is _not_ a persistent ethernet name... tsk, tsk, tsk + +(cherry picked from commit 05065741f01e78119f1883f199820b804460c58d) +--- + modules.d/40network/net-lib.sh | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index e2901dad..22f77546 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -555,8 +555,6 @@ find_iface_with_link() { + is_persistent_ethernet_name() { + case "$1" in + # udev persistent interface names +- eth[0-9]|eth[0-9][0-9]|eth[0-9][0-9][0-9]*) +- ;; + eno[0-9]|eno[0-9][0-9]|eno[0-9][0-9][0-9]*) + ;; + ens[0-9]|ens[0-9][0-9]|ens[0-9][0-9][0-9]*) diff --git a/SOURCES/0225-ifcfg-write-ifcfg-only-write-DEVICE-for-non-kernel-n.patch b/SOURCES/0225-ifcfg-write-ifcfg-only-write-DEVICE-for-non-kernel-n.patch new file mode 100644 index 0000000..a878c7a --- /dev/null +++ b/SOURCES/0225-ifcfg-write-ifcfg-only-write-DEVICE-for-non-kernel-n.patch @@ -0,0 +1,189 @@ +From c4c24171bfbffd7bb75a75b8ceae18ce7296cac6 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 24 Oct 2014 15:47:24 +0200 +Subject: [PATCH] ifcfg/write-ifcfg: only write DEVICE for non-kernel names + +Rename an interface to the kernel namespace is not allowed, so don't add +DEVICE="<iface>", if HWADDR is given. + +(cherry picked from commit 3947f07d93cde5e1cf0d788537e93b135d6c27b0) +--- + modules.d/40network/net-lib.sh | 46 ++++++++++++++++++++++++- + modules.d/45ifcfg/write-ifcfg.sh | 59 +++++++++++++++++++++----------- + 2 files changed, 84 insertions(+), 21 deletions(-) + +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index 22f77546..337817e3 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -553,7 +553,19 @@ find_iface_with_link() { + } + + is_persistent_ethernet_name() { +- case "$1" in ++ local _netif="$1" ++ local _name_assign_type="0" ++ ++ [ -f "/sys/class/net/$_netif/name_assign_type" ] \ ++ && _name_assign_type=$(cat "/sys/class/net/$_netif/name_assign_type") ++ ++ # NET_NAME_ENUM 1 ++ [ "$_name_assign_type" = "1" ] && return 1 ++ ++ # NET_NAME_PREDICTABLE 2 ++ [ "$_name_assign_type" = "2" ] && return 0 ++ ++ case "$_netif" in + # udev persistent interface names + eno[0-9]|eno[0-9][0-9]|eno[0-9][0-9][0-9]*) + ;; +@@ -573,3 +585,35 @@ is_persistent_ethernet_name() { + esac + return 0 + } ++ ++is_kernel_ethernet_name() { ++ local _netif="$1" ++ local _name_assign_type="1" ++ ++ if [ -e "/sys/class/net/$_netif/name_assign_type" ]; then ++ _name_assign_type=$(cat "/sys/class/net/$_netif/name_assign_type") ++ ++ case "$_name_assign_type" in ++ 2|3|4) ++ # NET_NAME_PREDICTABLE 2 ++ # NET_NAME_USER 3 ++ # NET_NAME_RENAMED 4 ++ return 1 ++ ;; ++ 1|*) ++ # NET_NAME_ENUM 1 ++ return 0 ++ ;; ++ esac ++ fi ++ ++ # fallback to error prone manual name check ++ case "$_netif" in ++ eth[0-9]|eth[0-9][0-9]|eth[0-9][0-9][0-9]*) ++ return 0 ++ ;; ++ *) ++ return 1 ++ esac ++ ++} +diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh +index aed30698..a1bae72f 100755 +--- a/modules.d/45ifcfg/write-ifcfg.sh ++++ b/modules.d/45ifcfg/write-ifcfg.sh +@@ -82,18 +82,41 @@ print_s390() { + return 0 + } + ++hw_bind() { ++ local _netif="$1" ++ local _macaddr="$2" ++ ++ [ -n "$_macaddr" ] \ ++ && echo "MACADDR=\"$_macaddr\"" ++ ++ print_s390 "$_netif" \ ++ && return 0 ++ ++ [ -n "$_macaddr" ] && return 0 ++ ++ is_persistent_ethernet_name "$_netif" && return 0 ++ ++ [ -f "/sys/class/net/$_netif/addr_assign_type" ] \ ++ && [ "$(cat "/sys/class/net/$_netif/addr_assign_type")" != "0" ] \ ++ && return 1 ++ ++ [ -f "/sys/class/net/$_netif/address" ] \ ++ || return 1 ++ ++ echo "HWADDR=\"$(cat /sys/class/net/$_netif/address)\"" ++} ++ + interface_bind() { +- local netif="$1" +- local macaddr="$2" +- if ! print_s390 $netif; then +- if [ -z "$macaddr" ] && \ +- ! is_persistent_ethernet_name "$netif" && \ +- [ -f /sys/class/net/$netif/addr_assign_type ] && \ +- [ "$(cat /sys/class/net/$netif/addr_assign_type)" = "0" ] && \ +- [ -f /sys/class/net/$netif/address ]; then +- echo "HWADDR=\"$(cat /sys/class/net/$netif/address)\"" +- fi ++ local _netif="$1" ++ local _macaddr="$2" ++ ++ # see, if we can bind it to some hw parms ++ if hw_bind "$_netif" "$_macaddr"; then ++ # only print out DEVICE, if it's user assigned ++ is_kernel_ethernet_name "$_netif" && return 0 + fi ++ ++ echo "DEVICE=\"$_netif\"" + } + + for netup in /tmp/net.*.did-setup ; do +@@ -131,7 +154,8 @@ for netup in /tmp/net.*.did-setup ; do + + { + echo "# Generated by dracut initrd" +- echo "DEVICE=\"$netif\"" ++ echo "NAME=\"$netif\"" ++ interface_bind "$netif" "$macaddr" + echo "ONBOOT=yes" + echo "NETBOOT=yes" + echo "UUID=\"$uuid\"" +@@ -177,10 +201,7 @@ for netup in /tmp/net.*.did-setup ; do + if [ -z "$bridge" ] && [ -z "$bond" ] && [ -z "$vlan" ]; then + # standard interface + { +- [ -n "$macaddr" ] && echo "MACADDR=\"$macaddr\"" +- interface_bind "$netif" "$macaddr" + echo "TYPE=Ethernet" +- echo "NAME=\"$netif\"" + [ -n "$mtu" ] && echo "MTU=\"$mtu\"" + } >> /tmp/ifcfg/ifcfg-$netif + fi +@@ -207,16 +228,15 @@ for netup in /tmp/net.*.did-setup ; do + # write separate ifcfg file for the raw eth interface + ( + echo "# Generated by dracut initrd" +- echo "DEVICE=\"$slave\"" ++ echo "NAME=\"$slave\"" + echo "TYPE=Ethernet" + echo "ONBOOT=yes" + echo "NETBOOT=yes" + echo "SLAVE=yes" + echo "MASTER=\"$netif\"" +- echo "NAME=\"$slave\"" + echo "UUID=\"$(cat /proc/sys/kernel/random/uuid)\"" ++ unset macaddr + [ -e /tmp/net.$slave.override ] && . /tmp/net.$slave.override +- [ -n "$macaddr" ] && echo "MACADDR=\"$macaddr\"" + interface_bind "$slave" "$macaddr" + ) >> /tmp/ifcfg/ifcfg-$slave + done +@@ -232,15 +252,14 @@ for netup in /tmp/net.*.did-setup ; do + # write separate ifcfg file for the raw eth interface + ( + echo "# Generated by dracut initrd" +- echo "DEVICE=\"$slave\"" ++ echo "NAME=\"$slave\"" + echo "TYPE=Ethernet" + echo "ONBOOT=yes" + echo "NETBOOT=yes" + echo "BRIDGE=\"$bridgename\"" +- echo "NAME=\"$slave\"" + echo "UUID=\"$(cat /proc/sys/kernel/random/uuid)\"" ++ unset macaddr + [ -e /tmp/net.$slave.override ] && . /tmp/net.$slave.override +- [ -n "$macaddr" ] && echo "MACADDR=\"$macaddr\"" + interface_bind "$slave" "$macaddr" + ) >> /tmp/ifcfg/ifcfg-$slave + done diff --git a/SOURCES/0226-fips-add-libfreeblpriv3.so-and-libfreeblpriv3.chk.patch b/SOURCES/0226-fips-add-libfreeblpriv3.so-and-libfreeblpriv3.chk.patch new file mode 100644 index 0000000..737996b --- /dev/null +++ b/SOURCES/0226-fips-add-libfreeblpriv3.so-and-libfreeblpriv3.chk.patch @@ -0,0 +1,24 @@ +From eeb68f0a160dddd1e841b19a76d604bfe5569b9d Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 28 Nov 2014 15:32:17 +0100 +Subject: [PATCH] fips: add libfreeblpriv3.so and libfreeblpriv3.chk + +(cherry picked from commit 3659d64df3fe87e2ec2ca6a55c8f456dabb953db) +--- + modules.d/01fips/module-setup.sh | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh +index 35cfdc5a..2b0e836c 100755 +--- a/modules.d/01fips/module-setup.sh ++++ b/modules.d/01fips/module-setup.sh +@@ -38,7 +38,8 @@ install() { + + inst_libdir_file libsoftokn3.so libsoftokn3.so \ + libsoftokn3.chk libfreebl3.so libfreebl3.chk \ +- libssl.so 'hmaccalc/sha512hmac.hmac' libssl.so.10 ++ libssl.so 'hmaccalc/sha512hmac.hmac' libssl.so.10 \ ++ libfreeblpriv3.so and libfreeblpriv3.chk + + inst_multiple -o prelink + inst_simple /etc/system-fips diff --git a/SOURCES/0227-fips-remove-c-p-and.patch b/SOURCES/0227-fips-remove-c-p-and.patch new file mode 100644 index 0000000..a6d11ba --- /dev/null +++ b/SOURCES/0227-fips-remove-c-p-and.patch @@ -0,0 +1,23 @@ +From 8964abbd4033516f8763248ca426f8ee7bbf868c Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 9 Jan 2015 14:53:42 +0100 +Subject: [PATCH] fips: remove c&p "and" + +(cherry picked from commit 40899490330574487e7e3ea2c448a521b36bb40a) +--- + modules.d/01fips/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh +index 2b0e836c..906b49f4 100755 +--- a/modules.d/01fips/module-setup.sh ++++ b/modules.d/01fips/module-setup.sh +@@ -39,7 +39,7 @@ install() { + inst_libdir_file libsoftokn3.so libsoftokn3.so \ + libsoftokn3.chk libfreebl3.so libfreebl3.chk \ + libssl.so 'hmaccalc/sha512hmac.hmac' libssl.so.10 \ +- libfreeblpriv3.so and libfreeblpriv3.chk ++ libfreeblpriv3.so libfreeblpriv3.chk + + inst_multiple -o prelink + inst_simple /etc/system-fips diff --git a/SOURCES/0228-net-lib.sh-parse_iscsi_root-fix-target-parsing.patch b/SOURCES/0228-net-lib.sh-parse_iscsi_root-fix-target-parsing.patch new file mode 100644 index 0000000..a1f6bd2 --- /dev/null +++ b/SOURCES/0228-net-lib.sh-parse_iscsi_root-fix-target-parsing.patch @@ -0,0 +1,93 @@ +From 20700e3dea3c10aa2c9d4a724ec3d671455d556f Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Mon, 12 Jan 2015 14:06:10 +0100 +Subject: [PATCH] net-lib.sh:parse_iscsi_root() fix target parsing + +For targets with colons in the iSCSI target name: + "iqn.2000-09.com.foo:storage-system.e2000:00000001cm1p1" + +the parser was confused with the optional iscsi_iface_name and +iscsi_netdev_name. + +This patch reintroduces the old IQN, EUI and NAA parsing and enhances +the fallback parser by checking the LUN for a numerical value. + +(cherry picked from commit 36e8ce4fb01824b49697bd0e7ad3ca3c4cfd4297) +--- + modules.d/40network/net-lib.sh | 50 ++++++++++++++++++++++++++-------- + 1 file changed, 38 insertions(+), 12 deletions(-) + +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index 337817e3..f0850207 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -310,6 +310,23 @@ parse_iscsi_root() + ;; + esac + ++ unset iscsi_target_name ++ # extract target name ++ case "$v" in ++ *:iqn.*) ++ iscsi_target_name=iqn.${v##*:iqn.} ++ v=${v%:iqn.*}: ++ ;; ++ *:eui.*) ++ iscsi_target_name=iqn.${v##*:eui.} ++ v=${v%:iqn.*}: ++ ;; ++ *:naa.*) ++ iscsi_target_name=iqn.${v##*:naa.} ++ v=${v%:iqn.*}: ++ ;; ++ esac ++ + # parse the rest + OLDIFS="$IFS" + IFS=: +@@ -319,24 +336,33 @@ parse_iscsi_root() + iscsi_protocol=$1; shift # ignored + iscsi_target_port=$1; shift + +- if [ $# -gt 3 ] && [ -n "$1$2" ]; then +- iscsi_iface_name=$1; shift +- iscsi_netdev_name=$1; shift ++ if [ -n "$iscsi_target_name" ]; then ++ if [ $# -eq 3 ]; then ++ iscsi_iface_name=$1; shift ++ fi ++ if [ $# -eq 2 ]; then ++ iscsi_netdev_name=$1; shift ++ fi ++ iscsi_lun=$1; shift ++ if [ $# -ne 0 ]; then ++ warn "Invalid parameter in iscsi: parameter!" ++ return 1 ++ fi ++ return 0 + fi + +- iscsi_lun=$1; shift + +- if [ $# -gt 2 ]; then +- warn "Invalid parameter in iscsi: parameter!" +- return 1 ++ if [ $# -gt 3 ] && [ -n "$1$2" ]; then ++ if [ -z "$3" ] || [ "$3" -ge 0 ] 2>/dev/null ; then ++ iscsi_iface_name=$1; shift ++ iscsi_netdev_name=$1; shift ++ fi + fi + +- if [ $# -eq 2 ]; then +- iscsi_target_name="$1:$2" +- else +- iscsi_target_name="$1" +- fi ++ iscsi_lun=$1; shift + ++ iscsi_target_name=$(printf "%s:" "$@") ++ iscsi_target_name=${iscsi_target_name%:} + } + + ip_to_var() { diff --git a/SOURCES/0229-ssh-client-s-key-key.patch b/SOURCES/0229-ssh-client-s-key-key.patch new file mode 100644 index 0000000..ebd0cb4 --- /dev/null +++ b/SOURCES/0229-ssh-client-s-key-key.patch @@ -0,0 +1,27 @@ +From 509a3b2c3354d6ea83bc61a83ac35f64c1c32103 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Mon, 12 Jan 2015 14:20:42 +0100 +Subject: [PATCH] ssh-client: s/key/$key + +GlobalKnownHostsFile was not installed, because key was not $key + +Thanks Jan Stodola! + +(cherry picked from commit 4ba44e899cbc58e7cee0ff66c8ac4a96f502b972) +--- + modules.d/95ssh-client/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/95ssh-client/module-setup.sh b/modules.d/95ssh-client/module-setup.sh +index f60e9631..c7d8ee24 100755 +--- a/modules.d/95ssh-client/module-setup.sh ++++ b/modules.d/95ssh-client/module-setup.sh +@@ -45,7 +45,7 @@ inst_sshenv() + inst_simple /etc/ssh/ssh_config + sed -i -e 's/\(^[[:space:]]*\)ProxyCommand/\1# ProxyCommand/' ${initdir}/etc/ssh/ssh_config + while read key val; do +- [[ key != "GlobalKnownHostsFile" ]] && continue ++ [[ $key != "GlobalKnownHostsFile" ]] && continue + inst_simple "$val" + break + done < /etc/ssh/ssh_config diff --git a/SOURCES/0230-cms-cms-write-ifcfg.sh-turn-SUBCHANNELS-into-lowerca.patch b/SOURCES/0230-cms-cms-write-ifcfg.sh-turn-SUBCHANNELS-into-lowerca.patch new file mode 100644 index 0000000..d51be26 --- /dev/null +++ b/SOURCES/0230-cms-cms-write-ifcfg.sh-turn-SUBCHANNELS-into-lowerca.patch @@ -0,0 +1,22 @@ +From b96ce4a6fdd61e5b268772ce5a09fcb2ca45c762 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Mon, 1 Dec 2014 15:04:53 +0100 +Subject: [PATCH] cms/cms-write-ifcfg.sh: turn SUBCHANNELS into lowercase + +(cherry picked from commit 3ae03005b85a702256ead058375c9fab2e53950e) +--- + modules.d/80cms/cms-write-ifcfg.sh | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/modules.d/80cms/cms-write-ifcfg.sh b/modules.d/80cms/cms-write-ifcfg.sh +index c0623a41..78469960 100755 +--- a/modules.d/80cms/cms-write-ifcfg.sh ++++ b/modules.d/80cms/cms-write-ifcfg.sh +@@ -9,6 +9,7 @@ mkdir -m 0755 -p /run/initramfs/state/etc/sysconfig/network-scripts + function cms_write_config() + { + . /tmp/cms.conf ++ SUBCHANNELS="$(echo $SUBCHANNELS | sed 'y/ABCDEF/abcdef/')" + OLDIFS=$IFS + IFS=, + read -a subch_array <<< "indexzero,$SUBCHANNELS" diff --git a/SOURCES/0231-40network-Fix-the-syntax-to-correct-the-judgment-sen.patch b/SOURCES/0231-40network-Fix-the-syntax-to-correct-the-judgment-sen.patch new file mode 100644 index 0000000..df32b8a --- /dev/null +++ b/SOURCES/0231-40network-Fix-the-syntax-to-correct-the-judgment-sen.patch @@ -0,0 +1,29 @@ +From 0b7fad28375c6156ad2d8159c3adbedef0b53740 Mon Sep 17 00:00:00 2001 +From: Minfei Huang <mhuang@redhat.com> +Date: Mon, 1 Dec 2014 12:37:06 +0800 +Subject: [PATCH] 40network: Fix the syntax to correct the judgment sentence + +In the judgment sentence, it will print the following warning message, +becasuse of lacking the blank on the left of ']'. + +/lib/net-lib.sh: line 110: [: missing `]' + +Signed-off-by: Minfei Huang <mhuang@redhat.com> +(cherry picked from commit c440d302f1cdfc0336e9086c7b9016356f961936) +--- + modules.d/40network/net-lib.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index f0850207..9c6b9dae 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -107,7 +107,7 @@ setup_net() { + # add static route + for _p in $(getargs rd.route); do + route_to_var "$_p" || continue +- [ -n "$route_dev" ] && [ "$route_dev" != "$netif"] && continue ++ [ -n "$route_dev" ] && [ "$route_dev" != "$netif" ] && continue + ip route add "$route_mask" ${route_gw:+via "$route_gw"} ${route_dev:+dev "$route_dev"} + if strstr ":" "$route_mask"; then + printf -- "%s\n" "$route_mask ${route_gw:+via $route_gw} ${route_dev:+dev $route_dev}" \ diff --git a/SOURCES/0232-systemd-add-90-vconsole.rules.patch b/SOURCES/0232-systemd-add-90-vconsole.rules.patch new file mode 100644 index 0000000..d270672 --- /dev/null +++ b/SOURCES/0232-systemd-add-90-vconsole.rules.patch @@ -0,0 +1,30 @@ +From 7bbee6ac49f46319f8bda222ae67377252346704 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 6 Nov 2014 10:44:33 +0100 +Subject: [PATCH] systemd: add 90-vconsole.rules + +run systemd-vconsole-setup if fbcon device shows up + +(cherry picked from commit 027565d0233f76edf434b63a847a717185d267e2) +--- + modules.d/98systemd/module-setup.sh | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh +index 015597f4..f62f5511 100755 +--- a/modules.d/98systemd/module-setup.sh ++++ b/modules.d/98systemd/module-setup.sh +@@ -196,7 +196,12 @@ install() { + inst_binary true + ln_r $(type -P true) "/usr/bin/loginctl" + ln_r $(type -P true) "/bin/loginctl" +- inst_rules 70-uaccess.rules 71-seat.rules 73-seat-late.rules 99-systemd.rules ++ inst_rules \ ++ 70-uaccess.rules \ ++ 71-seat.rules \ ++ 73-seat-late.rules \ ++ 90-vconsole.rules \ ++ 99-systemd.rules + + for i in \ + emergency.target \ diff --git a/SOURCES/0233-network-add-support-for-comma-separated-autoconf-opt.patch b/SOURCES/0233-network-add-support-for-comma-separated-autoconf-opt.patch new file mode 100644 index 0000000..3595f3c --- /dev/null +++ b/SOURCES/0233-network-add-support-for-comma-separated-autoconf-opt.patch @@ -0,0 +1,97 @@ +From 368f08cb7efca9738292859e179da269597412e4 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 14 Jan 2015 11:28:16 +0100 +Subject: [PATCH] network: add support for comma separated autoconf options + +ip=eth0:auto6,dhcp + +might work now +--- + modules.d/40network/ifup.sh | 24 ++++++++++-------- + modules.d/40network/parse-ip-opts.sh | 38 +++++++++++++++------------- + 2 files changed, 33 insertions(+), 29 deletions(-) + +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index 67b1d9f8..8749c4c2 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -326,17 +326,19 @@ for p in $(getargs ip=); do + eval '[ "$'$i'" ] && echo '$i'="$'$i'"' + done > /tmp/net.$netif.override + +- case $autoconf in +- dhcp|on|any) +- do_dhcp -4 ;; +- dhcp6) +- load_ipv6 +- do_dhcp -6 ;; +- auto6) +- do_ipv6auto ;; +- *) +- do_static ;; +- esac ++ for autoopt in $(str_replace "$autoconf" "," " "); do ++ case $autoopt in ++ dhcp|on|any) ++ do_dhcp -4 ;; ++ dhcp6) ++ load_ipv6 ++ do_dhcp -6 ;; ++ auto6) ++ do_ipv6auto ;; ++ *) ++ do_static ;; ++ esac ++ done + + > /tmp/net.${netif}.up + +diff --git a/modules.d/40network/parse-ip-opts.sh b/modules.d/40network/parse-ip-opts.sh +index b029d007..5b96e069 100755 +--- a/modules.d/40network/parse-ip-opts.sh ++++ b/modules.d/40network/parse-ip-opts.sh +@@ -66,24 +66,26 @@ for p in $(getargs ip=); do + fi + + # Error checking for autoconf in combination with other values +- case $autoconf in +- error) die "Error parsing option 'ip=$p'";; +- bootp|rarp|both) die "Sorry, ip=$autoconf is currenty unsupported";; +- none|off) +- [ -z "$ip" ] && \ +- die "For argument 'ip=$p'\nValue '$autoconf' without static configuration does not make sense" +- [ -z "$mask" ] && \ +- die "Sorry, automatic calculation of netmask is not yet supported" +- ;; +- auto6);; +- dhcp|dhcp6|on|any) \ +- [ -n "$NEEDBOOTDEV" ] && [ -z "$dev" ] && \ +- die "Sorry, 'ip=$p' does not make sense for multiple interface configurations" +- [ -n "$ip" ] && \ +- die "For argument 'ip=$p'\nSorry, setting client-ip does not make sense for '$autoconf'" +- ;; +- *) die "For argument 'ip=$p'\nSorry, unknown value '$autoconf'";; +- esac ++ for autoopt in $(str_replace "$autoconf" "," " "); do ++ case $autoopt in ++ error) die "Error parsing option 'ip=$p'";; ++ bootp|rarp|both) die "Sorry, ip=$autoopt is currenty unsupported";; ++ none|off) ++ [ -z "$ip" ] && \ ++ die "For argument 'ip=$p'\nValue '$autoopt' without static configuration does not make sense" ++ [ -z "$mask" ] && \ ++ die "Sorry, automatic calculation of netmask is not yet supported" ++ ;; ++ auto6);; ++ dhcp|dhcp6|on|any) \ ++ [ -n "$NEEDBOOTDEV" ] && [ -z "$dev" ] && \ ++ die "Sorry, 'ip=$p' does not make sense for multiple interface configurations" ++ [ -n "$ip" ] && \ ++ die "For argument 'ip=$p'\nSorry, setting client-ip does not make sense for '$autoopt'" ++ ;; ++ *) die "For argument 'ip=$p'\nSorry, unknown value '$autoopt'";; ++ esac ++ done + + if [ -n "$dev" ] ; then + # We don't like duplicate device configs diff --git a/SOURCES/0234-test-add-fs-lib-to-dracut-module-list.patch b/SOURCES/0234-test-add-fs-lib-to-dracut-module-list.patch new file mode 100644 index 0000000..00e610a --- /dev/null +++ b/SOURCES/0234-test-add-fs-lib-to-dracut-module-list.patch @@ -0,0 +1,223 @@ +From c984ddda6a41c57f579c6d06fdc7e767395e41ac Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 24 Oct 2014 13:19:34 +0200 +Subject: [PATCH] test: add "fs-lib" to dracut module list + +(cherry picked from commit eda73c0ad2cfc6a9bc8dc429b1a6fcd873e3e1c2) +--- + 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 | 4 ++-- + test/TEST-11-LVM/test.sh | 2 +- + test/TEST-12-RAID-DEG/test.sh | 2 +- + test/TEST-13-ENC-RAID-LVM/test.sh | 2 +- + test/TEST-14-IMSM/test.sh | 2 +- + test/TEST-15-BTRFSRAID/test.sh | 2 +- + test/TEST-17-LVM-THIN/test.sh | 2 +- + test/TEST-20-NFS/test.sh | 2 +- + test/TEST-40-NBD/test.sh | 4 ++-- + test/TEST-50-MULTINIC/test.sh | 2 +- + 14 files changed, 16 insertions(+), 16 deletions(-) + +diff --git a/test/TEST-01-BASIC/test.sh b/test/TEST-01-BASIC/test.sh +index 5ee6d234..02ebc231 100755 +--- a/test/TEST-01-BASIC/test.sh ++++ b/test/TEST-01-BASIC/test.sh +@@ -62,7 +62,7 @@ test_setup() { + # We do it this way so that we do not risk trashing the host mdraid + # devices, volume groups, encrypted partitions, etc. + $basedir/dracut.sh -l -i $TESTDIR/overlay / \ +- -m "dash udev-rules base rootfs-block kernel-modules" \ ++ -m "dash udev-rules base rootfs-block fs-lib kernel-modules fs-lib" \ + -d "piix ide-gd_mod ata_piix ext3 sd_mod" \ + --nomdadmconf \ + -f $TESTDIR/initramfs.makeroot $KVERSION || return 1 +diff --git a/test/TEST-02-SYSTEMD/test.sh b/test/TEST-02-SYSTEMD/test.sh +index 2ccf8e69..2a8ed6b5 100755 +--- a/test/TEST-02-SYSTEMD/test.sh ++++ b/test/TEST-02-SYSTEMD/test.sh +@@ -58,7 +58,7 @@ test_setup() { + # We do it this way so that we do not risk trashing the host mdraid + # devices, volume groups, encrypted partitions, etc. + $basedir/dracut.sh -l -i $TESTDIR/overlay / \ +- -m "dash udev-rules base rootfs-block kernel-modules" \ ++ -m "dash udev-rules base rootfs-block fs-lib kernel-modules" \ + -d "piix ide-gd_mod ata_piix ext3 sd_mod" \ + --nomdadmconf \ + -f $TESTDIR/initramfs.makeroot $KVERSION || return 1 +diff --git a/test/TEST-03-USR-MOUNT/test.sh b/test/TEST-03-USR-MOUNT/test.sh +index ef74d402..b8231fed 100755 +--- a/test/TEST-03-USR-MOUNT/test.sh ++++ b/test/TEST-03-USR-MOUNT/test.sh +@@ -89,7 +89,7 @@ test_setup() { + # We do it this way so that we do not risk trashing the host mdraid + # devices, volume groups, encrypted partitions, etc. + $basedir/dracut.sh -l -i $TESTDIR/overlay / \ +- -m "dash udev-rules btrfs base rootfs-block kernel-modules" \ ++ -m "dash udev-rules btrfs base rootfs-block fs-lib kernel-modules" \ + -d "piix ide-gd_mod ata_piix btrfs sd_mod" \ + --nomdadmconf \ + --nohardlink \ +diff --git a/test/TEST-04-FULL-SYSTEMD/test.sh b/test/TEST-04-FULL-SYSTEMD/test.sh +index 3eeb8406..aa83122c 100755 +--- a/test/TEST-04-FULL-SYSTEMD/test.sh ++++ b/test/TEST-04-FULL-SYSTEMD/test.sh +@@ -232,7 +232,7 @@ EOF + # We do it this way so that we do not risk trashing the host mdraid + # devices, volume groups, encrypted partitions, etc. + $basedir/dracut.sh -l -i $TESTDIR/overlay / \ +- -m "dash udev-rules btrfs base rootfs-block kernel-modules" \ ++ -m "dash udev-rules btrfs base rootfs-block fs-lib kernel-modules" \ + -d "piix ide-gd_mod ata_piix btrfs sd_mod" \ + --nomdadmconf \ + --nohardlink \ +diff --git a/test/TEST-10-RAID/test.sh b/test/TEST-10-RAID/test.sh +index b17e912c..d79d5cd4 100755 +--- a/test/TEST-10-RAID/test.sh ++++ b/test/TEST-10-RAID/test.sh +@@ -5,7 +5,7 @@ KVERSION=${KVERSION-$(uname -r)} + + # Uncomment this to debug failures + #DEBUGFAIL="rd.shell rd.udev.log-priority=debug loglevel=70 systemd.log_target=kmsg" +-#DEBUGFAIL="rd.break rd.shell" ++#DEBUGFAIL="rd.break rd.shell rd.debug debug" + test_run() { + DISKIMAGE=$TESTDIR/TEST-10-RAID-root.img + $testdir/run-qemu \ +@@ -60,7 +60,7 @@ test_setup() { + # We do it this way so that we do not risk trashing the host mdraid + # devices, volume groups, encrypted partitions, etc. + $basedir/dracut.sh -l -i $TESTDIR/overlay / \ +- -m "dash crypt lvm mdraid udev-rules base rootfs-block kernel-modules" \ ++ -m "dash crypt lvm mdraid udev-rules base rootfs-block fs-lib kernel-modules" \ + -d "piix ide-gd_mod ata_piix ext2 sd_mod" \ + --nomdadmconf \ + -f $TESTDIR/initramfs.makeroot $KVERSION || return 1 +diff --git a/test/TEST-11-LVM/test.sh b/test/TEST-11-LVM/test.sh +index 6f2461c9..732d0c8f 100755 +--- a/test/TEST-11-LVM/test.sh ++++ b/test/TEST-11-LVM/test.sh +@@ -57,7 +57,7 @@ test_setup() { + # We do it this way so that we do not risk trashing the host mdraid + # devices, volume groups, encrypted partitions, etc. + $basedir/dracut.sh -l -i $TESTDIR/overlay / \ +- -m "dash lvm mdraid udev-rules base rootfs-block kernel-modules" \ ++ -m "dash lvm mdraid udev-rules base rootfs-block fs-lib kernel-modules" \ + -d "piix ide-gd_mod ata_piix ext2 sd_mod" \ + -f $TESTDIR/initramfs.makeroot $KVERSION || return 1 + rm -rf -- $TESTDIR/overlay +diff --git a/test/TEST-12-RAID-DEG/test.sh b/test/TEST-12-RAID-DEG/test.sh +index 26316210..87fe542f 100755 +--- a/test/TEST-12-RAID-DEG/test.sh ++++ b/test/TEST-12-RAID-DEG/test.sh +@@ -98,7 +98,7 @@ test_setup() { + # We do it this way so that we do not risk trashing the host mdraid + # devices, volume groups, encrypted partitions, etc. + $basedir/dracut.sh -l -i $TESTDIR/overlay / \ +- -m "dash crypt lvm mdraid udev-rules base rootfs-block kernel-modules" \ ++ -m "dash crypt lvm mdraid udev-rules base rootfs-block fs-lib kernel-modules" \ + -d "piix ide-gd_mod ata_piix ext2 sd_mod" \ + -f $TESTDIR/initramfs.makeroot $KVERSION || return 1 + rm -rf -- $TESTDIR/overlay +diff --git a/test/TEST-13-ENC-RAID-LVM/test.sh b/test/TEST-13-ENC-RAID-LVM/test.sh +index 51021420..129620b1 100755 +--- a/test/TEST-13-ENC-RAID-LVM/test.sh ++++ b/test/TEST-13-ENC-RAID-LVM/test.sh +@@ -94,7 +94,7 @@ test_setup() { + # We do it this way so that we do not risk trashing the host mdraid + # devices, volume groups, encrypted partitions, etc. + $basedir/dracut.sh -l -i $TESTDIR/overlay / \ +- -m "dash crypt lvm mdraid udev-rules base rootfs-block kernel-modules" \ ++ -m "dash crypt lvm mdraid udev-rules base rootfs-block fs-lib kernel-modules" \ + -d "piix ide-gd_mod ata_piix ext2 sd_mod" \ + -f $TESTDIR/initramfs.makeroot $KVERSION || return 1 + rm -rf -- $TESTDIR/overlay +diff --git a/test/TEST-14-IMSM/test.sh b/test/TEST-14-IMSM/test.sh +index 532c3489..ad0cf7b0 100755 +--- a/test/TEST-14-IMSM/test.sh ++++ b/test/TEST-14-IMSM/test.sh +@@ -86,7 +86,7 @@ test_setup() { + # We do it this way so that we do not risk trashing the host mdraid + # devices, volume groups, encrypted partitions, etc. + $basedir/dracut.sh -l -i $TESTDIR/overlay / \ +- -m "dash lvm mdraid dmraid udev-rules base rootfs-block kernel-modules" \ ++ -m "dash lvm mdraid dmraid udev-rules base rootfs-block fs-lib kernel-modules" \ + -d "piix ide-gd_mod ata_piix ext2 sd_mod dm-multipath dm-crypt dm-round-robin faulty linear multipath raid0 raid10 raid1 raid456" \ + -f $TESTDIR/initramfs.makeroot $KVERSION || return 1 + rm -rf -- $TESTDIR/overlay +diff --git a/test/TEST-15-BTRFSRAID/test.sh b/test/TEST-15-BTRFSRAID/test.sh +index 3fc1d459..71f5703a 100755 +--- a/test/TEST-15-BTRFSRAID/test.sh ++++ b/test/TEST-15-BTRFSRAID/test.sh +@@ -58,7 +58,7 @@ test_setup() { + # We do it this way so that we do not risk trashing the host mdraid + # devices, volume groups, encrypted partitions, etc. + $basedir/dracut.sh -l -i $TESTDIR/overlay / \ +- -m "dash btrfs udev-rules base rootfs-block kernel-modules" \ ++ -m "dash btrfs udev-rules base rootfs-block fs-lib kernel-modules" \ + -d "piix ide-gd_mod ata_piix btrfs sd_mod" \ + --nomdadmconf \ + -f $TESTDIR/initramfs.makeroot $KVERSION || return 1 +diff --git a/test/TEST-17-LVM-THIN/test.sh b/test/TEST-17-LVM-THIN/test.sh +index 0cfce199..4c904b0a 100755 +--- a/test/TEST-17-LVM-THIN/test.sh ++++ b/test/TEST-17-LVM-THIN/test.sh +@@ -57,7 +57,7 @@ test_setup() { + # We do it this way so that we do not risk trashing the host mdraid + # devices, volume groups, encrypted partitions, etc. + $basedir/dracut.sh -l -i $TESTDIR/overlay / \ +- -m "dash lvm mdraid udev-rules base rootfs-block kernel-modules" \ ++ -m "dash lvm mdraid udev-rules base rootfs-block fs-lib kernel-modules" \ + -d "piix ide-gd_mod ata_piix ext2 sd_mod" \ + -f $TESTDIR/initramfs.makeroot $KVERSION || return 1 + rm -rf -- $TESTDIR/overlay +diff --git a/test/TEST-20-NFS/test.sh b/test/TEST-20-NFS/test.sh +index 4f21d451..7b5e3c5d 100755 +--- a/test/TEST-20-NFS/test.sh ++++ b/test/TEST-20-NFS/test.sh +@@ -340,7 +340,7 @@ test_setup() { + + # Make server's dracut image + $basedir/dracut.sh -l -i $TESTDIR/overlay / \ +- -m "dash udev-rules base rootfs-block debug kernel-modules watchdog" \ ++ -m "dash udev-rules base rootfs-block fs-lib debug kernel-modules watchdog" \ + -d "af_packet piix ide-gd_mod ata_piix ext3 sd_mod e1000 i6300esb" \ + -f $TESTDIR/initramfs.server $KVERSION || return 1 + +diff --git a/test/TEST-40-NBD/test.sh b/test/TEST-40-NBD/test.sh +index 7cf64b15..59494ed8 100755 +--- a/test/TEST-40-NBD/test.sh ++++ b/test/TEST-40-NBD/test.sh +@@ -226,7 +226,7 @@ make_encrypted_root() { + # We do it this way so that we do not risk trashing the host mdraid + # devices, volume groups, encrypted partitions, etc. + $basedir/dracut.sh -l -i $TESTDIR/overlay / \ +- -m "dash crypt lvm mdraid udev-rules base rootfs-block kernel-modules" \ ++ -m "dash crypt lvm mdraid udev-rules base rootfs-block fs-lib kernel-modules" \ + -d "piix ide-gd_mod ata_piix ext2 ext3 sd_mod" \ + -f $TESTDIR/initramfs.makeroot $KVERSION || return 1 + rm -rf -- $TESTDIR/overlay +@@ -352,7 +352,7 @@ test_setup() { + ) + + sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ +- -m "dash udev-rules rootfs-block base debug kernel-modules" \ ++ -m "dash udev-rules rootfs-block fs-lib base debug kernel-modules" \ + -d "af_packet piix ide-gd_mod ata_piix ext2 ext3 sd_mod e1000" \ + -f $TESTDIR/initramfs.server $KVERSION || return 1 + +diff --git a/test/TEST-50-MULTINIC/test.sh b/test/TEST-50-MULTINIC/test.sh +index add849c1..3c6003b4 100755 +--- a/test/TEST-50-MULTINIC/test.sh ++++ b/test/TEST-50-MULTINIC/test.sh +@@ -264,7 +264,7 @@ test_setup() { + + # Make server's dracut image + $basedir/dracut.sh -l -i "$TESTDIR"/overlay / \ +- -m "dash udev-rules base rootfs-block debug kernel-modules watchdog" \ ++ -m "dash udev-rules base rootfs-block fs-lib debug kernel-modules watchdog" \ + -d "af_packet piix ide-gd_mod ata_piix ext3 sd_mod nfsv2 nfsv3 nfsv4 nfs_acl nfs_layout_nfsv41_files nfsd e1000 i6300esb ib700wdt" \ + -f "$TESTDIR"/initramfs.server "$KVERSION" || return 1 + diff --git a/SOURCES/0235-network-enhance-team-support.patch b/SOURCES/0235-network-enhance-team-support.patch new file mode 100644 index 0000000..2b1e798 --- /dev/null +++ b/SOURCES/0235-network-enhance-team-support.patch @@ -0,0 +1,291 @@ +From 4c88c2859e3f974b2dc3c7726409c83076df8985 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 13 Jan 2015 15:06:48 +0100 +Subject: [PATCH] network: enhance team support + +Install ifcfg-* files with team configuration in the initramfs. + +Improve the slave configuration of the team interface, by looking up +ifcfg files in the initramfs. + +Create a default loadbalance team config, if none present in the +initramfs. +--- + modules.d/40network/ifup.sh | 38 ++++++++++++++++++++++------- + modules.d/40network/module-setup.sh | 37 ++++++++++++++++++++++++++++ + modules.d/40network/net-genrules.sh | 9 ++++--- + modules.d/40network/net-lib.sh | 18 ++++++++++++++ + modules.d/40network/parse-team.sh | 30 +++++++++++++++-------- + modules.d/45ifcfg/write-ifcfg.sh | 10 +++++++- + 6 files changed, 119 insertions(+), 23 deletions(-) + +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index 8749c4c2..7836a6b3 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -34,14 +34,16 @@ for i in /tmp/bond.*.info; do + done + done + +-if [ -e /tmp/team.info ]; then +- . /tmp/team.info ++for i in /tmp/team.*.info; do ++ [ -e "$i" ] || continue ++ unset teamslaves ++ unset teammaster + for slave in $teamslaves ; do + if [ "$netif" = "$slave" ] ; then + netif=$teammaster + fi + done +-fi ++done + + if [ -e /tmp/vlan.info ]; then + . /tmp/vlan.info +@@ -205,26 +207,44 @@ if [ -e /tmp/bond.${netif}.info ]; then + fi + fi + +-if [ -e /tmp/team.info ]; then +- . /tmp/team.info ++if [ -e /tmp/team.${netif}.info ]; then ++ . /tmp/team.${netif}.info + if [ "$netif" = "$teammaster" ] && [ ! -e /tmp/net.$teammaster.up ] ; then + # We shall only bring up those _can_ come up + # in case of some slave is gone in active-backup mode + working_slaves="" + for slave in $teamslaves ; do +- ip link set $slave up 2>/dev/null ++ teamdctl ${teammaster} port present ${slave} 2>/dev/null \ ++ && continue ++ ip link set dev $slave up 2>/dev/null + if wait_for_if_up $slave; then + working_slaves+="$slave " + fi + done + # Do not add slaves now +- teamd -d -U -n -t $teammaster -f /etc/teamd/$teammaster.conf ++ teamd -d -U -n -t $teammaster -f /etc/teamd/${teammaster}.conf + for slave in $working_slaves; do + # team requires the slaves to be down before joining team +- ip link set $slave down ++ ip link set dev $slave down ++ ( ++ unset TEAM_PORT_CONFIG ++ _hwaddr=$(cat /sys/class/net/$slave/address) ++ _subchannels=$(iface_get_subchannels "$slave") ++ if [ -n "$_hwaddr" ] && [ -e "/etc/sysconfig/network-scripts/mac-${_hwaddr}.conf" ]; then ++ . "/etc/sysconfig/network-scripts/mac-${_hwaddr}.conf" ++ elif [ -n "$_subchannels" ] && [ -e "/etc/sysconfig/network-scripts/ccw-${_subchannels}.conf" ]; then ++ . "/etc/sysconfig/network-scripts/ccw-${_subchannels}.conf" ++ elif [ -e "/etc/sysconfig/network-scripts/ifcfg-${slave}" ]; then ++ . "/etc/sysconfig/network-scripts/ifcfg-${slave}" ++ fi ++ ++ if [ -n "${TEAM_PORT_CONFIG}" ]; then ++ /usr/bin/teamdctl ${teammaster} port config update ${slave} "${TEAM_PORT_CONFIG}" ++ fi ++ ) + teamdctl $teammaster port add $slave + done +- ip link set $teammaster up ++ ip link set dev $teammaster up + fi + fi + +diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh +index a5e796f4..a52e881b 100755 +--- a/modules.d/40network/module-setup.sh ++++ b/modules.d/40network/module-setup.sh +@@ -95,6 +95,43 @@ install() { + inst_hook cmdline 99 "$moddir/parse-ifname.sh" + inst_hook cleanup 10 "$moddir/kill-dhclient.sh" + ++ # install all config files for teaming ++ unset TEAM_MASTER ++ unset TEAM_CONFIG ++ unset TEAM_PORT_CONFIG ++ unset HWADDR ++ unset SUBCHANNELS ++ for i in /etc/sysconfig/network-scripts/ifcfg-*; do ++ [ -e "$i" ] || continue ++ case "$i" in ++ *~ | *.bak | *.orig | *.rpmnew | *.rpmorig | *.rpmsave) ++ continue ++ ;; ++ esac ++ ( ++ . "$i" ++ if ! [ "${ONBOOT}" = "no" -o "${ONBOOT}" = "NO" ] \ ++ && [ -n "${TEAM_MASTER}${TEAM_CONFIG}${TEAM_PORT_CONFIG}" ]; then ++ if [ -n "$TEAM_CONFIG" ] && [ -n "$DEVICE" ]; then ++ mkdir -p $initdir/etc/teamd ++ printf -- "%s" "$TEAM_CONFIG" > "$initdir/etc/teamd/${DEVICE}.conf" ++ elif [ -n "$TEAM_PORT_CONFIG" ]; then ++ inst_simple "$i" ++ ++ HWADDR="$(echo $HWADDR | sed 'y/ABCDEF/abcdef/')" ++ if [ -n "$HWADDR" ]; then ++ ln_r "$i" "/etc/sysconfig/network-scripts/mac-${HWADDR}.conf" ++ fi ++ ++ SUBCHANNELS="$(echo $SUBCHANNELS | sed 'y/ABCDEF/abcdef/')" ++ if [ -n "$SUBCHANNELS" ]; then ++ ln_r "$i" "/etc/sysconfig/network-scripts/ccw-${SUBCHANNELS}.conf" ++ fi ++ fi ++ fi ++ ) ++ done ++ + _arch=$(uname -m) + + inst_libdir_file {"tls/$_arch/",tls/,"$_arch/",}"libnss_dns.so.*" \ +diff --git a/modules.d/40network/net-genrules.sh b/modules.d/40network/net-genrules.sh +index a43e3df1..3664984f 100755 +--- a/modules.d/40network/net-genrules.sh ++++ b/modules.d/40network/net-genrules.sh +@@ -31,11 +31,14 @@ command -v fix_bootif >/dev/null || . /lib/net-lib.sh + MASTER_IFACES="$MASTER_IFACES ${bondname}" + done + +- if [ -e /tmp/team.info ]; then +- . /tmp/team.info ++ for i in /tmp/team.*.info; do ++ [ -e "$i" ] || continue ++ unset teamslaves ++ unset teammaster ++ . "$i" + IFACES="$IFACES ${teamslaves}" + MASTER_IFACES="$MASTER_IFACES ${teammaster}" +- fi ++ done + + if [ -e /tmp/vlan.info ]; then + . /tmp/vlan.info +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index 9c6b9dae..82827b6d 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -643,3 +643,21 @@ is_kernel_ethernet_name() { + esac + + } ++ ++iface_get_subchannels() { ++ local _netif ++ local _subchannels ++ ++ _netif="$1" ++ ++ _subchannels=$({ ++ for i in /sys/class/net/$_netif/device/cdev[0-9]*; do ++ [ -e $i ] || continue ++ channel=$(readlink -f $i) ++ printf -- "%s" "${channel##*/}," ++ done ++ }) ++ [ -n "$_subchannels" ] || return 1 ++ ++ printf -- "%s" ${_subchannels%,} ++} +diff --git a/modules.d/40network/parse-team.sh b/modules.d/40network/parse-team.sh +index 318c0e1e..a836d688 100755 +--- a/modules.d/40network/parse-team.sh ++++ b/modules.d/40network/parse-team.sh +@@ -24,21 +24,31 @@ parseteam() { + + unset teammaster teamslaves + case $# in +- 2) teammaster=$1; teamslaves=$(str_replace "$2" "," " ") ;; +- *) die "team= requires two parameters" ;; ++ 2) teammaster=$1; teamslaves=$(str_replace "$2" "," " ") ;; ++ *) warn "team= requires two parameters"; return 1;; + esac ++ return 0 + } + + unset teammaster teamslaves + + if getarg team>/dev/null; then + # Read team= parameters if they exist +- team="$(getarg team=)" +- if [ ! "$team" = "team" ]; then +- parseteam "$(getarg team=)" +- fi +- +- echo "teammaster=$teammaster" > /tmp/team.info +- echo "teamslaves=\"$teamslaves\"" >> /tmp/team.info +- return ++ for team in $(getargs team); do ++ [ "$team" = "team" ] && continue ++ ++ unset teammaster ++ unset teamslaves ++ ++ parseteam "$team" || continue ++ ++ echo "teammaster=$teammaster" > /tmp/team.${teammaster}.info ++ echo "teamslaves=\"$teamslaves\"" >> /tmp/team.${teammaster}.info ++ ++ if ! [ -e /etc/teamd/${teammaster}.conf ]; then ++ warn "Team master $teammaster specified, but no /etc/teamd/$teammaster.conf present. Using activebackup." ++ mkdir -p /etc/teamd ++ printf -- "%s" '{"runner": {"name": "activebackup"}, "link_watch": {"name": "ethtool"}}' > "/etc/teamd/${teammaster}.conf" ++ fi ++ done + fi +diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh +index a1bae72f..b2462dae 100755 +--- a/modules.d/45ifcfg/write-ifcfg.sh ++++ b/modules.d/45ifcfg/write-ifcfg.sh +@@ -128,6 +128,7 @@ for netup in /tmp/net.*.did-setup ; do + [ -e /tmp/ifcfg/ifcfg-$netif ] && continue + unset bridge + unset bond ++ unset team + unset bondslaves + unset bondname + unset bondoptions +@@ -140,10 +141,13 @@ for netup in /tmp/net.*.did-setup ; do + unset slave + unset ethname + [ -e /tmp/bond.${netif}.info ] && . /tmp/bond.${netif}.info ++ [ -e /tmp/team.${netif}.info ] && . /tmp/team.${netif}.info + + uuid=$(cat /proc/sys/kernel/random/uuid) + if [ "$netif" = "$bridgename" ]; then + bridge=yes ++ elif [ "$netif" = "$teammaster" ]; then ++ team=yes + elif [ "$netif" = "$bondname" ]; then + # $netif can't be bridge and bond at the same time + bond=yes +@@ -152,6 +156,9 @@ for netup in /tmp/net.*.did-setup ; do + vlan=yes + fi + ++ # skip team interfaces for now, the host config must be in sync ++ [ "$netif" = "$teammaster" ] && continue ++ + { + echo "# Generated by dracut initrd" + echo "NAME=\"$netif\"" +@@ -198,7 +205,7 @@ for netup in /tmp/net.*.did-setup ; do + } > /tmp/ifcfg/ifcfg-$netif + + # bridge needs different things written to ifcfg +- if [ -z "$bridge" ] && [ -z "$bond" ] && [ -z "$vlan" ]; then ++ if [ -z "$bridge" ] && [ -z "$bond" ] && [ -z "$vlan" ] && [ -z "$team" ]; then + # standard interface + { + echo "TYPE=Ethernet" +@@ -264,6 +271,7 @@ for netup in /tmp/net.*.did-setup ; do + ) >> /tmp/ifcfg/ifcfg-$slave + done + fi ++ + i=1 + for ns in $(getargs nameserver); do + echo "DNS${i}=\"${ns}\"" >> /tmp/ifcfg/ifcfg-$netif diff --git a/SOURCES/0236-dracut-fixed-module-dependency-handling.patch b/SOURCES/0236-dracut-fixed-module-dependency-handling.patch new file mode 100644 index 0000000..490a7cb --- /dev/null +++ b/SOURCES/0236-dracut-fixed-module-dependency-handling.patch @@ -0,0 +1,112 @@ +From 6914b67545633d23063d5c5812591c67df56c0cf Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 24 Oct 2014 13:19:58 +0200 +Subject: [PATCH] dracut: fixed module dependency handling + +Fail for "--modules" and "--force-add" dracut modules, if they or their +dependencies cannot be included. + +(cherry picked from commit ab2f95e45ed9803c5cbee23f41201a0f934f8043) +--- + dracut-functions.sh | 37 ++++++++++++++++++++++++++----------- + dracut.sh | 4 +++- + 2 files changed, 29 insertions(+), 12 deletions(-) + +diff --git a/dracut-functions.sh b/dracut-functions.sh +index 6e0b44ae..89438b29 100755 +--- a/dracut-functions.sh ++++ b/dracut-functions.sh +@@ -1215,13 +1215,17 @@ check_mount() { + fi + fi + +- + for _moddep in $(module_depends $_mod); do + # handle deps as if they were manually added +- [[ " $add_dracutmodules " == *\ $_moddep\ * ]] || \ +- add_dracutmodules+=" $_moddep " +- [[ " $force_add_dracutmodules " == *\ $_moddep\ * ]] || \ +- force_add_dracutmodules+=" $_moddep " ++ [[ " $dracutmodules " == *\ $_mod\ * ]] \ ++ && [[ " $dracutmodules " != *\ $_moddep\ * ]] \ ++ && dracutmodules+=" $_moddep " ++ [[ " $add_dracutmodules " == *\ $_mod\ * ]] \ ++ && [[ " $add_dracutmodules " != *\ $_moddep\ * ]] \ ++ && add_dracutmodules+=" $_moddep " ++ [[ " $force_add_dracutmodules " == *\ $_mod\ * ]] \ ++ && [[ " $force_add_dracutmodules " != *\ $_moddep\ * ]] \ ++ && force_add_dracutmodules+=" $_moddep " + # if a module we depend on fail, fail also + if ! check_module $_moddep; then + derror "dracut module '$_mod' depends on '$_moddep', which can't be installed" +@@ -1259,7 +1263,7 @@ check_module() { + fi + + if [[ " $dracutmodules $add_dracutmodules $force_add_dracutmodules" == *\ $_mod\ * ]]; then +- if [[ " $force_add_dracutmodules " == *\ $_mod\ * ]]; then ++ if [[ " $dracutmodules $force_add_dracutmodules " == *\ $_mod\ * ]]; then + module_check $_mod 1; ret=$? + else + module_check $_mod 0; ret=$? +@@ -1270,7 +1274,11 @@ check_module() { + # module not in our list + if [[ $dracutmodules = all ]]; then + # check, if we can and should install this module +- module_check $_mod || return 1 ++ module_check $_mod; ret=$? ++ if [[ $ret != 0 ]]; then ++ [[ $2 ]] && return 1 ++ [[ $ret != 255 ]] && return 1 ++ fi + else + # skip this module + return 1 +@@ -1279,10 +1287,15 @@ check_module() { + + for _moddep in $(module_depends $_mod); do + # handle deps as if they were manually added +- [[ " $add_dracutmodules " == *\ $_moddep\ * ]] || \ +- add_dracutmodules+=" $_moddep " +- [[ " $force_add_dracutmodules " == *\ $_moddep\ * ]] || \ +- force_add_dracutmodules+=" $_moddep " ++ [[ " $dracutmodules " == *\ $_mod\ * ]] \ ++ && [[ " $dracutmodules " != *\ $_moddep\ * ]] \ ++ && dracutmodules+=" $_moddep " ++ [[ " $add_dracutmodules " == *\ $_mod\ * ]] \ ++ && [[ " $add_dracutmodules " != *\ $_moddep\ * ]] \ ++ && add_dracutmodules+=" $_moddep " ++ [[ " $force_add_dracutmodules " == *\ $_mod\ * ]] \ ++ && [[ " $force_add_dracutmodules " != *\ $_moddep\ * ]] \ ++ && force_add_dracutmodules+=" $_moddep " + # if a module we depend on fail, fail also + if ! check_module $_moddep; then + derror "dracut module '$_mod' depends on '$_moddep', which can't be installed" +@@ -1319,11 +1332,13 @@ for_each_module_dir() { + [[ " $mods_to_load " == *\ $_mod\ * ]] && continue + + [[ " $force_add_dracutmodules " != *\ $_mod\ * ]] \ ++ && [[ " $dracutmodules " != *\ $_mod\ * ]] \ + && [[ " $omit_dracutmodules " == *\ $_mod\ * ]] \ + && continue + + derror "dracut module '$_mod' cannot be found or installed." + [[ " $force_add_dracutmodules " == *\ $_mod\ * ]] && exit 1 ++ [[ " $dracutmodules " == *\ $_mod\ * ]] && exit 1 + [[ " $add_dracutmodules " == *\ $_mod\ * ]] && exit 1 + done + } +diff --git a/dracut.sh b/dracut.sh +index eff096e5..74c59a0c 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1152,7 +1152,9 @@ fi + + [[ -d "$systemdsystemconfdir" ]] || systemdsystemconfdir=/etc/systemd/system + +-export initdir dracutbasedir dracutmodules \ ++export initdir dracutbasedir \ ++ dracutmodules force_add_dracutmodules add_dracutmodules omit_dracutmodules \ ++ mods_to_load \ + fw_dir drivers_dir debug no_kernel kernel_only \ + omit_drivers mdadmconf lvmconf root_dev \ + use_fstab fstab_lines libdirs fscks nofscks ro_mnt \ diff --git a/SOURCES/0237-network-net-lib.sh-parse_iscsi_root-fix-c-p-bug.patch b/SOURCES/0237-network-net-lib.sh-parse_iscsi_root-fix-c-p-bug.patch new file mode 100644 index 0000000..c5fb151 --- /dev/null +++ b/SOURCES/0237-network-net-lib.sh-parse_iscsi_root-fix-c-p-bug.patch @@ -0,0 +1,33 @@ +From 4f992675aeff74281ff72b6f7b764c3f5240dfc6 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 15 Jan 2015 10:33:50 +0100 +Subject: [PATCH] network/net-lib.sh:parse_iscsi_root(): fix c&p bug + +fix iscsi_target_name for eui.* and naa.* target names + +(cherry picked from commit 7cddd7b838941cc2608da8641a84031d696e18e0) +--- + modules.d/40network/net-lib.sh | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index 82827b6d..89b1101d 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -318,12 +318,12 @@ parse_iscsi_root() + v=${v%:iqn.*}: + ;; + *:eui.*) +- iscsi_target_name=iqn.${v##*:eui.} +- v=${v%:iqn.*}: ++ iscsi_target_name=eui.${v##*:eui.} ++ v=${v%:eui.*}: + ;; + *:naa.*) +- iscsi_target_name=iqn.${v##*:naa.} +- v=${v%:iqn.*}: ++ iscsi_target_name=naa.${v##*:naa.} ++ v=${v%:naa.*}: + ;; + esac + diff --git a/SOURCES/0238-network-ifup-source-team-info-if-present.patch b/SOURCES/0238-network-ifup-source-team-info-if-present.patch new file mode 100644 index 0000000..a677f7c --- /dev/null +++ b/SOURCES/0238-network-ifup-source-team-info-if-present.patch @@ -0,0 +1,21 @@ +From b9372137fd224ec57d44a4ba5cff0622e20fcab5 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 21 Jan 2015 13:39:28 +0100 +Subject: [PATCH] network:ifup source team info if present + +--- + modules.d/40network/ifup.sh | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index 7836a6b3..524a3fb5 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -38,6 +38,7 @@ for i in /tmp/team.*.info; do + [ -e "$i" ] || continue + unset teamslaves + unset teammaster ++ . "$i" + for slave in $teamslaves ; do + if [ "$netif" = "$slave" ] ; then + netif=$teammaster diff --git a/SOURCES/0239-fips-add-drbg-kernel-module.patch b/SOURCES/0239-fips-add-drbg-kernel-module.patch new file mode 100644 index 0000000..b3754bc --- /dev/null +++ b/SOURCES/0239-fips-add-drbg-kernel-module.patch @@ -0,0 +1,23 @@ +From f2558ddcc1c6217d51c731792762ca20b1e3e125 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 19 Feb 2015 10:45:35 +0100 +Subject: [PATCH] fips: add drbg kernel module + +(cherry picked from commit 7e9341434fca7606d11ffce99bda61a4ccb9ef10) +--- + modules.d/01fips/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh +index 906b49f4..48156e7e 100755 +--- a/modules.d/01fips/module-setup.sh ++++ b/modules.d/01fips/module-setup.sh +@@ -13,7 +13,7 @@ depends() { + installkernel() { + local _fipsmodules _mod + _fipsmodules="aead aes_generic aes-x86_64 ansi_cprng arc4 blowfish camellia cast6 cbc ccm " +- _fipsmodules+="chainiv crc32c crct10dif_generic cryptomgr crypto_null ctr cts deflate des des3_ede dm-crypt dm-mod " ++ _fipsmodules+="chainiv crc32c crct10dif_generic cryptomgr crypto_null ctr cts deflate des des3_ede dm-crypt dm-mod drbg " + _fipsmodules+="ecb eseqiv fcrypt gcm ghash_generic hmac khazad lzo md4 md5 michael_mic rmd128 " + _fipsmodules+="rmd160 rmd256 rmd320 rot13 salsa20 seed seqiv serpent sha1 sha224 sha256 sha256_generic " + _fipsmodules+="sha384 sha512 sha512_generic tcrypt tea tnepres twofish wp256 wp384 wp512 xeta xtea xts zlib" diff --git a/SOURCES/0240-network-do-not-destroy-the-team-interface-on-teamd-s.patch b/SOURCES/0240-network-do-not-destroy-the-team-interface-on-teamd-s.patch new file mode 100644 index 0000000..c7ca75e --- /dev/null +++ b/SOURCES/0240-network-do-not-destroy-the-team-interface-on-teamd-s.patch @@ -0,0 +1,26 @@ +From 3f7d943141f543a2b9f1db612dccae502e4d556b Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Mon, 26 Jan 2015 15:12:08 +0000 +Subject: [PATCH] network: do not destroy the team interface on teamd shutdown + +when doing switch-root teamd gets killed, which tears down the team +interface, if teamd is not started with "-N". + +(cherry picked from commit 2a12e9747524dc719e0da9a9d8c382f957cc13de) +--- + modules.d/40network/ifup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index 524a3fb5..bd7db02c 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -223,7 +223,7 @@ if [ -e /tmp/team.${netif}.info ]; then + fi + done + # Do not add slaves now +- teamd -d -U -n -t $teammaster -f /etc/teamd/${teammaster}.conf ++ teamd -d -U -n -N -t $teammaster -f /etc/teamd/$teammaster.conf + for slave in $working_slaves; do + # team requires the slaves to be down before joining team + ip link set dev $slave down diff --git a/SOURCES/0241-do-not-symlink-var-log-to-run-log.patch b/SOURCES/0241-do-not-symlink-var-log-to-run-log.patch new file mode 100644 index 0000000..830def8 --- /dev/null +++ b/SOURCES/0241-do-not-symlink-var-log-to-run-log.patch @@ -0,0 +1,86 @@ +From 9eb6db5b9ac5372793aa2fc6f479a2a82a369695 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Mon, 1 Dec 2014 12:36:20 +0100 +Subject: [PATCH] do not symlink /var/log to /run/log + +some programs e.g. systemd-journald expect a directory in /var/log as +the marker to do some actions. Here journald tries to flush +/run/log/journal to /var/log/journal, if the directory is seen. + +/var/log is now a symlink to /run/initramfs/log. + +(cherry picked from commit 99d4fd6bb791ca8ce07e07e13b58445f3e20894a) +--- + dracut.sh | 1 - + modules.d/98systemd/dracut-tmpfiles.conf | 3 +++ + modules.d/98systemd/module-setup.sh | 5 +++++ + modules.d/99base/dracut-lib.sh | 11 +++++++++++ + 4 files changed, 19 insertions(+), 1 deletion(-) + create mode 100644 modules.d/98systemd/dracut-tmpfiles.conf + +diff --git a/dracut.sh b/dracut.sh +index 74c59a0c..27c2bf45 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1217,7 +1217,6 @@ if [[ $kernel_only != yes ]]; then + + ln -sfn ../run "$initdir/var/run" + ln -sfn ../run/lock "$initdir/var/lock" +- ln -sfn ../run/log "$initdir/var/log" + else + for d in lib "$libdir"; do + [[ -e "${initdir}${prefix}/$d" ]] && continue +diff --git a/modules.d/98systemd/dracut-tmpfiles.conf b/modules.d/98systemd/dracut-tmpfiles.conf +new file mode 100644 +index 00000000..3c21ce81 +--- /dev/null ++++ b/modules.d/98systemd/dracut-tmpfiles.conf +@@ -0,0 +1,3 @@ ++d /run/initramfs 0755 root root - ++d /run/initramfs/log 0755 root root - ++L /var/log - - - - ../run/initramfs/log +diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh +index f62f5511..aae0319a 100755 +--- a/modules.d/98systemd/module-setup.sh ++++ b/modules.d/98systemd/module-setup.sh +@@ -121,6 +121,8 @@ install() { + $systemdsystemunitdir/slices.target \ + $systemdsystemunitdir/system.slice \ + \ ++ $tmpfilesdir/systemd.conf \ ++ \ + journalctl systemctl echo swapoff systemd-cgls systemd-tmpfiles + + inst_multiple -o \ +@@ -230,6 +232,9 @@ install() { + ln_r "$systemdsystemunitdir/${i}" "$systemdsystemunitdir/initrd.target.wants/${i}" + done + ++ inst_simple "$moddir/dracut-tmpfiles.conf" "$tmpfilesdir/dracut-tmpfiles.conf" ++ ++ + mkdir -p "$initdir/etc/systemd" + # turn off RateLimit for journal + { +diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh +index b0ac08a0..b490e824 100755 +--- a/modules.d/99base/dracut-lib.sh ++++ b/modules.d/99base/dracut-lib.sh +@@ -4,6 +4,17 @@ + + export DRACUT_SYSTEMD + export NEWROOT ++if [ -n "$NEWROOT" ]; then ++ [ -d $NEWROOT ] || mkdir -p -m 0755 $NEWROOT ++fi ++ ++if ! [ -d /run/initramfs ]; then ++ mkdir -p -m 0755 /run/initramfs/log ++ ln -sfn /run/initramfs/log /var/log ++fi ++ ++[ -d /run/lock ] || mkdir -p -m 0755 /run/lock ++[ -d /run/log ] || mkdir -p -m 0755 /run/log + + debug_off() { + set +x diff --git a/SOURCES/0242-dracut.sh-add-tmpfilesdir-to-install-files-to-usr-li.patch b/SOURCES/0242-dracut.sh-add-tmpfilesdir-to-install-files-to-usr-li.patch new file mode 100644 index 0000000..6a6c367 --- /dev/null +++ b/SOURCES/0242-dracut.sh-add-tmpfilesdir-to-install-files-to-usr-li.patch @@ -0,0 +1,40 @@ +From cf3098064c490486e867c389509a11908661fe9a Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Mon, 1 Dec 2014 12:34:54 +0100 +Subject: [PATCH] dracut.sh: add $tmpfilesdir to install files to + /usr/lib/tmpfiles.d + +(cherry picked from commit 3a04bddeed15c810865aa49a2575bf13e651272d) +--- + dracut.sh | 11 ++++++++++- + 1 file changed, 10 insertions(+), 1 deletion(-) + +diff --git a/dracut.sh b/dracut.sh +index 27c2bf45..6e56af50 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1152,6 +1152,14 @@ fi + + [[ -d "$systemdsystemconfdir" ]] || systemdsystemconfdir=/etc/systemd/system + ++[[ -d $tmpfilesdir ]] \ ++ || tmpfilesdir=$(pkg-config systemd --variable=tmpfilesdir 2>/dev/null) ++ ++if ! [[ -d "$tmpfilesdir" ]]; then ++ [[ -f /lib/tmpfiles.d ]] && tmpfilesdir=/lib/tmpfiles.d ++ [[ -f /usr/lib/tmpfiles.d ]] && tmpfilesdir=/usr/lib/tmpfiles.d ++fi ++ + export initdir dracutbasedir \ + dracutmodules force_add_dracutmodules add_dracutmodules omit_dracutmodules \ + mods_to_load \ +@@ -1162,7 +1170,8 @@ export initdir dracutbasedir \ + debug host_fs_types host_devs sshkey add_fstab \ + DRACUT_VERSION udevdir prefix filesystems drivers \ + systemdutildir systemdsystemunitdir systemdsystemconfdir \ +- host_modalias host_modules hostonly_cmdline ++ host_modalias host_modules hostonly_cmdline loginstall \ ++ tmpfilesdir + + mods_to_load="" + # check all our modules to see if they should be sourced. diff --git a/SOURCES/0243-fips-add-some-s390-kernel-modules.patch b/SOURCES/0243-fips-add-some-s390-kernel-modules.patch new file mode 100644 index 0000000..86be5ac --- /dev/null +++ b/SOURCES/0243-fips-add-some-s390-kernel-modules.patch @@ -0,0 +1,22 @@ +From 8f1febc874fff908c58c2c1d7725281eacce6ff5 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 28 Apr 2015 10:46:33 +0200 +Subject: [PATCH] fips: add some s390 kernel modules + +(cherry picked from commit 822a7ae50431998dc359439cd6f5133c9d0e2cfb) +--- + modules.d/01fips/module-setup.sh | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh +index 48156e7e..dd8e47d1 100755 +--- a/modules.d/01fips/module-setup.sh ++++ b/modules.d/01fips/module-setup.sh +@@ -17,6 +17,7 @@ installkernel() { + _fipsmodules+="ecb eseqiv fcrypt gcm ghash_generic hmac khazad lzo md4 md5 michael_mic rmd128 " + _fipsmodules+="rmd160 rmd256 rmd320 rot13 salsa20 seed seqiv serpent sha1 sha224 sha256 sha256_generic " + _fipsmodules+="sha384 sha512 sha512_generic tcrypt tea tnepres twofish wp256 wp384 wp512 xeta xtea xts zlib" ++ _fipsmodules+="aes_s390 des_s390 prng sha256_s390 sha_common des_check_key sha1_s390 sha512_s390" + + mkdir -m 0755 -p "${initdir}/etc/modprobe.d" + diff --git a/SOURCES/0244-rearrange-fips-module-ordering-due-to-zlib.patch b/SOURCES/0244-rearrange-fips-module-ordering-due-to-zlib.patch new file mode 100644 index 0000000..901f034 --- /dev/null +++ b/SOURCES/0244-rearrange-fips-module-ordering-due-to-zlib.patch @@ -0,0 +1,25 @@ +From a503d1dda9fd9d3a26062aef46a79024d01f163f Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 7 May 2015 14:29:22 +0200 +Subject: [PATCH] rearrange fips module ordering due to zlib + +[ 1.220106] alg: pcomp: Failed to load transform for zlib: -2 +[ 1.221346] alg: pcomp: Failed to load transform for zlib: -2 +--- + modules.d/01fips/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh +index dd8e47d1..77ed24ef 100755 +--- a/modules.d/01fips/module-setup.sh ++++ b/modules.d/01fips/module-setup.sh +@@ -16,8 +16,8 @@ installkernel() { + _fipsmodules+="chainiv crc32c crct10dif_generic cryptomgr crypto_null ctr cts deflate des des3_ede dm-crypt dm-mod drbg " + _fipsmodules+="ecb eseqiv fcrypt gcm ghash_generic hmac khazad lzo md4 md5 michael_mic rmd128 " + _fipsmodules+="rmd160 rmd256 rmd320 rot13 salsa20 seed seqiv serpent sha1 sha224 sha256 sha256_generic " +- _fipsmodules+="sha384 sha512 sha512_generic tcrypt tea tnepres twofish wp256 wp384 wp512 xeta xtea xts zlib" + _fipsmodules+="aes_s390 des_s390 prng sha256_s390 sha_common des_check_key sha1_s390 sha512_s390" ++ _fipsmodules+="sha384 sha512 sha512_generic tcrypt tea tnepres twofish wp256 wp384 wp512 xeta xtea xts zlib" + + mkdir -m 0755 -p "${initdir}/etc/modprobe.d" + diff --git a/SOURCES/0245-network-dhcp-wait_for_ipv6_dad-in-PREINIT6.patch b/SOURCES/0245-network-dhcp-wait_for_ipv6_dad-in-PREINIT6.patch new file mode 100644 index 0000000..23250fa --- /dev/null +++ b/SOURCES/0245-network-dhcp-wait_for_ipv6_dad-in-PREINIT6.patch @@ -0,0 +1,38 @@ +From 10e5b14705e5bb732e66e8f08317529aa7bc8017 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 7 May 2015 14:42:10 +0200 +Subject: [PATCH] network:dhcp:wait_for_ipv6_dad() in PREINIT6 + +--- + modules.d/40network/dhclient-script.sh | 3 ++- + modules.d/40network/net-lib.sh | 2 +- + 2 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/modules.d/40network/dhclient-script.sh b/modules.d/40network/dhclient-script.sh +index 885303a2..aef94d6c 100755 +--- a/modules.d/40network/dhclient-script.sh ++++ b/modules.d/40network/dhclient-script.sh +@@ -95,8 +95,9 @@ case $reason in + ;; + + PREINIT6) +- echo "dhcp: PREINIT $netif up" ++ echo "dhcp: PREINIT6 $netif up" + linkup $netif ++ wait_for_ipv6_dad $netif + ;; + + BOUND) +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index 89b1101d..220480b2 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -522,7 +522,7 @@ wait_for_ipv6_dad() { + local cnt=0 + local li + while [ $cnt -lt 500 ]; do +- li=$(ip -6 addr show dev $1) ++ li=$(ip -6 addr show dev $1 scope link) + strstr "$li" "tentative" || return 0 + sleep 0.1 + cnt=$(($cnt+1)) diff --git a/SOURCES/0246-network-net-lib.sh-iface_has_link-wait-5s-for-the-ca.patch b/SOURCES/0246-network-net-lib.sh-iface_has_link-wait-5s-for-the-ca.patch new file mode 100644 index 0000000..6965e70 --- /dev/null +++ b/SOURCES/0246-network-net-lib.sh-iface_has_link-wait-5s-for-the-ca.patch @@ -0,0 +1,36 @@ +From e863891c154419932617e101ef5549dda41f6e62 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 7 May 2015 14:47:58 +0200 +Subject: [PATCH] network/net-lib.sh:iface_has_link() wait 5s for the carrier + to appear + +https://bugzilla.redhat.com/show_bug.cgi?id=1088808 +--- + modules.d/40network/net-lib.sh | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index 220480b2..1f77a154 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -556,13 +556,18 @@ hostname() { + } + + iface_has_link() { ++ local cnt=0 + local interface="$1" flags="" + [ -n "$interface" ] || return 2 + interface="/sys/class/net/$interface" + [ -d "$interface" ] || return 2 + linkup "$1" +- [ "$(cat $interface/carrier)" = 1 ] || return 1 +- # XXX Do we need to reset the flags here? anaconda never bothered.. ++ while [ $cnt -lt 50 ]; do ++ [ "$(cat $interface/carrier)" = 1 ] && return 0 ++ sleep 0.1 ++ cnt=$(($cnt+1)) ++ done ++ return 1 + } + + find_iface_with_link() { diff --git a/SOURCES/0247-dracut-pre-pivot-call-udevadm-settle-one-last-time.patch b/SOURCES/0247-dracut-pre-pivot-call-udevadm-settle-one-last-time.patch new file mode 100644 index 0000000..d0c4441 --- /dev/null +++ b/SOURCES/0247-dracut-pre-pivot-call-udevadm-settle-one-last-time.patch @@ -0,0 +1,51 @@ +From 1ad2884d82f15e9d1a6f3e24da42d56f47ebe949 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 16 Jun 2015 13:28:48 +0200 +Subject: [PATCH] dracut-pre-pivot: call udevadm settle one last time + +Some Hardware needs initialization and killing modprobe or modprobe +scripts would harm the process. +--- + modules.d/98systemd/dracut-pre-pivot.service | 7 ------- + modules.d/98systemd/dracut-pre-pivot.sh | 12 ++++++++++++ + 2 files changed, 12 insertions(+), 7 deletions(-) + +diff --git a/modules.d/98systemd/dracut-pre-pivot.service b/modules.d/98systemd/dracut-pre-pivot.service +index d7c7b1d7..f4539006 100644 +--- a/modules.d/98systemd/dracut-pre-pivot.service ++++ b/modules.d/98systemd/dracut-pre-pivot.service +@@ -16,13 +16,6 @@ Before=initrd-cleanup.service + Wants=remote-fs.target + After=remote-fs.target + ConditionPathExists=/etc/initrd-release +-ConditionDirectoryNotEmpty=|/lib/dracut/hooks/pre-pivot +-ConditionDirectoryNotEmpty=|/lib/dracut/hooks/cleanup +-ConditionKernelCommandLine=|rd.break=pre-pivot +-ConditionKernelCommandLine=|rd.break=cleanup +-ConditionKernelCommandLine=|rd.break +-ConditionPathExists=|/dev/root +-ConditionPathExists=|/dev/nfs + + [Service] + Environment=DRACUT_SYSTEMD=1 +diff --git a/modules.d/98systemd/dracut-pre-pivot.sh b/modules.d/98systemd/dracut-pre-pivot.sh +index e62a1cec..afe34668 100755 +--- a/modules.d/98systemd/dracut-pre-pivot.sh ++++ b/modules.d/98systemd/dracut-pre-pivot.sh +@@ -26,4 +26,16 @@ getarg rd.break -d rdbreak && emergency_shell -n switch_root "Break before switc + [ -h /dev/root ] && rm -f -- /dev/root + [ -h /dev/nfs ] && rm -f -- /dev/nfs + ++udevadm settle ++ ++cnt=0 ++while ! udevadm settle --timeout=0; do ++ info "udev still not settled. Waiting." ++ udevadm settle ++ cnt=$(($cnt+1)) ++ [ $cnt -gt 10 ] && break ++done ++ ++udevadm control --exit ++ + exit 0 diff --git a/SOURCES/0248-dracut.sh-add-devices-with-x-initrd.mount-in-etc-fst.patch b/SOURCES/0248-dracut.sh-add-devices-with-x-initrd.mount-in-etc-fst.patch new file mode 100644 index 0000000..0838f2a --- /dev/null +++ b/SOURCES/0248-dracut.sh-add-devices-with-x-initrd.mount-in-etc-fst.patch @@ -0,0 +1,38 @@ +From 90b5b48734b8738fac217df1b2846997f532a0ea Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 2 Jul 2015 14:55:31 +0200 +Subject: [PATCH] dracut.sh: add devices with x-initrd.mount in /etc/fstab to + host_devs + +otherwise dracut might not even be able to mount those. + +(cherry picked from commit 916559e073a49eedbc7b0c58b399d303fb8c2a05) +--- + dracut.sh | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +diff --git a/dracut.sh b/dracut.sh +index 6e56af50..0e600220 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1061,6 +1061,20 @@ if [[ $hostonly ]]; then + done < /etc/fstab + done < /proc/swaps + fi ++ ++ # collect all "x-initrd.mount" entries from /etc/fstab ++ if [[ -f /etc/fstab ]]; then ++ while read _d _m _t _o _r || [ -n "$_d" ]; do ++ [[ "$_d" == \#* ]] && continue ++ [[ $_d ]] || continue ++ [[ "$_o" != *x-initrd.mount* ]] && continue ++ _dev=$(expand_persistent_dev "$_d") ++ _dev="$(readlink -f "$_dev")" ++ [[ -b $_dev ]] && push host_devs "$_dev" ++ done < /etc/fstab ++ fi ++ ++ + # record all host modaliases + declare -A host_modalias + find /sys/devices/ -name uevent -print > "$initdir/.modalias" diff --git a/SOURCES/0249-crypt-add-drbg-kernel-module.patch b/SOURCES/0249-crypt-add-drbg-kernel-module.patch new file mode 100644 index 0000000..582d78d --- /dev/null +++ b/SOURCES/0249-crypt-add-drbg-kernel-module.patch @@ -0,0 +1,22 @@ +From bd98c4def15c64c5d34b13e54991d672104ca1d0 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 2 Jul 2015 15:00:41 +0200 +Subject: [PATCH] crypt: add drbg kernel module + +--- + modules.d/90crypt/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/90crypt/module-setup.sh b/modules.d/90crypt/module-setup.sh +index 267d39d5..272e527d 100755 +--- a/modules.d/90crypt/module-setup.sh ++++ b/modules.d/90crypt/module-setup.sh +@@ -23,7 +23,7 @@ depends() { + } + + installkernel() { +- instmods dm_crypt =crypto ++ instmods dm_crypt =crypto drbg + } + + cmdline() { diff --git a/SOURCES/0250-dracut-lib.sh-info-output-info-to-stderr.patch b/SOURCES/0250-dracut-lib.sh-info-output-info-to-stderr.patch new file mode 100644 index 0000000..1d25a20 --- /dev/null +++ b/SOURCES/0250-dracut-lib.sh-info-output-info-to-stderr.patch @@ -0,0 +1,34 @@ +From e2b5b450e7aac101d12149fdf0623106799933ff Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 2 Jul 2015 15:02:31 +0200 +Subject: [PATCH] dracut-lib.sh:info() output info to stderr + +otherwise it might collide with stdout redirection + +(cherry picked from commit 57fb6e67de0cc58b9d188439b0ceb0d0d5dbbd6f) +--- + modules.d/99base/dracut-lib.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh +index b490e824..69f70799 100755 +--- a/modules.d/99base/dracut-lib.sh ++++ b/modules.d/99base/dracut-lib.sh +@@ -51,7 +51,7 @@ if [ -z "$DRACUT_SYSTEMD" ]; then + check_quiet + echo "<30>dracut: $*" > /dev/kmsg + [ "$DRACUT_QUIET" != "yes" ] && \ +- echo "dracut: $*" ++ echo "dracut: $*" >&2 + } + + else +@@ -61,7 +61,7 @@ else + } + + info() { +- echo "$*" ++ echo "$*" >&2 + } + + fi diff --git a/SOURCES/0251-Factor-out-all-the-type-V-commands.patch b/SOURCES/0251-Factor-out-all-the-type-V-commands.patch new file mode 100644 index 0000000..5857115 --- /dev/null +++ b/SOURCES/0251-Factor-out-all-the-type-V-commands.patch @@ -0,0 +1,696 @@ +From da3dacfa5e63ca00d4c8efd8c3c603bce7937cdd Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 6 Feb 2014 16:45:20 +0100 +Subject: [PATCH] Factor out all the "type -V" commands + +Add new functions require_binaries() and require_any_binary() to be used +in the check() section of module-setup.sh. + +These functions print a warning line telling the user, which binary is +missing for the specific dracut module. + +This unifies the way of checking for binaries and makes the life of an +initramfs creator easier, if he wants to find out why a specific dracut +module is not included in the initramfs. + +(cherry picked from commit 30e6e809ed8d189cc8374df3c28cfbcab5a299b9) +--- + dracut-functions.sh | 57 +++++++++++++++++-- + modules.d/00bash/module-setup.sh | 2 +- + modules.d/00bootchart/module-setup.sh | 2 +- + modules.d/00dash/module-setup.sh | 2 +- + modules.d/00systemd-bootchart/module-setup.sh | 2 +- + modules.d/02caps/module-setup.sh | 14 +++-- + modules.d/03modsign/module-setup.sh | 2 +- + modules.d/05busybox/module-setup.sh | 2 +- + modules.d/10i18n/module-setup.sh | 4 +- + modules.d/40network/module-setup.sh | 7 +-- + modules.d/45url-lib/module-setup.sh | 2 +- + modules.d/50plymouth/module-setup.sh | 2 +- + modules.d/90btrfs/module-setup.sh | 2 +- + modules.d/90crypt/module-setup.sh | 2 +- + modules.d/90dm/module-setup.sh | 2 +- + modules.d/90dmraid/module-setup.sh | 2 +- + modules.d/90lvm/module-setup.sh | 2 +- + modules.d/90mdraid/module-setup.sh | 2 +- + modules.d/90multipath/module-setup.sh | 2 +- + modules.d/91crypt-gpg/module-setup.sh | 2 +- + modules.d/91crypt-loop/module-setup.sh | 21 ++++--- + modules.d/95cifs/module-setup.sh | 2 +- + modules.d/95dasd/module-setup.sh | 1 + + modules.d/95dasd_mod/module-setup.sh | 1 + + modules.d/95fcoe-uefi/module-setup.sh | 4 +- + modules.d/95fcoe/module-setup.sh | 5 +- + modules.d/95iscsi/module-setup.sh | 2 +- + modules.d/95nbd/module-setup.sh | 2 +- + modules.d/95nfs/module-setup.sh | 4 +- + modules.d/95ssh-client/module-setup.sh | 6 +- + modules.d/95udev-rules/module-setup.sh | 2 +- + modules.d/95zfcp/module-setup.sh | 2 + + modules.d/95znet/module-setup.sh | 2 + + modules.d/97biosdevname/module-setup.sh | 2 +- + modules.d/97masterkey/module-setup.sh | 2 +- + modules.d/98systemd/module-setup.sh | 2 +- + modules.d/99img-lib/module-setup.sh | 4 +- + 37 files changed, 112 insertions(+), 66 deletions(-) + +diff --git a/dracut-functions.sh b/dracut-functions.sh +index 89438b29..4ea3204d 100755 +--- a/dracut-functions.sh ++++ b/dracut-functions.sh +@@ -35,6 +35,51 @@ fi + # Generic substring function. If $2 is in $1, return 0. + strstr() { [[ $1 = *$2* ]]; } + ++# helper function for check() in module-setup.sh ++# to check for required installed binaries ++# issues a standardized warning message ++require_binaries() { ++ local _module_name="${moddir##*/}" ++ local _ret=0 ++ ++ if [[ "$1" = "-m" ]]; then ++ _module_name="$2" ++ shift 2 ++ fi ++ ++ for cmd in "$@"; do ++ if ! find_binary "$cmd" &>/dev/null; then ++ dwarning "$_module_name: Could not find command '$cmd'!" ++ ((_ret++)) ++ fi ++ done ++ return $_ret ++} ++ ++require_any_binary() { ++ local _module_name="${moddir##*/}" ++ local _ret=1 ++ ++ if [[ "$1" = "-m" ]]; then ++ _module_name="$2" ++ shift 2 ++ fi ++ ++ for cmd in "$@"; do ++ if find_binary "$cmd" &>/dev/null; then ++ _ret=0 ++ break ++ fi ++ done ++ ++ if (( $_ret != 0 )); then ++ dwarning "$_module_name: Could not find any command of '$@'!" ++ return 1 ++ fi ++ ++ return 0 ++} ++ + # find a binary. If we were not passed the full path directly, + # search in the usual places to find the binary. + find_binary() { +@@ -1055,7 +1100,7 @@ module_check() { + . $_moddir/module-setup.sh + is_func check || return 0 + [ $_forced -ne 0 ] && unset hostonly +- check $hostonly ++ moddir=$_moddir check $hostonly + _ret=$? + unset check depends cmdline install installkernel + fi +@@ -1081,7 +1126,7 @@ module_check_mount() { + unset check depends cmdline install installkernel + check() { false; } + . $_moddir/module-setup.sh +- check 0 ++ moddir=$_moddir check 0 + _ret=$? + unset check depends cmdline install installkernel + fi +@@ -1105,7 +1150,7 @@ module_depends() { + unset check depends cmdline install installkernel + depends() { true; } + . $_moddir/module-setup.sh +- depends ++ moddir=$_moddir depends + _ret=$? + unset check depends cmdline install installkernel + return $_ret +@@ -1126,7 +1171,7 @@ module_cmdline() { + unset check depends cmdline install installkernel + cmdline() { true; } + . $_moddir/module-setup.sh +- cmdline ++ moddir=$_moddir cmdline + _ret=$? + unset check depends cmdline install installkernel + return $_ret +@@ -1147,7 +1192,7 @@ module_install() { + unset check depends cmdline install installkernel + install() { true; } + . $_moddir/module-setup.sh +- install ++ moddir=$_moddir install + _ret=$? + unset check depends cmdline install installkernel + return $_ret +@@ -1168,7 +1213,7 @@ module_installkernel() { + unset check depends cmdline install installkernel + installkernel() { true; } + . $_moddir/module-setup.sh +- installkernel ++ moddir=$_moddir installkernel + _ret=$? + unset check depends cmdline install installkernel + return $_ret +diff --git a/modules.d/00bash/module-setup.sh b/modules.d/00bash/module-setup.sh +index e874e73d..109642ac 100755 +--- a/modules.d/00bash/module-setup.sh ++++ b/modules.d/00bash/module-setup.sh +@@ -3,7 +3,7 @@ + # ex: ts=8 sw=4 sts=4 et filetype=sh + + check() { +- [ -x /bin/bash ] ++ require_binaries /bin/bash + } + + depends() { +diff --git a/modules.d/00bootchart/module-setup.sh b/modules.d/00bootchart/module-setup.sh +index 72b60633..f03fc540 100755 +--- a/modules.d/00bootchart/module-setup.sh ++++ b/modules.d/00bootchart/module-setup.sh +@@ -4,7 +4,7 @@ + + check() { + [[ "$mount_needs" ]] && return 1 +- [ -x /sbin/bootchartd ] || return 1 ++ require_binaries /sbin/bootchartd || return 1 + return 255 + } + +diff --git a/modules.d/00dash/module-setup.sh b/modules.d/00dash/module-setup.sh +index dfd4d7bf..9a2a92fc 100755 +--- a/modules.d/00dash/module-setup.sh ++++ b/modules.d/00dash/module-setup.sh +@@ -3,7 +3,7 @@ + # ex: ts=8 sw=4 sts=4 et filetype=sh + + check() { +- [ -x /bin/dash ] ++ require_binaries /bin/dash + } + + depends() { +diff --git a/modules.d/00systemd-bootchart/module-setup.sh b/modules.d/00systemd-bootchart/module-setup.sh +index 3eb4de1e..eb6f383c 100755 +--- a/modules.d/00systemd-bootchart/module-setup.sh ++++ b/modules.d/00systemd-bootchart/module-setup.sh +@@ -4,7 +4,7 @@ + + check() { + [[ "$mount_needs" ]] && return 1 +- [ -x $systemdutildir/systemd-bootchart ] || return 1 ++ require_binaries $systemdutildir/systemd-bootchart || return 1 + return 255 + } + +diff --git a/modules.d/02caps/module-setup.sh b/modules.d/02caps/module-setup.sh +index c9d94eeb..73eb215b 100755 +--- a/modules.d/02caps/module-setup.sh ++++ b/modules.d/02caps/module-setup.sh +@@ -3,7 +3,7 @@ + # ex: ts=8 sw=4 sts=4 et filetype=sh + + check() { +- type -P capsh >/dev/null 2>&1 ++ require_binaries capsh + } + + depends() { +@@ -11,9 +11,13 @@ depends() { + } + + install() { +- inst_hook pre-pivot 00 "$moddir/caps.sh" +- inst $(type -P capsh 2>/dev/null) /usr/sbin/capsh +- # capsh wants bash and we need bash also +- inst /bin/bash ++ if ! dracut_module_included "systemd"; then ++ inst_hook pre-pivot 00 "$moddir/caps.sh" ++ inst $(type -P capsh 2>/dev/null) /usr/sbin/capsh ++ # capsh wants bash and we need bash also ++ inst /bin/bash ++ else ++ dwarning "caps: does not work with systemd in the initramfs" ++ fi + } + +diff --git a/modules.d/03modsign/module-setup.sh b/modules.d/03modsign/module-setup.sh +index 730cd86e..bed5cfe1 100755 +--- a/modules.d/03modsign/module-setup.sh ++++ b/modules.d/03modsign/module-setup.sh +@@ -8,7 +8,7 @@ + # Peter Jones <pjones@redhat.com> + + check() { +- [[ -x /usr/bin/keyctl ]] || return 1 ++ require_binaries keyctl || return 1 + + # do not include module in hostonly mode, + # if no keys are present +diff --git a/modules.d/05busybox/module-setup.sh b/modules.d/05busybox/module-setup.sh +index edcc8daa..c35ab2e9 100755 +--- a/modules.d/05busybox/module-setup.sh ++++ b/modules.d/05busybox/module-setup.sh +@@ -3,7 +3,7 @@ + # ex: ts=8 sw=4 sts=4 et filetype=sh + + check() { +- type -P busybox >/dev/null || return 1 ++ require_binaries busybox || return 1 + + return 255 + } +diff --git a/modules.d/10i18n/module-setup.sh b/modules.d/10i18n/module-setup.sh +index 413ee123..2c0a275c 100755 +--- a/modules.d/10i18n/module-setup.sh ++++ b/modules.d/10i18n/module-setup.sh +@@ -5,9 +5,7 @@ + check() { + [[ "$mount_needs" ]] && return 1 + +- for i in setfont loadkeys kbd_mode; do +- type -P "$i" >/dev/null || return 1 +- done ++ require_binaries setfont loadkeys kbd_mode || return 1 + + return 0 + } +diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh +index a52e881b..3134b5ff 100755 +--- a/modules.d/40network/module-setup.sh ++++ b/modules.d/40network/module-setup.sh +@@ -5,12 +5,7 @@ + check() { + local _program + +- for _program in ip arping dhclient ; do +- if ! type -P $_program >/dev/null; then +- derror "Could not find program \"$_program\" required by network." +- return 1 +- fi +- done ++ require_binaries ip arping dhclient || return 1 + + return 255 + } +diff --git a/modules.d/45url-lib/module-setup.sh b/modules.d/45url-lib/module-setup.sh +index b5cf36f2..f2d068b3 100755 +--- a/modules.d/45url-lib/module-setup.sh ++++ b/modules.d/45url-lib/module-setup.sh +@@ -2,7 +2,7 @@ + # module-setup for url-lib + + check() { +- command -v curl >/dev/null || return 1 ++ require_binaries curl || return 1 + return 255 + } + +diff --git a/modules.d/50plymouth/module-setup.sh b/modules.d/50plymouth/module-setup.sh +index e0e69367..961c1e39 100755 +--- a/modules.d/50plymouth/module-setup.sh ++++ b/modules.d/50plymouth/module-setup.sh +@@ -4,7 +4,7 @@ + + check() { + [[ "$mount_needs" ]] && return 1 +- type -P plymouthd >/dev/null && type -P plymouth >/dev/null ++ require_binaries plymouthd plymouth + } + + depends() { +diff --git a/modules.d/90btrfs/module-setup.sh b/modules.d/90btrfs/module-setup.sh +index a2805946..4804f58b 100755 +--- a/modules.d/90btrfs/module-setup.sh ++++ b/modules.d/90btrfs/module-setup.sh +@@ -6,7 +6,7 @@ check() { + local _rootdev + # if we don't have btrfs installed on the host system, + # no point in trying to support it in the initramfs. +- type -P btrfs >/dev/null || return 1 ++ require_binaries btrfs || return 1 + + [[ $hostonly ]] || [[ $mount_needs ]] && { + for fs in ${host_fs_types[@]}; do +diff --git a/modules.d/90crypt/module-setup.sh b/modules.d/90crypt/module-setup.sh +index 272e527d..dbc87a43 100755 +--- a/modules.d/90crypt/module-setup.sh ++++ b/modules.d/90crypt/module-setup.sh +@@ -5,7 +5,7 @@ + check() { + local _rootdev + # if cryptsetup is not installed, then we cannot support encrypted devices. +- type -P cryptsetup >/dev/null || return 1 ++ require_binaries cryptsetup || return 1 + + [[ $hostonly ]] || [[ $mount_needs ]] && { + for fs in "${host_fs_types[@]}"; do +diff --git a/modules.d/90dm/module-setup.sh b/modules.d/90dm/module-setup.sh +index 1fd92987..ed94f436 100755 +--- a/modules.d/90dm/module-setup.sh ++++ b/modules.d/90dm/module-setup.sh +@@ -3,7 +3,7 @@ + # ex: ts=8 sw=4 sts=4 et filetype=sh + + check() { +- type -P dmsetup >/dev/null || return 1 ++ require_binaries dmsetup || return 1 + return 255 + } + +diff --git a/modules.d/90dmraid/module-setup.sh b/modules.d/90dmraid/module-setup.sh +index b230cb0e..8ca69aa8 100755 +--- a/modules.d/90dmraid/module-setup.sh ++++ b/modules.d/90dmraid/module-setup.sh +@@ -6,7 +6,7 @@ check() { + local _rootdev + # if we don't have dmraid installed on the host system, no point + # in trying to support it in the initramfs. +- type -P dmraid >/dev/null || return 1 ++ require_binaries dmraid || return 1 + + [[ $hostonly ]] || [[ $mount_needs ]] && { + for dev in "${!host_fs_types[@]}"; do +diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh +index 0c5890a7..5ec62812 100755 +--- a/modules.d/90lvm/module-setup.sh ++++ b/modules.d/90lvm/module-setup.sh +@@ -4,7 +4,7 @@ + + check() { + # No point trying to support lvm if the binaries are missing +- type -P lvm >/dev/null || return 1 ++ require_binaries lvm || return 1 + + [[ $hostonly ]] || [[ $mount_needs ]] && { + for fs in "${host_fs_types[@]}"; do +diff --git a/modules.d/90mdraid/module-setup.sh b/modules.d/90mdraid/module-setup.sh +index 815a3ebc..2092daea 100755 +--- a/modules.d/90mdraid/module-setup.sh ++++ b/modules.d/90mdraid/module-setup.sh +@@ -5,7 +5,7 @@ + check() { + local _rootdev + # No mdadm? No mdraid support. +- type -P mdadm >/dev/null || return 1 ++ require_binaries mdadm || return 1 + + [[ $hostonly ]] || [[ $mount_needs ]] && { + for dev in "${!host_fs_types[@]}"; do +diff --git a/modules.d/90multipath/module-setup.sh b/modules.d/90multipath/module-setup.sh +index feb58dcd..d37f9587 100755 +--- a/modules.d/90multipath/module-setup.sh ++++ b/modules.d/90multipath/module-setup.sh +@@ -5,7 +5,7 @@ + check() { + local _rootdev + # if there's no multipath binary, no go. +- type -P multipath >/dev/null || return 1 ++ require_binaries multipath || return 1 + + is_mpath() { + local _dev=$1 +diff --git a/modules.d/91crypt-gpg/module-setup.sh b/modules.d/91crypt-gpg/module-setup.sh +index 43a5a000..17b58f1a 100755 +--- a/modules.d/91crypt-gpg/module-setup.sh ++++ b/modules.d/91crypt-gpg/module-setup.sh +@@ -4,7 +4,7 @@ + + # GPG support is optional + check() { +- type -P gpg >/dev/null || return 1 ++ require_binaries gpg || return 1 + + return 255 + } +diff --git a/modules.d/91crypt-loop/module-setup.sh b/modules.d/91crypt-loop/module-setup.sh +index c14fd45a..d0a49567 100644 +--- a/modules.d/91crypt-loop/module-setup.sh ++++ b/modules.d/91crypt-loop/module-setup.sh +@@ -1,19 +1,24 @@ ++#!/bin/bash ++# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- ++# ex: ts=8 sw=4 sts=4 et filetype=sh ++ ++# called by dracut + check() { +- type -P losetup >/dev/null || return 1 +- +- return 255 ++ require_binaries losetup || return 1 ++ ++ return 255 + } + + depends() { +- echo crypt ++ echo crypt + } + + installkernel() { +- instmods loop ++ instmods loop + } + + install() { +- inst_multiple losetup +- inst "$moddir/crypt-loop-lib.sh" "/lib/dracut-crypt-loop-lib.sh" +- dracut_need_initqueue ++ inst_multiple losetup ++ inst "$moddir/crypt-loop-lib.sh" "/lib/dracut-crypt-loop-lib.sh" ++ dracut_need_initqueue + } +diff --git a/modules.d/95cifs/module-setup.sh b/modules.d/95cifs/module-setup.sh +index c17b973a..9e36f87f 100755 +--- a/modules.d/95cifs/module-setup.sh ++++ b/modules.d/95cifs/module-setup.sh +@@ -4,7 +4,7 @@ + + check() { + # If our prerequisites are not met, fail anyways. +- type -P mount.cifs >/dev/null || return 1 ++ require_binaries mount.cifs || return 1 + + [[ $hostonly ]] || [[ $mount_needs ]] && { + for fs in ${host_fs_types[@]}; do +diff --git a/modules.d/95dasd/module-setup.sh b/modules.d/95dasd/module-setup.sh +index 3b8396db..70b2fcc8 100755 +--- a/modules.d/95dasd/module-setup.sh ++++ b/modules.d/95dasd/module-setup.sh +@@ -5,6 +5,7 @@ + check() { + local _arch=$(uname -m) + [ "$_arch" = "s390" -o "$_arch" = "s390x" ] || return 1 ++ require_binaries normalize_dasd_arg || return 1 + return 0 + } + +diff --git a/modules.d/95dasd_mod/module-setup.sh b/modules.d/95dasd_mod/module-setup.sh +index 9c9eeead..d20764eb 100755 +--- a/modules.d/95dasd_mod/module-setup.sh ++++ b/modules.d/95dasd_mod/module-setup.sh +@@ -5,6 +5,7 @@ + check() { + local _arch=$(uname -m) + [ "$_arch" = "s390" -o "$_arch" = "s390x" ] || return 1 ++ require_binaries grep sed seq + + return 0 + } +diff --git a/modules.d/95fcoe-uefi/module-setup.sh b/modules.d/95fcoe-uefi/module-setup.sh +index c91f7754..0fb06e23 100755 +--- a/modules.d/95fcoe-uefi/module-setup.sh ++++ b/modules.d/95fcoe-uefi/module-setup.sh +@@ -4,9 +4,7 @@ + + # called by dracut + check() { +- for i in dcbtool fipvlan lldpad ip readlink; do +- type -P $i >/dev/null || return 1 +- done ++ require_binaries dcbtool fipvlan lldpad ip readlink || return 1 + return 0 + } + +diff --git a/modules.d/95fcoe/module-setup.sh b/modules.d/95fcoe/module-setup.sh +index 3ffaf5a5..8c6290d4 100755 +--- a/modules.d/95fcoe/module-setup.sh ++++ b/modules.d/95fcoe/module-setup.sh +@@ -3,10 +3,7 @@ + # ex: ts=8 sw=4 sts=4 et filetype=sh + + check() { +- for i in dcbtool fipvlan lldpad ip readlink; do +- type -P $i >/dev/null || return 1 +- done +- ++ require_binaries dcbtool fipvlan lldpad ip readlink || return 1 + return 0 + } + +diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh +index c6901c08..49f9a0ed 100755 +--- a/modules.d/95iscsi/module-setup.sh ++++ b/modules.d/95iscsi/module-setup.sh +@@ -5,7 +5,7 @@ + check() { + local _rootdev + # If our prerequisites are not met, fail anyways. +- type -P iscsistart hostname iscsi-iname >/dev/null || return 1 ++ require_binaries iscsistart hostname iscsi-iname || return 1 + + # If hostonly was requested, fail the check if we are not actually + # booting from root. +diff --git a/modules.d/95nbd/module-setup.sh b/modules.d/95nbd/module-setup.sh +index 3ac00f60..7e8a416c 100755 +--- a/modules.d/95nbd/module-setup.sh ++++ b/modules.d/95nbd/module-setup.sh +@@ -5,7 +5,7 @@ + check() { + local _rootdev + # If our prerequisites are not met, fail. +- type -P nbd-client >/dev/null || return 1 ++ require_binaries nbd-client || return 1 + + # if an nbd device is not somewhere in the chain of devices root is + # mounted on, fail the hostonly check. +diff --git a/modules.d/95nfs/module-setup.sh b/modules.d/95nfs/module-setup.sh +index 75beb746..02838a49 100755 +--- a/modules.d/95nfs/module-setup.sh ++++ b/modules.d/95nfs/module-setup.sh +@@ -4,8 +4,8 @@ + + check() { + # If our prerequisites are not met, fail anyways. +- type -P rpcbind >/dev/null || type -P portmap >/dev/null || return 1 +- type -P rpc.statd mount.nfs mount.nfs4 umount >/dev/null || return 1 ++ require_any_binary rpcbind portmap || return 1 ++ require_binaries rpc.statd mount.nfs mount.nfs4 umount || return 1 + + [[ $hostonly ]] || [[ $mount_needs ]] && { + for fs in ${host_fs_types[@]}; do +diff --git a/modules.d/95ssh-client/module-setup.sh b/modules.d/95ssh-client/module-setup.sh +index c7d8ee24..6b441075 100755 +--- a/modules.d/95ssh-client/module-setup.sh ++++ b/modules.d/95ssh-client/module-setup.sh +@@ -5,11 +5,11 @@ + # fixme: assume user is root + + check() { +- # If our prerequisites are not met, fail. +- type -P ssh >/dev/null || return 1 +- type -P scp >/dev/null || return 1 + [[ $mount_needs ]] && return 1 + ++ # If our prerequisites are not met, fail. ++ require_binaries ssh scp || return 1 ++ + if [[ $sshkey ]]; then + [ ! -f $sshkey ] && { + derror "ssh key: $sshkey is not found!" +diff --git a/modules.d/95udev-rules/module-setup.sh b/modules.d/95udev-rules/module-setup.sh +index 094479a3..fdea8c6d 100755 +--- a/modules.d/95udev-rules/module-setup.sh ++++ b/modules.d/95udev-rules/module-setup.sh +@@ -5,7 +5,7 @@ + install() { + local _i + +- # Fixme: would be nice if we didn't have to know which rules to grab.... ++ # Fixme: would be nice if we didn't have to guess, which rules to grab.... + # ultimately, /lib/initramfs/rules.d or somesuch which includes links/copies + # of the rules we want so that we just copy those in would be best + inst_multiple udevadm cat uname blkid \ +diff --git a/modules.d/95zfcp/module-setup.sh b/modules.d/95zfcp/module-setup.sh +index 99066958..d19eba4c 100755 +--- a/modules.d/95zfcp/module-setup.sh ++++ b/modules.d/95zfcp/module-setup.sh +@@ -6,6 +6,8 @@ check() { + arch=$(uname -m) + [ "$arch" = "s390" -o "$arch" = "s390x" ] || return 1 + ++ require_binaries zfcp_cio_free grep sed seq || return 1 ++ + return 0 + } + +diff --git a/modules.d/95znet/module-setup.sh b/modules.d/95znet/module-setup.sh +index 16f84938..b052ec37 100755 +--- a/modules.d/95znet/module-setup.sh ++++ b/modules.d/95znet/module-setup.sh +@@ -6,6 +6,8 @@ check() { + arch=$(uname -m) + [ "$arch" = "s390" -o "$arch" = "s390x" ] || return 1 + ++ require_binaries znet_cio_free grep sed seq readlink || return 1 ++ + return 0 + } + +diff --git a/modules.d/97biosdevname/module-setup.sh b/modules.d/97biosdevname/module-setup.sh +index 4a0b4f41..fd4d4632 100755 +--- a/modules.d/97biosdevname/module-setup.sh ++++ b/modules.d/97biosdevname/module-setup.sh +@@ -4,7 +4,7 @@ + + check() { + [[ "$mount_needs" ]] && return 1 +- type -P biosdevname >/dev/null || return 1 ++ require_binaries biosdevname || return 1 + return 0 + } + +diff --git a/modules.d/97masterkey/module-setup.sh b/modules.d/97masterkey/module-setup.sh +index a94c4f53..cda6e809 100755 +--- a/modules.d/97masterkey/module-setup.sh ++++ b/modules.d/97masterkey/module-setup.sh +@@ -4,7 +4,7 @@ + + check() { + [[ $hostonly ]] && { +- [ -x "/bin/keyctl" ] || return 1 ++ require_binaries keyctl uname || return 1 + } + + return 255 +diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh +index aae0319a..d0271f15 100755 +--- a/modules.d/98systemd/module-setup.sh ++++ b/modules.d/98systemd/module-setup.sh +@@ -4,7 +4,7 @@ + + check() { + [[ $mount_needs ]] && return 1 +- if [[ -x $systemdutildir/systemd ]]; then ++ if require_binaries $systemdutildir/systemd; then + SYSTEMD_VERSION=$($systemdutildir/systemd --version | { read a b a; echo $b; }) + (( $SYSTEMD_VERSION >= 198 )) && return 0 + return 255 +diff --git a/modules.d/99img-lib/module-setup.sh b/modules.d/99img-lib/module-setup.sh +index 28bfc2aa..a951b930 100755 +--- a/modules.d/99img-lib/module-setup.sh ++++ b/modules.d/99img-lib/module-setup.sh +@@ -2,9 +2,7 @@ + # module-setup for img-lib + + check() { +- for cmd in tar gzip dd; do +- command -v $cmd >/dev/null || return 1 +- done ++ require_binaries tar gzip dd bash || return 1 + return 255 + } + diff --git a/SOURCES/0252-network-dhclient-script.sh-add-RENEW-REBIND.patch b/SOURCES/0252-network-dhclient-script.sh-add-RENEW-REBIND.patch new file mode 100644 index 0000000..33313b4 --- /dev/null +++ b/SOURCES/0252-network-dhclient-script.sh-add-RENEW-REBIND.patch @@ -0,0 +1,51 @@ +From efe5301ab91a0e871f2c68faf1f835f306388690 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 1 Jul 2015 14:53:33 +0200 +Subject: [PATCH] network/dhclient-script.sh: add RENEW/REBIND + +(cherry picked from commit cf627b20d039c527f4de167e38978d4984e4d727) +--- + modules.d/40network/dhclient-script.sh | 23 +++++++++++++++++++++++ + 1 file changed, 23 insertions(+) + +diff --git a/modules.d/40network/dhclient-script.sh b/modules.d/40network/dhclient-script.sh +index aef94d6c..d96f7d94 100755 +--- a/modules.d/40network/dhclient-script.sh ++++ b/modules.d/40network/dhclient-script.sh +@@ -131,6 +131,17 @@ case $reason in + >/tmp/net.$netif.up + ;; + ++ RENEW|REBIND) ++ unset lease_time ++ [ -n "$new_dhcp_lease_time" ] && lease_time=$new_dhcp_lease_time ++ [ -n "$new_max_life" ] && lease_time=$new_max_life ++ preferred_lft=$lease_time ++ [ -n "$new_preferred_life" ] && preferred_lft=$new_preferred_life ++ ip -4 addr change ${new_ip_address}/${new_prefix} broadcast ${new_broadcast_address} dev ${interface} \ ++ ${lease_time:+valid_lft $lease_time} ${preferred_lft:+preferred_lft ${preferred_lft}} \ ++ >/dev/null 2>&1 ++ ;; ++ + BOUND6) + echo "dhcp: BOND6 setting $netif" + setup_interface6 +@@ -151,6 +162,18 @@ case $reason in + echo "[ -f /tmp/net.$netif.did-setup ]" > $hookdir/initqueue/finished/dhclient-$netif.sh + >/tmp/net.$netif.up + ;; ++ ++ RENEW6|REBIND6) ++ unset lease_time ++ [ -n "$new_dhcp_lease_time" ] && lease_time=$new_dhcp_lease_time ++ [ -n "$new_max_life" ] && lease_time=$new_max_life ++ preferred_lft=$lease_time ++ [ -n "$new_preferred_life" ] && preferred_lft=$new_preferred_life ++ ip -6 addr change ${new_ip6_address}/${new_ip6_prefixlen} dev ${interface} scope global \ ++ ${lease_time:+valid_lft $lease_time} ${preferred_lft:+preferred_lft ${preferred_lft}} \ ++ >/dev/null 2>&1 ++ ;; ++ + *) echo "dhcp: $reason";; + esac + diff --git a/SOURCES/0253-network-dhclient-script.sh-make-IPv4-DHCP-lease-time.patch b/SOURCES/0253-network-dhclient-script.sh-make-IPv4-DHCP-lease-time.patch new file mode 100644 index 0000000..14b825d --- /dev/null +++ b/SOURCES/0253-network-dhclient-script.sh-make-IPv4-DHCP-lease-time.patch @@ -0,0 +1,44 @@ +From 4ec362ce0ba3fc8b10df83c015d88e002f8ccd36 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 1 Jul 2015 14:57:15 +0200 +Subject: [PATCH] network/dhclient-script.sh: make IPv4 DHCP lease time + optionally + +If bootp is used, no lease time is provided in the packet from the bootp +server. + +(cherry picked from commit 0f89ec314b062a410199251db0356a55b4773173) +--- + modules.d/40network/dhclient-script.sh | 12 ++++++++---- + 1 file changed, 8 insertions(+), 4 deletions(-) + +diff --git a/modules.d/40network/dhclient-script.sh b/modules.d/40network/dhclient-script.sh +index d96f7d94..7972af99 100755 +--- a/modules.d/40network/dhclient-script.sh ++++ b/modules.d/40network/dhclient-script.sh +@@ -23,7 +23,11 @@ setup_interface() { + search=$(printf -- "$new_domain_search") + namesrv=$new_domain_name_servers + hostname=$new_host_name +- lease_time=$new_dhcp_lease_time ++ ++ [ -n "$new_dhcp_lease_time" ] && lease_time=$new_dhcp_lease_time ++ [ -n "$new_max_life" ] && lease_time=$new_max_life ++ preferred_lft=$lease_time ++ [ -n "$new_preferred_life" ] && preferred_lft=$new_preferred_life + + [ -f /tmp/net.$netif.override ] && . /tmp/net.$netif.override + +@@ -41,9 +45,9 @@ setup_interface() { + fi + fi + +- ip addr add $ip${mask:+/$mask} ${bcast:+broadcast $bcast} \ +- valid_lft ${lease_time} preferred_lft ${lease_time} \ +- dev $netif ++ ip addr add $ip${mask:+/$mask} ${bcast:+broadcast $bcast} dev $netif \ ++ ${lease_time:+valid_lft $lease_time} \ ++ ${preferred_lft:+preferred_lft ${preferred_lft}} + + [ -n "$gw" ] && echo ip route replace default via $gw dev $netif > /tmp/net.$netif.gw + diff --git a/SOURCES/0254-network-don-t-use-ifup-m.patch b/SOURCES/0254-network-don-t-use-ifup-m.patch new file mode 100644 index 0000000..3b86585 --- /dev/null +++ b/SOURCES/0254-network-don-t-use-ifup-m.patch @@ -0,0 +1,46 @@ +From 00c118a93a154d8ee7469331da2868db6c76fcd2 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 2 Jul 2015 11:32:08 +0200 +Subject: [PATCH] network: don't use "ifup -m" + +"ifup -m" was thought to be used by humans in the emergency shell. +Using it programatically shows some other flaw in the execution logic. + +Also, "ifup -m" was configuring the interface multiple times on "add" +and "change" uevent, because the "$netif.did-setup" test was not +executed. + +(cherry picked from commit 7cca5efdcea4f1431331cf7663fc6fb48a365cdf) +--- + modules.d/40network/ifup.sh | 3 ++- + modules.d/40network/net-genrules.sh | 1 - + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index bd7db02c..3cff725c 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -82,9 +82,10 @@ fi + # disable manual ifup while netroot is set for simplifying our logic + # in netroot case we prefer netroot to bringup $netif automaticlly + [ -n "$2" -a "$2" = "-m" ] && [ -z "$netroot" ] && manualup="$2" +-[ -z "$netroot" ] && [ -z "$manualup" ] && exit 0 ++ + if [ -n "$manualup" ]; then + >/tmp/net.$netif.manualup ++ rm -f /tmp/net.${netif}.did-setup + else + [ -e /tmp/net.${netif}.did-setup ] && exit 0 + [ -e /sys/class/net/$netif/address ] && \ +diff --git a/modules.d/40network/net-genrules.sh b/modules.d/40network/net-genrules.sh +index 3664984f..750a4d7f 100755 +--- a/modules.d/40network/net-genrules.sh ++++ b/modules.d/40network/net-genrules.sh +@@ -55,7 +55,6 @@ command -v fix_bootif >/dev/null || . /lib/net-lib.sh + fi + + ifup='/sbin/ifup $env{INTERFACE}' +- [ -z "$netroot" ] && ifup="$ifup -m" + + runcmd="RUN+=\"/sbin/initqueue --name ifup-\$env{INTERFACE} --unique --onetime $ifup\"" + diff --git a/SOURCES/0255-nfs-parse-nfsroot.sh-don-t-unset-netroot-if-not-nfs.patch b/SOURCES/0255-nfs-parse-nfsroot.sh-don-t-unset-netroot-if-not-nfs.patch new file mode 100644 index 0000000..ebad176 --- /dev/null +++ b/SOURCES/0255-nfs-parse-nfsroot.sh-don-t-unset-netroot-if-not-nfs.patch @@ -0,0 +1,30 @@ +From fe15c6b6cb03f518c79d990b7054792e1d23c7ba Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 20 Mar 2015 15:48:15 +0100 +Subject: [PATCH] nfs/parse-nfsroot.sh: don't unset netroot, if not nfs + +(cherry picked from commit afcc697cb8c588eef68bb635f790991411209089) +--- + modules.d/95nfs/parse-nfsroot.sh | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/modules.d/95nfs/parse-nfsroot.sh b/modules.d/95nfs/parse-nfsroot.sh +index 9fc2a8c3..a84cd436 100755 +--- a/modules.d/95nfs/parse-nfsroot.sh ++++ b/modules.d/95nfs/parse-nfsroot.sh +@@ -59,7 +59,14 @@ fi + + case "$netroot" in + /dev/nfs) netroot=nfs;; +- /dev/*) unset netroot; return;; ++ /dev/*) ++ if [ -n "$oldnetroot" ]; then ++ netroot="$oldnetroot" ++ else ++ unset netroot ++ fi ++ return ++ ;; + # LEGACY: root=<server-ip>:/<path + [0-9]*:/*|[0-9]*\.[0-9]*\.[0-9]*[!:]|/*) + netroot=nfs:$netroot;; diff --git a/SOURCES/0256-Change-the-fs_passno-of-nfs-to-0.patch b/SOURCES/0256-Change-the-fs_passno-of-nfs-to-0.patch new file mode 100644 index 0000000..f7ff267 --- /dev/null +++ b/SOURCES/0256-Change-the-fs_passno-of-nfs-to-0.patch @@ -0,0 +1,37 @@ +From a218f3253c3c39c58d60d1a6696facf88f3e4be0 Mon Sep 17 00:00:00 2001 +From: Chao Fan <cfan@redhat.com> +Date: Wed, 20 May 2015 18:07:14 +0800 +Subject: [PATCH] Change the fs_passno of nfs to 0 + +There is a bug that kdump-initrd contains entry requesting nfs dump +filesystem to get filesystemchecked. And there is an erro message said +that nfs need be checked. But there's no fsck for nfs utility, e.g +fsck.nfs like other file system. Whatever fs_passno 0 or 2 are passed, +no fsck is executed at all for nfs mount.But in dracut, set it to be 2 +always, so the erro message appear and it should be set to 0. + +In the fstab,the sixth variable fs_passno stands for that the device need +checked or not,and dracut set it to "2".To fix this issue, it should +be "0" when the device is nfs.The third variable stands for the type of +the filesystem and we can use it to judge whether the device is nfs. +So when the third variable of fstab contains "nfs", the sixth variable +fs_passno should be set to "0". + +Signed-off-by: Chao Fan <cfan@redhat.com> +(cherry picked from commit 3586a7aa770016aeadb23257c27916fd009bec42) +--- + dracut.sh | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/dracut.sh b/dracut.sh +index 0e600220..cc22a14d 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1348,6 +1348,7 @@ if [[ $kernel_only != yes ]]; then + [ -z "${line[3]}" ] && line[3]="defaults" + [ -z "${line[4]}" ] && line[4]="0" + [ -z "${line[5]}" ] && line[5]="2" ++ strstr "${line[2]}" "nfs" && line[5]="0" + echo "${line[@]}" >> "${initdir}/etc/fstab" + done + diff --git a/SOURCES/0257-nfs-nfs-lib.sh-add-anaconda_nfsv6_to_var.patch b/SOURCES/0257-nfs-nfs-lib.sh-add-anaconda_nfsv6_to_var.patch new file mode 100644 index 0000000..f1e0807 --- /dev/null +++ b/SOURCES/0257-nfs-nfs-lib.sh-add-anaconda_nfsv6_to_var.patch @@ -0,0 +1,49 @@ +From 4350c73199b3d2ac1e22b5e2e093de12ca5ad598 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 2 Jul 2015 15:21:35 +0200 +Subject: [PATCH] nfs/nfs-lib.sh: add anaconda_nfsv6_to_var() + +add "nfs:[[2001:0db8:85a3:08d3:1319:8a2e:0370:7344]]/path" style parsing + +https://bugzilla.redhat.com/show_bug.cgi?id=1190098 +(cherry picked from commit ba665de454e7d6ef1da4ba95308fb9f65c7a9497) +--- + modules.d/95nfs/nfs-lib.sh | 18 ++++++++++++++++++ + 1 file changed, 18 insertions(+) + +diff --git a/modules.d/95nfs/nfs-lib.sh b/modules.d/95nfs/nfs-lib.sh +index bf7d044b..4f24f698 100755 +--- a/modules.d/95nfs/nfs-lib.sh ++++ b/modules.d/95nfs/nfs-lib.sh +@@ -17,6 +17,7 @@ nfs_to_var() { + # FIXME: local netif=${2:-$netif}? + case "$1" in + nfs://*) rfc2224_nfs_to_var "$1" ;; ++ nfs:*[*) anaconda_nfsv6_to_var "$1" ;; + nfs:*:*:/*) anaconda_nfs_to_var "$1" ;; + *) nfsroot_to_var "$1" ;; + esac +@@ -86,6 +87,23 @@ anaconda_nfs_to_var() { + path="/${1##*:/}" + } + ++# IPv6 nfs path will be treated separately ++anaconda_nfsv6_to_var() { ++ nfs="nfs" ++ path="$1:" ++ options="${path#*:/}" ++ path="/${options%%:*}" ++ server="${1#*nfs:}" ++ if str_starts $server '['; then ++ server="${server%:/*}" ++ options="${options#*:*}" ++ else ++ server="${server%:/*}" ++ options="${server%%:*}" ++ server="${server#*:}" ++ fi ++} ++ + # nfsroot_from_dhcp NETIF + # fill in missing server/path from DHCP options. + nfsroot_from_dhcp() { diff --git a/SOURCES/0258-splitup-dracut-init.sh-from-dracut-functions.sh.patch b/SOURCES/0258-splitup-dracut-init.sh-from-dracut-functions.sh.patch new file mode 100644 index 0000000..aef20c9 --- /dev/null +++ b/SOURCES/0258-splitup-dracut-init.sh-from-dracut-functions.sh.patch @@ -0,0 +1,660 @@ +From 1211a10b959fea039f4c8718c3901ad63e4816d3 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 2 Jul 2015 15:40:13 +0200 +Subject: [PATCH] splitup dracut-init.sh from dracut-functions.sh + +other tools want to source dracut-functions.sh without any mkdir side +effects. + +(cherry picked from commit 777f2db0373ccbc1a44fc2d960ecefbe50195055) +--- + Makefile | 1 + + dracut-functions.sh | 9 ++------ + dracut-init.sh | 34 +++++++++++++++++++++++++++++++ + dracut.sh | 8 ++++---- + dracut.spec | 1 + + test/TEST-01-BASIC/test.sh | 6 +++--- + test/TEST-02-SYSTEMD/test.sh | 6 +++--- + test/TEST-03-USR-MOUNT/test.sh | 6 +++--- + test/TEST-04-FULL-SYSTEMD/test.sh | 6 +++--- + test/TEST-10-RAID/test.sh | 6 +++--- + test/TEST-11-LVM/test.sh | 6 +++--- + test/TEST-12-RAID-DEG/test.sh | 6 +++--- + test/TEST-13-ENC-RAID-LVM/test.sh | 6 +++--- + test/TEST-14-IMSM/test.sh | 6 +++--- + test/TEST-15-BTRFSRAID/test.sh | 6 +++--- + test/TEST-16-DMSQUASH/test.sh | 4 ++-- + test/TEST-17-LVM-THIN/test.sh | 6 +++--- + test/TEST-20-NFS/test.sh | 6 +++--- + test/TEST-30-ISCSI/test.sh | 8 ++++---- + test/TEST-40-NBD/test.sh | 10 ++++----- + test/TEST-50-MULTINIC/test.sh | 6 +++--- + 21 files changed, 92 insertions(+), 61 deletions(-) + create mode 100644 dracut-init.sh + +diff --git a/Makefile b/Makefile +index 5441d8f4..18f5a88c 100644 +--- a/Makefile ++++ b/Makefile +@@ -106,6 +106,7 @@ install: dracut-version.sh + install -m 0644 dracut.conf $(DESTDIR)$(sysconfdir)/dracut.conf + mkdir -p $(DESTDIR)$(sysconfdir)/dracut.conf.d + mkdir -p $(DESTDIR)$(pkglibdir)/dracut.conf.d ++ install -m 0755 dracut-init.sh $(DESTDIR)$(pkglibdir)/dracut-init.sh + install -m 0755 dracut-functions.sh $(DESTDIR)$(pkglibdir)/dracut-functions.sh + install -m 0755 dracut-version.sh $(DESTDIR)$(pkglibdir)/dracut-version.sh + ln -fs dracut-functions.sh $(DESTDIR)$(pkglibdir)/dracut-functions +diff --git a/dracut-functions.sh b/dracut-functions.sh +index 4ea3204d..31586ca4 100755 +--- a/dracut-functions.sh ++++ b/dracut-functions.sh +@@ -22,14 +22,9 @@ + export LC_MESSAGES=C + + if [[ $DRACUT_KERNEL_LAZY ]] && ! [[ $DRACUT_KERNEL_LAZY_HASHDIR ]]; then +- if ! [[ -d "$initdir/.kernelmodseen" ]]; then +- mkdir -p "$initdir/.kernelmodseen" ++ if [[ -d "$initdir/.kernelmodseen" ]]; then ++ DRACUT_KERNEL_LAZY_HASHDIR="$initdir/.kernelmodseen" + fi +- DRACUT_KERNEL_LAZY_HASHDIR="$initdir/.kernelmodseen" +-fi +- +-if [[ $initdir ]] && ! [[ -d $initdir ]]; then +- mkdir -p "$initdir" + fi + + # Generic substring function. If $2 is in $1, return 0. +diff --git a/dracut-init.sh b/dracut-init.sh +new file mode 100644 +index 00000000..469e42ad +--- /dev/null ++++ b/dracut-init.sh +@@ -0,0 +1,34 @@ ++#!/bin/bash ++# ++# functions used by dracut and other tools. ++# ++# Copyright 2005-2009 Red Hat, Inc. All rights reserved. ++# ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see <http://www.gnu.org/licenses/>. ++# ++export LC_MESSAGES=C ++ ++if [[ $DRACUT_KERNEL_LAZY ]] && ! [[ $DRACUT_KERNEL_LAZY_HASHDIR ]]; then ++ if ! [[ -d "$initdir/.kernelmodseen" ]]; then ++ mkdir -p "$initdir/.kernelmodseen" ++ fi ++ DRACUT_KERNEL_LAZY_HASHDIR="$initdir/.kernelmodseen" ++fi ++ ++if [[ $initdir ]] && ! [[ -d $initdir ]]; then ++ mkdir -p "$initdir" ++fi ++ ++[[ $dracutbasedir ]] || export dracutbasedir=${BASH_SOURCE%/*} ++. $dracutbasedir/dracut-functions.sh +diff --git a/dracut.sh b/dracut.sh +index cc22a14d..a214f810 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -519,7 +519,7 @@ while :; do + -q|--quiet) ((verbosity_mod_l--));; + -l|--local) + allowlocal="yes" +- [[ -f "$(readlink -f "${0%/*}")/dracut-functions.sh" ]] \ ++ [[ -f "$(readlink -f "${0%/*}")/dracut-init.sh" ]] \ + && dracutbasedir="$(readlink -f "${0%/*}")" + ;; + -H|--hostonly|--host-only) +@@ -841,10 +841,10 @@ if [[ $print_cmdline ]]; then + kmsgloglvl=0 + fi + +-if [[ -f $dracutbasedir/dracut-functions.sh ]]; then +- . $dracutbasedir/dracut-functions.sh ++if [[ -f $dracutbasedir/dracut-init.sh ]]; then ++ . $dracutbasedir/dracut-init.sh + else +- printf "%s\n" "dracut: Cannot find $dracutbasedir/dracut-functions.sh." >&2 ++ printf "%s\n" "dracut: Cannot find $dracutbasedir/dracut-init.sh." >&2 + printf "%s\n" "dracut: Are you running from a git checkout?" >&2 + printf "%s\n" "dracut: Try passing -l as an argument to $0" >&2 + exit 1 +diff --git a/dracut.spec b/dracut.spec +index 302cfc5d..d22f5861 100644 +--- a/dracut.spec ++++ b/dracut.spec +@@ -296,6 +296,7 @@ rm -rf -- $RPM_BUILD_ROOT + %endif + %dir %{dracutlibdir} + %dir %{dracutlibdir}/modules.d ++%{dracutlibdir}/dracut-init.sh + %{dracutlibdir}/dracut-functions.sh + %{dracutlibdir}/dracut-functions + %{dracutlibdir}/dracut-version.sh +diff --git a/test/TEST-01-BASIC/test.sh b/test/TEST-01-BASIC/test.sh +index 02ebc231..642b250e 100755 +--- a/test/TEST-01-BASIC/test.sh ++++ b/test/TEST-01-BASIC/test.sh +@@ -29,7 +29,7 @@ test_setup() { + ( + export initdir=$TESTDIR/overlay/source + mkdir -p $initdir +- . $basedir/dracut-functions.sh ++ . $basedir/dracut-init.sh + inst_multiple sh df free ls shutdown poweroff stty cat ps ln ip route \ + mount dmesg ifconfig dhclient mkdir cp ping dhclient \ + umount strace less setsid +@@ -51,7 +51,7 @@ test_setup() { + # second, install the files needed to make the root filesystem + ( + export initdir=$TESTDIR/overlay +- . $basedir/dracut-functions.sh ++ . $basedir/dracut-init.sh + inst_multiple sfdisk mkfs.ext3 poweroff cp umount sync + inst_hook initqueue 01 ./create-root.sh + inst_hook initqueue/finished 01 ./finished-false.sh +@@ -80,7 +80,7 @@ test_setup() { + + ( + export initdir=$TESTDIR/overlay +- . $basedir/dracut-functions.sh ++ . $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 +diff --git a/test/TEST-02-SYSTEMD/test.sh b/test/TEST-02-SYSTEMD/test.sh +index 2a8ed6b5..4ebff837 100755 +--- a/test/TEST-02-SYSTEMD/test.sh ++++ b/test/TEST-02-SYSTEMD/test.sh +@@ -25,7 +25,7 @@ test_setup() { + ( + export initdir=$TESTDIR/overlay/source + mkdir -p $initdir +- . $basedir/dracut-functions.sh ++ . $basedir/dracut-init.sh + inst_multiple sh df free ls shutdown poweroff stty cat ps ln ip route \ + mount dmesg ifconfig dhclient mkdir cp ping dhclient \ + umount strace less setsid +@@ -47,7 +47,7 @@ test_setup() { + # second, install the files needed to make the root filesystem + ( + export initdir=$TESTDIR/overlay +- . $basedir/dracut-functions.sh ++ . $basedir/dracut-init.sh + inst_multiple sfdisk mkfs.ext3 poweroff cp umount + inst_hook initqueue 01 ./create-root.sh + inst_hook initqueue/finished 01 ./finished-false.sh +@@ -76,7 +76,7 @@ test_setup() { + + ( + export initdir=$TESTDIR/overlay +- . $basedir/dracut-functions.sh ++ . $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 +diff --git a/test/TEST-03-USR-MOUNT/test.sh b/test/TEST-03-USR-MOUNT/test.sh +index b8231fed..e772352a 100755 +--- a/test/TEST-03-USR-MOUNT/test.sh ++++ b/test/TEST-03-USR-MOUNT/test.sh +@@ -55,7 +55,7 @@ test_setup() { + ( + export initdir=$TESTDIR/overlay/source + mkdir -p $initdir +- . $basedir/dracut-functions.sh ++ . $basedir/dracut-init.sh + inst_multiple sh df free ls shutdown poweroff stty cat ps ln ip route \ + mount dmesg ifconfig dhclient mkdir cp ping dhclient \ + umount strace less setsid +@@ -78,7 +78,7 @@ test_setup() { + # second, install the files needed to make the root filesystem + ( + export initdir=$TESTDIR/overlay +- . $basedir/dracut-functions.sh ++ . $basedir/dracut-init.sh + inst_multiple sfdisk mkfs.btrfs btrfs poweroff cp umount sync + inst_hook initqueue 01 ./create-root.sh + inst_hook initqueue/finished 01 ./finished-false.sh +@@ -114,7 +114,7 @@ test_setup() { + + ( + export initdir=$TESTDIR/overlay +- . $basedir/dracut-functions.sh ++ . $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 +diff --git a/test/TEST-04-FULL-SYSTEMD/test.sh b/test/TEST-04-FULL-SYSTEMD/test.sh +index aa83122c..38342386 100755 +--- a/test/TEST-04-FULL-SYSTEMD/test.sh ++++ b/test/TEST-04-FULL-SYSTEMD/test.sh +@@ -57,7 +57,7 @@ test_setup() { + ( + export initdir=$TESTDIR/overlay/source + mkdir -p $initdir +- . $basedir/dracut-functions.sh ++ . $basedir/dracut-init.sh + + for d in usr/bin usr/sbin bin etc lib "$libdir" sbin tmp usr var var/log dev proc sys sysroot root run; do + if [ -L "/$d" ]; then +@@ -221,7 +221,7 @@ EOF + # second, install the files needed to make the root filesystem + ( + export initdir=$TESTDIR/overlay +- . $basedir/dracut-functions.sh ++ . $basedir/dracut-init.sh + inst_multiple sfdisk mkfs.btrfs btrfs poweroff cp umount sync + inst_hook initqueue 01 ./create-root.sh + inst_hook initqueue/finished 01 ./finished-false.sh +@@ -256,7 +256,7 @@ EOF + + ( + export initdir=$TESTDIR/overlay +- . $basedir/dracut-functions.sh ++ . $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 +diff --git a/test/TEST-10-RAID/test.sh b/test/TEST-10-RAID/test.sh +index d79d5cd4..cf474dff 100755 +--- a/test/TEST-10-RAID/test.sh ++++ b/test/TEST-10-RAID/test.sh +@@ -28,7 +28,7 @@ test_setup() { + ( + export initdir=$TESTDIR/overlay/source + (mkdir -p "$initdir"; cd "$initdir"; mkdir -p dev sys proc etc var/run tmp run) +- . $basedir/dracut-functions.sh ++ . $basedir/dracut-init.sh + inst_multiple sh df free ls shutdown poweroff stty cat ps ln ip route \ + mount dmesg ifconfig dhclient mkdir cp ping dhclient + for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do +@@ -49,7 +49,7 @@ test_setup() { + # second, install the files needed to make the root filesystem + ( + export initdir=$TESTDIR/overlay +- . $basedir/dracut-functions.sh ++ . $basedir/dracut-init.sh + inst_multiple sfdisk mke2fs poweroff cp umount + inst_hook initqueue 01 ./create-root.sh + inst_hook initqueue/finished 01 ./finished-false.sh +@@ -77,7 +77,7 @@ test_setup() { + + ( + export initdir=$TESTDIR/overlay +- . $basedir/dracut-functions.sh ++ . $basedir/dracut-init.sh + inst_multiple poweroff shutdown + inst_hook emergency 000 ./hard-off.sh + inst ./cryptroot-ask.sh /sbin/cryptroot-ask +diff --git a/test/TEST-11-LVM/test.sh b/test/TEST-11-LVM/test.sh +index 732d0c8f..c3c27bce 100755 +--- a/test/TEST-11-LVM/test.sh ++++ b/test/TEST-11-LVM/test.sh +@@ -24,7 +24,7 @@ test_setup() { + # Create what will eventually be our root filesystem onto an overlay + ( + export initdir=$TESTDIR/overlay/source +- . $basedir/dracut-functions.sh ++ . $basedir/dracut-init.sh + inst_multiple sh df free ls shutdown poweroff stty cat ps ln ip route \ + mount dmesg ifconfig dhclient mkdir cp ping dhclient + for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do +@@ -46,7 +46,7 @@ test_setup() { + # second, install the files needed to make the root filesystem + ( + export initdir=$TESTDIR/overlay +- . $basedir/dracut-functions.sh ++ . $basedir/dracut-init.sh + inst_multiple sfdisk mke2fs poweroff cp umount + inst_hook initqueue 01 ./create-root.sh + inst_hook initqueue/finished 01 ./finished-false.sh +@@ -69,7 +69,7 @@ test_setup() { + grep -F -m 1 -q dracut-root-block-created $TESTDIR/root.ext2 || return 1 + ( + export initdir=$TESTDIR/overlay +- . $basedir/dracut-functions.sh ++ . $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 +diff --git a/test/TEST-12-RAID-DEG/test.sh b/test/TEST-12-RAID-DEG/test.sh +index 87fe542f..11f66b23 100755 +--- a/test/TEST-12-RAID-DEG/test.sh ++++ b/test/TEST-12-RAID-DEG/test.sh +@@ -66,7 +66,7 @@ test_setup() { + # Create what will eventually be our root filesystem onto an overlay + ( + export initdir=$TESTDIR/overlay/source +- . $basedir/dracut-functions.sh ++ . $basedir/dracut-init.sh + inst_multiple sh df free ls shutdown poweroff stty cat ps ln ip route \ + mount dmesg ifconfig dhclient mkdir cp ping dhclient + for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do +@@ -87,7 +87,7 @@ test_setup() { + # second, install the files needed to make the root filesystem + ( + export initdir=$TESTDIR/overlay +- . $basedir/dracut-functions.sh ++ . $basedir/dracut-init.sh + inst_multiple sfdisk mke2fs poweroff cp umount dd grep + inst_hook initqueue 01 ./create-root.sh + inst_hook initqueue/finished 01 ./finished-false.sh +@@ -120,7 +120,7 @@ test_setup() { + + ( + export initdir=$TESTDIR/overlay +- . $basedir/dracut-functions.sh ++ . $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 +diff --git a/test/TEST-13-ENC-RAID-LVM/test.sh b/test/TEST-13-ENC-RAID-LVM/test.sh +index 129620b1..993f71db 100755 +--- a/test/TEST-13-ENC-RAID-LVM/test.sh ++++ b/test/TEST-13-ENC-RAID-LVM/test.sh +@@ -62,7 +62,7 @@ test_setup() { + # Create what will eventually be our root filesystem onto an overlay + ( + export initdir=$TESTDIR/overlay/source +- . $basedir/dracut-functions.sh ++ . $basedir/dracut-init.sh + inst_multiple sh df free ls shutdown poweroff stty cat ps ln ip route \ + mount dmesg ifconfig dhclient mkdir cp ping dhclient + for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do +@@ -83,7 +83,7 @@ test_setup() { + # second, install the files needed to make the root filesystem + ( + export initdir=$TESTDIR/overlay +- . $basedir/dracut-functions.sh ++ . $basedir/dracut-init.sh + inst_multiple sfdisk mke2fs poweroff cp umount grep + inst_hook initqueue 01 ./create-root.sh + inst_hook initqueue/finished 01 ./finished-false.sh +@@ -113,7 +113,7 @@ test_setup() { + + ( + export initdir=$TESTDIR/overlay +- . $basedir/dracut-functions.sh ++ . $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 +diff --git a/test/TEST-14-IMSM/test.sh b/test/TEST-14-IMSM/test.sh +index ad0cf7b0..9465965c 100755 +--- a/test/TEST-14-IMSM/test.sh ++++ b/test/TEST-14-IMSM/test.sh +@@ -54,7 +54,7 @@ test_setup() { + # Create what will eventually be our root filesystem onto an overlay + ( + export initdir=$TESTDIR/overlay/source +- . $basedir/dracut-functions.sh ++ . $basedir/dracut-init.sh + inst_multiple sh df free ls shutdown poweroff stty cat ps ln ip route \ + mount dmesg ifconfig dhclient mkdir cp ping dhclient + for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do +@@ -76,7 +76,7 @@ test_setup() { + # second, install the files needed to make the root filesystem + ( + export initdir=$TESTDIR/overlay +- . $basedir/dracut-functions.sh ++ . $basedir/dracut-init.sh + inst_multiple sfdisk mke2fs poweroff cp umount grep + inst_hook initqueue 01 ./create-root.sh + inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules +@@ -104,7 +104,7 @@ test_setup() { + echo $MD_UUID > $TESTDIR/mduuid + ( + export initdir=$TESTDIR/overlay +- . $basedir/dracut-functions.sh ++ . $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 +diff --git a/test/TEST-15-BTRFSRAID/test.sh b/test/TEST-15-BTRFSRAID/test.sh +index 71f5703a..9b971362 100755 +--- a/test/TEST-15-BTRFSRAID/test.sh ++++ b/test/TEST-15-BTRFSRAID/test.sh +@@ -26,7 +26,7 @@ test_setup() { + # Create what will eventually be our root filesystem onto an overlay + ( + export initdir=$TESTDIR/overlay/source +- . $basedir/dracut-functions.sh ++ . $basedir/dracut-init.sh + inst_multiple sh df free ls shutdown poweroff stty cat ps ln ip route \ + mount dmesg ifconfig dhclient mkdir cp ping dhclient + for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do +@@ -47,7 +47,7 @@ test_setup() { + # second, install the files needed to make the root filesystem + ( + export initdir=$TESTDIR/overlay +- . $basedir/dracut-functions.sh ++ . $basedir/dracut-init.sh + inst_multiple sfdisk mkfs.btrfs poweroff cp umount + inst_hook initqueue 01 ./create-root.sh + inst_hook initqueue/finished 01 ./finished-false.sh +@@ -77,7 +77,7 @@ test_setup() { + + ( + export initdir=$TESTDIR/overlay +- . $basedir/dracut-functions.sh ++ . $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 +diff --git a/test/TEST-16-DMSQUASH/test.sh b/test/TEST-16-DMSQUASH/test.sh +index 252e8454..c08a2a41 100755 +--- a/test/TEST-16-DMSQUASH/test.sh ++++ b/test/TEST-16-DMSQUASH/test.sh +@@ -30,7 +30,7 @@ test_setup() { + mkdir -p -- "$TESTDIR"/overlay + ( + export initdir="$TESTDIR"/overlay +- . "$basedir"/dracut-functions.sh ++ . "$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 +@@ -48,7 +48,7 @@ test_setup() { + # Create what will eventually be our root filesystem onto an overlay + ( + export initdir="$TESTDIR"/root-source +- . "$basedir"/dracut-functions.sh ++ . "$basedir"/dracut-init.sh + inst_multiple sh df free ls shutdown poweroff stty cat ps ln ip route \ + mount dmesg ifconfig dhclient mkdir cp ping dhclient \ + umount strace less +diff --git a/test/TEST-17-LVM-THIN/test.sh b/test/TEST-17-LVM-THIN/test.sh +index 4c904b0a..79e224e2 100755 +--- a/test/TEST-17-LVM-THIN/test.sh ++++ b/test/TEST-17-LVM-THIN/test.sh +@@ -24,7 +24,7 @@ test_setup() { + # Create what will eventually be our root filesystem onto an overlay + ( + export initdir=$TESTDIR/overlay/source +- . $basedir/dracut-functions.sh ++ . $basedir/dracut-init.sh + inst_multiple sh df free ls shutdown poweroff stty cat ps ln ip route \ + mount dmesg ifconfig dhclient mkdir cp ping dhclient + for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do +@@ -46,7 +46,7 @@ test_setup() { + # second, install the files needed to make the root filesystem + ( + export initdir=$TESTDIR/overlay +- . $basedir/dracut-functions.sh ++ . $basedir/dracut-init.sh + inst_multiple sfdisk mke2fs poweroff cp umount + inst_hook initqueue 01 ./create-root.sh + inst_hook initqueue/finished 01 ./finished-false.sh +@@ -69,7 +69,7 @@ test_setup() { + grep -F -m 1 -q dracut-root-block-created $TESTDIR/root.ext2 || return 1 + ( + export initdir=$TESTDIR/overlay +- . $basedir/dracut-functions.sh ++ . $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 +diff --git a/test/TEST-20-NFS/test.sh b/test/TEST-20-NFS/test.sh +index 7b5e3c5d..14350e98 100755 +--- a/test/TEST-20-NFS/test.sh ++++ b/test/TEST-20-NFS/test.sh +@@ -221,7 +221,7 @@ test_setup() { + + ( + export initdir=$TESTDIR/mnt +- . $basedir/dracut-functions.sh ++ . $basedir/dracut-init.sh + + for _f in modules.builtin.bin modules.builtin; do + [[ $srcmods/$_f ]] && break +@@ -287,7 +287,7 @@ test_setup() { + # Make client root inside server root + ( + export initdir=$TESTDIR/mnt/nfs/client +- . $basedir/dracut-functions.sh ++ . $basedir/dracut-init.sh + + inst_multiple sh shutdown poweroff stty cat ps ln ip \ + mount dmesg mkdir cp ping grep +@@ -331,7 +331,7 @@ test_setup() { + # Make an overlay with needed tools for the test harness + ( + export initdir=$TESTDIR/overlay +- . $basedir/dracut-functions.sh ++ . $basedir/dracut-init.sh + mkdir $TESTDIR/overlay + inst_multiple poweroff shutdown + inst_hook emergency 000 ./hard-off.sh +diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh +index f5977839..a258c042 100755 +--- a/test/TEST-30-ISCSI/test.sh ++++ b/test/TEST-30-ISCSI/test.sh +@@ -104,7 +104,7 @@ test_setup() { + # Create what will eventually be our root filesystem onto an overlay + ( + export initdir=$TESTDIR/overlay/source +- . $basedir/dracut-functions.sh ++ . $basedir/dracut-init.sh + inst_multiple sh shutdown poweroff stty cat ps ln ip \ + mount dmesg mkdir cp ping grep + for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do +@@ -121,7 +121,7 @@ test_setup() { + # second, install the files needed to make the root filesystem + ( + export initdir=$TESTDIR/overlay +- . $basedir/dracut-functions.sh ++ . $basedir/dracut-init.sh + inst_multiple sfdisk mkfs.ext3 poweroff cp umount + inst_hook initqueue 01 ./create-root.sh + inst_hook initqueue/finished 01 ./finished-false.sh +@@ -157,7 +157,7 @@ test_setup() { + rm -- $TESTDIR/client.img + ( + export initdir=$TESTDIR/overlay +- . $basedir/dracut-functions.sh ++ . $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 +@@ -177,7 +177,7 @@ test_setup() { + kernel=$KVERSION + ( + export initdir=$TESTDIR/mnt +- . $basedir/dracut-functions.sh ++ . $basedir/dracut-init.sh + ( + cd "$initdir"; + mkdir -p dev sys proc etc var/run tmp var/lib/dhcpd /etc/iscsi +diff --git a/test/TEST-40-NBD/test.sh b/test/TEST-40-NBD/test.sh +index 59494ed8..abf1a4f4 100755 +--- a/test/TEST-40-NBD/test.sh ++++ b/test/TEST-40-NBD/test.sh +@@ -195,7 +195,7 @@ make_encrypted_root() { + # Create what will eventually be our root filesystem onto an overlay + ( + export initdir=$TESTDIR/overlay/source +- . $basedir/dracut-functions.sh ++ . $basedir/dracut-init.sh + mkdir -p "$initdir" + (cd "$initdir"; mkdir -p dev sys proc etc var/run tmp ) + inst_multiple sh df free ls shutdown poweroff stty cat ps ln ip \ +@@ -214,7 +214,7 @@ make_encrypted_root() { + # second, install the files needed to make the root filesystem + ( + export initdir=$TESTDIR/overlay +- . $basedir/dracut-functions.sh ++ . $basedir/dracut-init.sh + inst_multiple mke2fs poweroff cp umount tune2fs + inst_hook emergency 000 ./hard-off.sh + inst_hook initqueue 01 ./create-root.sh +@@ -253,7 +253,7 @@ make_client_root() { + kernel=$KVERSION + ( + export initdir=$TESTDIR/mnt +- . $basedir/dracut-functions.sh ++ . $basedir/dracut-init.sh + mkdir -p "$initdir" + (cd "$initdir"; mkdir -p dev sys proc etc var/run tmp ) + inst_multiple sh ls shutdown poweroff stty cat ps ln ip \ +@@ -288,7 +288,7 @@ make_server_root() { + kernel=$KVERSION + ( + export initdir=$TESTDIR/mnt +- . $basedir/dracut-functions.sh ++ . $basedir/dracut-init.sh + mkdir -p "$initdir" + ( + cd "$initdir"; +@@ -335,7 +335,7 @@ test_setup() { + # Make the test image + ( + export initdir=$TESTDIR/overlay +- . $basedir/dracut-functions.sh ++ . $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 +diff --git a/test/TEST-50-MULTINIC/test.sh b/test/TEST-50-MULTINIC/test.sh +index 3c6003b4..4f73203f 100755 +--- a/test/TEST-50-MULTINIC/test.sh ++++ b/test/TEST-50-MULTINIC/test.sh +@@ -150,7 +150,7 @@ test_setup() { + + ( + export initdir="$TESTDIR"/mnt +- . "$basedir"/dracut-functions.sh ++ . "$basedir"/dracut-init.sh + + ( + cd "$initdir"; +@@ -216,7 +216,7 @@ test_setup() { + # Make client root inside server root + ( + export initdir="$TESTDIR"/mnt/nfs/client +- . "$basedir"/dracut-functions.sh ++ . "$basedir"/dracut-init.sh + inst_multiple sh shutdown poweroff stty cat ps ln ip \ + mount dmesg mkdir cp ping grep ls + for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do +@@ -256,7 +256,7 @@ test_setup() { + # Make an overlay with needed tools for the test harness + ( + export initdir="$TESTDIR"/overlay +- . "$basedir"/dracut-functions.sh ++ . "$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 diff --git a/SOURCES/0259-Adding-support-for-read-write-filesystem-images.patch b/SOURCES/0259-Adding-support-for-read-write-filesystem-images.patch new file mode 100644 index 0000000..50e5dd8 --- /dev/null +++ b/SOURCES/0259-Adding-support-for-read-write-filesystem-images.patch @@ -0,0 +1,173 @@ +From b9c6d2b2afa94dcba7129390edb7b1a2eaf2c31c Mon Sep 17 00:00:00 2001 +From: Major Hayden <major@mhtx.net> +Date: Mon, 4 Aug 2014 10:27:36 -0500 +Subject: [PATCH] Adding support for read/write filesystem images + +A user can provide a filesystem image (rootfs.img) inside a compressed +tarball and that filesystem image will be mounted read/write. This provides +some benefits over a device mapper snapshot overlay, especially when the +live system becomes full. The boot command line simple needs +"rd.writable.fsimg" added to utilize this feature. + +Additional documentation for this option as well as other live boot +options is included. + +Signed-off-by: Major Hayden <major@mhtx.net> +(cherry picked from commit 504c0a8feca7d7ef470e4483a68cbaf9cb7df2bf) +--- + dracut.cmdline.7.asc | 82 ++++++++++++++++++- + .../90dmsquash-live/dmsquash-live-root.sh | 16 +++- + modules.d/90dmsquash-live/module-setup.sh | 2 +- + 3 files changed, 96 insertions(+), 4 deletions(-) + +diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc +index bce86084..0493dcd8 100644 +--- a/dracut.cmdline.7.asc ++++ b/dracut.cmdline.7.asc +@@ -729,10 +729,90 @@ rd.znet=qeth,0.0.0600,0.0.0601,0.0.0602,layer2=1,portname=foo + rd.znet=ctc,0.0.0600,0.0.0601,protocol=bar + -- + ++Booting live images ++~~~~~~~~~~~~~~~~~~~ ++Dracut offers multiple options for live booted images: ++ ++===================== ++squashfs with read-only filesystem image::: The system will boot with a read ++only filesystem from the squashfs and apply a writable device mapper snapshot ++over the read only filesystem. Using this method ensures a relatively fast ++boot and lower RAM usage. Users **must be careful** to avoid writing too many ++blocks to the snapshot volume. Once the blocks of the snapshot are exhaused, ++the live filesystem becomes unusable and requires a reboot. +++ ++The filesystem structure is expected to be: +++ ++[listing] ++-- ++squashfs.img | Squashfs downloaded via network ++ !(mount) ++ /LiveOS ++ |- ext3fs.img | Filesystem image to mount read-only ++ !(mount) ++ /bin | Live filesystem ++ /boot | ++ /dev | ++ ... | ++-- +++ ++Dracut uses this method of live booting by default. No additional command line ++options are required other than **root=live:<URL>** to specify the location ++of your squashed filesystem. +++ ++writable filesystem image::: The system will retrieve a compressed filesystem ++image, connect it to a loopback device, and mount it as a writable volume. More ++RAM is required during boot but the live filesystem is easier to manage if it ++becomes full. Users can make a filesystem image of any size and that size will ++be maintained when the system boots. +++ ++The filesystem structure is expected to be: +++ ++[listing] ++-- ++rootfs.tgz | Compressed tarball containing fileystem image ++ !(unpack) ++ /rootfs.img | Filesystem image ++ !(mount) ++ /bin | Live filesystem ++ /boot | ++ /dev | ++ ... | ++-- +++ ++To use this boot option, ensure that **rd.writable_fsimg=1** is in your kernel ++command line and add the **root=live:<URL>** to specify the location ++of your compressed filesystem image tarball. ++===================== ++ ++**root=**live:__<url>__:: ++Boots a live image retrieved from __<url>__. Valid handlers: __http, httpd, ftp, tftp__. +++ ++[listing] ++.Example ++-- ++root=live:http://example.com/liveboot.img ++root=live:ftp://ftp.example.com/liveboot.img ++-- ++ ++**rd.live.debug=**1:: ++Enables debug output from the live boot process. ++ ++**rd.live.dir=**__<path>__:: ++Specifies the directory within the squashfs where the ext3fs.img or rootfs.img ++can be found. By default, this is __LiveOS__. ++ ++**rd.writable.fsimg=**1:: ++Enables writable filesystem support. The system will boot with a fully ++writable filesystem without snapshots __(see notes above about available live boot options)__. ++You can use the **rootflags** option to set mount options for the live ++filesystem as well __(see documentation about rootflags in the **Standard** section above)__. ++ ++ + Plymouth Boot Splash + ~~~~~~~~~~~~~~~~~~~~ + **plymouth.enable=0**:: +- disable the plymouth bootsplash completly. ++ disable the plymouth bootsplash completely. + + **rd.plymouth=0**:: + disable the plymouth bootsplash only for the initramfs. +diff --git a/modules.d/90dmsquash-live/dmsquash-live-root.sh b/modules.d/90dmsquash-live/dmsquash-live-root.sh +index 5705e8df..c6c02c74 100755 +--- a/modules.d/90dmsquash-live/dmsquash-live-root.sh ++++ b/modules.d/90dmsquash-live/dmsquash-live-root.sh +@@ -4,6 +4,8 @@ + + type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh + ++command -v unpack_archive >/dev/null || . /lib/img-lib.sh ++ + PATH=/usr/sbin:/usr/bin:/sbin:/bin + + if getargbool 0 rd.live.debug -n -y rdlivedebug; then +@@ -26,6 +28,7 @@ getargbool 0 rd.live.ram -d -y live_ram && live_ram="yes" + getargbool 0 rd.live.overlay.reset -d -y reset_overlay && reset_overlay="yes" + getargbool 0 rd.live.overlay.readonly -d -y readonly_overlay && readonly_overlay="--readonly" || readonly_overlay="" + overlay=$(getarg rd.live.overlay -d overlay) ++getargbool 0 rd.writable.fsimg -d -y writable_fsimg && writable_fsimg="yes" + + # CD/DVD media check + [ -b $livedev ] && fs=$(blkid -s TYPE -o value $livedev) +@@ -180,9 +183,18 @@ fi + + if [ -n "$FSIMG" ] ; then + BASE_LOOPDEV=$( losetup -f ) +- losetup -r $BASE_LOOPDEV $FSIMG + +- do_live_from_base_loop ++ if [ -n "$writable_fsimg" ] ; then ++ # mount the provided fileysstem read/write ++ echo "Unpacking live filesystem (may take some time)" ++ unpack_archive $FSIMG /tmp/fsimg/ ++ losetup $BASE_LOOPDEV /tmp/fsimg/rootfs.img ++ echo "0 $( blockdev --getsize $BASE_LOOPDEV ) linear $BASE_LOOPDEV 0" | dmsetup create live-rw ++ else ++ # mount the filesystem read-only and add a dm snapshot for writes ++ losetup -r $BASE_LOOPDEV $FSIMG ++ do_live_from_base_loop ++ fi + fi + + # we might have an embedded fs image on squashfs (compressed live) +diff --git a/modules.d/90dmsquash-live/module-setup.sh b/modules.d/90dmsquash-live/module-setup.sh +index c6d1f9d5..f52717de 100755 +--- a/modules.d/90dmsquash-live/module-setup.sh ++++ b/modules.d/90dmsquash-live/module-setup.sh +@@ -11,7 +11,7 @@ check() { + depends() { + # if dmsetup is not installed, then we cannot support fedora/red hat + # style live images +- echo dm rootfs-block ++ echo dm rootfs-block img-lib + return 0 + } + diff --git a/SOURCES/0260-dmsquash-Add-rd.live.overlay.thin.patch b/SOURCES/0260-dmsquash-Add-rd.live.overlay.thin.patch new file mode 100644 index 0000000..b38383b --- /dev/null +++ b/SOURCES/0260-dmsquash-Add-rd.live.overlay.thin.patch @@ -0,0 +1,82 @@ +From db1e692c13290fba4d1c9a5e81b7374c677cb421 Mon Sep 17 00:00:00 2001 +From: Fabian Deutsch <fabiand@fedoraproject.org> +Date: Wed, 18 Feb 2015 14:31:40 +0100 +Subject: [PATCH] dmsquash: Add rd.live.overlay.thin + +This option changes the underlying mechanism for the overlay in the +dmsquash module. +Instead of a plain dm snapshot a dm thin snapshot is used. The advantage +of the thin snapshot is, that the TRIM command is recognized, which +means that at runtime, only the occupied blocks will be claimed from +memory, and freed blocks will really be freed in ram. + +Signed-off-by: Fabian Deutsch <fabiand@fedoraproject.org> +(cherry picked from commit d6e34d362a05cda61baaf8e231ad3f0e8665a9cc) +--- + dracut.cmdline.7.asc | 7 +++++ + .../90dmsquash-live/dmsquash-live-root.sh | 27 ++++++++++++++++++- + 2 files changed, 33 insertions(+), 1 deletion(-) + +diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc +index 0493dcd8..0c3bc295 100644 +--- a/dracut.cmdline.7.asc ++++ b/dracut.cmdline.7.asc +@@ -802,6 +802,13 @@ Enables debug output from the live boot process. + Specifies the directory within the squashfs where the ext3fs.img or rootfs.img + can be found. By default, this is __LiveOS__. + ++**rd.live.overlay.thin=**1:: ++Enables the usage of thin snapshots instead of classic dm snapshots. ++The advantage of thin snapshots is, that they support discards, and will free ++blocks which are not claimed by the filesystem. In this use case this means, ++that memory is given back to the kernel, when the filesystem does not claim it ++anymore. ++ + **rd.writable.fsimg=**1:: + Enables writable filesystem support. The system will boot with a fully + writable filesystem without snapshots __(see notes above about available live boot options)__. +diff --git a/modules.d/90dmsquash-live/dmsquash-live-root.sh b/modules.d/90dmsquash-live/dmsquash-live-root.sh +index c6c02c74..0645a0bd 100755 +--- a/modules.d/90dmsquash-live/dmsquash-live-root.sh ++++ b/modules.d/90dmsquash-live/dmsquash-live-root.sh +@@ -30,6 +30,8 @@ getargbool 0 rd.live.overlay.readonly -d -y readonly_overlay && readonly_overlay + overlay=$(getarg rd.live.overlay -d overlay) + getargbool 0 rd.writable.fsimg -d -y writable_fsimg && writable_fsimg="yes" + ++getargbool 0 rd.live.overlay.thin && thin_snapshot="yes" ++ + # CD/DVD media check + [ -b $livedev ] && fs=$(blkid -s TYPE -o value $livedev) + if [ "$fs" = "iso9660" -o "$fs" = "udf" ]; then +@@ -146,7 +148,30 @@ do_live_overlay() { + base=$BASE_LOOPDEV + over=$OVERLAY_LOOPDEV + fi +- echo 0 $sz snapshot $base $over p 8 | dmsetup create live-rw ++ if [ -n "$thin_snapshot" ]; then ++ modprobe dm_thin_pool ++ mkdir /run/initramfs/thin-overlay ++ ++ # In block units (512b) ++ thin_data_sz=$(( $overlay_size * 1024 * 1024 / 512 )) ++ thin_meta_sz=$(( $thin_data_sz / 10 )) ++ ++ # It is important to have the backing file on a tmpfs ++ # this is needed to let the loopdevice support TRIM ++ dd if=/dev/null of=/run/initramfs/thin-overlay/meta bs=1b count=1 seek=$((thin_meta_sz)) 2> /dev/null ++ dd if=/dev/null of=/run/initramfs/thin-overlay/data bs=1b count=1 seek=$((thin_data_sz)) 2> /dev/null ++ ++ THIN_META_LOOPDEV=$( losetup --show -f /run/initramfs/thin-overlay/meta ) ++ THIN_DATA_LOOPDEV=$( losetup --show -f /run/initramfs/thin-overlay/data ) ++ ++ echo 0 $thin_data_sz thin-pool $THIN_META_LOOPDEV $THIN_DATA_LOOPDEV 1024 1024 | dmsetup create live-overlay-pool ++ dmsetup message /dev/mapper/live-overlay-pool 0 "create_thin 0" ++ ++ # Create a snapshot of the base image ++ echo 0 $sz thin /dev/mapper/live-overlay-pool 0 $base | dmsetup create live-rw ++ else ++ echo 0 $sz snapshot $base $over p 8 | dmsetup create live-rw ++ fi + + # Create a device that always points to a ro base image + echo 0 $sz linear $base 0 | dmsetup create --readonly live-base diff --git a/SOURCES/0261-dmsquash-live-setup-the-images-in-run-initramfs.patch b/SOURCES/0261-dmsquash-live-setup-the-images-in-run-initramfs.patch new file mode 100644 index 0000000..5a8c6e6 --- /dev/null +++ b/SOURCES/0261-dmsquash-live-setup-the-images-in-run-initramfs.patch @@ -0,0 +1,53 @@ +From 23e3c7f95f7747375fdda20e0dfac10bc7a8920f Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 16 Dec 2014 12:53:18 +0100 +Subject: [PATCH] dmsquash-live: setup the images in /run/initramfs + +We want to cleanup / after switch_root. Placing the loop files in / +works, but it is more sane to put them in /run/initramfs + +(cherry picked from commit 1f8abe81a9fca0f44c63bf3bd30a7f7fbec28642) +--- + modules.d/90dmsquash-live/dmsquash-live-root.sh | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/modules.d/90dmsquash-live/dmsquash-live-root.sh b/modules.d/90dmsquash-live/dmsquash-live-root.sh +index 0645a0bd..12354f42 100755 +--- a/modules.d/90dmsquash-live/dmsquash-live-root.sh ++++ b/modules.d/90dmsquash-live/dmsquash-live-root.sh +@@ -189,9 +189,9 @@ fi + + if [ -n "$OSMINSQFS" ]; then + # decompress the delta data +- dd if=$OSMINSQFS of=/osmin.img 2> /dev/null ++ dd if=$OSMINSQFS of=/run/initramfs/osmin.img 2> /dev/null + OSMIN_SQUASHED_LOOPDEV=$( losetup -f ) +- losetup -r $OSMIN_SQUASHED_LOOPDEV /osmin.img ++ losetup -r $OSMIN_SQUASHED_LOOPDEV /run/initramfs/osmin.img + mkdir -m 0755 -p /run/initramfs/squashfs.osmin + mount -n -t squashfs -o ro $OSMIN_SQUASHED_LOOPDEV /run/initramfs/squashfs.osmin + OSMIN_LOOPDEV=$( losetup -f ) +@@ -212,8 +212,8 @@ if [ -n "$FSIMG" ] ; then + if [ -n "$writable_fsimg" ] ; then + # mount the provided fileysstem read/write + echo "Unpacking live filesystem (may take some time)" +- unpack_archive $FSIMG /tmp/fsimg/ +- losetup $BASE_LOOPDEV /tmp/fsimg/rootfs.img ++ unpack_archive $FSIMG /run/initramfs/fsimg/ ++ losetup $BASE_LOOPDEV /run/initramfs/fsimg/rootfs.img + echo "0 $( blockdev --getsize $BASE_LOOPDEV ) linear $BASE_LOOPDEV 0" | dmsetup create live-rw + else + # mount the filesystem read-only and add a dm snapshot for writes +@@ -231,10 +231,10 @@ if [ -e "$SQUASHED" ] ; then + if [ -n "$live_ram" ] ; then + echo "Copying live image to RAM..." + echo "(this may take a few minutes)" +- dd if=$SQUASHED of=/squashed.img bs=512 2> /dev/null ++ dd if=$SQUASHED of=/run/initramfs/squashed.img bs=512 2> /dev/null + umount -n /run/initramfs/live + echo "Done copying live image to RAM." +- SQUASHED="/squashed.img" ++ SQUASHED="/run/initramfs/squashed.img" + fi + + SQUASHED_LOOPDEV=$( losetup -f ) diff --git a/SOURCES/0262-dmsquash-Add-squashfs-support-to-rd.live.fsimg.patch b/SOURCES/0262-dmsquash-Add-squashfs-support-to-rd.live.fsimg.patch new file mode 100644 index 0000000..2df6a30 --- /dev/null +++ b/SOURCES/0262-dmsquash-Add-squashfs-support-to-rd.live.fsimg.patch @@ -0,0 +1,140 @@ +From 70b7ec9492f950bcfb6f390c58ad6e3e2b8fda9c Mon Sep 17 00:00:00 2001 +From: Fabian Deutsch <fabiand@fedoraproject.org> +Date: Thu, 19 Feb 2015 10:09:14 +0100 +Subject: [PATCH] dmsquash: Add squashfs support to rd.live.fsimg + +Previously rd.live.fsimg only supported filesystems residing in +(compressed) archives. +Now rd.live.fsimg can also be used when a squashfs image is used. +This is achieved by extracting the rootfs image from the squashfs and +then continue with the default routines for rd.live.fsimg. +In addition some code duplication got removed and some documentation +got added. + +Signed-off-by: Fabian Deutsch <fabiand@fedoraproject.org> +(cherry picked from commit b0472eac111268e2cae783097d0eccc1986e1762) +--- + dracut.cmdline.7.asc | 9 +++ + .../90dmsquash-live/dmsquash-live-root.sh | 64 ++++++++++--------- + 2 files changed, 42 insertions(+), 31 deletions(-) + +diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc +index 0c3bc295..1e89bd50 100644 +--- a/dracut.cmdline.7.asc ++++ b/dracut.cmdline.7.asc +@@ -802,6 +802,10 @@ Enables debug output from the live boot process. + Specifies the directory within the squashfs where the ext3fs.img or rootfs.img + can be found. By default, this is __LiveOS__. + ++**rd.live.ram=**1:: ++Copy the complete image to RAM and use this for booting. This is useful ++when the image resides on i.e. a DVD which needs to be ejected later on. ++ + **rd.live.overlay.thin=**1:: + Enables the usage of thin snapshots instead of classic dm snapshots. + The advantage of thin snapshots is, that they support discards, and will free +@@ -814,6 +818,11 @@ Enables writable filesystem support. The system will boot with a fully + writable filesystem without snapshots __(see notes above about available live boot options)__. + You can use the **rootflags** option to set mount options for the live + filesystem as well __(see documentation about rootflags in the **Standard** section above)__. ++This implies that the whole image is copied to RAM before the boot continues. +++ ++NOTE: There must be enough free RAM available to hold the complete image. +++ ++This method is very suitable for diskless boots. + + + Plymouth Boot Splash +diff --git a/modules.d/90dmsquash-live/dmsquash-live-root.sh b/modules.d/90dmsquash-live/dmsquash-live-root.sh +index 12354f42..64abc0be 100755 +--- a/modules.d/90dmsquash-live/dmsquash-live-root.sh ++++ b/modules.d/90dmsquash-live/dmsquash-live-root.sh +@@ -148,6 +148,7 @@ do_live_overlay() { + base=$BASE_LOOPDEV + over=$OVERLAY_LOOPDEV + fi ++ + if [ -n "$thin_snapshot" ]; then + modprobe dm_thin_pool + mkdir /run/initramfs/thin-overlay +@@ -199,29 +200,6 @@ if [ -n "$OSMINSQFS" ]; then + umount -l /run/initramfs/squashfs.osmin + fi + +-# we might have an embedded fs image to use as rootfs (uncompressed live) +-if [ -e /run/initramfs/live/${live_dir}/ext3fs.img ]; then +- FSIMG="/run/initramfs/live/${live_dir}/ext3fs.img" +-elif [ -e /run/initramfs/live/${live_dir}/rootfs.img ]; then +- FSIMG="/run/initramfs/live/${live_dir}/rootfs.img" +-fi +- +-if [ -n "$FSIMG" ] ; then +- BASE_LOOPDEV=$( losetup -f ) +- +- if [ -n "$writable_fsimg" ] ; then +- # mount the provided fileysstem read/write +- echo "Unpacking live filesystem (may take some time)" +- unpack_archive $FSIMG /run/initramfs/fsimg/ +- losetup $BASE_LOOPDEV /run/initramfs/fsimg/rootfs.img +- echo "0 $( blockdev --getsize $BASE_LOOPDEV ) linear $BASE_LOOPDEV 0" | dmsetup create live-rw +- else +- # mount the filesystem read-only and add a dm snapshot for writes +- losetup -r $BASE_LOOPDEV $FSIMG +- do_live_from_base_loop +- fi +-fi +- + # we might have an embedded fs image on squashfs (compressed live) + if [ -e /run/initramfs/live/${live_dir}/${squash_image} ]; then + SQUASHED="/run/initramfs/live/${live_dir}/${squash_image}" +@@ -242,18 +220,42 @@ if [ -e "$SQUASHED" ] ; then + mkdir -m 0755 -p /run/initramfs/squashfs + mount -n -t squashfs -o ro $SQUASHED_LOOPDEV /run/initramfs/squashfs + +- BASE_LOOPDEV=$( losetup -f ) +- if [ -f /run/initramfs/squashfs/LiveOS/ext3fs.img ]; then +- losetup -r $BASE_LOOPDEV /run/initramfs/squashfs/LiveOS/ext3fs.img +- elif [ -f /run/initramfs/squashfs/LiveOS/rootfs.img ]; then +- losetup -r $BASE_LOOPDEV /run/initramfs/squashfs/LiveOS/rootfs.img +- fi ++fi ++ ++# we might have an embedded fs image to use as rootfs (uncompressed live) ++if [ -e /run/initramfs/live/${live_dir}/ext3fs.img ]; then ++ FSIMG="/run/initramfs/live/${live_dir}/ext3fs.img" ++elif [ -e /run/initramfs/live/${live_dir}/rootfs.img ]; then ++ FSIMG="/run/initramfs/live/${live_dir}/rootfs.img" ++elif [ -f /run/initramfs/squashfs/LiveOS/ext3fs.img ]; then ++ FSIMG="/run/initramfs/squashfs/LiveOS/ext3fs.img" ++elif [ -f /run/initramfs/squashfs/LiveOS/rootfs.img ]; then ++ FSIMG="/run/initramfs/squashfs/LiveOS/rootfs.img" ++fi + +- umount -l /run/initramfs/squashfs ++if [ -n "$FSIMG" ] ; then ++ BASE_LOOPDEV=$( losetup -f ) + +- do_live_from_base_loop ++ if [ -n "$writable_fsimg" ] ; then ++ # mount the provided fileysstem read/write ++ echo "Unpacking live filesystem (may take some time)" ++ mkdir /run/initramfs/fsimg/ ++ if [ -n "$SQUASHED" ]; then ++ cp -v $FSIMG /run/initramfs/fsimg/rootfs.img ++ else ++ unpack_archive $FSIMG /run/initramfs/fsimg/ ++ fi ++ losetup $BASE_LOOPDEV /run/initramfs/fsimg/rootfs.img ++ echo "0 $( blockdev --getsize $BASE_LOOPDEV ) linear $BASE_LOOPDEV 0" | dmsetup create live-rw ++ else ++ # mount the filesystem read-only and add a dm snapshot for writes ++ losetup -r $BASE_LOOPDEV $FSIMG ++ do_live_from_base_loop ++ fi + fi + ++[ -e "$SQUASHED" ] && umount -l /run/initramfs/squashfs ++ + if [ -b "$OSMIN_LOOPDEV" ]; then + # set up the devicemapper snapshot device, which will merge + # the normal live fs image, and the delta, into a minimzied fs image diff --git a/SOURCES/0263-doc-Add-a-minimal-rd.live.overlay-documentation.patch b/SOURCES/0263-doc-Add-a-minimal-rd.live.overlay-documentation.patch new file mode 100644 index 0000000..7aea5b5 --- /dev/null +++ b/SOURCES/0263-doc-Add-a-minimal-rd.live.overlay-documentation.patch @@ -0,0 +1,34 @@ +From 55473e86b6fc1bc15d58810eb73594b1f30568bf Mon Sep 17 00:00:00 2001 +From: Fabian Deutsch <fabiand@fedoraproject.org> +Date: Thu, 21 May 2015 12:37:38 +0200 +Subject: [PATCH] doc: Add a minimal rd.live.overlay documentation + +Signed-off-by: Fabian Deutsch <fabiand@fedoraproject.org> +(cherry picked from commit a1b4efe6a722ac3754d8a48109575d11d5ccf61b) +--- + dracut.cmdline.7.asc | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc +index 1e89bd50..c7e3bd40 100644 +--- a/dracut.cmdline.7.asc ++++ b/dracut.cmdline.7.asc +@@ -806,6 +806,18 @@ can be found. By default, this is __LiveOS__. + Copy the complete image to RAM and use this for booting. This is useful + when the image resides on i.e. a DVD which needs to be ejected later on. + ++**rd.live.overlay=**_<devspec>_:_(<pathspec>|auto)__ ++Allow the usage of a permanent overlay. ++_<devspec>_ specifies the path to a device with a mountable filesystem. ++_<pathspec>_ is the path to a file within that filesystem, which shall be used to ++persist the changes made to the device specified by **root=live:__<url>__** option. +++ ++[listing] ++.Example ++-- ++rd.live.overlay=/dev/sdb1:persistent-overlay.img ++-- ++ + **rd.live.overlay.thin=**1:: + Enables the usage of thin snapshots instead of classic dm snapshots. + The advantage of thin snapshots is, that they support discards, and will free diff --git a/SOURCES/0264-50drm-add-hyperv_fb-kernel-module.patch b/SOURCES/0264-50drm-add-hyperv_fb-kernel-module.patch new file mode 100644 index 0000000..811dfd9 --- /dev/null +++ b/SOURCES/0264-50drm-add-hyperv_fb-kernel-module.patch @@ -0,0 +1,24 @@ +From afbff20e51c34be078db8e55f76c3304f7f6ab6a Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Mon, 18 May 2015 13:43:26 +0200 +Subject: [PATCH] 50drm: add hyperv_fb kernel module + +https://bugzilla.redhat.com/show_bug.cgi?id=1192035 +(cherry picked from commit 81b67232dcc796178124676d124d7d91514e4a8f) +--- + modules.d/50drm/module-setup.sh | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/modules.d/50drm/module-setup.sh b/modules.d/50drm/module-setup.sh +index bf33c5b7..0e1c5ff0 100755 +--- a/modules.d/50drm/module-setup.sh ++++ b/modules.d/50drm/module-setup.sh +@@ -48,6 +48,8 @@ installkernel() { + return 0 + } + ++ instmods amdkfd hyperv_fb ++ + for _modname in $(find_kernel_modules_by_path drivers/gpu/drm \ + | drm_module_filter) ; do + # if the hardware is present, include module even if it is not currently loaded, diff --git a/SOURCES/0265-kernel-modules-install-all-HID-drivers.patch b/SOURCES/0265-kernel-modules-install-all-HID-drivers.patch new file mode 100644 index 0000000..61a699d --- /dev/null +++ b/SOURCES/0265-kernel-modules-install-all-HID-drivers.patch @@ -0,0 +1,56 @@ +From b34bd60c3b4378ea33768c4dece5b744a7e769b0 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 23 Apr 2015 13:46:52 +0200 +Subject: [PATCH] kernel-modules: install all HID drivers + +Instead of hardcoding a list of useful drivers, which has to be curated +all the time, just include all HID drivers. + +(cherry picked from commit 180e9d78516fb4b2ee5baef44521007a860d4dd2) +--- + modules.d/90kernel-modules/module-setup.sh | 25 ++++++++++++++++------ + 1 file changed, 18 insertions(+), 7 deletions(-) + +diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh +index fba2bc1a..34d85b1c 100755 +--- a/modules.d/90kernel-modules/module-setup.sh ++++ b/modules.d/90kernel-modules/module-setup.sh +@@ -40,20 +40,31 @@ installkernel() { + ehci-hcd ehci-pci ehci-platform \ + ohci-hcd ohci-pci \ + uhci-hcd \ +- xhci-hcd ++ xhci-hcd xhci-pci xhci-plat-hcd + +- instmods yenta_socket scsi_dh_rdac scsi_dh_emc \ +- atkbd i8042 usbhid hid-apple hid-sunplus hid-cherry hid-logitech \ +- hid-logitech-dj hid-microsoft firewire-ohci \ +- pcmcia usb_storage nvme hid-hyperv hv-vmbus \ +- sdhci_acpi ++ instmods yenta_socket scsi_dh_rdac scsi_dh_emc scsi_dh_alua \ ++ atkbd i8042 usbhid firewire-ohci pcmcia hv-vmbus \ ++ atkbd i8042 usbhid firewire-ohci pcmcia usb_storage \ ++ nvme hv-vmbus sdhci_acpi ++ ++ instmods \ ++ "=drivers/hid" \ ++ "=drivers/input/serio" \ ++ "=drivers/input/keyboard" + + if [[ "$(uname -p)" == arm* ]]; then + # arm specific modules + hostonly='' instmods \ + connector-hdmi connector-dvi encoder-tfp410 \ + encoder-tpd12s015 i2c-tegra gpio-regulator \ +- as3722-regulator orion-ehci ehci-tegra ++ as3722-regulator orion-ehci ehci-tegra ++ instmods \ ++ "=drivers/i2c/busses" \ ++ "=drivers/regulator" \ ++ "=drivers/rtc" \ ++ "=drivers/usb/host" \ ++ "=drivers/usb/phy" \ ++ ${NULL} + fi + + # install virtual machine support diff --git a/SOURCES/0266-network-add-options-to-tweak-timeouts.patch b/SOURCES/0266-network-add-options-to-tweak-timeouts.patch new file mode 100644 index 0000000..888d954 --- /dev/null +++ b/SOURCES/0266-network-add-options-to-tweak-timeouts.patch @@ -0,0 +1,197 @@ +From d8ad687e1a4c0343eb076902b11aff2b2b2c4b85 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 3 Jul 2015 13:30:40 +0200 +Subject: [PATCH] network: add options to tweak timeouts + + rd.net.dhcp.retry=<cnt> + If this option is set, dracut will try to connect via dhcp + <cnt> times before failing. Default is 1. + + rd.net.timeout.dhcp=<arg> + If this option is set, dhclient is called with "-timeout <arg>". + + rd.net.timeout.iflink=<seconds> + Wait <seconds> until link shows up. Default is 60 seconds. + + rd.net.timeout.ifup=<seconds> + Wait <seconds> until link has state "UP". Default is 20 seconds. + + rd.net.timeout.route=<seconds> + Wait <seconds> until route shows up. Default is 20 seconds. + + rd.net.timeout.ipv6dad=<seconds> + Wait <seconds> until IPv6 DAD is finished. Default is 50 seconds. + + rd.net.timeout.ipv6auto=<seconds> + Wait <seconds> until IPv6 automatic addresses are assigned. + Default is 40 seconds. + + rd.net.timeout.carrier=<seconds> + Wait <seconds> until carrier is recognized. Default is 5 seconds. +--- + dracut.cmdline.7.asc | 25 +++++++++++++++++++++++ + modules.d/40network/ifup.sh | 26 ++++++++++++++++++++---- + modules.d/40network/net-lib.sh | 36 ++++++++++++++++++++++++++++------ + 3 files changed, 77 insertions(+), 10 deletions(-) + +diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc +index c7e3bd40..5f3dead1 100644 +--- a/dracut.cmdline.7.asc ++++ b/dracut.cmdline.7.asc +@@ -572,6 +572,31 @@ NFS + **rd.nfs.domain=**__<NFSv4 domain name>__:: + Set the NFSv4 domain name. Will overwrite the settings in _/etc/idmap.conf_. + ++**rd.net.dhcp.retry=**__<cnt>__:: ++ If this option is set, dracut will try to connect via dhcp <cnt> times before failing. ++ Default is 1. ++ ++**rd.net.timeout.dhcp=**__<arg>__:: ++ If this option is set, dhclient is called with "-timeout <arg>". ++ ++**rd.net.timeout.iflink=**__<seconds>__:: ++ Wait <seconds> until link shows up. Default is 60 seconds. ++ ++**rd.net.timeout.ifup=**__<seconds>__:: ++ Wait <seconds> until link has state "UP". Default is 20 seconds. ++ ++**rd.net.timeout.route=**__<seconds>__:: ++ Wait <seconds> until route shows up. Default is 20 seconds. ++ ++**rd.net.timeout.ipv6dad=**__<seconds>__:: ++ Wait <seconds> until IPv6 DAD is finished. Default is 50 seconds. ++ ++**rd.net.timeout.ipv6auto=**__<seconds>__:: ++ Wait <seconds> until IPv6 automatic addresses are assigned. Default is 40 seconds. ++ ++**rd.net.timeout.carrier=**__<seconds>__:: ++ Wait <seconds> until carrier is recognized. Default is 5 seconds. ++ + CIFS + ~~~ + **root=**cifs://[__<username>__[:__<password>__]@]__<server-ip>__:__<root-dir>__:: +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index 3cff725c..2f51e6d5 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -98,15 +98,33 @@ do_dhcp() { + # event for nfsroot + # XXX add -V vendor class and option parsing per kernel + ++ local _COUNT=0 ++ local _timeout=$(getargs rd.net.timeout.dhcp=) ++ local _DHCPRETRY=$(getargs rd.net.dhcp.retry=) ++ _DHCPRETRY=${_DHCPRETRY:-1} ++ + [ -e /tmp/dhclient.$netif.pid ] && return 0 + + if ! iface_has_link $netif; then +- echo "No carrier detected" ++ warn "No carrier detected on interface $netif" + return 1 + fi +- echo "Starting dhcp for interface $netif" +- dhclient "$@" -1 -q -cf /etc/dhclient.conf -pf /tmp/dhclient.$netif.pid -lf /tmp/dhclient.$netif.lease $netif \ +- || echo "dhcp failed" ++ ++ while [ $_COUNT -lt $_DHCPRETRY ]; do ++ info "Starting dhcp for interface $netif" ++ dhclient "$@" \ ++ ${_timeout:+-timeout $_timeout} \ ++ -1 -q \ ++ -cf /etc/dhclient.conf \ ++ -pf /tmp/dhclient.$netif.pid \ ++ -lf /tmp/dhclient.$netif.lease \ ++ $netif \ ++ && return 0 ++ _COUNT=$(($_COUNT+1)) ++ [ $_COUNT -lt $_DHCPRETRY ] && sleep 1 ++ done ++ warn "dhcp for interface $netif failed" ++ return 1 + } + + load_ipv6() { +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index 1f77a154..de5273ca 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -486,7 +486,11 @@ parse_ifname_opts() { + wait_for_if_link() { + local cnt=0 + local li +- while [ $cnt -lt 600 ]; do ++ local timeout="$(getargs rd.net.timeout.iflink=)" ++ timeout=${timeout:-60} ++ timeout=$(($timeout*10)) ++ ++ while [ $cnt -lt $timeout ]; do + li=$(ip -o link show dev $1 2>/dev/null) + [ -n "$li" ] && return 0 + sleep 0.1 +@@ -498,7 +502,11 @@ wait_for_if_link() { + wait_for_if_up() { + local cnt=0 + local li +- while [ $cnt -lt 200 ]; do ++ local timeout="$(getargs rd.net.timeout.ifup=)" ++ timeout=${timeout:-20} ++ timeout=$(($timeout*10)) ++ ++ while [ $cnt -lt $timeout ]; do + li=$(ip -o link show up dev $1) + [ -n "$li" ] && [ -z "${li##*state UP*}" ] && return 0 + sleep 0.1 +@@ -509,7 +517,11 @@ wait_for_if_up() { + + wait_for_route_ok() { + local cnt=0 +- while [ $cnt -lt 200 ]; do ++ local timeout="$(getargs rd.net.timeout.route=)" ++ timeout=${timeout:-20} ++ timeout=$(($timeout*10)) ++ ++ while [ $cnt -lt $timeout ]; do + li=$(ip route show) + [ -n "$li" ] && [ -z "${li##*$1*}" ] && return 0 + sleep 0.1 +@@ -521,7 +533,11 @@ wait_for_route_ok() { + wait_for_ipv6_dad() { + local cnt=0 + local li +- while [ $cnt -lt 500 ]; do ++ local timeout="$(getargs rd.net.timeout.ipv6dad=)" ++ timeout=${timeout:-50} ++ timeout=$(($timeout*10)) ++ ++ while [ $cnt -lt $timeout ]; do + li=$(ip -6 addr show dev $1 scope link) + strstr "$li" "tentative" || return 0 + sleep 0.1 +@@ -533,7 +549,11 @@ wait_for_ipv6_dad() { + wait_for_ipv6_auto() { + local cnt=0 + local li +- while [ $cnt -lt 400 ]; do ++ local timeout="$(getargs rd.net.timeout.ipv6auto=)" ++ timeout=${timeout:-40} ++ timeout=$(($timeout*10)) ++ ++ while [ $cnt -lt $timeout ]; do + li=$(ip -6 addr show dev $1) + if ! strstr "$li" "tentative"; then + strstr "$li" "dynamic" && return 0 +@@ -561,8 +581,12 @@ iface_has_link() { + [ -n "$interface" ] || return 2 + interface="/sys/class/net/$interface" + [ -d "$interface" ] || return 2 ++ local timeout="$(getargs rd.net.timeout.carrier=)" ++ timeout=${timeout:-5} ++ timeout=$(($timeout*10)) ++ + linkup "$1" +- while [ $cnt -lt 50 ]; do ++ while [ $cnt -lt $timeout ]; do + [ "$(cat $interface/carrier)" = 1 ] && return 0 + sleep 0.1 + cnt=$(($cnt+1)) diff --git a/SOURCES/0267-fcoe-start-with-fcoemon-instead-of-fipvlan.patch b/SOURCES/0267-fcoe-start-with-fcoemon-instead-of-fipvlan.patch new file mode 100644 index 0000000..57c9c42 --- /dev/null +++ b/SOURCES/0267-fcoe-start-with-fcoemon-instead-of-fipvlan.patch @@ -0,0 +1,126 @@ +From d02f522089863af2a802cef9e63965349bfcc819 Mon Sep 17 00:00:00 2001 +From: Chris Leech <cleech@redhat.com> +Date: Fri, 3 Jul 2015 13:40:12 +0200 +Subject: [PATCH] fcoe: start with fcoemon instead of fipvlan + +--- + modules.d/95fcoe/fcoe-up.sh | 30 ++++++++++++++++++++++++++++-- + modules.d/95fcoe/module-setup.sh | 7 +++++-- + modules.d/95fcoe/parse-fcoe.sh | 4 ++-- + 3 files changed, 35 insertions(+), 6 deletions(-) + +diff --git a/modules.d/95fcoe/fcoe-up.sh b/modules.d/95fcoe/fcoe-up.sh +index edbfcc84..823d7acc 100755 +--- a/modules.d/95fcoe/fcoe-up.sh ++++ b/modules.d/95fcoe/fcoe-up.sh +@@ -20,12 +20,28 @@ type ip_to_var >/dev/null 2>&1 || . /lib/net-lib.sh + + netif=$1 + dcb=$2 ++vlan="yes" + + linkup "$netif" + + netdriver=$(readlink -f /sys/class/net/$netif/device/driver) + netdriver=${netdriver##*/} + ++write_fcoemon_cfg() { ++ echo FCOE_ENABLE=\"yes\" > /etc/fcoe/cfg-$netif ++ if [ "$dcb" = "dcb" ]; then ++ echo DCB_REQUIRED=\"yes\" >> /etc/fcoe/cfg-$netif ++ else ++ echo DCB_REQUIRED=\"no\" >> /etc/fcoe/cfg-$netif ++ fi ++ if [ "$vlan" = "yes" ]; then ++ echo AUTO_VLAN=\"yes\" >> /etc/fcoe/cfg-$netif ++ else ++ echo AUTO_VLAN=\"no\" >> /etc/fcoe/cfg-$netif ++ fi ++ echo MODE=\"fabric\" >> /etc/fcoe/cfg-$netif ++} ++ + if [ "$dcb" = "dcb" ]; then + # Note lldpad will stay running after switchroot, the system initscripts + # are to kill it and start a new lldpad to take over. Data is transfered +@@ -51,6 +67,13 @@ if [ "$dcb" = "dcb" ]; then + i=$(($i+1)) + done + ++ while [ $i -lt 60 ]; do ++ dcbtool sc "$netif" pfc e:1 a:1 w:1 && break ++ info "Retrying to turn dcb on" ++ sleep 1 ++ i=$(($i+1)) ++ done ++ + while [ $i -lt 60 ]; do + dcbtool sc "$netif" app:fcoe e:1 a:1 w:1 && break + info "Retrying to turn fcoe on" +@@ -60,7 +83,8 @@ if [ "$dcb" = "dcb" ]; then + + sleep 1 + +- fipvlan "$netif" -c -s ++ write_fcoemon_cfg ++ fcoemon --syslog + elif [ "$netdriver" = "bnx2x" ]; then + # If driver is bnx2x, do not use /sys/module/fcoe/parameters/create but fipvlan + modprobe 8021q +@@ -69,7 +93,9 @@ elif [ "$netdriver" = "bnx2x" ]; then + sleep 3 + fipvlan "$netif" -c -s + else +- echo -n "$netif" > /sys/module/fcoe/parameters/create ++ vlan="no" ++ write_fcoemon_cfg ++ fcoemon --syslog + fi + + need_shutdown +diff --git a/modules.d/95fcoe/module-setup.sh b/modules.d/95fcoe/module-setup.sh +index 8c6290d4..ec573ea0 100755 +--- a/modules.d/95fcoe/module-setup.sh ++++ b/modules.d/95fcoe/module-setup.sh +@@ -3,7 +3,7 @@ + # ex: ts=8 sw=4 sts=4 et filetype=sh + + check() { +- require_binaries dcbtool fipvlan lldpad ip readlink || return 1 ++ require_binaries dcbtool fipvlan lldpad ip readlink fcoemon fcoeadm || return 1 + return 0 + } + +@@ -17,9 +17,12 @@ installkernel() { + } + + install() { +- inst_multiple ip dcbtool fipvlan lldpad readlink lldptool ++ inst_multiple ip dcbtool fipvlan lldpad readlink lldptool fcoemon fcoeadm ++ inst_libdir_file 'libhbalinux.so*' ++ inst "/etc/hba.conf" "/etc/hba.conf" + + mkdir -m 0755 -p "$initdir/var/lib/lldpad" ++ mkdir -m 0755 -p "$initdir/etc/fcoe" + + inst "$moddir/fcoe-up.sh" "/sbin/fcoe-up" + inst "$moddir/fcoe-edd.sh" "/sbin/fcoe-edd" +diff --git a/modules.d/95fcoe/parse-fcoe.sh b/modules.d/95fcoe/parse-fcoe.sh +index dc40c825..7eca0b6c 100755 +--- a/modules.d/95fcoe/parse-fcoe.sh ++++ b/modules.d/95fcoe/parse-fcoe.sh +@@ -22,13 +22,13 @@ + + + # BRCM: Later, should check whether bnx2x is loaded first before loading bnx2fc so do not load bnx2fc when there are no Broadcom adapters +-[ -e /sys/module/fcoe/parameters/create ] || modprobe -a fcoe || die "FCoE requested but kernel/initrd does not support FCoE" ++[ -e /sys/bus/fcoe/ctlr_create ] || modprobe -a fcoe || die "FCoE requested but kernel/initrd does not support FCoE" + + modprobe bnx2fc >/dev/null 2>&1 + udevadm settle --timeout=30 + + # FCoE actually supported? +-[ -e /sys/module/fcoe/parameters/create ] || modprobe fcoe || die "FCoE requested but kernel/initrd does not support FCoE" ++[ -e /sys/bus/fcoe/ctlr_create ] || modprobe fcoe || die "FCoE requested but kernel/initrd does not support FCoE" + + parse_fcoe_opts() { + local IFS=: diff --git a/SOURCES/0268-fcoe-EDD-parsing-patch-for-i40e.patch b/SOURCES/0268-fcoe-EDD-parsing-patch-for-i40e.patch new file mode 100644 index 0000000..7b19eb0 --- /dev/null +++ b/SOURCES/0268-fcoe-EDD-parsing-patch-for-i40e.patch @@ -0,0 +1,35 @@ +From 4031a2fa642c1db897c1340ad2718301bf873fb3 Mon Sep 17 00:00:00 2001 +From: Chris Leech <cleech@redhat.com> +Date: Fri, 3 Jul 2015 13:44:16 +0200 +Subject: [PATCH] fcoe: EDD parsing patch for i40e + +--- + modules.d/95fcoe/fcoe-edd.sh | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +diff --git a/modules.d/95fcoe/fcoe-edd.sh b/modules.d/95fcoe/fcoe-edd.sh +index 5a81a2e3..d0ea60d5 100755 +--- a/modules.d/95fcoe/fcoe-edd.sh ++++ b/modules.d/95fcoe/fcoe-edd.sh +@@ -11,8 +11,21 @@ fi + + for disk in /sys/firmware/edd/int13_*; do + [ -d $disk ] || continue ++ if [ -e ${disk}/pci_dev/driver ]; then ++ driver=`readlink ${disk}/pci_dev/driver` ++ driver=${driver##*/} ++ fi ++ # i40e uses dev_port 1 for a virtual fcoe function ++ if [ "${driver}" == "i40e" ]; then ++ dev_port=1 ++ fi + for nic in ${disk}/pci_dev/net/*; do + [ -d $nic ] || continue ++ if [ -n "${dev_port}" -a -e ${nic}/dev_port ]; then ++ if [ `cat ${nic}/dev_port` -ne ${dev_port} ]; then ++ continue ++ fi ++ fi + if [ -e ${nic}/address ]; then + fcoe_interface=${nic##*/} + if ! [ -e "/tmp/.fcoe-$fcoe_interface" ]; then diff --git a/SOURCES/0269-fcoe-fcoe-edd.sh-cleanup-the-script.patch b/SOURCES/0269-fcoe-fcoe-edd.sh-cleanup-the-script.patch new file mode 100644 index 0000000..2d2b497 --- /dev/null +++ b/SOURCES/0269-fcoe-fcoe-edd.sh-cleanup-the-script.patch @@ -0,0 +1,86 @@ +From 34203d03c0d43aa0aed12988d2719455e80eae54 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 3 Jul 2015 13:52:32 +0200 +Subject: [PATCH] fcoe/fcoe-edd.sh: cleanup the script + +- check if modprobe was successful +- add a timeout for /sys/firmware/edd +- only remove the module, if it was loaded by the script +--- + modules.d/95fcoe/fcoe-edd.sh | 46 +++++++++++++++++++++++++----------- + 1 file changed, 32 insertions(+), 14 deletions(-) + +diff --git a/modules.d/95fcoe/fcoe-edd.sh b/modules.d/95fcoe/fcoe-edd.sh +index d0ea60d5..8607b568 100755 +--- a/modules.d/95fcoe/fcoe-edd.sh ++++ b/modules.d/95fcoe/fcoe-edd.sh +@@ -2,37 +2,55 @@ + # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- + # ex: ts=8 sw=4 sts=4 et filetype=sh + +-dcb=$1 ++dcb="$1" + +-if ! [ -d /sys/firmware/edd ]; then +- modprobe edd +- while ! [ -d /sys/firmware/edd ]; do sleep 0.1; done +-fi ++_modprobe_r_edd="0" ++ ++check_edd() { ++ local cnt=0 ++ ++ [ -d /sys/firmware/edd ] && return 0 ++ ++ _modprobe_r_edd="1" ++ modprobe edd || return $? ++ ++ while [ $cnt -lt 600 ]; do ++ [ -d /sys/firmware/edd ] && return 0 ++ cnt=$(($cnt+1)) ++ sleep 0.1 ++ done ++ return 1 ++} ++ ++check_edd || exit 1 + + for disk in /sys/firmware/edd/int13_*; do +- [ -d $disk ] || continue +- if [ -e ${disk}/pci_dev/driver ]; then +- driver=`readlink ${disk}/pci_dev/driver` ++ [ -d "$disk" ] || continue ++ if [ -e "${disk}/pci_dev/driver" ]; then ++ driver=$(readlink "${disk}/pci_dev/driver") + driver=${driver##*/} + fi + # i40e uses dev_port 1 for a virtual fcoe function + if [ "${driver}" == "i40e" ]; then + dev_port=1 + fi +- for nic in ${disk}/pci_dev/net/*; do +- [ -d $nic ] || continue +- if [ -n "${dev_port}" -a -e ${nic}/dev_port ]; then +- if [ `cat ${nic}/dev_port` -ne ${dev_port} ]; then ++ for nic in "${disk}"/pci_dev/net/*; do ++ [ -d "$nic" ] || continue ++ if [ -n "${dev_port}" -a -e "${nic}/dev_port" ]; then ++ if [ "$(cat ${nic}/dev_port)" -ne "${dev_port}" ]; then + continue + fi + fi + if [ -e ${nic}/address ]; then + fcoe_interface=${nic##*/} + if ! [ -e "/tmp/.fcoe-$fcoe_interface" ]; then +- /sbin/fcoe-up $fcoe_interface $dcb ++ /sbin/fcoe-up "$fcoe_interface" "$dcb" + > "/tmp/.fcoe-$fcoe_interface" + fi + fi + done + done +-modprobe -r edd ++ ++[ "$_modprobe_r_edd" = "1" ] && modprobe -r edd ++ ++unset _modprobe_r_edd diff --git a/SOURCES/0270-livenet-don-t-attempt-to-download-the-image-for-ever.patch b/SOURCES/0270-livenet-don-t-attempt-to-download-the-image-for-ever.patch new file mode 100644 index 0000000..8344585 --- /dev/null +++ b/SOURCES/0270-livenet-don-t-attempt-to-download-the-image-for-ever.patch @@ -0,0 +1,37 @@ +From e5f4bbd804e337a7efaf3a0cb4fc3a37b7e33b47 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 3 Jul 2015 14:00:33 +0200 +Subject: [PATCH] livenet: don't attempt to download the image for every + interface + +https://bugzilla.redhat.com/show_bug.cgi?id=1152485 +--- + modules.d/90livenet/livenetroot.sh | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/modules.d/90livenet/livenetroot.sh b/modules.d/90livenet/livenetroot.sh +index 1bbee55b..2e36ee98 100755 +--- a/modules.d/90livenet/livenetroot.sh ++++ b/modules.d/90livenet/livenetroot.sh +@@ -7,12 +7,20 @@ type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh + + PATH=/usr/sbin:/usr/bin:/sbin:/bin + ++[ -e /tmp/livenet.downloaded ] && exit 0 ++ + # args get passed from 40network/netroot + netroot="$2" + liveurl="${netroot#livenet:}" + info "fetching $liveurl" + imgfile=$(fetch_url "$liveurl") +-[ $? = 0 ] || die "failed to download live image: error $?" ++ ++if [ $? = 0 ]; then ++ warn "failed to download live image: error $?" ++ exit 1 ++fi ++ ++> /tmp/livenet.downloaded + + # TODO: couldn't dmsquash-live-root handle this? + if [ ${imgfile##*.} = "iso" ]; then diff --git a/SOURCES/0271-95fcoe-uefi-Test-for-EFI-firmware.patch b/SOURCES/0271-95fcoe-uefi-Test-for-EFI-firmware.patch new file mode 100644 index 0000000..209ae74 --- /dev/null +++ b/SOURCES/0271-95fcoe-uefi-Test-for-EFI-firmware.patch @@ -0,0 +1,32 @@ +From 7b3178d9ad9b571312131bba34fd54460a7b4a25 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke <hare@suse.de> +Date: Mon, 23 Mar 2015 17:12:18 +0100 +Subject: [PATCH] 95fcoe-uefi: Test for EFI firmware + +The fcoe-uefi module should test for EFI firmware when called +in 'hostonly' mode; of no EFI firmware is found then the module +doesn't need to be included. + +References: bnc#882412 + +Signed-off-by: Hannes Reinecke <hare@suse.de> +Signed-off-by: Thomas Renninger <trenn@suse.de> +(cherry picked from commit 6755c208556be7a85c76e731de48a56f56e81c4c) +--- + modules.d/95fcoe-uefi/module-setup.sh | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/modules.d/95fcoe-uefi/module-setup.sh b/modules.d/95fcoe-uefi/module-setup.sh +index 0fb06e23..f5277f48 100755 +--- a/modules.d/95fcoe-uefi/module-setup.sh ++++ b/modules.d/95fcoe-uefi/module-setup.sh +@@ -4,6 +4,9 @@ + + # called by dracut + check() { ++ [[ $hostonly ]] || [[ $mount_needs ]] && { ++ [ -d /sys/firmware/efi ] || return 255 ++ } + require_binaries dcbtool fipvlan lldpad ip readlink || return 1 + return 0 + } diff --git a/SOURCES/0272-base-Don-t-wait-for-swap-devices-in-host-only-mode.patch b/SOURCES/0272-base-Don-t-wait-for-swap-devices-in-host-only-mode.patch new file mode 100644 index 0000000..8e01925 --- /dev/null +++ b/SOURCES/0272-base-Don-t-wait-for-swap-devices-in-host-only-mode.patch @@ -0,0 +1,75 @@ +From 589b4e61e2db2a5835b5aa425268f6f0f67c14e4 Mon Sep 17 00:00:00 2001 +From: Colin Guthrie <colin@mageia.org> +Date: Fri, 15 May 2015 14:53:40 +0100 +Subject: [PATCH] base: Don't wait for swap devices in host-only mode. + +The only reason we add swap devices to host-only mode (added in +dd5875499ece9dbc90e10eafd0073ee15d0c86a4) is to allow us to process +resume= arguments passed on the kernel command line when the swap +partition lives on something slightly more complex than a normal +partion (e.g. in an LVM or RAID setup). + +By adding the device to host_devs, the necessary LVM and RAID hooks +are added and thus the underlying storage will be initialised OK, and +the 95resume module handles the waiting for the device (via udev rules +creating the /dev/resume symlink). + +So ultimately, we do not need to hard-code the waiting for the swap +devices into the initramfs at build time as the waiting part can be +dynamic. + +This makes things more resiliant to swap partitions disappearing and +being reformatted etc. + +Inspired by a patch by Martin Whitaker on Mageia bug: +https://bugs.mageia.org/show_bug.cgi?id=12305 + +(cherry picked from commit 3e3ed34f036a833ccc2150c6224d0a954e841e39) +--- + dracut.sh | 6 ++++-- + modules.d/99base/module-setup.sh | 8 ++++++++ + 2 files changed, 12 insertions(+), 2 deletions(-) + +diff --git a/dracut.sh b/dracut.sh +index a214f810..90ac1fe9 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1056,7 +1056,9 @@ if [[ $hostonly ]]; then + done < /etc/crypttab + fi + +- push host_devs "$(readlink -f "$dev")" ++ _dev="$(readlink -f "$dev")" ++ push host_devs "$_dev" ++ push swap_devs "$_dev" + break + done < /etc/fstab + done < /proc/swaps +@@ -1181,7 +1183,7 @@ export initdir dracutbasedir \ + omit_drivers mdadmconf lvmconf root_dev \ + use_fstab fstab_lines libdirs fscks nofscks ro_mnt \ + stdloglvl sysloglvl fileloglvl kmsgloglvl logfile \ +- debug host_fs_types host_devs sshkey add_fstab \ ++ debug host_fs_types host_devs swap_devs sshkey add_fstab \ + DRACUT_VERSION udevdir prefix filesystems drivers \ + systemdutildir systemdsystemunitdir systemdsystemconfdir \ + host_modalias host_modules hostonly_cmdline loginstall \ +diff --git a/modules.d/99base/module-setup.sh b/modules.d/99base/module-setup.sh +index fddf4b06..d5e78613 100755 +--- a/modules.d/99base/module-setup.sh ++++ b/modules.d/99base/module-setup.sh +@@ -104,6 +104,14 @@ install() { + + for _dev in ${host_devs[@]}; do + [[ "$_dev" == "$root_dev" ]] && continue ++ ++ # We only actually wait for real devs - swap is only needed ++ # for resume and udev rules generated when parsing resume= ++ # argument take care of the waiting for us ++ for _dev2 in ${swap_devs[@]}; do ++ [[ "$_dev" == "$_dev2" ]] && continue 2 ++ done ++ + _pdev=$(get_persistent_dev $_dev) + + case "$_pdev" in diff --git a/SOURCES/0273-dracut-functions.sh-check-if-dinfo-is-a-function.patch b/SOURCES/0273-dracut-functions.sh-check-if-dinfo-is-a-function.patch new file mode 100644 index 0000000..a659280 --- /dev/null +++ b/SOURCES/0273-dracut-functions.sh-check-if-dinfo-is-a-function.patch @@ -0,0 +1,45 @@ +From 900550c4e0c2a48a5d0c01db0adb23e73a6aa195 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Mon, 24 Nov 2014 15:17:45 +0100 +Subject: [PATCH] dracut-functions.sh: check if dinfo is a function + +If "dinfo" is an executable, dracut-logger.sh would never be sourced. + +See: https://bugzilla.redhat.com/show_bug.cgi?id=1167082 +(cherry picked from commit 26d14fb3d36d6091f64258a62c49939478405693) +--- + dracut-functions.sh | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/dracut-functions.sh b/dracut-functions.sh +index 31586ca4..973e2312 100755 +--- a/dracut-functions.sh ++++ b/dracut-functions.sh +@@ -169,7 +169,13 @@ srcmods="/lib/modules/$kernel/" + } + export srcmods + +-if ! type dinfo >/dev/null 2>&1; then ++# is_func <command> ++# Check whether $1 is a function. ++is_func() { ++ [[ "$(type -t "$1")" = "function" ]] ++} ++ ++if ! is_func dinfo >/dev/null 2>&1; then + . "$dracutbasedir/dracut-logger.sh" + dlog_init + fi +@@ -202,12 +208,6 @@ mksubdirs() { + [[ -e ${1%/*} ]] || mkdir -m 0755 -p -- "${1%/*}" + } + +-# is_func <command> +-# Check whether $1 is a function. +-is_func() { +- [[ "$(type -t "$1")" = "function" ]] +-} +- + # Function prints global variables in format name=value line by line. + # $@ = list of global variables' name + print_vars() { diff --git a/SOURCES/0274-dmsquash-live-do-not-abort-if-user-pressed-ESC-on-ch.patch b/SOURCES/0274-dmsquash-live-do-not-abort-if-user-pressed-ESC-on-ch.patch new file mode 100644 index 0000000..9851b39 --- /dev/null +++ b/SOURCES/0274-dmsquash-live-do-not-abort-if-user-pressed-ESC-on-ch.patch @@ -0,0 +1,38 @@ +From 2af6708641bb896f0c117ae49906783cfd46f0a8 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 25 Nov 2014 13:44:54 +0100 +Subject: [PATCH] dmsquash-live: do not abort, if user pressed ESC on + checkisomd5 + +If the user pressed ESC while checkisomd5 runs the media check, it will +exit with "2". Previously that would mean, that the media check was not +successful. + +(cherry picked from commit 370035d561baa6852bcb02161ef736a78b62b336) +--- + modules.d/90dmsquash-live/checkisomd5@.service | 1 + + modules.d/90dmsquash-live/dmsquash-live-root.sh | 2 +- + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/modules.d/90dmsquash-live/checkisomd5@.service b/modules.d/90dmsquash-live/checkisomd5@.service +index 20e40bd7..c4ca10f3 100644 +--- a/modules.d/90dmsquash-live/checkisomd5@.service ++++ b/modules.d/90dmsquash-live/checkisomd5@.service +@@ -11,3 +11,4 @@ StandardInput=tty-force + StandardOutput=inherit + StandardError=inherit + TimeoutSec=0 ++SuccessExitStatus=2 +diff --git a/modules.d/90dmsquash-live/dmsquash-live-root.sh b/modules.d/90dmsquash-live/dmsquash-live-root.sh +index 64abc0be..8d5476cd 100755 +--- a/modules.d/90dmsquash-live/dmsquash-live-root.sh ++++ b/modules.d/90dmsquash-live/dmsquash-live-root.sh +@@ -46,7 +46,7 @@ if [ -n "$check" ]; then + else + checkisomd5 --verbose $livedev + fi +- if [ $? -ne 0 ]; then ++ if [ $? -eq 1 ]; then + die "CD check failed!" + exit 1 + fi diff --git a/SOURCES/0275-Add-rd.live.overlay.size-option.patch b/SOURCES/0275-Add-rd.live.overlay.size-option.patch new file mode 100644 index 0000000..23baa2a --- /dev/null +++ b/SOURCES/0275-Add-rd.live.overlay.size-option.patch @@ -0,0 +1,32 @@ +From ccebb4c045a7cc6c22977c9b23b95108030901ea Mon Sep 17 00:00:00 2001 +From: Radek Vykydal <rvykydal@redhat.com> +Date: Tue, 13 Jan 2015 15:14:10 +0100 +Subject: [PATCH] Add rd.live.overlay.size option + +(cherry picked from commit 18423f7951de7b9cb4007438b58b6067aa6f2e93) +--- + modules.d/90dmsquash-live/dmsquash-live-root.sh | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/modules.d/90dmsquash-live/dmsquash-live-root.sh b/modules.d/90dmsquash-live/dmsquash-live-root.sh +index 8d5476cd..6631d9a8 100755 +--- a/modules.d/90dmsquash-live/dmsquash-live-root.sh ++++ b/modules.d/90dmsquash-live/dmsquash-live-root.sh +@@ -29,6 +29,8 @@ getargbool 0 rd.live.overlay.reset -d -y reset_overlay && reset_overlay="yes" + getargbool 0 rd.live.overlay.readonly -d -y readonly_overlay && readonly_overlay="--readonly" || readonly_overlay="" + overlay=$(getarg rd.live.overlay -d overlay) + getargbool 0 rd.writable.fsimg -d -y writable_fsimg && writable_fsimg="yes" ++overlay_size=$(getarg rd.live.overlay.size=) ++[ -z "$overlay_size" ] && overlay_size=512 + + getargbool 0 rd.live.overlay.thin && thin_snapshot="yes" + +@@ -129,7 +131,7 @@ do_live_overlay() { + sleep 5 + fi + +- dd if=/dev/null of=/overlay bs=1024 count=1 seek=$((512*1024)) 2> /dev/null ++ dd if=/dev/null of=/overlay bs=1024 count=1 seek=$((overlay_size*1024)) 2> /dev/null + if [ -n "$setup" -a -n "$readonly_overlay" ]; then + RO_OVERLAY_LOOPDEV=$( losetup -f ) + losetup $RO_OVERLAY_LOOPDEV /overlay diff --git a/SOURCES/0276-base-dracut-lib.sh-read-proc-cmdline-with-multiple-l.patch b/SOURCES/0276-base-dracut-lib.sh-read-proc-cmdline-with-multiple-l.patch new file mode 100644 index 0000000..e4351fd --- /dev/null +++ b/SOURCES/0276-base-dracut-lib.sh-read-proc-cmdline-with-multiple-l.patch @@ -0,0 +1,43 @@ +From 34b49be88219519f678f665987787784751b11bd Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 19 Mar 2015 12:33:03 +0100 +Subject: [PATCH] base/dracut-lib.sh: read /proc/cmdline with multiple lines + +also parse cmdline files without an ending newline + +(cherry picked from commit 9f0878540bdc8054dc2b45427eed957b9bd25f2d) +--- + modules.d/99base/dracut-lib.sh | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh +index 69f70799..3ffbb021 100755 +--- a/modules.d/99base/dracut-lib.sh ++++ b/modules.d/99base/dracut-lib.sh +@@ -115,6 +115,7 @@ getcmdline() { + local _i + local CMDLINE_ETC_D + local CMDLINE_ETC ++ local CMDLINE_PROC + unset _line + + if [ -e /etc/cmdline ]; then +@@ -124,13 +125,15 @@ getcmdline() { + fi + for _i in /etc/cmdline.d/*.conf; do + [ -e "$_i" ] || continue +- while read -r _line; do ++ while read -r _line || [ -n "$_line" ]; do + CMDLINE_ETC_D="$CMDLINE_ETC_D $_line"; + done <"$_i"; + done + if [ -e /proc/cmdline ]; then +- read -r CMDLINE </proc/cmdline; +- CMDLINE="$CMDLINE_ETC_D $CMDLINE_ETC $CMDLINE" ++ while read -r _line || [ -n "$_line" ]; do ++ CMDLINE_PROC="$CMDLINE_PROC $_line" ++ done </proc/cmdline; ++ CMDLINE="$CMDLINE_ETC_D $CMDLINE_ETC $CMDLINE_PROC" + fi + printf "%s" "$CMDLINE" + } diff --git a/SOURCES/0277-multipath-install-all-multipath-path-selector-kernel.patch b/SOURCES/0277-multipath-install-all-multipath-path-selector-kernel.patch new file mode 100644 index 0000000..a2bb660 --- /dev/null +++ b/SOURCES/0277-multipath-install-all-multipath-path-selector-kernel.patch @@ -0,0 +1,35 @@ +From f11d7a81e2eec37ed5b6708ed8cd359f0a5eaa69 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 3 Jul 2015 14:24:50 +0200 +Subject: [PATCH] multipath: install all multipath path selector kernel modules + +By default, dracut only builds in dm-service-time into the initramfs as +that is the default multipath.conf path selector. If the user changes +the path selector to "round robin" on the fly and runs dracut, multipath +does not find any paths on boot and the user will be dropped into a +shell. + +Apparently, in RHEL7 dracut defaults to "hostonly" mode, i.e. modules +not currently in use at the time dracut runs do not get built into +initramfs. This is definitely one case where this doesn't work. A change +to reconfigure multipath probably should not render the system +unbootable. + +https://bugzilla.redhat.com/show_bug.cgi?id=1195392 +--- + modules.d/90multipath/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/90multipath/module-setup.sh b/modules.d/90multipath/module-setup.sh +index d37f9587..acfc56f8 100755 +--- a/modules.d/90multipath/module-setup.sh ++++ b/modules.d/90multipath/module-setup.sh +@@ -64,7 +64,7 @@ installkernel() { + } + + ( find_kernel_modules_by_path drivers/scsi; if [ "$_arch" = "s390" -o "$_arch" = "s390x" ]; then find_kernel_modules_by_path drivers/s390/scsi; fi; +- find_kernel_modules_by_path drivers/md ) | mp_mod_filter | instmods ++ find_kernel_modules_by_path drivers/md ) | mp_mod_filter | hostonly='' instmods + } + + install() { diff --git a/SOURCES/0278-man-page-changed-grub.conf-to-grub2.cfg.patch b/SOURCES/0278-man-page-changed-grub.conf-to-grub2.cfg.patch new file mode 100644 index 0000000..faeb375 --- /dev/null +++ b/SOURCES/0278-man-page-changed-grub.conf-to-grub2.cfg.patch @@ -0,0 +1,70 @@ +From 77c0b308259d3b91c536de9a49c0b99427c5924e Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 3 Jul 2015 14:28:55 +0200 +Subject: [PATCH] man page: changed grub.conf to grub2.cfg + +--- + dracut.usage.asc | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/dracut.usage.asc b/dracut.usage.asc +index bee9e2e1..15dc2440 100644 +--- a/dracut.usage.asc ++++ b/dracut.usage.asc +@@ -99,7 +99,7 @@ raid with encryption and LVM on top), as long as you specify the correct + filesystem LABEL or UUID on the kernel command line for your root device, dracut + will find it and boot from it. + +-The kernel command line usually can be configured in _/boot/grub/grub.conf_, if ++The kernel command line usually can be configured in _/boot/grub2/grub.cfg_, if + grub is your bootloader and it also can be edited in the real boot process in + the grub menu. + +@@ -325,7 +325,7 @@ stick and mount that. Then you can store the output for later inspection. + In all cases, the following should be mentioned and attached to your bug report: + + * The exact kernel command-line used. Typically from the bootloader +-configuration file (e.g. _/etc/grub.conf_) or from _/proc/cmdline_. ++configuration file (e.g. _/boot/grub2/grub.cfg_) or from _/proc/cmdline_. + * A copy of your disk partition information from _/etc/fstab_, which might be + obtained booting an old working initramfs or a rescue medium. + * Turn on dracut debugging (see _the 'debugging dracut' section_), and attach +@@ -360,7 +360,7 @@ logging during the system boot. This section documents configuring a + serial console connection to record boot messages. + + . First, enable serial console output for both the kernel and the bootloader. +-. Open the file _/etc/grub.conf_ for editing. Below the line ''timeout=5'', add ++. Open the file _/boot/grub2/grub.cfg_ for editing. Below the line ''timeout=5'', add + the following: + + + ---- +@@ -368,14 +368,14 @@ serial --unit=0 --speed=9600 + terminal --timeout=5 serial console + ---- + + +-. Also in _/etc/grub.conf_, add the following boot arguemnts to the ''kernel'' ++. Also in _/boot/grub2/grub.cfg_, add the following boot arguemnts to the ''kernel'' + line: + + + ---- + console=tty0 console=ttyS0,9600 + ---- + + +-. When finished, the _/etc/grub.conf_ file should look similar to the example ++. When finished, the _/boot/grub2/grub.cfg_ file should look similar to the example + below. + + + ---- +@@ -410,10 +410,10 @@ dracut offers a shell for interactive debugging in the event dracut fails to + locate your root filesystem. To enable the shell: + + . Add the boot parameter ''rd.shell'' to your bootloader configuration file +-(e.g. _/etc/grub.conf_) ++(e.g. _/boot/grub2/grub.cfg_) + . Remove the boot arguments ''rhgb'' and ''quiet'' + + +-A sample _/etc/grub.conf_ bootloader configuration file is listed below. ++A sample _/boot/grub2/grub.cfg_ bootloader configuration file is listed below. + + + ---- + default=0 diff --git a/SOURCES/0279-lsinitrd.sh-ignore-cat-write-error-Broken-pipe.patch b/SOURCES/0279-lsinitrd.sh-ignore-cat-write-error-Broken-pipe.patch new file mode 100644 index 0000000..89d413f --- /dev/null +++ b/SOURCES/0279-lsinitrd.sh-ignore-cat-write-error-Broken-pipe.patch @@ -0,0 +1,61 @@ +From 3cf4ec08e51c6b6c6d21d4b1cf67b98bb7878558 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 3 Jul 2015 14:35:25 +0200 +Subject: [PATCH] lsinitrd.sh: ignore "cat: write error: Broken pipe" + +--- + lsinitrd.sh | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/lsinitrd.sh b/lsinitrd.sh +index b086a635..88fe9834 100755 +--- a/lsinitrd.sh ++++ b/lsinitrd.sh +@@ -116,7 +116,7 @@ extract_files() + for f in ${!filenames[@]}; do + [[ $nofileinfo ]] || echo "initramfs:/$f" + [[ $nofileinfo ]] || echo "========================================================================" +- $CAT $image | cpio --extract --verbose --quiet --to-stdout $f 2>/dev/null ++ $CAT $image 2>/dev/null | cpio --extract --verbose --quiet --to-stdout $f 2>/dev/null + ((ret+=$?)) + [[ $nofileinfo ]] || echo "========================================================================" + [[ $nofileinfo ]] || echo +@@ -126,7 +126,7 @@ extract_files() + list_modules() + { + echo "dracut modules:" +- $CAT "$image" | cpio --extract --verbose --quiet --to-stdout -- 'lib/dracut/modules.txt' 'usr/lib/dracut/modules.txt' 2>/dev/null ++ $CAT "$image" 2>/dev/null | cpio --extract --verbose --quiet --to-stdout -- 'lib/dracut/modules.txt' 'usr/lib/dracut/modules.txt' 2>/dev/null + ((ret+=$?)) + } + +@@ -134,9 +134,9 @@ list_files() + { + echo "========================================================================" + if [ "$sorted" -eq 1 ]; then +- $CAT "$image" | cpio --extract --verbose --quiet --list | sort -n -k5 ++ $CAT "$image" 2>/dev/null | cpio --extract --verbose --quiet --list | sort -n -k5 + else +- $CAT "$image" | cpio --extract --verbose --quiet --list | sort -k9 ++ $CAT "$image" 2>/dev/null | cpio --extract --verbose --quiet --list | sort -k9 + fi + ((ret+=$?)) + echo "========================================================================" +@@ -220,7 +220,7 @@ ret=0 + if (( ${#filenames[@]} > 0 )); then + extract_files + else +- version=$($CAT "$image" | cpio --extract --verbose --quiet --to-stdout -- 'lib/dracut/dracut-*' 'usr/lib/dracut/dracut-*' 2>/dev/null) ++ version=$($CAT "$image" 2>/dev/null | cpio --extract --verbose --quiet --to-stdout -- 'lib/dracut/dracut-*' 'usr/lib/dracut/dracut-*' 2>/dev/null) + ((ret+=$?)) + echo "Version: $version" + echo +@@ -229,7 +229,7 @@ else + echo "========================================================================" + else + echo -n "Arguments: " +- $CAT "$image" | cpio --extract --verbose --quiet --to-stdout -- 'lib/dracut/build-parameter.txt' 'usr/lib/dracut/build-parameter.txt' 2>/dev/null ++ $CAT "$image" 2>/dev/null | cpio --extract --verbose --quiet --to-stdout -- 'lib/dracut/build-parameter.txt' 'usr/lib/dracut/build-parameter.txt' 2>/dev/null + echo + list_modules + list_files diff --git a/SOURCES/0280-network-setup-gateway-after-setting-up-resolv.conf.patch b/SOURCES/0280-network-setup-gateway-after-setting-up-resolv.conf.patch new file mode 100644 index 0000000..c7f1f63 --- /dev/null +++ b/SOURCES/0280-network-setup-gateway-after-setting-up-resolv.conf.patch @@ -0,0 +1,32 @@ +From 968c66b609f1e894d7522d622ddc95d14d49d66d Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 28 May 2015 19:44:55 +0200 +Subject: [PATCH] network: setup gateway after setting up resolv.conf + +If a daemon listens for route changes and wants to use the interface +afterwards, it should be able to resolve DNS + +(cherry picked from commit 0b7bfacfeaf86c4001dc2ea46cecdc65c9cdfff1) +--- + modules.d/40network/net-lib.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index de5273ca..cfc06feb 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -96,13 +96,13 @@ setup_net() { + [ -e "/tmp/net.ifaces" ] && read IFACES < /tmp/net.ifaces + [ -z "$IFACES" ] && IFACES="$netif" + # run the scripts written by ifup +- [ -e /tmp/net.$netif.gw ] && . /tmp/net.$netif.gw + [ -e /tmp/net.$netif.hostname ] && . /tmp/net.$netif.hostname + [ -e /tmp/net.$netif.override ] && . /tmp/net.$netif.override + [ -e /tmp/dhclient.$netif.dhcpopts ] && . /tmp/dhclient.$netif.dhcpopts + # set up resolv.conf + [ -e /tmp/net.$netif.resolv.conf ] && \ + cp -f /tmp/net.$netif.resolv.conf /etc/resolv.conf ++ [ -e /tmp/net.$netif.gw ] && . /tmp/net.$netif.gw + + # add static route + for _p in $(getargs rd.route); do diff --git a/SOURCES/0281-Add-support-for-ethernet-point-to-point-connections-.patch b/SOURCES/0281-Add-support-for-ethernet-point-to-point-connections-.patch new file mode 100644 index 0000000..787114e --- /dev/null +++ b/SOURCES/0281-Add-support-for-ethernet-point-to-point-connections-.patch @@ -0,0 +1,46 @@ +From 28be8992c3c1facfd80dfcc6afad951f33098783 Mon Sep 17 00:00:00 2001 +From: Gerd von Egidy <gerd.von.egidy@intra2net.com> +Date: Thu, 5 Mar 2015 12:07:57 +0100 +Subject: [PATCH] Add support for ethernet point-to-point connections + configured via DHCP + +When current dracut receives an ip with netmask of 255.255.255.255 via DHCP, +setting the also supplied default gateway fails (because it is obviously not +within the netmask). + +The setup with a netmask of /32 is quite common in colocation datacenters +where you don't want the machines of two different customers to directly talk +to each other. At least two of the biggest colocation providers in Germany +(1&1 and Strato) do it that way. NetworkManager supports this kind of setup +and the dhclient-scripts of several distributions too. + +In this patch I have implemented a simple approach very similar to what is +found in Debian. The dhclient-script from Fedora uses a more sophisticated +approach, but that relies on the ipcalc utility which would introduce a +dependency on Fedora-initscripts for dracut. + +Signed-off-by: Gerd von Egidy <gerd.von.egidy@intra2net.com> +(cherry picked from commit 99ccbc30dff9fa51dd3187dc10f8f632e5e54e4b) +--- + modules.d/40network/dhclient-script.sh | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/modules.d/40network/dhclient-script.sh b/modules.d/40network/dhclient-script.sh +index 7972af99..12e2869f 100755 +--- a/modules.d/40network/dhclient-script.sh ++++ b/modules.d/40network/dhclient-script.sh +@@ -49,7 +49,13 @@ setup_interface() { + ${lease_time:+valid_lft $lease_time} \ + ${preferred_lft:+preferred_lft ${preferred_lft}} + +- [ -n "$gw" ] && echo ip route replace default via $gw dev $netif > /tmp/net.$netif.gw ++ if [ -n "$gw" ] ; then ++ if [ "$mask" == "255.255.255.255" ] ; then ++ # point-to-point connection => set explicit route to gateway ++ echo ip route add $gw dev $netif > /tmp/net.$netif.gw ++ fi ++ echo ip route replace default via $gw dev $netif >> /tmp/net.$netif.gw ++ fi + + [ -n "${search}${domain}" ] && echo "search $search $domain" > /tmp/net.$netif.resolv.conf + if [ -n "$namesrv" ] ; then diff --git a/SOURCES/0282-lvm-add-cache-tools-for-dm-cache-usage.patch b/SOURCES/0282-lvm-add-cache-tools-for-dm-cache-usage.patch new file mode 100644 index 0000000..cf78d7f --- /dev/null +++ b/SOURCES/0282-lvm-add-cache-tools-for-dm-cache-usage.patch @@ -0,0 +1,40 @@ +From 77ffc465b9c5615040b427dfdf35a3487ef9943c Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 28 Jan 2015 13:25:09 +0000 +Subject: [PATCH] lvm: add cache tools for dm-cache usage + +(cherry picked from commit 70598ac292bce6e554cf0dc327426a7dbf92c65f) +--- + modules.d/90lvm/module-setup.sh | 19 +++++++++++++------ + 1 file changed, 13 insertions(+), 6 deletions(-) + +diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh +index 5ec62812..90bc39f7 100755 +--- a/modules.d/90lvm/module-setup.sh ++++ b/modules.d/90lvm/module-setup.sh +@@ -107,12 +107,19 @@ install() { + dev=$(</sys/block/${dev#/dev/}/dm/name) + eval $(dmsetup splitname --nameprefixes --noheadings --rows "$dev" 2>/dev/null) + [[ ${DM_VG_NAME} ]] && [[ ${DM_LV_NAME} ]] || continue +- if [[ "$(lvs --noheadings -o segtype ${DM_VG_NAME} 2>/dev/null)" == *thin* ]] ; then +- inst_multiple -o thin_dump thin_restore thin_check thin_repair +- break +- fi ++ case "$(lvs --noheadings -o segtype ${DM_VG_NAME} 2>/dev/null)" in ++ *thin*|*cache*|*era*) ++ inst_multiple -o thin_dump thin_restore thin_check thin_repair \ ++ cache_dump cache_restore cache_check cache_repair \ ++ era_check era_dump era_invalidate era_restore ++ break;; ++ esac + done +- else +- inst_multiple -o thin_dump thin_restore thin_check thin_repair ++ fi ++ ++ if ! [[ $hostonly ]]; then ++ inst_multiple -o thin_dump thin_restore thin_check thin_repair \ ++ cache_dump cache_restore cache_check cache_repair \ ++ era_check era_dump era_invalidate era_restore + fi + } diff --git a/SOURCES/0283-crypt-install-drbg-unconditionally-in-hostonly-mode.patch b/SOURCES/0283-crypt-install-drbg-unconditionally-in-hostonly-mode.patch new file mode 100644 index 0000000..b3d257b --- /dev/null +++ b/SOURCES/0283-crypt-install-drbg-unconditionally-in-hostonly-mode.patch @@ -0,0 +1,24 @@ +From 89948e58fd0f80def0912c18c503912873aa9c48 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 9 Jul 2015 16:14:50 +0200 +Subject: [PATCH] crypt: install drbg unconditionally in hostonly mode + +older kernels had the drbg kernel module and didn't need it +--- + modules.d/90crypt/module-setup.sh | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/modules.d/90crypt/module-setup.sh b/modules.d/90crypt/module-setup.sh +index dbc87a43..bd37d9a5 100755 +--- a/modules.d/90crypt/module-setup.sh ++++ b/modules.d/90crypt/module-setup.sh +@@ -23,7 +23,8 @@ depends() { + } + + installkernel() { +- instmods dm_crypt =crypto drbg ++ instmods dm_crypt =crypto ++ hostonly="" instmods drbg + } + + cmdline() { diff --git a/SOURCES/0284-dracut-functions.sh-degrade-info-about-missing-binar.patch b/SOURCES/0284-dracut-functions.sh-degrade-info-about-missing-binar.patch new file mode 100644 index 0000000..79a8a94 --- /dev/null +++ b/SOURCES/0284-dracut-functions.sh-degrade-info-about-missing-binar.patch @@ -0,0 +1,33 @@ +From a6470f332f1b522f8d1c159a9c15b520d35ef6d4 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 5 Mar 2014 12:23:49 +0100 +Subject: [PATCH] dracut-functions.sh: degrade info about missing binaries to + info + +(cherry picked from commit 83a3cba777efb71be6c368a65e2ed5794395168e) +--- + dracut-functions.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/dracut-functions.sh b/dracut-functions.sh +index 973e2312..65ccebe5 100755 +--- a/dracut-functions.sh ++++ b/dracut-functions.sh +@@ -44,7 +44,7 @@ require_binaries() { + + for cmd in "$@"; do + if ! find_binary "$cmd" &>/dev/null; then +- dwarning "$_module_name: Could not find command '$cmd'!" ++ dinfo "$_module_name: Could not find command '$cmd'!" + ((_ret++)) + fi + done +@@ -68,7 +68,7 @@ require_any_binary() { + done + + if (( $_ret != 0 )); then +- dwarning "$_module_name: Could not find any command of '$@'!" ++ dinfo "$_module_name: Could not find any command of '$@'!" + return 1 + fi + diff --git a/SOURCES/0285-dracut-functions.sh-require_binaries-clarify-message.patch b/SOURCES/0285-dracut-functions.sh-require_binaries-clarify-message.patch new file mode 100644 index 0000000..77beaae --- /dev/null +++ b/SOURCES/0285-dracut-functions.sh-require_binaries-clarify-message.patch @@ -0,0 +1,29 @@ +From 1db0d1f78ba67e61ca3fafbec44f8bc79c75eb94 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 20 May 2014 13:23:43 +0200 +Subject: [PATCH] dracut-functions.sh:require_binaries() clarify message + +The info message written by require_binaries() was a bit frighten to +users. So just be a little bit more verbose. + +If you have ideas on how to improve the message for these "soft" +dependency modules, please submit patches. + +(cherry picked from commit 0fa5dbedc5b222435f51f7460a81232ee120c4e1) +--- + dracut-functions.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dracut-functions.sh b/dracut-functions.sh +index 65ccebe5..585b6836 100755 +--- a/dracut-functions.sh ++++ b/dracut-functions.sh +@@ -44,7 +44,7 @@ require_binaries() { + + for cmd in "$@"; do + if ! find_binary "$cmd" &>/dev/null; then +- dinfo "$_module_name: Could not find command '$cmd'!" ++ dinfo "dracut module '${_module_name#[0-9][0-9]}' will not be installed, because command '$cmd' could not be found!" + ((_ret++)) + fi + done diff --git a/SOURCES/0286-dracut-systemd-dracut-initqueue.sh-be-verbose-about-.patch b/SOURCES/0286-dracut-systemd-dracut-initqueue.sh-be-verbose-about-.patch new file mode 100644 index 0000000..64dcafc --- /dev/null +++ b/SOURCES/0286-dracut-systemd-dracut-initqueue.sh-be-verbose-about-.patch @@ -0,0 +1,24 @@ +From c643f4e8abb4ea65b219414b23555772160ab41e Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 12 Aug 2015 14:27:39 +0200 +Subject: [PATCH] dracut-systemd/dracut-initqueue.sh: be verbose about timeout + +Issue a warning, if timeout scripts are executed + +(cherry picked from commit 8ba684be1c04976204d2b671ab90cb27791f467b) +--- + modules.d/98systemd/dracut-initqueue.sh | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/modules.d/98systemd/dracut-initqueue.sh b/modules.d/98systemd/dracut-initqueue.sh +index 37bc18f1..5822556b 100755 +--- a/modules.d/98systemd/dracut-initqueue.sh ++++ b/modules.d/98systemd/dracut-initqueue.sh +@@ -57,6 +57,7 @@ while :; do + done + + if [ $main_loop -gt $((2*$RDRETRY/3)) ]; then ++ warn "dracut-initqueue timeout - starting timeout scripts" + for job in $hookdir/initqueue/timeout/*.sh; do + [ -e "$job" ] || break + job=$job . $job diff --git a/SOURCES/0287-nfs-parse-nfsroot.sh-silence-useless-warning-if-netr.patch b/SOURCES/0287-nfs-parse-nfsroot.sh-silence-useless-warning-if-netr.patch new file mode 100644 index 0000000..5de8170 --- /dev/null +++ b/SOURCES/0287-nfs-parse-nfsroot.sh-silence-useless-warning-if-netr.patch @@ -0,0 +1,24 @@ +From 2bb564073b2a4953572b8162b220e8fa2b7eeb4d Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 12 Aug 2015 14:27:01 +0200 +Subject: [PATCH] nfs/parse-nfsroot.sh: silence useless warning if netroot is + not nfs + +(cherry picked from commit 50e86bf02be003f3de6214f8012e62edde0085fc) +--- + modules.d/95nfs/parse-nfsroot.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/95nfs/parse-nfsroot.sh b/modules.d/95nfs/parse-nfsroot.sh +index a84cd436..865e62b8 100755 +--- a/modules.d/95nfs/parse-nfsroot.sh ++++ b/modules.d/95nfs/parse-nfsroot.sh +@@ -40,7 +40,7 @@ if [ -n "$netroot" ] ; then + [ "$n" = "$netroot" ] && break + done + if [ "$n" = "$netroot" ]; then +- warn "Ignoring netroot argument for NFS" ++ #warn "Ignoring netroot argument for NFS" + netroot=$root + fi + else diff --git a/SOURCES/0288-network-parse-ip-opts.sh-assume-rd.neednet-for-multi.patch b/SOURCES/0288-network-parse-ip-opts.sh-assume-rd.neednet-for-multi.patch new file mode 100644 index 0000000..465fc45 --- /dev/null +++ b/SOURCES/0288-network-parse-ip-opts.sh-assume-rd.neednet-for-multi.patch @@ -0,0 +1,39 @@ +From 53ecce179b2a5b01ba9d62527200712bba2b2032 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 12 Aug 2015 14:25:23 +0200 +Subject: [PATCH] network/parse-ip-opts.sh: assume rd.neednet for multiple ip + options + +set rd.neednet on the kernel cmdline to disable this behaviour + +(cherry picked from commit 4e9ba952bfa607ac47bfe3cf4943ae3386da22bc) +--- + modules.d/40network/parse-ip-opts.sh | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/modules.d/40network/parse-ip-opts.sh b/modules.d/40network/parse-ip-opts.sh +index 5b96e069..faee8f99 100755 +--- a/modules.d/40network/parse-ip-opts.sh ++++ b/modules.d/40network/parse-ip-opts.sh +@@ -38,8 +38,10 @@ unset count + # If needed, check if bootdev= contains anything usable + BOOTDEV=$(getarg bootdev=) + +-if [ -n "$NEEDBOOTDEV" ] ; then +- [ -z "$BOOTDEV" ] && warn "Please supply bootdev argument for multiple ip= lines" ++if [ -n "$NEEDBOOTDEV" ] && getargbool 1 rd.neednet; then ++ #[ -z "$BOOTDEV" ] && warn "Please supply bootdev argument for multiple ip= lines" ++ echo "rd.neednet=1" > /etc/cmdline.d/dracut-neednet.conf ++ info "Multiple ip= arguments: assuming rd.neednet=1" + fi + + # Check ip= lines +@@ -50,7 +52,7 @@ for p in $(getargs ip=); do + # make first device specified the BOOTDEV + if [ -z "$BOOTDEV" ] && [ -n "$dev" ]; then + BOOTDEV="$dev" +- [ -n "$NEEDBOOTDEV" ] && warn "Setting bootdev to '$BOOTDEV'" ++ [ -n "$NEEDBOOTDEV" ] && info "Setting bootdev to '$BOOTDEV'" + fi + + # skip ibft since we did it above diff --git a/SOURCES/0289-systemd-add-systemd-run-and-systemd-escape.patch b/SOURCES/0289-systemd-add-systemd-run-and-systemd-escape.patch new file mode 100644 index 0000000..499cb55 --- /dev/null +++ b/SOURCES/0289-systemd-add-systemd-run-and-systemd-escape.patch @@ -0,0 +1,21 @@ +From fc0ead21c9cc4aaf569f61dda998d81cab2a18c9 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 13 Aug 2015 15:24:53 +0200 +Subject: [PATCH] systemd: add systemd-run and systemd-escape + +--- + modules.d/98systemd/module-setup.sh | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh +index d0271f15..a656fe0f 100755 +--- a/modules.d/98systemd/module-setup.sh ++++ b/modules.d/98systemd/module-setup.sh +@@ -123,6 +123,7 @@ install() { + \ + $tmpfilesdir/systemd.conf \ + \ ++ systemd-run systemd-escape \ + journalctl systemctl echo swapoff systemd-cgls systemd-tmpfiles + + inst_multiple -o \ diff --git a/SOURCES/0290-network-net-lib.sh-add-is_ip.patch b/SOURCES/0290-network-net-lib.sh-add-is_ip.patch new file mode 100644 index 0000000..6b8b5a1 --- /dev/null +++ b/SOURCES/0290-network-net-lib.sh-add-is_ip.patch @@ -0,0 +1,35 @@ +From d5447330844a1f16d927d42cd1d96c5425133aad Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 12 Aug 2015 14:24:05 +0200 +Subject: [PATCH] network/net-lib.sh: add is_ip() + +add function to test if string is a valid IP + +(cherry picked from commit 01b23b6900eabefbfd1f589b9f12c8ff38c5afc0) +--- + modules.d/40network/net-lib.sh | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index cfc06feb..44c1bf04 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -2,6 +2,18 @@ + # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- + # ex: ts=8 sw=4 sts=4 et filetype=sh + ++is_ip() { ++ echo "$1" | { ++ IFS=. read a b c d ++ test "$a" -ge 0 -a "$a" -le 255 \ ++ -a "$b" -ge 0 -a "$b" -le 255 \ ++ -a "$c" -ge 0 -a "$c" -le 255 \ ++ -a "$d" -ge 0 -a "$d" -le 255 \ ++ 2> /dev/null ++ } && return 0 ++ return 1 ++} ++ + get_ip() { + local iface="$1" ip="" + ip=$(ip -o -f inet addr show $iface) diff --git a/SOURCES/0291-iscsi-integrate-with-systemd-and-improve-robustness.patch b/SOURCES/0291-iscsi-integrate-with-systemd-and-improve-robustness.patch new file mode 100644 index 0000000..7eb272c --- /dev/null +++ b/SOURCES/0291-iscsi-integrate-with-systemd-and-improve-robustness.patch @@ -0,0 +1,312 @@ +From e25c3dbb6f91ed999399c981f00ab1dd1b30d6f1 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 12 Aug 2015 14:33:49 +0200 +Subject: [PATCH] iscsi: integrate with systemd and improve robustness + +parse-cmdline sets up an initial initiator-name to let iscsid start. + +iscsid is started before doing any iscsistart business. + +iscsistart is done with systemd-run asynchrone to do things in +paralllel. Also restarted for every new interface which shows up. + +If rd.iscsi.waitnet (default) is set, iscsistart is done only +after all interfaces are up. + +If not all interfaces are up and rd.iscsi.testroute (default) is set, +the route to a iscsi target IP is checked and skipped, if there is none. + +If all things fail, we issue a "dummy" interface iscsiroot to retry +everything in the initqueue/timeout. + +(cherry picked from commit d94050ddaea8343d8adb8f151c8f4cad591d29d9) +--- + modules.d/95iscsi/cleanup-iscsi.sh | 2 +- + modules.d/95iscsi/iscsiroot.sh | 116 +++++++++++++++++++-------- + modules.d/95iscsi/module-setup.sh | 31 +++++++ + modules.d/95iscsi/parse-iscsiroot.sh | 27 +++++-- + 4 files changed, 134 insertions(+), 42 deletions(-) + +diff --git a/modules.d/95iscsi/cleanup-iscsi.sh b/modules.d/95iscsi/cleanup-iscsi.sh +index a2d5951f..88a63e00 100755 +--- a/modules.d/95iscsi/cleanup-iscsi.sh ++++ b/modules.d/95iscsi/cleanup-iscsi.sh +@@ -2,5 +2,5 @@ + # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- + # ex: ts=8 sw=4 sts=4 et filetype=sh + +-[ -e /sys/module/bnx2i ] && killproc iscsiuio ++[ -z "${DRACUT_SYSTEMD}" ] && [ -e /sys/module/bnx2i ] && killproc iscsiuio + +diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh +index 1de6fb75..68da9dd0 100755 +--- a/modules.d/95iscsi/iscsiroot.sh ++++ b/modules.d/95iscsi/iscsiroot.sh +@@ -38,7 +38,7 @@ iroot=${iroot#:} + # figured out a way how to check whether this is built-in or not + modprobe crc32c 2>/dev/null + +-if [ -e /sys/module/bnx2i ] && ! [ -e /tmp/iscsiuio-started ]; then ++if [ -z "${DRACUT_SYSTEMD}" ] && [ -e /sys/module/bnx2i ] && ! [ -e /tmp/iscsiuio-started ]; then + iscsiuio + > /tmp/iscsiuio-started + fi +@@ -107,28 +107,47 @@ handle_netroot() + + parse_iscsi_root "$1" || return 1 + ++ # Bail out early, if there is no route to the destination ++ if is_ip "$iscsi_target_ip" && [ "$netif" != "dummy" ] && ! all_ifaces_up && getargbool 1 rd.iscsi.testroute; then ++ ip route get "$iscsi_target_ip" >/dev/null 2>&1 || return 0 ++ fi ++ + # XXX is this needed? + getarg ro && iscsirw=ro + getarg rw && iscsirw=rw + fsopts=${fsopts:+$fsopts,}${iscsirw} + ++ if [ -z $iscsi_initiator ] && [ -f /sys/firmware/ibft/initiator/initiator-name ] && ! [ -f /tmp/iscsi_set_initiator ]; then ++ iscsi_initiator=$(while read line || [ -n "$line" ]; do echo $line;done < /sys/firmware/ibft/initiator/initiator-name) ++ echo "InitiatorName=$iscsi_initiator" > /run/initiatorname.iscsi ++ rm -f /etc/iscsi/initiatorname.iscsi ++ mkdir -p /etc/iscsi ++ ln -fs /run/initiatorname.iscsi /etc/iscsi/initiatorname.iscsi ++ systemctl restart iscsid ++ sleep 1 ++ > /tmp/iscsi_set_initiator ++ fi ++ + if [ -z $iscsi_initiator ]; then +- # XXX Where are these from? ++ [ -f /run/initiatorname.iscsi ] && . /run/initiatorname.iscsi + [ -f /etc/initiatorname.iscsi ] && . /etc/initiatorname.iscsi + [ -f /etc/iscsi/initiatorname.iscsi ] && . /etc/iscsi/initiatorname.iscsi + iscsi_initiator=$InitiatorName +- +- # XXX rfc3720 says 'SCSI Initiator Name: The iSCSI Initiator Name specifies +- # the worldwide unique name of the initiator.' Could we use hostname/ip +- # if missing? + fi + + if [ -z $iscsi_initiator ]; then +- if [ -f /sys/firmware/ibft/initiator/initiator-name ]; then +- iscsi_initiator=$(while read line; do echo $line;done < /sys/firmware/ibft/initiator/initiator-name) +- fi ++ iscsi_initiator=$(iscsi-iname) ++ echo "InitiatorName=$iscsi_initiator" > /run/initiatorname.iscsi ++ rm -f /etc/iscsi/initiatorname.iscsi ++ mkdir -p /etc/iscsi ++ ln -fs /run/initiatorname.iscsi /etc/iscsi/initiatorname.iscsi ++ systemctl restart iscsid ++ > /tmp/iscsi_set_initiator ++ # FIXME: iscsid is not yet ready, when the service is :-/ ++ sleep 1 + fi + ++ + if [ -z $iscsi_target_port ]; then + iscsi_target_port=3260 + fi +@@ -137,23 +156,21 @@ handle_netroot() + iscsi_target_group=1 + fi + +- if [ -z $iscsi_initiator ]; then +- # XXX is this correct? +- iscsi_initiator=$(iscsi-iname) +- fi +- + if [ -z $iscsi_lun ]; then + iscsi_lun=0 + fi + +- echo "InitiatorName='$iscsi_initiator'" > /run/initiatorname.iscsi ++ echo "InitiatorName=$iscsi_initiator" > /run/initiatorname.iscsi + ln -fs /run/initiatorname.iscsi /dev/.initiatorname.iscsi +- ++ if ! [ -e /etc/iscsi/initiatorname.iscsi ]; then ++ mkdir -p /etc/iscsi ++ ln -fs /run/initiatorname.iscsi /etc/iscsi/initiatorname.iscsi ++ fi + # FIXME $iscsi_protocol?? + +- if [ "$root" = "dhcp" ]; then ++ if [ "$root" = "dhcp" ] || [ "$netroot" = "dhcp" ]; then + # if root is not specified try to mount the whole iSCSI LUN +- printf 'SYMLINK=="disk/by-path/*-iscsi-*-%s", SYMLINK+="root"\n' $iscsi_lun >> /etc/udev/rules.d/99-iscsi-root.rules ++ printf 'SYMLINK=="disk/by-path/*-iscsi-*-%s", SYMLINK+="root"\n' "$iscsi_lun" >> /etc/udev/rules.d/99-iscsi-root.rules + udevadm control --reload + write_fs_tab /dev/root + wait_for_dev -n /dev/root +@@ -163,29 +180,58 @@ handle_netroot() + echo "iscsi_lun=$iscsi_lun . /bin/mount-lun.sh " > $hookdir/mount/01-$$-iscsi.sh + fi + +- # force udevsettle to break +- > $hookdir/initqueue/work +- +- iscsistart -i $iscsi_initiator -t $iscsi_target_name \ +- -g $iscsi_target_group -a $iscsi_target_ip \ +- -p $iscsi_target_port \ +- ${iscsi_username:+-u $iscsi_username} \ +- ${iscsi_password:+-w $iscsi_password} \ +- ${iscsi_in_username:+-U $iscsi_in_username} \ +- ${iscsi_in_password:+-W $iscsi_in_password} \ +- ${iscsi_iface_name:+--param iface.iscsi_ifacename=$iscsi_iface_name} \ +- ${iscsi_netdev_name:+--param iface.net_ifacename=$iscsi_netdev_name} \ +- ${iscsi_param} \ +- || : +- ++ if [ -n "$DRACUT_SYSTEMD" ] && command -v systemd-run >/dev/null 2>&1; then ++ netroot_enc=$(systemd-escape "iscsistart_${1}") ++ status=$(systemctl is-active "$netroot_enc" 2>/dev/null) ++ is_active=$? ++ if [ $is_active -ne 0 ]; then ++ if [ "$status" != "activating" ] && ! systemctl is-failed "$netroot_enc" >/dev/null 2>&1; then ++ systemd-run --no-block --service-type=oneshot --remain-after-exit --quiet \ ++ --description="Login iSCSI Target $iscsi_target_name" \ ++ --unit="$netroot_enc" -- \ ++ $(command -v iscsistart) \ ++ -i $iscsi_initiator -t $iscsi_target_name \ ++ -g $iscsi_target_group -a $iscsi_target_ip \ ++ -p $iscsi_target_port \ ++ ${iscsi_username:+-u $iscsi_username} \ ++ ${iscsi_password:+-w $iscsi_password} \ ++ ${iscsi_in_username:+-U $iscsi_in_username} \ ++ ${iscsi_in_password:+-W $iscsi_in_password} \ ++ ${iscsi_iface_name:+--param iface.iscsi_ifacename=$iscsi_iface_name} \ ++ ${iscsi_netdev_name:+--param iface.net_ifacename=$iscsi_netdev_name} \ ++ ${iscsi_param} >/dev/null 2>&1 ++ else ++ systemctl --no-block restart "$netroot_enc" >/dev/null 2>&1 ++ fi ++ fi ++ else ++ > $hookdir/initqueue/work ++ iscsistart -i $iscsi_initiator -t $iscsi_target_name \ ++ -g $iscsi_target_group -a $iscsi_target_ip \ ++ -p $iscsi_target_port \ ++ ${iscsi_username:+-u $iscsi_username} \ ++ ${iscsi_password:+-w $iscsi_password} \ ++ ${iscsi_in_username:+-U $iscsi_in_username} \ ++ ${iscsi_in_password:+-W $iscsi_in_password} \ ++ ${iscsi_iface_name:+--param iface.iscsi_ifacename=$iscsi_iface_name} \ ++ ${iscsi_netdev_name:+--param iface.net_ifacename=$iscsi_netdev_name} \ ++ ${iscsi_param} \ ++ || : ++ fi + netroot_enc=$(str_replace "$1" '/' '\2f') + echo 'started' > "/tmp/iscsistarted-iscsi:${netroot_enc}" ++ return 0 + } + + ret=0 + ++if [ "$netif" != "dummy" ] && getargbool 1 rd.iscsi.waitnet; then ++ all_ifaces_up || exit 0 ++fi ++ + # loop over all netroot parameter +-if getarg netroot; then ++netroot=$(getarg netroot) ++if [ $? -eq 0 ] && [ "$netroot" != "dhcp" ]; then + for nroot in $(getargs netroot); do + [ "${nroot%%:*}" = "iscsi" ] || continue + nroot="${nroot##iscsi:}" +@@ -212,6 +258,6 @@ fi + + need_shutdown + +-# now we have a root filesystem somewhere in /dev/sda* ++# now we have a root filesystem somewhere in /dev/sd* + # let the normal block handler handle root= + exit $ret +diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh +index 49f9a0ed..d12eb7d8 100755 +--- a/modules.d/95iscsi/module-setup.sh ++++ b/modules.d/95iscsi/module-setup.sh +@@ -83,6 +83,37 @@ install() { + inst "$moddir/iscsiroot.sh" "/sbin/iscsiroot" + if ! dracut_module_included "systemd"; then + inst "$moddir/mount-lun.sh" "/bin/mount-lun.sh" ++ else ++ inst_multiple -o \ ++ $systemdsystemunitdir/iscsi.service \ ++ $systemdsystemunitdir/iscsid.service \ ++ $systemdsystemunitdir/iscsid.socket \ ++ $systemdsystemunitdir/iscsiuio.service \ ++ $systemdsystemunitdir/iscsiuio.socket \ ++ iscsiadm iscsid ++ ++ mkdir -p "${initdir}/$systemdsystemunitdir/sockets.target.wants" ++ for i in \ ++ iscsiuio.socket \ ++ ; do ++ ln_r "$systemdsystemunitdir/${i}" "$systemdsystemunitdir/sockets.target.wants/${i}" ++ done ++ ++ mkdir -p "${initdir}/$systemdsystemunitdir/basic.target.wants" ++ for i in \ ++ iscsid.service \ ++ ; do ++ ln_r "$systemdsystemunitdir/${i}" "$systemdsystemunitdir/basic.target.wants/${i}" ++ done ++ ++ # Make sure iscsid is started after dracut-cmdline and ready for the initqueue ++ mkdir -p "${initdir}/$systemdsystemunitdir/iscsid.service.d" ++ ( ++ echo "[Unit]" ++ echo "After=dracut-cmdline.service" ++ echo "Before=dracut-initqueue.service" ++ ) > "${initdir}/$systemdsystemunitdir/iscsid.service.d/dracut.conf" + fi ++ + dracut_need_initqueue + } +diff --git a/modules.d/95iscsi/parse-iscsiroot.sh b/modules.d/95iscsi/parse-iscsiroot.sh +index b48be387..6a21b503 100755 +--- a/modules.d/95iscsi/parse-iscsiroot.sh ++++ b/modules.d/95iscsi/parse-iscsiroot.sh +@@ -61,12 +61,13 @@ fi + + # iscsi_firmware does not need argument checking + if [ -n "$iscsi_firmware" ] ; then +- netroot=${netroot:-iscsi:} +- modprobe -q iscsi_boot_sysfs 2>/dev/null +- modprobe -q iscsi_ibft +- initqueue --onetime --timeout /sbin/iscsiroot dummy "'$netroot'" "'$NEWROOT'" ++ [ -z "$netroot" ] && netroot=iscsi: ++ modprobe -b -q iscsi_boot_sysfs 2>/dev/null ++ modprobe -b -q iscsi_ibft + fi + ++initqueue --onetime --timeout /sbin/iscsiroot dummy "$netroot" "$NEWROOT" ++ + # If it's not iscsi we don't continue + [ "${netroot%%:*}" = "iscsi" ] || return + +@@ -92,8 +93,22 @@ if [ -n "$netroot" ] && [ "$root" != "/dev/root" ] && [ "$root" != "dhcp" ]; the + fi + fi + +-netroot_enc=$(str_replace "$netroot" '/' '\2f') +-echo "[ -f '/tmp/iscsistarted-$netroot_enc' ]" > $hookdir/initqueue/finished/iscsi_started.sh ++if arg=$(getarg rd.iscsi.initiator -d iscsi_initiator=) && [ -n "$arg" ]; then ++ iscsi_initiator=$arg ++ echo "InitiatorName=$iscsi_initiator" > /run/initiatorname.iscsi ++ ln -fs /run/initiatorname.iscsi /dev/.initiatorname.iscsi ++ if ! [ -e /etc/iscsi/initiatorname.iscsi ]; then ++ mkdir -p /etc/iscsi ++ ln -fs /run/initiatorname.iscsi /etc/iscsi/initiatorname.iscsi ++ fi ++fi ++ ++if [ -n "$iscsi_firmware" ] ; then ++ echo "[ -f '/tmp/iscsistarted-firmware' ]" > $hookdir/initqueue/finished/iscsi_started.sh ++else ++ netroot_enc=$(str_replace "$netroot" '/' '\2f') ++ echo "[ -f '/tmp/iscsistarted-$netroot_enc' ]" > $hookdir/initqueue/finished/iscsi_started.sh ++fi + + # Done, all good! + rootok=1 diff --git a/SOURCES/0292-dracut.cmdline.7.asc-document-rd.iscsi.waitnet-and-r.patch b/SOURCES/0292-dracut.cmdline.7.asc-document-rd.iscsi.waitnet-and-r.patch new file mode 100644 index 0000000..0f29f01 --- /dev/null +++ b/SOURCES/0292-dracut.cmdline.7.asc-document-rd.iscsi.waitnet-and-r.patch @@ -0,0 +1,28 @@ +From a9a38f9f6014fd0b8c6e1779793da74c88b85b10 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 12 Aug 2015 15:11:17 +0200 +Subject: [PATCH] dracut.cmdline.7.asc: document rd.iscsi.waitnet and + rd.iscsi.testroute + +(cherry picked from commit 69171aa8fa4bdd196709318582d73076677bd16c) +--- + dracut.cmdline.7.asc | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc +index 5f3dead1..1cf962e6 100644 +--- a/dracut.cmdline.7.asc ++++ b/dracut.cmdline.7.asc +@@ -704,6 +704,12 @@ iscsistart -b --param node.session.timeo.replacement_timeout=30 + **rd.iscsi.ibft** **rd.iscsi.ibft=1**: + Turn on iBFT autoconfiguration for the interfaces + ++**rd.iscsi.waitnet=0**: ++ Turn off waiting for all interfaces to be up before trying to login to the iSCSI targets. ++ ++**rd.iscsi.testroute=0**: ++ Turn off checking, if the route to the iSCSI target IP is possible before trying to login. ++ + FCoE + ~~~~ + **fcoe=**__<edd|interface|MAC>__:__{dcb|nodcb}__:: diff --git a/SOURCES/0293-iscsi-parse-iscsiroot.sh-use-iBFT-initiator-name.patch b/SOURCES/0293-iscsi-parse-iscsiroot.sh-use-iBFT-initiator-name.patch new file mode 100644 index 0000000..a1dcc09 --- /dev/null +++ b/SOURCES/0293-iscsi-parse-iscsiroot.sh-use-iBFT-initiator-name.patch @@ -0,0 +1,42 @@ +From d9b00731c81fa2facd5c6088a08bdd579d550eba Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 12 Aug 2015 15:14:11 +0200 +Subject: [PATCH] iscsi/parse-iscsiroot.sh: use iBFT initiator name + +(cherry picked from commit feb8dc685dca1229c517de9ec9854367b8c49524) +--- + modules.d/95iscsi/parse-iscsiroot.sh | 14 +++++++++++++- + 1 file changed, 13 insertions(+), 1 deletion(-) + +diff --git a/modules.d/95iscsi/parse-iscsiroot.sh b/modules.d/95iscsi/parse-iscsiroot.sh +index 6a21b503..2939e58a 100755 +--- a/modules.d/95iscsi/parse-iscsiroot.sh ++++ b/modules.d/95iscsi/parse-iscsiroot.sh +@@ -60,7 +60,7 @@ if [ -n "$iscsiroot" ] ; then + fi + + # iscsi_firmware does not need argument checking +-if [ -n "$iscsi_firmware" ] ; then ++if [ -n "$iscsi_firmware" ] || getargbool 0 rd.iscsi.ibft -d "ip=ibft"; then + [ -z "$netroot" ] && netroot=iscsi: + modprobe -b -q iscsi_boot_sysfs 2>/dev/null + modprobe -b -q iscsi_ibft +@@ -103,6 +103,18 @@ if arg=$(getarg rd.iscsi.initiator -d iscsi_initiator=) && [ -n "$arg" ]; then + fi + fi + ++# If not given on the cmdline and initiator-name available via iBFT ++if [ -z $iscsi_initiator ] && [ -f /sys/firmware/ibft/initiator/initiator-name ] && ! [ -f /tmp/iscsi_set_initiator ]; then ++ iscsi_initiator=$(while read line || [ -n "$line" ]; do echo $line;done < /sys/firmware/ibft/initiator/initiator-name) ++ echo "InitiatorName=$iscsi_initiator" > /run/initiatorname.iscsi ++ rm -f /etc/iscsi/initiatorname.iscsi ++ mkdir -p /etc/iscsi ++ ln -fs /run/initiatorname.iscsi /etc/iscsi/initiatorname.iscsi ++ systemctl restart iscsid ++ sleep 1 ++ > /tmp/iscsi_set_initiator ++fi ++ + if [ -n "$iscsi_firmware" ] ; then + echo "[ -f '/tmp/iscsistarted-firmware' ]" > $hookdir/initqueue/finished/iscsi_started.sh + else diff --git a/SOURCES/0294-iscsi-iscsiroot.sh-handle-timeout-with-all-interface.patch b/SOURCES/0294-iscsi-iscsiroot.sh-handle-timeout-with-all-interface.patch new file mode 100644 index 0000000..5854708 --- /dev/null +++ b/SOURCES/0294-iscsi-iscsiroot.sh-handle-timeout-with-all-interface.patch @@ -0,0 +1,58 @@ +From 543a6d5cab7538cd9cf94b43b97ac96d995c7d2f Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 13 Aug 2015 11:53:21 +0200 +Subject: [PATCH] iscsi/iscsiroot.sh: handle timeout with all interfaces up + +restart iscsid, because it may disbehaved + +(cherry picked from commit 6802cf23499b05544079b26a39e339bb3476d38d) +--- + modules.d/95iscsi/iscsiroot.sh | 17 +++++++++++++---- + 1 file changed, 13 insertions(+), 4 deletions(-) + +diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh +index 68da9dd0..9452afec 100755 +--- a/modules.d/95iscsi/iscsiroot.sh ++++ b/modules.d/95iscsi/iscsiroot.sh +@@ -199,13 +199,14 @@ handle_netroot() + ${iscsi_in_password:+-W $iscsi_in_password} \ + ${iscsi_iface_name:+--param iface.iscsi_ifacename=$iscsi_iface_name} \ + ${iscsi_netdev_name:+--param iface.net_ifacename=$iscsi_netdev_name} \ +- ${iscsi_param} >/dev/null 2>&1 ++ ${iscsi_param} >/dev/null 2>&1 \ ++ && { > $hookdir/initqueue/work ; } + else +- systemctl --no-block restart "$netroot_enc" >/dev/null 2>&1 ++ systemctl --no-block restart "$netroot_enc" >/dev/null 2>&1 \ ++ && { > $hookdir/initqueue/work ; } + fi + fi + else +- > $hookdir/initqueue/work + iscsistart -i $iscsi_initiator -t $iscsi_target_name \ + -g $iscsi_target_group -a $iscsi_target_ip \ + -p $iscsi_target_port \ +@@ -216,7 +217,7 @@ handle_netroot() + ${iscsi_iface_name:+--param iface.iscsi_ifacename=$iscsi_iface_name} \ + ${iscsi_netdev_name:+--param iface.net_ifacename=$iscsi_netdev_name} \ + ${iscsi_param} \ +- || : ++ && { > $hookdir/initqueue/work ; } + fi + netroot_enc=$(str_replace "$1" '/' '\2f') + echo 'started' > "/tmp/iscsistarted-iscsi:${netroot_enc}" +@@ -229,6 +230,14 @@ if [ "$netif" != "dummy" ] && getargbool 1 rd.iscsi.waitnet; then + all_ifaces_up || exit 0 + fi + ++if [ "$netif" = "dummy" ] && all_ifaces_up; then ++ # s.th. went wrong and the timeout script hits ++ # restart ++ systemctl restart iscsid ++ # damn iscsid is not ready after unit says it's ready ++ sleep 2 ++fi ++ + # loop over all netroot parameter + netroot=$(getarg netroot) + if [ $? -eq 0 ] && [ "$netroot" != "dhcp" ]; then diff --git a/SOURCES/0295-TEST-30-ISCSI-dhcpd.conf-set-the-LUN.patch b/SOURCES/0295-TEST-30-ISCSI-dhcpd.conf-set-the-LUN.patch new file mode 100644 index 0000000..aa4c9d3 --- /dev/null +++ b/SOURCES/0295-TEST-30-ISCSI-dhcpd.conf-set-the-LUN.patch @@ -0,0 +1,25 @@ +From 99b9b4896e751fa17d64ded496aba3161f665ffb Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 12 Aug 2015 14:40:42 +0200 +Subject: [PATCH] TEST-30-ISCSI/dhcpd.conf: set the LUN + +set the LUN, so the udev rule to mount the disk matches + +(cherry picked from commit 52b91b66980d0de18a52c6c1c5334364b115fee2) +--- + test/TEST-30-ISCSI/dhcpd.conf | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/TEST-30-ISCSI/dhcpd.conf b/test/TEST-30-ISCSI/dhcpd.conf +index 6eb035b2..22c17907 100644 +--- a/test/TEST-30-ISCSI/dhcpd.conf ++++ b/test/TEST-30-ISCSI/dhcpd.conf +@@ -15,7 +15,7 @@ subnet 192.168.50.0 netmask 255.255.255.0 { + # NFSv3: last octect starts at 0x00 and works up + + group { +- option root-path "iscsi:192.168.50.1::::iqn.2009-06.dracut:target0"; ++ option root-path "iscsi:192.168.50.1:::1:iqn.2009-06.dracut:target0"; + + host iscsi-1 { + hardware ethernet 52:54:00:12:34:00; diff --git a/SOURCES/0296-TEST-30-ISCSI-switch-to-scsi-target-utils.patch b/SOURCES/0296-TEST-30-ISCSI-switch-to-scsi-target-utils.patch new file mode 100644 index 0000000..b6225a7 --- /dev/null +++ b/SOURCES/0296-TEST-30-ISCSI-switch-to-scsi-target-utils.patch @@ -0,0 +1,349 @@ +From 1a2c9bbd2d611c801df3f342d5302f91602d77d6 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 12 Aug 2015 14:42:03 +0200 +Subject: [PATCH] TEST-30-ISCSI: switch to scsi-target-utils + +netbsd-iscsi is not available on RHEL + +Beef up the testsuite to use the two targets over different +interfaces. + +Test the new iSCSI parameters rd.iscsi.waitnet and rd.iscsi.testroute. + +(cherry picked from commit c22c43f81a5f15c8759e6aa69773d0e9010c4741) +--- + README.testsuite | 20 ++--- + test/TEST-30-ISCSI/server-init.sh | 24 +++++- + test/TEST-30-ISCSI/targets | 25 ------- + test/TEST-30-ISCSI/test.sh | 119 +++++++++++++++++++++--------- + 4 files changed, 117 insertions(+), 71 deletions(-) + delete mode 100644 test/TEST-30-ISCSI/targets + +diff --git a/README.testsuite b/README.testsuite +index f4955e04..247ed3aa 100644 +--- a/README.testsuite ++++ b/README.testsuite +@@ -1,14 +1,16 @@ + For the testsuite to work, you will have to install at least the following software packages: +-dash +-asciidoc +-mdadm +-lvm2 +-cryptsetup +-nfs-utils +-netbsd-iscsi +-nbd +-dhcp (dhcp-server on openSUSE) ++dash \ ++bridge-utils \ ++asciidoc \ ++mdadm \ ++lvm2 \ ++cryptsetup \ ++nfs-utils \ ++nbd \ ++dhcp-server \ ++scsi-target-utils \ + iscsi-initiator-utils ++ + TEST-04-FULL-SYSTEMD: systemd >= 187 + + How to run the testsuite: +diff --git a/test/TEST-30-ISCSI/server-init.sh b/test/TEST-30-ISCSI/server-init.sh +index 4bdd5e3c..64a47556 100755 +--- a/test/TEST-30-ISCSI/server-init.sh ++++ b/test/TEST-30-ISCSI/server-init.sh +@@ -12,10 +12,30 @@ ip link set lo up + ip link set dev eth0 name ens3 + ip addr add 192.168.50.1/24 dev ens3 + ip link set ens3 up ++ip link set dev eth1 name ens4 ++ip addr add 192.168.51.1/24 dev ens4 ++ip link set ens4 up + >/var/lib/dhcpd/dhcpd.leases + chmod 777 /var/lib/dhcpd/dhcpd.leases +-dhcpd -cf /etc/dhcpd.conf -lf /var/lib/dhcpd/dhcpd.leases ++dhcpd -d -cf /etc/dhcpd.conf -lf /var/lib/dhcpd/dhcpd.leases & ++ ++tgtd ++tgtadm --lld iscsi --mode target --op new --tid 1 --targetname iqn.2009-06.dracut:target0 ++tgtadm --lld iscsi --mode target --op new --tid 2 --targetname iqn.2009-06.dracut:target1 ++tgtadm --lld iscsi --mode target --op new --tid 3 --targetname iqn.2009-06.dracut:target2 ++tgtadm --lld iscsi --mode logicalunit --op new --tid 1 --lun 1 -b /dev/sdb ++tgtadm --lld iscsi --mode logicalunit --op new --tid 2 --lun 2 -b /dev/sdc ++tgtadm --lld iscsi --mode logicalunit --op new --tid 3 --lun 3 -b /dev/sdd ++tgtadm --lld iscsi --mode target --op bind --tid 1 -I 192.168.50.101 ++tgtadm --lld iscsi --mode target --op bind --tid 2 -I 192.168.51.101 ++tgtadm --lld iscsi --mode target --op bind --tid 3 -I 192.168.50.101 ++ ++ + # Wait forever for the VM to die +-/usr/sbin/iscsi-target -D -t iqn.2009-06.dracut ++echo "Serving iSCSI" ++while :; do ++ [ -n "$(jobs -rp)" ] && echo > /dev/watchdog ++ sleep 10 ++done + mount -n -o remount,ro / + poweroff -f +diff --git a/test/TEST-30-ISCSI/targets b/test/TEST-30-ISCSI/targets +deleted file mode 100644 +index 6a6872e5..00000000 +--- a/test/TEST-30-ISCSI/targets ++++ /dev/null +@@ -1,25 +0,0 @@ +-# $NetBSD: targets,v 1.2 2006/03/04 21:53:16 agc Exp $ +-# +-# Structure of this file: +-# +-# + an extent is a straight (offset, length) pair of a file or device +-# it's the lowest common storage denominator +-# at least one is needed +-# + a device is made up of one or more extents or other devices +-# devices can be added in a hierachical manner, to enhance resilience +-# + in this example, no device definitions are necessary, as the target +-# will just use a simple extent for persistent storage +-# + a target is made up of 1 or more devices +-# The code does not support RAID1 recovery at present +- +-# Simple file showing 1 extent, mapped straight into 1 target +- +-# extents file start length +-extent0 /dev/sdb 0 20971520 +-extent1 /dev/sdc 0 20971520 +-extent2 /dev/sdd 0 20971520 +- +-# target flags storage netmask +-target0 rw extent0 192.168.50.0/24 +-target1 rw extent1 192.168.50.0/24 +-target2 rw extent2 192.168.50.0/24 +diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh +index a258c042..be3399a3 100755 +--- a/test/TEST-30-ISCSI/test.sh ++++ b/test/TEST-30-ISCSI/test.sh +@@ -3,8 +3,10 @@ TEST_DESCRIPTION="root filesystem over iSCSI" + + KVERSION=${KVERSION-$(uname -r)} + +-#DEBUGFAIL="rd.shell" +-#SERIAL="tcp:127.0.0.1:9999" ++#DEBUGFAIL="rd.shell rd.break rd.debug loglevel=7 " ++DEBUGFAIL="loglevel=1" ++#SERVER_DEBUG="rd.debug loglevel=7" ++SERIAL="tcp:127.0.0.1:9999" + SERIAL="null" + + run_server() { +@@ -12,17 +14,17 @@ run_server() { + echo "iSCSI TEST SETUP: Starting DHCP/iSCSI server" + + $testdir/run-qemu \ +- -hda $TESTDIR/server.ext3 \ +- -hdb $TESTDIR/root.ext3 \ +- -hdc $TESTDIR/iscsidisk2.img \ +- -hdd $TESTDIR/iscsidisk3.img \ +- -m 256M -smp 2 \ ++ -drive format=raw,index=0,media=disk,file=$TESTDIR/server.ext3 \ ++ -drive format=raw,index=1,media=disk,file=$TESTDIR/root.ext3 \ ++ -drive format=raw,index=2,media=disk,file=$TESTDIR/iscsidisk2.img \ ++ -drive format=raw,index=3,media=disk,file=$TESTDIR/iscsidisk3.img \ ++ -m 512M -smp 2 \ + -display none \ + -serial $SERIAL \ + -net nic,macaddr=52:54:00:12:34:56,model=e1000 \ ++ -net nic,macaddr=52:54:00:12:34:57,model=e1000 \ + -net socket,listen=127.0.0.1:12330 \ +- -kernel /boot/vmlinuz-$KVERSION \ +- -append "root=/dev/sda rootfstype=ext3 rw rd.debug loglevel=77 console=ttyS0,115200n81 selinux=0" \ ++ -append "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 +@@ -41,12 +43,12 @@ run_client() { + dd if=/dev/zero of=$TESTDIR/client.img bs=1M count=1 + + $testdir/run-qemu \ +- -hda $TESTDIR/client.img \ +- -m 256M -smp 2 -nographic \ ++ -drive format=raw,index=0,media=disk,file=$TESTDIR/client.img \ ++ -m 512M -smp 2 -nographic \ + -net nic,macaddr=52:54:00:12:34:00,model=e1000 \ ++ -net nic,macaddr=52:54:00:12:34:01,model=e1000 \ + -net socket,connect=127.0.0.1:12330 \ +- -kernel /boot/vmlinuz-$KVERSION \ +- -append "$* rw quiet rd.auto rd.retry=5 rd.debug rd.info console=ttyS0,115200n81 selinux=0 $DEBUGFAIL" \ ++ -append "rw rd.auto rd.retry=20 console=ttyS0,115200n81 selinux=0 rd.debug=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]" +@@ -58,20 +60,58 @@ run_client() { + } + + do_test_run() { ++ initiator=$(iscsi-iname) + + run_client "root=dhcp" \ +- "root=dhcp" \ ++ "root=/dev/root netroot=dhcp ip=ens3:dhcp" \ ++ "rd.iscsi.initiator=$initiator" \ ++ || return 1 ++ ++ run_client "netroot=iscsi target0"\ ++ "root=LABEL=singleroot netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target0" \ ++ "ip=192.168.50.101::192.168.50.1:255.255.255.0:iscsi-1:ens3:off" \ ++ "rd.iscsi.initiator=$initiator" \ ++ || return 1 ++ ++ run_client "netroot=iscsi target1 target2" \ ++ "root=LABEL=sysroot" \ ++ "ip=192.168.50.101:::255.255.255.0::ens3:off" \ ++ "ip=192.168.51.101:::255.255.255.0::ens4:off" \ ++ "netroot=iscsi:192.168.51.1::::iqn.2009-06.dracut:target1" \ ++ "netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target2" \ ++ "rd.iscsi.initiator=$initiator" \ ++ || return 1 ++ ++ run_client "netroot=iscsi target1 target2 rd.iscsi.waitnet=0" \ ++ "root=LABEL=sysroot" \ ++ "ip=192.168.50.101:::255.255.255.0::ens3:off" \ ++ "ip=192.168.51.101:::255.255.255.0::ens4:off" \ ++ "netroot=iscsi:192.168.51.1::::iqn.2009-06.dracut:target1" \ ++ "netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target2" \ ++ "rd.iscsi.initiator=$initiator" \ ++ "rd.waitnet=0 rd.retry=30" \ + || return 1 + +- run_client "root=iscsi" \ +- "root=iscsi:192.168.50.1::::iqn.2009-06.dracut:target0" \ +- "ip=192.168.50.101::192.168.50.1:255.255.255.0:iscsi-1:ens3:off" \ ++ run_client "netroot=iscsi target1 target2 rd.iscsi.waitnet=0 rd.iscsi.testroute=0" \ ++ "root=LABEL=sysroot" \ ++ "ip=192.168.50.101:::255.255.255.0::ens3:off" \ ++ "ip=192.168.51.101:::255.255.255.0::ens4:off" \ ++ "netroot=iscsi:192.168.51.1::::iqn.2009-06.dracut:target1" \ ++ "netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target2" \ ++ "rd.iscsi.initiator=$initiator" \ ++ "rd.waitnet=0 rd.iscsi.testroute=0 rd.retry=30" \ + || return 1 + +- run_client "netroot=iscsi" \ +- "iscsi_firmware root=LABEL=sysroot ip=192.168.50.101::192.168.50.1:255.255.255.0:iscsi-1:ens3:off" \ +- "netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target1 netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target2" \ ++ run_client "netroot=iscsi target1 target2 rd.iscsi.waitnet=0 rd.iscsi.testroute=0 default GW" \ ++ "root=LABEL=sysroot" \ ++ "ip=192.168.50.101::192.168.50.1:255.255.255.0::ens3:off" \ ++ "ip=192.168.51.101::192.168.51.1:255.255.255.0::ens4:off" \ ++ "netroot=iscsi:192.168.51.1::::iqn.2009-06.dracut:target1" \ ++ "netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target2" \ ++ "rd.iscsi.initiator=$initiator" \ ++ "rd.waitnet=0 rd.iscsi.testroute=0 rd.retry=30" \ + || return 1 ++ + return 0 + } + +@@ -105,15 +145,23 @@ test_setup() { + ( + export initdir=$TESTDIR/overlay/source + . $basedir/dracut-init.sh ++ ( ++ cd "$initdir" ++ mkdir -p -- dev sys proc etc var/run tmp ++ mkdir -p root usr/bin usr/lib usr/lib64 usr/sbin ++ for i in bin sbin lib lib64; do ++ ln -sfnr usr/$i $i ++ done ++ mkdir -p -- var/lib/nfs/rpc_pipefs ++ ) + inst_multiple sh shutdown poweroff stty cat ps ln ip \ +- mount dmesg mkdir cp ping grep ++ mount dmesg mkdir cp ping grep setsid + 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 var/run tmp ) + cp -a /etc/ld.so.conf* $initdir/etc + sudo ldconfig -r "$initdir" + ) +@@ -122,7 +170,7 @@ test_setup() { + ( + export initdir=$TESTDIR/overlay + . $basedir/dracut-init.sh +- inst_multiple sfdisk mkfs.ext3 poweroff cp umount ++ inst_multiple sfdisk mkfs.ext3 poweroff cp umount setsid + 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 +@@ -132,8 +180,9 @@ test_setup() { + # We do it this way so that we do not risk trashing the host mdraid + # devices, volume groups, encrypted partitions, etc. + $basedir/dracut.sh -l -i $TESTDIR/overlay / \ +- -m "dash crypt lvm mdraid udev-rules base rootfs-block kernel-modules" \ ++ -m "dash crypt lvm mdraid udev-rules base rootfs-block fs-lib kernel-modules" \ + -d "piix ide-gd_mod ata_piix ext3 sd_mod" \ ++ --no-hostonly-cmdline -N \ + -f $TESTDIR/initramfs.makeroot $KVERSION || return 1 + rm -rf -- $TESTDIR/overlay + +@@ -145,12 +194,11 @@ test_setup() { + fi + # Invoke KVM and/or QEMU to actually create the target filesystem. + $testdir/run-qemu \ +- -hda $TESTDIR/root.ext3 \ +- -hdb $TESTDIR/client.img \ +- -hdc $TESTDIR/iscsidisk2.img \ +- -hdd $TESTDIR/iscsidisk3.img \ ++ -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext3 \ ++ -drive format=raw,index=1,media=disk,file=$TESTDIR/client.img \ ++ -drive format=raw,index=2,media=disk,file=$TESTDIR/iscsidisk2.img \ ++ -drive format=raw,index=3,media=disk,file=$TESTDIR/iscsidisk3.img \ + -smp 2 -m 256M -nographic -net none \ +- -kernel "/boot/vmlinuz-$kernel" \ + -append "root=/dev/fakeroot rw rootfstype=ext3 quiet console=ttyS0,115200n81 selinux=0" \ + -initrd $TESTDIR/initramfs.makeroot || return 1 + grep -F -m 1 -q dracut-root-block-created $TESTDIR/client.img || return 1 +@@ -163,9 +211,10 @@ test_setup() { + inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules + ) + sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ +- -o "dash plymouth dmraid" \ ++ -o "dash plymouth dmraid nfs" \ + -a "debug" \ + -d "af_packet piix ide-gd_mod ata_piix ext3 sd_mod" \ ++ --no-hostonly-cmdline -N \ + -f $TESTDIR/initramfs.testing $KVERSION || return 1 + + # Make server root +@@ -185,15 +234,14 @@ test_setup() { + inst /etc/passwd /etc/passwd + inst_multiple sh ls shutdown poweroff stty cat ps ln ip \ + dmesg mkdir cp ping \ +- modprobe tcpdump \ ++ modprobe tcpdump setsid \ + /etc/services sleep mount chmod +- inst_multiple /usr/sbin/iscsi-target ++ inst_multiple tgtd tgtadm + for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do + [ -f ${_terminfodir}/l/linux ] && break + done + inst_multiple -o ${_terminfodir}/l/linux + instmods iscsi_tcp crc32c ipv6 +- inst ./targets /etc/iscsi/targets + [ -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 +@@ -214,8 +262,9 @@ test_setup() { + + # Make server's dracut image + $basedir/dracut.sh -l -i $TESTDIR/overlay / \ +- -m "dash udev-rules base rootfs-block debug kernel-modules" \ +- -d "af_packet piix ide-gd_mod ata_piix ext3 sd_mod e1000" \ ++ -a "dash udev-rules base rootfs-block fs-lib debug kernel-modules" \ ++ -d "af_packet piix ide-gd_mod ata_piix ext3 sd_mod e1000 drbg" \ ++ --no-hostonly-cmdline -N \ + -f $TESTDIR/initramfs.server $KVERSION || return 1 + + } diff --git a/SOURCES/0297-iscsi-iscsiroot.sh-systemd-run-does-not-understand-n.patch b/SOURCES/0297-iscsi-iscsiroot.sh-systemd-run-does-not-understand-n.patch new file mode 100644 index 0000000..0e45570 --- /dev/null +++ b/SOURCES/0297-iscsi-iscsiroot.sh-systemd-run-does-not-understand-n.patch @@ -0,0 +1,24 @@ +From 88329f6b4f4581a50842d1fe82f11cb052e7f100 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Sat, 15 Aug 2015 13:21:29 +0200 +Subject: [PATCH] iscsi/iscsiroot.sh: systemd-run does not understand + --no-block + +not yet on RHEL-7 +--- + modules.d/95iscsi/iscsiroot.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh +index 9452afec..2ac9ed32 100755 +--- a/modules.d/95iscsi/iscsiroot.sh ++++ b/modules.d/95iscsi/iscsiroot.sh +@@ -186,7 +186,7 @@ handle_netroot() + is_active=$? + if [ $is_active -ne 0 ]; then + if [ "$status" != "activating" ] && ! systemctl is-failed "$netroot_enc" >/dev/null 2>&1; then +- systemd-run --no-block --service-type=oneshot --remain-after-exit --quiet \ ++ systemd-run --service-type=oneshot --remain-after-exit --quiet \ + --description="Login iSCSI Target $iscsi_target_name" \ + --unit="$netroot_enc" -- \ + $(command -v iscsistart) \ diff --git a/SOURCES/0298-iscsi-module-setup.sh-iscsid-need-var-lib-iscsi.patch b/SOURCES/0298-iscsi-module-setup.sh-iscsid-need-var-lib-iscsi.patch new file mode 100644 index 0000000..bd874b4 --- /dev/null +++ b/SOURCES/0298-iscsi-module-setup.sh-iscsid-need-var-lib-iscsi.patch @@ -0,0 +1,21 @@ +From f74b0a9f38838dddcf6f56daa9f20fc3e86087ca Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Sat, 15 Aug 2015 13:22:07 +0200 +Subject: [PATCH] iscsi/module-setup.sh: iscsid need /var/lib/iscsi + +--- + modules.d/95iscsi/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh +index d12eb7d8..4ecba05e 100755 +--- a/modules.d/95iscsi/module-setup.sh ++++ b/modules.d/95iscsi/module-setup.sh +@@ -114,6 +114,6 @@ install() { + echo "Before=dracut-initqueue.service" + ) > "${initdir}/$systemdsystemunitdir/iscsid.service.d/dracut.conf" + fi +- ++ inst_dir /var/lib/iscsi + dracut_need_initqueue + } diff --git a/SOURCES/0299-TEST-30-ISCSI-fix-test-to-run-with-new-iscsi.patch b/SOURCES/0299-TEST-30-ISCSI-fix-test-to-run-with-new-iscsi.patch new file mode 100644 index 0000000..4b25834 --- /dev/null +++ b/SOURCES/0299-TEST-30-ISCSI-fix-test-to-run-with-new-iscsi.patch @@ -0,0 +1,99 @@ +From 836ca3f47eb0b0a4c97ae704b0b9619a00dbfa87 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Sat, 15 Aug 2015 13:22:44 +0200 +Subject: [PATCH] TEST-30-ISCSI: fix test to run with new iscsi + +--- + test/TEST-30-ISCSI/client-init.sh | 8 +++++++- + test/TEST-30-ISCSI/create-root.sh | 2 +- + test/TEST-30-ISCSI/test.sh | 10 +++++----- + 3 files changed, 13 insertions(+), 7 deletions(-) + +diff --git a/test/TEST-30-ISCSI/client-init.sh b/test/TEST-30-ISCSI/client-init.sh +index e78db274..2e422cd5 100755 +--- a/test/TEST-30-ISCSI/client-init.sh ++++ b/test/TEST-30-ISCSI/client-init.sh +@@ -1,14 +1,20 @@ + #!/bin/sh + export PATH=/sbin:/bin:/usr/sbin:/usr/bin + exec >/dev/console 2>&1 ++strstr() { [ "${1##*"$2"*}" != "$1" ]; } ++CMDLINE=$(while read line || [ -n "$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." +-while read dev fs fstype opts rest; do ++while read dev fs fstype opts rest || [ -n "$dev" ]; do + [ "$fstype" != "ext3" ] && continue + echo "iscsi-OK $dev $fstype $opts" > /dev/sda + break + done < /proc/mounts + #sh -i ++if strstr "$CMDLINE" "rd.shell"; then ++ strstr "$(setsid --help)" "control" && CTTY="-c" ++ setsid $CTTY sh -i ++fi + poweroff -f +diff --git a/test/TEST-30-ISCSI/create-root.sh b/test/TEST-30-ISCSI/create-root.sh +index 2a4b920e..5f4b32a2 100755 +--- a/test/TEST-30-ISCSI/create-root.sh ++++ b/test/TEST-30-ISCSI/create-root.sh +@@ -5,7 +5,7 @@ for x in 64-lvm.rules 70-mdadm.rules 99-mount-rules; do + done + rm -f -- /etc/lvm/lvm.conf + udevadm control --reload +-mkfs.ext3 -j -F /dev/sda && \ ++mkfs.ext3 -j -L singleroot -F /dev/sda && \ + mkdir -p /sysroot && \ + mount /dev/sda /sysroot && \ + cp -a -t /sysroot /source/* && \ +diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh +index be3399a3..92ddc860 100755 +--- a/test/TEST-30-ISCSI/test.sh ++++ b/test/TEST-30-ISCSI/test.sh +@@ -3,7 +3,7 @@ TEST_DESCRIPTION="root filesystem over iSCSI" + + KVERSION=${KVERSION-$(uname -r)} + +-#DEBUGFAIL="rd.shell rd.break rd.debug loglevel=7 " ++DEBUGFAIL="rd.shell rd.break rd.debug loglevel=7 " + DEBUGFAIL="loglevel=1" + #SERVER_DEBUG="rd.debug loglevel=7" + SERIAL="tcp:127.0.0.1:9999" +@@ -48,7 +48,7 @@ run_client() { + -net nic,macaddr=52:54:00:12:34:00,model=e1000 \ + -net nic,macaddr=52:54:00:12:34:01,model=e1000 \ + -net socket,connect=127.0.0.1:12330 \ +- -append "rw rd.auto rd.retry=20 console=ttyS0,115200n81 selinux=0 rd.debug=0 $DEBUGFAIL $*" \ ++ -append "rw rd.auto rd.retry=50 console=ttyS0,115200n81 selinux=0 rd.debug=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]" +@@ -89,7 +89,7 @@ do_test_run() { + "netroot=iscsi:192.168.51.1::::iqn.2009-06.dracut:target1" \ + "netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target2" \ + "rd.iscsi.initiator=$initiator" \ +- "rd.waitnet=0 rd.retry=30" \ ++ "rd.iscsi.waitnet=0" \ + || return 1 + + run_client "netroot=iscsi target1 target2 rd.iscsi.waitnet=0 rd.iscsi.testroute=0" \ +@@ -99,7 +99,7 @@ do_test_run() { + "netroot=iscsi:192.168.51.1::::iqn.2009-06.dracut:target1" \ + "netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target2" \ + "rd.iscsi.initiator=$initiator" \ +- "rd.waitnet=0 rd.iscsi.testroute=0 rd.retry=30" \ ++ "rd.iscsi.waitnet=0 rd.iscsi.testroute=0" \ + || return 1 + + run_client "netroot=iscsi target1 target2 rd.iscsi.waitnet=0 rd.iscsi.testroute=0 default GW" \ +@@ -109,7 +109,7 @@ do_test_run() { + "netroot=iscsi:192.168.51.1::::iqn.2009-06.dracut:target1" \ + "netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target2" \ + "rd.iscsi.initiator=$initiator" \ +- "rd.waitnet=0 rd.iscsi.testroute=0 rd.retry=30" \ ++ "rd.iscsi.waitnet=0 rd.iscsi.testroute=0" \ + || return 1 + + return 0 diff --git a/SOURCES/0300-dracut-logger.sh-log-also-rest-of-line-without-retur.patch b/SOURCES/0300-dracut-logger.sh-log-also-rest-of-line-without-retur.patch new file mode 100644 index 0000000..d07d863 --- /dev/null +++ b/SOURCES/0300-dracut-logger.sh-log-also-rest-of-line-without-retur.patch @@ -0,0 +1,22 @@ +From 415d0c68ab1aaff7892e2187f8a18341bfeef796 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Sat, 15 Aug 2015 15:42:51 +0200 +Subject: [PATCH] dracut-logger.sh: log also rest of line without return + +--- + dracut-logger.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dracut-logger.sh b/dracut-logger.sh +index 70b0da4c..ffa56167 100755 +--- a/dracut-logger.sh ++++ b/dracut-logger.sh +@@ -367,7 +367,7 @@ dlog() { + if (( $# > 1 )); then + _do_dlog "$@" + else +- while read line; do ++ while read line || [ -n "$line" ]; do + _do_dlog "$1" "$line" + done + fi diff --git a/SOURCES/0301-iscsi-handle-timeout-case-better.patch b/SOURCES/0301-iscsi-handle-timeout-case-better.patch new file mode 100644 index 0000000..ec9dbcd --- /dev/null +++ b/SOURCES/0301-iscsi-handle-timeout-case-better.patch @@ -0,0 +1,124 @@ +From bfe65f913a4bc6bc5fdb7aa75234c229a2ceef8f Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 18 Aug 2015 11:50:15 +0200 +Subject: [PATCH] iscsi: handle timeout case better + +--- + modules.d/95iscsi/iscsiroot.sh | 6 ++-- + modules.d/95iscsi/parse-iscsiroot.sh | 41 ++++++++++++++++------------ + 2 files changed, 27 insertions(+), 20 deletions(-) + +diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh +index 2ac9ed32..b7370f6f 100755 +--- a/modules.d/95iscsi/iscsiroot.sh ++++ b/modules.d/95iscsi/iscsiroot.sh +@@ -108,7 +108,7 @@ handle_netroot() + parse_iscsi_root "$1" || return 1 + + # Bail out early, if there is no route to the destination +- if is_ip "$iscsi_target_ip" && [ "$netif" != "dummy" ] && ! all_ifaces_up && getargbool 1 rd.iscsi.testroute; then ++ if is_ip "$iscsi_target_ip" && [ "$netif" != "timeout" ] && ! all_ifaces_up && getargbool 1 rd.iscsi.testroute; then + ip route get "$iscsi_target_ip" >/dev/null 2>&1 || return 0 + fi + +@@ -226,11 +226,11 @@ handle_netroot() + + ret=0 + +-if [ "$netif" != "dummy" ] && getargbool 1 rd.iscsi.waitnet; then ++if [ "$netif" != "timeout" ] && getargbool 1 rd.iscsi.waitnet; then + all_ifaces_up || exit 0 + fi + +-if [ "$netif" = "dummy" ] && all_ifaces_up; then ++if [ "$netif" = "timeout" ] && all_ifaces_up; then + # s.th. went wrong and the timeout script hits + # restart + systemctl restart iscsid +diff --git a/modules.d/95iscsi/parse-iscsiroot.sh b/modules.d/95iscsi/parse-iscsiroot.sh +index 2939e58a..91cd4630 100755 +--- a/modules.d/95iscsi/parse-iscsiroot.sh ++++ b/modules.d/95iscsi/parse-iscsiroot.sh +@@ -42,7 +42,11 @@ if [ "${root%%:*}" = "iscsi" ] ; then + fi + + # If it's not empty or iscsi we don't continue +-[ -z "$netroot" ] || [ "${netroot%%:*}" = "iscsi" ] || return ++for nroot in $(getargs netroot); do ++ [ "${nroot%%:*}" = "iscsi" ] || continue ++ netroot="$nroot" ++ break ++done + + if [ -n "$iscsiroot" ] ; then + [ -z "$netroot" ] && netroot=$root +@@ -64,12 +68,16 @@ if [ -n "$iscsi_firmware" ] || getargbool 0 rd.iscsi.ibft -d "ip=ibft"; then + [ -z "$netroot" ] && netroot=iscsi: + modprobe -b -q iscsi_boot_sysfs 2>/dev/null + modprobe -b -q iscsi_ibft ++ # if no ip= is given, but firmware ++ echo "[ -f '/tmp/iscsistarted-firmware' ]" > $hookdir/initqueue/finished/iscsi_started.sh ++ initqueue --unique --onetime --timeout /sbin/iscsiroot timeout "$netroot" "$NEWROOT" ++ initqueue --unique --onetime --settled /sbin/iscsiroot dummy "'$netroot'" "'$NEWROOT'" + fi + +-initqueue --onetime --timeout /sbin/iscsiroot dummy "$netroot" "$NEWROOT" + +-# If it's not iscsi we don't continue +-[ "${netroot%%:*}" = "iscsi" ] || return ++[ -z "$netroot" ] || [ "${netroot%%:*}" = "iscsi" ] || return 1 ++ ++initqueue --unique --onetime --timeout /sbin/iscsiroot timeout "$netroot" "$NEWROOT" + + modprobe -q qla4xxx + modprobe -q cxgb3i +@@ -77,11 +85,6 @@ modprobe -q cxgb4i + modprobe -q bnx2i + modprobe -q be2iscsi + +-if [ -z "$iscsi_firmware" ] ; then +- type parse_iscsi_root >/dev/null 2>&1 || . /lib/net-lib.sh +- parse_iscsi_root "$netroot" || return +-fi +- + # ISCSI actually supported? + if ! [ -e /sys/module/iscsi_tcp ]; then + modprobe -q iscsi_tcp || die "iscsiroot requested but kernel/initrd does not support iscsi" +@@ -89,7 +92,7 @@ fi + + if [ -n "$netroot" ] && [ "$root" != "/dev/root" ] && [ "$root" != "dhcp" ]; then + if ! getargbool 1 rd.neednet >/dev/null || ! getarg "ip="; then +- initqueue --onetime --settled /sbin/iscsiroot dummy "'$netroot'" "'$NEWROOT'" ++ initqueue --unique --onetime --settled /sbin/iscsiroot dummy "'$netroot'" "'$NEWROOT'" + fi + fi + +@@ -110,17 +113,21 @@ if [ -z $iscsi_initiator ] && [ -f /sys/firmware/ibft/initiator/initiator-name ] + rm -f /etc/iscsi/initiatorname.iscsi + mkdir -p /etc/iscsi + ln -fs /run/initiatorname.iscsi /etc/iscsi/initiatorname.iscsi +- systemctl restart iscsid +- sleep 1 + > /tmp/iscsi_set_initiator ++ if systemctl --quiet is-active iscsid.service; then ++ systemctl restart iscsid ++ sleep 1 ++ fi + fi + +-if [ -n "$iscsi_firmware" ] ; then +- echo "[ -f '/tmp/iscsistarted-firmware' ]" > $hookdir/initqueue/finished/iscsi_started.sh +-else +- netroot_enc=$(str_replace "$netroot" '/' '\2f') ++ ++for nroot in $(getargs netroot); do ++ [ "${nroot%%:*}" = "iscsi" ] || continue ++ type parse_iscsi_root >/dev/null 2>&1 || . /lib/net-lib.sh ++ parse_iscsi_root "$nroot" || return 1 ++ netroot_enc=$(str_replace "$nroot" '/' '\2f') + echo "[ -f '/tmp/iscsistarted-$netroot_enc' ]" > $hookdir/initqueue/finished/iscsi_started.sh +-fi ++done + + # Done, all good! + rootok=1 diff --git a/SOURCES/0302-base-dracut-lib.sh-vinfo-vwarn-handle-lines-without-.patch b/SOURCES/0302-base-dracut-lib.sh-vinfo-vwarn-handle-lines-without-.patch new file mode 100644 index 0000000..92af638 --- /dev/null +++ b/SOURCES/0302-base-dracut-lib.sh-vinfo-vwarn-handle-lines-without-.patch @@ -0,0 +1,29 @@ +From ad565584a3b7d5795be80aee34307f1752a093b4 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 18 Aug 2015 11:50:40 +0200 +Subject: [PATCH] base/dracut-lib.sh:vinfo/vwarn handle lines without newline + +--- + modules.d/99base/dracut-lib.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh +index 3ffbb021..b6593a06 100755 +--- a/modules.d/99base/dracut-lib.sh ++++ b/modules.d/99base/dracut-lib.sh +@@ -67,13 +67,13 @@ else + fi + + vwarn() { +- while read line; do ++ while read line || [ -n "$line" ]; do + warn $line; + done + } + + vinfo() { +- while read line; do ++ while read line || [ -n "$line" ]; do + info $line; + done + } diff --git a/SOURCES/0303-systemd-dracut-cmdline.sh-print-out-cmdline-in-one-l.patch b/SOURCES/0303-systemd-dracut-cmdline.sh-print-out-cmdline-in-one-l.patch new file mode 100644 index 0000000..e1546c7 --- /dev/null +++ b/SOURCES/0303-systemd-dracut-cmdline.sh-print-out-cmdline-in-one-l.patch @@ -0,0 +1,23 @@ +From 93a5a3d3ca6738e3f0282c4d3fc8be3f38f150d3 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 18 Aug 2015 11:52:56 +0200 +Subject: [PATCH] systemd/dracut-cmdline.sh: print out cmdline in one line + +--- + modules.d/98systemd/dracut-cmdline.sh | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/modules.d/98systemd/dracut-cmdline.sh b/modules.d/98systemd/dracut-cmdline.sh +index 8a5ab2ff..9d15663e 100755 +--- a/modules.d/98systemd/dracut-cmdline.sh ++++ b/modules.d/98systemd/dracut-cmdline.sh +@@ -15,8 +15,7 @@ type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh + [ -f /etc/initrd-release ] && . /etc/initrd-release + [ -n "$VERSION" ] && info "dracut-$VERSION" + +-info "Using kernel command line parameters:" +-getcmdline | vinfo ++info "Using kernel command line parameters:" $(getcmdline) + + getargbool 0 rd.udev.log-priority=info -d rd.udev.info -d -n -y rdudevinfo && echo 'udev_log="info"' >> /etc/udev/udev.conf + getargbool 0 rd.udev.log-priority=debug -d rd.udev.debug -d -n -y rdudevdebug && echo 'udev_log="debug"' >> /etc/udev/udev.conf diff --git a/SOURCES/0304-network-ifup.sh-let-dhcp-client-run-in-the-backgroun.patch b/SOURCES/0304-network-ifup.sh-let-dhcp-client-run-in-the-backgroun.patch new file mode 100644 index 0000000..7991cda --- /dev/null +++ b/SOURCES/0304-network-ifup.sh-let-dhcp-client-run-in-the-backgroun.patch @@ -0,0 +1,23 @@ +From fb2d643a385f1b02fbac6c2782b0026029c6bde7 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 18 Aug 2015 11:53:31 +0200 +Subject: [PATCH] network/ifup.sh: let dhcp client run in the background + +we need to renew the lease +--- + modules.d/40network/ifup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index 2f51e6d5..ab87578e 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -114,7 +114,7 @@ do_dhcp() { + info "Starting dhcp for interface $netif" + dhclient "$@" \ + ${_timeout:+-timeout $_timeout} \ +- -1 -q \ ++ -q \ + -cf /etc/dhclient.conf \ + -pf /tmp/dhclient.$netif.pid \ + -lf /tmp/dhclient.$netif.lease \ diff --git a/SOURCES/0305-network-ifup.sh-arping-for-static-IPv4-addresses.patch b/SOURCES/0305-network-ifup.sh-arping-for-static-IPv4-addresses.patch new file mode 100644 index 0000000..b76137c --- /dev/null +++ b/SOURCES/0305-network-ifup.sh-arping-for-static-IPv4-addresses.patch @@ -0,0 +1,24 @@ +From 38180271c587f3053710bf38a6cda829d3a7c00f Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 18 Aug 2015 12:07:41 +0200 +Subject: [PATCH] network/ifup.sh: arping for static IPv4 addresses + +--- + modules.d/40network/ifup.sh | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index ab87578e..8a5a6065 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -163,6 +163,10 @@ do_static() { + ip addr add $ip/$mask ${srv:+peer $srv} dev $netif + wait_for_ipv6_dad $netif + else ++ if ! arping -f -q -D -c 2 -I $netif $ip; then ++ warn "Duplicate address detected for $ip for interface $netif." ++ return 1 ++ fi + ip addr flush dev $netif + ip addr add $ip/$mask ${srv:+peer $srv} brd + dev $netif + fi diff --git a/SOURCES/0306-network-parse-ip-opts.sh-bind-enx-interface-to-the-M.patch b/SOURCES/0306-network-parse-ip-opts.sh-bind-enx-interface-to-the-M.patch new file mode 100644 index 0000000..b500afa --- /dev/null +++ b/SOURCES/0306-network-parse-ip-opts.sh-bind-enx-interface-to-the-M.patch @@ -0,0 +1,31 @@ +From 2eb3b00133d572183ca022b626d200549ce4ffa8 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 18 Aug 2015 12:13:55 +0200 +Subject: [PATCH] network/parse-ip-opts.sh: bind enx* interface to the MAC + +do it automatically for the persistent naming scheme +--- + modules.d/40network/parse-ip-opts.sh | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/modules.d/40network/parse-ip-opts.sh b/modules.d/40network/parse-ip-opts.sh +index faee8f99..7c403f79 100755 +--- a/modules.d/40network/parse-ip-opts.sh ++++ b/modules.d/40network/parse-ip-opts.sh +@@ -113,6 +113,16 @@ for p in $(getargs ip=); do + die "Server-ip or dhcp for netboot needed, but current arguments say otherwise" + fi + ++ if str_starts "$dev" "enx" && [ ${#dev} -eq 15 ]; then ++ printf -- "ifname=%s:%s:%s:%s:%s:%s:%s\n" \ ++ "$dev" \ ++ "${dev:3:2}" \ ++ "${dev:5:2}" \ ++ "${dev:7:2}" \ ++ "${dev:9:2}" \ ++ "${dev:11:2}" \ ++ "${dev:13:2}" >> /etc/cmdline.d/80-enx.conf ++ fi + done + + # put BOOTIF in IFACES to make sure it comes up diff --git a/SOURCES/0307-udev-rules-install-40-redhat.rules.patch b/SOURCES/0307-udev-rules-install-40-redhat.rules.patch new file mode 100644 index 0000000..8b74c7b --- /dev/null +++ b/SOURCES/0307-udev-rules-install-40-redhat.rules.patch @@ -0,0 +1,47 @@ +From 0c0abf97ccc2306a7089d53a0a1f92e80b2e733c Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 18 Aug 2015 12:25:53 +0200 +Subject: [PATCH] udev-rules: install 40-redhat.rules + +--- + modules.d/95udev-rules/module-setup.sh | 25 ++++++++++++++++++------- + 1 file changed, 18 insertions(+), 7 deletions(-) + +diff --git a/modules.d/95udev-rules/module-setup.sh b/modules.d/95udev-rules/module-setup.sh +index fdea8c6d..e0f2e381 100755 +--- a/modules.d/95udev-rules/module-setup.sh ++++ b/modules.d/95udev-rules/module-setup.sh +@@ -26,15 +26,26 @@ install() { + exit 1 + fi + +- inst_rules 50-udev-default.rules 60-persistent-storage.rules \ +- 61-persistent-storage-edd.rules 80-drivers.rules 95-udev-late.rules \ +- 60-pcmcia.rules \ +- 50-udev.rules 95-late.rules \ ++ inst_rules \ ++ 40-redhat.rules \ + 50-firmware.rules \ +- 70-uaccess.rules 71-seat.rules 73-seat-late.rules \ +- 75-net-description.rules 80-net-name-slot.rules \ ++ 50-udev-default.rules \ ++ 50-udev.rules \ + "$moddir/59-persistent-storage.rules" \ +- "$moddir/61-persistent-storage.rules" ++ /59-persistent-storage.rules \ ++ 60-pcmcia.rules \ ++ 60-persistent-storage.rules \ ++ 61-persistent-storage-edd.rules \ ++ "$moddir/61-persistent-storage.rules" \ ++ 70-uaccess.rules \ ++ 71-seat.rules \ ++ 73-seat-late.rules \ ++ 75-net-description.rules \ ++ 80-drivers.rules \ ++ 80-net-name-slot.rules \ ++ 95-late.rules \ ++ 95-udev-late.rules \ ++ ${NULL} + + prepare_udev_rules 59-persistent-storage.rules 61-persistent-storage.rules + # debian udev rules diff --git a/SOURCES/0308-fcoe-cleanup-lldpad.patch b/SOURCES/0308-fcoe-cleanup-lldpad.patch new file mode 100644 index 0000000..0dd6edf --- /dev/null +++ b/SOURCES/0308-fcoe-cleanup-lldpad.patch @@ -0,0 +1,40 @@ +From 69c437dd1c3b877f60ced307068e01619124fef4 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 18 Aug 2015 12:27:32 +0200 +Subject: [PATCH] fcoe: cleanup lldpad + +Resolves: rhbz#1246217 +--- + modules.d/95fcoe/cleanup-fcoe.sh | 10 ++++++++++ + modules.d/95fcoe/module-setup.sh | 1 + + 2 files changed, 11 insertions(+) + create mode 100644 modules.d/95fcoe/cleanup-fcoe.sh + +diff --git a/modules.d/95fcoe/cleanup-fcoe.sh b/modules.d/95fcoe/cleanup-fcoe.sh +new file mode 100644 +index 00000000..5ff4d054 +--- /dev/null ++++ b/modules.d/95fcoe/cleanup-fcoe.sh +@@ -0,0 +1,10 @@ ++#!/bin/sh ++# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- ++# ex: ts=8 sw=4 sts=4 et filetype=sh ++ ++if [ -e /var/run/lldpad.pid ]; then ++ lldpad -k ++ mkdir -m 0755 -p /run/initramfs/state/dev/shm ++ cp /dev/shm/lldpad.state /run/initramfs/state/dev/shm/ > /dev/null 2>&1 ++ echo "files /dev/shm/lldpad.state" >> /run/initramfs/rwtab ++fi +diff --git a/modules.d/95fcoe/module-setup.sh b/modules.d/95fcoe/module-setup.sh +index ec573ea0..646cfa84 100755 +--- a/modules.d/95fcoe/module-setup.sh ++++ b/modules.d/95fcoe/module-setup.sh +@@ -28,6 +28,7 @@ install() { + inst "$moddir/fcoe-edd.sh" "/sbin/fcoe-edd" + inst "$moddir/fcoe-genrules.sh" "/sbin/fcoe-genrules.sh" + inst_hook cmdline 99 "$moddir/parse-fcoe.sh" ++ inst_hook cleanup 90 "$moddir/cleanup-fcoe.sh" + dracut_need_initqueue + } + diff --git a/SOURCES/0309-network-net-lib.sh-ibft-unset-gateway-or-dns-if-set-.patch b/SOURCES/0309-network-net-lib.sh-ibft-unset-gateway-or-dns-if-set-.patch new file mode 100644 index 0000000..ec4d918 --- /dev/null +++ b/SOURCES/0309-network-net-lib.sh-ibft-unset-gateway-or-dns-if-set-.patch @@ -0,0 +1,27 @@ +From 942d60d8afad4eb8b131a33fe9618e3e8392d33f Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 18 Aug 2015 12:40:01 +0200 +Subject: [PATCH] network/net-lib.sh:ibft unset gateway or dns, if set to + 0.0.0.0 + +--- + modules.d/40network/net-lib.sh | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index 44c1bf04..c8203567 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -236,9 +236,12 @@ ibft_to_cmdline() { + # skip not assigned ip adresses + [ "$ip" = "0.0.0.0" ] && continue + [ -e ${iface}/gateway ] && gw=$(read a < ${iface}/gateway; echo $a) ++ [ "$gateway" = "0.0.0.0" ] && unset $gateway + [ -e ${iface}/subnet-mask ] && mask=$(read a < ${iface}/subnet-mask; echo $a) + [ -e ${iface}/primary-dns ] && dns1=$(read a < ${iface}/primary-dns; echo $a) ++ [ "$dns1" = "0.0.0.0" ] && unset $dns1 + [ -e ${iface}/secondary-dns ] && dns2=$(read a < ${iface}/secondary-dns; echo $a) ++ [ "$dns2" = "0.0.0.0" ] && unset $dns2 + [ -e ${iface}/hostname ] && hostname=$(read a < ${iface}/hostname; echo $a) + if [ -n "$ip" ] && [ -n "$mask" ]; then + echo "ip=$ip::$gw:$mask:$hostname:$dev:none${dns1:+:$dns1}${dns2:+:$dns2}" diff --git a/SOURCES/0310-network-dhclient-exit-arping-immediatly-if-we-get-an.patch b/SOURCES/0310-network-dhclient-exit-arping-immediatly-if-we-get-an.patch new file mode 100644 index 0000000..6ed1ceb --- /dev/null +++ b/SOURCES/0310-network-dhclient-exit-arping-immediatly-if-we-get-an.patch @@ -0,0 +1,22 @@ +From d6bfa7052a620ebdd37f78655462120871c49ebd Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 18 Aug 2015 12:41:12 +0200 +Subject: [PATCH] network/dhclient: exit arping immediatly, if we get an answer + +--- + modules.d/40network/dhclient-script.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/40network/dhclient-script.sh b/modules.d/40network/dhclient-script.sh +index 12e2869f..18b41000 100755 +--- a/modules.d/40network/dhclient-script.sh ++++ b/modules.d/40network/dhclient-script.sh +@@ -117,7 +117,7 @@ case $reason in + read layer2 < /sys/class/net/$netif/device/layer2 + fi + if [ "$layer2" != "0" ]; then +- if ! arping -q -D -c 2 -I $netif $new_ip_address ; then ++ if ! arping -f -q -D -c 2 -I $netif $new_ip_address ; then + warn "Duplicate address detected for $new_ip_address while doing dhcp. retrying" + exit 1 + fi diff --git a/SOURCES/0311-dmraid-only-scan-once-because-of-one-device.patch b/SOURCES/0311-dmraid-only-scan-once-because-of-one-device.patch new file mode 100644 index 0000000..3c80dc8 --- /dev/null +++ b/SOURCES/0311-dmraid-only-scan-once-because-of-one-device.patch @@ -0,0 +1,40 @@ +From 80153acc0f8bbb3829575201e2a0ba3da41268a8 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 18 Aug 2015 15:04:31 +0200 +Subject: [PATCH] dmraid: only scan once because of one device + +--- + modules.d/90dmraid/61-dmraid-imsm.rules | 2 +- + modules.d/90dmraid/dmraid.sh | 7 +++++++ + 2 files changed, 8 insertions(+), 1 deletion(-) + +diff --git a/modules.d/90dmraid/61-dmraid-imsm.rules b/modules.d/90dmraid/61-dmraid-imsm.rules +index 33e060be..de7e97e5 100644 +--- a/modules.d/90dmraid/61-dmraid-imsm.rules ++++ b/modules.d/90dmraid/61-dmraid-imsm.rules +@@ -24,6 +24,6 @@ PROGRAM=="/bin/sh -c 'for i in $sys/$devpath/holders/dm-[0-9]*; do [ -e $$i ] && + ENV{DEVTYPE}!="partition", \ + RUN+="/sbin/partx -d --nr 1-1024 $env{DEVNAME}" + +-RUN+="/sbin/initqueue --onetime --unique --settled /sbin/dmraid_scan" ++RUN+="/sbin/initqueue --onetime --unique --settled /sbin/dmraid_scan $env{DEVNAME}" + + LABEL="dm_end" +diff --git a/modules.d/90dmraid/dmraid.sh b/modules.d/90dmraid/dmraid.sh +index 3753ddd7..ce9a6b20 100755 +--- a/modules.d/90dmraid/dmraid.sh ++++ b/modules.d/90dmraid/dmraid.sh +@@ -4,6 +4,13 @@ + + type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh + ++dev="$1" ++devenc=$(str_replace "$1" '/' '\2f') ++ ++[ -e /tmp/dmraid.$devenc ] && exit 0 ++ ++>/tmp/dmraid.$devenc ++ + DM_RAIDS=$(getargs rd.dm.uuid -d rd_DM_UUID=) + + if [ -n "$DM_RAIDS" ] || getargbool 0 rd.auto; then diff --git a/SOURCES/0312-test-TEST-04-FULL-SYSTEMD-create-root.sh-modprobe-bt.patch b/SOURCES/0312-test-TEST-04-FULL-SYSTEMD-create-root.sh-modprobe-bt.patch new file mode 100644 index 0000000..f4c2d40 --- /dev/null +++ b/SOURCES/0312-test-TEST-04-FULL-SYSTEMD-create-root.sh-modprobe-bt.patch @@ -0,0 +1,22 @@ +From 65977ef1d107c8741d9f2633b8618aa3aee2a49d Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 18 Aug 2015 15:05:11 +0200 +Subject: [PATCH] test/TEST-04-FULL-SYSTEMD/create-root.sh: modprobe btrfs + +why so ever... it used to load automatically +--- + test/TEST-04-FULL-SYSTEMD/create-root.sh | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/test/TEST-04-FULL-SYSTEMD/create-root.sh b/test/TEST-04-FULL-SYSTEMD/create-root.sh +index 86ad4491..bfec5bf1 100755 +--- a/test/TEST-04-FULL-SYSTEMD/create-root.sh ++++ b/test/TEST-04-FULL-SYSTEMD/create-root.sh +@@ -4,6 +4,7 @@ for x in 64-lvm.rules 70-mdadm.rules 99-mount-rules; do + > "/etc/udev/rules.d/$x" + done + rm -f -- /etc/lvm/lvm.conf ++modprobe btrfs + udevadm control --reload + set -e + # save a partition at the beginning for future flagging purposes diff --git a/SOURCES/0313-TEST-15-BTRFS-load-btrfs-module.patch b/SOURCES/0313-TEST-15-BTRFS-load-btrfs-module.patch new file mode 100644 index 0000000..02537c9 --- /dev/null +++ b/SOURCES/0313-TEST-15-BTRFS-load-btrfs-module.patch @@ -0,0 +1,21 @@ +From d9b5a98532b6823adb35f7c68766f4df9db8a3c9 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 18 Aug 2015 15:26:23 +0200 +Subject: [PATCH] TEST-15-BTRFS: load btrfs module + +--- + test/TEST-15-BTRFSRAID/create-root.sh | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/test/TEST-15-BTRFSRAID/create-root.sh b/test/TEST-15-BTRFSRAID/create-root.sh +index b92f9c00..ba3b54ec 100755 +--- a/test/TEST-15-BTRFSRAID/create-root.sh ++++ b/test/TEST-15-BTRFSRAID/create-root.sh +@@ -3,6 +3,7 @@ + for x in 64-lvm.rules 70-mdadm.rules 99-mount-rules; do + > "/etc/udev/rules.d/$x" + done ++modprobe btrfs + udevadm control --reload + # save a partition at the beginning for future flagging purposes + sfdisk -C 327800 -H 2 -S 32 -L /dev/sda <<EOF diff --git a/SOURCES/0314-network-ifup.sh-do_static-error-out-if-interface-cou.patch b/SOURCES/0314-network-ifup.sh-do_static-error-out-if-interface-cou.patch new file mode 100644 index 0000000..612eb67 --- /dev/null +++ b/SOURCES/0314-network-ifup.sh-do_static-error-out-if-interface-cou.patch @@ -0,0 +1,27 @@ +From 77f46adf5e5ab1f6da2e459bb55435d4b70842c5 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 19 Aug 2015 13:59:40 +0200 +Subject: [PATCH] network/ifup.sh:do_static(): error out, if interface could + not be brought up + +--- + modules.d/40network/ifup.sh | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index 8a5a6065..1ee89bf4 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -155,7 +155,11 @@ do_ipv6auto() { + do_static() { + strstr $ip '*:*:*' && load_ipv6 + +- linkup $netif ++ if ! linkup $netif; then ++ warn "Could bring interface $netif up!" ++ return 1 ++ fi ++ + [ -n "$macaddr" ] && ip link set address $macaddr dev $netif + [ -n "$mtu" ] && ip link set mtu $mtu dev $netif + if strstr $ip '*:*:*'; then diff --git a/SOURCES/0315-network-ifup.sh-do_static-error-out-if-IP-is-already.patch b/SOURCES/0315-network-ifup.sh-do_static-error-out-if-IP-is-already.patch new file mode 100644 index 0000000..ab4475f --- /dev/null +++ b/SOURCES/0315-network-ifup.sh-do_static-error-out-if-IP-is-already.patch @@ -0,0 +1,30 @@ +From 32770ca79a1f6828ca9fdf4b6841e6a6d4e4754a Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 19 Aug 2015 14:00:28 +0200 +Subject: [PATCH] network/ifup.sh:do_static(): error out, if IP is already + assigned + +--- + modules.d/40network/ifup.sh | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index 1ee89bf4..e51b453a 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -160,6 +160,15 @@ do_static() { + return 1 + fi + ++ ip route get "$ip" | { ++ read a rest ++ if [ "$a" = "local" ]; then ++ warn "Not assigning $ip to interface $netif, cause it is already assigned!" ++ return 1 ++ fi ++ return 0 ++ } || return 1 ++ + [ -n "$macaddr" ] && ip link set address $macaddr dev $netif + [ -n "$mtu" ] && ip link set mtu $mtu dev $netif + if strstr $ip '*:*:*'; then diff --git a/SOURCES/0316-crypt-module-setup.sh-fixed-parsing-crypttab-with-no.patch b/SOURCES/0316-crypt-module-setup.sh-fixed-parsing-crypttab-with-no.patch new file mode 100644 index 0000000..a893eb8 --- /dev/null +++ b/SOURCES/0316-crypt-module-setup.sh-fixed-parsing-crypttab-with-no.patch @@ -0,0 +1,37 @@ +From b70b81f1c4dc0cc13851feefe870788290cff0a7 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 19 Aug 2015 16:18:23 +0200 +Subject: [PATCH] crypt/module-setup.sh: fixed parsing crypttab with no ending + newline + +--- + dracut.sh | 2 +- + modules.d/90crypt/module-setup.sh | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/dracut.sh b/dracut.sh +index 90ac1fe9..65824ec7 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1045,7 +1045,7 @@ if [[ $hostonly ]]; then + [[ "$_d" -ef "$dev" ]] || continue + + if [[ -f /etc/crypttab ]]; then +- while read _mapper _a _p _o; do ++ while read _mapper _a _p _o || [ -n "$_mapper" ]; do + [[ $_mapper = \#* ]] && continue + [[ "$_d" -ef /dev/mapper/"$_mapper" ]] || continue + [[ "$_o" ]] || _o="$_p" +diff --git a/modules.d/90crypt/module-setup.sh b/modules.d/90crypt/module-setup.sh +index bd37d9a5..f8422fa9 100755 +--- a/modules.d/90crypt/module-setup.sh ++++ b/modules.d/90crypt/module-setup.sh +@@ -63,7 +63,7 @@ install() { + + if [[ $hostonly ]] && [[ -f /etc/crypttab ]]; then + # filter /etc/crypttab for the devices we need +- while read _mapper _dev _rest; do ++ while read _mapper _dev _rest || [ -n "$_mapper" ]; do + [[ $_mapper = \#* ]] && continue + [[ $_dev ]] || continue + diff --git a/SOURCES/0317-TEST-30-ISCSI-add-rd.scsi.firmware.patch b/SOURCES/0317-TEST-30-ISCSI-add-rd.scsi.firmware.patch new file mode 100644 index 0000000..275ce65 --- /dev/null +++ b/SOURCES/0317-TEST-30-ISCSI-add-rd.scsi.firmware.patch @@ -0,0 +1,64 @@ +From 310574f7eaf68412035eb19855afe4ce2973b784 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 25 Aug 2015 11:12:59 +0200 +Subject: [PATCH] TEST-30-ISCSI: add rd.scsi.firmware + +--- + test/TEST-30-ISCSI/test.sh | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh +index 92ddc860..fc4bdce9 100755 +--- a/test/TEST-30-ISCSI/test.sh ++++ b/test/TEST-30-ISCSI/test.sh +@@ -3,8 +3,9 @@ TEST_DESCRIPTION="root filesystem over iSCSI" + + KVERSION=${KVERSION-$(uname -r)} + +-DEBUGFAIL="rd.shell rd.break rd.debug loglevel=7 " + DEBUGFAIL="loglevel=1" ++#DEBUGFAIL="rd.shell rd.break rd.debug loglevel=7 " ++#DEBUGFAIL="rd.debug loglevel=7 " + #SERVER_DEBUG="rd.debug loglevel=7" + SERIAL="tcp:127.0.0.1:9999" + SERIAL="null" +@@ -70,6 +71,7 @@ do_test_run() { + run_client "netroot=iscsi target0"\ + "root=LABEL=singleroot netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target0" \ + "ip=192.168.50.101::192.168.50.1:255.255.255.0:iscsi-1:ens3:off" \ ++ "rd.iscsi.firmware" \ + "rd.iscsi.initiator=$initiator" \ + || return 1 + +@@ -79,6 +81,7 @@ do_test_run() { + "ip=192.168.51.101:::255.255.255.0::ens4:off" \ + "netroot=iscsi:192.168.51.1::::iqn.2009-06.dracut:target1" \ + "netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target2" \ ++ "rd.iscsi.firmware" \ + "rd.iscsi.initiator=$initiator" \ + || return 1 + +@@ -88,6 +91,7 @@ do_test_run() { + "ip=192.168.51.101:::255.255.255.0::ens4:off" \ + "netroot=iscsi:192.168.51.1::::iqn.2009-06.dracut:target1" \ + "netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target2" \ ++ "rd.iscsi.firmware" \ + "rd.iscsi.initiator=$initiator" \ + "rd.iscsi.waitnet=0" \ + || return 1 +@@ -98,6 +102,7 @@ do_test_run() { + "ip=192.168.51.101:::255.255.255.0::ens4:off" \ + "netroot=iscsi:192.168.51.1::::iqn.2009-06.dracut:target1" \ + "netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target2" \ ++ "rd.iscsi.firmware" \ + "rd.iscsi.initiator=$initiator" \ + "rd.iscsi.waitnet=0 rd.iscsi.testroute=0" \ + || return 1 +@@ -108,6 +113,7 @@ do_test_run() { + "ip=192.168.51.101::192.168.51.1:255.255.255.0::ens4:off" \ + "netroot=iscsi:192.168.51.1::::iqn.2009-06.dracut:target1" \ + "netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target2" \ ++ "rd.iscsi.firmware" \ + "rd.iscsi.initiator=$initiator" \ + "rd.iscsi.waitnet=0 rd.iscsi.testroute=0" \ + || return 1 diff --git a/SOURCES/0318-initqueue-add-online-queue.patch b/SOURCES/0318-initqueue-add-online-queue.patch new file mode 100644 index 0000000..0e3b7e0 --- /dev/null +++ b/SOURCES/0318-initqueue-add-online-queue.patch @@ -0,0 +1,31 @@ +From d3f61fb5cdaa56053ae8de0203a13722a7fe717a Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 25 Aug 2015 11:13:23 +0200 +Subject: [PATCH] initqueue: add online queue + +--- + modules.d/99base/initqueue.sh | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/modules.d/99base/initqueue.sh b/modules.d/99base/initqueue.sh +index 854a36a8..0f96fac4 100755 +--- a/modules.d/99base/initqueue.sh ++++ b/modules.d/99base/initqueue.sh +@@ -15,6 +15,8 @@ while [ $# -gt 0 ]; do + case "$1" in + --onetime) + onetime="yes";; ++ --online) ++ qname="/online";; + --settled) + qname="/settled";; + --finished) +@@ -48,7 +50,7 @@ shift + { + [ -n "$onetime" ] && echo '[ -e "$job" ] && rm -f -- "$job"' + [ -n "$env" ] && echo "$env" +- echo "$exe $@" ++ echo "$exe" "$@" + } > "/tmp/$$-${job}.sh" + + mv -f "/tmp/$$-${job}.sh" "$hookdir/initqueue${qname}/${job}.sh" diff --git a/SOURCES/0319-dracut.spec-raise-systemd-requirement-to-219.patch b/SOURCES/0319-dracut.spec-raise-systemd-requirement-to-219.patch new file mode 100644 index 0000000..4ae35ea --- /dev/null +++ b/SOURCES/0319-dracut.spec-raise-systemd-requirement-to-219.patch @@ -0,0 +1,23 @@ +From 35f40b75e444adae3b3c9bb610d635d9c17a753d Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 25 Aug 2015 11:13:38 +0200 +Subject: [PATCH] dracut.spec: raise systemd requirement to >= 219 + +needs systemd-escape +--- + dracut.spec | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dracut.spec b/dracut.spec +index d22f5861..ad737c25 100644 +--- a/dracut.spec ++++ b/dracut.spec +@@ -94,7 +94,7 @@ Requires: kpartx + + %if 0%{?fedora} || 0%{?rhel} > 6 + Requires: util-linux >= 2.21 +-Requires: systemd >= 199 ++Requires: systemd >= 219 + Requires: procps-ng + Conflicts: grubby < 8.23 + %else diff --git a/SOURCES/0320-iscsi-iscsiroot.sh-handle-firmware-in-online-queue.patch b/SOURCES/0320-iscsi-iscsiroot.sh-handle-firmware-in-online-queue.patch new file mode 100644 index 0000000..1029cf7 --- /dev/null +++ b/SOURCES/0320-iscsi-iscsiroot.sh-handle-firmware-in-online-queue.patch @@ -0,0 +1,58 @@ +From 3bd3bbec319eccd28145f77e42b83b479286ff34 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 25 Aug 2015 11:14:38 +0200 +Subject: [PATCH] iscsi/iscsiroot.sh: handle firmware in online queue + +otherwise it does not get called, if no netroot is set +--- + modules.d/95iscsi/iscsiroot.sh | 32 +++++++++++++++----------------- + 1 file changed, 15 insertions(+), 17 deletions(-) + +diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh +index b7370f6f..7688b282 100755 +--- a/modules.d/95iscsi/iscsiroot.sh ++++ b/modules.d/95iscsi/iscsiroot.sh +@@ -238,28 +238,26 @@ if [ "$netif" = "timeout" ] && all_ifaces_up; then + sleep 2 + fi + +-# loop over all netroot parameter +-netroot=$(getarg netroot) +-if [ $? -eq 0 ] && [ "$netroot" != "dhcp" ]; then +- for nroot in $(getargs netroot); do +- [ "${nroot%%:*}" = "iscsi" ] || continue +- nroot="${nroot##iscsi:}" +- if [ -n "$nroot" ]; then +- handle_netroot "$nroot" +- ret=$(($ret + $?)) +- fi +- done ++if [ "$netif" = "online" ]; then + if getargbool 0 rd.iscsi.firmware -d -y iscsi_firmware ; then + handle_firmware +- ret=$(($ret + $?)) ++ ret=$? + fi + else +- if [ -n "$iroot" ]; then +- handle_netroot "$iroot" +- ret=$? ++ # loop over all netroot parameter ++ nroot=$(getarg netroot) ++ if [ $? -eq 0 ] && [ "$nroot" != "dhcp" ]; then ++ for nroot in $(getargs netroot); do ++ [ "${nroot%%:*}" = "iscsi" ] || continue ++ nroot="${nroot##iscsi:}" ++ if [ -n "$nroot" ]; then ++ handle_netroot "$nroot" ++ ret=$(($ret + $?)) ++ fi ++ done + else +- if getargbool 0 rd.iscsi.firmware -d -y iscsi_firmware ; then +- handle_firmware ++ if [ -n "$iroot" ]; then ++ handle_netroot "$iroot" + ret=$? + fi + fi diff --git a/SOURCES/0321-iscsi-parse-iscsiroot.sh-do-not-modify-netroot.patch b/SOURCES/0321-iscsi-parse-iscsiroot.sh-do-not-modify-netroot.patch new file mode 100644 index 0000000..10ae568 --- /dev/null +++ b/SOURCES/0321-iscsi-parse-iscsiroot.sh-do-not-modify-netroot.patch @@ -0,0 +1,45 @@ +From 197e4c90b95f2d9e57104d3b462918c335494697 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 25 Aug 2015 11:15:59 +0200 +Subject: [PATCH] iscsi/parse-iscsiroot.sh: do not modify netroot + +--- + modules.d/95iscsi/parse-iscsiroot.sh | 17 +++++++++++++---- + 1 file changed, 13 insertions(+), 4 deletions(-) + +diff --git a/modules.d/95iscsi/parse-iscsiroot.sh b/modules.d/95iscsi/parse-iscsiroot.sh +index 91cd4630..e9444a5f 100755 +--- a/modules.d/95iscsi/parse-iscsiroot.sh ++++ b/modules.d/95iscsi/parse-iscsiroot.sh +@@ -16,10 +16,17 @@ + # This script is sourced, so root should be set. But let's be paranoid + [ -z "$root" ] && root=$(getarg root=) + if [ -z "$netroot" ]; then +- for netroot in $(getargs netroot=); do +- [ "${netroot%%:*}" = "iscsi" ] && break ++ for nroot in $(getargs netroot=); do ++ [ "${nroot%%:*}" = "iscsi" ] && break + done +- [ "${netroot%%:*}" = "iscsi" ] || unset netroot ++ if [ "${nroot%%:*}" = "iscsi" ]; then ++ netroot="$nroot" ++ else ++ for nroot in $(getargs netroot=); do ++ [ "${nroot%%:*}" = "dhcp" ] && break ++ done ++ netroot="$nroot" ++ fi + fi + [ -z "$iscsiroot" ] && iscsiroot=$(getarg iscsiroot=) + [ -z "$iscsi_firmware" ] && getargbool 0 rd.iscsi.firmware -y iscsi_firmware && iscsi_firmware="1" +@@ -65,7 +72,9 @@ fi + + # iscsi_firmware does not need argument checking + if [ -n "$iscsi_firmware" ] || getargbool 0 rd.iscsi.ibft -d "ip=ibft"; then +- [ -z "$netroot" ] && netroot=iscsi: ++ if [ "$root" != "dhcp" ] && [ "$netroot" != "dhcp" ]; then ++ [ -z "$netroot" ] && netroot=iscsi: ++ fi + modprobe -b -q iscsi_boot_sysfs 2>/dev/null + modprobe -b -q iscsi_ibft + # if no ip= is given, but firmware diff --git a/SOURCES/0322-iscsi-parse-iscsiroot.sh-handle-firmware-in-online-q.patch b/SOURCES/0322-iscsi-parse-iscsiroot.sh-handle-firmware-in-online-q.patch new file mode 100644 index 0000000..a4057ca --- /dev/null +++ b/SOURCES/0322-iscsi-parse-iscsiroot.sh-handle-firmware-in-online-q.patch @@ -0,0 +1,28 @@ +From 7f59cbd31817c81fa5aec9f86c33dfe1ce23ec6a Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 25 Aug 2015 11:16:29 +0200 +Subject: [PATCH] iscsi/parse-iscsiroot.sh: handle firmware in online queue + +--- + modules.d/95iscsi/parse-iscsiroot.sh | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/modules.d/95iscsi/parse-iscsiroot.sh b/modules.d/95iscsi/parse-iscsiroot.sh +index e9444a5f..13a95023 100755 +--- a/modules.d/95iscsi/parse-iscsiroot.sh ++++ b/modules.d/95iscsi/parse-iscsiroot.sh +@@ -79,11 +79,11 @@ if [ -n "$iscsi_firmware" ] || getargbool 0 rd.iscsi.ibft -d "ip=ibft"; then + modprobe -b -q iscsi_ibft + # if no ip= is given, but firmware + echo "[ -f '/tmp/iscsistarted-firmware' ]" > $hookdir/initqueue/finished/iscsi_started.sh +- initqueue --unique --onetime --timeout /sbin/iscsiroot timeout "$netroot" "$NEWROOT" +- initqueue --unique --onetime --settled /sbin/iscsiroot dummy "'$netroot'" "'$NEWROOT'" ++ initqueue --unique --online /sbin/iscsiroot online "iscsi:" "$NEWROOT" ++ initqueue --unique --onetime --timeout /sbin/iscsiroot timeout "iscsi:" "$NEWROOT" ++ initqueue --unique --onetime --settled /sbin/iscsiroot online "iscsi:" "'$NEWROOT'" + fi + +- + [ -z "$netroot" ] || [ "${netroot%%:*}" = "iscsi" ] || return 1 + + initqueue --unique --onetime --timeout /sbin/iscsiroot timeout "$netroot" "$NEWROOT" diff --git a/SOURCES/0323-iscsi-parse-iscsiroot.sh-restart-iscsid-with-try-res.patch b/SOURCES/0323-iscsi-parse-iscsiroot.sh-restart-iscsid-with-try-res.patch new file mode 100644 index 0000000..81b57d7 --- /dev/null +++ b/SOURCES/0323-iscsi-parse-iscsiroot.sh-restart-iscsid-with-try-res.patch @@ -0,0 +1,34 @@ +From a6befb52eb5eeb87c0c41303fe08e50bd2fde0d3 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 25 Aug 2015 11:16:46 +0200 +Subject: [PATCH] iscsi/parse-iscsiroot.sh: restart iscsid with try-restart + +--- + modules.d/95iscsi/parse-iscsiroot.sh | 7 ++----- + 1 file changed, 2 insertions(+), 5 deletions(-) + +diff --git a/modules.d/95iscsi/parse-iscsiroot.sh b/modules.d/95iscsi/parse-iscsiroot.sh +index 13a95023..6dd929f3 100755 +--- a/modules.d/95iscsi/parse-iscsiroot.sh ++++ b/modules.d/95iscsi/parse-iscsiroot.sh +@@ -105,7 +105,7 @@ if [ -n "$netroot" ] && [ "$root" != "/dev/root" ] && [ "$root" != "dhcp" ]; the + fi + fi + +-if arg=$(getarg rd.iscsi.initiator -d iscsi_initiator=) && [ -n "$arg" ]; then ++if arg=$(getarg rd.iscsi.initiator -d iscsi_initiator=) && [ -n "$arg" ] && ! [ -f /run/initiatorname.iscsi ] ; then + iscsi_initiator=$arg + echo "InitiatorName=$iscsi_initiator" > /run/initiatorname.iscsi + ln -fs /run/initiatorname.iscsi /dev/.initiatorname.iscsi +@@ -123,10 +123,7 @@ if [ -z $iscsi_initiator ] && [ -f /sys/firmware/ibft/initiator/initiator-name ] + mkdir -p /etc/iscsi + ln -fs /run/initiatorname.iscsi /etc/iscsi/initiatorname.iscsi + > /tmp/iscsi_set_initiator +- if systemctl --quiet is-active iscsid.service; then +- systemctl restart iscsid +- sleep 1 +- fi ++ systemctl try-restart iscsid && sleep 1 + fi + + diff --git a/SOURCES/0324-network-ifup.sh-save-return-value-of-ifup.patch b/SOURCES/0324-network-ifup.sh-save-return-value-of-ifup.patch new file mode 100644 index 0000000..9ab952b --- /dev/null +++ b/SOURCES/0324-network-ifup.sh-save-return-value-of-ifup.patch @@ -0,0 +1,30 @@ +From b4006781e8a59dc69a0dd3836fce137f08b23001 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 25 Aug 2015 11:20:30 +0200 +Subject: [PATCH] network/ifup.sh: save return value of ifup + +--- + modules.d/40network/ifup.sh | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index e51b453a..2562af61 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -396,6 +396,7 @@ for p in $(getargs ip=); do + do_static ;; + esac + done ++ ret=$? + + > /tmp/net.${netif}.up + +@@ -403,7 +404,7 @@ for p in $(getargs ip=); do + dhcp|on|any|dhcp6) + ;; + *) +- if [ $? -eq 0 ]; then ++ if [ $ret -eq 0 ]; then + setup_net $netif + source_hook initqueue/online $netif + if [ -z "$manualup" ]; then diff --git a/SOURCES/0325-network-also-mark-interfaces-up-with-their-MAC.patch b/SOURCES/0325-network-also-mark-interfaces-up-with-their-MAC.patch new file mode 100644 index 0000000..d9b30d0 --- /dev/null +++ b/SOURCES/0325-network-also-mark-interfaces-up-with-their-MAC.patch @@ -0,0 +1,50 @@ +From 53537f4d23091457f644ab8b3edf09c2dca4351c Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 25 Aug 2015 11:30:00 +0200 +Subject: [PATCH] network: also mark interfaces up with their MAC + +--- + modules.d/40network/dhclient-script.sh | 7 +++++++ + modules.d/40network/ifup.sh | 4 ++++ + 2 files changed, 11 insertions(+) + +diff --git a/modules.d/40network/dhclient-script.sh b/modules.d/40network/dhclient-script.sh +index 18b41000..761b0cd2 100755 +--- a/modules.d/40network/dhclient-script.sh ++++ b/modules.d/40network/dhclient-script.sh +@@ -139,6 +139,10 @@ case $reason in + + echo "[ -f /tmp/net.$netif.did-setup ]" > $hookdir/initqueue/finished/dhclient-$netif.sh + >/tmp/net.$netif.up ++ if [ -e /sys/class/net/${netif}/address ]; then ++ > /tmp/net.$(cat /sys/class/net/${netif}/address).up ++ fi ++ + ;; + + RENEW|REBIND) +@@ -171,6 +175,9 @@ case $reason in + + echo "[ -f /tmp/net.$netif.did-setup ]" > $hookdir/initqueue/finished/dhclient-$netif.sh + >/tmp/net.$netif.up ++ if [ -e /sys/class/net/${netif}/address ]; then ++ > /tmp/net.$(cat /sys/class/net/${netif}/address).up ++ fi + ;; + + RENEW6|REBIND6) +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index 2562af61..d944126c 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -400,6 +400,10 @@ for p in $(getargs ip=); do + + > /tmp/net.${netif}.up + ++ if [ -e /sys/class/net/${netif}/address ]; then ++ > /tmp/net.$(cat /sys/class/net/${netif}/address).up ++ fi ++ + case $autoconf in + dhcp|on|any|dhcp6) + ;; diff --git a/SOURCES/0326-network-ifup.sh-only-use-dhcp-on-unknown-interfaces-.patch b/SOURCES/0326-network-ifup.sh-only-use-dhcp-on-unknown-interfaces-.patch new file mode 100644 index 0000000..eb79ac9 --- /dev/null +++ b/SOURCES/0326-network-ifup.sh-only-use-dhcp-on-unknown-interfaces-.patch @@ -0,0 +1,23 @@ +From 7c24815034241e490422691b5f18671c4b9812a9 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 25 Aug 2015 11:37:16 +0200 +Subject: [PATCH] network/ifup.sh: only use dhcp on unknown interfaces for + ip=dhcp + +--- + modules.d/40network/ifup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index d944126c..005c2cc9 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -433,7 +433,7 @@ if [ ! -e /tmp/net.${netif}.up ]; then + if getargs 'ip=dhcp6'; then + load_ipv6 + do_dhcp -6 +- else ++ elif getargs 'ip=dhcp'; then + do_dhcp -4 + fi + fi diff --git a/SOURCES/0327-multipath-add-hostonly-multipath.conf.patch b/SOURCES/0327-multipath-add-hostonly-multipath.conf.patch new file mode 100644 index 0000000..d8969fc --- /dev/null +++ b/SOURCES/0327-multipath-add-hostonly-multipath.conf.patch @@ -0,0 +1,83 @@ +From 3d1bd59eb09780fe156bb24fc6709ce844f68052 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 25 Aug 2015 13:49:10 +0200 +Subject: [PATCH] multipath: add hostonly multipath.conf + +Resolves: rhbz#994702 +--- + modules.d/90multipath/module-setup.sh | 43 ++++++++++++++++++++++----- + 1 file changed, 35 insertions(+), 8 deletions(-) + +diff --git a/modules.d/90multipath/module-setup.sh b/modules.d/90multipath/module-setup.sh +index acfc56f8..4971d18d 100755 +--- a/modules.d/90multipath/module-setup.sh ++++ b/modules.d/90multipath/module-setup.sh +@@ -2,18 +2,29 @@ + # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- + # ex: ts=8 sw=4 sts=4 et filetype=sh + ++is_mpath() { ++ local _dev=$1 ++ [ -e /sys/dev/block/$_dev/dm/uuid ] || return 1 ++ [[ $(cat /sys/dev/block/$_dev/dm/uuid) =~ mpath- ]] && return 0 ++ return 1 ++} ++ ++majmin_to_mpath_dev() { ++ local _dev ++ for i in `ls -1 /dev/mapper/mpath*`; do ++ dev=$(get_maj_min $i) ++ if [ "$dev" = "$1" ]; then ++ echo $i ++ return ++ fi ++ done ++} ++ + check() { + local _rootdev + # if there's no multipath binary, no go. + require_binaries multipath || return 1 + +- is_mpath() { +- local _dev=$1 +- [ -e /sys/dev/block/$_dev/dm/uuid ] || return 1 +- [[ $(cat /sys/dev/block/$_dev/dm/uuid) =~ mpath- ]] && return 0 +- return 1 +- } +- + [[ $hostonly ]] || [[ $mount_needs ]] && { + for_each_host_dev_and_slaves is_mpath || return 255 + } +@@ -68,7 +79,18 @@ installkernel() { + } + + install() { +- local _f ++ local _f _allow ++ add_hostonly_mpath_conf() { ++ is_mpath $1 && { ++ local _dev ++ ++ _dev=$(majmin_to_mpath_dev $1) ++ [ -z "$_dev" ] && return ++ strstr "$_allow" "$_dev" && return ++ _allow="$_allow --allow $_dev" ++ } ++ } ++ + inst_multiple -o \ + dmsetup \ + kpartx \ +@@ -82,6 +104,11 @@ install() { + /etc/multipath.conf \ + /etc/multipath/* + ++ [[ $hostonly ]] && { ++ for_each_host_dev_and_slaves_all add_hostonly_mpath_conf ++ [ -n "$_allow" ] && mpathconf $_allow --outfile ${initdir}/etc/multipath.conf ++ } ++ + inst $(command -v partx) /sbin/partx + + inst_libdir_file "libmultipath*" "multipath/*" diff --git a/SOURCES/0328-cms-cmsifup.sh-do-not-use-ifup-m.patch b/SOURCES/0328-cms-cmsifup.sh-do-not-use-ifup-m.patch new file mode 100644 index 0000000..a3e0174 --- /dev/null +++ b/SOURCES/0328-cms-cmsifup.sh-do-not-use-ifup-m.patch @@ -0,0 +1,20 @@ +From 0852c38b7a2b893e4f9e5894ba09eebc649f047f Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 1 Sep 2015 17:21:53 +0200 +Subject: [PATCH] cms/cmsifup.sh: do not use ifup -m + +we don't want to bring the interface up several times +--- + modules.d/80cms/cmsifup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/80cms/cmsifup.sh b/modules.d/80cms/cmsifup.sh +index b3616504..9ffe971a 100755 +--- a/modules.d/80cms/cmsifup.sh ++++ b/modules.d/80cms/cmsifup.sh +@@ -37,4 +37,4 @@ fi + IFACES="$IFACES $DEVICE" + echo "$IFACES" >> /tmp/net.ifaces + +-ifup $DEVICE -m ++exec ifup "$DEVICE" diff --git a/SOURCES/0329-network-ifup-fix-warning-about-not-bringing-interfac.patch b/SOURCES/0329-network-ifup-fix-warning-about-not-bringing-interfac.patch new file mode 100644 index 0000000..1ec2937 --- /dev/null +++ b/SOURCES/0329-network-ifup-fix-warning-about-not-bringing-interfac.patch @@ -0,0 +1,22 @@ +From 70f3c07846e92d11484a1f7b5cb84aacc47489b4 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 1 Sep 2015 17:22:37 +0200 +Subject: [PATCH] network/ifup: fix warning about not bringing interface up + +--- + modules.d/40network/ifup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index 005c2cc9..db9fb085 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -156,7 +156,7 @@ do_static() { + strstr $ip '*:*:*' && load_ipv6 + + if ! linkup $netif; then +- warn "Could bring interface $netif up!" ++ warn "Could not bring interface $netif up!" + return 1 + fi + diff --git a/SOURCES/0330-network-net-lib.sh-fix-wait_for_if_up.patch b/SOURCES/0330-network-net-lib.sh-fix-wait_for_if_up.patch new file mode 100644 index 0000000..d5055ac --- /dev/null +++ b/SOURCES/0330-network-net-lib.sh-fix-wait_for_if_up.patch @@ -0,0 +1,39 @@ +From d8572e0bf4d49a8d2ec71726d0fd38d1c73ca3f7 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 1 Sep 2015 17:22:56 +0200 +Subject: [PATCH] network/net-lib.sh: fix wait_for_if_up() + +wait for <*UP*> and not "state UP" + +state can be UNKNOWN +--- + modules.d/40network/net-lib.sh | 16 +++++++++++++++- + 1 file changed, 15 insertions(+), 1 deletion(-) + +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index c8203567..6034a091 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -523,7 +523,21 @@ wait_for_if_up() { + + while [ $cnt -lt $timeout ]; do + li=$(ip -o link show up dev $1) +- [ -n "$li" ] && [ -z "${li##*state UP*}" ] && return 0 ++ if [ -n "$li" ]; then ++ case "$li" in ++ *\<UP*) ++ return 0;; ++ *\<*,UP\>*) ++ return 0;; ++ *\<*,UP,*\>*) ++ return 0;; ++ esac ++ fi ++ if strstr "$li" "LOWER_UP" \ ++ && strstr "$li" "state UNKNOWN" \ ++ && ! strstr "$li" "DORMANT"; then ++ return 0 ++ fi + sleep 0.1 + cnt=$(($cnt+1)) + done diff --git a/SOURCES/0331-network-net-lib.sh-fix-IPv6-route-parsing.patch b/SOURCES/0331-network-net-lib.sh-fix-IPv6-route-parsing.patch new file mode 100644 index 0000000..02113de --- /dev/null +++ b/SOURCES/0331-network-net-lib.sh-fix-IPv6-route-parsing.patch @@ -0,0 +1,22 @@ +From a4c47ce0ddc7f7b46c2395709cf83f731f90685b Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 1 Sep 2015 17:25:34 +0200 +Subject: [PATCH] network/net-lib.sh: fix IPv6 route parsing + +--- + modules.d/40network/net-lib.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index 6034a091..9d22ec1c 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -121,7 +121,7 @@ setup_net() { + route_to_var "$_p" || continue + [ -n "$route_dev" ] && [ "$route_dev" != "$netif" ] && continue + ip route add "$route_mask" ${route_gw:+via "$route_gw"} ${route_dev:+dev "$route_dev"} +- if strstr ":" "$route_mask"; then ++ if strstr "$route_mask" ":"; then + printf -- "%s\n" "$route_mask ${route_gw:+via $route_gw} ${route_dev:+dev $route_dev}" \ + > /tmp/net.route6."$netif" + else diff --git a/SOURCES/0332-network-ifup-do-DHCP-for-BOOTDEV.patch b/SOURCES/0332-network-ifup-do-DHCP-for-BOOTDEV.patch new file mode 100644 index 0000000..c1b0873 --- /dev/null +++ b/SOURCES/0332-network-ifup-do-DHCP-for-BOOTDEV.patch @@ -0,0 +1,39 @@ +From 7316d68353cfd6e08f007d10ea3e32fa4d083487 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 1 Sep 2015 19:05:37 +0200 +Subject: [PATCH] network/ifup: do DHCP for BOOTDEV + +--- + modules.d/40network/ifup.sh | 19 ++++++++++++++----- + 1 file changed, 14 insertions(+), 5 deletions(-) + +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index db9fb085..0471c425 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -430,11 +430,20 @@ fi + + # no ip option directed at our interface? + if [ ! -e /tmp/net.${netif}.up ]; then +- if getargs 'ip=dhcp6'; then +- load_ipv6 +- do_dhcp -6 +- elif getargs 'ip=dhcp'; then +- do_dhcp -4 ++ if [ -e /tmp/net.bootdev ]; then ++ BOOTDEV=$(cat /tmp/net.bootdev) ++ if [ "$netif" = "$BOOTDEV" ] || [ "$BOOTDEV" = "$(cat /sys/class/net/${netif}/address)" ]; then ++ load_ipv6 ++ do_dhcp ++ fi ++ else ++ if getargs 'ip=dhcp6'; then ++ load_ipv6 ++ do_dhcp -6 ++ fi ++ if getargs 'ip=dhcp'; then ++ do_dhcp -4 ++ fi + fi + fi + diff --git a/SOURCES/0333-qemu-add-spapr-vscsi-kernel-module.patch b/SOURCES/0333-qemu-add-spapr-vscsi-kernel-module.patch new file mode 100644 index 0000000..04da416 --- /dev/null +++ b/SOURCES/0333-qemu-add-spapr-vscsi-kernel-module.patch @@ -0,0 +1,20 @@ +From 2182945a9e02683fe04654150a55618d0943ae28 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 1 Sep 2015 20:27:13 +0200 +Subject: [PATCH] qemu: add spapr-vscsi kernel module + +--- + modules.d/90qemu/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/90qemu/module-setup.sh b/modules.d/90qemu/module-setup.sh +index 67796429..64eac9ed 100755 +--- a/modules.d/90qemu/module-setup.sh ++++ b/modules.d/90qemu/module-setup.sh +@@ -25,5 +25,5 @@ installkernel() { + hostonly='' instmods \ + ata_piix ata_generic pata_acpi cdrom sr_mod ahci \ + virtio_blk virtio virtio_ring virtio_pci \ +- virtio_scsi virtio_console ++ virtio_scsi virtio_console spapr-vscsi + } diff --git a/SOURCES/0334-livenet-livenetroot.sh-fixed-error-condition.patch b/SOURCES/0334-livenet-livenetroot.sh-fixed-error-condition.patch new file mode 100644 index 0000000..4ec5a34 --- /dev/null +++ b/SOURCES/0334-livenet-livenetroot.sh-fixed-error-condition.patch @@ -0,0 +1,23 @@ +From b813b1b3064d4951c5403bb0f96480de9a355d8e Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 2 Sep 2015 09:47:35 +0200 +Subject: [PATCH] livenet/livenetroot.sh: fixed error condition + +copy&paste error +--- + modules.d/90livenet/livenetroot.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/90livenet/livenetroot.sh b/modules.d/90livenet/livenetroot.sh +index 2e36ee98..b7592bc0 100755 +--- a/modules.d/90livenet/livenetroot.sh ++++ b/modules.d/90livenet/livenetroot.sh +@@ -15,7 +15,7 @@ liveurl="${netroot#livenet:}" + info "fetching $liveurl" + imgfile=$(fetch_url "$liveurl") + +-if [ $? = 0 ]; then ++if [ $? != 0 ]; then + warn "failed to download live image: error $?" + exit 1 + fi diff --git a/SOURCES/0335-iscsi-parse-iscsiroot.sh-only-set-initiator-name-if-.patch b/SOURCES/0335-iscsi-parse-iscsiroot.sh-only-set-initiator-name-if-.patch new file mode 100644 index 0000000..b2a9eb5 --- /dev/null +++ b/SOURCES/0335-iscsi-parse-iscsiroot.sh-only-set-initiator-name-if-.patch @@ -0,0 +1,35 @@ +From eb87dc91d078ee942ef9c8bbc8e82f4ee4ccf0c6 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 3 Sep 2015 12:41:06 +0200 +Subject: [PATCH] iscsi/parse-iscsiroot.sh: only set initiator-name, if not + empty + +--- + modules.d/95iscsi/parse-iscsiroot.sh | 14 ++++++++------ + 1 file changed, 8 insertions(+), 6 deletions(-) + +diff --git a/modules.d/95iscsi/parse-iscsiroot.sh b/modules.d/95iscsi/parse-iscsiroot.sh +index 6dd929f3..6aa14f5b 100755 +--- a/modules.d/95iscsi/parse-iscsiroot.sh ++++ b/modules.d/95iscsi/parse-iscsiroot.sh +@@ -118,12 +118,14 @@ fi + # If not given on the cmdline and initiator-name available via iBFT + if [ -z $iscsi_initiator ] && [ -f /sys/firmware/ibft/initiator/initiator-name ] && ! [ -f /tmp/iscsi_set_initiator ]; then + iscsi_initiator=$(while read line || [ -n "$line" ]; do echo $line;done < /sys/firmware/ibft/initiator/initiator-name) +- echo "InitiatorName=$iscsi_initiator" > /run/initiatorname.iscsi +- rm -f /etc/iscsi/initiatorname.iscsi +- mkdir -p /etc/iscsi +- ln -fs /run/initiatorname.iscsi /etc/iscsi/initiatorname.iscsi +- > /tmp/iscsi_set_initiator +- systemctl try-restart iscsid && sleep 1 ++ if [ -n "$iscsi_initiator" ]; then ++ echo "InitiatorName=$iscsi_initiator" > /run/initiatorname.iscsi ++ rm -f /etc/iscsi/initiatorname.iscsi ++ mkdir -p /etc/iscsi ++ ln -fs /run/initiatorname.iscsi /etc/iscsi/initiatorname.iscsi ++ > /tmp/iscsi_set_initiator ++ systemctl try-restart iscsid && sleep 1 ++ fi + fi + + diff --git a/SOURCES/0336-network-move-ip-ibft-handling-to-network-module.patch b/SOURCES/0336-network-move-ip-ibft-handling-to-network-module.patch new file mode 100644 index 0000000..663c035 --- /dev/null +++ b/SOURCES/0336-network-move-ip-ibft-handling-to-network-module.patch @@ -0,0 +1,48 @@ +From b334c83e4abdc1dd87276fa7de4617cd349a5a4f Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 3 Sep 2015 12:41:44 +0200 +Subject: [PATCH] network: move "ip=ibft" handling to network module + +--- + modules.d/40network/module-setup.sh | 1 + + modules.d/40network/parse-ibft.sh | 2 ++ + modules.d/95iscsi/parse-iscsiroot.sh | 2 +- + 3 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh +index 3134b5ff..6cbbe8f7 100755 +--- a/modules.d/40network/module-setup.sh ++++ b/modules.d/40network/module-setup.sh +@@ -64,6 +64,7 @@ installkernel() { + =drivers/net/team \ + =drivers/net/ethernet \ + ecb arc4 bridge stp llc ipv6 bonding 8021q af_packet virtio_net ++ hostonly="" instmods iscsi_ibft crc32c iscsi_boot_sysfs + } + + install() { +diff --git a/modules.d/40network/parse-ibft.sh b/modules.d/40network/parse-ibft.sh +index 643313dc..6f7f4e95 100755 +--- a/modules.d/40network/parse-ibft.sh ++++ b/modules.d/40network/parse-ibft.sh +@@ -6,5 +6,7 @@ command -v getarg >/dev/null || . /lib/dracut-lib.sh + command -v ibft_to_cmdline >/dev/null || . /lib/net-lib.sh + + if getargbool 0 rd.iscsi.ibft -d "ip=ibft"; then ++ modprobe -b -q iscsi_boot_sysfs 2>/dev/null ++ modprobe -b -q iscsi_ibft + ibft_to_cmdline + fi +diff --git a/modules.d/95iscsi/parse-iscsiroot.sh b/modules.d/95iscsi/parse-iscsiroot.sh +index 6aa14f5b..9546f126 100755 +--- a/modules.d/95iscsi/parse-iscsiroot.sh ++++ b/modules.d/95iscsi/parse-iscsiroot.sh +@@ -71,7 +71,7 @@ if [ -n "$iscsiroot" ] ; then + fi + + # iscsi_firmware does not need argument checking +-if [ -n "$iscsi_firmware" ] || getargbool 0 rd.iscsi.ibft -d "ip=ibft"; then ++if [ -n "$iscsi_firmware" ]; then + if [ "$root" != "dhcp" ] && [ "$netroot" != "dhcp" ]; then + [ -z "$netroot" ] && netroot=iscsi: + fi diff --git a/SOURCES/0337-dracut.usage.asc-update-man-page.patch b/SOURCES/0337-dracut.usage.asc-update-man-page.patch new file mode 100644 index 0000000..cca31dc --- /dev/null +++ b/SOURCES/0337-dracut.usage.asc-update-man-page.patch @@ -0,0 +1,137 @@ +From c850879b862058a644a05f8fe2fc2206e0e317e8 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 3 Sep 2015 16:25:23 +0200 +Subject: [PATCH] dracut.usage.asc: update man page + +- clarify grub2 config for debugging +- clarify hostonly mode +--- + dracut.usage.asc | 74 +++++++++++++++--------------------------------- + 1 file changed, 23 insertions(+), 51 deletions(-) + +diff --git a/dracut.usage.asc b/dracut.usage.asc +index 15dc2440..45cbf120 100644 +--- a/dracut.usage.asc ++++ b/dracut.usage.asc +@@ -37,10 +37,14 @@ the --hostonly or -H option. Using this option, the resulting image will + contain only those dracut modules, kernel modules and filesystems, which are + needed to boot this specific machine. This has the drawback, that you can't put + the disk on another controller or machine, and that you can't switch to another +-root filesystem, without recreating the initramfs image. The usage of the +---hostonly option is only for experts and you will have to keep the broken +-pieces. At least keep a copy of a general purpose image (and corresponding +-kernel) as a fallback to rescue your system. ++root filesystem, without recreating the initramfs image. ++ ++[NOTE] ++=============================== ++On RHEL-7 the hostonly mode is the default mode. Generic "non-hostonly" images ++are created, if the dracut-config-generic rpm is installed. The rescue kernel ++entry in the bootloader menu is also a generic image. ++=============================== + + === Inspecting the Contents + To see the contents of the image created by dracut, you can use the lsinitrd +@@ -99,8 +103,9 @@ raid with encryption and LVM on top), as long as you specify the correct + filesystem LABEL or UUID on the kernel command line for your root device, dracut + will find it and boot from it. + +-The kernel command line usually can be configured in _/boot/grub2/grub.cfg_, if +-grub is your bootloader and it also can be edited in the real boot process in ++The kernel command line usually can be configured in _/boot/grub2/grub.cfg_ ++(or _/boot/efi/EFI/redhat/grub.cfg_ for EFI systems), if ++grub2 is your bootloader and it also can be edited in the real boot process in + the grub menu. + + The kernel command line can also be provided by the dhcp server with the +@@ -325,7 +330,8 @@ stick and mount that. Then you can store the output for later inspection. + In all cases, the following should be mentioned and attached to your bug report: + + * The exact kernel command-line used. Typically from the bootloader +-configuration file (e.g. _/boot/grub2/grub.cfg_) or from _/proc/cmdline_. ++configuration file (e.g. _/boot/grub2/grub.cfg_ (or _/boot/efi/EFI/redhat/grub.cfg_ for EFI systems)) ++or from _/proc/cmdline_. + * A copy of your disk partition information from _/etc/fstab_, which might be + obtained booting an old working initramfs or a rescue medium. + * Turn on dracut debugging (see _the 'debugging dracut' section_), and attach +@@ -359,49 +365,17 @@ Successfully debugging dracut will require some form of console + logging during the system boot. This section documents configuring a + serial console connection to record boot messages. + +-. First, enable serial console output for both the kernel and the bootloader. +-. Open the file _/boot/grub2/grub.cfg_ for editing. Below the line ''timeout=5'', add +-the following: +-+ +----- +-serial --unit=0 --speed=9600 +-terminal --timeout=5 serial console +----- +-+ +-. Also in _/boot/grub2/grub.cfg_, add the following boot arguemnts to the ''kernel'' ++. In _/boot/grub2/grub.cfg_ (or _/boot/efi/EFI/redhat/grub.cfg_ for EFI systems), ++add the following boot arguments to the ''linux16'' + line: + + + ---- + console=tty0 console=ttyS0,9600 + ---- + + +-. When finished, the _/boot/grub2/grub.cfg_ file should look similar to the example +-below. +-+ +----- +-default=0 +-timeout=5 +-serial --unit=0 --speed=9600 +-terminal --timeout=5 serial console +-title Fedora (2.6.29.5-191.fc11.x86_64) +- root (hd0,0) +- kernel /vmlinuz-2.6.29.5-191.fc11.x86_64 ro root=/dev/mapper/vg_uc1-lv_root console=tty0 console=ttyS0,9600 +- initrd /dracut-2.6.29.5-191.fc11.x86_64.img +----- +-+ + . More detailed information on how to configure the kernel for console output + can be found at + http://www.faqs.org/docs/Linux-HOWTO/Remote-Serial-Console-HOWTO.html#CONFIGURE-KERNEL. +-. Redirecting non-interactive output +-+ +--- +-NOTE: You can redirect all non-interactive output to _/dev/kmsg_ and the kernel +-will put it out on the console when it reaches the kernel buffer by doing +- +----- +-# exec >/dev/kmsg 2>&1 </dev/console +----- +--- + + [[using-the-dracut-shell]] + ==== Using the dracut shell +@@ -410,20 +384,18 @@ dracut offers a shell for interactive debugging in the event dracut fails to + locate your root filesystem. To enable the shell: + + . Add the boot parameter ''rd.shell'' to your bootloader configuration file +-(e.g. _/boot/grub2/grub.cfg_) ++(e.g. _/boot/grub2/grub.cfg_ (or _/boot/efi/EFI/redhat/grub.cfg_ for EFI systems)) + . Remove the boot arguments ''rhgb'' and ''quiet'' + + +-A sample _/boot/grub2/grub.cfg_ bootloader configuration file is listed below. ++A sample _grub.cfg_ bootloader configuration file snippet is listed below. + + + ---- +-default=0 +-timeout=5 +-serial --unit=0 --speed=9600 +-terminal --timeout=5 serial console +-title Fedora (2.6.29.5-191.fc11.x86_64) +- root (hd0,0) +- kernel /vmlinuz-2.6.29.5-191.fc11.x86_64 ro root=/dev/mapper/vg_uc1-lv_root console=tty0 rd.shell +- initrd /dracut-2.6.29.5-191.fc11.x86_64.img ++menuentry 'Red Hat Enterprise Linux Server (3.10.0-308.el7.x86_64) 7.0 (Maipo)' […] { ++ […] ++ linux16 /vmlinuz-3.10.0-308.el7.x86_64 ro root=/dev/mapper/vg_uc1-lv_root console=tty0 rd.shell ++ initrd16 /initramfs-3.10.0-308.el7.x86_64.img ++ […] ++} + ---- + + + . If system boot fails, you will be dropped into a shell as seen in the example diff --git a/SOURCES/0338-network-dhclient-script.sh-fix-RENEW.patch b/SOURCES/0338-network-dhclient-script.sh-fix-RENEW.patch new file mode 100644 index 0000000..44a1060 --- /dev/null +++ b/SOURCES/0338-network-dhclient-script.sh-fix-RENEW.patch @@ -0,0 +1,35 @@ +From 52845b168d0909d72b4c2f0b6511ed18877a31e8 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 8 Sep 2015 11:44:13 +0200 +Subject: [PATCH] network/dhclient-script.sh: fix RENEW + +Remove check, if interface is already up. It is for RENEW. + +new_prefix is apparently new_subnet_mask +--- + modules.d/40network/dhclient-script.sh | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +diff --git a/modules.d/40network/dhclient-script.sh b/modules.d/40network/dhclient-script.sh +index 761b0cd2..6d4b9dd1 100755 +--- a/modules.d/40network/dhclient-script.sh ++++ b/modules.d/40network/dhclient-script.sh +@@ -10,9 +10,6 @@ type ip_to_var >/dev/null 2>&1 || . /lib/net-lib.sh + # We already need a set netif here + netif=$interface + +-# Huh? Interface configured? +-[ -f "/tmp/net.$netif.up" ] && exit 0 +- + setup_interface() { + ip=$new_ip_address + mtu=$new_interface_mtu +@@ -151,7 +148,7 @@ case $reason in + [ -n "$new_max_life" ] && lease_time=$new_max_life + preferred_lft=$lease_time + [ -n "$new_preferred_life" ] && preferred_lft=$new_preferred_life +- ip -4 addr change ${new_ip_address}/${new_prefix} broadcast ${new_broadcast_address} dev ${interface} \ ++ ip -4 addr change ${new_ip_address}/${new_subnet_mask} broadcast ${new_broadcast_address} dev ${interface} \ + ${lease_time:+valid_lft $lease_time} ${preferred_lft:+preferred_lft ${preferred_lft}} \ + >/dev/null 2>&1 + ;; diff --git a/SOURCES/0339-network-add-all_ifaces_setup.patch b/SOURCES/0339-network-add-all_ifaces_setup.patch new file mode 100644 index 0000000..75243d6 --- /dev/null +++ b/SOURCES/0339-network-add-all_ifaces_setup.patch @@ -0,0 +1,32 @@ +From 63e75dc4cdb14e392e38a8973126c9a29b266411 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 10 Sep 2015 13:20:18 +0200 +Subject: [PATCH] network: add all_ifaces_setup() + +all_ifaces_up() is true, if all interfaces are up. + +all_ifaces_setup() is true, if all interfaces are up and the gateways +and nameserver are setup. +--- + modules.d/40network/net-lib.sh | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index 9d22ec1c..60d3579a 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -74,6 +74,14 @@ all_ifaces_up() { + done + } + ++all_ifaces_setup() { ++ local iface="" IFACES="" ++ [ -e "/tmp/net.ifaces" ] && read IFACES < /tmp/net.ifaces ++ for iface in $IFACES; do ++ [ -e /tmp/net.$iface.did-setup ] || return 1 ++ done ++} ++ + get_netroot_ip() { + local prefix="" server="" rest="" + splitsep "$1" ":" prefix server rest diff --git a/SOURCES/0340-iscsi-iscsiroot.sh-use-all_ifaces_setup.patch b/SOURCES/0340-iscsi-iscsiroot.sh-use-all_ifaces_setup.patch new file mode 100644 index 0000000..48efde5 --- /dev/null +++ b/SOURCES/0340-iscsi-iscsiroot.sh-use-all_ifaces_setup.patch @@ -0,0 +1,36 @@ +From 7cddfbbadbc40a4b6d331be25a3c38ad3a52239b Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 10 Sep 2015 13:21:53 +0200 +Subject: [PATCH] iscsi/iscsiroot.sh: use all_ifaces_setup() + +we want the route and gateway setup +--- + modules.d/95iscsi/iscsiroot.sh | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh +index 7688b282..424d2166 100755 +--- a/modules.d/95iscsi/iscsiroot.sh ++++ b/modules.d/95iscsi/iscsiroot.sh +@@ -108,7 +108,7 @@ handle_netroot() + parse_iscsi_root "$1" || return 1 + + # Bail out early, if there is no route to the destination +- if is_ip "$iscsi_target_ip" && [ "$netif" != "timeout" ] && ! all_ifaces_up && getargbool 1 rd.iscsi.testroute; then ++ if is_ip "$iscsi_target_ip" && [ "$netif" != "timeout" ] && ! all_ifaces_setup && getargbool 1 rd.iscsi.testroute; then + ip route get "$iscsi_target_ip" >/dev/null 2>&1 || return 0 + fi + +@@ -227,10 +227,10 @@ handle_netroot() + ret=0 + + if [ "$netif" != "timeout" ] && getargbool 1 rd.iscsi.waitnet; then +- all_ifaces_up || exit 0 ++ all_ifaces_setup || exit 0 + fi + +-if [ "$netif" = "timeout" ] && all_ifaces_up; then ++if [ "$netif" = "timeout" ] && all_ifaces_setup; then + # s.th. went wrong and the timeout script hits + # restart + systemctl restart iscsid diff --git a/SOURCES/0341-network-netroot.sh-better-handling-of-netroot-and-dh.patch b/SOURCES/0341-network-netroot.sh-better-handling-of-netroot-and-dh.patch new file mode 100644 index 0000000..d740eb2 --- /dev/null +++ b/SOURCES/0341-network-netroot.sh-better-handling-of-netroot-and-dh.patch @@ -0,0 +1,59 @@ +From 17cee31b115a146bca5519b6ac4b422080d764c7 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 10 Sep 2015 13:23:32 +0200 +Subject: [PATCH] network/netroot.sh: better handling of $netroot and dhcp + +if $netroot is emtpy, get it from cmdline + +check cmdline directly for root=dhcp(6) and netroot=dhcp(6) +--- + modules.d/40network/netroot.sh | 17 +++++++++++------ + 1 file changed, 11 insertions(+), 6 deletions(-) + +diff --git a/modules.d/40network/netroot.sh b/modules.d/40network/netroot.sh +index 8f6945fe..3aa5a0d2 100755 +--- a/modules.d/40network/netroot.sh ++++ b/modules.d/40network/netroot.sh +@@ -14,6 +14,11 @@ command -v setup_net >/dev/null || . /lib/net-lib.sh + # no sense in doing something if no (net)root info is available + # or root is already there + [ -d $NEWROOT/proc ] && exit 0 ++ ++if [ -z "$netroot" ]; then ++ netroot=$(getarg netroot=) ++fi ++ + [ -z "$netroot" ] && exit 1 + + # Set or override primary interface +@@ -35,7 +40,7 @@ esac + # Figure out the handler for root=dhcp by recalling all netroot cmdline + # handlers when this is not called from manually network bringing up. + if [ -z "$2" ]; then +- if [ "$netroot" = "dhcp" ] || [ "$netroot" = "dhcp6" ] ; then ++ if getarg "root=dhcp" || getarg "netroot=dhcp" || getarg "root=dhcp6" || getarg "netroot=dhcp6"; then + # Load dhcp options + [ -e /tmp/dhclient.$netif.dhcpopts ] && . /tmp/dhclient.$netif.dhcpopts + +@@ -47,6 +52,8 @@ if [ -z "$2" ]; then + exit 1 + fi + ++ rm -f -- $hookdir/initqueue/finished/dhcp.sh ++ + # Set netroot to new_root_path, so cmdline parsers don't call + netroot=$new_root_path + +@@ -76,9 +83,7 @@ source_hook netroot $netif + + # Run the handler; don't store the root, it may change from device to device + # XXX other variables to export? +-if $handler $netif $netroot $NEWROOT; then +- rm -f -- $hookdir/initqueue/finished/dhcp.sh +- # Network rootfs mount successful - save interface info for ifcfg etc. +- save_netinfo $netif +-fi ++[ -n "$handler" ] && "$handler" "$netif" "$netroot" "$NEWROOT" ++save_netinfo $netif ++ + exit 0 diff --git a/SOURCES/0342-iscsi-iscsiroot.sh-handle-iscsi_firmware-in-online-a.patch b/SOURCES/0342-iscsi-iscsiroot.sh-handle-iscsi_firmware-in-online-a.patch new file mode 100644 index 0000000..c0f15c9 --- /dev/null +++ b/SOURCES/0342-iscsi-iscsiroot.sh-handle-iscsi_firmware-in-online-a.patch @@ -0,0 +1,81 @@ +From fd3eddf06990a617a2f90b0a699947ab3faf2cc2 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 10 Sep 2015 13:25:13 +0200 +Subject: [PATCH] iscsi/iscsiroot.sh: handle iscsi_firmware in online and + timeout queue + +The return code of iscsi_firmware is broken, so set the marker +unconditionally. +--- + modules.d/95iscsi/iscsiroot.sh | 43 +++++++++++++++------------------- + 1 file changed, 19 insertions(+), 24 deletions(-) + +diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh +index 424d2166..ea1bead7 100755 +--- a/modules.d/95iscsi/iscsiroot.sh ++++ b/modules.d/95iscsi/iscsiroot.sh +@@ -45,29 +45,23 @@ fi + + handle_firmware() + { +- if ! [ -e /tmp/iscsistarted-firmware ]; then +- if ! iscsistart -f; then +- warn "iscistart: Could not get list of targets from firmware." +- return 1 +- fi ++ if ! iscsistart -f; then ++ warn "iscistart: Could not get list of targets from firmware." ++ return 1 ++ fi + +- for p in $(getargs rd.iscsi.param -d iscsi_param); do +- iscsi_param="$iscsi_param --param $p" +- done ++ for p in $(getargs rd.iscsi.param -d iscsi_param); do ++ iscsi_param="$iscsi_param --param $p" ++ done + +- if ! iscsistart -b $iscsi_param; then +- warn "'iscsistart -b $iscsi_param' failed" +- fi ++ if ! iscsistart -b $iscsi_param; then ++ warn "'iscsistart -b $iscsi_param' failed with return code $?" ++ fi + +- if [ -d /sys/class/iscsi_session ]; then +- echo 'started' > "/tmp/iscsistarted-iscsi:" +- echo 'started' > "/tmp/iscsistarted-firmware" +- else +- return 1 +- fi ++ echo 'started' > "/tmp/iscsistarted-iscsi:" ++ echo 'started' > "/tmp/iscsistarted-firmware" + +- need_shutdown +- fi ++ need_shutdown + return 0 + } + +@@ -238,15 +232,16 @@ if [ "$netif" = "timeout" ] && all_ifaces_setup; then + sleep 2 + fi + +-if [ "$netif" = "online" ]; then +- if getargbool 0 rd.iscsi.firmware -d -y iscsi_firmware ; then ++if getargbool 0 rd.iscsi.firmware -d -y iscsi_firmware ; then ++ if [ "$netif" = "timeout" ] || [ "$netif" = "online" ]; then + handle_firmware + ret=$? + fi +-else ++fi ++ ++if ! [ "$netif" = "online" ]; then + # loop over all netroot parameter +- nroot=$(getarg netroot) +- if [ $? -eq 0 ] && [ "$nroot" != "dhcp" ]; then ++ if nroot=$(getarg netroot) && [ "$nroot" != "dhcp" ]; then + for nroot in $(getargs netroot); do + [ "${nroot%%:*}" = "iscsi" ] || continue + nroot="${nroot##iscsi:}" diff --git a/SOURCES/0343-i18n-check-for-i18n_install_all-yes-rather-than-bein.patch b/SOURCES/0343-i18n-check-for-i18n_install_all-yes-rather-than-bein.patch new file mode 100644 index 0000000..656a17a --- /dev/null +++ b/SOURCES/0343-i18n-check-for-i18n_install_all-yes-rather-than-bein.patch @@ -0,0 +1,27 @@ +From 7c0b1d864dda88befa458b34d9408605883e2c74 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 14 Aug 2014 12:56:53 +0200 +Subject: [PATCH] i18n: check for $i18n_install_all == "yes" rather than being + set + +i18n_install_all="no" does not have the expected effect without this +patch + +(cherry picked from commit ae488efa5e6103ffc1be8b8782f8a1c7a5aa90b4) +--- + modules.d/10i18n/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/10i18n/module-setup.sh b/modules.d/10i18n/module-setup.sh +index 2c0a275c..4fd81162 100755 +--- a/modules.d/10i18n/module-setup.sh ++++ b/modules.d/10i18n/module-setup.sh +@@ -241,7 +241,7 @@ install() { + if checks; then + install_base + +- if [[ ${hostonly} ]] && ! [[ ${i18n_install_all} ]]; then ++ if [[ ${hostonly} ]] && ! [[ ${i18n_install_all} == "yes" ]]; then + install_local_i18n || install_all_kbd + else + install_all_kbd diff --git a/SOURCES/0344-dracut.sh-add-command-line-option-for-install_i18_al.patch b/SOURCES/0344-dracut.sh-add-command-line-option-for-install_i18_al.patch new file mode 100644 index 0000000..7ca60ee --- /dev/null +++ b/SOURCES/0344-dracut.sh-add-command-line-option-for-install_i18_al.patch @@ -0,0 +1,43 @@ +From 34b551a1c4d4513189807ee2a639c9214d887ddb Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 15 Sep 2015 16:04:09 +0200 +Subject: [PATCH] dracut.sh: add command line option for install_i18_all + +--no-hostonly-i18n -> install_i18n_all=yes +--hostonly-i18n -> install_i18n_all=no +--- + dracut.sh | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/dracut.sh b/dracut.sh +index 65824ec7..d5f864f9 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -369,6 +369,8 @@ rearrange_params() + --long noimageifnotneeded \ + --long early-microcode \ + --long no-early-microcode \ ++ --long no-hostonly-i18n \ ++ --long hostonly-i18n \ + -- "$@") + + if (( $? != 0 )); then +@@ -528,6 +530,10 @@ while :; do + hostonly_l="no" ;; + --hostonly-cmdline) + hostonly_cmdline_l="yes" ;; ++ --hostonly-i18n) ++ i18n_install_all_l="no" ;; ++ --no-hostonly-i18n) ++ i18n_install_all_l="yes" ;; + --no-hostonly-cmdline) + hostonly_cmdline_l="no" ;; + --persistent-policy) +@@ -769,6 +775,7 @@ stdloglvl=$((stdloglvl + verbosity_mod_l)) + [[ $prefix = "/" ]] && unset prefix + [[ $hostonly_l ]] && hostonly=$hostonly_l + [[ $hostonly_cmdline_l ]] && hostonly_cmdline=$hostonly_cmdline_l ++[[ $i18n_install_all_l ]] && i18n_install_all=$i18n_install_all_l + [[ $persistent_policy_l ]] && persistent_policy=$persistent_policy_l + [[ $use_fstab_l ]] && use_fstab=$use_fstab_l + [[ $mdadmconf_l ]] && mdadmconf=$mdadmconf_l diff --git a/SOURCES/0345-dracut.sh-do-not-create-microcode-if-no-firmware-is-.patch b/SOURCES/0345-dracut.sh-do-not-create-microcode-if-no-firmware-is-.patch new file mode 100644 index 0000000..e2501f2 --- /dev/null +++ b/SOURCES/0345-dracut.sh-do-not-create-microcode-if-no-firmware-is-.patch @@ -0,0 +1,25 @@ +From 13b5c1d09e0e242f1817057501292fe9d7e9ad92 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 15 Sep 2015 16:08:25 +0200 +Subject: [PATCH] dracut.sh: do not create microcode, if no firmware is + available + +--- + dracut.sh | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/dracut.sh b/dracut.sh +index d5f864f9..980c7ff9 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1493,6 +1493,10 @@ if [[ $early_microcode = yes ]]; then + break; + fi + fi ++ for i in $_fwdir/$_fw/$_src; do ++ [ -e $i ] && break ++ break 2 ++ done + cat $_fwdir/$_fw/$_src > $_dest_dir/${ucode_dest[$idx]} + create_early_cpio="yes" + fi diff --git a/SOURCES/0346-scsi-parse-iscsiroot.sh-call-modprobe-with-b.patch b/SOURCES/0346-scsi-parse-iscsiroot.sh-call-modprobe-with-b.patch new file mode 100644 index 0000000..74135c3 --- /dev/null +++ b/SOURCES/0346-scsi-parse-iscsiroot.sh-call-modprobe-with-b.patch @@ -0,0 +1,31 @@ +From bcc2132dab5bf276a0bd4dce606f4ef534b27800 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 17 Sep 2015 12:32:07 +0200 +Subject: [PATCH] scsi/parse-iscsiroot.sh: call modprobe with "-b" + +honor, if a module is blacklisted +--- + modules.d/95iscsi/parse-iscsiroot.sh | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/modules.d/95iscsi/parse-iscsiroot.sh b/modules.d/95iscsi/parse-iscsiroot.sh +index 9546f126..f19147f6 100755 +--- a/modules.d/95iscsi/parse-iscsiroot.sh ++++ b/modules.d/95iscsi/parse-iscsiroot.sh +@@ -88,11 +88,11 @@ fi + + initqueue --unique --onetime --timeout /sbin/iscsiroot timeout "$netroot" "$NEWROOT" + +-modprobe -q qla4xxx +-modprobe -q cxgb3i +-modprobe -q cxgb4i +-modprobe -q bnx2i +-modprobe -q be2iscsi ++modprobe -b -q qla4xxx ++modprobe -b -q cxgb3i ++modprobe -b -q cxgb4i ++modprobe -b -q bnx2i ++modprobe -b -q be2iscsi + + # ISCSI actually supported? + if ! [ -e /sys/module/iscsi_tcp ]; then diff --git a/SOURCES/0347-iscsi-parse-iscsiroot.sh-correct-handling-if-netroot.patch b/SOURCES/0347-iscsi-parse-iscsiroot.sh-correct-handling-if-netroot.patch new file mode 100644 index 0000000..27f268f --- /dev/null +++ b/SOURCES/0347-iscsi-parse-iscsiroot.sh-correct-handling-if-netroot.patch @@ -0,0 +1,26 @@ +From 7fd112f20e63def6d274ab445b5eb82138348901 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 17 Sep 2015 15:41:12 +0200 +Subject: [PATCH] iscsi/parse-iscsiroot.sh: correct handling if netroot isn't + set + +corrects bfe65f913a4bc6bc5fdb7aa75234c229a2ceef8f +--- + modules.d/95iscsi/parse-iscsiroot.sh | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/modules.d/95iscsi/parse-iscsiroot.sh b/modules.d/95iscsi/parse-iscsiroot.sh +index f19147f6..3d74ff2e 100755 +--- a/modules.d/95iscsi/parse-iscsiroot.sh ++++ b/modules.d/95iscsi/parse-iscsiroot.sh +@@ -84,7 +84,9 @@ if [ -n "$iscsi_firmware" ]; then + initqueue --unique --onetime --settled /sbin/iscsiroot online "iscsi:" "'$NEWROOT'" + fi + +-[ -z "$netroot" ] || [ "${netroot%%:*}" = "iscsi" ] || return 1 ++if [ -z "$netroot" ] || ! [ "${netroot%%:*}" = "iscsi" ]; then ++ return 1 ++fi + + initqueue --unique --onetime --timeout /sbin/iscsiroot timeout "$netroot" "$NEWROOT" + diff --git a/SOURCES/0348-dracut.sh-no-microcode-if-get_ucode_file-returns-emp.patch b/SOURCES/0348-dracut.sh-no-microcode-if-get_ucode_file-returns-emp.patch new file mode 100644 index 0000000..f193268 --- /dev/null +++ b/SOURCES/0348-dracut.sh-no-microcode-if-get_ucode_file-returns-emp.patch @@ -0,0 +1,31 @@ +From 327d765512135721a323822a8b10ac1539bd20c6 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 17 Sep 2015 20:03:54 +0200 +Subject: [PATCH] dracut.sh: no microcode, if get_ucode_file returns empty file + +check, if get_ucode_file() returned an empty string. +--- + dracut.sh | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/dracut.sh b/dracut.sh +index 980c7ff9..4e4f222b 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1489,12 +1489,12 @@ if [[ $early_microcode = yes ]]; then + dinfo "*** Constructing ${ucode_dest[$idx]} ****" + if [[ $hostonly ]]; then + _src=$(get_ucode_file) +- if ! [[ -r $_fwdir/$_fw/$_src ]];then +- break; +- fi ++ [[ $src ]] || break ++ [[ -r $_fwdir/$_fw/$_src ]] || break + fi ++ + for i in $_fwdir/$_fw/$_src; do +- [ -e $i ] && break ++ [ -e "$i" ] && break + break 2 + done + cat $_fwdir/$_fw/$_src > $_dest_dir/${ucode_dest[$idx]} diff --git a/SOURCES/0349-network-wait_for_ifup-handle-NO-CARRIER-output.patch b/SOURCES/0349-network-wait_for_ifup-handle-NO-CARRIER-output.patch new file mode 100644 index 0000000..a395cff --- /dev/null +++ b/SOURCES/0349-network-wait_for_ifup-handle-NO-CARRIER-output.patch @@ -0,0 +1,51 @@ +From f059985b14f80a41f3b8103b67cb8fae0d3fc2fc Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 25 Sep 2015 10:14:33 -0400 +Subject: [PATCH] network:wait_for_ifup() handle "NO-CARRIER" output + +if "NO-CARRIER" is one of the flags, we surely have no link yet. +--- + modules.d/40network/net-lib.sh | 30 ++++++++++++++++-------------- + 1 file changed, 16 insertions(+), 14 deletions(-) + +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index 60d3579a..995d32f6 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -531,20 +531,22 @@ wait_for_if_up() { + + while [ $cnt -lt $timeout ]; do + li=$(ip -o link show up dev $1) +- if [ -n "$li" ]; then +- case "$li" in +- *\<UP*) +- return 0;; +- *\<*,UP\>*) +- return 0;; +- *\<*,UP,*\>*) +- return 0;; +- esac +- fi +- if strstr "$li" "LOWER_UP" \ +- && strstr "$li" "state UNKNOWN" \ +- && ! strstr "$li" "DORMANT"; then +- return 0 ++ if ! strstr "$li" "NO-CARRIER"; then ++ if [ -n "$li" ]; then ++ case "$li" in ++ *\<UP*) ++ return 0;; ++ *\<*,UP\>*) ++ return 0;; ++ *\<*,UP,*\>*) ++ return 0;; ++ esac ++ fi ++ if strstr "$li" "LOWER_UP" \ ++ && strstr "$li" "state UNKNOWN" \ ++ && ! strstr "$li" "DORMANT"; then ++ return 0 ++ fi + fi + sleep 0.1 + cnt=$(($cnt+1)) diff --git a/SOURCES/0350-base-dracut-lib.sh-info-be-more-quiet.patch b/SOURCES/0350-base-dracut-lib.sh-info-be-more-quiet.patch new file mode 100644 index 0000000..bfd0b3b --- /dev/null +++ b/SOURCES/0350-base-dracut-lib.sh-info-be-more-quiet.patch @@ -0,0 +1,39 @@ +From fe74a7069bb24ecfb8d2d948955236ff31ae7571 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 25 Sep 2015 11:07:07 -0400 +Subject: [PATCH] base/dracut-lib.sh:info() be more quiet + +--- + modules.d/99base/dracut-lib.sh | 12 ++++++++---- + 1 file changed, 8 insertions(+), 4 deletions(-) + +diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh +index b6593a06..50bcf840 100755 +--- a/modules.d/99base/dracut-lib.sh ++++ b/modules.d/99base/dracut-lib.sh +@@ -61,7 +61,9 @@ else + } + + info() { +- echo "$*" >&2 ++ check_quiet ++ [ "$DRACUT_QUIET" != "yes" ] && \ ++ echo "$*" >&2 + } + + fi +@@ -461,9 +463,11 @@ check_quiet() { + DRACUT_QUIET="yes" + getargbool 0 rd.info -d -y rdinfo && DRACUT_QUIET="no" + getargbool 0 rd.debug -d -y rdinitdebug && DRACUT_QUIET="no" +- getarg quiet || DRACUT_QUIET="yes" +- a=$(getarg loglevel=) +- [ -n "$a" ] && [ $a -ge 28 ] && DRACUT_QUIET="yes" ++ if [ -z "$DRACUT_SYSTEMD" ]; then ++ getarg quiet || DRACUT_QUIET="yes" ++ a=$(getarg loglevel=) ++ [ -n "$a" ] && [ $a -ge 28 ] && DRACUT_QUIET="yes" ++ fi + export DRACUT_QUIET + fi + } diff --git a/SOURCES/0351-dracut-functions.sh-avoid-tokenizing-ldconfig-output.patch b/SOURCES/0351-dracut-functions.sh-avoid-tokenizing-ldconfig-output.patch new file mode 100644 index 0000000..b0a65e6 --- /dev/null +++ b/SOURCES/0351-dracut-functions.sh-avoid-tokenizing-ldconfig-output.patch @@ -0,0 +1,43 @@ +From 5263556ff3314d61e7e9da685bbd59bebc79efe1 Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel <lkundrak@v3.sk> +Date: Tue, 23 Dec 2014 22:03:10 +0100 +Subject: [PATCH] dracut-functions.sh: avoid tokenizing ldconfig output with + 'read' + +The space does not separate the elements reliably, spaces can be +embedded in parenthesized expressions too: + + libgmpxx.so.4 (libc6, hwcap: 0x0000000004000000) => /lib/sse2/libgmpxx.so.4 + libgmp.so.10 (libc6, hwcap: 0x0000000004000000) => /lib/sse2/libgmp.so.10 + +This results in dracut creating '0x0000000004000000' and '=>' +directories in the initramfs image. + +(cherry picked from commit c59779cf9337bc0fc48c7a4d8437f7253f6822c3) +--- + dracut-functions.sh | 12 +----------- + 1 file changed, 1 insertion(+), 11 deletions(-) + +diff --git a/dracut-functions.sh b/dracut-functions.sh +index 585b6836..9218779c 100755 +--- a/dracut-functions.sh ++++ b/dracut-functions.sh +@@ -97,17 +97,7 @@ fi + + ldconfig_paths() + { +- local a i +- declare -A a +- for i in $( +- ldconfig -pN 2>/dev/null | grep -F '=>' | grep -E -v '/(lib|lib64|usr/lib|usr/lib64)/[^/]*$' | while read a b c d; do +- d=${d%/*} +- printf "%s\n" "$d"; +- done +- ); do +- a["$i"]=1; +- done; +- printf "%s\n" ${!a[@]} ++ ldconfig -pN 2>/dev/null | grep -E -v '/(lib|lib64|usr/lib|usr/lib64)/[^/]*$' | sed -n 's,.* => \(.*\)/.*,\1,p' | sort | uniq + } + + # Detect lib paths diff --git a/SOURCES/0352-dracut.sh-fixed-typo-in-microcode-generation.patch b/SOURCES/0352-dracut.sh-fixed-typo-in-microcode-generation.patch new file mode 100644 index 0000000..9862797 --- /dev/null +++ b/SOURCES/0352-dracut.sh-fixed-typo-in-microcode-generation.patch @@ -0,0 +1,22 @@ +From a594b4e357bc63dd22ae04346dbca648e0d62744 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 25 Sep 2015 14:10:20 -0400 +Subject: [PATCH] dracut.sh: fixed typo in microcode generation + +--- + dracut.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dracut.sh b/dracut.sh +index 4e4f222b..5b72221e 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1489,7 +1489,7 @@ if [[ $early_microcode = yes ]]; then + dinfo "*** Constructing ${ucode_dest[$idx]} ****" + if [[ $hostonly ]]; then + _src=$(get_ucode_file) +- [[ $src ]] || break ++ [[ $_src ]] || break + [[ -r $_fwdir/$_fw/$_src ]] || break + fi + diff --git a/SOURCES/0353-90qemu-fixed-systemd-detect-virt-output-parsing.patch b/SOURCES/0353-90qemu-fixed-systemd-detect-virt-output-parsing.patch new file mode 100644 index 0000000..96de38d --- /dev/null +++ b/SOURCES/0353-90qemu-fixed-systemd-detect-virt-output-parsing.patch @@ -0,0 +1,40 @@ +From 5f24e4340171913248a6965ff2153e2517cb892a Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 31 Jul 2015 09:05:51 +0200 +Subject: [PATCH] 90qemu: fixed systemd-detect-virt output parsing + +redirecting systemd-detect-virt to /dev/null doesn't help with parsing +the output :-/ + +Also, add "Red Hat" as a vendor. + +(cherry picked from commit 4135eea634b20c7f7285d134bd6dfe6b799fe226) +--- + modules.d/90qemu/module-setup.sh | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/modules.d/90qemu/module-setup.sh b/modules.d/90qemu/module-setup.sh +index 64eac9ed..46b7ae21 100755 +--- a/modules.d/90qemu/module-setup.sh ++++ b/modules.d/90qemu/module-setup.sh +@@ -4,7 +4,7 @@ + + check() { + if type -P systemd-detect-virt >/dev/null 2>&1; then +- vm=$(systemd-detect-virt --vm >/dev/null 2>&1) ++ vm=$(systemd-detect-virt --vm 2>/dev/null) + (($? != 0)) && return 255 + [[ $vm = "qemu" ]] && return 0 + [[ $vm = "kvm" ]] && return 0 +@@ -14,8 +14,9 @@ check() { + for i in /sys/class/dmi/id/*_vendor; do + [[ -f $i ]] || continue + read vendor < $i +- [[ "$vendor" == "QEMU" ]] && return 0 +- [[ "$vendor" == "Bochs" ]] && return 0 ++ [[ "$vendor" == "QEMU" ]] && return 0 ++ [[ "$vendor" == "Red Hat" ]] && return 0 ++ [[ "$vendor" == "Bochs" ]] && return 0 + done + return 255 + } diff --git a/SOURCES/0354-ifcfg-write-ifcfg.sh-unset-vlan.patch b/SOURCES/0354-ifcfg-write-ifcfg.sh-unset-vlan.patch new file mode 100644 index 0000000..29092a9 --- /dev/null +++ b/SOURCES/0354-ifcfg-write-ifcfg.sh-unset-vlan.patch @@ -0,0 +1,26 @@ +From 7de064b57cda7ca3d117c5faebc7636858dfc2f2 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 21 Apr 2015 10:34:31 +0200 +Subject: [PATCH] ifcfg/write-ifcfg.sh: unset vlan + +clear the vlan flag, if a previous interface in the loop +was a vlan interface + +(cherry picked from commit 23446ef1e0a6eda79049a655cb1645691b129645) +--- + modules.d/45ifcfg/write-ifcfg.sh | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh +index b2462dae..ed66370f 100755 +--- a/modules.d/45ifcfg/write-ifcfg.sh ++++ b/modules.d/45ifcfg/write-ifcfg.sh +@@ -140,6 +140,8 @@ for netup in /tmp/net.*.did-setup ; do + unset macaddr + unset slave + unset ethname ++ unset vlan ++ + [ -e /tmp/bond.${netif}.info ] && . /tmp/bond.${netif}.info + [ -e /tmp/team.${netif}.info ] && . /tmp/team.${netif}.info + diff --git a/SOURCES/0355-base-dracut-lib.sh-getargs-don-t-return-1-for-empty-.patch b/SOURCES/0355-base-dracut-lib.sh-getargs-don-t-return-1-for-empty-.patch new file mode 100644 index 0000000..d950877 --- /dev/null +++ b/SOURCES/0355-base-dracut-lib.sh-getargs-don-t-return-1-for-empty-.patch @@ -0,0 +1,25 @@ +From d1f7f2ac046c77913d1ca97cf8414d9226ae1286 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 9 Oct 2015 11:30:03 +0200 +Subject: [PATCH] base/dracut-lib.sh:getargs() don't return 1 for empty values + +getargs() is only used with real values and not booleans. + +So, return the values only. +--- + modules.d/99base/dracut-lib.sh | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh +index 50bcf840..cb1ddd76 100755 +--- a/modules.d/99base/dracut-lib.sh ++++ b/modules.d/99base/dracut-lib.sh +@@ -320,8 +320,6 @@ getargs() { + if [ -n "$_gfound" ]; then + if [ $# -gt 0 ]; then + echo -n "$@" +- else +- echo -n 1 + fi + debug_on + return 0 diff --git a/SOURCES/0356-ifcfg-write-ifcfg.sh-don-t-bind-interface-if-physica.patch b/SOURCES/0356-ifcfg-write-ifcfg.sh-don-t-bind-interface-if-physica.patch new file mode 100644 index 0000000..5c53b7e --- /dev/null +++ b/SOURCES/0356-ifcfg-write-ifcfg.sh-don-t-bind-interface-if-physica.patch @@ -0,0 +1,33 @@ +From 3bce34dfd780b9aa9b93c0a09358096b48806c05 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 9 Oct 2015 11:31:28 +0200 +Subject: [PATCH] ifcfg/write-ifcfg.sh: don't bind interface, if physical + device is set + +If a physical device is defined, we don't need to bind the interface to +the MAC address or something else. +--- + modules.d/45ifcfg/write-ifcfg.sh | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh +index ed66370f..1e7f694a 100755 +--- a/modules.d/45ifcfg/write-ifcfg.sh ++++ b/modules.d/45ifcfg/write-ifcfg.sh +@@ -141,6 +141,7 @@ for netup in /tmp/net.*.did-setup ; do + unset slave + unset ethname + unset vlan ++ unset phydevice + + [ -e /tmp/bond.${netif}.info ] && . /tmp/bond.${netif}.info + [ -e /tmp/team.${netif}.info ] && . /tmp/team.${netif}.info +@@ -164,7 +165,7 @@ for netup in /tmp/net.*.did-setup ; do + { + echo "# Generated by dracut initrd" + echo "NAME=\"$netif\"" +- interface_bind "$netif" "$macaddr" ++ [ -z "$phydevice" ] && interface_bind "$netif" "$macaddr" + echo "ONBOOT=yes" + echo "NETBOOT=yes" + echo "UUID=\"$uuid\"" diff --git a/SOURCES/0357-network-ifup.sh-skip-empty-nameserver-values.patch b/SOURCES/0357-network-ifup.sh-skip-empty-nameserver-values.patch new file mode 100644 index 0000000..065a253 --- /dev/null +++ b/SOURCES/0357-network-ifup.sh-skip-empty-nameserver-values.patch @@ -0,0 +1,35 @@ +From e65825117377a8e1e730912aa4c0e786122d892a Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 9 Oct 2015 11:35:43 +0200 +Subject: [PATCH] network/ifup.sh: skip empty nameserver values + +--- + modules.d/40network/ifup.sh | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index 0471c425..7c06cd86 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -336,8 +336,8 @@ fi + ip=$(getarg ip) + + if [ -z "$ip" ]; then +- namesrv=$(getargs nameserver) +- for s in $namesrv; do ++ for s in $(getargs nameserver); do ++ [ -n "$s" ] || continue + echo nameserver $s >> /tmp/net.$netif.resolv.conf + done + +@@ -373,8 +373,8 @@ for p in $(getargs ip=); do + [ "$use_vlan" != 'true' ] && continue + + # setup nameserver +- namesrv="$dns1 $dns2 $(getargs nameserver)" +- for s in $namesrv; do ++ for s in "$dns1" "$dns2" $(getargs nameserver); do ++ [ -n "$s" ] || continue + echo nameserver $s >> /tmp/net.$netif.resolv.conf + done + diff --git a/SOURCES/0358-write-ifcfg-fix-creating-configuration-for-VLAN.patch b/SOURCES/0358-write-ifcfg-fix-creating-configuration-for-VLAN.patch new file mode 100644 index 0000000..0086c87 --- /dev/null +++ b/SOURCES/0358-write-ifcfg-fix-creating-configuration-for-VLAN.patch @@ -0,0 +1,41 @@ +From 32398e15250018c908d344060a7d9ab72c4ce5d0 Mon Sep 17 00:00:00 2001 +From: Fedora dracut team <dracut-maint@redhat.com> +Date: Mon, 19 Oct 2015 18:27:11 +0200 +Subject: [PATCH] write-ifcfg: fix creating configuration for VLAN + +Currently the physdev is unset before it is somehow applied. +Also there is no DEVICE in the output. +--- + modules.d/45ifcfg/write-ifcfg.sh | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh +index 1e7f694a..f3a1c109 100755 +--- a/modules.d/45ifcfg/write-ifcfg.sh ++++ b/modules.d/45ifcfg/write-ifcfg.sh +@@ -141,7 +141,6 @@ for netup in /tmp/net.*.did-setup ; do + unset slave + unset ethname + unset vlan +- unset phydevice + + [ -e /tmp/bond.${netif}.info ] && . /tmp/bond.${netif}.info + [ -e /tmp/team.${netif}.info ] && . /tmp/team.${netif}.info +@@ -165,7 +164,7 @@ for netup in /tmp/net.*.did-setup ; do + { + echo "# Generated by dracut initrd" + echo "NAME=\"$netif\"" +- [ -z "$phydevice" ] && interface_bind "$netif" "$macaddr" ++ [ -z "$vlan" ] && interface_bind "$netif" "$macaddr" + echo "ONBOOT=yes" + echo "NETBOOT=yes" + echo "UUID=\"$uuid\"" +@@ -219,7 +218,7 @@ for netup in /tmp/net.*.did-setup ; do + if [ -n "$vlan" ] ; then + { + echo "TYPE=Vlan" +- echo "NAME=\"$netif\"" ++ echo "DEVICE=\"$netif\"" + echo "VLAN=yes" + echo "PHYSDEV=\"$phydevice\"" + } >> /tmp/ifcfg/ifcfg-$netif diff --git a/SOURCES/0359-90qemu-also-add-ibmvscsi-on-qemu.patch b/SOURCES/0359-90qemu-also-add-ibmvscsi-on-qemu.patch new file mode 100644 index 0000000..b000605 --- /dev/null +++ b/SOURCES/0359-90qemu-also-add-ibmvscsi-on-qemu.patch @@ -0,0 +1,24 @@ +From 50a00707736d39ff8ccbbcff5693e62061373627 Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn <lnykryn@redhat.com> +Date: Tue, 20 Oct 2015 15:30:12 +0200 +Subject: [PATCH] 90qemu: also add ibmvscsi on qemu + +Without this module following scenario does not work: +1. Install the guest with virtio-scsi-pci as system disk and no other +data disk. +2. Change the system disk from virtio-scsi to spapr-vscsi. +--- + modules.d/90qemu/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/90qemu/module-setup.sh b/modules.d/90qemu/module-setup.sh +index 46b7ae21..4dd5a73f 100755 +--- a/modules.d/90qemu/module-setup.sh ++++ b/modules.d/90qemu/module-setup.sh +@@ -26,5 +26,5 @@ installkernel() { + hostonly='' instmods \ + ata_piix ata_generic pata_acpi cdrom sr_mod ahci \ + virtio_blk virtio virtio_ring virtio_pci \ +- virtio_scsi virtio_console spapr-vscsi ++ virtio_scsi virtio_console spapr-vscsi ibmvscsi + } diff --git a/SOURCES/0360-Don-t-call-udevadm-control-exit-in-systemd-mode.patch b/SOURCES/0360-Don-t-call-udevadm-control-exit-in-systemd-mode.patch new file mode 100644 index 0000000..65e855a --- /dev/null +++ b/SOURCES/0360-Don-t-call-udevadm-control-exit-in-systemd-mode.patch @@ -0,0 +1,25 @@ +From d2380720db11dc2220bf8acc251c0e513ff219bc Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 17 Jul 2012 13:05:11 +0200 +Subject: [PATCH] Don't call udevadm control --exit in systemd mode + +This partly reverts commit a43f97c4e35d0d9c7e6e315e11c909e86936e1cc. + +(cherry picked from commit 765d8408e9aafa45cd89a039f8b41f85191fd91f) + +https://bugzilla.redhat.com/show_bug.cgi?id=1276983 +--- + modules.d/98systemd/dracut-pre-pivot.sh | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/modules.d/98systemd/dracut-pre-pivot.sh b/modules.d/98systemd/dracut-pre-pivot.sh +index afe34668..4c3eefcd 100755 +--- a/modules.d/98systemd/dracut-pre-pivot.sh ++++ b/modules.d/98systemd/dracut-pre-pivot.sh +@@ -36,6 +36,4 @@ while ! udevadm settle --timeout=0; do + [ $cnt -gt 10 ] && break + done + +-udevadm control --exit +- + exit 0 diff --git a/SOURCES/0361-iscsi-iscsiroot.sh-better-put-variables-in-quotes.patch b/SOURCES/0361-iscsi-iscsiroot.sh-better-put-variables-in-quotes.patch new file mode 100644 index 0000000..df96dbe --- /dev/null +++ b/SOURCES/0361-iscsi-iscsiroot.sh-better-put-variables-in-quotes.patch @@ -0,0 +1,126 @@ +From 2f20797a40104bfa133e7e5bfcf2d916b34413e5 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 12 Nov 2015 11:42:13 +0100 +Subject: [PATCH] iscsi/iscsiroot.sh: better put variables in quotes + +first rule for a bash programmer +--- + modules.d/95iscsi/iscsiroot.sh | 62 +++++++++++++++++----------------- + 1 file changed, 31 insertions(+), 31 deletions(-) + +diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh +index ea1bead7..ce8f5479 100755 +--- a/modules.d/95iscsi/iscsiroot.sh ++++ b/modules.d/95iscsi/iscsiroot.sh +@@ -78,23 +78,23 @@ handle_netroot() + + # override conf settings by command line options + arg=$(getargs rd.iscsi.initiator -d iscsi_initiator=) +- [ -n "$arg" ] && iscsi_initiator=$arg ++ [ -n "$arg" ] && iscsi_initiator="$arg" + arg=$(getargs rd.iscsi.target.name -d iscsi_target_name=) +- [ -n "$arg" ] && iscsi_target_name=$arg ++ [ -n "$arg" ] && iscsi_target_name="$arg" + arg=$(getargs rd.iscsi.target.ip -d iscsi_target_ip) +- [ -n "$arg" ] && iscsi_target_ip=$arg ++ [ -n "$arg" ] && iscsi_target_ip="$arg" + arg=$(getargs rd.iscsi.target.port -d iscsi_target_port=) +- [ -n "$arg" ] && iscsi_target_port=$arg ++ [ -n "$arg" ] && iscsi_target_port="$arg" + arg=$(getargs rd.iscsi.target.group -d iscsi_target_group=) +- [ -n "$arg" ] && iscsi_target_group=$arg ++ [ -n "$arg" ] && iscsi_target_group="$arg" + arg=$(getargs rd.iscsi.username -d iscsi_username=) +- [ -n "$arg" ] && iscsi_username=$arg ++ [ -n "$arg" ] && iscsi_username="$arg" + arg=$(getargs rd.iscsi.password -d iscsi_password) +- [ -n "$arg" ] && iscsi_password=$arg ++ [ -n "$arg" ] && iscsi_password="$arg" + arg=$(getargs rd.iscsi.in.username -d iscsi_in_username=) +- [ -n "$arg" ] && iscsi_in_username=$arg ++ [ -n "$arg" ] && iscsi_in_username="$arg" + arg=$(getargs rd.iscsi.in.password -d iscsi_in_password=) +- [ -n "$arg" ] && iscsi_in_password=$arg ++ [ -n "$arg" ] && iscsi_in_password="$arg" + for p in $(getargs rd.iscsi.param -d iscsi_param); do + iscsi_param="$iscsi_param --param $p" + done +@@ -109,9 +109,9 @@ handle_netroot() + # XXX is this needed? + getarg ro && iscsirw=ro + getarg rw && iscsirw=rw +- fsopts=${fsopts:+$fsopts,}${iscsirw} ++ fsopts="${fsopts:+$fsopts,}${iscsirw}" + +- if [ -z $iscsi_initiator ] && [ -f /sys/firmware/ibft/initiator/initiator-name ] && ! [ -f /tmp/iscsi_set_initiator ]; then ++ if [ -z "$iscsi_initiator" ] && [ -f /sys/firmware/ibft/initiator/initiator-name ] && ! [ -f /tmp/iscsi_set_initiator ]; then + iscsi_initiator=$(while read line || [ -n "$line" ]; do echo $line;done < /sys/firmware/ibft/initiator/initiator-name) + echo "InitiatorName=$iscsi_initiator" > /run/initiatorname.iscsi + rm -f /etc/iscsi/initiatorname.iscsi +@@ -122,14 +122,14 @@ handle_netroot() + > /tmp/iscsi_set_initiator + fi + +- if [ -z $iscsi_initiator ]; then ++ if [ -z "$iscsi_initiator" ]; then + [ -f /run/initiatorname.iscsi ] && . /run/initiatorname.iscsi + [ -f /etc/initiatorname.iscsi ] && . /etc/initiatorname.iscsi + [ -f /etc/iscsi/initiatorname.iscsi ] && . /etc/iscsi/initiatorname.iscsi + iscsi_initiator=$InitiatorName + fi + +- if [ -z $iscsi_initiator ]; then ++ if [ -z "$iscsi_initiator" ]; then + iscsi_initiator=$(iscsi-iname) + echo "InitiatorName=$iscsi_initiator" > /run/initiatorname.iscsi + rm -f /etc/iscsi/initiatorname.iscsi +@@ -184,15 +184,15 @@ handle_netroot() + --description="Login iSCSI Target $iscsi_target_name" \ + --unit="$netroot_enc" -- \ + $(command -v iscsistart) \ +- -i $iscsi_initiator -t $iscsi_target_name \ +- -g $iscsi_target_group -a $iscsi_target_ip \ +- -p $iscsi_target_port \ +- ${iscsi_username:+-u $iscsi_username} \ +- ${iscsi_password:+-w $iscsi_password} \ +- ${iscsi_in_username:+-U $iscsi_in_username} \ +- ${iscsi_in_password:+-W $iscsi_in_password} \ +- ${iscsi_iface_name:+--param iface.iscsi_ifacename=$iscsi_iface_name} \ +- ${iscsi_netdev_name:+--param iface.net_ifacename=$iscsi_netdev_name} \ ++ -i "$iscsi_initiator" -t "$iscsi_target_name" \ ++ -g "$iscsi_target_group" -a "$iscsi_target_ip" \ ++ -p "$iscsi_target_port" \ ++ ${iscsi_username:+-u "$iscsi_username"} \ ++ ${iscsi_password:+-w "$iscsi_password"} \ ++ ${iscsi_in_username:+-U "$iscsi_in_username"} \ ++ ${iscsi_in_password:+-W "$iscsi_in_password"} \ ++ ${iscsi_iface_name:+--param "iface.iscsi_ifacename=$iscsi_iface_name"} \ ++ ${iscsi_netdev_name:+--param "iface.net_ifacename=$iscsi_netdev_name"} \ + ${iscsi_param} >/dev/null 2>&1 \ + && { > $hookdir/initqueue/work ; } + else +@@ -201,15 +201,15 @@ handle_netroot() + fi + fi + else +- iscsistart -i $iscsi_initiator -t $iscsi_target_name \ +- -g $iscsi_target_group -a $iscsi_target_ip \ +- -p $iscsi_target_port \ +- ${iscsi_username:+-u $iscsi_username} \ +- ${iscsi_password:+-w $iscsi_password} \ +- ${iscsi_in_username:+-U $iscsi_in_username} \ +- ${iscsi_in_password:+-W $iscsi_in_password} \ +- ${iscsi_iface_name:+--param iface.iscsi_ifacename=$iscsi_iface_name} \ +- ${iscsi_netdev_name:+--param iface.net_ifacename=$iscsi_netdev_name} \ ++ iscsistart -i "$iscsi_initiator" -t "$iscsi_target_name" \ ++ -g "$iscsi_target_group" -a "$iscsi_target_ip" \ ++ -p "$iscsi_target_port" \ ++ ${iscsi_username:+-u "$iscsi_username"} \ ++ ${iscsi_password:+-w "$iscsi_password"} \ ++ ${iscsi_in_username:+-U "$iscsi_in_username"} \ ++ ${iscsi_in_password:+-W "$iscsi_in_password"} \ ++ ${iscsi_iface_name:+--param "iface.iscsi_ifacename=$iscsi_iface_name"} \ ++ ${iscsi_netdev_name:+--param "iface.net_ifacename=$iscsi_netdev_name"} \ + ${iscsi_param} \ + && { > $hookdir/initqueue/work ; } + fi diff --git a/SOURCES/0362-network-fix-carrier-detection.patch b/SOURCES/0362-network-fix-carrier-detection.patch new file mode 100644 index 0000000..02e755e --- /dev/null +++ b/SOURCES/0362-network-fix-carrier-detection.patch @@ -0,0 +1,169 @@ +From 17985b2575c10b488e7af2aeef160b41a97b2358 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Mon, 14 Dec 2015 13:10:05 +0100 +Subject: [PATCH] network: fix carrier detection + +rename iface_has_link() to iface_has_carrier() to clarify usage + +Only assign static "wildcard interface" settings, if the interface has a +carrier. + +If the interface name was specified with a name, do not do carrier +checking for static configurations. + +(cherry picked from commit df95b1003c8e7564da73de92403013763eb028fe) +--- + modules.d/40network/ifup.sh | 42 ++++++++++++++++-------------- + modules.d/40network/net-lib.sh | 47 +++++++++++++++++++++------------- + 2 files changed, 52 insertions(+), 37 deletions(-) + +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index 7c06cd86..30551987 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -105,7 +105,7 @@ do_dhcp() { + + [ -e /tmp/dhclient.$netif.pid ] && return 0 + +- if ! iface_has_link $netif; then ++ if ! iface_has_carrier $netif; then + warn "No carrier detected on interface $netif" + return 1 + fi +@@ -155,7 +155,10 @@ do_ipv6auto() { + do_static() { + strstr $ip '*:*:*' && load_ipv6 + +- if ! linkup $netif; then ++ if [ -z "$dev" ] && ! iface_has_carrier "$netif"; then ++ warn "No carrier detected on interface $netif" ++ return 1 ++ elif ! linkup "$netif"; then + warn "Could not bring interface $netif up!" + return 1 + fi +@@ -398,27 +401,28 @@ for p in $(getargs ip=); do + done + ret=$? + +- > /tmp/net.${netif}.up ++ if [ $ret -eq 0 ]; then ++ > /tmp/net.${netif}.up + +- if [ -e /sys/class/net/${netif}/address ]; then +- > /tmp/net.$(cat /sys/class/net/${netif}/address).up +- fi ++ if [ -e /sys/class/net/${netif}/address ]; then ++ > /tmp/net.$(cat /sys/class/net/${netif}/address).up ++ fi + +- case $autoconf in +- dhcp|on|any|dhcp6) ++ case $autoconf in ++ dhcp|on|any|dhcp6) + ;; +- *) +- if [ $ret -eq 0 ]; then +- setup_net $netif +- source_hook initqueue/online $netif +- if [ -z "$manualup" ]; then +- /sbin/netroot $netif ++ *) ++ if [ $ret -eq 0 ]; then ++ setup_net $netif ++ source_hook initqueue/online $netif ++ if [ -z "$manualup" ]; then ++ /sbin/netroot $netif ++ fi + fi +- fi +- ;; +- esac +- +- exit 0 ++ ;; ++ esac ++ exit $ret ++ fi + done + + # netif isn't the top stack? Then we should exit here. +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index 995d32f6..07ea5709 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -531,22 +531,20 @@ wait_for_if_up() { + + while [ $cnt -lt $timeout ]; do + li=$(ip -o link show up dev $1) +- if ! strstr "$li" "NO-CARRIER"; then +- if [ -n "$li" ]; then +- case "$li" in +- *\<UP*) +- return 0;; +- *\<*,UP\>*) +- return 0;; +- *\<*,UP,*\>*) +- return 0;; +- esac +- fi +- if strstr "$li" "LOWER_UP" \ +- && strstr "$li" "state UNKNOWN" \ +- && ! strstr "$li" "DORMANT"; then +- return 0 +- fi ++ if [ -n "$li" ]; then ++ case "$li" in ++ *\<UP*) ++ return 0;; ++ *\<*,UP\>*) ++ return 0;; ++ *\<*,UP,*\>*) ++ return 0;; ++ esac ++ fi ++ if strstr "$li" "LOWER_UP" \ ++ && strstr "$li" "state UNKNOWN" \ ++ && ! strstr "$li" "DORMANT"; then ++ return 0 + fi + sleep 0.1 + cnt=$(($cnt+1)) +@@ -614,7 +612,7 @@ hostname() { + cat /proc/sys/kernel/hostname + } + +-iface_has_link() { ++iface_has_carrier() { + local cnt=0 + local interface="$1" flags="" + [ -n "$interface" ] || return 2 +@@ -625,14 +623,27 @@ iface_has_link() { + timeout=$(($timeout*10)) + + linkup "$1" ++ ++ li=$(ip -o link show up dev $1) ++ strstr "$li" "NO-CARRIER" && _no_carrier_flag=1 ++ + while [ $cnt -lt $timeout ]; do +- [ "$(cat $interface/carrier)" = 1 ] && return 0 ++ if [ -n "$_no_carrier_flag" ]; then ++ # NO-CARRIER flag was cleared ++ strstr "$li" "NO-CARRIER" || return 0 ++ fi ++ # double check the syscfs carrier flag ++ [ -e "$interface/carrier" ] && [ "$(cat $interface/carrier)" = 1 ] && return 0 + sleep 0.1 + cnt=$(($cnt+1)) + done + return 1 + } + ++iface_has_link() { ++ iface_has_carrier "$@" ++} ++ + find_iface_with_link() { + local iface_path="" iface="" + for iface_path in /sys/class/net/*; do diff --git a/SOURCES/0363-dracut-functions.sh-fix-check_vol_slaves-volume-grou.patch b/SOURCES/0363-dracut-functions.sh-fix-check_vol_slaves-volume-grou.patch new file mode 100644 index 0000000..4f49fef --- /dev/null +++ b/SOURCES/0363-dracut-functions.sh-fix-check_vol_slaves-volume-grou.patch @@ -0,0 +1,27 @@ +From 28665b4fa55f18760ade77602d69f892d86b0bbd Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Mon, 18 Jan 2016 16:59:42 +0100 +Subject: [PATCH] dracut-functions.sh:fix check_vol_slaves() volume group name + stripping + +commit 466a59984a095f33993cffd5a3bea40826469b03 removed whitespace +stripping from lvm volume group names. + +(cherry picked from commit 2fd8588da51a0e43684852dcdabe327aca684a9f) +--- + dracut-functions.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dracut-functions.sh b/dracut-functions.sh +index 9218779c..d71ff676 100755 +--- a/dracut-functions.sh ++++ b/dracut-functions.sh +@@ -687,7 +687,7 @@ check_vol_slaves() { + if [[ $_lv = $2 ]]; then + _vg=$(lvm lvs --noheadings -o vg_name $i 2>/dev/null) + # strip space +- _vg=$(printf "%s\n" "$_vg") ++ _vg="${_vg//[[:space:]]/}" + if [[ $_vg ]]; then + for _pv in $(lvm vgs --noheadings -o pv_name "$_vg" 2>/dev/null) + do diff --git a/SOURCES/0364-multipath-fix-majmin_to_mpath_dev.patch b/SOURCES/0364-multipath-fix-majmin_to_mpath_dev.patch new file mode 100644 index 0000000..c72996e --- /dev/null +++ b/SOURCES/0364-multipath-fix-majmin_to_mpath_dev.patch @@ -0,0 +1,40 @@ +From 851946468adf0bc80b9c66b10ae586449b51275f Mon Sep 17 00:00:00 2001 +From: Pekka Wallendahl <wyrmiyu@gmail.com> +Date: Mon, 18 Jan 2016 20:28:22 +0200 +Subject: [PATCH] multipath: fix majmin_to_mpath_dev() + +* Multipath device names only start with the mpath-prefix if the option + use_userfriendly_names is set true in /etc/multipath.conf and if user + has not set any aliases in the said file. Thus the for-loop should go + through all files in /dev/mapper/, not just ones starting with 'mpath' + +* Bash is perfectly capable to extend `/dev/mapper/*` notation without a + need to pass it to an external ls + +* Changed the function to use a local variable $_dev instead of the + global $dev, which seemed to be the original intention as the local + _dev was defined but not used + +(cherry picked from commit 28058a2e373eb268d9b1cd5b65c2ad607961dad1) +--- + modules.d/90multipath/module-setup.sh | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/modules.d/90multipath/module-setup.sh b/modules.d/90multipath/module-setup.sh +index 4971d18d..3983b7b7 100755 +--- a/modules.d/90multipath/module-setup.sh ++++ b/modules.d/90multipath/module-setup.sh +@@ -11,9 +11,10 @@ is_mpath() { + + majmin_to_mpath_dev() { + local _dev +- for i in `ls -1 /dev/mapper/mpath*`; do +- dev=$(get_maj_min $i) +- if [ "$dev" = "$1" ]; then ++ for i in /dev/mapper/*; do ++ [[ $i == /dev/mapper/control ]] && continue ++ _dev=$(get_maj_min $i) ++ if [ "$_dev" = "$1" ]; then + echo $i + return + fi diff --git a/SOURCES/0365-90lvm-Install-dm-snapshot-module.patch b/SOURCES/0365-90lvm-Install-dm-snapshot-module.patch new file mode 100644 index 0000000..dc14cfe --- /dev/null +++ b/SOURCES/0365-90lvm-Install-dm-snapshot-module.patch @@ -0,0 +1,28 @@ +From 69762959aeed366368d50443d0d23c78ddfded8e Mon Sep 17 00:00:00 2001 +From: Thomas Renninger <trenn@suse.de> +Date: Thu, 11 Dec 2014 15:46:13 +0100 +Subject: [PATCH] 90lvm: Install dm-snapshot module + +bnc#888530 + +Signed-off-by: Thomas Renninger <trenn@suse.de> +(cherry picked from commit 5c84d51b3f258af9035a4031c6b482103adea4d9) +--- + modules.d/90lvm/module-setup.sh | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh +index 90bc39f7..5e374fbc 100755 +--- a/modules.d/90lvm/module-setup.sh ++++ b/modules.d/90lvm/module-setup.sh +@@ -42,6 +42,10 @@ cmdline() { + done + } + ++installkernel() { ++ instmods dm-snapshot ++} ++ + # called by dracut + install() { + local _i diff --git a/SOURCES/0366-systemd-add-wheel-and-adm-to-passwd-and-group.patch b/SOURCES/0366-systemd-add-wheel-and-adm-to-passwd-and-group.patch new file mode 100644 index 0000000..99fe276 --- /dev/null +++ b/SOURCES/0366-systemd-add-wheel-and-adm-to-passwd-and-group.patch @@ -0,0 +1,64 @@ +From ba977abe6305b23fb2bec41798259a78185abaaa Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Mon, 29 Feb 2016 11:52:37 +0100 +Subject: [PATCH] systemd: add "wheel" and "adm" to passwd and group + + # LANG=C journalctl -b -u systemd-tmpfiles-setup-dev.service | grep + # ACL + Dec 01 13:56:59 localhost.localdomain systemd-tmpfiles[112]: Failed +to parse ACL "d:group:adm:r-x,d:group:wheel:r-x": Invalid argument. +Ignoring + Dec 01 13:56:59 localhost.localdomain systemd-tmpfiles[112]: Failed +to parse ACL "group:adm:r-x,group:wheel:r-x": Invalid argument. Ignoring + Dec 01 13:56:59 localhost.localdomain systemd-tmpfiles[112]: Failed +to parse ACL "d:group:adm:r-x,d:group:wheel:r-x": Invalid argument. +Ignoring + Dec 01 13:56:59 localhost.localdomain systemd-tmpfiles[112]: Failed +to parse ACL "group:adm:r-x,group:wheel:r-x": Invalid argument. Ignoring + + # grep ^[aA] /usr/lib/tmpfiles.d/systemd.conf + a+ /run/log/journal/%m - - - - d:group:adm:r-x,d:group:wheel:r-x + A+ /run/log/journal/%m - - - - group:adm:r-x,group:wheel:r-x + a+ /var/log/journal/%m - - - - d:group:adm:r-x,d:group:wheel:r-x + A+ /var/log/journal/%m - - - - group:adm:r-x,group:wheel:r-x + +https://bugzilla.redhat.com/show_bug.cgi?id=1287537 +--- + modules.d/98systemd/module-setup.sh | 17 +++++++++++++++++ + 1 file changed, 17 insertions(+) + +diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh +index a656fe0f..647315f0 100755 +--- a/modules.d/98systemd/module-setup.sh ++++ b/modules.d/98systemd/module-setup.sh +@@ -22,6 +22,17 @@ installkernel() { + instmods -s efivarfs + } + ++ ++ug_check_and_add() { ++ local name="$1" ++ local file="$2" ++ ++ if egrep -q "^$name:" "$file" 2>/dev/null \ ++ && ! egrep -q "^$name:" "$initdir$file" 2>/dev/null; then ++ egrep "^$name:" "$file" 2>/dev/null >> "$initdir$file" ++ fi ++} ++ + install() { + local _mods + +@@ -30,6 +41,12 @@ install() { + exit 1 + fi + ++ ug_check_and_add "wheel" "/etc/passwd" ++ ug_check_and_add "wheel" "/etc/group" ++ ++ ug_check_and_add "adm" "/etc/passwd" ++ ug_check_and_add "adm" "/etc/group" ++ + inst_multiple -o \ + $systemdutildir/systemd \ + $systemdutildir/systemd-cgroups-agent \ diff --git a/SOURCES/0367-dracut-add-tar-and-dd-requirement.patch b/SOURCES/0367-dracut-add-tar-and-dd-requirement.patch new file mode 100644 index 0000000..3fe32c4 --- /dev/null +++ b/SOURCES/0367-dracut-add-tar-and-dd-requirement.patch @@ -0,0 +1,22 @@ +From de8cc25d70385725b5652dff9f308896084c00b8 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Mon, 29 Feb 2016 11:55:25 +0100 +Subject: [PATCH] dracut: add "tar" and "dd" requirement + +https://bugzilla.redhat.com/show_bug.cgi?id=1285810 +--- + dracut.spec | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/dracut.spec b/dracut.spec +index ad737c25..c9379093 100644 +--- a/dracut.spec ++++ b/dracut.spec +@@ -91,6 +91,7 @@ Requires: gzip xz + Requires: kmod + Requires: sed + Requires: kpartx ++Requires: tar dd + + %if 0%{?fedora} || 0%{?rhel} > 6 + Requires: util-linux >= 2.21 diff --git a/SOURCES/0368-dracut.sh-for-microcode-generation-skip-gpg-files.patch b/SOURCES/0368-dracut.sh-for-microcode-generation-skip-gpg-files.patch new file mode 100644 index 0000000..61bce9c --- /dev/null +++ b/SOURCES/0368-dracut.sh-for-microcode-generation-skip-gpg-files.patch @@ -0,0 +1,30 @@ +From 3a39dd027f1574bdddb664d14dd592d23ce7eef1 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 18 Nov 2015 10:58:54 +0100 +Subject: [PATCH] dracut.sh: for microcode generation, skip gpg files + +skip all ".asc" files for the AMD microcode generation + +(cherry picked from commit c44d2252bb4b9e72f2b058f8c185698e88dc8374) +--- + dracut.sh | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/dracut.sh b/dracut.sh +index 5b72221e..6bbde70b 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1497,7 +1497,12 @@ if [[ $early_microcode = yes ]]; then + [ -e "$i" ] && break + break 2 + done +- cat $_fwdir/$_fw/$_src > $_dest_dir/${ucode_dest[$idx]} ++ for i in $_fwdir/$_fw/$_src; do ++ [[ -e "$i" ]] || continue ++ # skip gpg files ++ str_ends "$i" ".asc" && continue ++ cat "$i" >> $_dest_dir/${ucode_dest[$idx]} ++ done + create_early_cpio="yes" + fi + done diff --git a/SOURCES/0369-documentation-hostonly-i18n-no-hostonly-i18n-i18n_in.patch b/SOURCES/0369-documentation-hostonly-i18n-no-hostonly-i18n-i18n_in.patch new file mode 100644 index 0000000..318fe11 --- /dev/null +++ b/SOURCES/0369-documentation-hostonly-i18n-no-hostonly-i18n-i18n_in.patch @@ -0,0 +1,43 @@ +From 9d030e4ef1037b0f3a75833f96803a341b084983 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Mon, 29 Feb 2016 13:12:02 +0100 +Subject: [PATCH] documentation: "--hostonly-i18n" "--no-hostonly-i18n" + "i18n_install_all" + +(cherry picked from commit fe6455a6e8f4b070ffa8116ef26d423a25d56049) +--- + dracut.8.asc | 6 ++++++ + dracut.conf.5.asc | 3 +++ + 2 files changed, 9 insertions(+) + +diff --git a/dracut.8.asc b/dracut.8.asc +index 14ce26b6..5f68d16a 100644 +--- a/dracut.8.asc ++++ b/dracut.8.asc +@@ -306,6 +306,12 @@ provide a valid _/etc/fstab_. + **--no-hostonly-cmdline**: + Do not store kernel command line arguments needed in the initramfs + ++**--hostonly-i18n**: ++ Install only needed keyboard and font files according to the host configuration (default). ++ ++**--no-hostonly-i18n**: ++ Install all keyboard and font files available. ++ + **--persistent-policy** _<policy>_:: + Use _<policy>_ to address disks and partitions. + _<policy>_ can be any directory name found in /dev/disk. +diff --git a/dracut.conf.5.asc b/dracut.conf.5.asc +index be62da98..99f70fff 100644 +--- a/dracut.conf.5.asc ++++ b/dracut.conf.5.asc +@@ -79,6 +79,9 @@ Configuration files must have the extension .conf; other extensions are ignored. + *hostonly_cmdline*"__{yes|no}__":: + If set, store the kernel command line arguments needed in the initramfs + ++*i18n_install_all=*"__{yes|no}__":: ++ If set to yes, install all available fonts and keyboard files. ++ + *persistent_policy=*"__<policy>__":: + Use _<policy>_ to address disks and partitions. + _<policy>_ can be any directory name found in /dev/disk. diff --git a/SOURCES/0370-network-dhclient-script.sh-add-classless-static-rout.patch b/SOURCES/0370-network-dhclient-script.sh-add-classless-static-rout.patch new file mode 100644 index 0000000..2ff796c --- /dev/null +++ b/SOURCES/0370-network-dhclient-script.sh-add-classless-static-rout.patch @@ -0,0 +1,90 @@ +From a48ea27debb926a30810c9f1a42f096494c727e2 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Mon, 29 Feb 2016 14:52:16 +0100 +Subject: [PATCH] network/dhclient-script.sh: add classless-static-routes + support + +https://bugzilla.redhat.com/show_bug.cgi?id=1260955 +--- + modules.d/40network/dhclient-script.sh | 48 ++++++++++++++++++++++++++ + modules.d/40network/dhclient.conf | 5 ++- + 2 files changed, 52 insertions(+), 1 deletion(-) + +diff --git a/modules.d/40network/dhclient-script.sh b/modules.d/40network/dhclient-script.sh +index 6d4b9dd1..95538585 100755 +--- a/modules.d/40network/dhclient-script.sh ++++ b/modules.d/40network/dhclient-script.sh +@@ -95,6 +95,51 @@ setup_interface6() { + [ -n "$hostname" ] && echo "echo ${hostname%.$domain}${domain:+.$domain} > /proc/sys/kernel/hostname" > /tmp/net.$netif.hostname + } + ++function parse_option_121() { ++ while [ $# -ne 0 ]; do ++ mask="$1" ++ shift ++ ++ # Is the destination a multicast group? ++ if [ $1 -ge 224 -a $1 -lt 240 ]; then ++ multicast=1 ++ else ++ multicast=0 ++ fi ++ ++ # Parse the arguments into a CIDR net/mask string ++ if [ $mask -gt 24 ]; then ++ destination="$1.$2.$3.$4/$mask" ++ shift; shift; shift; shift ++ elif [ $mask -gt 16 ]; then ++ destination="$1.$2.$3.0/$mask" ++ shift; shift; shift ++ elif [ $mask -gt 8 ]; then ++ destination="$1.$2.0.0/$mask" ++ shift; shift ++ else ++ destination="$1.0.0.0/$mask" ++ shift ++ fi ++ ++ # Read the gateway ++ gateway="$1.$2.$3.$4" ++ shift; shift; shift; shift ++ ++ # Multicast routing on Linux ++ # - If you set a next-hop address for a multicast group, this breaks with Cisco switches ++ # - If you simply leave it link-local and attach it to an interface, it works fine. ++ if [ $multicast -eq 1 ]; then ++ temp_result="$destination dev $interface" ++ else ++ temp_result="$destination via $gateway dev $interface" ++ fi ++ ++ echo "/sbin/ip route add $temp_result" ++ done ++} ++ ++ + case $reason in + PREINIT) + echo "dhcp: PREINIT $netif up" +@@ -129,6 +174,9 @@ case $reason in + { + echo '. /lib/net-lib.sh' + echo "setup_net $netif" ++ if [ -n "$new_classless_static_routes" ]; then ++ modify_routes add "$(parse_option_121 $new_classless_static_routes)" ++ fi + echo "source_hook initqueue/online $netif" + [ -e /tmp/net.$netif.manualup ] || echo "/sbin/netroot $netif" + echo "rm -f -- $hookdir/initqueue/setup_net_$netif.sh" +diff --git a/modules.d/40network/dhclient.conf b/modules.d/40network/dhclient.conf +index dbf58821..7b067632 100644 +--- a/modules.d/40network/dhclient.conf ++++ b/modules.d/40network/dhclient.conf +@@ -1,3 +1,6 @@ ++ ++option classless-routes code 121 = array of unsigned integer 8; ++ + request subnet-mask, broadcast-address, time-offset, routers, + domain-name, domain-name-servers, domain-search, host-name, +- root-path, interface-mtu; ++ root-path, interface-mtu classless-routes; diff --git a/SOURCES/0371-network-if-rd.neednet-0-we-don-t-need-a-bootdev.patch b/SOURCES/0371-network-if-rd.neednet-0-we-don-t-need-a-bootdev.patch new file mode 100644 index 0000000..dea5c19 --- /dev/null +++ b/SOURCES/0371-network-if-rd.neednet-0-we-don-t-need-a-bootdev.patch @@ -0,0 +1,46 @@ +From 0d7b00a230a48cad8708893ee1bcc866425d573a Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 26 Jan 2016 12:26:03 +0100 +Subject: [PATCH] network: if rd.neednet=0 we don't need a bootdev + +otherwise dracut would wait for the bootdev interface to appear and be +setup + +(cherry picked from commit f4f8fb5c10cc8d0047123324197aff25f0a63e04) +--- + modules.d/40network/parse-ip-opts.sh | 9 ++++----- + 1 file changed, 4 insertions(+), 5 deletions(-) + +diff --git a/modules.d/40network/parse-ip-opts.sh b/modules.d/40network/parse-ip-opts.sh +index 7c403f79..3c962044 100755 +--- a/modules.d/40network/parse-ip-opts.sh ++++ b/modules.d/40network/parse-ip-opts.sh +@@ -42,6 +42,8 @@ if [ -n "$NEEDBOOTDEV" ] && getargbool 1 rd.neednet; then + #[ -z "$BOOTDEV" ] && warn "Please supply bootdev argument for multiple ip= lines" + echo "rd.neednet=1" > /etc/cmdline.d/dracut-neednet.conf + info "Multiple ip= arguments: assuming rd.neednet=1" ++else ++ unset NEEDBOOTDEV + fi + + # Check ip= lines +@@ -50,17 +52,14 @@ for p in $(getargs ip=); do + ip_to_var $p + + # make first device specified the BOOTDEV +- if [ -z "$BOOTDEV" ] && [ -n "$dev" ]; then ++ if [ -n "$NEEDBOOTDEV" ] && [ -z "$BOOTDEV" ] && [ -n "$dev" ]; then + BOOTDEV="$dev" +- [ -n "$NEEDBOOTDEV" ] && info "Setting bootdev to '$BOOTDEV'" ++ info "Setting bootdev to '$BOOTDEV'" + fi + + # skip ibft since we did it above + [ "$autoconf" = "ibft" ] && continue + +- # We need to have an ip= line for the specified bootdev +- [ -n "$NEEDBOOTDEV" ] && [ "$dev" = "$BOOTDEV" ] && BOOTDEVOK=1 +- + # Empty autoconf defaults to 'dhcp' + if [ -z "$autoconf" ] ; then + warn "Empty autoconf values default to dhcp" diff --git a/SOURCES/0372-url-lib-url-lib.sh-nfs_fetch_url-pass-file-directory.patch b/SOURCES/0372-url-lib-url-lib.sh-nfs_fetch_url-pass-file-directory.patch new file mode 100644 index 0000000..45eaafc --- /dev/null +++ b/SOURCES/0372-url-lib-url-lib.sh-nfs_fetch_url-pass-file-directory.patch @@ -0,0 +1,26 @@ +From 043d61b54223ed6f9ef7faa2b9c01750272948c3 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Mon, 14 Mar 2016 15:55:03 +0100 +Subject: [PATCH] url-lib/url-lib.sh:nfs_fetch_url(): pass file directory to + query if nfs is already mounted + +Otherwise the returned mount path includes the file with the directory + +https://bugzilla.redhat.com/show_bug.cgi?id=1302764 +--- + modules.d/45url-lib/url-lib.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/45url-lib/url-lib.sh b/modules.d/45url-lib/url-lib.sh +index 12df9b4c..f3d152d6 100755 +--- a/modules.d/45url-lib/url-lib.sh ++++ b/modules.d/45url-lib/url-lib.sh +@@ -106,7 +106,7 @@ nfs_fetch_url() { + local filepath="${path%/*}" filename="${path##*/}" mntdir="" + + # skip mount if server:/filepath is already mounted +- mntdir=$(nfs_already_mounted "$server" "$path") ++ mntdir=$(nfs_already_mounted "$server" "$filepath") + if [ -z "$mntdir" ]; then + local mntdir="$(mkuniqdir /run nfs_mnt)" + mount_nfs "$nfs:$server:$filepath${options:+:$options}" "$mntdir" diff --git a/SOURCES/0373-95iscsi-Autodetect-iSCSI-firmware.patch b/SOURCES/0373-95iscsi-Autodetect-iSCSI-firmware.patch new file mode 100644 index 0000000..85f4296 --- /dev/null +++ b/SOURCES/0373-95iscsi-Autodetect-iSCSI-firmware.patch @@ -0,0 +1,85 @@ +From f31220ec883956f459bc227d6fe35d3a581eb369 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke <hare@suse.de> +Date: Thu, 25 Feb 2016 20:58:09 +0800 +Subject: [PATCH] 95iscsi: Autodetect iSCSI firmware + +Some iSCSI initiator present firmware information in +/sys/firmware/ibft or /sys/firmware/iscsi_bootX + +Whenever we detect one of those directories we should assume +that the iSCSI devices should be activated. + +Also incorporates SUSE patches: +0049: +95iscsi: Use 'ip=ibft' for ibft autoconfiguration + +For iBFT autoconfiguration we should be setting 'ip=ibft' +instead of rd.neednet. This should instruct dracut to only +enable the iBFT interfaces and leave the rest alone. + +References: bnc#879038 + +0054: +95iscsi: update commandline printing + +dracut has a separate callout 'cmdline' which should be used +for printing out the generated commandline. + +Signed-off-by: Pavel Wieczorkiewicz <pwieczorkiewicz@suse.com> +Signed-off-by: Hannes Reinecke <hare@suse.de> +Signed-off-by: Thomas Renninger <trenn@suse.de> +--- + modules.d/95iscsi/module-setup.sh | 26 ++++++++++++++++++++++++++ + 1 file changed, 26 insertions(+) + +diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh +index 4ecba05e..7ef0caa6 100755 +--- a/modules.d/95iscsi/module-setup.sh ++++ b/modules.d/95iscsi/module-setup.sh +@@ -29,6 +29,21 @@ check() { + return 0 + } + ++install_ibft() { ++ # When iBFT / iscsi_boot is detected: ++ # - Use 'ip=ibft' to set up iBFT network interface ++ # - specify firmware booting cmdline parameter ++ ++ for d in /sys/firmware/* ; do ++ if [ -d ${d}/initiator ] ; then ++ if [ ${d##*/} = "ibft" ] ; then ++ echo -n "ip=ibft " ++ fi ++ echo -n "rd.iscsi.firmware=1" ++ fi ++ done ++} ++ + depends() { + echo network rootfs-block + } +@@ -36,6 +51,12 @@ depends() { + installkernel() { + local _arch=$(uname -m) + ++ # Detect iBFT and perform mandatory steps ++ if [[ $hostonly_cmdline == "yes" ]] ; then ++ install_ibft > "${initdir}/etc/cmdline.d/95iscsi.conf" ++ echo >> "${initdir}/etc/cmdline.d/95iscsi.conf" ++ fi ++ + instmods bnx2i qla4xxx cxgb3i cxgb4i be2iscsi + hostonly="" instmods iscsi_tcp iscsi_ibft crc32c iscsi_boot_sysfs + iscsi_module_filter() { +@@ -75,6 +96,11 @@ installkernel() { + | iscsi_module_filter | instmods + } + ++cmdline() { ++ install_ibft ++} ++ ++# called by dracut + install() { + inst_multiple umount iscsistart hostname iscsi-iname + inst_multiple -o iscsiuio diff --git a/SOURCES/0374-95iscsi-Install-libgcc_s-library.patch b/SOURCES/0374-95iscsi-Install-libgcc_s-library.patch new file mode 100644 index 0000000..9305faa --- /dev/null +++ b/SOURCES/0374-95iscsi-Install-libgcc_s-library.patch @@ -0,0 +1,29 @@ +From 9eab750787d7e94e53df282119640a5d2beb04e4 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke <hare@suse.de> +Date: Thu, 25 Feb 2016 20:58:10 +0800 +Subject: [PATCH] 95iscsi: Install libgcc_s library + +iscsiuio is using pthread, which requires libgcc_s for +pthread_cancel to work. +Without this library iscsiuio will crash with SIGABRT. + +References: bnc#881692 + +Signed-off-by: Hannes Reinecke <hare@suse.de> +Signed-off-by: Thomas Renninger <trenn@suse.de> +--- + modules.d/95iscsi/module-setup.sh | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh +index 7ef0caa6..422bea72 100755 +--- a/modules.d/95iscsi/module-setup.sh ++++ b/modules.d/95iscsi/module-setup.sh +@@ -104,6 +104,7 @@ cmdline() { + install() { + inst_multiple umount iscsistart hostname iscsi-iname + inst_multiple -o iscsiuio ++ inst_libdir_file 'libgcc_s.so*' + inst_hook cmdline 90 "$moddir/parse-iscsiroot.sh" + inst_hook cleanup 90 "$moddir/cleanup-iscsi.sh" + inst "$moddir/iscsiroot.sh" "/sbin/iscsiroot" diff --git a/SOURCES/0375-95iscsi-Fixup-bnx2i-offload-booting.patch b/SOURCES/0375-95iscsi-Fixup-bnx2i-offload-booting.patch new file mode 100644 index 0000000..31721d8 --- /dev/null +++ b/SOURCES/0375-95iscsi-Fixup-bnx2i-offload-booting.patch @@ -0,0 +1,67 @@ +From bff5416520f950942b4040ed10281d2ccaf9f09a Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke <hare@suse.de> +Date: Thu, 25 Feb 2016 20:58:11 +0800 +Subject: [PATCH] 95iscsi: Fixup bnx2i offload booting + +bnx2i is using a separate iSCSI offload engine with a separate +MAC address. As a result, the iBFT information is displaying +a MAC address which does not relate to any MAC address from +the network interfaces. +In addition, the iSCSI offload engine works independently on +the NIC, so we do not need to enable the NIC for iSCSI offload +to work. +This patch modifies the automatic iBFT detection to not set +the 'ip=ibft' flag when bnx2i offload is detected. + +References: bnc#855747 + +Signed-off-by: Hannes Reinecke <hare@suse.de> +Signed-off-by: Thomas Renninger <trenn@suse.de> +--- + modules.d/95iscsi/module-setup.sh | 26 +++++++++++++++++++++++++- + 1 file changed, 25 insertions(+), 1 deletion(-) + +diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh +index 422bea72..181da3c7 100755 +--- a/modules.d/95iscsi/module-setup.sh ++++ b/modules.d/95iscsi/module-setup.sh +@@ -29,14 +29,38 @@ check() { + return 0 + } + ++get_ibft_mod() { ++ local ibft_mac=$1 ++ # Return the iSCSI offload module for a given MAC address ++ iscsiadm -m iface | while read iface_name iface_desc ; do ++ IFS=$',' ++ set -- $iface_desc ++ if [ "$ibft_mac" = "$2" ] ; then ++ echo $1 ++ return 0 ++ fi ++ unset IFS ++ done ++} ++ + install_ibft() { + # When iBFT / iscsi_boot is detected: + # - Use 'ip=ibft' to set up iBFT network interface ++ # Note: bnx2i is using a different MAC address of iSCSI offloading ++ # so the 'ip=ibft' parameter must not be set + # - specify firmware booting cmdline parameter + + for d in /sys/firmware/* ; do ++ if [ -d ${d}/ethernet0 ] ; then ++ read ibft_mac < ${d}/ethernet0/mac ++ ibft_mod=$(get_ibft_mod $ibft_mac) ++ fi ++ if [ -z "$ibft_mod" ] && [ -d ${d}/ethernet1 ] ; then ++ read ibft_mac < ${d}/ethernet1/mac ++ ibft_mod=$(get_ibft_mod $ibft_mac) ++ fi + if [ -d ${d}/initiator ] ; then +- if [ ${d##*/} = "ibft" ] ; then ++ if [ ${d##*/} = "ibft" ] && [ "$ibft_mod" != "bnx2i" ] ; then + echo -n "ip=ibft " + fi + echo -n "rd.iscsi.firmware=1" diff --git a/SOURCES/0376-95iscsi-More-empty-cmdline-fixes.patch b/SOURCES/0376-95iscsi-More-empty-cmdline-fixes.patch new file mode 100644 index 0000000..3eb8a0b --- /dev/null +++ b/SOURCES/0376-95iscsi-More-empty-cmdline-fixes.patch @@ -0,0 +1,45 @@ +From 12aa314819f2b1067442e8a7aa5d3f36301b7f47 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke <hare@suse.de> +Date: Thu, 25 Feb 2016 20:58:12 +0800 +Subject: [PATCH] 95iscsi: More empty cmdline fixes + +This fixes up some 95iscsi/module-setup.sh which might print out empty +commandline files. + +Signed-off-by: Hannes Reinecke <hare@suse.de> +Signed-off-by: Thomas Renninger <trenn@suse.de> +--- + modules.d/95iscsi/module-setup.sh | 13 +++++++------ + 1 file changed, 7 insertions(+), 6 deletions(-) + +diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh +index 181da3c7..64c9c1d1 100755 +--- a/modules.d/95iscsi/module-setup.sh ++++ b/modules.d/95iscsi/module-setup.sh +@@ -75,12 +75,6 @@ depends() { + installkernel() { + local _arch=$(uname -m) + +- # Detect iBFT and perform mandatory steps +- if [[ $hostonly_cmdline == "yes" ]] ; then +- install_ibft > "${initdir}/etc/cmdline.d/95iscsi.conf" +- echo >> "${initdir}/etc/cmdline.d/95iscsi.conf" +- fi +- + instmods bnx2i qla4xxx cxgb3i cxgb4i be2iscsi + hostonly="" instmods iscsi_tcp iscsi_ibft crc32c iscsi_boot_sysfs + iscsi_module_filter() { +@@ -129,6 +123,13 @@ install() { + inst_multiple umount iscsistart hostname iscsi-iname + inst_multiple -o iscsiuio + inst_libdir_file 'libgcc_s.so*' ++ ++ # Detect iBFT and perform mandatory steps ++ if [[ $hostonly_cmdline == "yes" ]] ; then ++ local _ibftconf=$(install_ibft) ++ [[ $_ibftconf ]] && printf "%s\n" "$_ibftconf" >> "${initdir}/etc/cmdline.d/95iscsi.conf" ++ fi ++ + inst_hook cmdline 90 "$moddir/parse-iscsiroot.sh" + inst_hook cleanup 90 "$moddir/cleanup-iscsi.sh" + inst "$moddir/iscsiroot.sh" "/sbin/iscsiroot" diff --git a/SOURCES/0377-95iscsi-parse-output-from-iscsiadm-correctly.patch b/SOURCES/0377-95iscsi-parse-output-from-iscsiadm-correctly.patch new file mode 100644 index 0000000..823a803 --- /dev/null +++ b/SOURCES/0377-95iscsi-parse-output-from-iscsiadm-correctly.patch @@ -0,0 +1,44 @@ +From 68021e85c982e62dd4082accf024b84da040f450 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke <hare@suse.de> +Date: Thu, 25 Feb 2016 20:58:13 +0800 +Subject: [PATCH] 95iscsi: parse output from iscsiadm correctly + +Due to some obsure reason the IFS parameter is not set correctly +when evaluating get_ibft_mod(). So change the parsing to not rely +on IFS altogether. + +References: bnc#886199 + +Signed-off-by: Hannes Reinecke <hare@suse.de> +Signed-off-by: Thomas Renninger <trenn@suse.de> +--- + modules.d/95iscsi/module-setup.sh | 13 +++++++------ + 1 file changed, 7 insertions(+), 6 deletions(-) + +diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh +index 64c9c1d1..b1f5c6cb 100755 +--- a/modules.d/95iscsi/module-setup.sh ++++ b/modules.d/95iscsi/module-setup.sh +@@ -31,15 +31,16 @@ check() { + + get_ibft_mod() { + local ibft_mac=$1 ++ local iface_mac iface_mod + # Return the iSCSI offload module for a given MAC address +- iscsiadm -m iface | while read iface_name iface_desc ; do +- IFS=$',' +- set -- $iface_desc +- if [ "$ibft_mac" = "$2" ] ; then +- echo $1 ++ for iface_desc in $(iscsiadm -m iface | cut -f 2 -d ' '); do ++ iface_mod=${iface_desc%%,*} ++ iface_mac=${iface_desc#*,} ++ iface_mac=${iface_mac%%,*} ++ if [ "$ibft_mac" = "$iface_mac" ] ; then ++ echo $iface_mod + return 0 + fi +- unset IFS + done + } + diff --git a/SOURCES/0378-shutdown-guard-against-read-only-run.patch b/SOURCES/0378-shutdown-guard-against-read-only-run.patch new file mode 100644 index 0000000..021120c --- /dev/null +++ b/SOURCES/0378-shutdown-guard-against-read-only-run.patch @@ -0,0 +1,41 @@ +From 8fb06a05624d8aaa067b61b70ecbbbd90fc0f88e Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Mon, 30 Nov 2015 11:27:03 +0100 +Subject: [PATCH] shutdown: guard against read-only /run + +remount the switch rooted /run writeable again. + +(cherry picked from commit 54e09dfb72b557ac8ccd48f5d37089287d272ec7) +--- + modules.d/99shutdown/module-setup.sh | 2 +- + modules.d/99shutdown/shutdown.sh | 4 ++++ + 2 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/modules.d/99shutdown/module-setup.sh b/modules.d/99shutdown/module-setup.sh +index 5361936e..bdb33733 100755 +--- a/modules.d/99shutdown/module-setup.sh ++++ b/modules.d/99shutdown/module-setup.sh +@@ -13,7 +13,7 @@ depends() { + + install() { + local _d +- inst_multiple umount poweroff reboot halt losetup ++ inst_multiple umount poweroff reboot halt losetup stat + inst_multiple -o kexec + inst "$moddir/shutdown.sh" "$prefix/shutdown" + [ -e "${initdir}/lib" ] || mkdir -m 0755 -p ${initdir}/lib +diff --git a/modules.d/99shutdown/shutdown.sh b/modules.d/99shutdown/shutdown.sh +index 1daf2ca3..bcb191bc 100755 +--- a/modules.d/99shutdown/shutdown.sh ++++ b/modules.d/99shutdown/shutdown.sh +@@ -14,6 +14,10 @@ export TERM=linux + export PATH=/usr/sbin:/usr/bin:/sbin:/bin + . /lib/dracut-lib.sh + ++if [ "$(stat -c '%T' -f /)" = "tmpfs" ]; then ++ mount -o remount,rw / ++fi ++ + mkdir /oldsys + for i in sys proc run dev; do + mkdir /oldsys/$i diff --git a/SOURCES/0379-kernel-modules-increase-SDHCI-driver-inclusion.patch b/SOURCES/0379-kernel-modules-increase-SDHCI-driver-inclusion.patch new file mode 100644 index 0000000..c5880a3 --- /dev/null +++ b/SOURCES/0379-kernel-modules-increase-SDHCI-driver-inclusion.patch @@ -0,0 +1,33 @@ +From 688afe0fc3e705a5a65e9e74f6a77e56fb364c3f Mon Sep 17 00:00:00 2001 +From: Daniel Drake <drake@endlessm.com> +Date: Thu, 15 Jan 2015 11:27:47 -0600 +Subject: [PATCH] kernel-modules: increase SDHCI driver inclusion + +The sdhci-pci module is currently not being included in the initramfs, +even though other sdhci modules are. This breaks boot on systems that +rely on this driver to access the root filesystem. + +Instead of looking for modules that use sdhci_pltfm_init, look for +sdhci_add_host. I checked 3.18 kernel sources, and this change +does not remove any of the previously-matched SDHCI drivers. +It should result in the addition of sdhci-pci, sdhci-s3c, sdhci-spear +and sdhci-acpi. + +(cherry picked from commit 6dcc5e1158bf502b431491a381a16ca894f99ae2) +--- + modules.d/90kernel-modules/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh +index 34d85b1c..7d9d369a 100755 +--- a/modules.d/90kernel-modules/module-setup.sh ++++ b/modules.d/90kernel-modules/module-setup.sh +@@ -5,7 +5,7 @@ + installkernel() { + if [[ -z $drivers ]]; then + block_module_filter() { +- local _blockfuncs='ahci_platform_get_resources|ata_scsi_ioctl|scsi_add_host|blk_cleanup_queue|register_mtd_blktrans|scsi_esp_register|register_virtio_device|usb_stor_disconnect|mmc_add_host|sdhci_pltfm_init' ++ local _blockfuncs='ahci_platform_get_resources|ata_scsi_ioctl|scsi_add_host|blk_cleanup_queue|register_mtd_blktrans|scsi_esp_register|register_virtio_device|usb_stor_disconnect|mmc_add_host|sdhci_add_host' + # subfunctions inherit following FDs + local _merge=8 _side2=9 + function bmf1() { diff --git a/SOURCES/0380-dracut-functions.sh-add-str_starts-and-str_ends.patch b/SOURCES/0380-dracut-functions.sh-add-str_starts-and-str_ends.patch new file mode 100644 index 0000000..4024e09 --- /dev/null +++ b/SOURCES/0380-dracut-functions.sh-add-str_starts-and-str_ends.patch @@ -0,0 +1,24 @@ +From 6656e1547f875253d1499bcd06ae0f6440a087c6 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 25 May 2016 14:49:34 +0200 +Subject: [PATCH] dracut-functions.sh: add str_starts() and str_ends() + +--- + dracut-functions.sh | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/dracut-functions.sh b/dracut-functions.sh +index d71ff676..4a9729c7 100755 +--- a/dracut-functions.sh ++++ b/dracut-functions.sh +@@ -29,6 +29,10 @@ fi + + # Generic substring function. If $2 is in $1, return 0. + strstr() { [[ $1 = *$2* ]]; } ++# returns OK if $1 contains literal string $2 at the beginning, and isn't empty ++str_starts() { [ "${1#"$2"*}" != "$1" ]; } ++# returns OK if $1 contains literal string $2 at the end, and isn't empty ++str_ends() { [ "${1%*"$2"}" != "$1" ]; } + + # helper function for check() in module-setup.sh + # to check for required installed binaries diff --git a/SOURCES/0381-test-remove-dash-module-as-it-is-not-available-in-RH.patch b/SOURCES/0381-test-remove-dash-module-as-it-is-not-available-in-RH.patch new file mode 100644 index 0000000..aec0b31 --- /dev/null +++ b/SOURCES/0381-test-remove-dash-module-as-it-is-not-available-in-RH.patch @@ -0,0 +1,143 @@ +From 249a94ab048586adf4fc80bed05c4bf5cc773fd2 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 1 Mar 2016 12:32:02 +0100 +Subject: [PATCH] test: remove dash module, as it is not available in RHEL + +--- + test/TEST-01-BASIC/test.sh | 2 +- + test/TEST-03-USR-MOUNT/test.sh | 2 +- + test/TEST-10-RAID/test.sh | 2 +- + test/TEST-12-RAID-DEG/test.sh | 2 +- + test/TEST-14-IMSM/test.sh | 2 +- + test/TEST-17-LVM-THIN/test.sh | 2 +- + test/TEST-30-ISCSI/test.sh | 2 +- + test/TEST-40-NBD/test.sh | 4 ++-- + test/TEST-50-MULTINIC/test.sh | 2 +- + 9 files changed, 10 insertions(+), 10 deletions(-) + +diff --git a/test/TEST-01-BASIC/test.sh b/test/TEST-01-BASIC/test.sh +index 642b250e..aef07373 100755 +--- a/test/TEST-01-BASIC/test.sh ++++ b/test/TEST-01-BASIC/test.sh +@@ -62,7 +62,7 @@ test_setup() { + # We do it this way so that we do not risk trashing the host mdraid + # devices, volume groups, encrypted partitions, etc. + $basedir/dracut.sh -l -i $TESTDIR/overlay / \ +- -m "dash udev-rules base rootfs-block fs-lib kernel-modules fs-lib" \ ++ -m "udev-rules base rootfs-block fs-lib kernel-modules fs-lib" \ + -d "piix ide-gd_mod ata_piix ext3 sd_mod" \ + --nomdadmconf \ + -f $TESTDIR/initramfs.makeroot $KVERSION || return 1 +diff --git a/test/TEST-03-USR-MOUNT/test.sh b/test/TEST-03-USR-MOUNT/test.sh +index e772352a..363f8b04 100755 +--- a/test/TEST-03-USR-MOUNT/test.sh ++++ b/test/TEST-03-USR-MOUNT/test.sh +@@ -89,7 +89,7 @@ test_setup() { + # We do it this way so that we do not risk trashing the host mdraid + # devices, volume groups, encrypted partitions, etc. + $basedir/dracut.sh -l -i $TESTDIR/overlay / \ +- -m "dash udev-rules btrfs base rootfs-block fs-lib kernel-modules" \ ++ -m "udev-rules btrfs base rootfs-block fs-lib kernel-modules" \ + -d "piix ide-gd_mod ata_piix btrfs sd_mod" \ + --nomdadmconf \ + --nohardlink \ +diff --git a/test/TEST-10-RAID/test.sh b/test/TEST-10-RAID/test.sh +index cf474dff..45edda2c 100755 +--- a/test/TEST-10-RAID/test.sh ++++ b/test/TEST-10-RAID/test.sh +@@ -60,7 +60,7 @@ test_setup() { + # We do it this way so that we do not risk trashing the host mdraid + # devices, volume groups, encrypted partitions, etc. + $basedir/dracut.sh -l -i $TESTDIR/overlay / \ +- -m "dash crypt lvm mdraid udev-rules base rootfs-block fs-lib kernel-modules" \ ++ -m "crypt lvm mdraid udev-rules base rootfs-block fs-lib kernel-modules" \ + -d "piix ide-gd_mod ata_piix ext2 sd_mod" \ + --nomdadmconf \ + -f $TESTDIR/initramfs.makeroot $KVERSION || return 1 +diff --git a/test/TEST-12-RAID-DEG/test.sh b/test/TEST-12-RAID-DEG/test.sh +index 11f66b23..e749ba0c 100755 +--- a/test/TEST-12-RAID-DEG/test.sh ++++ b/test/TEST-12-RAID-DEG/test.sh +@@ -98,7 +98,7 @@ test_setup() { + # We do it this way so that we do not risk trashing the host mdraid + # devices, volume groups, encrypted partitions, etc. + $basedir/dracut.sh -l -i $TESTDIR/overlay / \ +- -m "dash crypt lvm mdraid udev-rules base rootfs-block fs-lib kernel-modules" \ ++ -m "crypt lvm mdraid udev-rules base rootfs-block fs-lib kernel-modules" \ + -d "piix ide-gd_mod ata_piix ext2 sd_mod" \ + -f $TESTDIR/initramfs.makeroot $KVERSION || return 1 + rm -rf -- $TESTDIR/overlay +diff --git a/test/TEST-14-IMSM/test.sh b/test/TEST-14-IMSM/test.sh +index 9465965c..a600e1c0 100755 +--- a/test/TEST-14-IMSM/test.sh ++++ b/test/TEST-14-IMSM/test.sh +@@ -86,7 +86,7 @@ test_setup() { + # We do it this way so that we do not risk trashing the host mdraid + # devices, volume groups, encrypted partitions, etc. + $basedir/dracut.sh -l -i $TESTDIR/overlay / \ +- -m "dash lvm mdraid dmraid udev-rules base rootfs-block fs-lib kernel-modules" \ ++ -m "lvm mdraid dmraid udev-rules base rootfs-block fs-lib kernel-modules" \ + -d "piix ide-gd_mod ata_piix ext2 sd_mod dm-multipath dm-crypt dm-round-robin faulty linear multipath raid0 raid10 raid1 raid456" \ + -f $TESTDIR/initramfs.makeroot $KVERSION || return 1 + rm -rf -- $TESTDIR/overlay +diff --git a/test/TEST-17-LVM-THIN/test.sh b/test/TEST-17-LVM-THIN/test.sh +index 79e224e2..dc6e5885 100755 +--- a/test/TEST-17-LVM-THIN/test.sh ++++ b/test/TEST-17-LVM-THIN/test.sh +@@ -57,7 +57,7 @@ test_setup() { + # We do it this way so that we do not risk trashing the host mdraid + # devices, volume groups, encrypted partitions, etc. + $basedir/dracut.sh -l -i $TESTDIR/overlay / \ +- -m "dash lvm mdraid udev-rules base rootfs-block fs-lib kernel-modules" \ ++ -m "lvm mdraid udev-rules base rootfs-block fs-lib kernel-modules" \ + -d "piix ide-gd_mod ata_piix ext2 sd_mod" \ + -f $TESTDIR/initramfs.makeroot $KVERSION || return 1 + rm -rf -- $TESTDIR/overlay +diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh +index fc4bdce9..65457a5a 100755 +--- a/test/TEST-30-ISCSI/test.sh ++++ b/test/TEST-30-ISCSI/test.sh +@@ -186,7 +186,7 @@ test_setup() { + # We do it this way so that we do not risk trashing the host mdraid + # devices, volume groups, encrypted partitions, etc. + $basedir/dracut.sh -l -i $TESTDIR/overlay / \ +- -m "dash crypt lvm mdraid udev-rules base rootfs-block fs-lib kernel-modules" \ ++ -m "crypt lvm mdraid udev-rules base rootfs-block fs-lib kernel-modules" \ + -d "piix ide-gd_mod ata_piix ext3 sd_mod" \ + --no-hostonly-cmdline -N \ + -f $TESTDIR/initramfs.makeroot $KVERSION || return 1 +diff --git a/test/TEST-40-NBD/test.sh b/test/TEST-40-NBD/test.sh +index abf1a4f4..1a6524de 100755 +--- a/test/TEST-40-NBD/test.sh ++++ b/test/TEST-40-NBD/test.sh +@@ -226,7 +226,7 @@ make_encrypted_root() { + # We do it this way so that we do not risk trashing the host mdraid + # devices, volume groups, encrypted partitions, etc. + $basedir/dracut.sh -l -i $TESTDIR/overlay / \ +- -m "dash crypt lvm mdraid udev-rules base rootfs-block fs-lib kernel-modules" \ ++ -m "crypt lvm mdraid udev-rules base rootfs-block fs-lib kernel-modules" \ + -d "piix ide-gd_mod ata_piix ext2 ext3 sd_mod" \ + -f $TESTDIR/initramfs.makeroot $KVERSION || return 1 + rm -rf -- $TESTDIR/overlay +@@ -352,7 +352,7 @@ test_setup() { + ) + + sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ +- -m "dash udev-rules rootfs-block fs-lib base debug kernel-modules" \ ++ -m "udev-rules rootfs-block fs-lib base debug kernel-modules" \ + -d "af_packet piix ide-gd_mod ata_piix ext2 ext3 sd_mod e1000" \ + -f $TESTDIR/initramfs.server $KVERSION || return 1 + +diff --git a/test/TEST-50-MULTINIC/test.sh b/test/TEST-50-MULTINIC/test.sh +index 4f73203f..1c46d7a8 100755 +--- a/test/TEST-50-MULTINIC/test.sh ++++ b/test/TEST-50-MULTINIC/test.sh +@@ -264,7 +264,7 @@ test_setup() { + + # Make server's dracut image + $basedir/dracut.sh -l -i "$TESTDIR"/overlay / \ +- -m "dash udev-rules base rootfs-block fs-lib debug kernel-modules watchdog" \ ++ -m "udev-rules base rootfs-block fs-lib debug kernel-modules watchdog" \ + -d "af_packet piix ide-gd_mod ata_piix ext3 sd_mod nfsv2 nfsv3 nfsv4 nfs_acl nfs_layout_nfsv41_files nfsd e1000 i6300esb ib700wdt" \ + -f "$TESTDIR"/initramfs.server "$KVERSION" || return 1 + diff --git a/SOURCES/0382-test-NBD-add-checks-for-needed-binaries.patch b/SOURCES/0382-test-NBD-add-checks-for-needed-binaries.patch new file mode 100644 index 0000000..08fbbc5 --- /dev/null +++ b/SOURCES/0382-test-NBD-add-checks-for-needed-binaries.patch @@ -0,0 +1,44 @@ +From 15ec719501af349a3b02495d6151e3b92854572b Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 1 Mar 2016 12:32:23 +0100 +Subject: [PATCH] test/NBD: add checks for needed binaries + +--- + test/TEST-40-NBD/test.sh | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +diff --git a/test/TEST-40-NBD/test.sh b/test/TEST-40-NBD/test.sh +index 1a6524de..848a103f 100755 +--- a/test/TEST-40-NBD/test.sh ++++ b/test/TEST-40-NBD/test.sh +@@ -95,7 +95,6 @@ client_test() { + } + + test_run() { +- modinfo nbd &>/dev/null || { echo "Kernel does not support nbd"; exit 1; } + if ! run_server; then + echo "Failed to start server" 1>&2 + return 1 +@@ -325,9 +324,6 @@ make_server_root() { + } + + test_setup() { +- +- modinfo nbd &>/dev/null || { echo "Kernel does not support nbd"; exit 1; } +- + make_encrypted_root || return 1 + make_client_root || return 1 + make_server_root || return 1 +@@ -370,6 +366,12 @@ kill_server() { + fi + } + ++test_check() { ++ modinfo nbd &>/dev/null || { echo "Kernel does not support nbd"; return 1; } ++ command -v nbd-client &>/dev/null || { echo "No nbd-client available"; return 1; } ++ command -v nbd-server &>/dev/null || { echo "No nbd-server available"; return 1; } ++} ++ + test_cleanup() { + kill_server + } diff --git a/SOURCES/0383-dracut.spec-add-a-tag-with-the-current-version.patch b/SOURCES/0383-dracut.spec-add-a-tag-with-the-current-version.patch new file mode 100644 index 0000000..68322c5 --- /dev/null +++ b/SOURCES/0383-dracut.spec-add-a-tag-with-the-current-version.patch @@ -0,0 +1,21 @@ +From 863105bce149bf41b6c41483042d3e32ed713dfe Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 1 Mar 2016 12:33:28 +0100 +Subject: [PATCH] dracut.spec: add a tag with the current version + +--- + dracut.spec | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/dracut.spec b/dracut.spec +index c9379093..5c4b0471 100644 +--- a/dracut.spec ++++ b/dracut.spec +@@ -203,6 +203,7 @@ git commit -a -q -m "%{version} baseline." + + # Apply all the patches. + git am -p1 %{patches} ++git tag %{version} + %endif + + %build diff --git a/SOURCES/0384-more-dash-removal.patch b/SOURCES/0384-more-dash-removal.patch new file mode 100644 index 0000000..5e1c633 --- /dev/null +++ b/SOURCES/0384-more-dash-removal.patch @@ -0,0 +1,131 @@ +From b14e0fb8267de59618dbfe4db79b12dcced6b1ec Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 1 Mar 2016 13:38:05 +0100 +Subject: [PATCH] more dash removal + +--- + test/TEST-02-SYSTEMD/test.sh | 2 +- + test/TEST-04-FULL-SYSTEMD/test.sh | 4 ++-- + test/TEST-11-LVM/test.sh | 2 +- + test/TEST-13-ENC-RAID-LVM/test.sh | 2 +- + test/TEST-15-BTRFSRAID/test.sh | 2 +- + test/TEST-20-NFS/test.sh | 4 ++-- + test/TEST-30-ISCSI/test.sh | 4 ++-- + 7 files changed, 10 insertions(+), 10 deletions(-) + +diff --git a/test/TEST-02-SYSTEMD/test.sh b/test/TEST-02-SYSTEMD/test.sh +index 4ebff837..47268b0e 100755 +--- a/test/TEST-02-SYSTEMD/test.sh ++++ b/test/TEST-02-SYSTEMD/test.sh +@@ -58,7 +58,7 @@ test_setup() { + # We do it this way so that we do not risk trashing the host mdraid + # devices, volume groups, encrypted partitions, etc. + $basedir/dracut.sh -l -i $TESTDIR/overlay / \ +- -m "dash udev-rules base rootfs-block fs-lib kernel-modules" \ ++ -m "udev-rules base rootfs-block fs-lib kernel-modules" \ + -d "piix ide-gd_mod ata_piix ext3 sd_mod" \ + --nomdadmconf \ + -f $TESTDIR/initramfs.makeroot $KVERSION || return 1 +diff --git a/test/TEST-04-FULL-SYSTEMD/test.sh b/test/TEST-04-FULL-SYSTEMD/test.sh +index 38342386..01b406d0 100755 +--- a/test/TEST-04-FULL-SYSTEMD/test.sh ++++ b/test/TEST-04-FULL-SYSTEMD/test.sh +@@ -232,7 +232,7 @@ EOF + # We do it this way so that we do not risk trashing the host mdraid + # devices, volume groups, encrypted partitions, etc. + $basedir/dracut.sh -l -i $TESTDIR/overlay / \ +- -m "dash udev-rules btrfs base rootfs-block fs-lib kernel-modules" \ ++ -m "udev-rules btrfs base rootfs-block fs-lib kernel-modules" \ + -d "piix ide-gd_mod ata_piix btrfs sd_mod" \ + --nomdadmconf \ + --nohardlink \ +@@ -264,7 +264,7 @@ EOF + sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ + -a "debug systemd" \ + -I "/etc/machine-id /etc/hostname" \ +- -o "dash network plymouth lvm mdraid resume crypt i18n caps dm terminfo usrmount" \ ++ -o "network plymouth lvm mdraid resume crypt i18n caps dm terminfo usrmount" \ + -d "piix ide-gd_mod ata_piix btrfs sd_mod i6300esb ib700wdt" \ + -f $TESTDIR/initramfs.testing $KVERSION || return 1 + +diff --git a/test/TEST-11-LVM/test.sh b/test/TEST-11-LVM/test.sh +index c3c27bce..dd1f8ead 100755 +--- a/test/TEST-11-LVM/test.sh ++++ b/test/TEST-11-LVM/test.sh +@@ -57,7 +57,7 @@ test_setup() { + # We do it this way so that we do not risk trashing the host mdraid + # devices, volume groups, encrypted partitions, etc. + $basedir/dracut.sh -l -i $TESTDIR/overlay / \ +- -m "dash lvm mdraid udev-rules base rootfs-block fs-lib kernel-modules" \ ++ -m "lvm mdraid udev-rules base rootfs-block fs-lib kernel-modules" \ + -d "piix ide-gd_mod ata_piix ext2 sd_mod" \ + -f $TESTDIR/initramfs.makeroot $KVERSION || return 1 + rm -rf -- $TESTDIR/overlay +diff --git a/test/TEST-13-ENC-RAID-LVM/test.sh b/test/TEST-13-ENC-RAID-LVM/test.sh +index 993f71db..7f75b32d 100755 +--- a/test/TEST-13-ENC-RAID-LVM/test.sh ++++ b/test/TEST-13-ENC-RAID-LVM/test.sh +@@ -94,7 +94,7 @@ test_setup() { + # We do it this way so that we do not risk trashing the host mdraid + # devices, volume groups, encrypted partitions, etc. + $basedir/dracut.sh -l -i $TESTDIR/overlay / \ +- -m "dash crypt lvm mdraid udev-rules base rootfs-block fs-lib kernel-modules" \ ++ -m "crypt lvm mdraid udev-rules base rootfs-block fs-lib kernel-modules" \ + -d "piix ide-gd_mod ata_piix ext2 sd_mod" \ + -f $TESTDIR/initramfs.makeroot $KVERSION || return 1 + rm -rf -- $TESTDIR/overlay +diff --git a/test/TEST-15-BTRFSRAID/test.sh b/test/TEST-15-BTRFSRAID/test.sh +index 9b971362..c086677f 100755 +--- a/test/TEST-15-BTRFSRAID/test.sh ++++ b/test/TEST-15-BTRFSRAID/test.sh +@@ -58,7 +58,7 @@ test_setup() { + # We do it this way so that we do not risk trashing the host mdraid + # devices, volume groups, encrypted partitions, etc. + $basedir/dracut.sh -l -i $TESTDIR/overlay / \ +- -m "dash btrfs udev-rules base rootfs-block fs-lib kernel-modules" \ ++ -m "btrfs udev-rules base rootfs-block fs-lib kernel-modules" \ + -d "piix ide-gd_mod ata_piix btrfs sd_mod" \ + --nomdadmconf \ + -f $TESTDIR/initramfs.makeroot $KVERSION || return 1 +diff --git a/test/TEST-20-NFS/test.sh b/test/TEST-20-NFS/test.sh +index 14350e98..49dbc10e 100755 +--- a/test/TEST-20-NFS/test.sh ++++ b/test/TEST-20-NFS/test.sh +@@ -340,13 +340,13 @@ test_setup() { + + # Make server's dracut image + $basedir/dracut.sh -l -i $TESTDIR/overlay / \ +- -m "dash udev-rules base rootfs-block fs-lib debug kernel-modules watchdog" \ ++ -m "udev-rules base rootfs-block fs-lib debug kernel-modules watchdog" \ + -d "af_packet piix ide-gd_mod ata_piix ext3 sd_mod e1000 i6300esb" \ + -f $TESTDIR/initramfs.server $KVERSION || return 1 + + # Make client's dracut image + $basedir/dracut.sh -l -i $TESTDIR/overlay / \ +- -o "plymouth dash" \ ++ -o "plymouth" \ + -a "debug watchdog" \ + -d "af_packet piix ide-gd_mod ata_piix sd_mod e1000 nfs sunrpc i6300esb" \ + -f $TESTDIR/initramfs.testing $KVERSION || return 1 +diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh +index 65457a5a..5e59f0a8 100755 +--- a/test/TEST-30-ISCSI/test.sh ++++ b/test/TEST-30-ISCSI/test.sh +@@ -217,7 +217,7 @@ test_setup() { + inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules + ) + sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ +- -o "dash plymouth dmraid nfs" \ ++ -o "plymouth dmraid nfs" \ + -a "debug" \ + -d "af_packet piix ide-gd_mod ata_piix ext3 sd_mod" \ + --no-hostonly-cmdline -N \ +@@ -268,7 +268,7 @@ test_setup() { + + # Make server's dracut image + $basedir/dracut.sh -l -i $TESTDIR/overlay / \ +- -a "dash udev-rules base rootfs-block fs-lib debug kernel-modules" \ ++ -a "udev-rules base rootfs-block fs-lib debug kernel-modules" \ + -d "af_packet piix ide-gd_mod ata_piix ext3 sd_mod e1000 drbg" \ + --no-hostonly-cmdline -N \ + -f $TESTDIR/initramfs.server $KVERSION || return 1 diff --git a/SOURCES/0385-network-add-73-idrac.rules-udev-rules.patch b/SOURCES/0385-network-add-73-idrac.rules-udev-rules.patch new file mode 100644 index 0000000..54944fc --- /dev/null +++ b/SOURCES/0385-network-add-73-idrac.rules-udev-rules.patch @@ -0,0 +1,24 @@ +From 484aba429854bce6a601da81a8d94deebb9268ac Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 8 Jun 2016 16:19:12 +0200 +Subject: [PATCH] network: add 73-idrac.rules udev rules + +idrac USB devices want a special network name +--- + modules.d/40network/module-setup.sh | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh +index 6cbbe8f7..75ce6224 100755 +--- a/modules.d/40network/module-setup.sh ++++ b/modules.d/40network/module-setup.sh +@@ -91,6 +91,9 @@ install() { + inst_hook cmdline 99 "$moddir/parse-ifname.sh" + inst_hook cleanup 10 "$moddir/kill-dhclient.sh" + ++ # Special network nameing for idrac USB devs ++ inst_rules 73-idrac.rules ++ + # install all config files for teaming + unset TEAM_MASTER + unset TEAM_CONFIG diff --git a/SOURCES/0386-base-dracut-lib.sh-add-trim.patch b/SOURCES/0386-base-dracut-lib.sh-add-trim.patch new file mode 100644 index 0000000..e608040 --- /dev/null +++ b/SOURCES/0386-base-dracut-lib.sh-add-trim.patch @@ -0,0 +1,28 @@ +From ac422d577c1de1e94620787380932b9ccbd7b10a Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 10 Jun 2016 14:31:52 +0200 +Subject: [PATCH] base/dracut-lib.sh: add trim() + +trim() to remove leading and trailing whitespace +--- + modules.d/99base/dracut-lib.sh | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh +index cb1ddd76..71dcedcf 100755 +--- a/modules.d/99base/dracut-lib.sh ++++ b/modules.d/99base/dracut-lib.sh +@@ -39,6 +39,13 @@ str_ends() { + [ "${1%*$2}" != "$1" ] + } + ++trim() { ++ local var="$*" ++ var="${var#"${var%%[![:space:]]*}"}" # remove leading whitespace characters ++ var="${var%"${var##*[![:space:]]}"}" # remove trailing whitespace characters ++ echo -n "$var" ++} ++ + if [ -z "$DRACUT_SYSTEMD" ]; then + + warn() { diff --git a/SOURCES/0387-network-net-genrules.sh-generate-rules-for-all-inter.patch b/SOURCES/0387-network-net-genrules.sh-generate-rules-for-all-inter.patch new file mode 100644 index 0000000..8e4b5b6 --- /dev/null +++ b/SOURCES/0387-network-net-genrules.sh-generate-rules-for-all-inter.patch @@ -0,0 +1,83 @@ +From e6ae0c61285a7ff2a5be88b276b8d0b309e0ba2e Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 10 Jun 2016 14:32:48 +0200 +Subject: [PATCH] network/net-genrules.sh: generate rules for all interfaces + +previously, if "rd.neednet" and bond was specified, only the bond +interface was configured. + +https://bugzilla.redhat.com/show_bug.cgi?id=1282680 +--- + modules.d/40network/net-genrules.sh | 22 +++++++++------------- + 1 file changed, 9 insertions(+), 13 deletions(-) + +diff --git a/modules.d/40network/net-genrules.sh b/modules.d/40network/net-genrules.sh +index 750a4d7f..526dd5cf 100755 +--- a/modules.d/40network/net-genrules.sh ++++ b/modules.d/40network/net-genrules.sh +@@ -16,7 +16,7 @@ command -v fix_bootif >/dev/null || . /lib/net-lib.sh + # bridge: attempt only the defined interface + if [ -e /tmp/bridge.info ]; then + . /tmp/bridge.info +- IFACES="$IFACES ${bridgeslaves%% *}" ++ RAW_IFACES="$RAW_IFACES $bridgeslaves" + MASTER_IFACES="$MASTER_IFACES $bridgename" + fi + +@@ -27,7 +27,7 @@ command -v fix_bootif >/dev/null || . /lib/net-lib.sh + unset bondname + . "$i" + # It is enough to fire up only one +- IFACES="$IFACES ${bondslaves%% *}" ++ RAW_IFACES="$RAW_IFACES $bondslaves" + MASTER_IFACES="$MASTER_IFACES ${bondname}" + done + +@@ -36,15 +36,17 @@ command -v fix_bootif >/dev/null || . /lib/net-lib.sh + unset teamslaves + unset teammaster + . "$i" +- IFACES="$IFACES ${teamslaves}" ++ RAW_IFACES="$RAW_IFACES ${teamslaves}" + MASTER_IFACES="$MASTER_IFACES ${teammaster}" + done + + if [ -e /tmp/vlan.info ]; then + . /tmp/vlan.info +- IFACES="$IFACES $phydevice" ++ RAW_IFACES="$RAW_IFACES $phydevice" + MASTER_IFACES="$MASTER_IFACES ${vlanname}" + fi ++ MASTER_IFACES="$(trim "$MASTER_IFACES")" ++ RAW_IFACES="$(trim "$RAW_IFACES")" + + if [ -z "$IFACES" ]; then + [ -e /tmp/net.ifaces ] && read IFACES < /tmp/net.ifaces +@@ -59,10 +61,10 @@ command -v fix_bootif >/dev/null || . /lib/net-lib.sh + runcmd="RUN+=\"/sbin/initqueue --name ifup-\$env{INTERFACE} --unique --onetime $ifup\"" + + # We have some specific interfaces to handle +- if [ -n "$IFACES" ]; then ++ if [ -n "${RAW_IFACES}${IFACES}" ]; then + echo 'SUBSYSTEM!="net", GOTO="net_end"' + echo 'ACTION!="add|change|move", GOTO="net_end"' +- for iface in $IFACES; do ++ for iface in $IFACES $RAW_IFACES; do + case "$iface" in + ??:??:??:??:??:??) # MAC address + cond="ATTR{address}==\"$iface\"" +@@ -83,13 +85,7 @@ command -v fix_bootif >/dev/null || . /lib/net-lib.sh + done + echo 'LABEL="net_end"' + +- if [ -n "$MASTER_IFACES" ]; then +- wait_ifaces=$MASTER_IFACES +- else +- wait_ifaces=$IFACES +- fi +- +- for iface in $wait_ifaces; do ++ for iface in $IFACES; do + if [ "$bootdev" = "$iface" ] || [ "$NEEDNET" = "1" ]; then + echo "[ -f /tmp/net.${iface}.did-setup ]" >$hookdir/initqueue/finished/wait-$iface.sh + fi diff --git a/SOURCES/0388-ifup-setup-bridge-bonding-and-teaming-only-once.patch b/SOURCES/0388-ifup-setup-bridge-bonding-and-teaming-only-once.patch new file mode 100644 index 0000000..f3f2ded --- /dev/null +++ b/SOURCES/0388-ifup-setup-bridge-bonding-and-teaming-only-once.patch @@ -0,0 +1,69 @@ +From 1472b5486b8f64a023ea33f9c1821279b153d04a Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 10 Jun 2016 14:34:13 +0200 +Subject: [PATCH] ifup: setup bridge, bonding and teaming only once + +if those assembled interfaces use dhcp "$iface.up" is created too late +--- + modules.d/40network/ifup.sh | 14 ++++++++++---- + 1 file changed, 10 insertions(+), 4 deletions(-) + +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index 30551987..f681336e 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -204,9 +204,12 @@ fi + if [ -e /tmp/bond.${netif}.info ]; then + . /tmp/bond.${netif}.info + +- if [ "$netif" = "$bondname" ] && [ ! -e /tmp/net.$bondname.up ] ; then # We are master bond device ++ if [ "$netif" = "$bondname" ] && [ ! -e /tmp/net.$bondname.setup ] ; then # We are master bond device + modprobe bonding +- echo "+$netif" > /sys/class/net/bonding_masters ++ udevadm settle ++ if ! [ -e /sys/class/net/${netif} ]; then ++ echo "+$netif" > /sys/class/net/bonding_masters ++ fi + ip link set $netif down + + # Stolen from ifup-eth +@@ -244,12 +247,13 @@ if [ -e /tmp/bond.${netif}.info ]; then + echo $value > /sys/class/net/${netif}/bonding/$key + fi + done ++ > /tmp/net.$bondname.setup + fi + fi + + if [ -e /tmp/team.${netif}.info ]; then + . /tmp/team.${netif}.info +- if [ "$netif" = "$teammaster" ] && [ ! -e /tmp/net.$teammaster.up ] ; then ++ if [ "$netif" = "$teammaster" ] && [ ! -e /tmp/net.$teammaster.setup ] ; then + # We shall only bring up those _can_ come up + # in case of some slave is gone in active-backup mode + working_slaves="" +@@ -285,6 +289,7 @@ if [ -e /tmp/team.${netif}.info ]; then + teamdctl $teammaster port add $slave + done + ip link set dev $teammaster up ++ > /tmp/net.$teammaster.setup + fi + fi + +@@ -293,7 +298,7 @@ fi + if [ -e /tmp/bridge.info ]; then + . /tmp/bridge.info + # start bridge if necessary +- if [ "$netif" = "$bridgename" ] && [ ! -e /tmp/net.$bridgename.up ]; then ++ if [ "$netif" = "$bridgename" ] && [ ! -e /tmp/net.$bridgename.setup ]; then + brctl addbr $bridgename + brctl setfd $bridgename 0 + for ethname in $bridgeslaves ; do +@@ -308,6 +313,7 @@ if [ -e /tmp/bridge.info ]; then + fi + brctl addif $bridgename $ethname + done ++ > /tmp/net.$bridgename.setup + fi + fi + diff --git a/SOURCES/0389-network-parse-bond.sh-handle-multiple-bond-interface.patch b/SOURCES/0389-network-parse-bond.sh-handle-multiple-bond-interface.patch new file mode 100644 index 0000000..fa9aea0 --- /dev/null +++ b/SOURCES/0389-network-parse-bond.sh-handle-multiple-bond-interface.patch @@ -0,0 +1,64 @@ +From fefb96f43fd6b6b76e79fda995b31e2c10884395 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 22 Jun 2016 13:21:56 +0200 +Subject: [PATCH] network/parse-bond.sh: handle multiple bond interfaces + +--- + modules.d/40network/parse-bond.sh | 25 +++++++------------------ + 1 file changed, 7 insertions(+), 18 deletions(-) + +diff --git a/modules.d/40network/parse-bond.sh b/modules.d/40network/parse-bond.sh +index 25c51b89..80b3b077 100755 +--- a/modules.d/40network/parse-bond.sh ++++ b/modules.d/40network/parse-bond.sh +@@ -10,14 +10,6 @@ + # bond without parameters assumes bond=bond0:eth0,eth1:mode=balance-rr + # + +-# return if bond already parsed +-[ -n "$bondname" ] && return +- +-# Check if bond parameter is valid +-if getarg bond= >/dev/null ; then +- : +-fi +- + # We translate list of slaves to space-separated here to mwke it easier to loop over them in ifup + # Ditto for bonding options + parsebond() { +@@ -28,7 +20,6 @@ parsebond() { + v=${v#*:} + done + +- unset bondname bondslaves bondoptions + case $# in + 0) bondname=bond0; bondslaves="eth0 eth1" ;; + 1) bondname=$1; bondslaves="eth0 eth1" ;; +@@ -38,14 +29,13 @@ parsebond() { + esac + } + +-unset bondname bondslaves bondoptions +- + # Parse bond for bondname, bondslaves, bondmode and bondoptions +-if getarg bond >/dev/null; then +- # Read bond= parameters if they exist +- bond="$(getarg bond=)" +- if [ ! "$bond" = "bond" ]; then +- parsebond "$(getarg bond=)" ++for bond in $(getargs bond=); do ++ unset bondname ++ unset bondslaves ++ unset bondoptions ++ if [ "$bond" != "bond" ]; then ++ parsebond "$bond" + fi + # Simple default bond + if [ -z "$bondname" ]; then +@@ -57,5 +47,4 @@ if getarg bond >/dev/null; then + echo "bondname=$bondname" > /tmp/bond.${bondname}.info + echo "bondslaves=\"$bondslaves\"" >> /tmp/bond.${bondname}.info + echo "bondoptions=\"$bondoptions\"" >> /tmp/bond.${bondname}.info +- return +-fi ++done diff --git a/SOURCES/0390-TEST-50-MULTINIC-add-multiple-bond-tests.patch b/SOURCES/0390-TEST-50-MULTINIC-add-multiple-bond-tests.patch new file mode 100644 index 0000000..133a062 --- /dev/null +++ b/SOURCES/0390-TEST-50-MULTINIC-add-multiple-bond-tests.patch @@ -0,0 +1,49 @@ +From 0b7c2400c328f9b437061f885853fb83d3f44155 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 22 Jun 2016 14:03:12 +0200 +Subject: [PATCH] TEST-50-MULTINIC: add multiple bond tests + +--- + test/TEST-50-MULTINIC/test.sh | 15 ++++++++++++++- + 1 file changed, 14 insertions(+), 1 deletion(-) + +diff --git a/test/TEST-50-MULTINIC/test.sh b/test/TEST-50-MULTINIC/test.sh +index 1c46d7a8..c0c3615f 100755 +--- a/test/TEST-50-MULTINIC/test.sh ++++ b/test/TEST-50-MULTINIC/test.sh +@@ -58,7 +58,7 @@ client_test() { + -net nic,macaddr=52:54:00:12:34:$mac3,model=e1000 \ + -watchdog i6300esb -watchdog-action poweroff \ + -kernel /boot/vmlinuz-"$KVERSION" \ +- -append "$cmdline $DEBUGFAIL rd.retry=5 ro console=ttyS0,115200n81 selinux=0 init=/sbin/init rd.debug systemd.log_target=console loglevel=7" \ ++ -append "$cmdline $DEBUGFAIL rd.retry=5 rw 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 +@@ -102,6 +102,7 @@ test_client() { + # ...:00-02 receive IP adresses all others don't + # ...:02 receives a dhcp root-path + ++ # Require three interfaces with dhcp root-path + # PXE Style BOOTIF= + client_test "MULTINIC root=nfs BOOTIF=" \ + 00 01 02 \ +@@ -137,6 +138,18 @@ test_client() { + "root=dhcp ip=ens3:dhcp ip=ens4:dhcp ip=ens5:dhcp bootdev=ens5" \ + "ens3 ens4 ens5" || return 1 + ++ # bonding test ++ client_test "MULTINIC root=dhcp rd.neednet=1 bond=bond0:ens3,ens4 ip=bond0:dhcp ip=ens5:dhcp bootdev=ens5" \ ++ 00 01 02 \ ++ "root=dhcp rd.neednet=1 bond=bond0:ens3,ens4 ip=bond0:dhcp ip=ens5:dhcp bootdev=ens5" \ ++ "bond0 ens5" || return 1 ++ ++ # multiple bonding test ++ client_test "MULTINIC root=dhcp rd.neednet=1 bond=bond0:ens3 bond=bond1:ens4 ip=bond0:dhcp ip=ens5:dhcp bootdev=ens5" \ ++ 00 01 02 \ ++ "root=dhcp rd.neednet=1 bond=bond0:ens3 bond=bond1:ens4 ip=bond0:dhcp ip=bond1:dhcp ip=ens5:dhcp bootdev=ens5" \ ++ "bond0 bond1 ens5" || return 1 ++ + kill_server + return 0 + } diff --git a/SOURCES/0391-network-dhclient.conf-add-missing-commata.patch b/SOURCES/0391-network-dhclient.conf-add-missing-commata.patch new file mode 100644 index 0000000..475ce71 --- /dev/null +++ b/SOURCES/0391-network-dhclient.conf-add-missing-commata.patch @@ -0,0 +1,22 @@ +From 320b8d5c0c858111e688abe400a899dcac315e43 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 23 Jun 2016 14:24:40 +0200 +Subject: [PATCH] network/dhclient.conf: add missing commata + +options need to be seperated by , + +(cherry picked from commit 7e51abc81f53c08e464decd4103e8c4ec25fef87) +--- + modules.d/40network/dhclient.conf | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/40network/dhclient.conf b/modules.d/40network/dhclient.conf +index 7b067632..a1739ce3 100644 +--- a/modules.d/40network/dhclient.conf ++++ b/modules.d/40network/dhclient.conf +@@ -3,4 +3,4 @@ option classless-routes code 121 = array of unsigned integer 8; + + request subnet-mask, broadcast-address, time-offset, routers, + domain-name, domain-name-servers, domain-search, host-name, +- root-path, interface-mtu classless-routes; ++ root-path, interface-mtu, classless-routes; diff --git a/SOURCES/0392-systemd-add-.slice-and-make-reboot-work.patch b/SOURCES/0392-systemd-add-.slice-and-make-reboot-work.patch new file mode 100644 index 0000000..416a582 --- /dev/null +++ b/SOURCES/0392-systemd-add-.slice-and-make-reboot-work.patch @@ -0,0 +1,163 @@ +From 017c16b97a384915467583cc07c3afb9a98fc259 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Mon, 27 Jun 2016 10:27:05 +0200 +Subject: [PATCH] systemd: add -.slice and make reboot work + +-.slice and conflicting with emergency.target and shutdown.target +makes reboot work +--- + modules.d/98systemd/dracut-cmdline-ask.service | 2 ++ + modules.d/98systemd/dracut-cmdline.service | 2 ++ + modules.d/98systemd/dracut-emergency.service | 2 ++ + modules.d/98systemd/dracut-initqueue.service | 2 ++ + modules.d/98systemd/dracut-mount.service | 2 ++ + modules.d/98systemd/dracut-pre-mount.service | 2 ++ + modules.d/98systemd/dracut-pre-pivot.service | 2 ++ + modules.d/98systemd/dracut-pre-trigger.service | 2 ++ + modules.d/98systemd/dracut-pre-udev.service | 2 ++ + modules.d/98systemd/emergency.service | 2 ++ + modules.d/98systemd/module-setup.sh | 1 + + 11 files changed, 21 insertions(+) + +diff --git a/modules.d/98systemd/dracut-cmdline-ask.service b/modules.d/98systemd/dracut-cmdline-ask.service +index 9993671c..3d489a4e 100644 +--- a/modules.d/98systemd/dracut-cmdline-ask.service ++++ b/modules.d/98systemd/dracut-cmdline-ask.service +@@ -15,6 +15,8 @@ After=systemd-journald.socket + Wants=systemd-journald.socket + ConditionPathExists=/etc/initrd-release + ConditionKernelCommandLine=rd.cmdline=ask ++Conflicts=shutdown.target emergency.target ++Before=shutdown.target emergency.target + + [Service] + Environment=DRACUT_SYSTEMD=1 +diff --git a/modules.d/98systemd/dracut-cmdline.service b/modules.d/98systemd/dracut-cmdline.service +index f888bf46..7f0835b4 100644 +--- a/modules.d/98systemd/dracut-cmdline.service ++++ b/modules.d/98systemd/dracut-cmdline.service +@@ -20,6 +20,8 @@ ConditionDirectoryNotEmpty=|/lib/dracut/hooks/cmdline + ConditionKernelCommandLine=|rd.break=cmdline + ConditionKernelCommandLine=|resume + ConditionKernelCommandLine=|noresume ++Conflicts=shutdown.target emergency.target ++Before=shutdown.target emergency.target + + [Service] + Environment=DRACUT_SYSTEMD=1 +diff --git a/modules.d/98systemd/dracut-emergency.service b/modules.d/98systemd/dracut-emergency.service +index 5a6d5250..5c014110 100644 +--- a/modules.d/98systemd/dracut-emergency.service ++++ b/modules.d/98systemd/dracut-emergency.service +@@ -14,6 +14,8 @@ After=systemd-vconsole-setup.service + Wants=systemd-vconsole-setup.service + Conflicts=emergency.service emergency.target + ConditionPathExists=!/lib/dracut/no-emergency-shell ++Conflicts=shutdown.target emergency.target ++Before=shutdown.target emergency.target + + [Service] + Environment=HOME=/ +diff --git a/modules.d/98systemd/dracut-initqueue.service b/modules.d/98systemd/dracut-initqueue.service +index 1b9e701b..6340dd4d 100644 +--- a/modules.d/98systemd/dracut-initqueue.service ++++ b/modules.d/98systemd/dracut-initqueue.service +@@ -23,6 +23,8 @@ ConditionPathExistsGlob=|/lib/dracut/hooks/initqueue/finished/*.sh + ConditionPathExistsGlob=|/lib/dracut/hooks/initqueue/online/*.sh + ConditionPathExistsGlob=|/lib/dracut/hooks/initqueue/timeout/*.sh + ConditionKernelCommandLine=|rd.break=initqueue ++Conflicts=shutdown.target emergency.target ++Before=shutdown.target emergency.target + + [Service] + Environment=DRACUT_SYSTEMD=1 +diff --git a/modules.d/98systemd/dracut-mount.service b/modules.d/98systemd/dracut-mount.service +index 20c633d0..2e1e47b9 100644 +--- a/modules.d/98systemd/dracut-mount.service ++++ b/modules.d/98systemd/dracut-mount.service +@@ -15,6 +15,8 @@ After=dracut-initqueue.service dracut-pre-mount.service + ConditionPathExists=/etc/initrd-release + ConditionDirectoryNotEmpty=|/lib/dracut/hooks/mount + ConditionKernelCommandLine=|rd.break=mount ++Conflicts=shutdown.target emergency.target ++Before=shutdown.target emergency.target + + [Service] + Environment=DRACUT_SYSTEMD=1 +diff --git a/modules.d/98systemd/dracut-pre-mount.service b/modules.d/98systemd/dracut-pre-mount.service +index d7be48d8..ed67f9df 100644 +--- a/modules.d/98systemd/dracut-pre-mount.service ++++ b/modules.d/98systemd/dracut-pre-mount.service +@@ -17,6 +17,8 @@ After=cryptsetup.target + ConditionPathExists=/etc/initrd-release + ConditionDirectoryNotEmpty=|/lib/dracut/hooks/pre-mount + ConditionKernelCommandLine=|rd.break=pre-mount ++Conflicts=shutdown.target emergency.target ++Before=shutdown.target emergency.target + + [Service] + Environment=DRACUT_SYSTEMD=1 +diff --git a/modules.d/98systemd/dracut-pre-pivot.service b/modules.d/98systemd/dracut-pre-pivot.service +index f4539006..1faeb78b 100644 +--- a/modules.d/98systemd/dracut-pre-pivot.service ++++ b/modules.d/98systemd/dracut-pre-pivot.service +@@ -16,6 +16,8 @@ Before=initrd-cleanup.service + Wants=remote-fs.target + After=remote-fs.target + ConditionPathExists=/etc/initrd-release ++Conflicts=shutdown.target emergency.target ++Before=shutdown.target emergency.target + + [Service] + Environment=DRACUT_SYSTEMD=1 +diff --git a/modules.d/98systemd/dracut-pre-trigger.service b/modules.d/98systemd/dracut-pre-trigger.service +index 69b4cceb..f1980368 100644 +--- a/modules.d/98systemd/dracut-pre-trigger.service ++++ b/modules.d/98systemd/dracut-pre-trigger.service +@@ -17,6 +17,8 @@ Wants=dracut-pre-udev.service systemd-udevd.service + ConditionPathExists=/etc/initrd-release + ConditionDirectoryNotEmpty=|/lib/dracut/hooks/pre-trigger + ConditionKernelCommandLine=|rd.break=pre-trigger ++Conflicts=shutdown.target emergency.target ++Before=shutdown.target emergency.target + + [Service] + Environment=DRACUT_SYSTEMD=1 +diff --git a/modules.d/98systemd/dracut-pre-udev.service b/modules.d/98systemd/dracut-pre-udev.service +index d125b375..7fb33044 100644 +--- a/modules.d/98systemd/dracut-pre-udev.service ++++ b/modules.d/98systemd/dracut-pre-udev.service +@@ -20,6 +20,8 @@ ConditionKernelCommandLine=|rd.break=pre-udev + ConditionKernelCommandLine=|rd.driver.blacklist + ConditionKernelCommandLine=|rd.driver.pre + ConditionKernelCommandLine=|rd.driver.post ++Conflicts=shutdown.target emergency.target ++Before=shutdown.target emergency.target + + [Service] + Environment=DRACUT_SYSTEMD=1 +diff --git a/modules.d/98systemd/emergency.service b/modules.d/98systemd/emergency.service +index 5f1eaa23..5c2c1c70 100644 +--- a/modules.d/98systemd/emergency.service ++++ b/modules.d/98systemd/emergency.service +@@ -13,6 +13,8 @@ DefaultDependencies=no + After=systemd-vconsole-setup.service + Wants=systemd-vconsole-setup.service + ConditionPathExists=!/lib/dracut/no-emergency-shell ++Conflicts=shutdown.target ++Before=shutdown.target + + [Service] + Environment=HOME=/ +diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh +index 647315f0..64b83a0e 100755 +--- a/modules.d/98systemd/module-setup.sh ++++ b/modules.d/98systemd/module-setup.sh +@@ -137,6 +137,7 @@ install() { + \ + $systemdsystemunitdir/slices.target \ + $systemdsystemunitdir/system.slice \ ++ $systemdsystemunitdir/-.slice \ + \ + $tmpfilesdir/systemd.conf \ + \ diff --git a/SOURCES/0393-test-TEST-02-systemd-use-marker-disk-for-successfull.patch b/SOURCES/0393-test-TEST-02-systemd-use-marker-disk-for-successfull.patch new file mode 100644 index 0000000..7441e42 --- /dev/null +++ b/SOURCES/0393-test-TEST-02-systemd-use-marker-disk-for-successfull.patch @@ -0,0 +1,55 @@ +From 8175f5eb82d5efd8f873c091793a4c6500b50956 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Mon, 27 Jun 2016 10:28:09 +0200 +Subject: [PATCH] test/TEST-02-systemd: use marker disk for successfull boot + marker + +--- + test/TEST-02-SYSTEMD/test-init.sh | 2 +- + test/TEST-02-SYSTEMD/test.sh | 10 +++++++--- + 2 files changed, 8 insertions(+), 4 deletions(-) + +diff --git a/test/TEST-02-SYSTEMD/test-init.sh b/test/TEST-02-SYSTEMD/test-init.sh +index ff17b6b4..1c65e844 100755 +--- a/test/TEST-02-SYSTEMD/test-init.sh ++++ b/test/TEST-02-SYSTEMD/test-init.sh +@@ -4,7 +4,7 @@ strstr() { [ "${1#*$2*}" != "$1" ]; } + CMDLINE=$(while read line; do echo $line;done < /proc/cmdline) + plymouth --quit + exec </dev/console >/dev/console 2>&1 +-echo "dracut-root-block-success" >/dev/sda1 ++echo "dracut-root-block-success" >/dev/sdb + export TERM=linux + export PS1='initramfs-test:\w\$ ' + [ -f /etc/mtab ] || ln -sfn /proc/mounts /etc/mtab +diff --git a/test/TEST-02-SYSTEMD/test.sh b/test/TEST-02-SYSTEMD/test.sh +index 47268b0e..6f33181c 100755 +--- a/test/TEST-02-SYSTEMD/test.sh ++++ b/test/TEST-02-SYSTEMD/test.sh +@@ -4,19 +4,23 @@ TEST_DESCRIPTION="root filesystem on a ext3 filesystem" + KVERSION="${KVERSION-$(uname -r)}" + + # Uncomment this to debug failures +-#DEBUGFAIL="rd.shell" ++#DEBUGFAIL="rd.shell loglevel=77 systemd.log_level=debug systemd.log_target=console" ++#DEBUGFAIL="rd.shell rd.break=initqueue" + test_run() { ++ dd if=/dev/zero of=$TESTDIR/marker.disk bs=1M count=80 + $testdir/run-qemu \ + -hda $TESTDIR/root.ext3 \ ++ -hdb $TESTDIR/marker.disk \ + -m 256M -smp 2 -nographic \ + -net none -kernel /boot/vmlinuz-$KVERSION \ +- -append "root=LABEL=dracut rw loglevel=77 systemd.log_level=debug systemd.log_target=console rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug init=/sbin/init $DEBUGFAIL" \ ++ -append "root=LABEL=dracut rw loglevel=77 rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 init=/sbin/init $DEBUGFAIL" \ + -initrd $TESTDIR/initramfs.testing +- grep -F -m 1 -q dracut-root-block-success $TESTDIR/root.ext3 || return 1 ++ grep -F -m 1 -q dracut-root-block-success $TESTDIR/marker.disk || return 1 + } + + test_setup() { + rm -f -- $TESTDIR/root.ext3 ++ rm -f -- $TESTDIR/marker.disk + # Create the blank file to use as a root filesystem + dd if=/dev/null of=$TESTDIR/root.ext3 bs=1M seek=80 + diff --git a/SOURCES/0394-Disable-early-microcode-for-non-x86-architecures.patch b/SOURCES/0394-Disable-early-microcode-for-non-x86-architecures.patch new file mode 100644 index 0000000..98bfe3f --- /dev/null +++ b/SOURCES/0394-Disable-early-microcode-for-non-x86-architecures.patch @@ -0,0 +1,62 @@ +From ced0638e2c0d8805551b1153b9e153241c646262 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 29 Jun 2016 10:45:22 +0200 +Subject: [PATCH] Disable early microcode for non-x86 architecures + +--- + dracut.sh | 28 +++++++++++++++++++++------- + 1 file changed, 21 insertions(+), 7 deletions(-) + +diff --git a/dracut.sh b/dracut.sh +index 6bbde70b..b85d42dd 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -819,13 +819,6 @@ readonly initdir="$(mktemp --tmpdir="$TMPDIR/" -d -t initramfs.XXXXXX)" + exit 1 + } + +-if [[ $early_microcode = yes ]] || ( [[ $acpi_override = yes ]] && [[ -d $acpi_table_dir ]] ); then +- readonly early_cpio_dir="$(mktemp --tmpdir="$TMPDIR/" -d -t early_cpio.XXXXXX)" +- [ -d "$early_cpio_dir" ] || { +- printf "%s\n" "dracut: mktemp --tmpdir=\"$TMPDIR/\" -d -t early_cpio.XXXXXX failed." >&2 +- exit 1 +- } +-fi + # clean up after ourselves no matter how we die. + trap ' + ret=$?; +@@ -879,6 +872,26 @@ fi + dracutfunctions=$dracutbasedir/dracut-functions.sh + export dracutfunctions + ++ ++ ++case "$(arch)" in ++ i686|x86_64) ++ ;; ++ *) ++ early_microcode=no ++ dinfo "Disabling early microcode for $(arch)" ++ ;; ++esac ++ ++if [[ $early_microcode = yes ]] || ( [[ $acpi_override = yes ]] && [[ -d $acpi_table_dir ]] ); then ++ readonly early_cpio_dir="$(mktemp --tmpdir="$TMPDIR/" -d -t early_cpio.XXXXXX)" ++ [ -d "$early_cpio_dir" ] || { ++ printf "%s\n" "dracut: mktemp --tmpdir=\"$TMPDIR/\" -d -t early_cpio.XXXXXX failed." >&2 ++ exit 1 ++ } ++fi ++ ++ + if (( ${#drivers_l[@]} )); then + drivers='' + while pop drivers_l val; do +@@ -1470,6 +1483,7 @@ if [[ $do_strip = yes ]] && ! [[ $DRACUT_FIPS_MODE ]]; then + + dinfo "*** Stripping files done ***" + fi ++ + if [[ $early_microcode = yes ]]; then + dinfo "*** Generating early-microcode cpio image ***" + ucode_dir=(amd-ucode intel-ucode) diff --git a/SOURCES/0395-fcoe-check-if-needed-for-hostonly.patch b/SOURCES/0395-fcoe-check-if-needed-for-hostonly.patch new file mode 100644 index 0000000..1c6d82c --- /dev/null +++ b/SOURCES/0395-fcoe-check-if-needed-for-hostonly.patch @@ -0,0 +1,49 @@ +From f45726652fd8c6fd6b5560e1142753bac62dc426 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 29 Jun 2016 10:49:00 +0200 +Subject: [PATCH] fcoe: check if needed for hostonly + +--- + modules.d/95fcoe-uefi/module-setup.sh | 8 ++++++++ + modules.d/95fcoe/module-setup.sh | 9 +++++++++ + 2 files changed, 17 insertions(+) + +diff --git a/modules.d/95fcoe-uefi/module-setup.sh b/modules.d/95fcoe-uefi/module-setup.sh +index f5277f48..242363ef 100755 +--- a/modules.d/95fcoe-uefi/module-setup.sh ++++ b/modules.d/95fcoe-uefi/module-setup.sh +@@ -4,6 +4,14 @@ + + # called by dracut + check() { ++ local _fcoe_ctlr ++ [[ $hostonly ]] || [[ $mount_needs ]] && { ++ for c in /sys/bus/fcoe/devices/ctlr_* ; do ++ [ -L $c ] || continue ++ _fcoe_ctlr=$c ++ done ++ [ -z "$_fcoe_ctlr" ] && return 255 ++ } + [[ $hostonly ]] || [[ $mount_needs ]] && { + [ -d /sys/firmware/efi ] || return 255 + } +diff --git a/modules.d/95fcoe/module-setup.sh b/modules.d/95fcoe/module-setup.sh +index 646cfa84..ba10b0ab 100755 +--- a/modules.d/95fcoe/module-setup.sh ++++ b/modules.d/95fcoe/module-setup.sh +@@ -3,6 +3,15 @@ + # ex: ts=8 sw=4 sts=4 et filetype=sh + + check() { ++ local _fcoe_ctlr ++ [[ $hostonly ]] || [[ $mount_needs ]] && { ++ for c in /sys/bus/fcoe/devices/ctlr_* ; do ++ [ -L $c ] || continue ++ _fcoe_ctlr=$c ++ done ++ [ -z "$_fcoe_ctlr" ] && return 255 ++ } ++ + require_binaries dcbtool fipvlan lldpad ip readlink fcoemon fcoeadm || return 1 + return 0 + } diff --git a/SOURCES/0396-dracut-only-use-one-tmpdir.patch b/SOURCES/0396-dracut-only-use-one-tmpdir.patch new file mode 100644 index 0000000..6154ba5 --- /dev/null +++ b/SOURCES/0396-dracut-only-use-one-tmpdir.patch @@ -0,0 +1,160 @@ +From b4ad021d34975f25f50024e3601354f75593837f Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 29 Jun 2016 11:25:12 +0200 +Subject: [PATCH] dracut: only use one tmpdir + +also remove any partial written initramfs images +--- + dracut-logger.sh | 3 +-- + dracut.sh | 66 +++++++++++++++++++++++++++++++++--------------- + 2 files changed, 47 insertions(+), 22 deletions(-) + +diff --git a/dracut-logger.sh b/dracut-logger.sh +index ffa56167..53f74625 100755 +--- a/dracut-logger.sh ++++ b/dracut-logger.sh +@@ -150,8 +150,7 @@ dlog_init() { + && type -P systemd-cat &>/dev/null \ + && systemctl --quiet is-active systemd-journald.socket &>/dev/null \ + && { echo "dracut-$DRACUT_VERSION" | systemd-cat -t 'dracut' &>/dev/null; } ; then +- readonly _dlogdir="$(mktemp --tmpdir="$TMPDIR/" -d -t dracut-log.XXXXXX)" +- readonly _systemdcatfile="$_dlogdir/systemd-cat" ++ readonly _systemdcatfile="$DRACUT_TMPDIR/systemd-cat" + mkfifo "$_systemdcatfile" + readonly _dlogfd=15 + systemd-cat -t 'dracut' --level-prefix=true <"$_systemdcatfile" & +diff --git a/dracut.sh b/dracut.sh +index b85d42dd..78976792 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -813,24 +813,25 @@ fi + [[ $hostonly != "-h" ]] && unset hostonly + + readonly TMPDIR="$tmpdir" +-readonly initdir="$(mktemp --tmpdir="$TMPDIR/" -d -t initramfs.XXXXXX)" +-[ -d "$initdir" ] || { +- printf "%s\n" "dracut: mktemp --tmpdir=\"$TMPDIR/\" -d -t initramfs.XXXXXX failed." >&2 ++readonly DRACUT_TMPDIR="$(mktemp -p "$TMPDIR/" -d -t dracut.XXXXXX)" ++[ -d "$DRACUT_TMPDIR" ] || { ++ printf "%s\n" "dracut: mktemp -p '$TMPDIR/' -d -t dracut.XXXXXX failed." >&2 + exit 1 + } + + # clean up after ourselves no matter how we die. + trap ' + ret=$?; +- [[ $keep ]] && echo "Not removing $initdir." >&2 || { [[ $initdir ]] && rm -rf -- "$initdir"; }; +- [[ $keep ]] && echo "Not removing $early_cpio_dir." >&2 || { [[ $early_cpio_dir ]] && rm -Rf -- "$early_cpio_dir"; }; +- [[ $_dlogdir ]] && rm -Rf -- "$_dlogdir"; ++ [[ $keep ]] && echo "Not removing $DRACUT_TMPDIR." >&2 || { [[ $DRACUT_TMPDIR ]] && rm -rf -- "$DRACUT_TMPDIR"; }; + exit $ret; + ' EXIT + + # clean up after ourselves no matter how we die. + trap 'exit 1;' SIGINT + ++readonly initdir="${DRACUT_TMPDIR}/initramfs" ++mkdir "$initdir" ++ + export DRACUT_KERNEL_LAZY="1" + export DRACUT_RESOLVE_LAZY="1" + +@@ -878,20 +879,18 @@ case "$(arch)" in + i686|x86_64) + ;; + *) +- early_microcode=no +- dinfo "Disabling early microcode for $(arch)" ++ if [[ $early_microcode = yes ]]; then ++ early_microcode=no ++ dinfo "Disabling early microcode for $(arch)" ++ fi + ;; + esac + + if [[ $early_microcode = yes ]] || ( [[ $acpi_override = yes ]] && [[ -d $acpi_table_dir ]] ); then +- readonly early_cpio_dir="$(mktemp --tmpdir="$TMPDIR/" -d -t early_cpio.XXXXXX)" +- [ -d "$early_cpio_dir" ] || { +- printf "%s\n" "dracut: mktemp --tmpdir=\"$TMPDIR/\" -d -t early_cpio.XXXXXX failed." >&2 +- exit 1 +- } ++ readonly early_cpio_dir="${DRACUT_TMPDIR}/earlycpio" ++ mkdir "$early_cpio_dir" + fi + +- + if (( ${#drivers_l[@]} )); then + drivers='' + while pop drivers_l val; do +@@ -1485,7 +1484,7 @@ if [[ $do_strip = yes ]] && ! [[ $DRACUT_FIPS_MODE ]]; then + fi + + if [[ $early_microcode = yes ]]; then +- dinfo "*** Generating early-microcode cpio image ***" ++ dinfo "*** Generating early-microcode cpio image contents ***" + ucode_dir=(amd-ucode intel-ucode) + ucode_dest=(AuthenticAMD.bin GenuineIntel.bin) + _dest_dir="$early_cpio_dir/d/kernel/x86/microcode" +@@ -1521,6 +1520,9 @@ if [[ $early_microcode = yes ]]; then + fi + done + done ++ if ! [[ $create_early_cpio = yes ]]; then ++ dinfo "*** No early-microcode cpio image needed ***" ++ fi + fi + + if [[ $acpi_override = yes ]] && [[ -d $acpi_table_dir ]]; then +@@ -1546,23 +1548,47 @@ dinfo "*** Creating image file ***" + [[ "$UID" != 0 ]] && cpio_owner_root="-R 0:0" + + if [[ $create_early_cpio = yes ]]; then ++ dinfo "*** Creating microcode section ***" + echo 1 > "$early_cpio_dir/d/early_cpio" + # The microcode blob is _before_ the initramfs blob, not after +- (cd "$early_cpio_dir/d"; find . -print0 | cpio --null $cpio_owner_root -H newc -o --quiet > $outfile) ++ if ! ( ++ umask 077 ++ cd "$early_cpio_dir/d" ++ find . -print0 | cpio --null $cpio_owner_root -H newc -o --quiet > "${DRACUT_TMPDIR}/initramfs.img" ++ ); then ++ dfatal "dracut: creation of $outfile failed" ++ exit 1 ++ else ++ dinfo "*** Created microcode section ***" ++ fi + fi +-if ! ( umask 077; cd "$initdir"; find . -print0 | cpio --null $cpio_owner_root -H newc -o --quiet | \ +- $compress >> "$outfile"; ); then ++ ++if ! ( ++ umask 077 ++ cd "$initdir" ++ find . -print0 | cpio --null $cpio_owner_root -H newc -o --quiet | \ ++ $compress >> "${DRACUT_TMPDIR}/initramfs.img"; ++ ); then + dfatal "dracut: creation of $outfile failed" + exit 1 + fi ++ + dinfo "*** Creating image file done ***" + + if (( maxloglvl >= 5 )); then + if [[ $allowlocal ]]; then +- "$dracutbasedir/lsinitrd.sh" "$outfile"| ddebug ++ "$dracutbasedir/lsinitrd.sh" "${DRACUT_TMPDIR}/initramfs.img" | ddebug + else +- lsinitrd "$outfile"| ddebug ++ lsinitrd "${DRACUT_TMPDIR}/initramfs.img" | ddebug + fi + fi + ++if cp --reflink=auto "${DRACUT_TMPDIR}/initramfs.img" "$outfile" |& derror ; then ++ dinfo "*** Creating initramfs image file '$outfile' done ***" ++else ++ rm -f -- "$outfile" ++ dfatal "dracut: creation of $outfile failed" ++ exit 1 ++fi ++ + exit 0 diff --git a/SOURCES/0397-add-install-optional-and-install_optional_items.patch b/SOURCES/0397-add-install-optional-and-install_optional_items.patch new file mode 100644 index 0000000..04e936e --- /dev/null +++ b/SOURCES/0397-add-install-optional-and-install_optional_items.patch @@ -0,0 +1,130 @@ +From cc7d2eeb36a0472ec76b44caa41ebd68fb40b11c Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 22 Jul 2014 14:09:06 +0200 +Subject: [PATCH] add "--install-optional" and install_optional_items + +(cherry picked from commit 54b68829b60bc3f4c28cfca1ab0336584fe1e74c) +--- + dracut-bash-completion.sh | 4 ++-- + dracut.8.asc | 3 +++ + dracut.conf.5.asc | 4 ++++ + dracut.conf.d/fedora.conf.example | 2 +- + dracut.sh | 13 +++++++++++++ + 5 files changed, 23 insertions(+), 3 deletions(-) + +diff --git a/dracut-bash-completion.sh b/dracut-bash-completion.sh +index 9f359c6e..feced605 100644 +--- a/dracut-bash-completion.sh ++++ b/dracut-bash-completion.sh +@@ -40,7 +40,7 @@ _dracut() { + --omit-drivers --modules --omit --drivers --filesystems --install + --fwdir --libdirs --fscks --add-fstab --mount --device --nofscks + --kmoddir --conf --confdir --tmpdir --stdlog --compress --prefix +- --kernel-cmdline --sshkey --persistent-policy' ++ --kernel-cmdline --sshkey --persistent-policy --install-optional' + ) + + if __contains_word "$prev" ${OPTS[ARG]}; then +@@ -49,7 +49,7 @@ _dracut() { + comps=$(compgen -d -- "$cur") + compopt -o filenames + ;; +- -c|--conf|--sshkey|--add-fstab|--add-device|-I|--install) ++ -c|--conf|--sshkey|--add-fstab|--add-device|-I|--install|--install-optional) + comps=$(compgen -f -- "$cur") + compopt -o filenames + ;; +diff --git a/dracut.8.asc b/dracut.8.asc +index 5f68d16a..8fd863b9 100644 +--- a/dracut.8.asc ++++ b/dracut.8.asc +@@ -355,6 +355,9 @@ example: + ---- + =============================== + ++**--install-optional** _<file list>_:: ++ install the space separated list of files into the initramfs, if they exist. ++ + **--gzip**:: + Compress the generated initramfs using gzip. This will be done by default, + unless another compression option or --no-compress is passed. Equivalent to +diff --git a/dracut.conf.5.asc b/dracut.conf.5.asc +index 99f70fff..c20a341d 100644 +--- a/dracut.conf.5.asc ++++ b/dracut.conf.5.asc +@@ -66,6 +66,10 @@ Configuration files must have the extension .conf; other extensions are ignored. + *install_items+=*" __<file>__[ __<file>__ ...] ":: + Specify additional files to include in the initramfs, separated by spaces. + ++*install_optional_items+=*" __<file>__[ __<file>__ ...] ":: ++ Specify additional files to include in the initramfs, separated by spaces, ++ if they exist. ++ + *do_strip=*"__{yes|no}__":: + Strip binaries in the initramfs (default=yes) + +diff --git a/dracut.conf.d/fedora.conf.example b/dracut.conf.d/fedora.conf.example +index ff4e3b27..d69c943b 100644 +--- a/dracut.conf.d/fedora.conf.example ++++ b/dracut.conf.d/fedora.conf.example +@@ -6,7 +6,7 @@ i18n_default_font="latarcyrheb-sun16" + i18n_install_all="yes" + stdloglvl=3 + sysloglvl=5 +-install_items+=" vi /etc/virc ps grep cat rm " ++install_optional_items+=" vi /etc/virc ps grep cat rm " + prefix="/" + systemdutildir=/usr/lib/systemd + systemdsystemunitdir=/usr/lib/systemd/system +diff --git a/dracut.sh b/dracut.sh +index 78976792..fefdefd5 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -158,6 +158,8 @@ Creates initial ramdisk images for preloading modules + in the final initramfs. + -I, --install [LIST] Install the space separated list of files into the + initramfs. ++ --install-optional [LIST] Install the space separated list of files into the ++ initramfs, if they exist. + --gzip Compress the generated initramfs using gzip. + This will be done by default, unless another + compression option or --no-compress is passed. +@@ -305,6 +307,7 @@ rearrange_params() + --long drivers: \ + --long filesystems: \ + --long install: \ ++ --long install-optional: \ + --long fwdir: \ + --long libdirs: \ + --long fscks: \ +@@ -471,6 +474,9 @@ while :; do + -d|--drivers) push drivers_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;; + --filesystems) push filesystems_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;; + -I|--install) push install_items_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;; ++ --install-optional) ++ push install_optional_items_l \ ++ "$2"; PARMS_TO_STORE+=" '$2'"; shift;; + --fwdir) push fw_dir_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;; + --libdirs) push libdirs_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;; + --fscks) push fscks_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;; +@@ -722,6 +728,12 @@ if (( ${#install_items_l[@]} )); then + done + fi + ++if (( ${#install_optional_items_l[@]} )); then ++ while pop install_optional_items_l val; do ++ install_optional_items+=" $val " ++ done ++fi ++ + # these options override the stuff in the config file + if (( ${#dracutmodules_l[@]} )); then + dracutmodules='' +@@ -1361,6 +1373,7 @@ fi + + if [[ $kernel_only != yes ]]; then + (( ${#install_items[@]} > 0 )) && inst_multiple ${install_items[@]} ++ (( ${#install_optional_items[@]} > 0 )) && inst_multiple -o ${install_optional_items[@]} + + [[ $kernel_cmdline ]] && printf "%s\n" "$kernel_cmdline" >> "${initdir}/etc/cmdline.d/01-default.conf" + diff --git a/SOURCES/0398-dracut-nbd-Only-complain-of-missing-binary-in-hoston.patch b/SOURCES/0398-dracut-nbd-Only-complain-of-missing-binary-in-hoston.patch new file mode 100644 index 0000000..c6b4723 --- /dev/null +++ b/SOURCES/0398-dracut-nbd-Only-complain-of-missing-binary-in-hoston.patch @@ -0,0 +1,40 @@ +From 3186a0aa15822d69c8eb073bfc76665a1315957c Mon Sep 17 00:00:00 2001 +From: Thomas Renninger <trenn@suse.de> +Date: Thu, 11 Dec 2014 15:46:33 +0100 +Subject: [PATCH] dracut: nbd: Only complain of missing binary in hostonly mode + if + + rootfs is on nbd + +In not hostonly mode, require_binaries will still complain. +If in hostonly mode and the module is explicitly added via -a nbd, then +install() section will still complain later: +dracut-install: ERROR: installing 'nbd-client' + +Signed-off-by: Thomas Renninger <trenn@suse.de> +(cherry picked from commit e683985d103f1b0f15a9ccd9678169f4fb7aeb5f) +--- + modules.d/95nbd/module-setup.sh | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/modules.d/95nbd/module-setup.sh b/modules.d/95nbd/module-setup.sh +index 7e8a416c..270a9d31 100755 +--- a/modules.d/95nbd/module-setup.sh ++++ b/modules.d/95nbd/module-setup.sh +@@ -4,8 +4,6 @@ + + check() { + local _rootdev +- # If our prerequisites are not met, fail. +- require_binaries nbd-client || return 1 + + # if an nbd device is not somewhere in the chain of devices root is + # mounted on, fail the hostonly check. +@@ -16,6 +14,7 @@ check() { + [[ -b /dev/block/$_rootdev ]] || return 1 + check_block_and_slaves is_nbd "$_rootdev" || return 255 + } ++ require_binaries nbd-client || return 1 + + return 0 + } diff --git a/SOURCES/0399-Replace-echo-n-with-printf-in-code-with-a-bin-sh-she.patch b/SOURCES/0399-Replace-echo-n-with-printf-in-code-with-a-bin-sh-she.patch new file mode 100644 index 0000000..9b48a6c --- /dev/null +++ b/SOURCES/0399-Replace-echo-n-with-printf-in-code-with-a-bin-sh-she.patch @@ -0,0 +1,246 @@ +From d6b9aac6d0f8d007fa9ebf073a665857d8b0b0b4 Mon Sep 17 00:00:00 2001 +From: Mike Gilbert <floppym@gentoo.org> +Date: Tue, 14 Jul 2015 22:22:14 -0400 +Subject: [PATCH] Replace echo -n with printf in code with a /bin/sh shebang + +POSIX does not mandate that echo support the -n parameter. +printf has more well-defined behavior. + +(cherry picked from commit 5899f2f5163de4d68fbb35831e1f2230c22c71b3) +--- + modules.d/04watchdog/watchdog-stop.sh | 2 +- + modules.d/40network/net-lib.sh | 2 +- + modules.d/45ifcfg/write-ifcfg.sh | 2 +- + modules.d/90lvm/lvm_scan.sh | 4 ++-- + modules.d/98usrmount/mount-usr.sh | 2 +- + modules.d/99base/dracut-lib.sh | 6 ++++-- + modules.d/99base/init.sh | 4 ++-- + test/TEST-10-RAID/create-root.sh | 2 +- + test/TEST-10-RAID/cryptroot-ask.sh | 2 +- + test/TEST-12-RAID-DEG/create-root.sh | 2 +- + test/TEST-12-RAID-DEG/cryptroot-ask.sh | 2 +- + test/TEST-13-ENC-RAID-LVM/create-root.sh | 2 +- + test/TEST-13-ENC-RAID-LVM/cryptroot-ask.sh | 2 +- + test/TEST-14-IMSM/cryptroot-ask.sh | 2 +- + test/TEST-40-NBD/create-root.sh | 2 +- + test/TEST-40-NBD/cryptroot-ask.sh | 2 +- + 16 files changed, 21 insertions(+), 19 deletions(-) + +diff --git a/modules.d/04watchdog/watchdog-stop.sh b/modules.d/04watchdog/watchdog-stop.sh +index 91d45d63..921f9695 100755 +--- a/modules.d/04watchdog/watchdog-stop.sh ++++ b/modules.d/04watchdog/watchdog-stop.sh +@@ -1,2 +1,2 @@ + #!/bin/sh +-[ -c /dev/watchdog ] && echo -n 'V' > /dev/watchdog ++[ -c /dev/watchdog ] && printf 'V' > /dev/watchdog +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index 07ea5709..f91d1691 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -211,7 +211,7 @@ set_ifname() { + fix_bootif() { + local macaddr=${1} + local IFS='-' +- macaddr=$(for i in ${macaddr} ; do echo -n $i:; done) ++ macaddr=$(printf '%s:' ${macaddr}) + macaddr=${macaddr%:} + # strip hardware type field from pxelinux + [ -n "${macaddr%??:??:??:??:??:??}" ] && macaddr=${macaddr#??:} +diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh +index f3a1c109..a5114be1 100755 +--- a/modules.d/45ifcfg/write-ifcfg.sh ++++ b/modules.d/45ifcfg/write-ifcfg.sh +@@ -50,7 +50,7 @@ print_s390() { + for i in /sys/class/net/$_netif/device/cdev[0-9]*; do + [ -e $i ] || continue + channel=$(readlink -f $i) +- echo -n "${channel##*/}," ++ printf '%s' "${channel##*/}," + done + }) + [ -n "$SUBCHANNELS" ] || return 1 +diff --git a/modules.d/90lvm/lvm_scan.sh b/modules.d/90lvm/lvm_scan.sh +index f87831c7..ae6f177b 100755 +--- a/modules.d/90lvm/lvm_scan.sh ++++ b/modules.d/90lvm/lvm_scan.sh +@@ -17,14 +17,14 @@ SNAPSIZE=$(getargs rd.lvm.snapsize -d rd_LVM_SNAPSIZE=) + lvmdevs=$( + for f in /tmp/.lvm_scan-*; do + [ -e "$f" ] || continue +- echo -n "${f##/tmp/.lvm_scan-} " ++ printf '%s' "${f##/tmp/.lvm_scan-} " + done + ) + + if [ ! -e /etc/lvm/lvm.conf ]; then + { + echo 'devices {'; +- echo -n ' filter = [ ' ++ printf ' filter = [ ' + for dev in $lvmdevs; do + printf '"a|^/dev/%s$|", ' $dev; + done; +diff --git a/modules.d/98usrmount/mount-usr.sh b/modules.d/98usrmount/mount-usr.sh +index de7dcc22..8026db3c 100755 +--- a/modules.d/98usrmount/mount-usr.sh ++++ b/modules.d/98usrmount/mount-usr.sh +@@ -14,7 +14,7 @@ filtersubvol() { + while [ $# -gt 0 ]; do + case $1 in + subvol\=*) :;; +- *) echo -n "${1}," ;; ++ *) printf '%s' "${1}," ;; + esac + shift + done +diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh +index 71dcedcf..c2b6108a 100755 +--- a/modules.d/99base/dracut-lib.sh ++++ b/modules.d/99base/dracut-lib.sh +@@ -295,7 +295,7 @@ _dogetargs() { + fi + done + if [ -n "$_found" ]; then +- [ $# -gt 0 ] && echo -n "$@" ++ [ $# -gt 0 ] && printf '%s' "$*" + return 0 + fi + return 1; +@@ -326,7 +326,9 @@ getargs() { + done + if [ -n "$_gfound" ]; then + if [ $# -gt 0 ]; then +- echo -n "$@" ++ printf '%s' "$*" ++ else ++ printf 1 + fi + debug_on + return 0 +diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh +index dcc62d2a..a07d0f94 100755 +--- a/modules.d/99base/init.sh ++++ b/modules.d/99base/init.sh +@@ -253,8 +253,8 @@ while :; do + done + + { +- echo -n "Mounted root filesystem " +- while read dev mp rest; do [ "$mp" = "$NEWROOT" ] && echo $dev; done < /proc/mounts ++ printf "Mounted root filesystem " ++ while read dev mp rest || [ -n "$dev" ]; do [ "$mp" = "$NEWROOT" ] && echo $dev; done < /proc/mounts + } | vinfo + + # pre pivot scripts are sourced just before we doing cleanup and switch over +diff --git a/test/TEST-10-RAID/create-root.sh b/test/TEST-10-RAID/create-root.sh +index 50554132..be7a3a00 100755 +--- a/test/TEST-10-RAID/create-root.sh ++++ b/test/TEST-10-RAID/create-root.sh +@@ -18,7 +18,7 @@ mdadm --create /dev/md0 --run --auto=yes --level=5 --raid-devices=3 /dev/sda2 /d + # randomly. + mdadm -W /dev/md0 + set -e +-echo -n test >keyfile ++printf test >keyfile + cryptsetup -q luksFormat /dev/md0 /keyfile + echo "The passphrase is test" + cryptsetup luksOpen /dev/md0 dracut_crypt_test </keyfile +diff --git a/test/TEST-10-RAID/cryptroot-ask.sh b/test/TEST-10-RAID/cryptroot-ask.sh +index 407d0677..c39eff6e 100755 +--- a/test/TEST-10-RAID/cryptroot-ask.sh ++++ b/test/TEST-10-RAID/cryptroot-ask.sh +@@ -1,5 +1,5 @@ + #!/bin/sh + + [ -b "/dev/mapper/$2" ] && exit 0 +-echo -n test >/keyfile ++printf test >/keyfile + /sbin/cryptsetup luksOpen "$1" "$2" </keyfile +diff --git a/test/TEST-12-RAID-DEG/create-root.sh b/test/TEST-12-RAID-DEG/create-root.sh +index 699c27c0..5709060f 100755 +--- a/test/TEST-12-RAID-DEG/create-root.sh ++++ b/test/TEST-12-RAID-DEG/create-root.sh +@@ -20,7 +20,7 @@ mdadm --create /dev/md0 --run --auto=yes --level=5 --raid-devices=3 /dev/sdb /de + # wait for the array to finish initailizing, otherwise this sometimes fails + # randomly. + mdadm -W /dev/md0 +-echo -n test >keyfile ++printf test >keyfile + cryptsetup -q luksFormat /dev/md0 /keyfile + echo "The passphrase is test" + set -e +diff --git a/test/TEST-12-RAID-DEG/cryptroot-ask.sh b/test/TEST-12-RAID-DEG/cryptroot-ask.sh +index db27c5b8..78ed7f5f 100755 +--- a/test/TEST-12-RAID-DEG/cryptroot-ask.sh ++++ b/test/TEST-12-RAID-DEG/cryptroot-ask.sh +@@ -1,6 +1,6 @@ + #!/bin/sh + + [ -b /dev/mapper/$2 ] && exit 0 +-echo -n test >/keyfile ++printf test >/keyfile + /sbin/cryptsetup luksOpen $1 $2 </keyfile + +diff --git a/test/TEST-13-ENC-RAID-LVM/create-root.sh b/test/TEST-13-ENC-RAID-LVM/create-root.sh +index af83c238..4e10461f 100755 +--- a/test/TEST-13-ENC-RAID-LVM/create-root.sh ++++ b/test/TEST-13-ENC-RAID-LVM/create-root.sh +@@ -14,7 +14,7 @@ sfdisk -C 2560 -H 2 -S 32 -L /dev/sda <<EOF + ,800 + EOF + udevadm settle +-echo -n test >keyfile ++printf test >keyfile + cryptsetup -q luksFormat /dev/sda2 /keyfile + cryptsetup -q luksFormat /dev/sda3 /keyfile + cryptsetup -q luksFormat /dev/sda4 /keyfile +diff --git a/test/TEST-13-ENC-RAID-LVM/cryptroot-ask.sh b/test/TEST-13-ENC-RAID-LVM/cryptroot-ask.sh +index db27c5b8..78ed7f5f 100755 +--- a/test/TEST-13-ENC-RAID-LVM/cryptroot-ask.sh ++++ b/test/TEST-13-ENC-RAID-LVM/cryptroot-ask.sh +@@ -1,6 +1,6 @@ + #!/bin/sh + + [ -b /dev/mapper/$2 ] && exit 0 +-echo -n test >/keyfile ++printf test >/keyfile + /sbin/cryptsetup luksOpen $1 $2 </keyfile + +diff --git a/test/TEST-14-IMSM/cryptroot-ask.sh b/test/TEST-14-IMSM/cryptroot-ask.sh +index db27c5b8..78ed7f5f 100755 +--- a/test/TEST-14-IMSM/cryptroot-ask.sh ++++ b/test/TEST-14-IMSM/cryptroot-ask.sh +@@ -1,6 +1,6 @@ + #!/bin/sh + + [ -b /dev/mapper/$2 ] && exit 0 +-echo -n test >/keyfile ++printf test >/keyfile + /sbin/cryptsetup luksOpen $1 $2 </keyfile + +diff --git a/test/TEST-40-NBD/create-root.sh b/test/TEST-40-NBD/create-root.sh +index cb27a604..4df472a8 100755 +--- a/test/TEST-40-NBD/create-root.sh ++++ b/test/TEST-40-NBD/create-root.sh +@@ -5,7 +5,7 @@ for x in 64-lvm.rules 70-mdadm.rules 99-mount-rules; do + done + rm -f -- /etc/lvm/lvm.conf + udevadm control --reload +-echo -n test >keyfile ++printf test >keyfile + cryptsetup -q luksFormat /dev/sdb /keyfile + echo "The passphrase is test" + cryptsetup luksOpen /dev/sdb dracut_crypt_test </keyfile && \ +diff --git a/test/TEST-40-NBD/cryptroot-ask.sh b/test/TEST-40-NBD/cryptroot-ask.sh +index db27c5b8..78ed7f5f 100755 +--- a/test/TEST-40-NBD/cryptroot-ask.sh ++++ b/test/TEST-40-NBD/cryptroot-ask.sh +@@ -1,6 +1,6 @@ + #!/bin/sh + + [ -b /dev/mapper/$2 ] && exit 0 +-echo -n test >/keyfile ++printf test >/keyfile + /sbin/cryptsetup luksOpen $1 $2 </keyfile + diff --git a/SOURCES/0400-Reset-IFS-variable.patch b/SOURCES/0400-Reset-IFS-variable.patch new file mode 100644 index 0000000..a27cb94 --- /dev/null +++ b/SOURCES/0400-Reset-IFS-variable.patch @@ -0,0 +1,31 @@ +From 26eeb4af8ddb3018dbd5ace0ff7338583d118d97 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke <hare@suse.de> +Date: Fri, 26 Jun 2015 16:55:52 +0200 +Subject: [PATCH] Reset IFS variable + +Setting and unsetting the IFS variable is tricky. To be on the +safe side we should always reset the IFS variable to its original +value after parsing. + +Signed-off-by: Hannes Reinecke <hare@suse.de> +Signed-off-by: Thomas Renninger <trenn@suse.de> +(cherry picked from commit b8efaa00171135db1e1f09a73a2e0d8098f03867) +--- + modules.d/95fcoe/parse-fcoe.sh | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/modules.d/95fcoe/parse-fcoe.sh b/modules.d/95fcoe/parse-fcoe.sh +index 7eca0b6c..745a78c6 100755 +--- a/modules.d/95fcoe/parse-fcoe.sh ++++ b/modules.d/95fcoe/parse-fcoe.sh +@@ -31,8 +31,10 @@ udevadm settle --timeout=30 + [ -e /sys/bus/fcoe/ctlr_create ] || modprobe fcoe || die "FCoE requested but kernel/initrd does not support FCoE" + + parse_fcoe_opts() { ++ local OLDIFS="$IFS" + local IFS=: + set $fcoe ++ IFS="$OLDIFS" + + case $# in + 2) diff --git a/SOURCES/0401-Defer-modprobe-of-HW-modules-until-udev-is-running.patch b/SOURCES/0401-Defer-modprobe-of-HW-modules-until-udev-is-running.patch new file mode 100644 index 0000000..5ffc933 --- /dev/null +++ b/SOURCES/0401-Defer-modprobe-of-HW-modules-until-udev-is-running.patch @@ -0,0 +1,53 @@ +From 7335bd1e2358560ac461ef23715a0098f78330fb Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 24 Apr 2015 11:54:07 +0200 +Subject: [PATCH] Defer modprobe of HW modules, until udev is running + +Also honor blacklisting + +(cherry picked from commit 437dad70e9525a21da873652080bbd62a9d8b96a) +--- + modules.d/95fcoe/parse-fcoe.sh | 5 ++--- + modules.d/95iscsi/parse-iscsiroot.sh | 9 ++------- + 2 files changed, 4 insertions(+), 10 deletions(-) + +diff --git a/modules.d/95fcoe/parse-fcoe.sh b/modules.d/95fcoe/parse-fcoe.sh +index 745a78c6..e8a77e08 100755 +--- a/modules.d/95fcoe/parse-fcoe.sh ++++ b/modules.d/95fcoe/parse-fcoe.sh +@@ -22,10 +22,9 @@ + + + # BRCM: Later, should check whether bnx2x is loaded first before loading bnx2fc so do not load bnx2fc when there are no Broadcom adapters +-[ -e /sys/bus/fcoe/ctlr_create ] || modprobe -a fcoe || die "FCoE requested but kernel/initrd does not support FCoE" ++[ -e /sys/bus/fcoe/ctlr_create ] || modprobe -b -a fcoe || die "FCoE requested but kernel/initrd does not support FCoE" + +-modprobe bnx2fc >/dev/null 2>&1 +-udevadm settle --timeout=30 ++initqueue --onetime modprobe -b -q bnx2fc + + # FCoE actually supported? + [ -e /sys/bus/fcoe/ctlr_create ] || modprobe fcoe || die "FCoE requested but kernel/initrd does not support FCoE" +diff --git a/modules.d/95iscsi/parse-iscsiroot.sh b/modules.d/95iscsi/parse-iscsiroot.sh +index 3d74ff2e..80201d4e 100755 +--- a/modules.d/95iscsi/parse-iscsiroot.sh ++++ b/modules.d/95iscsi/parse-iscsiroot.sh +@@ -89,16 +89,11 @@ if [ -z "$netroot" ] || ! [ "${netroot%%:*}" = "iscsi" ]; then + fi + + initqueue --unique --onetime --timeout /sbin/iscsiroot timeout "$netroot" "$NEWROOT" +- +-modprobe -b -q qla4xxx +-modprobe -b -q cxgb3i +-modprobe -b -q cxgb4i +-modprobe -b -q bnx2i +-modprobe -b -q be2iscsi ++initqueue --onetime modprobe --all -b -q qla4xxx cxgb3i cxgb4i bnx2i be2iscsi + + # ISCSI actually supported? + if ! [ -e /sys/module/iscsi_tcp ]; then +- modprobe -q iscsi_tcp || die "iscsiroot requested but kernel/initrd does not support iscsi" ++ modprobe -b -q iscsi_tcp || die "iscsiroot requested but kernel/initrd does not support iscsi" + fi + + if [ -n "$netroot" ] && [ "$root" != "/dev/root" ] && [ "$root" != "dhcp" ]; then diff --git a/SOURCES/0402-95fcoe-start-lldpad-separately.patch b/SOURCES/0402-95fcoe-start-lldpad-separately.patch new file mode 100644 index 0000000..a12989f --- /dev/null +++ b/SOURCES/0402-95fcoe-start-lldpad-separately.patch @@ -0,0 +1,77 @@ +From a4cbfd719bde7339ffefd641839fdbfb6305c012 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke <hare@suse.de> +Date: Thu, 11 Dec 2014 15:46:24 +0100 +Subject: [PATCH] 95fcoe: start lldpad separately + +lldpad is a system-wide process, which must be started only once. +So we should be separate it from fcoe-up, as it might be called +several times. + +Signed-off-by: Hannes Reinecke <hare@suse.de> +Signed-off-by: Thomas Renninger <trenn@suse.de> +(cherry picked from commit 22e837b6458d5d17d1cb6a9b09b7515746d4e098) +--- + modules.d/95fcoe/fcoe-up.sh | 8 -------- + modules.d/95fcoe/lldpad.sh | 14 ++++++++++++++ + modules.d/95fcoe/module-setup.sh | 1 + + 3 files changed, 15 insertions(+), 8 deletions(-) + create mode 100644 modules.d/95fcoe/lldpad.sh + +diff --git a/modules.d/95fcoe/fcoe-up.sh b/modules.d/95fcoe/fcoe-up.sh +index 823d7acc..1d62570e 100755 +--- a/modules.d/95fcoe/fcoe-up.sh ++++ b/modules.d/95fcoe/fcoe-up.sh +@@ -43,10 +43,6 @@ write_fcoemon_cfg() { + } + + if [ "$dcb" = "dcb" ]; then +- # Note lldpad will stay running after switchroot, the system initscripts +- # are to kill it and start a new lldpad to take over. Data is transfered +- # between the 2 using a shm segment +- lldpad -d + # wait for lldpad to be ready + i=0 + while [ $i -lt 60 ]; do +@@ -56,10 +52,6 @@ if [ "$dcb" = "dcb" ]; then + i=$(($i+1)) + done + +- # on some systems lldpad needs some time +- # sleep until we find a better solution +- sleep 30 +- + while [ $i -lt 60 ]; do + dcbtool sc "$netif" dcb on && break + info "Retrying to turn dcb on" +diff --git a/modules.d/95fcoe/lldpad.sh b/modules.d/95fcoe/lldpad.sh +new file mode 100644 +index 00000000..d06a3bd8 +--- /dev/null ++++ b/modules.d/95fcoe/lldpad.sh +@@ -0,0 +1,14 @@ ++#!/bin/bash ++ ++# Note lldpad will stay running after switchroot, the system initscripts ++# are to kill it and start a new lldpad to take over. Data is transfered ++# between the 2 using a shm segment ++lldpad -d ++# wait for lldpad to be ready ++i=0 ++while [ $i -lt 60 ]; do ++ lldptool -p && break ++ info "Waiting for lldpad to be ready" ++ sleep 1 ++ i=$(($i+1)) ++done +diff --git a/modules.d/95fcoe/module-setup.sh b/modules.d/95fcoe/module-setup.sh +index ba10b0ab..c000b3be 100755 +--- a/modules.d/95fcoe/module-setup.sh ++++ b/modules.d/95fcoe/module-setup.sh +@@ -36,6 +36,7 @@ install() { + inst "$moddir/fcoe-up.sh" "/sbin/fcoe-up" + inst "$moddir/fcoe-edd.sh" "/sbin/fcoe-edd" + inst "$moddir/fcoe-genrules.sh" "/sbin/fcoe-genrules.sh" ++ inst_hook pre-trigger 03 "$moddir/lldpad.sh" + inst_hook cmdline 99 "$moddir/parse-fcoe.sh" + inst_hook cleanup 90 "$moddir/cleanup-fcoe.sh" + dracut_need_initqueue diff --git a/SOURCES/0403-95fcoe-skip-VLAN-devices-in-fcoe-up.patch b/SOURCES/0403-95fcoe-skip-VLAN-devices-in-fcoe-up.patch new file mode 100644 index 0000000..c9bf58f --- /dev/null +++ b/SOURCES/0403-95fcoe-skip-VLAN-devices-in-fcoe-up.patch @@ -0,0 +1,37 @@ +From b9668f8f000dc5d072ad4d12f7019776a0c18598 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke <hare@suse.de> +Date: Thu, 11 Dec 2014 15:46:23 +0100 +Subject: [PATCH] 95fcoe: skip VLAN devices in fcoe-up + +DCB & fipvlan can only be called on real devices, not VLAN +ones. So skip any VLAN devices which might been added to the +list of network interfaces. + +References: bnc#878583 + +Signed-off-by: Hannes Reinecke <hare@suse.de> +Signed-off-by: Thomas Renninger <trenn@suse.de> +(cherry picked from commit 0a68a26cffad7fc75e454b06206c0bbf297361b7) +--- + modules.d/95fcoe/fcoe-up.sh | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/modules.d/95fcoe/fcoe-up.sh b/modules.d/95fcoe/fcoe-up.sh +index 1d62570e..0399affd 100755 +--- a/modules.d/95fcoe/fcoe-up.sh ++++ b/modules.d/95fcoe/fcoe-up.sh +@@ -22,6 +22,14 @@ netif=$1 + dcb=$2 + vlan="yes" + ++iflink=$(cat /sys/class/net/$netif/iflink) ++ifindex=$(cat /sys/class/net/$netif/ifindex) ++if [ "$iflink" != "$ifindex" ] ; then ++ # Skip VLAN devices ++ exit 0 ++fi ++ ++ip link set dev $netif up + linkup "$netif" + + netdriver=$(readlink -f /sys/class/net/$netif/device/driver) diff --git a/SOURCES/0404-95fcoe-Store-current-configuration-in-dracut-cmdline.patch b/SOURCES/0404-95fcoe-Store-current-configuration-in-dracut-cmdline.patch new file mode 100644 index 0000000..01c01d0 --- /dev/null +++ b/SOURCES/0404-95fcoe-Store-current-configuration-in-dracut-cmdline.patch @@ -0,0 +1,88 @@ +From f501c955e86eb3043ab5e3c5f2648ed4c8bb58a3 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke <hare@suse.de> +Date: Thu, 11 Dec 2014 15:46:22 +0100 +Subject: [PATCH] 95fcoe: Store current configuration in dracut cmdline + +When running with --hostonly-cmdline we should be storing +the current configuration in /etc/cmdline.d so that dracut +will be configure the system automatically. + +References: bnc#877288 + +Signed-off-by: Hannes Reinecke <hare@suse.de> +Signed-off-by: Thomas Renninger <trenn@suse.de> +(cherry picked from commit 8b257fcc86f9a470613c1a5719641144a688acf7) +--- + modules.d/95fcoe/module-setup.sh | 45 ++++++++++++++++++++++++++++++++ + 1 file changed, 45 insertions(+) + +diff --git a/modules.d/95fcoe/module-setup.sh b/modules.d/95fcoe/module-setup.sh +index c000b3be..af2798dc 100755 +--- a/modules.d/95fcoe/module-setup.sh ++++ b/modules.d/95fcoe/module-setup.sh +@@ -13,6 +13,7 @@ check() { + } + + require_binaries dcbtool fipvlan lldpad ip readlink fcoemon fcoeadm || return 1 ++ + return 0 + } + +@@ -25,6 +26,46 @@ installkernel() { + instmods fcoe 8021q edd + } + ++get_vlan_parent() { ++ local link=$1 ++ ++ [ -d $link ] || return ++ read iflink < $link/iflink ++ for if in /sys/class/net/* ; do ++ read idx < $if/ifindex ++ if [ $idx -eq $iflink ] ; then ++ echo ${if##*/} ++ fi ++ done ++} ++ ++# called by dracut ++cmdline() { ++ ++ for c in /sys/bus/fcoe/devices/ctlr_* ; do ++ [ -L $c ] || continue ++ read enabled < $c/enabled ++ [ $enabled -eq 0 ] && continue ++ d=$(cd -P $c; echo $PWD) ++ i=${d%/*} ++ read mac < ${i}/address ++ s=$(dcbtool gc ${i##*/} dcb | sed -n 's/^DCB State:\t*\(.*\)/\1/p') ++ if [ -z "$s" ] ; then ++ p=$(get_vlan_parent ${i}) ++ if [ "$p" ] ; then ++ s=$(dcbtool gc ${p} dcb | sed -n 's/^DCB State:\t*\(.*\)/\1/p') ++ fi ++ fi ++ if [ "$s" = "on" ] ; then ++ dcb="dcb" ++ else ++ dcb="nodcb" ++ fi ++ echo "fcoe=${mac}:${dcb}" ++ done ++} ++ ++# called by dracut + install() { + inst_multiple ip dcbtool fipvlan lldpad readlink lldptool fcoemon fcoeadm + inst_libdir_file 'libhbalinux.so*' +@@ -33,6 +74,10 @@ install() { + mkdir -m 0755 -p "$initdir/var/lib/lldpad" + mkdir -m 0755 -p "$initdir/etc/fcoe" + ++ if [[ $hostonly_cmdline == "yes" ]] ; then ++ local _fcoeconf=$(cmdline) ++ [[ $_fcoeconf ]] && printf "%s\n" "$_fcoeconf" >> "${initdir}/etc/cmdline.d/95fcoe.conf" ++ fi + inst "$moddir/fcoe-up.sh" "/sbin/fcoe-up" + inst "$moddir/fcoe-edd.sh" "/sbin/fcoe-edd" + inst "$moddir/fcoe-genrules.sh" "/sbin/fcoe-genrules.sh" diff --git a/SOURCES/0405-95fcoe-update-fcoe-interface-check.patch b/SOURCES/0405-95fcoe-update-fcoe-interface-check.patch new file mode 100644 index 0000000..0f629f7 --- /dev/null +++ b/SOURCES/0405-95fcoe-update-fcoe-interface-check.patch @@ -0,0 +1,23 @@ +From f105eaebb8ede98c44cc33705384c05a5b12adb1 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke <hare@suse.de> +Date: Thu, 11 Dec 2014 15:46:21 +0100 +Subject: [PATCH] 95fcoe: update fcoe interface check + +--- + modules.d/95fcoe/parse-fcoe.sh | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/modules.d/95fcoe/parse-fcoe.sh b/modules.d/95fcoe/parse-fcoe.sh +index e8a77e08..3d829122 100755 +--- a/modules.d/95fcoe/parse-fcoe.sh ++++ b/modules.d/95fcoe/parse-fcoe.sh +@@ -26,9 +26,6 @@ + + initqueue --onetime modprobe -b -q bnx2fc + +-# FCoE actually supported? +-[ -e /sys/bus/fcoe/ctlr_create ] || modprobe fcoe || die "FCoE requested but kernel/initrd does not support FCoE" +- + parse_fcoe_opts() { + local OLDIFS="$IFS" + local IFS=: diff --git a/SOURCES/0406-fcoe-up-remove-initlog-logic.patch b/SOURCES/0406-fcoe-up-remove-initlog-logic.patch new file mode 100644 index 0000000..50a2a1f --- /dev/null +++ b/SOURCES/0406-fcoe-up-remove-initlog-logic.patch @@ -0,0 +1,23 @@ +From 603a0fe0a35a85f5d223922be41342f59906d9fe Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 5 Mar 2014 13:20:35 +0100 +Subject: [PATCH] fcoe-up: remove initlog logic + +(cherry picked from commit f60b7d8655bd90637a52b11e9e16ed144d5040d3) +--- + modules.d/95fcoe/fcoe-up.sh | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/modules.d/95fcoe/fcoe-up.sh b/modules.d/95fcoe/fcoe-up.sh +index 0399affd..cdff6ef1 100755 +--- a/modules.d/95fcoe/fcoe-up.sh ++++ b/modules.d/95fcoe/fcoe-up.sh +@@ -13,8 +13,6 @@ PATH=/usr/sbin:/usr/bin:/sbin:/bin + # Huh? Missing arguments ?? + [ -z "$1" -o -z "$2" ] && exit 1 + +-export PS4="fcoe-up.$1.$$ + " +-exec >>/run/initramfs/loginit.pipe 2>>/run/initramfs/loginit.pipe + type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh + type ip_to_var >/dev/null 2>&1 || . /lib/net-lib.sh + diff --git a/SOURCES/0407-network-net-lib.sh-correctly-set-mac-address-for-ip-.patch b/SOURCES/0407-network-net-lib.sh-correctly-set-mac-address-for-ip-.patch new file mode 100644 index 0000000..5272dcf --- /dev/null +++ b/SOURCES/0407-network-net-lib.sh-correctly-set-mac-address-for-ip-.patch @@ -0,0 +1,27 @@ +From b7f5e42c578295bb725eeb9767a58b02ce3c9ce7 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 13 Jan 2016 13:43:38 +0100 +Subject: [PATCH] network/net-lib.sh: correctly set mac address for + ip=...:<mtu>:<mac> + +if ip=...:<mtu>:<mac> was specified, macadress was not set + +(cherry picked from commit efbc47b8e43ad173d3319f3f6e87b0a60aad9f37) +--- + modules.d/40network/net-lib.sh | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index f91d1691..5a07b4ee 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -421,6 +421,9 @@ ip_to_var() { + ;; + [0-9]*) + mtu="$8" ++ if [ -n "${9}" -a -n "${10}" -a -n "${11}" -a -n "${12}" -a -n "${13}" -a -n "${14}" ]; then ++ macaddr="${9}:${10}:${11}:${12}:${13}:${14}" ++ fi + ;; + *) + if [ -n "${9}" -a -n "${10}" -a -n "${11}" -a -n "${12}" -a -n "${13}" -a -n "${14}" ]; then diff --git a/SOURCES/0408-network-support-macaddr-in-brackets.patch b/SOURCES/0408-network-support-macaddr-in-brackets.patch new file mode 100644 index 0000000..7ffd270 --- /dev/null +++ b/SOURCES/0408-network-support-macaddr-in-brackets.patch @@ -0,0 +1,159 @@ +From 53e4ab71742fc1e5d8112c719c0d154d08815fa1 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 29 Jun 2016 12:27:37 +0200 +Subject: [PATCH] network: support macaddr in brackets [] + +ip=ens3:dhcp:1000 +ip=ens3:dhcp::54:52:00:ab:cd:ef +ip=ens3:dhcp::[54:52:00:ab:cd:ef] +ip=ens3:dhcp:1000:54:52:00:ab:cd:ef +ip=ens3:dhcp:1000:[54:52:00:ab:cd:ef] + +ip=192.168.122.20::192.168.122.1:24:test:ens3:none:1000 +ip=192.168.122.20::192.168.122.1:24:test:ens3:none::54:52:00:ab:cd:ef +ip=192.168.122.20::192.168.122.1:24:test:ens3:none::[54:52:00:ab:cd:ef] +ip=192.168.122.20::192.168.122.1:24:test:ens3:none:1000:54:52:00:ab:cd:ef +ip=192.168.122.20::192.168.122.1:24:test:ens3:none:1000:[54:52:00:ab:cd:ef] + +ip=::::test:ens3:dhcp:1000 +ip=::::test:ens3:dhcp::54:52:00:ab:cd:ef +ip=::::test:ens3:dhcp::[54:52:00:ab:cd:ef] +ip=::::test:ens3:dhcp:1000:54:52:00:ab:cd:ef +ip=::::test:ens3:dhcp:1000:[54:52:00:ab:cd:ef] +--- + modules.d/40network/net-lib.sh | 119 +++++++++++++++++++++------------ + 1 file changed, 75 insertions(+), 44 deletions(-) + +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index 5a07b4ee..0c00f925 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -406,53 +406,84 @@ ip_to_var() { + done + + unset ip srv gw mask hostname dev autoconf macaddr mtu dns1 dns2 +- case $# in +- 0) autoconf="error" ;; +- 1) autoconf=$1 ;; +- 2) [ -n "$1" ] && dev=$1; [ -n "$2" ] && autoconf=$2 ;; +- 3) [ -n "$1" ] && dev=$1; [ -n "$2" ] && autoconf=$2; [ -n "$3" ] && mtu=$3 ;; +- 4) [ -n "$1" ] && dev=$1; [ -n "$2" ] && autoconf=$2; [ -n "$3" ] && mtu=$3; [ -n "$4" ] && macaddr=$4 ;; +- *) [ -n "$1" ] && ip=$1; [ -n "$2" ] && srv=$2; [ -n "$3" ] && gw=$3; [ -n "$4" ] && mask=$4; +- [ -n "$5" ] && hostname=$5; [ -n "$6" ] && dev=$6; [ -n "$7" ] && autoconf=$7; +- case "$8" in +- [0-9]*:*|[0-9]*.[0-9]*.[0-9]*.[0-9]*) +- dns1="$8" +- [ -n "$9" ] && dns2="$9" +- ;; +- [0-9]*) +- mtu="$8" +- if [ -n "${9}" -a -n "${10}" -a -n "${11}" -a -n "${12}" -a -n "${13}" -a -n "${14}" ]; then +- macaddr="${9}:${10}:${11}:${12}:${13}:${14}" +- fi +- ;; +- *) +- if [ -n "${9}" -a -n "${10}" -a -n "${11}" -a -n "${12}" -a -n "${13}" -a -n "${14}" ]; then +- macaddr="${9}:${10}:${11}:${12}:${13}:${14}" +- fi +- ;; ++ ++ if [ $# -eq 0 ]; then ++ autoconf="error" ++ return 0 ++ fi ++ ++ if [ $# -eq 1 ]; then ++ # format: ip={dhcp|on|any|dhcp6|auto6} ++ # or ++ # ip=<ipv4-address> means anaconda-style static config argument cluster ++ autoconf="$1" ++ ++ if strstr "$autoconf" "*.*.*.*"; then ++ # ip=<ipv4-address> means anaconda-style static config argument cluster: ++ # ip=<ip> gateway=<gw> netmask=<nm> hostname=<host> mtu=<mtu> ++ # ksdevice={link|bootif|ibft|<MAC>|<ifname>} ++ ip="$autoconf" ++ gw=$(getarg gateway=) ++ mask=$(getarg netmask=) ++ hostname=$(getarg hostname=) ++ dev=$(getarg ksdevice=) ++ autoconf="none" ++ mtu=$(getarg mtu=) ++ ++ # handle special values for ksdevice ++ case "$dev" in ++ bootif|BOOTIF) dev=$(fix_bootif $(getarg BOOTIF=)) ;; ++ link) dev="" ;; # FIXME: do something useful with this ++ ibft) dev="" ;; # ignore - ibft is handled elsewhere + esac +- ;; +- esac ++ fi ++ return 0 ++ fi + +- # ip=<ipv4-address> means anaconda-style static config argument cluster: +- # ip=<ip> gateway=<gw> netmask=<nm> hostname=<host> mtu=<mtu> +- # ksdevice={link|bootif|ibft|<MAC>|<ifname>} +- if strstr "$autoconf" "*.*.*.*"; then +- ip="$autoconf" +- gw=$(getarg gateway=) +- mask=$(getarg netmask=) +- hostname=$(getarg hostname=) +- dev=$(getarg ksdevice=) +- autoconf="none" +- mtu=$(getarg mtu=) +- +- # handle special values for ksdevice +- case "$dev" in +- bootif|BOOTIF) dev=$(fix_bootif $(getarg BOOTIF=)) ;; +- link) dev="" ;; # FIXME: do something useful with this +- ibft) dev="" ;; # ignore - ibft is handled elsewhere +- esac ++ if [ "$2" = "dhcp" -o "$2" = "on" -o "$2" = "any" -o "$2" = "dhcp6" -o "$2" = "auto6" ]; then ++ # format: ip=<interface>:{dhcp|on|any|dhcp6|auto6}[:[<mtu>][:<macaddr>]] ++ [ -n "$1" ] && dev="$1" ++ [ -n "$2" ] && autoconf="$2" ++ [ -n "$3" ] && mtu=$3 ++ if [ -z "$5" ]; then ++ macaddr="$4" ++ else ++ macaddr="${4}:${5}:${6}:${7}:${8}:${9}" ++ fi ++ return 0 + fi ++ ++ # format: ip=<client-IP>:[<peer>]:<gateway-IP>:<netmask>:<client_hostname>:<interface>:{none|off|dhcp|on|any|dhcp6|auto6|ibft}:[:[<mtu>][:<macaddr>]] ++ ++ [ -n "$1" ] && ip=$1 ++ [ -n "$2" ] && srv=$2 ++ [ -n "$3" ] && gw=$3 ++ [ -n "$4" ] && mask=$4 ++ [ -n "$5" ] && hostname=$5 ++ [ -n "$6" ] && dev=$6 ++ [ -n "$7" ] && autoconf=$7 ++ case "$8" in ++ [0-9]*:*|[0-9]*.[0-9]*.[0-9]*.[0-9]*) ++ dns1="$8" ++ [ -n "$9" ] && dns2="$9" ++ ;; ++ [0-9]*) ++ mtu="$8" ++ if [ -n "${9}" -a -z "${10}" ]; then ++ macaddr="${9}" ++ elif [ -n "${9}" -a -n "${10}" -a -n "${11}" -a -n "${12}" -a -n "${13}" -a -n "${14}" ]; then ++ macaddr="${9}:${10}:${11}:${12}:${13}:${14}" ++ fi ++ ;; ++ *) ++ if [ -n "${9}" -a -z "${10}" ]; then ++ macaddr="${9}" ++ elif [ -n "${9}" -a -n "${10}" -a -n "${11}" -a -n "${12}" -a -n "${13}" -a -n "${14}" ]; then ++ macaddr="${9}:${10}:${11}:${12}:${13}:${14}" ++ fi ++ ;; ++ esac ++ return 0 + } + + route_to_var() { diff --git a/SOURCES/0409-test-don-t-call-ldconfig-with-path-separator.patch b/SOURCES/0409-test-don-t-call-ldconfig-with-path-separator.patch new file mode 100644 index 0000000..02a9d53 --- /dev/null +++ b/SOURCES/0409-test-don-t-call-ldconfig-with-path-separator.patch @@ -0,0 +1,36 @@ +From 55712f46c06d782be7829b860e5009701fcb9da9 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 29 Jun 2016 15:11:39 +0200 +Subject: [PATCH] test: don't call ldconfig with -- path separator + +--- + test/TEST-16-DMSQUASH/test.sh | 2 +- + test/TEST-50-MULTINIC/test.sh | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/test/TEST-16-DMSQUASH/test.sh b/test/TEST-16-DMSQUASH/test.sh +index c08a2a41..9d584e39 100755 +--- a/test/TEST-16-DMSQUASH/test.sh ++++ b/test/TEST-16-DMSQUASH/test.sh +@@ -69,7 +69,7 @@ test_setup() { + find_binary plymouth >/dev/null && inst_multiple plymouth + (cd "$initdir"; mkdir -p -- dev sys proc etc var/run tmp ) + cp -a -- /etc/ld.so.conf* "$initdir"/etc +- sudo ldconfig -r -- "$initdir" ++ sudo ldconfig -r "$initdir" + ) + python create.py -d -c livecd-fedora-minimal.ks + return 0 +diff --git a/test/TEST-50-MULTINIC/test.sh b/test/TEST-50-MULTINIC/test.sh +index c0c3615f..05273be7 100755 +--- a/test/TEST-50-MULTINIC/test.sh ++++ b/test/TEST-50-MULTINIC/test.sh +@@ -222,7 +222,7 @@ test_setup() { + inst /etc/group /etc/group + + cp -a -- /etc/ld.so.conf* "$initdir"/etc +- sudo ldconfig -r -- "$initdir" ++ sudo ldconfig -r "$initdir" + dracut_kernel_post + ) + diff --git a/SOURCES/0410-network-set-MTU-and-MACADDR-for-dhcp-and-auto6.patch b/SOURCES/0410-network-set-MTU-and-MACADDR-for-dhcp-and-auto6.patch new file mode 100644 index 0000000..162ec81 --- /dev/null +++ b/SOURCES/0410-network-set-MTU-and-MACADDR-for-dhcp-and-auto6.patch @@ -0,0 +1,81 @@ +From 61b5ee6d1d5708c0b41497facd8b97681f9729fb Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 29 Jun 2016 15:12:24 +0200 +Subject: [PATCH] network: set MTU and MACADDR for dhcp and auto6 + +--- + modules.d/40network/ifup.sh | 7 ++++++- + modules.d/45ifcfg/write-ifcfg.sh | 7 +++---- + 2 files changed, 9 insertions(+), 5 deletions(-) + +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index f681336e..37f51b9d 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -110,6 +110,9 @@ do_dhcp() { + return 1 + fi + ++ [ -n "$macaddr" ] && ip link set address $macaddr dev $netif ++ [ -n "$mtu" ] && ip link set mtu $mtu dev $netif ++ + while [ $_COUNT -lt $_DHCPRETRY ]; do + info "Starting dhcp for interface $netif" + dhclient "$@" \ +@@ -144,6 +147,8 @@ do_ipv6auto() { + echo 1 > /proc/sys/net/ipv6/conf/$netif/accept_ra + echo 1 > /proc/sys/net/ipv6/conf/$netif/accept_redirects + linkup $netif ++ [ -n "$macaddr" ] && ip link set address $macaddr dev $netif ++ [ -n "$mtu" ] && ip link set mtu $mtu dev $netif + wait_for_ipv6_auto $netif + + [ -n "$hostname" ] && echo "echo $hostname > /proc/sys/kernel/hostname" > /tmp/net.$netif.hostname +@@ -388,7 +393,7 @@ for p in $(getargs ip=); do + done + + # Store config for later use +- for i in ip srv gw mask hostname macaddr dns1 dns2; do ++ for i in ip srv gw mask hostname macaddr dns1 dns2 mtu; do + eval '[ "$'$i'" ] && echo '$i'="$'$i'"' + done > /tmp/net.$netif.override + +diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh +index a5114be1..cab74772 100755 +--- a/modules.d/45ifcfg/write-ifcfg.sh ++++ b/modules.d/45ifcfg/write-ifcfg.sh +@@ -144,6 +144,7 @@ for netup in /tmp/net.*.did-setup ; do + + [ -e /tmp/bond.${netif}.info ] && . /tmp/bond.${netif}.info + [ -e /tmp/team.${netif}.info ] && . /tmp/team.${netif}.info ++ [ -e /tmp/net.${netif}.override ] && . /tmp/net.${netif}.override + + uuid=$(cat /proc/sys/kernel/random/uuid) + if [ "$netif" = "$bridgename" ]; then +@@ -178,8 +179,6 @@ for netup in /tmp/net.*.did-setup ; do + fi + cp /tmp/dhclient.$netif.lease /tmp/ifcfg-leases/dhclient-$uuid-$netif.lease + else +- # If we've booted with static ip= lines, the override file is there +- [ -e /tmp/net.$netif.override ] && . /tmp/net.$netif.override + if strstr "$ip" '*:*:*'; then + echo "IPV6INIT=yes" + echo "IPV6_AUTOCONF=no" +@@ -245,7 +244,7 @@ for netup in /tmp/net.*.did-setup ; do + echo "MASTER=\"$netif\"" + echo "UUID=\"$(cat /proc/sys/kernel/random/uuid)\"" + unset macaddr +- [ -e /tmp/net.$slave.override ] && . /tmp/net.$slave.override ++ [ -e /tmp/net.${slave}.override ] && . /tmp/net.${slave}.override + interface_bind "$slave" "$macaddr" + ) >> /tmp/ifcfg/ifcfg-$slave + done +@@ -268,7 +267,7 @@ for netup in /tmp/net.*.did-setup ; do + echo "BRIDGE=\"$bridgename\"" + echo "UUID=\"$(cat /proc/sys/kernel/random/uuid)\"" + unset macaddr +- [ -e /tmp/net.$slave.override ] && . /tmp/net.$slave.override ++ [ -e /tmp/net.${slave}.override ] && . /tmp/net.${slave}.override + interface_bind "$slave" "$macaddr" + ) >> /tmp/ifcfg/ifcfg-$slave + done diff --git a/SOURCES/0411-test-add-TEST-60-MTUMAC.patch b/SOURCES/0411-test-add-TEST-60-MTUMAC.patch new file mode 100644 index 0000000..85f74ac --- /dev/null +++ b/SOURCES/0411-test-add-TEST-60-MTUMAC.patch @@ -0,0 +1,535 @@ +From 323093b621c415cf0d04c48716d77cf9569850d6 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 29 Jun 2016 15:51:42 +0200 +Subject: [PATCH] test: add TEST-60-MTUMAC + +test MTU and MACADDR setting +--- + test/TEST-60-MTUMAC/99-idesymlinks.rules | 8 + + test/TEST-60-MTUMAC/Makefile | 10 + + test/TEST-60-MTUMAC/client-init.sh | 22 ++ + test/TEST-60-MTUMAC/dhcpd.conf | 15 ++ + test/TEST-60-MTUMAC/exports | 1 + + test/TEST-60-MTUMAC/finished-false.sh | 2 + + test/TEST-60-MTUMAC/hard-off.sh | 3 + + test/TEST-60-MTUMAC/hosts | 5 + + test/TEST-60-MTUMAC/server-init.sh | 98 ++++++++ + test/TEST-60-MTUMAC/test.sh | 282 +++++++++++++++++++++++ + 10 files changed, 446 insertions(+) + create mode 100644 test/TEST-60-MTUMAC/99-idesymlinks.rules + create mode 100644 test/TEST-60-MTUMAC/Makefile + create mode 100755 test/TEST-60-MTUMAC/client-init.sh + create mode 100644 test/TEST-60-MTUMAC/dhcpd.conf + create mode 100644 test/TEST-60-MTUMAC/exports + create mode 100755 test/TEST-60-MTUMAC/finished-false.sh + create mode 100755 test/TEST-60-MTUMAC/hard-off.sh + create mode 100644 test/TEST-60-MTUMAC/hosts + create mode 100755 test/TEST-60-MTUMAC/server-init.sh + create mode 100755 test/TEST-60-MTUMAC/test.sh + +diff --git a/test/TEST-60-MTUMAC/99-idesymlinks.rules b/test/TEST-60-MTUMAC/99-idesymlinks.rules +new file mode 100644 +index 00000000..d557790a +--- /dev/null ++++ b/test/TEST-60-MTUMAC/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-MTUMAC/Makefile b/test/TEST-60-MTUMAC/Makefile +new file mode 100644 +index 00000000..aad27059 +--- /dev/null ++++ b/test/TEST-60-MTUMAC/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-MTUMAC/client-init.sh b/test/TEST-60-MTUMAC/client-init.sh +new file mode 100755 +index 00000000..a45c3123 +--- /dev/null ++++ b/test/TEST-60-MTUMAC/client-init.sh +@@ -0,0 +1,22 @@ ++#!/bin/sh ++exec >/dev/console 2>&1 ++set -x ++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 ++ cd /sys/class/net ++ for i in ens*; do ++ echo "$i" "$(cat $i/mtu)" "$(cat $i/address)" ++ done ++ echo END ++) > /dev/sda ++ ++strstr "$CMDLINE" "rd.shell" && sh -i ++poweroff -f +diff --git a/test/TEST-60-MTUMAC/dhcpd.conf b/test/TEST-60-MTUMAC/dhcpd.conf +new file mode 100644 +index 00000000..cba28233 +--- /dev/null ++++ b/test/TEST-60-MTUMAC/dhcpd.conf +@@ -0,0 +1,15 @@ ++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; ++} +diff --git a/test/TEST-60-MTUMAC/exports b/test/TEST-60-MTUMAC/exports +new file mode 100644 +index 00000000..ff5f29b1 +--- /dev/null ++++ b/test/TEST-60-MTUMAC/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-MTUMAC/finished-false.sh b/test/TEST-60-MTUMAC/finished-false.sh +new file mode 100755 +index 00000000..ecdbef95 +--- /dev/null ++++ b/test/TEST-60-MTUMAC/finished-false.sh +@@ -0,0 +1,2 @@ ++#!/bin/sh ++exit 1 +diff --git a/test/TEST-60-MTUMAC/hard-off.sh b/test/TEST-60-MTUMAC/hard-off.sh +new file mode 100755 +index 00000000..12c3d5ac +--- /dev/null ++++ b/test/TEST-60-MTUMAC/hard-off.sh +@@ -0,0 +1,3 @@ ++#!/bin/sh ++getarg rd.shell || poweroff -f ++getarg failme && poweroff -f +diff --git a/test/TEST-60-MTUMAC/hosts b/test/TEST-60-MTUMAC/hosts +new file mode 100644 +index 00000000..d02a4e9b +--- /dev/null ++++ b/test/TEST-60-MTUMAC/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-MTUMAC/server-init.sh b/test/TEST-60-MTUMAC/server-init.sh +new file mode 100755 +index 00000000..88ef2128 +--- /dev/null ++++ b/test/TEST-60-MTUMAC/server-init.sh +@@ -0,0 +1,98 @@ ++#!/bin/sh ++exec </dev/console >/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 ++} ++ ++>/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 ++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 ++[ -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 ++#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-MTUMAC/test.sh b/test/TEST-60-MTUMAC/test.sh +new file mode 100755 +index 00000000..7633ac13 +--- /dev/null ++++ b/test/TEST-60-MTUMAC/test.sh +@@ -0,0 +1,282 @@ ++#!/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 multiple nics" ++KVERSION=${KVERSION-$(uname -r)} ++ ++# Uncomment this to debug failures ++#DEBUGFAIL="rd.shell rd.break" ++#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 \ ++ -net socket,listen=127.0.0.1:12350 \ ++ -net nic,macaddr=52:54:01:12:34:56,model=e1000 \ ++ ${SERIAL:+-serial "$SERIAL"} \ ++ -watchdog i6300esb -watchdog-action poweroff \ ++ -kernel /boot/vmlinuz-"$KVERSION" \ ++ -append "loglevel=7 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 ++ ++ # 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 cmdline="$2" ++ local check="$3" ++ ++ echo "CLIENT TEST START: $test_name" ++ ++ # 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 ++ ++ $testdir/run-qemu -hda "$TESTDIR"/client.img -m 512M -smp 2 -nographic \ ++ -net socket,connect=127.0.0.1:12350 \ ++ -net nic,macaddr=52:54:00:12:34:01,model=e1000 \ ++ -net nic,macaddr=52:54:00:12:34:02,model=e1000 \ ++ -net nic,macaddr=52:54:00:12:34:03,model=e1000 \ ++ -net nic,macaddr=52:54:00:12:34:04,model=e1000 \ ++ -net nic,macaddr=52:54:00:12:34:05,model=e1000 \ ++ -watchdog i6300esb -watchdog-action poweroff \ ++ -kernel /boot/vmlinuz-"$KVERSION" \ ++ -append "$cmdline $DEBUGFAIL rd.retry=5 rw console=ttyS0,115200n81 selinux=0 init=/sbin/init" \ ++ -initrd "$TESTDIR"/initramfs.testing ++ ++ { ++ read OK ++ if [[ "$OK" != "OK" ]]; then ++ echo "CLIENT TEST END: $test_name [FAILED - BAD EXIT]" ++ return 1 ++ fi ++ ++ while read IFACE MTU MAC; do ++ [[ $IFACE == END ]] && break ++ IFACES+="${IFACE}-${MTU}-${MAC} " ++ done ++ } < "$TESTDIR"/client.img || return 1 ++ ++ echo "$IFACES" ++ ++ for i in $check; do ++ if [[ " $IFACES " != *\ $i\ * ]]; then ++ echo "$i not in '$IFACES'" ++ echo "CLIENT TEST END: $test_name [FAILED - BAD IF]" ++ return 1 ++ fi ++ done ++ ++ for i in $IFACES; do ++ if [[ " $check " != *\ $i\ * ]]; then ++ echo "$i in '$IFACES', but should not be" ++ echo "CLIENT TEST END: $test_name [FAILED - BAD IF]" ++ return 1 ++ fi ++ done ++ ++ 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 "MTUMAC format: ip=<interface>:{dhcp|on|any|dhcp6|auto6}[:[<mtu>][:<macaddr>]]" \ ++ " ++ip=ens3:dhcp:1000 ++ip=ens4:dhcp::54:52:00:ab:cd:01 ++ip=ens5:dhcp::[54:52:00:ab:cd:02] ++ip=ens6:dhcp:1000:54:52:00:ab:cd:03 ++ip=ens7:dhcp:1000:[54:52:00:ab:cd:04] ++rd.neednet=1 ++root=nfs:192.168.50.1:/nfs/client bootdev=ens3 ++" \ ++ "ens3-1000-52:54:00:12:34:01 ens4-1500-54:52:00:ab:cd:01 ens5-1500-54:52:00:ab:cd:02 ens6-1000-54:52:00:ab:cd:03 ens7-1000-54:52:00:ab:cd:04" || return 1 ++ client_test "MTUMAC format: format: ip=<client-IP>:[<peer>]:<gateway-IP>:<netmask>:<client_hostname>:<interface>:{none|off|dhcp|on|any|dhcp6|auto6|ibft}:[:[<mtu>][:<macaddr>]]" \ ++ " ++ip=192.168.50.2::192.168.50.1:24:test:ens3:none:1000 ++ip=192.168.50.3::192.168.50.1:24:test:ens4:none::54:52:00:ab:cd:01 ++ip=192.168.50.4::192.168.50.1:24:test:ens5:none::[54:52:00:ab:cd:02] ++ip=192.168.50.5::192.168.50.1:24:test:ens6:none:1000:54:52:00:ab:cd:03 ++ip=192.168.50.6::192.168.50.1:24:test:ens7:none:1000:[54:52:00:ab:cd:04] ++rd.neednet=1 ++root=nfs:192.168.50.1:/nfs/client bootdev=ens3 ++" \ ++ "ens3-1000-52:54:00:12:34:01 ens4-1500-54:52:00:ab:cd:01 ens5-1500-54:52:00:ab:cd:02 ens6-1000-54:52:00:ab:cd:03 ens7-1000-54:52:00:ab:cd:04" || return 1 ++ ++ kill_server ++ return 0 ++} ++ ++test_setup() { ++ # Make server root ++ dd if=/dev/null of="$TESTDIR"/server.ext3 bs=1M seek=60 ++ mke2fs -j -F -- "$TESTDIR"/server.ext3 ++ mkdir -- "$TESTDIR"/mnt ++ sudo mount -o loop -- "$TESTDIR"/server.ext3 "$TESTDIR"/mnt ++ ++ ( ++ 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 ++ 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 ++ 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 ++ sudo ldconfig -r "$initdir" ++ ) ++ ++ sudo 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 "af_packet piix ide-gd_mod ata_piix ext3 sd_mod nfsv2 nfsv3 nfsv4 nfs_acl nfs_layout_nfsv41_files nfsd e1000 i6300esb ib700wdt" \ ++ -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 "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" \ ++ -f "$TESTDIR"/initramfs.testing "$KVERSION" || return 1 ++} ++ ++kill_server() { ++ if [[ -s "$TESTDIR"/server.pid ]]; then ++ sudo kill -TERM -- $(cat "$TESTDIR"/server.pid) ++ rm -f -- "$TESTDIR"/server.pid ++ fi ++} ++ ++test_cleanup() { ++ kill_server ++} ++ ++. "$testdir"/test-functions diff --git a/SOURCES/0412-network-net-lib.sh-parse_ifname_opts-support-21-byte.patch b/SOURCES/0412-network-net-lib.sh-parse_ifname_opts-support-21-byte.patch new file mode 100644 index 0000000..689d36f --- /dev/null +++ b/SOURCES/0412-network-net-lib.sh-parse_ifname_opts-support-21-byte.patch @@ -0,0 +1,41 @@ +From 435af39a0054c2e06ae98a5271c03259e15ba7e6 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 29 Jun 2016 16:37:40 +0200 +Subject: [PATCH] network/net-lib.sh(parse_ifname_opts): support 21 byte MAC + addrs + +infiniband MAC addrs are 20 bytes long not 6 + +https://bugzilla.redhat.com/show_bug.cgi?id=1319270 +--- + modules.d/40network/net-lib.sh | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index 0c00f925..9f767144 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -523,8 +523,13 @@ parse_ifname_opts() { + # udev requires MAC addresses to be lower case + ifname_mac=$(echo $2:$3:$4:$5:$6:$7 | sed 'y/ABCDEF/abcdef/') + ;; ++ 21) ++ # infiniband MAC addrs are 20 bytes long not 6 ++ ifname_if=$1 ++ ifname_mac=$(echo $2:$3:$4:$5:$6:$7:$8:$9:$10:$11:$12:13:$14:$15$16:$17:$18:$19:$20:$21 | sed 'y/ABCDEF/abcdef/') ++ ;; + *) +- die "Invalid arguments for ifname=" ++ die "Invalid arguments for ifname=$1" + ;; + esac + +@@ -533,7 +538,7 @@ parse_ifname_opts() { + warn "ifname=$ifname_if uses the kernel name space for interfaces" + warn "This can fail for multiple network interfaces and is discouraged!" + warn "Please use a custom name like \"netboot\" or \"bluesocket\"" +- warn "or use biosdevname and no ifname= at all." ++ warn "or use the persistent interface names from udev or biosdevname and no ifname= at all." + ;; + esac + diff --git a/SOURCES/0413-network-net-lib.sh-wait_for_ipv6_dad-simplify-ip-cal.patch b/SOURCES/0413-network-net-lib.sh-wait_for_ipv6_dad-simplify-ip-cal.patch new file mode 100644 index 0000000..85aa89c --- /dev/null +++ b/SOURCES/0413-network-net-lib.sh-wait_for_ipv6_dad-simplify-ip-cal.patch @@ -0,0 +1,32 @@ +From a7805d1297645722b1522a48a5588e949e2f3c7c Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 29 Jun 2016 17:18:46 +0200 +Subject: [PATCH] network/net-lib.sh(wait_for_ipv6_dad): simplify ip call + +taken from initscripts +--- + modules.d/40network/net-lib.sh | 6 +----- + 1 file changed, 1 insertion(+), 5 deletions(-) + +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index 9f767144..92154cc6 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -624,16 +624,12 @@ wait_for_ipv6_dad() { + + wait_for_ipv6_auto() { + local cnt=0 +- local li + local timeout="$(getargs rd.net.timeout.ipv6auto=)" + timeout=${timeout:-40} + timeout=$(($timeout*10)) + + while [ $cnt -lt $timeout ]; do +- li=$(ip -6 addr show dev $1) +- if ! strstr "$li" "tentative"; then +- strstr "$li" "dynamic" && return 0 +- fi ++ [ -z "$(ip -6 addr show dev $1 scope global tentative)" ] && return 0 + sleep 0.1 + cnt=$(($cnt+1)) + done diff --git a/SOURCES/0414-systemd-ensure-journal-is-volatile.patch b/SOURCES/0414-systemd-ensure-journal-is-volatile.patch new file mode 100644 index 0000000..e792e42 --- /dev/null +++ b/SOURCES/0414-systemd-ensure-journal-is-volatile.patch @@ -0,0 +1,32 @@ +From 53310e44c9b785641d4889b1dab350b562df5ed9 Mon Sep 17 00:00:00 2001 +From: Michael Chapman <mike@very.puzzling.org> +Date: Wed, 4 May 2016 10:49:56 +1000 +Subject: [PATCH] systemd: ensure journal is volatile + +If journald.conf already contains Storage=persistent, journald will +write to /var/log/journal/, which ends up at /run/initramfs/log/journal/ +after switching root. We want to make sure early boot logs are written +to /run/log/journal/ so they can be flushed to /var/log/journal/ after +switching root. + +(cherry picked from commit 5dea430e087ec7749080547a6a6fe5b152f665ef) +--- + modules.d/98systemd/module-setup.sh | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh +index 64b83a0e..10beadda 100755 +--- a/modules.d/98systemd/module-setup.sh ++++ b/modules.d/98systemd/module-setup.sh +@@ -255,9 +255,10 @@ install() { + + + mkdir -p "$initdir/etc/systemd" +- # turn off RateLimit for journal ++ # We must use a volatile journal, and we don't want rate-limiting + { + echo "[Journal]" ++ echo "Storage=volatile" + echo "RateLimitInterval=0" + echo "RateLimitBurst=0" + } >> "$initdir/etc/systemd/journald.conf" diff --git a/SOURCES/0415-network-dhcp-before-parsing-specified-dns-through-cm.patch b/SOURCES/0415-network-dhcp-before-parsing-specified-dns-through-cm.patch new file mode 100644 index 0000000..dd12cca --- /dev/null +++ b/SOURCES/0415-network-dhcp-before-parsing-specified-dns-through-cm.patch @@ -0,0 +1,87 @@ +From 5bc318633fdf2c5bfea88bf2cf03e5aac2e78a1d Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 29 Jun 2016 17:26:17 +0200 +Subject: [PATCH] network: dhcp before parsing specified dns through cmdline + +I met a problem when passing kdump dns to dracut via "nameserver=x.x.x.x", +the dns I provided didn't appear in the "/etc/resolv.conf". + +After some debugging, found that when setup dhcp DNS, in setup_interface() +and setup_interface6(), it has: + echo "search $search $domain" > /tmp/net.$netif.resolv.conf + +So if "$search $domain" isn't NULL(this is ture in my kdump environment), +the dns contents(that is, dns1, dns2, nameserver) in "ifup" before dhcp +will be discarded. + +This patch addresses it by handling dhcp first. In fact this is also the +way the NetworkManager in 1st kernel works. + +Signed-off-by: Xunlei Pang <xlpang@redhat.com> + +cherry-pick of commit cf376023e6d0d4abd9816fa954bb917fc2557713 +--- + modules.d/40network/ifup.sh | 31 +++++++++++++++---------------- + 1 file changed, 15 insertions(+), 16 deletions(-) + +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index 37f51b9d..19b7bbdc 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -350,16 +350,15 @@ fi + ip=$(getarg ip) + + if [ -z "$ip" ]; then +- for s in $(getargs nameserver); do +- [ -n "$s" ] || continue +- echo nameserver $s >> /tmp/net.$netif.resolv.conf +- done +- + if [ "$netroot" = "dhcp6" ]; then + do_dhcp -6 + else + do_dhcp -4 + fi ++ for s in $(getargs nameserver); do ++ [ -n "$s" ] || continue ++ echo nameserver $s >> /tmp/net.$netif.resolv.conf ++ done + fi + + +@@ -386,17 +385,6 @@ for p in $(getargs ip=); do + [ "$use_bridge" != 'true' ] && \ + [ "$use_vlan" != 'true' ] && continue + +- # setup nameserver +- for s in "$dns1" "$dns2" $(getargs nameserver); do +- [ -n "$s" ] || continue +- echo nameserver $s >> /tmp/net.$netif.resolv.conf +- done +- +- # Store config for later use +- for i in ip srv gw mask hostname macaddr dns1 dns2 mtu; do +- eval '[ "$'$i'" ] && echo '$i'="$'$i'"' +- done > /tmp/net.$netif.override +- + for autoopt in $(str_replace "$autoconf" "," " "); do + case $autoopt in + dhcp|on|any) +@@ -412,6 +400,17 @@ for p in $(getargs ip=); do + done + ret=$? + ++ # setup nameserver ++ for s in "$dns1" "$dns2" $(getargs nameserver); do ++ [ -n "$s" ] || continue ++ echo nameserver $s >> /tmp/net.$netif.resolv.conf ++ done ++ ++ # Store config for later use ++ for i in ip srv gw mask hostname macaddr dns1 dns2 mtu; do ++ eval '[ "$'$i'" ] && echo '$i'="$'$i'"' ++ done > /tmp/net.$netif.override ++ + if [ $ret -eq 0 ]; then + > /tmp/net.${netif}.up + diff --git a/SOURCES/0416-network-net-lib.sh-delete-duplicated-DNS-items-from-.patch b/SOURCES/0416-network-net-lib.sh-delete-duplicated-DNS-items-from-.patch new file mode 100644 index 0000000..5478956 --- /dev/null +++ b/SOURCES/0416-network-net-lib.sh-delete-duplicated-DNS-items-from-.patch @@ -0,0 +1,47 @@ +From a3204225884ba63aee94db345d5c38f1c872d6b7 Mon Sep 17 00:00:00 2001 +From: Xunlei Pang <xlpang@redhat.com> +Date: Tue, 26 Apr 2016 18:05:11 +0800 +Subject: [PATCH] network/net-lib.sh: delete duplicated DNS items from + "/etc/resolv.conf" + +Users can pass the DNS information throught "nameserver=" cmdline, +there maybe duplicated inputs. + +"/etc/resolv.conf" have some restrictions on the number of DNS items +effective, so make sure that this file contains no duplicated items. + +We achieve this by simply making the file have no duplicated lines. + +Signed-off-by: Xunlei Pang <xlpang@redhat.com> +(cherry picked from commit 4fa5c235a76c085f5958002826436ed9c40e5034) +--- + modules.d/40network/module-setup.sh | 2 +- + modules.d/40network/net-lib.sh | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh +index 75ce6224..de353674 100755 +--- a/modules.d/40network/module-setup.sh ++++ b/modules.d/40network/module-setup.sh +@@ -69,7 +69,7 @@ installkernel() { + + install() { + local _arch _i _dir +- inst_multiple ip arping dhclient sed ++ inst_multiple ip arping dhclient sed awk + inst_multiple -o ping ping6 + inst_multiple -o brctl + inst_multiple -o teamd teamdctl teamnl +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index 92154cc6..e6942a55 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -121,7 +121,7 @@ setup_net() { + [ -e /tmp/dhclient.$netif.dhcpopts ] && . /tmp/dhclient.$netif.dhcpopts + # set up resolv.conf + [ -e /tmp/net.$netif.resolv.conf ] && \ +- cp -f /tmp/net.$netif.resolv.conf /etc/resolv.conf ++ awk '!array[$0]++' /tmp/net.$netif.resolv.conf > /etc/resolv.conf + [ -e /tmp/net.$netif.gw ] && . /tmp/net.$netif.gw + + # add static route diff --git a/SOURCES/0417-40network-Update-iBFT-scanning-code-to-handle-IPv6.patch b/SOURCES/0417-40network-Update-iBFT-scanning-code-to-handle-IPv6.patch new file mode 100644 index 0000000..c9c471e --- /dev/null +++ b/SOURCES/0417-40network-Update-iBFT-scanning-code-to-handle-IPv6.patch @@ -0,0 +1,78 @@ +From bac74f05e37b5a4e9a0f2fd5e26c4a8b3546e574 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke <hare@suse.de> +Date: Thu, 12 May 2016 20:03:28 +0200 +Subject: [PATCH] 40network: Update iBFT scanning code to handle IPv6 + +IPv6 addresses should be specified in brackets so that the +ip= scanning code doesn't get confused. + +References: bnc#887542 + +Signed-off-by: Hannes Reinecke <hare@suse.de> +Signed-off-by: Thomas Renninger <trenn@suse.com> +(cherry picked from commit c98d1756f766e49f7b457e217b0e0156d577d8b8) +--- + modules.d/40network/net-lib.sh | 38 ++++++++++++++++++++++++++++++---- + 1 file changed, 34 insertions(+), 4 deletions(-) + +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index e6942a55..98dbbb63 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -235,22 +235,52 @@ ibft_to_cmdline() { + + [ -e /tmp/net.${dev}.has_ibft_config ] && continue + ++ [ -e ${iface}/flags ] && flags=$(read a < ${iface}/flags; echo $a) ++ # Skip invalid interfaces ++ (( $flags & 1 )) || continue ++ # Skip interfaces not used for booting ++ (( $flags & 2 )) || continue + [ -e ${iface}/dhcp ] && dhcp=$(read a < ${iface}/dhcp; echo $a) +- +- if [ -n "$dhcp" ]; then +- echo "ip=$dev:dhcp" ++ [ -e ${iface}/origin ] && origin=$(read a < ${iface}/origin; echo $a) ++ [ -e ${iface}/ip-addr ] && ip=$(read a < ${iface}/ip-addr; echo $a) ++ ++ if [ -n "$ip" ] ; then ++ case "$ip" in ++ *.*.*.*) ++ family=ipv4 ++ ;; ++ *:*) ++ family=ipv6 ++ ;; ++ esac ++ fi ++ if [ -n "$dhcp" ] || [ "$origin" -eq 3 ]; then ++ if [ "$family" = "ipv6" ] ; then ++ echo "ip=$dev:dhcp6" ++ else ++ echo "ip=$dev:dhcp" ++ fi + elif [ -e ${iface}/ip-addr ]; then +- [ -e ${iface}/ip-addr ] && ip=$(read a < ${iface}/ip-addr; echo $a) + # skip not assigned ip adresses + [ "$ip" = "0.0.0.0" ] && continue + [ -e ${iface}/gateway ] && gw=$(read a < ${iface}/gateway; echo $a) + [ "$gateway" = "0.0.0.0" ] && unset $gateway + [ -e ${iface}/subnet-mask ] && mask=$(read a < ${iface}/subnet-mask; echo $a) ++ [ -e ${iface}/prefix-len ] && prefix=$(read a < ${iface}/prefix-len; echo $a) + [ -e ${iface}/primary-dns ] && dns1=$(read a < ${iface}/primary-dns; echo $a) + [ "$dns1" = "0.0.0.0" ] && unset $dns1 + [ -e ${iface}/secondary-dns ] && dns2=$(read a < ${iface}/secondary-dns; echo $a) + [ "$dns2" = "0.0.0.0" ] && unset $dns2 + [ -e ${iface}/hostname ] && hostname=$(read a < ${iface}/hostname; echo $a) ++ if [ "$family" = "ipv6" ] ; then ++ if [ -n "$ip" ] ; then ++ [ -n "$prefix" ] || prefix=64 ++ mask="$prefix" ++ fi ++ if [ -n "$gw" ] ; then ++ gw="[${gw}]" ++ fi ++ fi + if [ -n "$ip" ] && [ -n "$mask" ]; then + echo "ip=$ip::$gw:$mask:$hostname:$dev:none${dns1:+:$dns1}${dns2:+:$dns2}" + else diff --git a/SOURCES/0418-network-net-lib.sh-auto6-wait-for-route-ra.patch b/SOURCES/0418-network-net-lib.sh-auto6-wait-for-route-ra.patch new file mode 100644 index 0000000..ff8b39c --- /dev/null +++ b/SOURCES/0418-network-net-lib.sh-auto6-wait-for-route-ra.patch @@ -0,0 +1,25 @@ +From 6d22a6860ea22d4b5a78d0328be4524579cece98 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 30 Jun 2016 08:52:09 +0200 +Subject: [PATCH] network/net-lib.sh: auto6 wait for route ra + +Wait for a router advertised route +--- + modules.d/40network/net-lib.sh | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index 98dbbb63..b248133d 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -659,7 +659,9 @@ wait_for_ipv6_auto() { + timeout=$(($timeout*10)) + + while [ $cnt -lt $timeout ]; do +- [ -z "$(ip -6 addr show dev $1 scope global tentative)" ] && return 0 ++ [ -z "$(ip -6 addr show dev "$1" scope global tentative)" ] \ ++ && [ -n "$(ip -6 route list proto ra dev "$1")" ] \ ++ && return 0 + sleep 0.1 + cnt=$(($cnt+1)) + done diff --git a/SOURCES/0419-network-differ-between-ipv6-local-and-global-tentati.patch b/SOURCES/0419-network-differ-between-ipv6-local-and-global-tentati.patch new file mode 100644 index 0000000..a70938d --- /dev/null +++ b/SOURCES/0419-network-differ-between-ipv6-local-and-global-tentati.patch @@ -0,0 +1,66 @@ +From 42dd8928a81ba5ec244a5634813285ab6f342480 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 30 Jun 2016 11:10:35 +0200 +Subject: [PATCH] network: differ between ipv6 local and global tentative + +For dhcpv6, only a non-tentative scope local address is needed. +--- + modules.d/40network/dhclient-script.sh | 2 +- + modules.d/40network/net-lib.sh | 24 +++++++++++++++++++++--- + 2 files changed, 22 insertions(+), 4 deletions(-) + +diff --git a/modules.d/40network/dhclient-script.sh b/modules.d/40network/dhclient-script.sh +index 95538585..f6c77f2f 100755 +--- a/modules.d/40network/dhclient-script.sh ++++ b/modules.d/40network/dhclient-script.sh +@@ -149,7 +149,7 @@ case $reason in + PREINIT6) + echo "dhcp: PREINIT6 $netif up" + linkup $netif +- wait_for_ipv6_dad $netif ++ wait_for_ipv6_dad_link $netif + ;; + + BOUND) +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index b248133d..986c673c 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -636,16 +636,34 @@ wait_for_route_ok() { + return 1 + } + ++wait_for_ipv6_dad_link() { ++ local cnt=0 ++ local timeout="$(getargs rd.net.timeout.ipv6dad=)" ++ timeout=${timeout:-50} ++ timeout=$(($timeout*10)) ++ ++ while [ $cnt -lt $timeout ]; do ++ [ -z "$(ip -6 addr show dev "$1" scope link tentative)" ] \ ++ && return 0 ++ [ -n "$(ip -6 addr show dev "$1" scope link dadfailed)" ] \ ++ && return 1 ++ sleep 0.1 ++ cnt=$(($cnt+1)) ++ done ++ return 1 ++} ++ + wait_for_ipv6_dad() { + local cnt=0 +- local li + local timeout="$(getargs rd.net.timeout.ipv6dad=)" + timeout=${timeout:-50} + timeout=$(($timeout*10)) + + while [ $cnt -lt $timeout ]; do +- li=$(ip -6 addr show dev $1 scope link) +- strstr "$li" "tentative" || return 0 ++ [ -z "$(ip -6 addr show dev "$1" tentative)" ] \ ++ && return 0 ++ [ -n "$(ip -6 addr show dev "$1" dadfailed)" ] \ ++ && return 1 + sleep 0.1 + cnt=$(($cnt+1)) + done diff --git a/SOURCES/0420-network-flush-only-IPv4-addresses-on-configuration.patch b/SOURCES/0420-network-flush-only-IPv4-addresses-on-configuration.patch new file mode 100644 index 0000000..25b8cce --- /dev/null +++ b/SOURCES/0420-network-flush-only-IPv4-addresses-on-configuration.patch @@ -0,0 +1,31 @@ +From cc3f588071c35821b55e1db2201b0650df688dcc Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 30 Jun 2016 11:11:37 +0200 +Subject: [PATCH] network: flush only IPv4 addresses on configuration + +also flush on dhcp +--- + modules.d/40network/ifup.sh | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index 19b7bbdc..cedf9a77 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -112,6 +112,7 @@ do_dhcp() { + + [ -n "$macaddr" ] && ip link set address $macaddr dev $netif + [ -n "$mtu" ] && ip link set mtu $mtu dev $netif ++ ip -4 addr flush dev $netif + + while [ $_COUNT -lt $_DHCPRETRY ]; do + info "Starting dhcp for interface $netif" +@@ -188,7 +189,7 @@ do_static() { + warn "Duplicate address detected for $ip for interface $netif." + return 1 + fi +- ip addr flush dev $netif ++ ip -4 addr flush dev $netif + ip addr add $ip/$mask ${srv:+peer $srv} brd + dev $netif + fi + diff --git a/SOURCES/0421-network-wait_for_ipv6_auto-wait-for-all-tentative-ad.patch b/SOURCES/0421-network-wait_for_ipv6_auto-wait-for-all-tentative-ad.patch new file mode 100644 index 0000000..5375739 --- /dev/null +++ b/SOURCES/0421-network-wait_for_ipv6_auto-wait-for-all-tentative-ad.patch @@ -0,0 +1,22 @@ +From 13264563a9471844102113b7062534466d20ce38 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 30 Jun 2016 12:15:56 +0200 +Subject: [PATCH] network:wait_for_ipv6_auto() wait for all tentative addresses + +--- + modules.d/40network/net-lib.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index 986c673c..71201938 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -677,7 +677,7 @@ wait_for_ipv6_auto() { + timeout=$(($timeout*10)) + + while [ $cnt -lt $timeout ]; do +- [ -z "$(ip -6 addr show dev "$1" scope global tentative)" ] \ ++ [ -z "$(ip -6 addr show dev "$1" tentative)" ] \ + && [ -n "$(ip -6 route list proto ra dev "$1")" ] \ + && return 0 + sleep 0.1 diff --git a/SOURCES/0422-dracut-systemd-dracut-cmdline.sh-Don-t-error-out-if-.patch b/SOURCES/0422-dracut-systemd-dracut-cmdline.sh-Don-t-error-out-if-.patch new file mode 100644 index 0000000..d91087f --- /dev/null +++ b/SOURCES/0422-dracut-systemd-dracut-cmdline.sh-Don-t-error-out-if-.patch @@ -0,0 +1,56 @@ +From 9aa224cc19989807b6e34b72af01e0a12072940c Mon Sep 17 00:00:00 2001 +From: Alexander Kurtz <alexander@kurtz.be> +Date: Fri, 6 May 2016 17:25:37 +0200 +Subject: [PATCH] dracut-systemd/dracut-cmdline.sh: Don't error out if there is + no root= argument. + +Thanks to systemd's gpt-auto-generator [0] (which implements the Discoverable +Partitions Specification [1]), it is no longer necessary to always specify the +root= argument. + +However, dracut would still refuse to boot if there was no root= argument (or +if it was set to the special value "gpt-auto" [2]). This commit stops dracut +from aborting the boot process in these cases and simply lets systemd do its +magic. + +[0] https://github.com/systemd/systemd/blob/v229/src/gpt-auto-generator +[1] https://www.freedesktop.org/wiki/Specifications/DiscoverablePartitionsSpec/ +[2] https://github.com/systemd/systemd/blob/v229/src/gpt-auto-generator/gpt-auto-generator.c#L928 + +(cherry picked from commit 016613c774baf3d30c6425a65ead05d8b55d6279) +--- + modules.d/98systemd/dracut-cmdline.sh | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) + +diff --git a/modules.d/98systemd/dracut-cmdline.sh b/modules.d/98systemd/dracut-cmdline.sh +index 9d15663e..d22e4d6e 100755 +--- a/modules.d/98systemd/dracut-cmdline.sh ++++ b/modules.d/98systemd/dracut-cmdline.sh +@@ -22,7 +22,12 @@ getargbool 0 rd.udev.log-priority=debug -d rd.udev.debug -d -n -y rdudevdebug && + + source_conf /etc/conf.d + +-root=$(getarg root=) ++# Get the "root=" parameter from the kernel command line, but differentiate ++# between the case where it was set to the empty string and the case where it ++# wasn't specified at all. ++if ! root="$(getarg root=)"; then ++ root='UNSET' ++fi + + rflags="$(getarg rootflags=)" + getargbool 0 ro && rflags="${rflags},ro" +@@ -66,9 +71,12 @@ case "$root" in + /dev/*) + root="block:${root}" + rootok=1 ;; ++ UNSET|gpt-auto) ++ # systemd's gpt-auto-generator handles this case. ++ rootok=1 ;; + esac + +-[ -z "$root" ] && die "No or empty root= argument" ++[ -z "$root" ] && die "Empty root= argument" + [ -z "$rootok" ] && die "Don't know how to handle 'root=$root'" + + export root rflags fstype netroot NEWROOT diff --git a/SOURCES/0423-virtfs-use-systemd-generator.patch b/SOURCES/0423-virtfs-use-systemd-generator.patch new file mode 100644 index 0000000..0285b06 --- /dev/null +++ b/SOURCES/0423-virtfs-use-systemd-generator.patch @@ -0,0 +1,87 @@ +From ca64eeec79c93b89aea51b3f26d9539db5cf2a65 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 30 Jun 2016 15:22:47 +0200 +Subject: [PATCH] virtfs: use systemd generator + +use a systemd generator, instead of a dracut hook to mount +--- + modules.d/95virtfs/module-setup.sh | 7 ++++- + modules.d/95virtfs/parse-virtfs.sh | 2 +- + modules.d/95virtfs/virtfs-generator.sh | 39 ++++++++++++++++++++++++++ + 3 files changed, 46 insertions(+), 2 deletions(-) + create mode 100755 modules.d/95virtfs/virtfs-generator.sh + +diff --git a/modules.d/95virtfs/module-setup.sh b/modules.d/95virtfs/module-setup.sh +index 12bd354b..3d80b75f 100755 +--- a/modules.d/95virtfs/module-setup.sh ++++ b/modules.d/95virtfs/module-setup.sh +@@ -37,5 +37,10 @@ installkernel() { + + install() { + inst_hook cmdline 95 "$moddir/parse-virtfs.sh" +- inst_hook mount 99 "$moddir/mount-virtfs.sh" ++ ++ if ! dracut_module_included "systemd"; then ++ inst_hook mount 99 "$moddir/mount-virtfs.sh" ++ else ++ inst_script "$moddir/virtfs-generator.sh" $systemdutildir/system-generators/dracut-virtfs-generator ++ fi + } +diff --git a/modules.d/95virtfs/parse-virtfs.sh b/modules.d/95virtfs/parse-virtfs.sh +index ce6de6d4..a9ad48a9 100755 +--- a/modules.d/95virtfs/parse-virtfs.sh ++++ b/modules.d/95virtfs/parse-virtfs.sh +@@ -3,7 +3,7 @@ + # ex: ts=8 sw=4 sts=4 et filetype=sh + + if [ "${root%%:*}" = "virtfs" ] ; then +- modprobe 9pnet_virtio ++ initqueue --onetime modprobe -b -q 9pnet_virtio + + rootok=1 + fi +diff --git a/modules.d/95virtfs/virtfs-generator.sh b/modules.d/95virtfs/virtfs-generator.sh +new file mode 100755 +index 00000000..3bdddf11 +--- /dev/null ++++ b/modules.d/95virtfs/virtfs-generator.sh +@@ -0,0 +1,39 @@ ++#!/bin/sh ++# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- ++# ex: ts=8 sw=4 sts=4 et filetype=sh ++ ++type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh ++ ++[ -z "$root" ] && root=$(getarg root=) ++ ++[ "${root%%:*}" = "virtfs" ] || exit 0 ++ ++GENERATOR_DIR="$2" ++[ -z "$GENERATOR_DIR" ] && exit 1 ++ ++[ -d "$GENERATOR_DIR" ] || mkdir "$GENERATOR_DIR" ++ ++ROOTFLAGS=$(getarg rootflags=) || ROOTFLAGS="trans=virtio,version=9p2000.L" ++ROOTFSTYPE=$(getarg rootfstype=) || ROOTFSTYPE="9p" ++ ++root=${root#virtfs:} ++ ++if getarg "ro"; then ++ if [ -n "$ROOTFLAGS" ]; then ++ ROOTFLAGS="$ROOTFLAGS,ro" ++ else ++ ROOTFLAGS="ro" ++ fi ++fi ++ ++{ ++ echo "[Unit]" ++ echo "Before=initrd-root-fs.target" ++ echo "[Mount]" ++ echo "Where=/sysroot" ++ echo "What=${root}" ++ [ -n "$ROOTFSTYPE" ] && echo "Type=${ROOTFSTYPE}" ++ [ -n "$ROOTFLAGS" ] && echo "Options=${ROOTFLAGS}" ++} > "$GENERATOR_DIR"/sysroot.mount ++ ++exit 0 diff --git a/SOURCES/0424-add-rd.device.timeout-seconds-parameter.patch b/SOURCES/0424-add-rd.device.timeout-seconds-parameter.patch new file mode 100644 index 0000000..c464b5f --- /dev/null +++ b/SOURCES/0424-add-rd.device.timeout-seconds-parameter.patch @@ -0,0 +1,60 @@ +From ca46c751d1becbbff68c561bfbc9ee36182fcc38 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 30 Jun 2016 15:24:54 +0200 +Subject: [PATCH] add rd.device.timeout=<seconds> parameter + +--- + modules.d/98systemd/rootfs-generator.sh | 4 +++- + modules.d/99base/dracut-lib.sh | 4 +++- + 2 files changed, 6 insertions(+), 2 deletions(-) + +diff --git a/modules.d/98systemd/rootfs-generator.sh b/modules.d/98systemd/rootfs-generator.sh +index 2c098951..a7bffdfd 100755 +--- a/modules.d/98systemd/rootfs-generator.sh ++++ b/modules.d/98systemd/rootfs-generator.sh +@@ -7,6 +7,7 @@ type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh + generator_wait_for_dev() + { + local _name ++ local _timeout + + _name="$(str_replace "$1" '/' '\x2f')" + +@@ -26,10 +27,11 @@ generator_wait_for_dev() + fi + + if ! [ -f /run/systemd/generator/${_name}.device.d/timeout.conf ]; then ++ _timeout=$(getarg rd.device.timeout || printf "0") + mkdir -p /run/systemd/generator/${_name}.device.d + { + echo "[Unit]" +- echo "JobTimeoutSec=0" ++ echo "JobTimeoutSec=$_timeout" + } > /run/systemd/generator/${_name}.device.d/timeout.conf + fi + } +diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh +index c2b6108a..16bc74d4 100755 +--- a/modules.d/99base/dracut-lib.sh ++++ b/modules.d/99base/dracut-lib.sh +@@ -887,6 +887,7 @@ wait_for_dev() + local _name + local _needreload + local _noreload ++ local _timeout + + if [ "$1" = "-n" ]; then + _noreload=1 +@@ -913,10 +914,11 @@ wait_for_dev() + fi + + if ! [ -f ${PREFIX}/etc/systemd/system/${_name}.device.d/timeout.conf ]; then ++ _timeout=$(getarg rd.device.timeout || printf "0") + mkdir -p ${PREFIX}/etc/systemd/system/${_name}.device.d + { + echo "[Unit]" +- echo "JobTimeoutSec=0" ++ echo "JobTimeoutSec=$_timeout" + } > ${PREFIX}/etc/systemd/system/${_name}.device.d/timeout.conf + _needreload=1 + fi diff --git a/SOURCES/0425-test-TEST-04-systemd-fixup-test.patch b/SOURCES/0425-test-TEST-04-systemd-fixup-test.patch new file mode 100644 index 0000000..a19b0d0 --- /dev/null +++ b/SOURCES/0425-test-TEST-04-systemd-fixup-test.patch @@ -0,0 +1,81 @@ +From 22a907b38342fc5380236b2483424bcc38de1bd0 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 30 Jun 2016 15:25:54 +0200 +Subject: [PATCH] test/TEST-04-systemd: fixup test + +- fix find -perm +- add failme test cases +- remove journal output +--- + test/TEST-04-FULL-SYSTEMD/test-init.sh | 2 +- + test/TEST-04-FULL-SYSTEMD/test.sh | 16 +++++++++------- + 2 files changed, 10 insertions(+), 8 deletions(-) + +diff --git a/test/TEST-04-FULL-SYSTEMD/test-init.sh b/test/TEST-04-FULL-SYSTEMD/test-init.sh +index dcda926a..288ae487 100755 +--- a/test/TEST-04-FULL-SYSTEMD/test-init.sh ++++ b/test/TEST-04-FULL-SYSTEMD/test-init.sh +@@ -19,7 +19,7 @@ if ismounted /usr && [ ! -s /failed ]; then + echo "dracut-root-block-success" >/dev/sdc + fi + +-journalctl --full --no-pager -o short-monotonic ++#journalctl --full --no-pager -o short-monotonic + + if [ -s /failed ]; then + echo "**************************FAILED**************************" +diff --git a/test/TEST-04-FULL-SYSTEMD/test.sh b/test/TEST-04-FULL-SYSTEMD/test.sh +index 01b406d0..93c33890 100755 +--- a/test/TEST-04-FULL-SYSTEMD/test.sh ++++ b/test/TEST-04-FULL-SYSTEMD/test.sh +@@ -22,7 +22,7 @@ client_run() { + -hdc $TESTDIR/result \ + -m 256M -smp 2 -nographic \ + -net none \ +- -append "root=LABEL=dracut $client_opts rd.retry=3 console=ttyS0,115200n81 selinux=0 $DEBUGOUT $DEBUGFAIL" \ ++ -append "$client_opts rd.device.timeout=20 rd.retry=3 console=ttyS0,115200n81 selinux=0 $DEBUGOUT $DEBUGFAIL" \ + -initrd $TESTDIR/initramfs.testing + + if (($? != 0)); then +@@ -39,9 +39,11 @@ client_run() { + } + + test_run() { +- client_run "no option specified" || return 1 +- client_run "readonly root" "ro" || return 1 +- client_run "writeable root" "rw" || return 1 ++ client_run "no root specified (failme)" "failme" && return 1 ++ client_run "wrong root specified (failme)" "root=LABEL=dracut1" "failme" && return 1 ++ client_run "no option specified" "root=LABEL=dracut" || return 1 ++ client_run "readonly root" "root=LABEL=dracut" "ro" || return 1 ++ client_run "writeable root" "root=LABEL=dracut" "rw" || return 1 + return 0 + } + +@@ -70,7 +72,7 @@ test_setup() { + ln -sfn /run "$initdir/var/run" + ln -sfn /run/lock "$initdir/var/lock" + +- inst_multiple sh df free ls shutdown poweroff stty cat ps ln ip route \ ++ inst_multiple -o sh df free ls shutdown poweroff stty cat ps ln ip route \ + mount dmesg ifconfig dhclient mkdir cp ping dhclient \ + umount strace less setsid tree systemctl reset + +@@ -163,7 +165,7 @@ EOF + /etc/security \ + /lib64/security \ + /lib/security -xtype f \ +- | while read file; do ++ 2>/dev/null | while read file; do + inst_multiple -o $file + done + +@@ -204,7 +206,7 @@ EOF + cp -a /etc/ld.so.conf* $initdir/etc + ldconfig -r "$initdir" + ddebug "Strip binaeries" +- find "$initdir" -perm +111 -type f | xargs -r strip --strip-unneeded | ddebug ++ find "$initdir" -perm /111 -type f | xargs -r strip --strip-unneeded | ddebug + + # copy depmod files + inst /lib/modules/$kernel/modules.order diff --git a/SOURCES/0426-test-TEST-12-RAID-DEG-add-rd.device.timeout.patch b/SOURCES/0426-test-TEST-12-RAID-DEG-add-rd.device.timeout.patch new file mode 100644 index 0000000..6582917 --- /dev/null +++ b/SOURCES/0426-test-TEST-12-RAID-DEG-add-rd.device.timeout.patch @@ -0,0 +1,41 @@ +From 6efee60f93ed8456ba93f72dd5d0443380a317f0 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 30 Jun 2016 15:27:04 +0200 +Subject: [PATCH] test/TEST-12-RAID-DEG: add rd.device.timeout + +--- + test/TEST-12-RAID-DEG/test.sh | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +diff --git a/test/TEST-12-RAID-DEG/test.sh b/test/TEST-12-RAID-DEG/test.sh +index e749ba0c..5f9cfc56 100755 +--- a/test/TEST-12-RAID-DEG/test.sh ++++ b/test/TEST-12-RAID-DEG/test.sh +@@ -36,19 +36,19 @@ test_run() { + echo "MD_UUID=$MD_UUID" + read LUKS_UUID < $TESTDIR/luksuuid + +- client_run failme && return 1 +- client_run rd.auto || return 1 ++ client_run rd.device.timeout=60 failme && return 1 ++ client_run rd.device.timeout=60 rd.auto || return 1 + + +- client_run rd.luks.uuid=$LUKS_UUID rd.md.uuid=$MD_UUID rd.md.conf=0 rd.lvm.vg=dracut || return 1 ++ client_run rd.device.timeout=60 rd.luks.uuid=$LUKS_UUID rd.md.uuid=$MD_UUID rd.md.conf=0 rd.lvm.vg=dracut || return 1 + +- client_run rd.luks.uuid=$LUKS_UUID rd.md.uuid=failme rd.md.conf=0 rd.lvm.vg=dracut failme && return 1 ++ client_run rd.device.timeout=60 rd.luks.uuid=$LUKS_UUID rd.md.uuid=failme rd.md.conf=0 rd.lvm.vg=dracut failme && return 1 + +- client_run rd.luks.uuid=$LUKS_UUID rd.md.uuid=$MD_UUID rd.lvm=0 failme && return 1 +- client_run rd.luks.uuid=$LUKS_UUID rd.md.uuid=$MD_UUID rd.lvm=0 rd.auto=1 failme && return 1 +- client_run rd.luks.uuid=$LUKS_UUID rd.md.uuid=$MD_UUID rd.lvm.vg=failme failme && return 1 ++ client_run rd.device.timeout=60 rd.luks.uuid=$LUKS_UUID rd.md.uuid=$MD_UUID rd.lvm=0 failme && return 1 ++ client_run rd.device.timeout=60 rd.luks.uuid=$LUKS_UUID rd.md.uuid=$MD_UUID rd.lvm=0 rd.auto=1 failme && return 1 ++ client_run rd.device.timeout=60 rd.luks.uuid=$LUKS_UUID rd.md.uuid=$MD_UUID rd.lvm.vg=failme failme && return 1 + client_run rd.luks.uuid=$LUKS_UUID rd.md.uuid=$MD_UUID rd.lvm.vg=dracut || return 1 +- client_run rd.luks.uuid=$LUKS_UUID rd.md.uuid=$MD_UUID rd.lvm.lv=dracut/failme failme && return 1 ++ client_run rd.device.timeout=60 rd.luks.uuid=$LUKS_UUID rd.md.uuid=$MD_UUID rd.lvm.lv=dracut/failme failme && return 1 + client_run rd.luks.uuid=$LUKS_UUID rd.md.uuid=$MD_UUID rd.lvm.lv=dracut/root || return 1 + + return 0 diff --git a/SOURCES/0427-99base-init.sh-break-the-initqueue-if-emergency-shel.patch b/SOURCES/0427-99base-init.sh-break-the-initqueue-if-emergency-shel.patch new file mode 100644 index 0000000..760520d --- /dev/null +++ b/SOURCES/0427-99base-init.sh-break-the-initqueue-if-emergency-shel.patch @@ -0,0 +1,24 @@ +From a95fe14581ff39fb4354dac5782a25d578dcc972 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 30 Jun 2016 16:32:44 +0200 +Subject: [PATCH] 99base/init.sh: break the initqueue, if emergency shell was + successful + +--- + modules.d/99base/init.sh | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh +index a07d0f94..7bbe6703 100755 +--- a/modules.d/99base/init.sh ++++ b/modules.d/99base/init.sh +@@ -214,7 +214,8 @@ while :; do + + main_loop=$(($main_loop+1)) + [ $main_loop -gt $RDRETRY ] \ +- && { flock -s 9 ; action_on_fail "Could not boot." && break; } 9>/.console_lock ++ && { flock -s 9 ; action_on_fail "Could not boot."; } 9>/.console_lock \ ++ && break + done + unset job + unset queuetriggered diff --git a/SOURCES/0428-systemd-dracut-initqueue.sh-don-t-go-into-emergency.patch b/SOURCES/0428-systemd-dracut-initqueue.sh-don-t-go-into-emergency.patch new file mode 100644 index 0000000..0eef9a9 --- /dev/null +++ b/SOURCES/0428-systemd-dracut-initqueue.sh-don-t-go-into-emergency.patch @@ -0,0 +1,27 @@ +From 4c5f1b3b4a3b303b3eb19b0a16122b4fc552e089 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 30 Jun 2016 16:33:18 +0200 +Subject: [PATCH] systemd/dracut-initqueue.sh: don't go into emergency + +let systemd go into emergency.target later on +--- + modules.d/98systemd/dracut-initqueue.sh | 6 +----- + 1 file changed, 1 insertion(+), 5 deletions(-) + +diff --git a/modules.d/98systemd/dracut-initqueue.sh b/modules.d/98systemd/dracut-initqueue.sh +index 5822556b..c12531e2 100755 +--- a/modules.d/98systemd/dracut-initqueue.sh ++++ b/modules.d/98systemd/dracut-initqueue.sh +@@ -68,11 +68,7 @@ while :; do + + main_loop=$(($main_loop+1)) + if [ $main_loop -gt $RDRETRY ]; then +- if ! [ -f /sysroot/etc/fstab ] || ! [ -e /sysroot/sbin/init ] ; then +- action_on_fail "Could not boot." && break +- fi +- warn "Not all disks have been found." +- warn "You might want to regenerate your initramfs." ++ # let systemd go into emergency mode, if it cannot boot + break + fi + done diff --git a/SOURCES/0429-systemd-let-booting-work-after-exiting-emergency.patch b/SOURCES/0429-systemd-let-booting-work-after-exiting-emergency.patch new file mode 100644 index 0000000..a452f82 --- /dev/null +++ b/SOURCES/0429-systemd-let-booting-work-after-exiting-emergency.patch @@ -0,0 +1,159 @@ +From fd8506b5da5e81736f408bc3c4c801544a38899e Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 30 Jun 2016 16:34:06 +0200 +Subject: [PATCH] systemd: let booting work after exiting emergency + +If the user managed to mount /sysroot, let it work +--- + modules.d/98systemd/dracut-cmdline-ask.service | 1 - + modules.d/98systemd/dracut-cmdline.service | 1 - + modules.d/98systemd/dracut-emergency.service | 2 -- + modules.d/98systemd/dracut-initqueue.service | 1 - + modules.d/98systemd/dracut-mount.service | 1 - + modules.d/98systemd/dracut-pre-mount.service | 1 - + modules.d/98systemd/dracut-pre-pivot.service | 1 - + modules.d/98systemd/dracut-pre-trigger.service | 1 - + modules.d/98systemd/dracut-pre-udev.service | 1 - + modules.d/98systemd/emergency.service | 7 +++---- + 10 files changed, 3 insertions(+), 14 deletions(-) + +diff --git a/modules.d/98systemd/dracut-cmdline-ask.service b/modules.d/98systemd/dracut-cmdline-ask.service +index 3d489a4e..f9dd3790 100644 +--- a/modules.d/98systemd/dracut-cmdline-ask.service ++++ b/modules.d/98systemd/dracut-cmdline-ask.service +@@ -16,7 +16,6 @@ Wants=systemd-journald.socket + ConditionPathExists=/etc/initrd-release + ConditionKernelCommandLine=rd.cmdline=ask + Conflicts=shutdown.target emergency.target +-Before=shutdown.target emergency.target + + [Service] + Environment=DRACUT_SYSTEMD=1 +diff --git a/modules.d/98systemd/dracut-cmdline.service b/modules.d/98systemd/dracut-cmdline.service +index 7f0835b4..e4797ca3 100644 +--- a/modules.d/98systemd/dracut-cmdline.service ++++ b/modules.d/98systemd/dracut-cmdline.service +@@ -21,7 +21,6 @@ ConditionKernelCommandLine=|rd.break=cmdline + ConditionKernelCommandLine=|resume + ConditionKernelCommandLine=|noresume + Conflicts=shutdown.target emergency.target +-Before=shutdown.target emergency.target + + [Service] + Environment=DRACUT_SYSTEMD=1 +diff --git a/modules.d/98systemd/dracut-emergency.service b/modules.d/98systemd/dracut-emergency.service +index 5c014110..183f3af5 100644 +--- a/modules.d/98systemd/dracut-emergency.service ++++ b/modules.d/98systemd/dracut-emergency.service +@@ -12,10 +12,8 @@ Description=Dracut Emergency Shell + DefaultDependencies=no + After=systemd-vconsole-setup.service + Wants=systemd-vconsole-setup.service +-Conflicts=emergency.service emergency.target + ConditionPathExists=!/lib/dracut/no-emergency-shell + Conflicts=shutdown.target emergency.target +-Before=shutdown.target emergency.target + + [Service] + Environment=HOME=/ +diff --git a/modules.d/98systemd/dracut-initqueue.service b/modules.d/98systemd/dracut-initqueue.service +index 6340dd4d..46d041e8 100644 +--- a/modules.d/98systemd/dracut-initqueue.service ++++ b/modules.d/98systemd/dracut-initqueue.service +@@ -24,7 +24,6 @@ ConditionPathExistsGlob=|/lib/dracut/hooks/initqueue/online/*.sh + ConditionPathExistsGlob=|/lib/dracut/hooks/initqueue/timeout/*.sh + ConditionKernelCommandLine=|rd.break=initqueue + Conflicts=shutdown.target emergency.target +-Before=shutdown.target emergency.target + + [Service] + Environment=DRACUT_SYSTEMD=1 +diff --git a/modules.d/98systemd/dracut-mount.service b/modules.d/98systemd/dracut-mount.service +index 2e1e47b9..e8e33fbb 100644 +--- a/modules.d/98systemd/dracut-mount.service ++++ b/modules.d/98systemd/dracut-mount.service +@@ -16,7 +16,6 @@ ConditionPathExists=/etc/initrd-release + ConditionDirectoryNotEmpty=|/lib/dracut/hooks/mount + ConditionKernelCommandLine=|rd.break=mount + Conflicts=shutdown.target emergency.target +-Before=shutdown.target emergency.target + + [Service] + Environment=DRACUT_SYSTEMD=1 +diff --git a/modules.d/98systemd/dracut-pre-mount.service b/modules.d/98systemd/dracut-pre-mount.service +index ed67f9df..48c9b400 100644 +--- a/modules.d/98systemd/dracut-pre-mount.service ++++ b/modules.d/98systemd/dracut-pre-mount.service +@@ -18,7 +18,6 @@ ConditionPathExists=/etc/initrd-release + ConditionDirectoryNotEmpty=|/lib/dracut/hooks/pre-mount + ConditionKernelCommandLine=|rd.break=pre-mount + Conflicts=shutdown.target emergency.target +-Before=shutdown.target emergency.target + + [Service] + Environment=DRACUT_SYSTEMD=1 +diff --git a/modules.d/98systemd/dracut-pre-pivot.service b/modules.d/98systemd/dracut-pre-pivot.service +index 1faeb78b..ae1f155d 100644 +--- a/modules.d/98systemd/dracut-pre-pivot.service ++++ b/modules.d/98systemd/dracut-pre-pivot.service +@@ -17,7 +17,6 @@ Wants=remote-fs.target + After=remote-fs.target + ConditionPathExists=/etc/initrd-release + Conflicts=shutdown.target emergency.target +-Before=shutdown.target emergency.target + + [Service] + Environment=DRACUT_SYSTEMD=1 +diff --git a/modules.d/98systemd/dracut-pre-trigger.service b/modules.d/98systemd/dracut-pre-trigger.service +index f1980368..5657450e 100644 +--- a/modules.d/98systemd/dracut-pre-trigger.service ++++ b/modules.d/98systemd/dracut-pre-trigger.service +@@ -18,7 +18,6 @@ ConditionPathExists=/etc/initrd-release + ConditionDirectoryNotEmpty=|/lib/dracut/hooks/pre-trigger + ConditionKernelCommandLine=|rd.break=pre-trigger + Conflicts=shutdown.target emergency.target +-Before=shutdown.target emergency.target + + [Service] + Environment=DRACUT_SYSTEMD=1 +diff --git a/modules.d/98systemd/dracut-pre-udev.service b/modules.d/98systemd/dracut-pre-udev.service +index 7fb33044..a554eb79 100644 +--- a/modules.d/98systemd/dracut-pre-udev.service ++++ b/modules.d/98systemd/dracut-pre-udev.service +@@ -21,7 +21,6 @@ ConditionKernelCommandLine=|rd.driver.blacklist + ConditionKernelCommandLine=|rd.driver.pre + ConditionKernelCommandLine=|rd.driver.post + Conflicts=shutdown.target emergency.target +-Before=shutdown.target emergency.target + + [Service] + Environment=DRACUT_SYSTEMD=1 +diff --git a/modules.d/98systemd/emergency.service b/modules.d/98systemd/emergency.service +index 5c2c1c70..5da3aa31 100644 +--- a/modules.d/98systemd/emergency.service ++++ b/modules.d/98systemd/emergency.service +@@ -14,21 +14,20 @@ After=systemd-vconsole-setup.service + Wants=systemd-vconsole-setup.service + ConditionPathExists=!/lib/dracut/no-emergency-shell + Conflicts=shutdown.target +-Before=shutdown.target + + [Service] + Environment=HOME=/ + Environment=DRACUT_SYSTEMD=1 + Environment=NEWROOT=/sysroot + WorkingDirectory=/ +-ExecStart=/bin/dracut-emergency +-ExecStopPost=-/usr/bin/systemctl --fail --no-block default +-Type=oneshot ++ExecStart=-/bin/dracut-emergency ++ExecStopPost=-/usr/bin/systemctl --no-block isolate default.target + StandardInput=tty-force + StandardOutput=inherit + StandardError=inherit + KillMode=process + IgnoreSIGPIPE=no ++TimeoutStartSec=0 + + # Bash ignores SIGTERM, so we send SIGHUP instead, to ensure that bash + # terminates cleanly. diff --git a/SOURCES/0430-TEST-13-ENC-RAID-LVM-add-rd.device.timeout-40.patch b/SOURCES/0430-TEST-13-ENC-RAID-LVM-add-rd.device.timeout-40.patch new file mode 100644 index 0000000..1239e11 --- /dev/null +++ b/SOURCES/0430-TEST-13-ENC-RAID-LVM-add-rd.device.timeout-40.patch @@ -0,0 +1,40 @@ +From 271a64bfd115897f5c89d18b9a58ed0ecf401866 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 30 Jun 2016 16:36:29 +0200 +Subject: [PATCH] TEST-13-ENC-RAID-LVM: add rd.device.timeout=40 + +--- + test/TEST-13-ENC-RAID-LVM/test.sh | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/test/TEST-13-ENC-RAID-LVM/test.sh b/test/TEST-13-ENC-RAID-LVM/test.sh +index 7f75b32d..94801e47 100755 +--- a/test/TEST-13-ENC-RAID-LVM/test.sh ++++ b/test/TEST-13-ENC-RAID-LVM/test.sh +@@ -19,7 +19,7 @@ test_run() { + -hdb $TESTDIR/check-success.img \ + -m 256M -smp 2 -nographic \ + -net none -kernel /boot/vmlinuz-$KVERSION \ +- -append "root=/dev/dracut/root rw rd.auto rd.retry=20 console=ttyS0,115200n81 selinux=0 rd.debug rootwait $LUKSARGS $DEBUGFAIL" \ ++ -append "root=/dev/dracut/root rw rd.auto rd.retry=20 console=ttyS0,115200n81 selinux=0 $LUKSARGS rd.device.timeout=40 $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]" +@@ -32,7 +32,7 @@ test_run() { + -hdb $TESTDIR/check-success.img \ + -m 256M -smp 2 -nographic \ + -net none -kernel /boot/vmlinuz-$KVERSION \ +- -append "root=/dev/dracut/root rw quiet rd.auto rd.retry=20 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL" \ ++ -append "root=/dev/dracut/root rw quiet rd.auto rd.retry=20 rd.info console=ttyS0,115200n81 selinux=0 rd.device.timeout=40 $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]" +@@ -45,7 +45,7 @@ test_run() { + -hdb $TESTDIR/check-success.img \ + -m 256M -smp 2 -nographic \ + -net none -kernel /boot/vmlinuz-$KVERSION \ +- -append "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 "root=/dev/dracut/root rw quiet rd.auto rd.retry=10 rd.info console=ttyS0,115200n81 selinux=0 rd.debug rd.luks.uuid=failme rd.device.timeout=40 $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]" diff --git a/SOURCES/0431-TEST-14-IMSM-add-rd.device.timeout.patch b/SOURCES/0431-TEST-14-IMSM-add-rd.device.timeout.patch new file mode 100644 index 0000000..638115f --- /dev/null +++ b/SOURCES/0431-TEST-14-IMSM-add-rd.device.timeout.patch @@ -0,0 +1,24 @@ +From aea64fe178baa0035783e3e13b84dfc029958a89 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 1 Jul 2016 12:28:38 +0200 +Subject: [PATCH] TEST-14-IMSM: add rd.device.timeout + +--- + test/TEST-14-IMSM/test.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/test/TEST-14-IMSM/test.sh b/test/TEST-14-IMSM/test.sh +index a600e1c0..8e99b1f6 100755 +--- a/test/TEST-14-IMSM/test.sh ++++ b/test/TEST-14-IMSM/test.sh +@@ -33,8 +33,8 @@ test_run() { + client_run rd.auto rd.md.uuid=$MD_UUID rd.dm=0 || return 1 + # This test succeeds, because the mirror parts are found without + # assembling the mirror itsself, which is what we want +- client_run rd.auto rd.md.uuid=$MD_UUID rd.md=0 rd.md.imsm failme && return 1 +- client_run rd.auto rd.md.uuid=$MD_UUID rd.md=0 failme && return 1 ++ client_run rd.auto rd.md.uuid=$MD_UUID rd.md=0 rd.md.imsm failme rd.device.timeout=40 && return 1 ++ client_run rd.auto rd.md.uuid=$MD_UUID rd.md=0 failme rd.device.timeout=40 && return 1 + # the following test hangs on newer md + client_run rd.auto rd.md.uuid=$MD_UUID rd.dm=0 rd.md.imsm rd.md.conf=0 || return 1 + return 0 diff --git a/SOURCES/0432-lsinitrd-Suppress-cat-write-error-Broken-pipe.patch b/SOURCES/0432-lsinitrd-Suppress-cat-write-error-Broken-pipe.patch new file mode 100644 index 0000000..b2a19b9 --- /dev/null +++ b/SOURCES/0432-lsinitrd-Suppress-cat-write-error-Broken-pipe.patch @@ -0,0 +1,127 @@ +From 84d845fc7d58946eadc4bf284c941ec52e26632d Mon Sep 17 00:00:00 2001 +From: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com> +Date: Wed, 4 Nov 2015 11:31:10 +0900 +Subject: [PATCH] lsinitrd: Suppress "cat: write error: Broken pipe" + +On systemd, SIGPIPE is ignored by default; see man 5 systemd.exec for +IgnoreSIGPIPE=. As a result, lsinitrd.sh under a systemd service +outputs "cat: write error: Broken pipe" in the processing of +determining a compression format of a given initramfs file using cat +command in the write part of a pipeline processing. + +For example, this is a log message of kdump.service in RHEL7.1, + + -- Logs begin at Wed 2015-11-04 09:57:33 JST, end at Wed 2015-11-04 09:58:28 JST. -- + Nov 04 09:57:33 localhost systemd[1]: Stopping Crash recovery kernel arming... + Nov 04 09:57:33 localhost kdumpctl[22545]: kexec: unloaded kdump kernel + Nov 04 09:57:33 localhost kdumpctl[22545]: Stopping kdump: [OK] + Nov 04 09:57:33 localhost systemd[1]: Starting Crash recovery kernel arming... + Nov 04 09:57:36 localhost kdumpctl[22553]: Detected change(s) in the following file(s): + Nov 04 09:57:36 localhost kdumpctl[22553]: /etc/kdump.conf + Nov 04 09:57:36 localhost kdumpctl[22553]: Rebuilding /boot/initramfs-3.10.0-229.el7.x86_64kdump.img + Nov 04 09:57:40 localhost dracut[24914]: Executing: /usr/sbin/dracut --hostonly --hostonly-cmdline -o "plymouth dash resume" -f /boot/initramfs-3.10.0-229.el7.x86_64kdump.img 3.10.0-229.el7.x86_64 + ...<cut>... + Nov 04 09:58:12 localhost dracut[24914]: *** Creating image file done *** + Nov 04 09:58:12 localhost dracut[24914]: Image: /boot/initramfs-3.10.0-229.el7.x86_64kdump.img: 18M + Nov 04 09:58:12 localhost kdumpctl[22553]: cat: write error: Broken pipe + Nov 04 09:58:12 localhost dracut[24914]: ======================================================================== + Nov 04 09:58:12 localhost dracut[24914]: Version: dracut-033-240.el7 + Nov 04 09:58:12 localhost dracut[24914]: + Nov 04 09:58:12 localhost dracut[24914]: Arguments: --hostonly --hostonly-cmdline -o 'plymouth dash resume' -f + Nov 04 09:58:13 localhost dracut[24914]: + Nov 04 09:58:13 localhost dracut[24914]: dracut modules: + Nov 04 09:58:13 localhost dracut[24914]: bash + +kdump.service builds and loads an initramfs for kdump kernel using +kdumpctl command which uses dracut command and so lsinitrd command, +too. + +Although there's no actual harm except for the error message, there +has been several inquiries from customers about this message so +far. We should suppress this message to reduce needless +communications. + +To suppress the message, this commit cleans up the processing of +reading the first 6 bytes of a given initramfs file without cat +command. + +(cherry picked from commit 3ce142861d88c357864d3a3bef7ec453826d737d) + +Conflicts: + lsinitrd.sh +--- + lsinitrd.sh | 60 +++++++++++++++++++++++++---------------------------- + 1 file changed, 28 insertions(+), 32 deletions(-) + +diff --git a/lsinitrd.sh b/lsinitrd.sh +index 88fe9834..4103ee23 100755 +--- a/lsinitrd.sh ++++ b/lsinitrd.sh +@@ -171,39 +171,35 @@ case $bin in + ;; + esac + +- +-CAT=$({ +- if [[ $SKIP ]]; then +- $SKIP "$image" ++if [[ $SKIP ]] ; then ++ bin="$($SKIP "$image" | { read -N 6 bin && echo "$bin" ; })" ++else ++ read -N 6 bin < "$image" ++fi ++case $bin in ++ $'\x1f\x8b'*) ++ CAT="zcat --" ++ ;; ++ BZh*) ++ CAT="bzcat --" ++ ;; ++ $'\x71\xc7'*|070701) ++ CAT="cat --" ++ ;; ++ $'\x02\x21'*) ++ CAT="lz4 -d -c" ++ ;; ++ $'\x89'LZO$'\0'*) ++ CAT="lzop -d -c" ++ ;; ++ *) ++ if echo "test"|xz|xzcat --single-stream >/dev/null 2>&1; then ++ CAT="xzcat --single-stream --" + else +- cat "$image" +- fi } | { +- read -N 6 bin +- case $bin in +- $'\x1f\x8b'*) +- echo "zcat --" +- ;; +- BZh*) +- echo "bzcat --" +- ;; +- $'\x71\xc7'*|070701) +- echo "cat --" +- ;; +- $'\x02\x21'*) +- echo "lz4 -d -c" +- ;; +- $'\x89'LZO$'\0'*) +- echo "lzop -d -c" +- ;; +- *) +- if echo "test"|xz|xzcat --single-stream >/dev/null 2>&1; then +- echo "xzcat --single-stream --" +- else +- echo "xzcat --" +- fi +- ;; +- esac +- }) ++ CAT="xzcat --" ++ fi ++ ;; ++esac + + skipcpio() + { diff --git a/SOURCES/0433-network-support-multiple-vlan-team-bridge-and-bond.patch b/SOURCES/0433-network-support-multiple-vlan-team-bridge-and-bond.patch new file mode 100644 index 0000000..3e20ccd --- /dev/null +++ b/SOURCES/0433-network-support-multiple-vlan-team-bridge-and-bond.patch @@ -0,0 +1,793 @@ +From 7a90c8b3434a27a347f6a963d0e673e04feb485a Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Mon, 4 Jul 2016 11:31:49 +0200 +Subject: [PATCH] network: support multiple vlan, team, bridge and bond + +--- + modules.d/40network/ifup.sh | 386 ++++++++++++++-------------- + modules.d/40network/net-genrules.sh | 27 +- + modules.d/40network/net-lib.sh | 9 +- + modules.d/40network/parse-bridge.sh | 30 +-- + modules.d/40network/parse-team.sh | 47 +--- + modules.d/40network/parse-vlan.sh | 27 +- + modules.d/45ifcfg/write-ifcfg.sh | 26 +- + 7 files changed, 254 insertions(+), 298 deletions(-) + +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index cedf9a77..d7503c7f 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -17,79 +17,12 @@ type ip_to_var >/dev/null 2>&1 || . /lib/net-lib.sh + + # $netif reads easier than $1 + netif=$1 +-use_bridge='false' +-use_vlan='false' + +-# enslave this interface to bond? +-for i in /tmp/bond.*.info; do +- [ -e "$i" ] || continue +- unset bondslaves +- unset bondname +- . "$i" +- for slave in $bondslaves ; do +- if [ "$netif" = "$slave" ] ; then +- netif=$bondname +- break 2 +- fi +- done +-done +- +-for i in /tmp/team.*.info; do +- [ -e "$i" ] || continue +- unset teamslaves +- unset teammaster +- . "$i" +- for slave in $teamslaves ; do +- if [ "$netif" = "$slave" ] ; then +- netif=$teammaster +- fi +- done +-done +- +-if [ -e /tmp/vlan.info ]; then +- . /tmp/vlan.info +- if [ "$netif" = "$phydevice" ]; then +- if [ "$netif" = "$bondname" ] && [ -n "$DO_BOND_SETUP" ] ; then +- : # We need to really setup bond (recursive call) +- elif [ "$netif" = "$teammaster" ] && [ -n "$DO_TEAM_SETUP" ] ; then +- : # We need to really setup team (recursive call) +- else +- netif="$vlanname" +- use_vlan='true' +- fi +- fi +-fi +- +-# bridge this interface? +-if [ -e /tmp/bridge.info ]; then +- . /tmp/bridge.info +- for ethname in $bridgeslaves ; do +- if [ "$netif" = "$ethname" ]; then +- if [ "$netif" = "$bondname" ] && [ -n "$DO_BOND_SETUP" ] ; then +- : # We need to really setup bond (recursive call) +- elif [ "$netif" = "$teammaster" ] && [ -n "$DO_TEAM_SETUP" ] ; then +- : # We need to really setup team (recursive call) +- elif [ "$netif" = "$vlanname" ] && [ -n "$DO_VLAN_SETUP" ]; then +- : # We need to really setup vlan (recursive call) +- else +- netif="$bridgename" +- use_bridge='true' +- fi +- fi +- done +-fi +- +-# disable manual ifup while netroot is set for simplifying our logic +-# in netroot case we prefer netroot to bringup $netif automaticlly +-[ -n "$2" -a "$2" = "-m" ] && [ -z "$netroot" ] && manualup="$2" +- +-if [ -n "$manualup" ]; then +- >/tmp/net.$netif.manualup +- rm -f /tmp/net.${netif}.did-setup +-else +- [ -e /tmp/net.${netif}.did-setup ] && exit 0 +- [ -e /sys/class/net/$netif/address ] && \ +- [ -e /tmp/net.$(cat /sys/class/net/$netif/address).did-setup ] && exit 0 ++# loopback is always handled the same way ++if [ "$netif" = "lo" ] ; then ++ ip link set lo up ++ ip addr add 127.0.0.1/8 dev lo ++ exit 0 + fi + + # Run dhclient +@@ -199,158 +132,213 @@ do_static() { + return 0 + } + +-# loopback is always handled the same way +-if [ "$netif" = "lo" ] ; then +- ip link set lo up +- ip addr add 127.0.0.1/8 dev lo ++get_vid() { ++ case "$1" in ++ vlan*) ++ echo ${1#vlan} ++ ;; ++ *.*) ++ echo ${1##*.} ++ ;; ++ esac ++} ++ ++# check, if we need VLAN's for this interface ++if [ -z "$DO_VLAN_PHY" ] && [ -e /tmp/vlan.${netif}.phy ]; then ++ unset DO_VLAN ++ NO_AUTO_DHCP=yes DO_VLAN_PHY=yes ifup "$netif" ++ modprobe -b -q 8021q ++ ++ for i in /tmp/vlan.*.${netif}; do ++ [ -e "$i" ] || continue ++ read vlanname < "$i" ++ if [ -n "$vlanname" ]; then ++ linkup "$netif" ++ ip link add dev "$vlanname" link "$netif" type vlan id "$(get_vid $vlanname)" ++ ifup "$vlanname" ++ fi ++ done + exit 0 + fi + +-# start bond if needed +-if [ -e /tmp/bond.${netif}.info ]; then +- . /tmp/bond.${netif}.info ++# Check, if interface is VLAN interface ++if ! [ -e /tmp/vlan.${netif}.phy ]; then ++ for i in /tmp/vlan.${netif}.*; do ++ [ -e "$i" ] || continue ++ export DO_VLAN=yes ++ break ++ done ++fi + +- if [ "$netif" = "$bondname" ] && [ ! -e /tmp/net.$bondname.setup ] ; then # We are master bond device +- modprobe bonding +- udevadm settle +- if ! [ -e /sys/class/net/${netif} ]; then +- echo "+$netif" > /sys/class/net/bonding_masters +- fi +- ip link set $netif down +- +- # Stolen from ifup-eth +- # add the bits to setup driver parameters here +- for arg in $bondoptions ; do +- key=${arg%%=*}; +- value=${arg##*=}; +- # %{value:0:1} is replaced with non-bash specific construct +- if [ "${key}" = "arp_ip_target" -a "${#value}" != "0" -a "+${value%%+*}" != "+" ]; then +- OLDIFS=$IFS; +- IFS=','; +- for arp_ip in $value; do +- echo +$arp_ip > /sys/class/net/${netif}/bonding/$key +- done +- IFS=$OLDIFS; +- else +- echo $value > /sys/class/net/${netif}/bonding/$key ++# bridge this interface? ++if [ -z "$NO_BRIDGE_MASTER" ]; then ++ for i in /tmp/bridge.*.info; do ++ [ -e "$i" ] || continue ++ unset bridgeslaves ++ unset bridgename ++ . "$i" ++ for ethname in $bridgeslaves ; do ++ [ "$netif" != "$ethname" ] && continue ++ ++ NO_BRIDGE_MASTER=yes NO_AUTO_DHCP=yes ifup $ethname ++ linkup $ethname ++ if [ ! -e /tmp/bridge.$bridgename.up ]; then ++ brctl addbr $bridgename ++ brctl setfd $bridgename 0 ++ > /tmp/bridge.$bridgename.up + fi ++ brctl addif $bridgename $ethname ++ ifup $bridgename ++ exit 0 + done ++ done ++fi + +- linkup $netif +- ++# enslave this interface to bond? ++if [ -z "$NO_BOND_MASTER" ]; then ++ for i in /tmp/bond.*.info; do ++ [ -e "$i" ] || continue ++ unset bondslaves ++ unset bondname ++ . "$i" + for slave in $bondslaves ; do +- ip link set $slave down +- cat /sys/class/net/$slave/address > /tmp/net.${netif}.${slave}.hwaddr +- echo "+$slave" > /sys/class/net/$bondname/bonding/slaves +- linkup $slave +- done ++ [ "$netif" != "$slave" ] && continue + +- # add the bits to setup the needed post enslavement parameters +- for arg in $BONDING_OPTS ; do +- key=${arg%%=*}; +- value=${arg##*=}; +- if [ "${key}" = "primary" ]; then +- echo $value > /sys/class/net/${netif}/bonding/$key +- fi ++ # already setup ++ [ -e /tmp/bond.$bondname.up ] && exit 0 ++ ++ # wait for all slaves to show up ++ for slave in $bondslaves ; do ++ # try to create the slave (maybe vlan or bridge) ++ NO_BOND_MASTER=yes NO_AUTO_DHCP=yes ifup $slave ++ ++ if ! ip link show dev $slave >/dev/null 2>&1; then ++ # wait for the last slave to show up ++ exit 0 ++ fi ++ done ++ ++ modprobe -q -b bonding ++ echo "+$bondname" > /sys/class/net/bonding_masters 2>/dev/null ++ ip link set $bondname down ++ ++ # Stolen from ifup-eth ++ # add the bits to setup driver parameters here ++ for arg in $bondoptions ; do ++ key=${arg%%=*}; ++ value=${arg##*=}; ++ # %{value:0:1} is replaced with non-bash specific construct ++ if [ "${key}" = "arp_ip_target" -a "${#value}" != "0" -a "+${value%%+*}" != "+" ]; then ++ OLDIFS=$IFS; ++ IFS=','; ++ for arp_ip in $value; do ++ echo +$arp_ip > /sys/class/net/${bondname}/bonding/$key ++ done ++ IFS=$OLDIFS; ++ else ++ echo $value > /sys/class/net/${bondname}/bonding/$key ++ fi ++ done ++ ++ linkup $bondname ++ ++ for slave in $bondslaves ; do ++ cat /sys/class/net/$slave/address > /tmp/net.${bondname}.${slave}.hwaddr ++ ip link set $slave down ++ echo "+$slave" > /sys/class/net/$bondname/bonding/slaves ++ linkup $slave ++ done ++ ++ # add the bits to setup the needed post enslavement parameters ++ for arg in $bondoptions ; do ++ key=${arg%%=*}; ++ value=${arg##*=}; ++ if [ "${key}" = "primary" ]; then ++ echo $value > /sys/class/net/${bondname}/bonding/$key ++ fi ++ done ++ ++ > /tmp/bond.$bondname.up ++ ++ NO_BOND_MASTER=yes ifup $bondname ++ exit $? + done +- > /tmp/net.$bondname.setup +- fi ++ done + fi + +-if [ -e /tmp/team.${netif}.info ]; then +- . /tmp/team.${netif}.info +- if [ "$netif" = "$teammaster" ] && [ ! -e /tmp/net.$teammaster.setup ] ; then +- # We shall only bring up those _can_ come up +- # in case of some slave is gone in active-backup mode +- working_slaves="" ++if [ -z "$NO_TEAM_MASTER" ]; then ++ for i in /tmp/team.*.info; do ++ [ -e "$i" ] || continue ++ unset teammaster ++ unset teamslaves ++ . "$i" + for slave in $teamslaves ; do +- teamdctl ${teammaster} port present ${slave} 2>/dev/null \ +- && continue +- ip link set dev $slave up 2>/dev/null +- if wait_for_if_up $slave; then +- working_slaves+="$slave " +- fi +- done +- # Do not add slaves now +- teamd -d -U -n -N -t $teammaster -f /etc/teamd/$teammaster.conf +- for slave in $working_slaves; do +- # team requires the slaves to be down before joining team +- ip link set dev $slave down +- ( +- unset TEAM_PORT_CONFIG +- _hwaddr=$(cat /sys/class/net/$slave/address) +- _subchannels=$(iface_get_subchannels "$slave") +- if [ -n "$_hwaddr" ] && [ -e "/etc/sysconfig/network-scripts/mac-${_hwaddr}.conf" ]; then +- . "/etc/sysconfig/network-scripts/mac-${_hwaddr}.conf" +- elif [ -n "$_subchannels" ] && [ -e "/etc/sysconfig/network-scripts/ccw-${_subchannels}.conf" ]; then +- . "/etc/sysconfig/network-scripts/ccw-${_subchannels}.conf" +- elif [ -e "/etc/sysconfig/network-scripts/ifcfg-${slave}" ]; then +- . "/etc/sysconfig/network-scripts/ifcfg-${slave}" +- fi ++ [ "$netif" != "$slave" ] && continue ++ ++ [ -e /tmp/team.$teammaster.up ] && exit 0 + +- if [ -n "${TEAM_PORT_CONFIG}" ]; then +- /usr/bin/teamdctl ${teammaster} port config update ${slave} "${TEAM_PORT_CONFIG}" ++ # wait for all slaves to show up ++ for slave in $teamslaves ; do ++ # try to create the slave (maybe vlan or bridge) ++ NO_BOND_MASTER=yes NO_AUTO_DHCP=yes ifup $slave ++ ++ if ! ip link show dev $slave >/dev/null 2>&1; then ++ # wait for the last slave to show up ++ exit 0 + fi +- ) +- teamdctl $teammaster port add $slave +- done +- ip link set dev $teammaster up +- > /tmp/net.$teammaster.setup +- fi +-fi ++ done ++ ++ if [ ! -e /tmp/team.$teammaster.up ] ; then ++ # We shall only bring up those _can_ come up ++ # in case of some slave is gone in active-backup mode ++ working_slaves="" ++ for slave in $teamslaves ; do ++ ip link set $slave up 2>/dev/null ++ if wait_for_if_up $slave; then ++ working_slaves="$working_slaves$slave " ++ fi ++ done ++ # Do not add slaves now ++ teamd -d -U -n -N -t $teammaster -f /etc/teamd/$teammaster.conf ++ for slave in $working_slaves; do ++ # team requires the slaves to be down before joining team ++ ip link set $slave down ++ teamdctl $teammaster port add $slave ++ done + +-# XXX need error handling like dhclient-script ++ ip link set $teammaster up + +-if [ -e /tmp/bridge.info ]; then +- . /tmp/bridge.info +-# start bridge if necessary +- if [ "$netif" = "$bridgename" ] && [ ! -e /tmp/net.$bridgename.setup ]; then +- brctl addbr $bridgename +- brctl setfd $bridgename 0 +- for ethname in $bridgeslaves ; do +- if [ "$ethname" = "$bondname" ] ; then +- DO_BOND_SETUP=yes ifup $bondname -m +- elif [ "$ethname" = "$teammaster" ] ; then +- DO_TEAM_SETUP=yes ifup $teammaster -m +- elif [ "$ethname" = "$vlanname" ]; then +- DO_VLAN_SETUP=yes ifup $vlanname -m +- else +- linkup $ethname ++ > /tmp/team.$teammaster.up ++ NO_TEAM_MASTER=yes ifup $teammaster ++ exit $? + fi +- brctl addif $bridgename $ethname + done +- > /tmp/net.$bridgename.setup +- fi ++ done + fi + +-get_vid() { +- case "$1" in +- vlan*) +- echo ${1#vlan} +- ;; +- *.*) +- echo ${1##*.} +- ;; +- esac +-} ++# all synthetic interfaces done.. now check if the interface is available ++if ! ip link show dev $netif >/dev/null 2>&1; then ++ exit 1 ++fi + +-if [ "$netif" = "$vlanname" ] && [ ! -e /tmp/net.$vlanname.up ]; then +- modprobe 8021q +- if [ "$phydevice" = "$bondname" ] ; then +- DO_BOND_SETUP=yes ifup $phydevice -m +- elif [ "$phydevice" = "$teammaster" ] ; then +- DO_TEAM_SETUP=yes ifup $phydevice -m +- else +- linkup "$phydevice" +- fi +- ip link add dev "$vlanname" link "$phydevice" type vlan id "$(get_vid $vlanname)" +- ip link set "$vlanname" up ++# disable manual ifup while netroot is set for simplifying our logic ++# in netroot case we prefer netroot to bringup $netif automaticlly ++[ -n "$2" -a "$2" = "-m" ] && [ -z "$netroot" ] && manualup="$2" ++ ++if [ -n "$manualup" ]; then ++ >/tmp/net.$netif.manualup ++ rm -f /tmp/net.${netif}.did-setup ++else ++ [ -e /tmp/net.${netif}.did-setup ] && exit 0 ++ [ -z "$DO_VLAN" ] && \ ++ [ -e /sys/class/net/$netif/address ] && \ ++ [ -e /tmp/net.$(cat /sys/class/net/$netif/address).did-setup ] && exit 0 + fi + + # No ip lines default to dhcp + ip=$(getarg ip) + +-if [ -z "$ip" ]; then ++if [ -z "$NO_AUTO_DHCP" ] && [ -z "$ip" ]; then + if [ "$netroot" = "dhcp6" ]; then + do_dhcp -6 + else +@@ -415,7 +403,7 @@ for p in $(getargs ip=); do + if [ $ret -eq 0 ]; then + > /tmp/net.${netif}.up + +- if [ -e /sys/class/net/${netif}/address ]; then ++ if [ -z "$DO_VLAN" ] && [ -e /sys/class/net/${netif}/address ]; then + > /tmp/net.$(cat /sys/class/net/${netif}/address).up + fi + +@@ -444,7 +432,7 @@ if [ -n "$DO_BOND_SETUP" -o -n "$DO_TEAM_SETUP" -o -n "$DO_VLAN_SETUP" ]; then + fi + + # no ip option directed at our interface? +-if [ ! -e /tmp/net.${netif}.up ]; then ++if [ -z "$NO_AUTO_DHCP" ] && [ ! -e /tmp/net.${netif}.up ]; then + if [ -e /tmp/net.bootdev ]; then + BOOTDEV=$(cat /tmp/net.bootdev) + if [ "$netif" = "$BOOTDEV" ] || [ "$BOOTDEV" = "$(cat /sys/class/net/${netif}/address)" ]; then +diff --git a/modules.d/40network/net-genrules.sh b/modules.d/40network/net-genrules.sh +index 526dd5cf..08072fbe 100755 +--- a/modules.d/40network/net-genrules.sh ++++ b/modules.d/40network/net-genrules.sh +@@ -1,6 +1,4 @@ + #!/bin/sh +-# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +-# ex: ts=8 sw=4 sts=4 et filetype=sh + + getargbool 0 rd.neednet && NEEDNET=1 + +@@ -14,11 +12,14 @@ command -v fix_bootif >/dev/null || . /lib/net-lib.sh + # Write udev rules + { + # bridge: attempt only the defined interface +- if [ -e /tmp/bridge.info ]; then +- . /tmp/bridge.info ++ for i in /tmp/bridge.*.info; do ++ [ -e "$i" ] || continue ++ unset bridgeslaves ++ unset bridgename ++ . "$i" + RAW_IFACES="$RAW_IFACES $bridgeslaves" + MASTER_IFACES="$MASTER_IFACES $bridgename" +- fi ++ done + + # bond: attempt only the defined interface (override bridge defines) + for i in /tmp/bond.*.info; do +@@ -40,11 +41,19 @@ command -v fix_bootif >/dev/null || . /lib/net-lib.sh + MASTER_IFACES="$MASTER_IFACES ${teammaster}" + done + +- if [ -e /tmp/vlan.info ]; then +- . /tmp/vlan.info ++ for j in /tmp/vlan.*.phy; do ++ [ -e "$j" ] || continue ++ unset phydevice ++ read phydevice < "$j" + RAW_IFACES="$RAW_IFACES $phydevice" +- MASTER_IFACES="$MASTER_IFACES ${vlanname}" +- fi ++ for i in /tmp/vlan.*.${phydevice}; do ++ [ -e "$i" ] || continue ++ unset vlanname ++ read vlanname < "$i" ++ MASTER_IFACES="$MASTER_IFACES ${vlanname}" ++ done ++ done ++ + MASTER_IFACES="$(trim "$MASTER_IFACES")" + RAW_IFACES="$(trim "$RAW_IFACES")" + +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index 71201938..de334d98 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -102,7 +102,8 @@ ifdown() { + ip addr flush dev $netif + echo "#empty" > /etc/resolv.conf + rm -f -- /tmp/net.$netif.did-setup +- [ -e /sys/class/net/$netif/address ] && \ ++ [ -z "$DO_VLAN" ] && \ ++ [ -e /sys/class/net/$netif/address ] && \ + rm -f -- /tmp/net.$(cat /sys/class/net/$netif/address).did-setup + # TODO: send "offline" uevent? + } +@@ -111,7 +112,8 @@ setup_net() { + local netif="$1" f="" gw_ip="" netroot_ip="" iface="" IFACES="" + local _p + [ -e /tmp/net.$netif.did-setup ] && return +- [ -e /sys/class/net/$netif/address ] && \ ++ [ -z "$DO_VLAN" ] && \ ++ [ -e /sys/class/net/$netif/address ] && \ + [ -e /tmp/net.$(cat /sys/class/net/$netif/address).did-setup ] && return + [ -e "/tmp/net.ifaces" ] && read IFACES < /tmp/net.ifaces + [ -z "$IFACES" ] && IFACES="$netif" +@@ -168,7 +170,8 @@ setup_net() { + unset layer2 + + > /tmp/net.$netif.did-setup +- [ -e /sys/class/net/$netif/address ] && \ ++ [ -z "$DO_VLAN" ] && \ ++ [ -e /sys/class/net/$netif/address ] && \ + > /tmp/net.$(cat /sys/class/net/$netif/address).did-setup + } + +diff --git a/modules.d/40network/parse-bridge.sh b/modules.d/40network/parse-bridge.sh +index a9101094..5c3af292 100755 +--- a/modules.d/40network/parse-bridge.sh ++++ b/modules.d/40network/parse-bridge.sh +@@ -1,6 +1,4 @@ + #!/bin/sh +-# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +-# ex: ts=8 sw=4 sts=4 et filetype=sh + # + # Format: + # bridge=<bridgename>:<bridgeslaves> +@@ -9,14 +7,6 @@ + # bridge without parameters assumes bridge=br0:eth0 + # + +-# return if bridge already parsed +-[ -n "$bridgename" ] && return +- +-# Check if bridge parameter is valid +-if getarg bridge= >/dev/null ; then +- command -v brctl >/dev/null 2>&1 || die "No 'brctl' installed" +-fi +- + parsebridge() { + local v=${1}: + set -- +@@ -24,8 +14,6 @@ parsebridge() { + set -- "$@" "${v%%:*}" + v=${v#*:} + done +- +- unset bridgename bridgeslaves + case $# in + 0) bridgename=br0; bridgeslaves=$iface ;; + 1) die "bridge= requires two parameters" ;; +@@ -34,14 +22,13 @@ parsebridge() { + esac + } + +-unset bridgename bridgeslaves +- +-iface=eth0 +- + # Parse bridge for bridgename and bridgeslaves +-if bridge="$(getarg bridge)"; then ++for bridge in $(getargs bridge=); do ++ unset bridgename ++ unset bridgeslaves ++ iface=eth0 + # Read bridge= parameters if they exist +- if [ -n "$bridge" ]; then ++ if [ "$bridge" != "bridge" ]; then + parsebridge $bridge + fi + # Simple default bridge +@@ -49,7 +36,6 @@ if bridge="$(getarg bridge)"; then + bridgename=br0 + bridgeslaves=$iface + fi +- echo "bridgename=$bridgename" > /tmp/bridge.info +- echo "bridgeslaves=\"$bridgeslaves\"" >> /tmp/bridge.info +- return +-fi ++ echo "bridgename=$bridgename" > /tmp/bridge.${bridgename}.info ++ echo "bridgeslaves=\"$bridgeslaves\"" >> /tmp/bridge.${bridgename}.info ++done +diff --git a/modules.d/40network/parse-team.sh b/modules.d/40network/parse-team.sh +index a836d688..136c3705 100755 +--- a/modules.d/40network/parse-team.sh ++++ b/modules.d/40network/parse-team.sh +@@ -6,14 +6,6 @@ + # teamslaves is a comma-separated list of physical (ethernet) interfaces + # + +-# return if team already parsed +-[ -n "$teammaster" ] && return +- +-# Check if team parameter is valid +-if getarg team= >/dev/null ; then +- : +-fi +- + parseteam() { + local v=${1}: + set -- +@@ -22,33 +14,22 @@ parseteam() { + v=${v#*:} + done + +- unset teammaster teamslaves + case $# in +- 2) teammaster=$1; teamslaves=$(str_replace "$2" "," " ") ;; +- *) warn "team= requires two parameters"; return 1;; ++ 2) teammaster=$1; teamslaves=$(str_replace "$2" "," " ") ;; ++ *) die "team= requires two parameters" ;; + esac +- return 0 + } + +-unset teammaster teamslaves +- +-if getarg team>/dev/null; then +- # Read team= parameters if they exist +- for team in $(getargs team); do +- [ "$team" = "team" ] && continue +- +- unset teammaster +- unset teamslaves + +- parseteam "$team" || continue +- +- echo "teammaster=$teammaster" > /tmp/team.${teammaster}.info +- echo "teamslaves=\"$teamslaves\"" >> /tmp/team.${teammaster}.info +- +- if ! [ -e /etc/teamd/${teammaster}.conf ]; then +- warn "Team master $teammaster specified, but no /etc/teamd/$teammaster.conf present. Using activebackup." +- mkdir -p /etc/teamd +- printf -- "%s" '{"runner": {"name": "activebackup"}, "link_watch": {"name": "ethtool"}}' > "/etc/teamd/${teammaster}.conf" +- fi +- done +-fi ++for team in $(getargs team=); do ++ unset teammaster teamslaves ++ parseteam "$(getarg team=)" ++ ++ echo "teammaster=$teammaster" > /tmp/team.${teammaster}.info ++ echo "teamslaves=\"$teamslaves\"" >> /tmp/team.${teammaster}.info ++ if ! [ -e /etc/teamd/${teammaster}.conf ]; then ++ warn "Team master $teammaster specified, but no /etc/teamd/$teammaster.conf present. Using activebackup." ++ mkdir -p /etc/teamd ++ printf -- "%s" '{"runner": {"name": "activebackup"}, "link_watch": {"name": "ethtool"}}' > "/etc/teamd/${teammaster}.conf" ++ fi ++done +diff --git a/modules.d/40network/parse-vlan.sh b/modules.d/40network/parse-vlan.sh +index 3ba22892..5a747f0f 100755 +--- a/modules.d/40network/parse-vlan.sh ++++ b/modules.d/40network/parse-vlan.sh +@@ -4,14 +4,6 @@ + # vlan=<vlanname>:<phydevice> + # + +-# return if vlan already parsed +-[ -n "$vlanname" ] && return +- +-# Check if vlan parameter is valid +-if getarg vlan= >/dev/null ; then +- : +-fi +- + parsevlan() { + local v=${1}: + set -- +@@ -27,16 +19,11 @@ parsevlan() { + esac + } + +-unset vlanname phydevice +- +-if getarg vlan >/dev/null; then +- # Read vlan= parameters if they exist +- vlan="$(getarg vlan=)" +- if [ ! "$vlan" = "vlan" ]; then +- parsevlan "$(getarg vlan=)" +- fi ++for vlan in $(getargs vlan=); do ++ unset vlanname ++ unset phydevice ++ parsevlan "$vlan" + +- echo "vlanname=\"$vlanname\"" > /tmp/vlan.info +- echo "phydevice=\"$phydevice\"" >> /tmp/vlan.info +- return +-fi ++ echo "$phydevice" > /tmp/vlan.${phydevice}.phy ++ echo "$vlanname" > /tmp/vlan.${vlanname}.${phydevice} ++done +diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh +index cab74772..a077da1c 100755 +--- a/modules.d/45ifcfg/write-ifcfg.sh ++++ b/modules.d/45ifcfg/write-ifcfg.sh +@@ -7,14 +7,6 @@ type is_persistent_ethernet_name >/dev/null 2>&1 || . /lib/net-lib.sh + + udevadm settle --timeout=30 + +-if [ -e /tmp/bridge.info ]; then +- . /tmp/bridge.info +-fi +- +-if [ -e /tmp/vlan.info ]; then +- . /tmp/vlan.info +-fi +- + mkdir -m 0755 -p /tmp/ifcfg/ + mkdir -m 0755 -p /tmp/ifcfg-leases/ + +@@ -24,7 +16,7 @@ get_config_line_by_subchannel() + local line + + CHANNELS="$1" +- while read line; do ++ while read line || [ -n "$line" ]; do + if strstr "$line" "$CHANNELS"; then + echo $line + return 0 +@@ -132,6 +124,8 @@ for netup in /tmp/net.*.did-setup ; do + unset bondslaves + unset bondname + unset bondoptions ++ unset bridgename ++ unset bridgeslaves + unset uuid + unset ip + unset gw +@@ -141,8 +135,10 @@ for netup in /tmp/net.*.did-setup ; do + unset slave + unset ethname + unset vlan ++ unset phydevice + + [ -e /tmp/bond.${netif}.info ] && . /tmp/bond.${netif}.info ++ [ -e /tmp/bridge.${netif}.info ] && . /tmp/bridge.${netif}.info + [ -e /tmp/team.${netif}.info ] && . /tmp/team.${netif}.info + [ -e /tmp/net.${netif}.override ] && . /tmp/net.${netif}.override + +@@ -152,11 +148,17 @@ for netup in /tmp/net.*.did-setup ; do + elif [ "$netif" = "$teammaster" ]; then + team=yes + elif [ "$netif" = "$bondname" ]; then +- # $netif can't be bridge and bond at the same time ++ # $netif can't be bridge and bond at the same time + bond=yes + fi +- if [ "$netif" = "$vlanname" ]; then +- vlan=yes ++ ++ if ! [ -e /tmp/vlan.${netif}.phy ]; then ++ for i in /tmp/vlan.${netif}.*; do ++ [ ! -e "$i" ] && continue ++ phydevice=${i##/tmp/vlan.${netif}.} ++ vlan=yes ++ break ++ done + fi + + # skip team interfaces for now, the host config must be in sync diff --git a/SOURCES/0434-TEST-70-BONDBRIDGETEAMVLAN-add-testcase-for-testsuit.patch b/SOURCES/0434-TEST-70-BONDBRIDGETEAMVLAN-add-testcase-for-testsuit.patch new file mode 100644 index 0000000..84c4912 --- /dev/null +++ b/SOURCES/0434-TEST-70-BONDBRIDGETEAMVLAN-add-testcase-for-testsuit.patch @@ -0,0 +1,617 @@ +From 7b0ce59233f9e56e2115c921a51fac97e9e52a2a Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Mon, 4 Jul 2016 15:44:36 +0200 +Subject: [PATCH] TEST-70-BONDBRIDGETEAMVLAN: add testcase for testsuite + +multiple bonds +multiple bridges +multiple vlans +--- + .../99-idesymlinks.rules | 8 + + test/TEST-70-BONDBRIDGETEAMVLAN/Makefile | 10 + + .../TEST-70-BONDBRIDGETEAMVLAN/client-init.sh | 22 ++ + test/TEST-70-BONDBRIDGETEAMVLAN/dhcpd.conf | 27 ++ + test/TEST-70-BONDBRIDGETEAMVLAN/dhcpd2.conf | 15 + + test/TEST-70-BONDBRIDGETEAMVLAN/exports | 1 + + .../finished-false.sh | 2 + + test/TEST-70-BONDBRIDGETEAMVLAN/hard-off.sh | 3 + + test/TEST-70-BONDBRIDGETEAMVLAN/hosts | 5 + + .../TEST-70-BONDBRIDGETEAMVLAN/server-init.sh | 117 +++++++ + test/TEST-70-BONDBRIDGETEAMVLAN/test.sh | 308 ++++++++++++++++++ + 11 files changed, 518 insertions(+) + create mode 100644 test/TEST-70-BONDBRIDGETEAMVLAN/99-idesymlinks.rules + create mode 100644 test/TEST-70-BONDBRIDGETEAMVLAN/Makefile + create mode 100755 test/TEST-70-BONDBRIDGETEAMVLAN/client-init.sh + create mode 100644 test/TEST-70-BONDBRIDGETEAMVLAN/dhcpd.conf + create mode 100644 test/TEST-70-BONDBRIDGETEAMVLAN/dhcpd2.conf + create mode 100644 test/TEST-70-BONDBRIDGETEAMVLAN/exports + create mode 100755 test/TEST-70-BONDBRIDGETEAMVLAN/finished-false.sh + create mode 100755 test/TEST-70-BONDBRIDGETEAMVLAN/hard-off.sh + create mode 100644 test/TEST-70-BONDBRIDGETEAMVLAN/hosts + create mode 100755 test/TEST-70-BONDBRIDGETEAMVLAN/server-init.sh + create mode 100755 test/TEST-70-BONDBRIDGETEAMVLAN/test.sh + +diff --git a/test/TEST-70-BONDBRIDGETEAMVLAN/99-idesymlinks.rules b/test/TEST-70-BONDBRIDGETEAMVLAN/99-idesymlinks.rules +new file mode 100644 +index 00000000..d557790a +--- /dev/null ++++ b/test/TEST-70-BONDBRIDGETEAMVLAN/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-70-BONDBRIDGETEAMVLAN/Makefile b/test/TEST-70-BONDBRIDGETEAMVLAN/Makefile +new file mode 100644 +index 00000000..aad27059 +--- /dev/null ++++ b/test/TEST-70-BONDBRIDGETEAMVLAN/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-70-BONDBRIDGETEAMVLAN/client-init.sh b/test/TEST-70-BONDBRIDGETEAMVLAN/client-init.sh +new file mode 100755 +index 00000000..2018393b +--- /dev/null ++++ b/test/TEST-70-BONDBRIDGETEAMVLAN/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 ++ 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-70-BONDBRIDGETEAMVLAN/dhcpd.conf b/test/TEST-70-BONDBRIDGETEAMVLAN/dhcpd.conf +new file mode 100644 +index 00000000..ec810c29 +--- /dev/null ++++ b/test/TEST-70-BONDBRIDGETEAMVLAN/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.50.1:/nfs/client"; ++ range 192.168.51.10 192.168.51.100; ++} +diff --git a/test/TEST-70-BONDBRIDGETEAMVLAN/dhcpd2.conf b/test/TEST-70-BONDBRIDGETEAMVLAN/dhcpd2.conf +new file mode 100644 +index 00000000..90f0c302 +--- /dev/null ++++ b/test/TEST-70-BONDBRIDGETEAMVLAN/dhcpd2.conf +@@ -0,0 +1,15 @@ ++ddns-update-style none; ++ ++use-host-decl-names true; ++ ++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.50.1:/nfs/client"; ++ range 192.168.51.10 192.168.51.100; ++} +diff --git a/test/TEST-70-BONDBRIDGETEAMVLAN/exports b/test/TEST-70-BONDBRIDGETEAMVLAN/exports +new file mode 100644 +index 00000000..ff5f29b1 +--- /dev/null ++++ b/test/TEST-70-BONDBRIDGETEAMVLAN/exports +@@ -0,0 +1 @@ ++/nfs/client 192.168.50.0/24(rw,insecure,no_subtree_check,no_root_squash) +diff --git a/test/TEST-70-BONDBRIDGETEAMVLAN/finished-false.sh b/test/TEST-70-BONDBRIDGETEAMVLAN/finished-false.sh +new file mode 100755 +index 00000000..ecdbef95 +--- /dev/null ++++ b/test/TEST-70-BONDBRIDGETEAMVLAN/finished-false.sh +@@ -0,0 +1,2 @@ ++#!/bin/sh ++exit 1 +diff --git a/test/TEST-70-BONDBRIDGETEAMVLAN/hard-off.sh b/test/TEST-70-BONDBRIDGETEAMVLAN/hard-off.sh +new file mode 100755 +index 00000000..12c3d5ac +--- /dev/null ++++ b/test/TEST-70-BONDBRIDGETEAMVLAN/hard-off.sh +@@ -0,0 +1,3 @@ ++#!/bin/sh ++getarg rd.shell || poweroff -f ++getarg failme && poweroff -f +diff --git a/test/TEST-70-BONDBRIDGETEAMVLAN/hosts b/test/TEST-70-BONDBRIDGETEAMVLAN/hosts +new file mode 100644 +index 00000000..d02a4e9b +--- /dev/null ++++ b/test/TEST-70-BONDBRIDGETEAMVLAN/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-70-BONDBRIDGETEAMVLAN/server-init.sh b/test/TEST-70-BONDBRIDGETEAMVLAN/server-init.sh +new file mode 100755 +index 00000000..9585a47c +--- /dev/null ++++ b/test/TEST-70-BONDBRIDGETEAMVLAN/server-init.sh +@@ -0,0 +1,117 @@ ++#!/bin/sh ++exec </dev/console >/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 -b -q 8021q ++>/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 ++linkup 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 ++ip link set dev eth2 name ens5 ++ip link set dev eth3 name ens6 ++linkup ens4 ++linkup ens5 ++linkup ens6 ++ip addr add 192.168.51.1/24 dev ens5 ++linkup ens4 ++>/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 ++[ -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-70-BONDBRIDGETEAMVLAN/test.sh b/test/TEST-70-BONDBRIDGETEAMVLAN/test.sh +new file mode 100755 +index 00000000..54ceb9e1 +--- /dev/null ++++ b/test/TEST-70-BONDBRIDGETEAMVLAN/test.sh +@@ -0,0 +1,308 @@ ++#!/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 \ ++ -net socket,vlan=0,listen=127.0.0.1:12350 \ ++ -net socket,vlan=1,listen=127.0.0.1:12351 \ ++ -net socket,vlan=2,listen=127.0.0.1:12352 \ ++ -net socket,vlan=3,listen=127.0.0.1:12353 \ ++ -net nic,vlan=0,macaddr=52:54:01:12:34:56,model=e1000 \ ++ -net nic,vlan=1,macaddr=52:54:01:12:34:57,model=e1000 \ ++ -net nic,vlan=2,macaddr=52:54:01:12:34:58,model=e1000 \ ++ -net nic,vlan=3,macaddr=52:54:01:12:34:59,model=e1000 \ ++ ${SERIAL:+-serial "$SERIAL"} \ ++ -watchdog i6300esb -watchdog-action poweroff \ ++ -kernel /boot/vmlinuz-"$KVERSION" \ ++ -append "loglevel=7 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 ++ ++ # 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 ++ ++ $testdir/run-qemu -hda "$TESTDIR"/client.img -m 256M -smp 2 -nographic \ ++ -net socket,vlan=0,connect=127.0.0.1:12350 \ ++ ${do_vlan13:+-net socket,vlan=1,connect=127.0.0.1:12351} \ ++ -net socket,vlan=2,connect=127.0.0.1:12352 \ ++ ${do_vlan13:+-net socket,vlan=3,connect=127.0.0.1:12353} \ ++ -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 \ ++ -kernel /boot/vmlinuz-"$KVERSION" \ ++ -append "$cmdline rd.info $DEBUGFAIL rd.retry=5 rw console=ttyS0,115200n81 selinux=0 init=/sbin/init" \ ++ -initrd "$TESTDIR"/initramfs.testing ++ ++ { ++ 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:ens4 ++vlan=vlan2:ens4 ++vlan=ens4.3:ens4 ++vlan=ens4.0004:ens4 ++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:ens4.3:none ++ip=192.168.57.104::192.168.57.1:24:test:ens4.0004:none ++rd.neednet=1 ++root=nfs:192.168.50.1:/nfs/client bootdev=ens3 ++" \ ++ 'ens3 ens4.0004 ens4.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-ens4.0004 # Generated by dracut initrd NAME="ens4.0004" ONBOOT=yes NETBOOT=yes IPV6INIT=yes BOOTPROTO=none IPADDR="192.168.57.104" PREFIX="24" GATEWAY="192.168.57.1" TYPE=Vlan DEVICE="ens4.0004" VLAN=yes PHYSDEV="ens4" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens4.3 # Generated by dracut initrd NAME="ens4.3" ONBOOT=yes NETBOOT=yes IPV6INIT=yes BOOTPROTO=none IPADDR="192.168.56.103" PREFIX="24" GATEWAY="192.168.56.1" TYPE=Vlan DEVICE="ens4.3" VLAN=yes PHYSDEV="ens4" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-vlan0001 # Generated by dracut initrd NAME="vlan0001" ONBOOT=yes NETBOOT=yes IPV6INIT=yes BOOTPROTO=none IPADDR="192.168.54.101" PREFIX="24" GATEWAY="192.168.54.1" TYPE=Vlan DEVICE="vlan0001" VLAN=yes PHYSDEV="ens4" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-vlan2 # Generated by dracut initrd NAME="vlan2" ONBOOT=yes NETBOOT=yes IPV6INIT=yes BOOTPROTO=none IPADDR="192.168.55.102" PREFIX="24" GATEWAY="192.168.55.1" TYPE=Vlan DEVICE="vlan2" VLAN=yes PHYSDEV="ens4" 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=60 ++ mke2fs -j -F -- "$TESTDIR"/server.ext3 ++ mkdir -- "$TESTDIR"/mnt ++ sudo mount -o loop -- "$TESTDIR"/server.ext3 "$TESTDIR"/mnt ++ ++ ( ++ 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 ++ 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 ++ 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 ++ sudo ldconfig -r "$initdir" ++ ) ++ ++ sudo 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 "af_packet piix ide-gd_mod ata_piix ext3 sd_mod nfsv2 nfsv3 nfsv4 nfs_acl nfs_layout_nfsv41_files nfsd e1000 i6300esb ib700wdt" \ ++ -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 "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" \ ++ -f "$TESTDIR"/initramfs.testing "$KVERSION" || return 1 ++} ++ ++kill_server() { ++ if [[ -s "$TESTDIR"/server.pid ]]; then ++ sudo kill -TERM -- $(cat "$TESTDIR"/server.pid) ++ rm -f -- "$TESTDIR"/server.pid ++ fi ++} ++ ++test_cleanup() { ++ kill_server ++} ++ ++. "$testdir"/test-functions diff --git a/SOURCES/0435-dracut.spec-remove-dd.patch b/SOURCES/0435-dracut.spec-remove-dd.patch new file mode 100644 index 0000000..cb97e53 --- /dev/null +++ b/SOURCES/0435-dracut.spec-remove-dd.patch @@ -0,0 +1,23 @@ +From 573e508554e219dc57c3fb6462db181beb584e94 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Mon, 4 Jul 2016 16:30:31 +0200 +Subject: [PATCH] dracut.spec: remove dd + +dd is part of coreutils +--- + dracut.spec | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dracut.spec b/dracut.spec +index 5c4b0471..780ed703 100644 +--- a/dracut.spec ++++ b/dracut.spec +@@ -91,7 +91,7 @@ Requires: gzip xz + Requires: kmod + Requires: sed + Requires: kpartx +-Requires: tar dd ++Requires: tar + + %if 0%{?fedora} || 0%{?rhel} > 6 + Requires: util-linux >= 2.21 diff --git a/SOURCES/0436-watchdog-Do-not-add-hooks-if-systemd-module-is-inclu.patch b/SOURCES/0436-watchdog-Do-not-add-hooks-if-systemd-module-is-inclu.patch new file mode 100644 index 0000000..09dd5a9 --- /dev/null +++ b/SOURCES/0436-watchdog-Do-not-add-hooks-if-systemd-module-is-inclu.patch @@ -0,0 +1,31 @@ +From e5439c9b3751dca1570c67d32a4ccc873c3c77a5 Mon Sep 17 00:00:00 2001 +From: Pratyush Anand <panand@redhat.com> +Date: Wed, 16 Mar 2016 09:09:09 +0530 +Subject: [PATCH] watchdog: Do not add hooks if systemd module is included + +When systemd is present, let it manage watchdog feed. + +Signed-off-by: Pratyush Anand <panand@redhat.com> +Cc: Dave Young <dyoung@redhat.com> +Cc: Don Zickus <dzickus@redhat.com> +Cc: Harald Hoyer <harald@redhat.com> +--- + modules.d/04watchdog/module-setup.sh | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/modules.d/04watchdog/module-setup.sh b/modules.d/04watchdog/module-setup.sh +index b7725ef7..7e32210e 100755 +--- a/modules.d/04watchdog/module-setup.sh ++++ b/modules.d/04watchdog/module-setup.sh +@@ -11,6 +11,11 @@ depends() { + } + + install() { ++ # Do not add watchdog hooks if systemd module is included ++ # In that case, systemd will manage watchdog kick ++ if dracut_module_included "systemd"; then ++ return ++ fi + inst_hook cmdline 00 "$moddir/watchdog.sh" + inst_hook cmdline 50 "$moddir/watchdog.sh" + inst_hook pre-trigger 00 "$moddir/watchdog.sh" diff --git a/SOURCES/0437-watchdog-install-module-for-active-watchdog.patch b/SOURCES/0437-watchdog-install-module-for-active-watchdog.patch new file mode 100644 index 0000000..a9fd352 --- /dev/null +++ b/SOURCES/0437-watchdog-install-module-for-active-watchdog.patch @@ -0,0 +1,94 @@ +From 0be17528e527c3e5081fc7e03ec51bb17d9b08cc Mon Sep 17 00:00:00 2001 +From: Pratyush Anand <panand@redhat.com> +Date: Wed, 16 Mar 2016 09:09:10 +0530 +Subject: [PATCH] watchdog: install module for active watchdog + +Recently following patches have been added in upstream Linux kernel, which +(1) fixes parent of watchdog_device so that +/sys/class/watchdog/watchdogn/device is populated. (2) adds some sysfs +device attributes so that different watchdog status can be read. + +http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=6551881c86c791237a3bebf11eb3bd70b60ea782 +http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=906d7a5cfeda508e7361f021605579a00cd82815 +http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=33b711269ade3f6bc9d9d15e4343e6fa922d999b + +With the above support, now we can find out whether a watchdog is active or +not. We can also find out the driver/module responsible for that watchdog +device. + +Proposed patch uses above support and then adds module of active watchdog +in initramfs generated by dracut for hostonly mode. Kernel module for +inactive watchdog will be added as well for none hostonly mode. + +When an user does not want to add kernel module, then one should exclude +complete dracut watchdog module with --omit. + +Testing: +-- When watchdog is active watchdog modules were added + # cat /sys/class/watchdog/watchdog0/identity + iTCO_wdt + # cat /sys/class/watchdog/watchdog0/state + active + # dracut --hostonly initramfs-test.img -a watchdog + # lsinitrd initramfs-test.img | grep iTCO + -rw-r--r-- 1 root root 9100 Feb 24 09:19 usr/lib/modules/.../kernel/drivers/watchdog/iTCO_vendor_support.ko + -rw-r--r-- 1 root root 19252 Feb 24 09:19 usr/lib/modules/.../kernel/drivers/watchdog/iTCO_wdt.ko + +-- When watchdog is inactive then watchdog modules were not added + # cat /sys/class/watchdog/watchdog0/state + inactive + # dracut --hostonly initramfs-test.img -a watchdog + # lsinitrd initramfs-test.img | grep iTCO + +-- When watchdog is inactive, but no hostonly mode, watchdog modules were added + # cat /sys/class/watchdog/watchdog0/state + inactive + # dracut --no-hostonly initramfs-test.img -a watchdog + # lsinitrd initramfs-test.img | grep iTCO + -rw-r--r-- 1 root root 9100 Feb 24 09:19 usr/lib/modules/.../kernel/drivers/watchdog/iTCO_vendor_support.ko + -rw-r--r-- 1 root root 19252 Feb 24 09:19 usr/lib/modules/.../kernel/drivers/watchdog/iTCO_wdt.ko + +Signed-off-by: Pratyush Anand <panand@redhat.com> +Cc: Dave Young <dyoung@redhat.com> +Cc: Don Zickus <dzickus@redhat.com> +Cc: Harald Hoyer <harald@redhat.com> +--- + modules.d/04watchdog/module-setup.sh | 28 ++++++++++++++++++++++++++++ + 1 file changed, 28 insertions(+) + +diff --git a/modules.d/04watchdog/module-setup.sh b/modules.d/04watchdog/module-setup.sh +index 7e32210e..4680936f 100755 +--- a/modules.d/04watchdog/module-setup.sh ++++ b/modules.d/04watchdog/module-setup.sh +@@ -31,3 +31,31 @@ install() { + inst_multiple -o wdctl + } + ++installkernel() { ++ [[ -d /sys/class/watchdog/ ]] || return ++ for dir in /sys/class/watchdog/*; do ++ [[ -d "$dir" ]] || continue ++ [[ -f "$dir/state" ]] || continue ++ active=$(< "$dir/state") ++ ! [[ $hostonly ]] || [[ "$active" = "active" ]] || continue ++ # device/modalias will return driver of this device ++ wdtdrv=$(< "$dir/device/modalias") ++ # There can be more than one module represented by same ++ # modalias. Currently load all of them. ++ # TODO: Need to find a way to avoid any unwanted module ++ # represented by modalias ++ wdtdrv=$(modprobe -R $wdtdrv) ++ instmods $wdtdrv ++ # however in some cases, we also need to check that if there is ++ # a specific driver for the parent bus/device. In such cases ++ # we also need to enable driver for parent bus/device. ++ wdtppath=$(readlink -f "$dir/device/..") ++ while [ -f "$wdtppath/modalias" ] ++ do ++ wdtpdrv=$(< "$wdtppath/modalias") ++ wdtpdrv=$(modprobe -R $wdtpdrv) ++ instmods $wdtpdrv ++ wdtppath=$(readlink -f "$wdtppath/..") ++ done ++ done ++} diff --git a/SOURCES/0438-watchdog-ensure-that-module-is-loaded-as-early-as-po.patch b/SOURCES/0438-watchdog-ensure-that-module-is-loaded-as-early-as-po.patch new file mode 100644 index 0000000..2f90e5a --- /dev/null +++ b/SOURCES/0438-watchdog-ensure-that-module-is-loaded-as-early-as-po.patch @@ -0,0 +1,56 @@ +From f69cd051ab85fb01ddf00aadd3c559e85d8980f0 Mon Sep 17 00:00:00 2001 +From: Pratyush Anand <panand@redhat.com> +Date: Wed, 16 Mar 2016 09:16:24 +0530 +Subject: [PATCH] watchdog: ensure that module is loaded as early as possible + +It is expected that a watchdog module will disable an active watchdog when +its probe is called ie, when it is loaded. So an early load of the module +will help to disable it earlier. +This can be helpful in some corner cases where kdump and watchdog daemon +both are active. + +Testing: + -- When watchdog kernel modules were added + # dracut --no-hostonly initramfs-test.img -a watchdog + # lsinitrd initramfs-test.img -f etc/cmdline.d/00-watchdog.conf + rd.driver.pre=iTCO_wdt,lpc_ich, + +Signed-off-by: Pratyush Anand <panand@redhat.com> +Cc: Dave Young <dyoung@redhat.com> +Cc: Don Zickus <dzickus@redhat.com> +Cc: Harald Hoyer <harald@redhat.com> +--- + modules.d/04watchdog/module-setup.sh | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/modules.d/04watchdog/module-setup.sh b/modules.d/04watchdog/module-setup.sh +index 4680936f..6b35f9f5 100755 +--- a/modules.d/04watchdog/module-setup.sh ++++ b/modules.d/04watchdog/module-setup.sh +@@ -33,6 +33,7 @@ install() { + + installkernel() { + [[ -d /sys/class/watchdog/ ]] || return ++ wdtcmdline="" + for dir in /sys/class/watchdog/*; do + [[ -d "$dir" ]] || continue + [[ -f "$dir/state" ]] || continue +@@ -46,6 +47,7 @@ installkernel() { + # represented by modalias + wdtdrv=$(modprobe -R $wdtdrv) + instmods $wdtdrv ++ wdtcmdline="$wdtcmdline$(echo $wdtdrv | tr " " ",")," + # however in some cases, we also need to check that if there is + # a specific driver for the parent bus/device. In such cases + # we also need to enable driver for parent bus/device. +@@ -55,7 +57,10 @@ installkernel() { + wdtpdrv=$(< "$wdtppath/modalias") + wdtpdrv=$(modprobe -R $wdtpdrv) + instmods $wdtpdrv ++ wdtcmdline="$wdtcmdline$(echo $wdtpdrv | tr " " ",")," + wdtppath=$(readlink -f "$wdtppath/..") + done + done ++ # ensure that watchdog module is loaded as early as possible ++ [[ $wdtcmdline = "" ]] || echo "rd.driver.pre=$wdtcmdline" > ${initdir}/etc/cmdline.d/00-watchdog.conf + } diff --git a/SOURCES/0439-watchdog-module-setup.sh-rewrite.patch b/SOURCES/0439-watchdog-module-setup.sh-rewrite.patch new file mode 100644 index 0000000..21ced19 --- /dev/null +++ b/SOURCES/0439-watchdog-module-setup.sh-rewrite.patch @@ -0,0 +1,124 @@ +From 4c83fd10ab2a43272eab59719486064085beb2df Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 15 Apr 2016 11:27:20 +0200 +Subject: [PATCH] watchdog/module-setup.sh: rewrite + +- use local variables with _ +- use associative array for the kernel modules +- install emergency hook even in the systemd case +- follow device path until /sys is reached +- set kernel version for modprobe checking +--- + modules.d/04watchdog/module-setup.sh | 92 +++++++++++++++------------- + 1 file changed, 51 insertions(+), 41 deletions(-) + +diff --git a/modules.d/04watchdog/module-setup.sh b/modules.d/04watchdog/module-setup.sh +index 6b35f9f5..31102f4e 100755 +--- a/modules.d/04watchdog/module-setup.sh ++++ b/modules.d/04watchdog/module-setup.sh +@@ -13,54 +13,64 @@ depends() { + install() { + # Do not add watchdog hooks if systemd module is included + # In that case, systemd will manage watchdog kick +- if dracut_module_included "systemd"; then +- return ++ if ! dracut_module_included "systemd"; then ++ inst_hook cmdline 00 "$moddir/watchdog.sh" ++ inst_hook cmdline 50 "$moddir/watchdog.sh" ++ inst_hook pre-trigger 00 "$moddir/watchdog.sh" ++ inst_hook initqueue 00 "$moddir/watchdog.sh" ++ inst_hook mount 00 "$moddir/watchdog.sh" ++ inst_hook mount 50 "$moddir/watchdog.sh" ++ inst_hook mount 99 "$moddir/watchdog.sh" ++ inst_hook pre-pivot 00 "$moddir/watchdog.sh" ++ inst_hook pre-pivot 99 "$moddir/watchdog.sh" ++ inst_hook cleanup 00 "$moddir/watchdog.sh" ++ inst_hook cleanup 99 "$moddir/watchdog.sh" + fi +- inst_hook cmdline 00 "$moddir/watchdog.sh" +- inst_hook cmdline 50 "$moddir/watchdog.sh" +- inst_hook pre-trigger 00 "$moddir/watchdog.sh" +- inst_hook initqueue 00 "$moddir/watchdog.sh" +- inst_hook mount 00 "$moddir/watchdog.sh" +- inst_hook mount 50 "$moddir/watchdog.sh" +- inst_hook mount 99 "$moddir/watchdog.sh" +- inst_hook pre-pivot 00 "$moddir/watchdog.sh" +- inst_hook pre-pivot 99 "$moddir/watchdog.sh" +- inst_hook cleanup 00 "$moddir/watchdog.sh" +- inst_hook cleanup 99 "$moddir/watchdog.sh" + inst_hook emergency 02 "$moddir/watchdog-stop.sh" + inst_multiple -o wdctl + } + + installkernel() { ++ local -A _drivers ++ local _alldrivers _active _wdtdrv _wdtppath _dir + [[ -d /sys/class/watchdog/ ]] || return +- wdtcmdline="" +- for dir in /sys/class/watchdog/*; do +- [[ -d "$dir" ]] || continue +- [[ -f "$dir/state" ]] || continue +- active=$(< "$dir/state") +- ! [[ $hostonly ]] || [[ "$active" = "active" ]] || continue +- # device/modalias will return driver of this device +- wdtdrv=$(< "$dir/device/modalias") +- # There can be more than one module represented by same +- # modalias. Currently load all of them. +- # TODO: Need to find a way to avoid any unwanted module +- # represented by modalias +- wdtdrv=$(modprobe -R $wdtdrv) +- instmods $wdtdrv +- wdtcmdline="$wdtcmdline$(echo $wdtdrv | tr " " ",")," +- # however in some cases, we also need to check that if there is +- # a specific driver for the parent bus/device. In such cases +- # we also need to enable driver for parent bus/device. +- wdtppath=$(readlink -f "$dir/device/..") +- while [ -f "$wdtppath/modalias" ] +- do +- wdtpdrv=$(< "$wdtppath/modalias") +- wdtpdrv=$(modprobe -R $wdtpdrv) +- instmods $wdtpdrv +- wdtcmdline="$wdtcmdline$(echo $wdtpdrv | tr " " ",")," +- wdtppath=$(readlink -f "$wdtppath/..") +- done ++ for _dir in /sys/class/watchdog/*; do ++ [[ -d "$_dir" ]] || continue ++ [[ -f "$_dir/state" ]] || continue ++ _active=$(< "$_dir/state") ++ ! [[ $hostonly ]] || [[ "$_active" = "active" ]] || continue ++ # device/modalias will return driver of this device ++ _wdtdrv=$(< "$_dir/device/modalias") ++ # There can be more than one module represented by same ++ # modalias. Currently load all of them. ++ # TODO: Need to find a way to avoid any unwanted module ++ # represented by modalias ++ _wdtdrv=$(modprobe --set-version "$kernel" -R $_wdtdrv 2>/dev/null) ++ if [[ $_wdtdrv ]]; then ++ instmods $_wdtdrv ++ for i in $_wdtdrv; do ++ _drivers[$i]=1 ++ done ++ fi ++ # however in some cases, we also need to check that if there is ++ # a specific driver for the parent bus/device. In such cases ++ # we also need to enable driver for parent bus/device. ++ _wdtppath=$(readlink -f "$_dir/device/..") ++ while [[ -d "$_wdtppath" ]] && [[ "$_wdtppath" != "/sys" ]]; do ++ _wdtppath=$(readlink -f "$_wdtppath/..") ++ [[ -f "$_wdtppath/modalias" ]] || continue ++ ++ _wdtdrv=$(< "$_wdtppath/modalias") ++ _wdtdrv=$(modprobe --set-version "$kernel" -R $_wdtdrv 2>/dev/null) ++ if [[ $_wdtdrv ]]; then ++ instmods $_wdtdrv ++ for i in $_wdtdrv; do ++ _drivers[$i]=1 ++ done ++ fi ++ done + done + # ensure that watchdog module is loaded as early as possible +- [[ $wdtcmdline = "" ]] || echo "rd.driver.pre=$wdtcmdline" > ${initdir}/etc/cmdline.d/00-watchdog.conf ++ _alldrivers="${!_drivers[*]}" ++ [[ $_alldrivers ]] && echo "rd.driver.pre=${_alldrivers// /,}" > ${initdir}/etc/cmdline.d/00-watchdog.conf + } diff --git a/SOURCES/0440-watchdog-clean-return-of-installkernel.patch b/SOURCES/0440-watchdog-clean-return-of-installkernel.patch new file mode 100644 index 0000000..ae5269d --- /dev/null +++ b/SOURCES/0440-watchdog-clean-return-of-installkernel.patch @@ -0,0 +1,21 @@ +From 0eb1ee3db2f905c17757a06f77a5d79a351b3d33 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Mon, 18 Apr 2016 15:49:06 +0200 +Subject: [PATCH] watchdog: clean return of installkernel() + +return 0, otherwise if _alldrivers is empty, the return code is fail +--- + modules.d/04watchdog/module-setup.sh | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/modules.d/04watchdog/module-setup.sh b/modules.d/04watchdog/module-setup.sh +index 31102f4e..fbf6d6dd 100755 +--- a/modules.d/04watchdog/module-setup.sh ++++ b/modules.d/04watchdog/module-setup.sh +@@ -73,4 +73,6 @@ installkernel() { + # ensure that watchdog module is loaded as early as possible + _alldrivers="${!_drivers[*]}" + [[ $_alldrivers ]] && echo "rd.driver.pre=${_alldrivers// /,}" > ${initdir}/etc/cmdline.d/00-watchdog.conf ++ ++ return 0 + } diff --git a/SOURCES/0441-watchdog-start-traversing-the-device-tree-from-the-r.patch b/SOURCES/0441-watchdog-start-traversing-the-device-tree-from-the-r.patch new file mode 100644 index 0000000..3b76324 --- /dev/null +++ b/SOURCES/0441-watchdog-start-traversing-the-device-tree-from-the-r.patch @@ -0,0 +1,24 @@ +From 149249007068cfe428beeb523e14d5af72e47f15 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Mon, 18 Apr 2016 15:50:42 +0200 +Subject: [PATCH] watchdog: start traversing the device tree from the right + directory + +start with the device subtree, not with the parent of it +--- + modules.d/04watchdog/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/04watchdog/module-setup.sh b/modules.d/04watchdog/module-setup.sh +index fbf6d6dd..86b0aee8 100755 +--- a/modules.d/04watchdog/module-setup.sh ++++ b/modules.d/04watchdog/module-setup.sh +@@ -55,7 +55,7 @@ installkernel() { + # however in some cases, we also need to check that if there is + # a specific driver for the parent bus/device. In such cases + # we also need to enable driver for parent bus/device. +- _wdtppath=$(readlink -f "$_dir/device/..") ++ _wdtppath=$(readlink -f "$_dir/device") + while [[ -d "$_wdtppath" ]] && [[ "$_wdtppath" != "/sys" ]]; do + _wdtppath=$(readlink -f "$_wdtppath/..") + [[ -f "$_wdtppath/modalias" ]] || continue diff --git a/SOURCES/0442-dracut.spec-remove-trailing-space.patch b/SOURCES/0442-dracut.spec-remove-trailing-space.patch new file mode 100644 index 0000000..ed67141 --- /dev/null +++ b/SOURCES/0442-dracut.spec-remove-trailing-space.patch @@ -0,0 +1,22 @@ +From 038f142ef9fce4cf896ef0bb4860bcfd6e407ecd Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 6 Jul 2016 09:17:36 +0200 +Subject: [PATCH] dracut.spec: remove trailing space + +--- + dracut.spec | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dracut.spec b/dracut.spec +index 780ed703..efb50b77 100644 +--- a/dracut.spec ++++ b/dracut.spec +@@ -91,7 +91,7 @@ Requires: gzip xz + Requires: kmod + Requires: sed + Requires: kpartx +-Requires: tar ++Requires: tar + + %if 0%{?fedora} || 0%{?rhel} > 6 + Requires: util-linux >= 2.21 diff --git a/SOURCES/0443-fips-use-lib-modules-uname-r-modules.fips.patch b/SOURCES/0443-fips-use-lib-modules-uname-r-modules.fips.patch new file mode 100644 index 0000000..411728b --- /dev/null +++ b/SOURCES/0443-fips-use-lib-modules-uname-r-modules.fips.patch @@ -0,0 +1,39 @@ +From 0eb1afa9ea7e7807ef032f03563885996d26a961 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 21 Jul 2016 15:07:52 +0200 +Subject: [PATCH] fips: use /lib/modules/$(uname -r)/modules.fips + +if /lib/modules/$(uname -r)/modules.fips exists, use that list instead +of the dracut module list. +--- + modules.d/01fips/module-setup.sh | 17 +++++++++++------ + 1 file changed, 11 insertions(+), 6 deletions(-) + +diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh +index 77ed24ef..e1296d75 100755 +--- a/modules.d/01fips/module-setup.sh ++++ b/modules.d/01fips/module-setup.sh +@@ -12,12 +12,17 @@ depends() { + + installkernel() { + local _fipsmodules _mod +- _fipsmodules="aead aes_generic aes-x86_64 ansi_cprng arc4 blowfish camellia cast6 cbc ccm " +- _fipsmodules+="chainiv crc32c crct10dif_generic cryptomgr crypto_null ctr cts deflate des des3_ede dm-crypt dm-mod drbg " +- _fipsmodules+="ecb eseqiv fcrypt gcm ghash_generic hmac khazad lzo md4 md5 michael_mic rmd128 " +- _fipsmodules+="rmd160 rmd256 rmd320 rot13 salsa20 seed seqiv serpent sha1 sha224 sha256 sha256_generic " +- _fipsmodules+="aes_s390 des_s390 prng sha256_s390 sha_common des_check_key sha1_s390 sha512_s390" +- _fipsmodules+="sha384 sha512 sha512_generic tcrypt tea tnepres twofish wp256 wp384 wp512 xeta xtea xts zlib" ++ ++ if [[ -f "${srcmods}/modules.fips" ]]; then ++ _fipsmodules="$(cat "${srcmods}/modules.fips")" ++ else ++ _fipsmodules="aead aes_generic aes-x86_64 ansi_cprng arc4 blowfish camellia cast6 cbc ccm " ++ _fipsmodules+="chainiv crc32c crct10dif_generic cryptomgr crypto_null ctr cts deflate des des3_ede dm-crypt dm-mod drbg " ++ _fipsmodules+="ecb eseqiv fcrypt gcm ghash_generic hmac khazad lzo md4 md5 michael_mic rmd128 " ++ _fipsmodules+="rmd160 rmd256 rmd320 rot13 salsa20 seed seqiv serpent sha1 sha224 sha256 sha256_generic " ++ _fipsmodules+="aes_s390 des_s390 prng sha256_s390 sha_common des_check_key sha1_s390 sha512_s390" ++ _fipsmodules+="sha384 sha512 sha512_generic tcrypt tea tnepres twofish wp256 wp384 wp512 xeta xtea xts zlib" ++ fi + + mkdir -m 0755 -p "${initdir}/etc/modprobe.d" + diff --git a/SOURCES/0444-fips-add-sha1-mb-to-fips-modules.patch b/SOURCES/0444-fips-add-sha1-mb-to-fips-modules.patch new file mode 100644 index 0000000..c8f01da --- /dev/null +++ b/SOURCES/0444-fips-add-sha1-mb-to-fips-modules.patch @@ -0,0 +1,22 @@ +From 2f42cfcbebdde63a5e98241c04e14f138d142f1f Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 21 Jul 2016 15:08:59 +0200 +Subject: [PATCH] fips: add "sha1-mb" to fips modules + +https://bugzilla.redhat.com/show_bug.cgi?id=1357080 +--- + modules.d/01fips/module-setup.sh | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh +index e1296d75..32d10d06 100755 +--- a/modules.d/01fips/module-setup.sh ++++ b/modules.d/01fips/module-setup.sh +@@ -22,6 +22,7 @@ installkernel() { + _fipsmodules+="rmd160 rmd256 rmd320 rot13 salsa20 seed seqiv serpent sha1 sha224 sha256 sha256_generic " + _fipsmodules+="aes_s390 des_s390 prng sha256_s390 sha_common des_check_key sha1_s390 sha512_s390" + _fipsmodules+="sha384 sha512 sha512_generic tcrypt tea tnepres twofish wp256 wp384 wp512 xeta xtea xts zlib" ++ _fipsmodules+="sha1-mb" + fi + + mkdir -m 0755 -p "${initdir}/etc/modprobe.d" diff --git a/SOURCES/0445-nfs-install-all-nfs-modules-non-hostonly.patch b/SOURCES/0445-nfs-install-all-nfs-modules-non-hostonly.patch new file mode 100644 index 0000000..c8f09da --- /dev/null +++ b/SOURCES/0445-nfs-install-all-nfs-modules-non-hostonly.patch @@ -0,0 +1,24 @@ +From b077d18963436f6771e7ce3c486bcb2ae80165db Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 22 Jul 2016 08:30:36 +0200 +Subject: [PATCH] nfs: install all nfs modules non-hostonly + +If nfs is used, we should include all nfs modules, in the case, where +$host_fs_types contains nfs. +--- + modules.d/95nfs/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/95nfs/module-setup.sh b/modules.d/95nfs/module-setup.sh +index 02838a49..de5a754a 100755 +--- a/modules.d/95nfs/module-setup.sh ++++ b/modules.d/95nfs/module-setup.sh +@@ -25,7 +25,7 @@ depends() { + } + + installkernel() { +- instmods nfs sunrpc ipv6 nfsv2 nfsv3 nfsv4 nfs_acl nfs_layout_nfsv41_files ++ hostonly='' instmods nfs sunrpc ipv6 nfsv2 nfsv3 nfsv4 nfs_acl nfs_layout_nfsv41_files + } + + install() { diff --git a/SOURCES/0446-dracut.sh-extend-host_fs_types-with-filesystems.patch b/SOURCES/0446-dracut.sh-extend-host_fs_types-with-filesystems.patch new file mode 100644 index 0000000..17088de --- /dev/null +++ b/SOURCES/0446-dracut.sh-extend-host_fs_types-with-filesystems.patch @@ -0,0 +1,30 @@ +From b7c7b16d4ec61e3924c1006bf13d641904825cda Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 22 Jul 2016 08:39:38 +0200 +Subject: [PATCH] dracut.sh: extend host_fs_types with $filesystems + +Additional filesystems specified on the kernel command line or in the +configuration files, should trigger the inclusion of the corresponding +dracut modules, therefore host_fs_types is extended with these +filesystems. +--- + dracut.sh | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/dracut.sh b/dracut.sh +index fefdefd5..0a699737 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1174,6 +1174,12 @@ for dev in "${!host_fs_types[@]}"; do + fi + done + ++# also put the additional filesystems in host_fs_types ++# so that the according modules are installed. ++for fs in $filesystems; do ++ host_fs_types[$fs]="$fs" ++done ++ + [[ -d $udevdir ]] \ + || udevdir="$(pkg-config udev --variable=udevdir 2>/dev/null)" + if ! [[ -d "$udevdir" ]]; then diff --git a/SOURCES/0447-lvm-include-etc-lvm-lvm_-host_tag-.conf.patch b/SOURCES/0447-lvm-include-etc-lvm-lvm_-host_tag-.conf.patch new file mode 100644 index 0000000..2be6308 --- /dev/null +++ b/SOURCES/0447-lvm-include-etc-lvm-lvm_-host_tag-.conf.patch @@ -0,0 +1,38 @@ +From 20171c75197c799d4710d04a0d6d1f73c510213b Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 22 Jul 2016 13:26:10 +0200 +Subject: [PATCH] lvm: include /etc/lvm/lvm_<host_tag>.conf + +https://bugzilla.redhat.com/show_bug.cgi?id=1328778 +--- + modules.d/90lvm/module-setup.sh | 17 ++++++++++------- + 1 file changed, 10 insertions(+), 7 deletions(-) + +diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh +index 5e374fbc..23d63a04 100755 +--- a/modules.d/90lvm/module-setup.sh ++++ b/modules.d/90lvm/module-setup.sh +@@ -60,13 +60,16 @@ install() { + inst_rules "$moddir/64-lvm.rules" + + if [[ $hostonly ]] || [[ $lvmconf = "yes" ]]; then +- if [ -f /etc/lvm/lvm.conf ]; then +- inst_simple /etc/lvm/lvm.conf +- # FIXME: near-term hack to establish read-only locking; +- # use command-line lvm.conf editor once it is available +- sed -i -e 's/\(^[[:space:]]*\)locking_type[[:space:]]*=[[:space:]]*[[:digit:]]/\1locking_type = 4/' ${initdir}/etc/lvm/lvm.conf +- sed -i -e 's/\(^[[:space:]]*\)use_lvmetad[[:space:]]*=[[:space:]]*[[:digit:]]/\1use_lvmetad = 0/' ${initdir}/etc/lvm/lvm.conf +- fi ++ for f in /etc/lvm/lvm.conf /etc/lvm/lvm_*.conf; do ++ [ -e "$f" ] || continue ++ inst_simple "$f" ++ if [ -f "${initdir}/$f" ]; then ++ # FIXME: near-term hack to establish read-only locking; ++ # use command-line lvm.conf editor once it is available ++ sed -i -e 's/\(^[[:space:]]*\)locking_type[[:space:]]*=[[:space:]]*[[:digit:]]/\1locking_type = 4/' "${initdir}/$f" ++ sed -i -e 's/\(^[[:space:]]*\)use_lvmetad[[:space:]]*=[[:space:]]*[[:digit:]]/\1use_lvmetad = 0/' "${initdir}/$f" ++ fi ++ done + fi + + if ! [[ -e ${initdir}/etc/lvm/lvm.conf ]]; then diff --git a/SOURCES/0448-add-rd.emergency-reboot-poweroff-halt.patch b/SOURCES/0448-add-rd.emergency-reboot-poweroff-halt.patch new file mode 100644 index 0000000..97ac785 --- /dev/null +++ b/SOURCES/0448-add-rd.emergency-reboot-poweroff-halt.patch @@ -0,0 +1,110 @@ +From cd6679c71665a53e2a55a204e7ea64b4a6d14030 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 22 Jul 2016 13:32:47 +0200 +Subject: [PATCH] add rd.emergency=[reboot|poweroff|halt] + +specifies what action to execute in case of a critical failure + +(cherry picked from commit c45e856a659a37537c107f7ef3e680abf60a96a5) + +https://bugzilla.redhat.com/show_bug.cgi?id=1359144 +--- + dracut.cmdline.7.asc | 3 +++ + modules.d/98systemd/dracut-emergency.sh | 12 +++++++++++- + modules.d/99base/dracut-lib.sh | 24 ++++++++++++++++-------- + 3 files changed, 30 insertions(+), 9 deletions(-) + +diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc +index 1cf962e6..1fb4f746 100644 +--- a/dracut.cmdline.7.asc ++++ b/dracut.cmdline.7.asc +@@ -108,6 +108,9 @@ resume=UUID=3f5ad593-4546-4a94-a374-bcfb68aa11f7 + + Misc + ~~~~ ++**rd.emergency=**__[reboot|poweroff|halt]__:: ++ specify, what action to execute in case of a critical failure. ++ + **rd.driver.blacklist=**__<drivername>__[,__<drivername>__,...]:: + do not load kernel module <drivername>. This parameter can be specified + multiple times. +diff --git a/modules.d/98systemd/dracut-emergency.sh b/modules.d/98systemd/dracut-emergency.sh +index 5771dc5e..b3e8d087 100755 +--- a/modules.d/98systemd/dracut-emergency.sh ++++ b/modules.d/98systemd/dracut-emergency.sh +@@ -16,6 +16,7 @@ export _rdshell_name="dracut" action="Boot" hook="emergency" + + source_hook "$hook" + ++_emergency_action=$(getarg rd.emergency) + + if getargbool 1 rd.shell -d -y rdshell || getarg rd.break -d rdbreak; then + echo +@@ -33,9 +34,18 @@ if getargbool 1 rd.shell -d -y rdshell || getarg rd.break -d rdbreak; then + exec sh -i -l + else + warn "$action has failed. To debug this issue add \"rd.shell rd.debug\" to the kernel command line." +- exit 1 ++ [ -z "$_emergency_action" ] && _emergency_action=halt + fi + + /bin/rm -f -- /.console_lock + ++case "$_emergency_action" in ++ reboot) ++ reboot || exit 1;; ++ poweroff) ++ poweroff || exit 1;; ++ halt) ++ halt || exit 1;; ++esac ++ + exit 0 +diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh +index 16bc74d4..10d9cbc5 100755 +--- a/modules.d/99base/dracut-lib.sh ++++ b/modules.d/99base/dracut-lib.sh +@@ -1068,6 +1068,8 @@ emergency_shell() + local _ctty + set +e + local _rdshell_name="dracut" action="Boot" hook="emergency" ++ local _emergency_action ++ + if [ "$1" = "-n" ]; then + _rdshell_name=$2 + shift 2 +@@ -1086,20 +1088,26 @@ emergency_shell() + source_hook "$hook" + echo + ++ _emergency_action=$(getarg rd.emergency) ++ [ -z "$_emergency_action" ] \ ++ && [ -e /run/initramfs/.die ] \ ++ && _emergency_action=halt ++ + if getargbool 1 rd.shell -d -y rdshell || getarg rd.break -d rdbreak; then + _emergency_shell $_rdshell_name + else + warn "$action has failed. To debug this issue add \"rd.shell rd.debug\" to the kernel command line." +- # cause a kernel panic +- exit 1 ++ [ -z "$_emergency_action" ] && _emergency_action=halt + fi + +- if [ -e /run/initramfs/.die ]; then +- if [ -n "$DRACUT_SYSTEMD" ]; then +- systemctl --no-block --force halt +- fi +- exit 1 +- fi ++ case "$_emergency_action" in ++ reboot) ++ reboot || exit 1;; ++ poweroff) ++ poweroff || exit 1;; ++ halt) ++ halt || exit 1;; ++ esac + } + + action_on_fail() diff --git a/SOURCES/0449-fips-module-add-missing-spaces.patch b/SOURCES/0449-fips-module-add-missing-spaces.patch new file mode 100644 index 0000000..4f90aff --- /dev/null +++ b/SOURCES/0449-fips-module-add-missing-spaces.patch @@ -0,0 +1,25 @@ +From 10e6bf0e43c4ccde7850d5a8f6ff337af835dc38 Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn <lnykryn@redhat.com> +Date: Thu, 28 Jul 2016 11:02:19 +0200 +Subject: [PATCH] fips-module: add missing spaces + +https://bugzilla.redhat.com/show_bug.cgi?id=1359677 +--- + modules.d/01fips/module-setup.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh +index 32d10d06..43d170f1 100755 +--- a/modules.d/01fips/module-setup.sh ++++ b/modules.d/01fips/module-setup.sh +@@ -20,8 +20,8 @@ installkernel() { + _fipsmodules+="chainiv crc32c crct10dif_generic cryptomgr crypto_null ctr cts deflate des des3_ede dm-crypt dm-mod drbg " + _fipsmodules+="ecb eseqiv fcrypt gcm ghash_generic hmac khazad lzo md4 md5 michael_mic rmd128 " + _fipsmodules+="rmd160 rmd256 rmd320 rot13 salsa20 seed seqiv serpent sha1 sha224 sha256 sha256_generic " +- _fipsmodules+="aes_s390 des_s390 prng sha256_s390 sha_common des_check_key sha1_s390 sha512_s390" +- _fipsmodules+="sha384 sha512 sha512_generic tcrypt tea tnepres twofish wp256 wp384 wp512 xeta xtea xts zlib" ++ _fipsmodules+="aes_s390 des_s390 prng sha256_s390 sha_common des_check_key sha1_s390 sha512_s390 " ++ _fipsmodules+="sha384 sha512 sha512_generic tcrypt tea tnepres twofish wp256 wp384 wp512 xeta xtea xts zlib " + _fipsmodules+="sha1-mb" + fi + diff --git a/SOURCES/0450-fips-remove-sha1-mb.patch b/SOURCES/0450-fips-remove-sha1-mb.patch new file mode 100644 index 0000000..12a6a41 --- /dev/null +++ b/SOURCES/0450-fips-remove-sha1-mb.patch @@ -0,0 +1,22 @@ +From 8dd6ff8d6a0a3173bded683ecf85834cce7cf297 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 9 Aug 2016 13:01:32 +0200 +Subject: [PATCH] fips: remove sha1-mb + +This module should be loaded automatically, if the HW supports it. +--- + modules.d/01fips/module-setup.sh | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh +index 43d170f1..dc476347 100755 +--- a/modules.d/01fips/module-setup.sh ++++ b/modules.d/01fips/module-setup.sh +@@ -22,7 +22,6 @@ installkernel() { + _fipsmodules+="rmd160 rmd256 rmd320 rot13 salsa20 seed seqiv serpent sha1 sha224 sha256 sha256_generic " + _fipsmodules+="aes_s390 des_s390 prng sha256_s390 sha_common des_check_key sha1_s390 sha512_s390 " + _fipsmodules+="sha384 sha512 sha512_generic tcrypt tea tnepres twofish wp256 wp384 wp512 xeta xtea xts zlib " +- _fipsmodules+="sha1-mb" + fi + + mkdir -m 0755 -p "${initdir}/etc/modprobe.d" diff --git a/SOURCES/0451-dracut-functions.sh-catch-all-lvm-slaves.patch b/SOURCES/0451-dracut-functions.sh-catch-all-lvm-slaves.patch new file mode 100644 index 0000000..d086aad --- /dev/null +++ b/SOURCES/0451-dracut-functions.sh-catch-all-lvm-slaves.patch @@ -0,0 +1,55 @@ +From 7a7b8c174023886b015bd484372839aecf63f324 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 9 Aug 2016 15:26:04 +0200 +Subject: [PATCH] dracut-functions.sh: catch all lvm slaves + +add check_vol_slaves_all to be used in check_block_and_slaves_all + +otherwise only the first lvm VG member would be processed +--- + dracut-functions.sh | 25 ++++++++++++++++++++++++- + 1 file changed, 24 insertions(+), 1 deletion(-) + +diff --git a/dracut-functions.sh b/dracut-functions.sh +index 4a9729c7..61726e44 100755 +--- a/dracut-functions.sh ++++ b/dracut-functions.sh +@@ -632,7 +632,7 @@ check_block_and_slaves_all() { + if ! lvm_internal_dev $2 && "$1" $2; then + _ret=0 + fi +- check_vol_slaves "$@" && return 0 ++ check_vol_slaves_all "$@" && return 0 + if [[ -f /sys/dev/block/$2/../dev ]]; then + check_block_and_slaves_all $1 $(<"/sys/dev/block/$2/../dev") && _ret=0 + fi +@@ -703,6 +703,29 @@ check_vol_slaves() { + return 1 + } + ++check_vol_slaves_all() { ++ local _lv _vg _pv ++ for i in /dev/mapper/*; do ++ [[ $i == /dev/mapper/control ]] && continue ++ _lv=$(get_maj_min $i) ++ if [[ $_lv = $2 ]]; then ++ _vg=$(lvm lvs --noheadings -o vg_name $i 2>/dev/null) ++ # strip space ++ _vg="${_vg//[[:space:]]/}" ++ if [[ $_vg ]]; then ++ for _pv in $(lvm vgs --noheadings -o pv_name "$_vg" 2>/dev/null) ++ do ++ check_block_and_slaves_all $1 $(get_maj_min $_pv) ++ done ++ return 0 ++ fi ++ fi ++ done ++ return 1 ++} ++ ++ ++ + # fs_get_option <filesystem options> <search for option> + # search for a specific option in a bunch of filesystem options + # and return the value diff --git a/SOURCES/0452-systemd-dracut-cmdline.sh-unset-UNSET-root.patch b/SOURCES/0452-systemd-dracut-cmdline.sh-unset-UNSET-root.patch new file mode 100644 index 0000000..3ef4214 --- /dev/null +++ b/SOURCES/0452-systemd-dracut-cmdline.sh-unset-UNSET-root.patch @@ -0,0 +1,42 @@ +From fc77aca7ddbd33328066a943a4de09de34d25c4c Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 12 Aug 2016 11:24:47 +0200 +Subject: [PATCH] systemd/dracut-cmdline.sh: unset "UNSET" $root + +https://bugzilla.redhat.com/show_bug.cgi?id=1365667 +caused by commit 9aa224cc +--- + modules.d/98systemd/dracut-cmdline.sh | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/modules.d/98systemd/dracut-cmdline.sh b/modules.d/98systemd/dracut-cmdline.sh +index d22e4d6e..17b30a34 100755 +--- a/modules.d/98systemd/dracut-cmdline.sh ++++ b/modules.d/98systemd/dracut-cmdline.sh +@@ -26,7 +26,7 @@ source_conf /etc/conf.d + # between the case where it was set to the empty string and the case where it + # wasn't specified at all. + if ! root="$(getarg root=)"; then +- root='UNSET' ++ root_unset='UNSET' + fi + + rflags="$(getarg rootflags=)" +@@ -50,7 +50,7 @@ source_hook cmdline + + [ -f /lib/dracut/parse-resume.sh ] && . /lib/dracut/parse-resume.sh + +-case "$root" in ++case "${root}${root_unset}" in + block:LABEL=*|LABEL=*) + root="${root#block:}" + root="$(echo $root | sed 's,/,\\x2f,g')" +@@ -76,7 +76,7 @@ case "$root" in + rootok=1 ;; + esac + +-[ -z "$root" ] && die "Empty root= argument" ++[ -z "${root}${root_unset}" ] && die "Empty root= argument" + [ -z "$rootok" ] && die "Don't know how to handle 'root=$root'" + + export root rflags fstype netroot NEWROOT diff --git a/SOURCES/0453-network-ibft-put-IPv6-IP-in-brackets.patch b/SOURCES/0453-network-ibft-put-IPv6-IP-in-brackets.patch new file mode 100644 index 0000000..b8b543a --- /dev/null +++ b/SOURCES/0453-network-ibft-put-IPv6-IP-in-brackets.patch @@ -0,0 +1,28 @@ +From b8e6c051c6ad6ae3ae93db8e74f37dbc82c22514 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 17 Aug 2016 16:25:09 +0200 +Subject: [PATCH] network:ibft put IPv6 IP in brackets + +ip=2620:0052:0000:2220:0226:b9ff:fe81:cde4::[2620:0052:0000:2220:0000:0000:0000:03fe]:64::ibft0:none + +should be + +ip=[2620:0052:0000:2220:0226:b9ff:fe81:cde4]::[2620:0052:0000:2220:0000:0000:0000:03fe]:64::ibft0:none + +https://bugzilla.redhat.com/show_bug.cgi?id=1322592#c19 +--- + modules.d/40network/net-lib.sh | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index de334d98..3459e898 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -277,6 +277,7 @@ ibft_to_cmdline() { + [ -e ${iface}/hostname ] && hostname=$(read a < ${iface}/hostname; echo $a) + if [ "$family" = "ipv6" ] ; then + if [ -n "$ip" ] ; then ++ ip="[$ip]" + [ -n "$prefix" ] || prefix=64 + mask="$prefix" + fi diff --git a/SOURCES/0454-url-lib-ca-bundle.crt-changed-to-a-symlink.patch b/SOURCES/0454-url-lib-ca-bundle.crt-changed-to-a-symlink.patch new file mode 100644 index 0000000..d58824f --- /dev/null +++ b/SOURCES/0454-url-lib-ca-bundle.crt-changed-to-a-symlink.patch @@ -0,0 +1,30 @@ +From 1b23c6c65c39630cb62faa2503817759f83d880b Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 17 Aug 2016 16:41:21 +0200 +Subject: [PATCH] url-lib: ca-bundle.crt changed to a symlink + +use inst() instead of inst_simple() + +/etc/pki/tls/certs/ca-bundle.crt is a symlink to +../../ca-trust/extracted/pem/tls-ca-bundle.pem + +with inst() we install the original file also. + +https://bugzilla.redhat.com/show_bug.cgi?id=1341280 +--- + modules.d/45url-lib/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/45url-lib/module-setup.sh b/modules.d/45url-lib/module-setup.sh +index f2d068b3..6a2bb832 100755 +--- a/modules.d/45url-lib/module-setup.sh ++++ b/modules.d/45url-lib/module-setup.sh +@@ -28,7 +28,7 @@ install() { + _crt=$(grep -F --binary-files=text -z .crt $_lib) + [[ $_crt ]] || continue + [[ $_crt == /*/* ]] || continue +- if ! inst_simple "$_crt"; then ++ if ! inst "$_crt"; then + dwarn "Couldn't install '$_crt' SSL CA cert bundle; HTTPS might not work." + continue + fi diff --git a/SOURCES/0455-dracut.sh-document-hostonly-i18n-and-no-hostonly-i18.patch b/SOURCES/0455-dracut.sh-document-hostonly-i18n-and-no-hostonly-i18.patch new file mode 100644 index 0000000..cb90315 --- /dev/null +++ b/SOURCES/0455-dracut.sh-document-hostonly-i18n-and-no-hostonly-i18.patch @@ -0,0 +1,26 @@ +From 91896ab68e26b9f9191f4742dc8ad9c5025eac7f Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 17 Aug 2016 16:48:07 +0200 +Subject: [PATCH] dracut.sh: document --hostonly-i18n and --no-hostonly-i18n + +show description in --help + +https://bugzilla.redhat.com/show_bug.cgi?id=1266448 +--- + dracut.sh | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/dracut.sh b/dracut.sh +index 0a699737..90ea9c32 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -141,6 +141,9 @@ Creates initial ramdisk images for preloading modules + in the initramfs + --no-hostonly-cmdline Do not store kernel command line arguments needed + in the initramfs ++ --hostonly-i18n Install only needed keyboard and font files according ++ to the host configuration (default). ++ --no-hostonly-i18n Install all keyboard and font files available. + --persistent-policy [POLICY] + Use [POLICY] to address disks and partitions. + POLICY can be any directory name found in /dev/disk. diff --git a/SOURCES/0456-dracut.cmdline.7.asc-document-rd.shell-0-for-rd.emer.patch b/SOURCES/0456-dracut.cmdline.7.asc-document-rd.shell-0-for-rd.emer.patch new file mode 100644 index 0000000..e3fc8e0 --- /dev/null +++ b/SOURCES/0456-dracut.cmdline.7.asc-document-rd.shell-0-for-rd.emer.patch @@ -0,0 +1,23 @@ +From 1d267fb82c1e12e06ef80de16f5232ef06c84240 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 17 Aug 2016 16:49:00 +0200 +Subject: [PATCH] dracut.cmdline.7.asc: document rd.shell=0 for rd.emergency + +--- + dracut.cmdline.7.asc | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc +index 1fb4f746..b479fa89 100644 +--- a/dracut.cmdline.7.asc ++++ b/dracut.cmdline.7.asc +@@ -109,7 +109,8 @@ resume=UUID=3f5ad593-4546-4a94-a374-bcfb68aa11f7 + Misc + ~~~~ + **rd.emergency=**__[reboot|poweroff|halt]__:: +- specify, what action to execute in case of a critical failure. ++ specify, what action to execute in case of a critical failure. rd.shell=0 also ++ be specified. + + **rd.driver.blacklist=**__<drivername>__[,__<drivername>__,...]:: + do not load kernel module <drivername>. This parameter can be specified diff --git a/SOURCES/0457-nfs-install-more-kernel-modules.patch b/SOURCES/0457-nfs-install-more-kernel-modules.patch new file mode 100644 index 0000000..36c8ce0 --- /dev/null +++ b/SOURCES/0457-nfs-install-more-kernel-modules.patch @@ -0,0 +1,25 @@ +From 8c67fb91232d52d15effce75eb564d26b0a1e994 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 19 Aug 2016 15:56:47 +0200 +Subject: [PATCH] nfs: install more kernel modules + +adds support for rpcrdma to support NFSROOT over NFSoRDMA + +https://bugzilla.redhat.com/show_bug.cgi?id=1367374 +--- + modules.d/95nfs/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/95nfs/module-setup.sh b/modules.d/95nfs/module-setup.sh +index de5a754a..dc2e7221 100755 +--- a/modules.d/95nfs/module-setup.sh ++++ b/modules.d/95nfs/module-setup.sh +@@ -25,7 +25,7 @@ depends() { + } + + installkernel() { +- hostonly='' instmods nfs sunrpc ipv6 nfsv2 nfsv3 nfsv4 nfs_acl nfs_layout_nfsv41_files ++ hostonly='' instmods =net/sunrpc =fs/nfs ipv6 nfs_acl nfs_layout_nfsv41_files + } + + install() { diff --git a/SOURCES/0458-TEST-16-DMSQUASH-add-sr_mod.patch b/SOURCES/0458-TEST-16-DMSQUASH-add-sr_mod.patch new file mode 100644 index 0000000..7347421 --- /dev/null +++ b/SOURCES/0458-TEST-16-DMSQUASH-add-sr_mod.patch @@ -0,0 +1,23 @@ +From 39c4892772a3afa8b1103c1b06db576976cbf066 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 26 Aug 2016 11:24:42 +0200 +Subject: [PATCH] TEST-16-DMSQUASH: add sr_mod + +otherwise no cdrom can be accessed on RHEL-7 +--- + test/TEST-16-DMSQUASH/test.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/TEST-16-DMSQUASH/test.sh b/test/TEST-16-DMSQUASH/test.sh +index 9d584e39..e80ec5c2 100755 +--- a/test/TEST-16-DMSQUASH/test.sh ++++ b/test/TEST-16-DMSQUASH/test.sh +@@ -40,7 +40,7 @@ test_setup() { + + sudo $basedir/dracut.sh -l -i "$TESTDIR"/overlay / \ + -a "debug dmsquash-live" \ +- -d "piix ide-gd_mod ata_piix ext3 sd_mod" \ ++ -d "piix ide-gd_mod ata_piix ext3 sd_mod sr_mod" \ + -f "$TESTDIR"/initramfs.testing "$KVERSION" || return 1 + + mkdir -p -- "$TESTDIR"/root-source diff --git a/SOURCES/0459-fcoe-only-install-etc-hba.conf-it-it-exists.patch b/SOURCES/0459-fcoe-only-install-etc-hba.conf-it-it-exists.patch new file mode 100644 index 0000000..30ae8bd --- /dev/null +++ b/SOURCES/0459-fcoe-only-install-etc-hba.conf-it-it-exists.patch @@ -0,0 +1,23 @@ +From 99e72a4b1cb79a402c9c1338f7cfb8dc22bf16e3 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 6 Sep 2016 15:17:49 +0200 +Subject: [PATCH] fcoe: only install /etc/hba.conf, it it exists + +https://bugzilla.redhat.com/show_bug.cgi?id=1369342 +--- + modules.d/95fcoe/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/95fcoe/module-setup.sh b/modules.d/95fcoe/module-setup.sh +index af2798dc..4bab0c7d 100755 +--- a/modules.d/95fcoe/module-setup.sh ++++ b/modules.d/95fcoe/module-setup.sh +@@ -69,7 +69,7 @@ cmdline() { + install() { + inst_multiple ip dcbtool fipvlan lldpad readlink lldptool fcoemon fcoeadm + inst_libdir_file 'libhbalinux.so*' +- inst "/etc/hba.conf" "/etc/hba.conf" ++ [[ -e /etc/hba.conf ]] && inst "/etc/hba.conf" "/etc/hba.conf" + + mkdir -m 0755 -p "$initdir/var/lib/lldpad" + mkdir -m 0755 -p "$initdir/etc/fcoe" diff --git a/SOURCES/0460-network-parse-ip-opts-be-more-liberal-to-multiple-ip.patch b/SOURCES/0460-network-parse-ip-opts-be-more-liberal-to-multiple-ip.patch new file mode 100644 index 0000000..a761d17 --- /dev/null +++ b/SOURCES/0460-network-parse-ip-opts-be-more-liberal-to-multiple-ip.patch @@ -0,0 +1,37 @@ +From c87d489ca619c719323da446076ab67dc091960d Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 6 Sep 2016 15:18:24 +0200 +Subject: [PATCH] network/parse-ip-opts: be more liberal to multiple ip= + options + +Do not bail out early. + +https://bugzilla.redhat.com/show_bug.cgi?id=1304069 +--- + modules.d/40network/parse-ip-opts.sh | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/modules.d/40network/parse-ip-opts.sh b/modules.d/40network/parse-ip-opts.sh +index 3c962044..68afe91b 100755 +--- a/modules.d/40network/parse-ip-opts.sh ++++ b/modules.d/40network/parse-ip-opts.sh +@@ -38,7 +38,7 @@ unset count + # If needed, check if bootdev= contains anything usable + BOOTDEV=$(getarg bootdev=) + +-if [ -n "$NEEDBOOTDEV" ] && getargbool 1 rd.neednet; then ++if [ -n "$NEEDBOOTDEV" ] && ! getargbool 0 rd.neednet; then + #[ -z "$BOOTDEV" ] && warn "Please supply bootdev argument for multiple ip= lines" + echo "rd.neednet=1" > /etc/cmdline.d/dracut-neednet.conf + info "Multiple ip= arguments: assuming rd.neednet=1" +@@ -79,8 +79,8 @@ for p in $(getargs ip=); do + ;; + auto6);; + dhcp|dhcp6|on|any) \ +- [ -n "$NEEDBOOTDEV" ] && [ -z "$dev" ] && \ +- die "Sorry, 'ip=$p' does not make sense for multiple interface configurations" ++ #[ -n "$NEEDBOOTDEV" ] && [ -z "$dev" ] && \ ++ # die "Sorry, 'ip=$p' does not make sense for multiple interface configurations" + [ -n "$ip" ] && \ + die "For argument 'ip=$p'\nSorry, setting client-ip does not make sense for '$autoopt'" + ;; diff --git a/SOURCES/0461-network-fix-dhcp-classless_static_routes.patch b/SOURCES/0461-network-fix-dhcp-classless_static_routes.patch new file mode 100644 index 0000000..d812ee7 --- /dev/null +++ b/SOURCES/0461-network-fix-dhcp-classless_static_routes.patch @@ -0,0 +1,26 @@ +From 33710dfbfcf43f4438ed58e45e2599d3fe47e2f3 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 7 Sep 2016 09:33:31 +0200 +Subject: [PATCH] network: fix dhcp classless_static_routes + +removed copy&paste artifact "modify_routes add" + +there is no modify_routes() function, and we simply want the output +of the parse function. +--- + modules.d/40network/dhclient-script.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/40network/dhclient-script.sh b/modules.d/40network/dhclient-script.sh +index f6c77f2f..2a2e2343 100755 +--- a/modules.d/40network/dhclient-script.sh ++++ b/modules.d/40network/dhclient-script.sh +@@ -175,7 +175,7 @@ case $reason in + echo '. /lib/net-lib.sh' + echo "setup_net $netif" + if [ -n "$new_classless_static_routes" ]; then +- modify_routes add "$(parse_option_121 $new_classless_static_routes)" ++ parse_option_121 $new_classless_static_routes + fi + echo "source_hook initqueue/online $netif" + [ -e /tmp/net.$netif.manualup ] || echo "/sbin/netroot $netif" diff --git a/SOURCES/0462-network-do-not-check-firmware-boot-selected-flag.patch b/SOURCES/0462-network-do-not-check-firmware-boot-selected-flag.patch new file mode 100644 index 0000000..898f1a5 --- /dev/null +++ b/SOURCES/0462-network-do-not-check-firmware-boot-selected-flag.patch @@ -0,0 +1,24 @@ +From 443d167a95499b827c2d8c9c3b61f4922c59ff7e Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn <lnykryn@redhat.com> +Date: Wed, 5 Oct 2016 12:46:39 +0200 +Subject: [PATCH] network: do not check "firmware boot selected flag" + +Apparently it is not set correctly on some setups +https://bugzilla.redhat.com/show_bug.cgi?id=1380581 +--- + modules.d/40network/net-lib.sh | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index 3459e898..9083aea7 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -241,8 +241,6 @@ ibft_to_cmdline() { + [ -e ${iface}/flags ] && flags=$(read a < ${iface}/flags; echo $a) + # Skip invalid interfaces + (( $flags & 1 )) || continue +- # Skip interfaces not used for booting +- (( $flags & 2 )) || continue + [ -e ${iface}/dhcp ] && dhcp=$(read a < ${iface}/dhcp; echo $a) + [ -e ${iface}/origin ] && origin=$(read a < ${iface}/origin; echo $a) + [ -e ${iface}/ip-addr ] && ip=$(read a < ${iface}/ip-addr; echo $a) diff --git a/SOURCES/0463-add-README.md.patch b/SOURCES/0463-add-README.md.patch new file mode 100644 index 0000000..d1f3671 --- /dev/null +++ b/SOURCES/0463-add-README.md.patch @@ -0,0 +1,21 @@ +From 05a38caaf25e221ba8154cebb9c6c601e6594445 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 20 Oct 2016 14:59:03 +0200 +Subject: [PATCH] add README.md + +--- + README.md | 5 +++++ + 1 file changed, 5 insertions(+) + create mode 100644 README.md + +diff --git a/README.md b/README.md +new file mode 100644 +index 00000000..4c53f28d +--- /dev/null ++++ b/README.md +@@ -0,0 +1,5 @@ ++# dracut ++ ++dracut is an initramfs infrastructure. ++ ++CentOS CI Status: [](https://ci.centos.org/job/dracut-pr-build/) diff --git a/SOURCES/0464-README.md-update.patch b/SOURCES/0464-README.md-update.patch new file mode 100644 index 0000000..1c6bf42 --- /dev/null +++ b/SOURCES/0464-README.md-update.patch @@ -0,0 +1,19 @@ +From 6dcb4867aeb463dd101947992b91781eec15e10f Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 20 Oct 2016 15:27:53 +0200 +Subject: [PATCH] README.md: update + +--- + README.md | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/README.md b/README.md +index 4c53f28d..9617eaf9 100644 +--- a/README.md ++++ b/README.md +@@ -1,4 +1,4 @@ +-# dracut ++# dracut RHEL-7 branch + + dracut is an initramfs infrastructure. + diff --git a/SOURCES/0465-test-test-rpms.txt-add-list-of-rpms-to-install.patch b/SOURCES/0465-test-test-rpms.txt-add-list-of-rpms-to-install.patch new file mode 100644 index 0000000..de2a0d1 --- /dev/null +++ b/SOURCES/0465-test-test-rpms.txt-add-list-of-rpms-to-install.patch @@ -0,0 +1,42 @@ +From f432d367fc4fa7558761cb9bb4229e6c027bfa31 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 10 Nov 2016 13:57:26 +0100 +Subject: [PATCH] test/test-rpms.txt: add list of rpms to install + +--- + test/test-rpms.txt | 26 ++++++++++++++++++++++++++ + 1 file changed, 26 insertions(+) + create mode 100644 test/test-rpms.txt + +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/0466-test-remove-sudo-calls.patch b/SOURCES/0466-test-remove-sudo-calls.patch new file mode 100644 index 0000000..d296171 --- /dev/null +++ b/SOURCES/0466-test-remove-sudo-calls.patch @@ -0,0 +1,682 @@ +From d2fd423a8de2cc4fa0325f5a371582f429c05a26 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 10 Nov 2016 14:57:05 +0100 +Subject: [PATCH] test: remove sudo calls + +rather run: + +$ sudo make check +--- + test/TEST-01-BASIC/test.sh | 4 ++-- + test/TEST-02-SYSTEMD/test.sh | 4 ++-- + test/TEST-03-USR-MOUNT/test.sh | 4 ++-- + test/TEST-04-FULL-SYSTEMD/test.sh | 2 +- + test/TEST-10-RAID/test.sh | 4 ++-- + test/TEST-11-LVM/test.sh | 4 ++-- + test/TEST-12-RAID-DEG/test.sh | 4 ++-- + test/TEST-13-ENC-RAID-LVM/test.sh | 4 ++-- + test/TEST-14-IMSM/test.sh | 4 ++-- + test/TEST-15-BTRFSRAID/test.sh | 4 ++-- + test/TEST-16-DMSQUASH/test.sh | 4 ++-- + test/TEST-17-LVM-THIN/test.sh | 4 ++-- + test/TEST-20-NFS/test.sh | 16 ++++++++-------- + test/TEST-30-ISCSI/test.sh | 16 ++++++++-------- + test/TEST-40-NBD/test.sh | 24 ++++++++++++------------ + test/TEST-50-MULTINIC/test.sh | 12 ++++++------ + test/TEST-60-MTUMAC/test.sh | 10 +++++----- + test/TEST-70-BONDBRIDGETEAMVLAN/test.sh | 10 +++++----- + test/run-qemu | 2 +- + 19 files changed, 68 insertions(+), 68 deletions(-) + +diff --git a/test/TEST-01-BASIC/test.sh b/test/TEST-01-BASIC/test.sh +index aef07373..97e8017e 100755 +--- a/test/TEST-01-BASIC/test.sh ++++ b/test/TEST-01-BASIC/test.sh +@@ -45,7 +45,7 @@ test_setup() { + find_binary plymouth >/dev/null && inst_multiple plymouth + (cd "$initdir"; mkdir -p dev sys proc etc var/run tmp ) + cp -a /etc/ld.so.conf* $initdir/etc +- sudo ldconfig -r "$initdir" ++ ldconfig -r "$initdir" + ) + + # second, install the files needed to make the root filesystem +@@ -85,7 +85,7 @@ test_setup() { + inst_hook emergency 000 ./hard-off.sh + inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules + ) +- sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ ++ $basedir/dracut.sh -l -i $TESTDIR/overlay / \ + -a "debug watchdog" \ + -o "plymouth" \ + -d "piix ide-gd_mod ata_piix ext3 sd_mod i6300esb ib700wdt" \ +diff --git a/test/TEST-02-SYSTEMD/test.sh b/test/TEST-02-SYSTEMD/test.sh +index 6f33181c..2a077b04 100755 +--- a/test/TEST-02-SYSTEMD/test.sh ++++ b/test/TEST-02-SYSTEMD/test.sh +@@ -45,7 +45,7 @@ test_setup() { + find_binary plymouth >/dev/null && inst_multiple plymouth + (cd "$initdir"; mkdir -p dev sys proc etc var/run tmp ) + cp -a /etc/ld.so.conf* $initdir/etc +- sudo ldconfig -r "$initdir" ++ ldconfig -r "$initdir" + ) + + # second, install the files needed to make the root filesystem +@@ -85,7 +85,7 @@ test_setup() { + inst_hook emergency 000 ./hard-off.sh + inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules + ) +- sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ ++ $basedir/dracut.sh -l -i $TESTDIR/overlay / \ + -a "debug systemd" \ + -o "network plymouth" \ + -d "piix ide-gd_mod ata_piix ext3 sd_mod" \ +diff --git a/test/TEST-03-USR-MOUNT/test.sh b/test/TEST-03-USR-MOUNT/test.sh +index 363f8b04..c3f810ab 100755 +--- a/test/TEST-03-USR-MOUNT/test.sh ++++ b/test/TEST-03-USR-MOUNT/test.sh +@@ -72,7 +72,7 @@ test_setup() { + find_binary plymouth >/dev/null && inst_multiple plymouth + (cd "$initdir"; mkdir -p dev sys proc etc var/run tmp ) + cp -a /etc/ld.so.conf* $initdir/etc +- sudo ldconfig -r "$initdir" ++ ldconfig -r "$initdir" + ) + + # second, install the files needed to make the root filesystem +@@ -119,7 +119,7 @@ test_setup() { + inst_hook emergency 000 ./hard-off.sh + inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules + ) +- sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ ++ $basedir/dracut.sh -l -i $TESTDIR/overlay / \ + -a "debug" \ + -o "network plymouth" \ + -d "piix ide-gd_mod ata_piix btrfs sd_mod i6300esb ib700wdt" \ +diff --git a/test/TEST-04-FULL-SYSTEMD/test.sh b/test/TEST-04-FULL-SYSTEMD/test.sh +index 93c33890..1adb34e9 100755 +--- a/test/TEST-04-FULL-SYSTEMD/test.sh ++++ b/test/TEST-04-FULL-SYSTEMD/test.sh +@@ -263,7 +263,7 @@ EOF + inst_hook emergency 000 ./hard-off.sh + inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules + ) +- sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ ++ $basedir/dracut.sh -l -i $TESTDIR/overlay / \ + -a "debug systemd" \ + -I "/etc/machine-id /etc/hostname" \ + -o "network plymouth lvm mdraid resume crypt i18n caps dm terminfo usrmount" \ +diff --git a/test/TEST-10-RAID/test.sh b/test/TEST-10-RAID/test.sh +index 45edda2c..7f99c0e0 100755 +--- a/test/TEST-10-RAID/test.sh ++++ b/test/TEST-10-RAID/test.sh +@@ -43,7 +43,7 @@ test_setup() { + inst_multiple -o /lib/systemd/systemd-shutdown + find_binary plymouth >/dev/null && inst_multiple plymouth + cp -a /etc/ld.so.conf* $initdir/etc +- sudo ldconfig -r "$initdir" ++ ldconfig -r "$initdir" + ) + + # second, install the files needed to make the root filesystem +@@ -88,7 +88,7 @@ test_setup() { + inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules + ) + +- sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ ++ $basedir/dracut.sh -l -i $TESTDIR/overlay / \ + -o "plymouth network" \ + -a "debug" \ + -d "piix ide-gd_mod ata_piix ext2 sd_mod" \ +diff --git a/test/TEST-11-LVM/test.sh b/test/TEST-11-LVM/test.sh +index dd1f8ead..a4ee86da 100755 +--- a/test/TEST-11-LVM/test.sh ++++ b/test/TEST-11-LVM/test.sh +@@ -40,7 +40,7 @@ test_setup() { + (cd "$initdir"; mkdir -p dev sys proc etc var/run tmp ) + cp -a /etc/ld.so.conf* $initdir/etc + mkdir $initdir/run +- sudo ldconfig -r "$initdir" ++ ldconfig -r "$initdir" + ) + + # second, install the files needed to make the root filesystem +@@ -74,7 +74,7 @@ test_setup() { + inst_hook emergency 000 ./hard-off.sh + inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules + ) +- sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ ++ $basedir/dracut.sh -l -i $TESTDIR/overlay / \ + -o "plymouth network" \ + -a "debug" \ + -d "piix ide-gd_mod ata_piix ext2 sd_mod" \ +diff --git a/test/TEST-12-RAID-DEG/test.sh b/test/TEST-12-RAID-DEG/test.sh +index 5f9cfc56..aae5e8b4 100755 +--- a/test/TEST-12-RAID-DEG/test.sh ++++ b/test/TEST-12-RAID-DEG/test.sh +@@ -81,7 +81,7 @@ test_setup() { + find_binary plymouth >/dev/null && inst_multiple plymouth + (cd "$initdir"; mkdir -p dev sys proc etc var/run tmp ) + cp -a /etc/ld.so.conf* $initdir/etc +- sudo ldconfig -r "$initdir" ++ ldconfig -r "$initdir" + ) + + # second, install the files needed to make the root filesystem +@@ -131,7 +131,7 @@ test_setup() { + echo -n test > $initdir/etc/key + ) + +- sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ ++ $basedir/dracut.sh -l -i $TESTDIR/overlay / \ + -o "plymouth network" \ + -a "debug" \ + -d "piix ide-gd_mod ata_piix ext2 sd_mod" \ +diff --git a/test/TEST-13-ENC-RAID-LVM/test.sh b/test/TEST-13-ENC-RAID-LVM/test.sh +index 94801e47..8194166b 100755 +--- a/test/TEST-13-ENC-RAID-LVM/test.sh ++++ b/test/TEST-13-ENC-RAID-LVM/test.sh +@@ -77,7 +77,7 @@ test_setup() { + find_binary plymouth >/dev/null && inst_multiple plymouth + (cd "$initdir"; mkdir -p dev sys proc etc var/run tmp ) + cp -a /etc/ld.so.conf* $initdir/etc +- sudo ldconfig -r "$initdir" ++ ldconfig -r "$initdir" + ) + + # second, install the files needed to make the root filesystem +@@ -127,7 +127,7 @@ test_setup() { + done > $initdir/etc/crypttab + echo -n test > $initdir/etc/key + ) +- sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ ++ $basedir/dracut.sh -l -i $TESTDIR/overlay / \ + -o "plymouth network" \ + -a "debug" \ + -d "piix ide-gd_mod ata_piix ext2 sd_mod" \ +diff --git a/test/TEST-14-IMSM/test.sh b/test/TEST-14-IMSM/test.sh +index 8e99b1f6..783ec4a5 100755 +--- a/test/TEST-14-IMSM/test.sh ++++ b/test/TEST-14-IMSM/test.sh +@@ -70,7 +70,7 @@ test_setup() { + (cd "$initdir"; mkdir -p dev sys proc etc var/run tmp ) + cp -a /etc/ld.so.conf* $initdir/etc + mkdir $initdir/run +- sudo ldconfig -r "$initdir" ++ ldconfig -r "$initdir" + ) + + # second, install the files needed to make the root filesystem +@@ -109,7 +109,7 @@ test_setup() { + inst_hook emergency 000 ./hard-off.sh + inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules + ) +- sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ ++ $basedir/dracut.sh -l -i $TESTDIR/overlay / \ + -o "plymouth network" \ + -a "debug" \ + -d "piix ide-gd_mod ata_piix ext2 sd_mod" \ +diff --git a/test/TEST-15-BTRFSRAID/test.sh b/test/TEST-15-BTRFSRAID/test.sh +index c086677f..1e3e18c1 100755 +--- a/test/TEST-15-BTRFSRAID/test.sh ++++ b/test/TEST-15-BTRFSRAID/test.sh +@@ -41,7 +41,7 @@ test_setup() { + find_binary plymouth >/dev/null && inst_multiple plymouth + (cd "$initdir"; mkdir -p dev sys proc etc var/run tmp ) + cp -a /etc/ld.so.conf* $initdir/etc +- sudo ldconfig -r "$initdir" ++ ldconfig -r "$initdir" + ) + + # second, install the files needed to make the root filesystem +@@ -82,7 +82,7 @@ test_setup() { + inst_hook emergency 000 ./hard-off.sh + inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules + ) +- sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ ++ $basedir/dracut.sh -l -i $TESTDIR/overlay / \ + -o "plymouth network" \ + -a "debug" \ + -d "piix ide-gd_mod ata_piix btrfs sd_mod" \ +diff --git a/test/TEST-16-DMSQUASH/test.sh b/test/TEST-16-DMSQUASH/test.sh +index e80ec5c2..6daa35e7 100755 +--- a/test/TEST-16-DMSQUASH/test.sh ++++ b/test/TEST-16-DMSQUASH/test.sh +@@ -38,7 +38,7 @@ test_setup() { + + dd if=/dev/zero of="$TESTDIR"/root.img count=100 + +- sudo $basedir/dracut.sh -l -i "$TESTDIR"/overlay / \ ++ $basedir/dracut.sh -l -i "$TESTDIR"/overlay / \ + -a "debug dmsquash-live" \ + -d "piix ide-gd_mod ata_piix ext3 sd_mod sr_mod" \ + -f "$TESTDIR"/initramfs.testing "$KVERSION" || return 1 +@@ -69,7 +69,7 @@ test_setup() { + find_binary plymouth >/dev/null && inst_multiple plymouth + (cd "$initdir"; mkdir -p -- dev sys proc etc var/run tmp ) + cp -a -- /etc/ld.so.conf* "$initdir"/etc +- sudo ldconfig -r "$initdir" ++ ldconfig -r "$initdir" + ) + python create.py -d -c livecd-fedora-minimal.ks + return 0 +diff --git a/test/TEST-17-LVM-THIN/test.sh b/test/TEST-17-LVM-THIN/test.sh +index dc6e5885..f15e1a3d 100755 +--- a/test/TEST-17-LVM-THIN/test.sh ++++ b/test/TEST-17-LVM-THIN/test.sh +@@ -40,7 +40,7 @@ test_setup() { + (cd "$initdir"; mkdir -p dev sys proc etc var/run tmp ) + cp -a /etc/ld.so.conf* $initdir/etc + mkdir $initdir/run +- sudo ldconfig -r "$initdir" ++ ldconfig -r "$initdir" + ) + + # second, install the files needed to make the root filesystem +@@ -74,7 +74,7 @@ test_setup() { + inst_hook emergency 000 ./hard-off.sh + inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules + ) +- sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ ++ $basedir/dracut.sh -l -i $TESTDIR/overlay / \ + -o "plymouth network" \ + -a "debug" -I lvs \ + -d "piix ide-gd_mod ata_piix ext2 sd_mod" \ +diff --git a/test/TEST-20-NFS/test.sh b/test/TEST-20-NFS/test.sh +index 49dbc10e..64fc5501 100755 +--- a/test/TEST-20-NFS/test.sh ++++ b/test/TEST-20-NFS/test.sh +@@ -26,7 +26,7 @@ run_server() { + -append "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 ++ chmod 644 $TESTDIR/server.pid || return 1 + + # Cleanup the terminal if we have one + tty -s && stty sane +@@ -185,7 +185,7 @@ test_nfsv4() { + + test_run() { + if [[ -s server.pid ]]; then +- sudo kill -TERM $(cat $TESTDIR/server.pid) ++ kill -TERM $(cat $TESTDIR/server.pid) + rm -f -- $TESTDIR/server.pid + fi + +@@ -200,7 +200,7 @@ test_run() { + ret=$? + + if [[ -s $TESTDIR/server.pid ]]; then +- sudo kill -TERM $(cat $TESTDIR/server.pid) ++ kill -TERM $(cat $TESTDIR/server.pid) + rm -f -- $TESTDIR/server.pid + fi + +@@ -212,7 +212,7 @@ test_setup() { + dd if=/dev/null of=$TESTDIR/server.ext3 bs=1M seek=60 + mke2fs -j -F $TESTDIR/server.ext3 + mkdir $TESTDIR/mnt +- sudo mount -o loop $TESTDIR/server.ext3 $TESTDIR/mnt ++ mount -o loop $TESTDIR/server.ext3 $TESTDIR/mnt + + + export kernel=$KVERSION +@@ -279,7 +279,7 @@ test_setup() { + inst /etc/group /etc/group + + cp -a /etc/ld.so.conf* $initdir/etc +- sudo ldconfig -r "$initdir" ++ ldconfig -r "$initdir" + dracut_kernel_post + ) + +@@ -318,14 +318,14 @@ test_setup() { + inst_libdir_file -n "$_nsslibs" 'libnss_*.so*' + + cp -a /etc/ld.so.conf* $initdir/etc +- sudo ldconfig -r "$initdir" ++ ldconfig -r "$initdir" + ) + + mkdir -p $TESTDIR/mnt/nfs/nfs3-5 + mkdir -p $TESTDIR/mnt/nfs/ip/192.168.50.101 + mkdir -p $TESTDIR/mnt/nfs/tftpboot/nfs4-5 + +- sudo umount $TESTDIR/mnt ++ umount $TESTDIR/mnt + rm -fr -- $TESTDIR/mnt + + # Make an overlay with needed tools for the test harness +@@ -354,7 +354,7 @@ test_setup() { + + test_cleanup() { + if [[ -s $TESTDIR/server.pid ]]; then +- sudo kill -TERM $(cat $TESTDIR/server.pid) ++ kill -TERM $(cat $TESTDIR/server.pid) + rm -f -- $TESTDIR/server.pid + fi + } +diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh +index 5e59f0a8..62bef9cc 100755 +--- a/test/TEST-30-ISCSI/test.sh ++++ b/test/TEST-30-ISCSI/test.sh +@@ -28,7 +28,7 @@ run_server() { + -append "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 ++ chmod 644 $TESTDIR/server.pid || return 1 + + # Cleanup the terminal if we have one + tty -s && stty sane +@@ -129,7 +129,7 @@ test_run() { + do_test_run + ret=$? + if [[ -s $TESTDIR/server.pid ]]; then +- sudo kill -TERM $(cat $TESTDIR/server.pid) ++ kill -TERM $(cat $TESTDIR/server.pid) + rm -f -- $TESTDIR/server.pid + fi + return $ret +@@ -169,7 +169,7 @@ test_setup() { + inst_simple /etc/os-release + inst ./client-init.sh /sbin/init + cp -a /etc/ld.so.conf* $initdir/etc +- sudo ldconfig -r "$initdir" ++ ldconfig -r "$initdir" + ) + + # second, install the files needed to make the root filesystem +@@ -216,7 +216,7 @@ test_setup() { + inst_hook emergency 000 ./hard-off.sh + inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules + ) +- sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ ++ $basedir/dracut.sh -l -i $TESTDIR/overlay / \ + -o "plymouth dmraid nfs" \ + -a "debug" \ + -d "af_packet piix ide-gd_mod ata_piix ext3 sd_mod" \ +@@ -227,7 +227,7 @@ test_setup() { + dd if=/dev/null of=$TESTDIR/server.ext3 bs=1M seek=60 + mkfs.ext3 -j -F $TESTDIR/server.ext3 + mkdir $TESTDIR/mnt +- sudo mount -o loop $TESTDIR/server.ext3 $TESTDIR/mnt ++ mount -o loop $TESTDIR/server.ext3 $TESTDIR/mnt + + kernel=$KVERSION + ( +@@ -259,11 +259,11 @@ test_setup() { + inst /etc/group /etc/group + + cp -a /etc/ld.so.conf* $initdir/etc +- sudo ldconfig -r "$initdir" ++ ldconfig -r "$initdir" + dracut_kernel_post + ) + +- sudo umount $TESTDIR/mnt ++ umount $TESTDIR/mnt + rm -fr -- $TESTDIR/mnt + + # Make server's dracut image +@@ -277,7 +277,7 @@ test_setup() { + + test_cleanup() { + if [[ -s $TESTDIR/server.pid ]]; then +- sudo kill -TERM $(cat $TESTDIR/server.pid) ++ kill -TERM $(cat $TESTDIR/server.pid) + rm -f -- $TESTDIR/server.pid + fi + } +diff --git a/test/TEST-40-NBD/test.sh b/test/TEST-40-NBD/test.sh +index 848a103f..73123c22 100755 +--- a/test/TEST-40-NBD/test.sh ++++ b/test/TEST-40-NBD/test.sh +@@ -26,7 +26,7 @@ run_server() { + -kernel /boot/vmlinuz-$KVERSION \ + -append "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 ++ chmod 644 $TESTDIR/server.pid || return 1 + + # Cleanup the terminal if we have one + tty -s && stty sane +@@ -179,7 +179,7 @@ client_run() { + "root=LABEL=dracut rd.luks.uuid=$ID_FS_UUID rd.lv.vg=dracut netroot=dhcp" || return 1 + + if [[ -s server.pid ]]; then +- sudo kill -TERM $(cat $TESTDIR/server.pid) ++ kill -TERM $(cat $TESTDIR/server.pid) + rm -f -- $TESTDIR/server.pid + fi + +@@ -207,7 +207,7 @@ make_encrypted_root() { + inst_simple /etc/os-release + find_binary plymouth >/dev/null && inst_multiple plymouth + cp -a /etc/ld.so.conf* $initdir/etc +- sudo ldconfig -r "$initdir" ++ ldconfig -r "$initdir" + ) + + # second, install the files needed to make the root filesystem +@@ -247,7 +247,7 @@ make_client_root() { + dd if=/dev/null of=$TESTDIR/nbd.ext2 bs=1M seek=30 + mke2fs -F -j $TESTDIR/nbd.ext2 + mkdir $TESTDIR/mnt +- sudo mount -o loop $TESTDIR/nbd.ext2 $TESTDIR/mnt ++ mount -o loop $TESTDIR/nbd.ext2 $TESTDIR/mnt + + kernel=$KVERSION + ( +@@ -271,10 +271,10 @@ make_client_root() { + inst $i + done + cp -a /etc/ld.so.conf* $initdir/etc +- sudo ldconfig -r "$initdir" ++ ldconfig -r "$initdir" + ) + +- sudo umount $TESTDIR/mnt ++ umount $TESTDIR/mnt + rm -fr -- $TESTDIR/mnt + } + +@@ -282,7 +282,7 @@ make_server_root() { + dd if=/dev/null of=$TESTDIR/server.ext2 bs=1M seek=30 + mke2fs -F $TESTDIR/server.ext2 + mkdir $TESTDIR/mnt +- sudo mount -o loop $TESTDIR/server.ext2 $TESTDIR/mnt ++ mount -o loop $TESTDIR/server.ext2 $TESTDIR/mnt + + kernel=$KVERSION + ( +@@ -316,10 +316,10 @@ make_server_root() { + done + + cp -a /etc/ld.so.conf* $initdir/etc +- sudo ldconfig -r "$initdir" ++ ldconfig -r "$initdir" + ) + +- sudo umount $TESTDIR/mnt ++ umount $TESTDIR/mnt + rm -fr -- $TESTDIR/mnt + } + +@@ -347,12 +347,12 @@ test_setup() { + echo -n test > $initdir/etc/key + ) + +- sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ ++ $basedir/dracut.sh -l -i $TESTDIR/overlay / \ + -m "udev-rules rootfs-block fs-lib base debug kernel-modules" \ + -d "af_packet piix ide-gd_mod ata_piix ext2 ext3 sd_mod e1000" \ + -f $TESTDIR/initramfs.server $KVERSION || return 1 + +- sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ ++ $basedir/dracut.sh -l -i $TESTDIR/overlay / \ + -o "plymouth" \ + -a "debug watchdog" \ + -d "af_packet piix ide-gd_mod ata_piix ext2 ext3 sd_mod e1000 i6300esb ib700wdt" \ +@@ -361,7 +361,7 @@ test_setup() { + + kill_server() { + if [[ -s $TESTDIR/server.pid ]]; then +- sudo kill -TERM $(cat $TESTDIR/server.pid) ++ kill -TERM $(cat $TESTDIR/server.pid) + rm -f -- $TESTDIR/server.pid + fi + } +diff --git a/test/TEST-50-MULTINIC/test.sh b/test/TEST-50-MULTINIC/test.sh +index 05273be7..642a7486 100755 +--- a/test/TEST-50-MULTINIC/test.sh ++++ b/test/TEST-50-MULTINIC/test.sh +@@ -26,7 +26,7 @@ run_server() { + -append "loglevel=7 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 ++ chmod 644 -- "$TESTDIR"/server.pid || return 1 + + # Cleanup the terminal if we have one + tty -s && stty sane +@@ -159,7 +159,7 @@ test_setup() { + dd if=/dev/null of="$TESTDIR"/server.ext3 bs=1M seek=60 + mke2fs -j -F -- "$TESTDIR"/server.ext3 + mkdir -- "$TESTDIR"/mnt +- sudo mount -o loop -- "$TESTDIR"/server.ext3 "$TESTDIR"/mnt ++ mount -o loop -- "$TESTDIR"/server.ext3 "$TESTDIR"/mnt + + ( + export initdir="$TESTDIR"/mnt +@@ -222,7 +222,7 @@ test_setup() { + inst /etc/group /etc/group + + cp -a -- /etc/ld.so.conf* "$initdir"/etc +- sudo ldconfig -r "$initdir" ++ ldconfig -r "$initdir" + dracut_kernel_post + ) + +@@ -260,10 +260,10 @@ test_setup() { + inst_libdir_file -n "$_nsslibs" 'libnss_*.so*' + + cp -a -- /etc/ld.so.conf* "$initdir"/etc +- sudo ldconfig -r "$initdir" ++ ldconfig -r "$initdir" + ) + +- sudo umount "$TESTDIR"/mnt ++ umount "$TESTDIR"/mnt + rm -fr -- "$TESTDIR"/mnt + + # Make an overlay with needed tools for the test harness +@@ -291,7 +291,7 @@ test_setup() { + + kill_server() { + if [[ -s "$TESTDIR"/server.pid ]]; then +- sudo kill -TERM -- $(cat "$TESTDIR"/server.pid) ++ kill -TERM -- $(cat "$TESTDIR"/server.pid) + rm -f -- "$TESTDIR"/server.pid + fi + } +diff --git a/test/TEST-60-MTUMAC/test.sh b/test/TEST-60-MTUMAC/test.sh +index 7633ac13..b70e3161 100755 +--- a/test/TEST-60-MTUMAC/test.sh ++++ b/test/TEST-60-MTUMAC/test.sh +@@ -25,7 +25,7 @@ run_server() { + -append "loglevel=7 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 ++ chmod 644 -- "$TESTDIR"/server.pid || return 1 + + # Cleanup the terminal if we have one + tty -s && stty sane +@@ -136,7 +136,7 @@ test_setup() { + dd if=/dev/null of="$TESTDIR"/server.ext3 bs=1M seek=60 + mke2fs -j -F -- "$TESTDIR"/server.ext3 + mkdir -- "$TESTDIR"/mnt +- sudo mount -o loop -- "$TESTDIR"/server.ext3 "$TESTDIR"/mnt ++ mount -o loop -- "$TESTDIR"/server.ext3 "$TESTDIR"/mnt + + ( + export initdir="$TESTDIR"/mnt +@@ -237,10 +237,10 @@ test_setup() { + inst_libdir_file -n "$_nsslibs" 'libnss_*.so*' + + cp -a -- /etc/ld.so.conf* "$initdir"/etc +- sudo ldconfig -r "$initdir" ++ ldconfig -r "$initdir" + ) + +- sudo umount "$TESTDIR"/mnt ++ umount "$TESTDIR"/mnt + rm -fr -- "$TESTDIR"/mnt + + # Make an overlay with needed tools for the test harness +@@ -270,7 +270,7 @@ test_setup() { + + kill_server() { + if [[ -s "$TESTDIR"/server.pid ]]; then +- sudo kill -TERM -- $(cat "$TESTDIR"/server.pid) ++ kill -TERM -- $(cat "$TESTDIR"/server.pid) + rm -f -- "$TESTDIR"/server.pid + fi + } +diff --git a/test/TEST-70-BONDBRIDGETEAMVLAN/test.sh b/test/TEST-70-BONDBRIDGETEAMVLAN/test.sh +index 54ceb9e1..dcf9d5cf 100755 +--- a/test/TEST-70-BONDBRIDGETEAMVLAN/test.sh ++++ b/test/TEST-70-BONDBRIDGETEAMVLAN/test.sh +@@ -32,7 +32,7 @@ run_server() { + -append "loglevel=7 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 ++ chmod 644 -- "$TESTDIR"/server.pid || return 1 + + # Cleanup the terminal if we have one + tty -s && stty sane +@@ -162,7 +162,7 @@ test_setup() { + dd if=/dev/null of="$TESTDIR"/server.ext3 bs=1M seek=60 + mke2fs -j -F -- "$TESTDIR"/server.ext3 + mkdir -- "$TESTDIR"/mnt +- sudo mount -o loop -- "$TESTDIR"/server.ext3 "$TESTDIR"/mnt ++ mount -o loop -- "$TESTDIR"/server.ext3 "$TESTDIR"/mnt + + ( + export initdir="$TESTDIR"/mnt +@@ -263,10 +263,10 @@ test_setup() { + inst_libdir_file -n "$_nsslibs" 'libnss_*.so*' + + cp -a -- /etc/ld.so.conf* "$initdir"/etc +- sudo ldconfig -r "$initdir" ++ ldconfig -r "$initdir" + ) + +- sudo umount "$TESTDIR"/mnt ++ umount "$TESTDIR"/mnt + rm -fr -- "$TESTDIR"/mnt + + # Make an overlay with needed tools for the test harness +@@ -296,7 +296,7 @@ test_setup() { + + kill_server() { + if [[ -s "$TESTDIR"/server.pid ]]; then +- sudo kill -TERM -- $(cat "$TESTDIR"/server.pid) ++ kill -TERM -- $(cat "$TESTDIR"/server.pid) + rm -f -- "$TESTDIR"/server.pid + fi + } +diff --git a/test/run-qemu b/test/run-qemu +index 00c2f6a8..07ce4a59 100755 +--- a/test/run-qemu ++++ b/test/run-qemu +@@ -25,4 +25,4 @@ else + VMLINUZ="/boot/vmlinuz-${KVERSION}" + fi + +-exec sudo $BIN $ARGS -kernel $VMLINUZ "$@" ++exec $BIN $ARGS -kernel $VMLINUZ "$@" diff --git a/SOURCES/0467-TEST-ISCSI-fix-command-check.patch b/SOURCES/0467-TEST-ISCSI-fix-command-check.patch new file mode 100644 index 0000000..e058d52 --- /dev/null +++ b/SOURCES/0467-TEST-ISCSI-fix-command-check.patch @@ -0,0 +1,24 @@ +From 13a61f82ba6379d407d45bb9225099cd755e3c5b Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 11 Nov 2016 11:34:33 +0100 +Subject: [PATCH] TEST-ISCSI: fix command check + +--- + test/TEST-30-ISCSI/test.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh +index 62bef9cc..da86b837 100755 +--- a/test/TEST-30-ISCSI/test.sh ++++ b/test/TEST-30-ISCSI/test.sh +@@ -136,8 +136,8 @@ test_run() { + } + + test_setup() { +- if [ ! -x /usr/sbin/iscsi-target ]; then +- echo "Need iscsi-target from netbsd-iscsi" ++ if ! command -v tgtd &>/dev/null || ! command -v tgtadm &>/dev/null; then ++ echo "Need tgtd and tgtadm from scsi-target-utils" + return 1 + fi + diff --git a/SOURCES/0468-test-test-rpms.txt-add-gzip.patch b/SOURCES/0468-test-test-rpms.txt-add-gzip.patch new file mode 100644 index 0000000..0781dd7 --- /dev/null +++ b/SOURCES/0468-test-test-rpms.txt-add-gzip.patch @@ -0,0 +1,21 @@ +From 7b4173d698be5163da1e5b5b52bafd2facba4db5 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 11 Nov 2016 11:40:58 +0100 +Subject: [PATCH] test/test-rpms.txt: add gzip + +--- + 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/0469-TEST-99-RPM-ignore-openldap-leftovers.patch b/SOURCES/0469-TEST-99-RPM-ignore-openldap-leftovers.patch new file mode 100644 index 0000000..2decd24 --- /dev/null +++ b/SOURCES/0469-TEST-99-RPM-ignore-openldap-leftovers.patch @@ -0,0 +1,21 @@ +From 81bb61b52577d1866c9faf9ec8112892c4ba428a Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 11 Nov 2016 11:42:54 +0100 +Subject: [PATCH] TEST-99-RPM: ignore openldap leftovers + +--- + test/TEST-99-RPM/test.sh | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/test/TEST-99-RPM/test.sh b/test/TEST-99-RPM/test.sh +index 5afc313e..fc682734 100755 +--- a/test/TEST-99-RPM/test.sh ++++ b/test/TEST-99-RPM/test.sh +@@ -54,6 +54,7 @@ find / -xdev -type f -not -path '/var/*' \ + -not -path '/dev/null' \ + -not -path "/boot/loader/entries/\$(cat /etc/machine-id)-*" \ + -not -path "/boot/\$(cat /etc/machine-id)/*" \ ++ -not -path '/etc/openldap/certs/*' \ + -exec rpm -qf '{}' ';' | \ + grep -F 'not owned' &> /test.output + exit diff --git a/SOURCES/0470-test-Makefile-proper-return-code-for-make-check.patch b/SOURCES/0470-test-Makefile-proper-return-code-for-make-check.patch new file mode 100644 index 0000000..235520b --- /dev/null +++ b/SOURCES/0470-test-Makefile-proper-return-code-for-make-check.patch @@ -0,0 +1,31 @@ +From aa40b82145ecc923edfade8149c2ba892bfb664d Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 11 Nov 2016 12:18:06 +0100 +Subject: [PATCH] test/Makefile: proper return code for "make check" + +--- + test/Makefile | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/test/Makefile b/test/Makefile +index f71f8540..eaa944fb 100644 +--- a/test/Makefile ++++ b/test/Makefile +@@ -2,13 +2,14 @@ + + check: + @[ "$$EUID" == "0" ] || { echo "'check' must be run as root! Please use 'sudo'."; exit 1; } +- @for i in TEST-[0-9]*; do \ ++ @{ ret=0; \ ++ for i in TEST-[0-9]*; do \ + [ -d $$i ] || continue ; \ + [ -f $$i/Makefile ] || continue ; \ + if [ -n "$$TESTS" ]; then t=$${i##TEST-}; t=$${t%%-*}; [ "$${TESTS#*$$t*}" != "$$TESTS" ] || continue; fi; \ + if [ -n "$$SKIP" ]; then t=$${i##TEST-}; t=$${t%%-*}; [ "$${SKIP#*$$t*}" != "$$SKIP" ] && continue; fi; \ +- $(MAKE) -C $$i all ; \ +- done ++ $(MAKE) -C $$i all ; ret=$$((ret + $$?)); \ ++ done; exit $$ret; } + + clean: + @for i in TEST-[0-9]*; do \ diff --git a/SOURCES/0471-test-rpms.txt-add-dhcp.patch b/SOURCES/0471-test-rpms.txt-add-dhcp.patch new file mode 100644 index 0000000..8bc8178 --- /dev/null +++ b/SOURCES/0471-test-rpms.txt-add-dhcp.patch @@ -0,0 +1,21 @@ +From a081e072d894c91fcf037e267cb6793c4b0356c4 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 11 Nov 2016 12:34:00 +0100 +Subject: [PATCH] test-rpms.txt: add dhcp + +--- + 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/0472-TEST-30-ISCSI-test.sh-set-device-timeout.patch b/SOURCES/0472-TEST-30-ISCSI-test.sh-set-device-timeout.patch new file mode 100644 index 0000000..109aceb --- /dev/null +++ b/SOURCES/0472-TEST-30-ISCSI-test.sh-set-device-timeout.patch @@ -0,0 +1,22 @@ +From afeb39aa8544eb4e006421107e411a79558a683e Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 11 Nov 2016 13:11:36 +0100 +Subject: [PATCH] TEST-30-ISCSI/test.sh: set device timeout + +--- + test/TEST-30-ISCSI/test.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh +index da86b837..a610b0e4 100755 +--- a/test/TEST-30-ISCSI/test.sh ++++ b/test/TEST-30-ISCSI/test.sh +@@ -49,7 +49,7 @@ run_client() { + -net nic,macaddr=52:54:00:12:34:00,model=e1000 \ + -net nic,macaddr=52:54:00:12:34:01,model=e1000 \ + -net socket,connect=127.0.0.1:12330 \ +- -append "rw rd.auto rd.retry=50 console=ttyS0,115200n81 selinux=0 rd.debug=0 $DEBUGFAIL $*" \ ++ -append "rw rd.auto rd.device.timeout=300 rd.retry=50 console=ttyS0,115200n81 selinux=0 rd.debug=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/SOURCES/0473-TEST-70-BONDBRIDGETEAMVLAN-fix-server-ip-setup.patch b/SOURCES/0473-TEST-70-BONDBRIDGETEAMVLAN-fix-server-ip-setup.patch new file mode 100644 index 0000000..03e4331 --- /dev/null +++ b/SOURCES/0473-TEST-70-BONDBRIDGETEAMVLAN-fix-server-ip-setup.patch @@ -0,0 +1,38 @@ +From ba5efdcffa8e481b2442fea800d717b45fed240a Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 11 Nov 2016 13:45:00 +0100 +Subject: [PATCH] TEST-70-BONDBRIDGETEAMVLAN: fix server ip setup + +--- + test/TEST-70-BONDBRIDGETEAMVLAN/server-init.sh | 8 +++----- + 1 file changed, 3 insertions(+), 5 deletions(-) + +diff --git a/test/TEST-70-BONDBRIDGETEAMVLAN/server-init.sh b/test/TEST-70-BONDBRIDGETEAMVLAN/server-init.sh +index 9585a47c..9f45c420 100755 +--- a/test/TEST-70-BONDBRIDGETEAMVLAN/server-init.sh ++++ b/test/TEST-70-BONDBRIDGETEAMVLAN/server-init.sh +@@ -58,7 +58,6 @@ ip addr add 192.168.50.1/24 dev ens3 + linkup ens3 + >/dev/watchdog + ip link set dev eth1 name ens4 +-linkup 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 +@@ -67,13 +66,12 @@ 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 +-ip link set dev eth2 name ens5 +-ip link set dev eth3 name ens6 + linkup ens4 ++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 +-ip addr add 192.168.51.1/24 dev ens5 +-linkup ens4 + >/dev/watchdog + modprobe af_packet + > /dev/watchdog diff --git a/SOURCES/0474-testsuite-guard-against-kernel-panic.patch b/SOURCES/0474-testsuite-guard-against-kernel-panic.patch new file mode 100644 index 0000000..3be052e --- /dev/null +++ b/SOURCES/0474-testsuite-guard-against-kernel-panic.patch @@ -0,0 +1,372 @@ +From 904c466cdb424a10c68cc97d8974754acd04dad9 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 11 Nov 2016 13:45:24 +0100 +Subject: [PATCH] testsuite: guard against kernel panic + +call qemu with --no-reboot and append "panic=1" to the kernel cmdline +--- + test/TEST-01-BASIC/test.sh | 3 ++- + test/TEST-02-SYSTEMD/test.sh | 3 ++- + test/TEST-03-USR-MOUNT/test.sh | 3 ++- + test/TEST-04-FULL-SYSTEMD/test.sh | 3 ++- + test/TEST-10-RAID/test.sh | 3 ++- + test/TEST-11-LVM/test.sh | 3 ++- + test/TEST-12-RAID-DEG/test.sh | 3 ++- + test/TEST-13-ENC-RAID-LVM/test.sh | 9 ++++++--- + test/TEST-14-IMSM/test.sh | 3 ++- + test/TEST-15-BTRFSRAID/test.sh | 3 ++- + test/TEST-16-DMSQUASH/test.sh | 3 ++- + test/TEST-17-LVM-THIN/test.sh | 3 ++- + test/TEST-20-NFS/test.sh | 6 ++++-- + test/TEST-30-ISCSI/test.sh | 6 ++++-- + test/TEST-40-NBD/test.sh | 6 ++++-- + test/TEST-50-MULTINIC/test.sh | 6 ++++-- + test/TEST-60-MTUMAC/test.sh | 6 ++++-- + test/TEST-70-BONDBRIDGETEAMVLAN/dhcpd.conf | 2 +- + test/TEST-70-BONDBRIDGETEAMVLAN/test.sh | 6 ++++-- + 19 files changed, 53 insertions(+), 27 deletions(-) + +diff --git a/test/TEST-01-BASIC/test.sh b/test/TEST-01-BASIC/test.sh +index 97e8017e..6b79dee9 100755 +--- a/test/TEST-01-BASIC/test.sh ++++ b/test/TEST-01-BASIC/test.sh +@@ -14,7 +14,8 @@ test_run() { + -m 256M -smp 2 -nographic \ + -net none -kernel /boot/vmlinuz-$KVERSION \ + -watchdog i6300esb -watchdog-action poweroff \ +- -append "root=LABEL=dracut rw systemd.log_level=debug systemd.log_target=console rd.retry=3 rd.debug console=ttyS0,115200n81 $DEBUGFAIL" \ ++ -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 $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 2a077b04..23591804 100755 +--- a/test/TEST-02-SYSTEMD/test.sh ++++ b/test/TEST-02-SYSTEMD/test.sh +@@ -13,7 +13,8 @@ test_run() { + -hdb $TESTDIR/marker.disk \ + -m 256M -smp 2 -nographic \ + -net none -kernel /boot/vmlinuz-$KVERSION \ +- -append "root=LABEL=dracut rw loglevel=77 rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 init=/sbin/init $DEBUGFAIL" \ ++ -no-reboot \ ++ -append "panic=1 root=LABEL=dracut rw loglevel=77 rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 init=/sbin/init $DEBUGFAIL" \ + -initrd $TESTDIR/initramfs.testing + grep -F -m 1 -q dracut-root-block-success $TESTDIR/marker.disk || return 1 + } +diff --git a/test/TEST-03-USR-MOUNT/test.sh b/test/TEST-03-USR-MOUNT/test.sh +index c3f810ab..cd6f2826 100755 +--- a/test/TEST-03-USR-MOUNT/test.sh ++++ b/test/TEST-03-USR-MOUNT/test.sh +@@ -20,7 +20,8 @@ client_run() { + -hdc $TESTDIR/result \ + -m 256M -smp 2 -nographic \ + -net none -kernel /boot/vmlinuz-$KVERSION \ +- -append "root=LABEL=dracut $client_opts rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 $DEBUGFAIL" \ ++ -no-reboot \ ++ -append "panic=1 root=LABEL=dracut $client_opts rd.retry=3 rd.info console=ttyS0,115200n81 selinux=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 1adb34e9..13ab37b4 100755 +--- a/test/TEST-04-FULL-SYSTEMD/test.sh ++++ b/test/TEST-04-FULL-SYSTEMD/test.sh +@@ -22,7 +22,8 @@ client_run() { + -hdc $TESTDIR/result \ + -m 256M -smp 2 -nographic \ + -net none \ +- -append "$client_opts rd.device.timeout=20 rd.retry=3 console=ttyS0,115200n81 selinux=0 $DEBUGOUT $DEBUGFAIL" \ ++ -no-reboot \ ++ -append "panic=1 $client_opts rd.device.timeout=20 rd.retry=3 console=ttyS0,115200n81 selinux=0 $DEBUGOUT $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 7f99c0e0..364f7d51 100755 +--- a/test/TEST-10-RAID/test.sh ++++ b/test/TEST-10-RAID/test.sh +@@ -12,7 +12,8 @@ test_run() { + -hda $DISKIMAGE \ + -m 256M -smp 2 -nographic \ + -net none -kernel /boot/vmlinuz-$KVERSION \ +- -append "root=/dev/dracut/root rd.auto rw rd.retry=10 console=ttyS0,115200n81 selinux=0 $DEBUGFAIL" \ ++ -no-reboot \ ++ -append "panic=1 root=/dev/dracut/root rd.auto rw rd.retry=10 console=ttyS0,115200n81 selinux=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 a4ee86da..fb009461 100755 +--- a/test/TEST-11-LVM/test.sh ++++ b/test/TEST-11-LVM/test.sh +@@ -11,7 +11,8 @@ test_run() { + -hda $TESTDIR/root.ext2 \ + -m 256M -smp 2 -nographic \ + -net none -kernel /boot/vmlinuz-$KVERSION \ +- -append "root=/dev/dracut/root rw rd.auto=1 quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL" \ ++ -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 $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 aae5e8b4..d4cb9d00 100755 +--- a/test/TEST-12-RAID-DEG/test.sh ++++ b/test/TEST-12-RAID-DEG/test.sh +@@ -19,7 +19,8 @@ client_run() { + -hdc $TESTDIR/disk2.img.new \ + -hdd $TESTDIR/disk3.img.new \ + -net none -kernel /boot/vmlinuz-$KVERSION \ +- -append "$* root=LABEL=root rw rd.retry=20 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL " \ ++ -no-reboot \ ++ -append "panic=1 $* root=LABEL=root rw rd.retry=20 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $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 8194166b..196dd3b6 100755 +--- a/test/TEST-13-ENC-RAID-LVM/test.sh ++++ b/test/TEST-13-ENC-RAID-LVM/test.sh +@@ -19,7 +19,8 @@ test_run() { + -hdb $TESTDIR/check-success.img \ + -m 256M -smp 2 -nographic \ + -net none -kernel /boot/vmlinuz-$KVERSION \ +- -append "root=/dev/dracut/root rw rd.auto rd.retry=20 console=ttyS0,115200n81 selinux=0 $LUKSARGS rd.device.timeout=40 $DEBUGFAIL" \ ++ -no-reboot \ ++ -append "panic=1 root=/dev/dracut/root rw rd.auto rd.retry=20 console=ttyS0,115200n81 selinux=0 $LUKSARGS rd.device.timeout=40 $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]" +@@ -32,7 +33,8 @@ test_run() { + -hdb $TESTDIR/check-success.img \ + -m 256M -smp 2 -nographic \ + -net none -kernel /boot/vmlinuz-$KVERSION \ +- -append "root=/dev/dracut/root rw quiet rd.auto rd.retry=20 rd.info console=ttyS0,115200n81 selinux=0 rd.device.timeout=40 $DEBUGFAIL" \ ++ -no-reboot \ ++ -append "panic=1 root=/dev/dracut/root rw quiet rd.auto rd.retry=20 rd.info console=ttyS0,115200n81 selinux=0 rd.device.timeout=40 $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]" +@@ -45,7 +47,8 @@ test_run() { + -hdb $TESTDIR/check-success.img \ + -m 256M -smp 2 -nographic \ + -net none -kernel /boot/vmlinuz-$KVERSION \ +- -append "root=/dev/dracut/root rw quiet rd.auto rd.retry=10 rd.info console=ttyS0,115200n81 selinux=0 rd.debug rd.luks.uuid=failme rd.device.timeout=40 $DEBUGFAIL" \ ++ -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 rd.luks.uuid=failme rd.device.timeout=40 $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]" +diff --git a/test/TEST-14-IMSM/test.sh b/test/TEST-14-IMSM/test.sh +index 783ec4a5..4e5d665f 100755 +--- a/test/TEST-14-IMSM/test.sh ++++ b/test/TEST-14-IMSM/test.sh +@@ -15,7 +15,8 @@ client_run() { + -hdc $TESTDIR/disk2 \ + -m 256M -nographic \ + -net none -kernel /boot/vmlinuz-$KVERSION \ +- -append "$* root=LABEL=root rw debug rd.retry=20 rd.debug console=ttyS0,115200n81 selinux=0 rd.info $DEBUGFAIL" \ ++ -no-reboot \ ++ -append "panic=1 $* root=LABEL=root rw debug rd.retry=20 rd.debug console=ttyS0,115200n81 selinux=0 rd.info $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 1e3e18c1..51ffd966 100755 +--- a/test/TEST-15-BTRFSRAID/test.sh ++++ b/test/TEST-15-BTRFSRAID/test.sh +@@ -11,7 +11,8 @@ test_run() { + -hda $DISKIMAGE \ + -m 256M -smp 2 -nographic \ + -net none -kernel /boot/vmlinuz-$KVERSION \ +- -append "root=LABEL=root rw rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 $DEBUGFAIL" \ ++ -no-reboot \ ++ -append "panic=1 root=LABEL=root rw rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 $DEBUGFAIL" \ + -initrd $TESTDIR/initramfs.testing + dd if=$DISKIMAGE bs=512 count=2 | grep -F -m 1 -q dracut-root-block-success $DISKIMAGE || return 1 + } +diff --git a/test/TEST-16-DMSQUASH/test.sh b/test/TEST-16-DMSQUASH/test.sh +index 6daa35e7..3b4600e1 100755 +--- a/test/TEST-16-DMSQUASH/test.sh ++++ b/test/TEST-16-DMSQUASH/test.sh +@@ -21,7 +21,8 @@ test_run() { + -hda "$TESTDIR"/root.img \ + -m 256M -smp 2 -nographic \ + -net none -kernel /boot/vmlinuz-"$KVERSION" \ +- -append "root=live:CDLABEL=LiveCD live rw quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL" \ ++ -no-reboot \ ++ -append "panic=1 root=live:CDLABEL=LiveCD live rw quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL" \ + -initrd "$TESTDIR"/initramfs.testing + grep -F -m 1 -q dracut-root-block-success -- "$TESTDIR"/root.img || return 1 + } +diff --git a/test/TEST-17-LVM-THIN/test.sh b/test/TEST-17-LVM-THIN/test.sh +index f15e1a3d..9a9ed6f3 100755 +--- a/test/TEST-17-LVM-THIN/test.sh ++++ b/test/TEST-17-LVM-THIN/test.sh +@@ -11,7 +11,8 @@ test_run() { + -hda $TESTDIR/root.ext2 \ + -m 256M -smp 2 -nographic \ + -net none -kernel /boot/vmlinuz-$KVERSION \ +- -append "root=/dev/dracut/root rw rd.auto=1 quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL" \ ++ -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 $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 64fc5501..9e02a18d 100755 +--- a/test/TEST-20-NFS/test.sh ++++ b/test/TEST-20-NFS/test.sh +@@ -23,7 +23,8 @@ run_server() { + -serial ${SERIAL:-null} \ + -watchdog i6300esb -watchdog-action poweroff \ + -kernel /boot/vmlinuz-$KVERSION \ +- -append "rd.debug loglevel=77 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0" \ ++ -no-reboot \ ++ -append "panic=1 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 + chmod 644 $TESTDIR/server.pid || return 1 +@@ -58,7 +59,8 @@ client_test() { + -net socket,connect=127.0.0.1:12320 \ + -kernel /boot/vmlinuz-$KVERSION \ + -watchdog i6300esb -watchdog-action poweroff \ +- -append "$cmdline $DEBUGFAIL rd.debug rd.retry=10 rd.info quiet ro console=ttyS0,115200n81 selinux=0" \ ++ -no-reboot \ ++ -append "panic=1 $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 a610b0e4..a82a9508 100755 +--- a/test/TEST-30-ISCSI/test.sh ++++ b/test/TEST-30-ISCSI/test.sh +@@ -25,7 +25,8 @@ run_server() { + -net nic,macaddr=52:54:00:12:34:56,model=e1000 \ + -net nic,macaddr=52:54:00:12:34:57,model=e1000 \ + -net socket,listen=127.0.0.1:12330 \ +- -append "root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0 $SERVER_DEBUG" \ ++ -no-reboot \ ++ -append "panic=1 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0 $SERVER_DEBUG" \ + -initrd $TESTDIR/initramfs.server \ + -pidfile $TESTDIR/server.pid -daemonize || return 1 + chmod 644 $TESTDIR/server.pid || return 1 +@@ -49,7 +50,8 @@ run_client() { + -net nic,macaddr=52:54:00:12:34:00,model=e1000 \ + -net nic,macaddr=52:54:00:12:34:01,model=e1000 \ + -net socket,connect=127.0.0.1:12330 \ +- -append "rw rd.auto rd.device.timeout=300 rd.retry=50 console=ttyS0,115200n81 selinux=0 rd.debug=0 $DEBUGFAIL $*" \ ++ -no-reboot \ ++ -append "panic=1 rw rd.auto rd.device.timeout=300 rd.retry=50 console=ttyS0,115200n81 selinux=0 rd.debug=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 73123c22..a781ef0c 100755 +--- a/test/TEST-40-NBD/test.sh ++++ b/test/TEST-40-NBD/test.sh +@@ -24,7 +24,8 @@ run_server() { + -net socket,listen=127.0.0.1:12340 \ + -serial $SERIAL \ + -kernel /boot/vmlinuz-$KVERSION \ +- -append "root=/dev/sda rootfstype=ext2 rw quiet console=ttyS0,115200n81 selinux=0" \ ++ -no-reboot \ ++ -append "panic=1 root=/dev/sda rootfstype=ext2 rw quiet console=ttyS0,115200n81 selinux=0" \ + -initrd $TESTDIR/initramfs.server -pidfile $TESTDIR/server.pid -daemonize || return 1 + chmod 644 $TESTDIR/server.pid || return 1 + +@@ -61,7 +62,8 @@ client_test() { + -net nic,macaddr=$mac,model=e1000 \ + -net socket,connect=127.0.0.1:12340 \ + -kernel /boot/vmlinuz-$KVERSION \ +- -append "$cmdline $DEBUGFAIL rd.auto rd.info rd.retry=10 ro console=ttyS0,115200n81 selinux=0 " \ ++ -no-reboot \ ++ -append "panic=1 $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 642a7486..627b8ca7 100755 +--- a/test/TEST-50-MULTINIC/test.sh ++++ b/test/TEST-50-MULTINIC/test.sh +@@ -23,7 +23,8 @@ run_server() { + ${SERIAL:+-serial "$SERIAL"} \ + -watchdog i6300esb -watchdog-action poweroff \ + -kernel /boot/vmlinuz-"$KVERSION" \ +- -append "loglevel=7 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0" \ ++ -no-reboot \ ++ -append "panic=1 loglevel=7 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0" \ + -initrd "$TESTDIR"/initramfs.server \ + -pidfile "$TESTDIR"/server.pid -daemonize || return 1 + chmod 644 -- "$TESTDIR"/server.pid || return 1 +@@ -58,7 +59,8 @@ client_test() { + -net nic,macaddr=52:54:00:12:34:$mac3,model=e1000 \ + -watchdog i6300esb -watchdog-action poweroff \ + -kernel /boot/vmlinuz-"$KVERSION" \ +- -append "$cmdline $DEBUGFAIL rd.retry=5 rw console=ttyS0,115200n81 selinux=0 init=/sbin/init rd.debug systemd.log_target=console loglevel=7" \ ++ -no-reboot \ ++ -append "panic=1 $cmdline $DEBUGFAIL rd.retry=5 rw 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-60-MTUMAC/test.sh b/test/TEST-60-MTUMAC/test.sh +index b70e3161..f2d5c4a0 100755 +--- a/test/TEST-60-MTUMAC/test.sh ++++ b/test/TEST-60-MTUMAC/test.sh +@@ -22,7 +22,8 @@ run_server() { + ${SERIAL:+-serial "$SERIAL"} \ + -watchdog i6300esb -watchdog-action poweroff \ + -kernel /boot/vmlinuz-"$KVERSION" \ +- -append "loglevel=7 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0" \ ++ -no-reboot \ ++ -append "panic=1 loglevel=7 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0" \ + -initrd "$TESTDIR"/initramfs.server \ + -pidfile "$TESTDIR"/server.pid -daemonize || return 1 + chmod 644 -- "$TESTDIR"/server.pid || return 1 +@@ -56,7 +57,8 @@ client_test() { + -net nic,macaddr=52:54:00:12:34:05,model=e1000 \ + -watchdog i6300esb -watchdog-action poweroff \ + -kernel /boot/vmlinuz-"$KVERSION" \ +- -append "$cmdline $DEBUGFAIL rd.retry=5 rw console=ttyS0,115200n81 selinux=0 init=/sbin/init" \ ++ -no-reboot \ ++ -append "panic=1 $cmdline $DEBUGFAIL rd.retry=5 rw console=ttyS0,115200n81 selinux=0 init=/sbin/init" \ + -initrd "$TESTDIR"/initramfs.testing + + { +diff --git a/test/TEST-70-BONDBRIDGETEAMVLAN/dhcpd.conf b/test/TEST-70-BONDBRIDGETEAMVLAN/dhcpd.conf +index ec810c29..e26bd60b 100644 +--- a/test/TEST-70-BONDBRIDGETEAMVLAN/dhcpd.conf ++++ b/test/TEST-70-BONDBRIDGETEAMVLAN/dhcpd.conf +@@ -22,6 +22,6 @@ subnet 192.168.51.0 netmask 255.255.255.0 { + option domain-name-servers 192.168.51.1; + option domain-search "example.com"; + option domain-name "other.com"; +- option root-path "nfs:192.168.50.1:/nfs/client"; ++ option root-path "nfs:192.168.51.1:/nfs/client"; + range 192.168.51.10 192.168.51.100; + } +diff --git a/test/TEST-70-BONDBRIDGETEAMVLAN/test.sh b/test/TEST-70-BONDBRIDGETEAMVLAN/test.sh +index dcf9d5cf..9cf1f1a1 100755 +--- a/test/TEST-70-BONDBRIDGETEAMVLAN/test.sh ++++ b/test/TEST-70-BONDBRIDGETEAMVLAN/test.sh +@@ -29,7 +29,8 @@ run_server() { + ${SERIAL:+-serial "$SERIAL"} \ + -watchdog i6300esb -watchdog-action poweroff \ + -kernel /boot/vmlinuz-"$KVERSION" \ +- -append "loglevel=7 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0" \ ++ -no-reboot \ ++ -append "panic=1 loglevel=7 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0" \ + -initrd "$TESTDIR"/initramfs.server \ + -pidfile "$TESTDIR"/server.pid -daemonize || return 1 + chmod 644 -- "$TESTDIR"/server.pid || return 1 +@@ -70,7 +71,8 @@ client_test() { + -net nic,vlan=3,macaddr=52:54:00:12:34:05,model=e1000 \ + -watchdog i6300esb -watchdog-action poweroff \ + -kernel /boot/vmlinuz-"$KVERSION" \ +- -append "$cmdline rd.info $DEBUGFAIL rd.retry=5 rw console=ttyS0,115200n81 selinux=0 init=/sbin/init" \ ++ -no-reboot \ ++ -append "panic=1 $cmdline rd.info $DEBUGFAIL rd.retry=5 rw console=ttyS0,115200n81 selinux=0 init=/sbin/init" \ + -initrd "$TESTDIR"/initramfs.testing + + { diff --git a/SOURCES/0475-TEST-99-RPM-speedup-test.patch b/SOURCES/0475-TEST-99-RPM-speedup-test.patch new file mode 100644 index 0000000..e7db6d1 --- /dev/null +++ b/SOURCES/0475-TEST-99-RPM-speedup-test.patch @@ -0,0 +1,126 @@ +From 968eb46fce41fc1819afd1f0683a61704e35fe54 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 11 Nov 2016 14:08:14 +0100 +Subject: [PATCH] TEST-99-RPM: speedup test + +--- + Makefile | 2 +- + test/TEST-99-RPM/test.sh | 38 +++++++++++++++++++++++--------------- + 2 files changed, 24 insertions(+), 16 deletions(-) + +diff --git a/Makefile b/Makefile +index 18f5a88c..97987377 100644 +--- a/Makefile ++++ b/Makefile +@@ -189,7 +189,7 @@ rpm: dracut-$(VERSION).tar.bz2 syncheck + (cd "$$rpmbuild"; rpmbuild --define "_topdir $$PWD" --define "_sourcedir $$PWD" \ + --define "_specdir $$PWD" --define "_srcrpmdir $$PWD" \ + --define "_rpmdir $$PWD" -ba dracut.spec; ) && \ +- ( mv "$$rpmbuild"/$$(arch)/*.rpm .; mv "$$rpmbuild"/*.src.rpm .;rm -fr -- "$$rpmbuild"; ls *.rpm ) ++ ( mv "$$rpmbuild"/$$(arch)/*.rpm $(DESTDIR).; mv "$$rpmbuild"/*.src.rpm $(DESTDIR).;rm -fr -- "$$rpmbuild"; ls $(DESTDIR)*.rpm ) + + syncheck: + @ret=0;for i in dracut-initramfs-restore.sh modules.d/*/*.sh; do \ +diff --git a/test/TEST-99-RPM/test.sh b/test/TEST-99-RPM/test.sh +index fc682734..17c0bf8d 100755 +--- a/test/TEST-99-RPM/test.sh ++++ b/test/TEST-99-RPM/test.sh +@@ -1,11 +1,14 @@ + #!/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="rpm integrity after dracut and kernel install" +-$TESTDIR ++ ++test_check() { ++ command -v rpm &>/dev/null && ( command -v yum || command -v dnf ) &>/dev/null ++} + + test_run() { + set -x ++ set -e + export rootdir=$TESTDIR/root + + mkdir -p $rootdir +@@ -14,33 +17,34 @@ test_run() { + mkdir -p "$rootdir/sys" + mkdir -p "$rootdir/dev" + +-trap 'ret=$?; [[ -d $rootdir ]] && { umount "$rootdir/proc"; umount "$rootdir/sys"; umount "$rootdir/dev"; rm -rf -- "$rootdir"; }; exit $ret;' EXIT +-trap '[[ -d $rootdir ]] && { umount "$rootdir/proc"; umount "$rootdir/sys"; umount "$rootdir/dev"; rm -rf -- "$rootdir"; }; exit 1;' SIGINT ++trap 'ret=$?; [[ -d $rootdir ]] && { umount "$rootdir/proc"; umount "$rootdir/sys"; umount "$rootdir/dev"; rm -rf -- "$rootdir"; } || :; exit $ret;' EXIT ++trap '[[ -d $rootdir ]] && { umount "$rootdir/proc"; umount "$rootdir/sys"; umount "$rootdir/dev"; rm -rf -- "$rootdir"; } || :; exit 1;' SIGINT + + mount --bind /proc "$rootdir/proc" + mount --bind /sys "$rootdir/sys" + mount -t devtmpfs devtmpfs "$rootdir/dev" + +- yum --nogpgcheck --releasever=/ --installroot "$rootdir"/ install -y \ +- yum \ ++ dnf_or_yum=yum ++ command -v dnf >/dev/null && dnf_or_yum="dnf --allowerasing" ++ $dnf_or_yum --releasever=7 --nogpgcheck --installroot "$rootdir"/ install -y \ ++ $dnf_or_yum \ + passwd \ + rootfiles \ + systemd \ + kernel \ +- fedora-release \ + device-mapper-multipath \ + lvm2 \ + mdadm \ + bash \ + iscsi-initiator-utils \ +- $basedir/dracut-[0-9]*.$(arch).rpm \ +- $basedir/dracut-network-[0-9]*.$(arch).rpm ++ "$TESTDIR"/dracut-[0-9]*.$(arch).rpm \ ++ "$TESTDIR"/dracut-network-[0-9]*.$(arch).rpm + + cat >"$rootdir"/test.sh <<EOF + #!/bin/bash + set -x + export LC_MESSAGES=C +-rpm -Va &> /test.output ++rpm -Va |& grep -F -v '85-display-manager.preset' &> /test.output + find / -xdev -type f -not -path '/var/*' \ + -not -path '/usr/lib/modules/*/modules.*' \ + -not -path '/etc/*-' \ +@@ -51,18 +55,20 @@ find / -xdev -type f -not -path '/var/*' \ + -not -path '/etc/nsswitch.conf.bak' \ + -not -path '/etc/iscsi/initiatorname.iscsi' \ + -not -path '/boot/*0-rescue*' \ ++ -not -path '/usr/share/mime/*' \ ++ -not -path '/etc/crypto-policies/*' \ + -not -path '/dev/null' \ + -not -path "/boot/loader/entries/\$(cat /etc/machine-id)-*" \ + -not -path "/boot/\$(cat /etc/machine-id)/*" \ + -not -path '/etc/openldap/certs/*' \ +- -exec rpm -qf '{}' ';' | \ +- grep -F 'not owned' &> /test.output +-exit ++ -print0 | xargs -0 rpm -qf | \ ++ grep -F 'not owned' &>> /test.output ++exit 0 + EOF + + chmod 0755 "$rootdir/test.sh" + +- chroot "$rootdir" /test.sh ++ chroot "$rootdir" /test.sh || : + + if [[ -s "$rootdir"/test.output ]]; then + failed=1 +@@ -80,10 +86,12 @@ EOF + } + + test_setup() { ++ make -C "$basedir" DESTDIR="$TESTDIR/" rpm + return 0 + } + + test_cleanup() { ++ rm -fr -- "$TESTDIR"/*.rpm + return 0 + } + diff --git a/SOURCES/0476-fips-module-setup.sh-also-blacklist-the-alias-resolv.patch b/SOURCES/0476-fips-module-setup.sh-also-blacklist-the-alias-resolv.patch new file mode 100644 index 0000000..c9132a3 --- /dev/null +++ b/SOURCES/0476-fips-module-setup.sh-also-blacklist-the-alias-resolv.patch @@ -0,0 +1,34 @@ +From 73cf135d804f18b7a1c51ad30004cab9636d2fe8 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 30 Nov 2016 13:54:20 +0100 +Subject: [PATCH] fips/module-setup.sh: also blacklist the alias resolved + modules + +--- + modules.d/01fips/module-setup.sh | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh +index dc476347..3bf6c332 100755 +--- a/modules.d/01fips/module-setup.sh ++++ b/modules.d/01fips/module-setup.sh +@@ -11,7 +11,7 @@ depends() { + } + + installkernel() { +- local _fipsmodules _mod ++ local _fipsmodules _mod i + + if [[ -f "${srcmods}/modules.fips" ]]; then + _fipsmodules="$(cat "${srcmods}/modules.fips")" +@@ -30,6 +30,10 @@ installkernel() { + if hostonly='' instmods -c -s $_mod; then + echo $_mod >> "${initdir}/etc/fipsmodules" + echo "blacklist $_mod" >> "${initdir}/etc/modprobe.d/fips.conf" ++ for i in $(modprobe --resolve-alias $_mod 2>/dev/null); do ++ [[ $i == $_mod ]] && continue ++ echo "blacklist $i" >> "${initdir}/etc/modprobe.d/fips.conf" ++ done + fi + done + } diff --git a/SOURCES/0477-fips-fips.sh-also-check-for-crypto-mod-in-proc-crypt.patch b/SOURCES/0477-fips-fips.sh-also-check-for-crypto-mod-in-proc-crypt.patch new file mode 100644 index 0000000..eb9e08b --- /dev/null +++ b/SOURCES/0477-fips-fips.sh-also-check-for-crypto-mod-in-proc-crypt.patch @@ -0,0 +1,24 @@ +From 455f87f41f808e97c243585691e615bc1a487013 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 30 Nov 2016 13:54:49 +0100 +Subject: [PATCH] fips/fips.sh: also check for crypto-$mod in /proc/crypto + +if the module name is the alias crypto-<algo>, check if <algo> is in +/proc/crypto as "name : <algo>" or "driver: <algo>" +--- + 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 7fa48f13..0b69a823 100755 +--- a/modules.d/01fips/fips.sh ++++ b/modules.d/01fips/fips.sh +@@ -96,7 +96,7 @@ do_fips() + _found=0 + while read _k _s _v; do + [ "$_k" != "name" -a "$_k" != "driver" ] && continue +- [ "$_v" != "$_module" ] && continue ++ [ "$_v" != "$_module" ] && [ "crypto-$_v" != "$_module" ] && continue + _found=1 + break + done </proc/crypto diff --git a/SOURCES/0478-README.md-correct-CentOS-build-job-link.patch b/SOURCES/0478-README.md-correct-CentOS-build-job-link.patch new file mode 100644 index 0000000..add781c --- /dev/null +++ b/SOURCES/0478-README.md-correct-CentOS-build-job-link.patch @@ -0,0 +1,19 @@ +From 11366030aab04d48b9dc14ad46a6598c5fb4598a Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 30 Nov 2016 14:01:03 +0100 +Subject: [PATCH] README.md: correct CentOS build job link + +--- + README.md | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/README.md b/README.md +index 9617eaf9..8bfda446 100644 +--- a/README.md ++++ b/README.md +@@ -2,4 +2,4 @@ + + dracut is an initramfs infrastructure. + +-CentOS CI Status: [](https://ci.centos.org/job/dracut-pr-build/) ++CentOS CI Status: [](https://ci.centos.org/job/dracut-matrix-master/) diff --git a/SOURCES/0479-README.md-correct-CentOS-build-job-link.patch b/SOURCES/0479-README.md-correct-CentOS-build-job-link.patch new file mode 100644 index 0000000..c481ba2 --- /dev/null +++ b/SOURCES/0479-README.md-correct-CentOS-build-job-link.patch @@ -0,0 +1,19 @@ +From d381343caac54ec48d9757bb7bd66956fd4fdbd7 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 30 Nov 2016 14:06:58 +0100 +Subject: [PATCH] README.md: correct CentOS build job link + +--- + README.md | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/README.md b/README.md +index 8bfda446..9cfccae7 100644 +--- a/README.md ++++ b/README.md +@@ -2,4 +2,4 @@ + + dracut is an initramfs infrastructure. + +-CentOS CI Status: [](https://ci.centos.org/job/dracut-matrix-master/) ++CentOS CI Status: [](https://ci.centos.org/job/dracut-push-master/) diff --git a/SOURCES/0480-README.md-correct-CentOS-build-job-link.patch b/SOURCES/0480-README.md-correct-CentOS-build-job-link.patch new file mode 100644 index 0000000..4fb38b8 --- /dev/null +++ b/SOURCES/0480-README.md-correct-CentOS-build-job-link.patch @@ -0,0 +1,19 @@ +From 5fd8d273832132635bf48fad7ae7694025590b22 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 30 Nov 2016 14:15:37 +0100 +Subject: [PATCH] README.md: correct CentOS build job link + +--- + README.md | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/README.md b/README.md +index 9cfccae7..2f88ff74 100644 +--- a/README.md ++++ b/README.md +@@ -2,4 +2,4 @@ + + dracut is an initramfs infrastructure. + +-CentOS CI Status: [](https://ci.centos.org/job/dracut-push-master/) ++CentOS CI Status: [](https://ci.centos.org/job/dracut-push-rhel-7/) diff --git a/SOURCES/0481-fips-module-setup.sh-make-tcrypt-non-optional.patch b/SOURCES/0481-fips-module-setup.sh-make-tcrypt-non-optional.patch new file mode 100644 index 0000000..ba629db --- /dev/null +++ b/SOURCES/0481-fips-module-setup.sh-make-tcrypt-non-optional.patch @@ -0,0 +1,28 @@ +From 1bb76cea727468cf2c1a05814b93a83711be3ee9 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 30 Nov 2016 15:01:39 +0100 +Subject: [PATCH] fips/module-setup.sh: make tcrypt non-optional + +--- + modules.d/01fips/module-setup.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh +index 3bf6c332..d553a8c1 100755 +--- a/modules.d/01fips/module-setup.sh ++++ b/modules.d/01fips/module-setup.sh +@@ -21,12 +21,12 @@ installkernel() { + _fipsmodules+="ecb eseqiv fcrypt gcm ghash_generic hmac khazad lzo md4 md5 michael_mic rmd128 " + _fipsmodules+="rmd160 rmd256 rmd320 rot13 salsa20 seed seqiv serpent sha1 sha224 sha256 sha256_generic " + _fipsmodules+="aes_s390 des_s390 prng sha256_s390 sha_common des_check_key sha1_s390 sha512_s390 " +- _fipsmodules+="sha384 sha512 sha512_generic tcrypt tea tnepres twofish wp256 wp384 wp512 xeta xtea xts zlib " ++ _fipsmodules+="sha384 sha512 sha512_generic tea tnepres twofish wp256 wp384 wp512 xeta xtea xts zlib " + fi + + mkdir -m 0755 -p "${initdir}/etc/modprobe.d" + +- for _mod in $_fipsmodules; do ++ for _mod in $_fipsmodules tcrypt; do + if hostonly='' instmods -c -s $_mod; then + echo $_mod >> "${initdir}/etc/fipsmodules" + echo "blacklist $_mod" >> "${initdir}/etc/modprobe.d/fips.conf" diff --git a/SOURCES/0482-dracut.sh-skip-empty-lines-in-proc-modules.patch b/SOURCES/0482-dracut.sh-skip-empty-lines-in-proc-modules.patch new file mode 100644 index 0000000..8eb0020 --- /dev/null +++ b/SOURCES/0482-dracut.sh-skip-empty-lines-in-proc-modules.patch @@ -0,0 +1,22 @@ +From b120b0c116591c80503404cd4d2f630508ce9b34 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 11 Jan 2017 13:40:13 +0100 +Subject: [PATCH] dracut.sh: skip empty lines in /proc/modules + +https://bugzilla.redhat.com/show_bug.cgi?id=1405025 +--- + dracut.sh | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/dracut.sh b/dracut.sh +index 90ea9c32..e45dc7bb 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1132,6 +1132,7 @@ if [[ $hostonly ]]; then + # check /proc/modules + declare -A host_modules + while read m rest; do ++ [ -z "$m" ] && continue + host_modules["$m"]=1 + done </proc/modules + fi diff --git a/SOURCES/0483-dracut.conf.5.asc-add-Warning-about-leading-and-trai.patch b/SOURCES/0483-dracut.conf.5.asc-add-Warning-about-leading-and-trai.patch new file mode 100644 index 0000000..3c14b22 --- /dev/null +++ b/SOURCES/0483-dracut.conf.5.asc-add-Warning-about-leading-and-trai.patch @@ -0,0 +1,26 @@ +From fa861e2cbff8cde4fd55437f63f29d2b38c57d09 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 11 Jan 2017 13:47:24 +0100 +Subject: [PATCH] dracut.conf.5.asc: add Warning about leading and trailing + spaces in lists + +--- + dracut.conf.5.asc | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/dracut.conf.5.asc b/dracut.conf.5.asc +index c20a341d..f4ad49d2 100644 +--- a/dracut.conf.5.asc ++++ b/dracut.conf.5.asc +@@ -30,6 +30,11 @@ dracut command line options will overwrite any values set here. + + Configuration files must have the extension .conf; other extensions are ignored. + ++[WARNING] ++==== ++Space-separated lists have to have a leading and trailing space! ++==== ++ + *dracutmodules+=*" __<dracut modules>__ ":: + Specify a space-separated list of dracut modules to call when building the + initramfs. Modules are located in _/usr/lib/dracut/modules.d_. diff --git a/SOURCES/0484-systemd-dracut-cmdline.sh-unset-UNSET-root.patch b/SOURCES/0484-systemd-dracut-cmdline.sh-unset-UNSET-root.patch new file mode 100644 index 0000000..feb02a8 --- /dev/null +++ b/SOURCES/0484-systemd-dracut-cmdline.sh-unset-UNSET-root.patch @@ -0,0 +1,24 @@ +From 72ae0fd418680b7e4931ce760efdfea455740ccb Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Fri, 12 Aug 2016 11:24:47 +0200 +Subject: [PATCH] systemd/dracut-cmdline.sh: unset "UNSET" $root + +https://bugzilla.redhat.com/show_bug.cgi?id=1365667 +caused by commit 9aa224cc +--- + modules.d/98systemd/dracut-cmdline.sh | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/modules.d/98systemd/dracut-cmdline.sh b/modules.d/98systemd/dracut-cmdline.sh +index 17b30a34..630f3f92 100755 +--- a/modules.d/98systemd/dracut-cmdline.sh ++++ b/modules.d/98systemd/dracut-cmdline.sh +@@ -79,6 +79,8 @@ esac + [ -z "${root}${root_unset}" ] && die "Empty root= argument" + [ -z "$rootok" ] && die "Don't know how to handle 'root=$root'" + ++[ "$root" = "UNSET" ] && unset root ++ + export root rflags fstype netroot NEWROOT + + export -p > /dracut-state.sh diff --git a/SOURCES/0485-add-dracut.pc-pkg-config-file.patch b/SOURCES/0485-add-dracut.pc-pkg-config-file.patch new file mode 100644 index 0000000..a898afc --- /dev/null +++ b/SOURCES/0485-add-dracut.pc-pkg-config-file.patch @@ -0,0 +1,69 @@ +From d971a570d091a77c765c996a2c470a7d9fddd0b1 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 13 May 2015 11:46:05 +0200 +Subject: [PATCH] add dracut.pc pkg-config file + +--- + Makefile | 15 +++++++++++++-- + dracut.spec | 1 + + 2 files changed, 14 insertions(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index 97987377..2977d187 100644 +--- a/Makefile ++++ b/Makefile +@@ -15,6 +15,7 @@ mandir ?= ${prefix}/share/man + CFLAGS ?= -O2 -g -Wall + CFLAGS += -std=gnu99 -D_FILE_OFFSET_BITS=64 + bashcompletiondir ?= ${datadir}/bash-completion/completions ++pkgconfigdatadir ?= $(datadir)/pkgconfig + + man1pages = lsinitrd.1 + +@@ -40,7 +41,7 @@ manpages = $(man1pages) $(man5pages) $(man7pages) $(man8pages) + + .PHONY: install clean archive rpm testimage test all check AUTHORS doc dracut-version.sh + +-all: dracut-version.sh dracut-install skipcpio/skipcpio ++all: dracut-version.sh dracut.pc dracut-install skipcpio/skipcpio + + DRACUT_INSTALL_OBJECTS = \ + install/dracut-install.o \ +@@ -93,7 +94,15 @@ dracut.html: dracut.asc $(manpages) dracut.css dracut.usage.asc + http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl dracut.xml + rm -f -- dracut.xml + +-install: dracut-version.sh ++dracut.pc: Makefile.inc Makefile ++ @echo "Name: dracut" > dracut.pc ++ @echo "Description: dracut" >> dracut.pc ++ @echo "Version: $(VERSION)$(GITVERSION)" >> dracut.pc ++ @echo "dracutdir=$(pkglibdir)" >> dracut.pc ++ @echo "dracutmodulesdir=$(pkglibdir)/modules.d" >> dracut.pc ++ @echo "dracutconfdir=$(pkglibdir)/dracut.conf.d" >> dracut.pc ++ ++install: all + mkdir -p $(DESTDIR)$(pkglibdir) + mkdir -p $(DESTDIR)$(bindir) + mkdir -p $(DESTDIR)$(sysconfdir) +@@ -153,6 +162,8 @@ endif + mkdir -p $(DESTDIR)${bashcompletiondir} + install -m 0644 dracut-bash-completion.sh $(DESTDIR)${bashcompletiondir}/dracut + install -m 0644 lsinitrd-bash-completion.sh $(DESTDIR)${bashcompletiondir}/lsinitrd ++ mkdir -p $(DESTDIR)${pkgconfigdatadir} ++ install -m 0644 dracut.pc $(DESTDIR)${pkgconfigdatadir}/dracut.pc + + dracut-version.sh: + @echo "DRACUT_VERSION=$(VERSION)$(GITVERSION)" > dracut-version.sh +diff --git a/dracut.spec b/dracut.spec +index efb50b77..bf10d08b 100644 +--- a/dracut.spec ++++ b/dracut.spec +@@ -312,6 +312,7 @@ rm -rf -- $RPM_BUILD_ROOT + %endif + %dir %{_sysconfdir}/dracut.conf.d + %dir %{dracutlibdir}/dracut.conf.d ++%{_datadir}/pkgconfig/dracut.pc + %{_mandir}/man8/dracut.8* + %{_mandir}/man8/*service.8* + %if 0%{?fedora} > 12 || 0%{?rhel} >= 6 || 0%{?suse_version} > 9999 diff --git a/SOURCES/0486-dracut.sh-fail-hard-if-we-find-modules-and-modules.d.patch b/SOURCES/0486-dracut.sh-fail-hard-if-we-find-modules-and-modules.d.patch new file mode 100644 index 0000000..631aa06 --- /dev/null +++ b/SOURCES/0486-dracut.sh-fail-hard-if-we-find-modules-and-modules.d.patch @@ -0,0 +1,34 @@ +From 9301650e17a24194b0a4f78d8f91b87ef62d46dc Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 13 Jan 2016 09:32:24 +0100 +Subject: [PATCH] dracut.sh: fail hard, if we find modules and modules.dep is + missing + +If modules are present in /lib/modules/<kernelversion> and modules.dep +is empty, depmod was not run most likely. +--- + dracut.sh | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) + +diff --git a/dracut.sh b/dracut.sh +index e45dc7bb..f4e85095 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -969,9 +969,14 @@ esac + abs_outfile=$(readlink -f "$outfile") && outfile="$abs_outfile" + + if [[ -d $srcmods ]]; then +- [[ -f $srcmods/modules.dep ]] || { +- dwarn "$srcmods/modules.dep is missing. Did you run depmod?" +- } ++ if ! [[ -f $srcmods/modules.dep ]]; then ++ if [[ -n "$(find "$srcmods" -name '*.ko*')" ]]; then ++ dfatal "$srcmods/modules.dep is missing. Did you run depmod?" ++ exit 1 ++ else ++ dwarn "$srcmods/modules.dep is missing. Did you run depmod?" ++ fi ++ fi + fi + + if [[ ! $print_cmdline ]]; then diff --git a/SOURCES/0487-99base-add-memtrace-ko.sh-to-debug-kernel-module-lar.patch b/SOURCES/0487-99base-add-memtrace-ko.sh-to-debug-kernel-module-lar.patch new file mode 100644 index 0000000..1275561 --- /dev/null +++ b/SOURCES/0487-99base-add-memtrace-ko.sh-to-debug-kernel-module-lar.patch @@ -0,0 +1,275 @@ +From 3ce2235abbd28cefcef348ad7895e2529810ad7c Mon Sep 17 00:00:00 2001 +From: Xunlei Pang <xlpang@redhat.com> +Date: Thu, 3 Nov 2016 19:30:41 +0800 +Subject: [PATCH] 99base: add memtrace-ko.sh to debug kernel module large + memory consumption + +The current method for memory debug is to use "rd.memdebug=[0-3]", +it is not enough for debugging kernel modules. For example, when we +want to find out which kernel module consumes a large amount of memory, +"rd.memdebug=[0-3]" won't help too much. + +A better way is needed to achieve this requirement, this is useful for +kdump OOM debugging. + +The principle of this patch is to use kernel trace to track slab and +buddy allocation calls during kernel module loading(module_init), thus +we can analyze all the trace data and get the total memory consumption. +As for large slab allocation, it will probably fall into buddy allocation, +thus tracing "mm_page_alloc" alone should be enough for the purpose(this +saves quite some trace buffer memory, also large free is quite unlikey +during module loading, we neglect those memory free events). + +The trace events include memory calls under "tracing/events/": + kmem/mm_page_alloc + +We also inpect the following events to detect the module loading: + module/module_load + module/module_put + +Since we use filters to trace events, the final trace data size won't +be too big. Users can adjust the trace buffer size via "trace_buf_size" +kernel boot command line as needed. + +We can get the module name and task pid from "module_load" event which +also mark the beginning of the loading, and module_put called by the +same task pid implies the end of the loading. So the memory events +recorded in between by the same task pid are consumed by this module +during loading(i.e. modprobe or module_init()). + +With these information, we can record the rough total memory(the larger, +the more precise the result will be) consumption involved by each kernel +module loading. + +Thus we introduce this shell script to find out which kernel module +consumes a large amount of memory during loading. Use "rd.memdebug=4" +as the tigger. + +After applying this patch and specifying "rd.memdebug=4", during booting +it will print out something extra like below: +0 pages consumed by "pata_acpi" +0 pages consumed by "ata_generic" +1 pages consumed by "drm" +0 pages consumed by "ttm" +0 pages consumed by "drm_kms_helper" +835 pages consumed by "qxl" +0 pages consumed by "mii" +6 pages consumed by "8139cp" +0 pages consumed by "virtio" +0 pages consumed by "virtio_ring" +9 pages consumed by "virtio_pci" +1 pages consumed by "8139too" +0 pages consumed by "serio_raw" +0 pages consumed by "crc32c_intel" +199 pages consumed by "virtio_console" +0 pages consumed by "libcrc32c" +9 pages consumed by "xfs" + +From the print, we see clearly that "qxl" consumed the most memory. + +This file will be installed as a separate executable named "tracekomem" +in the following patch. + +Signed-off-by: Xunlei Pang <xlpang@redhat.com> +--- + modules.d/99base/memtrace-ko.sh | 191 ++++++++++++++++++++++++++++++++ + 1 file changed, 191 insertions(+) + create mode 100755 modules.d/99base/memtrace-ko.sh + +diff --git a/modules.d/99base/memtrace-ko.sh b/modules.d/99base/memtrace-ko.sh +new file mode 100755 +index 00000000..ee035e15 +--- /dev/null ++++ b/modules.d/99base/memtrace-ko.sh +@@ -0,0 +1,191 @@ ++#!/bin/sh ++ ++# Try to find out kernel modules with large total memory allocation during loading. ++# For large slab allocation, it will fall into buddy, also not trace "mm_page_free" ++# considering large free is quite rare for module_init, thus saving tons of events ++# to avoid trace data overwritten. ++# ++# Therefore, tracing "mm_page_alloc"alone should be enough for the purpose. ++ ++# "sys/kernel/tracing" has the priority if exists. ++get_trace_base() { ++ # trace access through debugfs would be obsolete if "/sys/kernel/tracing" is available. ++ if [ -d "/sys/kernel/tracing" ]; then ++ echo "/sys/kernel" ++ else ++ echo "/sys/kernel/debug" ++ fi ++} ++ ++# We want to enable these trace events. ++get_want_events() { ++ echo "module:module_put module:module_load kmem:mm_page_alloc" ++} ++ ++get_event_filter() { ++ echo "comm == systemd-udevd || comm == modprobe || comm == insmod" ++} ++ ++is_trace_ready() { ++ local trace_base want_events current_events ++ ++ trace_base=$(get_trace_base) ++ ! [ -f "$trace_base/tracing/trace" ] && return 1 ++ ++ [ "$(cat $trace_base/tracing/tracing_on)" -eq 0 ] && return 1 ++ ++ # Also check if trace events were properly setup. ++ want_events=$(get_want_events) ++ current_events=$(echo $(cat $trace_base/tracing/set_event)) ++ [ "$current_events" != "$want_events" ] && return 1 ++ ++ return 0 ++} ++ ++prepare_trace() { ++ local trace_base ++ ++ trace_base=$(get_trace_base) ++ # old debugfs interface case. ++ if ! [ -d "$trace_base/tracing" ]; then ++ mount none -t debugfs $trace_base ++ # new tracefs interface case. ++ elif ! [ -f "$trace_base/tracing/trace" ]; then ++ mount none -t tracefs "$trace_base/tracing" ++ fi ++ ++ if ! [ -f "$trace_base/tracing/trace" ]; then ++ echo "WARN: Mount trace failed for kernel module memory analyzing." ++ return 1 ++ fi ++ ++ # Active all the wanted trace events. ++ echo "$(get_want_events)" > $trace_base/tracing/set_event ++ ++ # There are three kinds of known applications for module loading: ++ # "systemd-udevd", "modprobe" and "insmod". ++ # Set them as the global events filter. ++ # NOTE: Some kernel may not support this format of filter, anyway ++ # the operation will fail and it doesn't matter. ++ echo "$(get_event_filter)" > $trace_base/tracing/events/kmem/filter 2>&1 ++ echo "$(get_event_filter)" > $trace_base/tracing/events/module/filter 2>&1 ++ ++ # Set the number of comm-pid if supported. ++ if [ -f "$trace_base/tracing/saved_cmdlines_size" ]; then ++ # Thanks to filters, 4096 is big enough(also well supported). ++ echo 4096 > $trace_base/tracing/saved_cmdlines_size ++ fi ++ ++ # Enable and clear trace data for the first time. ++ echo 1 > $trace_base/tracing/tracing_on ++ echo > $trace_base/tracing/trace ++ echo "Prepare trace success." ++ return 0 ++} ++ ++order_to_pages() ++{ ++ local pages=1 ++ local order=$1 ++ ++ while [ "$order" != 0 ]; do ++ order=$((order-1)) ++ pages=$(($pages*2)) ++ done ++ ++ echo $pages ++} ++ ++parse_trace_data() { ++ local module_name tmp_eval pages ++ ++ cat "$(get_trace_base)/tracing/trace" | while read pid cpu flags ts function args ++ do ++ # Skip comment lines ++ if [ "$pid" = "#" ]; then ++ continue ++ fi ++ ++ pid=${pid##*-} ++ function=${function%:} ++ if [ "$function" = "module_load" ]; then ++ # One module is being loaded, save the task pid for tracking. ++ # Remove the trailing after whitespace, there may be the module flags. ++ module_name=${args%% *} ++ # Mark current_module to track the task. ++ eval current_module_$pid="$module_name" ++ tmp_eval=$(eval echo '${module_loaded_'${module_name}'}') ++ if [ -n "$tmp_eval" ]; then ++ echo "WARN: \"$module_name\" was loaded multiple times!" ++ fi ++ eval unset module_loaded_$module_name ++ eval nr_alloc_pages_$module_name=0 ++ continue ++ fi ++ ++ module_name=$(eval echo '${current_module_'${pid}'}') ++ if [ -z "$module_name" ]; then ++ continue ++ fi ++ ++ # Once we get here, the task is being tracked(is loading a module). ++ if [ "$function" = "module_put" ]; then ++ # Mark the module as loaded when the first module_put event happens after module_load. ++ tmp_eval=$(eval echo '${nr_alloc_pages_'${module_name}'}') ++ echo "$tmp_eval pages consumed by \"$module_name\"" ++ eval module_loaded_$module_name=1 ++ # Module loading finished, so untrack the task. ++ eval unset current_module_$pid ++ eval unset nr_alloc_pages_$module_name ++ continue ++ fi ++ ++ if [ "$function" = "mm_page_alloc" ]; then ++ # Get order first, then convert to actual pages. ++ pages=$(echo $args | sed -e 's/.*order=\([0-9]*\) .*/\1/') ++ pages=$(order_to_pages "$pages") ++ tmp_eval=$(eval echo '${nr_alloc_pages_'${module_name}'}') ++ eval nr_alloc_pages_$module_name="$(($tmp_eval+$pages))" ++ fi ++ done ++} ++ ++cleanup_trace() { ++ local trace_base ++ ++ if is_trace_ready; then ++ trace_base=$(get_trace_base) ++ echo 0 > $trace_base/tracing/tracing_on ++ echo > $trace_base/tracing/trace ++ echo > $trace_base/tracing/set_event ++ echo 0 > $trace_base/tracing/events/kmem/filter ++ echo 0 > $trace_base/tracing/events/module/filter ++ fi ++} ++ ++show_usage() { ++ echo "Find out kernel modules with large memory consumption during loading based on trace." ++ echo "Usage:" ++ echo "1) run it first to setup trace." ++ echo "2) run again to parse the trace data if any." ++ echo "3) run with \"--cleanup\" option to cleanup trace after use." ++} ++ ++if [ "$1" = "--help" ]; then ++ show_usage ++ exit 0 ++fi ++ ++if [ "$1" = "--cleanup" ]; then ++ cleanup_trace ++ exit 0 ++fi ++ ++if is_trace_ready ; then ++ echo "tracekomem - Rough memory consumption by loading kernel modules (larger value with better accuracy)" ++ parse_trace_data ++else ++ prepare_trace ++fi ++ ++exit $? diff --git a/SOURCES/0488-99base-apply-kernel-module-memory-debug-support.patch b/SOURCES/0488-99base-apply-kernel-module-memory-debug-support.patch new file mode 100644 index 0000000..b08f834 --- /dev/null +++ b/SOURCES/0488-99base-apply-kernel-module-memory-debug-support.patch @@ -0,0 +1,169 @@ +From e186d99780d1247f24535e5dc4ec9c82444afaa3 Mon Sep 17 00:00:00 2001 +From: Xunlei Pang <xlpang@redhat.com> +Date: Thu, 3 Nov 2016 19:40:16 +0800 +Subject: [PATCH] 99base: apply kernel module memory debug support + +Extend "rd.memdebug" to "4", and "make_trace_mem" to "4+:komem". +Add new "cleanup_trace_mem" to cleanup the trace if active. + +Signed-off-by: Xunlei Pang <xlpang@redhat.com> +--- + modules.d/98systemd/dracut-cmdline.sh | 2 +- + modules.d/98systemd/dracut-pre-mount.sh | 2 +- + modules.d/98systemd/dracut-pre-pivot.sh | 3 ++- + modules.d/98systemd/dracut-pre-trigger.sh | 2 +- + modules.d/99base/dracut-lib.sh | 13 ++++++++++++- + modules.d/99base/init.sh | 9 +++++---- + modules.d/99base/module-setup.sh | 1 + + 7 files changed, 23 insertions(+), 9 deletions(-) + +diff --git a/modules.d/98systemd/dracut-cmdline.sh b/modules.d/98systemd/dracut-cmdline.sh +index 630f3f92..b6b899f0 100755 +--- a/modules.d/98systemd/dracut-cmdline.sh ++++ b/modules.d/98systemd/dracut-cmdline.sh +@@ -43,7 +43,7 @@ export root + export rflags + export fstype + +-make_trace_mem "hook cmdline" '1+:mem' '1+:iomem' '3+:slab' ++make_trace_mem "hook cmdline" '1+:mem' '1+:iomem' '3+:slab' '4+:komem' + # run scriptlets to parse the command line + getarg 'rd.break=cmdline' -d 'rdbreak=cmdline' && emergency_shell -n cmdline "Break before cmdline" + source_hook cmdline +diff --git a/modules.d/98systemd/dracut-pre-mount.sh b/modules.d/98systemd/dracut-pre-mount.sh +index 55b051ab..199cf965 100755 +--- a/modules.d/98systemd/dracut-pre-mount.sh ++++ b/modules.d/98systemd/dracut-pre-mount.sh +@@ -9,7 +9,7 @@ type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh + + source_conf /etc/conf.d + +-make_trace_mem "hook pre-mount" '1:shortmem' '2+:mem' '3+:slab' ++make_trace_mem "hook pre-mount" '1:shortmem' '2+:mem' '3+:slab' '4+:komem' + # pre pivot scripts are sourced just before we doing cleanup and switch over + # to the new root. + getarg 'rd.break=pre-mount' 'rdbreak=pre-mount' && emergency_shell -n pre-mount "Break pre-mount" +diff --git a/modules.d/98systemd/dracut-pre-pivot.sh b/modules.d/98systemd/dracut-pre-pivot.sh +index 4c3eefcd..c079972e 100755 +--- a/modules.d/98systemd/dracut-pre-pivot.sh ++++ b/modules.d/98systemd/dracut-pre-pivot.sh +@@ -10,12 +10,13 @@ type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh + + source_conf /etc/conf.d + +-make_trace_mem "hook pre-pivot" '1:shortmem' '2+:mem' '3+:slab' ++make_trace_mem "hook pre-pivot" '1:shortmem' '2+:mem' '3+:slab' '4+:komem' + # pre pivot scripts are sourced just before we doing cleanup and switch over + # to the new root. + getarg 'rd.break=pre-pivot' 'rdbreak=pre-pivot' && emergency_shell -n pre-pivot "Break pre-pivot" + source_hook pre-pivot + ++cleanup_trace_mem + # pre pivot cleanup scripts are sourced just before we switch over to the new root. + getarg 'rd.break=cleanup' 'rdbreak=cleanup' && emergency_shell -n cleanup "Break cleanup" + source_hook cleanup +diff --git a/modules.d/98systemd/dracut-pre-trigger.sh b/modules.d/98systemd/dracut-pre-trigger.sh +index 0dbf32a5..241cd1e5 100755 +--- a/modules.d/98systemd/dracut-pre-trigger.sh ++++ b/modules.d/98systemd/dracut-pre-trigger.sh +@@ -10,7 +10,7 @@ type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh + + source_conf /etc/conf.d + +-make_trace_mem "hook pre-trigger" "1:shortmem" "2+:mem" "3+:slab" ++make_trace_mem "hook pre-trigger" '1:shortmem' '2+:mem' '3+:slab' '4+:komem' + + source_hook pre-trigger + +diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh +index 10d9cbc5..78e01a78 100755 +--- a/modules.d/99base/dracut-lib.sh ++++ b/modules.d/99base/dracut-lib.sh +@@ -1177,12 +1177,20 @@ are_lists_eq() { + + setmemdebug() { + if [ -z "$DEBUG_MEM_LEVEL" ]; then +- export DEBUG_MEM_LEVEL=$(getargnum 0 0 3 rd.memdebug) ++ export DEBUG_MEM_LEVEL=$(getargnum 0 0 4 rd.memdebug) + fi + } + + setmemdebug + ++cleanup_trace_mem() ++{ ++ # tracekomem based on kernel trace needs cleanup after use. ++ if [ "$DEBUG_MEM_LEVEL" -eq 4 ]; then ++ tracekomem --cleanup ++ fi ++} ++ + # parameters: msg [trace_level:trace]... + make_trace_mem() + { +@@ -1267,5 +1275,8 @@ show_memstats() + iomem) + cat /proc/iomem + ;; ++ komem) ++ tracekomem ++ ;; + esac + } +diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh +index 7bbe6703..473bf42e 100755 +--- a/modules.d/99base/init.sh ++++ b/modules.d/99base/init.sh +@@ -124,7 +124,7 @@ if getarg "rd.cmdline=ask"; then + fi + + # run scriptlets to parse the command line +-make_trace_mem "hook cmdline" '1+:mem' '1+:iomem' '3+:slab' ++make_trace_mem "hook cmdline" '1+:mem' '1+:iomem' '3+:slab' '4+:komem' + getarg 'rd.break=cmdline' -d 'rdbreak=cmdline' && emergency_shell -n cmdline "Break before cmdline" + source_hook cmdline + +@@ -153,7 +153,7 @@ getargbool 0 rd.udev.info -d -y rdudevinfo && udevadm control "$UDEV_LOG_PRIO_AR + getargbool 0 rd.udev.debug -d -y rdudevdebug && udevadm control "$UDEV_LOG_PRIO_ARG=debug" + udevproperty "hookdir=$hookdir" + +-make_trace_mem "hook pre-trigger" '1:shortmem' '2+:mem' '3+:slab' ++make_trace_mem "hook pre-trigger" '1:shortmem' '2+:mem' '3+:slab' '4+:komem' + getarg 'rd.break=pre-trigger' -d 'rdbreak=pre-trigger' && emergency_shell -n pre-trigger "Break before pre-trigger" + source_hook pre-trigger + +@@ -224,7 +224,7 @@ unset RDRETRY + + # pre-mount happens before we try to mount the root filesystem, + # and happens once. +-make_trace_mem "hook pre-mount" '1:shortmem' '2+:mem' '3+:slab' ++make_trace_mem "hook pre-mount" '1:shortmem' '2+:mem' '3+:slab' '4+:komem' + getarg 'rd.break=pre-mount' -d 'rdbreak=pre-mount' && emergency_shell -n pre-mount "Break pre-mount" + source_hook pre-mount + +@@ -260,11 +260,12 @@ done + + # pre pivot scripts are sourced just before we doing cleanup and switch over + # to the new root. +-make_trace_mem "hook pre-pivot" '1:shortmem' '2+:mem' '3+:slab' ++make_trace_mem "hook pre-pivot" '1:shortmem' '2+:mem' '3+:slab' '4+:komem' + getarg 'rd.break=pre-pivot' -d 'rdbreak=pre-pivot' && emergency_shell -n pre-pivot "Break pre-pivot" + source_hook pre-pivot + + make_trace_mem "hook cleanup" '1:shortmem' '2+:mem' '3+:slab' ++cleanup_trace_mem + # pre pivot cleanup scripts are sourced just before we switch over to the new root. + getarg 'rd.break=cleanup' -d 'rdbreak=cleanup' && emergency_shell -n cleanup "Break cleanup" + source_hook cleanup +diff --git a/modules.d/99base/module-setup.sh b/modules.d/99base/module-setup.sh +index d5e78613..8fd4e80d 100755 +--- a/modules.d/99base/module-setup.sh ++++ b/modules.d/99base/module-setup.sh +@@ -34,6 +34,7 @@ install() { + inst_script "$moddir/initqueue.sh" "/sbin/initqueue" + inst_script "$moddir/loginit.sh" "/sbin/loginit" + inst_script "$moddir/rdsosreport.sh" "/sbin/rdsosreport" ++ inst_script "$moddir/memtrace-ko.sh" "/sbin/tracekomem" + + [ -e "${initdir}/lib" ] || mkdir -m 0755 -p ${initdir}/lib + mkdir -m 0755 -p ${initdir}/lib/dracut diff --git a/SOURCES/0489-dracut.cmdline.7.asc-update-document-for-rd.memdebug.patch b/SOURCES/0489-dracut.cmdline.7.asc-update-document-for-rd.memdebug.patch new file mode 100644 index 0000000..e428a6d --- /dev/null +++ b/SOURCES/0489-dracut.cmdline.7.asc-update-document-for-rd.memdebug.patch @@ -0,0 +1,38 @@ +From 01e66d43d84a9df9aa5de78a203b4c32e0fa98ec Mon Sep 17 00:00:00 2001 +From: Xunlei Pang <xlpang@redhat.com> +Date: Fri, 25 Nov 2016 14:55:43 +0800 +Subject: [PATCH] dracut.cmdline.7.asc: update document for rd.memdebug=4 + +"rd.memdebug=4" is for kernel module memory consumption debugging. + +Signed-off-by: Xunlei Pang <xlpang@redhat.com> +--- + dracut.cmdline.7.asc | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc +index b479fa89..16266381 100644 +--- a/dracut.cmdline.7.asc ++++ b/dracut.cmdline.7.asc +@@ -161,8 +161,8 @@ It should be attached to any report about dracut problems. + _/run/initramfs/init.log_. + If "quiet" is set, it also logs to the console. + +-**rd.memdebug=[0-3]**:: +- Print memory usage info at various points, set the verbose level from 0 to 3. ++**rd.memdebug=[0-4]**:: ++ Print memory usage info at various points, set the verbose level from 0 to 4. + + + Higher level means more debugging output: + + +@@ -171,6 +171,10 @@ It should be attached to any report about dracut problems. + 1 - partial /proc/meminfo + 2 - /proc/meminfo + 3 - /proc/meminfo + /proc/slabinfo ++ 4 - /proc/meminfo + /proc/slabinfo + tracekomem ++ NOTE: tracekomem is a shell script utilizing kernel trace to track ++ the rough total memory consumption of kernel modules during ++ loading. It may override other trace configurations. + ---- + + **rd.break**:: diff --git a/SOURCES/0490-testsuite-add-rd.memdebug-4-in-TEST-01-BASIC-to-test.patch b/SOURCES/0490-testsuite-add-rd.memdebug-4-in-TEST-01-BASIC-to-test.patch new file mode 100644 index 0000000..87210cd --- /dev/null +++ b/SOURCES/0490-testsuite-add-rd.memdebug-4-in-TEST-01-BASIC-to-test.patch @@ -0,0 +1,27 @@ +From 414834306b69df65ba22bc6f8a3b4fd4a25bf4e4 Mon Sep 17 00:00:00 2001 +From: Xunlei Pang <xlpang@redhat.com> +Date: Sun, 27 Nov 2016 12:19:41 +0800 +Subject: [PATCH] testsuite: add "rd.memdebug=4" in TEST-01-BASIC to test + rd.memdebug + +"rd.memdebug=4" includes all the test level, so add it to test +rd.memdebug function. + +Signed-off-by: Xunlei Pang <xlpang@redhat.com> +--- + test/TEST-01-BASIC/test.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/TEST-01-BASIC/test.sh b/test/TEST-01-BASIC/test.sh +index 6b79dee9..0ef7e105 100755 +--- a/test/TEST-01-BASIC/test.sh ++++ b/test/TEST-01-BASIC/test.sh +@@ -15,7 +15,7 @@ test_run() { + -net none -kernel /boot/vmlinuz-$KVERSION \ + -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 $DEBUGFAIL" \ ++ -append "panic=1 root=LABEL=dracut rw systemd.log_level=debug systemd.log_target=console rd.retry=3 rd.debug console=ttyS0,115200n81 $DEBUGFAIL rd.memdebug=4" \ + -initrd $TESTDIR/initramfs.testing || return 1 + grep -F -m 1 -q dracut-root-block-success $TESTDIR/result || return 1 + } diff --git a/SOURCES/0491-dracut-functions.sh-remove-duplicate-declaratio-of-l.patch b/SOURCES/0491-dracut-functions.sh-remove-duplicate-declaratio-of-l.patch new file mode 100644 index 0000000..db658d2 --- /dev/null +++ b/SOURCES/0491-dracut-functions.sh-remove-duplicate-declaratio-of-l.patch @@ -0,0 +1,23 @@ +From 2877acadc0be3dff39c3a92650bacfac7e0603de Mon Sep 17 00:00:00 2001 +From: Lidong Zhong <lzhong@suse.com> +Date: Mon, 24 Aug 2015 18:02:10 +0800 +Subject: [PATCH] dracut-functions.sh: remove duplicate declaratio of local + variable + +--- + dracut-functions.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dracut-functions.sh b/dracut-functions.sh +index 61726e44..3c4118a9 100755 +--- a/dracut-functions.sh ++++ b/dracut-functions.sh +@@ -426,7 +426,7 @@ shorten_persistent_dev() { + # $ find_block_device /usr + # 8:4 + find_block_device() { +- local _majmin _dev _majmin _find_mpt ++ local _dev _majmin _find_mpt + _find_mpt="$1" + if [[ $use_fstab != yes ]]; then + [[ -d $_find_mpt/. ]] diff --git a/SOURCES/0492-network-ifup-write-override-file-before-dhcp_do.patch b/SOURCES/0492-network-ifup-write-override-file-before-dhcp_do.patch new file mode 100644 index 0000000..be64457 --- /dev/null +++ b/SOURCES/0492-network-ifup-write-override-file-before-dhcp_do.patch @@ -0,0 +1,43 @@ +From a603e1f3a625a6f3257e6eb30bccc545c7c6f376 Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn <lnykryn@redhat.com> +Date: Tue, 7 Feb 2017 17:09:41 +0100 +Subject: [PATCH] network/ifup: write override file before dhcp_do + +Commit cf376023e6d0d4abd9816fa954bb917fc2557713 moved writing .resolv.conf and .override +after dhcp_do, because dhcp_do was overwriting .resolv.conf. But .override does not have +such problem and on the contrary dhcp_do reads .override file if it is present. So let\'s +move it back. + +https://bugzilla.redhat.com/show_bug.cgi?id=1415004 +--- + modules.d/40network/ifup.sh | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index d7503c7f..b5c9ad2a 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -374,6 +374,11 @@ for p in $(getargs ip=); do + [ "$use_bridge" != 'true' ] && \ + [ "$use_vlan" != 'true' ] && continue + ++ # Store config for later use ++ for i in ip srv gw mask hostname macaddr mtu dns1 dns2; do ++ eval '[ "$'$i'" ] && echo '$i'="$'$i'"' ++ done > /tmp/net.$netif.override ++ + for autoopt in $(str_replace "$autoconf" "," " "); do + case $autoopt in + dhcp|on|any) +@@ -395,11 +400,6 @@ for p in $(getargs ip=); do + echo nameserver $s >> /tmp/net.$netif.resolv.conf + done + +- # Store config for later use +- for i in ip srv gw mask hostname macaddr dns1 dns2 mtu; do +- eval '[ "$'$i'" ] && echo '$i'="$'$i'"' +- done > /tmp/net.$netif.override +- + if [ $ret -eq 0 ]; then + > /tmp/net.${netif}.up + diff --git a/SOURCES/0493-write-ifcfg-do-t-write-MTU-twice-for-regular-eth-dev.patch b/SOURCES/0493-write-ifcfg-do-t-write-MTU-twice-for-regular-eth-dev.patch new file mode 100644 index 0000000..2a0d9a2 --- /dev/null +++ b/SOURCES/0493-write-ifcfg-do-t-write-MTU-twice-for-regular-eth-dev.patch @@ -0,0 +1,28 @@ +From 3186abd76ef732f2aeec4f3901d0b6a17a701f3a Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn <lnykryn@redhat.com> +Date: Wed, 1 Mar 2017 14:43:53 +0100 +Subject: [PATCH] write-ifcfg: do't write MTU twice for regular eth devices + +If MTU is specified, we write it for every type of device in the +beginning. There is not point writing it again for Type=ethernet +devices. +--- + modules.d/45ifcfg/write-ifcfg.sh | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh +index a077da1c..fa395b3a 100755 +--- a/modules.d/45ifcfg/write-ifcfg.sh ++++ b/modules.d/45ifcfg/write-ifcfg.sh +@@ -210,10 +210,7 @@ for netup in /tmp/net.*.did-setup ; do + # bridge needs different things written to ifcfg + if [ -z "$bridge" ] && [ -z "$bond" ] && [ -z "$vlan" ] && [ -z "$team" ]; then + # standard interface +- { +- echo "TYPE=Ethernet" +- [ -n "$mtu" ] && echo "MTU=\"$mtu\"" +- } >> /tmp/ifcfg/ifcfg-$netif ++ echo "TYPE=Ethernet" >> /tmp/ifcfg/ifcfg-$netif + fi + + if [ -n "$vlan" ] ; then diff --git a/SOURCES/0494-ifup-don-t-ifup-team-master-indefinitely.patch b/SOURCES/0494-ifup-don-t-ifup-team-master-indefinitely.patch new file mode 100644 index 0000000..032aed2 --- /dev/null +++ b/SOURCES/0494-ifup-don-t-ifup-team-master-indefinitely.patch @@ -0,0 +1,24 @@ +From ea8bef9893f51797eb9312dbb145112297401f47 Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn <lnykryn@redhat.com> +Date: Thu, 2 Feb 2017 13:02:10 +0100 +Subject: [PATCH] ifup: don't ifup team master indefinitely + +https://bugzilla.redhat.com/show_bug.cgi?id=1416958 +Thanks to martin.moore@hpe.com for the patch +--- + modules.d/40network/ifup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index b5c9ad2a..f2b5894d 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -280,7 +280,7 @@ if [ -z "$NO_TEAM_MASTER" ]; then + # wait for all slaves to show up + for slave in $teamslaves ; do + # try to create the slave (maybe vlan or bridge) +- NO_BOND_MASTER=yes NO_AUTO_DHCP=yes ifup $slave ++ NO_TEAM_MASTER=yes NO_AUTO_DHCP=yes ifup $slave + + if ! ip link show dev $slave >/dev/null 2>&1; then + # wait for the last slave to show up diff --git a/SOURCES/0495-95ssh-client-attempt-to-copy-UserKnownHostsFile-to-k.patch b/SOURCES/0495-95ssh-client-attempt-to-copy-UserKnownHostsFile-to-k.patch new file mode 100644 index 0000000..cb011a2 --- /dev/null +++ b/SOURCES/0495-95ssh-client-attempt-to-copy-UserKnownHostsFile-to-k.patch @@ -0,0 +1,45 @@ +From 5ae8333947bb6a71232fbb99c626e08f177178e2 Mon Sep 17 00:00:00 2001 +From: Tong Li <tonli@redhat.com> +Date: Wed, 30 Nov 2016 17:05:57 +0800 +Subject: [PATCH] 95ssh-client: attempt to copy UserKnownHostsFile to kdump's + initramfs + +Bug related to this issue: https://bugzilla.redhat.com/show_bug.cgi?id=1360131 +Now dracut only attempts to copy GlobalKnownHostsFile while generating kdump's +initramfs. This method will cause kdump's failure if users set customized +UserKnownHostsFile in /etc/ssh/ssh_config. This patch simply attempts to copy +those files too while going through /etc/ssh/ssh_config. Note that we need to +make sure ~/foo will be copied as /root/foo in kdump's initramfs. + +Cherry-picked from: 32f5af2f5e20ee982745262c444c50b20bfb4c01 +Resolves: #1360131 +--- + modules.d/95ssh-client/module-setup.sh | 15 +++++++++++---- + 1 file changed, 11 insertions(+), 4 deletions(-) + +diff --git a/modules.d/95ssh-client/module-setup.sh b/modules.d/95ssh-client/module-setup.sh +index 6b441075..743de988 100755 +--- a/modules.d/95ssh-client/module-setup.sh ++++ b/modules.d/95ssh-client/module-setup.sh +@@ -44,10 +44,17 @@ inst_sshenv() + if [[ -f /etc/ssh/ssh_config ]]; then + inst_simple /etc/ssh/ssh_config + sed -i -e 's/\(^[[:space:]]*\)ProxyCommand/\1# ProxyCommand/' ${initdir}/etc/ssh/ssh_config +- while read key val; do +- [[ $key != "GlobalKnownHostsFile" ]] && continue +- inst_simple "$val" +- break ++ while read key val || [ -n "$key" ]; do ++ if [[ $key == "GlobalKnownHostsFile" ]]; then ++ inst_simple "$val" ++ # Copy customized UserKnowHostsFile ++ elif [[ $key == "UserKnownHostsFile" ]]; then ++ # Make sure that ~/foo will be copied as /root/foo in kdump's initramfs ++ if str_starts "$val" "~/"; then ++ val="/root/${val#"~/"}" ++ fi ++ inst_simple "$val" ++ fi + done < /etc/ssh/ssh_config + fi + diff --git a/SOURCES/0496-udev-rules-pull-in-40-redhat-cpu-hotplug.rules.patch b/SOURCES/0496-udev-rules-pull-in-40-redhat-cpu-hotplug.rules.patch new file mode 100644 index 0000000..653db48 --- /dev/null +++ b/SOURCES/0496-udev-rules-pull-in-40-redhat-cpu-hotplug.rules.patch @@ -0,0 +1,27 @@ +From 02d0d0a20873a9e42e30113f3e31bce011793f30 Mon Sep 17 00:00:00 2001 +From: Michal Sekletar <msekleta@redhat.com> +Date: Mon, 12 Jun 2017 14:47:06 +0200 +Subject: [PATCH] udev-rules: pull in 40-redhat-cpu-hotplug.rules + +Cpu hotplug policy was split off to separate file. Let's pull in the new +rules file by default. + +See: https://bugzilla.redhat.com/show_bug.cgi?id=1266322 + +Resolves: #1460707 +--- + modules.d/95udev-rules/module-setup.sh | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/modules.d/95udev-rules/module-setup.sh b/modules.d/95udev-rules/module-setup.sh +index e0f2e381..13cafc2a 100755 +--- a/modules.d/95udev-rules/module-setup.sh ++++ b/modules.d/95udev-rules/module-setup.sh +@@ -27,6 +27,7 @@ install() { + fi + + inst_rules \ ++ 40-redhat-cpu-hotplug.rules \ + 40-redhat.rules \ + 50-firmware.rules \ + 50-udev-default.rules \ diff --git a/SOURCES/0497-Revert-systemd-dracut-initqueue.sh-don-t-go-into-eme.patch b/SOURCES/0497-Revert-systemd-dracut-initqueue.sh-don-t-go-into-eme.patch new file mode 100644 index 0000000..da000a6 --- /dev/null +++ b/SOURCES/0497-Revert-systemd-dracut-initqueue.sh-don-t-go-into-eme.patch @@ -0,0 +1,29 @@ +From fb008ce6656f0efb10b3aba4d3740db302b4e683 Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn <lnykryn@redhat.com> +Date: Wed, 7 Jun 2017 15:05:44 +0200 +Subject: [PATCH] Revert "systemd/dracut-initqueue.sh: don't go into emergency" + +This reverts commit 4c5f1b3b4a3b303b3eb19b0a16122b4fc552e089. + +Resolves: #1396865 +--- + modules.d/98systemd/dracut-initqueue.sh | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/modules.d/98systemd/dracut-initqueue.sh b/modules.d/98systemd/dracut-initqueue.sh +index c12531e2..5822556b 100755 +--- a/modules.d/98systemd/dracut-initqueue.sh ++++ b/modules.d/98systemd/dracut-initqueue.sh +@@ -68,7 +68,11 @@ while :; do + + main_loop=$(($main_loop+1)) + if [ $main_loop -gt $RDRETRY ]; then +- # let systemd go into emergency mode, if it cannot boot ++ if ! [ -f /sysroot/etc/fstab ] || ! [ -e /sysroot/sbin/init ] ; then ++ action_on_fail "Could not boot." && break ++ fi ++ warn "Not all disks have been found." ++ warn "You might want to regenerate your initramfs." + break + fi + done diff --git a/SOURCES/0498-module-setup.sh-Add-ARM-specific-driver-to-initramfs.patch b/SOURCES/0498-module-setup.sh-Add-ARM-specific-driver-to-initramfs.patch new file mode 100644 index 0000000..d2fc116 --- /dev/null +++ b/SOURCES/0498-module-setup.sh-Add-ARM-specific-driver-to-initramfs.patch @@ -0,0 +1,35 @@ +From 784c92876bb6995f8f66087af0f20de2e2819643 Mon Sep 17 00:00:00 2001 +From: Prarit Bhargava <prarit@redhat.com> +Date: Mon, 5 Jun 2017 07:51:36 -0400 +Subject: [PATCH] module-setup.sh: Add ARM specific driver to initramfs image + +If a hisi_sas storage device is used as / during system install, the +resulting installation will not boot because the hisi_sas driver is not +included in the initramfs. + +The Hisilicon storage driver needs to be added to the initramfs image for +aarch64 kernels. + +Signed-off-by: Prarit Bhargava <prarit@redhat.com> +Cc: dzickus@redhat.com +Cc: dmarlin@redhat.com +Cc: wefu@redhat.com +Cc: harald@redhat.com + +Resolves: #1459277 +--- + modules.d/90kernel-modules/module-setup.sh | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh +index 7d9d369a..0a414eaf 100755 +--- a/modules.d/90kernel-modules/module-setup.sh ++++ b/modules.d/90kernel-modules/module-setup.sh +@@ -64,6 +64,7 @@ installkernel() { + "=drivers/rtc" \ + "=drivers/usb/host" \ + "=drivers/usb/phy" \ ++ "=drivers/scsi/hisi_sas" \ + ${NULL} + fi + diff --git a/SOURCES/0499-Add-check-for-aarch64-to-the-arm-kernel-module-list.patch b/SOURCES/0499-Add-check-for-aarch64-to-the-arm-kernel-module-list.patch new file mode 100644 index 0000000..deb6242 --- /dev/null +++ b/SOURCES/0499-Add-check-for-aarch64-to-the-arm-kernel-module-list.patch @@ -0,0 +1,39 @@ +From 436052a84b84183a3b44b19d7a9db02d391bf26a Mon Sep 17 00:00:00 2001 +From: Peter Robinson <pbrobinson@gmail.com> +Date: Thu, 23 Mar 2017 14:59:15 +0000 +Subject: [PATCH] Add check for aarch64 to the arm kernel module list + +This adds the same list of drivers we use for arm platforms for +aarch64 too, also add the DMA drivers there too as they can add +sigficant performance for some storage/usb and often need to be +present when the storage drivers load. + +Signed-off-by: Peter Robinson <pbrobinson@gmail.com> + +Cherry-picked from: 917e1b6b5b2669a30bce69061686adbb6abc5e35 +Resolves: #1459277 +--- + modules.d/90kernel-modules/module-setup.sh | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh +index 0a414eaf..c4bf5af5 100755 +--- a/modules.d/90kernel-modules/module-setup.sh ++++ b/modules.d/90kernel-modules/module-setup.sh +@@ -52,13 +52,14 @@ installkernel() { + "=drivers/input/serio" \ + "=drivers/input/keyboard" + +- if [[ "$(uname -p)" == arm* ]]; then +- # arm specific modules ++ if [[ "$(uname -m)" == arm* || "$(uname -m)" == aarch64 ]]; then ++ # arm/aarch64 specific modules + hostonly='' instmods \ + connector-hdmi connector-dvi encoder-tfp410 \ + encoder-tpd12s015 i2c-tegra gpio-regulator \ + as3722-regulator orion-ehci ehci-tegra + instmods \ ++ "=drivers/dma" \ + "=drivers/i2c/busses" \ + "=drivers/regulator" \ + "=drivers/rtc" \ diff --git a/SOURCES/0500-fips-add-cmac-kernel-module.patch b/SOURCES/0500-fips-add-cmac-kernel-module.patch new file mode 100644 index 0000000..99506f5 --- /dev/null +++ b/SOURCES/0500-fips-add-cmac-kernel-module.patch @@ -0,0 +1,25 @@ +From 3674e2e16f9511f8877a47f58cf5d62f973f83f8 Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn <lnykryn@redhat.com> +Date: Tue, 13 Jun 2017 10:28:48 +0200 +Subject: [PATCH] fips: add cmac kernel module + +cmac is now marked as fips_allowed + +Resolves: rhbz#1460865 +--- + modules.d/01fips/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh +index d553a8c1..bd0078d4 100755 +--- a/modules.d/01fips/module-setup.sh ++++ b/modules.d/01fips/module-setup.sh +@@ -21,7 +21,7 @@ installkernel() { + _fipsmodules+="ecb eseqiv fcrypt gcm ghash_generic hmac khazad lzo md4 md5 michael_mic rmd128 " + _fipsmodules+="rmd160 rmd256 rmd320 rot13 salsa20 seed seqiv serpent sha1 sha224 sha256 sha256_generic " + _fipsmodules+="aes_s390 des_s390 prng sha256_s390 sha_common des_check_key sha1_s390 sha512_s390 " +- _fipsmodules+="sha384 sha512 sha512_generic tea tnepres twofish wp256 wp384 wp512 xeta xtea xts zlib " ++ _fipsmodules+="sha384 sha512 sha512_generic tea tnepres twofish wp256 wp384 wp512 xeta xtea xts zlib cmac " + fi + + mkdir -m 0755 -p "${initdir}/etc/modprobe.d" diff --git a/SOURCES/0501-95iscsi-run-iscsistart-with-DefaultDependencies-no.patch b/SOURCES/0501-95iscsi-run-iscsistart-with-DefaultDependencies-no.patch new file mode 100644 index 0000000..7c520c4 --- /dev/null +++ b/SOURCES/0501-95iscsi-run-iscsistart-with-DefaultDependencies-no.patch @@ -0,0 +1,24 @@ +From 994a6cdd883482ccf24fa9587c28f0e6a8fe031d Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn <lnykryn@redhat.com> +Date: Thu, 15 Jun 2017 14:01:13 +0200 +Subject: [PATCH] 95iscsi: run iscsistart with DefaultDependencies=no + +In upstream part of 7e51a94f5bc6188511593eda9768aae41467ef04 + +Resolves: #1461234 +--- + modules.d/95iscsi/iscsiroot.sh | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh +index ce8f5479..4cf3d355 100755 +--- a/modules.d/95iscsi/iscsiroot.sh ++++ b/modules.d/95iscsi/iscsiroot.sh +@@ -182,6 +182,7 @@ handle_netroot() + if [ "$status" != "activating" ] && ! systemctl is-failed "$netroot_enc" >/dev/null 2>&1; then + systemd-run --service-type=oneshot --remain-after-exit --quiet \ + --description="Login iSCSI Target $iscsi_target_name" \ ++ -p 'DefaultDependencies=no' \ + --unit="$netroot_enc" -- \ + $(command -v iscsistart) \ + -i "$iscsi_initiator" -t "$iscsi_target_name" \ diff --git a/SOURCES/0502-01fips-add-authenec-module.patch b/SOURCES/0502-01fips-add-authenec-module.patch new file mode 100644 index 0000000..dbf089a --- /dev/null +++ b/SOURCES/0502-01fips-add-authenec-module.patch @@ -0,0 +1,23 @@ +From 7b9bbc2a82e88f268368309f691b3608832bc9ab Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn <lnykryn@redhat.com> +Date: Wed, 28 Jun 2017 16:10:48 +0200 +Subject: [PATCH] 01fips: add authenec module + +Resolves: #1465946 +--- + modules.d/01fips/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh +index bd0078d4..ff72bb9b 100755 +--- a/modules.d/01fips/module-setup.sh ++++ b/modules.d/01fips/module-setup.sh +@@ -21,7 +21,7 @@ installkernel() { + _fipsmodules+="ecb eseqiv fcrypt gcm ghash_generic hmac khazad lzo md4 md5 michael_mic rmd128 " + _fipsmodules+="rmd160 rmd256 rmd320 rot13 salsa20 seed seqiv serpent sha1 sha224 sha256 sha256_generic " + _fipsmodules+="aes_s390 des_s390 prng sha256_s390 sha_common des_check_key sha1_s390 sha512_s390 " +- _fipsmodules+="sha384 sha512 sha512_generic tea tnepres twofish wp256 wp384 wp512 xeta xtea xts zlib cmac " ++ _fipsmodules+="sha384 sha512 sha512_generic tea tnepres twofish wp256 wp384 wp512 xeta xtea xts zlib cmac authenc " + fi + + mkdir -m 0755 -p "${initdir}/etc/modprobe.d" diff --git a/SOURCES/0503-fips-honor-BOOT_IMAGE-variable-for-HMAC-check-of-the.patch b/SOURCES/0503-fips-honor-BOOT_IMAGE-variable-for-HMAC-check-of-the.patch new file mode 100644 index 0000000..4536446 --- /dev/null +++ b/SOURCES/0503-fips-honor-BOOT_IMAGE-variable-for-HMAC-check-of-the.patch @@ -0,0 +1,40 @@ +From 17092b128ce6900e0600dbdaf4ac9c777af0db2e Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Mon, 30 Jan 2017 09:20:55 +0100 +Subject: [PATCH] fips: honor $BOOT_IMAGE variable for HMAC check of the kernel + +https://bugzilla.redhat.com/show_bug.cgi?id=1415032 + +Cherry-picked from: 4693daa5fa7dddc6b35825831f35657cb66bd531 +Resolves: #1415032 +--- + modules.d/01fips/fips.sh | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +diff --git a/modules.d/01fips/fips.sh b/modules.d/01fips/fips.sh +index 0b69a823..e9ed00b5 100755 +--- a/modules.d/01fips/fips.sh ++++ b/modules.d/01fips/fips.sh +@@ -79,9 +79,10 @@ do_fips() + local _module + + KERNEL=$(uname -r) +- +- if ! [ -e "/boot/.vmlinuz-${KERNEL}.hmac" ]; then +- warn "/boot/.vmlinuz-${KERNEL}.hmac does not exist" ++ BOOT_IMAGE="$(getarg BOOT_IMAGE)" ++ BOOT_IMAGE="${BOOT_IMAGE:-/vmlinuz-${KERNEL}}" ++ if ! [ -e "/boot/.${BOOT_IMAGE}.hmac" ] && ! [ -e "/boot/.vmlinuz-${KERNEL}.hmac" ]; then ++ warn "/boot/.${BOOT_IMAGE}.hmac does not exist" + return 1 + fi + +@@ -116,7 +117,7 @@ do_fips() + elif [ -e "/run/initramfs/live/isolinux/vmlinuz0" ]; then + do_rhevh_check /run/initramfs/live/isolinux/vmlinuz0 || return 1 + else +- sha512hmac -c "/boot/.vmlinuz-${KERNEL}.hmac" || return 1 ++ sha512hmac -c "/boot/.${BOOT_IMAGE}.hmac" || return 1 + fi + + info "All initrd crypto checks done" diff --git a/SOURCES/0504-Try-BOOT_IMAGE-and-fallback-to-vmlinuz-KERNEL.patch b/SOURCES/0504-Try-BOOT_IMAGE-and-fallback-to-vmlinuz-KERNEL.patch new file mode 100644 index 0000000..2516576 --- /dev/null +++ b/SOURCES/0504-Try-BOOT_IMAGE-and-fallback-to-vmlinuz-KERNEL.patch @@ -0,0 +1,47 @@ +From 744afe75315b975a7eb431d0a52f6056353bf8f1 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 29 Jun 2017 10:38:09 +0200 +Subject: [PATCH] Try BOOT_IMAGE and fallback to vmlinuz-${KERNEL} + +On s390 BOOT_IMAGE only denotes the number of the boot record that +was selected in the bootloader and not the path to the kernel image. + +Also only bail out, if the kernel hmac checking relies on that path. + +Cherry-picked from: 3d875f77f3d1c5e4161794ca59025bc6bcd77eaa +Resolves: #1415032 +--- + modules.d/01fips/fips.sh | 13 +++++++------ + 1 file changed, 7 insertions(+), 6 deletions(-) + +diff --git a/modules.d/01fips/fips.sh b/modules.d/01fips/fips.sh +index e9ed00b5..ecd711c2 100755 +--- a/modules.d/01fips/fips.sh ++++ b/modules.d/01fips/fips.sh +@@ -79,12 +79,6 @@ do_fips() + local _module + + KERNEL=$(uname -r) +- BOOT_IMAGE="$(getarg BOOT_IMAGE)" +- BOOT_IMAGE="${BOOT_IMAGE:-/vmlinuz-${KERNEL}}" +- if ! [ -e "/boot/.${BOOT_IMAGE}.hmac" ] && ! [ -e "/boot/.vmlinuz-${KERNEL}.hmac" ]; then +- warn "/boot/.${BOOT_IMAGE}.hmac does not exist" +- return 1 +- fi + + FIPSMODULES=$(cat /etc/fipsmodules) + +@@ -117,6 +111,13 @@ do_fips() + elif [ -e "/run/initramfs/live/isolinux/vmlinuz0" ]; then + do_rhevh_check /run/initramfs/live/isolinux/vmlinuz0 || return 1 + else ++ BOOT_IMAGE="$(getarg BOOT_IMAGE)" ++ [ -e "/boot/.${BOOT_IMAGE}.hmac" ] || BOOT_IMAGE="vmlinuz-${KERNEL}" ++ ++ if ! [ -e "/boot/.${BOOT_IMAGE}.hmac" ]; then ++ warn "/boot/.${BOOT_IMAGE}.hmac does not exist" ++ return 1 ++ fi + sha512hmac -c "/boot/.${BOOT_IMAGE}.hmac" || return 1 + fi + diff --git a/SOURCES/0505-dracut.cmdline-remove-extra-from-ip-doc.patch b/SOURCES/0505-dracut.cmdline-remove-extra-from-ip-doc.patch new file mode 100644 index 0000000..4a1ea5d --- /dev/null +++ b/SOURCES/0505-dracut.cmdline-remove-extra-from-ip-doc.patch @@ -0,0 +1,24 @@ +From 8131fd3c1136cdc5bd21fb84dc3a477aa1fc0456 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 13 Jan 2016 09:17:40 +0100 +Subject: [PATCH] dracut.cmdline: remove extra ":" from ip= doc + +Cherry-picked from: 0a7d7f63106ce5a7f9869aacb21d0474621811e7 +Resolves: #1469997 +--- + dracut.cmdline.7.asc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc +index 16266381..45902fa9 100644 +--- a/dracut.cmdline.7.asc ++++ b/dracut.cmdline.7.asc +@@ -469,7 +469,7 @@ cannot be used in conjunction with the **ifname** argument for the + same <interface>. + ===================== + +-**ip=**__<client-IP>__:[__<peer>__]:__<gateway-IP>__:__<netmask>__:__<client_hostname>__:__<interface>__:__{none|off|dhcp|on|any|dhcp6|auto6|ibft}__:[:[__<mtu>__][:__<macaddr>__]]:: ++**ip=**__<client-IP>__:[__<peer>__]:__<gateway-IP>__:__<netmask>__:__<client_hostname>__:__<interface>__:__{none|off|dhcp|on|any|dhcp6|auto6|ibft}__[:[__<mtu>__][:__<macaddr>__]]:: + explicit network configuration. If you want do define a IPv6 address, put it + in brackets (e.g. [2001:DB8::1]). This parameter can be specified multiple + times. __<peer>__ is optional and is the address of the remote endpoint diff --git a/SOURCES/0506-10i18n-parse-i18n.sh-parse-rd.vconsole-and-rd.locale.patch b/SOURCES/0506-10i18n-parse-i18n.sh-parse-rd.vconsole-and-rd.locale.patch new file mode 100644 index 0000000..a52bb13 --- /dev/null +++ b/SOURCES/0506-10i18n-parse-i18n.sh-parse-rd.vconsole-and-rd.locale.patch @@ -0,0 +1,51 @@ +From 063d6acb7b7f636e5a5e0369170f91d8961ffcd3 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 8 Oct 2013 15:02:14 +0200 +Subject: [PATCH] 10i18n/parse-i18n.sh: parse rd.vconsole and rd.locale + +and removed systemd part, because parse-i18n.sh is not even installed in +systemd driven initramfs images. + +Cherry-picked from: 6c8fc6e377b94e26e6d03cddbf174cb27caad0a6 +Resolves: #1479325 +--- + modules.d/10i18n/parse-i18n.sh | 22 ++++++++-------------- + 1 file changed, 8 insertions(+), 14 deletions(-) + +diff --git a/modules.d/10i18n/parse-i18n.sh b/modules.d/10i18n/parse-i18n.sh +index 348c5bc8..416a7469 100755 +--- a/modules.d/10i18n/parse-i18n.sh ++++ b/modules.d/10i18n/parse-i18n.sh +@@ -19,24 +19,18 @@ inst_key_val() { + unset _value + } + +-inst_key_val '' /etc/vconsole.conf vconsole.keymap KEYMAP -d KEYTABLE +-inst_key_val '' /etc/vconsole.conf vconsole.font FONT -d SYSFONT +-inst_key_val '' /etc/vconsole.conf vconsole.font.map FONT_MAP -d CONTRANS +-inst_key_val '' /etc/vconsole.conf vconsole.font.unimap FONT_UNIMAP -d UNIMAP +-inst_key_val 1 /etc/vconsole.conf vconsole.font.unicode UNICODE vconsole.unicode +-inst_key_val '' /etc/vconsole.conf vconsole.keymap.ext EXT_KEYMAP ++inst_key_val '' /etc/vconsole.conf rd.vconsole.keymap vconsole.keymap KEYMAP -d KEYTABLE ++inst_key_val '' /etc/vconsole.conf rd.vconsole.font vconsole.font FONT -d SYSFONT ++inst_key_val '' /etc/vconsole.conf rd.vconsole.font.map vconsole.font.map FONT_MAP -d CONTRANS ++inst_key_val '' /etc/vconsole.conf rd.vconsole.font.unimap vconsole.font.unimap FONT_UNIMAP -d UNIMAP ++inst_key_val 1 /etc/vconsole.conf rd.vconsole.font.unicode vconsole.font.unicode UNICODE vconsole.unicode ++inst_key_val '' /etc/vconsole.conf rd.vconsole.keymap.ext vconsole.keymap.ext EXT_KEYMAP + +-inst_key_val '' /etc/locale.conf locale.LANG LANG +-inst_key_val '' /etc/locale.conf locale.LC_ALL LC_ALL ++inst_key_val '' /etc/locale.conf rd.locale.LANG locale.LANG LANG ++inst_key_val '' /etc/locale.conf rd.locale.LC_ALL locale.LC_ALL LC_ALL + + if [ -f /etc/locale.conf ]; then + . /etc/locale.conf + export LANG + export LC_ALL + fi +- +-if [ -n "$DRACUT_SYSTEMD" ]; then +- rm -f -- /etc/udev/rules.d/10-console.rules +- rm -f -- /lib/udev/rules.d/10-console.rules +- rm -f -- /lib/udev/console_init +-fi diff --git a/SOURCES/0507-dracut.sh-introduce-no-hostonly-default-device-argum.patch b/SOURCES/0507-dracut.sh-introduce-no-hostonly-default-device-argum.patch new file mode 100644 index 0000000..38a6229 --- /dev/null +++ b/SOURCES/0507-dracut.sh-introduce-no-hostonly-default-device-argum.patch @@ -0,0 +1,80 @@ +From 0e842c4b8b2796b9ae606da81ec92839af1cc27e Mon Sep 17 00:00:00 2001 +From: Xunlei Pang <xlpang@redhat.com> +Date: Wed, 16 Aug 2017 13:55:17 +0800 +Subject: [PATCH] dracut.sh: introduce "--no-hostonly-default-device" argument + +Kdump doesn't need default host devices like root, swap, fstab, etc, +we only care about the dump target which can be added via "--mount" +or "--add-device". We met several issues that kdump kernel failed +due to one of those host devices added by dracut, additionally, the +needless devices(e.g. LVM) consume some appreciable amount of memory +which is more likely to cause OOM under memory-limited kdump. + +So this patch introduced "--no-hostonly-default-device" to avoid +adding those default devices as host_devs. + +Signed-off-by: Xunlei Pang <xlpang@redhat.com> + +Cherry-picked from: 37f2fe55d +Resolves: #1483838 +--- + dracut.8.asc | 4 ++++ + dracut.sh | 9 ++++++++- + 2 files changed, 12 insertions(+), 1 deletion(-) + +diff --git a/dracut.8.asc b/dracut.8.asc +index 8fd863b9..e097e769 100644 +--- a/dracut.8.asc ++++ b/dracut.8.asc +@@ -306,6 +306,10 @@ provide a valid _/etc/fstab_. + **--no-hostonly-cmdline**: + Do not store kernel command line arguments needed in the initramfs + ++**--no-hostonly-default-device**: ++ Do not generate implicit host devices like root, swap, fstab, etc. ++ Use "--mount" or "--add-device" to explicitly add devices as needed. ++ + **--hostonly-i18n**: + Install only needed keyboard and font files according to the host configuration (default). + +diff --git a/dracut.sh b/dracut.sh +index f4e85095..0b23a838 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -141,6 +141,10 @@ Creates initial ramdisk images for preloading modules + in the initramfs + --no-hostonly-cmdline Do not store kernel command line arguments needed + in the initramfs ++ --no-hostonly-default-device ++ Do not generate implicit host devices like root, ++ swap, fstab, etc. Use "--mount" or "--add-device" ++ to explicitly add devices as needed. + --hostonly-i18n Install only needed keyboard and font files according + to the host configuration (default). + --no-hostonly-i18n Install all keyboard and font files available. +@@ -357,6 +361,7 @@ rearrange_params() + --long no-host-only \ + --long hostonly-cmdline \ + --long no-hostonly-cmdline \ ++ --long no-hostonly-default-device \ + --long persistent-policy: \ + --long fstab \ + --long help \ +@@ -545,6 +550,8 @@ while :; do + i18n_install_all_l="yes" ;; + --no-hostonly-cmdline) + hostonly_cmdline_l="no" ;; ++ --no-hostonly-default-device) ++ hostonly_default_device="no" ;; + --persistent-policy) + persistent_policy_l="$2"; PARMS_TO_STORE+=" '$2'"; shift;; + --fstab) use_fstab_l="yes" ;; +@@ -1039,7 +1046,7 @@ if (( ${#add_device_l[@]} )); then + done + fi + +-if [[ $hostonly ]]; then ++if [[ $hostonly ]] && [[ "$hostonly_default_device" != "no" ]]; then + # in hostonly mode, determine all devices, which have to be accessed + # and examine them for filesystem types + diff --git a/SOURCES/0508-rootfs-block-module-setup.sh-check-root_dev-in-cmdli.patch b/SOURCES/0508-rootfs-block-module-setup.sh-check-root_dev-in-cmdli.patch new file mode 100644 index 0000000..d021f84 --- /dev/null +++ b/SOURCES/0508-rootfs-block-module-setup.sh-check-root_dev-in-cmdli.patch @@ -0,0 +1,29 @@ +From e2afcc958be19287bc23d9c0a052b5ac57bb3df3 Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn <lnykryn@redhat.com> +Date: Thu, 26 Oct 2017 13:50:17 +0200 +Subject: [PATCH] rootfs-block/module-setup.sh: check root_dev in + cmdline_rootfs() + +In case of "--no-hostonly-default-device", we do not need +the root device, thus add this check. + +Reimplementation of upstream commit 5634a31156070487210a8e362e8f088c5c4dc615 + +Resolves: #1483838 +--- + modules.d/95rootfs-block/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/95rootfs-block/module-setup.sh b/modules.d/95rootfs-block/module-setup.sh +index 5bb704a4..284cb550 100755 +--- a/modules.d/95rootfs-block/module-setup.sh ++++ b/modules.d/95rootfs-block/module-setup.sh +@@ -32,7 +32,7 @@ cmdline_journal() { + + cmdline() { + local dev=/dev/block/$(find_root_block_device) +- if [ -e $dev ]; then ++ if [ -e $dev ] && [ -n "$root_dev" ] ; then + printf " root=%s" "$(shorten_persistent_dev "$(get_persistent_dev "$dev")")" + printf " rootflags=%s" "$(find_mp_fsopts /)" + printf " rootfstype=%s" "$(find_mp_fstype /)" diff --git a/SOURCES/0509-dracut.sh-gather-host_modalias-when-no-hostonly-defa.patch b/SOURCES/0509-dracut.sh-gather-host_modalias-when-no-hostonly-defa.patch new file mode 100644 index 0000000..2b9b501 --- /dev/null +++ b/SOURCES/0509-dracut.sh-gather-host_modalias-when-no-hostonly-defa.patch @@ -0,0 +1,27 @@ +From 0489607bf69ce521e1409e902380f3e168eeb302 Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn <lnykryn@redhat.com> +Date: Fri, 27 Oct 2017 14:36:26 +0200 +Subject: [PATCH] dracut.sh: gather host_modalias when + "--no-hostonly-default-device" is set + +rhel-only +Related: #1483838 +--- + dracut.sh | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/dracut.sh b/dracut.sh +index 0b23a838..1dd3eabd 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1121,8 +1121,10 @@ if [[ $hostonly ]] && [[ "$hostonly_default_device" != "no" ]]; then + [[ -b $_dev ]] && push host_devs "$_dev" + done < /etc/fstab + fi ++fi + + ++if [[ $hostonly ]]; then + # record all host modaliases + declare -A host_modalias + find /sys/devices/ -name uevent -print > "$initdir/.modalias" diff --git a/SOURCES/0510-Add-NTFS-support-to-90dmsquash-live-module.patch b/SOURCES/0510-Add-NTFS-support-to-90dmsquash-live-module.patch new file mode 100644 index 0000000..44498ec --- /dev/null +++ b/SOURCES/0510-Add-NTFS-support-to-90dmsquash-live-module.patch @@ -0,0 +1,70 @@ +From 015d5aee92d461ce44d8b8cf941fb45855c13c3b Mon Sep 17 00:00:00 2001 +From: Robert Scheck <robert@fedoraproject.org> +Date: Tue, 22 Aug 2017 23:44:41 +0200 +Subject: [PATCH] Add NTFS support to 90dmsquash-live module + +Support booting from USB media with NTFS filesystem (optionally), +which removes the FAT32 related 4 GB file size limit for LiveOS/ +squashfs.img (and any other file on the same USB media). + +Backports 37437cac8a1f2c411ead5fca28fb743a6f36f912 from dracut 046 +--- + .../90dmsquash-live-ntfs/module-setup.sh | 22 +++++++++++++++++++ + .../90dmsquash-live/dmsquash-live-root.sh | 15 ++++++++++++- + 2 files changed, 36 insertions(+), 1 deletion(-) + create mode 100755 modules.d/90dmsquash-live-ntfs/module-setup.sh + +diff --git a/modules.d/90dmsquash-live-ntfs/module-setup.sh b/modules.d/90dmsquash-live-ntfs/module-setup.sh +new file mode 100755 +index 00000000..bc77376b +--- /dev/null ++++ b/modules.d/90dmsquash-live-ntfs/module-setup.sh +@@ -0,0 +1,22 @@ ++#!/bin/bash ++ ++command -v ++ ++check() { ++ require_binaries ntfs-3g || return 1 ++ return 255 ++} ++ ++depends() { ++ echo 90dmsquash-live ++ return 0 ++} ++ ++install() { ++ inst_multiple fusermount ulockmgr_server mount.fuse ntfs-3g ++ dracut_need_initqueue ++} ++ ++installkernel() { ++ hostonly='' instmods fuse ++} +diff --git a/modules.d/90dmsquash-live/dmsquash-live-root.sh b/modules.d/90dmsquash-live/dmsquash-live-root.sh +index 6631d9a8..5fb798c7 100755 +--- a/modules.d/90dmsquash-live/dmsquash-live-root.sh ++++ b/modules.d/90dmsquash-live/dmsquash-live-root.sh +@@ -79,7 +79,20 @@ if [ -f $livedev ]; then + esac + [ -e /sys/fs/$fstype ] || modprobe $fstype + else +- mount -n -t $fstype -o ${liverw:-ro} $livedev /run/initramfs/live ++ if [ "$(blkid -o value -s TYPE $livedev)" != "ntfs" ]; then ++ mount -n -t $fstype -o ${liverw:-ro} $livedev /run/initramfs/live ++ else ++ # Symlinking /usr/bin/ntfs-3g as /sbin/mount.ntfs seems to boot ++ # at the first glance, but ends with lots and lots of squashfs ++ # errors, because systemd attempts to kill the ntfs-3g process?! ++ if [ -x "$(find_binary "ntfs-3g")" ]; then ++ ( exec -a @ntfs-3g ntfs-3g -o ${liverw:-ro} $livedev /run/initramfs/live ) | vwarn ++ else ++ die "Failed to mount block device of live image: Missing NTFS support" ++ exit 1 ++ fi ++ fi ++ + if [ "$?" != "0" ]; then + die "Failed to mount block device of live image" + exit 1 diff --git a/SOURCES/0511-add-90multipath-hostonly-module.patch b/SOURCES/0511-add-90multipath-hostonly-module.patch new file mode 100644 index 0000000..ea43305 --- /dev/null +++ b/SOURCES/0511-add-90multipath-hostonly-module.patch @@ -0,0 +1,129 @@ +From 6ef3173e86c2be99b504f7c7a789dea5c0072f64 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Mon, 10 Jul 2017 13:28:40 +0200 +Subject: [PATCH] add 90multipath-hostonly module + +hardcoding the wwid of the drives in the initramfs causes problems +when the drives are cloned to a system with the same hardware, but +different disk wwid's + +https://bugzilla.redhat.com/show_bug.cgi?id=1457311 + +Cherry-picked from: 5ce7cc7337a4c769b223152c083914f2052aa348 +Resolves: #1457311 +--- + .../90multipath-hostonly/module-setup.sh | 53 +++++++++++++++++++ + modules.d/90multipath/module-setup.sh | 26 --------- + 2 files changed, 53 insertions(+), 26 deletions(-) + create mode 100755 modules.d/90multipath-hostonly/module-setup.sh + +diff --git a/modules.d/90multipath-hostonly/module-setup.sh b/modules.d/90multipath-hostonly/module-setup.sh +new file mode 100755 +index 00000000..88839033 +--- /dev/null ++++ b/modules.d/90multipath-hostonly/module-setup.sh +@@ -0,0 +1,53 @@ ++#!/bin/bash ++ ++# called by dracut ++check() { ++ return 255 ++} ++ ++# called by dracut ++depends() { ++ echo multipath ++ return 0 ++} ++ ++# called by dracut ++install() { ++ local _f _allow ++ ++ is_mpath() { ++ local _dev=$1 ++ [ -e /sys/dev/block/$_dev/dm/uuid ] || return 1 ++ [[ $(cat /sys/dev/block/$_dev/dm/uuid) =~ mpath- ]] && return 0 ++ return 1 ++ } ++ ++ majmin_to_mpath_dev() { ++ local _dev ++ for i in /dev/mapper/*; do ++ [[ $i == /dev/mapper/control ]] && continue ++ _dev=$(get_maj_min $i) ++ if [ "$_dev" = "$1" ]; then ++ echo $i ++ return ++ fi ++ done ++ } ++ ++ add_hostonly_mpath_conf() { ++ is_mpath $1 && { ++ local _dev ++ ++ _dev=$(majmin_to_mpath_dev $1) ++ [ -z "$_dev" ] && return ++ strstr "$_allow" "$_dev" && return ++ _allow="$_allow --allow $_dev" ++ } ++ } ++ ++ [[ $hostonly ]] && { ++ for_each_host_dev_and_slaves_all add_hostonly_mpath_conf ++ [ -n "$_allow" ] && mpathconf $_allow --outfile ${initdir}/etc/multipath.conf ++ } ++} ++ +diff --git a/modules.d/90multipath/module-setup.sh b/modules.d/90multipath/module-setup.sh +index 3983b7b7..232ddcd8 100755 +--- a/modules.d/90multipath/module-setup.sh ++++ b/modules.d/90multipath/module-setup.sh +@@ -9,17 +9,6 @@ is_mpath() { + return 1 + } + +-majmin_to_mpath_dev() { +- local _dev +- for i in /dev/mapper/*; do +- [[ $i == /dev/mapper/control ]] && continue +- _dev=$(get_maj_min $i) +- if [ "$_dev" = "$1" ]; then +- echo $i +- return +- fi +- done +-} + + check() { + local _rootdev +@@ -81,16 +70,6 @@ installkernel() { + + install() { + local _f _allow +- add_hostonly_mpath_conf() { +- is_mpath $1 && { +- local _dev +- +- _dev=$(majmin_to_mpath_dev $1) +- [ -z "$_dev" ] && return +- strstr "$_allow" "$_dev" && return +- _allow="$_allow --allow $_dev" +- } +- } + + inst_multiple -o \ + dmsetup \ +@@ -105,11 +84,6 @@ install() { + /etc/multipath.conf \ + /etc/multipath/* + +- [[ $hostonly ]] && { +- for_each_host_dev_and_slaves_all add_hostonly_mpath_conf +- [ -n "$_allow" ] && mpathconf $_allow --outfile ${initdir}/etc/multipath.conf +- } +- + inst $(command -v partx) /sbin/partx + + inst_libdir_file "libmultipath*" "multipath/*" diff --git a/SOURCES/0512-spec-add-missing-modules.patch b/SOURCES/0512-spec-add-missing-modules.patch new file mode 100644 index 0000000..88619fb --- /dev/null +++ b/SOURCES/0512-spec-add-missing-modules.patch @@ -0,0 +1,28 @@ +From fe89c8f9df77f49e13732debdc99f88753b145e6 Mon Sep 17 00:00:00 2001 +From: Yu Watanabe <watanabe.yu+github@gmail.com> +Date: Tue, 25 Jul 2017 10:31:55 +0900 +Subject: [PATCH] spec: add missing modules + +Cherry-picked from: ad3b209d409cee337b33cbede4101aa06727ce06 +Resolves: #1457311 +--- + dracut.spec | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/dracut.spec b/dracut.spec +index bf10d08b..ee12013b 100644 +--- a/dracut.spec ++++ b/dracut.spec +@@ -346,10 +346,12 @@ rm -rf -- $RPM_BUILD_ROOT + %{dracutlibdir}/modules.d/90dm + %{dracutlibdir}/modules.d/90dmraid + %{dracutlibdir}/modules.d/90dmsquash-live ++%{dracutlibdir}/modules.d/90dmsquash-live-ntfs + %{dracutlibdir}/modules.d/90kernel-modules + %{dracutlibdir}/modules.d/90lvm + %{dracutlibdir}/modules.d/90mdraid + %{dracutlibdir}/modules.d/90multipath ++%{dracutlibdir}/modules.d/90multipath-hostonly + %{dracutlibdir}/modules.d/90qemu + %{dracutlibdir}/modules.d/91crypt-gpg + %{dracutlibdir}/modules.d/91crypt-loop diff --git a/SOURCES/0513-lvm_scan.sh-use-K-when-calling-lvchange.patch b/SOURCES/0513-lvm_scan.sh-use-K-when-calling-lvchange.patch new file mode 100644 index 0000000..1057b45 --- /dev/null +++ b/SOURCES/0513-lvm_scan.sh-use-K-when-calling-lvchange.patch @@ -0,0 +1,46 @@ +From 0fe8ed5ccb19cf5fc4a55af1b44a6664c971b5af Mon Sep 17 00:00:00 2001 +From: "Bryn M. Reeves" <bmr@redhat.com> +Date: Wed, 26 Apr 2017 14:15:15 +0100 +Subject: [PATCH] lvm_scan.sh: use -K when calling lvchange + +The --ignoreactivationskip/-K switch was added to LVM2 in 2.02.99 +(July 2013) and is used to control the activation of volumes with +the activation skip flag set: without -K these volumes will be +ignored when 'lvchange -ay $LV' is issued. + +This prevents an LVM2 thin-privisioned snapshot from being used +as the root device when booting with rd.lvm.lv=vg/lv since the +activation skip flag is set for these snapshots by default (the +legacy non-thinp snapshots do not set this flag and can already +be activated and used as a root device by specifying appropriate +values for rd.lvm.lv). + +This is only used in the rd.lvm.lv case since in that situation +we are activating one or more named LVs specified by the user: +the flag is not given when calling 'vgchange' since this may +cause many unwanted volumes to be activated during early user +space. Users wishing to use a specific snapshot volume should +specify it with 'rd.lvm.lv'. + +Cherry-picked from: cc4e507322952532e629b98fc4de8fc1afd3ba80 +Resolves: #1489841 +--- + modules.d/90lvm/lvm_scan.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/modules.d/90lvm/lvm_scan.sh b/modules.d/90lvm/lvm_scan.sh +index ae6f177b..0d5fff71 100755 +--- a/modules.d/90lvm/lvm_scan.sh ++++ b/modules.d/90lvm/lvm_scan.sh +@@ -109,9 +109,9 @@ if [ -n "$LVS" ] ; then + lvm lvscan --ignorelockingfailure 2>&1 | vinfo + for LV in $LVS; do + if [ -z "$sysinit" ]; then +- lvm lvchange --yes -ay --ignorelockingfailure $nopoll --ignoremonitoring $LV 2>&1 | vinfo ++ lvm lvchange --yes -K -ay --ignorelockingfailure $nopoll --ignoremonitoring $LV 2>&1 | vinfo + else +- lvm lvchange --yes -ay $sysinit $LV 2>&1 | vinfo ++ lvm lvchange --yes -K -ay $sysinit $LV 2>&1 | vinfo + fi + done + fi diff --git a/SOURCES/0514-fcoe-Allow-more-time-for-the-bnx2x-link-negotiation-.patch b/SOURCES/0514-fcoe-Allow-more-time-for-the-bnx2x-link-negotiation-.patch new file mode 100644 index 0000000..a1680b6 --- /dev/null +++ b/SOURCES/0514-fcoe-Allow-more-time-for-the-bnx2x-link-negotiation-.patch @@ -0,0 +1,35 @@ +From 3d1c9a76e7f0147feb65bd627583205d3a719ed0 Mon Sep 17 00:00:00 2001 +From: Chad Dupuis <chad.dupuis@cavium.com> +Date: Wed, 12 Oct 2016 11:32:47 -0400 +Subject: [PATCH] fcoe: Allow more time for the bnx2x link negotiation before + brining up fcoe interfaces. + +bnx2x can take no longer than 3 seconds to initialize the link in some setups +which can cause fipvlan to fail and thus the fcoe interface(s) won't be +created. + +Add another 10 seconds to give the link enough time to initialize. + +Signed-off-by: Chad Dupuis <chad.dupuis@cavium.com> + +Cherry-picked from: 3966a1e1ee0e3d27197258f446f54b683c415208 +Resolves: #1378910 +--- + modules.d/95fcoe/fcoe-up.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/modules.d/95fcoe/fcoe-up.sh b/modules.d/95fcoe/fcoe-up.sh +index cdff6ef1..a1f04747 100755 +--- a/modules.d/95fcoe/fcoe-up.sh ++++ b/modules.d/95fcoe/fcoe-up.sh +@@ -87,8 +87,8 @@ elif [ "$netdriver" = "bnx2x" ]; then + # If driver is bnx2x, do not use /sys/module/fcoe/parameters/create but fipvlan + modprobe 8021q + udevadm settle --timeout=30 +- # Sleep for 3 s to allow dcb negotiation +- sleep 3 ++ # Sleep for 13 s to allow dcb negotiation ++ sleep 13 + fipvlan "$netif" -c -s + else + vlan="no" diff --git a/SOURCES/0515-add-mtu-parameter-for-bond-options.patch b/SOURCES/0515-add-mtu-parameter-for-bond-options.patch new file mode 100644 index 0000000..6a36c3a --- /dev/null +++ b/SOURCES/0515-add-mtu-parameter-for-bond-options.patch @@ -0,0 +1,75 @@ +From 50d75a50fbebf96fe2937352aa2ea10e467b7ebd Mon Sep 17 00:00:00 2001 +From: Imran Haider <imran1008@gmail.com> +Date: Mon, 16 May 2016 00:14:58 -0400 +Subject: [PATCH] add 'mtu' parameter for bond options + +Signed-off-by: Imran Haider <imran1008@gmail.com> + +Cherry-picked from: 292548be6ec8e701dab1a532ca072707e890b12e +Resolves: #1494265 +--- + modules.d/40network/ifup.sh | 3 +++ + modules.d/40network/parse-bond.sh | 9 +++++++-- + 2 files changed, 10 insertions(+), 2 deletions(-) + +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index f2b5894d..38c7b709 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -249,6 +249,9 @@ if [ -z "$NO_BOND_MASTER" ]; then + linkup $slave + done + ++ # Set mtu on bond master ++ [ -n "$bondmtu" ] && ip link set mtu $bondmtu dev $netif ++ + # add the bits to setup the needed post enslavement parameters + for arg in $bondoptions ; do + key=${arg%%=*}; +diff --git a/modules.d/40network/parse-bond.sh b/modules.d/40network/parse-bond.sh +index 80b3b077..48e548b9 100755 +--- a/modules.d/40network/parse-bond.sh ++++ b/modules.d/40network/parse-bond.sh +@@ -1,7 +1,7 @@ + #!/bin/sh + # + # Format: +-# bond=<bondname>[:<bondslaves>:[:<options>]] ++# bond=<bondname>[:<bondslaves>:[:<options>[:<mtu>]]] + # + # bondslaves is a comma-separated list of physical (ethernet) interfaces + # options is a comma-separated list on bonding options (modinfo bonding for details) in format compatible with initscripts +@@ -9,6 +9,8 @@ + # + # bond without parameters assumes bond=bond0:eth0,eth1:mode=balance-rr + # ++# if the mtu is specified, it will be set on the bond master ++# + + # We translate list of slaves to space-separated here to mwke it easier to loop over them in ifup + # Ditto for bonding options +@@ -25,15 +27,17 @@ parsebond() { + 1) bondname=$1; bondslaves="eth0 eth1" ;; + 2) bondname=$1; bondslaves=$(str_replace "$2" "," " ") ;; + 3) bondname=$1; bondslaves=$(str_replace "$2" "," " "); bondoptions=$(str_replace "$3" "," " ") ;; ++ 4) bondname=$1; bondslaves=$(str_replace "$2" "," " "); bondoptions=$(str_replace "$3" "," " "); bondmtu=$4;; + *) die "bond= requires zero to four parameters" ;; + esac + } + +-# Parse bond for bondname, bondslaves, bondmode and bondoptions ++# Parse bond for bondname, bondslaves, bondmode, bondoptions and bondmtu + for bond in $(getargs bond=); do + unset bondname + unset bondslaves + unset bondoptions ++ unset bondmtu + if [ "$bond" != "bond" ]; then + parsebond "$bond" + fi +@@ -47,4 +51,5 @@ for bond in $(getargs bond=); do + echo "bondname=$bondname" > /tmp/bond.${bondname}.info + echo "bondslaves=\"$bondslaves\"" >> /tmp/bond.${bondname}.info + echo "bondoptions=\"$bondoptions\"" >> /tmp/bond.${bondname}.info ++ echo "bondmtu=\"$bondmtu\"" >> /tmp/bond.${bondname}.info + done diff --git a/SOURCES/0516-Fix-MTU-on-bond-interface.patch b/SOURCES/0516-Fix-MTU-on-bond-interface.patch new file mode 100644 index 0000000..09cd3a4 --- /dev/null +++ b/SOURCES/0516-Fix-MTU-on-bond-interface.patch @@ -0,0 +1,30 @@ +From 50c3405ce0a62439708c51be949f275d2714d887 Mon Sep 17 00:00:00 2001 +From: Robert LeBlanc <robert@leblancnet.us> +Date: Thu, 21 Sep 2017 14:33:59 -0600 +Subject: [PATCH] Fix MTU on bond interface. + +The MTU is only being set on the slave devices and the MTU of the +bonding master is not being updated. This updates the bonding master and +also changes the MTU on the slaves as expected. + +Signed-Off-By: Robert LeBlanc <robert@leblancnet.us> + +Cherry-picked from: d0eabcab43f2c47ca38dba41453f97c6a7d362fc +Resolves: #1494265 +--- + modules.d/40network/ifup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index 38c7b709..b3219fc1 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -250,7 +250,7 @@ if [ -z "$NO_BOND_MASTER" ]; then + done + + # Set mtu on bond master +- [ -n "$bondmtu" ] && ip link set mtu $bondmtu dev $netif ++ [ -n "$bondmtu" ] && ip link set mtu $bondmtu dev $bondname + + # add the bits to setup the needed post enslavement parameters + for arg in $bondoptions ; do diff --git a/SOURCES/0517-dracut.sh-source-dracut-version.sh-earlier-than-drac.patch b/SOURCES/0517-dracut.sh-source-dracut-version.sh-earlier-than-drac.patch new file mode 100644 index 0000000..9ea9ad4 --- /dev/null +++ b/SOURCES/0517-dracut.sh-source-dracut-version.sh-earlier-than-drac.patch @@ -0,0 +1,43 @@ +From 75bf5df4209bec34799fb412d4c5bdd2b03e244d Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Wed, 20 Aug 2014 10:21:43 +0200 +Subject: [PATCH] dracut.sh: source dracut-version.sh earlier than + dracut-functions.sh + +Otherwise dracut-logger.sh outputs an empty version on journal testing. + +Aug 20 10:15:49 lenovo dracut[11144]: dracut- +Aug 20 10:15:49 lenovo dracut[11148]: Executing: /sbin/dracut + +Cherry-picked from: e27ecc9ae8352c98c206ea5165ab6b85d3d6cd3a +Resolves: #1490777 +--- + dracut.sh | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/dracut.sh b/dracut.sh +index 1dd3eabd..b34edea2 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -864,6 +864,10 @@ if [[ $print_cmdline ]]; then + kmsgloglvl=0 + fi + ++if [[ -f $dracutbasedir/dracut-version.sh ]]; then ++ . $dracutbasedir/dracut-version.sh ++fi ++ + if [[ -f $dracutbasedir/dracut-init.sh ]]; then + . $dracutbasedir/dracut-init.sh + else +@@ -882,10 +886,6 @@ if ! [[ $print_cmdline ]]; then + rm -fr -- ${initdir}/* + fi + +-if [[ -f $dracutbasedir/dracut-version.sh ]]; then +- . $dracutbasedir/dracut-version.sh +-fi +- + # Verify bash version, current minimum is 3.1 + if (( BASH_VERSINFO[0] < 4 )); then + dfatal 'You need at least Bash 4 to use dracut, sorry.' diff --git a/SOURCES/0518-network-Only-bring-up-wired-network-interfaces.patch b/SOURCES/0518-network-Only-bring-up-wired-network-interfaces.patch new file mode 100644 index 0000000..4ee4471 --- /dev/null +++ b/SOURCES/0518-network-Only-bring-up-wired-network-interfaces.patch @@ -0,0 +1,41 @@ +From 240c2fea10fda5c84a7725e8711d9cb214a064a9 Mon Sep 17 00:00:00 2001 +From: Javier Martinez Canillas <javierm@redhat.com> +Date: Wed, 9 Aug 2017 18:50:44 +0200 +Subject: [PATCH] network: Only bring up wired network interfaces + +The dracut network module is only supposed to be used for wired interfaces +but if driver modules for wireless devices are wrongly copied, these will +be loaded and the available interfaces brought up. + +If the rd.neednet=1 command line parameter is used, dhclient will attempt +to request an IP address for the interfaces and these requests will fail. + +But other dracut modules that depend on the network to be settled, will +have to wait for the DHCP requests to timeout. Which can be a lot of time +since the dhclient default timeout value is 60 seconds. + +Instead of trying to blacklist all possible kernel modules for wireless +devices, only bring up network interfaces if these are for wired devices. + +Suggested-by: Harald Hoyer <harald@redhat.com> +Signed-off-by: Javier Martinez Canillas <javierm@redhat.com> + +Cherry-picked from: 17927597213854b2fdf15461353882339fdb5051 +Resolves: #1480246 +--- + modules.d/40network/net-genrules.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/40network/net-genrules.sh b/modules.d/40network/net-genrules.sh +index 08072fbe..c4396f77 100755 +--- a/modules.d/40network/net-genrules.sh ++++ b/modules.d/40network/net-genrules.sh +@@ -102,7 +102,7 @@ command -v fix_bootif >/dev/null || . /lib/net-lib.sh + # Default: We don't know the interface to use, handle all + # Fixme: waiting for the interface as well. + else +- cond='ACTION=="add", SUBSYSTEM=="net"' ++ cond='ACTION=="add", SUBSYSTEM=="net", ENV{DEVTYPE}!="wlan|wwan"' + # if you change the name of "91-default-net.rules", also change modules.d/80cms/cmssetup.sh + echo "$cond, $runcmd" > /etc/udev/rules.d/91-default-net.rules + fi diff --git a/SOURCES/0519-network-ifup-don-t-arping-for-point-to-point-connect.patch b/SOURCES/0519-network-ifup-don-t-arping-for-point-to-point-connect.patch new file mode 100644 index 0000000..643960d --- /dev/null +++ b/SOURCES/0519-network-ifup-don-t-arping-for-point-to-point-connect.patch @@ -0,0 +1,32 @@ +From 0259f1c246d3c5b7cf9cb234571e025e529e8716 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Mon, 7 Aug 2017 15:09:13 +0200 +Subject: [PATCH] network/ifup: don't arping for point-to-point connections + +https://bugzilla.redhat.com/show_bug.cgi?id=1477339 + +Cherry-picked from: 5abd692fe46215c38f564b59db50193daf745af5 +Resolves: #1477339 +--- + modules.d/40network/ifup.sh | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index b3219fc1..9ed48155 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -118,9 +118,11 @@ do_static() { + ip addr add $ip/$mask ${srv:+peer $srv} dev $netif + wait_for_ipv6_dad $netif + else +- if ! arping -f -q -D -c 2 -I $netif $ip; then +- warn "Duplicate address detected for $ip for interface $netif." +- return 1 ++ if [ -z "$srv" ]; then ++ if ! arping -f -q -D -c 2 -I $netif $ip; then ++ warn "Duplicate address detected for $ip for interface $netif." ++ return 1 ++ fi + fi + ip -4 addr flush dev $netif + ip addr add $ip/$mask ${srv:+peer $srv} brd + dev $netif diff --git a/SOURCES/0520-guard-arrays-with.patch b/SOURCES/0520-guard-arrays-with.patch new file mode 100644 index 0000000..052a35c --- /dev/null +++ b/SOURCES/0520-guard-arrays-with.patch @@ -0,0 +1,181 @@ +From 69b5de6251ab7dace7ed7eb8bea7a81324cefe16 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 9 Jul 2015 15:27:44 +0200 +Subject: [PATCH] guard ${arrays[@]} with "" + +Cherry-picked from: 3721635b2c5df033fca1e19181d7598e075f5308 +Resolves: #1520721 +--- + dracut-functions.sh | 8 ++++---- + dracut.sh | 6 +++--- + lsinitrd.sh | 2 +- + modules.d/90btrfs/module-setup.sh | 2 +- + modules.d/90kernel-modules/module-setup.sh | 2 +- + modules.d/95cifs/module-setup.sh | 2 +- + modules.d/95nfs/module-setup.sh | 2 +- + modules.d/95virtfs/module-setup.sh | 2 +- + modules.d/99base/module-setup.sh | 4 ++-- + 9 files changed, 15 insertions(+), 15 deletions(-) + +diff --git a/dracut-functions.sh b/dracut-functions.sh +index 3c4118a9..23768bdc 100755 +--- a/dracut-functions.sh ++++ b/dracut-functions.sh +@@ -593,7 +593,7 @@ for_each_host_dev_fs() + local _dev + local _ret=1 + +- [[ "${!host_fs_types[@]}" ]] || return 0 ++ [[ "${#host_fs_types[@]}" ]] || return 0 + + for _dev in "${!host_fs_types[@]}"; do + $_func "$_dev" "${host_fs_types[$_dev]}" && _ret=0 +@@ -654,7 +654,7 @@ for_each_host_dev_and_slaves_all() + + [[ "${host_devs[@]}" ]] || return 0 + +- for _dev in ${host_devs[@]}; do ++ for _dev in "${host_devs[@]}"; do + [[ -b "$_dev" ]] || continue + if check_block_and_slaves_all $_func $(get_maj_min $_dev); then + _ret=0 +@@ -670,7 +670,7 @@ for_each_host_dev_and_slaves() + + [[ "${host_devs[@]}" ]] || return 0 + +- for _dev in ${host_devs[@]}; do ++ for _dev in "${host_devs[@]}"; do + [[ -b "$_dev" ]] || continue + check_block_and_slaves $_func $(get_maj_min $_dev) && return 0 + done +@@ -1241,7 +1241,7 @@ check_mount() { + local _ret + local _moddep + +- [ "${#host_fs_types[*]}" -le 0 ] && return 1 ++ [ "${#host_fs_types[@]}" -le 0 ] && return 1 + + # If we are already scheduled to be loaded, no need to check again. + [[ " $mods_to_load " == *\ $_mod\ * ]] && return 0 +diff --git a/dracut.sh b/dracut.sh +index b34edea2..90b75e51 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1171,7 +1171,7 @@ _get_fs_type() { + return 1 + } + +-for dev in ${host_devs[@]}; do ++for dev in "${host_devs[@]}"; do + _get_fs_type "$dev" + check_block_and_slaves_all _get_fs_type "$(get_maj_min "$dev")" + done +@@ -1396,8 +1396,8 @@ if [[ $no_kernel != yes ]]; then + fi + + if [[ $kernel_only != yes ]]; then +- (( ${#install_items[@]} > 0 )) && inst_multiple ${install_items[@]} +- (( ${#install_optional_items[@]} > 0 )) && inst_multiple -o ${install_optional_items[@]} ++ (( ${#install_items[@]} > 0 )) && inst_multiple "${install_items[@]}" ++ (( ${#install_optional_items[@]} > 0 )) && inst_multiple -o "${install_optional_items[@]}" + + [[ $kernel_cmdline ]] && printf "%s\n" "$kernel_cmdline" >> "${initdir}/etc/cmdline.d/01-default.conf" + +diff --git a/lsinitrd.sh b/lsinitrd.sh +index 4103ee23..0fb7e3b5 100755 +--- a/lsinitrd.sh ++++ b/lsinitrd.sh +@@ -113,7 +113,7 @@ fi + extract_files() + { + (( ${#filenames[@]} == 1 )) && nofileinfo=1 +- for f in ${!filenames[@]}; do ++ for f in "${!filenames[@]}"; do + [[ $nofileinfo ]] || echo "initramfs:/$f" + [[ $nofileinfo ]] || echo "========================================================================" + $CAT $image 2>/dev/null | cpio --extract --verbose --quiet --to-stdout $f 2>/dev/null +diff --git a/modules.d/90btrfs/module-setup.sh b/modules.d/90btrfs/module-setup.sh +index 4804f58b..ac8cb885 100755 +--- a/modules.d/90btrfs/module-setup.sh ++++ b/modules.d/90btrfs/module-setup.sh +@@ -9,7 +9,7 @@ check() { + require_binaries btrfs || return 1 + + [[ $hostonly ]] || [[ $mount_needs ]] && { +- for fs in ${host_fs_types[@]}; do ++ for fs in "${host_fs_types[@]}"; do + [[ "$fs" == "btrfs" ]] && return 0 + done + return 255 +diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh +index c4bf5af5..dea32602 100755 +--- a/modules.d/90kernel-modules/module-setup.sh ++++ b/modules.d/90kernel-modules/module-setup.sh +@@ -83,7 +83,7 @@ installkernel() { + instmods '=fs' + fi + else +- for i in $(host_fs_all); do ++ for i in "${host_fs_types[@]}"; do + hostonly='' instmods $i + done + fi +diff --git a/modules.d/95cifs/module-setup.sh b/modules.d/95cifs/module-setup.sh +index 9e36f87f..e2509504 100755 +--- a/modules.d/95cifs/module-setup.sh ++++ b/modules.d/95cifs/module-setup.sh +@@ -7,7 +7,7 @@ check() { + require_binaries mount.cifs || return 1 + + [[ $hostonly ]] || [[ $mount_needs ]] && { +- for fs in ${host_fs_types[@]}; do ++ for fs in "${host_fs_types[@]}"; do + [[ "$fs" == "cifs" ]] && return 0 + done + return 255 +diff --git a/modules.d/95nfs/module-setup.sh b/modules.d/95nfs/module-setup.sh +index dc2e7221..b0bb866d 100755 +--- a/modules.d/95nfs/module-setup.sh ++++ b/modules.d/95nfs/module-setup.sh +@@ -8,7 +8,7 @@ check() { + require_binaries rpc.statd mount.nfs mount.nfs4 umount || return 1 + + [[ $hostonly ]] || [[ $mount_needs ]] && { +- for fs in ${host_fs_types[@]}; do ++ for fs in "${host_fs_types[@]}"; do + [[ "$fs" == "nfs" ]] && return 0 + [[ "$fs" == "nfs3" ]] && return 0 + [[ "$fs" == "nfs4" ]] && return 0 +diff --git a/modules.d/95virtfs/module-setup.sh b/modules.d/95virtfs/module-setup.sh +index 3d80b75f..c7101c07 100755 +--- a/modules.d/95virtfs/module-setup.sh ++++ b/modules.d/95virtfs/module-setup.sh +@@ -4,7 +4,7 @@ + + check() { + [[ $hostonly ]] || [[ $mount_needs ]] && { +- for fs in ${host_fs_types[@]}; do ++ for fs in "${host_fs_types[@]}"; do + [[ "$fs" == "9p" ]] && return 0 + done + return 255 +diff --git a/modules.d/99base/module-setup.sh b/modules.d/99base/module-setup.sh +index 8fd4e80d..74a3f0c0 100755 +--- a/modules.d/99base/module-setup.sh ++++ b/modules.d/99base/module-setup.sh +@@ -103,13 +103,13 @@ install() { + + . "$moddir/dracut-lib.sh" + +- for _dev in ${host_devs[@]}; do ++ for _dev in "${host_devs[@]}"; do + [[ "$_dev" == "$root_dev" ]] && continue + + # We only actually wait for real devs - swap is only needed + # for resume and udev rules generated when parsing resume= + # argument take care of the waiting for us +- for _dev2 in ${swap_devs[@]}; do ++ for _dev2 in "${swap_devs[@]}"; do + [[ "$_dev" == "$_dev2" ]] && continue 2 + done + diff --git a/SOURCES/0521-dracut.sh-for_each_host_xx-function-should-indicate-.patch b/SOURCES/0521-dracut.sh-for_each_host_xx-function-should-indicate-.patch new file mode 100644 index 0000000..48a6d9b --- /dev/null +++ b/SOURCES/0521-dracut.sh-for_each_host_xx-function-should-indicate-.patch @@ -0,0 +1,50 @@ +From 43d6b9d0085c393c7cdb0fd1f1181654d0f87e61 Mon Sep 17 00:00:00 2001 +From: Pingfan Liu <piliu@redhat.com> +Date: Mon, 4 Dec 2017 17:24:11 +0800 +Subject: [PATCH] dracut.sh: for_each_host_xx() function should indicate the + empty case + +The caller of "for_each_host_xx func" needs to tell three cases: +func success/ fail / not be called. +E.g, in kdump case, host_devs can be empty, and we want to know it. + +Signed-off-by: Pingfan Liu <piliu@redhat.com> + +Cherry-picked from: e6199960d9bbfe6d860a32716b7e9bac7e657a4f +Resolves: #1520721 +--- + dracut-functions.sh | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/dracut-functions.sh b/dracut-functions.sh +index 23768bdc..4051596b 100755 +--- a/dracut-functions.sh ++++ b/dracut-functions.sh +@@ -593,7 +593,8 @@ for_each_host_dev_fs() + local _dev + local _ret=1 + +- [[ "${#host_fs_types[@]}" ]] || return 0 ++ [[ "${#host_fs_types[@]}" ]] || return 2 ++ + + for _dev in "${!host_fs_types[@]}"; do + $_func "$_dev" "${host_fs_types[$_dev]}" && _ret=0 +@@ -652,7 +653,7 @@ for_each_host_dev_and_slaves_all() + local _dev + local _ret=1 + +- [[ "${host_devs[@]}" ]] || return 0 ++ [[ "${host_devs[@]}" ]] || return 2 + + for _dev in "${host_devs[@]}"; do + [[ -b "$_dev" ]] || continue +@@ -668,7 +669,7 @@ for_each_host_dev_and_slaves() + local _func="$1" + local _dev + +- [[ "${host_devs[@]}" ]] || return 0 ++ [[ "${host_devs[@]}" ]] || return 2 + + for _dev in "${host_devs[@]}"; do + [[ -b "$_dev" ]] || continue diff --git a/SOURCES/0522-dracut.sh-remove-quotes-from-install_items-and-insta.patch b/SOURCES/0522-dracut.sh-remove-quotes-from-install_items-and-insta.patch new file mode 100644 index 0000000..f73fbb6 --- /dev/null +++ b/SOURCES/0522-dracut.sh-remove-quotes-from-install_items-and-insta.patch @@ -0,0 +1,29 @@ +From e076279d38466b974305fd38aae4a22e0bd9a90f Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Mon, 10 Aug 2015 14:05:15 +0200 +Subject: [PATCH] dracut.sh: remove quotes from install_items and + install_optional_items + +Unfortunately these are lists with whitespaces. + +Cherry-picked from: 3c00189988f6921c1affdd61a0f5025ee9b93bda +Resolves: #1520721 +--- + dracut.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/dracut.sh b/dracut.sh +index 90b75e51..3b91b5e8 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1396,8 +1396,8 @@ if [[ $no_kernel != yes ]]; then + fi + + if [[ $kernel_only != yes ]]; then +- (( ${#install_items[@]} > 0 )) && inst_multiple "${install_items[@]}" +- (( ${#install_optional_items[@]} > 0 )) && inst_multiple -o "${install_optional_items[@]}" ++ (( ${#install_items[@]} > 0 )) && inst_multiple ${install_items[@]} ++ (( ${#install_optional_items[@]} > 0 )) && inst_multiple -o ${install_optional_items[@]} + + [[ $kernel_cmdline ]] && printf "%s\n" "$kernel_cmdline" >> "${initdir}/etc/cmdline.d/01-default.conf" + diff --git a/SOURCES/0523-Support-Microcode-Updates-for-AMD-CPU-Family-0x17.patch b/SOURCES/0523-Support-Microcode-Updates-for-AMD-CPU-Family-0x17.patch new file mode 100644 index 0000000..77379d3 --- /dev/null +++ b/SOURCES/0523-Support-Microcode-Updates-for-AMD-CPU-Family-0x17.patch @@ -0,0 +1,30 @@ +From f93c34935fcf5cc70118766b3ae0150d44a5185c Mon Sep 17 00:00:00 2001 +From: Daniel Molkentin <dmolkentin@suse.com> +Date: Tue, 12 Dec 2017 17:48:36 +0100 +Subject: [PATCH] Support Microcode Updates for AMD CPU Family 0x17 + +Original-Patch-By: Tom Lendacky <thomas.lendacky@amd.com> + +Cherry-picked from: 215fe583240ae886c2096d502a96e44798b84163 +Resolves: #1476039 +--- + dracut-functions.sh | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/dracut-functions.sh b/dracut-functions.sh +index 4051596b..ef52274f 100755 +--- a/dracut-functions.sh ++++ b/dracut-functions.sh +@@ -1739,7 +1739,11 @@ get_ucode_file () + + if [[ "$(get_cpu_vendor)" == "AMD" ]]; then + # If family greater or equal than 0x15 +- if [[ $family -ge 21 ]]; then ++ if [[ $family -ge 23 ]]; then ++ printf "microcode_amd_fam17h.bin" ++ elif [[ $family -eq 22 ]]; then ++ printf "microcode_amd_fam16h.bin" ++ elif [[ $family -eq 21 ]]; then + printf "microcode_amd_fam15h.bin" + else + printf "microcode_amd.bin" diff --git a/SOURCES/0524-Simplify-microcode-lookup-for-for-AMD-CPUs.patch b/SOURCES/0524-Simplify-microcode-lookup-for-for-AMD-CPUs.patch new file mode 100644 index 0000000..bb45b93 --- /dev/null +++ b/SOURCES/0524-Simplify-microcode-lookup-for-for-AMD-CPUs.patch @@ -0,0 +1,33 @@ +From a0e7bc11c8d95e18be89bc96a82d3482b929c0b5 Mon Sep 17 00:00:00 2001 +From: Daniel Molkentin <dmolkentin@suse.com> +Date: Thu, 14 Dec 2017 12:24:53 +0100 +Subject: [PATCH] Simplify microcode lookup for for AMD CPUs + +Suggested by Tom Lendacky <thomas.lendacky@amd.com> + +Cherry-picked from: 19453dc8744e6a59725c43b61b2e3db01cb4c57c +Resolves: #1476039 +--- + dracut-functions.sh | 9 ++------- + 1 file changed, 2 insertions(+), 7 deletions(-) + +diff --git a/dracut-functions.sh b/dracut-functions.sh +index ef52274f..98a4b88b 100755 +--- a/dracut-functions.sh ++++ b/dracut-functions.sh +@@ -1738,13 +1738,8 @@ get_ucode_file () + local stepping=`grep -E "stepping" /proc/cpuinfo | head -1 | sed s/.*:\ //` + + if [[ "$(get_cpu_vendor)" == "AMD" ]]; then +- # If family greater or equal than 0x15 +- if [[ $family -ge 23 ]]; then +- printf "microcode_amd_fam17h.bin" +- elif [[ $family -eq 22 ]]; then +- printf "microcode_amd_fam16h.bin" +- elif [[ $family -eq 21 ]]; then +- printf "microcode_amd_fam15h.bin" ++ if [[ $family -ge 21 ]]; then ++ printf "microcode_amd_fam%xh.bin" $family + else + printf "microcode_amd.bin" + fi diff --git a/SOURCES/0525-01fips-Fix-creating-path-to-.hmac-of-kernel-based-on.patch b/SOURCES/0525-01fips-Fix-creating-path-to-.hmac-of-kernel-based-on.patch new file mode 100644 index 0000000..9a89d3e --- /dev/null +++ b/SOURCES/0525-01fips-Fix-creating-path-to-.hmac-of-kernel-based-on.patch @@ -0,0 +1,49 @@ +From 9b1d79993dbed054c5069f97204280a39ed61219 Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn <lnykryn@redhat.com> +Date: Mon, 18 Dec 2017 14:48:59 +0100 +Subject: [PATCH] 01fips: Fix creating path to .hmac of kernel based on + BOOT_IMAGE + +Old code did not work for two most common use-cases. +On most machines BOOT_IMAGE is set to something like +/vmlinuz-4.11.3-202.fc25.x86_64. So if we just add prefix "/boot/." +it won't work. Also on machines without /boot on separate partition +BOOT_IMAGE already has the /boot/ prefix (/boot/vmlinuz-3.10.0-799.el7.x86_64). +So let's strip it in such case. + +https://bugzilla.redhat.com/show_bug.cgi?id=1415032 + +Cherry-picked from: 8f5c564cb30966878b0d90025568253016e1402f +Resolves: #1415032 +--- + modules.d/01fips/fips.sh | 14 ++++++++++---- + 1 file changed, 10 insertions(+), 4 deletions(-) + +diff --git a/modules.d/01fips/fips.sh b/modules.d/01fips/fips.sh +index ecd711c2..6c5dd60f 100755 +--- a/modules.d/01fips/fips.sh ++++ b/modules.d/01fips/fips.sh +@@ -112,13 +112,19 @@ do_fips() + do_rhevh_check /run/initramfs/live/isolinux/vmlinuz0 || return 1 + else + BOOT_IMAGE="$(getarg BOOT_IMAGE)" +- [ -e "/boot/.${BOOT_IMAGE}.hmac" ] || BOOT_IMAGE="vmlinuz-${KERNEL}" ++ if ! [ -e "/boot/${BOOT_IMAGE}" ]; then ++ #if /boot is not a separate partition BOOT_IMAGE might start with /boot ++ BOOT_IMAGE=${BOOT_IMAGE#"/boot"} ++ [ -e "/boot/${BOOT_IMAGE}" ] || BOOT_IMAGE="vmlinuz-${KERNEL}" ++ fi ++ ++ BOOT_IMAGE_HMAC="/boot/${BOOT_IMAGE%/*}/.${BOOT_IMAGE##*/}.hmac" + +- if ! [ -e "/boot/.${BOOT_IMAGE}.hmac" ]; then +- warn "/boot/.${BOOT_IMAGE}.hmac does not exist" ++ if ! [ -e "${BOOT_IMAGE_HMAC}" ]; then ++ warn "${BOOT_IMAGE_HMAC} does not exist" + return 1 + fi +- sha512hmac -c "/boot/.${BOOT_IMAGE}.hmac" || return 1 ++ sha512hmac -c "${BOOT_IMAGE_HMAC}" || return 1 + fi + + info "All initrd crypto checks done" diff --git a/SOURCES/0526-01fips-Properly-fix-creating-path-to-.hmac-of-kernel.patch b/SOURCES/0526-01fips-Properly-fix-creating-path-to-.hmac-of-kernel.patch new file mode 100644 index 0000000..eb0c6a1 --- /dev/null +++ b/SOURCES/0526-01fips-Properly-fix-creating-path-to-.hmac-of-kernel.patch @@ -0,0 +1,63 @@ +From 69a889ee675822102d04e99a25bdc92aa977263a Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn <lnykryn@redhat.com> +Date: Tue, 26 Dec 2017 12:18:47 +0100 +Subject: [PATCH] 01fips: Properly fix creating path to .hmac of kernel based + on BOOT_IMAGE + +8f5c5 broke the case where BOOT_IMAGE is not set at all. +This code should handle following: +1) BOOT_IMAGE not set +2) BOOT_IMAGE set to something unrelated (s390) +3) BOOT_IMAGE=vmlinuz-4.14.7-300.fc27.x86_64 +4) BOOT_IMAGE=/vmlinuz-4.14.7-300.fc27.x86_64 +5) BOOT_IMAGE=/boot/vmlinuz-4.14.7-300.fc27.x86_64 +6) BOOT_IMAGE=subdir/vmlinuz-4.14.7-300.fc27.x86_64 +7) BOOT_IMAGE=/subdir/vmlinuz-4.14.7-300.fc27.x86_64 +8) BOOT_IMAGE=/boot/subdir/vmlinuz-4.14.7-300.fc27.x86_64 + +https://bugzilla.redhat.com/show_bug.cgi?id=1415032 + +Cherry-picked from: d818986db485fc57a76a247a8475c3144acd33dc +Resolves: #1415032 +--- + modules.d/01fips/fips.sh | 20 +++++++++++++++----- + 1 file changed, 15 insertions(+), 5 deletions(-) + +diff --git a/modules.d/01fips/fips.sh b/modules.d/01fips/fips.sh +index 6c5dd60f..c72c1273 100755 +--- a/modules.d/01fips/fips.sh ++++ b/modules.d/01fips/fips.sh +@@ -112,18 +112,28 @@ do_fips() + do_rhevh_check /run/initramfs/live/isolinux/vmlinuz0 || return 1 + else + BOOT_IMAGE="$(getarg BOOT_IMAGE)" +- if ! [ -e "/boot/${BOOT_IMAGE}" ]; then ++ BOOT_IMAGE_NAME="${BOOT_IMAGE##*/}" ++ BOOT_IMAGE_PATH="${BOOT_IMAGE%${BOOT_IMAGE_NAME}}" ++ ++ if [ -z "$BOOT_IMAGE_NAME" ]; then ++ BOOT_IMAGE_NAME="vmlinuz-${KERNEL}" ++ elif ! [ -e "/boot/${BOOT_IMAGE_PATH}/${BOOT_IMAGE}" ]; then + #if /boot is not a separate partition BOOT_IMAGE might start with /boot +- BOOT_IMAGE=${BOOT_IMAGE#"/boot"} +- [ -e "/boot/${BOOT_IMAGE}" ] || BOOT_IMAGE="vmlinuz-${KERNEL}" ++ BOOT_IMAGE_PATH=${BOOT_IMAGE_PATH#"/boot"} ++ #on some achitectures BOOT_IMAGE does not contain path to kernel ++ #so if we can't find anything, let's treat it in the same way as if it was empty ++ if ! [ -e "/boot/${BOOT_IMAGE_PATH}/${BOOT_IMAGE_NAME}" ]; then ++ BOOT_IMAGE_NAME="vmlinuz-${KERNEL}" ++ BOOT_IMAGE_PATH="" ++ fi + fi +- +- BOOT_IMAGE_HMAC="/boot/${BOOT_IMAGE%/*}/.${BOOT_IMAGE##*/}.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 + fi ++ + sha512hmac -c "${BOOT_IMAGE_HMAC}" || return 1 + fi + diff --git a/SOURCES/0527-dracut-Ajusting-variables-name-for-include.patch b/SOURCES/0527-dracut-Ajusting-variables-name-for-include.patch new file mode 100644 index 0000000..1db975d --- /dev/null +++ b/SOURCES/0527-dracut-Ajusting-variables-name-for-include.patch @@ -0,0 +1,90 @@ +From 7812b7a7b02cc5b4e66c6544f8f8c8748ada00bf Mon Sep 17 00:00:00 2001 +From: Erwan Velu <erwan.velu@enovance.com> +Date: Fri, 19 Dec 2014 14:49:00 +0100 +Subject: [PATCH] dracut: Ajusting variables name for --include + +When reading the --include part of the script, we had the following +issues to make the code easy to read: +- src & tgt were extract for the original options +- i variable was a file or a directory from src +- s variable was the directory name in case $i was a directory + +"s" sounds very close to "src" while "s" is on the "tgt" side. Very +confusing. + +"s" was defined before the "if it's a directory" statement while it's +only used inside the "if". + +"i" was commit from the "src" but wasn't really explicit. + +Having some lines mixing "i" and "s" takes a little time to get read +properly. + +This patch offer the following changes: +- "i" is renamed to "objectname" as we don't know if its a file or a + directory + +- "s" is renamed to "object_destdir" as the object name becomes a + directory on the destdir + +- "object_destdir" (former "s") is moved inside the "if" statement as it's + only used here + +- tgt is finally renamed to "target" to be more explicit. We are not all + native english ;o) + +My 2 (semantic) cents, + +Cherry-picked from: c9364f6ea296a03073bc4096756e3a61ca095c0e +Resolves: #1489882 +--- + dracut.sh | 29 ++++++++++++++++------------- + 1 file changed, 16 insertions(+), 13 deletions(-) + +diff --git a/dracut.sh b/dracut.sh +index 3b91b5e8..873274c0 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1433,26 +1433,29 @@ if [[ $kernel_only != yes ]]; then + fi + fi + +-while pop include_src src && pop include_target tgt; do +- if [[ $src && $tgt ]]; then ++while pop include_src src && pop include_target target; do ++ if [[ $src && $target ]]; then + if [[ -f $src ]]; then +- inst $src $tgt ++ inst $src $target + else + ddebug "Including directory: $src" +- mkdir -p "${initdir}/${tgt}" ++ destdir="${initdir}/${target}" ++ mkdir -p "$destdir" + # check for preexisting symlinks, so we can cope with the + # symlinks to $prefix +- for i in "$src"/*; do +- [[ -e "$i" || -h "$i" ]] || continue +- s=${initdir}/${tgt}/${i#$src/} +- if [[ -d "$i" ]]; then +- if ! [[ -e "$s" ]]; then +- mkdir -m 0755 -p "$s" +- chmod --reference="$i" "$s" ++ # Objectname is a file or a directory ++ for objectname in "$src"/*; do ++ [[ -e "$objectname" || -h "$objectname" ]] || continue ++ if [[ -d "$objectname" ]]; then ++ # objectname is a directory, let's compute the final directory name ++ object_destdir=${destdir}/${objectname#$src/} ++ if ! [[ -e "$object_destdir" ]]; then ++ mkdir -m 0755 -p "$object_destdir" ++ chmod --reference="$objectname" "$object_destdir" + fi +- cp --reflink=auto --sparse=auto -fa -t "$s" "$i"/* ++ cp --reflink=auto --sparse=auto -fa -t "$object_destdir" "$objectname"/* + else +- cp --reflink=auto --sparse=auto -fa -t "$s" "$i" ++ cp --reflink=auto --sparse=auto -fa -t "$destdir" "$objectname" + fi + done + fi diff --git a/SOURCES/0528-90dmsquash-live-we-don-t-have-find_binary-inside-ini.patch b/SOURCES/0528-90dmsquash-live-we-don-t-have-find_binary-inside-ini.patch new file mode 100644 index 0000000..e02045c --- /dev/null +++ b/SOURCES/0528-90dmsquash-live-we-don-t-have-find_binary-inside-ini.patch @@ -0,0 +1,24 @@ +From 5aadb107913d8c93c787b854fcf3e2b9cd37e0d7 Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn <lnykryn@redhat.com> +Date: Thu, 11 Jan 2018 13:31:43 +0100 +Subject: [PATCH] 90dmsquash-live: we don't have find_binary inside initramdisk + +Cherry-picked from: c42c387cca3ecbb3ec7cef0ee1b8dd67b64782d1 +Resolves: #1449410 +--- + modules.d/90dmsquash-live/dmsquash-live-root.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/90dmsquash-live/dmsquash-live-root.sh b/modules.d/90dmsquash-live/dmsquash-live-root.sh +index 5fb798c7..6b3c2eb9 100755 +--- a/modules.d/90dmsquash-live/dmsquash-live-root.sh ++++ b/modules.d/90dmsquash-live/dmsquash-live-root.sh +@@ -85,7 +85,7 @@ else + # Symlinking /usr/bin/ntfs-3g as /sbin/mount.ntfs seems to boot + # at the first glance, but ends with lots and lots of squashfs + # errors, because systemd attempts to kill the ntfs-3g process?! +- if [ -x "$(find_binary "ntfs-3g")" ]; then ++ if [ -x "/usr/bin/ntfs-3g" ]; then + ( exec -a @ntfs-3g ntfs-3g -o ${liverw:-ro} $livedev /run/initramfs/live ) | vwarn + else + die "Failed to mount block device of live image: Missing NTFS support" diff --git a/SOURCES/0529-90dmsquash-live-ntfs-fix-depends.patch b/SOURCES/0529-90dmsquash-live-ntfs-fix-depends.patch new file mode 100644 index 0000000..6a34b29 --- /dev/null +++ b/SOURCES/0529-90dmsquash-live-ntfs-fix-depends.patch @@ -0,0 +1,26 @@ +From 19da2dda229257070aacb3a3658a84d9343a3433 Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn <lnykryn@redhat.com> +Date: Thu, 11 Jan 2018 13:16:17 +0100 +Subject: [PATCH] 90dmsquash-live-ntfs: fix depends() + +Dependencies should not include module number. + +Cherry-picked from: f3e09bf1cb86248fb2fbc87d50f8d172898d3260 +Resolves: #1449410 +--- + modules.d/90dmsquash-live-ntfs/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/90dmsquash-live-ntfs/module-setup.sh b/modules.d/90dmsquash-live-ntfs/module-setup.sh +index bc77376b..2354b840 100755 +--- a/modules.d/90dmsquash-live-ntfs/module-setup.sh ++++ b/modules.d/90dmsquash-live-ntfs/module-setup.sh +@@ -8,7 +8,7 @@ check() { + } + + depends() { +- echo 90dmsquash-live ++ echo dmsquash-live + return 0 + } + diff --git a/SOURCES/0530-dracut-lib.sh-dev_unit_name-use-systemd-escape-if-av.patch b/SOURCES/0530-dracut-lib.sh-dev_unit_name-use-systemd-escape-if-av.patch new file mode 100644 index 0000000..076b5c2 --- /dev/null +++ b/SOURCES/0530-dracut-lib.sh-dev_unit_name-use-systemd-escape-if-av.patch @@ -0,0 +1,28 @@ +From e8ffd4b3d4d50b65704f865829e76cac7ff060cc Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 21 Aug 2014 16:45:12 +0200 +Subject: [PATCH] dracut-lib.sh:dev_unit_name(): use systemd-escape, if + available + +Cherry-picked from: 85752f0f +Resolves: #1306640 +--- + modules.d/99base/dracut-lib.sh | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh +index 78e01a78..e04a9b3d 100755 +--- a/modules.d/99base/dracut-lib.sh ++++ b/modules.d/99base/dracut-lib.sh +@@ -870,6 +870,11 @@ wait_for_mount() + + dev_unit_name() + { ++ if command -v systemd-escape >/dev/null; then ++ systemd-escape -p "$1" ++ return ++ fi ++ + _name="${1%%/}" + _name="${_name##/}" + _name="$(str_replace "$_name" '-' '\x2d')" diff --git a/SOURCES/0531-Align-dev_unit_name-with-systemd-s-function.patch b/SOURCES/0531-Align-dev_unit_name-with-systemd-s-function.patch new file mode 100644 index 0000000..3ae6e58 --- /dev/null +++ b/SOURCES/0531-Align-dev_unit_name-with-systemd-s-function.patch @@ -0,0 +1,58 @@ +From 014a78261db67c287d25aafa33266593d816315a Mon Sep 17 00:00:00 2001 +From: Thorsten Behrens <tbehrens@suse.com> +Date: Thu, 11 Dec 2014 15:46:08 +0100 +Subject: [PATCH] Align dev_unit_name() with systemd's function. + +Add more corner cases from systemd's +unit_name_from_path_instance() C function. + +Signed-off-by: Thorsten Behrens <tbehrens@suse.com> +Signed-off-by: Thomas Renninger <trenn@suse.de> + +Cherry-picked from: e3eec4b8 +Resolves: #1306640 +--- + modules.d/99base/dracut-lib.sh | 24 ++++++++++++++++++------ + 1 file changed, 18 insertions(+), 6 deletions(-) + +diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh +index e04a9b3d..46cee5a9 100755 +--- a/modules.d/99base/dracut-lib.sh ++++ b/modules.d/99base/dracut-lib.sh +@@ -868,18 +868,30 @@ wait_for_mount() + } >> "$hookdir/emergency/90-${_name}.sh" + } + ++# get a systemd-compatible unit name from a path ++# (mimicks unit_name_from_path_instance()) + dev_unit_name() + { ++ local dev="$1" ++ + if command -v systemd-escape >/dev/null; then +- systemd-escape -p "$1" ++ systemd-escape -p "$dev" + return + fi + +- _name="${1%%/}" +- _name="${_name##/}" +- _name="$(str_replace "$_name" '-' '\x2d')" +- _name="$(str_replace "$_name" '/' '-')" +- echo "$_name" ++ if [ "$dev" = "/" -o -z "$dev" ]; then ++ printf -- "-" ++ exit 0 ++ fi ++ ++ dev="${1%%/}" ++ dev="${dev##/}" ++ dev="$(str_replace "$dev" '\' '\x5c')" ++ dev="$(str_replace "$dev" '-' '\x2d')" ++ dev=${dev/#\./\\x2e} ++ dev="$(str_replace "$dev" '/' '-')" ++ ++ printf -- "%s" "$dev" + } + + # wait_for_dev <dev> diff --git a/SOURCES/0532-base-dracut-lib.sh-remove-bashism.patch b/SOURCES/0532-base-dracut-lib.sh-remove-bashism.patch new file mode 100644 index 0000000..cc0d187 --- /dev/null +++ b/SOURCES/0532-base-dracut-lib.sh-remove-bashism.patch @@ -0,0 +1,26 @@ +From 9dfcc5f0660b0d7cc7ca251dff940c4f2d0ddf95 Mon Sep 17 00:00:00 2001 +From: Alexander Tsoy <alexander@tsoy.me> +Date: Tue, 24 Feb 2015 22:28:24 +0300 +Subject: [PATCH] base/dracut-lib.sh: remove bashism + +Cherry-picked from: 13efce5d +Resolves: #1306640 +--- + modules.d/99base/dracut-lib.sh | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh +index 46cee5a9..7502ab66 100755 +--- a/modules.d/99base/dracut-lib.sh ++++ b/modules.d/99base/dracut-lib.sh +@@ -888,7 +888,9 @@ dev_unit_name() + dev="${dev##/}" + dev="$(str_replace "$dev" '\' '\x5c')" + dev="$(str_replace "$dev" '-' '\x2d')" +- dev=${dev/#\./\\x2e} ++ if [ "${dev##.}" != "$dev" ]; then ++ dev="\x2e${dev##.}" ++ fi + dev="$(str_replace "$dev" '/' '-')" + + printf -- "%s" "$dev" diff --git a/SOURCES/0533-base-dracut-lib.sh-dev_unit_name-guard-against-dev-b.patch b/SOURCES/0533-base-dracut-lib.sh-dev_unit_name-guard-against-dev-b.patch new file mode 100644 index 0000000..5b2936f --- /dev/null +++ b/SOURCES/0533-base-dracut-lib.sh-dev_unit_name-guard-against-dev-b.patch @@ -0,0 +1,32 @@ +From 58a5434f75567ecfe4a37252cedee25eb66da7d4 Mon Sep 17 00:00:00 2001 +From: Alexander Tsoy <alexander@tsoy.me> +Date: Tue, 5 Jan 2016 22:11:57 +0300 +Subject: [PATCH] base/dracut-lib.sh:dev_unit_name() guard against $dev + beginning with "-" + +crypt/parse-crypt.sh generate initqueue job which always call +dev_unit_name() with an argument beginning with "-". This results +in the following error: + +dracut-initqueue[307]: + systemd-escape -p -cfb4aa43-2f02-4c6b-a313-60ea99288087 +dracut-initqueue[307]: systemd-escape: invalid option -- 'c' + +Cherry-picked from: c41df7e1 +Resolves: #1306640 +--- + modules.d/99base/dracut-lib.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh +index 7502ab66..0a587ae6 100755 +--- a/modules.d/99base/dracut-lib.sh ++++ b/modules.d/99base/dracut-lib.sh +@@ -875,7 +875,7 @@ dev_unit_name() + local dev="$1" + + if command -v systemd-escape >/dev/null; then +- systemd-escape -p "$dev" ++ systemd-escape -p -- "$dev" + return + fi + diff --git a/SOURCES/0534-90lvm-always-add-dm-snapshot.patch b/SOURCES/0534-90lvm-always-add-dm-snapshot.patch new file mode 100644 index 0000000..440aa93 --- /dev/null +++ b/SOURCES/0534-90lvm-always-add-dm-snapshot.patch @@ -0,0 +1,23 @@ +From de688a407c3dcc9f2a6ad6942e18d3d11f7862ca Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn <lnykryn@redhat.com> +Date: Tue, 26 Dec 2017 12:18:47 +0100 +Subject: [PATCH] 90lvm: always add dm-snapshot + +Resolves: #1546577 +--- + modules.d/90lvm/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh +index 23d63a04..b8f74546 100755 +--- a/modules.d/90lvm/module-setup.sh ++++ b/modules.d/90lvm/module-setup.sh +@@ -43,7 +43,7 @@ cmdline() { + } + + installkernel() { +- instmods dm-snapshot ++ hostonly='' instmods dm-snapshot + } + + # called by dracut diff --git a/SOURCES/0535-dracut.sh-workaround-broken-read-from-proc-modules.patch b/SOURCES/0535-dracut.sh-workaround-broken-read-from-proc-modules.patch new file mode 100644 index 0000000..25ed7b5 --- /dev/null +++ b/SOURCES/0535-dracut.sh-workaround-broken-read-from-proc-modules.patch @@ -0,0 +1,43 @@ +From f264cfbe8a9fa36765c918db9d7074a89eedbcd6 Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn <lnykryn@redhat.com> +Date: Mon, 11 Jun 2018 11:07:59 +0200 +Subject: [PATCH] dracut.sh: workaround broken read from /proc/modules + +RHEL-only (upstream is using libkmod) +Resolves: #1578222 +--- + dracut.sh | 21 +++++++++++++++++---- + 1 file changed, 17 insertions(+), 4 deletions(-) + +diff --git a/dracut.sh b/dracut.sh +index 873274c0..9dadece0 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1145,10 +1145,23 @@ if [[ $hostonly ]]; then + + # check /proc/modules + declare -A host_modules +- while read m rest; do +- [ -z "$m" ] && continue +- host_modules["$m"]=1 +- done </proc/modules ++ declare new_module_found=1 ++ declare tmpmodules=$(mktemp --tmpdir="$TMPDIR/" -t proc_modules.XXXXXX) ++ while [[ $new_module_found ]]; do ++ new_module_found= ++ sleep 0.1 ++ #reading from procfs can be broken, so copy the file elsewhere ++ cp -f /proc/modules "$tmpmodules" ++ while read m rest; do ++ [ -z "$m" ] && continue ++ [[ ${host_modules["$m"]} ]] && continue ++ host_modules["$m"]=1 ++ new_module_found=1 ++ done < "$tmpmodules" ++ done ++ rm "$tmpmodules" ++ unset new_module_found ++ unset tmpmodules + fi + + unset m diff --git a/SOURCES/0536-net-lib-bump-carrier-timeout-to-15.patch b/SOURCES/0536-net-lib-bump-carrier-timeout-to-15.patch new file mode 100644 index 0000000..77e6b23 --- /dev/null +++ b/SOURCES/0536-net-lib-bump-carrier-timeout-to-15.patch @@ -0,0 +1,27 @@ +From 388c771a283447b5f080a3a331bc2c3da14885c4 Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn <lnykryn@redhat.com> +Date: Mon, 11 Jun 2018 12:30:07 +0200 +Subject: [PATCH] net-lib: bump carrier timeout to 15 + +df95b10 caused that dracut now waits only 5 seconds for carrier. +Let's bump this in downstream to avoid regressions in minor versions. + +RHEL-only +Resolves: #1401811 +--- + modules.d/40network/net-lib.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index 9083aea7..23f2f9ff 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -706,7 +706,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:-15} + timeout=$(($timeout*10)) + + linkup "$1" diff --git a/SOURCES/0537-dracut-function.sh-check_block_and_slaves-check-for-.patch b/SOURCES/0537-dracut-function.sh-check_block_and_slaves-check-for-.patch new file mode 100644 index 0000000..6926160 --- /dev/null +++ b/SOURCES/0537-dracut-function.sh-check_block_and_slaves-check-for-.patch @@ -0,0 +1,58 @@ +From dd235965dd7b5de9dd87e5e5a4244005c5fb21e2 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Mon, 19 Feb 2018 09:03:02 +0100 +Subject: [PATCH] dracut-function.sh:check_block_and_slaves() check for block + devices + +Some nvme have char parents, so check if the "slave" is a block dev. + +Fixes https://github.com/dracutdevs/dracut/issues/373 + +Cherry-picked from: e64dafd1f2489f1d926cce3e3bfd33f62b29b192 +Resolves: #1549498 +--- + dracut-functions.sh | 18 ++++++++++-------- + 1 file changed, 10 insertions(+), 8 deletions(-) + +diff --git a/dracut-functions.sh b/dracut-functions.sh +index 98a4b88b..ca54bd7f 100755 +--- a/dracut-functions.sh ++++ b/dracut-functions.sh +@@ -616,13 +616,14 @@ check_block_and_slaves() { + [[ -b /dev/block/$2 ]] || return 1 # Not a block device? So sorry. + if ! lvm_internal_dev $2; then "$1" $2 && return; fi + check_vol_slaves "$@" && return 0 +- if [[ -f /sys/dev/block/$2/../dev ]]; then ++ if [[ -f /sys/dev/block/$2/../dev ]] && [[ /sys/dev/block/$2/../subsystem -ef /sys/class/block ]]; then + check_block_and_slaves $1 $(<"/sys/dev/block/$2/../dev") && return 0 + fi + [[ -d /sys/dev/block/$2/slaves ]] || return 1 +- for _x in /sys/dev/block/$2/slaves/*/dev; do +- [[ -f $_x ]] || continue +- check_block_and_slaves $1 $(<"$_x") && return 0 ++ for _x in /sys/dev/block/$2/slaves/*; do ++ [[ -f $_x/dev ]] || continue ++ [[ $_x/subsystem -ef /sys/class/block ]] || continue ++ check_block_and_slaves $1 $(<"$_x/dev") && return 0 + done + return 1 + } +@@ -634,13 +635,14 @@ check_block_and_slaves_all() { + _ret=0 + fi + check_vol_slaves_all "$@" && return 0 +- if [[ -f /sys/dev/block/$2/../dev ]]; then ++ if [[ -f /sys/dev/block/$2/../dev ]] && [[ /sys/dev/block/$2/../subsystem -ef /sys/class/block ]]; then + check_block_and_slaves_all $1 $(<"/sys/dev/block/$2/../dev") && _ret=0 + fi + [[ -d /sys/dev/block/$2/slaves ]] || return 1 +- for _x in /sys/dev/block/$2/slaves/*/dev; do +- [[ -f $_x ]] || continue +- check_block_and_slaves_all $1 $(<"$_x") && _ret=0 ++ for _x in /sys/dev/block/$2/slaves/*; do ++ [[ -f $_x/dev ]] || continue ++ [[ $_x/subsystem -ef /sys/class/block ]] || continue ++ check_block_and_slaves_all $1 $(<"$_x/dev") && _ret=0 + done + return $_ret + } diff --git a/SOURCES/0538-dracut-functions.sh-check_vol_slaves-speedup-LV-VG-n.patch b/SOURCES/0538-dracut-functions.sh-check_vol_slaves-speedup-LV-VG-n.patch new file mode 100644 index 0000000..2aa35d1 --- /dev/null +++ b/SOURCES/0538-dracut-functions.sh-check_vol_slaves-speedup-LV-VG-n.patch @@ -0,0 +1,94 @@ +From 15384bcedb8002440e1327e97cd9c139af8a32dd Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Mon, 15 Jan 2018 15:44:46 +0100 +Subject: [PATCH] dracut-functions.sh:check_vol_slaves() speedup LV -> VG name + +Instead of trying all /dev/mapper/* devices to match the maj:min, and +get the VG name with "lvm lvs", use the dm/name from /sys and dmsetup +splitname. + +This should speedup execution with lots of LVs. + +Cherry-picked from: 9ed6eb741 +Resolves: #1531503 +--- + dracut-functions.sh | 62 +++++++++++++++++++++------------------------ + 1 file changed, 29 insertions(+), 33 deletions(-) + +diff --git a/dracut-functions.sh b/dracut-functions.sh +index ca54bd7f..53289ca0 100755 +--- a/dracut-functions.sh ++++ b/dracut-functions.sh +@@ -687,43 +687,39 @@ for_each_host_dev_and_slaves() + # but you cannot create the logical volume without the volume group. + # And the volume group might be bigger than the devices the LV needs. + check_vol_slaves() { +- local _lv _vg _pv +- for i in /dev/mapper/*; do +- [[ $i == /dev/mapper/control ]] && continue +- _lv=$(get_maj_min $i) +- if [[ $_lv = $2 ]]; then +- _vg=$(lvm lvs --noheadings -o vg_name $i 2>/dev/null) +- # strip space +- _vg="${_vg//[[:space:]]/}" +- if [[ $_vg ]]; then +- for _pv in $(lvm vgs --noheadings -o pv_name "$_vg" 2>/dev/null) +- do +- check_block_and_slaves $1 $(get_maj_min $_pv) && return 0 +- done +- fi +- fi +- done ++ local _lv _vg _pv _dm _majmin ++ _majmin="$2" ++ _lv="/dev/block/$_majmin" ++ _dm=/sys/dev/block/$_majmin/dm ++ [[ -f $_dm/uuid && $(<$_dm/uuid) =~ LVM-* ]] || return 1 ++ _vg=$(dmsetup splitname --noheadings -o vg_name $(<"$_dm/name") ) ++ # strip space ++ _vg="${_vg//[[:space:]]/}" ++ if [[ $_vg ]]; then ++ for _pv in $(lvm vgs --noheadings -o pv_name "$_vg" 2>/dev/null) ++ do ++ check_block_and_slaves $1 $(get_maj_min $_pv) && return 0 ++ done ++ fi + return 1 + } + + check_vol_slaves_all() { +- local _lv _vg _pv +- for i in /dev/mapper/*; do +- [[ $i == /dev/mapper/control ]] && continue +- _lv=$(get_maj_min $i) +- if [[ $_lv = $2 ]]; then +- _vg=$(lvm lvs --noheadings -o vg_name $i 2>/dev/null) +- # strip space +- _vg="${_vg//[[:space:]]/}" +- if [[ $_vg ]]; then +- for _pv in $(lvm vgs --noheadings -o pv_name "$_vg" 2>/dev/null) +- do +- check_block_and_slaves_all $1 $(get_maj_min $_pv) +- done +- return 0 +- fi +- fi +- done ++ local _lv _vg _pv _majmin ++ _majmin="$2" ++ _lv="/dev/block/$_majmin" ++ _dm="/sys/dev/block/$_majmin/dm" ++ [[ -f $_dm/uuid && $(<$_dm/uuid) =~ LVM-* ]] || return 1 ++ _vg=$(dmsetup splitname --noheadings -o vg_name $(<"$_dm/name") ) ++ # strip space ++ _vg="${_vg//[[:space:]]/}" ++ if [[ $_vg ]]; then ++ for _pv in $(lvm vgs --noheadings -o pv_name "$_vg" 2>/dev/null) ++ do ++ check_block_and_slaves_all $1 $(get_maj_min $_pv) ++ done ++ return 0 ++ fi + return 1 + } + diff --git a/SOURCES/0539-40network-introduce-ip-either6-option.patch b/SOURCES/0539-40network-introduce-ip-either6-option.patch new file mode 100644 index 0000000..5bd8002 --- /dev/null +++ b/SOURCES/0539-40network-introduce-ip-either6-option.patch @@ -0,0 +1,115 @@ +From 26273649dcfbc095c8e9dbc0f65bb02fd90ee510 Mon Sep 17 00:00:00 2001 +From: Pingfan Liu <piliu@redhat.com> +Date: Tue, 24 Apr 2018 16:41:21 +0800 +Subject: [PATCH] 40network: introduce ip=either6 option + +In kdump, if dump-target is ssh on ipv6, we need to sync until ipv6 addr +is ready. Currently ip=auto6/dhcp6 provides such function. But in 1st kernel, +it is hard to know whether the ipv6 addr is got by dhcpv6 or SLAAC. +E.g ifcfg-eth* contains DHCPV6C=yes direction, but there is no dhcpv6 +server in the network, and then after the system is up, the user +echo 1 > /proc/sys/net/ipv6/conf/eth0/autoconf && accept_ra by manual +to obtain a ipv6 addr. Or vice. +So this patch suggests to make dhcpv6 as auto6 fallback + +Signed-off-by: Pingfan Liu <piliu@redhat.com> + +Cherry-picked from: 67354ee +Resolves: #1582398 +--- + dracut.cmdline.7.asc | 4 +++- + modules.d/40network/ifup.sh | 6 +++++- + modules.d/40network/net-lib.sh | 4 ++-- + modules.d/40network/parse-ip-opts.sh | 1 + + 4 files changed, 11 insertions(+), 4 deletions(-) + +diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc +index 45902fa9..1204aeb2 100644 +--- a/dracut.cmdline.7.asc ++++ b/dracut.cmdline.7.asc +@@ -449,7 +449,7 @@ USB Android phone:: + * enp0s29u1u2 + ===================== + +-**ip=**__{dhcp|on|any|dhcp6|auto6}__:: ++**ip=**__{dhcp|on|any|dhcp6|auto6|either6}__:: + dhcp|on|any::: get ip from dhcp server from all interfaces. If root=dhcp, + loop sequentially through all interfaces (eth0, eth1, ...) and use the first + with a valid DHCP root-path. +@@ -458,6 +458,8 @@ USB Android phone:: + + dhcp6::: IPv6 DHCP + ++ either6::: if auto6 fails, then dhcp6 ++ + **ip=**__<interface>__:__{dhcp|on|any|dhcp6|auto6}__[:[__<mtu>__][:__<macaddr>__]]:: + This parameter can be specified multiple times. + + +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index 9ed48155..b3631648 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -76,6 +76,7 @@ load_ipv6() { + } + + do_ipv6auto() { ++ local ret + load_ipv6 + echo 0 > /proc/sys/net/ipv6/conf/$netif/forwarding + echo 1 > /proc/sys/net/ipv6/conf/$netif/accept_ra +@@ -84,10 +85,11 @@ do_ipv6auto() { + [ -n "$macaddr" ] && ip link set address $macaddr dev $netif + [ -n "$mtu" ] && ip link set mtu $mtu dev $netif + wait_for_ipv6_auto $netif ++ ret=$? + + [ -n "$hostname" ] && echo "echo $hostname > /proc/sys/kernel/hostname" > /tmp/net.$netif.hostname + +- return 0 ++ return $ret + } + + # Handle static ip configuration +@@ -393,6 +395,8 @@ for p in $(getargs ip=); do + do_dhcp -6 ;; + auto6) + do_ipv6auto ;; ++ either6) ++ do_ipv6auto || do_dhcp -6 ;; + *) + do_static ;; + esac +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index 23f2f9ff..9e87aeab 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -445,7 +445,7 @@ ip_to_var() { + fi + + if [ $# -eq 1 ]; then +- # format: ip={dhcp|on|any|dhcp6|auto6} ++ # format: ip={dhcp|on|any|dhcp6|auto6|either6} + # or + # ip=<ipv4-address> means anaconda-style static config argument cluster + autoconf="$1" +@@ -472,7 +472,7 @@ ip_to_var() { + return 0 + fi + +- if [ "$2" = "dhcp" -o "$2" = "on" -o "$2" = "any" -o "$2" = "dhcp6" -o "$2" = "auto6" ]; then ++ if [ "$2" = "dhcp" -o "$2" = "on" -o "$2" = "any" -o "$2" = "dhcp6" -o "$2" = "auto6" -o "$2" = "either6" ]; then + # format: ip=<interface>:{dhcp|on|any|dhcp6|auto6}[:[<mtu>][:<macaddr>]] + [ -n "$1" ] && dev="$1" + [ -n "$2" ] && autoconf="$2" +diff --git a/modules.d/40network/parse-ip-opts.sh b/modules.d/40network/parse-ip-opts.sh +index 68afe91b..3d1e95a6 100755 +--- a/modules.d/40network/parse-ip-opts.sh ++++ b/modules.d/40network/parse-ip-opts.sh +@@ -78,6 +78,7 @@ for p in $(getargs ip=); do + die "Sorry, automatic calculation of netmask is not yet supported" + ;; + auto6);; ++ either6);; + dhcp|dhcp6|on|any) \ + #[ -n "$NEEDBOOTDEV" ] && [ -z "$dev" ] && \ + # die "Sorry, 'ip=$p' does not make sense for multiple interface configurations" diff --git a/SOURCES/0540-Fix-loading-of-modules-in-modules-load.d.patch b/SOURCES/0540-Fix-loading-of-modules-in-modules-load.d.patch new file mode 100644 index 0000000..e13fef9 --- /dev/null +++ b/SOURCES/0540-Fix-loading-of-modules-in-modules-load.d.patch @@ -0,0 +1,38 @@ +From 249dcc61ea2cfb5963c7f9565dcee3405e064c7b Mon Sep 17 00:00:00 2001 +From: Fabian Vogt <fvogt@suse.com> +Date: Fri, 3 Feb 2017 16:02:34 +0100 +Subject: [PATCH] Fix loading of modules in modules-load.d + +With hostonly enabled, only modules that are currently +loaded are included in the initrd. Modules which are +explicitly listed in modules-load.d do not need to +be filtered that way. Fix for boo#962224. + +Cherry-picked from: 9fd3e045d +Resolves: #1547730 +--- + modules.d/98systemd/module-setup.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh +index 10beadda..c59cb945 100755 +--- a/modules.d/98systemd/module-setup.sh ++++ b/modules.d/98systemd/module-setup.sh +@@ -166,7 +166,7 @@ install() { + } + + _mods=$(modules_load_get /usr/lib/modules-load.d) +- [[ $_mods ]] && instmods $_mods ++ [[ $_mods ]] && hostonly='' instmods $_mods + + if [[ $hostonly ]]; then + inst_multiple -o \ +@@ -181,7 +181,7 @@ install() { + /etc/sysctl.conf + + _mods=$(modules_load_get /etc/modules-load.d) +- [[ $_mods ]] && instmods $_mods ++ [[ $_mods ]] && hostonly='' instmods $_mods + fi + + if ! [[ -e "$initdir/etc/machine-id" ]]; then diff --git a/SOURCES/0541-Skip-iscsi-attachment-if-no-info.patch b/SOURCES/0541-Skip-iscsi-attachment-if-no-info.patch new file mode 100644 index 0000000..63600a9 --- /dev/null +++ b/SOURCES/0541-Skip-iscsi-attachment-if-no-info.patch @@ -0,0 +1,34 @@ +From 903d6fc2fc8a050caceb6f95363f6cc4572b9fc3 Mon Sep 17 00:00:00 2001 +From: Derek Higgins <derekh@redhat.com> +Date: Thu, 26 Oct 2017 15:29:42 +0100 +Subject: [PATCH] Skip iscsi attachment if no info + +If no iscsi session information can be retrieved from the firmware +then skip the iscsi attachment and allow the boot process to continue. +Ensure the timeout scripts don't hit their timeout waiting for +/tmp/iscsistarted-firmware to be created. +This will allow a common image to be used for servers with both a +local and iscsi root with rd.iscsi.firmware set. + +Cherry-picked from: 9408a2ac330970e98dc4d289ec3ffb163f0517d1 +Resolves: #1513397 +--- + modules.d/95iscsi/iscsiroot.sh | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh +index 4cf3d355..c93ff068 100755 +--- a/modules.d/95iscsi/iscsiroot.sh ++++ b/modules.d/95iscsi/iscsiroot.sh +@@ -46,8 +46,9 @@ fi + handle_firmware() + { + if ! iscsistart -f; then +- warn "iscistart: Could not get list of targets from firmware." +- return 1 ++ warn "iscistart: Could not get list of targets from firmware. Skipping." ++ echo 'skipped' > "/tmp/iscsistarted-firmware" ++ return 0 + fi + + for p in $(getargs rd.iscsi.param -d iscsi_param); do diff --git a/SOURCES/0542-dracut-Introduce-force-drivers-parameter-and-force_d.patch b/SOURCES/0542-dracut-Introduce-force-drivers-parameter-and-force_d.patch new file mode 100644 index 0000000..f495b67 --- /dev/null +++ b/SOURCES/0542-dracut-Introduce-force-drivers-parameter-and-force_d.patch @@ -0,0 +1,126 @@ +From 125bb747c3fd357b95e9833ae4255a370ba3211c Mon Sep 17 00:00:00 2001 +From: Thomas Renninger <trenn@suse.de> +Date: Mon, 8 Sep 2014 12:34:48 +0200 +Subject: [PATCH] dracut: Introduce --force-drivers parameter and + force_drivers=+ config option + +Which will not only add listed drivers, but also enforce that they are +tried to be loaded at early boot time. + +This is needed if drivers which are not autoloaded (e.g. loop and a lot +others) shall get loaded via initramfs. + +Cherry-picked from: cea907f6bf2fc97933b59e04f4520ca227251574 +Resolves: #1577626 +--- + dracut.8.asc | 13 +++++++++++++ + dracut.conf.5.asc | 4 ++++ + dracut.sh | 21 +++++++++++++++++++++ + 3 files changed, 38 insertions(+) + +diff --git a/dracut.8.asc b/dracut.8.asc +index e097e769..5af99fa3 100644 +--- a/dracut.8.asc ++++ b/dracut.8.asc +@@ -136,6 +136,19 @@ example: + ---- + =============================== + ++**--force-drivers** _<list of kernel modules>_:: ++ See add-drivers above. But in this case it is ensured that the drivers ++ are tried to be loaded early via modprobe. +++ ++[NOTE] ++=============================== ++If [LIST] has multiple arguments, then you have to put these in quotes. For ++example: ++---- ++# dracut --force-drivers "kmodule1 kmodule2" ... ++---- ++=============================== ++ + **--omit-drivers** _<list of kernel modules>_:: + specify a space-separated list of kernel modules not to add to the + initramfs. +diff --git a/dracut.conf.5.asc b/dracut.conf.5.asc +index f4ad49d2..90120115 100644 +--- a/dracut.conf.5.asc ++++ b/dracut.conf.5.asc +@@ -54,6 +54,10 @@ Space-separated lists have to have a leading and trailing space! + Specify a space-separated list of kernel modules to add to the initramfs. + The kernel modules have to be specified without the ".ko" suffix. + ++*force_drivers+=*" __<list of kernel modules>__ ":: ++ See add_drivers above. But in this case it is ensured that the drivers ++ are tried to be loaded early via modprobe. ++ + *omit_drivers+=*" __<kernel modules>__ ":: + Specify a space-separated list of kernel modules not to add to the + initramfs. The kernel modules have to be specified without the ".ko" suffix. +diff --git a/dracut.sh b/dracut.sh +index 9dadece0..a34ca2a6 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -81,6 +81,10 @@ Creates initial ramdisk images for preloading modules + exclusively include in the initramfs. + --add-drivers [LIST] Specify a space-separated list of kernel + modules to add to the initramfs. ++ --force-drivers [LIST] Specify a space-separated list of kernel ++ modules to add to the initramfs and make sure they ++ are tried to be loaded via modprobe same as passing ++ rd.driver.pre=DRIVER kernel parameter. + --omit-drivers [LIST] Specify a space-separated list of kernel + modules not to add to the initramfs. + --filesystems [LIST] Specify a space-separated list of kernel filesystem +@@ -308,6 +312,7 @@ rearrange_params() + --long add: \ + --long force-add: \ + --long add-drivers: \ ++ --long force-drivers: \ + --long omit-drivers: \ + --long modules: \ + --long omit: \ +@@ -476,6 +481,7 @@ while :; do + -a|--add) push add_dracutmodules_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;; + --force-add) push force_add_dracutmodules_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;; + --add-drivers) push add_drivers_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;; ++ --force-drivers) push force_drivers_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;; + --omit-drivers) push omit_drivers_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;; + -m|--modules) push dracutmodules_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;; + -o|--omit) push omit_dracutmodules_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;; +@@ -928,6 +934,13 @@ if (( ${#add_drivers_l[@]} )); then + fi + add_drivers=${add_drivers/-/_} + ++if (( ${#force_drivers_l[@]} )); then ++ while pop force_drivers_l val; do ++ force_drivers+=" $val " ++ done ++fi ++force_drivers=${force_drivers/-/_} ++ + if (( ${#omit_drivers_l[@]} )); then + while pop omit_drivers_l val; do + omit_drivers+=" $val " +@@ -944,6 +957,7 @@ fi + omit_drivers_corrected="" + for d in $omit_drivers; do + [[ " $drivers $add_drivers " == *\ $d\ * ]] && continue ++ [[ " $drivers $force_drivers " == *\ $d\ * ]] && continue + omit_drivers_corrected+="$d|" + done + omit_drivers="${omit_drivers_corrected%|}" +@@ -1389,6 +1403,13 @@ if [[ $no_kernel != yes ]]; then + if [[ $add_drivers ]]; then + hostonly='' instmods -c $add_drivers + fi ++ if [[ $force_drivers ]]; then ++ hostonly='' instmods -c $force_drivers ++ rm -f $initdir/etc/cmdline.d/20-force_driver.conf ++ for mod in $force_drivers; do ++ echo "rd.driver.pre=$mod" >>$initdir/etc/cmdline.d/20-force_drivers.conf ++ done ++ fi + if [[ $filesystems ]]; then + hostonly='' instmods -c $filesystems + fi diff --git a/SOURCES/0543-mdraid-mdraid_start.sh-tell-mainloop-if-we-make-prog.patch b/SOURCES/0543-mdraid-mdraid_start.sh-tell-mainloop-if-we-make-prog.patch new file mode 100644 index 0000000..2e27fd8 --- /dev/null +++ b/SOURCES/0543-mdraid-mdraid_start.sh-tell-mainloop-if-we-make-prog.patch @@ -0,0 +1,32 @@ +From f421aa0f16a6afa56b7b27796ee0708385dd933a Mon Sep 17 00:00:00 2001 +From: NeilBrown <neilb@suse.de> +Date: Thu, 26 Mar 2015 15:41:46 +1100 +Subject: [PATCH] mdraid/mdraid_start.sh: tell mainloop if we make progress. + +mdraid_start is a number of scripts which run after a timeout. +If it makes progress, it should tell the main loop so that it +knows that it is worth waiting a bit longer. + +So in that case, create the initqueue/work file which the main loop +checks for. + +Signed-off-by: NeilBrown <neilb@suse.de> + +Cherry-picked from: 3b82ac16 +Resolves: #1451660 +--- + modules.d/90mdraid/mdraid_start.sh | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/modules.d/90mdraid/mdraid_start.sh b/modules.d/90mdraid/mdraid_start.sh +index fe0e9f40..39998b03 100755 +--- a/modules.d/90mdraid/mdraid_start.sh ++++ b/modules.d/90mdraid/mdraid_start.sh +@@ -29,6 +29,7 @@ _md_force_run() { + + _path_d="${_path_s%/*}/degraded" + [ ! -r "$_path_d" ] && continue ++ > $hookdir/initqueue/work + done + } + diff --git a/SOURCES/0544-mdraid-wait-for-rd.md.uuid-specified-devices-to-be-a.patch b/SOURCES/0544-mdraid-wait-for-rd.md.uuid-specified-devices-to-be-a.patch new file mode 100644 index 0000000..b8442f6 --- /dev/null +++ b/SOURCES/0544-mdraid-wait-for-rd.md.uuid-specified-devices-to-be-a.patch @@ -0,0 +1,128 @@ +From c9e0ee2c91de55a51d2afc6b0032f39f1f7f2ea8 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 16 May 2017 11:31:26 +0200 +Subject: [PATCH] mdraid: wait for rd.md.uuid specified devices to be assembled + +This patch uses wait_for_dev "/dev/disk/by-id/md-uuid-${uuid}" for the +specified uuids. + +On timeout only md devices are force started which are specified by +uuid, or all, if rd.auto was specified. + +Fixes https://github.com/dracutdevs/dracut/issues/227 + +Cherry-picked from: 3cea0658 +Resolves: #1451660 +--- + modules.d/90mdraid/mdraid_start.sh | 74 ++++++++++++++++++++++-------- + modules.d/90mdraid/parse-md.sh | 3 ++ + 2 files changed, 57 insertions(+), 20 deletions(-) + +diff --git a/modules.d/90mdraid/mdraid_start.sh b/modules.d/90mdraid/mdraid_start.sh +index 39998b03..5ebf09f4 100755 +--- a/modules.d/90mdraid/mdraid_start.sh ++++ b/modules.d/90mdraid/mdraid_start.sh +@@ -2,35 +2,69 @@ + # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- + # ex: ts=8 sw=4 sts=4 et filetype=sh + +-type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh +-_md_force_run() { ++type getargs >/dev/null 2>&1 || . /lib/dracut-lib.sh ++ ++_md_start() { + local _udevinfo + local _path_s + local _path_d ++ local _md="$1" ++ local _offroot="$2" ++ ++ _udevinfo="$(udevadm info --query=env --name="${_md}")" ++ strstr "$_udevinfo" "MD_LEVEL=container" && continue ++ strstr "$_udevinfo" "DEVTYPE=partition" && continue ++ ++ _path_s="/sys/$(udevadm info -q path -n "${_md}")/md/array_state" ++ [ ! -r "$_path_s" ] && continue ++ ++ # inactive ? ++ [ "$(cat "$_path_s")" != "inactive" ] && continue ++ ++ mdadm $_offroot -R "${_md}" 2>&1 | vinfo ++ ++ # still inactive ? ++ [ "$(cat "$_path_s")" = "inactive" ] && continue ++ ++ _path_d="${_path_s%/*}/degraded" ++ [ ! -r "$_path_d" ] && continue ++ > $hookdir/initqueue/work ++} ++ ++_md_force_run() { + local _offroot +- _offroot=$(strstr "$(mdadm --help-options 2>&1)" offroot && echo --offroot) +- # try to force-run anything not running yet +- for md in /dev/md[0-9_]*; do +- [ -b "$md" ] || continue +- _udevinfo="$(udevadm info --query=env --name="$md")" +- strstr "$_udevinfo" "MD_LEVEL=container" && continue +- strstr "$_udevinfo" "DEVTYPE=partition" && continue ++ local _md ++ local _UUID ++ local _MD_UUID=$(getargs rd.md.uuid -d rd_MD_UUID=) ++ [ -n "$_MD_UUID" ] || getargbool 0 rd.auto || return + +- _path_s="/sys/$(udevadm info -q path -n "$md")/md/array_state" +- [ ! -r "$_path_s" ] && continue ++ _offroot=$(strstr "$(mdadm --help-options 2>&1)" offroot && echo --offroot) + +- # inactive ? +- [ "$(cat "$_path_s")" != "inactive" ] && continue ++ if [ -n "$_MD_UUID" ]; then ++ for _md in /dev/md[0-9_]*; do ++ [ -b "$_md" ] || continue ++ _UUID=$( ++ /sbin/mdadm -D --export "$_md" \ ++ | while read line || [ -n "$line" ]; do ++ str_starts "$line" "MD_UUID=" || continue ++ printf "%s" "${line#MD_UUID=}" ++ done ++ ) + +- mdadm $_offroot -R "$md" 2>&1 | vinfo ++ [ -z "$_UUID" ] && continue + +- # still inactive ? +- [ "$(cat "$_path_s")" = "inactive" ] && continue ++ # check if we should handle this device ++ strstr " $_MD_UUID " " $_UUID " || continue + +- _path_d="${_path_s%/*}/degraded" +- [ ! -r "$_path_d" ] && continue +- > $hookdir/initqueue/work +- done ++ _md_start "${_md}" "${_offroot}" ++ done ++ else ++ # try to force-run anything not running yet ++ for _md in /dev/md[0-9_]*; do ++ [ -b "$_md" ] || continue ++ _md_start "${_md}" "${_offroot}" ++ done ++ fi + } + + _md_force_run +diff --git a/modules.d/90mdraid/parse-md.sh b/modules.d/90mdraid/parse-md.sh +index dd7bda25..ae76bac1 100755 +--- a/modules.d/90mdraid/parse-md.sh ++++ b/modules.d/90mdraid/parse-md.sh +@@ -26,6 +26,9 @@ else + done < "${f}" > "${f}.new" + mv "${f}.new" "$f" + done ++ for uuid in $MD_UUID; do ++ wait_for_dev "/dev/disk/by-id/md-uuid-${uuid}" ++ done + fi + fi + diff --git a/SOURCES/0545-fcoe-handle-CNAs-with-DCB-firmware-support.patch b/SOURCES/0545-fcoe-handle-CNAs-with-DCB-firmware-support.patch new file mode 100644 index 0000000..a87dd23 --- /dev/null +++ b/SOURCES/0545-fcoe-handle-CNAs-with-DCB-firmware-support.patch @@ -0,0 +1,72 @@ +From f055e5126f7d28553c3886a865e5f13fdc4c18d2 Mon Sep 17 00:00:00 2001 +From: Xunlei Pang <xlpang@redhat.com> +Date: Mon, 25 Sep 2017 11:18:06 +0800 +Subject: [PATCH] fcoe: handle CNAs with DCB firmware support + +Some Combined Network Adapters(CNAs) implement DCB protocol +in firmware, it is recommended that do not run software-based +DCB or LLDP on CNAs that implement DCB, but we have to start +the lldpad service anyway(there might be other software DCB). + +If the network interface provides hardware DCB/DCBX capabilities, +the field DCB_REQUIRED in "/etc/fcoe/cfg-xxx" is expected to +be set to "no". + +We met an issue on "QLogic BCM57810" with DCB firmware support, +and found dracut still generated "fcoe=<mac>:dcb" which caused +kdump boot failure when using that fcoe dump target. + +This patch parses /etc/fcoe/cfg-xxx to detect DCB_REQUIRED="no", +and force "nodcb" if it is the case. + +Also improved some coding style in passing. + +Signed-off-by: Xunlei Pang <xlpang@redhat.com> + +Cherry-picked from: 795256bbb +Resolves: #1442663 +--- + modules.d/95fcoe/module-setup.sh | 26 ++++++++++++++++++++------ + 1 file changed, 20 insertions(+), 6 deletions(-) + +diff --git a/modules.d/95fcoe/module-setup.sh b/modules.d/95fcoe/module-setup.sh +index 4bab0c7d..ac27c76a 100755 +--- a/modules.d/95fcoe/module-setup.sh ++++ b/modules.d/95fcoe/module-setup.sh +@@ -51,16 +51,30 @@ cmdline() { + read mac < ${i}/address + s=$(dcbtool gc ${i##*/} dcb | sed -n 's/^DCB State:\t*\(.*\)/\1/p') + if [ -z "$s" ] ; then +- p=$(get_vlan_parent ${i}) +- if [ "$p" ] ; then +- s=$(dcbtool gc ${p} dcb | sed -n 's/^DCB State:\t*\(.*\)/\1/p') +- fi ++ p=$(get_vlan_parent ${i}) ++ if [ "$p" ] ; then ++ s=$(dcbtool gc ${p} dcb | sed -n 's/^DCB State:\t*\(.*\)/\1/p') ++ fi + fi + if [ "$s" = "on" ] ; then +- dcb="dcb" ++ dcb="dcb" + else +- dcb="nodcb" ++ dcb="nodcb" + fi ++ ++ # Some Combined Network Adapters(CNAs) implement DCB in firmware. ++ # Do not run software-based DCB or LLDP on CNAs that implement DCB. ++ # If the network interface provides hardware DCB/DCBX capabilities, ++ # DCB_REQUIRED in "/etc/fcoe/cfg-xxx" is expected to set to "no". ++ # ++ # Force "nodcb" if there's any DCB_REQUIRED="no"(child or vlan parent). ++ grep -q "^[[:blank:]]*DCB_REQUIRED=\"no\"" /etc/fcoe/cfg-${i##*/} &>/dev/null ++ [ $? -eq 0 ] && dcb="nodcb" ++ if [ "$p" ] ; then ++ grep -q "^[[:blank:]]*DCB_REQUIRED=\"no\"" /etc/fcoe/cfg-${p} &>/dev/null ++ [ $? -eq 0 ] && dcb="nodcb" ++ fi ++ + echo "fcoe=${mac}:${dcb}" + done + } diff --git a/SOURCES/0546-40network-dhclient.conf-rename-classless-routes-to-c.patch b/SOURCES/0546-40network-dhclient.conf-rename-classless-routes-to-c.patch new file mode 100644 index 0000000..364f1eb --- /dev/null +++ b/SOURCES/0546-40network-dhclient.conf-rename-classless-routes-to-c.patch @@ -0,0 +1,32 @@ +From 013030d9471fca3f99d358e8bc3cb7a418f9735b Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn <lnykryn@redhat.com> +Date: Thu, 13 Jul 2017 16:46:19 +0200 +Subject: [PATCH] 40network/dhclient.conf: rename classless-routes to + classless-static-routes + +We tell dhclient to name 121 option "classless-routes", +but in dhclient-script we parse classless_static_routes. +So either have to change the configuration or the script. + +And since dhclient uses by default classless_static_routes, +let's change the configuration + +Cherry-picked from: 62b7920ed +Resolves: #1453907 +--- + modules.d/40network/dhclient.conf | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/modules.d/40network/dhclient.conf b/modules.d/40network/dhclient.conf +index a1739ce3..49266db0 100644 +--- a/modules.d/40network/dhclient.conf ++++ b/modules.d/40network/dhclient.conf +@@ -1,6 +1,6 @@ + +-option classless-routes code 121 = array of unsigned integer 8; ++option classless-static-routes code 121 = array of unsigned integer 8; + + request subnet-mask, broadcast-address, time-offset, routers, + domain-name, domain-name-servers, domain-search, host-name, +- root-path, interface-mtu, classless-routes; ++ root-path, interface-mtu, classless-static-routes; diff --git a/SOURCES/0547-Record-loaded-kernel-modules-when-hostonly-mode-is-e.patch b/SOURCES/0547-Record-loaded-kernel-modules-when-hostonly-mode-is-e.patch new file mode 100644 index 0000000..78d3cba --- /dev/null +++ b/SOURCES/0547-Record-loaded-kernel-modules-when-hostonly-mode-is-e.patch @@ -0,0 +1,66 @@ +From 8df75b15736b2feaea05fd45d3b4819775226ee5 Mon Sep 17 00:00:00 2001 +From: Kairui Song <kasong@redhat.com> +Date: Tue, 17 Jul 2018 17:16:07 +0800 +Subject: [PATCH] Record loaded kernel modules when hostonly mode is enabled + +A hostonly image will not include every possibly required kernel module, +so if any hardware or configuration changed, the image may fail to boot. + +One way to know if there are any hardware change or configuration change +that will require an image rebuild or not is to check the loaded kernel +module list. If the loaded kernel module list differs from last build +time, then the image may require to be rebuilt. + +This commit will let dracut record the loaded kernel module list when +the image is being built, so other tools or services can compare this +list with currently loaded kernel modules to decide if dracut should be +called to rebuild the image. + +To retrieve the loaded kernel modules list when an image is built, use +lsinitrd command: + +lsinitrd $image -f */lib/dracut/loaded-kernel-modules.txt + +Cherry-picked from: 7047294617bbdd3ffb2466c73db56fda4e6156db +Resolves: #1607744 +--- + dracut-functions.sh | 11 +++++++++++ + dracut.sh | 3 +++ + 2 files changed, 14 insertions(+) + +diff --git a/dracut-functions.sh b/dracut-functions.sh +index 53289ca0..b7568bd9 100755 +--- a/dracut-functions.sh ++++ b/dracut-functions.sh +@@ -1748,6 +1748,17 @@ get_ucode_file () + fi + } + ++# Get currently loaded modules ++# sorted, and delimited by newline ++get_loaded_kernel_modules () ++{ ++ local modules=( ) ++ while read _module _size _used _used_by; do ++ modules+=( "$_module" ) ++ done <<< $(lsmod | sed -n '1!p') ++ printf '%s\n' "${modules[@]}" | sort ++} ++ + # Not every device in /dev/mapper should be examined. + # If it is an LVM device, touch only devices which have /dev/VG/LV symlink. + lvm_internal_dev() { +diff --git a/dracut.sh b/dracut.sh +index a34ca2a6..245b4c49 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1395,6 +1395,9 @@ dinfo "*** Including modules done ***" + + ## final stuff that has to happen + if [[ $no_kernel != yes ]]; then ++ if [[ $hostonly ]]; then ++ echo "$(get_loaded_kernel_modules)" > $initdir/lib/dracut/loaded-kernel-modules.txt ++ fi + + if [[ $drivers ]]; then + hostonly='' instmods $drivers diff --git a/SOURCES/0548-Correct-paths-for-openSUSE.patch b/SOURCES/0548-Correct-paths-for-openSUSE.patch new file mode 100644 index 0000000..7887303 --- /dev/null +++ b/SOURCES/0548-Correct-paths-for-openSUSE.patch @@ -0,0 +1,31 @@ +From 5f381a151fa210d31d8b6f71f83f1405f876c0aa Mon Sep 17 00:00:00 2001 +From: Christian Rodrigues <crrodriguez@opensuse.org> +Date: Mon, 23 Mar 2015 17:12:15 +0100 +Subject: [PATCH] Correct paths for openSUSE + +openSUSE has things stored in different places, so fixup the +paths here. + +Signed-off-by: Christian Rodrigues <crrodriguez@opensuse.org> +Signed-off-by: Hannes Reinecke <hare@suse.de> +Signed-off-by: Thomas Renninger <trenn@suse.de> + +Cherry-picked from: b52cfbea +Resolves: #1608491 +--- + dracut.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dracut.sh b/dracut.sh +index 245b4c49..4f324439 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -809,7 +809,7 @@ stdloglvl=$((stdloglvl + verbosity_mod_l)) + [[ $mdadmconf_l ]] && mdadmconf=$mdadmconf_l + [[ $lvmconf_l ]] && lvmconf=$lvmconf_l + [[ $dracutbasedir ]] || dracutbasedir=/usr/lib/dracut +-[[ $fw_dir ]] || fw_dir="/lib/firmware/updates /lib/firmware" ++[[ $fw_dir ]] || fw_dir="/lib/firmware/updates /lib/firmware /lib/firmware/$kernel" + [[ $tmpdir_l ]] && tmpdir="$tmpdir_l" + [[ $tmpdir ]] || tmpdir=/var/tmp + [[ $INITRD_COMPRESS ]] && compress=$INITRD_COMPRESS diff --git a/SOURCES/0549-Introduce-tri-state-hostonly-mode.patch b/SOURCES/0549-Introduce-tri-state-hostonly-mode.patch new file mode 100644 index 0000000..fa07e49 --- /dev/null +++ b/SOURCES/0549-Introduce-tri-state-hostonly-mode.patch @@ -0,0 +1,125 @@ +From ecd196732f36064aad675e18bf77b2b678673d63 Mon Sep 17 00:00:00 2001 +From: Kairui Song <kasong@redhat.com> +Date: Wed, 4 Jul 2018 17:21:37 +0800 +Subject: [PATCH] Introduce tri-state hostonly mode + +Add a new option --hostonly-mode which accept an <mode> parameter, so we have a tri-state hostonly mode: + + * generic: by passing "--no-hostonly" or not passing anything. + "--hostonly-mode" has no effect in such case. + * sloppy: by passing "--hostonly --hostonly-mode sloppy". This + is also the default mode when only "--hostonly" is given. + * strict: by passing "--hostonly --hostonly-mode strict". + +Sloppy mode is the original hostonly mode, the new introduced strict +mode will allow modules to ignore more drivers or do some extra job to +save memory and disk space, while making the image less portable. + +Also introduced a helper function "optional_hostonly" to make it +easier for modules to leverage new hostonly mode. + +To force install modules only in sloppy hostonly mode, use the form: + +hostonly="$(optional_hostonly)" instmods <modules> + +Signed-off-by: Kairui Song <kasong@redhat.com> + +Cherry-picked from: a695250ec7db21359689e50733c6581a8d211215 +Resolves: #1599592 +--- + dracut-functions.sh | 11 +++++++++++ + dracut.sh | 34 ++++++++++++++++++++++++++++++++++ + 2 files changed, 45 insertions(+) + +diff --git a/dracut-functions.sh b/dracut-functions.sh +index b7568bd9..4387168a 100755 +--- a/dracut-functions.sh ++++ b/dracut-functions.sh +@@ -1770,3 +1770,14 @@ lvm_internal_dev() { + [[ ${DM_LV_LAYER} ]] || [[ ! -L /dev/${DM_VG_NAME}/${DM_LV_NAME} ]] + } + ++# Use with form hostonly="$(optional_hostonly)" inst_xxxx <args> ++# If hosotnly mode is set to "strict", hostonly restrictions will still ++# be applied, else will ignore hostonly mode and try to install all ++# given modules. ++optional_hostonly() { ++ if [[ $hostonly_mode = "strict" ]]; then ++ printf -- "$hostonly" ++ else ++ printf "" ++ fi ++} +diff --git a/dracut.sh b/dracut.sh +index 4f324439..52835872 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -141,6 +141,21 @@ Creates initial ramdisk images for preloading modules + -H, --hostonly Host-Only mode: Install only what is needed for + booting the local host instead of a generic host. + -N, --no-hostonly Disables Host-Only mode ++ --hostonly-mode <mode> ++ Specify the hostonly mode to use. <mode> could be ++ one of "sloppy" or "strict". "sloppy" mode is used ++ by default. ++ In "sloppy" hostonly mode, extra drivers and modules ++ will be installed, so minor hardware change won't make ++ the image unbootable (eg. changed keyboard), and the ++ image is still portable among similar hosts. ++ With "strict" mode enabled, anything not necessary ++ for booting the local host in its current state will ++ not be included, and modules may do some extra job ++ to save more space. Minor change of hardware or ++ environment could make the image unbootable. ++ DO NOT use "strict" mode unless you know what you ++ are doing. + --hostonly-cmdline Store kernel command line arguments needed + in the initramfs + --no-hostonly-cmdline Do not store kernel command line arguments needed +@@ -364,6 +379,7 @@ rearrange_params() + --long host-only \ + --long no-hostonly \ + --long no-host-only \ ++ --long hostonly-mode: \ + --long hostonly-cmdline \ + --long no-hostonly-cmdline \ + --long no-hostonly-default-device \ +@@ -548,6 +564,8 @@ while :; do + hostonly_l="yes" ;; + -N|--no-hostonly|--no-host-only) + hostonly_l="no" ;; ++ --hostonly-mode) ++ hostonly_mode_l="$2"; PARMS_TO_STORE+=" '$2'"; shift;; + --hostonly-cmdline) + hostonly_cmdline_l="yes" ;; + --hostonly-i18n) +@@ -803,6 +821,7 @@ stdloglvl=$((stdloglvl + verbosity_mod_l)) + [[ $prefix = "/" ]] && unset prefix + [[ $hostonly_l ]] && hostonly=$hostonly_l + [[ $hostonly_cmdline_l ]] && hostonly_cmdline=$hostonly_cmdline_l ++[[ $hostonly_mode_l ]] && hostonly_mode=$hostonly_mode_l + [[ $i18n_install_all_l ]] && i18n_install_all=$i18n_install_all_l + [[ $persistent_policy_l ]] && persistent_policy=$persistent_policy_l + [[ $use_fstab_l ]] && use_fstab=$use_fstab_l +@@ -840,6 +859,21 @@ fi + [[ $hostonly = yes ]] && hostonly="-h" + [[ $hostonly != "-h" ]] && unset hostonly + ++case $hostonly_mode in ++ '') ++ [[ $hostonly ]] && hostonly_mode="sloppy" ;; ++ sloppy|strict) ++ if [[ ! $hostonly ]]; then ++ unset hostonly_mode ++ fi ++ ;; ++ *) ++ printf "%s\n" "dracut: Invalid hostonly mode '$hostonly_mode'." >&2 ++ exit 1 ++esac ++ ++ ++ + readonly TMPDIR="$tmpdir" + readonly DRACUT_TMPDIR="$(mktemp -p "$TMPDIR/" -d -t dracut.XXXXXX)" + [ -d "$DRACUT_TMPDIR" ] || { diff --git a/SOURCES/0550-Revert-add-90multipath-hostonly-module.patch b/SOURCES/0550-Revert-add-90multipath-hostonly-module.patch new file mode 100644 index 0000000..eff70c3 --- /dev/null +++ b/SOURCES/0550-Revert-add-90multipath-hostonly-module.patch @@ -0,0 +1,125 @@ +From af97814e42c3942005f7201f9afdeee363111796 Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn <lnykryn@redhat.com> +Date: Thu, 26 Jul 2018 14:43:37 +0200 +Subject: [PATCH] Revert "add 90multipath-hostonly module" + +This reverts commit 6ef3173e86c2be99b504f7c7a789dea5c0072f64. + +Cherry-picked from: 35e86ac117acbfd699f371f163cdda9db0ebc047 +Resolves: #1599592 +--- + .../90multipath-hostonly/module-setup.sh | 53 ------------------- + modules.d/90multipath/module-setup.sh | 26 +++++++++ + 2 files changed, 26 insertions(+), 53 deletions(-) + delete mode 100755 modules.d/90multipath-hostonly/module-setup.sh + +diff --git a/modules.d/90multipath-hostonly/module-setup.sh b/modules.d/90multipath-hostonly/module-setup.sh +deleted file mode 100755 +index 88839033..00000000 +--- a/modules.d/90multipath-hostonly/module-setup.sh ++++ /dev/null +@@ -1,53 +0,0 @@ +-#!/bin/bash +- +-# called by dracut +-check() { +- return 255 +-} +- +-# called by dracut +-depends() { +- echo multipath +- return 0 +-} +- +-# called by dracut +-install() { +- local _f _allow +- +- is_mpath() { +- local _dev=$1 +- [ -e /sys/dev/block/$_dev/dm/uuid ] || return 1 +- [[ $(cat /sys/dev/block/$_dev/dm/uuid) =~ mpath- ]] && return 0 +- return 1 +- } +- +- majmin_to_mpath_dev() { +- local _dev +- for i in /dev/mapper/*; do +- [[ $i == /dev/mapper/control ]] && continue +- _dev=$(get_maj_min $i) +- if [ "$_dev" = "$1" ]; then +- echo $i +- return +- fi +- done +- } +- +- add_hostonly_mpath_conf() { +- is_mpath $1 && { +- local _dev +- +- _dev=$(majmin_to_mpath_dev $1) +- [ -z "$_dev" ] && return +- strstr "$_allow" "$_dev" && return +- _allow="$_allow --allow $_dev" +- } +- } +- +- [[ $hostonly ]] && { +- for_each_host_dev_and_slaves_all add_hostonly_mpath_conf +- [ -n "$_allow" ] && mpathconf $_allow --outfile ${initdir}/etc/multipath.conf +- } +-} +- +diff --git a/modules.d/90multipath/module-setup.sh b/modules.d/90multipath/module-setup.sh +index 232ddcd8..a9238884 100755 +--- a/modules.d/90multipath/module-setup.sh ++++ b/modules.d/90multipath/module-setup.sh +@@ -9,6 +9,17 @@ is_mpath() { + return 1 + } + ++majmin_to_mpath_dev() { ++ local _dev ++ for i in /dev/mapper/*; do ++ [[ $i == /dev/mapper/control ]] && continue ++ _dev=$(get_maj_min $i) ++ if [ "$_dev" = "$1" ]; then ++ echo $i ++ return ++ fi ++ done ++} + + check() { + local _rootdev +@@ -70,6 +81,16 @@ installkernel() { + + install() { + local _f _allow ++ add_hostonly_mpath_conf() { ++ is_mpath $1 && { ++ local _dev ++ ++ _dev=$(majmin_to_mpath_dev $1) ++ [ -z "$_dev" ] && return ++ strstr "$_allow" "$_dev" && return ++ _allow="$_allow --allow $_dev" ++ } ++ } + + inst_multiple -o \ + dmsetup \ +@@ -84,6 +105,11 @@ install() { + /etc/multipath.conf \ + /etc/multipath/* + ++ [[ $hostonly ]] && [[ $hostonly_mode = "strict" ]] && { ++ for_each_host_dev_and_slaves_all add_hostonly_mpath_conf ++ [ -n "$_allow" ] && mpathconf $_allow --outfile ${initdir}/etc/multipath.conf ++ } ++ + inst $(command -v partx) /sbin/partx + + inst_libdir_file "libmultipath*" "multipath/*" diff --git a/SOURCES/0551-dracut.spec-remove-90multipath-hostonly.patch b/SOURCES/0551-dracut.spec-remove-90multipath-hostonly.patch new file mode 100644 index 0000000..73096aa --- /dev/null +++ b/SOURCES/0551-dracut.spec-remove-90multipath-hostonly.patch @@ -0,0 +1,23 @@ +From da6411f59cba83491e0a9d274c3e79230ef48265 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Thu, 5 Jul 2018 13:17:53 +0200 +Subject: [PATCH] dracut.spec: remove 90multipath-hostonly + +Cherry-picked from: ca77afdeb37f96d23ad0673396333af8e859d817 +Resolves: #1599592 +--- + dracut.spec | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/dracut.spec b/dracut.spec +index ee12013b..2ddd90bb 100644 +--- a/dracut.spec ++++ b/dracut.spec +@@ -351,7 +351,6 @@ rm -rf -- $RPM_BUILD_ROOT + %{dracutlibdir}/modules.d/90lvm + %{dracutlibdir}/modules.d/90mdraid + %{dracutlibdir}/modules.d/90multipath +-%{dracutlibdir}/modules.d/90multipath-hostonly + %{dracutlibdir}/modules.d/90qemu + %{dracutlibdir}/modules.d/91crypt-gpg + %{dracutlibdir}/modules.d/91crypt-loop diff --git a/SOURCES/0552-dracut-functions-fix-the-word-splitting.patch b/SOURCES/0552-dracut-functions-fix-the-word-splitting.patch new file mode 100644 index 0000000..9a8222d --- /dev/null +++ b/SOURCES/0552-dracut-functions-fix-the-word-splitting.patch @@ -0,0 +1,24 @@ +From e4034dcae31a788bf7eeed943862289e0bcc1a04 Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn <lnykryn@redhat.com> +Date: Thu, 9 Aug 2018 12:14:20 +0200 +Subject: [PATCH] dracut-functions: fix the word splitting + +Cherry-picked from: dc4f0a40f8fbea23ccd1e0fcde48d5c6f7996021 +Resolves: #1607744 +--- + dracut-functions.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dracut-functions.sh b/dracut-functions.sh +index 4387168a..e5985e33 100755 +--- a/dracut-functions.sh ++++ b/dracut-functions.sh +@@ -1755,7 +1755,7 @@ get_loaded_kernel_modules () + local modules=( ) + while read _module _size _used _used_by; do + modules+=( "$_module" ) +- done <<< $(lsmod | sed -n '1!p') ++ done <<< "$(lsmod | sed -n '1!p')" + printf '%s\n' "${modules[@]}" | sort + } + diff --git a/SOURCES/0553-kernel-modules-add-nfit.patch b/SOURCES/0553-kernel-modules-add-nfit.patch new file mode 100644 index 0000000..2d741f1 --- /dev/null +++ b/SOURCES/0553-kernel-modules-add-nfit.patch @@ -0,0 +1,26 @@ +From e5c337c3b3ac2539007834b5f623914159d6c38b Mon Sep 17 00:00:00 2001 +From: Kairui Song <kasong@redhat.com> +Date: Mon, 20 Aug 2018 18:40:05 +0800 +Subject: [PATCH] kernel-modules: add nfit + +To support pmem devices, nfit module is required + +Cherry-picked from: 09ba1b289f2cba613c1950b03f0f549ebb7eb83f +Resolves: #1288619 +--- + modules.d/90kernel-modules/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh +index dea32602..3e215f97 100755 +--- a/modules.d/90kernel-modules/module-setup.sh ++++ b/modules.d/90kernel-modules/module-setup.sh +@@ -45,7 +45,7 @@ installkernel() { + instmods yenta_socket scsi_dh_rdac scsi_dh_emc scsi_dh_alua \ + atkbd i8042 usbhid firewire-ohci pcmcia hv-vmbus \ + atkbd i8042 usbhid firewire-ohci pcmcia usb_storage \ +- nvme hv-vmbus sdhci_acpi ++ nvme hv-vmbus sdhci_acpi nfit + + instmods \ + "=drivers/hid" \ diff --git a/SOURCES/0554-added-make-rpm-srpm-options.patch b/SOURCES/0554-added-make-rpm-srpm-options.patch new file mode 100644 index 0000000..3e654fe --- /dev/null +++ b/SOURCES/0554-added-make-rpm-srpm-options.patch @@ -0,0 +1,47 @@ +From d76ccd07bc7d2d30ab2df38e9ae444766662c639 Mon Sep 17 00:00:00 2001 +From: Ondrej Dubaj <odubaj@redhat.com> +Date: Tue, 5 Feb 2019 15:18:08 +0100 +Subject: [PATCH] added make rpm/srpm options + +--- + Makefile | 14 ++++++++++++-- + 1 file changed, 12 insertions(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index 2977d187..43390405 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,6 +1,6 @@ + -include dracut-version.sh + +-VERSION = $(shell [ -d .git ] && git describe --abbrev=0 --tags 2>/dev/null || echo $(DRACUT_VERSION)) ++VERSION = $(shell [ -d .git ] && git describe --abbrev=0 2>/dev/null || echo $(DRACUT_VERSION)) + GITVERSION = $(shell [ -d .git ] && { v=$$(git describe --tags 2>/dev/null); [ $${v\#*-} != $$v ] && echo -$${v\#*-}; } ) + + -include Makefile.inc +@@ -39,7 +39,7 @@ man8pages = dracut.8 \ + + manpages = $(man1pages) $(man5pages) $(man7pages) $(man8pages) + +-.PHONY: install clean archive rpm testimage test all check AUTHORS doc dracut-version.sh ++.PHONY: install clean archive rpm srpm testimage test all check AUTHORS doc dracut-version.sh + + all: dracut-version.sh dracut.pc dracut-install skipcpio/skipcpio + +@@ -202,6 +202,16 @@ rpm: dracut-$(VERSION).tar.bz2 syncheck + --define "_rpmdir $$PWD" -ba dracut.spec; ) && \ + ( mv "$$rpmbuild"/$$(arch)/*.rpm $(DESTDIR).; mv "$$rpmbuild"/*.src.rpm $(DESTDIR).;rm -fr -- "$$rpmbuild"; ls $(DESTDIR)*.rpm ) + ++srpm: dracut-$(VERSION).tar.bz2 syncheck ++ rpmbuild=$$(mktemp -d -t rpmbuild-dracut.XXXXXX); src=$$(pwd); \ ++ cp dracut-$(VERSION).tar.bz2 "$$rpmbuild"; \ ++ LC_MESSAGES=C $$src/git2spec.pl $(VERSION) "$$rpmbuild" < dracut.spec > $$rpmbuild/dracut.spec; \ ++ (cd "$$rpmbuild"; \ ++ rpmbuild --define "_topdir $$PWD" --define "_sourcedir $$PWD" \ ++ --define "_specdir $$PWD" --define "_srcrpmdir $$PWD" \ ++ --define "_rpmdir $$PWD" -bs dracut.spec; ) && \ ++ ( mv "$$rpmbuild"/*.src.rpm $(DESTDIR).; rm -fr -- "$$rpmbuild"; ls $(DESTDIR)*.rpm ) ++ + syncheck: + @ret=0;for i in dracut-initramfs-restore.sh modules.d/*/*.sh; do \ + [ "$${i##*/}" = "module-setup.sh" ] && continue; \ diff --git a/SOURCES/0555-fips-check-fips-integrity-just-before-mounting-local.patch b/SOURCES/0555-fips-check-fips-integrity-just-before-mounting-local.patch new file mode 100644 index 0000000..afcb6fa --- /dev/null +++ b/SOURCES/0555-fips-check-fips-integrity-just-before-mounting-local.patch @@ -0,0 +1,30 @@ +From 75d6e4366a9de82c4d87841c99e00c90d333b0ba Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Renaud=20M=C3=A9trich?= <rmetrich@redhat.com> +Date: Fri, 19 Oct 2018 13:21:37 +0200 +Subject: [PATCH] fips: check fips integrity just before mounting local + filesystems in /sysroot +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Renaud Métrich <rmetrich@redhat.com> + +Cherry-picked from: e54ab383f7529f340d69536709624dffb30046a1 +Resolves: #1640981 +--- + modules.d/01fips/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh +index ff72bb9b..242d4dd9 100755 +--- a/modules.d/01fips/module-setup.sh ++++ b/modules.d/01fips/module-setup.sh +@@ -40,7 +40,7 @@ installkernel() { + + install() { + local _dir +- inst_hook pre-trigger 01 "$moddir/fips-boot.sh" ++ inst_hook pre-mount 01 "$moddir/fips-boot.sh" + inst_hook pre-pivot 01 "$moddir/fips-noboot.sh" + inst_script "$moddir/fips.sh" /sbin/fips.sh + diff --git a/SOURCES/0556-Harden-dracut-against-BASH_ENV-environment-variable.patch b/SOURCES/0556-Harden-dracut-against-BASH_ENV-environment-variable.patch new file mode 100644 index 0000000..010d9ac --- /dev/null +++ b/SOURCES/0556-Harden-dracut-against-BASH_ENV-environment-variable.patch @@ -0,0 +1,43 @@ +From fc87cf0e7e9790fb7c02ee54a73dd474ffa6fa38 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Renaud=20M=C3=A9trich?= <rmetrich@redhat.com> +Date: Thu, 7 Jun 2018 15:42:12 +0200 +Subject: [PATCH] Harden dracut against BASH_ENV environment variable +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +When dracut silently produces a broken initramfs, then the system will +likely not boot and this can be very problematic. Typical use case is +after the kernel has been updated. + +It appears that dracut is not protected against the BASH_ENV variable, +causing various scripts called by dracut to possibly fail or provide +wrong output (e.g. "ldd" is one of these). +Having a broken output for "ldd" makes the generated initramfs be not +usable, typically because vital binaries will be missing (e.g. +"awk", "udevadm", ...). + +Note: because the shebang line cannot contain more than one argument, +the '--norc' option had to be removed. IMHO, it was useless anyway. + +Signed-off-by: Renaud Métrich <rmetrich@redhat.com> + +Cherry-picked from: c1c78f8a91921fe87f5672cdbdf9791f569fc8ac +Resolves: #1588483 +--- + dracut.sh | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/dracut.sh b/dracut.sh +index 52835872..27489528 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -23,6 +23,8 @@ + # along with this program. If not, see <http://www.gnu.org/licenses/>. + # + ++unset BASH_ENV ++ + # store for logging + dracut_args=( "$@" ) + diff --git a/SOURCES/0557-iscsi-always-popd-even-if-there-is-no-iscsi-device.patch b/SOURCES/0557-iscsi-always-popd-even-if-there-is-no-iscsi-device.patch new file mode 100644 index 0000000..53627cf --- /dev/null +++ b/SOURCES/0557-iscsi-always-popd-even-if-there-is-no-iscsi-device.patch @@ -0,0 +1,27 @@ +From 97dd467e8e5996c512584123a762a7c9f12e5e86 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Renaud=20M=C3=A9trich?= <rmetrich@redhat.com> +Date: Fri, 1 Mar 2019 11:46:43 +0100 +Subject: [PATCH] iscsi: always popd, even if there is no iscsi device + +Cherry-picked from: 33cfad0b8f31a8241003b8f7728a2dc1ef61ca41 +Resolves: #1684474 +--- + modules.d/95iscsi/module-setup.sh | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh +index b1f5c6cb..432c8cb2 100755 +--- a/modules.d/95iscsi/module-setup.sh ++++ b/modules.d/95iscsi/module-setup.sh +@@ -23,8 +23,10 @@ check() { + + [[ $hostonly ]] || [[ $mount_needs ]] && { + pushd . >/dev/null +- for_each_host_dev_and_slaves is_iscsi || return 255 ++ for_each_host_dev_and_slaves is_iscsi ++ local _is_iscsi=$? + popd >/dev/null ++ [[ $_is_iscsi == 0 ]] || return 255 + } + return 0 + } diff --git a/SOURCES/0558-fips-ensure-fs-module-for-boot-is-installed.patch b/SOURCES/0558-fips-ensure-fs-module-for-boot-is-installed.patch new file mode 100644 index 0000000..26e93d6 --- /dev/null +++ b/SOURCES/0558-fips-ensure-fs-module-for-boot-is-installed.patch @@ -0,0 +1,53 @@ +From c6ccef8827af134884c5b2c785e07eb0b144450b Mon Sep 17 00:00:00 2001 +From: Kairui Song <kasong@redhat.com> +Date: Thu, 14 Mar 2019 18:54:10 +0800 +Subject: [PATCH] fips: ensure fs module for /boot is installed + +When using dracut with --hostonly and --no-hostonly-default-device, +/boot will be inaccessible as dracut will most fs modules unless +specified. But FIPS require /boot to be accessible, and it will try +to mount it on boot. It will fail if corresponding fs module is missing. + +For most case /boot will be a simple partition, include the fs module +will be enough for FIPS to mount it. For other cases users have to pass +extra parameters by themselves. + +Suggested-by: Kenneth Dsouza <kdsouza@redhat.com> +Signed-off-by: Kairui Song <kasong@redhat.com> + +Cherry-picked from: 8365177644bee107dcb66a71c8a7509900c9ece4 +Resolves: #1672817 +--- + modules.d/01fips/module-setup.sh | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh +index 242d4dd9..834e7d7d 100755 +--- a/modules.d/01fips/module-setup.sh ++++ b/modules.d/01fips/module-setup.sh +@@ -11,7 +11,7 @@ depends() { + } + + installkernel() { +- local _fipsmodules _mod i ++ local _fipsmodules _mod i _bootfstype + + if [[ -f "${srcmods}/modules.fips" ]]; then + _fipsmodules="$(cat "${srcmods}/modules.fips")" +@@ -36,6 +36,16 @@ installkernel() { + done + fi + done ++ ++ # with hostonly_default_device fs module for /boot is not installed by default ++ if [[ $hostonly ]] && [[ "$hostonly_default_device" == "no" ]]; then ++ _bootfstype=$(find_mp_fstype /boot) ++ if [[ -n "$_bootfstype" ]]; then ++ hostonly='' instmods $_bootfstype ++ else ++ dwarning "Can't determine fs type for /boot, FIPS check may fail." ++ fi ++ fi + } + + install() { diff --git a/SOURCES/0559-fips-removed-false-positive-FATAL-Module-xxx-not-fou.patch b/SOURCES/0559-fips-removed-false-positive-FATAL-Module-xxx-not-fou.patch new file mode 100644 index 0000000..f769a94 --- /dev/null +++ b/SOURCES/0559-fips-removed-false-positive-FATAL-Module-xxx-not-fou.patch @@ -0,0 +1,39 @@ +From 2ee1e96e1a2bd37cfb9a70e924fd93d709939979 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Renaud=20M=C3=A9trich?= <rmetrich@redhat.com> +Date: Wed, 14 Nov 2018 13:19:27 +0100 +Subject: [PATCH] fips: removed false-positive 'FATAL: Module xxx not found' + error message when kernel provides a generic algo for module +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Renaud Métrich <rmetrich@redhat.com> + +Cherry-picked from: 01ffcf342ae65984c655f10a2fd35019a492ee5c +Resolves: #1649743 +--- + modules.d/01fips/fips.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/modules.d/01fips/fips.sh b/modules.d/01fips/fips.sh +index c72c1273..7ba1ab27 100755 +--- a/modules.d/01fips/fips.sh ++++ b/modules.d/01fips/fips.sh +@@ -86,7 +86,7 @@ do_fips() + mv /etc/modprobe.d/fips.conf /etc/modprobe.d/fips.conf.bak + for _module in $FIPSMODULES; do + if [ "$_module" != "tcrypt" ]; then +- if ! modprobe "${_module}"; then ++ if ! modprobe "${_module}" 2>/tmp/fips.modprobe_err; then + # check if kernel provides generic algo + _found=0 + while read _k _s _v; do +@@ -95,7 +95,7 @@ do_fips() + _found=1 + break + done </proc/crypto +- [ "$_found" = "0" ] && return 1 ++ [ "$_found" = "0" ] && cat /tmp/fips.modprobe_err >&2 && return 1 + fi + fi + done diff --git a/SOURCES/0560-95iscsi-iscsiroot-synchronously-wait-until-iscsistar.patch b/SOURCES/0560-95iscsi-iscsiroot-synchronously-wait-until-iscsistar.patch new file mode 100644 index 0000000..15e2feb --- /dev/null +++ b/SOURCES/0560-95iscsi-iscsiroot-synchronously-wait-until-iscsistar.patch @@ -0,0 +1,26 @@ +From 937b808a0d71b68a3285cf3e9d162b0060c5bcdf Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn <lnykryn@redhat.com> +Date: Mon, 1 Apr 2019 17:25:01 +0200 +Subject: [PATCH] 95iscsi/iscsiroot: synchronously wait until iscsistart + finishes + +--- + modules.d/95iscsi/iscsiroot.sh | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh +index c93ff068..e94f596b 100755 +--- a/modules.d/95iscsi/iscsiroot.sh ++++ b/modules.d/95iscsi/iscsiroot.sh +@@ -197,6 +197,11 @@ handle_netroot() + ${iscsi_netdev_name:+--param "iface.net_ifacename=$iscsi_netdev_name"} \ + ${iscsi_param} >/dev/null 2>&1 \ + && { > $hookdir/initqueue/work ; } ++ while : ; do ++ status=$(systemctl is-active "$netroot_enc" 2>/dev/null) ++ [ "$status" != "activating" ] && break ++ sleep 1 ++ done + else + systemctl --no-block restart "$netroot_enc" >/dev/null 2>&1 \ + && { > $hookdir/initqueue/work ; } diff --git a/SOURCES/0561-rootfs-generator-rebase-to-upstream-version.patch b/SOURCES/0561-rootfs-generator-rebase-to-upstream-version.patch new file mode 100644 index 0000000..3804a64 --- /dev/null +++ b/SOURCES/0561-rootfs-generator-rebase-to-upstream-version.patch @@ -0,0 +1,131 @@ +From e42ab58a70ae646d09c319c125154e970e25a994 Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn <lnykryn@redhat.com> +Date: Thu, 25 Apr 2019 10:11:58 +0200 +Subject: [PATCH] rootfs-generator: rebase to upstream version + +Resolves: #1640866 +--- + modules.d/98systemd/rootfs-generator.sh | 87 ++++++++++++++++++++----- + 1 file changed, 70 insertions(+), 17 deletions(-) + +diff --git a/modules.d/98systemd/rootfs-generator.sh b/modules.d/98systemd/rootfs-generator.sh +index a7bffdfd..4ae693bb 100755 +--- a/modules.d/98systemd/rootfs-generator.sh ++++ b/modules.d/98systemd/rootfs-generator.sh +@@ -1,6 +1,4 @@ + #!/bin/sh +-# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +-# ex: ts=8 sw=4 sts=4 et filetype=sh + + type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh + +@@ -10,32 +8,81 @@ generator_wait_for_dev() + local _timeout + + _name="$(str_replace "$1" '/' '\x2f')" ++ _timeout=$(getarg rd.timeout) ++ _timeout=${_timeout:-0} + +- [ -e "$hookdir/initqueue/finished/devexists-${_name}.sh" ] && return 0 ++ if ! [ -e "$hookdir/initqueue/finished/devexists-${_name}.sh" ]; then + +- printf '[ -e "%s" ]\n' $1 \ +- >> "$hookdir/initqueue/finished/devexists-${_name}.sh" +- { +- printf '[ -e "%s" ] || ' $1 +- printf 'warn "\"%s\" does not exist"\n' $1 +- } >> "$hookdir/emergency/80-${_name}.sh" ++ printf '[ -e "%s" ]\n' $1 \ ++ >> "$hookdir/initqueue/finished/devexists-${_name}.sh" ++ { ++ printf '[ -e "%s" ] || ' $1 ++ printf 'warn "\"%s\" does not exist"\n' $1 ++ } >> "$hookdir/emergency/80-${_name}.sh" ++ fi + + _name=$(dev_unit_name "$1") +- if ! [ -L /run/systemd/generator/initrd.target.wants/${_name}.device ]; then +- [ -d /run/systemd/generator/initrd.target.wants ] || mkdir -p /run/systemd/generator/initrd.target.wants +- ln -s ../${_name}.device /run/systemd/generator/initrd.target.wants/${_name}.device ++ if ! [ -L "$GENERATOR_DIR"/initrd.target.wants/${_name}.device ]; then ++ [ -d "$GENERATOR_DIR"/initrd.target.wants ] || mkdir -p "$GENERATOR_DIR"/initrd.target.wants ++ ln -s ../${_name}.device "$GENERATOR_DIR"/initrd.target.wants/${_name}.device + fi + +- if ! [ -f /run/systemd/generator/${_name}.device.d/timeout.conf ]; then +- _timeout=$(getarg rd.device.timeout || printf "0") +- mkdir -p /run/systemd/generator/${_name}.device.d ++ if ! [ -f "$GENERATOR_DIR"/${_name}.device.d/timeout.conf ]; then ++ mkdir -p "$GENERATOR_DIR"/${_name}.device.d + { + echo "[Unit]" + echo "JobTimeoutSec=$_timeout" +- } > /run/systemd/generator/${_name}.device.d/timeout.conf ++ echo "JobRunningTimeoutSec=$_timeout" ++ } > "$GENERATOR_DIR"/${_name}.device.d/timeout.conf ++ fi ++} ++ ++generator_mount_rootfs() ++{ ++ local _type=$2 ++ local _flags=$3 ++ local _name ++ ++ [ -z "$1" ] && return 0 ++ ++ _name=$(dev_unit_name "$1") ++ [ -d "$GENERATOR_DIR" ] || mkdir -p "$GENERATOR_DIR" ++ if ! [ -f "$GENERATOR_DIR"/sysroot.mount ]; then ++ { ++ echo "[Unit]" ++ echo "Before=initrd-root-fs.target" ++ echo "Requires=systemd-fsck@${_name}.service" ++ echo "After=systemd-fsck@${_name}.service" ++ echo "[Mount]" ++ echo "Where=/sysroot" ++ echo "What=$1" ++ echo "Options=${_flags}" ++ echo "Type=${_type}" ++ } > "$GENERATOR_DIR"/sysroot.mount ++ fi ++ if ! [ -L "$GENERATOR_DIR"/initrd-root-fs.target.requires/sysroot.mount ]; then ++ [ -d "$GENERATOR_DIR"/initrd-root-fs.target.requires ] || mkdir -p "$GENERATOR_DIR"/initrd-root-fs.target.requires ++ ln -s ../sysroot.mount "$GENERATOR_DIR"/initrd-root-fs.target.requires/sysroot.mount + fi + } + ++generator_fsck_after_pre_mount() ++{ ++ local _name ++ ++ [ -z "$1" ] && return 0 ++ ++ _name=$(dev_unit_name "$1") ++ [ -d /run/systemd/generator/systemd-fsck@${_name}.service.d ] || mkdir -p /run/systemd/generator/systemd-fsck@${_name}.service.d ++ if ! [ -f /run/systemd/generator/systemd-fsck@${_name}.service.d/after-pre-mount.conf ]; then ++ { ++ echo "[Unit]" ++ echo "After=dracut-pre-mount.service" ++ } > /run/systemd/generator/systemd-fsck@${_name}.service.d/after-pre-mount.conf ++ fi ++ ++} ++ + root=$(getarg root=) + case "$root" in + block:LABEL=*|LABEL=*) +@@ -62,6 +109,12 @@ case "$root" in + rootok=1 ;; + esac + +-[ "${root%%:*}" = "block" ] && generator_wait_for_dev "${root#block:}" ++GENERATOR_DIR="$1" ++ ++if [ "$rootok" = "1" ]; then ++ generator_wait_for_dev "${root#block:}" "$RDRETRY" ++ generator_fsck_after_pre_mount "${root#block:}" ++ strstr "$(cat /proc/cmdline)" 'root=' || generator_mount_rootfs "${root#block:}" "$(getarg rootfstype=)" "$(getarg rootflags=)" ++fi + + exit 0 diff --git a/SOURCES/0562-fips-split-loading-the-crypto-modules-and-checking-t.patch b/SOURCES/0562-fips-split-loading-the-crypto-modules-and-checking-t.patch new file mode 100644 index 0000000..0827395 --- /dev/null +++ b/SOURCES/0562-fips-split-loading-the-crypto-modules-and-checking-t.patch @@ -0,0 +1,86 @@ +From 65623826c102b0cbcd04774d55dc28388e9c942c Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn <lnykryn@redhat.com> +Date: Tue, 14 May 2019 09:23:55 +0200 +Subject: [PATCH] fips: split loading the crypto modules and checking the + kernel + +In e54ab383 we moved the fips script to a later pahse of boot, since +the /boot might not be available early on. + +The problem is that systemd-cryptsetup* services could be run now +started before the do_fips is executed and need the crypto modules +to decrypted the devices. + +So let's split the do_fips and load the module before udev does the +trigger. +--- + modules.d/01fips/fips-load-crypto.sh | 8 ++++++++ + modules.d/01fips/fips.sh | 19 +++++++++++-------- + modules.d/01fips/module-setup.sh | 1 + + 3 files changed, 20 insertions(+), 8 deletions(-) + create mode 100644 modules.d/01fips/fips-load-crypto.sh + +diff --git a/modules.d/01fips/fips-load-crypto.sh b/modules.d/01fips/fips-load-crypto.sh +new file mode 100644 +index 00000000..82cbeee4 +--- /dev/null ++++ b/modules.d/01fips/fips-load-crypto.sh +@@ -0,0 +1,8 @@ ++#!/bin/sh ++ ++if ! fipsmode=$(getarg fips) || [ $fipsmode = "0" ]; then ++ rm -f -- /etc/modprobe.d/fips.conf >/dev/null 2>&1 ++else ++ . /sbin/fips.sh ++ fips_load_crypto || die "FIPS integrity test failed" ++fi +diff --git a/modules.d/01fips/fips.sh b/modules.d/01fips/fips.sh +index 7ba1ab27..642fafbe 100755 +--- a/modules.d/01fips/fips.sh ++++ b/modules.d/01fips/fips.sh +@@ -71,15 +71,8 @@ do_rhevh_check() + return 0 + } + +-do_fips() ++fips_load_crypto() + { +- local _v +- local _s +- local _v +- local _module +- +- KERNEL=$(uname -r) +- + FIPSMODULES=$(cat /etc/fipsmodules) + + info "Loading and integrity checking all crypto modules" +@@ -104,6 +97,16 @@ do_fips() + info "Self testing crypto algorithms" + modprobe tcrypt || return 1 + rmmod tcrypt ++} ++ ++do_fips() ++{ ++ local _v ++ local _s ++ local _v ++ local _module ++ ++ KERNEL=$(uname -r) + + info "Checking integrity of kernel" + if [ -e "/run/initramfs/live/vmlinuz0" ]; then +diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh +index 834e7d7d..306f3ada 100755 +--- a/modules.d/01fips/module-setup.sh ++++ b/modules.d/01fips/module-setup.sh +@@ -52,6 +52,7 @@ install() { + local _dir + inst_hook pre-mount 01 "$moddir/fips-boot.sh" + inst_hook pre-pivot 01 "$moddir/fips-noboot.sh" ++ inst_hook pre-udev 01 "$moddir/fips-load-crypto.sh" + inst_script "$moddir/fips.sh" /sbin/fips.sh + + inst_multiple sha512hmac rmmod insmod mount uname umount fipscheck diff --git a/SOURCES/0563-network-skip-already-enslaved-interfaces.patch b/SOURCES/0563-network-skip-already-enslaved-interfaces.patch new file mode 100644 index 0000000..c9842fc --- /dev/null +++ b/SOURCES/0563-network-skip-already-enslaved-interfaces.patch @@ -0,0 +1,50 @@ +From e8a7c2a15215f73fff10358af7d9ecd0ab7b597f Mon Sep 17 00:00:00 2001 +From: Harald Hoyer <harald@redhat.com> +Date: Tue, 21 Aug 2018 13:14:44 +0200 +Subject: [PATCH] network: skip already enslaved interfaces + +--- + modules.d/40network/ifup.sh | 11 +++++++---- + modules.d/40network/net-lib.sh | 7 +++++++ + 2 files changed, 14 insertions(+), 4 deletions(-) + +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index b3631648..181ab67c 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -377,10 +377,13 @@ for p in $(getargs ip=); do + esac + + # If this option isn't directed at our interface, skip it +- [ -n "$dev" ] && [ "$dev" != "$netif" ] && \ +- [ "$use_bridge" != 'true' ] && \ +- [ "$use_vlan" != 'true' ] && continue +- ++ if [ -n "$dev" ]; then ++ [ "$dev" != "$netif" ] && \ ++ [ "$use_bridge" != 'true' ] && \ ++ [ "$use_vlan" != 'true' ] && continue ++ else ++ iface_is_enslaved "$netif" && continue ++ fi + # Store config for later use + for i in ip srv gw mask hostname macaddr mtu dns1 dns2; do + eval '[ "$'$i'" ] && echo '$i'="$'$i'"' +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index 9e87aeab..35e6e833 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -731,6 +731,13 @@ iface_has_link() { + iface_has_carrier "$@" + } + ++iface_is_enslaved() { ++ local _li ++ _li=$(ip -o link show dev $1) ++ strstr "$li" " master " || return 1 ++ return 0 ++} ++ + find_iface_with_link() { + local iface_path="" iface="" + for iface_path in /sys/class/net/*; do diff --git a/SOURCES/0564-rootfs-generator-don-t-set-JobRunningTimeoutSec.patch b/SOURCES/0564-rootfs-generator-don-t-set-JobRunningTimeoutSec.patch new file mode 100644 index 0000000..6e845d6 --- /dev/null +++ b/SOURCES/0564-rootfs-generator-don-t-set-JobRunningTimeoutSec.patch @@ -0,0 +1,22 @@ +From 6193b3a6e28e81fe0ebbdba4ca6aaff70b63695f Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn <lnykryn@redhat.com> +Date: Thu, 29 Aug 2019 09:40:09 +0200 +Subject: [PATCH] rootfs-generator: don't set JobRunningTimeoutSec + +We don't have that in rhel7 systemd +--- + modules.d/98systemd/rootfs-generator.sh | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/modules.d/98systemd/rootfs-generator.sh b/modules.d/98systemd/rootfs-generator.sh +index 4ae693bb..eada3d15 100755 +--- a/modules.d/98systemd/rootfs-generator.sh ++++ b/modules.d/98systemd/rootfs-generator.sh +@@ -32,7 +32,6 @@ generator_wait_for_dev() + { + echo "[Unit]" + echo "JobTimeoutSec=$_timeout" +- echo "JobRunningTimeoutSec=$_timeout" + } > "$GENERATOR_DIR"/${_name}.device.d/timeout.conf + fi + } diff --git a/SPECS/dracut.spec b/SPECS/dracut.spec new file mode 100644 index 0000000..0d985e0 --- /dev/null +++ b/SPECS/dracut.spec @@ -0,0 +1,2839 @@ +%define dracutlibdir %{_prefix}/lib/dracut + +# Variables must be defined +%define with_nbd 1 + +# nbd in Fedora only +%if 0%{?rhel} >= 6 +%define with_nbd 0 +%endif + +Name: dracut +Version: 033 +Release: 565%{?dist} + +Summary: Initramfs generator using udev +%if 0%{?fedora} || 0%{?rhel} +Group: System Environment/Base +%endif +%if 0%{?suse_version} +Group: System/Base +%endif + +# The entire source code is GPLv2+ +# except install/* which is LGPLv2+ +License: GPLv2+ and LGPLv2+ + +URL: https://dracut.wiki.kernel.org/ + +# Source can be generated by +# http://git.kernel.org/?p=boot/dracut/dracut.git;a=snapshot;h=%{version};sf=tgz +Source0: http://www.kernel.org/pub/linux/utils/boot/dracut/dracut-%{version}.tar.bz2 +Patch1: 0001-dracut.sh-harden-host_modalias-reading.patch +Patch2: 0002-ifup-do-not-dhcp-on-network-interface-of-secondary-s.patch +Patch3: 0003-dracut.sh-also-search-uevent-s-for-MODALIAS.patch +Patch4: 0004-dracut.sh-we-don-t-need-to-read-the-modalias-files.patch +Patch5: 0005-Add-option-to-turn-on-off-prelinking.patch +Patch6: 0006-add-etc-system-fips-for-dracut-fips-subpackage.patch +Patch7: 0007-dracut-Generlize-microcode-early-cpio-usage.patch +Patch8: 0008-dracut-Do-not-create-early_cpio-if-no-suitable-micro.patch +Patch9: 0009-dracut-Implement-ACPI-table-overriding.patch +Patch10: 0010-dracut.conf.5.asc-Add-ACPI-table-override-and-uncomp.patch +Patch11: 0011-dracut-bash-completion.sh-add-prelink-noprelink.patch +Patch12: 0012-dracut.sh-bail-out-early-if-destination-dir-is-not-w.patch +Patch13: 0013-dracut-logger.sh-do-not-log-to-syslog-kmsg-journal-f.patch +Patch14: 0014-lvm-mdraid-Fix-LVM-on-MD-activation.patch +Patch15: 0015-bcache-optionally-install-the-tools-and-rules.patch +Patch16: 0016-dracut-functions.sh-inst_rules-do-not-install-rules-.patch +Patch17: 0017-mdraid-module-setup.sh-install-configs-from-etc-mdad.patch +Patch18: 0018-mdraid-module-setup.sh-fixes-for-mdadm-3.2.6.patch +Patch19: 0019-fcoe-add-FCoE-UEFI-boot-device-support.patch +Patch20: 0020-rootfs-block-add-support-for-the-rootfallback-kernel.patch +Patch21: 0021-btrfs-use-inst_hook-to-install-the-timeout-hook.patch +Patch22: 0022-lvm-install-thin-utils-for-non-hostonly.patch +Patch23: 0023-dracut.sh-do-not-bail-out-if-kernel-modules-dir-is-m.patch +Patch24: 0024-dmsquash-live-add-dev-mapper-live-base.patch +Patch25: 0025-Doc-cleanup-extend-and-split-and-reuse.patch +Patch26: 0026-lvm-fix-thin-recognition.patch +Patch27: 0027-dracut-functions.sh-check_block_and_slaves-skip-LVM-.patch +Patch28: 0028-Add-lzo-lz4-compression-and-read-INITRD_COMPRESS.patch +Patch29: 0029-git2spec.pl-remove-.git-date-from-release-string.patch +Patch30: 0030-kernel-modules-ARM-add-mmc_block-usb_storage-to-stat.patch +Patch31: 0031-lvm-always-install-thin-utils-for-lvm.patch +Patch32: 0032-dracut.spec-move-sbin-dracut-to-usr-sbin-dracut.patch +Patch33: 0033-usrmount-module-setup.sh-fixed-typo.patch +Patch34: 0034-Handle-crypto-modules-with-and-without-modaliases.patch +Patch35: 0035-fips-include-crct10dif_generic.patch +Patch36: 0036-resume-fix-swap-detection-in-hostonly.patch +Patch37: 0037-resume-remove-resume-genrules.sh.patch +Patch38: 0038-iscsi-nbd-do-not-try-to-mount-the-whole-disk-if-root.patch +Patch39: 0039-fips-also-install-etc-system-fips-in-the-initramfs.patch +Patch40: 0040-dracut-functions.sh-Avoid-loading-unnecessary-32-bit.patch +Patch41: 0041-systemd-do-not-exit-the-initqueue-if-systemd-asks-a-.patch +Patch42: 0042-kernel-modules-add-ohci-pci-to-the-list-of-forced-mo.patch +Patch43: 0043-lvm-do-not-run-pvscan-for-lvmetad-update.patch +Patch44: 0044-fips-fix-RHEV-vmlinuz-check.patch +Patch45: 0045-dracut.cmdline.7.asc-document-server-ip-of-ip-parame.patch +Patch46: 0046-dracut.sh-_get_fs_type-if-block-device-exists-return.patch +Patch47: 0047-network-net-lib.sh-wait_for_if_up-wait-for-state-UP.patch +Patch48: 0048-network-net-lib.sh-iface_has_link-fixup.patch +Patch49: 0049-network-ifup.sh-before-doing-dhcp-check-if-the-link-.patch +Patch50: 0050-base-dracut-lib.sh-wait_for_dev-relax-requirement.patch +Patch51: 0051-dracut.sh-skip-crypt-swaps-with-password-files.patch +Patch52: 0052-Fixup-script-permissions.patch +Patch53: 0053-Remove-shebang-from-shell-completion-files.patch +Patch54: 0054-i18n-introduce-i18n_install_all-to-install-everythin.patch +Patch55: 0055-Run-xz-and-lzma-with-multiple-threads.patch +Patch56: 0056-iscsi-nbd-do-not-fail-in-hostonly-mode.patch +Patch57: 0057-dracut.sh-fixed-PATH-shortener.patch +Patch58: 0058-dracut.modules.7.asc-removed-empty-section.patch +Patch59: 0059-lvm-install-thin-tools-only-when-needed-in-hostonly.patch +Patch60: 0060-systemd-dracut-initqueue.sh-fixed-waiting-in-the-loo.patch +Patch61: 0061-base-rdsosreport.sh-add-ip-a-output.patch +Patch62: 0062-lvm-fixed-lvm-thin-check.patch +Patch63: 0063-test-TEST-17-LVM-THIN-add-test-case-for-lvm-thin-poo.patch +Patch64: 0064-test-TEST-17-LVM-THIN-remove-.testdir.patch +Patch65: 0065-iscsi-do-iscsi_firmware-regardless-of-network.patch +Patch66: 0066-dracut-lib-wait_for_dev-prevent-systemd-daemon-reloa.patch +Patch67: 0067-kernel-modules-add-more-block-driver.patch +Patch68: 0068-network-include-usbnet-drivers.patch +Patch69: 0069-systemd-dracut-initqueue.sh-fstab-is-not-a-directory.patch +Patch70: 0070-iscsi-iscsiroot.sh-do-not-trust-iscsistart-return-va.patch +Patch71: 0071-dracut.sh-add-missing-piece-for-option-add-device.patch +Patch72: 0072-dracut.sh-add-boot-efi-to-device-paths.patch +Patch73: 0073-documentation-line-wrap.patch +Patch74: 0074-network-include-all-ethernet-drivers.patch +Patch75: 0075-dracut-install-dracut-fix-ldd-output-parsing.patch +Patch76: 0076-systemd-add-71-seat.rules-73-seat-late.rules.patch +Patch77: 0077-systemd-add-seat-udev-rules-and-mask-loginctl.patch +Patch78: 0078-systemd-module-setup.sh-make-use-of-ln_r.patch +Patch79: 0079-network-add-rd.bootif-0-to-ignore-BOOTIF.patch +Patch80: 0080-iscsi-call-iscsistart-b-until-it-succeeds.patch +Patch81: 0081-base-dracut-lib.sh-halt-the-machine-in-systemd-mode-.patch +Patch82: 0082-systemd-rootfs-generator.sh-exit-0.patch +Patch83: 0083-systemd-rootfs-generator.sh-ignore-legacy-root-dev-n.patch +Patch84: 0084-dracut-lib.sh-fixed-shebang.patch +Patch85: 0085-iscsi-more-iscsiroot-fixes.patch +Patch86: 0086-iscsiroot-touch-the-right-marker-file.patch +Patch87: 0087-lvm-lvm_scan.sh-handle-one-LV-at-a-time-with-lvchang.patch +Patch88: 0088-dracut-logger.sh-systemd-cat-only-understands-prio-0.patch +Patch89: 0089-Use-builtin-xz-lzma-option-to-use-all-cores-for-mult.patch +Patch90: 0090-dracut-initramfs-restore-lsinitrd-add-LZ4-support.patch +Patch91: 0091-Revert-dmraid-let-dmraid-setup-the-partitions.patch +Patch92: 0092-dracut.sh-create-early-cpio-dir-for-acpi-tables.patch +Patch93: 0093-dracut.sh-set-file-owners-of-early-cpio-files-to-0-0.patch +Patch94: 0094-add-skipcpio-utility.patch +Patch95: 0095-dracut.sh-add-early_cpio-marker-file-to-the-early-cp.patch +Patch96: 0096-lsinitrd.sh-make-use-of-the-skipcpio-utility.patch +Patch97: 0097-network-dhclient-script.sh-set-lease-time.patch +Patch98: 0098-dracut-lib.sh-bugfix-for-pidof-function.patch +Patch99: 0099-dracut-lib.sh-bugfix-for-pidof-function.patch +Patch100: 0100-iscsi-iscsiroot.sh-beautify-warning.patch +Patch101: 0101-dracut.spec-add-skipcpio.patch +Patch102: 0102-systemd-ensure-autofs4-and-ipv6-are-included.patch +Patch103: 0103-dracut-functions.sh-also-search-in-the-updates-direc.patch +Patch104: 0104-dracut.sh-only-set-the-owner-of-files-to-0-0-if-gene.patch +Patch105: 0105-dracut.conf.d-fedora.conf.example-turn-on-early_micr.patch +Patch106: 0106-network-understand-ip-.-dns1-dns2.patch +Patch107: 0107-network-ifup.sh-handle-dns1-and-dns2-from-ip-setting.patch +Patch108: 0108-network-net-lib.sh-parse-ibft-nameserver-settings.patch +Patch109: 0109-dmsquash-live-dmsquash-liveiso-genrules.sh-s-loop0-l.patch +Patch110: 0110-base-rdsosreport.sh-add-dracut-version-to-rdsosrepor.patch +Patch111: 0111-fcoe-move-uefi-parsing-to-fcoe-uefi-module.patch +Patch112: 0112-move-uefi-lib-to-a-seperate-module.patch +Patch113: 0113-dracut.spec-add-95fcoe-uefi-and-99uefi-lib.patch +Patch114: 0114-fcoe-uefi-do-not-include-if-fcoe-utils-not-installed.patch +Patch115: 0115-network-fix-dns-parsing-in-ip-parameter.patch +Patch116: 0116-skipcpio-return-something-at-end-of-program.patch +Patch117: 0117-skipcpio-fixed-signatured-check.patch +Patch118: 0118-network-ifup-do-not-ifup-an-already-setup-network-in.patch +Patch119: 0119-network-ifup-do-not-run-dhclient-twice-on-the-same-i.patch +Patch120: 0120-nfs-nfsroot-symlink-dev-null-to-dev-nfs-as-a-marker-.patch +Patch121: 0121-systemd-dracut-pre-pivot-run-for-dev-nfs-root-and-cl.patch +Patch122: 0122-new_dhcp_next_server-is-really-new_next_server.patch +Patch123: 0123-dracut.sh-Fix-variable-name-typo.patch +Patch124: 0124-kernel-modules-add-sdhci_acpi-to-the-static-list-of-.patch +Patch125: 0125-dracut-functions.sh-find_kernel_modules_by_path-fixe.patch +Patch126: 0126-iscsi-for-iBFT-read-the-initiator-name-from-the-corr.patch +Patch127: 0127-fcoe-uefi-try-all-FcoeBootDevice-variables-for-a-Dev.patch +Patch128: 0128-dracut.sh-write-directly-to-the-output-file.patch +Patch129: 0129-systemd-add-sys-kernel-config.mount.patch +Patch130: 0130-systemd-add-70-uaccess.rules.patch +Patch131: 0131-Add-flag-to-toggle-hostonly-cmdline-storing-in-the-i.patch +Patch132: 0132-default-conf-set-hostonly_cmdline-no.patch +Patch133: 0133-systemd-rootfs-generator.sh-generate-units-in-run-sy.patch +Patch134: 0134-ifcfg-write-ifcfg.sh-do-not-bind-s390-to-MAC-if-SUBC.patch +Patch135: 0135-network-net-lib.sh-wait_for_ipv6_auto-also-wait-for-.patch +Patch136: 0136-network-dhclient-script.sh-DHCP-IPv6-interface-setup.patch +Patch137: 0137-network-IPv6-status-wait-for-tentative-flag-to-be-cl.patch +Patch138: 0138-network-merge-setup_net_-netif.ok-and-net.-netif.did.patch +Patch139: 0139-systemd-add-systemd-sysctl-service.patch +Patch140: 0140-add-default-values-in-fstab_lines.patch +Patch141: 0141-test-add-missing-Makefile.testdir.patch +Patch142: 0142-test-Makefile-add-SKIP-env-to-skip-certain-tests.patch +Patch143: 0143-test-TEST-50-MULTINIC-client-init.sh-skip-MAC-marker.patch +Patch144: 0144-Add-no-hostonly-cmdline-option-handling-for-getopt.patch +Patch145: 0145-dracut-don-t-let-devices-timeout.patch +Patch146: 0146-Do-not-wait_for_dev-if-hostonly_cmdline-not-set.patch +Patch147: 0147-systemd-dracut-shutdown.service-make-failure-non-fat.patch +Patch148: 0148-network-dhclient-script-do-PREINIT6-for-DHCP6.patch +Patch149: 0149-shutdown-if-kexec-failed-do-a-simple-reboot.patch +Patch150: 0150-dracut-initramfs-restore-fix-unpacking-with-early-mi.patch +Patch151: 0151-fcoe-wait-for-lldpad-to-be-ready.patch +Patch152: 0152-network-handle-ip-dhcp6-for-all-interfaces.patch +Patch153: 0153-lsinitrd.sh-prevent-construct.patch +Patch154: 0154-network-DCHPv6-set-valid_lft-and-preferred_lft.patch +Patch155: 0155-dm-add-dm-cache-modules.patch +Patch156: 0156-fcoe-workaround-fcoe-timing-issues.patch +Patch157: 0157-Add-legacy-flag-l-to-lz4-and-update-magic-number.patch +Patch158: 0158-fs-lib-always-install-fsck.-fs-if-present.patch +Patch159: 0159-ifcfg-write-ifcfg.sh-turn-on-IPV6INIT-if-any-inet6-a.patch +Patch160: 0160-dracut-functions.sh-add-lib-modules-extras-weak-upda.patch +Patch161: 0161-fstab-do-not-mount-and-fsck-from-fstab-if-using-syst.patch +Patch162: 0162-lvm-module-setup.sh-check-for-existance-of-69-dm-lvm.patch +Patch163: 0163-dracut-initqueue-service-runs-before-remote-fs-pre.t.patch +Patch164: 0164-ifcfg-do-not-bind-persistent-interface-names-to-HWAD.patch +Patch165: 0165-ifcfg-only-bind-to-HWADDR-if-addr_assign_type-0.patch +Patch166: 0166-dracut-lib.sh-fixed-return-value-of-pidof.patch +Patch167: 0167-Do-not-log-to-kmsg-syslog-and-files-for-print-cmdlin.patch +Patch168: 0168-ifcfg-write-ifcfg.sh-IPV6INIT-yes-check-also-for-non.patch +Patch169: 0169-cms-cmssetup.sh-convert-SUBCHANNELS-to-lowercase.patch +Patch170: 0170-mdraid-module-setup.sh-fixed-print-cmdline-for-empty.patch +Patch171: 0171-ifcfg-write-ifcfg.sh-include-net-lib.sh.patch +Patch172: 0172-nbd-nbdroot.sh-call-nbd-client-with-systemd-mark.patch +Patch173: 0173-fcoe-uefi-parse-uefifcoe.sh-fixed-parameter-generati.patch +Patch174: 0174-dracut-functions.sh-print_vars-fix-for-values-with-s.patch +Patch175: 0175-98systemd-fixup-rootfs-generator-installation-path.patch +Patch176: 0176-dracut-pre-pivot-pulls-in-remote-fs.target.patch +Patch177: 0177-kernel-modules-Fix-storage-module-selection-for-sdhc.patch +Patch178: 0178-bonding-use-hwaddr-of-the-slave-rather-than-the-mast.patch +Patch179: 0179-network-ifup.sh-Don-t-try-to-modprobe-ipv6-if-alread.patch +Patch180: 0180-iscsi-correctly-install-the-timeout-iscsiroot-dummy-.patch +Patch181: 0181-iscsi-correctly-install-the-settled-iscsiroot-dummy-.patch +Patch182: 0182-deprecate-ip-ibft-kernel-command-line-parameter.patch +Patch183: 0183-systemd-Optionally-include-efivarsfs-module.patch +Patch184: 0184-98systemd-also-install-systemd-journald-dev-log.sock.patch +Patch185: 0185-lsinitrd.sh-don-t-choke-on-LZO-compressed-images.patch +Patch186: 0186-usable_root-only-check-for-ld-.so.patch +Patch187: 0187-print-out-what-kernel-command-line-parameters-are-us.patch +Patch188: 0188-kernel-modules-add-tegra-arm-modules.patch +Patch189: 0189-Add-rd.cmdline-ask-kernel-command-line-parameter.patch +Patch190: 0190-base-init.sh-use-loop-counter-with-unique-varname.patch +Patch191: 0191-ifcfg-depends-on-network.patch +Patch192: 0192-test-add-udev-settle-after-sfdisk.patch +Patch193: 0193-TEST-15-BTRFSRAID-install-etc-os-release.patch +Patch194: 0194-lvm-module-setup.sh-check-for-existance-of-69-dm-lvm.patch +Patch195: 0195-dracut.sh-always-copy-prelink-files-in-FIPS-mode.patch +Patch196: 0196-dracut-functions.sh-speed-up-ldconfig_paths.patch +Patch197: 0197-Installing-an-OS-with-VLAN-enabled-to-an-ISCSI-LUN-f.patch +Patch198: 0198-ARM-update-modules-for-ARM-host-only-options.patch +Patch199: 0199-base-dracut-lib-pidof-turn-off-debugging.patch +Patch200: 0200-network-add-rd.route-parameter.patch +Patch201: 0201-udev-rules-add-uaccess-and-seat-rules.patch +Patch202: 0202-testsuite-mods-for-kvm-nested-in-kvm.patch +Patch203: 0203-add-kate-and-emacs-per-directory-config-files.patch +Patch204: 0204-ssh-client-handle-etc-ssh-ssh_config.patch +Patch205: 0205-dracut-lib.sh-cancel_wait_for_dev-fixed-double-escap.patch +Patch206: 0206-Do-not-reload-systemd-with-wait_for_dev.patch +Patch207: 0207-lsinird-Adding-option-m-mod-to-list-dracut-modules-i.patch +Patch208: 0208-dracut.sh-also-mkdir-run-lock-which-is-copied-to.patch +Patch209: 0209-dracut.sh-no-need-to-make-subdirs-in-run.patch +Patch210: 0210-dracut-functions.sh-do-not-force-require-modules.bui.patch +Patch211: 0211-Make-logfile-configurable.patch +Patch212: 0212-Dracut-Add-a-new-argument-rebuild.patch +Patch213: 0213-network-net-lib.sh-parse_iscsi_root-do-not-enforce-t.patch +Patch214: 0214-replaced-ip-auto-with-ip-dhcp-in-the-documentation.patch +Patch215: 0215-Support-spaces-in-mount_nfs-1109933.patch +Patch216: 0216-fixed-bridge-setup.patch +Patch217: 0217-bridging-update-the-ifcfg-files-generated-for-bridge.patch +Patch218: 0218-ifcfg-write-ifcfg.sh-bind-bond-and-bridge-interfaces.patch +Patch219: 0219-cms-cmssetup.sh-fixed-indention.patch +Patch220: 0220-cms-cmssetup.sh-understand-DASD-none.patch +Patch221: 0221-qemu-install-virtio_console-kernel-module.patch +Patch222: 0222-dracut-functions.sh-exit-for-missing-force-add-or-ad.patch +Patch223: 0223-do-ip-route-replace-default-instead-of-add.patch +Patch224: 0224-network-net-lib.sh-is_persistent_ethernet_name-eth-i.patch +Patch225: 0225-ifcfg-write-ifcfg-only-write-DEVICE-for-non-kernel-n.patch +Patch226: 0226-fips-add-libfreeblpriv3.so-and-libfreeblpriv3.chk.patch +Patch227: 0227-fips-remove-c-p-and.patch +Patch228: 0228-net-lib.sh-parse_iscsi_root-fix-target-parsing.patch +Patch229: 0229-ssh-client-s-key-key.patch +Patch230: 0230-cms-cms-write-ifcfg.sh-turn-SUBCHANNELS-into-lowerca.patch +Patch231: 0231-40network-Fix-the-syntax-to-correct-the-judgment-sen.patch +Patch232: 0232-systemd-add-90-vconsole.rules.patch +Patch233: 0233-network-add-support-for-comma-separated-autoconf-opt.patch +Patch234: 0234-test-add-fs-lib-to-dracut-module-list.patch +Patch235: 0235-network-enhance-team-support.patch +Patch236: 0236-dracut-fixed-module-dependency-handling.patch +Patch237: 0237-network-net-lib.sh-parse_iscsi_root-fix-c-p-bug.patch +Patch238: 0238-network-ifup-source-team-info-if-present.patch +Patch239: 0239-fips-add-drbg-kernel-module.patch +Patch240: 0240-network-do-not-destroy-the-team-interface-on-teamd-s.patch +Patch241: 0241-do-not-symlink-var-log-to-run-log.patch +Patch242: 0242-dracut.sh-add-tmpfilesdir-to-install-files-to-usr-li.patch +Patch243: 0243-fips-add-some-s390-kernel-modules.patch +Patch244: 0244-rearrange-fips-module-ordering-due-to-zlib.patch +Patch245: 0245-network-dhcp-wait_for_ipv6_dad-in-PREINIT6.patch +Patch246: 0246-network-net-lib.sh-iface_has_link-wait-5s-for-the-ca.patch +Patch247: 0247-dracut-pre-pivot-call-udevadm-settle-one-last-time.patch +Patch248: 0248-dracut.sh-add-devices-with-x-initrd.mount-in-etc-fst.patch +Patch249: 0249-crypt-add-drbg-kernel-module.patch +Patch250: 0250-dracut-lib.sh-info-output-info-to-stderr.patch +Patch251: 0251-Factor-out-all-the-type-V-commands.patch +Patch252: 0252-network-dhclient-script.sh-add-RENEW-REBIND.patch +Patch253: 0253-network-dhclient-script.sh-make-IPv4-DHCP-lease-time.patch +Patch254: 0254-network-don-t-use-ifup-m.patch +Patch255: 0255-nfs-parse-nfsroot.sh-don-t-unset-netroot-if-not-nfs.patch +Patch256: 0256-Change-the-fs_passno-of-nfs-to-0.patch +Patch257: 0257-nfs-nfs-lib.sh-add-anaconda_nfsv6_to_var.patch +Patch258: 0258-splitup-dracut-init.sh-from-dracut-functions.sh.patch +Patch259: 0259-Adding-support-for-read-write-filesystem-images.patch +Patch260: 0260-dmsquash-Add-rd.live.overlay.thin.patch +Patch261: 0261-dmsquash-live-setup-the-images-in-run-initramfs.patch +Patch262: 0262-dmsquash-Add-squashfs-support-to-rd.live.fsimg.patch +Patch263: 0263-doc-Add-a-minimal-rd.live.overlay-documentation.patch +Patch264: 0264-50drm-add-hyperv_fb-kernel-module.patch +Patch265: 0265-kernel-modules-install-all-HID-drivers.patch +Patch266: 0266-network-add-options-to-tweak-timeouts.patch +Patch267: 0267-fcoe-start-with-fcoemon-instead-of-fipvlan.patch +Patch268: 0268-fcoe-EDD-parsing-patch-for-i40e.patch +Patch269: 0269-fcoe-fcoe-edd.sh-cleanup-the-script.patch +Patch270: 0270-livenet-don-t-attempt-to-download-the-image-for-ever.patch +Patch271: 0271-95fcoe-uefi-Test-for-EFI-firmware.patch +Patch272: 0272-base-Don-t-wait-for-swap-devices-in-host-only-mode.patch +Patch273: 0273-dracut-functions.sh-check-if-dinfo-is-a-function.patch +Patch274: 0274-dmsquash-live-do-not-abort-if-user-pressed-ESC-on-ch.patch +Patch275: 0275-Add-rd.live.overlay.size-option.patch +Patch276: 0276-base-dracut-lib.sh-read-proc-cmdline-with-multiple-l.patch +Patch277: 0277-multipath-install-all-multipath-path-selector-kernel.patch +Patch278: 0278-man-page-changed-grub.conf-to-grub2.cfg.patch +Patch279: 0279-lsinitrd.sh-ignore-cat-write-error-Broken-pipe.patch +Patch280: 0280-network-setup-gateway-after-setting-up-resolv.conf.patch +Patch281: 0281-Add-support-for-ethernet-point-to-point-connections-.patch +Patch282: 0282-lvm-add-cache-tools-for-dm-cache-usage.patch +Patch283: 0283-crypt-install-drbg-unconditionally-in-hostonly-mode.patch +Patch284: 0284-dracut-functions.sh-degrade-info-about-missing-binar.patch +Patch285: 0285-dracut-functions.sh-require_binaries-clarify-message.patch +Patch286: 0286-dracut-systemd-dracut-initqueue.sh-be-verbose-about-.patch +Patch287: 0287-nfs-parse-nfsroot.sh-silence-useless-warning-if-netr.patch +Patch288: 0288-network-parse-ip-opts.sh-assume-rd.neednet-for-multi.patch +Patch289: 0289-systemd-add-systemd-run-and-systemd-escape.patch +Patch290: 0290-network-net-lib.sh-add-is_ip.patch +Patch291: 0291-iscsi-integrate-with-systemd-and-improve-robustness.patch +Patch292: 0292-dracut.cmdline.7.asc-document-rd.iscsi.waitnet-and-r.patch +Patch293: 0293-iscsi-parse-iscsiroot.sh-use-iBFT-initiator-name.patch +Patch294: 0294-iscsi-iscsiroot.sh-handle-timeout-with-all-interface.patch +Patch295: 0295-TEST-30-ISCSI-dhcpd.conf-set-the-LUN.patch +Patch296: 0296-TEST-30-ISCSI-switch-to-scsi-target-utils.patch +Patch297: 0297-iscsi-iscsiroot.sh-systemd-run-does-not-understand-n.patch +Patch298: 0298-iscsi-module-setup.sh-iscsid-need-var-lib-iscsi.patch +Patch299: 0299-TEST-30-ISCSI-fix-test-to-run-with-new-iscsi.patch +Patch300: 0300-dracut-logger.sh-log-also-rest-of-line-without-retur.patch +Patch301: 0301-iscsi-handle-timeout-case-better.patch +Patch302: 0302-base-dracut-lib.sh-vinfo-vwarn-handle-lines-without-.patch +Patch303: 0303-systemd-dracut-cmdline.sh-print-out-cmdline-in-one-l.patch +Patch304: 0304-network-ifup.sh-let-dhcp-client-run-in-the-backgroun.patch +Patch305: 0305-network-ifup.sh-arping-for-static-IPv4-addresses.patch +Patch306: 0306-network-parse-ip-opts.sh-bind-enx-interface-to-the-M.patch +Patch307: 0307-udev-rules-install-40-redhat.rules.patch +Patch308: 0308-fcoe-cleanup-lldpad.patch +Patch309: 0309-network-net-lib.sh-ibft-unset-gateway-or-dns-if-set-.patch +Patch310: 0310-network-dhclient-exit-arping-immediatly-if-we-get-an.patch +Patch311: 0311-dmraid-only-scan-once-because-of-one-device.patch +Patch312: 0312-test-TEST-04-FULL-SYSTEMD-create-root.sh-modprobe-bt.patch +Patch313: 0313-TEST-15-BTRFS-load-btrfs-module.patch +Patch314: 0314-network-ifup.sh-do_static-error-out-if-interface-cou.patch +Patch315: 0315-network-ifup.sh-do_static-error-out-if-IP-is-already.patch +Patch316: 0316-crypt-module-setup.sh-fixed-parsing-crypttab-with-no.patch +Patch317: 0317-TEST-30-ISCSI-add-rd.scsi.firmware.patch +Patch318: 0318-initqueue-add-online-queue.patch +Patch319: 0319-dracut.spec-raise-systemd-requirement-to-219.patch +Patch320: 0320-iscsi-iscsiroot.sh-handle-firmware-in-online-queue.patch +Patch321: 0321-iscsi-parse-iscsiroot.sh-do-not-modify-netroot.patch +Patch322: 0322-iscsi-parse-iscsiroot.sh-handle-firmware-in-online-q.patch +Patch323: 0323-iscsi-parse-iscsiroot.sh-restart-iscsid-with-try-res.patch +Patch324: 0324-network-ifup.sh-save-return-value-of-ifup.patch +Patch325: 0325-network-also-mark-interfaces-up-with-their-MAC.patch +Patch326: 0326-network-ifup.sh-only-use-dhcp-on-unknown-interfaces-.patch +Patch327: 0327-multipath-add-hostonly-multipath.conf.patch +Patch328: 0328-cms-cmsifup.sh-do-not-use-ifup-m.patch +Patch329: 0329-network-ifup-fix-warning-about-not-bringing-interfac.patch +Patch330: 0330-network-net-lib.sh-fix-wait_for_if_up.patch +Patch331: 0331-network-net-lib.sh-fix-IPv6-route-parsing.patch +Patch332: 0332-network-ifup-do-DHCP-for-BOOTDEV.patch +Patch333: 0333-qemu-add-spapr-vscsi-kernel-module.patch +Patch334: 0334-livenet-livenetroot.sh-fixed-error-condition.patch +Patch335: 0335-iscsi-parse-iscsiroot.sh-only-set-initiator-name-if-.patch +Patch336: 0336-network-move-ip-ibft-handling-to-network-module.patch +Patch337: 0337-dracut.usage.asc-update-man-page.patch +Patch338: 0338-network-dhclient-script.sh-fix-RENEW.patch +Patch339: 0339-network-add-all_ifaces_setup.patch +Patch340: 0340-iscsi-iscsiroot.sh-use-all_ifaces_setup.patch +Patch341: 0341-network-netroot.sh-better-handling-of-netroot-and-dh.patch +Patch342: 0342-iscsi-iscsiroot.sh-handle-iscsi_firmware-in-online-a.patch +Patch343: 0343-i18n-check-for-i18n_install_all-yes-rather-than-bein.patch +Patch344: 0344-dracut.sh-add-command-line-option-for-install_i18_al.patch +Patch345: 0345-dracut.sh-do-not-create-microcode-if-no-firmware-is-.patch +Patch346: 0346-scsi-parse-iscsiroot.sh-call-modprobe-with-b.patch +Patch347: 0347-iscsi-parse-iscsiroot.sh-correct-handling-if-netroot.patch +Patch348: 0348-dracut.sh-no-microcode-if-get_ucode_file-returns-emp.patch +Patch349: 0349-network-wait_for_ifup-handle-NO-CARRIER-output.patch +Patch350: 0350-base-dracut-lib.sh-info-be-more-quiet.patch +Patch351: 0351-dracut-functions.sh-avoid-tokenizing-ldconfig-output.patch +Patch352: 0352-dracut.sh-fixed-typo-in-microcode-generation.patch +Patch353: 0353-90qemu-fixed-systemd-detect-virt-output-parsing.patch +Patch354: 0354-ifcfg-write-ifcfg.sh-unset-vlan.patch +Patch355: 0355-base-dracut-lib.sh-getargs-don-t-return-1-for-empty-.patch +Patch356: 0356-ifcfg-write-ifcfg.sh-don-t-bind-interface-if-physica.patch +Patch357: 0357-network-ifup.sh-skip-empty-nameserver-values.patch +Patch358: 0358-write-ifcfg-fix-creating-configuration-for-VLAN.patch +Patch359: 0359-90qemu-also-add-ibmvscsi-on-qemu.patch +Patch360: 0360-Don-t-call-udevadm-control-exit-in-systemd-mode.patch +Patch361: 0361-iscsi-iscsiroot.sh-better-put-variables-in-quotes.patch +Patch362: 0362-network-fix-carrier-detection.patch +Patch363: 0363-dracut-functions.sh-fix-check_vol_slaves-volume-grou.patch +Patch364: 0364-multipath-fix-majmin_to_mpath_dev.patch +Patch365: 0365-90lvm-Install-dm-snapshot-module.patch +Patch366: 0366-systemd-add-wheel-and-adm-to-passwd-and-group.patch +Patch367: 0367-dracut-add-tar-and-dd-requirement.patch +Patch368: 0368-dracut.sh-for-microcode-generation-skip-gpg-files.patch +Patch369: 0369-documentation-hostonly-i18n-no-hostonly-i18n-i18n_in.patch +Patch370: 0370-network-dhclient-script.sh-add-classless-static-rout.patch +Patch371: 0371-network-if-rd.neednet-0-we-don-t-need-a-bootdev.patch +Patch372: 0372-url-lib-url-lib.sh-nfs_fetch_url-pass-file-directory.patch +Patch373: 0373-95iscsi-Autodetect-iSCSI-firmware.patch +Patch374: 0374-95iscsi-Install-libgcc_s-library.patch +Patch375: 0375-95iscsi-Fixup-bnx2i-offload-booting.patch +Patch376: 0376-95iscsi-More-empty-cmdline-fixes.patch +Patch377: 0377-95iscsi-parse-output-from-iscsiadm-correctly.patch +Patch378: 0378-shutdown-guard-against-read-only-run.patch +Patch379: 0379-kernel-modules-increase-SDHCI-driver-inclusion.patch +Patch380: 0380-dracut-functions.sh-add-str_starts-and-str_ends.patch +Patch381: 0381-test-remove-dash-module-as-it-is-not-available-in-RH.patch +Patch382: 0382-test-NBD-add-checks-for-needed-binaries.patch +Patch383: 0383-dracut.spec-add-a-tag-with-the-current-version.patch +Patch384: 0384-more-dash-removal.patch +Patch385: 0385-network-add-73-idrac.rules-udev-rules.patch +Patch386: 0386-base-dracut-lib.sh-add-trim.patch +Patch387: 0387-network-net-genrules.sh-generate-rules-for-all-inter.patch +Patch388: 0388-ifup-setup-bridge-bonding-and-teaming-only-once.patch +Patch389: 0389-network-parse-bond.sh-handle-multiple-bond-interface.patch +Patch390: 0390-TEST-50-MULTINIC-add-multiple-bond-tests.patch +Patch391: 0391-network-dhclient.conf-add-missing-commata.patch +Patch392: 0392-systemd-add-.slice-and-make-reboot-work.patch +Patch393: 0393-test-TEST-02-systemd-use-marker-disk-for-successfull.patch +Patch394: 0394-Disable-early-microcode-for-non-x86-architecures.patch +Patch395: 0395-fcoe-check-if-needed-for-hostonly.patch +Patch396: 0396-dracut-only-use-one-tmpdir.patch +Patch397: 0397-add-install-optional-and-install_optional_items.patch +Patch398: 0398-dracut-nbd-Only-complain-of-missing-binary-in-hoston.patch +Patch399: 0399-Replace-echo-n-with-printf-in-code-with-a-bin-sh-she.patch +Patch400: 0400-Reset-IFS-variable.patch +Patch401: 0401-Defer-modprobe-of-HW-modules-until-udev-is-running.patch +Patch402: 0402-95fcoe-start-lldpad-separately.patch +Patch403: 0403-95fcoe-skip-VLAN-devices-in-fcoe-up.patch +Patch404: 0404-95fcoe-Store-current-configuration-in-dracut-cmdline.patch +Patch405: 0405-95fcoe-update-fcoe-interface-check.patch +Patch406: 0406-fcoe-up-remove-initlog-logic.patch +Patch407: 0407-network-net-lib.sh-correctly-set-mac-address-for-ip-.patch +Patch408: 0408-network-support-macaddr-in-brackets.patch +Patch409: 0409-test-don-t-call-ldconfig-with-path-separator.patch +Patch410: 0410-network-set-MTU-and-MACADDR-for-dhcp-and-auto6.patch +Patch411: 0411-test-add-TEST-60-MTUMAC.patch +Patch412: 0412-network-net-lib.sh-parse_ifname_opts-support-21-byte.patch +Patch413: 0413-network-net-lib.sh-wait_for_ipv6_dad-simplify-ip-cal.patch +Patch414: 0414-systemd-ensure-journal-is-volatile.patch +Patch415: 0415-network-dhcp-before-parsing-specified-dns-through-cm.patch +Patch416: 0416-network-net-lib.sh-delete-duplicated-DNS-items-from-.patch +Patch417: 0417-40network-Update-iBFT-scanning-code-to-handle-IPv6.patch +Patch418: 0418-network-net-lib.sh-auto6-wait-for-route-ra.patch +Patch419: 0419-network-differ-between-ipv6-local-and-global-tentati.patch +Patch420: 0420-network-flush-only-IPv4-addresses-on-configuration.patch +Patch421: 0421-network-wait_for_ipv6_auto-wait-for-all-tentative-ad.patch +Patch422: 0422-dracut-systemd-dracut-cmdline.sh-Don-t-error-out-if-.patch +Patch423: 0423-virtfs-use-systemd-generator.patch +Patch424: 0424-add-rd.device.timeout-seconds-parameter.patch +Patch425: 0425-test-TEST-04-systemd-fixup-test.patch +Patch426: 0426-test-TEST-12-RAID-DEG-add-rd.device.timeout.patch +Patch427: 0427-99base-init.sh-break-the-initqueue-if-emergency-shel.patch +Patch428: 0428-systemd-dracut-initqueue.sh-don-t-go-into-emergency.patch +Patch429: 0429-systemd-let-booting-work-after-exiting-emergency.patch +Patch430: 0430-TEST-13-ENC-RAID-LVM-add-rd.device.timeout-40.patch +Patch431: 0431-TEST-14-IMSM-add-rd.device.timeout.patch +Patch432: 0432-lsinitrd-Suppress-cat-write-error-Broken-pipe.patch +Patch433: 0433-network-support-multiple-vlan-team-bridge-and-bond.patch +Patch434: 0434-TEST-70-BONDBRIDGETEAMVLAN-add-testcase-for-testsuit.patch +Patch435: 0435-dracut.spec-remove-dd.patch +Patch436: 0436-watchdog-Do-not-add-hooks-if-systemd-module-is-inclu.patch +Patch437: 0437-watchdog-install-module-for-active-watchdog.patch +Patch438: 0438-watchdog-ensure-that-module-is-loaded-as-early-as-po.patch +Patch439: 0439-watchdog-module-setup.sh-rewrite.patch +Patch440: 0440-watchdog-clean-return-of-installkernel.patch +Patch441: 0441-watchdog-start-traversing-the-device-tree-from-the-r.patch +Patch442: 0442-dracut.spec-remove-trailing-space.patch +Patch443: 0443-fips-use-lib-modules-uname-r-modules.fips.patch +Patch444: 0444-fips-add-sha1-mb-to-fips-modules.patch +Patch445: 0445-nfs-install-all-nfs-modules-non-hostonly.patch +Patch446: 0446-dracut.sh-extend-host_fs_types-with-filesystems.patch +Patch447: 0447-lvm-include-etc-lvm-lvm_-host_tag-.conf.patch +Patch448: 0448-add-rd.emergency-reboot-poweroff-halt.patch +Patch449: 0449-fips-module-add-missing-spaces.patch +Patch450: 0450-fips-remove-sha1-mb.patch +Patch451: 0451-dracut-functions.sh-catch-all-lvm-slaves.patch +Patch452: 0452-systemd-dracut-cmdline.sh-unset-UNSET-root.patch +Patch453: 0453-network-ibft-put-IPv6-IP-in-brackets.patch +Patch454: 0454-url-lib-ca-bundle.crt-changed-to-a-symlink.patch +Patch455: 0455-dracut.sh-document-hostonly-i18n-and-no-hostonly-i18.patch +Patch456: 0456-dracut.cmdline.7.asc-document-rd.shell-0-for-rd.emer.patch +Patch457: 0457-nfs-install-more-kernel-modules.patch +Patch458: 0458-TEST-16-DMSQUASH-add-sr_mod.patch +Patch459: 0459-fcoe-only-install-etc-hba.conf-it-it-exists.patch +Patch460: 0460-network-parse-ip-opts-be-more-liberal-to-multiple-ip.patch +Patch461: 0461-network-fix-dhcp-classless_static_routes.patch +Patch462: 0462-network-do-not-check-firmware-boot-selected-flag.patch +Patch463: 0463-add-README.md.patch +Patch464: 0464-README.md-update.patch +Patch465: 0465-test-test-rpms.txt-add-list-of-rpms-to-install.patch +Patch466: 0466-test-remove-sudo-calls.patch +Patch467: 0467-TEST-ISCSI-fix-command-check.patch +Patch468: 0468-test-test-rpms.txt-add-gzip.patch +Patch469: 0469-TEST-99-RPM-ignore-openldap-leftovers.patch +Patch470: 0470-test-Makefile-proper-return-code-for-make-check.patch +Patch471: 0471-test-rpms.txt-add-dhcp.patch +Patch472: 0472-TEST-30-ISCSI-test.sh-set-device-timeout.patch +Patch473: 0473-TEST-70-BONDBRIDGETEAMVLAN-fix-server-ip-setup.patch +Patch474: 0474-testsuite-guard-against-kernel-panic.patch +Patch475: 0475-TEST-99-RPM-speedup-test.patch +Patch476: 0476-fips-module-setup.sh-also-blacklist-the-alias-resolv.patch +Patch477: 0477-fips-fips.sh-also-check-for-crypto-mod-in-proc-crypt.patch +Patch478: 0478-README.md-correct-CentOS-build-job-link.patch +Patch479: 0479-README.md-correct-CentOS-build-job-link.patch +Patch480: 0480-README.md-correct-CentOS-build-job-link.patch +Patch481: 0481-fips-module-setup.sh-make-tcrypt-non-optional.patch +Patch482: 0482-dracut.sh-skip-empty-lines-in-proc-modules.patch +Patch483: 0483-dracut.conf.5.asc-add-Warning-about-leading-and-trai.patch +Patch484: 0484-systemd-dracut-cmdline.sh-unset-UNSET-root.patch +Patch485: 0485-add-dracut.pc-pkg-config-file.patch +Patch486: 0486-dracut.sh-fail-hard-if-we-find-modules-and-modules.d.patch +Patch487: 0487-99base-add-memtrace-ko.sh-to-debug-kernel-module-lar.patch +Patch488: 0488-99base-apply-kernel-module-memory-debug-support.patch +Patch489: 0489-dracut.cmdline.7.asc-update-document-for-rd.memdebug.patch +Patch490: 0490-testsuite-add-rd.memdebug-4-in-TEST-01-BASIC-to-test.patch +Patch491: 0491-dracut-functions.sh-remove-duplicate-declaratio-of-l.patch +Patch492: 0492-network-ifup-write-override-file-before-dhcp_do.patch +Patch493: 0493-write-ifcfg-do-t-write-MTU-twice-for-regular-eth-dev.patch +Patch494: 0494-ifup-don-t-ifup-team-master-indefinitely.patch +Patch495: 0495-95ssh-client-attempt-to-copy-UserKnownHostsFile-to-k.patch +Patch496: 0496-udev-rules-pull-in-40-redhat-cpu-hotplug.rules.patch +Patch497: 0497-Revert-systemd-dracut-initqueue.sh-don-t-go-into-eme.patch +Patch498: 0498-module-setup.sh-Add-ARM-specific-driver-to-initramfs.patch +Patch499: 0499-Add-check-for-aarch64-to-the-arm-kernel-module-list.patch +Patch500: 0500-fips-add-cmac-kernel-module.patch +Patch501: 0501-95iscsi-run-iscsistart-with-DefaultDependencies-no.patch +Patch502: 0502-01fips-add-authenec-module.patch +Patch503: 0503-fips-honor-BOOT_IMAGE-variable-for-HMAC-check-of-the.patch +Patch504: 0504-Try-BOOT_IMAGE-and-fallback-to-vmlinuz-KERNEL.patch +Patch505: 0505-dracut.cmdline-remove-extra-from-ip-doc.patch +Patch506: 0506-10i18n-parse-i18n.sh-parse-rd.vconsole-and-rd.locale.patch +Patch507: 0507-dracut.sh-introduce-no-hostonly-default-device-argum.patch +Patch508: 0508-rootfs-block-module-setup.sh-check-root_dev-in-cmdli.patch +Patch509: 0509-dracut.sh-gather-host_modalias-when-no-hostonly-defa.patch +Patch510: 0510-Add-NTFS-support-to-90dmsquash-live-module.patch +Patch511: 0511-add-90multipath-hostonly-module.patch +Patch512: 0512-spec-add-missing-modules.patch +Patch513: 0513-lvm_scan.sh-use-K-when-calling-lvchange.patch +Patch514: 0514-fcoe-Allow-more-time-for-the-bnx2x-link-negotiation-.patch +Patch515: 0515-add-mtu-parameter-for-bond-options.patch +Patch516: 0516-Fix-MTU-on-bond-interface.patch +Patch517: 0517-dracut.sh-source-dracut-version.sh-earlier-than-drac.patch +Patch518: 0518-network-Only-bring-up-wired-network-interfaces.patch +Patch519: 0519-network-ifup-don-t-arping-for-point-to-point-connect.patch +Patch520: 0520-guard-arrays-with.patch +Patch521: 0521-dracut.sh-for_each_host_xx-function-should-indicate-.patch +Patch522: 0522-dracut.sh-remove-quotes-from-install_items-and-insta.patch +Patch523: 0523-Support-Microcode-Updates-for-AMD-CPU-Family-0x17.patch +Patch524: 0524-Simplify-microcode-lookup-for-for-AMD-CPUs.patch +Patch525: 0525-01fips-Fix-creating-path-to-.hmac-of-kernel-based-on.patch +Patch526: 0526-01fips-Properly-fix-creating-path-to-.hmac-of-kernel.patch +Patch527: 0527-dracut-Ajusting-variables-name-for-include.patch +Patch528: 0528-90dmsquash-live-we-don-t-have-find_binary-inside-ini.patch +Patch529: 0529-90dmsquash-live-ntfs-fix-depends.patch +Patch530: 0530-dracut-lib.sh-dev_unit_name-use-systemd-escape-if-av.patch +Patch531: 0531-Align-dev_unit_name-with-systemd-s-function.patch +Patch532: 0532-base-dracut-lib.sh-remove-bashism.patch +Patch533: 0533-base-dracut-lib.sh-dev_unit_name-guard-against-dev-b.patch +Patch534: 0534-90lvm-always-add-dm-snapshot.patch +Patch535: 0535-dracut.sh-workaround-broken-read-from-proc-modules.patch +Patch536: 0536-net-lib-bump-carrier-timeout-to-15.patch +Patch537: 0537-dracut-function.sh-check_block_and_slaves-check-for-.patch +Patch538: 0538-dracut-functions.sh-check_vol_slaves-speedup-LV-VG-n.patch +Patch539: 0539-40network-introduce-ip-either6-option.patch +Patch540: 0540-Fix-loading-of-modules-in-modules-load.d.patch +Patch541: 0541-Skip-iscsi-attachment-if-no-info.patch +Patch542: 0542-dracut-Introduce-force-drivers-parameter-and-force_d.patch +Patch543: 0543-mdraid-mdraid_start.sh-tell-mainloop-if-we-make-prog.patch +Patch544: 0544-mdraid-wait-for-rd.md.uuid-specified-devices-to-be-a.patch +Patch545: 0545-fcoe-handle-CNAs-with-DCB-firmware-support.patch +Patch546: 0546-40network-dhclient.conf-rename-classless-routes-to-c.patch +Patch547: 0547-Record-loaded-kernel-modules-when-hostonly-mode-is-e.patch +Patch548: 0548-Correct-paths-for-openSUSE.patch +Patch549: 0549-Introduce-tri-state-hostonly-mode.patch +Patch550: 0550-Revert-add-90multipath-hostonly-module.patch +Patch551: 0551-dracut.spec-remove-90multipath-hostonly.patch +Patch552: 0552-dracut-functions-fix-the-word-splitting.patch +Patch553: 0553-kernel-modules-add-nfit.patch +Patch554: 0554-added-make-rpm-srpm-options.patch +Patch555: 0555-fips-check-fips-integrity-just-before-mounting-local.patch +Patch556: 0556-Harden-dracut-against-BASH_ENV-environment-variable.patch +Patch557: 0557-iscsi-always-popd-even-if-there-is-no-iscsi-device.patch +Patch558: 0558-fips-ensure-fs-module-for-boot-is-installed.patch +Patch559: 0559-fips-removed-false-positive-FATAL-Module-xxx-not-fou.patch +Patch560: 0560-95iscsi-iscsiroot-synchronously-wait-until-iscsistar.patch +Patch561: 0561-rootfs-generator-rebase-to-upstream-version.patch +Patch562: 0562-fips-split-loading-the-crypto-modules-and-checking-t.patch +Patch563: 0563-network-skip-already-enslaved-interfaces.patch +Patch564: 0564-rootfs-generator-don-t-set-JobRunningTimeoutSec.patch + + +BuildRequires: bash git + +%if 0%{?fedora} || 0%{?rhel} +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: pkgconfig +%endif +%if 0%{?fedora} +BuildRequires: bash-completion +BuildRequires: pkgconfig +%endif + +%if 0%{?suse_version} +BuildRoot: %{_tmppath}/%{name}-%{version}-build +%endif + +%if 0%{?fedora} || 0%{?rhel} +BuildRequires: docbook-style-xsl docbook-dtds libxslt +%endif + +%if 0%{?suse_version} +-BuildRequires: docbook-xsl-stylesheets libxslt +%endif + +BuildRequires: asciidoc + +%if 0%{?fedora} > 12 || 0%{?rhel} +# no "provides", because dracut does not offer +# all functionality of the obsoleted packages +Obsoletes: mkinitrd <= 6.0.93 +Obsoletes: mkinitrd-devel <= 6.0.93 +Obsoletes: nash <= 6.0.93 +Obsoletes: libbdevid-python <= 6.0.93 +%endif + +%if 0%{?fedora} > 16 || 0%{?rhel} > 6 +BuildRequires: systemd-units +%endif + +%if 0%{?suse_version} > 9999 +Obsoletes: mkinitrd < 2.6.1 +Provides: mkinitrd = 2.6.1 +%endif + +Obsoletes: dracut-kernel < 005 +Provides: dracut-kernel = %{version}-%{release} + +Obsoletes: dracut <= 029 +Obsoletes: dracut-norescue +Provides: dracut-norescue + +Requires: bash >= 4 +Requires: coreutils +Requires: cpio +Requires: filesystem >= 2.1.0 +Requires: findutils +Requires: grep +Requires: hardlink +Requires: gzip xz +Requires: kmod +Requires: sed +Requires: kpartx +Requires: tar + +%if 0%{?fedora} || 0%{?rhel} > 6 +Requires: util-linux >= 2.21 +Requires: systemd >= 219 +Requires: procps-ng +Conflicts: grubby < 8.23 +%else +Requires: udev > 166 +Requires: util-linux-ng >= 2.21 +%endif + +%if 0%{?fedora} || 0%{?rhel} > 6 +Conflicts: initscripts < 8.63-1 +Conflicts: plymouth < 0.8.0-0.2009.29.09.19.1 +%endif + +Conflicts: mdadm < 3.2.6-14 + +%description +dracut contains tools to create a bootable initramfs for 2.6 Linux kernels. +Unlike existing implementations, dracut does hard-code as little as possible +into the initramfs. dracut contains various modules which are driven by the +event-based udev. Having root on MD, DM, LVM2, LUKS is supported as well as +NFS, iSCSI, NBD, FCoE with the dracut-network package. + +%package network +Summary: dracut modules to build a dracut initramfs with network support +Requires: %{name} = %{version}-%{release} +Requires: iputils +Requires: iproute +Requires: dhclient +Obsoletes: dracut-generic < 008 +Provides: dracut-generic = %{version}-%{release} + +%description network +This package requires everything which is needed to build a generic +all purpose initramfs with network support with dracut. + +%if 0%{?fedora} || 0%{?rhel} >= 6 || 0%{?suse_version} +%package fips +Summary: dracut modules to build a dracut initramfs with an integrity check +Requires: %{name} = %{version}-%{release} +Requires: hmaccalc +%if 0%{?rhel} > 5 +# For Alpha 3, we want nss instead of nss-softokn +Requires: nss +%else +Requires: nss-softokn +%endif +Requires: nss-softokn-freebl + +%description fips +This package requires everything which is needed to build an +initramfs with dracut, which does an integrity check. +%endif + +%package fips-aesni +Summary: dracut modules to build a dracut initramfs with an integrity check with aesni-intel +Requires: %{name}-fips = %{version}-%{release} + +%description fips-aesni +This package requires everything which is needed to build an +initramfs with dracut, which does an integrity check and adds the aesni-intel kernel module. + +%package caps +Summary: dracut modules to build a dracut initramfs which drops capabilities +Requires: %{name} = %{version}-%{release} +Requires: libcap + +%description caps +This package requires everything which is needed to build an +initramfs with dracut, which drops capabilities. + +%package config-generic +Summary: dracut configuration to turn off hostonly image generation +Requires: %{name} = %{version}-%{release} +Obsoletes: dracut-nohostonly +Provides: dracut-nohostonly + +%description config-generic +This package provides the configuration to turn off the host specific initramfs +generation with dracut and generates a generic image by default. + +%package config-rescue +Summary: dracut configuration to turn on rescue image generation +Requires: %{name} = %{version}-%{release} +Obsoletes: dracut <= 029 + +%description config-rescue +This package provides the configuration to turn on the rescue initramfs +generation with dracut. + +%package tools +Summary: dracut tools to build the local initramfs +Requires: %{name} = %{version}-%{release} + +%description tools +This package contains tools to assemble the local initrd and host configuration. + +%prep +%setup -q -n %{name}-%{version} + +%if %{defined PATCH1} +git init +git config user.email "dracut-maint@redhat.com" +git config user.name "Fedora dracut team" +git add . +git commit -a -q -m "%{version} baseline." + +# Apply all the patches. +git am -p1 %{patches} +git tag %{version} +%endif + +%build +%configure --systemdsystemunitdir=%{_unitdir} --bashcompletiondir=$(pkg-config --variable=completionsdir bash-completion) --libdir=%{_prefix}/lib + +make %{?_smp_mflags} + +%install +%if 0%{?fedora} || 0%{?rhel} +rm -rf -- $RPM_BUILD_ROOT +%endif +make %{?_smp_mflags} install \ + DESTDIR=$RPM_BUILD_ROOT \ + libdir=%{_prefix}/lib + +echo "DRACUT_VERSION=%{version}-%{release}" > $RPM_BUILD_ROOT/%{dracutlibdir}/dracut-version.sh + +%if 0%{?fedora} == 0 && 0%{?rhel} == 0 && 0%{?suse_version} == 0 +rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/01fips +rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/02fips-aesni +%endif + +%if %{defined _unitdir} +# for systemd, better use systemd-bootchart +rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/00bootchart +%endif + +# we do not support dash in the initramfs +rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/00dash + +# remove gentoo specific modules +rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/50gensplash + +%if %{defined _unitdir} +# with systemd IMA and selinux modules do not make sense +rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/96securityfs +rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/97masterkey +rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/98integrity +%endif + +mkdir -p $RPM_BUILD_ROOT/boot/dracut +mkdir -p $RPM_BUILD_ROOT/var/lib/dracut/overlay +mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log +touch $RPM_BUILD_ROOT%{_localstatedir}/log/dracut.log +mkdir -p $RPM_BUILD_ROOT%{_sharedstatedir}/initramfs + +%if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version} +install -m 0644 dracut.conf.d/fedora.conf.example $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/01-dist.conf +install -m 0644 dracut.conf.d/fips.conf.example $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/40-fips.conf +%endif + +%if 0%{?suse_version} +install -m 0644 dracut.conf.d/suse.conf.example $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/01-dist.conf +%endif + +%if 0%{?fedora} <= 12 && 0%{?rhel} < 6 && 0%{?suse_version} <= 9999 +rm -f -- $RPM_BUILD_ROOT%{_bindir}/mkinitrd +rm -f -- $RPM_BUILD_ROOT%{_bindir}/lsinitrd +%endif + +%if 0%{?fedora} || 0%{?rhel} > 6 +# FIXME: remove after F19 +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/kernel/postinst.d +install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kernel/postinst.d/51-dracut-rescue-postinst.sh + +echo 'hostonly="no"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/02-generic-image.conf +echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/02-rescue.conf +%endif + +%if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version} +> $RPM_BUILD_ROOT/etc/system-fips +%endif + +# create compat symlink +mkdir -p $RPM_BUILD_ROOT%{_sbindir} +ln -sr $RPM_BUILD_ROOT%{_bindir}/dracut $RPM_BUILD_ROOT%{_sbindir}/dracut + +%clean +rm -rf -- $RPM_BUILD_ROOT + +%files +%defattr(-,root,root,0755) +%doc README HACKING TODO COPYING AUTHORS NEWS dracut.html dracut.png dracut.svg +%{_bindir}/dracut +# compat symlink +%{_sbindir}/dracut +%{_datadir}/bash-completion/completions/dracut +%{_datadir}/bash-completion/completions/lsinitrd +%if 0%{?fedora} > 12 || 0%{?rhel} >= 6 || 0%{?suse_version} > 9999 +%{_bindir}/mkinitrd +%{_bindir}/lsinitrd +%endif +%dir %{dracutlibdir} +%dir %{dracutlibdir}/modules.d +%{dracutlibdir}/dracut-init.sh +%{dracutlibdir}/dracut-functions.sh +%{dracutlibdir}/dracut-functions +%{dracutlibdir}/dracut-version.sh +%{dracutlibdir}/dracut-logger.sh +%{dracutlibdir}/dracut-initramfs-restore +%{dracutlibdir}/dracut-install +%{dracutlibdir}/skipcpio +%config(noreplace) %{_sysconfdir}/dracut.conf +%if 0%{?fedora} || 0%{?suse_version} || 0%{?rhel} +%{dracutlibdir}/dracut.conf.d/01-dist.conf +%endif +%dir %{_sysconfdir}/dracut.conf.d +%dir %{dracutlibdir}/dracut.conf.d +%{_datadir}/pkgconfig/dracut.pc +%{_mandir}/man8/dracut.8* +%{_mandir}/man8/*service.8* +%if 0%{?fedora} > 12 || 0%{?rhel} >= 6 || 0%{?suse_version} > 9999 +%{_mandir}/man8/mkinitrd.8* +%{_mandir}/man1/lsinitrd.1* +%endif +%{_mandir}/man7/dracut.kernel.7* +%{_mandir}/man7/dracut.cmdline.7* +%{_mandir}/man7/dracut.modules.7* +%{_mandir}/man7/dracut.bootup.7* +%{_mandir}/man5/dracut.conf.5* +%if %{defined _unitdir} +%{dracutlibdir}/modules.d/00systemd-bootchart +%else +%{dracutlibdir}/modules.d/00bootchart +%endif +%{dracutlibdir}/modules.d/00bash +%{dracutlibdir}/modules.d/03modsign +%{dracutlibdir}/modules.d/03rescue +%{dracutlibdir}/modules.d/04watchdog +%{dracutlibdir}/modules.d/05busybox +%{dracutlibdir}/modules.d/10i18n +%{dracutlibdir}/modules.d/30convertfs +%{dracutlibdir}/modules.d/45url-lib +%{dracutlibdir}/modules.d/50drm +%{dracutlibdir}/modules.d/50plymouth +%{dracutlibdir}/modules.d/80cms +%{dracutlibdir}/modules.d/90bcache +%{dracutlibdir}/modules.d/90btrfs +%{dracutlibdir}/modules.d/90crypt +%{dracutlibdir}/modules.d/90dm +%{dracutlibdir}/modules.d/90dmraid +%{dracutlibdir}/modules.d/90dmsquash-live +%{dracutlibdir}/modules.d/90dmsquash-live-ntfs +%{dracutlibdir}/modules.d/90kernel-modules +%{dracutlibdir}/modules.d/90lvm +%{dracutlibdir}/modules.d/90mdraid +%{dracutlibdir}/modules.d/90multipath +%{dracutlibdir}/modules.d/90qemu +%{dracutlibdir}/modules.d/91crypt-gpg +%{dracutlibdir}/modules.d/91crypt-loop +%{dracutlibdir}/modules.d/95debug +%{dracutlibdir}/modules.d/95resume +%{dracutlibdir}/modules.d/95rootfs-block +%{dracutlibdir}/modules.d/95dasd +%{dracutlibdir}/modules.d/95dasd_mod +%{dracutlibdir}/modules.d/95fstab-sys +%{dracutlibdir}/modules.d/95zfcp +%{dracutlibdir}/modules.d/95terminfo +%{dracutlibdir}/modules.d/95udev-rules +%{dracutlibdir}/modules.d/95virtfs +%if %{undefined _unitdir} +%{dracutlibdir}/modules.d/96securityfs +%{dracutlibdir}/modules.d/97masterkey +%{dracutlibdir}/modules.d/98integrity +%endif +%{dracutlibdir}/modules.d/97biosdevname +%{dracutlibdir}/modules.d/98ecryptfs +%{dracutlibdir}/modules.d/98pollcdrom +%{dracutlibdir}/modules.d/98selinux +%{dracutlibdir}/modules.d/98syslog +%{dracutlibdir}/modules.d/98systemd +%{dracutlibdir}/modules.d/98usrmount +%{dracutlibdir}/modules.d/99base +%{dracutlibdir}/modules.d/99fs-lib +%{dracutlibdir}/modules.d/99img-lib +%{dracutlibdir}/modules.d/99shutdown +%attr(0644,root,root) %ghost %config(missingok,noreplace) %{_localstatedir}/log/dracut.log +%dir %{_sharedstatedir}/initramfs +%if %{defined _unitdir} +%{_unitdir}/dracut-shutdown.service +%{_unitdir}/shutdown.target.wants/dracut-shutdown.service +%{_unitdir}/dracut-cmdline.service +%{_unitdir}/dracut-initqueue.service +%{_unitdir}/dracut-mount.service +%{_unitdir}/dracut-pre-mount.service +%{_unitdir}/dracut-pre-pivot.service +%{_unitdir}/dracut-pre-trigger.service +%{_unitdir}/dracut-pre-udev.service +%{_unitdir}/initrd.target.wants/dracut-cmdline.service +%{_unitdir}/initrd.target.wants/dracut-initqueue.service +%{_unitdir}/initrd.target.wants/dracut-mount.service +%{_unitdir}/initrd.target.wants/dracut-pre-mount.service +%{_unitdir}/initrd.target.wants/dracut-pre-pivot.service +%{_unitdir}/initrd.target.wants/dracut-pre-trigger.service +%{_unitdir}/initrd.target.wants/dracut-pre-udev.service + +%endif +%if 0%{?fedora} || 0%{?rhel} > 6 +%{_prefix}/lib/kernel/install.d/50-dracut.install +%endif + +%files network +%defattr(-,root,root,0755) +%{dracutlibdir}/modules.d/40network +%{dracutlibdir}/modules.d/95fcoe +%{dracutlibdir}/modules.d/95iscsi +%{dracutlibdir}/modules.d/90livenet +%{dracutlibdir}/modules.d/90qemu-net +%{dracutlibdir}/modules.d/95cifs +%{dracutlibdir}/modules.d/95nbd +%{dracutlibdir}/modules.d/95nfs +%{dracutlibdir}/modules.d/95ssh-client +%{dracutlibdir}/modules.d/45ifcfg +%{dracutlibdir}/modules.d/95znet +%{dracutlibdir}/modules.d/95fcoe-uefi +%{dracutlibdir}/modules.d/99uefi-lib + +%if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version} +%files fips +%defattr(-,root,root,0755) +%{dracutlibdir}/modules.d/01fips +%{dracutlibdir}/dracut.conf.d/40-fips.conf +%config(missingok) /etc/system-fips +%endif + +%files fips-aesni +%defattr(-,root,root,0755) +%doc COPYING +%{dracutlibdir}/modules.d/02fips-aesni + +%files caps +%defattr(-,root,root,0755) +%{dracutlibdir}/modules.d/02caps + +%files tools +%defattr(-,root,root,0755) +%{_mandir}/man8/dracut-catimages.8* +%{_bindir}/dracut-catimages +%dir /boot/dracut +%dir /var/lib/dracut +%dir /var/lib/dracut/overlay + +%files config-generic +%defattr(-,root,root,0755) +%{dracutlibdir}/dracut.conf.d/02-generic-image.conf + +%files config-rescue +%defattr(-,root,root,0755) +%{dracutlibdir}/dracut.conf.d/02-rescue.conf +%if 0%{?fedora} || 0%{?rhel} > 6 +%{_prefix}/lib/kernel/install.d/51-dracut-rescue.install +%{_sysconfdir}/kernel/postinst.d/51-dracut-rescue-postinst.sh +%endif + +%changelog +* Thu Aug 29 2019 Lukas Nykryn <lnykryn@redhat.com> - 033-565 +- rootfs-generator: don't set JobRunningTimeoutSec + +* Wed Jun 19 2019 Lukas Nykryn <lnykryn@redhat.com> - 033-564 +- network: skip already enslaved interfaces + +* Tue May 14 2019 Lukas Nykryn <lnykryn@redhat.com> - 033-563 +- fips: split loading the crypto modules and checking the kernel +Resolves: #1709307 + +* Thu Apr 25 2019 Lukas Nykryn <lnykryn@redhat.com> - 033-562 +- rootfs-generator: rebase to upstream version +Resolves: #1640866 + +* Mon Apr 01 2019 Lukas Nykryn <lnykryn@redhat.com> - 033-561 +- 95iscsi/iscsiroot: synchronously wait until iscsistart finishes + +* Wed Mar 27 2019 Lukas Nykryn <lnykryn@redhat.com> - 033-560 +- fips: removed false-positive 'FATAL: Module xxx not found' error message when kernel provides a generic algo for module +- fips: ensure fs module for /boot is installed +- iscsi: always popd, even if there is no iscsi device +- Harden dracut against BASH_ENV environment variable +- fips: check fips integrity just before mounting local filesystems in /sysroot + +* Thu Sep 27 2018 Lukas Nykryn <lnykryn@redhat.com> - 033-554 +- kernel-modules: add nfit +Resolves: #1288619 + +* Thu Aug 09 2018 Lukas Nykryn <lnykryn@redhat.com> - 033-553 +- dracut-functions: fix the word splitting +Resolves: #1607744 + +* Mon Jul 30 2018 Lukas Nykryn <lnykryn@redhat.com> - 033-552 +- dracut.spec: remove 90multipath-hostonly +Resolves: #1599592 + +* Mon Jul 30 2018 Lukas Nykryn <lnykryn@redhat.com> - 033-551 +- Revert "add 90multipath-hostonly module" +- Introduce tri-state hostonly mode +Resolves: #1599592 +- Correct paths for firmware +Resolves: #1608491 +- Record loaded kernel modules when hostonly mode is enabled +Resolves: #1607744 + +* Thu Jun 21 2018 Lukas Nykryn <lnykryn@redhat.com> - 033-547 +- 40network/dhclient.conf: rename classless-routes to classless-static-routes +Resolves: #1453907 + +* Wed Jun 20 2018 Lukas Nykryn <lnykryn@redhat.com> - 033-546 +- fcoe: handle CNAs with DCB firmware support +Resolves: #1442663 +- mdraid: wait for rd.md.uuid specified devices to be assembled +Resolves: #1451660 +- dracut: Introduce --force-drivers parameter and force_drivers=+ config option +Resolves: #1577626 +- Skip iscsi attachment if no info +Resolves: #1513397 +- Fix loading of modules in modules-load.d +Resolves: #1547730 +- 40network: introduce ip=either6 option +Resolves: #1582398 +- dracut-functions.sh:check_vol_slaves() speedup LV -> VG name +Resolves: #1531503 +- dracut-function.sh:check_block_and_slaves() check for block devices +Resolves: #1549498 +- net-lib: bump carrier timeout to 15 +Resolves: #1401811 +- dracut.sh: workaround broken read from /proc/modules +Resolves: #1578222 + +* Mon Feb 19 2018 Lukas Nykryn <lnykryn@redhat.com> - 033-535 +- 90lvm: always add dm-snapshot +Resolves: #1546577 + +* Thu Feb 01 2018 Lukas Nykryn <lnykryn@redhat.com> - 033-534 +- base/dracut-lib.sh:dev_unit_name() guard against $dev beginning with "-" +- base/dracut-lib.sh: remove bashism +- Align dev_unit_name() with systemd's function. +- dracut-lib.sh:dev_unit_name(): use systemd-escape, if available +Resolves: #1306640 +- 90dmsquash-live-ntfs: fix depends() +- 90dmsquash-live: we don't have find_binary inside initramdisk +- dracut: Ajusting variables name for --include +Resolves: #1489882 + +* Wed Jan 03 2018 Lukas Nykryn <lnykryn@redhat.com> - 033-527 +- 01fips: Properly fix creating path to .hmac of kernel based on BOOT_IMAGE +Resolves: #1415032 + +* Mon Dec 18 2017 Lukáš Nykrýn <lnykryn@redhat.com> - 033-526 +- 01fips: Fix creating path to .hmac of kernel based on BOOT_IMAGE +Resolves: #1415032 + +* Mon Dec 18 2017 Lukáš Nykrýn <lnykryn@redhat.com> - 033-525 +- Support Microcode Updates for AMD CPU Family 0x17 +Resolves: #1476039 + +* Wed Dec 13 2017 Lukáš Nykrýn <lnykryn@redhat.com> - 033-523 +- dracut.sh: remove quotes from install_items and install_optional_items +Related: #1520721 + +* Fri Dec 08 2017 Lukáš Nykrýn <lnykryn@redhat.com> - 033-522 +- for_each_host_xx() function should indicate the empty case +Resolves: #1520721 + +* Fri Nov 03 2017 Lukáš Nykrýn <lnykryn@redhat.com> - 033-520 +- network/ifup: don't arping for point-to-point connections +Resolves: #1477339 +- network: Only bring up wired network interfaces +Resolves: #1480246 +- dracut.sh: source dracut-version.sh earlier than dracut-functions.sh +Resolves: #1490777 +- Fix MTU on bond interface. +- add 'mtu' parameter for bond options +Resolves: #1494265 +- fcoe: Allow more time for the bnx2x link negotiation before brining up fcoe interfaces. +Resolves: #1378910 +- lvm_scan.sh: use -K when calling lvchange +Resolves: #1489841 + +* Thu Nov 02 2017 Lukáš Nykrýn <lnykryn@redhat.com> - 033-513 +- spec: add missing modules +- add 90multipath-hostonly module +Resolves: #1457311 +- Add NTFS support to 90dmsquash-live module +Resolves: #1449410 +- dracut.sh: gather host_modalias when "--no-hostonly-default-device" is set +- rootfs-block/module-setup.sh: check root_dev in cmdline_rootfs() +- dracut.sh: introduce "--no-hostonly-default-device" argument +Resolves: #1483838 +- 10i18n/parse-i18n.sh: parse rd.vconsole and rd.locale +Resolves: #1479325 +- dracut.cmdline: remove extra ":" from ip= doc +Resolves: #1469997 +- Try BOOT_IMAGE and fallback to vmlinuz-${KERNEL} +- fips: honor $BOOT_IMAGE variable for HMAC check of the kernel +Resolves: #1415032 + +* Wed Jun 28 2017 Lukáš Nykrýn <lnykryn@redhat.com> - 033-502 +- 01fips: add authenec module +Resolves: #1465946 + +* Thu Jun 15 2017 Lukáš Nykrýn <lnykryn@redhat.com> - 033-501 +- 95iscsi: run iscsistart with DefaultDependencies=no +Resolves: #1461234 + +* Tue Jun 13 2017 Lukáš Nykrýn <lnykryn@redhat.com> - 033-500 +- fips: add cmac kernel module +Resolves: #1460865 + +* Wed Jun 07 2017 Lukáš Nykrýn <lnykryn@redhat.com> - 033-499 +- module-setup.sh: Add ARM specific driver to initramfs image +Resolves: #1459277 +- Revert "systemd/dracut-initqueue.sh: don't go into emergency" +Resolves: #1396865 +- udev-rules: pull in 40-redhat-cpu-hotplug.rules +Resolves: #1460707 + +* Thu Apr 20 2017 Lukáš Nykrýn <lnykryn@redhat.com> - 033-496 +- 95ssh-client: attempt to copy UserKnownHostsFile to kdump's initramfs +Resolves: rhbz#1360131 + +* Thu Apr 06 2017 Lukáš Nykrýn <lnykryn@redhat.com> - 033-495 +- ifup: don't ifup team master indefinitely +Resolves: rhbz#1416958 +- write-ifcfg: do't write MTU twice for regular eth devices +Resolves: rhbz#1366163 +- network/ifup: write override file before dhcp_do +Resolves: rhbz#1415004 + +* Thu Mar 16 2017 Lukáš Nykrýn <lnykryn@redhat.com> - 033-492 +- rd.memdebug=4 +Resolves: rhbz#1376661 + +* Fri Mar 10 2017 Lukáš Nykrýn <lnykryn@redhat.com> - 033-487 +- add upstream tests +- dracut.sh: fail hard, if we find modules and modules.dep is missing +Resolves: rhbz#1298656 +- add dracut.pc pkg-config file +Resolves: rhbz#1397853 +- systemd/dracut-cmdline.sh: unset "UNSET" $root +Releated: rhbz#1365667 +- dracut.conf.5.asc: add Warning about leading and trailing spaces in lists +- fips/module-setup.sh: make tcrypt non-optional + +* Wed Oct 05 2016 Lukáš Nykrýn <lnykryn@redhat.com> - 033-463 +- network: do not check "firmware boot selected flag" +Resolves: rhbz#1380581 + +* Wed Sep 07 2016 Harald Hoyer <harald@redhat.com> - 033-462 +- fix dhcp classless routes +Resolves: rhbz#1260955 + +* Tue Sep 06 2016 Harald Hoyer <harald@redhat.com> - 033-461 +- be more liberal to multiple ip= lines and ip=dhcp +Resolves: rhbz#1304069 +- don't display error for hba.conf +Resolves: rhbz#1369342 + +* Mon Sep 05 2016 Harald Hoyer <harald@redhat.com> - 033-459 +- fix TEST-16-DMSQUASH +Resolves: rhbz#1371165 + +* Fri Aug 19 2016 Harald Hoyer <harald@redhat.com> - 033-458 +- add rpcrdma to support NFSROOT over NFSoRDMA +Resolves: rhbz#1367374 + +* Wed Aug 17 2016 Harald Hoyer <harald@redhat.com> - 033-457 +- add --help documentation for --no-hostonly-i18n and --hostonly-i18n options +Resolves: rhbz#1266448 +- mention rd.shell=0 for rd.emergency +Resolves: rhbz#1359144 +- put IPv6 IP in brackets for IBFT +Resolves: rhbz#1322592 +- install symlinked ca-bundle.crt for curl and ssl +Resolves: rhbz#1341280 + +* Fri Aug 12 2016 Harald Hoyer <harald@redhat.com> - 033-453 +- fixed installation on ppc with missing root= +Resolves: rhbz#1365667 + +* Tue Aug 09 2016 Harald Hoyer <harald@redhat.com> - 033-452 +- fips: remove sha1-mb +Resolves: rhbz#1361441 +- check all lvm slaves +Resolves: rhbz#1361165 + +* Thu Jul 28 2016 Lukáš Nykrýn <lnykryn@redhat.com> - 033-450 +- fips-module: add missing spaces +Resolves: rhbz#1359677 + +* Fri Jul 22 2016 Harald Hoyer <harald@redhat.com> - 033-449 +- include /etc/lvm/lvm_<host_tag>.conf +Resolves: rhbz#1328778 +- cleanup watchdog module +Resolves: rhbz#1319986 +- make reboot/halt/poweroff work +Resolves: rhbz#1324454 +- include nfs module, if host_fs_types contains nfs + copy filesystems to host_fs_types +Resolves: rhbz#1349253 +- add kernel command line argument rd.emergency to specify a + default action rd.emergency=[reboot|poweroff|halt] +Resolves: rhbz#1359144 +- deduplicate /etc/resolv.conf +Resolves: rhbz#1332418 + +* Mon Jul 04 2016 Harald Hoyer <harald@redhat.com> - 033-436 +- ip=auto6 waits now until some router advertisments have been done +Resolves: rhbz#1242058 rhbz#1292623 +- default iSCSI off-load start is now done in the background via systemd +- don't fail on missing swap devices +Resolves: rhbz#1165736 +- on shutdown re-mount the pivot-root writeable again +Resolves: rhbz#1178497 +- fixed waiting for interface to be up +Resolves: rhbz#1289341 +- for iSCSI, wait for all interfaces to be up +Resolves: rhbz#1247478 +- correctly set MAC address on interface for DHCP +Resolves: rhbz#1274230 +- fixed detection of virtual machines +Resolves: rhbz#1170122 +- suppress building of early microcode image for non-x86 HW +Resolves: rhbz#1260187 +- show more meaningfull messages for missing binaries +Resolves: rhbz#1201035 +- backport fcoe fixes +Resolves: rhbz#1169672 +- find device mapper devices with user_friendly_names turned on +Resolves: rhbz#1299800 +- add dm-snapshot kernel module for LVM +Resolves: rhbz#1287940 +- skip gpg files for microcode generation +Resolves: rhbz#1282870 +- add description for --no-hostonly-i18n and --hostonly-i18n options +Resolves: rhbz#1266448 +- copy all requires lines from crypttab +Resolves: rhbz#1254987 +- add "wheel" and "adm" to passwd and group +Resolves: rhbz#1275792 rhbz#1287537 +- strip whitespaces from volume group name in check_vol_slaves() +Resolves: rhbz#1299879 +- dhcp: support rfc3442-classless-static-routes +Resolves: rhbz#1260955 +- activate all bridges +Resolves: rhbz#1194604 +- don't call "udevadm control --exit" +Resolves: rhbz#1277026 +- support multiple bond interfaces +Resolves: rhbz#1282679 +- configure other interfaces, if team/bond is configured +Resolves: rhbz#1282680 +- error out, if initramfs.img could not be created + and remove a partial written image +Resolves: rhbz#1235895 +- optionally install items in 01-dist.conf +Resolves: rhbz#1222529 +- fixed MAC and MUT settings in ip= command line parameter +Resolves: rhbz#1271656 + +* Wed Jun 08 2016 Harald Hoyer <harald@redhat.com> - 033-385.1 +- remove dd requirement (dd is part of corutils) +Related: rhbz#1336503 + +* Fri May 27 2016 Harald Hoyer <harald@redhat.com> - 033-385 +- add more SDHCI driver +Resolves: rhbz#1336503 +- add str_ends() function +- optimize test suite for RHEL + +* Mon May 23 2016 Harald Hoyer <harald@redhat.com> - 033-379 +- Autodetect iSCSI firmware +- check, if NFS is already mounted +Resolves: rhbz#1302764 +- fix carrier detection +- fix majmin_to_mpath_dev() +- add "wheel" and "adm" to passwd and group +Resolves: rhbz#1287537 +- add "tar" and "dd" requirement +Resolves: rhbz#1285810 +- for microcode generation, skip gpg files +- add documentation: for "--hostonly-i18n" "--no-hostonly-i18n" "i18n_install_all" +- add classless-static-routes support +Resolves: rhbz#1260955 + +* Thu Nov 26 2015 Harald Hoyer <harald@redhat.com> - 033-361 +- don't call udevadm control --exit in systemd mode +Resolves: rhbz#1276983 + +* Tue Oct 20 2015 Lukáš Nykrýn <lnykryn@redhat.com> - 033-359 +- write-ifcfg: fix creating configuration for VLAN +Resolves: rhbz#1267311 +- 90qemu: also add ibmvscsi on qemu +Resolves: rhbz#1245959 + +* Fri Oct 09 2015 Harald Hoyer <harald@redhat.com> 033-358 +- fixed qemu detection +Resolves: rhbz#1245959 +- fixed vlan ifcfg generation and nameserver handling +Resolves: rhbz#1267311 + +* Wed Sep 30 2015 Harald Hoyer <harald@redhat.com> 033-353 +- fix network wait_for_if_up() to parse NO-CARRIER +Resolves: rhbz#1249507 +- don't create garbage directories because of ldconfig + misparsing +Resolves: rhbz#1264725 + +* Thu Sep 17 2015 Harald Hoyer <harald@redhat.com> 033-349 +- no iSCSI timeout and modprobe, if iSCSI is not used +- modprobe iSCSI modules with "-b" to allow blacklisting +Resolves: rhbz#1263984 +- check for firmware file existance, before crafting + microcode cpio +Resolves: rhbz#1263798 + +* Tue Sep 15 2015 Harald Hoyer <harald@redhat.com> 033-346 +- slim down the image by not including microcode header, if + not needed +- add command line parameter for hostonly keyboard layouts + --hostonly-i18n +Resolves: rhbz#1262208 + +* Thu Sep 10 2015 Harald Hoyer <harald@redhat.com> 033-343 +- fixed more iscsi_firmware / ibft handling +Resolves: rhbz#1256814 + +* Tue Sep 08 2015 Harald Hoyer <harald@redhat.com> 033-339 +- fixed dhcp lease RENEW +Resolves: rhbz#1144277 + +* Thu Sep 03 2015 Harald Hoyer <harald@redhat.com> 033-338 +- updated the man page for grub config file modifications +Resolves: rhbz#1209962 + +* Thu Sep 03 2015 Harald Hoyer <harald@redhat.com> 033-337 +- more "ip=ibft" fixes +Resolves: rhbz#1256814 + +* Wed Sep 02 2015 Harald Hoyer <harald@redhat.com> 033-335 +- fixed livenet exit code +Related: rhbz#1256814 + +* Wed Sep 02 2015 Harald Hoyer <harald@redhat.com> 033-334 +- add spapr-vscsi kernel module for qemu +Resolves: rhbz#1245959 + +* Tue Sep 01 2015 Harald Hoyer <harald@redhat.com> 033-333 +- fixed more iSCSI handling +Resolves: rhbz#1114966 rhbz#1189891 +- fixed "ip=ibft" +Resolves: rhbz#1256814 +- fixed cmsifup and s390 ifup +Resolves: rhbz#1245660 + +* Tue Aug 25 2015 Harald Hoyer <harald@redhat.com> 033-328 +- add hostonly multipath.conf (to save memory in kdump) +Resolves: rhbz#994702 +- increase version number of systemd dependency +- fixed more iSCSI handling +Resolves: rhbz#1114966 rhbz#1189891 +- check for duplicate IPv4 address +Resolves: rhbz#1202553 + +* Tue Aug 18 2015 Harald Hoyer <harald@redhat.com> 033-314 +- fixed iSCSI handling +Resolves: rhbz#1114966 rhbz#1189891 +- check for duplicate IPv4 address +Resolves: rhbz#1202553 +- wait udev to be settled before transitioning to the real root +Resolves: rhbz#1231373 +- support ip= parameter with enx* interface for autobinding to MAC +Resolves: rhbz#1241102 +- include 40-redhat.rules in the initramfs +Resolves: rhbz#1241547 +- degrade missing binaries for modules to info level +Resolves: rhbz#1242845 +- cleanup lldpad cleanly to help out in state transition from initramfs +Resolves: rhbz#1246217 + +* Thu Jul 09 2015 Harald Hoyer <harald@redhat.com> 033-284 +- unconditionally install the drbg module in hostonly mode +Resolves: rhbz#1240438 + +* Fri Jul 03 2015 Harald Hoyer <harald@redhat.com> 033-283 +- add support for "x-initrd.mount" +Resolves: rhbz#1080405 +- add network timeout kernel command line arguments +Resolves: rhbz#1088808 +- use fcoemon and write out fcoemon config +Resolves: rhbz#1129884 rhbz#1129888 +- add fcoe module EDD parsing quirk for i40e +Resolves: rhbz#1129886 +- add RENEW to dhclient-script +Resolves: rhbz#1144277 +- only fetch squashfs.img once +Resolves: rhbz#1152485 +- add more input kernel drivers +Resolves: rhbz#1165585 rhbz#1194529 +- be more sloppy with swap partitions and don't fail without them +Resolves: rhbz#1165736 +- don't call dinfo binary +Resolves: rhbz#1167082 +- don't halt the system, if the media check is aborted +Resolves: rhbz#1167735 +- add boot option to spcecify size of live image rw overlay +Resolves: rhbz#1183566 +- fix nfs dracut module, to not alter rootok for non nfs root +Resolves: rhbz#1186004 +- don't fsck nfs +Resolves: rhbz#1186699 +- correctly parse multi line kernel command line +Resolves: rhbz#1186822 +- add hyperv_fb module +Resolves: rhbz#1187428 +- fixup IPv6 NFS addresses parsing +Resolves: rhbz#1190098 +- add drbg kernel module in fips mode +Resolves: rhbz#1193147 +- add all multipath path selector kernel modules +Resolves: rhbz#1195392 +- don't symlink /var/log /run/log +Resolves: rhbz#1199645 +- wait for IPv6 link local addresses +Resolves: rhbz#1209814 +- fix references to grub config file in dracut man page +Resolves: rhbz#1209962 +- add s390 kernel crypto modules to dracut-fips +Resolves: rhbz#1215766 +- suppress 'cat: write error: Broken pipe' for lsinitrd +Resolves: rhbz#1223888 +- enable DNS before routes to avoid race conditions +Resolves: rhbz#1226004 +- add point-to-point ethernet configured via DHCP +Resolves: rhbz#1227813 +- add virtio-pci +Resolves: rhbz#1231716 +- add cache tools for dm-cache usage +Resolves: rhbz#1234407 +- dracut-functions: move non-function code to dracut-init.sh +Resolves: rhbz#1235500 +- add more information why a dracut module could not be included +Resolves: rhbz#1236190 +- fixup iBFT parsing +Resolves: rhbz#1236610 + +* Tue Jun 16 2015 Harald Hoyer <harald@redhat.com> 033-248 +- fips: rearrange fips modules due to zlib +Resolves: rhbz#1216086 +- wait for IPV6 DAD in DHCP PREINIT6 +- wait 5s for an network link carrier to appear +Resolves: rhbz#1088808 + +* Tue Apr 28 2015 Harald Hoyer <harald@redhat.com> 033-244 +- fips: add some s390 kernel modules +Resolves: rhbz#1215766 + +* Thu Apr 02 2015 Harald Hoyer <harald@redhat.com> 033-243 +- /run/log is now symlinked to /run/initramfs/log +Resolves: rhbz#1199645 + +* Thu Feb 19 2015 Harald Hoyer <harald@redhat.com> 033-241.1 +- subversion inc + +* Thu Feb 19 2015 Harald Hoyer <harald@redhat.com> 033-241 +- fips: load the drbg kernel module +Resolves: rhbz#1194201 + +* Mon Jan 26 2015 Harald Hoyer <harald@redhat.com> 033-240 +- fixed team implementation +Resolves: rhbz#1147521 + +* Wed Jan 21 2015 Harald Hoyer <harald@redhat.com> 033-239 +- fixed team implementation +Resolves: rhbz#1147521 + +* Thu Jan 15 2015 Harald Hoyer <harald@redhat.com> 033-238 +- fixed more iscsi_target parsing +Resolves: rhbz#1176534 + +* Wed Jan 14 2015 Harald Hoyer <harald@redhat.com> 033-237 +- add support for multiple autoconf options ip=eth0:auto6,dhcp +Resolves: rhbz#1069270 +- fixed team implementation +Resolves: rhbz#1147521 + +* Tue Jan 13 2015 Harald Hoyer <harald@redhat.com> 033-233 +- fips: corrected previous fix +Resolves: rhbz#1165603 +- fixed iscsi_target parsing +Resolves: rhbz#1176534 +- skip GlobalKnownHostsFile for ssh_config +Resolves: rhbz#1086778 +- cms-write-ifcfg.sh: turn SUBCHANNELS into lowercase +Resolves: rhbz#1169384 +- fixed static routes execution +Resolves: rhbz#1101412 +- add 90-vconsole.rules +Resolves: rhbz#1162177 + +* Fri Nov 28 2014 Harald Hoyer <harald@redhat.com> 033-227 +- fips: add libfreeblpriv3.so and libfreeblpriv3.chk +Resolves: rhbz#1165603 + +* Wed Oct 29 2014 Harald Hoyer <harald@redhat.com> 033-226 +- fixed ifcfg generation for persistent interface names +Resolves: rhbz#1087945 + +* Fri Sep 12 2014 Harald Hoyer <harald@redhat.com> 033-224 +- don't enforce iSCSI target name policy +Resolves: rhbz#1078867 +- replaced "ip=auto" with "ip=dhcp" in the documentation +Resolves: rhbz#1086931 +- bind bonding and bridge interfaces to SUBCHANNELS on s390(x) +Resolves: rhbz#1090524 +- turn on ipv6, if configured +Resolves: rhbz#1091410 +- parse DASD="none" as empty +Resolves: rhbz#1096979 +- add virtio-console for qemu +Resolves: rhbz#1097999 +- fail on missing dracut modules +Resolves: rhbz#1121362 +- replace the default route +Resolves: rhbz#1137022 + +* Fri Sep 05 2014 Harald Hoyer <harald@redhat.com> 033-213 +- add "-m" option to lsinitrd to list the modules used +Resolves: rhbz#1122806 +- add "--rebuild" option to dracut +Resolves: rhbz#1123900 + +* Fri Aug 29 2014 Harald Hoyer <harald@redhat.com> 033-207 +- only fsck from the systemd side +Resolves: rhbz#1080699 +- handle multiple fcoe devices +Resolves: rhbz#1082512 +- handle entries in ssh_config +Resolves: rhbz#1086778 +- do not bind persistent interfaces to MAC +Resolves: rhbz#1087945 +- fixed iscsiroot install in initqueue +Resolves: rhbz#1094469 +- handle upper case letters in SUBCHANNELS +Resolves: rhbz#1094773 +- add rd.route kernel command line parameter +Resolves: rhbz#1101412 +- do not reload systemd on wait_for_dev +Resolves: rhbz#1126008 + +* Tue Jul 29 2014 Harald Hoyer <harald@redhat.com> 033-203 +- add rd.cmdline=ask parameter +Resolves: rhbz#1070104 + +* Mon Apr 28 2014 Harald Hoyer <harald@redhat.com> 033-161 +- add extra and weak-updates kernel module dirs +Resolves: rhbz#1086291 + +* Fri Apr 04 2014 Harald Hoyer <harald@redhat.com> 033-160 +- add fsck.<filesystem>, if it exists +Resolves: rhbz#1083654 +- set IPV6INIT=yes if inet6 is found on the interface +Resolves: rhbz#1083153 + +* Mon Mar 31 2014 Harald Hoyer <harald@redhat.com> 033-157 +- workaround fcoe timing issues +Resolves: rhbz#1080353 + +* Thu Mar 27 2014 Harald Hoyer <harald@redhat.com> 033-156 +- network: set correct lease times for DHCPv6 +Resolves: rhbz#1064365 +- include dm-cache kernel modules +Resolves: rhbz#1081435 + +* Thu Mar 27 2014 Harald Hoyer <harald@redhat.com> 033-154 +- lsinitrd: fix for chroot envs without /dev/fd +Resolves: rhbz#1081396 + +* Tue Mar 25 2014 Harald Hoyer <harald@redhat.com> 033-153 +- fcoe: wait for lldpad to be ready +Resolves: rhbz#1080353 +- network: handle "ip=dhcp6" for all interfaces +Resolves: rhbz#1064365 + +* Thu Mar 20 2014 Harald Hoyer <harald@redhat.com> 033-151 +- fixed dracut-initramfs-restore with early microcode +Resolves: rhbz#1067116 + +* Tue Mar 18 2014 Harald Hoyer <harald@redhat.com> 033-150 +- make dracut-shutdown not fail fatally +Resolves: rhbz#1067116 +- do PREINIT6 for DHCP6 +Resolves: rhbz#1064365 + +* Thu Mar 06 2014 Harald Hoyer <harald@redhat.com> 033-147 +- also do not hardcode waiting for devices +Resolves: rhbz#1073101 +Related: rhbz#985160 + +* Wed Mar 05 2014 Harald Hoyer <harald@redhat.com> 033-146 +- don't let devices timeout +Resolves: rhbz#949697 + +* Mon Mar 03 2014 Harald Hoyer <harald@redhat.com> 033-145 +- fixed argument handling for cmdline config +Resolves: rhbz#949697 + +* Fri Feb 28 2014 Harald Hoyer <harald@redhat.com> 033-144 +- wait for IPv6 tentative flag to be cleared +Resolves: rhbz#1069263 +- set correct flag file for interfaces +Resolves: rhbz#1069263 +- add systemd-sysctl service to initramfs +Resolves: rhbz#1070086 +- honor kernel cmdline, no internal cmdline anymore +Resolves: rhbz#985160 +- --mount can now take fsck options +Resolves: rhbz#1069106 + +* Wed Feb 26 2014 Harald Hoyer <harald@redhat.com> 033-137 +- added sdhci_acpi to static list of kernel modules +- add kernel drivers from the update directory to search path +Resolves: rhbz#1055774 +- set the correct initiatior name for iBFT (typo) +- try all FcoeBootDevice variables +Resolves: rhbz#1032699 +- write directly to the output file and get correct selinux label +- add sys-kernel-config.mount to the initramfs +- configure IPv6 interface for DHCP6 +Resolves: rhbz#1064365 +- Wait until the tentative flag is cleared. +Resolves: rhbz#1069263 +- no HWADDR if SUBCHANNELS are set for s390 interfaces +Resolves: rhbz#1056438 +- modify the device timeout for the root device with the rootfs-generator +Resolves: rhbz#1069133 +Resolves: rhbz#1028043 +- do not store kernel cmdline config in the initramfs about device assembly +Resolves: rhbz#949697 +- write directly to the output image +Resolves: rhbz#1062544 + +* Mon Feb 24 2014 Ray Strode <rstrode@redhat.com> 033-125 +- fix plymouth in initrd +Resolves: #1015564 + +* Mon Feb 10 2014 Harald Hoyer <harald@redhat.com> 033-124 +- fixed dns parsing for ip= parameter +Resolves: rhbz#1034287 +- skipcpio bugfixes +Resolves: rhbz#1045639 +- do not ifup, and already setup network +Resolves: rhbz#844828 +- do not run dhclient twice +Resolves: rhbz#844828 + +* Fri Jan 31 2014 Harald Hoyer <harald@redhat.com> 033-115 +- add fcoe module even in hostonly case +Resolves: rhbz#1038827 + +* Fri Jan 31 2014 Harald Hoyer <harald@redhat.com> 033-110 +- add nameservers from ibft settings +Resolves: rhbz#1034287 +- add microcode to the initramfs image by default +Resolves: rhbz#1045639 +- halt the machine for wrong checksums in FIPS mode +Resolves: rhbz#1053655 +- add kernel drivers from the update directory to search path +Resolves: rhbz#1055774 +- set the ip address lifetime for DHCP setups +Resolves: rhbz#1058519 + +* Tue Jan 28 2014 Daniel Mach <dmach@redhat.com> - 033-89 +- Mass rebuild 2014-01-24 + +* Fri Jan 24 2014 Harald Hoyer <harald@redhat.com> 033-88 +- fixed iscsistart for iscsi_firmware +Related: rhbz#1031160 + +* Wed Jan 22 2014 Harald Hoyer <harald@redhat.com> 033-86 +- fixed iscsistart for iscsi_firmware +Related: rhbz#1031160 + +* Mon Jan 20 2014 Harald Hoyer <harald@redhat.com> 033-85 +- fixed shebang of dracut-lib.sh +Related: rhbz#1031160 + +* Fri Jan 17 2014 Harald Hoyer <harald@redhat.com> 033-84 +- fixed iscsistart for iscsi_firmware +Related: rhbz#1031160 +- add more drivers +Resolves: rhbz#1048403 +Resolves: rhbz#1038827 +- add rd.bootif=0 parameter +Resolves: rhbz#1044623 +- halt the machine, if FIPS fails +- do not exit != 0 for dracut-rootfs-generator + +* Mon Jan 13 2014 Ray Strode <rstrode@redhat.com> 033-69 +- Add udev seat rules for plymouth +Related: #1043689 +Related: #1026571 + +* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 033-68 +- Mass rebuild 2013-12-27 + +* Wed Dec 18 2013 Harald Hoyer <harald@redhat.com> 033-67 +- fixed luks timeout +Resolves: rhbz#949697 +- do not systemctl daemon-reload +Resolves: rhbz#1023039 rhbz#1028043 +- do not do dhcp on interfaces with no link +Resolves: rhbz#1029062 +- do iscsistart for iscsi_firmware even without network +Resolves: rhbz#1031160 + +* Mon Nov 04 2013 Harald Hoyer <harald@redhat.com> 033-40 +- fips: include crct10dif_generic +Resolves: rhbz#1024455 +- add /etc/system-fips in the initramfs +Resolves: rhbz#1014284 + +* Wed Oct 30 2013 Harald Hoyer <harald@redhat.com> 033-39 +- fixed booting with rd.iscsi.firmware and without root= +Resolves: rhbz#1024858 +- fixed resuming +- fix swap detection in hostonly +- fixed missing modules in hostonly, which have no modalias +Resolves: rhbz#1015284 +- moved dracut to /usr/sbin + +* Mon Oct 21 2013 Harald Hoyer <harald@redhat.com> 033-32 +- fixed LVM with thin provisioning +Resolves: rhbz#1020855 + +* Fri Oct 18 2013 Harald Hoyer <harald@redhat.com> 033-30 +- fixed LVM with thin provisioning +Resolves: rhbz#1020855 + +* Wed Oct 09 2013 Harald Hoyer <harald@redhat.com> 033-26 +- create /dev/mapper/live-base for anaconda +Resolves: rhbz#1009710 +- support "rootfallback=<root fallback device>" +Resolves: rhbz#727333 +- add UEFI FCoE boot support +Resolves: rhbz#732059 +- Make udev db records for MD devices persistent + so LVM on MD autoactivation works correctly +Resolves: rhbz#1017031 +- support mdadm-3.2.6+ and mdadm-3.3+ +- install lvm thin utils for non-hostonly also + +* Wed Oct 02 2013 Harald Hoyer <harald@redhat.com> 033-14 +- hopefully fixed systemd-cat test +Resolves: rhbz#1002021 + +* Tue Oct 01 2013 Harald Hoyer <harald@redhat.com> 033-4 +- add /etc/system-fips +Resolves: rhbz#1014284 + +* Fri Sep 13 2013 Harald Hoyer <harald@redhat.com> 033-3 +- do not dhcp members of team, bond, etc. + +* Fri Sep 13 2013 Harald Hoyer <harald@redhat.com> 033-2 +- harden against weird ppc kernel driver +Resolves: rhbz#1007891 + +* Wed Sep 04 2013 Harald Hoyer <harald@redhat.com> 032-23 +- do not fail on empty dracut module directories +Resolves: rhbz#1003153 +- parse cmdline parameter, even if rootok=1 +Resolves: rhbz#978330 +- fixed ibft_to_cmdline() + +* Thu Aug 29 2013 Harald Hoyer <harald@redhat.com> 032-19 +- fixed curl error with zero size kickstart file +Resolves: rhbz#989133 +- fixed systemd-cat failure, when systemd is installed + but not actually running +Resolves: rhbz#1002021 +- do not fail on empty dracut module directories +Resolves: rhbz#1003153 + +* Tue Aug 20 2013 Harald Hoyer <harald@redhat.com> 032-1 +- fix for kdump in FIPS mode +Resolves: rhbz#920931 +- fixed iBFT booting +Resolves: rhbz#989944 +- fixed FIPS mode initramfs creation +Resolves: rhbz#990250 +- shutdown: fixed killall_proc_mountpoint() +Resolves: rhbz#996549 +- disable lvmetad in the initramfs +Resolves: rhbz#996627 +- require dhclient + +* Mon Aug 12 2013 Harald Hoyer <harald@redhat.com> 031-29.git20130812 +- added missing "then" in initqueue + +* Mon Aug 12 2013 Harald Hoyer <harald@redhat.com> 031-28.git20130812 +- fixed typo in hostonly device recognition + +* Fri Aug 09 2013 Harald Hoyer <harald@redhat.com> 031-24.git20130809 +- fixed logging to journal + +* Fri Aug 09 2013 Harald Hoyer <harald@redhat.com> 031-23.git20130809 +- fixed lsinitrd + +* Fri Aug 09 2013 Harald Hoyer <harald@redhat.com> 031-22.git20130809 +- lsinitrd.sh: add old cpio signature +- dracut.sh: call find with -print0 and cpio with --null +- dracut.asc: small corrections +- systemd/dracut-initqueue.sh: continue to boot if finished failed +- dracut.sh/dracut-functions.sh: handle root on non-block device +- dracut-functions.sh: removed non dracut-install shell functions +- dracut-functions.sh: inst_multiple == dracut_install +- 51-dracut-rescue.install: fixed rescue image creation +- dracut.sh: do not strip in FIPS mode +Resolves: rhbz#990250 +- dracut.sh: check the value of --kver +- crypt: Fix typo--/etc/crypttab not /etc/cryptab +- network/net-lib.sh: fix ibft interface configuration +- iscsi/module-setup.sh: install some modules regardless of hostonly +- multipath: need_shutdown if multipath devices exist +Resolves: rhbz#994913 +- omit drivers fix + +* Thu Aug 01 2013 Harald Hoyer <harald@redhat.com> 031-7.git20130801 +- also install vt102 terminfo + +* Wed Jul 31 2013 Harald Hoyer <harald@redhat.com> 031-6.git20130731 +- cmssetup: fixed port for zfcp.conf +- lvm: call lvchange with --yes to boot from snapshots + +* Wed Jul 31 2013 Harald Hoyer <harald@redhat.com> 031-4.git20130731 +- remove action_on_fail kernel command line parameter + +* Wed Jul 31 2013 Harald Hoyer <harald@redhat.com> 031-3.git20130731 +- do not include adjtime and localtime in the initramfs +- write out vlan configs + +* Wed Jul 31 2013 Harald Hoyer <harald@redhat.com> 031-1 +- do not include the resume dracut module in hostonly mode, + if no swap is present +- don't warn twice about omitted modules +- use systemd-cat for logging on systemd systems, if logfile is unset +- fixed PARTUUID parsing +- support kernel module signing keys +- do not install the usrmount dracut module in hostonly mode, + if /sbin/init does not live in /usr +- add debian udev rule files +- add support for bcache +- network: handle bootif style interfaces + e.g. ip=77-77-6f-6f-64-73:dhcp +- add support for kmod static devnodes +- add vlan support for iBFT + +* Wed Jul 24 2013 Kyle McMartin <kyle@redhat.com> 030-2 +- Add ehci-tegra.ko to initramfs to allow rawhide tegra based platforms + to boot off USB disks. + +* Wed Jul 17 2013 Harald Hoyer <harald@redhat.com> 030-1 +- support new persistent network interface names +- fix findmnt calls, prevents hang on stale NFS mounts +- add systemd.slice and slice.target units +- major shell cleanup +- support root=PARTLABEL= and root=PARTUUID= +- terminfo: only install l/linux v/vt100 and v/vt220 +- unset all LC_* and LANG, 10% faster +- fixed dependency loop for dracut-cmdline.service +- do not wait_for_dev for the root devices +- do not wait_for_dev for devices, if dracut-initqueue is not needed +- support early microcode loading with --early-microcode +- dmraid, let dmraid setup its own partitions +- sosreport renamed to rdsosreport + +* Fri Jun 14 2013 Harald Hoyer <harald@redhat.com> 029-1 +- wait for IPv6 auto configuration +Resolves: rhbz#973719 +- i18n: make the default font configurable +- systemd/dracut-pre-pivot.service: also execute for cleanup hooks or rd.break +- add dracut-shutdown.service.8 manpage +- lvm: redirect error message of lvs to /dev/null +Resolves: rhbz#921235 + +* Wed Jun 12 2013 Harald Hoyer <harald@redhat.com> 028-1 +- lvm: fixed "thin" recognition +Resolves: rhbz#921235 +- install libs also from one dir above + fixes booting power6 generated initramfs on power7 +- setup correct system time and time zone in initrd +- cms fixups +Resolves: rhbz#970982 rhbz#971025 rhbz#825199 +- iso-scan/filename fixes +Resolves: rhbz#972337 +- add udev rules for persistent network naming +Resolves: rhbz#972662 + +* Tue Jun 04 2013 Dennis Gilmore <dennis@ausil.us> 027-82.git20130531 +- add patch to include panel-tfp410 module on arm systems + +* Fri May 31 2013 Harald Hoyer <harald@redhat.com> 027-81.git20130531 +- fix btrfs mount flags for /usr +- degrade message about missing tools for stripping +Resolves: rhbz#958519 +- set environment vars DRACUT_SYSTEMD, NEWROOT in service file +Resolves: rhbz#963159 +- don't add volatile swap partitions to host_devs +- add libssl.so.10 to make kdump work with fips mode +- readd selinux dracut module for kdump +- url-lib/url-lib.sh: turn off curl globbing +Resolves: rhbz#907497 +- include btrfs-zero-log in the initramfs +Resolves: rhbz#963257 +- proper NAME the network interfaces +Resolves: rhbz#965842 +- install default font latarcyrheb-sun16 +Resolves: rhbz#927564 +- optionally install /etc/pcmcia/config.opts +Resolves: rhbz#920076 +- fix ONBOOT for slaves, set TYPE=Bond for bonding +Resolves: rhbz#919001 +- add nvme kernel module +Resolves: rhbz#910734 +- add xfs_metadump +- selinux: load_policy script fix +- add hid-hyperv and hv-vmbus kernel modules +- add parameter rd.live.squashimg +Resolves: rhbz#789036 rhbz#782108 +- wait for all required interfaces if "rd.neednet=1" +Resolves: rhbz#801829 +- lvm: add tools for thin provisioning +Resolves: rhbz#921235 +- ifcfg/write-ifcfg.sh: fixed ifcfg file generation +- do not wait for mpath* devices +Resolves: rhbz#969068 + +* Wed May 22 2013 Adam Williamson <awilliam@redhat.com> 027-46.git20130430 +- don't specify "p" as a separator for dmraid +Resolves: rhbz#966162 + +* Tue Apr 30 2013 Harald Hoyer <harald@redhat.com> 027-45.git20130430 +- fixed fips mode more +Resolves: rhbz#956521 + +* Thu Apr 25 2013 Harald Hoyer <harald@redhat.com> 027-39.git20130425 +- fix shutdown, if /dev/console is not writeable +- fixed fips mode +Resolves: rhbz#956521 + +* Thu Apr 18 2013 Harald Hoyer <harald@redhat.com> 027-36.git20130418 +- fix initramfs creation on noexec tmpdir +Resolves: rhbz#953426 +- more options for lsinitrd +- bash completion for lsinitrd +- do not output debug information on initramfs creation, if rd.debug is + on the kernel command line +- drop requirement on 'file', lsinitrd can find the magic on its own + +* Mon Apr 15 2013 Harald Hoyer <harald@redhat.com> 027-26.git20130415 +- do not call plymouth with full path +- include systemd-random-seed-load.service +- fix ca-bundle.crt for ssl curl +Resolves: rhbz#950770 +- add support for "iso-scan/filename" kernel parameter + +* Wed Apr 10 2013 Harald Hoyer <harald@redhat.com> 027-19.git20130410 +- also handle UUID= entries in crypttab in host-only mode +Resolves:rhbz#919752 + +* Tue Apr 09 2013 Harald Hoyer <harald@redhat.com> 027-17.git20130409 +- only include needed /etc/crypttab entries +Resolves:rhbz#919752 +- add support for bridge over team and vlan +- support multiple bonding interfaces +- add "action_on_fail=" kernel command line parameter +- add support for bridge over a vlan tagged interface + +* Fri Apr 05 2013 Harald Hoyer <harald@redhat.com> 027-10.git20130405 +- fix crypto password timeout on the dracut side + +* Tue Mar 26 2013 Harald Hoyer <harald@redhat.com> 027-1 +- version 027 + +* Wed Mar 20 2013 Harald Hoyer <harald@redhat.com> 026-72.git20130320 +- fix rescue image naming +Resolves: rhbz#923439 +- turn off host-only mode if essential system filesystems not mounted +- turn off host-only mode if udev database is not accessible + +* Tue Mar 19 2013 Harald Hoyer <harald@redhat.com> 026-62.git20130319 +- fix dracut service ordering +Resolves: rhbz#922991 + +* Mon Mar 18 2013 Harald Hoyer <harald@redhat.com> 026-56.git20130318 +- don't fail hard on kernel modules install +Resolves: rhbz#922565 + +* Mon Mar 18 2013 Harald Hoyer <harald@redhat.com> 026-55.git20130318 +- install all host filesystem drivers +Resolves: rhbz#922565 + +* Sat Mar 16 2013 Harald Hoyer <harald@redhat.com> 026-54.git20130316 +- fix for squashfs +Resolves: rhbz#922248 +- documentation fixes +- sosreport, mkdir /run/initramfs + +* Fri Mar 15 2013 Harald Hoyer <harald@redhat.com> 026-48.git20130315 +- use new initrd.target from systemd +- fixed rescue generation + +* Wed Mar 13 2013 Harald Hoyer <harald@redhat.com> 026-33.git20130313 +- add module-load.d modules to the initramfs +- add sysctl.d to the initramfs +- optimize plymouth module for systemd mode +- add new dracut parameter "--regenerate-all" +- add new dracut parameter "--noimageifnotneeded" +- shutdown: mount move /run /sys /dev /proc out of /oldroot + before pre-shutdown +- add bash completion for dracut + +* Wed Mar 13 2013 Harald Hoyer <harald@redhat.com> 026-19.git20130313 +- fix switch-root and local-fs.target problem +- add norescue and nohostonly subpackages + +* Mon Mar 11 2013 Harald Hoyer <harald@redhat.com> 026-15.git20130311 +- update to recent git + +* Fri Mar 08 2013 Harald Hoyer <harald@redhat.com> 026-1 +- version 026 + +* Mon Feb 11 2013 Harald Hoyer <harald@redhat.com> 025-35.git20130211 +- update to recent git + +* Wed Jan 23 2013 Harald Hoyer <harald@redhat.com> 025-1 +- version 025 + +* Tue Aug 21 2012 Harald Hoyer <harald@redhat.com> 023-13.git20120821 +- reintroduce rd.neednet, which reenables anaconda networking +- fix some dracut-install corner cases +- fix FIPS for /boot not on extra partition + +* Wed Aug 01 2012 Dennis Gilmore <dennis@ausil.us> - 023-2 +- add patch to include omap_hsmmc for arm + +* Wed Aug 01 2012 Harald Hoyer <harald@redhat.com> 023-1 +- version 023 + +* Mon Jul 30 2012 Harald Hoyer <harald@redhat.com> 022-99.git20120730 +- removed install of missing finished-ask-password.sh + +* Mon Jul 30 2012 Harald Hoyer <harald@redhat.com> 022-97.git20120730 +- moved crypt setup to systemd units + +* Fri Jul 27 2012 Harald Hoyer <harald@redhat.com> 022-63.git20120727 +- fixed dracut-install bug if /var/tmp contains a symlink +- fixed some partx issues + +* Mon Jul 23 2012 Harald Hoyer <harald@redhat.com> 022-5.git20120723 +- dracut.8: added more documentation about executing dracut + +* Fri Jul 20 2012 Harald Hoyer <harald@redhat.com> 022-2.git20120720 +- fixed some race condition for resume from hibernation + +* Fri Jul 20 2012 Harald Hoyer <harald@redhat.com> 022-1 +- version 022 +- host-only kernel modules fix + +* Fri Jul 20 2012 Harald Hoyer <harald@redhat.com> 021-1 +- version 21 +- systemd in the initramfs reenabled +- new option "--kver" + +* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 020-97.git20120717 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Tue Jul 17 2012 Harald Hoyer <harald@redhat.com> 020-96.git20120717 +- disabled systemd in the initramfs, until it works correctly + +* Wed Jul 11 2012 Harald Hoyer <harald@redhat.com> 020-84.git20120711 +- add back "--force" to switch-root, otherwise systemd umounts /run + +* Wed Jul 11 2012 Harald Hoyer <harald@redhat.com> 020-83.git20120711 +- more systemd journal fixes +- nfs module fix +- install also /lib/modprobe.d/* +- fixed dracut-shutdown service +- safeguards for dracut-install +- for --include also copy symlinks + +* Tue Jul 10 2012 Harald Hoyer <harald@redhat.com> 020-72.git20120710 +- stop journal rather than restart +- copy over dracut services to /run/systemd/system + +* Tue Jul 10 2012 Harald Hoyer <harald@redhat.com> 020-70.git20120710 +- more systemd unit fixups +- restart systemd-journald in switch-root post +- fixed dracut-install loader ldd error message + +* Mon Jul 09 2012 Harald Hoyer <harald@redhat.com> 020-64.git20120709 +- fixed plymouth install +- fixed resume +- fixed dhcp +- no dracut systemd services installed in the system + +* Mon Jul 09 2012 Harald Hoyer <harald@redhat.com> 020-57.git20120709 +- more fixups for systemd-udevd unit renaming + +* Mon Jul 09 2012 Harald Hoyer <harald@redhat.com> 020-55.git20120709 +- require systemd >= 186 +- more fixups for systemd-udevd unit renaming + +* Mon Jul 09 2012 Harald Hoyer <harald@redhat.com> 020-52.git20120709 +- fixed prefix in 01-dist.conf + +* Fri Jul 06 2012 Harald Hoyer <harald@redhat.com> 020-51.git20120706 +- cope with systemd-udevd unit renaming +- fixed network renaming +- removed dash module + +* Mon Jul 02 2012 Harald Hoyer <harald@redhat.com> 020-22.git20120702 +- fixed kernel modules install + +* Mon Jul 02 2012 Harald Hoyer <harald@redhat.com> 020-21.git20120702 +- moved /usr/bin/dracut-install to /usr/lib +- more speedups + +* Fri Jun 29 2012 Harald Hoyer <harald@redhat.com> 020-1 +- version 020 +- new /usr/bin/dracut-install tool +- major speedup of the image creation + +* Mon Jun 25 2012 Harald Hoyer <harald@redhat.com> 019-92.git20120625 +- support vlan tagged binding +- speedup initramfs emergency service +- speedup image creation +- fix installkernel() return codes +Resolves: rhbz#833256 +- add qemu and qemu-net modules to add qemu drivers even in host-only +- speedup btrfs and xfs fsck (nop) +- no more mknod in the initramfs (fixes plymouth on s390) + +* Thu Jun 21 2012 Harald Hoyer <harald@redhat.com> 019-62.git20120621 +- do not require pkg-config for systemd +- i18n fixes +- less systemd services in the initramfs + +* Thu Jun 21 2012 Harald Hoyer <harald@redhat.com> 019-57.git20120620 +- systemd is now the default init in the initramfs + +* Mon Jun 18 2012 Harald Hoyer <harald@redhat.com> 019-40.git20120618 +- new upstream version + +* Mon Jun 11 2012 Harald Hoyer <harald@redhat.com> 019-16.git20120611 +- new upstream version + +* Tue Jun 05 2012 Dennis Gilmore <dennis@ausil.us> 019-2 +- include omapdrm with the arm modules + +* Mon Jun 04 2012 Harald Hoyer <harald@redhat.com> 019-1 +- version 019-1 + +* Tue May 22 2012 Harald Hoyer <harald@redhat.com> 018-74.git20120522 +- new upstream version + +* Thu May 17 2012 Dennis Gilmore <dennis@ausil.us> 018-53.git20120509 +- add patch to pull in arm storage modules + +* Wed May 09 2012 Harald Hoyer <harald@redhat.com> 018-52.git20120509 +- new upstream version + +* Fri May 04 2012 Harald Hoyer <harald@redhat.com> 018-40.git20120504 +- new upstream version + +* Wed Apr 25 2012 Harald Hoyer <harald@redhat.com> 018-37.git20120425.1 +- fixup for multipath and iscsi host-only detection + +* Wed Apr 25 2012 Harald Hoyer <harald@redhat.com> 018-37.git20120425 +- fixed udevd location + +* Tue Apr 24 2012 Harald Hoyer <harald@redhat.com> 018-33.git20120424 +- new upstream version + +* Thu Apr 19 2012 Harald Hoyer <harald@redhat.com> 018-25.git20120419 +- fixed network for non-network root (like installer media) + +* Wed Apr 18 2012 Harald Hoyer <harald@redhat.com> 018-22.git20120418 +- new upstream version + +* Mon Apr 16 2012 Harald Hoyer <harald@redhat.com> 018-12.git20120416 +- new upstream version, which fixes various anaconda loader issues + +* Thu Apr 05 2012 Harald Hoyer <harald@redhat.com> 018-1 +- version 018 + +* Thu Mar 22 2012 Harald Hoyer <harald@redhat.com> 017-62.git20120322 +- fixed /run prefix copying + +* Wed Mar 21 2012 Harald Hoyer <harald@redhat.com> 017-59.git20120321 +- new upstream version, which fixes various anaconda loader issues + +* Mon Mar 12 2012 Harald Hoyer <harald@redhat.com> 017-43.git20120312 +- live image: fixed image uncompression +- live updates for livenet + +* Thu Mar 08 2012 Harald Hoyer <harald@redhat.com> 017-40.git20120308 +- add s390 ctcm network kernel module + +* Thu Mar 08 2012 Harald Hoyer <harald@redhat.com> 017-39.git20120308 +- kill dhclient silently +- cleanup and fix network config writeout to /run/initramfs/state +Resolves: rhbz#799989 +- various cleanups + +* Fri Mar 02 2012 Harald Hoyer <harald@redhat.com> 017-22.git20120302 +- nfs path fixes for live image over nfs + root=live:nfs://10.10.10.10:/srv/all/install.img ip=dhcp rd.neednet + +* Thu Mar 01 2012 Harald Hoyer <harald@redhat.com> 017-19.git20120301 +- fixed include of some kernel modules + +* Wed Feb 29 2012 Harald Hoyer <harald@redhat.com> 017-17.git20120229 +- update to latest git +- fixes for convertfs (/usr-move) + +* Fri Feb 24 2012 Harald Hoyer <harald@redhat.com> 017-1 +- version 017 + +* Fri Feb 17 2012 Harald Hoyer <harald@redhat.com> 016-9.git20120217 +- update to latest git + +* Wed Feb 15 2012 Harald Hoyer <harald@redhat.com> 016-1 +- version 016 + +* Mon Feb 13 2012 Harald Hoyer <harald@redhat.com> 015-9.git20120213 +- update to latest git + +* Sun Feb 12 2012 Kay Sievers <kay@redhat.com> - 015-9.git20120210 +- fix dependency loop in systemd service files + +* Fri Feb 10 2012 Harald Hoyer <harald@redhat.com> 015-8.git20120210 +- update to latest git + +* Thu Feb 09 2012 Harald Hoyer <harald@redhat.com> 015-7.git20120209 +- update to latest git + +* Thu Feb 09 2012 Harald Hoyer <harald@redhat.com> 015-4.git20120209 +- update to latest git + +* Wed Feb 08 2012 Harald Hoyer <harald@redhat.com> 015-3.git20120208 +- update to latest git + +* Tue Feb 07 2012 Harald Hoyer <harald@redhat.com> 015-1 +- version 015 + +* Thu Feb 02 2012 Harald Hoyer <harald@redhat.com> 014-81.git20120202 +- update to latest git + +* Thu Feb 02 2012 Harald Hoyer <harald@redhat.com> 014-80.git20120202 +- update to latest git + +* Thu Jan 26 2012 Harald Hoyer <harald@redhat.com> 014-77.git20120126.1 +- rebuild for rawhide + +* Thu Jan 26 2012 Harald Hoyer <harald@redhat.com> 014-77.git20120126 +- update to latest git + +* Thu Jan 26 2012 Harald Hoyer <harald@redhat.com> 014-76.git20120126 +- update to latest git + +* Thu Jan 26 2012 Harald Hoyer <harald@redhat.com> 014-75.git20120126 +- update to latest git + +* Thu Jan 26 2012 Harald Hoyer <harald@redhat.com> 014-74.git20120126 +- update to latest git + +* Thu Jan 26 2012 Harald Hoyer <harald@redhat.com> 014-73.git20120126 +- update to latest git + +* Thu Jan 26 2012 Harald Hoyer <harald@redhat.com> 014-72.git20120126 +- update to latest git + +* Mon Jan 23 2012 Harald Hoyer <harald@redhat.com> 014-65.git20120123 +- update to latest git + +* Mon Jan 23 2012 Harald Hoyer <harald@redhat.com> 014-61.git20120123 +- update to latest git + +* Tue Jan 17 2012 Harald Hoyer <harald@redhat.com> 014-38.git20120117 +- update to latest git + +* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 014-10.git20111215 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Thu Dec 15 2011 Harald Hoyer <harald@redhat.com> 014-9.git20111215 +- update to latest git +- lots of patch changes + +* Fri Oct 21 2011 Harald Hoyer <harald@redhat.com> 013-100.git20111021 +- update to latest git + +* Thu Oct 20 2011 Harald Hoyer <harald@redhat.com> 013-93.git20111020 +- update to latest git + +* Wed Oct 19 2011 Harald Hoyer <harald@redhat.com> 013-85.git20111019 +- update to latest git + +* Tue Oct 04 2011 Harald Hoyer <harald@redhat.com> 013-15 +- fixed mdraid container handling +Resolves: rhbz#743240 + +* Thu Sep 22 2011 Harald Hoyer <harald@redhat.com> 013-13 +- fixed mdraid issues +- fixed btrfsck +Resolves: rhbz#735602 + +* Wed Sep 21 2011 Harald Hoyer <harald@redhat.com> 013-12 +- removed patch backup files +- reintroduced /dev/live + +* Tue Sep 20 2011 Harald Hoyer <harald@redhat.com> 013-11 +- move mounting of securitfs to a seperate module +Resolves: rhbz#737140 + +* Tue Sep 20 2011 Harald Hoyer <harald@redhat.com> 013-10 +- mount securitfs with the correct source +Resolves: rhbz#737140 + +* Tue Sep 20 2011 Harald Hoyer <harald@redhat.com> 013-9 +- do not carry over initramfs udev rules +Resolves: rhbz#734096 + +* Fri Sep 02 2011 Harald Hoyer <harald@redhat.com> 013-8 +- hopefully fixed one part of a loop/udev and loop/mount race +Resolves: rhbz#735199 + +* Wed Aug 31 2011 Harald Hoyer <harald@redhat.com> 013-7 +- add /lib/udev/input_id to the initramfs +- fix hmac install + +* Tue Aug 30 2011 Harald Hoyer <harald@redhat.com> 013-6 +- fixed environment passing to real init +Resolves: rhbz#733674 +- fixed lvm on md + +* Mon Aug 29 2011 Harald Hoyer <harald@redhat.com> 013-5 +- fixed rhel/fedora version checks + +* Wed Aug 17 2011 Harald Hoyer <harald@redhat.com> 013-4 +- fixed crash with livenet installed + +* Wed Aug 17 2011 Harald Hoyer <harald@redhat.com> 013-3 +- fixed live iso mounting +Resolves: rhbz#730579 + +* Fri Aug 12 2011 Harald Hoyer <harald@redhat.com> 013-1 +- fixed symlink creation for lorax + +* Wed Aug 10 2011 Harald Hoyer <harald@redhat.com> 011-41.git20110810 +- fixed getargs() for empty args + +* Wed Aug 10 2011 Harald Hoyer <harald@redhat.com> 011-40.git20110810 +- fixed symbolic link creation in the initramfs +Resolves: rhbz#728863 + +* Wed Jul 20 2011 Harald Hoyer <harald@redhat.com> 011-15.git20110720 +- "eject" is optional now +- refined shutdown procedure + +* Mon Jul 18 2011 Harald Hoyer <harald@redhat.com> 011-1 +- version 011 + +* Fri May 20 2011 Harald Hoyer <harald@redhat.com> 011-0.1%{?rdist} +- git snapshot of pre-version 011 + +* Fri Apr 01 2011 Harald Hoyer <harald@redhat.com> 010-1 +- version 010 + +* Thu Mar 31 2011 Harald Hoyer <harald@redhat.com> 009-5 +- fixed PATH and kmsg logging + +* Thu Mar 31 2011 Harald Hoyer <harald@redhat.com> 009-4 +- fixed dmsquash rule generation +- fixed fips boot arg parsing +- fixed plymouth pid generation + +* Wed Mar 30 2011 Harald Hoyer <harald@redhat.com> 009-3 +- fixed dhcp +- added /lib/firmware/updates to firmware directories +- fixed LiveCD /dev/.initramfs fallback +- fixed cdrom polling +- dropped net-tools dependency + +* Tue Mar 29 2011 Harald Hoyer <harald@redhat.com> 009-2 +- fixed empty output file argument handling: + "dracut '' <kernel version>" + +* Mon Mar 28 2011 Harald Hoyer <harald@redhat.com> 009-1 +- version 009 + +* Thu Mar 17 2011 Harald Hoyer <harald@redhat.com> 009-0.1 +- version 009 prerelease + +* Tue Feb 22 2011 Harald Hoyer <harald@redhat.com> 008-7 +- fixed lvm version parsing + +* Tue Feb 22 2011 Harald Hoyer <harald@redhat.com> 008-6 +- fixed lvm version parsing + +* Mon Feb 21 2011 Harald Hoyer <harald@redhat.com> 008-5 +- fixed i18n unicode setting +- set cdrom in kernel polling + +* Fri Feb 18 2011 Harald Hoyer <harald@redhat.com> 008-4 +- readded dist tag + +* Fri Feb 18 2011 Harald Hoyer <harald@redhat.com> 008-3 +- fixed i18n +- turned off selinux by default + +* Wed Feb 09 2011 Harald Hoyer <harald@redhat.com> 008-2 +- do not write dracut.log to /tmp under any circumstances +- touch /dev/.systemd/plymouth after plymouth started + +* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 008-1.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Wed Feb 02 2011 Harald Hoyer <harald@redhat.com> 008-1 +- version 008-1 + +* Mon Jan 17 2011 Harald Hoyer <harald@redhat.com> 008-0.11 +- removed "mount" requirement + +* Thu Nov 18 2010 Harald Hoyer <harald@redhat.com> - 008-0.10 +- dracut-008 pre git snapshot +- fixes /dev/dri permissions +Resolves: rhbz#626559 + +* Fri Nov 12 2010 Harald Hoyer <harald@redhat.com> 008-0.9 +- dracut-008 pre git snapshot +- fixes /dev/.udev permissions +Resolves: rhbz#651594 + +* Wed Nov 3 2010 Harald Hoyer <harald@redhat.com> - 008-0.8 +- fixed fsck -a option + +* Fri Oct 29 2010 Harald Hoyer <harald@redhat.com> 008-0.7 +- added fsck to initramfs + +* Fri Oct 29 2010 Harald Hoyer <harald@redhat.com> 008-0.6 +- fixed rpm macros + +* Fri Oct 29 2010 Harald Hoyer <harald@redhat.com> 008-0.5 +- dracut-008 pre git snapshot + +* Mon Aug 09 2010 Harald Hoyer <harald@redhat.com> 007-1 +- version 007 + +* Thu Jun 17 2010 Harald Hoyer <harald@redhat.com> 006-1 +- version 006 + +* Fri Jun 11 2010 Harald Hoyer <harald@redhat.com> +- Remove requirements, which are not really needed +Resolves: rhbz#598509 +- fixed copy of network config to /dev/.initramfs/ (patch 146) +Resolves: rhbz#594649 +- more password beauty (patch 142) +Resolves: rhbz#561092 +- support multiple iSCSI disks (patch 143) +Resolves: rbhz#580190 +- fixed selinux=0 (patch 130) +Resolves: rhbz#593080 +- add support for booting LVM snapshot root volume (patch 145) +Resolves: rbhz#602723 +- remove hardware field from BOOTIF= (patch 148) +Resolves: rhbz#599593 +- add aes kernel modules and fix crypt handling (patch 137, patch 140 and patch 147) +Resolves: rhbz#600170 + +* Thu May 27 2010 Harald Hoyer <harald@redhat.com> +- fixed Requirements +- fixed autoip6 +Resolves: rhbz#538388 +- fixed multipath +Resolves: rhbz#595719 + +* Thu May 06 2010 Harald Hoyer <harald@redhat.com> +- only display short password messages +Resolves: rhbz#561092 + +* Thu May 06 2010 Harald Hoyer <harald@redhat.com> +- fixed dracut manpages +Resolves: rhbz#589109 +- use ccw-init and ccw rules from s390utils +Resolves: rhbz#533494 +- fixed fcoe +Resolves: rhbz#486244 +- various other bugfixes seen in Fedora + +* Tue Apr 20 2010 Harald Hoyer <harald@redhat.com> +- fixed network with multiple nics +- fixed nfsidmap paths +- do not run blkid on non active container raids +- fixed cdrom polling mechanism +- update to latest git + +* Thu Apr 15 2010 Harald Hoyer <harald@redhat.com> +- fixed dracut manpages +- dmraid parse different error messages +- add cdrom polling mechanism for slow cdroms +- add module btrfs +- teach dmsquash live-root to use rootflags +- trigger udev with action=add +- fixed add_drivers handling +- add sr_mod +- use pigz instead of gzip, if available + +* Thu Mar 25 2010 Harald Hoyer <harald@redhat.com> +- removed firmware requirements (rhbz#572634) +- add /etc/dracut.conf.d +- Resolves: rhbz#572634 + +* Fri Mar 19 2010 Harald Hoyer <harald@redhat.com> +- version 005 + +* Fri Mar 19 2010 Harald Hoyer <harald@redhat.com> +- fixed rpmlint errors (rhbz#570547) +- removed firmware package from dracut-kernel (rhbz#572634) +- add dcb support to dracut's FCoE support (rhbz#563794) +- force install some modules in hostonly mode (rhbz#573094) +- various other bugfixes +- Resolves: rhbz#570547, rhbz#572634, rhbz#563794, rhbz#573094 + +* Thu Feb 18 2010 Harald Hoyer <harald@redhat.com> 004-15 +- fixed "selinux=0" booting (rhbz#566376) +- fixed internal IFS handling +- Resolves: rhbz#566376 + +* Fri Jan 29 2010 Harald Hoyer <harald@redhat.com> 004-5 +- fixed firmware.sh bug (#559975 #559597) + +* Tue Jan 26 2010 Harald Hoyer <harald@redhat.com> 004-4 +- add multipath check + +* Tue Jan 26 2010 Harald Hoyer <harald@redhat.com> 004-3 +- fix selinux handling if .autorelabel is present +- Resolves: rhbz#557744 + +* Wed Jan 20 2010 Harald Hoyer <harald@redhat.com> 004-2 +- fix emergency_shell argument parsing +- Related: rhbz#543948 + +* Fri Jan 15 2010 Harald Hoyer <harald@redhat.com> 004-1 +- version 004 +- Resolves: rhbz#529339 rhbz#533494 rhbz#548550 +- Resolves: rhbz#548555 rhbz#553195 + +* Wed Jan 13 2010 Harald Hoyer <harald@redhat.com> 003-3 +- add Obsoletes of mkinitrd/nash/libbdevid-python +- Related: rhbz#543948 + +* Wed Jan 13 2010 Warren Togami <wtogami@redhat.com> 003-2 +- nbd is Fedora only + +* Fri Nov 27 2009 Harald Hoyer <harald@redhat.com> 003-1 +- version 003 + +* Mon Nov 23 2009 Harald Hoyer <harald@redhat.com> 002-26 +- add WITH_SWITCH_ROOT make flag +- add fips requirement conditional +- add more device mapper modules (bug #539656) + +* Fri Nov 20 2009 Dennis Gregorovic <dgregor@redhat.com> - 002-25.1 +- nss changes for Alpha 3 + +* Thu Nov 19 2009 Harald Hoyer <harald@redhat.com> 002-25 +- add more requirements for dracut-fips (bug #539257) + +* Tue Nov 17 2009 Harald Hoyer <harald@redhat.com> 002-24 +- put fips module in a subpackage (bug #537619) + +* Tue Nov 17 2009 Harald Hoyer <harald@redhat.com> 002-23 +- install xdr utils for multipath (bug #463458) + +* Thu Nov 12 2009 Harald Hoyer <harald@redhat.com> 002-22 +- add module 90multipath +- add module 01fips +- renamed module 95ccw to 95znet (bug #533833) +- crypt: ignore devices in /etc/crypttab (root is not in there) +- dasd: only install /etc/dasd.conf in hostonly mode (bug #533833) +- zfcp: only install /etc/zfcp.conf in hostonly mode (bug #533833) +- kernel-modules: add scsi_dh scsi_dh_rdac scsi_dh_emc (bug #527750) +- dasd: use dasdconf.sh from s390utils (bug #533833) + +* Fri Nov 06 2009 Harald Hoyer <harald@redhat.com> 002-21 +- fix rd_DASD argument handling (bug #531720) +- Resolves: rhbz#531720 + +* Wed Nov 04 2009 Harald Hoyer <harald@redhat.com> 002-20 +- fix rd_DASD argument handling (bug #531720) +- Resolves: rhbz#531720 + +* Tue Nov 03 2009 Harald Hoyer <harald@redhat.com> 002-19 +- changed rd_DASD to rd_DASD_MOD (bug #531720) +- Resolves: rhbz#531720 + +* Tue Oct 27 2009 Harald Hoyer <harald@redhat.com> 002-18 +- renamed lvm/device-mapper udev rules according to upstream changes +- fixed dracut search path issue + +* Mon Oct 26 2009 Harald Hoyer <harald@redhat.com> 002-17 +- load dm_mod module (bug #530540) + +* Fri Oct 09 2009 Jesse Keating <jkeating@redhat.com> - 002-16 +- Upgrade plymouth to Requires(pre) to make it show up before kernel + +* Thu Oct 08 2009 Harald Hoyer <harald@redhat.com> 002-15 +- s390 ccw: s/layer1/layer2/g + +* Thu Oct 08 2009 Harald Hoyer <harald@redhat.com> 002-14 +- add multinic support +- add s390 zfcp support +- add s390 network support + +* Wed Oct 07 2009 Harald Hoyer <harald@redhat.com> 002-13 +- fixed init=<command> handling +- kill loginit if "rdinitdebug" specified +- run dmsquash-live-root after udev has settled (bug #527514) + +* Tue Oct 06 2009 Harald Hoyer <harald@redhat.com> 002-12 +- add missing loginit helper +- corrected dracut manpage + +* Thu Oct 01 2009 Harald Hoyer <harald@redhat.com> 002-11 +- fixed dracut-gencmdline for root=UUID or LABEL + +* Thu Oct 01 2009 Harald Hoyer <harald@redhat.com> 002-10 +- do not destroy assembled raid arrays if mdadm.conf present +- mount /dev/shm +- let udevd not resolve group and user names +- preserve timestamps of tools on initramfs generation +- generate symlinks for binaries correctly +- moved network from udev to initqueue +- mount nfs3 with nfsvers=3 option and retry with nfsvers=2 +- fixed nbd initqueue-finished +- improved debug output: specifying "rdinitdebug" now logs + to dmesg, console and /init.log +- stop udev before killing it +- add ghost /var/log/dracut.log +- dmsquash: use info() and die() rather than echo +- strip kernel modules which have no x bit set +- redirect stdin, stdout, stderr all RW to /dev/console + so the user can use "less" to view /init.log and dmesg + +* Tue Sep 29 2009 Harald Hoyer <harald@redhat.com> 002-9 +- make install of new dm/lvm udev rules optionally +- correct dasd module typo + +* Fri Sep 25 2009 Warren Togami <wtogami@redhat.com> 002-8 +- revert back to dracut-002-5 tarball 845dd502 + lvm2 was reverted to pre-udev + +* Wed Sep 23 2009 Harald Hoyer <harald@redhat.com> 002-7 +- build with the correct tarball + +* Wed Sep 23 2009 Harald Hoyer <harald@redhat.com> 002-6 +- add new device mapper udev rules and dmeventd + bug 525319, 525015 + +* Wed Sep 23 2009 Warren Togami <wtogami@redaht.com> 002-5 +- Revert back to -3, Add umount back to initrd + This makes no functional difference to LiveCD. See Bug #525319 + +* Mon Sep 21 2009 Warren Togami <wtogami@redhat.com> 002-4 +- Fix LiveCD boot regression + +* Mon Sep 21 2009 Harald Hoyer <harald@redhat.com> 002-3 +- bail out if selinux policy could not be loaded and + selinux=0 not specified on kernel command line + (bug #524113) +- set finished criteria for dmsquash live images + +* Fri Sep 18 2009 Harald Hoyer <harald@redhat.com> 002-2 +- do not cleanup dmraids +- copy over lvm.conf + +* Thu Sep 17 2009 Harald Hoyer <harald@redhat.com> 002-1 +- version 002 +- set correct PATH +- workaround for broken mdmon implementation + +* Wed Sep 16 2009 Harald Hoyer <harald@redhat.com> 001-12 +- removed lvm/mdraid/dmraid lock files +- add missing ifname= files + +* Wed Sep 16 2009 Harald Hoyer <harald@redhat.com> 001-11 +- generate dracut-version during rpm build time + +* Tue Sep 15 2009 Harald Hoyer <harald@redhat.com> 001-10 +- add ifname= argument for persistent netdev names +- new /initqueue-finished to check if the main loop can be left +- copy mdadm.conf if --mdadmconf set or mdadmconf in dracut.conf + +* Wed Sep 09 2009 Harald Hoyer <harald@redhat.com> 001-9 +- added Requires: plymouth-scripts + +* Wed Sep 09 2009 Harald Hoyer <harald@redhat.com> 001-8 +- plymouth: use plymouth-populate-initrd +- add add_drivers for dracut and dracut.conf +- do not mount /proc and /selinux manually in selinux-load-policy + +* Wed Sep 09 2009 Harald Hoyer <harald@redhat.com> 001-7 +- add scsi_wait_scan to be sure everything was scanned + +* Tue Sep 08 2009 Harald Hoyer <harald@redhat.com> 001-6 +- fixed several problems with md raid containers +- fixed selinux policy loading + +* Tue Sep 08 2009 Harald Hoyer <harald@redhat.com> 001-5 +- patch does not honor file modes, fixed them manually + +* Mon Sep 07 2009 Harald Hoyer <harald@redhat.com> 001-4 +- fixed mdraid for IMSM + +* Mon Sep 07 2009 Harald Hoyer <harald@redhat.com> 001-3 +- fixed bug, which prevents installing 61-persistent-storage.rules (bug #520109) + +* Thu Sep 03 2009 Harald Hoyer <harald@redhat.com> 001-2 +- fixed missing grep for md +- reorder cleanup + +* Wed Sep 02 2009 Harald Hoyer <harald@redhat.com> 001-1 +- version 001 +- see http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut/dracut;a=blob_plain;f=NEWS + +* Fri Aug 14 2009 Harald Hoyer <harald@redhat.com> 0.9-1 +- version 0.9 + +* Thu Aug 06 2009 Harald Hoyer <harald@redhat.com> 0.8-1 +- version 0.8 +- see http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut/dracut;a=blob_plain;f=NEWS + +* Fri Jul 24 2009 Harald Hoyer <harald@redhat.com> 0.7-1 +- version 0.7 +- see http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut/dracut;a=blob_plain;f=NEWS + +* Wed Jul 22 2009 Harald Hoyer <harald@redhat.com> 0.6-1 +- version 0.6 +- see http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut/dracut;a=blob_plain;f=NEWS + +* Fri Jul 17 2009 Harald Hoyer <harald@redhat.com> 0.5-1 +- version 0.5 +- see http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut/dracut;a=blob_plain;f=NEWS + +* Sat Jul 04 2009 Harald Hoyer <harald@redhat.com> 0.4-1 +- version 0.4 +- see http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut/dracut;a=blob_plain;f=NEWS + +* Thu Jul 02 2009 Harald Hoyer <harald@redhat.com> 0.3-1 +- version 0.3 +- see http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut/dracut;a=blob_plain;f=NEWS + +* Wed Jul 01 2009 Harald Hoyer <harald@redhat.com> 0.2-1 +- version 0.2 + +* Fri Jun 19 2009 Harald Hoyer <harald@redhat.com> 0.1-1 +- first release + +* Thu Dec 18 2008 Jeremy Katz <katzj@redhat.com> - 0.0-1 +- Initial build