From 66318bb058298533e9949168b8aa80c683ced0fc Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 29 Feb 2012 13:24:44 +0100 Subject: [PATCH] update to latest git - fixes for convertfs (/usr-move) --- ...fs-lib-module-setup.sh-removed-touch.patch | 22 ++++++ ...-setup.sh-removed-egrep-and-ls-calls.patch | 26 +++++++ ...ertfs.sh-use-hardlinks-for-inter-usr.patch | 22 ++++++ ....sh-get_fs_env-replaced-egrep-with-s.patch | 25 +++++++ ....sh-instmods-replace-egrep-with-shel.patch | 26 +++++++ ....sh-instmods-removed-special-case-fo.patch | 29 ++++++++ ....sh-instmods-print-only-filename-ins.patch | 25 +++++++ ...-functions.sh-use-a-marker-dir-for-k.patch | 74 +++++++++++++++++++ 0009-dracut.spec-require-hardlink.patch | 21 ++++++ ...module-setup.sh-no-need-to-call-find.patch | 22 ++++++ ...tup.sh-optimize-install-of-all-kbd-f.patch | 24 ++++++ 0012-make-bzip2-optional.patch | 57 ++++++++++++++ 0013-TODO-update.patch | 54 ++++++++++++++ ...ount-usr.sh-ignore-comments-in-fstab.patch | 21 ++++++ ...-usr.sh-check-if-we-have-NEWROOT-etc.patch | 22 ++++++ ...nvertfs.sh-correct-check-for-usr-bin.patch | 22 ++++++ dracut.spec | 24 +++++- 17 files changed, 514 insertions(+), 2 deletions(-) create mode 100644 0001-99fs-lib-module-setup.sh-removed-touch.patch create mode 100644 0002-95nfs-module-setup.sh-removed-egrep-and-ls-calls.patch create mode 100644 0003-30convertfs-convertfs.sh-use-hardlinks-for-inter-usr.patch create mode 100644 0004-dracut-functions.sh-get_fs_env-replaced-egrep-with-s.patch create mode 100644 0005-dracut-functions.sh-instmods-replace-egrep-with-shel.patch create mode 100644 0006-dracut-functions.sh-instmods-removed-special-case-fo.patch create mode 100644 0007-dracut-functions.sh-instmods-print-only-filename-ins.patch create mode 100644 0008-dracut.sh-dracut-functions.sh-use-a-marker-dir-for-k.patch create mode 100644 0009-dracut.spec-require-hardlink.patch create mode 100644 0010-95terminfo-module-setup.sh-no-need-to-call-find.patch create mode 100644 0011-10i18n-module-setup.sh-optimize-install-of-all-kbd-f.patch create mode 100644 0012-make-bzip2-optional.patch create mode 100644 0013-TODO-update.patch create mode 100644 0014-98usrmount-mount-usr.sh-ignore-comments-in-fstab.patch create mode 100644 0015-98usrmount-mount-usr.sh-check-if-we-have-NEWROOT-etc.patch create mode 100644 0016-30convertfs-convertfs.sh-correct-check-for-usr-bin.patch diff --git a/0001-99fs-lib-module-setup.sh-removed-touch.patch b/0001-99fs-lib-module-setup.sh-removed-touch.patch new file mode 100644 index 0000000..cd34043 --- /dev/null +++ b/0001-99fs-lib-module-setup.sh-removed-touch.patch @@ -0,0 +1,22 @@ +From 25b36ef1247499b501a52a75764ebe9fc5a6159c Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Sat, 25 Feb 2012 16:05:51 +0100 +Subject: [PATCH] 99fs-lib/module-setup.sh: removed "touch" + +--- + modules.d/99fs-lib/module-setup.sh | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/modules.d/99fs-lib/module-setup.sh b/modules.d/99fs-lib/module-setup.sh +index 9c900cc..344dcdf 100755 +--- a/modules.d/99fs-lib/module-setup.sh ++++ b/modules.d/99fs-lib/module-setup.sh +@@ -40,7 +40,7 @@ install() { + local _helpers + + inst "$moddir/fs-lib.sh" "/lib/fs-lib.sh" +- touch ${initdir}/etc/fstab.empty ++ > ${initdir}/etc/fstab.empty + + [[ "$nofscks" = "yes" ]] && return + diff --git a/0002-95nfs-module-setup.sh-removed-egrep-and-ls-calls.patch b/0002-95nfs-module-setup.sh-removed-egrep-and-ls-calls.patch new file mode 100644 index 0000000..124a5c6 --- /dev/null +++ b/0002-95nfs-module-setup.sh-removed-egrep-and-ls-calls.patch @@ -0,0 +1,26 @@ +From 5e5f3d5e6c9d94996c9a28bf38f26a4d463c4dd4 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Sat, 25 Feb 2012 16:06:16 +0100 +Subject: [PATCH] 95nfs/module-setup.sh: removed "egrep" and "ls" calls + +--- + modules.d/95nfs/module-setup.sh | 6 +++++- + 1 files changed, 5 insertions(+), 1 deletions(-) + +diff --git a/modules.d/95nfs/module-setup.sh b/modules.d/95nfs/module-setup.sh +index 7aedb4d..7853783 100755 +--- a/modules.d/95nfs/module-setup.sh ++++ b/modules.d/95nfs/module-setup.sh +@@ -54,7 +54,11 @@ install() { + _nsslibs=${_nsslibs#|} + _nsslibs=${_nsslibs%|} + +- dracut_install $(for _i in $(ls {/usr,}$libdir/libnss*.so 2>/dev/null); do echo $_i;done | egrep "$_nsslibs") ++ for _i in {/usr,}$libdir/libnss*.so; do ++ [[ -e $_i ]] || continue ++ [[ "$_i" =~ $_nsslibs ]] || continue ++ dracut_install "$_i" ++ done + + inst_hook cmdline 90 "$moddir/parse-nfsroot.sh" + inst_hook pre-udev 99 "$moddir/nfs-start-rpc.sh" diff --git a/0003-30convertfs-convertfs.sh-use-hardlinks-for-inter-usr.patch b/0003-30convertfs-convertfs.sh-use-hardlinks-for-inter-usr.patch new file mode 100644 index 0000000..db09a0f --- /dev/null +++ b/0003-30convertfs-convertfs.sh-use-hardlinks-for-inter-usr.patch @@ -0,0 +1,22 @@ +From b6f0dcbda13bfb242114d619b4574df2a4f426ae Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Sat, 25 Feb 2012 16:06:38 +0100 +Subject: [PATCH] 30convertfs/convertfs.sh: use hardlinks for inter-/usr cp + +--- + modules.d/30convertfs/convertfs.sh | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/modules.d/30convertfs/convertfs.sh b/modules.d/30convertfs/convertfs.sh +index 69c3b3e..036ec51 100755 +--- a/modules.d/30convertfs/convertfs.sh ++++ b/modules.d/30convertfs/convertfs.sh +@@ -106,7 +106,7 @@ for dir in bin sbin lib lib64; do + [[ -d "$ROOT/$dir" ]] || continue + echo "Make a copy of \`$ROOT/usr/$dir'." + [[ -d "$ROOT/usr/$dir" ]] \ +- && cp -ax $CP_HARDLINK "$ROOT/usr/$dir" "$ROOT/usr/${dir}.usrmove-new" ++ && cp -ax -l "$ROOT/usr/$dir" "$ROOT/usr/${dir}.usrmove-new" + echo "Merge the copy with \`$ROOT/$dir'." + [[ -d "$ROOT/usr/${dir}.usrmove-new" ]] \ + || mkdir -p "$ROOT/usr/${dir}.usrmove-new" diff --git a/0004-dracut-functions.sh-get_fs_env-replaced-egrep-with-s.patch b/0004-dracut-functions.sh-get_fs_env-replaced-egrep-with-s.patch new file mode 100644 index 0000000..a7474db --- /dev/null +++ b/0004-dracut-functions.sh-get_fs_env-replaced-egrep-with-s.patch @@ -0,0 +1,25 @@ +From 07f3e4f1689545bd5817c785ee97a3f668239014 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Sat, 25 Feb 2012 16:07:45 +0100 +Subject: [PATCH] dracut-functions.sh: get_fs_env() replaced egrep with shell + +--- + dracut-functions.sh | 5 ++++- + 1 files changed, 4 insertions(+), 1 deletions(-) + +diff --git a/dracut-functions.sh b/dracut-functions.sh +index bb0c96f..9e9ee4e 100755 +--- a/dracut-functions.sh ++++ b/dracut-functions.sh +@@ -168,7 +168,10 @@ get_fs_env() { + [[ $1 ]] || return + unset ID_FS_TYPE + unset ID_FS_UUID +- eval $(udevadm info --query=env --name=$1|egrep 'ID_FS_(TYPE|UUID)=') ++ eval $(udevadm info --query=env --name=$1 \ ++ | while read line; do ++ [[ "$line" =~ 'ID_FS_(TYPE|UUID)=' ]] && echo $line; ++ done) + [[ $ID_FS_TYPE ]] && return + + if [[ -x /lib/udev/vol_id ]]; then diff --git a/0005-dracut-functions.sh-instmods-replace-egrep-with-shel.patch b/0005-dracut-functions.sh-instmods-replace-egrep-with-shel.patch new file mode 100644 index 0000000..28bf867 --- /dev/null +++ b/0005-dracut-functions.sh-instmods-replace-egrep-with-shel.patch @@ -0,0 +1,26 @@ +From 86191581d125b1373532593371fde767a56728a0 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Sat, 25 Feb 2012 16:08:30 +0100 +Subject: [PATCH] dracut-functions.sh: instmods(): replace egrep with shell + code + +--- + dracut-functions.sh | 3 ++- + 1 files changed, 2 insertions(+), 1 deletions(-) + +diff --git a/dracut-functions.sh b/dracut-functions.sh +index 9e9ee4e..81801e1 100755 +--- a/dracut-functions.sh ++++ b/dracut-functions.sh +@@ -1167,9 +1167,10 @@ instmods() { + return $_ret + } + ++ local _filter_not_found='FATAL: Module .* not found.' + # Capture all stderr from modprobe to _fderr. We could use {var}>... + # redirections, but that would make dracut require bash4 at least. + eval "( instmods_1 \"\$@\" ) ${_fderr}>&1" \ +- | egrep -v 'FATAL: Module .* not found.' | derror ++ | while read line; do [[ "$line" =~ $_filter_not_found ]] || echo $line;done | derror + return $? + } diff --git a/0006-dracut-functions.sh-instmods-removed-special-case-fo.patch b/0006-dracut-functions.sh-instmods-removed-special-case-fo.patch new file mode 100644 index 0000000..111cbfb --- /dev/null +++ b/0006-dracut-functions.sh-instmods-removed-special-case-fo.patch @@ -0,0 +1,29 @@ +From edea870c3cade3a9f8836e75afa98587945908d2 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Sat, 25 Feb 2012 16:09:38 +0100 +Subject: [PATCH] dracut-functions.sh: instmods() removed special case for + "=ata" + +--- + dracut-functions.sh | 8 +------- + 1 files changed, 1 insertions(+), 7 deletions(-) + +diff --git a/dracut-functions.sh b/dracut-functions.sh +index 81801e1..bd3203d 100755 +--- a/dracut-functions.sh ++++ b/dracut-functions.sh +@@ -1103,13 +1103,7 @@ instmods() { + local _mod="$1" + case $_mod in + =*) +- # This introduces 2 incompatible meanings for =* arguments +- # to instmods. We need to decide which one to keep. +- if [[ $_mod = =ata && -f $srcmods/modules.block ]]; then +- ( [[ "$_mpargs" ]] && echo $_mpargs +- egrep 'ata|ahci' "${srcmods}/modules.block" ) \ +- | instmods +- elif [ -f $srcmods/modules.${_mod#=} ]; then ++ if [ -f $srcmods/modules.${_mod#=} ]; then + ( [[ "$_mpargs" ]] && echo $_mpargs + cat "${srcmods}/modules.${_mod#=}" ) \ + | instmods diff --git a/0007-dracut-functions.sh-instmods-print-only-filename-ins.patch b/0007-dracut-functions.sh-instmods-print-only-filename-ins.patch new file mode 100644 index 0000000..11d21b3 --- /dev/null +++ b/0007-dracut-functions.sh-instmods-print-only-filename-ins.patch @@ -0,0 +1,25 @@ +From 334cc2832770b71e5e6b6f245e5a24cced8eaac6 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Sat, 25 Feb 2012 16:10:07 +0100 +Subject: [PATCH] dracut-functions.sh: instmods() print only filename instead + of fullpath + +do not print the full path, when we use "find" for kernel modules, but +rather only the filename. +--- + dracut-functions.sh | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/dracut-functions.sh b/dracut-functions.sh +index bd3203d..80714aa 100755 +--- a/dracut-functions.sh ++++ b/dracut-functions.sh +@@ -1109,7 +1109,7 @@ instmods() { + | instmods + else + ( [[ "$_mpargs" ]] && echo $_mpargs +- find "$srcmods" -path "*/${_mod#=}/*" ) \ ++ find "$srcmods" -path "*/${_mod#=}/*" -printf '%f\n' ) \ + | instmods + fi + ;; diff --git a/0008-dracut.sh-dracut-functions.sh-use-a-marker-dir-for-k.patch b/0008-dracut.sh-dracut-functions.sh-use-a-marker-dir-for-k.patch new file mode 100644 index 0000000..6f2c6d9 --- /dev/null +++ b/0008-dracut.sh-dracut-functions.sh-use-a-marker-dir-for-k.patch @@ -0,0 +1,74 @@ +From 379c34d2cf29de3268bbbe83ec09f60b74340313 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Sat, 25 Feb 2012 16:11:36 +0100 +Subject: [PATCH] dracut.sh/dracut-functions.sh: use a marker-dir for kernel + modules + +use "$initdir/.kernelmodseen" to mark kernel modules, which we already +handled with install_kmod_with_fw() +--- + dracut-functions.sh | 10 +++++++--- + dracut.sh | 5 +++++ + 2 files changed, 12 insertions(+), 3 deletions(-) + +diff --git a/dracut-functions.sh b/dracut-functions.sh +index 80714aa..c7337e9 100755 +--- a/dracut-functions.sh ++++ b/dracut-functions.sh +@@ -974,9 +974,14 @@ for_each_module_dir() { + # $1 = full path to kernel module to install + install_kmod_with_fw() { + # no need to go further if the module is already installed ++ + [[ -e "${initdir}/lib/modules/$kernel/${1##*/lib/modules/$kernel/}" ]] \ + && return 0 + ++ [[ -e "$initdir/.kernelmodseen/${1##*/}" ]] && return 0 ++ ++ > "$initdir/.kernelmodseen/${1##*/}" ++ + if [[ $omit_drivers ]]; then + local _kmod=${1##*/} + _kmod=${_kmod%.ko} +@@ -1116,16 +1121,15 @@ instmods() { + --*) _mpargs+=" $_mod" ;; + i2o_scsi) return ;; # Do not load this diagnostic-only module + *) ++ _mod=${_mod##*/} + # if we are already installed, skip this module and go on + # to the next one. +- [[ -f $initdir/$1 ]] && return ++ [[ -f "$initdir/.kernelmodseen/${_mod%.ko}.ko" ]] && return + + if [[ $omit_drivers ]] && [[ "$1" =~ $omit_drivers ]]; then + dinfo "Omitting driver ${_mod##$srcmods}" + return + fi +- +- _mod=${_mod##*/} + # If we are building a host-specific initramfs and this + # module is not already loaded, move on to the next one. + [[ $hostonly ]] && ! grep -qe "\<${_mod//-/_}\>" /proc/modules \ +diff --git a/dracut.sh b/dracut.sh +index e6c36d9..88691ae 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -676,6 +676,8 @@ if [[ $kernel_only != yes ]]; then + mkdir -p "${initdir}/etc/cmdline.d" + fi + ++mkdir -p "$initdir/.kernelmodseen" ++ + mods_to_load="" + # check all our modules to see if they should be sourced. + # This builds a list of modules that we will install next. +@@ -766,6 +768,9 @@ if [[ $kernel_only != yes ]]; then + fi + fi + ++rm -fr "$initdir/.kernelmodseen" ++ ++ + if (($maxloglvl >= 5)); then + ddebug "Listing sizes of included files:" + du -c "$initdir" | sort -n | ddebug diff --git a/0009-dracut.spec-require-hardlink.patch b/0009-dracut.spec-require-hardlink.patch new file mode 100644 index 0000000..6177571 --- /dev/null +++ b/0009-dracut.spec-require-hardlink.patch @@ -0,0 +1,21 @@ +From 7a5f1ee46a07e00d1687a0c2cd6c13319626f17d Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Sat, 25 Feb 2012 16:40:38 +0100 +Subject: [PATCH] dracut.spec: require "hardlink" + +--- + dracut.spec | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/dracut.spec b/dracut.spec +index 1ec8b68..4102bb0 100644 +--- a/dracut.spec ++++ b/dracut.spec +@@ -71,6 +71,7 @@ Requires: cpio + Requires: filesystem >= 2.1.0 + Requires: findutils + Requires: grep ++Requires: hardlink + Requires: gzip + Requires: module-init-tools >= 3.7-9 + Requires: sed diff --git a/0010-95terminfo-module-setup.sh-no-need-to-call-find.patch b/0010-95terminfo-module-setup.sh-no-need-to-call-find.patch new file mode 100644 index 0000000..c4d2289 --- /dev/null +++ b/0010-95terminfo-module-setup.sh-no-need-to-call-find.patch @@ -0,0 +1,22 @@ +From ddd01008ff0b7b3daf5708ac32a6ccd0e843b3fc Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Sat, 25 Feb 2012 16:51:35 +0100 +Subject: [PATCH] 95terminfo/module-setup.sh: no need to call "find" + +--- + modules.d/95terminfo/module-setup.sh | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/modules.d/95terminfo/module-setup.sh b/modules.d/95terminfo/module-setup.sh +index aec3582..32a3fe9 100755 +--- a/modules.d/95terminfo/module-setup.sh ++++ b/modules.d/95terminfo/module-setup.sh +@@ -10,7 +10,7 @@ install() { + done + + if [ -d ${_terminfodir} ]; then +- for f in $(find ${_terminfodir} -type f); do ++ for f in ${_terminfodir}/*/*; do + inst_simple $f + done + fi diff --git a/0011-10i18n-module-setup.sh-optimize-install-of-all-kbd-f.patch b/0011-10i18n-module-setup.sh-optimize-install-of-all-kbd-f.patch new file mode 100644 index 0000000..f3c1b27 --- /dev/null +++ b/0011-10i18n-module-setup.sh-optimize-install-of-all-kbd-f.patch @@ -0,0 +1,24 @@ +From cf38fc7389d4136d0f77d9709c87acc4283f6bd6 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Sat, 25 Feb 2012 17:18:51 +0100 +Subject: [PATCH] 10i18n/module-setup.sh: optimize install of all kbd files + +--- + modules.d/10i18n/module-setup.sh | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/modules.d/10i18n/module-setup.sh b/modules.d/10i18n/module-setup.sh +index a5a3388..b4c19e1 100755 +--- a/modules.d/10i18n/module-setup.sh ++++ b/modules.d/10i18n/module-setup.sh +@@ -92,8 +92,8 @@ install() { + install_all_kbd() { + local rel f + +- for f in $(eval find ${kbddir}/{${KBDSUBDIRS}} -type f -print) +- do ++ find $(eval echo ${kbddir}/{${KBDSUBDIRS}}) -type f -print | \ ++ while read f; do + inst_simple $f + done + diff --git a/0012-make-bzip2-optional.patch b/0012-make-bzip2-optional.patch new file mode 100644 index 0000000..ec642d5 --- /dev/null +++ b/0012-make-bzip2-optional.patch @@ -0,0 +1,57 @@ +From b7ddf6c1d8c861a75865b4b0fb716d838e4885ab Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Sat, 25 Feb 2012 17:22:02 +0100 +Subject: [PATCH] make bzip2 optional + +--- + dracut.spec | 1 - + modules.d/10i18n/module-setup.sh | 9 ++++++++- + modules.d/99img-lib/module-setup.sh | 2 +- + 3 files changed, 9 insertions(+), 3 deletions(-) + +diff --git a/dracut.spec b/dracut.spec +index 4102bb0..91b3451 100644 +--- a/dracut.spec ++++ b/dracut.spec +@@ -65,7 +65,6 @@ Obsoletes: dracut-kernel < 005 + Provides: dracut-kernel = %{version}-%{release} + + Requires: bash +-Requires: bzip2 + Requires: coreutils + Requires: cpio + Requires: filesystem >= 2.1.0 +diff --git a/modules.d/10i18n/module-setup.sh b/modules.d/10i18n/module-setup.sh +index b4c19e1..d1854c2 100755 +--- a/modules.d/10i18n/module-setup.sh ++++ b/modules.d/10i18n/module-setup.sh +@@ -100,8 +100,15 @@ install() { + # remove unnecessary files + rm -f "${initdir}${kbddir}/consoletrans/utflist" + find "${initdir}${kbddir}/" -name README\* -delete ++ find "${initdir}${kbddir}/" -name '*.gz' -print -quit \ ++ | while read line; do ++ dracut_install gzip ++ done + +- dracut_install gzip bzip2 ++ find "${initdir}${kbddir}/" -name '*.bz2' -print -quit \ ++ | while read line; do ++ dracut_install bzip2 ++ done + } + + install_local_i18n() { +diff --git a/modules.d/99img-lib/module-setup.sh b/modules.d/99img-lib/module-setup.sh +index eead2ab..f0e6dac 100755 +--- a/modules.d/99img-lib/module-setup.sh ++++ b/modules.d/99img-lib/module-setup.sh +@@ -17,7 +17,7 @@ install() { + dracut_install tar gzip dd + dracut_install -o cpio xz + # TODO: make this conditional on a cmdline flag / config option +- # dracut_install -o bzip2 ++ dracut_install -o bzip2 + inst "$moddir/img-lib.sh" "/lib/img-lib.sh" + } + diff --git a/0013-TODO-update.patch b/0013-TODO-update.patch new file mode 100644 index 0000000..a40b506 --- /dev/null +++ b/0013-TODO-update.patch @@ -0,0 +1,54 @@ +From 34769a1445836bb43df3f27d8771ef6b86f29771 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 28 Feb 2012 12:19:39 +0100 +Subject: [PATCH] TODO: update + +--- + TODO | 23 ++++++++++++++++------- + 1 files changed, 16 insertions(+), 7 deletions(-) + +diff --git a/TODO b/TODO +index e5abef0..6c27268 100644 +--- a/TODO ++++ b/TODO +@@ -1,24 +1,33 @@ +-Current TODO list, broken into things which are relevant for the initramfs itself (/init et al) vs the generator. A lot of things are/should be marked with "FIXME" in the code ++Current TODO list, broken into things which are relevant for the ++initramfs itself (/init et al) vs the generator. ++A lot of things are/should be marked with "FIXME" in the code. ++ ++Items are ordered in priority. ++ + INITRAMFS TODO + +-- The hard-coded list of udev rules that we care about is kind of lame. ++- put "root=" parsing hooks in separate hook dir ++- call "root=" parsing hooks after getting new rootpath from dhcp ++- put mount hook in main initqueue loop ++- the hard-coded list of udev rules that we care about is kind of lame. + - automatic kexec fallback + - panic fallback +-- fsck for $NEWROOT/usr + + GENERATOR TODO + +-- Default module specification could use some work +-- udev rule copying, as mentioned above, is a bit too hard-coded ++- add mechanism for module specific command line options + - pkg-config integration, to make it easy for other packages to use us. + - add recovery image creator (mkrecovery) ++- default module specification could use some work ++- udev rule copying, as mentioned above, is a bit too hard-coded + + CODE TODO +-- document functions ++ ++- document more functions + - make function vars local, and prefix with "_" + + Future Enhancement Requests + + - run ssh server to enter crypto password or perform debugging (supported by debian) +-- Bug 524727 - Dracut + encrypted root + networking ++- https://bugzilla.redhat.com/show_bug.cgi?id=524727 - Dracut + encrypted root + networking + diff --git a/0014-98usrmount-mount-usr.sh-ignore-comments-in-fstab.patch b/0014-98usrmount-mount-usr.sh-ignore-comments-in-fstab.patch new file mode 100644 index 0000000..770de2e --- /dev/null +++ b/0014-98usrmount-mount-usr.sh-ignore-comments-in-fstab.patch @@ -0,0 +1,21 @@ +From b642ce5340dfd72145793f2ca0fe8fdfe7e7dd84 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 28 Feb 2012 12:54:01 +0100 +Subject: [PATCH] 98usrmount/mount-usr.sh: ignore comments in fstab + +--- + modules.d/98usrmount/mount-usr.sh | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/modules.d/98usrmount/mount-usr.sh b/modules.d/98usrmount/mount-usr.sh +index 3e23b15..f9d049e 100755 +--- a/modules.d/98usrmount/mount-usr.sh ++++ b/modules.d/98usrmount/mount-usr.sh +@@ -39,6 +39,7 @@ mount_usr() + local _dev _mp _fs _opts _rest _usr_found _ret _freq _passno + # check, if we have to mount the /usr filesystem + while read _dev _mp _fs _opts _freq _passno; do ++ [ "${_dev%%#*}" != "$_dev" ] && continue + if [ "$_mp" = "/usr" ]; then + case "$_dev" in + LABEL=*) diff --git a/0015-98usrmount-mount-usr.sh-check-if-we-have-NEWROOT-etc.patch b/0015-98usrmount-mount-usr.sh-check-if-we-have-NEWROOT-etc.patch new file mode 100644 index 0000000..92ca908 --- /dev/null +++ b/0015-98usrmount-mount-usr.sh-check-if-we-have-NEWROOT-etc.patch @@ -0,0 +1,22 @@ +From 9eded206c90c0ce65b1addc55e4a8d83fb66ad3b Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 28 Feb 2012 16:35:08 +0100 +Subject: [PATCH] 98usrmount/mount-usr.sh: check, if we have + $NEWROOT/etc/fstab + +--- + modules.d/98usrmount/mount-usr.sh | 4 +++- + 1 files changed, 3 insertions(+), 1 deletions(-) + +diff --git a/modules.d/98usrmount/mount-usr.sh b/modules.d/98usrmount/mount-usr.sh +index f9d049e..39f75b9 100755 +--- a/modules.d/98usrmount/mount-usr.sh ++++ b/modules.d/98usrmount/mount-usr.sh +@@ -73,4 +73,6 @@ mount_usr() + fi + } + +-mount_usr ++if [ -f "$NEWROOT/etc/fstab" ]; then ++ mount_usr ++fi diff --git a/0016-30convertfs-convertfs.sh-correct-check-for-usr-bin.patch b/0016-30convertfs-convertfs.sh-correct-check-for-usr-bin.patch new file mode 100644 index 0000000..1bb61e8 --- /dev/null +++ b/0016-30convertfs-convertfs.sh-correct-check-for-usr-bin.patch @@ -0,0 +1,22 @@ +From 97ce24ad8c97ca061675cf341301153a5314f851 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Wed, 29 Feb 2012 13:21:51 +0100 +Subject: [PATCH] 30convertfs/convertfs.sh: correct check for /usr/bin + +--- + modules.d/30convertfs/convertfs.sh | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/modules.d/30convertfs/convertfs.sh b/modules.d/30convertfs/convertfs.sh +index 036ec51..83cb68a 100755 +--- a/modules.d/30convertfs/convertfs.sh ++++ b/modules.d/30convertfs/convertfs.sh +@@ -47,7 +47,7 @@ if ! needconvert; then + exit 0 + fi + +-if [ -e "$ROOT/usr/bin" ]; then ++if ! [ -e "$ROOT/usr/bin" ]; then + echo "$ROOT/usr/bin does not exist" + exit 1 + fi diff --git a/dracut.spec b/dracut.spec index 6ec2b1a..5b81676 100644 --- a/dracut.spec +++ b/dracut.spec @@ -10,7 +10,7 @@ Name: dracut Version: 017 -Release: 1%{?dist} +Release: 17.git20120229%{?dist} Summary: Initramfs generator using udev %if 0%{?fedora} || 0%{?rhel} @@ -24,6 +24,22 @@ URL: https://dracut.wiki.kernel.org/ # Source can be generated by # http://git.kernel.org/?p=boot/dracut/dracut.git;a=snapshot;h=%{version};sf=tgz Source0: http://www.kernel.org/pub/linux/utils/boot/dracut/dracut-%{version}.tar.bz2 +Patch1: 0001-99fs-lib-module-setup.sh-removed-touch.patch +Patch2: 0002-95nfs-module-setup.sh-removed-egrep-and-ls-calls.patch +Patch3: 0003-30convertfs-convertfs.sh-use-hardlinks-for-inter-usr.patch +Patch4: 0004-dracut-functions.sh-get_fs_env-replaced-egrep-with-s.patch +Patch5: 0005-dracut-functions.sh-instmods-replace-egrep-with-shel.patch +Patch6: 0006-dracut-functions.sh-instmods-removed-special-case-fo.patch +Patch7: 0007-dracut-functions.sh-instmods-print-only-filename-ins.patch +Patch8: 0008-dracut.sh-dracut-functions.sh-use-a-marker-dir-for-k.patch +Patch9: 0009-dracut.spec-require-hardlink.patch +Patch10: 0010-95terminfo-module-setup.sh-no-need-to-call-find.patch +Patch11: 0011-10i18n-module-setup.sh-optimize-install-of-all-kbd-f.patch +Patch12: 0012-make-bzip2-optional.patch +Patch13: 0013-TODO-update.patch +Patch14: 0014-98usrmount-mount-usr.sh-ignore-comments-in-fstab.patch +Patch15: 0015-98usrmount-mount-usr.sh-check-if-we-have-NEWROOT-etc.patch +Patch16: 0016-30convertfs-convertfs.sh-correct-check-for-usr-bin.patch BuildArch: noarch @@ -66,12 +82,12 @@ Obsoletes: dracut-kernel < 005 Provides: dracut-kernel = %{version}-%{release} Requires: bash -Requires: bzip2 Requires: coreutils Requires: cpio Requires: filesystem >= 2.1.0 Requires: findutils Requires: grep +Requires: hardlink Requires: gzip Requires: module-init-tools >= 3.7-9 Requires: sed @@ -327,6 +343,10 @@ rm -rf $RPM_BUILD_ROOT %dir /var/lib/dracut/overlay %changelog +* Wed Feb 29 2012 Harald Hoyer 017-17.git20120229 +- update to latest git +- fixes for convertfs (/usr-move) + * Fri Feb 24 2012 Harald Hoyer 017-1 - version 017