diff --git a/0063-Makefile-add-dependencies-for-dracut-install-generat.patch b/0063-Makefile-add-dependencies-for-dracut-install-generat.patch new file mode 100644 index 0000000..9d949de --- /dev/null +++ b/0063-Makefile-add-dependencies-for-dracut-install-generat.patch @@ -0,0 +1,38 @@ +From c9baff669d659998edb5d8269ef8e004aaad1d4a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Amadeusz=20=C5=BBo=C5=82nowski?= +Date: Fri, 27 Jul 2012 09:34:32 +0200 +Subject: [PATCH] Makefile: add dependencies for dracut-install (generated + with gcc -MM) + +--- + Makefile | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 28381df..cd15009 100644 +--- a/Makefile ++++ b/Makefile +@@ -41,6 +41,14 @@ DRACUT_INSTALL_OBJECTS = \ + install/log.o \ + install/util.o + ++# deps generated with gcc -MM ++install/dracut-install.o: install/dracut-install.c install/log.h install/macro.h \ ++ install/hashmap.h install/util.h ++install/hashmap.o: install/hashmap.c install/util.h install/macro.h install/log.h \ ++ install/hashmap.h ++install/log.o: install/log.c install/log.h install/macro.h install/util.h ++install/util.o: install/util.c install/util.h install/macro.h install/log.h ++ + install/dracut-install: $(DRACUT_INSTALL_OBJECTS) + + dracut-install: install/dracut-install +@@ -109,7 +117,7 @@ clean: + $(RM) */*/*~ + $(RM) test-*.img + $(RM) dracut-*.rpm dracut-*.tar.bz2 +- $(RM) $(DRACUT_INSTALL_BIN) install/dracut-install $(DRACUT_INSTALL_OBJECTS) ++ $(RM) dracut-install install/dracut-install $(DRACUT_INSTALL_OBJECTS) + $(RM) $(manpages) dracut.html + $(MAKE) -C test clean + diff --git a/0064-gitignore-install-dracut-install.patch b/0064-gitignore-install-dracut-install.patch new file mode 100644 index 0000000..9259799 --- /dev/null +++ b/0064-gitignore-install-dracut-install.patch @@ -0,0 +1,18 @@ +From fc6b272f4126164c93abafe0c8198d1b16eace3f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Amadeusz=20=C5=BBo=C5=82nowski?= +Date: Fri, 27 Jul 2012 09:34:17 +0200 +Subject: [PATCH] gitignore install/dracut-install + +--- + .gitignore | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/.gitignore b/.gitignore +index 3693783..44ede87 100644 +--- a/.gitignore ++++ b/.gitignore +@@ -11,3 +11,4 @@ test*.img + /.buildpath + /.project + /dracut-version.sh ++/install/dracut-install diff --git a/0065-cifs-parse-cifsroot.sh-do-not-unset-netroot-we-need-.patch b/0065-cifs-parse-cifsroot.sh-do-not-unset-netroot-we-need-.patch new file mode 100644 index 0000000..06536b3 --- /dev/null +++ b/0065-cifs-parse-cifsroot.sh-do-not-unset-netroot-we-need-.patch @@ -0,0 +1,22 @@ +From 82b1739dcee8853c07675d3e79b2f4623c60a364 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Fri, 27 Jul 2012 11:54:24 +0200 +Subject: [PATCH] cifs/parse-cifsroot.sh: do not unset netroot, we need it + +--- + modules.d/95cifs/parse-cifsroot.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/95cifs/parse-cifsroot.sh b/modules.d/95cifs/parse-cifsroot.sh +index d5adb98..de7637f 100755 +--- a/modules.d/95cifs/parse-cifsroot.sh ++++ b/modules.d/95cifs/parse-cifsroot.sh +@@ -35,7 +35,7 @@ fi + # Continue if cifs + case "${netroot%%:*}" in + cifs);; +- *) unset netroot; return;; ++ *) return;; + esac + + # Check required arguments diff --git a/0066-fixed-install-locations-for-udev-rules-and-change-to.patch b/0066-fixed-install-locations-for-udev-rules-and-change-to.patch new file mode 100644 index 0000000..f0faacb --- /dev/null +++ b/0066-fixed-install-locations-for-udev-rules-and-change-to.patch @@ -0,0 +1,148 @@ +From 24a38bc1cbe461c344ce61c7e10b6d51d5689c93 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Fri, 27 Jul 2012 11:55:31 +0200 +Subject: [PATCH] fixed install locations for udev rules and change to + IMPORT{builtin} + +--- + modules.d/90btrfs/module-setup.sh | 3 ++- + modules.d/90dmraid/module-setup.sh | 3 ++- + modules.d/90mdraid/module-setup.sh | 6 ++++-- + modules.d/90multipath/module-setup.sh | 5 +++-- + modules.d/95udev-rules/59-persistent-storage.rules | 8 ++++---- + modules.d/95udev-rules/61-persistent-storage.rules | 2 +- + modules.d/99base/module-setup.sh | 4 +++- + 7 files changed, 19 insertions(+), 12 deletions(-) + +diff --git a/modules.d/90btrfs/module-setup.sh b/modules.d/90btrfs/module-setup.sh +index 22f3f1c..d2e559f 100755 +--- a/modules.d/90btrfs/module-setup.sh ++++ b/modules.d/90btrfs/module-setup.sh +@@ -33,6 +33,7 @@ install() { + inst_rules "$moddir/80-btrfs.rules" + inst_script "$moddir/btrfs_finished.sh" /sbin/btrfs_finished + inst_script "$moddir/btrfs_timeout.sh" /sbin/btrfs_timeout +- dracut_install btrfs btrfsck ++ dracut_install btrfsck ++ inst $(command -v btrfs) /sbin/btrfs + } + +diff --git a/modules.d/90dmraid/module-setup.sh b/modules.d/90dmraid/module-setup.sh +index 10c732c..eb949dc 100755 +--- a/modules.d/90dmraid/module-setup.sh ++++ b/modules.d/90dmraid/module-setup.sh +@@ -52,7 +52,8 @@ depends() { + install() { + local _i + dracut_install dmraid +- dracut_install -o partx kpartx ++ dracut_install -o kpartx ++ inst $(command -v partx) /sbin/partx + + inst "$moddir/dmraid.sh" /sbin/dmraid_scan + +diff --git a/modules.d/90mdraid/module-setup.sh b/modules.d/90mdraid/module-setup.sh +index 7b3c759..8522756 100755 +--- a/modules.d/90mdraid/module-setup.sh ++++ b/modules.d/90mdraid/module-setup.sh +@@ -43,8 +43,10 @@ installkernel() { + } + + install() { +- dracut_install mdadm cat +- dracut_install -o mdmon partx ++ dracut_install cat ++ dracut_install -o mdmon ++ inst $(command -v partx) /sbin/partx ++ inst $(command -v mdadm) /sbin/mdadm + + # XXX: mdmon really needs to run as non-root? + # If so, write only the user it needs in the initrd's /etc/passwd (and maybe /etc/group) +diff --git a/modules.d/90multipath/module-setup.sh b/modules.d/90multipath/module-setup.sh +index f9c1f81..31d1108 100755 +--- a/modules.d/90multipath/module-setup.sh ++++ b/modules.d/90multipath/module-setup.sh +@@ -73,7 +73,6 @@ install() { + dracut_install -o \ + dmsetup \ + kpartx \ +- partx \ + mpath_wait \ + multipath \ + multipathd \ +@@ -83,10 +82,12 @@ install() { + /etc/multipath.conf \ + /etc/multipath/* + ++ inst $(command -v partx) /sbin/partx ++ + inst_libdir_file "libmultipath*" "multipath/*" + + inst_hook pre-trigger 02 "$moddir/multipathd.sh" + inst_hook cleanup 02 "$moddir/multipathd-stop.sh" +- inst_rules 40-multipath.rules 65-multipath.rules 66-kpartx.rules ++ inst_rules 40-multipath.rules 62-multipath.rules 65-multipath.rules 66-kpartx.rules + } + +diff --git a/modules.d/95udev-rules/59-persistent-storage.rules b/modules.d/95udev-rules/59-persistent-storage.rules +index 2b83e72..b7d069b 100644 +--- a/modules.d/95udev-rules/59-persistent-storage.rules ++++ b/modules.d/95udev-rules/59-persistent-storage.rules +@@ -1,8 +1,8 @@ + SUBSYSTEM!="block", GOTO="ps_end" + ACTION!="add|change", GOTO="ps_end" + +-KERNEL=="cciss[0-9]*", IMPORT{program}="/sbin/blkid -o udev -p $tempnode" +-KERNEL=="nbd[0-9]*", IMPORT{program}="/sbin/blkid -o udev -p $tempnode" ++KERNEL=="cciss[0-9]*", IMPORT{builtin}="blkid" ++KERNEL=="nbd[0-9]*", IMPORT{builtin}="blkid" + + + KERNEL!="md[0-9]*|md_d[0-9]*|md/*", KERNEL!="md*", GOTO="md_end" +@@ -19,7 +19,7 @@ ATTR{md/array_state}=="|clear|inactive", GOTO="md_end" + LABEL="md_ignore_state" + + IMPORT{program}="/sbin/mdadm --detail --export $tempnode" +-IMPORT{program}="/sbin/blkid -o udev -p $tempnode" ++IMPORT{builtin}="blkid" + OPTIONS+="link_priority=100" + OPTIONS+="watch" + LABEL="md_end" +@@ -32,7 +32,7 @@ ENV{DM_NAME}!="?*", GOTO="ps_end" + ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}=="1", GOTO="ps_end" + ENV{DM_UUID}=="CRYPT-TEMP-?*", GOTO="ps_end" + ENV{DM_UUID}!="?*", ENV{DM_NAME}=="temporary-cryptsetup-?*", GOTO="ps_end" +-IMPORT{program}="/sbin/blkid -o udev -p $tempnode" ++IMPORT{builtin}="blkid" + + + LABEL="ps_end" +diff --git a/modules.d/95udev-rules/61-persistent-storage.rules b/modules.d/95udev-rules/61-persistent-storage.rules +index 9cfdb0b..1136849 100644 +--- a/modules.d/95udev-rules/61-persistent-storage.rules ++++ b/modules.d/95udev-rules/61-persistent-storage.rules +@@ -10,7 +10,7 @@ GOTO="pss_end" + + LABEL="do_pss" + # by-path (parent device path) +-ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="", DEVPATH!="*/virtual/*", IMPORT{program}="path_id %p" ++ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="", DEVPATH!="*/virtual/*", IMPORT{builtin}="path_id" + ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}" + ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}-part%n" + +diff --git a/modules.d/99base/module-setup.sh b/modules.d/99base/module-setup.sh +index 097607a..22ab277 100755 +--- a/modules.d/99base/module-setup.sh ++++ b/modules.d/99base/module-setup.sh +@@ -13,8 +13,10 @@ depends() { + + install() { + local _d +- dracut_install mount mknod mkdir modprobe pidof sleep chroot \ ++ dracut_install mount mknod mkdir pidof sleep chroot \ + sed ls flock cp mv dmesg rm ln rmmod mkfifo umount readlink setsid ++ inst $(command -v modprobe) /sbin/modprobe ++ + dracut_install -o less + if [ ! -e "${initdir}/bin/sh" ]; then + dracut_install bash diff --git a/0067-README.testsuite-add-instructions-on-how-to-run-the-.patch b/0067-README.testsuite-add-instructions-on-how-to-run-the-.patch new file mode 100644 index 0000000..bdd68b1 --- /dev/null +++ b/0067-README.testsuite-add-instructions-on-how-to-run-the-.patch @@ -0,0 +1,36 @@ +From 2d674a93364d432fbf62988e2fb3e3eda9a3be8f Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Fri, 27 Jul 2012 12:12:09 +0200 +Subject: [PATCH] README.testsuite: add instructions on how to run the + testsuite + +--- + README.testsuite | 18 ++++++++++++++++++ + 1 file changed, 18 insertions(+) + +diff --git a/README.testsuite b/README.testsuite +index cbc2ab7..e463c41 100644 +--- a/README.testsuite ++++ b/README.testsuite +@@ -10,3 +10,21 @@ nbd + dhcp + iscsi-initiator-utils + TEST-04-FULL-SYSTEMD: systemd >= 187 ++ ++How to run the testsuite: ++ ++$ sudo make clean check ++ ++in verbose mode: ++$ sudo make V=1 clean check ++ ++only specific test: ++$ sudo make TESTS="01 20 40" clean check ++only runs the 01, 20 and 40 tests. ++ ++debug a specific test case: ++$ cd TEST-01-BASIC ++$ sudo make clean setup run ++... change some kernel parameters ... ++$ sudo make run ++to run the test without doing the setup diff --git a/0068-iscsi-iscsiroot.sh-force-link-initiatorname.patch b/0068-iscsi-iscsiroot.sh-force-link-initiatorname.patch new file mode 100644 index 0000000..ea6ad73 --- /dev/null +++ b/0068-iscsi-iscsiroot.sh-force-link-initiatorname.patch @@ -0,0 +1,22 @@ +From f7f37923900507c5149ef86f4d459089d7d5f5e0 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Fri, 27 Jul 2012 12:18:08 +0200 +Subject: [PATCH] iscsi/iscsiroot.sh: force link initiatorname + +--- + modules.d/95iscsi/iscsiroot.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh +index 92414ee..1a8cc8d 100755 +--- a/modules.d/95iscsi/iscsiroot.sh ++++ b/modules.d/95iscsi/iscsiroot.sh +@@ -128,7 +128,7 @@ handle_netroot() + fi + + echo "InitiatorName='$iscsi_initiator'" > /run/initiatorname.iscsi +- ln -s /run/initiatorname.iscsi /dev/.initiatorname.iscsi ++ ln -fs /run/initiatorname.iscsi /dev/.initiatorname.iscsi + + # FIXME $iscsi_protocol?? + diff --git a/0069-cifs-parse-cifsroot.sh-fixed-more-root-netroot-parsi.patch b/0069-cifs-parse-cifsroot.sh-fixed-more-root-netroot-parsi.patch new file mode 100644 index 0000000..87d188b --- /dev/null +++ b/0069-cifs-parse-cifsroot.sh-fixed-more-root-netroot-parsi.patch @@ -0,0 +1,49 @@ +From a7473ef379b03c79f40965fb4e332690bd346604 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Fri, 27 Jul 2012 12:40:55 +0200 +Subject: [PATCH] cifs/parse-cifsroot.sh: fixed more root/netroot parsing + +--- + modules.d/95cifs/parse-cifsroot.sh | 26 +++++++++++++------------- + 1 file changed, 13 insertions(+), 13 deletions(-) + +diff --git a/modules.d/95cifs/parse-cifsroot.sh b/modules.d/95cifs/parse-cifsroot.sh +index de7637f..f376b16 100755 +--- a/modules.d/95cifs/parse-cifsroot.sh ++++ b/modules.d/95cifs/parse-cifsroot.sh +@@ -21,22 +21,22 @@ type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh + [ -z "$root" ] && root=$(getarg root=) + [ -z "$netroot" ] && netroot=$(getarg netroot=) + +-# netroot= cmdline argument must be ignored, but must be used if +-# we're inside netroot to parse dhcp root-path +-if [ -n "$netroot" ] ; then +- if [ "$netroot" = "$(getarg netroot=)" ] ; then +- warn "Ignoring netroot argument for CIFS" +- netroot=$root ++# Root takes precedence over netroot ++if [ "${root%%:*}" = "cifs" ] ; then ++ ++ # Don't continue if root is ok ++ [ -n "$rootok" ] && return ++ ++ if [ -n "$netroot" ] ; then ++ warn "root takes precedence over netroot. Ignoring netroot" ++ + fi +-else +- netroot=$root; ++ netroot=$root ++ unset root + fi + +-# Continue if cifs +-case "${netroot%%:*}" in +- cifs);; +- *) return;; +-esac ++# If it's not cifs we don't continue ++[ "${netroot%%:*}" = "cifs" ] || return + + # Check required arguments + cifs_to_var $netroot diff --git a/0070-i18n-console_init.sh-skip-if-we-use-systemd-and-use-.patch b/0070-i18n-console_init.sh-skip-if-we-use-systemd-and-use-.patch new file mode 100644 index 0000000..d5109c2 --- /dev/null +++ b/0070-i18n-console_init.sh-skip-if-we-use-systemd-and-use-.patch @@ -0,0 +1,27 @@ +From 852105dc44d4bdfda8d988146f08f4a60bce979c Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Fri, 27 Jul 2012 14:11:22 +0200 +Subject: [PATCH] i18n/console_init.sh: skip, if we use systemd and use + systemd-vconsole-init + +--- + modules.d/10i18n/console_init.sh | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/modules.d/10i18n/console_init.sh b/modules.d/10i18n/console_init.sh +index 37efdd1..24eaad8 100755 +--- a/modules.d/10i18n/console_init.sh ++++ b/modules.d/10i18n/console_init.sh +@@ -2,7 +2,11 @@ + # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- + # ex: ts=8 sw=4 sts=4 et filetype=sh + +-[ -x /lib/systemd/systemd-vconsole-setup ] && exit 0 ++[ -x /lib/systemd/systemd ] && exit 0 ++ ++if [ -x /lib/systemd/systemd-vconsole-setup ]; then ++ /lib/systemd/systemd-vconsole-setup "$@" ++fi + + [ -e /etc/vconsole.conf ] && . /etc/vconsole.conf + diff --git a/0071-fixed-i18n-and-plymouth-for-systemd.patch b/0071-fixed-i18n-and-plymouth-for-systemd.patch new file mode 100644 index 0000000..0079258 --- /dev/null +++ b/0071-fixed-i18n-and-plymouth-for-systemd.patch @@ -0,0 +1,85 @@ +From 3e51b2f6fc9cca431815fb5561727c5ce9b4e148 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Fri, 27 Jul 2012 14:15:48 +0200 +Subject: [PATCH] fixed i18n and plymouth for systemd + +--- + modules.d/10i18n/parse-i18n.sh | 11 ++++------- + modules.d/50plymouth/plymouth-newroot.sh | 5 ++--- + modules.d/50plymouth/plymouth-pretrigger.sh | 28 ++++++++++++++-------------- + 3 files changed, 20 insertions(+), 24 deletions(-) + +diff --git a/modules.d/10i18n/parse-i18n.sh b/modules.d/10i18n/parse-i18n.sh +index 5530136..b353296 100755 +--- a/modules.d/10i18n/parse-i18n.sh ++++ b/modules.d/10i18n/parse-i18n.sh +@@ -35,10 +35,7 @@ if [ -f /etc/locale.conf ]; then + export LC_ALL + fi + +-# FIXME: fix systemd-vconsole-setup +-#if [ -x /lib/systemd/systemd-vconsole-setup ]; then +-# /lib/systemd/systemd-vconsole-setup +-# rm -f /{etc,lib}/udev/rules.d/10-console.rules +-# rm -f /lib/udev/console_init +-# ln -s /lib/systemd/systemd-vconsole-setup /lib/udev/console_init +-#fi ++if [ -x /lib/systemd/systemd ]; then ++ rm -f /{etc,lib}/udev/rules.d/10-console.rules ++ rm -f /lib/udev/console_init ++fi +diff --git a/modules.d/50plymouth/plymouth-newroot.sh b/modules.d/50plymouth/plymouth-newroot.sh +index ffbabf1..2ffc929 100755 +--- a/modules.d/50plymouth/plymouth-newroot.sh ++++ b/modules.d/50plymouth/plymouth-newroot.sh +@@ -2,6 +2,5 @@ + # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- + # ex: ts=8 sw=4 sts=4 et filetype=sh + +-if [ -x /bin/plymouth ! -x /lib/systemd/systemd ]; then +- /bin/plymouth --newroot=$NEWROOT +-fi ++[ -x /bin/plymouth ! -x /lib/systemd/systemd ] || exit 0 ++/bin/plymouth --newroot=$NEWROOT +diff --git a/modules.d/50plymouth/plymouth-pretrigger.sh b/modules.d/50plymouth/plymouth-pretrigger.sh +index c52cf83..b282069 100755 +--- a/modules.d/50plymouth/plymouth-pretrigger.sh ++++ b/modules.d/50plymouth/plymouth-pretrigger.sh +@@ -2,23 +2,23 @@ + # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- + # ex: ts=8 sw=4 sts=4 et filetype=sh + +-if [ -x /bin/plymouthd -a ! -x /lib/systemd/systemd ]; then +- if getargbool 1 plymouth.enable && getargbool 1 rd.plymouth -d -n rd_NO_PLYMOUTH; then ++[ -x /bin/plymouthd -a ! -x /lib/systemd/systemd ] || exit 0 ++ ++if getargbool 1 plymouth.enable && getargbool 1 rd.plymouth -d -n rd_NO_PLYMOUTH; then + # first trigger graphics subsystem +- udevadm trigger --action=add --attr-match=class=0x030000 >/dev/null 2>&1 ++ udevadm trigger --action=add --attr-match=class=0x030000 >/dev/null 2>&1 + # first trigger graphics and tty subsystem +- udevadm trigger --action=add --subsystem-match=graphics --subsystem-match=drm --subsystem-match=tty >/dev/null 2>&1 ++ udevadm trigger --action=add --subsystem-match=graphics --subsystem-match=drm --subsystem-match=tty >/dev/null 2>&1 + +- udevadm settle --timeout=30 2>&1 | vinfo ++ udevadm settle --timeout=30 2>&1 | vinfo + +- info "Starting plymouth daemon" +- mkdir -m 0755 /run/plymouth +- read consoledev rest < /sys/class/tty/console/active +- consoledev=${consoledev:-tty0} +- [ -x /lib/udev/console_init -a -e "/dev/$consoledev" ] && /lib/udev/console_init "/dev/$consoledev" +- [ -x /bin/plymouthd ] && /bin/plymouthd --attach-to-session --pid-file /run/plymouth/pid +- /bin/plymouth --show-splash 2>&1 | vinfo ++ info "Starting plymouth daemon" ++ mkdir -m 0755 /run/plymouth ++ read consoledev rest < /sys/class/tty/console/active ++ consoledev=${consoledev:-tty0} ++ [ -x /lib/udev/console_init -a -e "/dev/$consoledev" ] && /lib/udev/console_init "/dev/$consoledev" ++ [ -x /bin/plymouthd ] && /bin/plymouthd --attach-to-session --pid-file /run/plymouth/pid ++ /bin/plymouth --show-splash 2>&1 | vinfo + # reset tty after plymouth messed with it +- [ -x /lib/udev/console_init -a -e "/dev/$consoledev" ] && /lib/udev/console_init "/dev/$consoledev" +- fi ++ [ -x /lib/udev/console_init -a -e "/dev/$consoledev" ] && /lib/udev/console_init "/dev/$consoledev" + fi diff --git a/0072-add-af_packet-kernel-module-to-network-testsuite-tes.patch b/0072-add-af_packet-kernel-module-to-network-testsuite-tes.patch new file mode 100644 index 0000000..34f6064 --- /dev/null +++ b/0072-add-af_packet-kernel-module-to-network-testsuite-tes.patch @@ -0,0 +1,96 @@ +From 5d833a9f5bf16a5787b164b7a1f17f98cac13732 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Fri, 27 Jul 2012 15:11:01 +0200 +Subject: [PATCH] add "af_packet" kernel module to network testsuite tests + +--- + test/TEST-20-NFS/test.sh | 4 ++-- + test/TEST-30-ISCSI/test.sh | 4 ++-- + test/TEST-40-NBD/test.sh | 4 ++-- + test/TEST-50-MULTINIC/test.sh | 4 ++-- + 4 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/test/TEST-20-NFS/test.sh b/test/TEST-20-NFS/test.sh +index a44f6c0..c7ccc09 100755 +--- a/test/TEST-20-NFS/test.sh ++++ b/test/TEST-20-NFS/test.sh +@@ -336,14 +336,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 "piix ide-gd_mod ata_piix ext3 sd_mod e1000 ib700wdt" \ ++ -d "af_packet piix ide-gd_mod ata_piix ext3 sd_mod e1000 ib700wdt" \ + -f $TESTDIR/initramfs.server $KVERSION || return 1 + + # Make client's dracut image + $basedir/dracut.sh -l -i $TESTDIR/overlay / \ + -o "plymouth" \ + -a "debug watchdog" \ +- -d "piix ide-gd_mod ata_piix sd_mod e1000 nfs sunrpc ib700wdt" \ ++ -d "af_packet piix ide-gd_mod ata_piix sd_mod e1000 nfs sunrpc ib700wdt" \ + -f $TESTDIR/initramfs.testing $KVERSION || return 1 + } + +diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh +index 1b1924b..c3d2c39 100755 +--- a/test/TEST-30-ISCSI/test.sh ++++ b/test/TEST-30-ISCSI/test.sh +@@ -162,7 +162,7 @@ test_setup() { + sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ + -o "plymouth dmraid" \ + -a "debug" \ +- -d "piix ide-gd_mod ata_piix ext3 sd_mod" \ ++ -d "af_packet piix ide-gd_mod ata_piix ext3 sd_mod" \ + -f $TESTDIR/initramfs.testing $KVERSION || return 1 + + # Make server root +@@ -211,7 +211,7 @@ test_setup() { + # Make server's dracut image + $basedir/dracut.sh -l -i $TESTDIR/overlay / \ + -m "dash udev-rules base rootfs-block debug kernel-modules" \ +- -d "piix ide-gd_mod ata_piix ext3 sd_mod e1000" \ ++ -d "af_packet piix ide-gd_mod ata_piix ext3 sd_mod e1000" \ + -f $TESTDIR/initramfs.server $KVERSION || return 1 + + } +diff --git a/test/TEST-40-NBD/test.sh b/test/TEST-40-NBD/test.sh +index 94efb8a..99d930f 100755 +--- a/test/TEST-40-NBD/test.sh ++++ b/test/TEST-40-NBD/test.sh +@@ -333,13 +333,13 @@ test_setup() { + + sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ + -m "dash udev-rules rootfs-block base debug kernel-modules" \ +- -d "piix ide-gd_mod ata_piix ext2 ext3 sd_mod e1000" \ ++ -d "af_packet piix ide-gd_mod ata_piix ext2 ext3 sd_mod e1000" \ + -f $TESTDIR/initramfs.server $KVERSION || return 1 + + sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ + -o "plymouth" \ + -a "debug watchdog" \ +- -d "piix ide-gd_mod ata_piix ext2 ext3 sd_mod e1000 ib700wdt" \ ++ -d "af_packet piix ide-gd_mod ata_piix ext2 ext3 sd_mod e1000 ib700wdt" \ + -f $TESTDIR/initramfs.testing $KVERSION || return 1 + } + +diff --git a/test/TEST-50-MULTINIC/test.sh b/test/TEST-50-MULTINIC/test.sh +index 74f10d8..2125b8e 100755 +--- a/test/TEST-50-MULTINIC/test.sh ++++ b/test/TEST-50-MULTINIC/test.sh +@@ -246,14 +246,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 "piix ide-gd_mod ata_piix ext3 sd_mod e1000 ib700wdt" \ ++ -d "af_packet piix ide-gd_mod ata_piix ext3 sd_mod e1000 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 "piix sd_mod sr_mod ata_piix ide-gd_mod e1000 nfs sunrpc ib700wdt" \ ++ -d "af_packet piix sd_mod sr_mod ata_piix ide-gd_mod e1000 nfs sunrpc ib700wdt" \ + -f $TESTDIR/initramfs.testing $KVERSION || return 1 + } + diff --git a/0073-i18n-terminfo-module-setup.sh-fixed-cp-t-calls.patch b/0073-i18n-terminfo-module-setup.sh-fixed-cp-t-calls.patch new file mode 100644 index 0000000..2ec5248 --- /dev/null +++ b/0073-i18n-terminfo-module-setup.sh-fixed-cp-t-calls.patch @@ -0,0 +1,35 @@ +From 95a5b23a388a2e49dee10283727e6dded8f1c9c2 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Fri, 27 Jul 2012 15:34:54 +0200 +Subject: [PATCH] i18n,terminfo/module-setup.sh: fixed "cp -t" calls + +--- + modules.d/10i18n/module-setup.sh | 2 +- + modules.d/95terminfo/module-setup.sh | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/modules.d/10i18n/module-setup.sh b/modules.d/10i18n/module-setup.sh +index a1cf1c8..cf5ad96 100755 +--- a/modules.d/10i18n/module-setup.sh ++++ b/modules.d/10i18n/module-setup.sh +@@ -96,7 +96,7 @@ install() { + + for _src in $(eval echo ${kbddir}/{${KBDSUBDIRS}}); do + inst_dir "$_src" +- cp --reflink=auto --sparse=auto -prfL -t "${initdir}/${_src%/*}" "$_src" ++ cp --reflink=auto --sparse=auto -prfL -t "${initdir}/${_src}" "$_src"/* + done + + # remove unnecessary files +diff --git a/modules.d/95terminfo/module-setup.sh b/modules.d/95terminfo/module-setup.sh +index e1914a5..5e5c269 100755 +--- a/modules.d/95terminfo/module-setup.sh ++++ b/modules.d/95terminfo/module-setup.sh +@@ -11,6 +11,6 @@ install() { + + if [ -d ${_terminfodir} ]; then + inst_dir "$_terminfodir" +- cp --reflink=auto --sparse=auto -prfL -t "${initdir}/${_terminfodir%/*}" "$_terminfodir" ++ cp --reflink=auto --sparse=auto -prfL -t "${initdir}/${_terminfodir}" "$_terminfodir"/* + fi + } diff --git a/0074-TODO-update.patch b/0074-TODO-update.patch new file mode 100644 index 0000000..7acdf0b --- /dev/null +++ b/0074-TODO-update.patch @@ -0,0 +1,21 @@ +From 764eb40cc933d111ad99d74d61e9203f20051e81 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Fri, 27 Jul 2012 16:03:25 +0200 +Subject: [PATCH] TODO: update + +--- + TODO | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/TODO b/TODO +index 61be5d5..d74577f 100644 +--- a/TODO ++++ b/TODO +@@ -6,6 +6,7 @@ Items are ordered in priority. + + INITRAMFS TODO + ++- use systemd crypto passwd mechanisms + - add sosreport + - generate systemd unit dracut-initramfs-restore in /run/systemd dynamically + - put "root=" parsing hooks in separate hook dir diff --git a/0075-kernel-modules-module-setup.sh-move-drivers-filesyst.patch b/0075-kernel-modules-module-setup.sh-move-drivers-filesyst.patch new file mode 100644 index 0000000..bc1de8b --- /dev/null +++ b/0075-kernel-modules-module-setup.sh-move-drivers-filesyst.patch @@ -0,0 +1,68 @@ +From aec9f902f009bf7b13fe2ca679f95439c035c32a Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Fri, 27 Jul 2012 16:03:42 +0200 +Subject: [PATCH] kernel-modules/module-setup.sh: move "$drivers" + "$filesystems" and "$add_drivers" to dracut.sh + +--- + dracut.sh | 16 ++++++++++++++-- + modules.d/90kernel-modules/module-setup.sh | 11 ----------- + 2 files changed, 14 insertions(+), 13 deletions(-) + +diff --git a/dracut.sh b/dracut.sh +index eee829e..4be4306 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -780,9 +780,9 @@ if ! [[ -d "$systemdutildir" ]]; then + fi + [[ -d "$systemdsystemunitdir" ]] || systemdsystemunitdir=${systemdutildir}/system + +-export initdir dracutbasedir dracutmodules drivers \ ++export initdir dracutbasedir dracutmodules \ + fw_dir drivers_dir debug no_kernel kernel_only \ +- add_drivers omit_drivers mdadmconf lvmconf filesystems \ ++ omit_drivers mdadmconf lvmconf \ + use_fstab fstab_lines libdirs fscks nofscks ro_mnt \ + stdloglvl sysloglvl fileloglvl kmsgloglvl logfile \ + debug host_fs_types host_devs sshkey add_fstab \ +@@ -898,6 +898,18 @@ dinfo "*** Including modules done ***" + + ## final stuff that has to happen + if [[ $no_kernel != yes ]]; then ++ ++ if [[ $drivers ]]; then ++ hostonly='' instmods $drivers ++ fi ++ ++ if [[ $add_drivers ]]; then ++ hostonly='' instmods -c $add_drivers ++ fi ++ if [[ $filesystems ]]; then ++ hostonly='' instmods -c $filesystems ++ fi ++ + dinfo "*** Installing kernel module dependencies and firmware ***" + dracut_kernel_post + dinfo "*** Installing kernel module dependencies and firmware done ***" +diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh +index 5018dc1..47e2f0d 100755 +--- a/modules.d/90kernel-modules/module-setup.sh ++++ b/modules.d/90kernel-modules/module-setup.sh +@@ -61,17 +61,6 @@ installkernel() { + } + for_each_host_dev_fs inst_fs + fi +- else +- hostonly='' instmods $drivers +- fi +- +- if [[ $add_drivers ]]; then +- hostonly='' instmods -c $add_drivers || return 1 +- fi +- if [[ $filesystems ]]; then +- hostonly='' instmods -c $filesystems || return 1 +- fi +- + } + + install() { diff --git a/0076-dracut.sh-put-drivers-and-filesystems-back-in-export.patch b/0076-dracut.sh-put-drivers-and-filesystems-back-in-export.patch new file mode 100644 index 0000000..96c445c --- /dev/null +++ b/0076-dracut.sh-put-drivers-and-filesystems-back-in-export.patch @@ -0,0 +1,22 @@ +From 3e964eeb9674119d7c08ae0b1aaee76391a2ba93 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Fri, 27 Jul 2012 16:06:36 +0200 +Subject: [PATCH] dracut.sh: put $drivers and $filesystems back in export + +--- + dracut.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dracut.sh b/dracut.sh +index 4be4306..1bbec3d 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -787,7 +787,7 @@ export initdir dracutbasedir dracutmodules \ + stdloglvl sysloglvl fileloglvl kmsgloglvl logfile \ + debug host_fs_types host_devs sshkey add_fstab \ + DRACUT_VERSION udevdir systemdutildir systemdsystemunitdir \ +- prefix ++ prefix filesystems drivers + + # Create some directory structure first + [[ $prefix ]] && mkdir -m 0755 -p "${initdir}${prefix}" diff --git a/0077-add-comment-for-getargbool.patch b/0077-add-comment-for-getargbool.patch new file mode 100644 index 0000000..e03f80b --- /dev/null +++ b/0077-add-comment-for-getargbool.patch @@ -0,0 +1,28 @@ +From 7e2285a48ac3d86a06a2d94d6c46fcf7011c7dfd Mon Sep 17 00:00:00 2001 +From: Will Woods +Date: Fri, 27 Jul 2012 13:12:28 -0400 +Subject: [PATCH] add comment for getargbool() + +I always forget how getargbool works. Add a comment documenting it. +--- + modules.d/99base/dracut-lib.sh | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh +index 2eb1224..3a7be9a 100755 +--- a/modules.d/99base/dracut-lib.sh ++++ b/modules.d/99base/dracut-lib.sh +@@ -145,6 +145,13 @@ getarg() { + return 1 + } + ++# getargbool ++# False if "getarg " returns "0", "no", or "off". ++# True if getarg returns any other non-empty string. ++# If not found, assumes - usually 0 for false, 1 for true. ++# example: getargbool 0 rd.info ++# true: rd.info, rd.info=1, rd.info=xxx ++# false: rd.info=0, rd.info=off, rd.info not present (default val is 0) + getargbool() { + local _b + unset _b diff --git a/0078-dracut-lib-add-find_mount-use-it-to-implement-ismoun.patch b/0078-dracut-lib-add-find_mount-use-it-to-implement-ismoun.patch new file mode 100644 index 0000000..480df78 --- /dev/null +++ b/0078-dracut-lib-add-find_mount-use-it-to-implement-ismoun.patch @@ -0,0 +1,41 @@ +From a5f01bbfb5374bd6c136a3d34bad021bf20b27ab Mon Sep 17 00:00:00 2001 +From: Will Woods +Date: Fri, 27 Jul 2012 13:12:29 -0400 +Subject: [PATCH] dracut-lib: add find_mount, use it to implement ismounted + +find_mount is really the same thing as ismounted with two additions: + + 1) uses "readlink" so "ismounted /dev/disk/by-label/LABEL" works + 2) returns the mountpoint of the device + +And ismounted is now just "find_mount $dev >/dev/null". +--- + modules.d/99base/dracut-lib.sh | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) + +diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh +index 3a7be9a..813cead 100755 +--- a/modules.d/99base/dracut-lib.sh ++++ b/modules.d/99base/dracut-lib.sh +@@ -452,13 +452,18 @@ udevproperty() { + fi + } + +-ismounted() { +- while read a m a; do +- [ "$m" = "$1" ] && return 0 ++find_mount() { ++ local dev mnt etc wanted_dev="$(readlink -e -q $1)" ++ while read dev mnt etc; do ++ [ "$dev" = "$wanted_dev" ] && echo "$dev" && return 0 + done < /proc/mounts + return 1 + } + ++ismounted() { ++ find_mount "$1" > /dev/null ++} ++ + wait_for_if_up() { + local cnt=0 + local li diff --git a/0079-dracut-functions-_x-should-exist-no-need-to-test.patch b/0079-dracut-functions-_x-should-exist-no-need-to-test.patch new file mode 100644 index 0000000..a898473 --- /dev/null +++ b/0079-dracut-functions-_x-should-exist-no-need-to-test.patch @@ -0,0 +1,22 @@ +From b2d225a6698607bbcb73b6e6d12fbfc5be014102 Mon Sep 17 00:00:00 2001 +From: Chao Wang +Date: Mon, 30 Jul 2012 11:56:29 +0800 +Subject: [PATCH] dracut-functions: $_x should exist, no need to test. + +Signed-off-by: Chao Wang +--- + dracut-functions.sh | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/dracut-functions.sh b/dracut-functions.sh +index 9242204..04b4c7a 100755 +--- a/dracut-functions.sh ++++ b/dracut-functions.sh +@@ -423,7 +423,6 @@ check_block_and_slaves() { + fi + [[ -d /sys/dev/block/$2/slaves ]] || return 1 + for _x in /sys/dev/block/$2/slaves/*/dev; do +- [[ -f $_x ]] || continue + check_block_and_slaves $1 $(cat "$_x") && return 0 + done + return 1 diff --git a/0080-dracut.sh-test-if-we-can-lazy-resolve-with-ldd.patch b/0080-dracut.sh-test-if-we-can-lazy-resolve-with-ldd.patch new file mode 100644 index 0000000..1a6653c --- /dev/null +++ b/0080-dracut.sh-test-if-we-can-lazy-resolve-with-ldd.patch @@ -0,0 +1,33 @@ +From bfd2e8c25ffc68bb98ca62049d709f378ac2ff1d Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 30 Jul 2012 13:02:41 +0200 +Subject: [PATCH] dracut.sh: test if we can lazy resolve with ldd + +--- + dracut.sh | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/dracut.sh b/dracut.sh +index 1bbec3d..46f3a5b 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -600,11 +600,18 @@ else + exit 1 + fi + ++inst /bin/sh ++if ! $DRACUT_INSTALL ${initdir+-D "$initdir"} -R "$initdir/bin/sh" &>/dev/null; then ++ unset DRACUT_RESOLVE_LAZY ++ export DRACUT_RESOLVE_DEPS=1 ++fi ++rm -fr ${initdir}/* ++ + if [[ -f $dracutbasedir/dracut-version.sh ]]; then + . $dracutbasedir/dracut-version.sh + fi + +-# Verify bash version, curret minimum is 3.1 ++# Verify bash version, current minimum is 3.1 + if (( ${BASH_VERSINFO[0]} < 3 || + ( ${BASH_VERSINFO[0]} == 3 && ${BASH_VERSINFO[1]} < 1 ) )); then + dfatal 'You need at least Bash 3.1 to use dracut, sorry.' diff --git a/0081-plymouth-plymouth-newroot.sh-fixed-pre-pivot-hook.patch b/0081-plymouth-plymouth-newroot.sh-fixed-pre-pivot-hook.patch new file mode 100644 index 0000000..9cc96cf --- /dev/null +++ b/0081-plymouth-plymouth-newroot.sh-fixed-pre-pivot-hook.patch @@ -0,0 +1,20 @@ +From 171ba532bc93951bb06c8bc1acdc80718dc306e4 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 30 Jul 2012 13:39:37 +0200 +Subject: [PATCH] plymouth/plymouth-newroot.sh: fixed pre-pivot hook + +--- + modules.d/50plymouth/plymouth-newroot.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/50plymouth/plymouth-newroot.sh b/modules.d/50plymouth/plymouth-newroot.sh +index 2ffc929..c5f1e56 100755 +--- a/modules.d/50plymouth/plymouth-newroot.sh ++++ b/modules.d/50plymouth/plymouth-newroot.sh +@@ -2,5 +2,5 @@ + # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- + # ex: ts=8 sw=4 sts=4 et filetype=sh + +-[ -x /bin/plymouth ! -x /lib/systemd/systemd ] || exit 0 ++[ -x /bin/plymouth -a ! -x /lib/systemd/systemd ] || exit 0 + /bin/plymouth --newroot=$NEWROOT diff --git a/0082-dracut.spec-add-Requires-kbd-kbd-misc.patch b/0082-dracut.spec-add-Requires-kbd-kbd-misc.patch new file mode 100644 index 0000000..f22a480 --- /dev/null +++ b/0082-dracut.spec-add-Requires-kbd-kbd-misc.patch @@ -0,0 +1,21 @@ +From 4976edb1a670d588cfb7d9bd88ad687151489650 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 30 Jul 2012 13:58:58 +0200 +Subject: [PATCH] dracut.spec: add Requires: kbd kbd-misc + +--- + dracut.spec | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/dracut.spec b/dracut.spec +index f225bb6..573c3c8 100644 +--- a/dracut.spec ++++ b/dracut.spec +@@ -83,6 +83,7 @@ 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 < 187 diff --git a/0083-set-DRACUT_SYSTEMD-for-systemd-mode-in-the-initramfs.patch b/0083-set-DRACUT_SYSTEMD-for-systemd-mode-in-the-initramfs.patch new file mode 100644 index 0000000..6d61bb1 --- /dev/null +++ b/0083-set-DRACUT_SYSTEMD-for-systemd-mode-in-the-initramfs.patch @@ -0,0 +1,159 @@ +From aefea76cf85a19781447880d2a82e4da3a25d068 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 30 Jul 2012 14:35:26 +0200 +Subject: [PATCH] set DRACUT_SYSTEMD for systemd mode in the initramfs + +--- + modules.d/10i18n/console_init.sh | 2 +- + modules.d/10i18n/parse-i18n.sh | 2 +- + modules.d/50plymouth/plymouth-newroot.sh | 2 +- + modules.d/50plymouth/plymouth-pretrigger.sh | 2 +- + modules.d/90crypt/parse-crypt.sh | 3 +++ + modules.d/98systemd/dracut-cmdline.sh | 3 ++- + modules.d/98systemd/dracut-initqueue.sh | 1 + + modules.d/98systemd/dracut-pre-pivot.sh | 1 + + modules.d/98systemd/dracut-pre-trigger.sh | 1 + + modules.d/98systemd/dracut-pre-udev.sh | 2 +- + modules.d/99base/dracut-lib.sh | 2 +- + 11 files changed, 14 insertions(+), 7 deletions(-) + +diff --git a/modules.d/10i18n/console_init.sh b/modules.d/10i18n/console_init.sh +index 24eaad8..8817f95 100755 +--- a/modules.d/10i18n/console_init.sh ++++ b/modules.d/10i18n/console_init.sh +@@ -2,7 +2,7 @@ + # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- + # ex: ts=8 sw=4 sts=4 et filetype=sh + +-[ -x /lib/systemd/systemd ] && exit 0 ++[ -n "$DRACUT_SYSTEMD" ] && exit 0 + + if [ -x /lib/systemd/systemd-vconsole-setup ]; then + /lib/systemd/systemd-vconsole-setup "$@" +diff --git a/modules.d/10i18n/parse-i18n.sh b/modules.d/10i18n/parse-i18n.sh +index b353296..90152cf 100755 +--- a/modules.d/10i18n/parse-i18n.sh ++++ b/modules.d/10i18n/parse-i18n.sh +@@ -35,7 +35,7 @@ if [ -f /etc/locale.conf ]; then + export LC_ALL + fi + +-if [ -x /lib/systemd/systemd ]; then ++if [ -n "$DRACUT_SYSTEMD" ]; then + rm -f /{etc,lib}/udev/rules.d/10-console.rules + rm -f /lib/udev/console_init + fi +diff --git a/modules.d/50plymouth/plymouth-newroot.sh b/modules.d/50plymouth/plymouth-newroot.sh +index c5f1e56..58ac11f 100755 +--- a/modules.d/50plymouth/plymouth-newroot.sh ++++ b/modules.d/50plymouth/plymouth-newroot.sh +@@ -2,5 +2,5 @@ + # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- + # ex: ts=8 sw=4 sts=4 et filetype=sh + +-[ -x /bin/plymouth -a ! -x /lib/systemd/systemd ] || exit 0 ++[ -x /bin/plymouth -a -z "$DRACUT_SYSTEMD" ] || exit 0 + /bin/plymouth --newroot=$NEWROOT +diff --git a/modules.d/50plymouth/plymouth-pretrigger.sh b/modules.d/50plymouth/plymouth-pretrigger.sh +index b282069..e536564 100755 +--- a/modules.d/50plymouth/plymouth-pretrigger.sh ++++ b/modules.d/50plymouth/plymouth-pretrigger.sh +@@ -2,7 +2,7 @@ + # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- + # ex: ts=8 sw=4 sts=4 et filetype=sh + +-[ -x /bin/plymouthd -a ! -x /lib/systemd/systemd ] || exit 0 ++[ -x /bin/plymouthd -a ! -n "$DRACUT_SYSTEMD" ] || exit 0 + + if getargbool 1 plymouth.enable && getargbool 1 rd.plymouth -d -n rd_NO_PLYMOUTH; then + # first trigger graphics subsystem +diff --git a/modules.d/90crypt/parse-crypt.sh b/modules.d/90crypt/parse-crypt.sh +index a2b157f..e20e6e0 100755 +--- a/modules.d/90crypt/parse-crypt.sh ++++ b/modules.d/90crypt/parse-crypt.sh +@@ -1,6 +1,9 @@ + #!/bin/sh + # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- + # ex: ts=8 sw=4 sts=4 et filetype=sh ++ ++[ -n "$DRACUT_SYSTEMD" ] && exit 0 ++ + if ! getargbool 1 rd.luks -d -n rd_NO_LUKS; then + info "rd.luks=0: removing cryptoluks activation" + rm -f /etc/udev/rules.d/70-luks.rules +diff --git a/modules.d/98systemd/dracut-cmdline.sh b/modules.d/98systemd/dracut-cmdline.sh +index 927b99a..a366381 100755 +--- a/modules.d/98systemd/dracut-cmdline.sh ++++ b/modules.d/98systemd/dracut-cmdline.sh +@@ -2,7 +2,8 @@ + # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- + # ex: ts=8 sw=4 sts=4 et filetype=sh + +-NEWROOT="/sysroot" ++export DRACUT_SYSTEMD=1 ++export NEWROOT="/sysroot" + [ -d $NEWROOT ] || mkdir -p -m 0755 $NEWROOT + [ -d /run/initramfs ] || mkdir -p -m 0755 /run/initramfs + [ -d /run/lock ] || mkdir -p -m 0755 /run/lock +diff --git a/modules.d/98systemd/dracut-initqueue.sh b/modules.d/98systemd/dracut-initqueue.sh +index 112d2a8..1ee6be1 100755 +--- a/modules.d/98systemd/dracut-initqueue.sh ++++ b/modules.d/98systemd/dracut-initqueue.sh +@@ -2,6 +2,7 @@ + # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- + # ex: ts=8 sw=4 sts=4 et filetype=sh + ++export DRACUT_SYSTEMD=1 + if [ -f /dracut-state.sh ]; then + . /dracut-state.sh 2>/dev/null + fi +diff --git a/modules.d/98systemd/dracut-pre-pivot.sh b/modules.d/98systemd/dracut-pre-pivot.sh +index 3fd7957..1ffa6aa 100755 +--- a/modules.d/98systemd/dracut-pre-pivot.sh ++++ b/modules.d/98systemd/dracut-pre-pivot.sh +@@ -2,6 +2,7 @@ + # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- + # ex: ts=8 sw=4 sts=4 et filetype=sh + ++export DRACUT_SYSTEMD=1 + if [ -f /dracut-state.sh ]; then + . /dracut-state.sh 2>/dev/null + fi +diff --git a/modules.d/98systemd/dracut-pre-trigger.sh b/modules.d/98systemd/dracut-pre-trigger.sh +index 9850124..20a3f64 100755 +--- a/modules.d/98systemd/dracut-pre-trigger.sh ++++ b/modules.d/98systemd/dracut-pre-trigger.sh +@@ -2,6 +2,7 @@ + # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- + # ex: ts=8 sw=4 sts=4 et filetype=sh + ++export DRACUT_SYSTEMD=1 + if [ -f /dracut-state.sh ]; then + . /dracut-state.sh 2>/dev/null + fi +diff --git a/modules.d/98systemd/dracut-pre-udev.sh b/modules.d/98systemd/dracut-pre-udev.sh +index 2566ab9..9a4dc61 100755 +--- a/modules.d/98systemd/dracut-pre-udev.sh ++++ b/modules.d/98systemd/dracut-pre-udev.sh +@@ -1,7 +1,7 @@ + #!/bin/sh + # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- + # ex: ts=8 sw=4 sts=4 et filetype=sh +- ++export DRACUT_SYSTEMD=1 + if [ -f /dracut-state.sh ]; then + . /dracut-state.sh 2>/dev/null + fi +diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh +index 813cead..b4ef59a 100755 +--- a/modules.d/99base/dracut-lib.sh ++++ b/modules.d/99base/dracut-lib.sh +@@ -358,7 +358,7 @@ check_quiet() { + fi + } + +-if [ ! -x /lib/systemd/systemd ]; then ++if [ -z "$DRACUT_SYSTEMD" ]; then + + warn() { + check_quiet diff --git a/0084-kernel-modules-module-setup.sh-add-missing-fi.patch b/0084-kernel-modules-module-setup.sh-add-missing-fi.patch new file mode 100644 index 0000000..2d426e7 --- /dev/null +++ b/0084-kernel-modules-module-setup.sh-add-missing-fi.patch @@ -0,0 +1,21 @@ +From 343b7d7488e7e91a91a0056c4dde2bb57ea203a0 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 30 Jul 2012 14:50:14 +0200 +Subject: [PATCH] kernel-modules/module-setup.sh: add missing "fi" + +--- + 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 47e2f0d..4e75ef8 100755 +--- a/modules.d/90kernel-modules/module-setup.sh ++++ b/modules.d/90kernel-modules/module-setup.sh +@@ -61,6 +61,7 @@ installkernel() { + } + for_each_host_dev_fs inst_fs + fi ++ fi + } + + install() { diff --git a/0085-dracut-functions.sh-inst_hook-with-0-9-name.patch b/0085-dracut-functions.sh-inst_hook-with-0-9-name.patch new file mode 100644 index 0000000..ba27670 --- /dev/null +++ b/0085-dracut-functions.sh-inst_hook-with-0-9-name.patch @@ -0,0 +1,22 @@ +From 5a84ac3fe36e706c88f7231fe3e4e1d2b11359e3 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 30 Jul 2012 17:00:27 +0200 +Subject: [PATCH] dracut-functions.sh: inst_hook() with [0-9]- + +--- + dracut-functions.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dracut-functions.sh b/dracut-functions.sh +index 04b4c7a..a299bbb 100755 +--- a/dracut-functions.sh ++++ b/dracut-functions.sh +@@ -837,7 +837,7 @@ inst_hook() { + dfatal "No such hook type $1. Aborting initrd creation." + exit 1 + fi +- inst_simple "$3" "/lib/dracut/hooks/${1}/${2}${3##*/}" ++ inst_simple "$3" "/lib/dracut/hooks/${1}/${2}-${3##*/}" + } + + # install any of listed files diff --git a/0086-i18n-parse-i18n.sh-remove-udev-rules.patch b/0086-i18n-parse-i18n.sh-remove-udev-rules.patch new file mode 100644 index 0000000..d24f426 --- /dev/null +++ b/0086-i18n-parse-i18n.sh-remove-udev-rules.patch @@ -0,0 +1,22 @@ +From d782ffb8224cccd87ab5e1f314f011c5bb760f34 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 30 Jul 2012 17:01:08 +0200 +Subject: [PATCH] i18n/parse-i18n.sh: remove udev rules + +--- + modules.d/10i18n/parse-i18n.sh | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/modules.d/10i18n/parse-i18n.sh b/modules.d/10i18n/parse-i18n.sh +index 90152cf..3aa8d70 100755 +--- a/modules.d/10i18n/parse-i18n.sh ++++ b/modules.d/10i18n/parse-i18n.sh +@@ -36,6 +36,7 @@ if [ -f /etc/locale.conf ]; then + fi + + if [ -n "$DRACUT_SYSTEMD" ]; then +- rm -f /{etc,lib}/udev/rules.d/10-console.rules ++ rm -f /etc/udev/rules.d/10-console.rules ++ rm -f /lib/udev/rules.d/10-console.rules + rm -f /lib/udev/console_init + fi diff --git a/0087-base-dracut-lib.sh-fixed-ismounted-mountpoint.patch b/0087-base-dracut-lib.sh-fixed-ismounted-mountpoint.patch new file mode 100644 index 0000000..8457890 --- /dev/null +++ b/0087-base-dracut-lib.sh-fixed-ismounted-mountpoint.patch @@ -0,0 +1,42 @@ +From 27790828d1d96eee7c77ac47047f0d57bb6c0f94 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 30 Jul 2012 17:04:55 +0200 +Subject: [PATCH] base/dracut-lib.sh: fixed ismounted() + +--- + modules.d/99base/dracut-lib.sh | 15 +++++++++++++-- + 1 file changed, 13 insertions(+), 2 deletions(-) + +diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh +index b4ef59a..b638bd6 100755 +--- a/modules.d/99base/dracut-lib.sh ++++ b/modules.d/99base/dracut-lib.sh +@@ -453,15 +453,26 @@ udevproperty() { + } + + find_mount() { +- local dev mnt etc wanted_dev="$(readlink -e -q $1)" ++ local dev mnt etc wanted_dev ++ wanted_dev="$(readlink -e -q $1)" + while read dev mnt etc; do + [ "$dev" = "$wanted_dev" ] && echo "$dev" && return 0 + done < /proc/mounts + return 1 + } + ++# usage: ismounted ++# usage: ismounted /dev/ + ismounted() { +- find_mount "$1" > /dev/null ++ if str_starts "$1" "/dev"; then ++ find_mount "$1" > /dev/null && return 0 ++ return 1 ++ fi ++ ++ while read a m a; do ++ [ "$m" = "$1" ] && return 0 ++ done < /proc/mounts ++ return 1 + } + + wait_for_if_up() { diff --git a/0088-systemd-module-setup.sh-install-systemd-udev-rules.patch b/0088-systemd-module-setup.sh-install-systemd-udev-rules.patch new file mode 100644 index 0000000..8c2897d --- /dev/null +++ b/0088-systemd-module-setup.sh-install-systemd-udev-rules.patch @@ -0,0 +1,20 @@ +From 8b6bdafc39c95f55ea9bdc1d7465c085b77ef052 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 30 Jul 2012 17:05:49 +0200 +Subject: [PATCH] systemd/module-setup.sh: install systemd udev rules + +--- + modules.d/98systemd/module-setup.sh | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh +index 21c86ed..577bcb9 100755 +--- a/modules.d/98systemd/module-setup.sh ++++ b/modules.d/98systemd/module-setup.sh +@@ -141,5 +141,6 @@ install() { + ln -fs ../udevadm-cleanup-db.service "${initdir}${dracutsystemunitdir}/initrd-switch-root.target.requires/udevadm-cleanup-db.service" + + inst_script "$moddir/service-to-run.sh" "${systemdutildir}/system-generators/service-to-run" ++ inst_rules 99-systemd.rules + } + diff --git a/0089-virtfs-mount-virtfs.sh-don-t-exit-0.patch b/0089-virtfs-mount-virtfs.sh-don-t-exit-0.patch new file mode 100644 index 0000000..f0c548a --- /dev/null +++ b/0089-virtfs-mount-virtfs.sh-don-t-exit-0.patch @@ -0,0 +1,18 @@ +From cf62cc435f6785261d3ea8731f154e1898c35cc1 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 30 Jul 2012 17:06:23 +0200 +Subject: [PATCH] virtfs/mount-virtfs.sh: don't exit != 0 + +--- + modules.d/95virtfs/mount-virtfs.sh | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/modules.d/95virtfs/mount-virtfs.sh b/modules.d/95virtfs/mount-virtfs.sh +index dfebf38..7c07b46 100755 +--- a/modules.d/95virtfs/mount-virtfs.sh ++++ b/modules.d/95virtfs/mount-virtfs.sh +@@ -73,3 +73,4 @@ mount_root() { + if [ -n "$root" -a -z "${root%%virtfs:*}" ]; then + mount_root + fi ++: diff --git a/0090-plymouth-plymouth-newroot.sh-don-t-exit-0-for-source.patch b/0090-plymouth-plymouth-newroot.sh-don-t-exit-0-for-source.patch new file mode 100644 index 0000000..f405506 --- /dev/null +++ b/0090-plymouth-plymouth-newroot.sh-don-t-exit-0-for-source.patch @@ -0,0 +1,23 @@ +From 19cd47fd26d072000a49661f78fc0a7200116ef6 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 30 Jul 2012 17:06:48 +0200 +Subject: [PATCH] plymouth/plymouth-newroot.sh: don't "exit 0" for sourced + scripts + +--- + modules.d/50plymouth/plymouth-newroot.sh | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/modules.d/50plymouth/plymouth-newroot.sh b/modules.d/50plymouth/plymouth-newroot.sh +index 58ac11f..2311b47 100755 +--- a/modules.d/50plymouth/plymouth-newroot.sh ++++ b/modules.d/50plymouth/plymouth-newroot.sh +@@ -2,5 +2,6 @@ + # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- + # ex: ts=8 sw=4 sts=4 et filetype=sh + +-[ -x /bin/plymouth -a -z "$DRACUT_SYSTEMD" ] || exit 0 +-/bin/plymouth --newroot=$NEWROOT ++if [ -x /bin/plymouth -a -z "$DRACUT_SYSTEMD" ]; then ++ /bin/plymouth --newroot=$NEWROOT ++fi diff --git a/0091-plymouth-plymouth-pretrigger.sh-don-t-exit-0-for-a-s.patch b/0091-plymouth-plymouth-pretrigger.sh-don-t-exit-0-for-a-s.patch new file mode 100644 index 0000000..69e95c4 --- /dev/null +++ b/0091-plymouth-plymouth-pretrigger.sh-don-t-exit-0-for-a-s.patch @@ -0,0 +1,52 @@ +From 540eca9d9d651b52c2d3e18a3df7f9e36c23b681 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 30 Jul 2012 17:07:43 +0200 +Subject: [PATCH] plymouth/plymouth-pretrigger.sh: don't "exit 0" for a + sourced script + +--- + modules.d/50plymouth/plymouth-pretrigger.sh | 28 ++++++++++++++-------------- + 1 file changed, 14 insertions(+), 14 deletions(-) + +diff --git a/modules.d/50plymouth/plymouth-pretrigger.sh b/modules.d/50plymouth/plymouth-pretrigger.sh +index e536564..17533bb 100755 +--- a/modules.d/50plymouth/plymouth-pretrigger.sh ++++ b/modules.d/50plymouth/plymouth-pretrigger.sh +@@ -2,23 +2,23 @@ + # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- + # ex: ts=8 sw=4 sts=4 et filetype=sh + +-[ -x /bin/plymouthd -a ! -n "$DRACUT_SYSTEMD" ] || exit 0 +- +-if getargbool 1 plymouth.enable && getargbool 1 rd.plymouth -d -n rd_NO_PLYMOUTH; then ++if [ -x /bin/plymouthd -a ! -n "$DRACUT_SYSTEMD" ]; then ++ if getargbool 1 plymouth.enable && getargbool 1 rd.plymouth -d -n rd_NO_PLYMOUTH; then + # first trigger graphics subsystem +- udevadm trigger --action=add --attr-match=class=0x030000 >/dev/null 2>&1 ++ udevadm trigger --action=add --attr-match=class=0x030000 >/dev/null 2>&1 + # first trigger graphics and tty subsystem +- udevadm trigger --action=add --subsystem-match=graphics --subsystem-match=drm --subsystem-match=tty >/dev/null 2>&1 ++ udevadm trigger --action=add --subsystem-match=graphics --subsystem-match=drm --subsystem-match=tty >/dev/null 2>&1 + +- udevadm settle --timeout=30 2>&1 | vinfo ++ udevadm settle --timeout=30 2>&1 | vinfo + +- info "Starting plymouth daemon" +- mkdir -m 0755 /run/plymouth +- read consoledev rest < /sys/class/tty/console/active +- consoledev=${consoledev:-tty0} +- [ -x /lib/udev/console_init -a -e "/dev/$consoledev" ] && /lib/udev/console_init "/dev/$consoledev" +- [ -x /bin/plymouthd ] && /bin/plymouthd --attach-to-session --pid-file /run/plymouth/pid +- /bin/plymouth --show-splash 2>&1 | vinfo ++ info "Starting plymouth daemon" ++ mkdir -m 0755 /run/plymouth ++ read consoledev rest < /sys/class/tty/console/active ++ consoledev=${consoledev:-tty0} ++ [ -x /lib/udev/console_init -a -e "/dev/$consoledev" ] && /lib/udev/console_init "/dev/$consoledev" ++ [ -x /bin/plymouthd ] && /bin/plymouthd --attach-to-session --pid-file /run/plymouth/pid ++ /bin/plymouth --show-splash 2>&1 | vinfo + # reset tty after plymouth messed with it +- [ -x /lib/udev/console_init -a -e "/dev/$consoledev" ] && /lib/udev/console_init "/dev/$consoledev" ++ [ -x /lib/udev/console_init -a -e "/dev/$consoledev" ] && /lib/udev/console_init "/dev/$consoledev" ++ fi + fi diff --git a/0092-crypt-add-systemd-crypt-support.patch b/0092-crypt-add-systemd-crypt-support.patch new file mode 100644 index 0000000..16c0fa4 --- /dev/null +++ b/0092-crypt-add-systemd-crypt-support.patch @@ -0,0 +1,122 @@ +From 3d352f522837ce8dc20ae130f79462e5a3cce347 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 30 Jul 2012 14:34:55 +0200 +Subject: [PATCH] crypt: add systemd crypt support + +--- + modules.d/90crypt/crypt-run-generator.sh | 10 +++++++ + modules.d/90crypt/module-setup.sh | 13 ++++++++- + modules.d/90crypt/parse-crypt.sh | 46 ++++++++++++++++++++++---------- + 3 files changed, 54 insertions(+), 15 deletions(-) + create mode 100755 modules.d/90crypt/crypt-run-generator.sh + +diff --git a/modules.d/90crypt/crypt-run-generator.sh b/modules.d/90crypt/crypt-run-generator.sh +new file mode 100755 +index 0000000..d70443e +--- /dev/null ++++ b/modules.d/90crypt/crypt-run-generator.sh +@@ -0,0 +1,10 @@ ++#!/bin/bash ++ ++dev=$1 ++luks=$2 ++ ++echo "$luks $dev" >> /etc/crypttab ++/lib/systemd/system-generators/systemd-cryptsetup-generator ++systemctl daemon-reload ++systemctl start cryptsetup.target ++exit 0 +diff --git a/modules.d/90crypt/module-setup.sh b/modules.d/90crypt/module-setup.sh +index 9b0bf64..b6d97af 100755 +--- a/modules.d/90crypt/module-setup.sh ++++ b/modules.d/90crypt/module-setup.sh +@@ -49,5 +49,16 @@ install() { + inst_hook cleanup 30 "$moddir/crypt-cleanup.sh" + inst_simple /etc/crypttab + inst_simple "$moddir/crypt-lib.sh" "/lib/dracut-crypt-lib.sh" +-} + ++ dracut_install -o \ ++ $systemdutildir/system-generators/systemd-cryptsetup-generator \ ++ $systemdutildir/system-generators/systemd-cryptsetup-generator \ ++ $systemdutildir/systemd-cryptsetup \ ++ $systemdsystemunitdir/systemd-ask-password-console.path \ ++ $systemdsystemunitdir/systemd-ask-password-console.service \ ++ $systemdsystemunitdir/cryptsetup.target \ ++ $systemdsystemunitdir/sysinit.target.wants/cryptsetup.target \ ++ systemd-ask-password systemd-tty-ask-password-agent ++ inst_hook initqueue/finished 01 "$moddir/finished-ask-password.sh" ++ inst_script "$moddir"/crypt-run-generator.sh /sbin/crypt-run-generator ++} +diff --git a/modules.d/90crypt/parse-crypt.sh b/modules.d/90crypt/parse-crypt.sh +index e20e6e0..8d1c8cd 100755 +--- a/modules.d/90crypt/parse-crypt.sh ++++ b/modules.d/90crypt/parse-crypt.sh +@@ -2,8 +2,6 @@ + # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- + # ex: ts=8 sw=4 sts=4 et filetype=sh + +-[ -n "$DRACUT_SYSTEMD" ] && exit 0 +- + if ! getargbool 1 rd.luks -d -n rd_NO_LUKS; then + info "rd.luks=0: removing cryptoluks activation" + rm -f /etc/udev/rules.d/70-luks.rules +@@ -18,14 +16,26 @@ else + + if [ -n "$LUKS" ]; then + for luksid in $LUKS; do ++ + luksid=${luksid##luks-} +- { +- printf -- 'ENV{ID_FS_TYPE}=="crypto_LUKS", ' +- printf -- 'ENV{ID_FS_UUID}=="*%s*", ' $luksid +- printf -- 'RUN+="%s --unique --onetime ' $(command -v initqueue) +- 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 ++ ++ if [ -z "$DRACUT_SYSTEMD" ]; then ++ { ++ printf -- 'ENV{ID_FS_TYPE}=="crypto_LUKS", ' ++ printf -- 'ENV{ID_FS_UUID}=="*%s*", ' $luksid ++ printf -- 'RUN+="%s --unique --onetime ' $(command -v initqueue) ++ 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 crypt-run-generator-%%k %s ' $(command -v crypt-run-generator) ++ printf -- '$env{DEVNAME} luks-$env{ID_FS_UUID}"\n' ++ } >> /etc/udev/rules.d/70-luks.rules.new ++ fi + + uuid=$luksid + while [ "$uuid" != "${uuid#*-}" ]; do uuid=${uuid%%-*}${uuid#*-}; done +@@ -38,11 +48,19 @@ else + } >> $hookdir/emergency/90-crypt.sh + done + else +- { +- printf -- 'ENV{ID_FS_TYPE}=="crypto_LUKS", RUN+="%s ' $(command -v initqueue) +- printf -- '--unique --onetime --name cryptroot-ask-%%k ' +- printf -- '%s $env{DEVNAME} luks-$env{ID_FS_UUID} %s"\n' $(command -v cryptroot-ask) $tout +- } >> /etc/udev/rules.d/70-luks.rules.new ++ if [ -z "$DRACUT_SYSTEMD" ]; then ++ { ++ printf -- 'ENV{ID_FS_TYPE}=="crypto_LUKS", RUN+="%s ' $(command -v initqueue) ++ printf -- '--unique --onetime --name cryptroot-ask-%%k ' ++ printf -- '%s $env{DEVNAME} luks-$env{ID_FS_UUID} %s"\n' $(command -v cryptroot-ask) $tout ++ } >> /etc/udev/rules.d/70-luks.rules.new ++ else ++ { ++ printf -- 'ENV{ID_FS_TYPE}=="crypto_LUKS", RUN+="%s ' $(command -v initqueue) ++ printf -- '--unique --onetime --name crypt-run-generator-%%k ' ++ printf -- '%s $env{DEVNAME} luks-$env{ID_FS_UUID}"\n' $(command -v crypt-run-generator) ++ } >> /etc/udev/rules.d/70-luks.rules.new ++ fi + fi + + echo 'LABEL="luks_end"' >> /etc/udev/rules.d/70-luks.rules.new diff --git a/0093-crypt-crypt-run-generator.sh-do-not-add-already-exis.patch b/0093-crypt-crypt-run-generator.sh-do-not-add-already-exis.patch new file mode 100644 index 0000000..31144a4 --- /dev/null +++ b/0093-crypt-crypt-run-generator.sh-do-not-add-already-exis.patch @@ -0,0 +1,246 @@ +From 3f7e5358e520b3d55c709a675d46c8080070276d Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 30 Jul 2012 18:35:30 +0200 +Subject: [PATCH] crypt/crypt-run-generator.sh: do not add already existing + luks + +--- + modules.d/90crypt/crypt-run-generator.sh | 9 ++++++++- + test/TEST-10-RAID/create-root.sh | 3 ++- + test/TEST-10-RAID/test.sh | 9 +++++++-- + test/TEST-12-RAID-DEG/create-root.sh | 3 ++- + test/TEST-12-RAID-DEG/test.sh | 6 ++++++ + test/TEST-13-ENC-RAID-LVM/test.sh | 14 +++++++++++--- + test/TEST-30-ISCSI/create-root.sh | 3 --- + test/TEST-40-NBD/create-root.sh | 16 +++++++++------- + test/TEST-40-NBD/test.sh | 8 ++++++-- + 9 files changed, 51 insertions(+), 20 deletions(-) + +diff --git a/modules.d/90crypt/crypt-run-generator.sh b/modules.d/90crypt/crypt-run-generator.sh +index d70443e..cb3aedc 100755 +--- a/modules.d/90crypt/crypt-run-generator.sh ++++ b/modules.d/90crypt/crypt-run-generator.sh +@@ -1,8 +1,15 @@ +-#!/bin/bash ++#!/bin/sh ++ ++. /lib/dracut-lib.sh + + dev=$1 + luks=$2 + ++while read l rest; do ++ strstr "${l##luks-}" "${luks##luks-}" && exit 0 ++done < /etc/crypttab ++ ++ + echo "$luks $dev" >> /etc/crypttab + /lib/systemd/system-generators/systemd-cryptsetup-generator + systemctl daemon-reload +diff --git a/test/TEST-10-RAID/create-root.sh b/test/TEST-10-RAID/create-root.sh +index 3dd86cb..cd67819 100755 +--- a/test/TEST-10-RAID/create-root.sh ++++ b/test/TEST-10-RAID/create-root.sh +@@ -34,5 +34,6 @@ lvm lvchange -a n /dev/dracut/root + udevadm settle + cryptsetup luksClose /dev/mapper/dracut_crypt_test + udevadm settle +-echo "dracut-root-block-created" >/dev/sda1 ++eval $(udevadm info --query=env --name=/dev/md0|while read line; do [ "$line" != "${line#*ID_FS_UUID*}" ] && echo $line; done;) ++{ echo "dracut-root-block-created"; echo "ID_FS_UUID=$ID_FS_UUID"; } >/dev/sda1 + poweroff -f +diff --git a/test/TEST-10-RAID/test.sh b/test/TEST-10-RAID/test.sh +index d2b1921..45bb62e 100755 +--- a/test/TEST-10-RAID/test.sh ++++ b/test/TEST-10-RAID/test.sh +@@ -4,14 +4,14 @@ TEST_DESCRIPTION="root filesystem on an encrypted LVM PV on a RAID-5" + KVERSION=${KVERSION-$(uname -r)} + + # Uncomment this to debug failures +-#DEBUGFAIL="rd.shell" ++DEBUGFAIL="rd.shell rd.udev.log-priority=debug loglevel=70 systemd.log_target=kmsg" + test_run() { + DISKIMAGE=$TESTDIR/TEST-10-RAID-root.img + $testdir/run-qemu \ + -hda $DISKIMAGE \ + -m 256M -nographic \ + -net none -kernel /boot/vmlinuz-$KVERSION \ +- -append "root=/dev/dracut/root rw quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL" \ ++ -append "root=/dev/dracut/root rw rd.retry=10 console=ttyS0,115200n81 selinux=0 $DEBUGFAIL" \ + -initrd $TESTDIR/initramfs.testing + grep -m 1 -q dracut-root-block-success $DISKIMAGE || return 1 + } +@@ -70,6 +70,7 @@ test_setup() { + -append "root=/dev/dracut/root rw rootfstype=ext2 quiet console=ttyS0,115200n81 selinux=0" \ + -initrd $TESTDIR/initramfs.makeroot || return 1 + grep -m 1 -q dracut-root-block-created $DISKIMAGE || return 1 ++ eval $(grep -a -m 1 ID_FS_UUID $DISKIMAGE) + + ( + export initdir=$TESTDIR/overlay +@@ -77,8 +78,12 @@ test_setup() { + dracut_install poweroff shutdown + inst_hook emergency 000 ./hard-off.sh + inst ./cryptroot-ask.sh /sbin/cryptroot-ask ++ mkdir -p $initdir/etc ++ echo "luks-$ID_FS_UUID /dev/md0 /etc/key" > $initdir/etc/crypttab ++ echo -n "test" > $initdir/etc/key + inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules + ) ++ + sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ + -o "plymouth network" \ + -a "debug" \ +diff --git a/test/TEST-12-RAID-DEG/create-root.sh b/test/TEST-12-RAID-DEG/create-root.sh +index 84f5ad2..d5a8c0b 100755 +--- a/test/TEST-12-RAID-DEG/create-root.sh ++++ b/test/TEST-12-RAID-DEG/create-root.sh +@@ -41,4 +41,5 @@ udevadm settle + mdadm -W /dev/md0 || : + mdadm --detail --export /dev/md0 |grep MD_UUID > /tmp/mduuid + . /tmp/mduuid +-{ echo "dracut-root-block-created"; echo MD_UUID=$MD_UUID; } > /dev/sda1 ++eval $(udevadm info --query=env --name=/dev/md0|while read line; do [ "$line" != "${line#*ID_FS_UUID*}" ] && echo $line; done;) ++{ echo "dracut-root-block-created"; echo MD_UUID=$MD_UUID; echo "ID_FS_UUID=$ID_FS_UUID";} > /dev/sda1 +diff --git a/test/TEST-12-RAID-DEG/test.sh b/test/TEST-12-RAID-DEG/test.sh +index 96c84f8..558e3b0 100755 +--- a/test/TEST-12-RAID-DEG/test.sh ++++ b/test/TEST-12-RAID-DEG/test.sh +@@ -103,8 +103,11 @@ test_setup() { + -kernel "/boot/vmlinuz-$kernel" \ + -append "root=/dev/dracut/root 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 + eval $(grep --binary-files=text -m 1 MD_UUID $TESTDIR/root.ext2) ++ eval $(grep -a -m 1 ID_FS_UUID $TESTDIR/root.ext2) ++ + ( + export initdir=$TESTDIR/overlay + . $basedir/dracut-functions.sh +@@ -114,7 +117,10 @@ test_setup() { + inst ./cryptroot-ask.sh /sbin/cryptroot-ask + mkdir -p $initdir/etc + echo "ARRAY /dev/md0 level=raid5 num-devices=3 UUID=$MD_UUID" > $initdir/etc/mdadm.conf ++ echo "luks-$ID_FS_UUID /dev/md0 /etc/key" > $initdir/etc/crypttab ++ echo -n test > $initdir/etc/key + ) ++ + sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ + -o "plymouth network" \ + -a "debug" \ +diff --git a/test/TEST-13-ENC-RAID-LVM/test.sh b/test/TEST-13-ENC-RAID-LVM/test.sh +index f0f7d34..dff3229 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() { + -hdb $TESTDIR/check-success.img \ + -m 256M -nographic \ + -net none -kernel /boot/vmlinuz-$KVERSION \ +- -append "root=/dev/dracut/root rw quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $LUKSARGS $DEBUGFAIL" \ ++ -append "root=/dev/dracut/root rw quiet rd.retry=20 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $LUKSARGS $DEBUGFAIL" \ + -initrd $TESTDIR/initramfs.testing + grep -m 1 -q dracut-root-block-success $TESTDIR/check-success.img || return 1 + echo "CLIENT TEST END: [OK]" +@@ -30,7 +30,7 @@ test_run() { + -hdb $TESTDIR/check-success.img \ + -m 256M -nographic \ + -net none -kernel /boot/vmlinuz-$KVERSION \ +- -append "root=/dev/dracut/root rw quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL" \ ++ -append "root=/dev/dracut/root rw quiet rd.retry=20 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL" \ + -initrd $TESTDIR/initramfs.testing + grep -m 1 -q dracut-root-block-success $TESTDIR/check-success.img || return 1 + echo "CLIENT TEST END: [OK]" +@@ -43,7 +43,7 @@ test_run() { + -hdb $TESTDIR/check-success.img \ + -m 256M -nographic \ + -net none -kernel /boot/vmlinuz-$KVERSION \ +- -append "root=/dev/dracut/root rw quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL rd.luks.uuid=failme" \ ++ -append "root=/dev/dracut/root rw quiet rd.retry=10 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL rd.luks.uuid=failme" \ + -initrd $TESTDIR/initramfs.testing + grep -m 1 -q dracut-root-block-success $TESTDIR/check-success.img && return 1 + echo "CLIENT TEST END: [OK]" +@@ -114,6 +114,14 @@ test_setup() { + inst_hook emergency 000 ./hard-off.sh + inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules + inst ./cryptroot-ask.sh /sbin/cryptroot-ask ++ mkdir -p $initdir/etc ++ i=2 ++ for uuid in $cryptoUUIDS; do ++ eval $uuid ++ printf 'luks-%s /dev/sda%s /etc/key\n' $ID_FS_UUID $i ++ ((i+=1)) ++ done > $initdir/etc/crypttab ++ echo -n test > $initdir/etc/key + ) + sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ + -o "plymouth network" \ +diff --git a/test/TEST-30-ISCSI/create-root.sh b/test/TEST-30-ISCSI/create-root.sh +index 6016320..8116a13 100755 +--- a/test/TEST-30-ISCSI/create-root.sh ++++ b/test/TEST-30-ISCSI/create-root.sh +@@ -23,6 +23,3 @@ umount /sysroot && \ + lvm lvchange -a n /dev/dracut/root && \ + echo "dracut-root-block-created" >/dev/sdb + poweroff -f +- +-#lvm lvchange -a n /dev/dracut/root && \ +-#cryptsetup luksClose /dev/mapper/dracut_crypt_test && \ +diff --git a/test/TEST-40-NBD/create-root.sh b/test/TEST-40-NBD/create-root.sh +index 4bef5f1..5b902c3 100755 +--- a/test/TEST-40-NBD/create-root.sh ++++ b/test/TEST-40-NBD/create-root.sh +@@ -18,11 +18,13 @@ mke2fs -j /dev/dracut/root && \ + mkdir -p /sysroot && \ + mount /dev/dracut/root /sysroot && \ + cp -a -t /sysroot /source/* && \ +-umount /sysroot && \ +-sleep 1 && \ +-lvm lvchange -a n /dev/dracut/root && \ +-sleep 1 && \ +-cryptsetup luksClose /dev/mapper/dracut_crypt_test && \ +-sleep 1 && \ +-echo "dracut-root-block-created" >/dev/sda ++umount /sysroot ++sleep 1 ++lvm lvchange -a n /dev/dracut/root ++udevadm settle ++cryptsetup luksClose /dev/mapper/dracut_crypt_test ++udevadm settle ++sleep 1 ++eval $(udevadm info --query=env --name=/dev/sdb|while read line; do [ "$line" != "${line#*ID_FS_UUID*}" ] && echo $line; done;) ++{ echo "dracut-root-block-created"; echo "ID_FS_UUID=$ID_FS_UUID"; } >/dev/sda + poweroff -f +diff --git a/test/TEST-40-NBD/test.sh b/test/TEST-40-NBD/test.sh +index 99d930f..9881630 100755 +--- a/test/TEST-40-NBD/test.sh ++++ b/test/TEST-40-NBD/test.sh +@@ -52,7 +52,6 @@ client_test() { + echo "Unable to make client sda image" 1>&2 + return 1 + fi +- + $testdir/run-qemu \ + -hda $TESTDIR/flag.img \ + -m 256M -nographic \ +@@ -234,6 +233,7 @@ make_encrypted_root() { + -append "root=/dev/dracut/root 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 + } + + make_client_root() { +@@ -328,7 +328,11 @@ test_setup() { + dracut_install poweroff shutdown + inst_hook emergency 000 ./hard-off.sh + inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules +- inst ./cryptroot-ask.sh /sbin/cryptroot-ask ++ inst ./cryptroot-ask.sh /sbin/cryptroot-ask ++ . $TESTDIR/luks.uuid ++ mkdir -p $initdir/etc ++ echo "luks-$ID_FS_UUID /dev/nbd0 /etc/key" > $initdir/etc/crypttab ++ echo -n test > $initdir/etc/key + ) + + sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ diff --git a/0094-dmraid-mdraid-lvm-udev-don-t-process-DM_MULTIPATH_DE.patch b/0094-dmraid-mdraid-lvm-udev-don-t-process-DM_MULTIPATH_DE.patch new file mode 100644 index 0000000..f5e5c07 --- /dev/null +++ b/0094-dmraid-mdraid-lvm-udev-don-t-process-DM_MULTIPATH_DE.patch @@ -0,0 +1,77 @@ +From c0cae7f702b5ccf27a80913642aec8bf15fe710e Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 30 Jul 2012 20:32:39 +0200 +Subject: [PATCH] dmraid,mdraid,lvm,udev: don't process + DM_MULTIPATH_DEVICE_PATH devs + +--- + modules.d/90dmraid/61-dmraid-imsm.rules | 2 ++ + modules.d/90lvm/64-lvm.rules | 2 ++ + modules.d/90mdraid/65-md-incremental-imsm.rules | 2 ++ + modules.d/95udev-rules/59-persistent-storage.rules | 2 ++ + modules.d/95udev-rules/61-persistent-storage.rules | 2 ++ + 5 files changed, 10 insertions(+) + +diff --git a/modules.d/90dmraid/61-dmraid-imsm.rules b/modules.d/90dmraid/61-dmraid-imsm.rules +index 73ba58e..33e060b 100644 +--- a/modules.d/90dmraid/61-dmraid-imsm.rules ++++ b/modules.d/90dmraid/61-dmraid-imsm.rules +@@ -4,6 +4,8 @@ + + SUBSYSTEM!="block", GOTO="dm_end" + ACTION!="add|change", GOTO="dm_end" ++# Also don't process disks that are slated to be a multipath device ++ENV{DM_MULTIPATH_DEVICE_PATH}=="?*", GOTO="dm_end" + + ENV{ID_FS_TYPE}=="linux_raid_member", GOTO="dm_end" + +diff --git a/modules.d/90lvm/64-lvm.rules b/modules.d/90lvm/64-lvm.rules +index ab827a9..3ce0c1f 100644 +--- a/modules.d/90lvm/64-lvm.rules ++++ b/modules.d/90lvm/64-lvm.rules +@@ -6,6 +6,8 @@ + + SUBSYSTEM!="block", GOTO="lvm_end" + ACTION!="add|change", GOTO="lvm_end" ++# Also don't process disks that are slated to be a multipath device ++ENV{DM_MULTIPATH_DEVICE_PATH}=="?*", GOTO="lvm_end" + KERNEL=="dm-[0-9]*", ACTION=="add", GOTO="lvm_end" + ENV{ID_FS_TYPE}!="LVM?_member", GOTO="lvm_end" + +diff --git a/modules.d/90mdraid/65-md-incremental-imsm.rules b/modules.d/90mdraid/65-md-incremental-imsm.rules +index c4334db..6dd696a 100644 +--- a/modules.d/90mdraid/65-md-incremental-imsm.rules ++++ b/modules.d/90mdraid/65-md-incremental-imsm.rules +@@ -6,6 +6,8 @@ ACTION!="add|change", GOTO="md_end" + SUBSYSTEM!="block", GOTO="md_end" + ENV{rd_NO_MD}=="?*", GOTO="md_end" + KERNEL=="md*", GOTO="md_end" ++# Also don't process disks that are slated to be a multipath device ++ENV{DM_MULTIPATH_DEVICE_PATH}=="?*", GOTO="md_end" + + ENV{ID_FS_TYPE}=="ddf_raid_member|isw_raid_member|linux_raid_member", GOTO="md_try" + GOTO="md_end" +diff --git a/modules.d/95udev-rules/59-persistent-storage.rules b/modules.d/95udev-rules/59-persistent-storage.rules +index b7d069b..f2756ee 100644 +--- a/modules.d/95udev-rules/59-persistent-storage.rules ++++ b/modules.d/95udev-rules/59-persistent-storage.rules +@@ -1,5 +1,7 @@ + SUBSYSTEM!="block", GOTO="ps_end" + ACTION!="add|change", GOTO="ps_end" ++# Also don't process disks that are slated to be a multipath device ++ENV{DM_MULTIPATH_DEVICE_PATH}=="?*", GOTO="ps_end" + + KERNEL=="cciss[0-9]*", IMPORT{builtin}="blkid" + KERNEL=="nbd[0-9]*", IMPORT{builtin}="blkid" +diff --git a/modules.d/95udev-rules/61-persistent-storage.rules b/modules.d/95udev-rules/61-persistent-storage.rules +index 1136849..7dbd151 100644 +--- a/modules.d/95udev-rules/61-persistent-storage.rules ++++ b/modules.d/95udev-rules/61-persistent-storage.rules +@@ -1,5 +1,7 @@ + SUBSYSTEM!="block", GOTO="pss_end" + ACTION!="add|change", GOTO="pss_end" ++# Also don't process disks that are slated to be a multipath device ++ENV{DM_MULTIPATH_DEVICE_PATH}=="?*", GOTO="pss_end" + + ACTION=="change", KERNEL=="dm-[0-9]*", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}!="1", GOTO="do_pss" + KERNEL=="cciss[0-9]*", GOTO="do_pss" diff --git a/0095-TODO-update.patch b/0095-TODO-update.patch new file mode 100644 index 0000000..5d6dd0f --- /dev/null +++ b/0095-TODO-update.patch @@ -0,0 +1,22 @@ +From 474cca1e9dba2ff185062943d28a0223a7e53f58 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 30 Jul 2012 21:07:03 +0200 +Subject: [PATCH] TODO: update + +--- + TODO | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/TODO b/TODO +index d74577f..9481df7 100644 +--- a/TODO ++++ b/TODO +@@ -6,7 +6,7 @@ Items are ordered in priority. + + INITRAMFS TODO + +-- use systemd crypto passwd mechanisms ++- use info and warn prefix + - add sosreport + - generate systemd unit dracut-initramfs-restore in /run/systemd dynamically + - put "root=" parsing hooks in separate hook dir diff --git a/0096-TEST-10-RAID-test.sh-comment-debug-options.patch b/0096-TEST-10-RAID-test.sh-comment-debug-options.patch new file mode 100644 index 0000000..c6b1f5f --- /dev/null +++ b/0096-TEST-10-RAID-test.sh-comment-debug-options.patch @@ -0,0 +1,22 @@ +From 650ab3b077e65a70b0a7782c9bea79cb6733a267 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 30 Jul 2012 21:07:14 +0200 +Subject: [PATCH] TEST-10-RAID/test.sh: comment debug options + +--- + test/TEST-10-RAID/test.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/TEST-10-RAID/test.sh b/test/TEST-10-RAID/test.sh +index 45bb62e..92f4dd8 100755 +--- a/test/TEST-10-RAID/test.sh ++++ b/test/TEST-10-RAID/test.sh +@@ -4,7 +4,7 @@ TEST_DESCRIPTION="root filesystem on an encrypted LVM PV on a RAID-5" + KVERSION=${KVERSION-$(uname -r)} + + # Uncomment this to debug failures +-DEBUGFAIL="rd.shell rd.udev.log-priority=debug loglevel=70 systemd.log_target=kmsg" ++#DEBUGFAIL="rd.shell rd.udev.log-priority=debug loglevel=70 systemd.log_target=kmsg" + test_run() { + DISKIMAGE=$TESTDIR/TEST-10-RAID-root.img + $testdir/run-qemu \ diff --git a/dracut.spec b/dracut.spec index 5acbca6..bef9374 100644 --- a/dracut.spec +++ b/dracut.spec @@ -10,7 +10,7 @@ Name: dracut Version: 022 -Release: 63.git20120727%{?dist} +Release: 97.git20120730%{?dist} Summary: Initramfs generator using udev %if 0%{?fedora} || 0%{?rhel} @@ -91,6 +91,40 @@ Patch59: 0059-dracut-functions.sh-inst_rule_programs-fixed-IMPORT-.patch Patch60: 0060-install-dracut-install.c-convert-destrootdir-to-real.patch Patch61: 0061-dracut-functions.sh-inst_rule_programs-fix-error-mes.patch Patch62: 0062-dracut.spec-add-cifs-module.patch +Patch63: 0063-Makefile-add-dependencies-for-dracut-install-generat.patch +Patch64: 0064-gitignore-install-dracut-install.patch +Patch65: 0065-cifs-parse-cifsroot.sh-do-not-unset-netroot-we-need-.patch +Patch66: 0066-fixed-install-locations-for-udev-rules-and-change-to.patch +Patch67: 0067-README.testsuite-add-instructions-on-how-to-run-the-.patch +Patch68: 0068-iscsi-iscsiroot.sh-force-link-initiatorname.patch +Patch69: 0069-cifs-parse-cifsroot.sh-fixed-more-root-netroot-parsi.patch +Patch70: 0070-i18n-console_init.sh-skip-if-we-use-systemd-and-use-.patch +Patch71: 0071-fixed-i18n-and-plymouth-for-systemd.patch +Patch72: 0072-add-af_packet-kernel-module-to-network-testsuite-tes.patch +Patch73: 0073-i18n-terminfo-module-setup.sh-fixed-cp-t-calls.patch +Patch74: 0074-TODO-update.patch +Patch75: 0075-kernel-modules-module-setup.sh-move-drivers-filesyst.patch +Patch76: 0076-dracut.sh-put-drivers-and-filesystems-back-in-export.patch +Patch77: 0077-add-comment-for-getargbool.patch +Patch78: 0078-dracut-lib-add-find_mount-use-it-to-implement-ismoun.patch +Patch79: 0079-dracut-functions-_x-should-exist-no-need-to-test.patch +Patch80: 0080-dracut.sh-test-if-we-can-lazy-resolve-with-ldd.patch +Patch81: 0081-plymouth-plymouth-newroot.sh-fixed-pre-pivot-hook.patch +Patch82: 0082-dracut.spec-add-Requires-kbd-kbd-misc.patch +Patch83: 0083-set-DRACUT_SYSTEMD-for-systemd-mode-in-the-initramfs.patch +Patch84: 0084-kernel-modules-module-setup.sh-add-missing-fi.patch +Patch85: 0085-dracut-functions.sh-inst_hook-with-0-9-name.patch +Patch86: 0086-i18n-parse-i18n.sh-remove-udev-rules.patch +Patch87: 0087-base-dracut-lib.sh-fixed-ismounted-mountpoint.patch +Patch88: 0088-systemd-module-setup.sh-install-systemd-udev-rules.patch +Patch89: 0089-virtfs-mount-virtfs.sh-don-t-exit-0.patch +Patch90: 0090-plymouth-plymouth-newroot.sh-don-t-exit-0-for-source.patch +Patch91: 0091-plymouth-plymouth-pretrigger.sh-don-t-exit-0-for-a-s.patch +Patch92: 0092-crypt-add-systemd-crypt-support.patch +Patch93: 0093-crypt-crypt-run-generator.sh-do-not-add-already-exis.patch +Patch94: 0094-dmraid-mdraid-lvm-udev-don-t-process-DM_MULTIPATH_DE.patch +Patch95: 0095-TODO-update.patch +Patch96: 0096-TEST-10-RAID-test.sh-comment-debug-options.patch BuildRequires: dash bash git @@ -146,6 +180,7 @@ 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 < 187 @@ -423,6 +458,9 @@ rm -rf $RPM_BUILD_ROOT %dir /var/lib/dracut/overlay %changelog +* Mon Jul 30 2012 Harald Hoyer 022-97.git20120730 +- moved crypt setup to systemd units + * Fri Jul 27 2012 Harald Hoyer 022-63.git20120727 - fixed dracut-install bug if /var/tmp contains a symlink - fixed some partx issues