From 38a2ddf58ab8d5ff3c1ce0d9abc5931612ef5167 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Apr 05 2013 10:05:17 +0000 Subject: dracut-027-10.git20130405 - fix crypto password timeout on the dracut side --- diff --git a/0001-dracut.spec-Require-systemd-199.patch b/0001-dracut.spec-Require-systemd-199.patch new file mode 100644 index 0000000..064bc80 --- /dev/null +++ b/0001-dracut.spec-Require-systemd-199.patch @@ -0,0 +1,22 @@ +From d50cf62d62069c50eb1afed9d377aa2cc8c967ef Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 26 Mar 2013 17:04:43 +0100 +Subject: [PATCH] dracut.spec: Require systemd >= 199 + +--- + dracut.spec | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dracut.spec b/dracut.spec +index af417a4..cb605c6 100644 +--- a/dracut.spec ++++ b/dracut.spec +@@ -92,7 +92,7 @@ Requires: kbd kbd-misc + + %if 0%{?fedora} || 0%{?rhel} > 6 + Requires: util-linux >= 2.21 +-Requires: systemd >= 198-5 ++Requires: systemd >= 199 + Conflicts: grubby < 8.23 + %else + Requires: udev > 166 diff --git a/0001-systemd-module-setup.sh-call-systemd-in-private-dir-.patch b/0001-systemd-module-setup.sh-call-systemd-in-private-dir-.patch deleted file mode 100644 index bc61cbd..0000000 --- a/0001-systemd-module-setup.sh-call-systemd-in-private-dir-.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 900e15da342db2675d7ccd3ca17907bc6ec8cfc5 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Fri, 8 Mar 2013 11:50:03 +0100 -Subject: [PATCH] systemd/module-setup.sh: call systemd in private dir for - version - ---- - 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 3ce1705..32d4be5 100755 ---- a/modules.d/98systemd/module-setup.sh -+++ b/modules.d/98systemd/module-setup.sh -@@ -17,7 +17,7 @@ depends() { - - install() { - -- SYSTEMD_VERSION=$(systemd --version | { read a b a; echo $b; }) -+ SYSTEMD_VERSION=$($systemdutildir/systemd --version | { read a b a; echo $b; }) - if (( $SYSTEMD_VERSION < 198 )); then - dfatal "systemd version $SYSTEMD_VERSION is too low. Need at least version 198." - exit 1 diff --git a/0002-add-lib-kernel-install.d-51-dracut-rescue.install.patch b/0002-add-lib-kernel-install.d-51-dracut-rescue.install.patch deleted file mode 100644 index 424d889..0000000 --- a/0002-add-lib-kernel-install.d-51-dracut-rescue.install.patch +++ /dev/null @@ -1,118 +0,0 @@ -From d837ac398492cc2f6683cb8e2cbb80475ba232d5 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Sat, 9 Mar 2013 15:09:55 +0100 -Subject: [PATCH] add /lib/kernel/install.d/51-dracut-rescue.install - -Upon installation of a kernel, check if a rescue image is already -available and if not, create a non-hostonly generic initramfs image with -the rescue module added. ---- - 51-dracut-rescue.install | 73 ++++++++++++++++++++++++++++++++++++++++++++++++ - Makefile | 1 + - dracut.spec | 1 + - 3 files changed, 75 insertions(+) - create mode 100755 51-dracut-rescue.install - -diff --git a/51-dracut-rescue.install b/51-dracut-rescue.install -new file mode 100755 -index 0000000..844e578 ---- /dev/null -+++ b/51-dracut-rescue.install -@@ -0,0 +1,73 @@ -+#!/bin/sh -+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- -+# ex: ts=8 sw=4 sts=4 et filetype=sh -+ -+export LANG=C -+ -+COMMAND="$1" -+KERNEL_VERSION="$2" -+BOOT_DIR_ABS="$3" -+BOOT_DIR="${3#/boot}" -+ -+[[ -f /etc/os-release ]] && . /etc/os-release -+[[ -f /etc/machine-id ]] && read MACHINE_ID < /etc/machine-id -+if [[ -f /etc/kernel/cmdline ]]; then -+ readarray -t BOOT_OPTIONS < /etc/kernel/cmdline -+fi -+if ! [[ "${BOOT_OPTIONS[@]}" ]]; then -+ readarray -t BOOT_OPTIONS < /proc/cmdline -+fi -+if ! [[ $BOOT_OPTIONS ]]; then -+ exit 1 -+fi -+ -+LOADER_ENTRY="/boot/loader/entries/${MACHINE_ID}-00-${KERNEL_VERSION}-rescue.conf" -+ -+ret=0 -+ -+case "$COMMAND" in -+ add) -+ for i in "/boot/loader/entries/${MACHINE_ID}-00-"*"-rescue.conf"; do -+ [[ -f $i ]] && exit 0 -+ done -+ -+ dracut --no-hostonly -a "rescue" "$3"/initrd-rescue "$2" -+ ((ret+=$?)) -+ -+ { -+ echo "title $PRETTY_NAME - Rescue Image" -+ echo "version $KERNEL_VERSION" -+ echo "machine-id $MACHINE_ID" -+ echo "options ${BOOT_OPTIONS[@]} rd.auto=1" -+ echo "linux $BOOT_DIR/linux" -+ echo "initrd $BOOT_DIR/initrd-rescue" -+ } > $LOADER_ENTRY -+ ((ret+=$?)) -+ -+ if (( $ret == 0 )); then -+ command -v yumdb &>/dev/null && \ -+ yumdb set installonly keep kernel-$KERNEL_VERSION >/dev/null -+ fi -+ -+ ;; -+ -+ remove) -+ [[ -f $LOADER_ENTRY ]] || exit 0 -+ -+ rm -f "$LOADER_ENTRY" "$3"/initrd-rescue -+ -+ if command -v yumdb &>/dev/null; then -+ if [[ $(yumdb get installonly kernel-$KERNEL_VERSION 2>/dev/null) == *installonly\ \=\ keep* ]]; then -+ yumdb del installonly kernel-$KERNEL_VERSION >/dev/null -+ fi -+ fi -+ ;; -+ -+ *) -+ usage -+ ret=1;; -+esac -+ -+((ret+=$?)) -+ -+exit $ret -diff --git a/Makefile b/Makefile -index 7546ac6..a11689c 100644 ---- a/Makefile -+++ b/Makefile -@@ -118,6 +118,7 @@ endif - 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 - - dracut-version.sh: - @echo "DRACUT_VERSION=$(VERSION)-$(GITVERSION)" > dracut-version.sh -diff --git a/dracut.spec b/dracut.spec -index 707e66a..6d30e57 100644 ---- a/dracut.spec -+++ b/dracut.spec -@@ -338,6 +338,7 @@ rm -rf $RPM_BUILD_ROOT - %endif - %if 0%{?fedora} || 0%{?rhel} > 6 - %{_prefix}/lib/kernel/install.d/50-dracut.install -+%{_prefix}/lib/kernel/install.d/51-dracut-rescue.install - %endif - - %files network diff --git a/0002-base-init.sh-fix-version-output.patch b/0002-base-init.sh-fix-version-output.patch new file mode 100644 index 0000000..e53968e --- /dev/null +++ b/0002-base-init.sh-fix-version-output.patch @@ -0,0 +1,22 @@ +From cc6f0925df421a4f7945cd80f0f88bd629454607 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 2 Apr 2013 13:29:24 +0200 +Subject: [PATCH] base/init.sh: fix version output + +--- + modules.d/99base/init.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh +index b441a27..410201a 100755 +--- a/modules.d/99base/init.sh ++++ b/modules.d/99base/init.sh +@@ -104,7 +104,7 @@ else + fi + + [ -f /etc/initrd-release ] && . /etc/initrd-release +-[ -n "$VERSION" ] && info "dracut-$VERSION" ++[ -n "$VERSION_ID" ] && info "$NAME-$VERSION_ID" + + source_conf /etc/conf.d + diff --git a/0003-base-dracut-lib.sh-add-dev_unit_name.patch b/0003-base-dracut-lib.sh-add-dev_unit_name.patch new file mode 100644 index 0000000..769942a --- /dev/null +++ b/0003-base-dracut-lib.sh-add-dev_unit_name.patch @@ -0,0 +1,42 @@ +From c4b572b5ca767aec6cc8b5ba98b5fc76c991f690 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 4 Apr 2013 12:51:33 +0200 +Subject: [PATCH] base/dracut-lib.sh: add dev_unit_name() + +add helper function to convert device path to systemd unit names +--- + modules.d/99base/dracut-lib.sh | 14 ++++++++++---- + 1 file changed, 10 insertions(+), 4 deletions(-) + +diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh +index e456b01..79fc953 100755 +--- a/modules.d/99base/dracut-lib.sh ++++ b/modules.d/99base/dracut-lib.sh +@@ -818,6 +818,15 @@ wait_for_mount() + } >> "$hookdir/emergency/90-${_name}.sh" + } + ++dev_unit_name() ++{ ++ _name="${1%%/}" ++ _name="${_name##/}" ++ _name="$(str_replace "$_name" '-' '\x2d')" ++ _name="$(str_replace "$_name" '/' '-')" ++ echo "$_name" ++} ++ + # wait_for_dev + # + # Installs a initqueue-finished script, +@@ -835,10 +844,7 @@ wait_for_dev() + } >> "${PREFIX}$hookdir/emergency/80-${_name}.sh" + + if [ -n "$DRACUT_SYSTEMD" ]; then +- _name="${1%%/}" +- _name="${_name##/}" +- _name="$(str_replace "$_name" '-' '\x2d')" +- _name="$(str_replace "$_name" '/' '-')" ++ _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 diff --git a/0003-fedora.conf.example-make-hostonly-default-for-fedora.patch b/0003-fedora.conf.example-make-hostonly-default-for-fedora.patch deleted file mode 100644 index caa7ad7..0000000 --- a/0003-fedora.conf.example-make-hostonly-default-for-fedora.patch +++ /dev/null @@ -1,51 +0,0 @@ -From bcd352dfa105544a7531d999301c84bf88e850ed Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Sat, 9 Mar 2013 15:10:23 +0100 -Subject: [PATCH] fedora.conf.example: make hostonly default for fedora - ---- - dracut.conf.d/fedora.conf.example | 1 + - dracut.spec | 7 +++---- - 2 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/dracut.conf.d/fedora.conf.example b/dracut.conf.d/fedora.conf.example -index 6266921..8448fc3 100644 ---- a/dracut.conf.d/fedora.conf.example -+++ b/dracut.conf.d/fedora.conf.example -@@ -12,3 +12,4 @@ systemdutildir=/usr/lib/systemd - systemdsystemunitdir=/usr/lib/systemd/system - udevdir=/usr/lib/udev - add_dracutmodules+=" systemd " -+hostonly="yes" -diff --git a/dracut.spec b/dracut.spec -index 6d30e57..6906d68 100644 ---- a/dracut.spec -+++ b/dracut.spec -@@ -132,7 +132,7 @@ Requires: nss-softokn-freebl - - %description fips - This package requires everything which is needed to build an --all purpose initramfs with dracut, which does an integrity check. -+initramfs with dracut, which does an integrity check. - %endif - - %package fips-aesni -@@ -141,8 +141,7 @@ Requires: %{name}-fips = %{version}-%{release} - - %description fips-aesni - This package requires everything which is needed to build an --all purpose initramfs with dracut, which does an integrity check --and adds the aesni-intel kernel module. -+initramfs with dracut, which does an integrity check and adds the aesni-intel kernel module. - - %package caps - Summary: dracut modules to build a dracut initramfs which drops capabilities -@@ -151,7 +150,7 @@ Requires: libcap - - %description caps - This package requires everything which is needed to build an --all purpose initramfs with dracut, which drops capabilities. -+initramfs with dracut, which drops capabilities. - - %package tools - Summary: dracut tools to build the local initramfs diff --git a/0004-crypt-parse-crypt.sh-create-udev-rule-for-systemd.patch b/0004-crypt-parse-crypt.sh-create-udev-rule-for-systemd.patch new file mode 100644 index 0000000..13f35bf --- /dev/null +++ b/0004-crypt-parse-crypt.sh-create-udev-rule-for-systemd.patch @@ -0,0 +1,31 @@ +From ab9b04f55bb9917749e9ddb52ce8f5f1ef56af99 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 4 Apr 2013 12:54:59 +0200 +Subject: [PATCH] crypt/parse-crypt.sh: create udev rule for systemd + +Start the systemd-cryptsetup@luks-*.service for the detected crypto_LUKS +device in the initqueue, so we block in the initqueue and wait for the +password entry. +--- + modules.d/90crypt/parse-crypt.sh | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/modules.d/90crypt/parse-crypt.sh b/modules.d/90crypt/parse-crypt.sh +index d61220c..4cb281b 100755 +--- a/modules.d/90crypt/parse-crypt.sh ++++ b/modules.d/90crypt/parse-crypt.sh +@@ -27,6 +27,14 @@ else + printf -- '--name cryptroot-ask-%%k %s ' $(command -v cryptroot-ask) + printf -- '$env{DEVNAME} luks-$env{ID_FS_UUID} %s"\n' $tout + } >> /etc/udev/rules.d/70-luks.rules.new ++ else ++ { ++ printf -- 'ENV{ID_FS_TYPE}=="crypto_LUKS", ' ++ printf -- 'ENV{ID_FS_UUID}=="*%s*", ' $luksid ++ printf -- 'RUN+="%s --unique --onetime ' $(command -v initqueue) ++ printf -- '--name systemd-cryptsetup-%%k %s start ' $(command -v systemctl) ++ printf -- 'systemd-cryptsetup@luks$$(dev_unit_name -$env{ID_FS_UUID}).service"\n' ++ } >> /etc/udev/rules.d/70-luks.rules.new + fi + + uuid=$luksid diff --git a/0004-dracut.sh-remove-default-marker-in-help.patch b/0004-dracut.sh-remove-default-marker-in-help.patch deleted file mode 100644 index 727f14f..0000000 --- a/0004-dracut.sh-remove-default-marker-in-help.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 54e7d7c32daf14f7174dd852c64924cb4f2daa69 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Sat, 9 Mar 2013 15:11:12 +0100 -Subject: [PATCH] dracut.sh: remove (default) marker in --help - ---- - dracut.sh | 14 +++++++------- - 1 file changed, 7 insertions(+), 7 deletions(-) - -diff --git a/dracut.sh b/dracut.sh -index 28ed4f1..7243078 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -69,11 +69,11 @@ Creates initial ramdisk images for preloading modules - - --kver [VERSION] Set kernel version to [VERSION]. - -f, --force Overwrite existing initramfs file. -+ -a, --add [LIST] Add a space-separated list of dracut modules. - -m, --modules [LIST] Specify a space-separated list of dracut modules to - call when building the initramfs. Modules are located - in /usr/lib/dracut/modules.d. - -o, --omit [LIST] Omit a space-separated list of dracut modules. -- -a, --add [LIST] Add a space-separated list of dracut modules. - -d, --drivers [LIST] Specify a space-separated list of kernel modules to - exclusively include in the initramfs. - --add-drivers [LIST] Specify a space-separated list of kernel -@@ -90,12 +90,12 @@ Creates initial ramdisk images for preloading modules - --kernel-only Only install kernel drivers and firmware files - --no-kernel Do not install kernel drivers and firmware files - --kernel-cmdline [PARAMETERS] Specify default kernel command line parameters -- --strip Strip binaries in the initramfs (default) -+ --strip Strip binaries in the initramfs - --nostrip Do not strip binaries in the initramfs -- --hardlink Hardlink files in the initramfs (default) -+ --hardlink Hardlink files in the initramfs - --nohardlink Do not hardlink files in the initramfs - --prefix [DIR] Prefix initramfs files with [DIR] -- --noprefix Do not prefix initramfs files (default) -+ --noprefix Do not prefix initramfs files - --mdadmconf Include local /etc/mdadm.conf - --nomdadmconf Do not include local /etc/mdadm.conf - --lvmconf Include local /etc/lvm/lvm.conf -@@ -111,11 +111,11 @@ Creates initial ramdisk images for preloading modules - 1 - only fatal errors - 2 - all errors - 3 - warnings -- 4 - info (default) -+ 4 - info - 5 - debug info (here starts lots of output) - 6 - trace info (and even more) -- -v, --verbose Increase verbosity level (default is info(4)) -- -q, --quiet Decrease verbosity level (default is info(4)) -+ -v, --verbose Increase verbosity level -+ -q, --quiet Decrease verbosity level - -c, --conf [FILE] Specify configuration file to use. - Default: /etc/dracut.conf - --confdir [DIR] Specify configuration directory to use *.conf files diff --git a/0005-base-dracut-lib.sh-wait_for_dev-cancel_wait_for_dev-.patch b/0005-base-dracut-lib.sh-wait_for_dev-cancel_wait_for_dev-.patch new file mode 100644 index 0000000..4902f24 --- /dev/null +++ b/0005-base-dracut-lib.sh-wait_for_dev-cancel_wait_for_dev-.patch @@ -0,0 +1,111 @@ +From 6db8c5a5fe5b77de757e7b669c8277cd2dafaf8e Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 4 Apr 2013 12:56:42 +0200 +Subject: [PATCH] base/dracut-lib.sh:wait_for_dev()/cancel_wait_for_dev() set + systemd timeouts + +Set systemd unit timeouts for the devices we wait for. The systemd +default is 90 seconds, which is way too low for complicated setups. +--- + modules.d/99base/dracut-lib.sh | 15 ++++++++++++++- + modules.d/99base/module-setup.sh | 14 +++++++------- + modules.d/99base/wait-host-devs.sh | 20 -------------------- + 3 files changed, 21 insertions(+), 28 deletions(-) + delete mode 100644 modules.d/99base/wait-host-devs.sh + +diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh +index 79fc953..f2b16d3 100755 +--- a/modules.d/99base/dracut-lib.sh ++++ b/modules.d/99base/dracut-lib.sh +@@ -849,6 +849,13 @@ wait_for_dev() + [ -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 + 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 + fi + } + +@@ -858,6 +865,12 @@ cancel_wait_for_dev() + _name="$(str_replace "$1" '/' '\\x2f')" + rm -f "$hookdir/initqueue/finished/devexists-${_name}.sh" + rm -f "$hookdir/emergency/80-${_name}.sh" ++ if [ -n "$DRACUT_SYSTEMD" ]; then ++ _name=$(dev_unit_name "$1") ++ rm -f ${PREFIX}/etc/systemd/system/initrd.target.requires/${_name}.device ++ rm -f ${PREFIX}/etc/systemd/system/${_name}.device.d/timeout.conf ++ /sbin/initqueue --onetime --unique --name daemon-reload systemctl daemon-reload ++ fi + } + + killproc() { +@@ -1023,7 +1036,7 @@ listlist() { + + # returns OK if both lists contain the same values. An order and a duplication + # doesn't matter. +-# ++# + # $1 = separator + # $2 = list1 + # $3 = list2 +diff --git a/modules.d/99base/module-setup.sh b/modules.d/99base/module-setup.sh +index 7f2940b..4955b7b 100755 +--- a/modules.d/99base/module-setup.sh ++++ b/modules.d/99base/module-setup.sh +@@ -89,18 +89,18 @@ install() { + + ## save host_devs which we need bring up + ( ++ if dracut_module_included "systemd"; then ++ DRACUT_SYSTEMD=1 ++ fi ++ PREFIX="$initdir" ++ + . "$moddir/dracut-lib.sh" ++ + for _dev in ${host_devs[@]}; do + _pdev=$(get_persistent_dev $_dev) + + case "$_pdev" in +- /dev/?*) +- if ! dracut_module_included "systemd"; then +- PREFIX="$initdir" wait_for_dev $_pdev +- else +- DRACUT_SYSTEMD=1 PREFIX="$initdir" wait_for_dev $_pdev +- fi +- ;; ++ /dev/?*) wait_for_dev $_pdev;; + *) ;; + esac + done +diff --git a/modules.d/99base/wait-host-devs.sh b/modules.d/99base/wait-host-devs.sh +deleted file mode 100644 +index ce84922..0000000 +--- a/modules.d/99base/wait-host-devs.sh ++++ /dev/null +@@ -1,20 +0,0 @@ +-#!/bin/sh +-# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +-# ex: ts=8 sw=4 sts=4 et filetype=sh +- +-type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh +- +-wait_host_devs() { +- local _dev +- +- while read _dev; do +- case "$_dev" in +- /dev/?*) +- wait_for_dev $_dev +- ;; +- *) ;; +- esac +- done < $1 +-} +- +-[ -f /etc/host_devs ] && wait_host_devs /etc/host_devs diff --git a/0005-dracut.sh-add-new-default-path-to-initramfs-accordin.patch b/0005-dracut.sh-add-new-default-path-to-initramfs-accordin.patch deleted file mode 100644 index 0cd7394..0000000 --- a/0005-dracut.sh-add-new-default-path-to-initramfs-accordin.patch +++ /dev/null @@ -1,40 +0,0 @@ -From cc2303001e713f2f7c3f70161c28aa95f4d339d1 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Sat, 9 Mar 2013 15:11:39 +0100 -Subject: [PATCH] dracut.sh: add new default path to initramfs according to - bootloader spec - -see kernel-install(8) and -http://www.freedesktop.org/wiki/Specifications/BootLoaderSpec ---- - dracut.sh | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) - -diff --git a/dracut.sh b/dracut.sh -index 7243078..8f3e5d2 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -442,7 +442,13 @@ if ! [[ $kernel ]]; then - fi - - if ! [[ $outfile ]]; then -- outfile="/boot/initramfs-$kernel.img" -+ [[ -f /etc/machine-id ]] && read MACHINE_ID < /etc/machine-id -+ -+ if [[ $MACHINE_ID ]] && ( [[ -d /boot/${MACHINE_ID} ]] || [[ -L /boot/${MACHINE_ID} ]] ); then -+ outfile="/boot/${MACHINE_ID}/$kernel/initrd" -+ else -+ outfile="/boot/initramfs-$kernel.img" -+ fi - fi - - for i in /usr/sbin /sbin /usr/bin /bin; do -@@ -726,7 +732,7 @@ outdir=${outfile%/*} - [[ $outdir ]] || outdir="/" - - if [[ ! -d "$outdir" ]]; then -- dfatal "Can't write $outfile: Directory $outdir does not exist." -+ dfatal "Can't write to $outdir: Directory $outdir does not exist or is not accessible." - exit 1 - elif [[ ! -w "$outdir" ]]; then - dfatal "No permission to write to $outdir." diff --git a/0006-Add-missing-options-to-manpage-and-help-output.patch b/0006-Add-missing-options-to-manpage-and-help-output.patch new file mode 100644 index 0000000..f0a0cff --- /dev/null +++ b/0006-Add-missing-options-to-manpage-and-help-output.patch @@ -0,0 +1,134 @@ +From ea3c4e827367448f3303fb9be0d33105cea1aead Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Fri, 5 Apr 2013 09:01:48 +0200 +Subject: [PATCH] Add missing options to manpage and --help output + +https://bugzilla.redhat.com/show_bug.cgi?id=948510 +--- + dracut.8.asc | 30 +++++++++++++++++++++++++----- + dracut.sh | 26 ++++++++++++++++---------- + 2 files changed, 41 insertions(+), 15 deletions(-) + +diff --git a/dracut.8.asc b/dracut.8.asc +index 6a79d12..8b50782 100644 +--- a/dracut.8.asc ++++ b/dracut.8.asc +@@ -75,12 +75,12 @@ version is: + ---- + + If you want to create lighter, smaller initramfs images, you may want to specify +-the --host-only or -H option. Using this option, the resulting image will ++the --hostonly or -H option. Using this option, the resulting image will + contain only those dracut modules, kernel modules and filesystems, which are + needed to boot this specific machine. This has the drawback, that you can't put + the disk on another controller or machine, and that you can't switch to another + root filesystem, without recreating the initramfs image. The usage of the +---host-only option is only for experts and you will have to keep the broken ++--hostonly option is only for experts and you will have to keep the broken + pieces. At least keep a copy of a general purpose image (and corresponding + kernel) as a fallback to rescue your system. + +@@ -376,7 +376,7 @@ will not be able to boot. Equivalent to "--compress=bzip2" + [WARNING] + ==== + Make sure your kernel has lzma decompression support compiled in, otherwise you +-will not be able to boot. Equivalent to "--compress=lzma -9" ++will not be able to boot. Equivalent to "lzma --compress=lzma -9" + ==== + + **--xz**:: +@@ -385,8 +385,7 @@ will not be able to boot. Equivalent to "--compress=lzma -9" + [WARNING] + ==== + Make sure your kernel has xz decompression support compiled in, otherwise you +-will not be able to boot. Equivalent to "--compress=xz --check=crc32 +---lzma2=dict=1MiB" ++will not be able to boot. Equivalent to "lzma --compress=xz --check=crc32 --lzma2=dict=1MiB" + ==== + + **--compress** __:: +@@ -409,6 +408,27 @@ will not be able to boot. Equivalent to "--compress=xz --check=crc32 + **--keep**:: + Keep the initramfs temporary directory for debugging purposes. + ++**--printsize**:: ++ Print out the module install size ++ ++**--profile**: ++ Output profile information of the build process ++ ++**--ro-mnt**: ++ Mount / and /usr read-only by default. ++ ++**-L, --stdlog** __:: ++ [0-6] Specify logging level (to standard error) ++---- ++ 0 - suppress any messages ++ 1 - only fatal errors ++ 2 - all errors ++ 3 - warnings ++ 4 - info ++ 5 - debug info (here starts lots of output) ++ 6 - trace info (and even more) ++---- ++ + **--regenerate-all**:: + Regenerate all initramfs images at the default location with the kernel versions found on the system. + Additional parameters are passed through. +diff --git a/dracut.sh b/dracut.sh +index 5e9ea3e..586172c 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -74,19 +74,21 @@ Creates initial ramdisk images for preloading modules + call when building the initramfs. Modules are located + in /usr/lib/dracut/modules.d. + -o, --omit [LIST] Omit a space-separated list of dracut modules. ++ --force-add [LIST] Force to add a space-separated list of dracut modules ++ to the default set of modules, when -H is specified. + -d, --drivers [LIST] Specify a space-separated list of kernel modules to +- exclusively include in the initramfs. +- --add-drivers [LIST] Specify a space-separated list of kernel +- modules to add to the initramfs. ++ exclusively include in the initramfs. ++ --add-drivers [LIST] Specify a space-separated list of kernel ++ modules to add to the initramfs. + --omit-drivers [LIST] Specify a space-separated list of kernel +- modules not to add to the initramfs. ++ modules not to add to the initramfs. + --filesystems [LIST] Specify a space-separated list of kernel filesystem +- modules to exclusively include in the generic +- initramfs. ++ modules to exclusively include in the generic ++ initramfs. + -k, --kmoddir [DIR] Specify the directory, where to look for kernel +- modules ++ modules + --fwdir [DIR] Specify additional directories, where to look for +- firmwares, separated by : ++ firmwares, separated by : + --kernel-only Only install kernel drivers and firmware files + --no-kernel Do not install kernel drivers and firmware files + --kernel-cmdline [PARAMETERS] Specify default kernel command line parameters +@@ -317,7 +319,9 @@ TEMP=$(unset POSIXLY_CORRECT; getopt \ + --long quiet \ + --long local \ + --long hostonly \ ++ --long host-only \ + --long no-hostonly \ ++ --long no-host-only \ + --long fstab \ + --long help \ + --long bzip2 \ +@@ -391,8 +395,10 @@ while :; do + [[ -f "$(readlink -f ${0%/*})/dracut-functions.sh" ]] \ + && dracutbasedir="$(readlink -f ${0%/*})" + ;; +- -H|--hostonly) hostonly_l="yes" ;; +- -N|--no-hostonly) hostonly_l="no" ;; ++ -H|--hostonly|--host-only) ++ hostonly_l="yes" ;; ++ -N|--no-hostonly|--no-host-only) ++ hostonly_l="no" ;; + --fstab) use_fstab_l="yes" ;; + -h|--help) long_usage; exit 1 ;; + -i|--include) push include_src "$2" diff --git a/0006-add-rescue-dracut-module.patch b/0006-add-rescue-dracut-module.patch deleted file mode 100644 index 711d834..0000000 --- a/0006-add-rescue-dracut-module.patch +++ /dev/null @@ -1,35 +0,0 @@ -From aede120c92e08712e5ab93b283b12ab5f3df510d Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Sat, 9 Mar 2013 15:15:41 +0100 -Subject: [PATCH] add rescue dracut module - ---- - modules.d/03rescue/module-setup.sh | 19 +++++++++++++++++++ - 1 file changed, 19 insertions(+) - create mode 100755 modules.d/03rescue/module-setup.sh - -diff --git a/modules.d/03rescue/module-setup.sh b/modules.d/03rescue/module-setup.sh -new file mode 100755 -index 0000000..3f10b7c ---- /dev/null -+++ b/modules.d/03rescue/module-setup.sh -@@ -0,0 +1,19 @@ -+#!/bin/bash -+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- -+# ex: ts=8 sw=4 sts=4 et filetype=sh -+ -+check() { -+ # do not add this module by default -+ return 255 -+} -+ -+depends() { -+ return 0 -+} -+ -+install() { -+ dracut_install -o ps grep more cat rm strace free showmount \ -+ ping netstat rpcinfo vi scp ping6 ssh \ -+ fsck fsck.ext2 fsck.ext4 fsck.ext3 fsck.ext4dev fsck.vfat e2fsck -+} -+ diff --git a/0007-TEST-50-MULTINIC-fixup-test-suite.patch b/0007-TEST-50-MULTINIC-fixup-test-suite.patch new file mode 100644 index 0000000..b59275c --- /dev/null +++ b/0007-TEST-50-MULTINIC-fixup-test-suite.patch @@ -0,0 +1,151 @@ +From a8986425a4af56a50c8986228e2df04efc5f9edf Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Fri, 5 Apr 2013 11:05:39 +0200 +Subject: [PATCH] TEST-50-MULTINIC: fixup test suite + +qemu of the day doesn't like multicast anymore +--- + test/TEST-50-MULTINIC/server-init.sh | 54 +++++++++++++++++++++++++++++++++--- + test/TEST-50-MULTINIC/test.sh | 23 +++++++-------- + 2 files changed, 60 insertions(+), 17 deletions(-) + +diff --git a/test/TEST-50-MULTINIC/server-init.sh b/test/TEST-50-MULTINIC/server-init.sh +index 144f83c..5a8359b 100755 +--- a/test/TEST-50-MULTINIC/server-init.sh ++++ b/test/TEST-50-MULTINIC/server-init.sh +@@ -7,11 +7,53 @@ export PS1='nfstest-server:\w\$ ' + stty sane + echo "made it to the rootfs!" + echo server > /proc/sys/kernel/hostname ++ ++wait_for_if_link() { ++ local cnt=0 ++ local li ++ while [ $cnt -lt 600 ]; do ++ li=$(ip -o link show dev $1 2>/dev/null) ++ [ -n "$li" ] && return 0 ++ sleep 0.1 ++ cnt=$(($cnt+1)) ++ done ++ return 1 ++} ++ ++wait_for_if_up() { ++ local cnt=0 ++ local li ++ while [ $cnt -lt 200 ]; do ++ li=$(ip -o link show up dev $1) ++ [ -n "$li" ] && return 0 ++ sleep 0.1 ++ cnt=$(($cnt+1)) ++ done ++ return 1 ++} ++ ++wait_for_route_ok() { ++ local cnt=0 ++ while [ $cnt -lt 200 ]; do ++ li=$(ip route show) ++ [ -n "$li" ] && [ -z "${li##*$1*}" ] && return 0 ++ sleep 0.1 ++ cnt=$(($cnt+1)) ++ done ++ return 1 ++} ++ ++linkup() { ++ wait_for_if_link $1 2>/dev/null\ ++ && ip link set $1 up 2>/dev/null\ ++ && wait_for_if_up $1 2>/dev/null ++} ++ + >/dev/watchdog + ip addr add 127.0.0.1/8 dev lo +-ip link set lo up ++linkup lo + ip addr add 192.168.50.1/24 dev eth0 +-ip link set eth0 up ++linkup eth0 + >/dev/watchdog + modprobe af_packet + > /dev/watchdog +@@ -42,10 +84,14 @@ exportfs -r + chmod 777 /var/lib/dhcpd/dhcpd.leases + >/dev/watchdog + dhcpd -cf /etc/dhcpd.conf -lf /var/lib/dhcpd/dhcpd.leases +-echo -n 'V' > /dev/watchdog ++#echo -n 'V' > /dev/watchdog + #sh -i ++#tcpdump -i eth0 + # Wait forever for the VM to die + echo "Serving NFS mounts" +-while :; do sleep 30; done ++while :; do ++ sleep 10 ++ >/dev/watchdog ++done + mount -n -o remount,ro / + poweroff -f +diff --git a/test/TEST-50-MULTINIC/test.sh b/test/TEST-50-MULTINIC/test.sh +index a3aa679..5cb0971 100755 +--- a/test/TEST-50-MULTINIC/test.sh ++++ b/test/TEST-50-MULTINIC/test.sh +@@ -8,7 +8,6 @@ KVERSION=${KVERSION-$(uname -r)} + # Uncomment this to debug failures + #DEBUGFAIL="rd.shell" + #SERIAL="tcp:127.0.0.1:9999" +-SERIAL="null" + + run_server() { + # Start server first +@@ -19,9 +18,9 @@ run_server() { + -hda $TESTDIR/server.ext3 \ + -m 512M -smp 2 \ + -display none \ +- -netdev socket,mcast=230.0.0.1:12320,id=net0 \ +- -net nic,macaddr=52:54:01:12:34:56,model=e1000,netdev=net0 \ +- -serial $SERIAL \ ++ -net socket,listen=127.0.0.1:12350 \ ++ -net nic,macaddr=52:54:01:12:34:56,model=e1000 \ ++ ${SERIAL+-serial $SERIAL} \ + -watchdog i6300esb -watchdog-action poweroff \ + -kernel /boot/vmlinuz-$KVERSION \ + -append "loglevel=77 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0" \ +@@ -53,15 +52,13 @@ client_test() { + fi + + $testdir/run-qemu -hda $TESTDIR/client.img -m 512M -smp 2 -nographic \ +- -netdev socket,mcast=230.0.0.1:12320,id=net0 \ +- -net nic,netdev=net0,macaddr=52:54:00:12:34:$mac1,model=e1000 \ +- -netdev socket,mcast=230.0.0.1:12320,id=net1 \ +- -net nic,netdev=net1,macaddr=52:54:00:12:34:$mac2,model=e1000 \ +- -netdev socket,mcast=230.0.0.1:12320,id=net2 \ +- -net nic,netdev=net2,macaddr=52:54:00:12:34:$mac3,model=e1000 \ ++ -net socket,connect=127.0.0.1:12350 \ ++ -net nic,macaddr=52:54:00:12:34:$mac1,model=e1000 \ ++ -net nic,macaddr=52:54:00:12:34:$mac2,model=e1000 \ ++ -net nic,macaddr=52:54:00:12:34:$mac3,model=e1000 \ + -watchdog i6300esb -watchdog-action poweroff \ + -kernel /boot/vmlinuz-$KVERSION \ +- -append "$cmdline $DEBUGFAIL rd.retry=5 rd.info ro rd.systemd.log_level=debug console=ttyS0,115200n81 selinux=0 rd.copystate rd.chroot init=/sbin/init" \ ++ -append "$cmdline $DEBUGFAIL rd.retry=5 rd.info ro console=ttyS0,115200n81 selinux=0 init=/sbin/init" \ + -initrd $TESTDIR/initramfs.testing + + if [[ $? -ne 0 ]] || ! grep -m 1 -q OK $TESTDIR/client.img; then +@@ -252,14 +249,14 @@ test_setup() { + # Make server's dracut image + $basedir/dracut.sh -l -i $TESTDIR/overlay / \ + -m "dash udev-rules base rootfs-block debug kernel-modules watchdog" \ +- -d "af_packet piix ide-gd_mod ata_piix ext3 sd_mod nfsv2 nfsv3 nfsv4 nfs_acl nfs_layout_nfsv41_files nfsd e1000 i6300esbwdt" \ ++ -d "af_packet piix ide-gd_mod ata_piix ext3 sd_mod nfsv2 nfsv3 nfsv4 nfs_acl nfs_layout_nfsv41_files nfsd e1000 i6300esb ib700wdt" \ + -f $TESTDIR/initramfs.server $KVERSION || return 1 + + # Make client's dracut image + $basedir/dracut.sh -l -i $TESTDIR/overlay / \ + -o "plymouth" \ + -a "debug" \ +- -d "af_packet piix sd_mod sr_mod ata_piix ide-gd_mod e1000 nfsv2 nfsv3 nfsv4 nfs_acl nfs_layout_nfsv41_files sunrpc i6300esbwdt" \ ++ -d "af_packet piix sd_mod sr_mod ata_piix ide-gd_mod e1000 nfsv2 nfsv3 nfsv4 nfs_acl nfs_layout_nfsv41_files sunrpc i6300esb ib700wdt" \ + -f $TESTDIR/initramfs.testing $KVERSION || return 1 + } + diff --git a/0007-dracut.sh-move-cleanup-trap-just-after-mktemp.patch b/0007-dracut.sh-move-cleanup-trap-just-after-mktemp.patch deleted file mode 100644 index 2cf98cf..0000000 --- a/0007-dracut.sh-move-cleanup-trap-just-after-mktemp.patch +++ /dev/null @@ -1,37 +0,0 @@ -From d008b6b89f69772a119da779c9e934e9bdd426ec Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Sat, 9 Mar 2013 15:30:44 +0100 -Subject: [PATCH] dracut.sh: move cleanup trap, just after mktemp - ---- - dracut.sh | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/dracut.sh b/dracut.sh -index 8f3e5d2..860cfb5 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -623,6 +623,11 @@ readonly initdir=$(mktemp --tmpdir="$TMPDIR/" -d -t initramfs.XXXXXX) - exit 1 - } - -+# clean up after ourselves no matter how we die. -+trap 'ret=$?;[[ $keep ]] && echo "Not removing $initdir." >&2 || { [[ $initdir ]] && rm -rf "$initdir";exit $ret; };' EXIT -+# clean up after ourselves no matter how we die. -+trap 'exit 1;' SIGINT -+ - export DRACUT_KERNEL_LAZY="1" - export DRACUT_RESOLVE_LAZY="1" - -@@ -742,11 +747,6 @@ elif [[ -f "$outfile" && ! -w "$outfile" ]]; then - exit 1 - fi - --# clean up after ourselves no matter how we die. --trap 'ret=$?;[[ $keep ]] && echo "Not removing $initdir." >&2 || rm -rf "$initdir";exit $ret;' EXIT --# clean up after ourselves no matter how we die. --trap 'exit 1;' SIGINT -- - # Need to be able to have non-root users read stuff (rpcbind etc) - chmod 755 "$initdir" - diff --git a/0008-TESTSUITE-s-i6300esbwdt-i6300esb-ib700wdt-g.patch b/0008-TESTSUITE-s-i6300esbwdt-i6300esb-ib700wdt-g.patch new file mode 100644 index 0000000..fbb3bba --- /dev/null +++ b/0008-TESTSUITE-s-i6300esbwdt-i6300esb-ib700wdt-g.patch @@ -0,0 +1,50 @@ +From 56fb5c4dbf15e45b2c76f047f8b2b8953cea2e46 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Fri, 5 Apr 2013 11:07:55 +0200 +Subject: [PATCH] TESTSUITE: s/i6300esbwdt/i6300esb ib700wdt/g + +--- + test/TEST-01-BASIC/test.sh | 2 +- + test/TEST-03-USR-MOUNT/test.sh | 2 +- + test/TEST-40-NBD/test.sh | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/test/TEST-01-BASIC/test.sh b/test/TEST-01-BASIC/test.sh +index 7727cd0..84f4b7d 100755 +--- a/test/TEST-01-BASIC/test.sh ++++ b/test/TEST-01-BASIC/test.sh +@@ -86,7 +86,7 @@ test_setup() { + ) + sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ + -a "debug watchdog" \ +- -d "piix ide-gd_mod ata_piix ext3 sd_mod i6300esbwdt" \ ++ -d "piix ide-gd_mod ata_piix ext3 sd_mod i6300esb ib700wdt" \ + -f $TESTDIR/initramfs.testing $KVERSION || return 1 + + # -o "plymouth network md dmraid multipath fips caps crypt btrfs resume dmsquash-live dm" +diff --git a/test/TEST-03-USR-MOUNT/test.sh b/test/TEST-03-USR-MOUNT/test.sh +index 680720b..ca7dc12 100755 +--- a/test/TEST-03-USR-MOUNT/test.sh ++++ b/test/TEST-03-USR-MOUNT/test.sh +@@ -122,7 +122,7 @@ test_setup() { + sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ + -a "debug watchdog" \ + -o "network" \ +- -d "piix ide-gd_mod ata_piix btrfs sd_mod i6300esbwdt" \ ++ -d "piix ide-gd_mod ata_piix btrfs sd_mod i6300esb ib700wdt" \ + -f $TESTDIR/initramfs.testing $KVERSION || return 1 + + rm -rf $TESTDIR/overlay +diff --git a/test/TEST-40-NBD/test.sh b/test/TEST-40-NBD/test.sh +index 88570af..208b784 100755 +--- a/test/TEST-40-NBD/test.sh ++++ b/test/TEST-40-NBD/test.sh +@@ -356,7 +356,7 @@ test_setup() { + sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ + -o "plymouth" \ + -a "debug watchdog" \ +- -d "af_packet piix ide-gd_mod ata_piix ext2 ext3 sd_mod e1000 i6300esbwdt" \ ++ -d "af_packet piix ide-gd_mod ata_piix ext2 ext3 sd_mod e1000 i6300esb ib700wdt" \ + -f $TESTDIR/initramfs.testing $KVERSION || return 1 + } + diff --git a/0008-dracut.spec-add-rescue-module.patch b/0008-dracut.spec-add-rescue-module.patch deleted file mode 100644 index 5d22ba6..0000000 --- a/0008-dracut.spec-add-rescue-module.patch +++ /dev/null @@ -1,21 +0,0 @@ -From fba5fbbdad0f59ce06fde71441832952cdefe546 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Sat, 9 Mar 2013 15:32:32 +0100 -Subject: [PATCH] dracut.spec: add rescue module - ---- - dracut.spec | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/dracut.spec b/dracut.spec -index 6906d68..14ce0d0 100644 ---- a/dracut.spec -+++ b/dracut.spec -@@ -282,6 +282,7 @@ rm -rf $RPM_BUILD_ROOT - %else - %{dracutlibdir}/modules.d/00bootchart - %endif -+%{dracutlibdir}/modules.d/03rescue - %{dracutlibdir}/modules.d/04watchdog - %{dracutlibdir}/modules.d/05busybox - %{dracutlibdir}/modules.d/10i18n diff --git a/0009-51-dracut-rescue.install-do-not-unset-installonly-on.patch b/0009-51-dracut-rescue.install-do-not-unset-installonly-on.patch deleted file mode 100644 index c6e7b00..0000000 --- a/0009-51-dracut-rescue.install-do-not-unset-installonly-on.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 8d28614e4f6d270e57371cde4ea9f1fe776cdb35 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Sun, 10 Mar 2013 14:44:16 +0100 -Subject: [PATCH] 51-dracut-rescue.install: do not unset installonly on remove - ---- - 51-dracut-rescue.install | 6 ------ - 1 file changed, 6 deletions(-) - -diff --git a/51-dracut-rescue.install b/51-dracut-rescue.install -index 844e578..e5781d3 100755 ---- a/51-dracut-rescue.install -+++ b/51-dracut-rescue.install -@@ -55,12 +55,6 @@ case "$COMMAND" in - [[ -f $LOADER_ENTRY ]] || exit 0 - - rm -f "$LOADER_ENTRY" "$3"/initrd-rescue -- -- if command -v yumdb &>/dev/null; then -- if [[ $(yumdb get installonly kernel-$KERNEL_VERSION 2>/dev/null) == *installonly\ \=\ keep* ]]; then -- yumdb del installonly kernel-$KERNEL_VERSION >/dev/null -- fi -- fi - ;; - - *) diff --git a/0009-TEST-99-RPM-ignore-rescue-images.patch b/0009-TEST-99-RPM-ignore-rescue-images.patch new file mode 100644 index 0000000..d4df6fa --- /dev/null +++ b/0009-TEST-99-RPM-ignore-rescue-images.patch @@ -0,0 +1,21 @@ +From db9fbaf9b8753bad46fb7c43d860e234919d2bc9 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Fri, 5 Apr 2013 11:52:33 +0200 +Subject: [PATCH] TEST-99-RPM: ignore rescue images + +--- + test/TEST-99-RPM/test.sh | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/test/TEST-99-RPM/test.sh b/test/TEST-99-RPM/test.sh +index 66f0beb..f030cb0 100755 +--- a/test/TEST-99-RPM/test.sh ++++ b/test/TEST-99-RPM/test.sh +@@ -50,6 +50,7 @@ find / -xdev -type f -not -path '/var/*' \ + -not -path '/test.output' \ + -not -path '/etc/nsswitch.conf.bak' \ + -not -path '/etc/iscsi/initiatorname.iscsi' \ ++ -not -path '/boot/*0-rescue*' \ + -not -path '/dev/null' \ + -exec rpm -qf '{}' ';' | \ + fgrep 'not owned' &> /test.output diff --git a/0010-lsinitrd.sh-fix-for-default-initrd-not-found-but-ima.patch b/0010-lsinitrd.sh-fix-for-default-initrd-not-found-but-ima.patch deleted file mode 100644 index 03d7485..0000000 --- a/0010-lsinitrd.sh-fix-for-default-initrd-not-found-but-ima.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 727e68d0b5cb93eb6c6e00f0541b8519657a2597 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Sun, 10 Mar 2013 14:44:32 +0100 -Subject: [PATCH] lsinitrd.sh: fix for default initrd not found, but image - given - ---- - lsinitrd.sh | 15 ++++++++------- - 1 file changed, 8 insertions(+), 7 deletions(-) - -diff --git a/lsinitrd.sh b/lsinitrd.sh -index 7a09423..4b8a7e2 100755 ---- a/lsinitrd.sh -+++ b/lsinitrd.sh -@@ -54,16 +54,17 @@ if [[ "$1" ]]; then - usage - exit 1 - fi --fi -- --[[ -f /etc/machine-id ]] && read MACHINE_ID < /etc/machine-id -- --if [[ $MACHINE_ID ]] && ( [[ -d /boot/${MACHINE_ID} ]] || [[ -L /boot/${MACHINE_ID} ]] ); then -- image="/boot/${MACHINE_ID}/${KERNEL_VERSION}/initrd" - else -- image="/boot/initramfs-${KERNEL_VERSION}.img}" -+ [[ -f /etc/machine-id ]] && read MACHINE_ID < /etc/machine-id -+ -+ if [[ $MACHINE_ID ]] && ( [[ -d /boot/${MACHINE_ID} ]] || [[ -L /boot/${MACHINE_ID} ]] ); then -+ image="/boot/${MACHINE_ID}/${KERNEL_VERSION}/initrd" -+ else -+ image="/boot/initramfs-${KERNEL_VERSION}.img}" -+ fi - fi - -+ - if ! [[ -f "$image" ]]; then - { - echo "No specified and the default image '$image' cannot be accessed!" diff --git a/0011-lsinitrd.sh-removed-trailing.patch b/0011-lsinitrd.sh-removed-trailing.patch deleted file mode 100644 index b36e399..0000000 --- a/0011-lsinitrd.sh-removed-trailing.patch +++ /dev/null @@ -1,22 +0,0 @@ -From d928724c3cf464a495c11162042951887b80f5e6 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 11 Mar 2013 15:46:37 +0100 -Subject: [PATCH] lsinitrd.sh: removed trailing "}" - ---- - lsinitrd.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lsinitrd.sh b/lsinitrd.sh -index 4b8a7e2..5cd8c2a 100755 ---- a/lsinitrd.sh -+++ b/lsinitrd.sh -@@ -60,7 +60,7 @@ else - if [[ $MACHINE_ID ]] && ( [[ -d /boot/${MACHINE_ID} ]] || [[ -L /boot/${MACHINE_ID} ]] ); then - image="/boot/${MACHINE_ID}/${KERNEL_VERSION}/initrd" - else -- image="/boot/initramfs-${KERNEL_VERSION}.img}" -+ image="/boot/initramfs-${KERNEL_VERSION}.img" - fi - fi - diff --git a/0012-make-host_fs_types-a-hashmap.patch b/0012-make-host_fs_types-a-hashmap.patch deleted file mode 100644 index 955a930..0000000 --- a/0012-make-host_fs_types-a-hashmap.patch +++ /dev/null @@ -1,406 +0,0 @@ -From d351541ee625f8a1b42446448214f200f19c2631 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 11 Mar 2013 16:32:16 +0100 -Subject: [PATCH] make host_fs_types a hashmap - -This requires bash >= 4, but hash maps are so much more comfortable ---- - dracut-functions.sh | 14 +++--------- - dracut.sh | 23 +++++++++---------- - modules.d/90btrfs/module-setup.sh | 6 ++--- - modules.d/90crypt/module-setup.sh | 39 +++++++++++++++++++-------------- - modules.d/90dmraid/module-setup.sh | 34 ++++++++++++++++------------ - modules.d/90lvm/module-setup.sh | 36 +++++++++++++++++------------- - modules.d/90mdraid/module-setup.sh | 45 +++++++++++++++++++++----------------- - modules.d/95cifs/module-setup.sh | 2 +- - modules.d/95nfs/module-setup.sh | 6 ++--- - modules.d/95virtfs/module-setup.sh | 4 ++-- - 10 files changed, 112 insertions(+), 97 deletions(-) - -diff --git a/dracut-functions.sh b/dracut-functions.sh -index 2a84d17..c6a5c7e 100755 ---- a/dracut-functions.sh -+++ b/dracut-functions.sh -@@ -450,23 +450,15 @@ find_mp_fstype() { - find_root_block_device() { find_block_device /; } - - # for_each_host_dev_fs --# Execute " " for every "|" pair found -+# Execute " " for every " " pair found - # in ${host_fs_types[@]} - for_each_host_dev_fs() - { - local _func="$1" - local _dev -- local _fs - local _ret=1 -- for f in ${host_fs_types[@]}; do -- OLDIFS="$IFS" -- IFS="|" -- set -- $f -- IFS="$OLDIFS" -- _dev="$1" -- [[ -b "$_dev" ]] || continue -- _fs="$2" -- $_func $_dev $_fs && _ret=0 -+ for _dev in "${!host_fs_types[@]}"; do -+ $_func "$_dev" "${host_fs_types[$_dev]}" && _ret=0 - done - return $_ret - } -diff --git a/dracut.sh b/dracut.sh -index 860cfb5..8306733 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -750,11 +750,13 @@ fi - # Need to be able to have non-root users read stuff (rpcbind etc) - chmod 755 "$initdir" - -+declare -A host_fs_types -+ - for line in "${fstab_lines[@]}"; do - set -- $line - #dev mp fs fsopts - push host_devs "$1" -- push host_fs_types "$1|$3" -+ host_fs_types["$1"]="$3" - done - - for f in $add_fstab; do -@@ -797,28 +799,27 @@ fi - _get_fs_type() ( - [[ $1 ]] || return - if [[ -b $1 ]] && get_fs_env $1; then -- echo "$(readlink -f $1)|$ID_FS_TYPE" -+ echo "$(readlink -f $1) $ID_FS_TYPE" - return 1 - fi - if [[ -b /dev/block/$1 ]] && get_fs_env /dev/block/$1; then -- echo "$(readlink -f /dev/block/$1)|$ID_FS_TYPE" -+ echo "$(readlink -f /dev/block/$1) $ID_FS_TYPE" - return 1 - fi - if fstype=$(find_dev_fstype $1); then -- echo "$1|$fstype" -+ echo "$1 $fstype" - return 1 - fi - return 1 - ) - - for dev in "${host_devs[@]}"; do -- unset fs_type -- for fstype in $(_get_fs_type $dev) \ -- $(check_block_and_slaves _get_fs_type $(get_maj_min $dev)); do -- if ! strstr " ${host_fs_types[*]} " " $fstype ";then -- push host_fs_types "$fstype" -- fi -- done -+ while read key val; do -+ host_fs_types["$key"]="$val" -+ done < <( -+ _get_fs_type $dev -+ check_block_and_slaves_all _get_fs_type $(get_maj_min $dev) -+ ) - done - - [[ -d $udevdir ]] \ -diff --git a/modules.d/90btrfs/module-setup.sh b/modules.d/90btrfs/module-setup.sh -index 0f79f5e..4a7c01d 100755 ---- a/modules.d/90btrfs/module-setup.sh -+++ b/modules.d/90btrfs/module-setup.sh -@@ -9,12 +9,10 @@ check() { - type -P btrfs >/dev/null || return 1 - - [[ $hostonly ]] || [[ $mount_needs ]] && { -- local _found - for fs in ${host_fs_types[@]}; do -- strstr "$fs" "\|btrfs" && _found="1" -+ [[ "$fs" == "btrfs" ]] && return 0 - done -- [[ $_found ]] || return 1 -- unset _found -+ return 255 - } - - return 0 -diff --git a/modules.d/90crypt/module-setup.sh b/modules.d/90crypt/module-setup.sh -index 2b4456b..b76f6ae 100755 ---- a/modules.d/90crypt/module-setup.sh -+++ b/modules.d/90crypt/module-setup.sh -@@ -7,8 +7,30 @@ check() { - # if cryptsetup is not installed, then we cannot support encrypted devices. - type -P cryptsetup >/dev/null || return 1 - -+ [[ $hostonly ]] || [[ $mount_needs ]] && { -+ for fs in "${host_fs_types[@]}"; do -+ [[ $fs = "crypto_LUKS" ]] && return 0 -+ done -+ return 255 -+ } -+ -+ return 0 -+} -+ -+depends() { -+ echo dm rootfs-block -+ return 0 -+} -+ -+installkernel() { -+ instmods dm_crypt =crypto -+} -+ -+install() { -+ - check_crypt() { - local dev=$1 fs=$2 -+ - [[ $fs = "crypto_LUKS" ]] || return 1 - ID_FS_UUID=$(udevadm info --query=property --name=$dev \ - | while read line; do -@@ -24,23 +46,8 @@ check() { - return 0 - } - -- [[ $hostonly ]] || [[ $mount_needs ]] && { -- for_each_host_dev_and_slaves_all check_crypt || return 1 -- } -- -- return 0 --} -- --depends() { -- echo dm rootfs-block -- return 0 --} -- --installkernel() { -- instmods dm_crypt =crypto --} -+ for_each_host_dev_fs check_crypt - --install() { - dracut_install cryptsetup rmdir readlink umount - inst_script "$moddir"/cryptroot-ask.sh /sbin/cryptroot-ask - inst_script "$moddir"/probe-keydev.sh /sbin/probe-keydev -diff --git a/modules.d/90dmraid/module-setup.sh b/modules.d/90dmraid/module-setup.sh -index c315961..76daa4a 100755 ---- a/modules.d/90dmraid/module-setup.sh -+++ b/modules.d/90dmraid/module-setup.sh -@@ -8,9 +8,27 @@ check() { - # in trying to support it in the initramfs. - type -P dmraid >/dev/null || return 1 - -+ [[ $hostonly ]] || [[ $mount_needs ]] && { -+ for fs in "${host_fs_types[@]}"; do -+ [[ $fs = *_raid_member ]] && return 0 -+ done -+ return 255 -+ } -+ -+ return 0 -+} -+ -+depends() { -+ echo dm rootfs-block -+ return 0 -+} -+ -+install() { -+ local _i -+ - check_dmraid() { - local dev=$1 fs=$2 holder DEVPATH DM_NAME -- [[ "$fs" = "${fs%%_raid_member}" ]] && return 1 -+ [[ "$fs" != *_raid_member ]] && return 1 - - DEVPATH=$(udevadm info --query=property --name=$dev \ - | while read line; do -@@ -37,20 +55,8 @@ check() { - return 0 - } - -- [[ $hostonly ]] || [[ $mount_needs ]] && { -- for_each_host_dev_and_slaves_all check_dmraid || return 1 -- } -+ for_each_host_dev_fs check_dmraid - -- return 0 --} -- --depends() { -- echo dm rootfs-block -- return 0 --} -- --install() { -- local _i - dracut_install dmraid - dracut_install -o kpartx - inst $(command -v partx) /sbin/partx -diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh -index e0e4043..22186f4 100755 ---- a/modules.d/90lvm/module-setup.sh -+++ b/modules.d/90lvm/module-setup.sh -@@ -7,22 +7,11 @@ check() { - # No point trying to support lvm if the binaries are missing - type -P lvm >/dev/null || return 1 - -- check_lvm() { -- local DM_VG_NAME DM_LV_NAME DM_UDEV_DISABLE_DISK_RULES_FLAG -- eval $(udevadm info --query=property --name=/dev/block/$1|egrep '(DM_VG_NAME|DM_LV_NAME|DM_UDEV_DISABLE_DISK_RULES_FLAG)=') -- [[ "$DM_UDEV_DISABLE_DISK_RULES_FLAG" = "1" ]] && return 1 -- [[ ${DM_VG_NAME} ]] && [[ ${DM_LV_NAME} ]] || return 1 -- if ! strstr " ${_activated[*]} " " ${DM_VG_NAME}/${DM_LV_NAME} "; then -- if ! [[ $kernel_only ]]; then -- echo " rd.lvm.lv=${DM_VG_NAME}/${DM_LV_NAME} " >> "${initdir}/etc/cmdline.d/90lvm.conf" -- fi -- push _activated "${DM_VG_NAME}/${DM_LV_NAME}" -- fi -- return 0 -- } -- - [[ $hostonly ]] || [[ $mount_needs ]] && { -- for_each_host_dev_and_slaves_all check_lvm || return 1 -+ for fs in "${host_fs_types[@]}"; do -+ [[ $fs = LVM*_member ]] && return 0 -+ done -+ return 255 - } - - return 0 -@@ -38,6 +27,23 @@ install() { - local _i - inst lvm - -+ check_lvm() { -+ local DM_VG_NAME DM_LV_NAME DM_UDEV_DISABLE_DISK_RULES_FLAG -+ -+ eval $(udevadm info --query=property --name=$1 | egrep '(DM_VG_NAME|DM_LV_NAME|DM_UDEV_DISABLE_DISK_RULES_FLAG)=') -+ [[ "$DM_UDEV_DISABLE_DISK_RULES_FLAG" = "1" ]] && return 1 -+ [[ ${DM_VG_NAME} ]] && [[ ${DM_LV_NAME} ]] || return 1 -+ if ! strstr " ${_activated[*]} " " ${DM_VG_NAME}/${DM_LV_NAME} "; then -+ if ! [[ $kernel_only ]]; then -+ echo " rd.lvm.lv=${DM_VG_NAME}/${DM_LV_NAME} " >> "${initdir}/etc/cmdline.d/90lvm.conf" -+ fi -+ push _activated "${DM_VG_NAME}/${DM_LV_NAME}" -+ fi -+ return 0 -+ } -+ -+ for_each_host_dev_fs check_lvm -+ - inst_rules "$moddir/64-lvm.rules" - - if [[ $hostonly ]] || [[ $lvmconf = "yes" ]]; then -diff --git a/modules.d/90mdraid/module-setup.sh b/modules.d/90mdraid/module-setup.sh -index 0efffbb..70c27dd 100755 ---- a/modules.d/90mdraid/module-setup.sh -+++ b/modules.d/90mdraid/module-setup.sh -@@ -7,27 +7,11 @@ check() { - # No mdadm? No mdraid support. - type -P mdadm >/dev/null || return 1 - -- check_mdraid() { -- local dev=$1 fs=$2 holder DEVPATH MD_UUID -- [[ "$fs" = "${fs%%_raid_member}" ]] && return 1 -- -- MD_UUID=$(/sbin/mdadm --examine --export $dev \ -- | while read line; do -- [[ ${line#MD_UUID} = $line ]] && continue -- eval "$line" -- echo $MD_UUID -- break -- done) -- -- [[ ${MD_UUID} ]] || return 1 -- if ! [[ $kernel_only ]]; then -- echo " rd.md.uuid=${MD_UUID} " >> "${initdir}/etc/cmdline.d/90mdraid.conf" -- fi -- return 0 -- } -- - [[ $hostonly ]] || [[ $mount_needs ]] && { -- for_each_host_dev_and_slaves_all check_mdraid || return 1 -+ for fs in "${host_fs_types[@]}"; do -+ [[ "$fs" == *_raid_member ]] && return 0 -+ done -+ return 255 - } - - return 0 -@@ -48,6 +32,27 @@ install() { - inst $(command -v partx) /sbin/partx - inst $(command -v mdadm) /sbin/mdadm - -+ check_mdraid() { -+ local dev=$1 fs=$2 holder DEVPATH MD_UUID -+ [[ "$fs" != *_raid_member ]] && return 1 -+ -+ MD_UUID=$(/sbin/mdadm --examine --export $dev \ -+ | while read line; do -+ [[ ${line#MD_UUID} = $line ]] && continue -+ eval "$line" -+ echo $MD_UUID -+ break -+ done) -+ -+ [[ ${MD_UUID} ]] || return 1 -+ if ! [[ $kernel_only ]]; then -+ echo " rd.md.uuid=${MD_UUID} " >> "${initdir}/etc/cmdline.d/90mdraid.conf" -+ fi -+ return 0 -+ } -+ -+ for_each_host_dev_fs check_mdraid -+ - inst_rules 64-md-raid.rules - # remove incremental assembly from stock rules, so they don't shadow - # 65-md-inc*.rules and its fine-grained controls, or cause other problems -diff --git a/modules.d/95cifs/module-setup.sh b/modules.d/95cifs/module-setup.sh -index 1c7d0be..bf0eddf 100755 ---- a/modules.d/95cifs/module-setup.sh -+++ b/modules.d/95cifs/module-setup.sh -@@ -8,7 +8,7 @@ check() { - - [[ $hostonly ]] || [[ $mount_needs ]] && { - for fs in ${host_fs_types[@]}; do -- strstr "$fs" "\|cifs" && return 0 -+ [[ "$fs" == "cifs" ]] && return 0 - done - return 255 - } -diff --git a/modules.d/95nfs/module-setup.sh b/modules.d/95nfs/module-setup.sh -index 38ee5d7..7c3a64d 100755 ---- a/modules.d/95nfs/module-setup.sh -+++ b/modules.d/95nfs/module-setup.sh -@@ -9,9 +9,9 @@ check() { - - [[ $hostonly ]] || [[ $mount_needs ]] && { - for fs in ${host_fs_types[@]}; do -- strstr "$fs" "\|nfs" && return 0 -- strstr "$fs" "\|nfs3" && return 0 -- strstr "$fs" "\|nfs4" && return 0 -+ [[ "$fs" == "nfs" ]] && return 0 -+ [[ "$fs" == "nfs3" ]] && return 0 -+ [[ "$fs" == "nfs4" ]] && return 0 - done - return 255 - } -diff --git a/modules.d/95virtfs/module-setup.sh b/modules.d/95virtfs/module-setup.sh -index 0b961a8..12bd354 100755 ---- a/modules.d/95virtfs/module-setup.sh -+++ b/modules.d/95virtfs/module-setup.sh -@@ -5,9 +5,9 @@ - check() { - [[ $hostonly ]] || [[ $mount_needs ]] && { - for fs in ${host_fs_types[@]}; do -- strstr "$fs" "\|9p" && return 0 -+ [[ "$fs" == "9p" ]] && return 0 - done -- return 1 -+ return 255 - } - - if type -P systemd-detect-virt >/dev/null 2>&1; then diff --git a/0013-dracut.sh-add-swap-partitions-to-host-only-setup.patch b/0013-dracut.sh-add-swap-partitions-to-host-only-setup.patch deleted file mode 100644 index b41fec2..0000000 --- a/0013-dracut.sh-add-swap-partitions-to-host-only-setup.patch +++ /dev/null @@ -1,37 +0,0 @@ -From dd5875499ece9dbc90e10eafd0073ee15d0c86a4 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 11 Mar 2013 16:31:48 +0100 -Subject: [PATCH] dracut.sh: add swap partitions to host-only setup - ---- - dracut.sh | 17 +++++++++++++++++ - 1 file changed, 17 insertions(+) - -diff --git a/dracut.sh b/dracut.sh -index 8306733..bb49299 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -794,6 +794,23 @@ if [[ $hostonly ]]; then - mountpoint "$mp" >/dev/null 2>&1 || continue - push host_devs $(readlink -f "/dev/block/$(find_block_device "$mp")") - done -+ -+ while read dev type rest; do -+ [[ -b $dev ]] || continue -+ [[ "$type" == "partition" ]] || continue -+ while read _d _m _t _o _r; do -+ [[ "$_d" == \#* ]] && continue -+ [[ $_d ]] || continue -+ [[ $_t != "swap" ]] || [[ $_m != "swap" ]] && continue -+ [[ "$_o" == *noauto* ]] && continue -+ [[ "$_d" == UUID\=* ]] && _d="/dev/disk/by-uuid/${_d#UUID=}" -+ [[ "$_d" == LABEL\=* ]] && _d="/dev/disk/by-label/$_d#LABEL=}" -+ [[ "$_d" -ef "$dev" ]] || continue -+ push host_devs $(readlink -f $dev) -+ break -+ done < /etc/fstab -+ done < /proc/swaps -+ - fi - - _get_fs_type() ( diff --git a/0014-add-51-dracut-rescue-postinst.sh.patch b/0014-add-51-dracut-rescue-postinst.sh.patch deleted file mode 100644 index 0adfeb1..0000000 --- a/0014-add-51-dracut-rescue-postinst.sh.patch +++ /dev/null @@ -1,247 +0,0 @@ -From 2fa6fd3aaa3015ad80b2b16f68c9b6de6724f202 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 11 Mar 2013 15:59:13 +0100 -Subject: [PATCH] add 51-dracut-rescue-postinst.sh - -also fixup 51-dracut-rescue.install to read in dracut conf ---- - 51-dracut-rescue-postinst.sh | 58 +++++++++++++++++++++++++++++++++++++++ - 51-dracut-rescue.install | 58 ++++++++++++++++++++++++++++----------- - dracut.conf.d/fedora.conf.example | 1 + - dracut.spec | 18 ++++++++---- - 4 files changed, 114 insertions(+), 21 deletions(-) - create mode 100755 51-dracut-rescue-postinst.sh - -diff --git a/51-dracut-rescue-postinst.sh b/51-dracut-rescue-postinst.sh -new file mode 100755 -index 0000000..5c0fe2c ---- /dev/null -+++ b/51-dracut-rescue-postinst.sh -@@ -0,0 +1,58 @@ -+#!/bin/bash -+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- -+# ex: ts=8 sw=4 sts=4 et filetype=sh -+ -+export LANG=C -+ -+KERNEL_VERSION="$1" -+KERNEL_IMAGE="$2" -+ -+[[ -f /etc/os-release ]] && . /etc/os-release -+[[ -f /etc/machine-id ]] && read MACHINE_ID < /etc/machine-id -+ -+INITRDFILE="/boot/initramfs-${MACHINE_ID}-rescue.img" -+[[ -f $INITRDFILE ]] && exit 0 -+ -+dropindirs_sort() -+{ -+ suffix=$1; shift -+ args=("$@") -+ files=$( -+ while (( $# > 0 )); do -+ for i in ${1}/*${suffix}; do -+ [[ -f $i ]] && echo ${i##*/} -+ done -+ shift -+ done | sort -Vu -+ ) -+ -+ for f in $files; do -+ for d in "${args[@]}"; do -+ if [[ -f "$d/$f" ]]; then -+ echo "$d/$f" -+ continue 2 -+ fi -+ done -+ done -+} -+ -+# source our config dir -+for f in $(dropindirs_sort ".conf" "/etc/dracut.conf.d" "/usr/lib/dracut/dracut.conf.d"); do -+ [[ -e $f ]] && . "$f" -+done -+ -+[[ $dracut_rescue_image != "yes" ]] && exit 0 -+ -+dracut --no-hostonly -a "rescue" "$INITRDFILE" "$KERNEL_VERSION" -+((ret+=$?)) -+ -+cp "$KERNEL_IMAGE" "${KERNEL_IMAGE%/*}/vmlinuz-${MACHINE_ID}-rescue" -+((ret+=$?)) -+ -+KERNEL_IMAGE="${KERNEL_IMAGE%/*}/vmlinuz-${MACHINE_ID}-rescue" -+ -+new-kernel-image --install "$KERNEL_VERSION" --kernel-image "$KERNEL_IMAGE" --initrdfile "$INITRDFILE" --banner "$PRETTY_NAME Rescue" -+ -+((ret+=$?)) -+ -+exit $ret -diff --git a/51-dracut-rescue.install b/51-dracut-rescue.install -index e5781d3..94f064c 100755 ---- a/51-dracut-rescue.install -+++ b/51-dracut-rescue.install -@@ -1,4 +1,4 @@ --#!/bin/sh -+#!/bin/bash - # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- - # ex: ts=8 sw=4 sts=4 et filetype=sh - -@@ -6,8 +6,29 @@ export LANG=C - - COMMAND="$1" - KERNEL_VERSION="$2" --BOOT_DIR_ABS="$3" --BOOT_DIR="${3#/boot}" -+ -+dropindirs_sort() -+{ -+ suffix=$1; shift -+ args=("$@") -+ files=$( -+ while (( $# > 0 )); do -+ for i in ${1}/*${suffix}; do -+ [[ -f $i ]] && echo ${i##*/} -+ done -+ shift -+ done | sort -Vu -+ ) -+ -+ for f in $files; do -+ for d in "${args[@]}"; do -+ if [[ -f "$d/$f" ]]; then -+ echo "$d/$f" -+ continue 2 -+ fi -+ done -+ done -+} - - [[ -f /etc/os-release ]] && . /etc/os-release - [[ -f /etc/machine-id ]] && read MACHINE_ID < /etc/machine-id -@@ -21,17 +42,30 @@ if ! [[ $BOOT_OPTIONS ]]; then - exit 1 - fi - --LOADER_ENTRY="/boot/loader/entries/${MACHINE_ID}-00-${KERNEL_VERSION}-rescue.conf" -+LOADER_ENTRY="/boot/loader/entries/${MACHINE_ID}-0-rescue.conf" -+BOOT_DIR="/${MACHINE_ID}/0-rescue" -+BOOT_DIR_ABS="/boot${BOOT_DIR}" - - ret=0 - - case "$COMMAND" in - add) -- for i in "/boot/loader/entries/${MACHINE_ID}-00-"*"-rescue.conf"; do -+ for i in "/boot/loader/entries/${MACHINE_ID}-0-rescue.conf"; do - [[ -f $i ]] && exit 0 - done - -- dracut --no-hostonly -a "rescue" "$3"/initrd-rescue "$2" -+ # source our config dir -+ for f in $(dropindirs_sort ".conf" "/etc/dracut.conf.d" "/usr/lib/dracut/dracut.conf.d"); do -+ [[ -e $f ]] && . "$f" -+ done -+ -+ [[ $dracut_rescue_image != "yes" ]] && exit 0 -+ -+ if ! cp --preserve "$KERNEL_IMAGE" "$BOOT_DIR_ABS"/linux; then -+ echo "Can't copy '$KERNEL_IMAGE to '$BOOT_DIR_ABS/linux'!" >&2 -+ fi -+ -+ dracut --no-hostonly -a "rescue" "$BOOT_DIR_ABS"/initrd "$2" - ((ret+=$?)) - - { -@@ -40,21 +74,13 @@ case "$COMMAND" in - echo "machine-id $MACHINE_ID" - echo "options ${BOOT_OPTIONS[@]} rd.auto=1" - echo "linux $BOOT_DIR/linux" -- echo "initrd $BOOT_DIR/initrd-rescue" -+ echo "initrd $BOOT_DIR/initrd" - } > $LOADER_ENTRY - ((ret+=$?)) -- -- if (( $ret == 0 )); then -- command -v yumdb &>/dev/null && \ -- yumdb set installonly keep kernel-$KERNEL_VERSION >/dev/null -- fi -- - ;; - - remove) -- [[ -f $LOADER_ENTRY ]] || exit 0 -- -- rm -f "$LOADER_ENTRY" "$3"/initrd-rescue -+ exit 0 - ;; - - *) -diff --git a/dracut.conf.d/fedora.conf.example b/dracut.conf.d/fedora.conf.example -index 8448fc3..ba7857c 100644 ---- a/dracut.conf.d/fedora.conf.example -+++ b/dracut.conf.d/fedora.conf.example -@@ -13,3 +13,4 @@ systemdsystemunitdir=/usr/lib/systemd/system - udevdir=/usr/lib/udev - add_dracutmodules+=" systemd " - hostonly="yes" -+dracut_rescue_image="yes" -diff --git a/dracut.spec b/dracut.spec -index 14ce0d0..940d364 100644 ---- a/dracut.spec -+++ b/dracut.spec -@@ -84,6 +84,7 @@ Requires: file - Requires: kpartx - Requires: udev > 166 - Requires: kbd kbd-misc -+ - %if 0%{?fedora} || 0%{?rhel} > 6 - Requires: util-linux >= 2.21 - Conflicts: systemd < 198 -@@ -234,8 +235,14 @@ rm $RPM_BUILD_ROOT%{_bindir}/mkinitrd - rm $RPM_BUILD_ROOT%{_bindir}/lsinitrd - %endif - --mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d --install -m 0644 dracut.logrotate $RPM_BUILD_ROOT/etc/logrotate.d/dracut_log -+# FIXME: remove after F19 -+%if 0%{?fedora} || 0%{?rhel} > 6 -+mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/kernel/postinst.d -+install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kernel/postinst.d/51-dracut-rescue-postinst.sh -+%endif -+ -+mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d -+install -m 0644 dracut.logrotate $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/dracut_log - - # create compat symlink - mkdir -p $RPM_BUILD_ROOT/sbin -@@ -262,11 +269,11 @@ rm -rf $RPM_BUILD_ROOT - %{dracutlibdir}/dracut-logger.sh - %{dracutlibdir}/dracut-initramfs-restore - %{dracutlibdir}/dracut-install --%config(noreplace) /etc/dracut.conf -+%config(noreplace) %{_sysconfdir}/dracut.conf - %if 0%{?fedora} || 0%{?suse_version} || 0%{?rhel} - %{dracutlibdir}/dracut.conf.d/01-dist.conf - %endif --%dir /etc/dracut.conf.d -+%dir %{_sysconfdir}/dracut.conf.d - %dir %{dracutlibdir}/dracut.conf.d - %{_mandir}/man8/dracut.8* - %{_mandir}/man8/*service.8* -@@ -329,7 +336,7 @@ rm -rf $RPM_BUILD_ROOT - %{dracutlibdir}/modules.d/99fs-lib - %{dracutlibdir}/modules.d/99img-lib - %{dracutlibdir}/modules.d/99shutdown --%config(noreplace) /etc/logrotate.d/dracut_log -+%config(noreplace) %{_sysconfdir}/logrotate.d/dracut_log - %attr(0644,root,root) %ghost %config(missingok,noreplace) %{_localstatedir}/log/dracut.log - %dir %{_sharedstatedir}/initramfs - %if %{defined _unitdir} -@@ -339,6 +346,7 @@ rm -rf $RPM_BUILD_ROOT - %if 0%{?fedora} || 0%{?rhel} > 6 - %{_prefix}/lib/kernel/install.d/50-dracut.install - %{_prefix}/lib/kernel/install.d/51-dracut-rescue.install -+%{_sysconfdir}/kernel/postinst.d/51-dracut-rescue-postinst.sh - %endif - - %files network diff --git a/0015-dracut.spec-add-nohostonly-and-norescue-subpackages.patch b/0015-dracut.spec-add-nohostonly-and-norescue-subpackages.patch deleted file mode 100644 index 8817de2..0000000 --- a/0015-dracut.spec-add-nohostonly-and-norescue-subpackages.patch +++ /dev/null @@ -1,66 +0,0 @@ -From e22eb857bef9eb1d927049b13d6d60afc1f69a0d Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Tue, 12 Mar 2013 13:50:58 +0100 -Subject: [PATCH] dracut.spec: add nohostonly and norescue subpackages - -we need rpm subpackages, to be able to pull them in the installation -transaction for the initial %posttrans initramfs image creation. ---- - dracut.spec | 29 ++++++++++++++++++++++++++++- - 1 file changed, 28 insertions(+), 1 deletion(-) - -diff --git a/dracut.spec b/dracut.spec -index 940d364..65112cb 100644 ---- a/dracut.spec -+++ b/dracut.spec -@@ -153,6 +153,22 @@ Requires: libcap - This package requires everything which is needed to build an - initramfs with dracut, which drops capabilities. - -+%package nohostonly -+Summary: dracut configuration to turn off hostonly image generation -+Requires: %{name} = %{version}-%{release} -+ -+%description nohostonly -+This package provides the configuration to turn off the host specific initramfs -+generation with dracut. -+ -+%package norescue -+Summary: dracut configuration to turn off rescue image generation -+Requires: %{name} = %{version}-%{release} -+ -+%description norescue -+This package provides the configuration to turn off the rescue initramfs -+generation with dracut. -+ - %package tools - Summary: dracut tools to build the local initramfs - Requires: %{name} = %{version}-%{release} -@@ -235,10 +251,13 @@ rm $RPM_BUILD_ROOT%{_bindir}/mkinitrd - rm $RPM_BUILD_ROOT%{_bindir}/lsinitrd - %endif - --# FIXME: remove after F19 - %if 0%{?fedora} || 0%{?rhel} > 6 -+# FIXME: remove after F19 - mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/kernel/postinst.d - install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kernel/postinst.d/51-dracut-rescue-postinst.sh -+ -+echo 'hostonly="no"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/02-nohostonly.conf -+echo 'dracut_rescue_image="no"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/02-norescue.conf - %endif - - mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d -@@ -387,4 +406,12 @@ rm -rf $RPM_BUILD_ROOT - %dir /var/lib/dracut - %dir /var/lib/dracut/overlay - -+%files nohostonly -+%defattr(-,root,root,0755) -+%{dracutlibdir}/dracut.conf.d/02-nohostonly.conf -+ -+%files norescue -+%defattr(-,root,root,0755) -+%{dracutlibdir}/dracut.conf.d/02-norescue.conf -+ - %changelog diff --git a/0016-lsinitrd.sh-simplify-check-for-boot-loader-spec-dirs.patch b/0016-lsinitrd.sh-simplify-check-for-boot-loader-spec-dirs.patch deleted file mode 100644 index 02966b7..0000000 --- a/0016-lsinitrd.sh-simplify-check-for-boot-loader-spec-dirs.patch +++ /dev/null @@ -1,22 +0,0 @@ -From d26bd6ca55c96e06d614fc9d5ad73dc6d83d5438 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 13 Mar 2013 08:23:18 +0100 -Subject: [PATCH] lsinitrd.sh: simplify check for boot loader spec dirs - ---- - lsinitrd.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lsinitrd.sh b/lsinitrd.sh -index 5cd8c2a..1b27393 100755 ---- a/lsinitrd.sh -+++ b/lsinitrd.sh -@@ -57,7 +57,7 @@ if [[ "$1" ]]; then - else - [[ -f /etc/machine-id ]] && read MACHINE_ID < /etc/machine-id - -- if [[ $MACHINE_ID ]] && ( [[ -d /boot/${MACHINE_ID} ]] || [[ -L /boot/${MACHINE_ID} ]] ); then -+ if [[ $MACHINE_ID ]] && [[ -d /boot/${MACHINE_ID} || -L /boot/${MACHINE_ID} ]] ; then - image="/boot/${MACHINE_ID}/${KERNEL_VERSION}/initrd" - else - image="/boot/initramfs-${KERNEL_VERSION}.img" diff --git a/0017-51-dracut-rescue.install-create-directory-if-it-does.patch b/0017-51-dracut-rescue.install-create-directory-if-it-does.patch deleted file mode 100644 index b13dcf4..0000000 --- a/0017-51-dracut-rescue.install-create-directory-if-it-does.patch +++ /dev/null @@ -1,25 +0,0 @@ -From c0c6c74d99a06a4ccdc2ddc8849bbe073e5bcbce Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 13 Mar 2013 08:04:08 +0100 -Subject: [PATCH] 51-dracut-rescue.install: create directory, if it does not - exist - ---- - 51-dracut-rescue.install | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/51-dracut-rescue.install b/51-dracut-rescue.install -index 94f064c..1c0a6e1 100755 ---- a/51-dracut-rescue.install -+++ b/51-dracut-rescue.install -@@ -61,7 +61,9 @@ case "$COMMAND" in - - [[ $dracut_rescue_image != "yes" ]] && exit 0 - -- if ! cp --preserve "$KERNEL_IMAGE" "$BOOT_DIR_ABS"/linux; then -+ [[ -d "$BOOT_DIR_ABS" ]] || mkdir -p "$BOOT_DIR_ABS" -+ -+ if ! cp "$KERNEL_IMAGE" "$BOOT_DIR_ABS"/linux; then - echo "Can't copy '$KERNEL_IMAGE to '$BOOT_DIR_ABS/linux'!" >&2 - fi - diff --git a/0018-systemd-local-fs.target-is-now-root-fs.target-and-in.patch b/0018-systemd-local-fs.target-is-now-root-fs.target-and-in.patch deleted file mode 100644 index 564d7ba..0000000 --- a/0018-systemd-local-fs.target-is-now-root-fs.target-and-in.patch +++ /dev/null @@ -1,201 +0,0 @@ -From c85cda9e2f72c655c01452956bda629bbecb9e55 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 13 Mar 2013 08:04:25 +0100 -Subject: [PATCH] systemd: local-fs.target is now root-fs.target and - initrd-fs.target - -Also rename dracut.target to initrd.target - -see also systemd commit 700e07f -http://cgit.freedesktop.org/systemd/systemd/commit/?id=700e07f ---- - dracut.spec | 3 ++- - modules.d/98systemd/dracut-mount.service | 4 ++-- - modules.d/98systemd/dracut-pre-mount.service | 2 +- - modules.d/98systemd/dracut-pre-pivot.service | 4 ++-- - modules.d/98systemd/emergency.service | 2 +- - .../98systemd/{dracut.target => initrd.target} | 6 ++---- - modules.d/98systemd/module-setup.sh | 24 ++++++++++++---------- - modules.d/99base/dracut-lib.sh | 6 +++--- - 8 files changed, 26 insertions(+), 25 deletions(-) - rename modules.d/98systemd/{dracut.target => initrd.target} (73%) - -diff --git a/dracut.spec b/dracut.spec -index 65112cb..06149de 100644 ---- a/dracut.spec -+++ b/dracut.spec -@@ -87,7 +87,8 @@ Requires: kbd kbd-misc - - %if 0%{?fedora} || 0%{?rhel} > 6 - Requires: util-linux >= 2.21 --Conflicts: systemd < 198 -+Conflicts: systemd < 198-4 -+Conflicts: grubby < 8.23 - %else - Requires: util-linux-ng >= 2.21 - %endif -diff --git a/modules.d/98systemd/dracut-mount.service b/modules.d/98systemd/dracut-mount.service -index b478067..b26b8a5 100644 ---- a/modules.d/98systemd/dracut-mount.service -+++ b/modules.d/98systemd/dracut-mount.service -@@ -11,8 +11,8 @@ - Description=dracut mount hook - Documentation=man:dracut-mount.service(8) - DefaultDependencies=no --After=dracut-pre-mount.service dracut-initqueue.service initrd-parse-etc.service local-fs.target --Wants=local-fs.target -+After=dracut-pre-mount.service dracut-initqueue.service initrd-parse-etc.service root-fs.target initrd-fs.target -+Wants=root-fs.target initrd-fs.target - ConditionPathExists=/etc/initrd-release - ConditionDirectoryNotEmpty=|/lib/dracut/hooks/mount - ConditionKernelCommandLine=|rd.break=mount -diff --git a/modules.d/98systemd/dracut-pre-mount.service b/modules.d/98systemd/dracut-pre-mount.service -index 39c830c..17bfda9 100644 ---- a/modules.d/98systemd/dracut-pre-mount.service -+++ b/modules.d/98systemd/dracut-pre-mount.service -@@ -11,7 +11,7 @@ - Description=dracut pre-mount hook - Documentation=man:dracut-pre-mount.service(8) - DefaultDependencies=no --Before=sysroot.mount local-fs.target -+Before=sysroot.mount root-fs.target - After=dracut-initqueue.service - After=cryptsetup.target - ConditionPathExists=/etc/initrd-release -diff --git a/modules.d/98systemd/dracut-pre-pivot.service b/modules.d/98systemd/dracut-pre-pivot.service -index 40a0fb1..49f76ef 100644 ---- a/modules.d/98systemd/dracut-pre-pivot.service -+++ b/modules.d/98systemd/dracut-pre-pivot.service -@@ -11,8 +11,8 @@ - Description=dracut pre-pivot and cleanup hook - Documentation=man:dracut-pre-pivot.service(8) - DefaultDependencies=no --After=dracut-mount.service dracut-initqueue.service initrd-parse-etc.service local-fs.target --Wants=local-fs.target -+After=dracut-mount.service dracut-initqueue.service initrd-parse-etc.service initrd-fs.target root-fs.target -+Wants=initrd-fs.target root-fs.target - Before=initrd-cleanup.service - ConditionPathExists=/etc/initrd-release - ConditionDirectoryNotEmpty=|/lib/dracut/hooks/pre-pivot -diff --git a/modules.d/98systemd/emergency.service b/modules.d/98systemd/emergency.service -index 22115be..18bb45f 100644 ---- a/modules.d/98systemd/emergency.service -+++ b/modules.d/98systemd/emergency.service -@@ -17,7 +17,7 @@ Wants=systemd-vconsole-setup.service - Environment=HOME=/ - WorkingDirectory=/ - ExecStart=/bin/dracut-emergency --ExecStopPost=-/usr/bin/systemctl --no-block isolate dracut.target -+ExecStopPost=-/usr/bin/systemctl --no-block isolate initrd.target - Type=oneshot - StandardInput=tty-force - StandardOutput=inherit -diff --git a/modules.d/98systemd/dracut.target b/modules.d/98systemd/initrd.target -similarity index 73% -rename from modules.d/98systemd/dracut.target -rename to modules.d/98systemd/initrd.target -index 08a22d2..19494d4 100644 ---- a/modules.d/98systemd/dracut.target -+++ b/modules.d/98systemd/initrd.target -@@ -1,11 +1,9 @@ - [Unit] --Description=dracut -+Description=Initrd Target - Requires=basic.target - Conflicts=rescue.service rescue.target - After=basic.target rescue.service rescue.target - AllowIsolate=yes - OnFailure=emergency.target - OnFailureIsolate=yes -- --[Install] --Alias=default.target -+ConditionPathExists=/etc/initrd-release -diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh -index 32d4be5..443481a 100755 ---- a/modules.d/98systemd/module-setup.sh -+++ b/modules.d/98systemd/module-setup.sh -@@ -45,6 +45,8 @@ install() { - $systemdsystemunitdir/basic.target \ - $systemdsystemunitdir/halt.target \ - $systemdsystemunitdir/kexec.target \ -+ $systemdsystemunitdir/initrd-fs.target \ -+ $systemdsystemunitdir/root-fs.target \ - $systemdsystemunitdir/local-fs.target \ - $systemdsystemunitdir/local-fs-pre.target \ - $systemdsystemunitdir/remote-fs.target \ -@@ -139,7 +141,7 @@ install() { - - dracutsystemunitdir="/etc/systemd/system" - -- mkdir -p "${initdir}${dracutsystemunitdir}/dracut.target.wants" -+ mkdir -p "${initdir}${dracutsystemunitdir}/initrd.target.wants" - - mkdir -p "${initdir}${systemdsystemunitdir}/sysinit.target.d" - { -@@ -148,38 +150,38 @@ install() { - echo "After=emergency.service emergency.target" - } > "${initdir}${systemdsystemunitdir}/sysinit.target.d/nolocalfs.conf" - -- inst_simple "$moddir/dracut.target" ${dracutsystemunitdir}/dracut.target -- ln -fs ${dracutsystemunitdir}/dracut.target "${initdir}${systemdsystemunitdir}/default.target" -+ inst_simple "$moddir/initrd.target" ${dracutsystemunitdir}/initrd.target -+ ln -fs ${dracutsystemunitdir}/initrd.target "${initdir}${systemdsystemunitdir}/default.target" - - inst_script "$moddir/dracut-cmdline.sh" /bin/dracut-cmdline - inst_simple "$moddir/dracut-cmdline.service" ${dracutsystemunitdir}/dracut-cmdline.service -- ln -fs ../dracut-cmdline.service "${initdir}${dracutsystemunitdir}/dracut.target.wants/dracut-cmdline.service" -+ ln -fs ../dracut-cmdline.service "${initdir}${dracutsystemunitdir}/initrd.target.wants/dracut-cmdline.service" - - inst_script "$moddir/dracut-pre-udev.sh" /bin/dracut-pre-udev - inst_simple "$moddir/dracut-pre-udev.service" ${dracutsystemunitdir}/dracut-pre-udev.service -- ln -fs ../dracut-pre-udev.service "${initdir}${dracutsystemunitdir}/dracut.target.wants/dracut-pre-udev.service" -+ ln -fs ../dracut-pre-udev.service "${initdir}${dracutsystemunitdir}/initrd.target.wants/dracut-pre-udev.service" - - inst_script "$moddir/dracut-pre-trigger.sh" /bin/dracut-pre-trigger - inst_simple "$moddir/dracut-pre-trigger.service" ${dracutsystemunitdir}/dracut-pre-trigger.service -- ln -fs ../dracut-pre-trigger.service "${initdir}${dracutsystemunitdir}/dracut.target.wants/dracut-pre-trigger.service" -+ ln -fs ../dracut-pre-trigger.service "${initdir}${dracutsystemunitdir}/initrd.target.wants/dracut-pre-trigger.service" - - inst_script "$moddir/dracut-initqueue.sh" /bin/dracut-initqueue - inst_simple "$moddir/dracut-initqueue.service" ${dracutsystemunitdir}/dracut-initqueue.service -- ln -fs ../dracut-initqueue.service "${initdir}${dracutsystemunitdir}/dracut.target.wants/dracut-initqueue.service" -+ ln -fs ../dracut-initqueue.service "${initdir}${dracutsystemunitdir}/initrd.target.wants/dracut-initqueue.service" - - inst_script "$moddir/dracut-pre-mount.sh" /bin/dracut-pre-mount - inst_simple "$moddir/dracut-pre-mount.service" ${dracutsystemunitdir}/dracut-pre-mount.service -- ln -fs ../dracut-pre-mount.service "${initdir}${dracutsystemunitdir}/dracut.target.wants/dracut-pre-mount.service" -+ ln -fs ../dracut-pre-mount.service "${initdir}${dracutsystemunitdir}/initrd.target.wants/dracut-pre-mount.service" - - inst_script "$moddir/dracut-mount.sh" /bin/dracut-mount - inst_simple "$moddir/dracut-mount.service" ${dracutsystemunitdir}/dracut-mount.service -- ln -fs ../dracut-mount.service "${initdir}${dracutsystemunitdir}/dracut.target.wants/dracut-mount.service" -+ ln -fs ../dracut-mount.service "${initdir}${dracutsystemunitdir}/initrd.target.wants/dracut-mount.service" - - inst_script "$moddir/dracut-pre-pivot.sh" /bin/dracut-pre-pivot - inst_simple "$moddir/dracut-pre-pivot.service" ${dracutsystemunitdir}/dracut-pre-pivot.service -- ln -fs ../dracut-pre-pivot.service "${initdir}${dracutsystemunitdir}/dracut.target.wants/dracut-pre-pivot.service" -+ ln -fs ../dracut-pre-pivot.service "${initdir}${dracutsystemunitdir}/initrd.target.wants/dracut-pre-pivot.service" - -- ln -fs ../initrd-parse-etc.service "${initdir}${dracutsystemunitdir}/dracut.target.wants/initrd-parse-etc.service" -+ ln -fs ../initrd-parse-etc.service "${initdir}${dracutsystemunitdir}/initrd.target.wants/initrd-parse-etc.service" - - inst_rules 99-systemd.rules - -diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh -index d2c803a..d4d1e77 100755 ---- a/modules.d/99base/dracut-lib.sh -+++ b/modules.d/99base/dracut-lib.sh -@@ -839,9 +839,9 @@ wait_for_dev() - _name="${_name##/}" - _name="$(str_replace "$_name" '-' '\x2d')" - _name="$(str_replace "$_name" '/' '-')" -- if ! [ -L ${PREFIX}/etc/systemd/system/dracut.target.requires/${_name}.device ]; then -- [ -d ${PREFIX}/etc/systemd/system/dracut.target.requires ] || mkdir -p ${PREFIX}/etc/systemd/system/dracut.target.requires -- ln -s ../${_name}.device ${PREFIX}/etc/systemd/system/dracut.target.requires/${_name}.device -+ 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 - fi - fi - } diff --git a/0019-systemd-add-modules-load.d-modules-to-the-initramfs.patch b/0019-systemd-add-modules-load.d-modules-to-the-initramfs.patch deleted file mode 100644 index 5f52936..0000000 --- a/0019-systemd-add-modules-load.d-modules-to-the-initramfs.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 727543c1e65d94be8e2f1540b616a6e87d3053cb Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 13 Mar 2013 10:51:47 +0100 -Subject: [PATCH] systemd: add modules-load.d modules to the initramfs - ---- - modules.d/98systemd/module-setup.sh | 23 +++++++++++++++++++++++ - 1 file changed, 23 insertions(+) - -diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh -index 443481a..6b00be5 100755 ---- a/modules.d/98systemd/module-setup.sh -+++ b/modules.d/98systemd/module-setup.sh -@@ -16,6 +16,7 @@ depends() { - } - - install() { -+ local _mods - - SYSTEMD_VERSION=$($systemdutildir/systemd --version | { read a b a; echo $b; }) - if (( $SYSTEMD_VERSION < 198 )); then -@@ -109,6 +110,26 @@ install() { - dracut_install -o \ - /usr/lib/modules-load.d/*.conf - -+ modules_load_get() { -+ local _line i -+ for i in "$1"/*.conf; do -+ [[ -f $i ]] || continue -+ while read _line; do -+ case $_line in -+ \#*) -+ ;; -+ \;*) -+ ;; -+ *) -+ echo $_line -+ esac -+ done < "$i" -+ done -+ } -+ -+ _mods=$(modules_load_get /usr/lib/modules-load.d) -+ [[ $_mods ]] && instmods $_mods -+ - if [[ $hostonly ]]; then - dracut_install -o \ - /etc/systemd/journald.conf \ -@@ -120,6 +141,8 @@ install() { - - dracut_install -o \ - /etc/modules-load.d/*.conf -+ _mods=$(modules_load_get /etc/modules-load.d) -+ [[ $_mods ]] && instmods $_mods - else - if ! [[ -e "$initdir/etc/machine-id" ]]; then - > "$initdir/etc/machine-id" diff --git a/0020-systemd-add-sysctl.d-and-sysctl.conf.patch b/0020-systemd-add-sysctl.d-and-sysctl.conf.patch deleted file mode 100644 index fb9a400..0000000 --- a/0020-systemd-add-sysctl.d-and-sysctl.conf.patch +++ /dev/null @@ -1,38 +0,0 @@ -From b8060ef781a980afebec4412666a5b41c5cada2c Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 13 Mar 2013 11:07:36 +0100 -Subject: [PATCH] systemd: add sysctl.d and sysctl.conf - ---- - modules.d/98systemd/module-setup.sh | 10 ++++++---- - 1 file changed, 6 insertions(+), 4 deletions(-) - -diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh -index 6b00be5..bc4f63c 100755 ---- a/modules.d/98systemd/module-setup.sh -+++ b/modules.d/98systemd/module-setup.sh -@@ -108,7 +108,8 @@ install() { - journalctl systemctl echo swapoff systemd-cgls - - dracut_install -o \ -- /usr/lib/modules-load.d/*.conf -+ /usr/lib/modules-load.d/*.conf \ -+ /usr/lib/sysctl.d/*.conf - - modules_load_get() { - local _line i -@@ -137,10 +138,11 @@ install() { - /etc/hostname \ - /etc/machine-id \ - /etc/vconsole.conf \ -- /etc/locale.conf -+ /etc/locale.conf \ -+ /etc/modules-load.d/*.conf \ -+ /etc/sysctl.d/*.conf \ -+ /etc/sysctl.conf - -- dracut_install -o \ -- /etc/modules-load.d/*.conf - _mods=$(modules_load_get /etc/modules-load.d) - [[ $_mods ]] && instmods $_mods - else diff --git a/0021-plymouth-do-not-install-hooks-in-systemd-mode.patch b/0021-plymouth-do-not-install-hooks-in-systemd-mode.patch deleted file mode 100644 index 4e37eb9..0000000 --- a/0021-plymouth-do-not-install-hooks-in-systemd-mode.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 7d17d6c976d705deebf3da46fd546b1fe7e1dd65 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 13 Mar 2013 10:51:17 +0100 -Subject: [PATCH] plymouth: do not install hooks in systemd mode - ---- - modules.d/50plymouth/module-setup.sh | 10 +++++++--- - 1 file changed, 7 insertions(+), 3 deletions(-) - -diff --git a/modules.d/50plymouth/module-setup.sh b/modules.d/50plymouth/module-setup.sh -index 1c5dad5..f754e24 100755 ---- a/modules.d/50plymouth/module-setup.sh -+++ b/modules.d/50plymouth/module-setup.sh -@@ -17,12 +17,16 @@ install() { - . "$moddir"/plymouth-populate-initrd.sh - else - PLYMOUTH_POPULATE_SOURCE_FUNCTIONS="$dracutfunctions" \ -- /usr/libexec/plymouth/plymouth-populate-initrd -t $initdir -+ /usr/libexec/plymouth/plymouth-populate-initrd -t "$initdir" - fi - -- inst_hook pre-pivot 90 "$moddir"/plymouth-newroot.sh -- inst_hook pre-trigger 10 "$moddir"/plymouth-pretrigger.sh - inst_hook emergency 50 "$moddir"/plymouth-emergency.sh -+ - dracut_install readlink -+ -+ if ! dracut_module_included "systemd"; then -+ inst_hook pre-trigger 10 "$moddir"/plymouth-pretrigger.sh -+ inst_hook pre-pivot 90 "$moddir"/plymouth-newroot.sh -+ fi - } - diff --git a/0022-dracut.sh-add-regenerate-all.patch b/0022-dracut.sh-add-regenerate-all.patch deleted file mode 100644 index 7118986..0000000 --- a/0022-dracut.sh-add-regenerate-all.patch +++ /dev/null @@ -1,88 +0,0 @@ -From 7d848c55a6a820d19bed0bd498d6081929c128ab Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 13 Mar 2013 12:46:39 +0100 -Subject: [PATCH] dracut.sh: add --regenerate-all - ---- - dracut.8.asc | 4 ++++ - dracut.sh | 31 ++++++++++++++++++++++++++++++- - 2 files changed, 34 insertions(+), 1 deletion(-) - -diff --git a/dracut.8.asc b/dracut.8.asc -index 02388e6..6a79d12 100644 ---- a/dracut.8.asc -+++ b/dracut.8.asc -@@ -409,6 +409,10 @@ will not be able to boot. Equivalent to "--compress=xz --check=crc32 - **--keep**:: - Keep the initramfs temporary directory for debugging purposes. - -+**--regenerate-all**:: -+ Regenerate all initramfs images at the default location with the kernel versions found on the system. -+ Additional parameters are passed through. -+ - FILES - ----- - _/var/log/dracut.log_:: -diff --git a/dracut.sh b/dracut.sh -index bb49299..2582f74 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -7,7 +7,7 @@ - # of the various mkinitrd implementations out there - # - --# Copyright 2005-2010 Red Hat, Inc. All rights reserved. -+# Copyright 2005-2013 Red Hat, Inc. All rights reserved. - # - # This program is free software; you can redistribute it and/or modify - # it under the terms of the GNU General Public License as published by -@@ -329,6 +329,7 @@ TEMP=$(unset POSIXLY_CORRECT; getopt \ - --long show-modules \ - --long keep \ - --long printsize \ -+ --long regenerate-all \ - -- "$@") - - if (( $? != 0 )); then -@@ -406,6 +407,7 @@ while :; do - ;; - --keep) keep="yes";; - --printsize) printsize="yes";; -+ --regenerate-all) regenerate_all="yes";; - - --) shift; break;; - -@@ -437,6 +439,33 @@ while (($# > 0)); do - shift - done - -+if [[ $regenerate_all == "yes" ]]; then -+ ret=0 -+ if [[ $kernel ]]; then -+ echo "--regenerate-all cannot be called with a kernel version" >&2 -+ exit 1 -+ fi -+ -+ if [[ $outfile ]]; then -+ echo "--regenerate-all cannot be called with a image file" >&2 -+ exit 1 -+ fi -+ -+ ((len=${#dracut_args[@]})) -+ for ((i=0; i < len; i++)); do -+ [[ ${dracut_args[$i]} == "--regenerate-all" ]] && \ -+ unset dracut_args[$i] -+ done -+ -+ cd /lib/modules -+ for i in *; do -+ [[ -f $i/modules.builtin ]] || continue -+ dracut --kver=$i "${dracut_args[@]}" -+ ((ret+=$?)) -+ done -+ exit $ret -+fi -+ - if ! [[ $kernel ]]; then - kernel=$(uname -r) - fi diff --git a/0023-add-dracut-bash-completion.sh.patch b/0023-add-dracut-bash-completion.sh.patch deleted file mode 100644 index 66ea7b8..0000000 --- a/0023-add-dracut-bash-completion.sh.patch +++ /dev/null @@ -1,119 +0,0 @@ -From 917f3e4d25784cbd1490fc4f27e6246d98987987 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 13 Mar 2013 12:46:16 +0100 -Subject: [PATCH] add dracut-bash-completion.sh - ---- - Makefile | 3 +++ - dracut-bash-completion.sh | 68 +++++++++++++++++++++++++++++++++++++++++++++++ - dracut.spec | 1 + - 3 files changed, 72 insertions(+) - create mode 100644 dracut-bash-completion.sh - -diff --git a/Makefile b/Makefile -index a11689c..644d17d 100644 ---- a/Makefile -+++ b/Makefile -@@ -12,6 +12,7 @@ bindir ?= ${prefix}/bin - mandir ?= ${prefix}/share/man - CFLAGS ?= -O2 -g -Wall - CFLAGS += -std=gnu99 -+bashcompletiondir ?= ${datadir}/bash-completion/completions - - man1pages = lsinitrd.1 - -@@ -119,6 +120,8 @@ endif - 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 -+ mkdir -p $(DESTDIR)${bashcompletiondir} -+ install -m 0644 dracut-bash-completion.sh $(DESTDIR)${bashcompletiondir}/dracut - - dracut-version.sh: - @echo "DRACUT_VERSION=$(VERSION)-$(GITVERSION)" > dracut-version.sh -diff --git a/dracut-bash-completion.sh b/dracut-bash-completion.sh -new file mode 100644 -index 0000000..da067c5 ---- /dev/null -+++ b/dracut-bash-completion.sh -@@ -0,0 +1,68 @@ -+#!/bin/bash -+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- -+# ex: ts=8 sw=4 sts=4 et filetype=sh -+# -+# Copyright 2013 Red Hat, Inc. All rights reserved. -+# -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program. If not, see . -+# -+ -+__contains_word () { -+ local word=$1; shift -+ for w in $*; do [[ $w = $word ]] && return 0; done -+ return 1 -+} -+ -+_dracut() { -+ local field_vals= cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} -+ local -A OPTS=( -+ [STANDALONE]='-f -v -q -l -H -h -M -N -+ --ro-mnt --force --kernel-only --no-kernel --strip --nostrip -+ --hardlink --nohardlink --noprefix --mdadmconf --nomdadmconf -+ --lvmconf --nolvmconf --debug --profile --verbose --quiet -+ --local --hostonly --no-hostonly --fstab --help --bzip2 --lzma -+ --xz --no-compress --gzip --list-modules --show-modules --keep -+ --printsize --regenerate-all' -+ -+ [ARG]='-a -m -o -d -I -k -c -L --kver --add --force-add --add-drivers -+ --omit-drivers --modules --omit --drivers --filesystems --install -+ --fwdir --libdirs --fscks --add-fstab --mount --device --nofscks -+ --kmoddir --conf --confdir --tmpdir --stdlog --compress --prefix -+ --kernel-cmdline --sshkey' -+ ) -+ -+ if __contains_word "$prev" ${OPTS[ARG]}; then -+ case $prev in -+ --kmoddir|-k|--fwdir|-c|--conf|--confdir|--tmpdir|--sshkey|--add-fstab|--add-device|-I|--install) -+ comps=$(compgen -d -- "$cur") -+ compopt -o filenames -+ ;; -+ -a|-m|-o|--add|--modules|--omit) -+ comps=$(dracut --list-modules 2>/dev/null) -+ ;; -+ *) -+ return 0 -+ ;; -+ esac -+ COMPREPLY=( $(compgen -W '$comps' -- "$cur") ) -+ return 0 -+ fi -+ -+ if [[ $cur = -* ]]; then -+ COMPREPLY=( $(compgen -W '${OPTS[*]}' -- "$cur") ) -+ return 0 -+ fi -+} -+ -+complete -F _dracut dracut -diff --git a/dracut.spec b/dracut.spec -index 06149de..418baf4 100644 ---- a/dracut.spec -+++ b/dracut.spec -@@ -277,6 +277,7 @@ rm -rf $RPM_BUILD_ROOT - %{_bindir}/dracut - # compat symlink - /sbin/dracut -+%{_datadir}/bash-completion/completions/dracut - %if 0%{?fedora} > 12 || 0%{?rhel} >= 6 || 0%{?suse_version} > 9999 - %{_bindir}/mkinitrd - %{_bindir}/lsinitrd diff --git a/0024-dracut.spec-fix-requirements.patch b/0024-dracut.spec-fix-requirements.patch deleted file mode 100644 index 0291080..0000000 --- a/0024-dracut.spec-fix-requirements.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 4a5a9c6d89b938d154b5700a5fb58b5d4365690c Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 13 Mar 2013 12:55:23 +0100 -Subject: [PATCH] dracut.spec: fix requirements - ---- - dracut.spec | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/dracut.spec b/dracut.spec -index 418baf4..b21f220 100644 ---- a/dracut.spec -+++ b/dracut.spec -@@ -70,7 +70,7 @@ Provides: mkinitrd = 2.6.1 - Obsoletes: dracut-kernel < 005 - Provides: dracut-kernel = %{version}-%{release} - --Requires: bash -+Requires: bash > 4 - Requires: coreutils - Requires: cpio - Requires: filesystem >= 2.1.0 -@@ -82,14 +82,14 @@ Requires: module-init-tools >= 3.7-9 - Requires: sed - Requires: file - Requires: kpartx --Requires: udev > 166 - Requires: kbd kbd-misc - - %if 0%{?fedora} || 0%{?rhel} > 6 - Requires: util-linux >= 2.21 --Conflicts: systemd < 198-4 -+Requires: systemd > 198-4 - Conflicts: grubby < 8.23 - %else -+Requires: udev > 166 - Requires: util-linux-ng >= 2.21 - %endif - diff --git a/0025-dracut-initramfs-restore.sh-also-look-for-image-in-b.patch b/0025-dracut-initramfs-restore.sh-also-look-for-image-in-b.patch deleted file mode 100644 index 6b5afd8..0000000 --- a/0025-dracut-initramfs-restore.sh-also-look-for-image-in-b.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 449b0e0707ee13c1417c3708ea5f4b6bc5d50216 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 13 Mar 2013 13:09:13 +0100 -Subject: [PATCH] dracut-initramfs-restore.sh: also look for image in boot - loader spec dir - ---- - dracut-initramfs-restore.sh | 19 +++++++++++++++---- - 1 file changed, 15 insertions(+), 4 deletions(-) - -diff --git a/dracut-initramfs-restore.sh b/dracut-initramfs-restore.sh -index 06e2939..33ae6bd 100644 ---- a/dracut-initramfs-restore.sh -+++ b/dracut-initramfs-restore.sh -@@ -1,17 +1,28 @@ --#!/bin/sh -+#!/bin/bash - # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- - # ex: ts=8 sw=4 sts=4 et filetype=sh - - set -e -+ -+KERNEL_VERSION="$(uname -r)" -+ -+[[ -f /etc/machine-id ]] && read MACHINE_ID < /etc/machine-id -+ -+if [[ $MACHINE_ID ]] && [[ -d /boot/${MACHINE_ID} || -L /boot/${MACHINE_ID} ]] ; then -+ IMG="/boot/${MACHINE_ID}/${KERNEL_VERSION}/initrd" -+fi -+[[ -f $IMG ]] || IMG="/boot/initramfs-${KERNEL_VERSION}.img" -+ - cd /run/initramfs --IMG="/boot/initramfs-$(uname -r).img" -+ - [ -f .need_shutdown -a -f "$IMG" ] || exit 1 --if zcat "$IMG" | cpio -id >/dev/null 2>&1; then -+if zcat "$IMG" | cpio -id --quiet >/dev/null; then - rm .need_shutdown --elif xzcat "$IMG" | cpio -id >/dev/null 2>&1; then -+elif xzcat "$IMG" | cpio -id --quiet >/dev/null; then - rm .need_shutdown - else - # something failed, so we clean up -+ echo "Unpacking of $IMG to /run/initramfs failed" >&2 - rm -f /run/initramfs/shutdown - exit 1 - fi diff --git a/0026-print-memdebug-to-stderr.patch b/0026-print-memdebug-to-stderr.patch deleted file mode 100644 index d3ece46..0000000 --- a/0026-print-memdebug-to-stderr.patch +++ /dev/null @@ -1,26 +0,0 @@ -From dff9a66c44db384697801bd2d3b8af00ca6823cb Mon Sep 17 00:00:00 2001 -From: "dyoung@redhat.com" -Date: Wed, 13 Mar 2013 15:59:24 +0800 -Subject: [PATCH] print memdebug to stderr - -memory usage tracing outputs are debug info, so it should be moved to -stderr instead of stdout. - -Signed-off-by: Dave Young ---- - 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 d4d1e77..e456b01 100755 ---- a/modules.d/99base/dracut-lib.sh -+++ b/modules.d/99base/dracut-lib.sh -@@ -1041,7 +1041,7 @@ make_trace_mem() - msg="$1" - shift - if [ -n "$DEBUG_MEM_LEVEL" ] && [ "$DEBUG_MEM_LEVEL" -gt 0 ]; then -- make_trace show_memstats $DEBUG_MEM_LEVEL "[debug_mem]" "$msg" "$@" -+ make_trace show_memstats $DEBUG_MEM_LEVEL "[debug_mem]" "$msg" "$@" >&2 - fi - } - diff --git a/0027-Improve-documentation-of-rd.memdebug.patch b/0027-Improve-documentation-of-rd.memdebug.patch deleted file mode 100644 index 6d784fb..0000000 --- a/0027-Improve-documentation-of-rd.memdebug.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 9c322b2f3b5beb623d226d4bf491a33badb99fe7 Mon Sep 17 00:00:00 2001 -From: "dyoung@redhat.com" -Date: Wed, 13 Mar 2013 15:59:25 +0800 -Subject: [PATCH] Improve documentation of rd.memdebug - -Explain more about rd.memdebug verbose level in dracut.cmdline.7.asc. - -Signed-off-by: Dave Young ---- - dracut.cmdline.7.asc | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc -index 62372a5..f1457d5 100644 ---- a/dracut.cmdline.7.asc -+++ b/dracut.cmdline.7.asc -@@ -144,8 +144,12 @@ It should be attached to any report about dracut problems. - If "quiet" is set, it also logs to the console. - - **rd.memdebug=[0-3]**:: -- print memory usage debug info, set the verbose level from 1 to 3 -- print nothing when set rd.memdebug=0 -+ Print memory usage info at various points, set the verbose level from 0 to 3 -+ Higher level means more debugging output: -+ 0 - no output -+ 1 - partial /proc/meminfo -+ 2 - /proc/meminfo -+ 3 - /proc/meminfo + /proc/slabinfo - - **rd.break**:: - drop to a shell at the end diff --git a/0028-Add-memdebug-at-different-points-in-99base-init.sh.patch b/0028-Add-memdebug-at-different-points-in-99base-init.sh.patch deleted file mode 100644 index a16c845..0000000 --- a/0028-Add-memdebug-at-different-points-in-99base-init.sh.patch +++ /dev/null @@ -1,73 +0,0 @@ -From bbfff3e58b6d8b3cc104541cb412caed706423a1 Mon Sep 17 00:00:00 2001 -From: "dyoung@redhat.com" -Date: Wed, 13 Mar 2013 15:59:26 +0800 -Subject: [PATCH] Add memdebug at different points in 99base/init.sh - -Previously I added several trace point to the begin of several -init hooks of systemd, old init script also need this debug info. - -Doing same here as what's added in the systemd service scripts: -At cmdline hooks adding trace of "1+:mem 1+:iomem 3+:slab" -For other hooks adding trace of "1:shortmem 2+:mem 3+:slab" - -Signed-off-by: Dave Young ---- - modules.d/99base/init.sh | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh -index 3b17aaa..a5a544e 100755 ---- a/modules.d/99base/init.sh -+++ b/modules.d/99base/init.sh -@@ -109,6 +109,7 @@ fi - source_conf /etc/conf.d - - # run scriptlets to parse the command line -+make_trace_mem "hook cmdline" '1+:mem' '1+:iomem' '3+:slab' - getarg 'rd.break=cmdline' -d 'rdbreak=cmdline' && emergency_shell -n cmdline "Break before cmdline" - source_hook cmdline - -@@ -118,6 +119,7 @@ source_hook cmdline - export root rflags fstype netroot NEWROOT - - # pre-udev scripts run before udev starts, and are run only once. -+make_trace_mem "hook pre-udev" '1:shortmem' '2+:mem' '3+:slab' - getarg 'rd.break=pre-udev' -d 'rdbreak=pre-udev' && emergency_shell -n pre-udev "Break before pre-udev" - source_hook pre-udev - -@@ -136,6 +138,7 @@ getargbool 0 rd.udev.info -d -y rdudevinfo && udevadm control "$UDEV_LOG_PRIO_AR - getargbool 0 rd.udev.debug -d -y rdudevdebug && udevadm control "$UDEV_LOG_PRIO_ARG=debug" - udevproperty "hookdir=$hookdir" - -+make_trace_mem "hook pre-trigger" '1:shortmem' '2+:mem' '3+:slab' - getarg 'rd.break=pre-trigger' -d 'rdbreak=pre-trigger' && emergency_shell -n pre-trigger "Break before pre-trigger" - source_hook pre-trigger - -@@ -144,6 +147,7 @@ udevadm control --reload >/dev/null 2>&1 || : - udevadm trigger --type=subsystems --action=add >/dev/null 2>&1 - udevadm trigger --type=devices --action=add >/dev/null 2>&1 - -+make_trace_mem "hook initqueue" '1:shortmem' '2+:mem' '3+:slab' - getarg 'rd.break=initqueue' -d 'rdbreak=initqueue' && emergency_shell -n initqueue "Break before initqueue" - - RDRETRY=$(getarg rd.retry -d 'rd_retry=') -@@ -204,6 +208,7 @@ unset RDRETRY - - # pre-mount happens before we try to mount the root filesystem, - # and happens once. -+make_trace_mem "hook pre-mount" '1:shortmem' '2+:mem' '3+:slab' - getarg 'rd.break=pre-mount' -d 'rdbreak=pre-mount' && emergency_shell -n pre-mount "Break pre-mount" - source_hook pre-mount - -@@ -239,9 +244,11 @@ done - - # pre pivot scripts are sourced just before we doing cleanup and switch over - # to the new root. -+make_trace_mem "hook pre-pivot" '1:shortmem' '2+:mem' '3+:slab' - getarg 'rd.break=pre-pivot' -d 'rdbreak=pre-pivot' && emergency_shell -n pre-pivot "Break pre-pivot" - source_hook pre-pivot - -+make_trace_mem "hook cleanup" '1:shortmem' '2+:mem' '3+:slab' - # pre pivot cleanup scripts are sourced just before we switch over to the new root. - getarg 'rd.break=cleanup' -d 'rdbreak=cleanup' && emergency_shell -n cleanup "Break cleanup" - source_hook cleanup diff --git a/0029-systemd-remove-upstream-renamed-old-service-files.patch b/0029-systemd-remove-upstream-renamed-old-service-files.patch deleted file mode 100644 index 1deb547..0000000 --- a/0029-systemd-remove-upstream-renamed-old-service-files.patch +++ /dev/null @@ -1,36 +0,0 @@ -From a23b368c9240b8bf64d8163dd092351e0c6cfa29 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 13 Mar 2013 14:45:55 +0100 -Subject: [PATCH] systemd: remove upstream renamed old service files - ---- - modules.d/98systemd/module-setup.sh | 5 ----- - 1 file changed, 5 deletions(-) - -diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh -index bc4f63c..0119291 100755 ---- a/modules.d/98systemd/module-setup.sh -+++ b/modules.d/98systemd/module-setup.sh -@@ -71,14 +71,10 @@ install() { - $systemdsystemunitdir/systemd-journald.socket \ - $systemdsystemunitdir/systemd-ask-password-console.service \ - $systemdsystemunitdir/systemd-modules-load.service \ -- $systemdsystemunitdir/halt.service \ - $systemdsystemunitdir/systemd-halt.service \ -- $systemdsystemunitdir/poweroff.service \ - $systemdsystemunitdir/systemd-poweroff.service \ - $systemdsystemunitdir/systemd-reboot.service \ -- $systemdsystemunitdir/kexec.service \ - $systemdsystemunitdir/systemd-kexec.service \ -- $systemdsystemunitdir/fsck@.service \ - $systemdsystemunitdir/systemd-fsck@.service \ - $systemdsystemunitdir/systemd-udevd.service \ - $systemdsystemunitdir/systemd-udev-trigger.service \ -@@ -97,7 +93,6 @@ install() { - \ - $systemdsystemunitdir/ctrl-alt-del.target \ - $systemdsystemunitdir/syslog.socket \ -- $systemdsystemunitdir/syslog.target \ - $systemdsystemunitdir/initrd-switch-root.target \ - $systemdsystemunitdir/initrd-switch-root.service \ - $systemdsystemunitdir/initrd-cleanup.service \ diff --git a/0030-kernel-modules-move-usb-storage-out-of-fixed-drivers.patch b/0030-kernel-modules-move-usb-storage-out-of-fixed-drivers.patch deleted file mode 100644 index 3d37f82..0000000 --- a/0030-kernel-modules-move-usb-storage-out-of-fixed-drivers.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 8fdcc1a9b1371b2b1d5c4e4b3ae077546f169459 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 13 Mar 2013 14:46:39 +0100 -Subject: [PATCH] kernel-modules: move usb-storage out of fixed drivers - ---- - modules.d/90kernel-modules/module-setup.sh | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh -index aa1bafc..7d7da83 100755 ---- a/modules.d/90kernel-modules/module-setup.sh -+++ b/modules.d/90kernel-modules/module-setup.sh -@@ -36,13 +36,13 @@ installkernel() { - } - - hostonly='' instmods sr_mod sd_mod scsi_dh ata_piix \ -- pcmcia usb_storage \ - ehci-hcd ehci-pci ehci-platform ohci-hcd uhci-hcd xhci-hcd hid_generic \ - unix - - 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 -+ hid-logitech-dj hid-microsoft firewire-ohci \ -+ pcmcia usb_storage - - if [[ "$(uname -p)" == arm* ]]; then - # arm specific modules diff --git a/0031-dracut.sh-Add-noimageifnotneeded-parameter.patch b/0031-dracut.sh-Add-noimageifnotneeded-parameter.patch deleted file mode 100644 index 8c7305c..0000000 --- a/0031-dracut.sh-Add-noimageifnotneeded-parameter.patch +++ /dev/null @@ -1,96 +0,0 @@ -From 83bb0893edc1c12bbaca20267134b01df2836e1c Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 13 Mar 2013 14:47:24 +0100 -Subject: [PATCH] dracut.sh: Add --noimageifnotneeded parameter - -Do not create an image in host-only mode, if no kernel driver is needed -and no $initdir/etc/cmdline/*.conf is generated. ---- - 50-dracut.install | 19 ++++++++++++++++++- - dracut-bash-completion.sh | 2 +- - dracut.sh | 12 ++++++++++++ - 3 files changed, 31 insertions(+), 2 deletions(-) - -diff --git a/50-dracut.install b/50-dracut.install -index 9e99899..6b63da9 100755 ---- a/50-dracut.install -+++ b/50-dracut.install -@@ -2,10 +2,27 @@ - # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- - # ex: ts=8 sw=4 sts=4 et filetype=sh - -+if [[ -f /etc/kernel/cmdline ]]; then -+ readarray -t BOOT_OPTIONS < /etc/kernel/cmdline -+fi -+ -+if ! [[ "${BOOT_OPTIONS[@]}" ]]; then -+ readarray -t BOOT_OPTIONS < /proc/cmdline -+fi -+ -+unset noimageifnotneeded -+ -+for ((i=0; i < "${#BOOT_OPTIONS[@]}"; i++)); do -+ if [[ ${BOOT_OPTIONS[$i]} == root\=PARTUUID\=* ]]; then -+ noimageifnotneeded="yes" -+ break -+ fi -+done -+ - ret=0 - case "$1" in - add) -- dracut "$3"/initrd "$2" -+ dracut ${noimageifnotneeded+--noimageifnotneeded} "$3"/initrd "$2" - ret=$? - ;; - remove) -diff --git a/dracut-bash-completion.sh b/dracut-bash-completion.sh -index da067c5..38e2ebd 100644 ---- a/dracut-bash-completion.sh -+++ b/dracut-bash-completion.sh -@@ -33,7 +33,7 @@ _dracut() { - --lvmconf --nolvmconf --debug --profile --verbose --quiet - --local --hostonly --no-hostonly --fstab --help --bzip2 --lzma - --xz --no-compress --gzip --list-modules --show-modules --keep -- --printsize --regenerate-all' -+ --printsize --regenerate-all --noimageifnotneeded' - - [ARG]='-a -m -o -d -I -k -c -L --kver --add --force-add --add-drivers - --omit-drivers --modules --omit --drivers --filesystems --install -diff --git a/dracut.sh b/dracut.sh -index 2582f74..69f5282 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -330,6 +330,7 @@ TEMP=$(unset POSIXLY_CORRECT; getopt \ - --long keep \ - --long printsize \ - --long regenerate-all \ -+ --long noimageifnotneeded \ - -- "$@") - - if (( $? != 0 )); then -@@ -408,6 +409,7 @@ while :; do - --keep) keep="yes";; - --printsize) printsize="yes";; - --regenerate-all) regenerate_all="yes";; -+ --noimageifnotneeded) noimageifnotneeded="yes";; - - --) shift; break;; - -@@ -1020,6 +1022,16 @@ if [[ $no_kernel != yes ]]; then - dinfo "*** Installing kernel module dependencies and firmware ***" - dracut_kernel_post - dinfo "*** Installing kernel module dependencies and firmware done ***" -+ -+ if [[ $noimageifnotneeded == yes ]] && [[ $hostonly ]]; then -+ if [[ ! -f "$initdir/lib/dracut/need-initqueue" ]] && \ -+ [[ -f ${initdir}/lib/modules/$kernel/modules.dep && ! -s ${initdir}/lib/modules/$kernel/modules.dep ]]; then -+ for i in ${initdir}/etc/cmdline.d/*.conf; do -+ # We need no initramfs image and do not generate one. -+ [[ $i == "${initdir}/etc/cmdline.d/*.conf" ]] && exit 0 -+ done -+ fi -+ fi - fi - - if [[ $kernel_only != yes ]]; then diff --git a/0032-shutdown-shutdown.sh-mount-move-all-basic-mounts-out.patch b/0032-shutdown-shutdown.sh-mount-move-all-basic-mounts-out.patch deleted file mode 100644 index 23a7fab..0000000 --- a/0032-shutdown-shutdown.sh-mount-move-all-basic-mounts-out.patch +++ /dev/null @@ -1,40 +0,0 @@ -From fc4e10a8594e8c2d68dba233fa5ecc7d5babb5e1 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 13 Mar 2013 17:45:37 +0100 -Subject: [PATCH] shutdown/shutdown.sh: mount --move all basic mounts out of - /oldroot - -After mount moving /dev away, apps like plymouth can do reexec with fd -passing of devices, which they want to keep open until the very end. ---- - modules.d/99shutdown/shutdown.sh | 10 ++++++---- - 1 file changed, 6 insertions(+), 4 deletions(-) - -diff --git a/modules.d/99shutdown/shutdown.sh b/modules.d/99shutdown/shutdown.sh -index 202ecb1..6457cb0 100755 ---- a/modules.d/99shutdown/shutdown.sh -+++ b/modules.d/99shutdown/shutdown.sh -@@ -14,6 +14,12 @@ export TERM=linux - export PATH=/usr/sbin:/usr/bin:/sbin:/bin - . /lib/dracut-lib.sh - -+mkdir /oldsys -+for i in sys proc run dev; do -+ mkdir /oldsys/$i -+ mount --move /oldroot/$i /oldsys/$i -+done -+ - # if "kexec" was installed after creating the initramfs, we try to copy it from the real root - # libz normally is pulled in via kmod/modprobe and udevadm - if [ "$ACTION" = "kexec" ] && ! command -v kexec >/dev/null 2>&1; then -@@ -28,10 +34,6 @@ getarg 'rd.break=pre-shutdown' && emergency_shell --shutdown pre-shutdown "Break - - source_hook pre-shutdown - --if ! ( [ -x /bin/plymouth ] && /bin/plymouth --quit ); then -- [ -x /oldroot/bin/plymouth ] && /oldroot/bin/plymouth --quit --fi -- - warn "Killing all remaining processes" - - killall_proc_mountpoint /oldroot diff --git a/0033-Don-t-write-DHCPV6C-yes-for-each-dhcp-ipv4-configura.patch b/0033-Don-t-write-DHCPV6C-yes-for-each-dhcp-ipv4-configura.patch deleted file mode 100644 index 026cdfc..0000000 --- a/0033-Don-t-write-DHCPV6C-yes-for-each-dhcp-ipv4-configura.patch +++ /dev/null @@ -1,25 +0,0 @@ -From c5a742a3bf2b9b9aab835639bed5c8c7477cb3a2 Mon Sep 17 00:00:00 2001 -From: Radek Vykydal -Date: Thu, 14 Mar 2013 09:50:07 +0100 -Subject: [PATCH] Don't write DHCPV6C=yes for each dhcp (ipv4) configuration. - -Caused probably by commit 32ec0a762d1dce36f20857ffd222863a3d550ed7 ---- - modules.d/45ifcfg/write-ifcfg.sh | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) - -diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh -index ae37358..79c1987 100755 ---- a/modules.d/45ifcfg/write-ifcfg.sh -+++ b/modules.d/45ifcfg/write-ifcfg.sh -@@ -105,9 +105,7 @@ for netif in $IFACES ; do - echo "UUID=$uuid" - [ -n "$mtu" ] && echo "MTU=$mtu" - if [ -f /tmp/net.$netif.lease ]; then -- strstr "$ip" '*:*:*' && -- echo "IPV6INIT=yes" -- echo "DHCPV6C=yes" -+ strstr "$ip" '*:*:*' && echo "IPV6INIT=yes" - echo "BOOTPROTO=dhcp" - cp /tmp/net.$netif.lease /tmp/ifcfg-leases/dhclient-$uuid-$netif.lease - else diff --git a/0034-Write-BOOTPROTO-ibft-for-ip-ibft-to-ifcfg-files.patch b/0034-Write-BOOTPROTO-ibft-for-ip-ibft-to-ifcfg-files.patch deleted file mode 100644 index c7bf862..0000000 --- a/0034-Write-BOOTPROTO-ibft-for-ip-ibft-to-ifcfg-files.patch +++ /dev/null @@ -1,61 +0,0 @@ -From fd8e4aef9092a5daeeeb55e90105fef8d32ce56d Mon Sep 17 00:00:00 2001 -From: Radek Vykydal -Date: Thu, 14 Mar 2013 09:51:07 +0100 -Subject: [PATCH] Write BOOTPROTO=ibft for ip=ibft to ifcfg files - ---- - modules.d/40network/net-lib.sh | 1 + - modules.d/45ifcfg/write-ifcfg.sh | 20 ++++++++++++++------ - 2 files changed, 15 insertions(+), 6 deletions(-) - -diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh -index 4a4d7e7..f9b461b 100644 ---- a/modules.d/40network/net-lib.sh -+++ b/modules.d/40network/net-lib.sh -@@ -159,6 +159,7 @@ ibft_to_cmdline() { - hostname=$(read a < ${iface}/hostname; echo $a) - echo "ip=$ip::$gw:$mask:$hostname:$dev:none" - fi -+ echo $mac > /tmp/net.${dev}.has_ibft_config - done - ) >> /etc/cmdline.d/40-ibft.conf - # reread cmdline -diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh -index 79c1987..773dc51 100755 ---- a/modules.d/45ifcfg/write-ifcfg.sh -+++ b/modules.d/45ifcfg/write-ifcfg.sh -@@ -106,7 +106,11 @@ for netif in $IFACES ; do - [ -n "$mtu" ] && echo "MTU=$mtu" - if [ -f /tmp/net.$netif.lease ]; then - strstr "$ip" '*:*:*' && echo "IPV6INIT=yes" -- echo "BOOTPROTO=dhcp" -+ if [ -f /tmp/net.$netif.has_ibft_config ]; then -+ echo "BOOTPROTO=ibft" -+ else -+ echo "BOOTPROTO=dhcp" -+ fi - cp /tmp/net.$netif.lease /tmp/ifcfg-leases/dhclient-$uuid-$netif.lease - else - # If we've booted with static ip= lines, the override file is there -@@ -116,12 +120,16 @@ for netif in $IFACES ; do - echo "IPV6_AUTOCONF=no" - echo "IPV6ADDR=$ip/$mask" - else -- echo "BOOTPROTO=none" -- echo "IPADDR=$ip" -- if strstr "$mask" "."; then -- echo "NETMASK=$mask" -+ if [-f /tmp/net.$netif.has_ibft_config ]; then -+ echo "BOOTPROTO=ibft" - else -- echo "PREFIX=$mask" -+ echo "BOOTPROTO=none" -+ echo "IPADDR=$ip" -+ if strstr "$mask" "."; then -+ echo "NETMASK=$mask" -+ else -+ echo "PREFIX=$mask" -+ fi - fi - fi - if strstr "$gw" '*:*:*'; then diff --git a/0035-TODO-remove-completed-items.patch b/0035-TODO-remove-completed-items.patch deleted file mode 100644 index 6a69e64..0000000 --- a/0035-TODO-remove-completed-items.patch +++ /dev/null @@ -1,24 +0,0 @@ -From c390590fac363a3ca467d4be0339baa01936e85d Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 14 Mar 2013 17:51:47 +0100 -Subject: [PATCH] TODO: remove completed items - ---- - TODO | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/TODO b/TODO -index 2b7da3f..9eeedfa 100644 ---- a/TODO -+++ b/TODO -@@ -24,10 +24,8 @@ GENERATOR TODO - - - add presets (predefined set of modules) - - add interpreter/plugin-scripts to be sourced at the beginning or end (can use dracut-functions) --- provide "installkernel" and "new-kernel-pkg" - - add mechanism for module specific command line options - - pkg-config integration, to make it easy for other packages to use us. --- add recovery image creator (mkrecovery) - - default module specification could use some work - - udev rule copying, as mentioned above, is a bit too hard-coded - diff --git a/0036-51-dracut-rescue-postinst.sh-fixed-new-kernel-pkg-ca.patch b/0036-51-dracut-rescue-postinst.sh-fixed-new-kernel-pkg-ca.patch deleted file mode 100644 index dd7c2ef..0000000 --- a/0036-51-dracut-rescue-postinst.sh-fixed-new-kernel-pkg-ca.patch +++ /dev/null @@ -1,22 +0,0 @@ -From ce92ca0527fd004c23a997231a0a5e3c0ba0b89f Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 14 Mar 2013 17:52:15 +0100 -Subject: [PATCH] 51-dracut-rescue-postinst.sh: fixed new-kernel-pkg call - ---- - 51-dracut-rescue-postinst.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/51-dracut-rescue-postinst.sh b/51-dracut-rescue-postinst.sh -index 5c0fe2c..21208a4 100755 ---- a/51-dracut-rescue-postinst.sh -+++ b/51-dracut-rescue-postinst.sh -@@ -51,7 +51,7 @@ cp "$KERNEL_IMAGE" "${KERNEL_IMAGE%/*}/vmlinuz-${MACHINE_ID}-rescue" - - KERNEL_IMAGE="${KERNEL_IMAGE%/*}/vmlinuz-${MACHINE_ID}-rescue" - --new-kernel-image --install "$KERNEL_VERSION" --kernel-image "$KERNEL_IMAGE" --initrdfile "$INITRDFILE" --banner "$PRETTY_NAME Rescue" -+new-kernel-pkg --install "$KERNEL_VERSION" --kernel-image "$KERNEL_IMAGE" --initrdfile "$INITRDFILE" --banner "$PRETTY_NAME Rescue" - - ((ret+=$?)) - diff --git a/0037-dracut-install-handle-more-ldd-errors.patch b/0037-dracut-install-handle-more-ldd-errors.patch deleted file mode 100644 index a59ecbf..0000000 --- a/0037-dracut-install-handle-more-ldd-errors.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 87dc81a1f69f20b9015b47d0935fa3b99dc54e5c Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 14 Mar 2013 17:52:44 +0100 -Subject: [PATCH] dracut-install: handle more ldd errors - ---- - install/dracut-install.c | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/install/dracut-install.c b/install/dracut-install.c -index 8aa0e2e..5040dea 100644 ---- a/install/dracut-install.c -+++ b/install/dracut-install.c -@@ -294,6 +294,12 @@ static int resolve_deps(const char *src) - if (strstr(buf, "not regular file")) - break; - -+ if (strstr(buf, "cannot read header")) -+ break; -+ -+ if (strstr(buf, destrootdir)) -+ break; -+ - p = strstr(buf, "/"); - if (p) { - int r; diff --git a/0038-dracut.spec-fix-requirements.patch b/0038-dracut.spec-fix-requirements.patch deleted file mode 100644 index 2ca548b..0000000 --- a/0038-dracut.spec-fix-requirements.patch +++ /dev/null @@ -1,31 +0,0 @@ -From d46394ad330abe6e1368e5d40e01e8b97a7ae40c Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 14 Mar 2013 17:53:00 +0100 -Subject: [PATCH] dracut.spec: fix requirements - ---- - dracut.spec | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/dracut.spec b/dracut.spec -index b21f220..4870390 100644 ---- a/dracut.spec -+++ b/dracut.spec -@@ -70,7 +70,7 @@ Provides: mkinitrd = 2.6.1 - Obsoletes: dracut-kernel < 005 - Provides: dracut-kernel = %{version}-%{release} - --Requires: bash > 4 -+Requires: bash >= 4 - Requires: coreutils - Requires: cpio - Requires: filesystem >= 2.1.0 -@@ -86,7 +86,7 @@ Requires: kbd kbd-misc - - %if 0%{?fedora} || 0%{?rhel} > 6 - Requires: util-linux >= 2.21 --Requires: systemd > 198-4 -+Requires: systemd >= 198-4 - Conflicts: grubby < 8.23 - %else - Requires: udev > 166 diff --git a/0039-ifcfg-write-ifcfg.sh-fixed-typo.patch b/0039-ifcfg-write-ifcfg.sh-fixed-typo.patch deleted file mode 100644 index 6c4cc18..0000000 --- a/0039-ifcfg-write-ifcfg.sh-fixed-typo.patch +++ /dev/null @@ -1,22 +0,0 @@ -From e0e99c59a585e55361eb589aeab1d8f443165eef Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 14 Mar 2013 17:54:15 +0100 -Subject: [PATCH] ifcfg/write-ifcfg.sh: fixed typo - ---- - 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 773dc51..f7a476c 100755 ---- a/modules.d/45ifcfg/write-ifcfg.sh -+++ b/modules.d/45ifcfg/write-ifcfg.sh -@@ -120,7 +120,7 @@ for netif in $IFACES ; do - echo "IPV6_AUTOCONF=no" - echo "IPV6ADDR=$ip/$mask" - else -- if [-f /tmp/net.$netif.has_ibft_config ]; then -+ if [ -f /tmp/net.$netif.has_ibft_config ]; then - echo "BOOTPROTO=ibft" - else - echo "BOOTPROTO=none" diff --git a/0040-iscsi-iscsiroot.sh-do-not-mount-manually-in-systemd-.patch b/0040-iscsi-iscsiroot.sh-do-not-mount-manually-in-systemd-.patch deleted file mode 100644 index 4e5acdb..0000000 --- a/0040-iscsi-iscsiroot.sh-do-not-mount-manually-in-systemd-.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 0a5fd0dcec3f6fd49626fed0cac4e89cd1ad3453 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 14 Mar 2013 17:54:36 +0100 -Subject: [PATCH] iscsi/iscsiroot.sh: do not mount manually in systemd mode - ---- - modules.d/95iscsi/iscsiroot.sh | 3 ++- - modules.d/95iscsi/module-setup.sh | 4 +++- - 2 files changed, 5 insertions(+), 2 deletions(-) - -diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh -index aa6c6ec..0c04219 100755 ---- a/modules.d/95iscsi/iscsiroot.sh -+++ b/modules.d/95iscsi/iscsiroot.sh -@@ -145,7 +145,8 @@ handle_netroot() - wait_for_dev /dev/root - - # install mount script -- echo "iscsi_lun=$iscsi_lun . /bin/mount-lun.sh " > $hookdir/mount/01-$$-iscsi.sh -+ [ -z "$DRACUT_SYSTEMD" ] && \ -+ echo "iscsi_lun=$iscsi_lun . /bin/mount-lun.sh " > $hookdir/mount/01-$$-iscsi.sh - fi - - # force udevsettle to break -diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh -index f06c783..1910a33 100755 ---- a/modules.d/95iscsi/module-setup.sh -+++ b/modules.d/95iscsi/module-setup.sh -@@ -78,6 +78,8 @@ install() { - inst_hook cmdline 90 "$moddir/parse-iscsiroot.sh" - inst_hook cleanup 90 "$moddir/cleanup-iscsi.sh" - inst "$moddir/iscsiroot.sh" "/sbin/iscsiroot" -- inst "$moddir/mount-lun.sh" "/bin/mount-lun.sh" -+ if ! dracut_module_included "systemd"; then -+ inst "$moddir/mount-lun.sh" "/bin/mount-lun.sh" -+ fi - dracut_need_initqueue - } diff --git a/0041-nfs-nfsroot.sh-only-cat-etc-fstab-if-existant.patch b/0041-nfs-nfsroot.sh-only-cat-etc-fstab-if-existant.patch deleted file mode 100644 index 2d251a5..0000000 --- a/0041-nfs-nfsroot.sh-only-cat-etc-fstab-if-existant.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 18d0c9b8589b9ffda3543a18676037105d8a48f9 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 14 Mar 2013 17:56:53 +0100 -Subject: [PATCH] nfs/nfsroot.sh: only cat /etc/fstab, if existant - ---- - 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 803a71f..067d172 100755 ---- a/modules.d/95nfs/nfsroot.sh -+++ b/modules.d/95nfs/nfsroot.sh -@@ -18,7 +18,7 @@ nfs_to_var $root $netif - - mount_nfs $root $NEWROOT $netif && { [ -e /dev/root ] || ln -s null /dev/root ; } - --cat $NEWROOT/etc/fstab > /dev/null -+[ -f $NEWROOT/etc/fstab ] && cat $NEWROOT/etc/fstab > /dev/null - - # inject new exit_if_exists - echo 'settle_exit_if_exists="--exit-if-exists=/dev/root"; rm "$job"' > $hookdir/initqueue/nfs.sh diff --git a/0042-udev-rules-module-setup.sh-do-not-install-run.patch b/0042-udev-rules-module-setup.sh-do-not-install-run.patch deleted file mode 100644 index ae76e3b..0000000 --- a/0042-udev-rules-module-setup.sh-do-not-install-run.patch +++ /dev/null @@ -1,23 +0,0 @@ -From c853dc72e90b998ca2e1e3133f7e97697999be87 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 14 Mar 2013 17:59:07 +0100 -Subject: [PATCH] udev-rules/module-setup.sh: do not install /run/* - ---- - modules.d/95udev-rules/module-setup.sh | 3 --- - 1 file changed, 3 deletions(-) - -diff --git a/modules.d/95udev-rules/module-setup.sh b/modules.d/95udev-rules/module-setup.sh -index 1eb8642..9459646 100755 ---- a/modules.d/95udev-rules/module-setup.sh -+++ b/modules.d/95udev-rules/module-setup.sh -@@ -36,9 +36,6 @@ install() { - - prepare_udev_rules 59-persistent-storage.rules 61-persistent-storage.rules - -- inst_dir /run/udev -- inst_dir /run/udev/rules.d -- - { - for i in cdrom tape dialout floppy; do - if ! egrep -q "^$i:" "$initdir/etc/group" 2>/dev/null; then diff --git a/0043-systemd-switch-to-new-initrd.target.patch b/0043-systemd-switch-to-new-initrd.target.patch deleted file mode 100644 index ac57468..0000000 --- a/0043-systemd-switch-to-new-initrd.target.patch +++ /dev/null @@ -1,234 +0,0 @@ -From 85c85f07e27234d305a2995ef059aa1241d4875d Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 14 Mar 2013 15:35:54 +0100 -Subject: [PATCH] systemd: switch to new initrd.target - - (normal startup) - : - : - v - basic.target - | - ______________________/| - / | - | sysroot.mount - | | - | v - | initrd-root-fs.target - | | - | v - | initrd-parse-etc.service -(custom initrd services) | - | v - | (sysroot-usr.mount and - | various mounts marked - | with fstab option - | x-initrd.mount) - | | - | v - | initrd-fs.target - | | - \______________________ | - \| - v - initrd.target - | - v - initrd-cleanup.service - isolates to - initrd-switch-root.target - | - v - ______________________/| - / | - | initrd-udevadm-cleanup-db.service - | | -(custom initrd services) | - | | - \______________________ | - \| - v - initrd-switch-root.target - | - v - initrd-switch-root.service - | - v - switch-root ---- - modules.d/98systemd/dracut-mount.service | 4 ++-- - modules.d/98systemd/dracut-pre-mount.service | 2 +- - modules.d/98systemd/dracut-pre-pivot.service | 4 ++-- - modules.d/98systemd/emergency.service | 2 +- - modules.d/98systemd/module-setup.sh | 20 +++++--------------- - modules.d/98systemd/udevadm-cleanup-db.service | 22 ---------------------- - modules.d/99fs-lib/fs-lib.sh | 4 ++-- - 7 files changed, 13 insertions(+), 45 deletions(-) - delete mode 100644 modules.d/98systemd/udevadm-cleanup-db.service - -diff --git a/modules.d/98systemd/dracut-mount.service b/modules.d/98systemd/dracut-mount.service -index b26b8a5..5c12683 100644 ---- a/modules.d/98systemd/dracut-mount.service -+++ b/modules.d/98systemd/dracut-mount.service -@@ -11,8 +11,8 @@ - Description=dracut mount hook - Documentation=man:dracut-mount.service(8) - DefaultDependencies=no --After=dracut-pre-mount.service dracut-initqueue.service initrd-parse-etc.service root-fs.target initrd-fs.target --Wants=root-fs.target initrd-fs.target -+After=initrd-root-fs.target initrd-parse-etc.service -+ - ConditionPathExists=/etc/initrd-release - ConditionDirectoryNotEmpty=|/lib/dracut/hooks/mount - ConditionKernelCommandLine=|rd.break=mount -diff --git a/modules.d/98systemd/dracut-pre-mount.service b/modules.d/98systemd/dracut-pre-mount.service -index 17bfda9..0d76943 100644 ---- a/modules.d/98systemd/dracut-pre-mount.service -+++ b/modules.d/98systemd/dracut-pre-mount.service -@@ -11,7 +11,7 @@ - Description=dracut pre-mount hook - Documentation=man:dracut-pre-mount.service(8) - DefaultDependencies=no --Before=sysroot.mount root-fs.target -+Before=initrd-root-fs.target - After=dracut-initqueue.service - After=cryptsetup.target - ConditionPathExists=/etc/initrd-release -diff --git a/modules.d/98systemd/dracut-pre-pivot.service b/modules.d/98systemd/dracut-pre-pivot.service -index 49f76ef..72941c9 100644 ---- a/modules.d/98systemd/dracut-pre-pivot.service -+++ b/modules.d/98systemd/dracut-pre-pivot.service -@@ -11,8 +11,7 @@ - Description=dracut pre-pivot and cleanup hook - Documentation=man:dracut-pre-pivot.service(8) - DefaultDependencies=no --After=dracut-mount.service dracut-initqueue.service initrd-parse-etc.service initrd-fs.target root-fs.target --Wants=initrd-fs.target root-fs.target -+After=initrd-fs.target - Before=initrd-cleanup.service - ConditionPathExists=/etc/initrd-release - ConditionDirectoryNotEmpty=|/lib/dracut/hooks/pre-pivot -@@ -25,6 +24,7 @@ StandardInput=null - StandardOutput=syslog - StandardError=syslog+console - KillMode=process -+RemainAfterExit=yes - - # Bash ignores SIGTERM, so we send SIGHUP instead, to ensure that bash - # terminates cleanly. -diff --git a/modules.d/98systemd/emergency.service b/modules.d/98systemd/emergency.service -index 18bb45f..a932739 100644 ---- a/modules.d/98systemd/emergency.service -+++ b/modules.d/98systemd/emergency.service -@@ -17,7 +17,7 @@ Wants=systemd-vconsole-setup.service - Environment=HOME=/ - WorkingDirectory=/ - ExecStart=/bin/dracut-emergency --ExecStopPost=-/usr/bin/systemctl --no-block isolate initrd.target -+ExecStopPost=-/usr/bin/systemctl --fail --no-block default - Type=oneshot - StandardInput=tty-force - StandardOutput=inherit -diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh -index 0119291..f74ae88 100755 ---- a/modules.d/98systemd/module-setup.sh -+++ b/modules.d/98systemd/module-setup.sh -@@ -46,8 +46,9 @@ install() { - $systemdsystemunitdir/basic.target \ - $systemdsystemunitdir/halt.target \ - $systemdsystemunitdir/kexec.target \ -+ $systemdsystemunitdir/initrd.target \ - $systemdsystemunitdir/initrd-fs.target \ -- $systemdsystemunitdir/root-fs.target \ -+ $systemdsystemunitdir/initrd-root-fs.target \ - $systemdsystemunitdir/local-fs.target \ - $systemdsystemunitdir/local-fs-pre.target \ - $systemdsystemunitdir/remote-fs.target \ -@@ -148,8 +149,8 @@ install() { - - # install adm user/group for journald - dracut_install nologin -- egrep '^adm:' "$initdir/etc/passwd" 2>/dev/null >> "$initdir/etc/passwd" -- egrep '^adm:' /etc/group >> "$initdir/etc/group" -+ 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" -@@ -163,15 +164,7 @@ install() { - - mkdir -p "${initdir}${dracutsystemunitdir}/initrd.target.wants" - -- mkdir -p "${initdir}${systemdsystemunitdir}/sysinit.target.d" -- { -- echo "[Unit]" -- echo "After=" -- echo "After=emergency.service emergency.target" -- } > "${initdir}${systemdsystemunitdir}/sysinit.target.d/nolocalfs.conf" -- -- inst_simple "$moddir/initrd.target" ${dracutsystemunitdir}/initrd.target -- ln -fs ${dracutsystemunitdir}/initrd.target "${initdir}${systemdsystemunitdir}/default.target" -+ ln -fs initrd.target "${initdir}${systemdsystemunitdir}/default.target" - - inst_script "$moddir/dracut-cmdline.sh" /bin/dracut-cmdline - inst_simple "$moddir/dracut-cmdline.service" ${dracutsystemunitdir}/dracut-cmdline.service -@@ -201,8 +194,6 @@ install() { - inst_simple "$moddir/dracut-pre-pivot.service" ${dracutsystemunitdir}/dracut-pre-pivot.service - ln -fs ../dracut-pre-pivot.service "${initdir}${dracutsystemunitdir}/initrd.target.wants/dracut-pre-pivot.service" - -- ln -fs ../initrd-parse-etc.service "${initdir}${dracutsystemunitdir}/initrd.target.wants/initrd-parse-etc.service" -- - inst_rules 99-systemd.rules - - for i in \ -@@ -224,6 +215,5 @@ install() { - echo "RateLimitBurst=0" - } >> "$initdir/etc/systemd/journald.conf" - -- - } - -diff --git a/modules.d/98systemd/udevadm-cleanup-db.service b/modules.d/98systemd/udevadm-cleanup-db.service -deleted file mode 100644 -index fba032a..0000000 ---- a/modules.d/98systemd/udevadm-cleanup-db.service -+++ /dev/null -@@ -1,22 +0,0 @@ --# This file is part of systemd. --# --# systemd is free software; you can redistribute it and/or modify it --# under the terms of the GNU Lesser General Public License as published by --# the Free Software Foundation; either version 2.1 of the License, or --# (at your option) any later version. -- --[Unit] --Description=Cleanup udevd DB --Documentation=man:udevadm-cleanup-db.service(8) --DefaultDependencies=no --ConditionPathExists=/etc/initrd-release --Conflicts=systemd-udevd.service systemd-udevd-control.socket systemd-udevd-kernel.socket --After=systemd-udevd.service systemd-udevd-control.socket systemd-udevd-kernel.socket --Before=initrd-switch-root.target -- --[Service] --Type=oneshot --ExecStart=-/usr/bin/udevadm info --cleanup-db --StandardInput=null --StandardOutput=null --StandardError=null -diff --git a/modules.d/99fs-lib/fs-lib.sh b/modules.d/99fs-lib/fs-lib.sh -index 838ffa6..6936bbb 100755 ---- a/modules.d/99fs-lib/fs-lib.sh -+++ b/modules.d/99fs-lib/fs-lib.sh -@@ -220,9 +220,9 @@ write_fs_tab() { - [ -z "$_rootfstype" ] && _rootfstype="auto" - - if [ -z "$_rootflags" ]; then -- _rootflags="ro" -+ _rootflags="ro,x-initrd-rootfs.mount" - else -- _rootflags="ro,$_rootflags" -+ _rootflags="ro,$_rootflags,x-initrd-rootfs.mount" - fi - - _rw=0 diff --git a/0044-systemd-do-not-use-systemd-version-until-fixed.patch b/0044-systemd-do-not-use-systemd-version-until-fixed.patch deleted file mode 100644 index e738e0f..0000000 --- a/0044-systemd-do-not-use-systemd-version-until-fixed.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 6b46e7baa0e16a864259cb9e60aa99e496be6d78 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 14 Mar 2013 19:03:20 +0100 -Subject: [PATCH] systemd: do not use "systemd --version" until fixed - ---- - modules.d/98systemd/module-setup.sh | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh -index f74ae88..17dbc44 100755 ---- a/modules.d/98systemd/module-setup.sh -+++ b/modules.d/98systemd/module-setup.sh -@@ -18,11 +18,11 @@ depends() { - install() { - local _mods - -- SYSTEMD_VERSION=$($systemdutildir/systemd --version | { read a b a; echo $b; }) -- if (( $SYSTEMD_VERSION < 198 )); then -- dfatal "systemd version $SYSTEMD_VERSION is too low. Need at least version 198." -- exit 1 -- fi -+# SYSTEMD_VERSION=$($systemdutildir/systemd --version | { read a b a; echo $b; }) -+# if (( $SYSTEMD_VERSION < 198 )); then -+# dfatal "systemd version $SYSTEMD_VERSION is too low. Need at least version 198." -+# exit 1 -+# fi - - if strstr "$prefix" "/run/"; then - dfatal "systemd does not work a prefix, which contains \"/run\"!!" diff --git a/0045-fix-typo-in-dracut.conf.5.asc.patch b/0045-fix-typo-in-dracut.conf.5.asc.patch deleted file mode 100644 index 22aa58f..0000000 --- a/0045-fix-typo-in-dracut.conf.5.asc.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 81b676a675d89f8f688c5508a3eb8225196796e5 Mon Sep 17 00:00:00 2001 -From: Will Woods -Date: Thu, 14 Mar 2013 13:48:06 -0400 -Subject: [PATCH] fix typo in dracut.conf.5.asc - -It's /etc/dracut.conf.d, not /etc/dracut/conf.d ---- - dracut.conf.5.asc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/dracut.conf.5.asc b/dracut.conf.5.asc -index 1cc810f..dbaa2e5 100644 ---- a/dracut.conf.5.asc -+++ b/dracut.conf.5.asc -@@ -140,7 +140,7 @@ Files - ----- - _/etc/dracut.conf_:: - Old configuration file. You better use your own file in -- _/etc/dracut/conf.d/_. -+ _/etc/dracut.conf.d/_. - - _/etc/dracut.conf.d/_:: - Any _/etc/dracut.conf.d/*.conf_ file can overwrite the values in diff --git a/0046-fixed-testsuite.patch b/0046-fixed-testsuite.patch deleted file mode 100644 index 2119129..0000000 --- a/0046-fixed-testsuite.patch +++ /dev/null @@ -1,436 +0,0 @@ -From bb278147cfc969159fa5f44768fcd1fd5fb494fc Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 14 Mar 2013 18:29:19 +0100 -Subject: [PATCH] fixed testsuite - ---- - test/TEST-01-BASIC/test.sh | 4 ++-- - test/TEST-02-SYSTEMD/test.sh | 6 +++--- - test/TEST-03-USR-MOUNT/test.sh | 4 ++-- - test/TEST-04-FULL-SYSTEMD/test.sh | 6 +++--- - test/TEST-10-RAID/test.sh | 4 ++-- - test/TEST-11-LVM/test.sh | 6 +++--- - test/TEST-12-RAID-DEG/test.sh | 6 +++--- - test/TEST-13-ENC-RAID-LVM/test.sh | 10 +++++----- - test/TEST-15-BTRFSRAID/test.sh | 9 ++++----- - test/TEST-16-DMSQUASH/test.sh | 2 +- - test/TEST-20-NFS/test.sh | 4 ++-- - test/TEST-30-ISCSI/test.sh | 8 ++++---- - test/TEST-40-NBD/create-root.sh | 2 +- - test/TEST-40-NBD/test.sh | 17 +++++++++-------- - test/TEST-50-MULTINIC/test.sh | 4 ++-- - 15 files changed, 46 insertions(+), 46 deletions(-) - -diff --git a/test/TEST-01-BASIC/test.sh b/test/TEST-01-BASIC/test.sh -index 7ce4f9d..7727cd0 100755 ---- a/test/TEST-01-BASIC/test.sh -+++ b/test/TEST-01-BASIC/test.sh -@@ -11,7 +11,7 @@ test_run() { - $testdir/run-qemu \ - -hda $TESTDIR/root.ext3 \ - -hdb $TESTDIR/result \ -- -m 256M -nographic \ -+ -m 256M -smp 2 -nographic \ - -net none -kernel /boot/vmlinuz-$KVERSION \ - -watchdog i6300esb -watchdog-action poweroff \ - -append "root=LABEL=dracut rw systemd.log_level=debug systemd.log_target=console rd.retry=3 rd.debug console=ttyS0,115200n81 $DEBUGFAIL" \ -@@ -70,7 +70,7 @@ test_setup() { - - $testdir/run-qemu \ - -hda $TESTDIR/root.ext3 \ -- -m 256M -nographic -net none \ -+ -m 256M -smp 2 -nographic -net none \ - -kernel "/boot/vmlinuz-$kernel" \ - -append "root=/dev/dracut/root rw rootfstype=ext3 quiet console=ttyS0,115200n81 selinux=0" \ - -initrd $TESTDIR/initramfs.makeroot || return 1 -diff --git a/test/TEST-02-SYSTEMD/test.sh b/test/TEST-02-SYSTEMD/test.sh -index 6defa08..459cf03 100755 ---- a/test/TEST-02-SYSTEMD/test.sh -+++ b/test/TEST-02-SYSTEMD/test.sh -@@ -8,7 +8,7 @@ KVERSION=${KVERSION-$(uname -r)} - test_run() { - $testdir/run-qemu \ - -hda $TESTDIR/root.ext3 \ -- -m 256M -nographic \ -+ -m 256M -smp 2 -nographic \ - -net none -kernel /boot/vmlinuz-$KVERSION \ - -append "root=LABEL=dracut rw loglevel=77 systemd.log_level=debug systemd.log_target=console rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug init=/sbin/init $DEBUGFAIL" \ - -initrd $TESTDIR/initramfs.testing -@@ -66,9 +66,9 @@ test_setup() { - - $testdir/run-qemu \ - -hda $TESTDIR/root.ext3 \ -- -m 256M -nographic -net none \ -+ -m 256M -smp 2 -nographic -net none \ - -kernel "/boot/vmlinuz-$kernel" \ -- -append "root=/dev/dracut/root rw rootfstype=ext3 quiet console=ttyS0,115200n81 selinux=0" \ -+ -append "root=/dev/fakeroot rw rootfstype=ext3 quiet console=ttyS0,115200n81 selinux=0" \ - -initrd $TESTDIR/initramfs.makeroot || return 1 - grep -m 1 -q dracut-root-block-created $TESTDIR/root.ext3 || return 1 - -diff --git a/test/TEST-03-USR-MOUNT/test.sh b/test/TEST-03-USR-MOUNT/test.sh -index 0dcd13c..680720b 100755 ---- a/test/TEST-03-USR-MOUNT/test.sh -+++ b/test/TEST-03-USR-MOUNT/test.sh -@@ -18,7 +18,7 @@ client_run() { - -hda $TESTDIR/root.btrfs \ - -hdb $TESTDIR/usr.btrfs \ - -hdc $TESTDIR/result \ -- -m 256M -nographic \ -+ -m 256M -smp 2 -nographic \ - -net none -kernel /boot/vmlinuz-$KVERSION \ - -watchdog i6300esb -watchdog-action poweroff \ - -append "root=LABEL=dracut $client_opts quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL" \ -@@ -105,7 +105,7 @@ test_setup() { - $testdir/run-qemu \ - -hda $TESTDIR/root.btrfs \ - -hdb $TESTDIR/usr.btrfs \ -- -m 256M -nographic -net none \ -+ -m 256M -smp 2 -nographic -net none \ - -kernel "/boot/vmlinuz-$kernel" \ - -append "root=/dev/dracut/root rw rootfstype=btrfs quiet console=ttyS0,115200n81 selinux=0" \ - -initrd $TESTDIR/initramfs.makeroot || return 1 -diff --git a/test/TEST-04-FULL-SYSTEMD/test.sh b/test/TEST-04-FULL-SYSTEMD/test.sh -index 0b8e999..d3dc7ef 100755 ---- a/test/TEST-04-FULL-SYSTEMD/test.sh -+++ b/test/TEST-04-FULL-SYSTEMD/test.sh -@@ -20,7 +20,7 @@ client_run() { - -hda $TESTDIR/root.btrfs \ - -hdb $TESTDIR/usr.btrfs \ - -hdc $TESTDIR/result \ -- -m 256M -nographic \ -+ -m 256M -smp 2 -nographic \ - -net none -kernel /boot/vmlinuz-$KVERSION \ - -append "root=LABEL=dracut $client_opts rd.retry=3 console=ttyS0,115200n81 selinux=0 $DEBUGOUT $DEBUGFAIL" \ - -initrd $TESTDIR/initramfs.testing -@@ -247,9 +247,9 @@ EOF - $testdir/run-qemu \ - -hda $TESTDIR/root.btrfs \ - -hdb $TESTDIR/usr.btrfs \ -- -m 256M -nographic -net none \ -+ -m 256M -smp 2 -nographic -net none \ - -kernel "/boot/vmlinuz-$kernel" \ -- -append "root=/dev/dracut/root rw rootfstype=btrfs quiet console=ttyS0,115200n81 selinux=0" \ -+ -append "root=/dev/fakeroot rw rootfstype=btrfs quiet console=ttyS0,115200n81 selinux=0" \ - -initrd $TESTDIR/initramfs.makeroot || return 1 - grep -m 1 -q dracut-root-block-created $TESTDIR/root.btrfs || return 1 - -diff --git a/test/TEST-10-RAID/test.sh b/test/TEST-10-RAID/test.sh -index b71cf9d..e11c518 100755 ---- a/test/TEST-10-RAID/test.sh -+++ b/test/TEST-10-RAID/test.sh -@@ -10,7 +10,7 @@ test_run() { - DISKIMAGE=$TESTDIR/TEST-10-RAID-root.img - $testdir/run-qemu \ - -hda $DISKIMAGE \ -- -m 256M -nographic \ -+ -m 256M -smp 2 -nographic \ - -net none -kernel /boot/vmlinuz-$KVERSION \ - -append "root=/dev/dracut/root rd.auto rw rd.retry=10 console=ttyS0,115200n81 selinux=0 $DEBUGFAIL" \ - -initrd $TESTDIR/initramfs.testing -@@ -67,7 +67,7 @@ test_setup() { - # Invoke KVM and/or QEMU to actually create the target filesystem. - $testdir/run-qemu \ - -hda $DISKIMAGE \ -- -m 256M -nographic -net none \ -+ -m 256M -smp 2 -nographic -net none \ - -kernel "/boot/vmlinuz-$kernel" \ - -append "root=/dev/cannotreach rw rootfstype=ext2 console=ttyS0,115200n81 selinux=0" \ - -initrd $TESTDIR/initramfs.makeroot || return 1 -diff --git a/test/TEST-11-LVM/test.sh b/test/TEST-11-LVM/test.sh -index c40b4df..d876e55 100755 ---- a/test/TEST-11-LVM/test.sh -+++ b/test/TEST-11-LVM/test.sh -@@ -9,7 +9,7 @@ KVERSION=${KVERSION-$(uname -r)} - test_run() { - $testdir/run-qemu \ - -hda $TESTDIR/root.ext2 \ -- -m 256M -nographic \ -+ -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 -@@ -61,9 +61,9 @@ test_setup() { - -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 -nographic -net none \ -+ $testdir/run-qemu -hda $TESTDIR/root.ext2 -m 256M -smp 2 -nographic -net none \ - -kernel "/boot/vmlinuz-$kernel" \ -- -append "root=/dev/dracut/root rw rootfstype=ext2 quiet console=ttyS0,115200n81 selinux=0" \ -+ -append "root=/dev/fakeroot rw rootfstype=ext2 quiet console=ttyS0,115200n81 selinux=0" \ - -initrd $TESTDIR/initramfs.makeroot || return 1 - grep -m 1 -q dracut-root-block-created $TESTDIR/root.ext2 || return 1 - ( -diff --git a/test/TEST-12-RAID-DEG/test.sh b/test/TEST-12-RAID-DEG/test.sh -index 7e4b804..1eae41a 100755 ---- a/test/TEST-12-RAID-DEG/test.sh -+++ b/test/TEST-12-RAID-DEG/test.sh -@@ -15,7 +15,7 @@ client_run() { - cp --sparse=always --reflink=auto $TESTDIR/disk3.img $TESTDIR/disk3.img.new - - $testdir/run-qemu \ -- -hda $TESTDIR/root.ext2 -m 256M -nographic \ -+ -hda $TESTDIR/root.ext2 -m 256M -nographic -smp 2 \ - -hdc $TESTDIR/disk2.img.new \ - -hdd $TESTDIR/disk3.img.new \ - -net none -kernel /boot/vmlinuz-$KVERSION \ -@@ -106,9 +106,9 @@ test_setup() { - -hdb $TESTDIR/disk1.img \ - -hdc $TESTDIR/disk2.img \ - -hdd $TESTDIR/disk3.img \ -- -m 256M -nographic -net none \ -+ -m 256M -smp 2 -nographic -net none \ - -kernel "/boot/vmlinuz-$kernel" \ -- -append "root=/dev/dracut/root rw rootfstype=ext2 quiet console=ttyS0,115200n81 selinux=0" \ -+ -append "root=/dev/fakeroot rw rootfstype=ext2 quiet console=ttyS0,115200n81 selinux=0" \ - -initrd $TESTDIR/initramfs.makeroot || return 1 - - grep -m 1 -q dracut-root-block-created $TESTDIR/root.ext2 || return 1 -diff --git a/test/TEST-13-ENC-RAID-LVM/test.sh b/test/TEST-13-ENC-RAID-LVM/test.sh -index e5d3939..b8fc7ff 100755 ---- a/test/TEST-13-ENC-RAID-LVM/test.sh -+++ b/test/TEST-13-ENC-RAID-LVM/test.sh -@@ -17,7 +17,7 @@ test_run() { - $testdir/run-qemu \ - -hda $TESTDIR/root.ext2 \ - -hdb $TESTDIR/check-success.img \ -- -m 256M -nographic \ -+ -m 256M -smp 2 -nographic \ - -net none -kernel /boot/vmlinuz-$KVERSION \ - -append "root=/dev/dracut/root rw rd.auto rd.retry=20 console=ttyS0,115200n81 selinux=0 rd.debug rootwait $LUKSARGS $DEBUGFAIL" \ - -initrd $TESTDIR/initramfs.testing -@@ -30,7 +30,7 @@ test_run() { - $testdir/run-qemu \ - -hda $TESTDIR/root.ext2 \ - -hdb $TESTDIR/check-success.img \ -- -m 256M -nographic \ -+ -m 256M -smp 2 -nographic \ - -net none -kernel /boot/vmlinuz-$KVERSION \ - -append "root=/dev/dracut/root rw quiet rd.auto rd.retry=20 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL" \ - -initrd $TESTDIR/initramfs.testing -@@ -43,7 +43,7 @@ test_run() { - $testdir/run-qemu \ - -hda $TESTDIR/root.ext2 \ - -hdb $TESTDIR/check-success.img \ -- -m 256M -nographic \ -+ -m 256M -smp 2 -nographic \ - -net none -kernel /boot/vmlinuz-$KVERSION \ - -append "root=/dev/dracut/root rw quiet rd.auto rd.retry=10 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL rd.luks.uuid=failme" \ - -initrd $TESTDIR/initramfs.testing -@@ -98,9 +98,9 @@ test_setup() { - -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 -nographic -net none \ -+ $testdir/run-qemu -hda $TESTDIR/root.ext2 -m 256M -smp 2 -nographic -net none \ - -kernel "/boot/vmlinuz-$kernel" \ -- -append "root=/dev/dracut/root rw rootfstype=ext2 quiet console=ttyS0,115200n81 selinux=0" \ -+ -append "root=/dev/fakeroot rw rootfstype=ext2 quiet console=ttyS0,115200n81 selinux=0" \ - -initrd $TESTDIR/initramfs.makeroot || return 1 - grep -m 1 -q dracut-root-block-created $TESTDIR/root.ext2 || return 1 - cryptoUUIDS=$(grep --binary-files=text -m 3 ID_FS_UUID $TESTDIR/root.ext2) -diff --git a/test/TEST-15-BTRFSRAID/test.sh b/test/TEST-15-BTRFSRAID/test.sh -index 981f919..8f013d5 100755 ---- a/test/TEST-15-BTRFSRAID/test.sh -+++ b/test/TEST-15-BTRFSRAID/test.sh -@@ -9,9 +9,9 @@ test_run() { - DISKIMAGE=$TESTDIR/TEST-15-BTRFSRAID-root.img - $testdir/run-qemu \ - -hda $DISKIMAGE \ -- -m 256M -nographic \ -+ -m 256M -smp 2 -nographic \ - -net none -kernel /boot/vmlinuz-$KVERSION \ -- -append "root=LABEL=root rw quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL" \ -+ -append "root=LABEL=root rw rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 $DEBUGFAIL" \ - -initrd $TESTDIR/initramfs.testing - grep -m 1 -q dracut-root-block-success $DISKIMAGE || return 1 - } -@@ -67,9 +67,9 @@ test_setup() { - # Invoke KVM and/or QEMU to actually create the target filesystem. - $testdir/run-qemu \ - -hda $DISKIMAGE \ -- -m 256M -nographic -net none \ -+ -m 256M -smp 2 -nographic -net none \ - -kernel "/boot/vmlinuz-$kernel" \ -- -append "root=LABEL=root rw quiet console=ttyS0,115200n81 selinux=0" \ -+ -append "root=/dev/fakeroot rw quiet console=ttyS0,115200n81 selinux=0" \ - -initrd $TESTDIR/initramfs.makeroot || return 1 - - grep -m 1 -q dracut-root-block-created $DISKIMAGE || return 1 -@@ -79,7 +79,6 @@ test_setup() { - . $basedir/dracut-functions.sh - dracut_install poweroff shutdown - inst_hook emergency 000 ./hard-off.sh -- inst ./cryptroot-ask.sh /sbin/cryptroot-ask - inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules - ) - sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ -diff --git a/test/TEST-16-DMSQUASH/test.sh b/test/TEST-16-DMSQUASH/test.sh -index 9c4f356..1f0854e 100755 ---- a/test/TEST-16-DMSQUASH/test.sh -+++ b/test/TEST-16-DMSQUASH/test.sh -@@ -19,7 +19,7 @@ test_run() { - -boot order=d \ - -cdrom $TESTDIR/livecd.iso \ - -hda $TESTDIR/root.img \ -- -m 256M -nographic \ -+ -m 256M -smp 2 -nographic \ - -net none -kernel /boot/vmlinuz-$KVERSION \ - -append "root=live:CDLABEL=LiveCD live rw quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL" \ - -initrd $TESTDIR/initramfs.testing -diff --git a/test/TEST-20-NFS/test.sh b/test/TEST-20-NFS/test.sh -index 5e32d7c..daf5bac 100755 ---- a/test/TEST-20-NFS/test.sh -+++ b/test/TEST-20-NFS/test.sh -@@ -17,7 +17,7 @@ run_server() { - fsck -a $TESTDIR/server.ext3 || return 1 - $testdir/run-qemu \ - -hda $TESTDIR/server.ext3 \ -- -m 256M \ -+ -m 256M -smp 2 \ - -nographic \ - -net nic,macaddr=52:54:00:12:34:56,model=e1000 \ - -net socket,listen=127.0.0.1:12320 \ -@@ -54,7 +54,7 @@ client_test() { - - $testdir/run-qemu \ - -hda $TESTDIR/client.img \ -- -m 256M -nographic \ -+ -m 256M -smp 2 -nographic \ - -net nic,macaddr=$mac,model=e1000 \ - -net socket,connect=127.0.0.1:12320 \ - -kernel /boot/vmlinuz-$KVERSION \ -diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh -index c1febc9..f6893a8 100755 ---- a/test/TEST-30-ISCSI/test.sh -+++ b/test/TEST-30-ISCSI/test.sh -@@ -16,7 +16,7 @@ run_server() { - -hdb $TESTDIR/root.ext3 \ - -hdc $TESTDIR/iscsidisk2.img \ - -hdd $TESTDIR/iscsidisk3.img \ -- -m 256M -nographic \ -+ -m 256M -smp 2 -nographic \ - -serial $SERIAL \ - -net nic,macaddr=52:54:00:12:34:56,model=e1000 \ - -net socket,listen=127.0.0.1:12330 \ -@@ -41,7 +41,7 @@ run_client() { - - $testdir/run-qemu \ - -hda $TESTDIR/client.img \ -- -m 256M -nographic \ -+ -m 256M -smp 2 -nographic \ - -net nic,macaddr=52:54:00:12:34:00,model=e1000 \ - -net socket,connect=127.0.0.1:12330 \ - -kernel /boot/vmlinuz-$KVERSION \ -@@ -147,9 +147,9 @@ test_setup() { - -hdb $TESTDIR/client.img \ - -hdc $TESTDIR/iscsidisk2.img \ - -hdd $TESTDIR/iscsidisk3.img \ -- -m 256M -nographic -net none \ -+ -smp 2 -m 256M -nographic -net none \ - -kernel "/boot/vmlinuz-$kernel" \ -- -append "root=/dev/dracut/root rw rootfstype=ext3 quiet console=ttyS0,115200n81 selinux=0" \ -+ -append "root=/dev/fakeroot rw rootfstype=ext3 quiet console=ttyS0,115200n81 selinux=0" \ - -initrd $TESTDIR/initramfs.makeroot || return 1 - grep -m 1 -q dracut-root-block-created $TESTDIR/client.img || return 1 - rm $TESTDIR/client.img -diff --git a/test/TEST-40-NBD/create-root.sh b/test/TEST-40-NBD/create-root.sh -index 9c1c09e..62188d7 100755 ---- a/test/TEST-40-NBD/create-root.sh -+++ b/test/TEST-40-NBD/create-root.sh -@@ -13,7 +13,7 @@ lvm pvcreate -ff -y /dev/mapper/dracut_crypt_test && \ - lvm vgcreate dracut /dev/mapper/dracut_crypt_test && \ - lvm lvcreate -l 100%FREE -n root dracut && \ - lvm vgchange -ay && \ --mke2fs -j /dev/dracut/root && \ -+mke2fs -L dracut -j /dev/dracut/root && \ - /sbin/tune2fs -e continue /dev/dracut/root && \ - mkdir -p /sysroot && \ - mount /dev/dracut/root /sysroot && \ -diff --git a/test/TEST-40-NBD/test.sh b/test/TEST-40-NBD/test.sh -index dcff8f7..dae65f2 100755 ---- a/test/TEST-40-NBD/test.sh -+++ b/test/TEST-40-NBD/test.sh -@@ -18,7 +18,7 @@ run_server() { - -hda $TESTDIR/server.ext2 \ - -hdb $TESTDIR/nbd.ext2 \ - -hdc $TESTDIR/encrypted.ext2 \ -- -m 256M -nographic \ -+ -m 256M -smp 2 -nographic \ - -net nic,macaddr=52:54:00:12:34:56,model=e1000 \ - -net socket,listen=127.0.0.1:12340 \ - -serial $SERIAL \ -@@ -55,7 +55,7 @@ client_test() { - - $testdir/run-qemu \ - -hda $TESTDIR/flag.img \ -- -m 512M \ -+ -m 512M -smp 2 \ - -nographic \ - -net nic,macaddr=$mac,model=e1000 \ - -net socket,connect=127.0.0.1:12340 \ -@@ -166,16 +166,16 @@ client_run() { - - . $TESTDIR/luks.uuid - -- client_test "NBD root=/dev/dracut/root netroot=nbd:IP:port" \ -+ client_test "NBD root=LABEL=dracut netroot=nbd:IP:port" \ - 52:54:00:12:34:00 \ -- "root=/dev/dracut/root rd.luks.uuid=$ID_FS_UUID rd.lv.vg=dracut netroot=nbd:192.168.50.1:2001" || return 1 -+ "root=LABEL=dracut rd.luks.uuid=$ID_FS_UUID rd.lv.vg=dracut netroot=nbd:192.168.50.1:2001" || return 1 - - # XXX This should be ext2,errors=panic but that doesn't currently - # XXX work when you have a real root= line in addition to netroot= - # XXX How we should work here needs clarification -- client_test "NBD root=/dev/dracut/root netroot=dhcp (w/ fstype and opts)" \ -+ client_test "NBD root=LABEL=dracut netroot=dhcp (w/ fstype and opts)" \ - 52:54:00:12:34:05 \ -- "root=/dev/dracut/root rd.luks.uuid=$ID_FS_UUID rd.lv.vg=dracut netroot=dhcp" || return 1 -+ "root=LABEL=dracut rd.luks.uuid=$ID_FS_UUID rd.lv.vg=dracut netroot=dhcp" || return 1 - - if [[ -s server.pid ]]; then - sudo kill -TERM $(cat $TESTDIR/server.pid) -@@ -213,6 +213,7 @@ make_encrypted_root() { - export initdir=$TESTDIR/overlay - . $basedir/dracut-functions.sh - dracut_install mke2fs poweroff cp umount tune2fs -+ inst_hook emergency 000 ./hard-off.sh - 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 -@@ -231,10 +232,10 @@ make_encrypted_root() { - $testdir/run-qemu \ - -hda $TESTDIR/flag.img \ - -hdb $TESTDIR/encrypted.ext2 \ -- -m 256M \ -+ -m 256M -smp 2\ - -nographic -net none \ - -kernel "/boot/vmlinuz-$kernel" \ -- -append "root=/dev/dracut/root rw quiet console=ttyS0,115200n81 selinux=0" \ -+ -append "root=/dev/fakeroot rw quiet console=ttyS0,115200n81 selinux=0" \ - -initrd $TESTDIR/initramfs.makeroot || return 1 - grep -m 1 -q dracut-root-block-created $TESTDIR/flag.img || return 1 - grep -a -m 1 ID_FS_UUID $TESTDIR/flag.img > $TESTDIR/luks.uuid -diff --git a/test/TEST-50-MULTINIC/test.sh b/test/TEST-50-MULTINIC/test.sh -index 65d76b5..17c8cc5 100755 ---- a/test/TEST-50-MULTINIC/test.sh -+++ b/test/TEST-50-MULTINIC/test.sh -@@ -17,7 +17,7 @@ run_server() { - fsck -a $TESTDIR/server.ext3 || return 1 - $testdir/run-qemu \ - -hda $TESTDIR/server.ext3 \ -- -m 512M \ -+ -m 512M -smp 2 \ - -nographic \ - -netdev socket,mcast=230.0.0.1:12320,id=net0 \ - -net nic,macaddr=52:54:01:12:34:56,model=e1000,netdev=net0 \ -@@ -52,7 +52,7 @@ client_test() { - return 1 - fi - -- $testdir/run-qemu -hda $TESTDIR/client.img -m 512M -nographic \ -+ $testdir/run-qemu -hda $TESTDIR/client.img -m 512M -smp 2 -nographic \ - -netdev socket,mcast=230.0.0.1:12320,id=net0 \ - -net nic,netdev=net0,macaddr=52:54:00:12:34:$mac1,model=e1000 \ - -netdev socket,mcast=230.0.0.1:12320,id=net1 \ diff --git a/0047-dracut.spec-bump-systemd-version-requirement.patch b/0047-dracut.spec-bump-systemd-version-requirement.patch deleted file mode 100644 index 97de6b8..0000000 --- a/0047-dracut.spec-bump-systemd-version-requirement.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 7e9fc37db84636de2f704d165ff0ffdc6e964530 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Fri, 15 Mar 2013 07:11:17 +0100 -Subject: [PATCH] dracut.spec: bump systemd version requirement - ---- - dracut.spec | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/dracut.spec b/dracut.spec -index 4870390..ac4a786 100644 ---- a/dracut.spec -+++ b/dracut.spec -@@ -86,7 +86,7 @@ Requires: kbd kbd-misc - - %if 0%{?fedora} || 0%{?rhel} > 6 - Requires: util-linux >= 2.21 --Requires: systemd >= 198-4 -+Requires: systemd >= 198-5 - Conflicts: grubby < 8.23 - %else - Requires: udev > 166 diff --git a/0048-sosreport.sh-use-o-short-monotonic-for-the-journal-o.patch b/0048-sosreport.sh-use-o-short-monotonic-for-the-journal-o.patch deleted file mode 100644 index 1cce3b6..0000000 --- a/0048-sosreport.sh-use-o-short-monotonic-for-the-journal-o.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 7e9bfdde14e64b959f5ae24aa8e6d91e56d09ec6 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Fri, 15 Mar 2013 10:41:41 +0100 -Subject: [PATCH] sosreport.sh: use -o short-monotonic for the journal output - ---- - modules.d/99base/sosreport.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/99base/sosreport.sh b/modules.d/99base/sosreport.sh -index 2aded6b..0b4ccdc 100755 ---- a/modules.d/99base/sosreport.sh -+++ b/modules.d/99base/sosreport.sh -@@ -41,7 +41,7 @@ command -v dmsetup >/dev/null 2>/dev/null && dmsetup ls --tree - cat /proc/mdstat - - if command -v journalctl >/dev/null 2>/dev/null; then -- journalctl -ab --no-pager -+ journalctl -ab --no-pager -o short-monotonic - else - dmesg - [ -f /run/initramfs/init.log ] && cat /run/initramfs/init.log diff --git a/0049-dracut-bash-completion.sh-add-kver-kernel-version-co.patch b/0049-dracut-bash-completion.sh-add-kver-kernel-version-co.patch deleted file mode 100644 index 553b8b6..0000000 --- a/0049-dracut-bash-completion.sh-add-kver-kernel-version-co.patch +++ /dev/null @@ -1,24 +0,0 @@ -From fb05f9876ac18b64c8b9e07f9eb2e451e818b46e Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Fri, 15 Mar 2013 10:42:18 +0100 -Subject: [PATCH] dracut-bash-completion.sh: add --kver kernel version - completion - ---- - dracut-bash-completion.sh | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/dracut-bash-completion.sh b/dracut-bash-completion.sh -index 38e2ebd..322e630 100644 ---- a/dracut-bash-completion.sh -+++ b/dracut-bash-completion.sh -@@ -51,6 +51,9 @@ _dracut() { - -a|-m|-o|--add|--modules|--omit) - comps=$(dracut --list-modules 2>/dev/null) - ;; -+ --kver) -+ comps=$(cd /lib/modules; echo *) -+ ;; - *) - return 0 - ;; diff --git a/0050-TEST-16-DMSQUASH-use-current-releasever.patch b/0050-TEST-16-DMSQUASH-use-current-releasever.patch deleted file mode 100644 index 039af83..0000000 --- a/0050-TEST-16-DMSQUASH-use-current-releasever.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 11fbde445440c4de1b99eb03b930c9191b3181b9 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Fri, 15 Mar 2013 14:41:11 +0100 -Subject: [PATCH] TEST-16-DMSQUASH: use current releasever - ---- - test/TEST-16-DMSQUASH/livecd-fedora-minimal.ks | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/test/TEST-16-DMSQUASH/livecd-fedora-minimal.ks b/test/TEST-16-DMSQUASH/livecd-fedora-minimal.ks -index 88637ae..6310f78 100644 ---- a/test/TEST-16-DMSQUASH/livecd-fedora-minimal.ks -+++ b/test/TEST-16-DMSQUASH/livecd-fedora-minimal.ks -@@ -6,7 +6,7 @@ selinux --enforcing - firewall --disabled - part / --size 1024 - --repo --name=fedora --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-16&arch=$basearch -+repo --name=fedora --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$version&arch=$basearch - - %packages - @core diff --git a/0051-dracut.conf.5.asc-remove-duplicated-install_items.patch b/0051-dracut.conf.5.asc-remove-duplicated-install_items.patch deleted file mode 100644 index c1f8eef..0000000 --- a/0051-dracut.conf.5.asc-remove-duplicated-install_items.patch +++ /dev/null @@ -1,24 +0,0 @@ -From ee2321c91e52c4de2a3a9e41c0469cf76447db41 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Fri, 15 Mar 2013 16:54:38 +0100 -Subject: [PATCH] dracut.conf.5.asc: remove duplicated install_items - ---- - dracut.conf.5.asc | 4 ---- - 1 file changed, 4 deletions(-) - -diff --git a/dracut.conf.5.asc b/dracut.conf.5.asc -index dbaa2e5..df876cc 100644 ---- a/dracut.conf.5.asc -+++ b/dracut.conf.5.asc -@@ -51,10 +51,6 @@ Configuration files must have the extension .conf; other extensions are ignored. - Specify a space-separated list of kernel modules not to add to the - initramfs. The kernel modules have to be specified without the ".ko" suffix. - --*install_items+=*" ____ ":: -- Specify a space-separated list of files, which are added to the initramfs -- image. -- - *filesystems+=*" ____ ":: - Specify a space-separated list of kernel filesystem modules to exclusively - include in the generic initramfs. diff --git a/0052-dmsquash-live-force-load-squashfs-kernel-module.patch b/0052-dmsquash-live-force-load-squashfs-kernel-module.patch deleted file mode 100644 index 8701377..0000000 --- a/0052-dmsquash-live-force-load-squashfs-kernel-module.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 85804a9197790d461dfa1458883f84a9da9ae589 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Sat, 16 Mar 2013 10:31:37 +0100 -Subject: [PATCH] dmsquash-live: force load squashfs kernel module - -https://bugzilla.redhat.com/show_bug.cgi?id=922248 ---- - modules.d/90dmsquash-live/dmsquash-live-root.sh | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/modules.d/90dmsquash-live/dmsquash-live-root.sh b/modules.d/90dmsquash-live/dmsquash-live-root.sh -index 0b1ed20..a79b0d9 100755 ---- a/modules.d/90dmsquash-live/dmsquash-live-root.sh -+++ b/modules.d/90dmsquash-live/dmsquash-live-root.sh -@@ -49,9 +49,12 @@ ln -s $livedev /run/initramfs/livedev - - # determine filesystem type for a filesystem image - det_img_fs() { -+ udevadm settle - blkid -s TYPE -u noraid -o value "$1" - } - -+modprobe squashfs -+ - for arg in $CMDLINE; do case $arg in ro|rw) liverw=$arg ;; esac; done - # mount the backing of the live image first - mkdir -m 0755 -p /run/initramfs/live diff --git a/0053-sosreport-mkdir-run-initramfs-if-it-does-not-exist-y.patch b/0053-sosreport-mkdir-run-initramfs-if-it-does-not-exist-y.patch deleted file mode 100644 index c4d7dde..0000000 --- a/0053-sosreport-mkdir-run-initramfs-if-it-does-not-exist-y.patch +++ /dev/null @@ -1,22 +0,0 @@ -From e42c7a980ca3852781ee2ddd2b1633e482cf58d0 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Sat, 16 Mar 2013 10:34:20 +0100 -Subject: [PATCH] sosreport: mkdir /run/initramfs, if it does not exist yet - ---- - modules.d/99base/sosreport.sh | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/modules.d/99base/sosreport.sh b/modules.d/99base/sosreport.sh -index 0b4ccdc..eb1ba80 100755 ---- a/modules.d/99base/sosreport.sh -+++ b/modules.d/99base/sosreport.sh -@@ -2,6 +2,8 @@ - - echo 'Generating "/run/initramfs/sosreport.txt"' - -+[ -d /run/initramfs ] || mkdir -p /run/initramfs -+ - exec >/run/initramfs/sosreport.txt 2>&1 - - set -x diff --git a/0054-kernel-modules-module-setup.sh-install-all-host-file.patch b/0054-kernel-modules-module-setup.sh-install-all-host-file.patch deleted file mode 100644 index 269d657..0000000 --- a/0054-kernel-modules-module-setup.sh-install-all-host-file.patch +++ /dev/null @@ -1,76 +0,0 @@ -From fd191a7b41b0f402e8c36f692b5f1b5e9eb8b035 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 18 Mar 2013 08:43:23 +0100 -Subject: [PATCH] kernel-modules/module-setup.sh: install all host filesystem - drivers - -https://bugzilla.redhat.com/show_bug.cgi?id=922565 ---- - dracut-functions.sh | 14 ++++++++++++++ - modules.d/90kernel-modules/module-setup.sh | 8 +++----- - 2 files changed, 17 insertions(+), 5 deletions(-) - -diff --git a/dracut-functions.sh b/dracut-functions.sh -index c6a5c7e..eba7412 100755 ---- a/dracut-functions.sh -+++ b/dracut-functions.sh -@@ -457,12 +457,20 @@ for_each_host_dev_fs() - local _func="$1" - local _dev - local _ret=1 -+ -+ [[ "${!host_fs_types[@]}" ]] || return 0 -+ - for _dev in "${!host_fs_types[@]}"; do - $_func "$_dev" "${host_fs_types[$_dev]}" && _ret=0 - done - return $_ret - } - -+host_fs_all() -+{ -+ echo "${host_fs_types[@]}" -+} -+ - # Walk all the slave relationships for a given block device. - # Stop when our helper function returns success - # $1 = function to call on every found block device -@@ -508,6 +516,9 @@ for_each_host_dev_and_slaves_all() - local _func="$1" - local _dev - local _ret=1 -+ -+ [[ "${host_devs[@]}" ]] || return 0 -+ - for _dev in ${host_devs[@]}; do - [[ -b "$_dev" ]] || continue - if check_block_and_slaves_all $_func $(get_maj_min $_dev); then -@@ -521,6 +532,9 @@ for_each_host_dev_and_slaves() - { - local _func="$1" - local _dev -+ -+ [[ "${host_devs[@]}" ]] || return 0 -+ - for _dev in ${host_devs[@]}; do - [[ -b "$_dev" ]] || continue - check_block_and_slaves $_func $(get_maj_min $_dev) && return 0 -diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh -index 7d7da83..bd35a2c 100755 ---- a/modules.d/90kernel-modules/module-setup.sh -+++ b/modules.d/90kernel-modules/module-setup.sh -@@ -65,11 +65,9 @@ installkernel() { - instmods '=fs' - fi - else -- inst_fs() { -- [[ $2 ]] || return 1 -- hostonly='' instmods $2 -- } -- for_each_host_dev_fs inst_fs -+ for i in $(host_fs_all); do -+ hostonly='' instmods $i -+ done - fi - fi - } diff --git a/0055-kernel-modules-module-setup.sh-don-t-fail-hard-on-a-.patch b/0055-kernel-modules-module-setup.sh-don-t-fail-hard-on-a-.patch deleted file mode 100644 index 361fecc..0000000 --- a/0055-kernel-modules-module-setup.sh-don-t-fail-hard-on-a-.patch +++ /dev/null @@ -1,22 +0,0 @@ -From c9e5b75308d858dfb865d3db0a7bad1d6062348d Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 18 Mar 2013 09:29:08 +0100 -Subject: [PATCH] kernel-modules/module-setup.sh: don't fail hard on a missing - module - ---- - modules.d/90kernel-modules/module-setup.sh | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh -index bd35a2c..a04eba8 100755 ---- a/modules.d/90kernel-modules/module-setup.sh -+++ b/modules.d/90kernel-modules/module-setup.sh -@@ -70,6 +70,7 @@ installkernel() { - done - fi - fi -+ : - } - - install() { diff --git a/0056-Makefile-use-D_FILE_OFFSET_BITS-64-to-build-dracut-i.patch b/0056-Makefile-use-D_FILE_OFFSET_BITS-64-to-build-dracut-i.patch deleted file mode 100644 index 3756cf7..0000000 --- a/0056-Makefile-use-D_FILE_OFFSET_BITS-64-to-build-dracut-i.patch +++ /dev/null @@ -1,22 +0,0 @@ -From a3a8f58d735040f4f800510bf45e6125c98dbae5 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 18 Mar 2013 10:58:25 +0100 -Subject: [PATCH] Makefile: use -D_FILE_OFFSET_BITS=64 to build dracut-install - ---- - Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Makefile b/Makefile -index 644d17d..ce40647 100644 ---- a/Makefile -+++ b/Makefile -@@ -11,7 +11,7 @@ sysconfdir ?= ${prefix}/etc - bindir ?= ${prefix}/bin - mandir ?= ${prefix}/share/man - CFLAGS ?= -O2 -g -Wall --CFLAGS += -std=gnu99 -+CFLAGS += -std=gnu99 -D_FILE_OFFSET_BITS=64 - bashcompletiondir ?= ${datadir}/bash-completion/completions - - man1pages = lsinitrd.1 diff --git a/0057-drm-module-setup.sh-redirect-grep-to-dev-null.patch b/0057-drm-module-setup.sh-redirect-grep-to-dev-null.patch deleted file mode 100644 index 7e20f7b..0000000 --- a/0057-drm-module-setup.sh-redirect-grep-to-dev-null.patch +++ /dev/null @@ -1,23 +0,0 @@ -From d59732004dac2d173e4a5976184813517d043b50 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 18 Mar 2013 14:17:19 +0100 -Subject: [PATCH] drm/module-setup.sh: redirect grep to /dev/null - -on some architectures, no pci devices exist ---- - modules.d/50drm/module-setup.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/50drm/module-setup.sh b/modules.d/50drm/module-setup.sh -index e471c11..bf33c5b 100644 ---- a/modules.d/50drm/module-setup.sh -+++ b/modules.d/50drm/module-setup.sh -@@ -54,7 +54,7 @@ installkernel() { - # as we could e.g. be in the installer; nokmsboot boot parameter will disable - # loading of the driver if needed - if [[ $hostonly ]] && modinfo -F alias $_modname | sed -e 's,\?,\.,g' -e 's,\*,\.\*,g' \ -- | grep -qxf - /sys/bus/pci/devices/*/modalias; then -+ | grep -qxf - /sys/bus/pci/devices/*/modalias 2>/dev/null; then - hostonly='' instmods $_modname - continue - fi diff --git a/0058-systemd-add-more-ordering.patch b/0058-systemd-add-more-ordering.patch deleted file mode 100644 index ac1964a..0000000 --- a/0058-systemd-add-more-ordering.patch +++ /dev/null @@ -1,68 +0,0 @@ -From e26d76dca1ffded7fb319b66d03e50ef9d906e4f Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Tue, 19 Mar 2013 12:22:33 +0100 -Subject: [PATCH] systemd: add more ordering - ---- - modules.d/98systemd/dracut-mount.service | 3 +-- - modules.d/98systemd/dracut-pre-mount.service | 2 +- - modules.d/98systemd/dracut-pre-pivot.service | 4 ++-- - modules.d/98systemd/module-setup.sh | 2 +- - 4 files changed, 5 insertions(+), 6 deletions(-) - -diff --git a/modules.d/98systemd/dracut-mount.service b/modules.d/98systemd/dracut-mount.service -index 5c12683..db18f86 100644 ---- a/modules.d/98systemd/dracut-mount.service -+++ b/modules.d/98systemd/dracut-mount.service -@@ -10,9 +10,8 @@ - [Unit] - Description=dracut mount hook - Documentation=man:dracut-mount.service(8) --DefaultDependencies=no - After=initrd-root-fs.target initrd-parse-etc.service -- -+After=dracut-initqueue.service dracut-pre-mount.service - ConditionPathExists=/etc/initrd-release - ConditionDirectoryNotEmpty=|/lib/dracut/hooks/mount - ConditionKernelCommandLine=|rd.break=mount -diff --git a/modules.d/98systemd/dracut-pre-mount.service b/modules.d/98systemd/dracut-pre-mount.service -index 0d76943..bec3c75 100644 ---- a/modules.d/98systemd/dracut-pre-mount.service -+++ b/modules.d/98systemd/dracut-pre-mount.service -@@ -11,7 +11,7 @@ - Description=dracut pre-mount hook - Documentation=man:dracut-pre-mount.service(8) - DefaultDependencies=no --Before=initrd-root-fs.target -+Before=initrd-root-fs.target sysroot.mount - After=dracut-initqueue.service - After=cryptsetup.target - ConditionPathExists=/etc/initrd-release -diff --git a/modules.d/98systemd/dracut-pre-pivot.service b/modules.d/98systemd/dracut-pre-pivot.service -index 72941c9..9d0143c 100644 ---- a/modules.d/98systemd/dracut-pre-pivot.service -+++ b/modules.d/98systemd/dracut-pre-pivot.service -@@ -10,8 +10,8 @@ - [Unit] - Description=dracut pre-pivot and cleanup hook - Documentation=man:dracut-pre-pivot.service(8) --DefaultDependencies=no --After=initrd-fs.target -+After=initrd.target initrd-parse-etc.service -+After=dracut-initqueue.service dracut-pre-mount.service dracut-mount.service - Before=initrd-cleanup.service - ConditionPathExists=/etc/initrd-release - ConditionDirectoryNotEmpty=|/lib/dracut/hooks/pre-pivot -diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh -index 17dbc44..252074f 100755 ---- a/modules.d/98systemd/module-setup.sh -+++ b/modules.d/98systemd/module-setup.sh -@@ -25,7 +25,7 @@ install() { - # fi - - if strstr "$prefix" "/run/"; then -- dfatal "systemd does not work a prefix, which contains \"/run\"!!" -+ dfatal "systemd does not work with a prefix, which contains \"/run\"!!" - exit 1 - fi - diff --git a/0059-add-dracut.bootup.7-man-page.patch b/0059-add-dracut.bootup.7-man-page.patch deleted file mode 100644 index 6b35399..0000000 --- a/0059-add-dracut.bootup.7-man-page.patch +++ /dev/null @@ -1,299 +0,0 @@ -From a1ebd7717957e1e89f5245541c5d2bf308fa5582 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Tue, 19 Mar 2013 12:22:58 +0100 -Subject: [PATCH] add dracut.bootup.7 man page - ---- - Makefile | 3 +- - dracut.asc | 29 +++++++------ - dracut.bootup.7.asc | 122 ++++++++++++++++++++++++++++++++++++++++++++++++++++ - dracut.spec | 1 + - 4 files changed, 141 insertions(+), 14 deletions(-) - create mode 100644 dracut.bootup.7.asc - -diff --git a/Makefile b/Makefile -index ce40647..6268772 100644 ---- a/Makefile -+++ b/Makefile -@@ -18,7 +18,8 @@ man1pages = lsinitrd.1 - - man5pages = dracut.conf.5 - --man7pages = dracut.cmdline.7 -+man7pages = dracut.cmdline.7 \ -+ dracut.bootup.7 - - man8pages = dracut.8 \ - dracut-catimages.8 \ -diff --git a/dracut.asc b/dracut.asc -index d11e95c..359824f 100644 ---- a/dracut.asc -+++ b/dracut.asc -@@ -120,6 +120,9 @@ final cleanup tasks. On an initramfs, the initial root file system cannot be - rotated away. Instead, it is simply emptied and the final root file system - mounted over the top. - -+If the systemd module is used in the initramfs, the ordering of the services -+started looks like <>. -+ - == Dracut on shutdown - - On a systemd driven system, the dracut initramfs is also used for the shutdown procedure. -@@ -531,19 +534,19 @@ all files in _/etc/dracut.conf.d/*.conf_ - As well as the information from <> include the following - information: - --* Include physical volume information by running the command: -+* Include physical volume information by running the command: - + - ---- - # lvm pvdisplay - ---- - + --* Include volume group information by running the command: -+* Include volume group information by running the command: - + - ---- - # lvm vgdisplay - ---- - + --* Include logical volume information by running the command: -+* Include logical volume information by running the command: - + - ---- - # lvm lvdisplay -@@ -554,7 +557,7 @@ information: - As well as the information from <>, include the following - information: - --* If using software RAID disk partitions, please include the output of -+* If using software RAID disk partitions, please include the output of - + - ---- - # cat /proc/mdstat -@@ -659,7 +662,7 @@ title Fedora (2.6.29.5-191.fc11.x86_64) - No root device found - Dropping to debug shell. - --# -+# - ---- - + - . Use this shell prompt to gather the information requested above (see <>). -@@ -679,7 +682,7 @@ The exact method for locating and preparing will vary. However, to continue with - a successful boot, the objective is to locate your root volume and create a - symlink _/dev/root_ which points to the file system. For example, the following - example demonstrates accessing and booting a root volume that is an encrypted --LVM Logical volume. -+LVM Logical volume. - - . Inspect your partitions using parted - + -@@ -695,7 +698,7 @@ Number Start End Size Type File system Flags - ---- - + - . You recall that your root volume was a LVM logical volume. Scan and activate --any logical volumes. -+any logical volumes. - + - ---- - # lvm vgscan -@@ -721,7 +724,7 @@ Installation Guide, you unlock your encrypted root volume. - # UUID=$(cryptsetup luksUUID /dev/mapper/linux-root) - # cryptsetup luksOpen /dev/mapper/linux-root luks-$UUID - Enter passphrase for /dev/mapper/linux-root: --Key slot 0 unlocked. -+Key slot 0 unlocked. - ---- - + - . Next, make a symbolic link to the unlocked root volume -@@ -780,7 +783,7 @@ processes, and switches to the real root device for further booting. dracut - modules can insert custom script at various points, to control the boot process. - These hooks are plain directories containing shell scripts ending with ".sh", - which are sourced by init. --Common used functions are in _dracut-lib.sh_, which can be sourced by any script. -+Common used functions are in _dracut-lib.sh_, which can be sourced by any script. - - - -@@ -829,7 +832,7 @@ udevadm. - === Trigger Udev - - udev is triggered by calling udevadm trigger, which sends add events for all --devices and subsystems. -+devices and subsystems. - - - -@@ -909,7 +912,6 @@ still running from the initramfs should not have any open file descriptors left. - - == Network Infrastructure - -- - FIXME - - -@@ -1028,13 +1030,11 @@ instmods - - === Creation Functions - -- - FIXME - - - === Initramfs Functions - -- - FIXME - - -@@ -1042,6 +1042,9 @@ FIXME - - FIXME - -+:leveloffset: 1 -+[[dracutbootup7]] -+include::dracut.bootup.7.asc[] - - :leveloffset: 1 - [[dracut8]] -diff --git a/dracut.bootup.7.asc b/dracut.bootup.7.asc -new file mode 100644 -index 0000000..c35af19 ---- /dev/null -+++ b/dracut.bootup.7.asc -@@ -0,0 +1,122 @@ -+DRACUT.BOOTUP(7) -+================ -+:doctype: manpage -+:man source: dracut -+:man manual: dracut -+ -+NAME -+---- -+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. -+---- -+ -+ systemd-journal.socket -+ | -+ v -+ dracut-cmdline.service -+ | -+ v -+ dracut-pre-udev.service -+ | -+ v -+ systemd-udevd.service -+ | -+ v -+local-fs-pre.target dracut-pre-trigger.service -+ | | -+ v v -+ (various mounts) (various swap systemd-udev-trigger.service -+ | devices...) | (various low-level (various low-level -+ | | | services: seed, API VFS mounts: -+ v v v tmpfiles, random mqueue, configfs, -+ local-fs.target swap.target dracut-initqueue.service sysctl, ...) debugfs, ...) -+ | | | | | -+ \_______________|____________________ | ___________________|____________________/ -+ \|/ -+ v -+ sysinit.target -+ | -+ _________________/|\___________________ -+ / | \ -+ | | | -+ v | v -+ (various | rescue.service -+ sockets...) | | -+ | | v -+ v | rescue.target -+ sockets.target | -+ | | -+ \_________________ | emergency.service -+ \| | -+ v v -+ basic.target emergency.target -+ | -+ ______________________/| -+ / | -+ | v -+ | dracut-pre-mount.service -+ | | -+ | v -+ | sysroot.mount -+ | | -+ | v -+ | initrd-root-fs.target -+ (custom initrd services) | -+ | v -+ | dracut-mount.service -+ | | -+ | v -+ | initrd-parse-etc.service -+ | | -+ | v -+ | (sysroot-usr.mount and -+ | various mounts marked -+ | with fstab option -+ | x-initrd.mount) -+ | | -+ | v -+ | initrd-fs.target -+ \______________________ | -+ \| -+ v -+ initrd.target -+ | -+ v -+ dracut-pre-pivot.service -+ | -+ v -+ initrd-cleanup.service -+ isolates to -+ initrd-switch-root.target -+ | -+ v -+ ______________________/| -+ / | -+ | initrd-udevadm-cleanup-db.service -+ | | -+ (custom initrd services) | -+ | | -+ \______________________ | -+ \| -+ v -+ initrd-switch-root.target -+ | -+ v -+ initrd-switch-root.service -+ | -+ v -+ switch-root -+---- -+ -+ -+AUTHOR -+------ -+Harald Hoyer -+ -+SEE ALSO -+-------- -+*dracut*(8) *bootup*(7) -diff --git a/dracut.spec b/dracut.spec -index ac4a786..445463f 100644 ---- a/dracut.spec -+++ b/dracut.spec -@@ -304,6 +304,7 @@ rm -rf $RPM_BUILD_ROOT - %endif - %{_mandir}/man7/dracut.kernel.7* - %{_mandir}/man7/dracut.cmdline.7* -+%{_mandir}/man7/dracut.bootup.7* - %{_mandir}/man5/dracut.conf.5* - %if %{defined _unitdir} - %{dracutlibdir}/modules.d/00systemd-bootchart diff --git a/0060-fs-lib-fs-lib.sh-write_fs_tab-start-initrd-root-fs.t.patch b/0060-fs-lib-fs-lib.sh-write_fs_tab-start-initrd-root-fs.t.patch deleted file mode 100644 index 30d191e..0000000 --- a/0060-fs-lib-fs-lib.sh-write_fs_tab-start-initrd-root-fs.t.patch +++ /dev/null @@ -1,21 +0,0 @@ -From db43f56d94bcb87c92b688e708988ef39603cdc2 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Tue, 19 Mar 2013 12:23:20 +0100 -Subject: [PATCH] fs-lib/fs-lib.sh:write_fs_tab() start initrd-root-fs.target - ---- - modules.d/99fs-lib/fs-lib.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/99fs-lib/fs-lib.sh b/modules.d/99fs-lib/fs-lib.sh -index 6936bbb..3fa8772 100755 ---- a/modules.d/99fs-lib/fs-lib.sh -+++ b/modules.d/99fs-lib/fs-lib.sh -@@ -245,6 +245,6 @@ write_fs_tab() { - - if type systemctl >/dev/null 2>/dev/null; then - systemctl daemon-reload -- systemctl --no-block start initrd-fs.target -+ systemctl --no-block start initrd-root-fs.target - fi - } diff --git a/0061-nbd-nbdroot.sh-fix-root-blockdev-case.patch b/0061-nbd-nbdroot.sh-fix-root-blockdev-case.patch deleted file mode 100644 index 1fa8e64..0000000 --- a/0061-nbd-nbdroot.sh-fix-root-blockdev-case.patch +++ /dev/null @@ -1,80 +0,0 @@ -From 7b6bdc3f943c0e34671faca3b671074c77e64ff0 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Tue, 19 Mar 2013 12:24:13 +0100 -Subject: [PATCH] nbd/nbdroot.sh: fix root != blockdev case - ---- - modules.d/95nbd/nbdroot.sh | 41 +++++++++++++++++++++-------------------- - 1 file changed, 21 insertions(+), 20 deletions(-) - -diff --git a/modules.d/95nbd/nbdroot.sh b/modules.d/95nbd/nbdroot.sh -index 4aebef0..1a1ed54 100755 ---- a/modules.d/95nbd/nbdroot.sh -+++ b/modules.d/95nbd/nbdroot.sh -@@ -17,18 +17,18 @@ PATH=/usr/sbin:/usr/bin:/sbin:/bin - - # root is in the form root=nbd:srv:port[:fstype[:rootflags[:nbdopts]]] - netif="$1" --root="$2" -+nroot="$2" - NEWROOT="$3" - - # If it's not nbd we don't continue --[ "${root%%:*}" = "nbd" ] || return -+[ "${nroot%%:*}" = "nbd" ] || return - --root=${root#nbd:} --nbdserver=${root%%:*}; root=${root#*:} --nbdport=${root%%:*}; root=${root#*:} --nbdfstype=${root%%:*}; root=${root#*:} --nbdflags=${root%%:*} --nbdopts=${root#*:} -+nroot=${nroot#nbd:} -+nbdserver=${nroot%%:*}; nroot=${nroot#*:} -+nbdport=${nroot%%:*}; nroot=${nroot#*:} -+nbdfstype=${nroot%%:*}; nroot=${nroot#*:} -+nbdflags=${nroot%%:*} -+nbdopts=${nroot#*:} - - # If nbdport not an integer, then assume name based import - if [ ! -z $(echo "$nbdport" | sed 's/[0-9]//g') ]; then -@@ -92,26 +92,27 @@ while [ ! -b /dev/nbd0 ]; do - else - sleep 0.1 - fi -- i=$(( $i + 1)) -+ i=$(($i + 1)) - done - --nbd-client $preopts "$nbdserver" $nbdport /dev/nbd0 $opts || exit 1 -- - # If we didn't get a root= on the command line, then we need to - # add the udev rules for mounting the nbd0 device --root=$(getarg root=) --if [ -z "$root" ] || strstr "$root" "nbd:" || strstr "$root" "dhcp"; then -- echo '[ -e /dev/root ] || { info=$(udevadm info --query=env --name=/dev/nbd0); [ -z "${info%%*ID_FS_TYPE*}" ] && { ln -s /dev/nbd0 /dev/root 2>/dev/null; type systemctl >/dev/null 2>&1 && systemctl --no-block start sysroot.mount;:; };} && rm $job;' \ -- > $hookdir/initqueue/settled/nbd.sh -- -+if [ -z "$root" -o -n "${root%%block:*}" -o "$root" = "block:/dev/root" ]; then -+ printf 'KERNEL=="nbd0", ENV{DEVTYPE}!="partition", ENV{ID_FS_TYPE}=="?*", SYMLINK+="root"\n' >> /etc/udev/rules.d/99-nbd-root.rules -+ udevadm control --reload - type write_fs_tab >/dev/null 2>&1 || . /lib/fs-lib.sh -- write_fs_tab /dev/nbd0 "$nbdfstype" "$fsopts" -+ write_fs_tab /dev/root "$nbdfstype" "$fsopts" -+ wait_for_dev /dev/root - -- printf '/bin/mount %s\n' \ -- "$NEWROOT" \ -- > $hookdir/mount/01-$$-nbd.sh -+ if [ -z "$DRACUT_SYSTEMD" ]; then -+ printf '/bin/mount %s\n' \ -+ "$NEWROOT" \ -+ > $hookdir/mount/01-$$-nbd.sh -+ fi - fi - -+nbd-client $preopts "$nbdserver" $nbdport /dev/nbd0 $opts || exit 1 -+ - # NBD doesn't emit uevents when it gets connected, so kick it - echo change > /sys/block/nbd0/uevent - udevadm settle diff --git a/0062-network-netroot.sh-do-not-unset-root.patch b/0062-network-netroot.sh-do-not-unset-root.patch deleted file mode 100644 index 4f9a4cc..0000000 --- a/0062-network-netroot.sh-do-not-unset-root.patch +++ /dev/null @@ -1,23 +0,0 @@ -From af2fcbafe8bdb30c34f440b76c37d535016d739f Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Tue, 19 Mar 2013 14:52:25 +0100 -Subject: [PATCH] network/netroot.sh: do not unset root - ---- - modules.d/40network/netroot.sh | 3 --- - 1 file changed, 3 deletions(-) - -diff --git a/modules.d/40network/netroot.sh b/modules.d/40network/netroot.sh -index 8c7716b..9c481a8 100755 ---- a/modules.d/40network/netroot.sh -+++ b/modules.d/40network/netroot.sh -@@ -24,9 +24,6 @@ netif=$1 - # handlers when this is not called from manually network bringing up. - if [ -z "$2" ]; then - if [ "$netroot" = "dhcp" ] || [ "$netroot" = "dhcp6" ] ; then -- # Unset root so we can check later -- unset root -- - # Load dhcp options - [ -e /tmp/dhclient.$netif.dhcpopts ] && . /tmp/dhclient.$netif.dhcpopts - diff --git a/0063-TEST-40-NBD-test.sh-kill_server-after-test_run.patch b/0063-TEST-40-NBD-test.sh-kill_server-after-test_run.patch deleted file mode 100644 index e783489..0000000 --- a/0063-TEST-40-NBD-test.sh-kill_server-after-test_run.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 57aa1e91400ff06022afe7175f5b4e97e813cf8d Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Tue, 19 Mar 2013 14:53:17 +0100 -Subject: [PATCH] TEST-40-NBD/test.sh: kill_server() after test_run() - ---- - test/TEST-40-NBD/test.sh | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/test/TEST-40-NBD/test.sh b/test/TEST-40-NBD/test.sh -index dae65f2..4feb557 100755 ---- a/test/TEST-40-NBD/test.sh -+++ b/test/TEST-40-NBD/test.sh -@@ -99,7 +99,8 @@ test_run() { - echo "Failed to start server" 1>&2 - return 1 - fi -- client_run || { kill_server; return 1; } -+ client_run -+ kill_server - } - - client_run() { diff --git a/0064-51-dracut-rescue-postinst.sh-add-extra-checks.patch b/0064-51-dracut-rescue-postinst.sh-add-extra-checks.patch deleted file mode 100644 index 9f060d1..0000000 --- a/0064-51-dracut-rescue-postinst.sh-add-extra-checks.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 619c1bb334ea28fb2f096640d6127b6bfb2a0c8b Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Tue, 19 Mar 2013 16:56:56 +0100 -Subject: [PATCH] 51-dracut-rescue-postinst.sh: add extra checks - ---- - 51-dracut-rescue-postinst.sh | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/51-dracut-rescue-postinst.sh b/51-dracut-rescue-postinst.sh -index 21208a4..d206496 100755 ---- a/51-dracut-rescue-postinst.sh -+++ b/51-dracut-rescue-postinst.sh -@@ -10,6 +10,9 @@ KERNEL_IMAGE="$2" - [[ -f /etc/os-release ]] && . /etc/os-release - [[ -f /etc/machine-id ]] && read MACHINE_ID < /etc/machine-id - -+[[ $MACHINE_ID ]] || exit 1 -+[[ -f $KERNEL_IMAGE ]] || exit 1 -+ - INITRDFILE="/boot/initramfs-${MACHINE_ID}-rescue.img" - [[ -f $INITRDFILE ]] && exit 0 - diff --git a/0065-51-dracut-rescue-postinst.sh-Rename-image-and-grub-e.patch b/0065-51-dracut-rescue-postinst.sh-Rename-image-and-grub-e.patch deleted file mode 100644 index d088eca..0000000 --- a/0065-51-dracut-rescue-postinst.sh-Rename-image-and-grub-e.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 967db700905e0f54a159152352116b995ec38737 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 20 Mar 2013 06:39:13 +0100 -Subject: [PATCH] 51-dracut-rescue-postinst.sh: Rename image and grub entry - -grub2-mkconfig ordered the rescue entries higher than the normal ones. - -https://bugzilla.redhat.com/show_bug.cgi?id=923439 ---- - 51-dracut-rescue-postinst.sh | 22 +++++++++++++--------- - 1 file changed, 13 insertions(+), 9 deletions(-) - -diff --git a/51-dracut-rescue-postinst.sh b/51-dracut-rescue-postinst.sh -index d206496..8b4e6c3 100755 ---- a/51-dracut-rescue-postinst.sh -+++ b/51-dracut-rescue-postinst.sh -@@ -13,8 +13,10 @@ KERNEL_IMAGE="$2" - [[ $MACHINE_ID ]] || exit 1 - [[ -f $KERNEL_IMAGE ]] || exit 1 - --INITRDFILE="/boot/initramfs-${MACHINE_ID}-rescue.img" --[[ -f $INITRDFILE ]] && exit 0 -+INITRDFILE="/boot/initramfs-0-rescue-${MACHINE_ID}.img" -+NEW_KERNEL_IMAGE="${KERNEL_IMAGE%/*}/vmlinuz-0-rescue-${MACHINE_ID}" -+ -+[[ -f $INITRDFILE ]] && [[ -f $NEW_KERNEL_IMAGE ]] && exit 0 - - dropindirs_sort() - { -@@ -46,15 +48,17 @@ done - - [[ $dracut_rescue_image != "yes" ]] && exit 0 - --dracut --no-hostonly -a "rescue" "$INITRDFILE" "$KERNEL_VERSION" --((ret+=$?)) -- --cp "$KERNEL_IMAGE" "${KERNEL_IMAGE%/*}/vmlinuz-${MACHINE_ID}-rescue" --((ret+=$?)) -+if [[ ! -f $INITRDFILE ]]; then -+ dracut --no-hostonly -a "rescue" "$INITRDFILE" "$KERNEL_VERSION" -+ ((ret+=$?)) -+fi - --KERNEL_IMAGE="${KERNEL_IMAGE%/*}/vmlinuz-${MACHINE_ID}-rescue" -+if [[ ! -f $NEW_KERNEL_IMAGE ]]; then -+ cp "$KERNEL_IMAGE" "$NEW_KERNEL_IMAGE" -+ ((ret+=$?)) -+fi - --new-kernel-pkg --install "$KERNEL_VERSION" --kernel-image "$KERNEL_IMAGE" --initrdfile "$INITRDFILE" --banner "$PRETTY_NAME Rescue" -+new-kernel-pkg --install "$KERNEL_VERSION" --kernel-image "$NEW_KERNEL_IMAGE" --initrdfile "$INITRDFILE" --banner "$NAME $VERSION_ID Rescue $MACHINE_ID" - - ((ret+=$?)) - diff --git a/0066-51-dracut-rescue-postinst.sh-51-dracut-rescue.instal.patch b/0066-51-dracut-rescue-postinst.sh-51-dracut-rescue.instal.patch deleted file mode 100644 index 3089c2d..0000000 --- a/0066-51-dracut-rescue-postinst.sh-51-dracut-rescue.instal.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 478aa7dac12fbbb01161a9bc78b70b8f7746fef9 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 20 Mar 2013 06:41:25 +0100 -Subject: [PATCH] 51-dracut-rescue-postinst.sh,51-dracut-rescue.install: use - systemd-machine-id-setup - -if /etc/machine-id is empty, use systemd-machine-id-setup ---- - 51-dracut-rescue-postinst.sh | 5 +++++ - 51-dracut-rescue.install | 6 ++++++ - 2 files changed, 11 insertions(+) - -diff --git a/51-dracut-rescue-postinst.sh b/51-dracut-rescue-postinst.sh -index 8b4e6c3..e290f1a 100755 ---- a/51-dracut-rescue-postinst.sh -+++ b/51-dracut-rescue-postinst.sh -@@ -8,6 +8,11 @@ KERNEL_VERSION="$1" - KERNEL_IMAGE="$2" - - [[ -f /etc/os-release ]] && . /etc/os-release -+ -+if [[ ! -f /etc/machine-id ]] || [[ ! -s /etc/machine-id ]]; then -+ systemd-machine-id-setup -+fi -+ - [[ -f /etc/machine-id ]] && read MACHINE_ID < /etc/machine-id - - [[ $MACHINE_ID ]] || exit 1 -diff --git a/51-dracut-rescue.install b/51-dracut-rescue.install -index 1c0a6e1..39d01a7 100755 ---- a/51-dracut-rescue.install -+++ b/51-dracut-rescue.install -@@ -31,7 +31,13 @@ dropindirs_sort() - } - - [[ -f /etc/os-release ]] && . /etc/os-release -+ -+if [[ ! -f /etc/machine-id ]] || [[ ! -s /etc/machine-id ]]; then -+ systemd-machine-id-setup -+fi -+ - [[ -f /etc/machine-id ]] && read MACHINE_ID < /etc/machine-id -+ - if [[ -f /etc/kernel/cmdline ]]; then - readarray -t BOOT_OPTIONS < /etc/kernel/cmdline - fi diff --git a/0067-dracut.sh-remove-temporary-cpio-output-in-trap.patch b/0067-dracut.sh-remove-temporary-cpio-output-in-trap.patch deleted file mode 100644 index c7b94a1..0000000 --- a/0067-dracut.sh-remove-temporary-cpio-output-in-trap.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 02566acdd7a3e371d413c30d7267fde2fb01c9cf Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 20 Mar 2013 07:07:55 +0100 -Subject: [PATCH] dracut.sh: remove temporary cpio output in trap - ---- - dracut.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/dracut.sh b/dracut.sh -index 69f5282..7728712 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -655,7 +655,7 @@ readonly initdir=$(mktemp --tmpdir="$TMPDIR/" -d -t initramfs.XXXXXX) - } - - # clean up after ourselves no matter how we die. --trap 'ret=$?;[[ $keep ]] && echo "Not removing $initdir." >&2 || { [[ $initdir ]] && rm -rf "$initdir";exit $ret; };' EXIT -+trap 'ret=$?;[[ $outfile ]] && [[ -f $outfile.$$ ]] && rm -f "$outfile.$$";[[ $keep ]] && echo "Not removing $initdir." >&2 || { [[ $initdir ]] && rm -rf "$initdir";exit $ret; };' EXIT - # clean up after ourselves no matter how we die. - trap 'exit 1;' SIGINT - diff --git a/0068-dracut.spec-use-pkg-config-for-bashcompletiondir.patch b/0068-dracut.spec-use-pkg-config-for-bashcompletiondir.patch deleted file mode 100644 index 606f8ae..0000000 --- a/0068-dracut.spec-use-pkg-config-for-bashcompletiondir.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 8c67d395d42b4e34c10418aa6c167122a72a951b Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 20 Mar 2013 07:15:04 +0100 -Subject: [PATCH] dracut.spec: use pkg-config for bashcompletiondir - ---- - dracut.spec | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/dracut.spec b/dracut.spec -index 445463f..cd61770 100644 ---- a/dracut.spec -+++ b/dracut.spec -@@ -34,6 +34,8 @@ BuildRequires: dash bash git - - %if 0%{?fedora} || 0%{?rhel} - BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -+BuildRequires: bash-completion -+BuildRequires: pkgconfig - %endif - %if 0%{?suse_version} - BuildRoot: %{_tmppath}/%{name}-%{version}-build -@@ -204,7 +206,8 @@ make install DESTDIR=$RPM_BUILD_ROOT \ - %if %{defined _unitdir} - systemdsystemunitdir=%{_unitdir} \ - %endif -- sysconfdir=/etc mandir=%{_mandir} -+ sysconfdir=/etc mandir=%{_mandir} \ -+ bashcompletiondir=$(pkg-config --variable=completionsdir bash-completion) - - echo "DRACUT_VERSION=%{version}-%{release}" > $RPM_BUILD_ROOT/%{dracutlibdir}/dracut-version.sh - diff --git a/0069-dracut.spec-use-configure.patch b/0069-dracut.spec-use-configure.patch deleted file mode 100644 index 2d17cca..0000000 --- a/0069-dracut.spec-use-configure.patch +++ /dev/null @@ -1,99 +0,0 @@ -From 1d4b3375431d2d19d511aa5784f2c1ed1e6bbb9e Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 20 Mar 2013 07:16:43 +0100 -Subject: [PATCH] dracut.spec: use configure - ---- - configure | 31 ++++++++++++++++++++++++++++--- - dracut.spec | 15 ++++++--------- - 2 files changed, 34 insertions(+), 12 deletions(-) - -diff --git a/configure b/configure -index 409256b..19b5e1f 100755 ---- a/configure -+++ b/configure -@@ -25,6 +25,7 @@ read_arg() { - # return 1 to indicate they should do it instead. - return 1 - fi -+ return 0 - } - - while (($# > 0)); do -@@ -36,18 +37,42 @@ while (($# > 0)); do - --sbindir) read_arg sbindir "$@" || shift;; - --mandir) read_arg mandir "$@" || shift;; - --disable-documentation) enable_documentation=no;; -+ --program-prefix) read_arg programprefix "$@" || shift;; -+ --exec-prefix) read_arg execprefix "$@" || shift;; -+ --bindir) read_arg bindir "$@" || shift;; -+ --includedir) read_arg includedir "$@" || shift;; -+ --libexecdir) read_arg libexecdir "$@" || shift;; -+ --localstatedir) read_arg localstatedir "$@" || shift;; -+ --sharedstatedir) read_arg sharedstatedir "$@" || shift;; -+ --infodir) read_arg infodir "$@" || shift;; -+ --systemdsystemunitdir) read_arg systemdsystemunitdir "$@" || shift;; -+ --bashcompletiondir) read_arg bashcompletiondir "$@" || shift;; - *) echo "Ignoring unknown option '$1'";; - esac - shift - done - --cat > Makefile.inc.tmp < Makefile.inc.$$ <> Makefile.inc.$$ -+ -+mv Makefile.inc.$$ Makefile.inc -diff --git a/dracut.spec b/dracut.spec -index cd61770..93d497e 100644 ---- a/dracut.spec -+++ b/dracut.spec -@@ -194,20 +194,17 @@ git am -p1 %{patches} - %endif - - %build --make all -+%configure --systemdsystemunitdir=%{_unitdir} --bashcompletiondir=$(pkg-config --variable=completionsdir bash-completion) --libdir=%{_prefix}/lib -+ -+make %{?_smp_mflags} - - %install - %if 0%{?fedora} || 0%{?rhel} - rm -rf $RPM_BUILD_ROOT - %endif --make install DESTDIR=$RPM_BUILD_ROOT \ -- libdir=%{_prefix}/lib \ -- bindir=%{_bindir} \ --%if %{defined _unitdir} -- systemdsystemunitdir=%{_unitdir} \ --%endif -- sysconfdir=/etc mandir=%{_mandir} \ -- bashcompletiondir=$(pkg-config --variable=completionsdir bash-completion) -+make %{?_smp_mflags} install \ -+ DESTDIR=$RPM_BUILD_ROOT \ -+ libdir=%{_prefix}/lib - - echo "DRACUT_VERSION=%{version}-%{release}" > $RPM_BUILD_ROOT/%{dracutlibdir}/dracut-version.sh - diff --git a/0070-dracut.sh-turn-off-host-only-mode-if-essential-syste.patch b/0070-dracut.sh-turn-off-host-only-mode-if-essential-syste.patch deleted file mode 100644 index 48a814d..0000000 --- a/0070-dracut.sh-turn-off-host-only-mode-if-essential-syste.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 5bfa3b363a35fb5586f015701832eab5544385bf Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 20 Mar 2013 10:22:41 +0100 -Subject: [PATCH] dracut.sh: turn off host-only mode, if essential system - filesystems not mounted - ---- - dracut.sh | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/dracut.sh b/dracut.sh -index 7728712..9afa694 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -781,6 +781,15 @@ fi - # Need to be able to have non-root users read stuff (rpcbind etc) - chmod 755 "$initdir" - -+if [[ $hostonly ]]; then -+ for i in /sys /proc /run /dev; do -+ if ! findmnt "$i" &>/dev/null; then -+ dwarning "Turning off host-only mode: '$i' is not mounted!" -+ unset hostonly -+ fi -+ done -+fi -+ - declare -A host_fs_types - - for line in "${fstab_lines[@]}"; do diff --git a/0071-dracut.sh-turn-off-hostonly-mode-if-udev-database-is.patch b/0071-dracut.sh-turn-off-hostonly-mode-if-udev-database-is.patch deleted file mode 100644 index 88d2ed9..0000000 --- a/0071-dracut.sh-turn-off-hostonly-mode-if-udev-database-is.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 78d1d4f86d8c8ad01cfa21be41852ee52db78bed Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 20 Mar 2013 10:25:23 +0100 -Subject: [PATCH] dracut.sh: turn off hostonly mode, if udev database is not - found - ---- - dracut.sh | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/dracut.sh b/dracut.sh -index 9afa694..0a87cca 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -788,6 +788,10 @@ if [[ $hostonly ]]; then - unset hostonly - fi - done -+ if ! [[ -d /run/udev/data ]]; then -+ dwarning "Turning off host-only mode: udev database not found!" -+ unset hostonly -+ fi - fi - - declare -A host_fs_types diff --git a/dracut.spec b/dracut.spec index ea4317e..4db4dac 100644 --- a/dracut.spec +++ b/dracut.spec @@ -10,7 +10,7 @@ Name: dracut Version: 027 -Release: 1%{?dist} +Release: 10.git20130405%{?dist} Summary: Initramfs generator using udev %if 0%{?fedora} || 0%{?rhel} @@ -29,6 +29,15 @@ URL: https://dracut.wiki.kernel.org/ # Source can be generated by # http://git.kernel.org/?p=boot/dracut/dracut.git;a=snapshot;h=%{version};sf=tgz Source0: http://www.kernel.org/pub/linux/utils/boot/dracut/dracut-%{version}.tar.bz2 +Patch1: 0001-dracut.spec-Require-systemd-199.patch +Patch2: 0002-base-init.sh-fix-version-output.patch +Patch3: 0003-base-dracut-lib.sh-add-dev_unit_name.patch +Patch4: 0004-crypt-parse-crypt.sh-create-udev-rule-for-systemd.patch +Patch5: 0005-base-dracut-lib.sh-wait_for_dev-cancel_wait_for_dev-.patch +Patch6: 0006-Add-missing-options-to-manpage-and-help-output.patch +Patch7: 0007-TEST-50-MULTINIC-fixup-test-suite.patch +Patch8: 0008-TESTSUITE-s-i6300esbwdt-i6300esb-ib700wdt-g.patch +Patch9: 0009-TEST-99-RPM-ignore-rescue-images.patch BuildRequires: dash bash git @@ -438,6 +447,9 @@ rm -rf $RPM_BUILD_ROOT %{dracutlibdir}/dracut.conf.d/02-norescue.conf %changelog +* Fri Apr 05 2013 Harald Hoyer 027-10.git20130405 +- fix crypto password timeout on the dracut side + * Tue Mar 26 2013 Harald Hoyer 027-1 - version 027