diff --git a/0003-dracut-don-t-skip-zero-length-string-outfile-argumen.patch b/0003-dracut-don-t-skip-zero-length-string-outfile-argumen.patch index 6fd8282..c0a0d0c 100644 --- a/0003-dracut-don-t-skip-zero-length-string-outfile-argumen.patch +++ b/0003-dracut-don-t-skip-zero-length-string-outfile-argumen.patch @@ -1,7 +1,7 @@ From dbf381f7fb369bd6336272847da882d8ef0e5a30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amadeusz=20=C5=BBo=C5=82nowski?= Date: Tue, 29 Mar 2011 01:21:56 +0200 -Subject: [PATCH 3/3] dracut: don't skip zero-length string outfile argument +Subject: [PATCH] dracut: don't skip zero-length string outfile argument When '' was passed as outfile, dracut generated name with following pattern: @@ -27,6 +27,3 @@ index 6b67dc0..c16b222 100755 outfile=$1 elif [[ $kernel = "unset" ]]; then kernel=$1 --- -1.7.3.4 - diff --git a/0004-dracut-simplify-kernel-version-argument-setting.patch b/0004-dracut-simplify-kernel-version-argument-setting.patch new file mode 100644 index 0000000..9d030bf --- /dev/null +++ b/0004-dracut-simplify-kernel-version-argument-setting.patch @@ -0,0 +1,39 @@ +From 8a5354a9a5264c67a84c4705c931c5f554d8d343 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 29 Mar 2011 11:21:54 +0200 +Subject: [PATCH] dracut: simplify $kernel version argument setting + +--- + dracut | 5 ++--- + 1 files changed, 2 insertions(+), 3 deletions(-) + +diff --git a/dracut b/dracut +index c16b222..0a96c66 100755 +--- a/dracut ++++ b/dracut +@@ -187,7 +187,6 @@ push_arg() { + fi + } + +-kernel="unset" + verbosity_mod_l=0 + + while (($# > 0)); do +@@ -239,7 +238,7 @@ while (($# > 0)); do + *) + if ! [[ ${outfile+x} ]]; then + outfile=$1 +- elif [[ $kernel = "unset" ]]; then ++ elif ! [[ ${kernel+x} ]]; then + kernel=$1 + else + usage; exit 1; +@@ -248,7 +247,7 @@ while (($# > 0)); do + esac + shift + done +-if ! [[ $kernel ]] || [[ $kernel = "unset" ]]; then ++if ! [[ $kernel ]]; then + kernel=$(uname -r) + fi + [[ $outfile ]] || outfile="/boot/initramfs-$kernel.img" diff --git a/0005-dracut-source-reformat-with-line-breaks.patch b/0005-dracut-source-reformat-with-line-breaks.patch new file mode 100644 index 0000000..c31094b --- /dev/null +++ b/0005-dracut-source-reformat-with-line-breaks.patch @@ -0,0 +1,24 @@ +From 2aad23443e995b99dd1477ed018c5ac472a06aea Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 29 Mar 2011 11:27:15 +0200 +Subject: [PATCH] dracut: source reformat with line breaks + +--- + dracut | 4 +++- + 1 files changed, 3 insertions(+), 1 deletions(-) + +diff --git a/dracut b/dracut +index 0a96c66..c156cdb 100755 +--- a/dracut ++++ b/dracut +@@ -222,7 +222,9 @@ while (($# > 0)); do + -H|--hostonly) hostonly_l="yes" ;; + --fstab) use_fstab_l="yes" ;; + -h|--help) usage; exit 1 ;; +- -i|--include) push include_src "$2"; push include_target "$3"; shift 2;; ++ -i|--include) push include_src "$2" ++ push include_target "$3" ++ shift 2;; + --bzip2) compress_l="bzip2";; + --lzma) compress_l="lzma";; + --xz) compress_l="xz";; diff --git a/0006-dracut-functions-bashified-ret-ret-to-ret.patch b/0006-dracut-functions-bashified-ret-ret-to-ret.patch new file mode 100644 index 0000000..037e9c6 --- /dev/null +++ b/0006-dracut-functions-bashified-ret-ret-to-ret.patch @@ -0,0 +1,22 @@ +From a16ebfd56abfb02f28b72a74c68c24501e2a75d7 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 29 Mar 2011 11:30:27 +0200 +Subject: [PATCH] dracut-functions: bashified ret=ret+$? to ret+=$? + +--- + dracut-functions | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/dracut-functions b/dracut-functions +index 2accaec..2fc2471 100755 +--- a/dracut-functions ++++ b/dracut-functions +@@ -787,7 +787,7 @@ instmods() { + # it may require + for_each_kmod_dep install_kmod_with_fw $mod \ + --set-version $kernel ${moddirname} +- ret=$((ret+$?)) ++ ((ret+=$?)) + ;; + esac + shift diff --git a/0007-dracut-removed-extra-char-in-Including-modules-done.patch b/0007-dracut-removed-extra-char-in-Including-modules-done.patch new file mode 100644 index 0000000..cf4e419 --- /dev/null +++ b/0007-dracut-removed-extra-char-in-Including-modules-done.patch @@ -0,0 +1,22 @@ +From ea216a650ef738e324253f27b59d74e3d8aa6062 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 29 Mar 2011 14:45:08 +0200 +Subject: [PATCH] dracut: removed extra char in "Including modules done" + +--- + dracut | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/dracut b/dracut +index c156cdb..404b9db 100755 +--- a/dracut ++++ b/dracut +@@ -493,7 +493,7 @@ for moddir in "$dracutbasedir/modules.d"/[0-9][0-9]*; do + fi + done + unset moddir +-dinfo "*** Including modules' done ***" ++dinfo "*** Including modules done ***" + + ## final stuff that has to happen + diff --git a/0008-dracut-add-lib-firmware-updates-to-default-firmware-.patch b/0008-dracut-add-lib-firmware-updates-to-default-firmware-.patch new file mode 100644 index 0000000..c54c916 --- /dev/null +++ b/0008-dracut-add-lib-firmware-updates-to-default-firmware-.patch @@ -0,0 +1,22 @@ +From 8bc650d9dc6dd50ea3b955d5068c2f805a5d1878 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 29 Mar 2011 15:32:34 +0200 +Subject: [PATCH] dracut: add "/lib/firmware/updates" to default firmware path + +--- + dracut | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/dracut b/dracut +index 404b9db..c6605bb 100755 +--- a/dracut ++++ b/dracut +@@ -350,7 +350,7 @@ stdloglvl=$((stdloglvl + verbosity_mod_l)) + [[ $mdadmconf_l ]] && mdadmconf=$mdadmconf_l + [[ $lvmconf_l ]] && lvmconf=$lvmconf_l + [[ $dracutbasedir ]] || dracutbasedir=/usr/share/dracut +-[[ $fw_dir ]] || fw_dir=/lib/firmware ++[[ $fw_dir ]] || fw_dir="/lib/firmware/updates /lib/firmware" + [[ $do_strip ]] || do_strip=no + [[ $compress_l ]] && compress=$compress_l + [[ $show_modules_l ]] && show_modules=$show_modules_l diff --git a/0009-40network-dhcp-root.sh-s-initqueue-finished-initqueu.patch b/0009-40network-dhcp-root.sh-s-initqueue-finished-initqueu.patch new file mode 100644 index 0000000..ac20279 --- /dev/null +++ b/0009-40network-dhcp-root.sh-s-initqueue-finished-initqueu.patch @@ -0,0 +1,20 @@ +From 85323dcbb957e7fa3daebd3d5b2f9563ef379ca2 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 29 Mar 2011 15:46:53 +0200 +Subject: [PATCH] 40network/dhcp-root.sh: s#initqueue-finished#initqueue/finished#g + +--- + modules.d/40network/dhcp-root.sh | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/modules.d/40network/dhcp-root.sh b/modules.d/40network/dhcp-root.sh +index 8c5d723..85c7f08 100755 +--- a/modules.d/40network/dhcp-root.sh ++++ b/modules.d/40network/dhcp-root.sh +@@ -21,5 +21,5 @@ if [ "$root" = "dhcp" ] || [ "$root" = "dhcp6" ] || [ "$netroot" = "dhcp" ] ; th + + # Shut up init error check + [ -z "$root" ] && root="dhcp" +- echo '[ -d $NEWROOT/proc -o -e /dev/root ]' > $hookdir/initqueue-finished/dhcp.sh ++ echo '[ -d $NEWROOT/proc -o -e /dev/root ]' > $hookdir/initqueue/finished/dhcp.sh + fi diff --git a/0010-Ensure-rpc_pipefs-is-mounted.patch b/0010-Ensure-rpc_pipefs-is-mounted.patch new file mode 100644 index 0000000..68cac9c --- /dev/null +++ b/0010-Ensure-rpc_pipefs-is-mounted.patch @@ -0,0 +1,26 @@ +From c174aea07decb62d264b40301ee944ba50244438 Mon Sep 17 00:00:00 2001 +From: Jon Ander Hernandez +Date: Fri, 18 Feb 2011 12:24:06 +0100 +Subject: [PATCH] Ensure rpc_pipefs is mounted + +While on some systems (like Fedora) rpc_pipefs is mounted +automatically when sunrpc module is loaded, on Debian based systems it +needs to be mounted manually. +--- + modules.d/95nfs/nfsroot | 3 +++ + 1 files changed, 3 insertions(+), 0 deletions(-) + +diff --git a/modules.d/95nfs/nfsroot b/modules.d/95nfs/nfsroot +index 486c0e1..f4c5051 100755 +--- a/modules.d/95nfs/nfsroot ++++ b/modules.d/95nfs/nfsroot +@@ -90,6 +90,9 @@ options=${options:+$options,}$nfsrw + [ -x /sbin/rpcbind ] && [ -z "$(pidof rpcbind)" ] && rpcbind + + if [ "$nfs" = "nfs4" ]; then ++ [ ! -d /var/lib/nfs/rpc_pipefs/nfs ] && \ ++ mount -t rpc_pipefs rpc_pipefs /var/lib/nfs/rpc_pipefs ++ + # Start rpc.statd as mount won't let us use locks on a NFSv4 + # filesystem without talking to it. NFSv4 does locks internally, + # rpc.lockd isn't needed diff --git a/0011-plymouth-gensplash-check-for-console_init-before-cal.patch b/0011-plymouth-gensplash-check-for-console_init-before-cal.patch new file mode 100644 index 0000000..b169a52 --- /dev/null +++ b/0011-plymouth-gensplash-check-for-console_init-before-cal.patch @@ -0,0 +1,36 @@ +From 7931bf04204ab41d6e87890e172f2805718bb93a Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 29 Mar 2011 16:38:11 +0200 +Subject: [PATCH] plymouth gensplash: check for console_init before calling it + +Thanks Jon Ander Hernandez! +--- + modules.d/50gensplash/gensplash-pretrigger.sh | 2 +- + modules.d/50plymouth/plymouth-pretrigger.sh | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/modules.d/50gensplash/gensplash-pretrigger.sh b/modules.d/50gensplash/gensplash-pretrigger.sh +index 5350405..b0330a4 100755 +--- a/modules.d/50gensplash/gensplash-pretrigger.sh ++++ b/modules.d/50gensplash/gensplash-pretrigger.sh +@@ -9,7 +9,7 @@ if getargbool 1 rd.splash -n rd_NO_SPLASH; then + + info "Starting Gentoo Splash" + +- /lib/udev/console_init tty0 ++ [ -x /lib/udev/console_init ] && /lib/udev/console_init tty0 + CDROOT=0 + . /lib/gensplash-lib.sh + splash init +diff --git a/modules.d/50plymouth/plymouth-pretrigger.sh b/modules.d/50plymouth/plymouth-pretrigger.sh +index eae0be2..d560d6f 100755 +--- a/modules.d/50plymouth/plymouth-pretrigger.sh ++++ b/modules.d/50plymouth/plymouth-pretrigger.sh +@@ -19,6 +19,6 @@ if getargbool 1 rd.plymouth -n rd_NO_PLYMOUTH; then + info "Starting plymouth daemon" + [ -x /bin/plymouthd ] && /bin/plymouthd --attach-to-session + >/run/initramfs/plymouth +- /lib/udev/console_init tty0 ++ [ -x /lib/udev/console_init ] && /lib/udev/console_init tty0 + /bin/plymouth --show-splash 2>&1 | vinfo + fi diff --git a/0012-base-init-fix-cdrom-polling.patch b/0012-base-init-fix-cdrom-polling.patch new file mode 100644 index 0000000..7d638d3 --- /dev/null +++ b/0012-base-init-fix-cdrom-polling.patch @@ -0,0 +1,22 @@ +From e620bb01da5c957c311f336c2f963c9bd9f692c5 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Wed, 30 Mar 2011 00:01:00 +0200 +Subject: [PATCH] base/init: fix cdrom polling + +--- + modules.d/99base/init | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/modules.d/99base/init b/modules.d/99base/init +index b6f4e92..a30706b 100755 +--- a/modules.d/99base/init ++++ b/modules.d/99base/init +@@ -234,7 +234,7 @@ while :; do + strstr "$(udevadm info --query=env --path=${cdrom##/sys})" \ + ID_CDROM_MEDIA && continue + +- if [ -e "$cdrom"/events_poll_msecs -a -n -e "/tmp/.poll_${cdrom##*/}" ]; then ++ if [ -e "$cdrom"/events_poll_msecs -a ! -e "/tmp/.poll_${cdrom##*/}" ]; then + msecs=$(while read a; do echo $a;done < "$cdrom"/events_poll_msecs) + if [ "$msecs" = "-1" ]; then + echo 250 > "$cdrom"/events_poll_msecs diff --git a/0013-base-dracut-lib.sh-relax-getargbool-value-parsing.patch b/0013-base-dracut-lib.sh-relax-getargbool-value-parsing.patch new file mode 100644 index 0000000..1b33f7b --- /dev/null +++ b/0013-base-dracut-lib.sh-relax-getargbool-value-parsing.patch @@ -0,0 +1,24 @@ +From 4ad453445a7c8695c774cbfd2f5bd863e47e78df Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Wed, 30 Mar 2011 01:45:17 +0200 +Subject: [PATCH] base/dracut-lib.sh: relax getargbool value parsing + +if a non-boolean value was specified, like "yes" or "no", +getargbool() would error, because we check for "$val -eq 0" +--- + modules.d/99base/dracut-lib.sh | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh +index a5406ab..37b3e76 100755 +--- a/modules.d/99base/dracut-lib.sh ++++ b/modules.d/99base/dracut-lib.sh +@@ -98,7 +98,7 @@ getargbool() { + _b=$(getarg "$@") + [ $? -ne 0 -a -z "$_b" ] && _b=$_default + if [ -n "$_b" ]; then +- [ $_b -eq 0 ] && return 1 ++ [ $_b = "0" ] && return 1 + [ $_b = "no" ] && return 1 + fi + return 0 diff --git a/0014-doc-s-init.log-run-initramfs-init.log-g.patch b/0014-doc-s-init.log-run-initramfs-init.log-g.patch new file mode 100644 index 0000000..02903a2 --- /dev/null +++ b/0014-doc-s-init.log-run-initramfs-init.log-g.patch @@ -0,0 +1,36 @@ +From 561d7f4d7c7f6245a45c0943c91518654284e457 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Wed, 30 Mar 2011 03:22:14 +0200 +Subject: [PATCH] doc: s#/init.log#/run/initramfs/init.log#g + +--- + dracut.kernel.7.xml | 2 +- + dracut.xml | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/dracut.kernel.7.xml b/dracut.kernel.7.xml +index 0eba171..ced98f4 100644 +--- a/dracut.kernel.7.xml ++++ b/dracut.kernel.7.xml +@@ -134,7 +134,7 @@ This parameter can be specified multiple times. + rd.debug + + +- set -x for the dracut shell and logs to dmesg, console and /init.log ++ set -x for the dracut shell and logs to dmesg, console and /run/initramfs/init.log + + + +diff --git a/dracut.xml b/dracut.xml +index 9b70f0c..4f71de5 100644 +--- a/dracut.xml ++++ b/dracut.xml +@@ -307,7 +307,7 @@ rd.live.overlay/ + + With dracut >= 002-11, you can inspect the rd.debug output with: + +- # less /init.log ++ # less /run/initramfs/init.log + # dmesg | less + + diff --git a/0015-base-init-fixed-compat-dev-.initramfs-copy.patch b/0015-base-init-fixed-compat-dev-.initramfs-copy.patch new file mode 100644 index 0000000..043afd4 --- /dev/null +++ b/0015-base-init-fixed-compat-dev-.initramfs-copy.patch @@ -0,0 +1,33 @@ +From 249f8b5bfc90d9a8ec542e870a527a08e1da7cc3 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Wed, 30 Mar 2011 03:23:37 +0200 +Subject: [PATCH] base/init: fixed compat /dev/.initramfs copy + +--- + modules.d/99base/init | 12 ++++++------ + 1 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/modules.d/99base/init b/modules.d/99base/init +index a30706b..83d9568 100755 +--- a/modules.d/99base/init ++++ b/modules.d/99base/init +@@ -379,13 +379,13 @@ if [ -d "$NEWROOT"/run ]; then + mount --move /run "$NEWROOT"/run + else + if [ -e /run/initramfs ]; then +- mkdir -m 0755 /dev/.initramfs +- cp -axr /run/initramfs/* /dev/.initramfs >/dev/null 2>&1 +- fi +- if [ -e /run/mdadm ]; then +- mkdir -m 0755 /dev/.mdadm +- cp -axr /run/mdadm/* /dev/.mdadm >/dev/null 2>&1 ++ cp -axr /run/initramfs /dev/.initramfs >/dev/null 2>&1 ++ if [ -e /run/initramfs/live ]; then ++ mkdir -m 0755 /dev/.initramfs/live ++ mount --move /run/initramfs/live /dev/.initramfs/live ++ fi + fi ++ umount -l /run + fi + + if [ -f /etc/capsdrop ]; then diff --git a/dracut.spec b/dracut.spec index 9bf1137..88a31d7 100644 --- a/dracut.spec +++ b/dracut.spec @@ -8,7 +8,7 @@ Name: dracut Version: 009 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Initramfs generator using udev %if 0%{?fedora} @@ -21,6 +21,18 @@ License: GPLv2+ URL: https://dracut.wiki.kernel.org/ Source0: http://www.kernel.org/pub/linux/utils/boot/dracut/dracut-009.tar.bz2 Patch3: 0003-dracut-don-t-skip-zero-length-string-outfile-argumen.patch +Patch4: 0004-dracut-simplify-kernel-version-argument-setting.patch +Patch5: 0005-dracut-source-reformat-with-line-breaks.patch +Patch6: 0006-dracut-functions-bashified-ret-ret-to-ret.patch +Patch7: 0007-dracut-removed-extra-char-in-Including-modules-done.patch +Patch8: 0008-dracut-add-lib-firmware-updates-to-default-firmware-.patch +Patch9: 0009-40network-dhcp-root.sh-s-initqueue-finished-initqueu.patch +Patch10: 0010-Ensure-rpc_pipefs-is-mounted.patch +Patch11: 0011-plymouth-gensplash-check-for-console_init-before-cal.patch +Patch12: 0012-base-init-fix-cdrom-polling.patch +Patch13: 0013-base-dracut-lib.sh-relax-getargbool-value-parsing.patch +Patch14: 0014-doc-s-init.log-run-initramfs-init.log-g.patch +Patch15: 0015-base-init-fixed-compat-dev-.initramfs-copy.patch BuildArch: noarch @@ -97,7 +109,7 @@ Requires: rpcbind %if %{with_nbd} Requires: nbd %endif -Requires: net-tools iproute +Requires: iproute Requires: bridge-utils %if 0%{?fedora} @@ -155,6 +167,18 @@ This package contains tools to assemble the local initrd and host configuration. %prep %setup -q -n %{name}-%{version}%{?dashgittag} %patch3 -p1 +%patch4 -p1 +%patch5 -p1 +%patch6 -p1 +%patch7 -p1 +%patch8 -p1 +%patch9 -p1 +%patch10 -p1 +%patch11 -p1 +%patch12 -p1 +%patch13 -p1 +%patch14 -p1 +%patch15 -p1 %build make WITH_SWITCH_ROOT=0%{?with_switch_root} @@ -291,6 +315,13 @@ rm -rf $RPM_BUILD_ROOT %dir /var/lib/dracut/overlay %changelog +* Wed Mar 30 2011 Harald Hoyer 009-3 +- fixed dhcp +- added /lib/firmware/updates to firmware directories +- fixed LiveCD /dev/.initramfs fallback +- fixed cdrom polling +- dropped net-tools dependency + * Tue Mar 29 2011 Harald Hoyer 009-2 - fixed empty output file argument handling: "dracut '' "