From e787af592176f3d69f626c474d192d1b4a68b57b Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Apr 15 2013 09:56:40 +0000 Subject: dracut-027-26.git20130415 - do not call plymouth with full path - include systemd-random-seed-load.service - fix ca-bundle.crt for ssl curl Resolves: rhbz#950770 - add support for "iso-scan/filename" kernel parameter --- diff --git a/0019-Do-not-call-plymouth-with-full-path.patch b/0019-Do-not-call-plymouth-with-full-path.patch new file mode 100644 index 0000000..cd7a031 --- /dev/null +++ b/0019-Do-not-call-plymouth-with-full-path.patch @@ -0,0 +1,164 @@ +From ca2c6936798b3931fb4806d783c17474b8f89878 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 11 Apr 2013 16:08:26 +0200 +Subject: [PATCH] Do not call plymouth with full path + +--- + modules.d/50plymouth/module-setup.sh | 2 +- + modules.d/50plymouth/plymouth-emergency.sh | 2 +- + modules.d/50plymouth/plymouth-newroot.sh | 4 ++-- + modules.d/50plymouth/plymouth-populate-initrd.sh | 5 ++--- + modules.d/50plymouth/plymouth-pretrigger.sh | 6 +++--- + modules.d/90crypt/crypt-lib.sh | 4 ++-- + modules.d/90dmsquash-live/dmsquash-live-root.sh | 4 ++-- + modules.d/98systemd/dracut-emergency.sh | 2 +- + modules.d/99base/dracut-lib.sh | 4 ++-- + 9 files changed, 16 insertions(+), 17 deletions(-) + +diff --git a/modules.d/50plymouth/module-setup.sh b/modules.d/50plymouth/module-setup.sh +index f754e24..ae35b11 100755 +--- a/modules.d/50plymouth/module-setup.sh ++++ b/modules.d/50plymouth/module-setup.sh +@@ -4,7 +4,7 @@ + + check() { + [[ "$mount_needs" ]] && return 1 +- [[ -x /sbin/plymouthd && -x /bin/plymouth && -x /usr/sbin/plymouth-set-default-theme ]] ++ type -P plymouthd >/dev/null && type -P plymouth >/dev/null + } + + depends() { +diff --git a/modules.d/50plymouth/plymouth-emergency.sh b/modules.d/50plymouth/plymouth-emergency.sh +index 68955b8..ed0b0ac 100755 +--- a/modules.d/50plymouth/plymouth-emergency.sh ++++ b/modules.d/50plymouth/plymouth-emergency.sh +@@ -1,4 +1,4 @@ + #!/bin/sh + # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- + # ex: ts=8 sw=4 sts=4 et filetype=sh +-[ -x /bin/plymouth ] && /bin/plymouth --hide-splash ++plymouth --hide-splash 2>/dev/null || : +diff --git a/modules.d/50plymouth/plymouth-newroot.sh b/modules.d/50plymouth/plymouth-newroot.sh +index 2311b47..96cd138 100755 +--- a/modules.d/50plymouth/plymouth-newroot.sh ++++ b/modules.d/50plymouth/plymouth-newroot.sh +@@ -2,6 +2,6 @@ + # -*- 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 -a -z "$DRACUT_SYSTEMD" ]; then +- /bin/plymouth --newroot=$NEWROOT ++if type plymouth >/dev/null 2>&1 && [ -z "$DRACUT_SYSTEMD" ]; then ++ plymouth --newroot=$NEWROOT + fi +diff --git a/modules.d/50plymouth/plymouth-populate-initrd.sh b/modules.d/50plymouth/plymouth-populate-initrd.sh +index 1e2ffe7..6e0f561 100755 +--- a/modules.d/50plymouth/plymouth-populate-initrd.sh ++++ b/modules.d/50plymouth/plymouth-populate-initrd.sh +@@ -4,15 +4,14 @@ + PLYMOUTH_LOGO_FILE="/usr/share/pixmaps/system-logo-white.png" + PLYMOUTH_THEME=$(plymouth-set-default-theme) + +-inst /sbin/plymouthd /bin/plymouthd +-dracut_install /bin/plymouth \ ++dracut_install plymouthd plymouth \ + "${PLYMOUTH_LOGO_FILE}" \ + /etc/system-release + + mkdir -m 0755 -p "${initdir}/usr/share/plymouth" + + inst_libdir_file "plymouth/text.so" "plymouth/details.so" +- ++ + if [[ $hostonly ]]; then + dracut_install \ + "/usr/share/plymouth/themes/details/details.plymouth" \ +diff --git a/modules.d/50plymouth/plymouth-pretrigger.sh b/modules.d/50plymouth/plymouth-pretrigger.sh +index 0e3cb02..8087bf6 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 + +-if [ -x /bin/plymouthd -a -z "$DRACUT_SYSTEMD" ]; then ++if type plymouthd >/dev/null 2>&1 && [-z "$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 +@@ -16,8 +16,8 @@ if [ -x /bin/plymouthd -a -z "$DRACUT_SYSTEMD" ]; then + 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 ++ plymouthd --attach-to-session --pid-file /run/plymouth/pid ++ 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 +diff --git a/modules.d/90crypt/crypt-lib.sh b/modules.d/90crypt/crypt-lib.sh +index d66ba88..ebe09f8 100755 +--- a/modules.d/90crypt/crypt-lib.sh ++++ b/modules.d/90crypt/crypt-lib.sh +@@ -47,8 +47,8 @@ ask_for_password() { + + { flock -s 9; + # Prompt for password with plymouth, if installed and running. +- if [ -x /bin/plymouth ] && /bin/plymouth --ping; then +- /bin/plymouth ask-for-password \ ++ if type plymouth >/dev/null 2>&1 && plymouth --ping 2>/dev/null; then ++ plymouth ask-for-password \ + --prompt "$ply_prompt" --number-of-tries=$ply_tries \ + --command="$ply_cmd" + ret=$? +diff --git a/modules.d/90dmsquash-live/dmsquash-live-root.sh b/modules.d/90dmsquash-live/dmsquash-live-root.sh +index a79b0d9..07e41f0 100755 +--- a/modules.d/90dmsquash-live/dmsquash-live-root.sh ++++ b/modules.d/90dmsquash-live/dmsquash-live-root.sh +@@ -31,7 +31,7 @@ if [ "$fs" = "iso9660" -o "$fs" = "udf" ]; then + fi + getarg rd.live.check -d check || check="" + if [ -n "$check" ]; then +- [ -x /bin/plymouth ] && /bin/plymouth --hide-splash ++ type plymouth >/dev/null 2>&1 && plymouth --hide-splash + if [ -n "$DRACUT_SYSTEMD" ]; then + p=$(str_replace "$livedev" "-" '\x2d') + systemctl start checkisomd5@${p}.service +@@ -42,7 +42,7 @@ if [ -n "$check" ]; then + die "CD check failed!" + exit 1 + fi +- [ -x /bin/plymouth ] && /bin/plymouth --show-splash ++ type plymouth >/dev/null 2>&1 && plymouth --show-splash + fi + + ln -s $livedev /run/initramfs/livedev +diff --git a/modules.d/98systemd/dracut-emergency.sh b/modules.d/98systemd/dracut-emergency.sh +index a0a4b12..8ab045e 100755 +--- a/modules.d/98systemd/dracut-emergency.sh ++++ b/modules.d/98systemd/dracut-emergency.sh +@@ -10,7 +10,7 @@ type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh + + source_conf /etc/conf.d + +-[ -x /bin/plymouth ] && /bin/plymouth quit ++type plymouth >/dev/null 2>&1 && plymouth quit + + export _rdshell_name="dracut" action="Boot" hook="emergency" + +diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh +index 1defb6f..9f4b2d2 100755 +--- a/modules.d/99base/dracut-lib.sh ++++ b/modules.d/99base/dracut-lib.sh +@@ -971,8 +971,8 @@ emergency_shell() + shift 2 + elif [ "$1" = "--shutdown" ]; then + _rdshell_name=$2; action="Shutdown"; hook="shutdown-emergency" +- if [ -x /bin/plymouth ]; then +- /bin/plymouth --hide-splash ++ if type plymouth >/dev/null 2>&1; then ++ plymouth --hide-splash + elif [ -x /oldroot/bin/plymouth ]; then + /oldroot/bin/plymouth --hide-splash + fi diff --git a/0020-plymouth-plymouth-pretrigger.sh-fixup-of-ca2c6936.patch b/0020-plymouth-plymouth-pretrigger.sh-fixup-of-ca2c6936.patch new file mode 100644 index 0000000..bdd7e0a --- /dev/null +++ b/0020-plymouth-plymouth-pretrigger.sh-fixup-of-ca2c6936.patch @@ -0,0 +1,22 @@ +From a229b17434e86c0f22f32f42e64a585f4090a93f Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Fri, 12 Apr 2013 15:25:44 +0200 +Subject: [PATCH] plymouth/plymouth-pretrigger.sh: fixup of ca2c6936 + +--- + modules.d/50plymouth/plymouth-pretrigger.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/50plymouth/plymouth-pretrigger.sh b/modules.d/50plymouth/plymouth-pretrigger.sh +index 8087bf6..196f2f9 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 + +-if type plymouthd >/dev/null 2>&1 && [-z "$DRACUT_SYSTEMD" ]; then ++if type plymouthd >/dev/null 2>&1 && [ -z "$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 diff --git a/0021-AUTHORS-update.patch b/0021-AUTHORS-update.patch new file mode 100644 index 0000000..6036eb3 --- /dev/null +++ b/0021-AUTHORS-update.patch @@ -0,0 +1,146 @@ +From 14201d23e7d1dd3b1e6cc7444768c297df03db54 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 11 Apr 2013 10:10:49 +0200 +Subject: [PATCH] AUTHORS: update + +--- + .mailmap | 27 +++++++++++++++------------ + AUTHORS | 27 ++++++++++++++++++--------- + 2 files changed, 33 insertions(+), 21 deletions(-) + +diff --git a/.mailmap b/.mailmap +index bce9b7c..852f269 100644 +--- a/.mailmap ++++ b/.mailmap +@@ -1,12 +1,15 @@ +-Philippe Seewer +-Seewer Philippe +-Philippe Seewer +-Victor Lowther +-Harald Hoyer +-Harald Hoyer +-Mike Snitzer +-Amerigo Wang +-Andrey Borzenkov +-Dan Horák +-John Reiser +-Luca Berra ++Philippe Seewer ++Seewer Philippe ++Philippe Seewer ++Victor Lowther ++Harald Hoyer ++Harald Hoyer ++Mike Snitzer ++Amerigo Wang ++Andrey Borzenkov ++Dan Horák ++John Reiser ++Luca Berra ++Dave Young dyoung@redhat.com ++Frederick Grose ++Frederic Crozat +diff --git a/AUTHORS b/AUTHORS +index fa69b91..3512cad 100644 +--- a/AUTHORS ++++ b/AUTHORS +@@ -6,9 +6,9 @@ Warren Togami + Will Woods + Jeremy Katz + David Dillow ++Dave Young + Michal Soltys + Amerigo Wang +-Dave Young + Colin Guthrie + Andrey Borzenkov + Andreas Thienemann +@@ -17,53 +17,61 @@ Peter Jones + John Reiser + Luca Berra + Daniel Drake ++Dan Horák + Leho Kraav + Brian C. Lane + Marc Grimme + Chao Wang +-Dan Horák ++Frederic Crozat + Jesse Keating + Milan Broz + Roberto Sassu +-dyoung@redhat.com + Anton Blanchard + Bill Nottingham + David Cantrell +-Frederic Crozat + Jon Ander Hernandez + Juan RP + Lance Albertson + Marian Ganisin + Michael Ploujnikov + Peter Rajnoha ++Radek Vykydal ++WANG Chao ++Wim Muskee + Alan Jenkins + Alan Pevec ++Baoquan He + Colin Walters + Dennis Gilmore ++Frederick Grose + Ian Dall + James Buren + Joey Boggs + Mike Snitzer + Przemysław Rudy ++Stefan Reimer + Thomas Lange + Vivek Goyal + Vladislav Bogdanov +-Wim Muskee + Alexander Todorov + Andy Lutomirski + Anssi Hannula + Canek Peláez Valdés + Chris Leech + Christian Heinz ++Cong Wang + Dave Jones ++Dave Young + Duane Griffin +-Frederic Crozat +-Frederick Grose + Glen Gray + Hermann Gausterer + James Laska + Jan Stodola ++Jiri Pirko ++Joe Lawrence ++Kevin Yung + Konrad Rzeszutek Wilk ++Lars R. Damerow + Lennert Buytenhek + Lubomir Rintel + Matt +@@ -71,17 +79,18 @@ Matt Smith + Michal Schmidt + Mike Gorse + Munehiro Matsuda ++Nicolas Chauvet + Nikoli + Olivier Blin + Paolo Bonzini + Peter Robinson + Pádraig Brady + Quentin Armitage +-Radek Vykydal ++Robert Buchholz + Sergey Fionov + Srinivasa T N +-Stefan Reimer + Thilo Bangert ++Thomas Backlund + Tomasz Torcz + Vadim Kuznetsov + Ville Skyttä diff --git a/0022-Makefile-git2spec.pl-use-git-describe.patch b/0022-Makefile-git2spec.pl-use-git-describe.patch new file mode 100644 index 0000000..df18bf0 --- /dev/null +++ b/0022-Makefile-git2spec.pl-use-git-describe.patch @@ -0,0 +1,95 @@ +From 5f8cd1a4bececb879b3b597e7751d8093d71a4bc Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 11 Apr 2013 10:11:14 +0200 +Subject: [PATCH] Makefile,git2spec.pl: use "git describe" + +--- + Makefile | 14 +++++++------- + git2spec.pl | 19 ++----------------- + 2 files changed, 9 insertions(+), 24 deletions(-) + +diff --git a/Makefile b/Makefile +index 40d44eb..6bda766 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,5 +1,6 @@ +-VERSION=027 +-GITVERSION=$(shell [ -d .git ] && git rev-list --abbrev-commit -n 1 HEAD |cut -b 1-8) ++RELEASEDVERSION = -- will be replaced by "make dist" -- ++VERSION = $(shell [ -d .git ] && git describe --abbrev=0 --tags || echo $(RELEASEDVERSION)) ++GITVERSION = $(shell [ -d .git ] && { v=$$(git describe --tags); echo -$${v\#*-}; } ) + + -include Makefile.inc + +@@ -35,7 +36,7 @@ man8pages = dracut.8 \ + manpages = $(man1pages) $(man5pages) $(man7pages) $(man8pages) + + +-.PHONY: install clean archive rpm testimage test all check AUTHORS doc ++.PHONY: install clean archive rpm testimage test all check AUTHORS doc dracut-version.sh + + all: syncheck dracut-version.sh dracut-install + +@@ -138,7 +139,7 @@ endif + install -m 0644 dracut-bash-completion.sh $(DESTDIR)${bashcompletiondir}/dracut + + dracut-version.sh: +- @echo "DRACUT_VERSION=$(VERSION)-$(GITVERSION)" > dracut-version.sh ++ @echo "DRACUT_VERSION=$(VERSION)$(GITVERSION)" > dracut-version.sh + + clean: + $(RM) *~ +@@ -151,15 +152,14 @@ clean: + $(RM) $(manpages) dracut.html + $(MAKE) -C test clean + +-archive: dracut-$(VERSION)-$(GITVERSION).tar.bz2 +- + dist: dracut-$(VERSION).tar.bz2 + + dracut-$(VERSION).tar.bz2: doc + git archive --format=tar $(VERSION) --prefix=dracut-$(VERSION)/ > dracut-$(VERSION).tar + mkdir -p dracut-$(VERSION) + cp $(manpages) dracut.html dracut-$(VERSION) +- tar -rf dracut-$(VERSION).tar dracut-$(VERSION)/*.[0-9] dracut-$(VERSION)/dracut.html ++ sed 's/^RELEASEDVERSION =.*/RELEASEDVERSION = $(VERSION)/' Makefile > dracut-$(VERSION)/Makefile ++ tar --owner=root --group=root -rf dracut-$(VERSION).tar dracut-$(VERSION)/*.[0-9] dracut-$(VERSION)/dracut.html dracut-$(VERSION)/Makefile + rm -fr dracut-$(VERSION).tar.bz2 dracut-$(VERSION) + bzip2 -9 dracut-$(VERSION).tar + rm -f dracut-$(VERSION).tar +diff --git a/git2spec.pl b/git2spec.pl +index 9f12577..0d8adb4 100755 +--- a/git2spec.pl ++++ b/git2spec.pl +@@ -1,21 +1,5 @@ + #!/usr/bin/perl + +-sub last_tag { +- open( GIT, 'git log --pretty=format:%H |'); +- LINE: while( ) { +- open( GIT2, "git tag --contains $_ |"); +- while( ) { +- chomp; +- last LINE if /..*/; +- } +- close GIT2; +- } +- $tag=$_; +- close GIT2; +- close GIT; # be done +- return $tag; +-}; +- + sub create_patches { + my $tag=shift; + my $pdir=shift; +@@ -31,7 +15,8 @@ my $datestr = strftime "%Y%m%d", gmtime; + + my $tag=shift; + my $pdir=shift; +-$tag=&last_tag if not defined $tag; ++$tag=`git describe --abbrev=0 --tags` if not defined $tag; ++chomp($tag); + my @patches=&create_patches($tag, $pdir); + my $num=$#patches + 2; + $tag=~s/[^0-9]+?([0-9]+)/$1/; diff --git a/0023-systemd-include-the-systemd-random-seed-load.service.patch b/0023-systemd-include-the-systemd-random-seed-load.service.patch new file mode 100644 index 0000000..de7c5ed --- /dev/null +++ b/0023-systemd-include-the-systemd-random-seed-load.service.patch @@ -0,0 +1,23 @@ +From 5d68c80b1638636a2cbbdf0fddad0d402e0abcd7 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 11 Apr 2013 13:10:24 +0200 +Subject: [PATCH] systemd: include the systemd-random-seed-load.service + +The systemd cryptsetup-generator wants systemd-random-seed-load.service +in case /dev/urandom is the device. +--- + 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 450b42b..9183626 100755 +--- a/modules.d/98systemd/module-setup.sh ++++ b/modules.d/98systemd/module-setup.sh +@@ -85,6 +85,7 @@ install() { + $systemdsystemunitdir/systemd-ask-password-plymouth.service \ + $systemdsystemunitdir/systemd-journald.service \ + $systemdsystemunitdir/systemd-vconsole-setup.service \ ++ $systemdsystemunitdir/systemd-random-seed-load.service \ + $systemdsystemunitdir/sysinit.target.wants/systemd-modules-load.service \ + $systemdsystemunitdir/sysinit.target.wants/systemd-ask-password-console.path \ + $systemdsystemunitdir/sysinit.target.wants/systemd-journald.service \ diff --git a/0024-url-lib-module-setup.sh-install-ca-bundle.crt-by-lib.patch b/0024-url-lib-module-setup.sh-install-ca-bundle.crt-by-lib.patch new file mode 100644 index 0000000..847e62a --- /dev/null +++ b/0024-url-lib-module-setup.sh-install-ca-bundle.crt-by-lib.patch @@ -0,0 +1,50 @@ +From 1540df0e794d73442188667fa40622bdb6c591b5 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 11 Apr 2013 11:29:00 +0200 +Subject: [PATCH] url-lib/module-setup.sh: install ca-bundle.crt by libcurl.so + +https://bugzilla.redhat.com/show_bug.cgi?id=950770 + +curl seems to look for /etc/pki/tls/certs/ca-bundle.crt + +extract the correct path by disecting libcurl.so +--- + modules.d/45url-lib/module-setup.sh | 19 +++++++++++++------ + 1 file changed, 13 insertions(+), 6 deletions(-) + +diff --git a/modules.d/45url-lib/module-setup.sh b/modules.d/45url-lib/module-setup.sh +index 0fb3667..e8b9700 100755 +--- a/modules.d/45url-lib/module-setup.sh ++++ b/modules.d/45url-lib/module-setup.sh +@@ -12,6 +12,7 @@ depends() { + } + + install() { ++ local _dir _crt _found + inst_simple "$moddir/url-lib.sh" "/lib/url-lib.sh" + dracut_install curl + # also install libs for curl https +@@ -20,11 +21,17 @@ install() { + inst_libdir_file "libsoftokn3.so*" + inst_libdir_file "libsqlite3.so*" + +- mkdir -m 0755 -p "$initdir/etc/ssl/certs" +- if ! inst_any -t /etc/ssl/certs/ca-bundle.crt \ +- /etc/ssl/certs/ca-bundle.crt \ +- /etc/ssl/certs/ca-certificates.crt; then +- dwarn "Couldn't find SSL CA cert bundle; HTTPS won't work." +- fi ++ for _dir in $libdirs; do ++ [[ -d $_dir ]] || continue ++ _crt=$(grep -F --binary-files=text -z .crt $_dir/libcurl.so) ++ [[ $_crt ]] || continue ++ [[ $_crt == /*/* ]] || continue ++ if ! inst_simple "$_crt"; then ++ dwarn "Couldn't install '$_crt' SSL CA cert bundle; HTTPS might not work." ++ continue ++ fi ++ _found=1 ++ done ++ [[ $_found ]] || dwarn "Couldn't find SSL CA cert bundle; HTTPS won't work." + } + diff --git a/0025-dmsquash-live-add-support-for-iso-scan-filename-kern.patch b/0025-dmsquash-live-add-support-for-iso-scan-filename-kern.patch new file mode 100644 index 0000000..eace1f4 --- /dev/null +++ b/0025-dmsquash-live-add-support-for-iso-scan-filename-kern.patch @@ -0,0 +1,88 @@ +From 14499534ba9694591bbcf8741ba7e3a66d71e2d3 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 15 Apr 2013 11:39:32 +0200 +Subject: [PATCH] dmsquash-live: add support for "iso-scan/filename" kernel + parameter + +now you can write grub entries like + + set isofile="/Fedora-live.iso" + loopback loop $isofile + linux loop)/isolinux/vmlinuz iso-scan/filename=$isofile root=live:CDLABEL=Fedora-... + initrd (loop)/isolinux/initrd0.img +--- + modules.d/90dmsquash-live/iso-scan.sh | 25 +++++++++++++++++++++++++ + modules.d/90dmsquash-live/module-setup.sh | 2 ++ + modules.d/90dmsquash-live/parse-iso-scan.sh | 14 ++++++++++++++ + 3 files changed, 41 insertions(+) + create mode 100755 modules.d/90dmsquash-live/iso-scan.sh + create mode 100755 modules.d/90dmsquash-live/parse-iso-scan.sh + +diff --git a/modules.d/90dmsquash-live/iso-scan.sh b/modules.d/90dmsquash-live/iso-scan.sh +new file mode 100755 +index 0000000..9300d12 +--- /dev/null ++++ b/modules.d/90dmsquash-live/iso-scan.sh +@@ -0,0 +1,25 @@ ++#!/bin/sh ++# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- ++# ex: ts=8 sw=4 sts=4 et filetype=sh ++ ++type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh ++ ++PATH=/usr/sbin:/usr/bin:/sbin:/bin ++ ++isofile=$1 ++ ++[ -z "$isofile" ] && exit 1 ++ ++mkdir -p "/run/initramfs/isoscan" ++for dev in /dev/disk/by-uuid/*; do ++ mount -t auto -o ro "$dev" "/run/initramfs/isoscan" || continue ++ if [ -f "/run/initramfs/isoscan/$isofile" ]; then ++ losetup -f "/run/initramfs/isoscan/$isofile" ++ exit 0 ++ else ++ umount "/run/initramfs/isoscan" ++ fi ++done ++ ++rmdir "/run/initramfs/isoscan" ++exit 1 +diff --git a/modules.d/90dmsquash-live/module-setup.sh b/modules.d/90dmsquash-live/module-setup.sh +index 76358da..5b283d1 100755 +--- a/modules.d/90dmsquash-live/module-setup.sh ++++ b/modules.d/90dmsquash-live/module-setup.sh +@@ -23,10 +23,12 @@ install() { + dracut_install umount dmsetup blkid dd losetup grep blockdev + dracut_install -o checkisomd5 + inst_hook cmdline 30 "$moddir/parse-dmsquash-live.sh" ++ inst_hook cmdline 31 "$moddir/parse-iso-scan.sh" + inst_hook pre-udev 30 "$moddir/dmsquash-live-genrules.sh" + inst_hook pre-udev 30 "$moddir/dmsquash-liveiso-genrules.sh" + inst_hook pre-pivot 20 "$moddir/apply-live-updates.sh" + inst_script "$moddir/dmsquash-live-root.sh" "/sbin/dmsquash-live-root" ++ inst_script "$moddir/iso-scan.sh" "/sbin/iso-scan" + # should probably just be generally included + inst_rules 60-cdrom_id.rules + inst_simple "$moddir/checkisomd5@.service" "/etc/systemd/system/checkisomd5@.service" +diff --git a/modules.d/90dmsquash-live/parse-iso-scan.sh b/modules.d/90dmsquash-live/parse-iso-scan.sh +new file mode 100755 +index 0000000..be071fd +--- /dev/null ++++ b/modules.d/90dmsquash-live/parse-iso-scan.sh +@@ -0,0 +1,14 @@ ++#!/bin/sh ++# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- ++# ex: ts=8 sw=4 sts=4 et filetype=sh ++# live images are specified with ++# root=live:backingdev ++ ++isofile=$(getarg iso-scan/filename) ++ ++if [ -n "$isofile" ]; then ++ { ++ printf 'KERNEL=="loop0", RUN+="/sbin/initqueue --settled --onetime --unique /sbin/iso-scan %s"\n' \ ++ "'${isofile}'" ++ } >> /etc/udev/rules.d/99-isofile-mount.rules ++fi diff --git a/dracut.spec b/dracut.spec index 205e53d..5828257 100644 --- a/dracut.spec +++ b/dracut.spec @@ -10,7 +10,7 @@ Name: dracut Version: 027 -Release: 19.git20130410%{?dist} +Release: 26.git20130415%{?dist} Summary: Initramfs generator using udev %if 0%{?fedora} || 0%{?rhel} @@ -47,6 +47,13 @@ Patch15: 0015-Wait-for-logical-interface-to-be-up.patch Patch16: 0016-Let-user-specify-the-action-after-fail.patch Patch17: 0017-ifup.sh-Add-support-for-bridge-over-a-vlan-tagged-in.patch Patch18: 0018-crypt-module-setup.sh-also-handle-UUID-while-filteri.patch +Patch19: 0019-Do-not-call-plymouth-with-full-path.patch +Patch20: 0020-plymouth-plymouth-pretrigger.sh-fixup-of-ca2c6936.patch +Patch21: 0021-AUTHORS-update.patch +Patch22: 0022-Makefile-git2spec.pl-use-git-describe.patch +Patch23: 0023-systemd-include-the-systemd-random-seed-load.service.patch +Patch24: 0024-url-lib-module-setup.sh-install-ca-bundle.crt-by-lib.patch +Patch25: 0025-dmsquash-live-add-support-for-iso-scan-filename-kern.patch BuildRequires: dash bash git @@ -456,6 +463,13 @@ rm -rf $RPM_BUILD_ROOT %{dracutlibdir}/dracut.conf.d/02-norescue.conf %changelog +* Mon Apr 15 2013 Harald Hoyer 027-26.git20130415 +- do not call plymouth with full path +- include systemd-random-seed-load.service +- fix ca-bundle.crt for ssl curl +Resolves: rhbz#950770 +- add support for "iso-scan/filename" kernel parameter + * Wed Apr 10 2013 Harald Hoyer 027-19.git20130410 - also handle UUID= entries in crypttab in host-only mode Resolves:rhbz#919752