From 9808694bc5ba48855fed51f01bdfc8132fc13a89 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Mon, 2 Jul 2012 19:13:39 +0200 Subject: [PATCH] dracut: backported patch to fix --hostonly with dracut-install. --- .../patches/dracut-resolve-lazy-fix.patch | 61 +++++++++++++++++++ srcpkgs/dracut/template | 2 +- 2 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/dracut/patches/dracut-resolve-lazy-fix.patch diff --git a/srcpkgs/dracut/patches/dracut-resolve-lazy-fix.patch b/srcpkgs/dracut/patches/dracut-resolve-lazy-fix.patch new file mode 100644 index 00000000000..b6e98d4e792 --- /dev/null +++ b/srcpkgs/dracut/patches/dracut-resolve-lazy-fix.patch @@ -0,0 +1,61 @@ +Backported patch from master to make dracut --hostonly work while +lazy resolving deps in dracut-install. + +http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut/dracut;a=commitdiff;h=998bf6e0888d93443278c2ff5335fc594d318e4b + +--- dracut.sh.orig 2012-07-02 19:06:26.472444019 +0200 ++++ dracut.sh 2012-07-02 19:09:01.052274527 +0200 +@@ -783,6 +783,27 @@ if [[ $no_kernel != yes ]]; then + dinfo "*** Installing kernel module dependencies and firmware done ***" + fi + ++if [[ $kernel_only != yes ]]; then ++ (( ${#install_items[@]} > 0 )) && dracut_install ${install_items[@]} ++ ++ while pop fstab_lines line; do ++ echo "$line 0 0" >> "${initdir}/etc/fstab" ++ done ++ ++ for f in $add_fstab; do ++ cat $f >> "${initdir}/etc/fstab" ++ done ++ ++ if [[ $DRACUT_RESOLVE_LAZY ]] && [[ $DRACUT_INSTALL ]]; then ++ dinfo "*** Resolving executable dependencies ***" ++ find "$initdir" -type f \ ++ '(' -perm -0100 -or -perm -0010 -or -perm -0001 ')' \ ++ -not -path '*.ko' -print0 \ ++ | xargs -r -0 $DRACUT_INSTALL ${initdir+-D "$initdir"} -R ${DRACUT_FIPS_MODE+-H} ++ dinfo "*** Resolving executable dependencies done***" ++ fi ++fi ++ + while pop include_src src && pop include_target tgt; do + if [[ $src && $tgt ]]; then + if [[ -f $src ]]; then +@@ -810,25 +831,6 @@ while pop include_src src && pop include + done + + if [[ $kernel_only != yes ]]; then +- (( ${#install_items[@]} > 0 )) && dracut_install ${install_items[@]} +- +- while pop fstab_lines line; do +- echo "$line 0 0" >> "${initdir}/etc/fstab" +- done +- +- for f in $add_fstab; do +- cat $f >> "${initdir}/etc/fstab" +- done +- +- if [[ $DRACUT_RESOLVE_LAZY ]] && [[ -x /usr/bin/dracut-install ]]; then +- dinfo "*** Resolving executable dependencies ***" +- find "$initdir" -type f \ +- '(' -perm -0100 -or -perm -0010 -or -perm -0001 ')' \ +- -not -path '*.ko' -print0 \ +- | xargs -0 dracut-install ${initdir+-D "$initdir"} -R ${DRACUT_FIPS_MODE+-H} +- dinfo "*** Resolving executable dependencies done***" +- fi +- + # make sure that library links are correct and up to date + for f in /etc/ld.so.conf /etc/ld.so.conf.d/*; do + [[ -f $f ]] && inst_simple "$f" diff --git a/srcpkgs/dracut/template b/srcpkgs/dracut/template index 217c21dff77..553430cd694 100644 --- a/srcpkgs/dracut/template +++ b/srcpkgs/dracut/template @@ -1,7 +1,7 @@ # Template file for 'dracut' pkgname=dracut version=020 -revision=1 +revision=2 build_style=gnu-makefile make_build_args="sysconfdir=/etc systemdsystemunitdir=/lib/systemd/system" make_install_args="sysconfdir=/etc systemdsystemunitdir=/lib/systemd/system"