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..ead2c01 --- /dev/null +++ b/SOURCES/0040-dracut-functions.sh-Avoid-loading-unnecessary-32-bit.patch @@ -0,0 +1,43 @@ +From a6fd3168b3b60b5e14ff20011b03ba7bad72e278 Mon Sep 17 00:00:00 2001 +From: Colin Guthrie +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 38095ba..2872516 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..400aa22 --- /dev/null +++ b/SOURCES/0041-systemd-do-not-exit-the-initqueue-if-systemd-asks-a-.patch @@ -0,0 +1,27 @@ +From c79290761ff78ad47ec24854339ab3cbc2ff802d Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 d7ebf2b..64e8154 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..58b4b6f --- /dev/null +++ b/SOURCES/0042-kernel-modules-add-ohci-pci-to-the-list-of-forced-mo.patch @@ -0,0 +1,30 @@ +From 8b63ce8afcf368f07f8272e17756c46796dbf7fb Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 366235c..510b43e 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..69652ef --- /dev/null +++ b/SOURCES/0043-lvm-do-not-run-pvscan-for-lvmetad-update.patch @@ -0,0 +1,36 @@ +From c16311681e042801f3ead0191da5dca621c6a54c Mon Sep 17 00:00:00 2001 +From: Peter Rajnoha +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 f1c19a2..7e3d44f 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..3c5f1b7 --- /dev/null +++ b/SOURCES/0044-fips-fix-RHEV-vmlinuz-check.patch @@ -0,0 +1,39 @@ +From ec72d9946bec0a9fcc386a1ea9915d6672eb7f94 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 98dd1c2..7fa48f1 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..7ce1f95 --- /dev/null +++ b/SOURCES/0045-dracut.cmdline.7.asc-document-server-ip-of-ip-parame.patch @@ -0,0 +1,28 @@ +From 16a841f79305818cbf51a2c31786c73b9284fd5a Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 19bfb93..6a5fc8f 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 . + ===================== + +-**ip=**____:____:____:____:____:____:__{none|off|dhcp|on|any|dhcp6|auto6|ibft}__:[:[____][:____]]:: ++**ip=**____:[____]:____:____:____:____:__{none|off|dhcp|on|any|dhcp6|auto6|ibft}__:[:[____][:____]]:: + 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. ____ 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. + + + ===================== + ::: optionally **set** on the . 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..9c278bc --- /dev/null +++ b/SOURCES/0046-dracut.sh-_get_fs_type-if-block-device-exists-return.patch @@ -0,0 +1,31 @@ +From cedb7d124c3c884b3feee873b67b78dd16e4300e Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 c6a388a..5f14d50 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..1e4b685 --- /dev/null +++ b/SOURCES/0047-network-net-lib.sh-wait_for_if_up-wait-for-state-UP.patch @@ -0,0 +1,23 @@ +From 508bac6231a967c637e7f880cefeeaef4870af2a Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 88e72ec..0aa312a 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..7016f6f --- /dev/null +++ b/SOURCES/0048-network-net-lib.sh-iface_has_link-fixup.patch @@ -0,0 +1,73 @@ +From 32cb5286ed0fded0a3be4147e48daac8513a5e79 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 0aa312a..7544401 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..def3ffb --- /dev/null +++ b/SOURCES/0049-network-ifup.sh-before-doing-dhcp-check-if-the-link-.patch @@ -0,0 +1,25 @@ +From 2ec86382fb7e60ae808a591b7160e26e240a4c15 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 9f6f449..2edcfe6 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..0255f09 --- /dev/null +++ b/SOURCES/0050-base-dracut-lib.sh-wait_for_dev-relax-requirement.patch @@ -0,0 +1,39 @@ +From 151329c9d97aac24098d1f23ffc9db91499402ac Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 74d7d35..7249c58 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..464238e --- /dev/null +++ b/SOURCES/0051-dracut.sh-skip-crypt-swaps-with-password-files.patch @@ -0,0 +1,22 @@ +From 6e76aee6b259c02eb23082f6f3285fa6c164b52d Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 5f14d50..b03522b 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..7cdc89e --- /dev/null +++ b/SOURCES/0052-Fixup-script-permissions.patch @@ -0,0 +1,46 @@ +From 7e0cacb7ad15e02d2a75548e673803f4e3719053 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +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 +--- + 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..ca65b28 --- /dev/null +++ b/SOURCES/0053-Remove-shebang-from-shell-completion-files.patch @@ -0,0 +1,34 @@ +From 53f6d59b5d0c9d55810e162669f22b9acc34448a Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +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 +--- + 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 d796c35..9f359c6 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 78ab165..3df2965 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..d86bdf0 --- /dev/null +++ b/SOURCES/0054-i18n-introduce-i18n_install_all-to-install-everythin.patch @@ -0,0 +1,127 @@ +From 2e798d8f8029c16faa5550dd2334833b7dd26d22 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 c9c854a..30b7e03 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="____":: ++ Distribution specific variable mapping. ++ See dracut/modules.d/10i18n/README for a detailed description. ++ ++*i18n_default_font=*"____":: ++ The font 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 1a56a86..495e8fb 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 2a83728..413ee12 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..6dfaf29 --- /dev/null +++ b/SOURCES/0055-Run-xz-and-lzma-with-multiple-threads.patch @@ -0,0 +1,35 @@ +From 44158fc223873fbaa055736a488e4d290d1818ae Mon Sep 17 00:00:00 2001 +From: Vratislav Podzimek +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 b03522b..59d3e4b 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..499f54e --- /dev/null +++ b/SOURCES/0056-iscsi-nbd-do-not-fail-in-hostonly-mode.patch @@ -0,0 +1,36 @@ +From 5cda22c36f06deb99ea54ee24487bd052724e397 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 502e834..c6901c0 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 7b78180..3ac00f6 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..677f23a --- /dev/null +++ b/SOURCES/0057-dracut.sh-fixed-PATH-shortener.patch @@ -0,0 +1,22 @@ +From 9c1ddd0962be47ab1bcc7a5e93f5aca46112c9ab Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 59d3e4b..bb7e91e 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..a85bdc0 --- /dev/null +++ b/SOURCES/0058-dracut.modules.7.asc-removed-empty-section.patch @@ -0,0 +1,21 @@ +From 080a0f5c8d4361cb85b563afcab16630de42d24d Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 4cb2aa1..17acdb4 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 _/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..15faf8b --- /dev/null +++ b/SOURCES/0059-lvm-install-thin-tools-only-when-needed-in-hostonly.patch @@ -0,0 +1,26 @@ +From ef290e26156d9f55a5e2bc3fc265c81e82fa510a Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 7e3d44f..877631b 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..a2f6290 --- /dev/null +++ b/SOURCES/0060-systemd-dracut-initqueue.sh-fixed-waiting-in-the-loo.patch @@ -0,0 +1,25 @@ +From 958bc11ddd2b21c631bde5871b22cb727d051042 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 64e8154..1e05dcd 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..55874d2 --- /dev/null +++ b/SOURCES/0061-base-rdsosreport.sh-add-ip-a-output.patch @@ -0,0 +1,22 @@ +From 89965b78b4bbf9b27b4f19baf805657f7e62bc6e Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 bfa55bb..5e11166 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..801a9a3 --- /dev/null +++ b/SOURCES/0062-lvm-fixed-lvm-thin-check.patch @@ -0,0 +1,31 @@ +From d8481c86a9ea78d95e549999743e33860f557615 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 877631b..f0c9b96 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=$(/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..c9959bc --- /dev/null +++ b/SOURCES/0063-test-TEST-17-LVM-THIN-add-test-case-for-lvm-thin-poo.patch @@ -0,0 +1,232 @@ +From fcbc3f941eeb85126ae5f56e82f121f3a51f2534 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 0000000..9af2638 +--- /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 0000000..d557790 +--- /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 0000000..aad2705 +--- /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 0000000..740704f +--- /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 </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 0000000..ecdbef9 +--- /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 0000000..12c3d5a +--- /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 0000000..fd03aa5 +--- /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 0000000..0cfce19 +--- /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..b004c89 --- /dev/null +++ b/SOURCES/0064-test-TEST-17-LVM-THIN-remove-.testdir.patch @@ -0,0 +1,17 @@ +From e8b49c027061052e7e1168ab480b6e3832a44721 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 9af2638..0000000 +--- 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..93f77d9 --- /dev/null +++ b/SOURCES/0065-iscsi-do-iscsi_firmware-regardless-of-network.patch @@ -0,0 +1,66 @@ +From 0b64ace800ada1fae8e84ed4b81c2f32fea4b015 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 738fff4..ef090f7 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 0c8b524..77bd991 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 4c29956..f597783 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..d3d86dd --- /dev/null +++ b/SOURCES/0066-dracut-lib-wait_for_dev-prevent-systemd-daemon-reloa.patch @@ -0,0 +1,127 @@ +From 2985e93ffa5f91331f8c27745bd92ab67a9d19fe Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 50b8d6c..36406d9 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 a5ac2a5..7b3dfa4 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 0000000..3770c6b +--- /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 7249c58..a3476ab 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..d6a1200 --- /dev/null +++ b/SOURCES/0067-kernel-modules-add-more-block-driver.patch @@ -0,0 +1,23 @@ +From 0014f6176312d43bbfeab506acf0bd2f1e14973f Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 510b43e..f4db6aa 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..64325a1 --- /dev/null +++ b/SOURCES/0068-network-include-usbnet-drivers.patch @@ -0,0 +1,22 @@ +From 2416a117b165be5ff74bf360176a07745700a4cd Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 d2833d0..508dbab 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..68079b1 --- /dev/null +++ b/SOURCES/0069-systemd-dracut-initqueue.sh-fstab-is-not-a-directory.patch @@ -0,0 +1,22 @@ +From 5b134070e8bff59f4588bb96ae3780645e918c2a Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 1e05dcd..37bc18f 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..a6259f7 --- /dev/null +++ b/SOURCES/0070-iscsi-iscsiroot.sh-do-not-trust-iscsistart-return-va.patch @@ -0,0 +1,23 @@ +From 6d346727a1692cbff09f6298beda9b98050ea610 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 ef090f7..abdea5c 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..86b8022 --- /dev/null +++ b/SOURCES/0071-dracut.sh-add-missing-piece-for-option-add-device.patch @@ -0,0 +1,21 @@ +From 3a6bc24b56412dedb0d404613efa1644022b002d Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 bb7e91e..9a6521e 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..471f161 --- /dev/null +++ b/SOURCES/0072-dracut.sh-add-boot-efi-to-device-paths.patch @@ -0,0 +1,26 @@ +From dcf94be9a3817c9b11b6ac77d4f42835d62d1a05 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 9a6521e..cf027e7 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..d253b6a --- /dev/null +++ b/SOURCES/0073-documentation-line-wrap.patch @@ -0,0 +1,672 @@ +From d32e66826d6cf1e633d94a8e267b59a79a45c66e Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 2ea6744..b294675 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 031b201..b047a33 100644 +--- a/dracut.asc ++++ b/dracut.asc +@@ -125,12 +125,14 @@ started looks like <>. + + == 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 c35af19..d7edc1e 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 6a5fc8f..8ac5341 100644 +--- a/dracut.cmdline.7.asc ++++ b/dracut.cmdline.7.asc +@@ -72,14 +72,14 @@ rootfstype=ext3 + See also ro option. + + **rootfallback=**____:: +- 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=**____:: +- Allow using of discards (TRIM) requests for LUKS partitions with the given UUID. +- Any "luks-" of the LUKS UUID is removed before comparing to __. +- The comparisons also matches, if __ 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 ++ __. The comparisons also matches, if __ 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_ 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=**____:: + 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 . + 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. ____ 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. + + + ===================== + ::: optionally **set** on the . This +@@ -458,7 +473,8 @@ same . + ===================== + + **ifname=**____:____:: +- Assign network device name (ie "bootnet") to the NIC with MAC . ++ Assign network device name (ie "bootnet") to the NIC with ++ 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=**____:____:: + Setup vlan device named on . +- 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=**____[:____:[:____]]:: + Setup bonding device on top of . + is a comma-separated list of physical (ethernet) interfaces. +- is a comma-separated list on bonding options (modinfo bonding for details) +- in format compatible with initscripts. If 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 ++ is a comma-separated list on bonding options (modinfo bonding for ++ details) in format compatible with initscripts. If 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=**____:____:: + Setup team device on top of . +@@ -496,7 +514,8 @@ interface name. Better name it "bootnet" or "bluesocket". + + **bridge=**____:____:: + Setup bridge with . 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**=____:: + 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**=____:: + 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=**____ **rd.iscsi.target.name=**____ **rd.iscsi.target.ip=**____ **rd.iscsi.target.port=**____ **rd.iscsi.target.group=**____ **rd.iscsi.username=**____ **rd.iscsi.password=**____ **rd.iscsi.in.username=**____ **rd.iscsi.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 30b7e03..5c94118 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=*"____":: +- The font to install, if not specified otherwise. Default is "LatArCyrHeb-16". ++ The font 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 17acdb4..e94670f 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 <>. ++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 <>. + + 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 <> to install files. ++In installkernel() all kernel related files should be installed. You can use all ++of the functions mentioned in <> to install files. + + === [[creation]]Creation Functions + + ==== inst_multiple [-o] [ ...] + +-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 [] + +-installs _one_ file either to the same place in the initramfs or to an optional . ++installs _one_ file either to the same place in the initramfs or to an ++optional . + + ==== inst_hook + +-installs an executable/script in the dracut hook with priority . ++installs an executable/script in the dracut hook with priority ++. + + ==== inst_rules [ ...] + +-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 [ ... ] + + instmods should be used only in the installkernel() function. + +-instmods installs one or more kernel modules in the initramfs. can also be a whole +-subsystem, if prefixed with a "=", like "=drivers/net/team". ++instmods installs one or more kernel modules in the initramfs. ++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 +diff --git a/dracut.usage.asc b/dracut.usage.asc +index 6d37920..0b874e6 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 <>. + +-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 <>. ++kernel command line, then you can inject _/etc/cmdline.d/mycmdline.conf_, with a ++method described in <>. + + ==== 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 <>). ++. Use this shell prompt to gather the information requested above ++(see <>). + + [[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 25661c8..146a6d0 100644 +--- a/mkinitrd.8.asc ++++ b/mkinitrd.8.asc +@@ -41,8 +41,8 @@ OPTIONS + + **--preload=**:: + preload the kernel 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..d216c03 --- /dev/null +++ b/SOURCES/0074-network-include-all-ethernet-drivers.patch @@ -0,0 +1,35 @@ +From 3c67ed50135c8e454d0a4e0f414eca85c014b99a Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 508dbab..a5e796f 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..b50d927 --- /dev/null +++ b/SOURCES/0075-dracut-install-dracut-fix-ldd-output-parsing.patch @@ -0,0 +1,43 @@ +From 761263922538d3c00b34dc6fc71a98eb8d8e1aa9 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 cf027e7..8d572a3 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 6b9c613..c5e4b05 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..fb1e28a --- /dev/null +++ b/SOURCES/0076-systemd-add-71-seat.rules-73-seat-late.rules.patch @@ -0,0 +1,23 @@ +From 497e9e89dcb0196fd0c1b4ebf904eeb8556fc934 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 7b3dfa4..7178d2b 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..3458c38 --- /dev/null +++ b/SOURCES/0077-systemd-add-seat-udev-rules-and-mask-loginctl.patch @@ -0,0 +1,23 @@ +From 4a28b713d7968b422beefaa0a7e5a7cb269aacff Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 7178d2b..a99c699 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..45b6347 --- /dev/null +++ b/SOURCES/0078-systemd-module-setup.sh-make-use-of-ln_r.patch @@ -0,0 +1,32 @@ +From 8914b61b0128f38fcda46c01dd96139201d932d4 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 a99c699..511b883 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..a2f0a96 --- /dev/null +++ b/SOURCES/0079-network-add-rd.bootif-0-to-ignore-BOOTIF.patch @@ -0,0 +1,41 @@ +From e33b4492dbfd18fe44d3dd3272e59745232c9eca Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 8ac5341..963ba07 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=**____:: ++ specify network interface to use routing and netroot information from. ++ ++**rd.bootif=0**:: ++ Disable BOOTIF parsing, which is provided by PXE ++ + **nameserver=**____ [**nameserver=**____ ...]:: + specify nameserver(s) to use + +diff --git a/modules.d/40network/parse-ip-opts.sh b/modules.d/40network/parse-ip-opts.sh +index 4bf286d..7e73574 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..d5dabeb --- /dev/null +++ b/SOURCES/0080-iscsi-call-iscsistart-b-until-it-succeeds.patch @@ -0,0 +1,49 @@ +From 8dfe442d1ea9c418b1a2751040f89c6e0e0d30e6 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 abdea5c..156003c 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 77bd991..e463add 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..ef14066 --- /dev/null +++ b/SOURCES/0081-base-dracut-lib.sh-halt-the-machine-in-systemd-mode-.patch @@ -0,0 +1,55 @@ +From 9a222e393afe093b5e940679e13b8bf5c2fb16a3 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 a3476ab..e74b93f 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..612f7a7 --- /dev/null +++ b/SOURCES/0082-systemd-rootfs-generator.sh-exit-0.patch @@ -0,0 +1,19 @@ +From 607ab52c03b187fd8ac28992ffb2b6b3a4b83ba0 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 3770c6b..555027f 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..314875c --- /dev/null +++ b/SOURCES/0083-systemd-rootfs-generator.sh-ignore-legacy-root-dev-n.patch @@ -0,0 +1,22 @@ +From 5c088337f76742960f05f4cbac6c867f7a142323 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 555027f..9810026 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..3bab528 --- /dev/null +++ b/SOURCES/0084-dracut-lib.sh-fixed-shebang.patch @@ -0,0 +1,19 @@ +From d02a9c97d4cfe4149aa71174892569b6347bdf52 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 e74b93f..cd62851 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..ac0aa04 --- /dev/null +++ b/SOURCES/0085-iscsi-more-iscsiroot-fixes.patch @@ -0,0 +1,147 @@ +From 72fc1ce3aba3e9fcbe0bfc47d0607e66947e8753 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 156003c..6868710 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 e463add..4be9d56 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..7955367 --- /dev/null +++ b/SOURCES/0086-iscsiroot-touch-the-right-marker-file.patch @@ -0,0 +1,22 @@ +From 4d5ede17afb3402e1c9b48a8fecb8b4750fe160d Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 6868710..60a180d 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..b769734 --- /dev/null +++ b/SOURCES/0087-lvm-lvm_scan.sh-handle-one-LV-at-a-time-with-lvchang.patch @@ -0,0 +1,32 @@ +From 50ef97540f53ea044653ca6c69212e93a01c8f4c Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 85ecd4d..f87831c 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..f90177d --- /dev/null +++ b/SOURCES/0088-dracut-logger.sh-systemd-cat-only-understands-prio-0.patch @@ -0,0 +1,31 @@ +From c411899e9dbc3071e7da68b023d532c69c79a05f Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 f679dc9..70b0da4 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..b3d7a8d --- /dev/null +++ b/SOURCES/0089-Use-builtin-xz-lzma-option-to-use-all-cores-for-mult.patch @@ -0,0 +1,34 @@ +From d7f6f22bca957cc0a5db13f26c3191cae11ac0c2 Mon Sep 17 00:00:00 2001 +From: Koen Kooi +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 +--- + dracut.sh | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/dracut.sh b/dracut.sh +index 8d572a3..ad57218 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..cae1c63 --- /dev/null +++ b/SOURCES/0090-dracut-initramfs-restore-lsinitrd-add-LZ4-support.patch @@ -0,0 +1,87 @@ +From 3eccb9139fcd7559e68162aac348b38782c4d817 Mon Sep 17 00:00:00 2001 +From: Koen Kooi +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 +--- + 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 ec5fe18..f29c814 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 584c29a..f9f243b 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..b3ed76a --- /dev/null +++ b/SOURCES/0091-Revert-dmraid-let-dmraid-setup-the-partitions.patch @@ -0,0 +1,38 @@ +From 3378f290c9f307dea485d08a7ef7764ce81d6047 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 dfd0f1c..3753ddd 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..24afb4b --- /dev/null +++ b/SOURCES/0092-dracut.sh-create-early-cpio-dir-for-acpi-tables.patch @@ -0,0 +1,22 @@ +From 5adc20e4c2575c2a271e01e700a63a0258353870 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 ad57218..5586275 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..1a194b2 --- /dev/null +++ b/SOURCES/0093-dracut.sh-set-file-owners-of-early-cpio-files-to-0-0.patch @@ -0,0 +1,26 @@ +From a590f63ec72df1197b294ad46da6611fca84daf9 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 5586275..0ac2b05 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..4392072 --- /dev/null +++ b/SOURCES/0094-add-skipcpio-utility.patch @@ -0,0 +1,190 @@ +From 979038ba0da3ff61ddb61a809795189d3c25f71a Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 e7da948..5441d8f 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 0000000..fbf391b +--- /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 . ++*/ ++ ++#define PROGRAM_VERSION_STRING "1" ++ ++#ifndef _GNU_SOURCE ++#define _GNU_SOURCE ++#endif ++ ++#include ++#include ++#include ++#include ++#include ++ ++#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 \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..5a1e316 --- /dev/null +++ b/SOURCES/0095-dracut.sh-add-early_cpio-marker-file-to-the-early-cp.patch @@ -0,0 +1,21 @@ +From 77db409239f797e368bfa18a9f07cf119c0dd84d Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 0ac2b05..58acb64 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..b4f3a9a --- /dev/null +++ b/SOURCES/0096-lsinitrd.sh-make-use-of-the-skipcpio-utility.patch @@ -0,0 +1,147 @@ +From 8732cab18a05e98086462e51d9c7b8b7a3190ddf Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 f9f243b..70e12f8 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..644527b --- /dev/null +++ b/SOURCES/0097-network-dhclient-script.sh-set-lease-time.patch @@ -0,0 +1,37 @@ +From 275262b9986cfe79ecb3343cbba7e72e359f8307 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 07c3d9b..70a2b71 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..4bbc350 --- /dev/null +++ b/SOURCES/0098-dracut-lib.sh-bugfix-for-pidof-function.patch @@ -0,0 +1,26 @@ +From 365e7f70465af866e9f89ce630dc48ab75f78b54 Mon Sep 17 00:00:00 2001 +From: Stig Telfer +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 cd62851..61e5a81 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..a3cae4b --- /dev/null +++ b/SOURCES/0099-dracut-lib.sh-bugfix-for-pidof-function.patch @@ -0,0 +1,23 @@ +From 9061e3281f8f0d6cf7fdfae1aaa585d6160b232e Mon Sep 17 00:00:00 2001 +From: Stig Telfer +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 61e5a81..d892c26 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..fd9843d --- /dev/null +++ b/SOURCES/0100-iscsi-iscsiroot.sh-beautify-warning.patch @@ -0,0 +1,22 @@ +From 44e187c863848e51dc4118c2937ba037cbc37240 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 60a180d..8b74332 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..39a7153 --- /dev/null +++ b/SOURCES/0101-dracut.spec-add-skipcpio.patch @@ -0,0 +1,21 @@ +From b46bc56874d879cdf528f71d8ae51ced8330c9cf Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 596d728..d6f1a88 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..4d6a6f9 --- /dev/null +++ b/SOURCES/0102-systemd-ensure-autofs4-and-ipv6-are-included.patch @@ -0,0 +1,29 @@ +From 1e160b06d61d38fb4b97880ea952f5a8d0ba46f9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= +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 511b883..91a6559 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..11748aa --- /dev/null +++ b/SOURCES/0103-dracut-functions.sh-also-search-in-the-updates-direc.patch @@ -0,0 +1,22 @@ +From 9d9dffa4234250aed696db52fc882cfa480fbde0 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 2872516..96a20d5 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..69e9c4c --- /dev/null +++ b/SOURCES/0104-dracut.sh-only-set-the-owner-of-files-to-0-0-if-gene.patch @@ -0,0 +1,36 @@ +From 6e2c53c689006eb71de3e70ac68475bc4c9f5910 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 58acb64..4e23993 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..287cf33 --- /dev/null +++ b/SOURCES/0105-dracut.conf.d-fedora.conf.example-turn-on-early_micr.patch @@ -0,0 +1,19 @@ +From e81ace610db54972b84a6a2c7062092994557b71 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 495e8fb..2364b04 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..cd78f3d --- /dev/null +++ b/SOURCES/0106-network-understand-ip-.-dns1-dns2.patch @@ -0,0 +1,50 @@ +From 85682fb6f9c3e91580792b266fb4e1ef1caea92f Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 30 Jan 2014 13:50:02 +0100 +Subject: [PATCH] network: understand ip=.....:: + +--- + 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 7544401..36fad12 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= 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..2fc61e4 --- /dev/null +++ b/SOURCES/0107-network-ifup.sh-handle-dns1-and-dns2-from-ip-setting.patch @@ -0,0 +1,72 @@ +From b0b16988dd6378b51b6cbecbc70953d7f0a2a123 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 963ba07..985285b 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 . + ===================== + ++**ip=**____:[____]:____:____:____:____:__{none|off|dhcp|on|any|dhcp6|auto6|ibft}__[:[____][:____]]:: ++ 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. ____ 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=**____:____:: + Assign network device name (ie "bootnet") to the NIC with + MAC . +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index 2edcfe6..b33981b 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..5c7b5b8 --- /dev/null +++ b/SOURCES/0108-network-net-lib.sh-parse-ibft-nameserver-settings.patch @@ -0,0 +1,34 @@ +From 3a64364dfccab4253c315755171702db7a31e187 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 36fad12..1b51c85 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..30662fa --- /dev/null +++ b/SOURCES/0109-dmsquash-live-dmsquash-liveiso-genrules.sh-s-loop0-l.patch @@ -0,0 +1,25 @@ +From c1c355698174807bf816f022f84303b460ec9e32 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 30ea180..0f913d7 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..a803689 --- /dev/null +++ b/SOURCES/0110-base-rdsosreport.sh-add-dracut-version-to-rdsosrepor.patch @@ -0,0 +1,43 @@ +From ea373728fe7ab62b60f94cef8026e30974d7a6bd Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 5e11166..3e2ac87 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..2a7257e --- /dev/null +++ b/SOURCES/0111-fcoe-move-uefi-parsing-to-fcoe-uefi-module.patch @@ -0,0 +1,57 @@ +From 837d1da3cd3b4578f4a7d0a9ff40623cc01099f0 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 0000000..007aa59 +--- /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 08ba4ea..d3c58cc 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..ab577ee --- /dev/null +++ b/SOURCES/0112-move-uefi-lib-to-a-seperate-module.patch @@ -0,0 +1,92 @@ +From b148bdea9edfbdd86f318ad363c55fb96a1e559a Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 007aa59..653d88e 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 d3c58cc..fe8e40a 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 d33a0fb..52ce400 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 0000000..4a856ea +--- /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..4c81a16 --- /dev/null +++ b/SOURCES/0113-dracut.spec-add-95fcoe-uefi-and-99uefi-lib.patch @@ -0,0 +1,22 @@ +From 98bd5fbf129ac738345e52503fb37cc469fc5add Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 d6f1a88..302cfc5 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..e3680b4 --- /dev/null +++ b/SOURCES/0114-fcoe-uefi-do-not-include-if-fcoe-utils-not-installed.patch @@ -0,0 +1,28 @@ +From 521662043e8d71830c3c1157f8408523f736f469 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 653d88e..c91f775 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..e53e344 --- /dev/null +++ b/SOURCES/0115-network-fix-dns-parsing-in-ip-parameter.patch @@ -0,0 +1,22 @@ +From a3a5b817ebd6cece50e2cd9e03fe4279d9c2f7ba Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 1b51c85..8948a47 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..6271844 --- /dev/null +++ b/SOURCES/0116-skipcpio-return-something-at-end-of-program.patch @@ -0,0 +1,22 @@ +From a7604c770435477482bbe48c2336964fcef45b7b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= +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 fbf391b..c912061 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..2ce10db --- /dev/null +++ b/SOURCES/0117-skipcpio-fixed-signatured-check.patch @@ -0,0 +1,22 @@ +From a7e6fb923190640d961db10ee109d38b6227536b Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 c912061..ac0578e 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..220ef31 --- /dev/null +++ b/SOURCES/0118-network-ifup-do-not-ifup-an-already-setup-network-in.patch @@ -0,0 +1,26 @@ +From 9baaf2ab4b26d648d46d3c330b75f60a598c401e Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 b33981b..3a03d05 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..deea068 --- /dev/null +++ b/SOURCES/0119-network-ifup-do-not-run-dhclient-twice-on-the-same-i.patch @@ -0,0 +1,23 @@ +From e880049a4092d8231d0342c4e56ace87108ecd48 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 3a03d05..33ec81d 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..f0b5f14 --- /dev/null +++ b/SOURCES/0120-nfs-nfsroot-symlink-dev-null-to-dev-nfs-as-a-marker-.patch @@ -0,0 +1,23 @@ +From 9175fd58469282c1ca87674cec43bec33f6164e6 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 f04159e..d0719ef 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..3b67168 --- /dev/null +++ b/SOURCES/0121-systemd-dracut-pre-pivot-run-for-dev-nfs-root-and-cl.patch @@ -0,0 +1,37 @@ +From 6d392317b87c316c9a0ac4dd064ecd9f99b7767e Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 dd4e49b..6db1f2c 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 8c7554e..e62a1ce 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..1253d08 --- /dev/null +++ b/SOURCES/0122-new_dhcp_next_server-is-really-new_next_server.patch @@ -0,0 +1,25 @@ +From 6a0da312e0118208fa2799abf188755fbd97b479 Mon Sep 17 00:00:00 2001 +From: "Brian C. Lane" +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 f5fc56d..9ced2e6 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..c0883e7 --- /dev/null +++ b/SOURCES/0123-dracut.sh-Fix-variable-name-typo.patch @@ -0,0 +1,30 @@ +From 833db4ead461130d529bfc74f35a632f56283a19 Mon Sep 17 00:00:00 2001 +From: Colin Guthrie +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 4e23993..89df9cd 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..8eed3ad --- /dev/null +++ b/SOURCES/0124-kernel-modules-add-sdhci_acpi-to-the-static-list-of-.patch @@ -0,0 +1,27 @@ +From c473c3ee57a630b887a442149024d1f319a7c826 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 f4db6aa..a7803d0 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..14a42a0 --- /dev/null +++ b/SOURCES/0125-dracut-functions.sh-find_kernel_modules_by_path-fixe.patch @@ -0,0 +1,24 @@ +From 648353b27209fa24e51f54a12f105b2d4f521183 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 96a20d5..bddcdcf 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..04a0be9 --- /dev/null +++ b/SOURCES/0126-iscsi-for-iBFT-read-the-initiator-name-from-the-corr.patch @@ -0,0 +1,26 @@ +From 09e11165a6ca55ca0b445753695923cb22e5d635 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 8b74332..54f4990 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..4468606 --- /dev/null +++ b/SOURCES/0127-fcoe-uefi-try-all-FcoeBootDevice-variables-for-a-Dev.patch @@ -0,0 +1,45 @@ +From 7633ef988a8b1e7611f2b8a64452c2d588ff89fb Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 e03bcb3..0799cdd 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..bfdd9e6 --- /dev/null +++ b/SOURCES/0128-dracut.sh-write-directly-to-the-output-file.patch @@ -0,0 +1,42 @@ +From 97dd91273c811b79f99c7a62df9cebc390c818c9 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 89df9cd..c4bf4eb 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..fe3260d --- /dev/null +++ b/SOURCES/0129-systemd-add-sys-kernel-config.mount.patch @@ -0,0 +1,31 @@ +From e90e9dc73381cf0c54472e9346b3f0bf94889b90 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 91a6559..5081a5a 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..5fcdff0 --- /dev/null +++ b/SOURCES/0130-systemd-add-70-uaccess.rules.patch @@ -0,0 +1,22 @@ +From 190222ce98756bdeac92c9fbcf34624fe756cddd Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 5081a5a..429781b 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..37dd767 --- /dev/null +++ b/SOURCES/0131-Add-flag-to-toggle-hostonly-cmdline-storing-in-the-i.patch @@ -0,0 +1,250 @@ +From 2b965be4f11584462fa891e4508c6b115de2a1ed Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 b294675..ba125c0 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** __:: + Use __ to address disks and partitions. + __ can be any directory name found in /dev/disk. +diff --git a/dracut.conf.5.asc b/dracut.conf.5.asc +index 5c94118..be62da9 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=*"____":: + Use __ to address disks and partitions. + __ can be any directory name found in /dev/disk. +diff --git a/dracut.sh b/dracut.sh +index c4bf4eb..1c5e688 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 1858391..267d39d 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 11181cf..b230cb0 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 f0c9b96..1c962d5 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 34aae1e..1e03847 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 + + # > "${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..3037080 --- /dev/null +++ b/SOURCES/0132-default-conf-set-hostonly_cmdline-no.patch @@ -0,0 +1,19 @@ +From 06eb3b80be3d4da642aeb05b37f567dd3d468a92 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 2364b04..ff4e3b2 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..9b3f939 --- /dev/null +++ b/SOURCES/0133-systemd-rootfs-generator.sh-generate-units-in-run-sy.patch @@ -0,0 +1,65 @@ +From 40df7e9cc77e1cff9d3bf53eec6eea1dfbbc2d8a Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 9810026..a11ce59 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..16ddb06 --- /dev/null +++ b/SOURCES/0134-ifcfg-write-ifcfg.sh-do-not-bind-s390-to-MAC-if-SUBC.patch @@ -0,0 +1,54 @@ +From fc4298a5dd3605db4e468ae58efa223775dbf0d0 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 dcb2aef..d9e9f3a 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..4318d42 --- /dev/null +++ b/SOURCES/0135-network-net-lib.sh-wait_for_ipv6_auto-also-wait-for-.patch @@ -0,0 +1,28 @@ +From db7651a8bce141a09df6010f992d25d532cef896 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 8948a47..4e1b019 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..333debe --- /dev/null +++ b/SOURCES/0136-network-dhclient-script.sh-DHCP-IPv6-interface-setup.patch @@ -0,0 +1,86 @@ +From 012f82f7ef99881ce41c231c774f838f49e59781 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 70a2b71..a9c2523 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 +@@ -98,6 +124,29 @@ case $reason in + 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 ++ ;; + *) echo "dhcp: $reason";; + esac + 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..6592e6a --- /dev/null +++ b/SOURCES/0137-network-IPv6-status-wait-for-tentative-flag-to-be-cl.patch @@ -0,0 +1,57 @@ +From e25a74d851509ac7bc644de6986bedc06bfe748d Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 33ec81d..e439106 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 4e1b019..a586711 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..ac132b4 --- /dev/null +++ b/SOURCES/0138-network-merge-setup_net_-netif.ok-and-net.-netif.did.patch @@ -0,0 +1,152 @@ +From 8b77ffc4d82301e6a674e1d47aa8aa3872f9bc5e Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 a9c2523..822cce9 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 e439106..02dfc94 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 c4def61..af2f09c 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 a586711..7430e4c 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 d9e9f3a..e2fa485 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..bce089a --- /dev/null +++ b/SOURCES/0139-systemd-add-systemd-sysctl-service.patch @@ -0,0 +1,30 @@ +From 902c42afdd0af97dfb3dd26add19de0367857c3a Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 429781b..52edd80 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..5976e9a --- /dev/null +++ b/SOURCES/0140-add-default-values-in-fstab_lines.patch @@ -0,0 +1,61 @@ +From cea62a2a68db9d63380d279acf64b672442d2f40 Mon Sep 17 00:00:00 2001 +From: Dave Young +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 +--- + 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 ba125c0..f97074a 100644 +--- a/dracut.8.asc ++++ b/dracut.8.asc +@@ -311,9 +311,13 @@ provide a valid _/etc/fstab_. + **--add-fstab** __:: + Add entries of __ to the initramfs /etc/fstab. + +-**--mount** "__ __ __ __":: +- Mount __ on __ with __ and __ in the initramfs ++**--mount** "__ __ __ [__ [__ [__]]]":: ++ Mount __ on __ with __ in the ++ initramfs. __, __ and __ can ++ be specified, see fstab manpage for the details. ++ The default __ is "defaults". ++ The default __ is "0". ++ the default __ is "2". + + **--add-device** __ :: + Bring up __ in initramfs, __ should be the device name. +diff --git a/dracut.sh b/dracut.sh +index 1c5e688..2d5b7dc 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..50e8e23 --- /dev/null +++ b/SOURCES/0141-test-add-missing-Makefile.testdir.patch @@ -0,0 +1,28 @@ +From 6ccf39ef1b96d4992abd6b6e95a1f6945592accc Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 0000000..33c2a9a +--- /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..3f9b019 --- /dev/null +++ b/SOURCES/0142-test-Makefile-add-SKIP-env-to-skip-certain-tests.patch @@ -0,0 +1,21 @@ +From dd826ee50d06b8f8e22e78e56e7d09bd5368245f Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 97a7aad..f71f854 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..723145d --- /dev/null +++ b/SOURCES/0143-test-TEST-50-MULTINIC-client-init.sh-skip-MAC-marker.patch @@ -0,0 +1,21 @@ +From f9b2de9328b5d11de0a731d4724576ad7a4ff2b0 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 f13c379..51f8b64 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..deab635 --- /dev/null +++ b/SOURCES/0144-Add-no-hostonly-cmdline-option-handling-for-getopt.patch @@ -0,0 +1,26 @@ +From c401e97b0b649385debfb61c8e5e24f81810466f Mon Sep 17 00:00:00 2001 +From: WANG Chao +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 +--- + dracut.sh | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/dracut.sh b/dracut.sh +index 2d5b7dc..78d7fad 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..7901b85 --- /dev/null +++ b/SOURCES/0145-dracut-don-t-let-devices-timeout.patch @@ -0,0 +1,37 @@ +From f90bc8c75438c5a7e08288343edbb42f49d42178 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 a11ce59..2c09895 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 d892c26..62facda 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..8134630 --- /dev/null +++ b/SOURCES/0146-Do-not-wait_for_dev-if-hostonly_cmdline-not-set.patch @@ -0,0 +1,73 @@ +From 285da6473b9b48a6eddc30c82964cdd2fca7c0a0 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 78d7fad..95f18db 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 52ce400..fddf4b0 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..6eb9db8 --- /dev/null +++ b/SOURCES/0147-systemd-dracut-shutdown.service-make-failure-non-fat.patch @@ -0,0 +1,21 @@ +From ec67b82bd539625d35cdbe6e410a4e3bc16e25ce Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 e733300..3b8b6da 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..f12d0a5 --- /dev/null +++ b/SOURCES/0148-network-dhclient-script-do-PREINIT6-for-DHCP6.patch @@ -0,0 +1,75 @@ +From f7a3db1abaf437d50615a54448d9d5f45efe8cf4 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 822cce9..50e8932 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 02dfc94..51b0d52 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..de3238a --- /dev/null +++ b/SOURCES/0149-shutdown-if-kexec-failed-do-a-simple-reboot.patch @@ -0,0 +1,21 @@ +From 1dedc040181895fc95819fc6546d6862f3aba0a5 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 162abcb..1daf2ca 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..1f1623e --- /dev/null +++ b/SOURCES/0150-dracut-initramfs-restore-fix-unpacking-with-early-mi.patch @@ -0,0 +1,40 @@ +From 0573e86a95374ce5e8816b1771634db049c70a3f Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 f29c814..0dd1938 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..c0aaa10 --- /dev/null +++ b/SOURCES/0151-fcoe-wait-for-lldpad-to-be-ready.patch @@ -0,0 +1,45 @@ +From 17445cb35ff2f626ccde07de61106bbcd6d0b268 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 ecb1593..60642cf 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 fe8e40a..3ffaf5a 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..ce5340a --- /dev/null +++ b/SOURCES/0152-network-handle-ip-dhcp6-for-all-interfaces.patch @@ -0,0 +1,28 @@ +From 8cfcacd3f95621b71766071881a3f5a11a6001de Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 51b0d52..ede0188 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..a6ad8ef --- /dev/null +++ b/SOURCES/0153-lsinitrd.sh-prevent-construct.patch @@ -0,0 +1,83 @@ +From 2819d1e4445b8be42fc6cbf0827ce4a00c3e66bf Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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/ for constructs like: +foo < <$(bar) +--- + lsinitrd.sh | 49 +++++++++++++++++++++++++++++-------------------- + 1 file changed, 29 insertions(+), 20 deletions(-) + +diff --git a/lsinitrd.sh b/lsinitrd.sh +index 70e12f8..2fbebd8 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..b61341f --- /dev/null +++ b/SOURCES/0154-network-DCHPv6-set-valid_lft-and-preferred_lft.patch @@ -0,0 +1,35 @@ +From 02d602fe7014e39edf17f25643e3c3d1aa36c874 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 50e8932..ba05250 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..8398925 --- /dev/null +++ b/SOURCES/0155-dm-add-dm-cache-modules.patch @@ -0,0 +1,23 @@ +From 863c6c0a8e1507feda51f2e310140c077841ff46 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 fa38e85..1fd9298 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..b6ff190 --- /dev/null +++ b/SOURCES/0156-fcoe-workaround-fcoe-timing-issues.patch @@ -0,0 +1,55 @@ +From 876b463114b26bf33f71589ad99860efadc8d42e Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 80894ed..fa3af6d 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 60642cf..edbfcc8 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..b20cd15 --- /dev/null +++ b/SOURCES/0157-Add-legacy-flag-l-to-lz4-and-update-magic-number.patch @@ -0,0 +1,39 @@ +From dea5f0f06b306b786dda5af59f7a4d54afd3c040 Mon Sep 17 00:00:00 2001 +From: Alexander Tsoy +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 95f18db..a5fcf38 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 2fbebd8..7b12ab9 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..68d0172 --- /dev/null +++ b/SOURCES/0158-fs-lib-always-install-fsck.-fs-if-present.patch @@ -0,0 +1,40 @@ +From c4bcf133dc4a56eb2ce21bec7a3c3bf7ef67c578 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 c9c88b7..249aa84 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..2daafab --- /dev/null +++ b/SOURCES/0159-ifcfg-write-ifcfg.sh-turn-on-IPV6INIT-if-any-inet6-a.patch @@ -0,0 +1,25 @@ +From 76251217e6adf885eea9780e7a5f07abe9179fc2 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +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 e2fa485..486c69a 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/SPECS/dracut.spec b/SPECS/dracut.spec index f46a0d9..07d21a1 100644 --- a/SPECS/dracut.spec +++ b/SPECS/dracut.spec @@ -10,7 +10,7 @@ Name: dracut Version: 033 -Release: 40%{?dist} +Release: 160%{?dist} Summary: Initramfs generator using udev %if 0%{?fedora} || 0%{?rhel} @@ -68,6 +68,126 @@ 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 BuildRequires: bash git @@ -342,6 +462,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 @@ -452,6 +573,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 @@ -491,6 +614,164 @@ rm -rf -- $RPM_BUILD_ROOT %endif %changelog +* Fri Apr 04 2014 Harald Hoyer 033-160 +- add fsck., 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 033-157 +- workaround fcoe timing issues +Resolves: rhbz#1080353 + +* Thu Mar 27 2014 Harald Hoyer 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 033-154 +- lsinitrd: fix for chroot envs without /dev/fd +Resolves: rhbz#1081396 + +* Tue Mar 25 2014 Harald Hoyer 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 033-151 +- fixed dracut-initramfs-restore with early microcode +Resolves: rhbz#1067116 + +* Tue Mar 18 2014 Harald Hoyer 033-150 +- make dracut-shutdown not fail fatally +Resolves: rhbz#1067116 +- do PREINIT6 for DHCP6 +Resolves: rhbz#1064365 + +* Thu Mar 06 2014 Harald Hoyer 033-147 +- also do not hardcode waiting for devices +Resolves: rhbz#1073101 +Related: rhbz#985160 + +* Wed Mar 05 2014 Harald Hoyer 033-146 +- don't let devices timeout +Resolves: rhbz#949697 + +* Mon Mar 03 2014 Harald Hoyer 033-145 +- fixed argument handling for cmdline config +Resolves: rhbz#949697 + +* Fri Feb 28 2014 Harald Hoyer 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 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 033-125 +- fix plymouth in initrd +Resolves: #1015564 + +* Mon Feb 10 2014 Harald Hoyer 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 033-115 +- add fcoe module even in hostonly case +Resolves: rhbz#1038827 + +* Fri Jan 31 2014 Harald Hoyer 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 - 033-89 +- Mass rebuild 2014-01-24 + +* Fri Jan 24 2014 Harald Hoyer 033-88 +- fixed iscsistart for iscsi_firmware +Related: rhbz#1031160 + +* Wed Jan 22 2014 Harald Hoyer 033-86 +- fixed iscsistart for iscsi_firmware +Related: rhbz#1031160 + +* Mon Jan 20 2014 Harald Hoyer 033-85 +- fixed shebang of dracut-lib.sh +Related: rhbz#1031160 + +* Fri Jan 17 2014 Harald Hoyer 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 033-69 +- Add udev seat rules for plymouth +Related: #1043689 +Related: #1026571 + +* Fri Dec 27 2013 Daniel Mach - 033-68 +- Mass rebuild 2013-12-27 + +* Wed Dec 18 2013 Harald Hoyer 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 033-40 - fips: include crct10dif_generic Resolves: rhbz#1024455