[dracut/f17] dracut-018-23.git20120419
Harald Hoyer
harald at fedoraproject.org
Thu Apr 19 15:06:21 UTC 2012
commit 9030b6e0fdc272c8f0cc91a5e02f4aa828029827
Author: Harald Hoyer <harald at redhat.com>
Date: Thu Apr 19 17:04:52 2012 +0200
dracut-018-23.git20120419
- fixed vnc installation
- do not ignore ram devices in udev
- lsinitrd support for symlinks
- manpage fixes
- do not include IMA and selinux dracut modules (systemd does that)
removed dracut shutdown service from reboot
- include all phy network kernel modules
- cleanups now after pre-pivot hook
0010-udev-rules-remove-01-ignore.rules.patch | 32 ++++++
0011-lsinitrd-support-symlinks.patch | 22 ++++
...acut.cmdline.7.asc-document-resume-option.patch | 31 ++++++
...-do-not-include-IMA-and-selinux-modules-w.patch | 48 +++++++++
...un-plymouth-hook-if-the-binary-is-missing.patch | 67 +++++++++++++
0015-man-Fix-add-fstab-option-in-man-page.patch | 22 ++++
...base-init.sh-mount-tmpfs-with-strictatime.patch | 37 +++++++
0017-99shutdown-shutdown.sh-export-PATH.patch | 26 +++++
...-do-not-install-systemd-service-in-reboot.patch | 26 +++++
...ule-setup.sh-include-all-kernel-drivers-n.patch | 22 ++++
0020-add-pre-pivot-cleanup-hook.patch | 105 ++++++++++++++++++++
...cleanup-scripts-to-pre-pivot-cleanup-hook.patch | 86 ++++++++++++++++
...parse-ip-opts.sh-remove-check-for-netroot.patch | 30 ++++++
dracut.spec | 44 +++++++--
14 files changed, 591 insertions(+), 7 deletions(-)
---
diff --git a/0010-udev-rules-remove-01-ignore.rules.patch b/0010-udev-rules-remove-01-ignore.rules.patch
new file mode 100644
index 0000000..ee21461
--- /dev/null
+++ b/0010-udev-rules-remove-01-ignore.rules.patch
@@ -0,0 +1,32 @@
+From 324be70f8070105c106c5901dd0575cb116cebc9 Mon Sep 17 00:00:00 2001
+From: Harald Hoyer <harald at redhat.com>
+Date: Mon, 16 Apr 2012 14:50:35 +0200
+Subject: [PATCH] udev-rules: remove 01-ignore.rules
+
+---
+ modules.d/95udev-rules/01-ignore.rules | 1 -
+ modules.d/95udev-rules/module-setup.sh | 3 ---
+ 2 files changed, 4 deletions(-)
+ delete mode 100644 modules.d/95udev-rules/01-ignore.rules
+
+diff --git a/modules.d/95udev-rules/01-ignore.rules b/modules.d/95udev-rules/01-ignore.rules
+deleted file mode 100644
+index b32f22e..0000000
+--- a/modules.d/95udev-rules/01-ignore.rules
++++ /dev/null
+@@ -1 +0,0 @@
+-KERNEL=="ram[0-9]*", OPTIONS+="ignore_device", OPTIONS+="last_rule"
+diff --git a/modules.d/95udev-rules/module-setup.sh b/modules.d/95udev-rules/module-setup.sh
+index 1c71336..b17232f 100755
+--- a/modules.d/95udev-rules/module-setup.sh
++++ b/modules.d/95udev-rules/module-setup.sh
+@@ -20,9 +20,6 @@ install() {
+ #Some debian udev rules are named differently
+ inst_rules 50-udev.rules 95-late.rules
+
+- # ignore some devices in the initrd
+- inst_rules "$moddir/01-ignore.rules"
+-
+ # for firmware loading
+ inst_rules 50-firmware.rules
+ dracut_install cat uname
diff --git a/0011-lsinitrd-support-symlinks.patch b/0011-lsinitrd-support-symlinks.patch
new file mode 100644
index 0000000..683558e
--- /dev/null
+++ b/0011-lsinitrd-support-symlinks.patch
@@ -0,0 +1,22 @@
+From 25ff71b0c756bf2036bec78557398946d45bcbd3 Mon Sep 17 00:00:00 2001
+From: Nikoli <nikoli at lavabit.com>
+Date: Tue, 17 Apr 2012 11:31:27 +0200
+Subject: [PATCH] lsinitrd: support symlinks
+
+---
+ lsinitrd.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lsinitrd.sh b/lsinitrd.sh
+index 1eaa37d..e6767dc 100755
+--- a/lsinitrd.sh
++++ b/lsinitrd.sh
+@@ -34,7 +34,7 @@ image="${1:-/boot/initramfs-$(uname -r).img}"
+ [[ -f "$image" ]] || { echo "$image does not exist" ; exit 1 ; }
+
+ CAT=zcat
+-FILE_T=$(file "$image")
++FILE_T=$(file --dereference "$image")
+
+ if echo "test"|xz|xz -dc --single-stream >/dev/null 2>&1; then
+ XZ_SINGLE_STREAM="--single-stream"
diff --git a/0012-dracut.cmdline.7.asc-document-resume-option.patch b/0012-dracut.cmdline.7.asc-document-resume-option.patch
new file mode 100644
index 0000000..b64e907
--- /dev/null
+++ b/0012-dracut.cmdline.7.asc-document-resume-option.patch
@@ -0,0 +1,31 @@
+From 97903dfc476ae0c5ccaa4ddef294e2da43411355 Mon Sep 17 00:00:00 2001
+From: Harald Hoyer <harald at redhat.com>
+Date: Tue, 17 Apr 2012 12:06:51 +0200
+Subject: [PATCH] dracut.cmdline.7.asc: document "resume=" option
+
+---
+ dracut.cmdline.7.asc | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc
+index a1e06dd..c77fee5 100644
+--- a/dracut.cmdline.7.asc
++++ b/dracut.cmdline.7.asc
+@@ -64,6 +64,17 @@ rootfstype=ext3
+ do not honor special mount options for the root filesystem found in
+ _/etc/fstab_ of the real root.
+
++**resume=**_<path to resume partition>_
+++
++E.g.:
+++
++----
++resume=/dev/disk/by-path/pci-0000:00:1f.1-scsi-0:0:1:0-part1
++resume=/dev/disk/by-uuid/3f5ad593-4546-4a94-a374-bcfb68aa11f7
++resume=UUID=3f5ad593-4546-4a94-a374-bcfb68aa11f7
++----
++
++
+ Misc
+ ~~~~
+ **rd.driver.blacklist=**_<drivername>[,<drivername>,...]_::
diff --git a/0013-dracut.spec-do-not-include-IMA-and-selinux-modules-w.patch b/0013-dracut.spec-do-not-include-IMA-and-selinux-modules-w.patch
new file mode 100644
index 0000000..c142928
--- /dev/null
+++ b/0013-dracut.spec-do-not-include-IMA-and-selinux-modules-w.patch
@@ -0,0 +1,48 @@
+From d7d7822529fef60a1620ea3d6c43865b6cf44e1f Mon Sep 17 00:00:00 2001
+From: Harald Hoyer <harald at redhat.com>
+Date: Tue, 17 Apr 2012 12:12:56 +0200
+Subject: [PATCH] dracut.spec: do not include IMA and selinux modules with
+ systemd
+
+---
+ dracut.spec | 16 +++++++++++++---
+ 1 file changed, 13 insertions(+), 3 deletions(-)
+
+diff --git a/dracut.spec b/dracut.spec
+index 074cb10..b5218d9 100644
+--- a/dracut.spec
++++ b/dracut.spec
+@@ -187,6 +187,14 @@ rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/02fips-aesni
+ # remove gentoo specific modules
+ rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/50gensplash
+
++%if %{defined _unitdir}
++# with systemd IMA and selinux modules do not make sense
++rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/96securityfs
++rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/97masterkey
++rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/98integrity
++rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/98selinux
++%endif
++
+ mkdir -p $RPM_BUILD_ROOT/boot/dracut
+ mkdir -p $RPM_BUILD_ROOT/var/lib/dracut/overlay
+ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log
+@@ -270,13 +278,15 @@ rm -rf $RPM_BUILD_ROOT
+ %{dracutlibdir}/modules.d/95zfcp
+ %{dracutlibdir}/modules.d/95terminfo
+ %{dracutlibdir}/modules.d/95udev-rules
++%if %{undefined _unitdir}
+ %{dracutlibdir}/modules.d/96securityfs
+-%{dracutlibdir}/modules.d/97biosdevname
+ %{dracutlibdir}/modules.d/97masterkey
+-%{dracutlibdir}/modules.d/98ecryptfs
++%{dracutlibdir}/modules.d/98selinux
+ %{dracutlibdir}/modules.d/98integrity
++%endif
++%{dracutlibdir}/modules.d/97biosdevname
++%{dracutlibdir}/modules.d/98ecryptfs
+ %{dracutlibdir}/modules.d/98pollcdrom
+-%{dracutlibdir}/modules.d/98selinux
+ %{dracutlibdir}/modules.d/98syslog
+ %{dracutlibdir}/modules.d/98usrmount
+ %{dracutlibdir}/modules.d/99base
diff --git a/0014-Do-not-run-plymouth-hook-if-the-binary-is-missing.patch b/0014-Do-not-run-plymouth-hook-if-the-binary-is-missing.patch
new file mode 100644
index 0000000..edcb728
--- /dev/null
+++ b/0014-Do-not-run-plymouth-hook-if-the-binary-is-missing.patch
@@ -0,0 +1,67 @@
+From 8b0e6b11b6456397d602c7f687ec3d9c80bbdd9c Mon Sep 17 00:00:00 2001
+From: Colin Guthrie <colin at mageia.org>
+Date: Sat, 14 Apr 2012 16:03:34 +0100
+Subject: [PATCH] Do not run plymouth hook if the binary is missing.
+
+There is a remove-boot-splash script in Mageia that can
+strip plymouth from an initrd. Make this script a noop
+if that has happened.
+---
+ modules.d/50plymouth/plymouth-pretrigger.sh | 44 ++++++++++++++-------------
+ 1 file changed, 23 insertions(+), 21 deletions(-)
+
+diff --git a/modules.d/50plymouth/plymouth-pretrigger.sh b/modules.d/50plymouth/plymouth-pretrigger.sh
+index 57955e7..50828af 100755
+--- a/modules.d/50plymouth/plymouth-pretrigger.sh
++++ b/modules.d/50plymouth/plymouth-pretrigger.sh
+@@ -2,27 +2,29 @@
+ # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
+ # ex: ts=8 sw=4 sts=4 et filetype=sh
+
+-if getargbool 1 plymouth.enable && getargbool 1 rd.plymouth -n rd_NO_PLYMOUTH; then
+- [ -c /dev/null ] || mknod -m 0666 /dev/null c 1 3
+- # first trigger graphics subsystem
+- 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
++if [ -x /bin/plymouthd ]; then
++ if getargbool 1 plymouth.enable && getargbool 1 rd.plymouth -n rd_NO_PLYMOUTH; then
++ [ -c /dev/null ] || mknod -m 0666 /dev/null c 1 3
++ # first trigger graphics subsystem
++ 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 settle --timeout=30 2>&1 | vinfo
+- [ -c /dev/zero ] || mknod -m 0666 /dev/zero c 1 5
+- [ -c /dev/tty0 ] || mknod -m 0620 /dev/tty0 c 4 0
+- [ -e /dev/systty ] || ln -s tty0 /dev/systty
+- [ -c /dev/fb0 ] || mknod -m 0660 /dev/fb0 c 29 0
+- [ -e /dev/fb ] || ln -s fb0 /dev/fb
++ udevadm settle --timeout=30 2>&1 | vinfo
++ [ -c /dev/zero ] || mknod -m 0666 /dev/zero c 1 5
++ [ -c /dev/tty0 ] || mknod -m 0620 /dev/tty0 c 4 0
++ [ -e /dev/systty ] || ln -s tty0 /dev/systty
++ [ -c /dev/fb0 ] || mknod -m 0660 /dev/fb0 c 29 0
++ [ -e /dev/fb ] || ln -s fb0 /dev/fb
+
+- info "Starting plymouth daemon"
+- mkdir -m 0755 /run/plymouth
+- consoledev=$(getarg console= | sed -e 's/,.*//')
+- consoledev=${consoledev:-tty0}
+- [ -x /lib/udev/console_init ] && /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 ] && /lib/udev/console_init /dev/tty0
++ info "Starting plymouth daemon"
++ mkdir -m 0755 /run/plymouth
++ consoledev=$(getarg console= | sed -e 's/,.*//')
++ consoledev=${consoledev:-tty0}
++ [ -x /lib/udev/console_init ] && /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 ] && /lib/udev/console_init /dev/tty0
++ fi
+ fi
diff --git a/0015-man-Fix-add-fstab-option-in-man-page.patch b/0015-man-Fix-add-fstab-option-in-man-page.patch
new file mode 100644
index 0000000..5fc2460
--- /dev/null
+++ b/0015-man-Fix-add-fstab-option-in-man-page.patch
@@ -0,0 +1,22 @@
+From 4cbb00e93fdc809df130e83041967aa87138d9e5 Mon Sep 17 00:00:00 2001
+From: Colin Guthrie <colin at mageia.org>
+Date: Sat, 14 Apr 2012 18:14:29 +0100
+Subject: [PATCH] man: Fix --add-fstab option in man page
+
+---
+ dracut.8.asc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/dracut.8.asc b/dracut.8.asc
+index 24b7a8c..cadd740 100644
+--- a/dracut.8.asc
++++ b/dracut.8.asc
+@@ -247,7 +247,7 @@ provide a valid _/etc/fstab_.
+ **--fstab**::
+ Use _/etc/fstab_ instead of _/proc/self/mountinfo_.
+
+-**--add_fstab** _<filename>_ ::
++**--add-fstab** _<filename>_ ::
+ Add entries of _<filename>_ to the initramfs /etc/fstab.
+
+ **--mount** "_<device>_ _<mountpoint>_ _<filesystem type>_ _<filesystem options>_"::
diff --git a/0016-base-init.sh-mount-tmpfs-with-strictatime.patch b/0016-base-init.sh-mount-tmpfs-with-strictatime.patch
new file mode 100644
index 0000000..bd22ed7
--- /dev/null
+++ b/0016-base-init.sh-mount-tmpfs-with-strictatime.patch
@@ -0,0 +1,37 @@
+From c66c2c271fff338ef26ff3ca73d3a9c62e6bc184 Mon Sep 17 00:00:00 2001
+From: Harald Hoyer <harald at redhat.com>
+Date: Wed, 18 Apr 2012 12:44:00 +0200
+Subject: [PATCH] base/init.sh: mount tmpfs with strictatime
+
+---
+ modules.d/99base/init.sh | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh
+index 2f87a20..b5adcad 100755
+--- a/modules.d/99base/init.sh
++++ b/modules.d/99base/init.sh
+@@ -46,7 +46,7 @@ if [ "$RD_DEBUG" = "yes" ]; then
+ fi
+
+ if ! ismounted /dev; then
+- mount -t devtmpfs -o mode=0755,nosuid devtmpfs /dev >/dev/null
++ mount -t devtmpfs -o mode=0755,nosuid,strictatime devtmpfs /dev >/dev/null
+ fi
+
+ # prepare the /dev directory
+@@ -62,12 +62,12 @@ fi
+
+ if ! ismounted /dev/shm; then
+ mkdir -m 0755 /dev/shm
+- mount -t tmpfs -o mode=1777,nosuid,nodev tmpfs /dev/shm >/dev/null
++ mount -t tmpfs -o mode=1777,nosuid,nodev,strictatime tmpfs /dev/shm >/dev/null
+ fi
+
+ if ! ismounted /run; then
+ mkdir -m 0755 /newrun
+- mount -t tmpfs -o mode=0755,nosuid,nodev tmpfs /newrun >/dev/null
++ mount -t tmpfs -o mode=0755,nosuid,nodev,strictatime tmpfs /newrun >/dev/null
+ cp -a /run/* /newrun >/dev/null 2>&1
+ mount --move /newrun /run
+ rm -fr /newrun
diff --git a/0017-99shutdown-shutdown.sh-export-PATH.patch b/0017-99shutdown-shutdown.sh-export-PATH.patch
new file mode 100644
index 0000000..c162520
--- /dev/null
+++ b/0017-99shutdown-shutdown.sh-export-PATH.patch
@@ -0,0 +1,26 @@
+From a62a521510d3278aa8794a9d90b09b9325ab1ae1 Mon Sep 17 00:00:00 2001
+From: Harald Hoyer <harald at redhat.com>
+Date: Wed, 18 Apr 2012 13:08:12 +0200
+Subject: [PATCH] 99shutdown/shutdown.sh: export PATH
+
+---
+ modules.d/99shutdown/shutdown.sh | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/modules.d/99shutdown/shutdown.sh b/modules.d/99shutdown/shutdown.sh
+index 45345a4..aa0a81f 100755
+--- a/modules.d/99shutdown/shutdown.sh
++++ b/modules.d/99shutdown/shutdown.sh
+@@ -7,10 +7,9 @@
+ # Copyright 2011, Red Hat, Inc.
+ # Harald Hoyer <harald at redhat.com>
+
+-#!/bin/sh
+-. /lib/dracut-lib.sh
+ export TERM=linux
+-PATH=/usr/sbin:/usr/bin:/sbin:/bin
++export PATH=/usr/sbin:/usr/bin:/sbin:/bin
++. /lib/dracut-lib.sh
+
+ trap "emergency_shell --shutdown shutdown Signal caught!" 0
+ getarg 'rd.break=pre-shutdown' && emergency_shell --shutdown pre-shutdown "Break before pre-shutdown"
diff --git a/0018-Makefile-do-not-install-systemd-service-in-reboot.patch b/0018-Makefile-do-not-install-systemd-service-in-reboot.patch
new file mode 100644
index 0000000..5259d79
--- /dev/null
+++ b/0018-Makefile-do-not-install-systemd-service-in-reboot.patch
@@ -0,0 +1,26 @@
+From 619a2ff48d400dc4fda0034ea30d6d2add903c55 Mon Sep 17 00:00:00 2001
+From: Harald Hoyer <harald at redhat.com>
+Date: Wed, 18 Apr 2012 13:14:55 +0200
+Subject: [PATCH] Makefile: do not install systemd service in reboot
+
+shutdown is enough. It is pulled in on reboot.
+---
+ Makefile | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index c62aae1..5ce1778 100644
+--- a/Makefile
++++ b/Makefile
+@@ -57,11 +57,8 @@ install: doc
+ if [ -n "$(systemdsystemunitdir)" ]; then \
+ mkdir -p $(DESTDIR)$(systemdsystemunitdir); \
+ install -m 0644 dracut-shutdown.service $(DESTDIR)$(systemdsystemunitdir); \
+- mkdir -p $(DESTDIR)$(systemdsystemunitdir)/reboot.target.wants; \
+ mkdir -p $(DESTDIR)$(systemdsystemunitdir)/shutdown.target.wants; \
+ ln -s ../dracut-shutdown.service \
+- $(DESTDIR)$(systemdsystemunitdir)/reboot.target.wants/dracut-shutdown.service; \
+- ln -s ../dracut-shutdown.service \
+ $(DESTDIR)$(systemdsystemunitdir)/shutdown.target.wants/dracut-shutdown.service; \
+ fi
+
diff --git a/0019-network-module-setup.sh-include-all-kernel-drivers-n.patch b/0019-network-module-setup.sh-include-all-kernel-drivers-n.patch
new file mode 100644
index 0000000..c011821
--- /dev/null
+++ b/0019-network-module-setup.sh-include-all-kernel-drivers-n.patch
@@ -0,0 +1,22 @@
+From 2683d0e4651f3c83c8d3d8636cb573345e32398b Mon Sep 17 00:00:00 2001
+From: Harald Hoyer <harald at redhat.com>
+Date: Wed, 18 Apr 2012 13:49:48 +0200
+Subject: [PATCH] network/module-setup.sh: include all kernel/drivers/net/phy
+ drivers
+
+---
+ modules.d/40network/module-setup.sh | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh
+index 97fc5cb..253a87e 100755
+--- a/modules.d/40network/module-setup.sh
++++ b/modules.d/40network/module-setup.sh
+@@ -61,6 +61,7 @@ installkernel() {
+ { find_kernel_modules_by_path drivers/net; find_kernel_modules_by_path drivers/s390/net; } \
+ | net_module_filter | instmods
+
++ instmods =drivers/net/phy
+ instmods ecb arc4
+ # bridge modules
+ instmods bridge stp llc
diff --git a/0020-add-pre-pivot-cleanup-hook.patch b/0020-add-pre-pivot-cleanup-hook.patch
new file mode 100644
index 0000000..e686e23
--- /dev/null
+++ b/0020-add-pre-pivot-cleanup-hook.patch
@@ -0,0 +1,105 @@
+From 3d474e40662d2d8caed0cef3555bb72dc04d2b35 Mon Sep 17 00:00:00 2001
+From: Dave Young <dyoung at redhat.com>
+Date: Thu, 19 Apr 2012 12:01:36 +0800
+Subject: [PATCH] add pre-pivot-cleanup hook
+
+Sometimes some hook script will need to be before the cleanup hook scripts
+For example dhclient killing, nfs cleanup, etc. must not happen before kdump
+because it will use their fuctionalities.
+
+So here introduce a new hook pre-pivot-cleanup, all cleanup scripts will go there.
+that means pre-pivot hook is splited to two hooks pre-pivot and pre-pivot-cleanup
+
+Signed-off-by: Dave Young <dyoung at redhat.com>
+---
+ README.modules | 3 +++
+ dracut-functions.sh | 2 +-
+ dracut.asc | 7 ++++++-
+ dracut.cmdline.7.asc | 2 +-
+ modules.d/99base/init.sh | 7 ++++++-
+ 5 files changed, 17 insertions(+), 4 deletions(-)
+
+diff --git a/README.modules b/README.modules
+index 21461de..188d011 100644
+--- a/README.modules
++++ b/README.modules
+@@ -103,6 +103,9 @@ init has the following hook points to inject scripts:
+ a timeout.
+
+ /lib/dracut/hooks/pre-pivot/*.sh
++ scripts to run before latter initramfs cleanups
++
++/lib/dracut/hooks/pre-pivot-cleanup/*.sh
+ scripts to run before the real init is executed and the initramfs
+ disappears
+ All processes started before should be killed here.
+diff --git a/dracut-functions.sh b/dracut-functions.sh
+index f5611dc..ccf3ba6 100755
+--- a/dracut-functions.sh
++++ b/dracut-functions.sh
+@@ -36,7 +36,7 @@ fi
+ [[ $hookdirs ]] || {
+ hookdirs="cmdline pre-udev pre-trigger netroot "
+ hookdirs+="initqueue initqueue/settled initqueue/online initqueue/finished initqueue/timeout "
+- hookdirs+="pre-mount pre-pivot mount "
++ hookdirs+="pre-mount pre-pivot pre-pivot-cleanup mount "
+ hookdirs+="emergency shutdown-emergency shutdown cleanup "
+ export hookdirs
+ }
+diff --git a/dracut.asc b/dracut.asc
+index 1a0e3d2..9621db2 100644
+--- a/dracut.asc
++++ b/dracut.asc
+@@ -854,12 +854,17 @@ This hook is mainly to mount the real root device.
+
+ === Hook: pre-pivot
+
++This hook is called before pre-pivot-cleanup hook, This is a good place for
++actions other than cleanups which need to be called before pivot.
++
++
++=== Hook: pre-pivot-cleanup
++
+ This hook is the last hook and is called before init finally switches root to
+ the real root device. This is a good place to clean up and kill processes not
+ needed anymore.
+
+
+-
+ === Cleanup and switch_root
+
+ Init kills all udev processes, cleans up the environment, sets up the arguments
+diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc
+index c77fee5..76db651 100644
+--- a/dracut.cmdline.7.asc
++++ b/dracut.cmdline.7.asc
+@@ -105,7 +105,7 @@ Debug
+ **rd.break**::
+ drop to a shell at the end
+
+-**rd.break=**_{cmdline|pre-udev|pre-trigger|initqueue|pre-mount|mount|pre-pivot}_::
++**rd.break=**_{cmdline|pre-udev|pre-trigger|initqueue|pre-mount|mount|pre-pivot|pre-pivot-cleanup}_::
+ drop to a shell on defined breakpoint
+
+ **rd.udev.info**::
+diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh
+index b5adcad..544bbb0 100755
+--- a/modules.d/99base/init.sh
++++ b/modules.d/99base/init.sh
+@@ -224,10 +224,15 @@ done
+ while read dev mp rest; do [ "$mp" = "$NEWROOT" ] && echo $dev; done < /proc/mounts
+ } | vinfo
+
+-# pre pivot scripts are sourced just before we switch over to the new root.
++# pre pivot scripts are sourced just before we doing cleanup and switch over
++# to the new root.
+ getarg 'rd.break=pre-pivot' 'rdbreak=pre-pivot' && emergency_shell -n pre-pivot "Break pre-pivot"
+ source_hook pre-pivot
+
++# pre pivot cleanup scripts are sourced just before we switch over to the new root.
++getarg 'rd.break=pre-pivot-cleanup' 'rdbreak=pre-pivot-cleanup' && emergency_shell -n pre-pivot-cleanup "Break pre-pivot-cleanup"
++source_hook pre-pivot-cleanup
++
+ # By the time we get here, the root filesystem should be mounted.
+ # Try to find init.
+ for i in "$(getarg real_init=)" "$(getarg init=)" $(getargs rd.distroinit=) /sbin/init; do
diff --git a/0021-move-cleanup-scripts-to-pre-pivot-cleanup-hook.patch b/0021-move-cleanup-scripts-to-pre-pivot-cleanup-hook.patch
new file mode 100644
index 0000000..33c0294
--- /dev/null
+++ b/0021-move-cleanup-scripts-to-pre-pivot-cleanup-hook.patch
@@ -0,0 +1,86 @@
+From 337ae7414751ce995e06321e23bd322c955d0a67 Mon Sep 17 00:00:00 2001
+From: Dave Young <dyoung at redhat.com>
+Date: Thu, 19 Apr 2012 12:01:43 +0800
+Subject: [PATCH] move cleanup scripts to pre-pivot-cleanup hook
+
+below cleanup scripts is moved:
+40network: kill-dhclient.sh
+90crypt: crypt-cleanup.sh
+90multipath: multipathd-stop.sh
+95iscsi: cleanup-iscsi.sh
+95nfs: nfsroot-cleanup.sh
+
+Signed-off-by: Dave Young <dyoung at redhat.com>
+---
+ modules.d/40network/module-setup.sh | 2 +-
+ modules.d/90crypt/module-setup.sh | 2 +-
+ modules.d/90multipath/module-setup.sh | 2 +-
+ modules.d/95iscsi/module-setup.sh | 2 +-
+ modules.d/95nfs/module-setup.sh | 2 +-
+ 5 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh
+index 253a87e..c2ad815 100755
+--- a/modules.d/40network/module-setup.sh
++++ b/modules.d/40network/module-setup.sh
+@@ -86,7 +86,7 @@ install() {
+ inst_hook cmdline 97 "$moddir/parse-bridge.sh"
+ inst_hook cmdline 98 "$moddir/parse-ip-opts.sh"
+ inst_hook cmdline 99 "$moddir/parse-ifname.sh"
+- inst_hook pre-pivot 10 "$moddir/kill-dhclient.sh"
++ inst_hook pre-pivot-cleanup 10 "$moddir/kill-dhclient.sh"
+
+ _arch=$(uname -m)
+
+diff --git a/modules.d/90crypt/module-setup.sh b/modules.d/90crypt/module-setup.sh
+index 8fdf32b..4a66516 100755
+--- a/modules.d/90crypt/module-setup.sh
++++ b/modules.d/90crypt/module-setup.sh
+@@ -48,7 +48,7 @@ install() {
+ inst "$moddir"/probe-keydev.sh /sbin/probe-keydev
+ inst_hook cmdline 10 "$moddir/parse-keydev.sh"
+ inst_hook cmdline 30 "$moddir/parse-crypt.sh"
+- inst_hook pre-pivot 30 "$moddir/crypt-cleanup.sh"
++ inst_hook pre-pivot-cleanup 30 "$moddir/crypt-cleanup.sh"
+ inst_simple /etc/crypttab
+ inst "$moddir/crypt-lib.sh" "/lib/dracut-crypt-lib.sh"
+ }
+diff --git a/modules.d/90multipath/module-setup.sh b/modules.d/90multipath/module-setup.sh
+index 8a193c4..f044f33 100755
+--- a/modules.d/90multipath/module-setup.sh
++++ b/modules.d/90multipath/module-setup.sh
+@@ -70,7 +70,7 @@ install() {
+ inst_libdir_file "multipath/*"
+
+ inst_hook pre-trigger 02 "$moddir/multipathd.sh"
+- inst_hook pre-pivot 02 "$moddir/multipathd-stop.sh"
++ inst_hook pre-pivot-cleanup 02 "$moddir/multipathd-stop.sh"
+ inst_rules 40-multipath.rules
+ }
+
+diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh
+index b6c1c1f..a001a28 100755
+--- a/modules.d/95iscsi/module-setup.sh
++++ b/modules.d/95iscsi/module-setup.sh
+@@ -63,7 +63,7 @@ install() {
+ inst hostname
+ inst iscsi-iname
+ inst_hook cmdline 90 "$moddir/parse-iscsiroot.sh"
+- inst_hook pre-pivot 90 "$moddir/cleanup-iscsi.sh"
++ inst_hook pre-pivot-cleanup 90 "$moddir/cleanup-iscsi.sh"
+ inst "$moddir/iscsiroot.sh" "/sbin/iscsiroot"
+ inst "$moddir/mount-lun.sh" "/bin/mount-lun.sh"
+ }
+diff --git a/modules.d/95nfs/module-setup.sh b/modules.d/95nfs/module-setup.sh
+index 455f52f..3587bdd 100755
+--- a/modules.d/95nfs/module-setup.sh
++++ b/modules.d/95nfs/module-setup.sh
+@@ -58,7 +58,7 @@ install() {
+
+ inst_hook cmdline 90 "$moddir/parse-nfsroot.sh"
+ inst_hook pre-udev 99 "$moddir/nfs-start-rpc.sh"
+- inst_hook pre-pivot 99 "$moddir/nfsroot-cleanup.sh"
++ inst_hook pre-pivot-cleanup 99 "$moddir/nfsroot-cleanup.sh"
+ inst "$moddir/nfsroot.sh" "/sbin/nfsroot"
+ inst "$moddir/nfs-lib.sh" "/lib/nfs-lib.sh"
+ mkdir -m 0755 -p "$initdir/var/lib/nfs/rpc_pipefs"
diff --git a/0022-network-parse-ip-opts.sh-remove-check-for-netroot.patch b/0022-network-parse-ip-opts.sh-remove-check-for-netroot.patch
new file mode 100644
index 0000000..88aefc3
--- /dev/null
+++ b/0022-network-parse-ip-opts.sh-remove-check-for-netroot.patch
@@ -0,0 +1,30 @@
+From 7af99168387dd3fec3408835b40bd84a9b191271 Mon Sep 17 00:00:00 2001
+From: Harald Hoyer <harald at redhat.com>
+Date: Thu, 19 Apr 2012 16:41:04 +0200
+Subject: [PATCH] network/parse-ip-opts.sh: remove check for netroot
+
+with anaconda and all other kind of stuff, we might want network, even
+for root not on the network
+---
+ modules.d/40network/parse-ip-opts.sh | 8 --------
+ 1 file changed, 8 deletions(-)
+
+diff --git a/modules.d/40network/parse-ip-opts.sh b/modules.d/40network/parse-ip-opts.sh
+index 97702a2..5637a9a 100755
+--- a/modules.d/40network/parse-ip-opts.sh
++++ b/modules.d/40network/parse-ip-opts.sh
+@@ -17,14 +17,6 @@
+ command -v getarg >/dev/null || . /lib/dracut-lib.sh
+ command -v ibft_to_cmdline >/dev/null || . /lib/net-lib.sh
+
+-# Check if ip= lines should be used
+-if getarg ip= >/dev/null ; then
+- if [ -z "$netroot" ] ; then
+- echo "Warning: No netboot configured, ignoring ip= lines"
+- return;
+- fi
+-fi
+-
+ # Don't mix BOOTIF=macaddr from pxelinux and ip= lines
+ getarg ip= >/dev/null && getarg BOOTIF= >/dev/null && \
+ die "Mixing BOOTIF and ip= lines is dangerous"
diff --git a/dracut.spec b/dracut.spec
index 41f4e32..c973437 100644
--- a/dracut.spec
+++ b/dracut.spec
@@ -10,7 +10,7 @@
Name: dracut
Version: 018
-Release: 12.git20120416%{?dist}
+Release: 23.git20120419%{?dist}
Summary: Initramfs generator using udev
%if 0%{?fedora} || 0%{?rhel}
@@ -33,8 +33,19 @@ Patch6: 0006-rootfs-block-avoid-remount-when-options-don-t-change.patch
Patch7: 0007-Debian-multiarch-support.patch
Patch8: 0008-dracut.sh-log-installed-modules-to-initdir-lib-dracu.patch
Patch9: 0009-lvm-disable-lvmetad.patch
-Patch10: 0010-virtfs-root-filesystem-support.patch
-Patch11: 0011-udev-rules-remove-01-ignore.rules.patch
+Patch10: 0010-udev-rules-remove-01-ignore.rules.patch
+Patch11: 0011-lsinitrd-support-symlinks.patch
+Patch12: 0012-dracut.cmdline.7.asc-document-resume-option.patch
+Patch13: 0013-dracut.spec-do-not-include-IMA-and-selinux-modules-w.patch
+Patch14: 0014-Do-not-run-plymouth-hook-if-the-binary-is-missing.patch
+Patch15: 0015-man-Fix-add-fstab-option-in-man-page.patch
+Patch16: 0016-base-init.sh-mount-tmpfs-with-strictatime.patch
+Patch17: 0017-99shutdown-shutdown.sh-export-PATH.patch
+Patch18: 0018-Makefile-do-not-install-systemd-service-in-reboot.patch
+Patch19: 0019-network-module-setup.sh-include-all-kernel-drivers-n.patch
+Patch20: 0020-add-pre-pivot-cleanup-hook.patch
+Patch21: 0021-move-cleanup-scripts-to-pre-pivot-cleanup-hook.patch
+Patch22: 0022-network-parse-ip-opts.sh-remove-check-for-netroot.patch
BuildArch: noarch
@@ -199,6 +210,14 @@ rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/02fips-aesni
# remove gentoo specific modules
rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/50gensplash
+%if %{defined _unitdir}
+# with systemd IMA and selinux modules do not make sense
+rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/96securityfs
+rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/97masterkey
+rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/98integrity
+rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/98selinux
+%endif
+
mkdir -p $RPM_BUILD_ROOT/boot/dracut
mkdir -p $RPM_BUILD_ROOT/var/lib/dracut/overlay
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log
@@ -282,14 +301,15 @@ rm -rf $RPM_BUILD_ROOT
%{dracutlibdir}/modules.d/95zfcp
%{dracutlibdir}/modules.d/95terminfo
%{dracutlibdir}/modules.d/95udev-rules
-%{dracutlibdir}/modules.d/95virtfs
+%if %{undefined _unitdir}
%{dracutlibdir}/modules.d/96securityfs
-%{dracutlibdir}/modules.d/97biosdevname
%{dracutlibdir}/modules.d/97masterkey
-%{dracutlibdir}/modules.d/98ecryptfs
+%{dracutlibdir}/modules.d/98selinux
%{dracutlibdir}/modules.d/98integrity
+%endif
+%{dracutlibdir}/modules.d/97biosdevname
+%{dracutlibdir}/modules.d/98ecryptfs
%{dracutlibdir}/modules.d/98pollcdrom
-%{dracutlibdir}/modules.d/98selinux
%{dracutlibdir}/modules.d/98syslog
%{dracutlibdir}/modules.d/98usrmount
%{dracutlibdir}/modules.d/99base
@@ -341,6 +361,16 @@ rm -rf $RPM_BUILD_ROOT
%dir /var/lib/dracut/overlay
%changelog
+* Thu Apr 19 2012 Harald Hoyer <harald at redhat.com> 018-23.git20120419
+- fixed vnc installation
+- do not ignore ram devices in udev
+- lsinitrd support for symlinks
+- manpage fixes
+- do not include IMA and selinux dracut modules (systemd does that)
+- removed dracut shutdown service from reboot
+- include all phy network kernel modules
+- cleanups now after pre-pivot hook
+
* Mon Apr 16 2012 Harald Hoyer <harald at redhat.com> 018-12.git20120416
- new upstream version, which fixes various anaconda loader issues
More information about the scm-commits
mailing list