Harald Hoyer 66318b
From b7ddf6c1d8c861a75865b4b0fb716d838e4885ab Mon Sep 17 00:00:00 2001
Harald Hoyer 66318b
From: Harald Hoyer <harald@redhat.com>
Harald Hoyer 66318b
Date: Sat, 25 Feb 2012 17:22:02 +0100
Harald Hoyer 66318b
Subject: [PATCH] make bzip2 optional
Harald Hoyer 66318b
Harald Hoyer 66318b
---
Harald Hoyer 66318b
 dracut.spec                         |    1 -
Harald Hoyer 66318b
 modules.d/10i18n/module-setup.sh    |    9 ++++++++-
Harald Hoyer 66318b
 modules.d/99img-lib/module-setup.sh |    2 +-
Harald Hoyer 66318b
 3 files changed, 9 insertions(+), 3 deletions(-)
Harald Hoyer 66318b
Harald Hoyer 66318b
diff --git a/dracut.spec b/dracut.spec
Harald Hoyer 66318b
index 4102bb0..91b3451 100644
Harald Hoyer 66318b
--- a/dracut.spec
Harald Hoyer 66318b
+++ b/dracut.spec
Harald Hoyer 66318b
@@ -65,7 +65,6 @@ Obsoletes: dracut-kernel < 005
Harald Hoyer 66318b
 Provides:  dracut-kernel = %{version}-%{release}
Harald Hoyer 66318b
 
Harald Hoyer 66318b
 Requires: bash
Harald Hoyer 66318b
-Requires: bzip2
Harald Hoyer 66318b
 Requires: coreutils
Harald Hoyer 66318b
 Requires: cpio
Harald Hoyer 66318b
 Requires: filesystem >= 2.1.0
Harald Hoyer 66318b
diff --git a/modules.d/10i18n/module-setup.sh b/modules.d/10i18n/module-setup.sh
Harald Hoyer 66318b
index b4c19e1..d1854c2 100755
Harald Hoyer 66318b
--- a/modules.d/10i18n/module-setup.sh
Harald Hoyer 66318b
+++ b/modules.d/10i18n/module-setup.sh
Harald Hoyer 66318b
@@ -100,8 +100,15 @@ install() {
Harald Hoyer 66318b
         # remove unnecessary files
Harald Hoyer 66318b
         rm -f "${initdir}${kbddir}/consoletrans/utflist"
Harald Hoyer 66318b
         find "${initdir}${kbddir}/" -name README\* -delete
Harald Hoyer 66318b
+        find "${initdir}${kbddir}/" -name '*.gz' -print -quit \
Harald Hoyer 66318b
+            | while read line; do
Harald Hoyer 66318b
+            dracut_install gzip
Harald Hoyer 66318b
+            done
Harald Hoyer 66318b
 
Harald Hoyer 66318b
-        dracut_install gzip bzip2
Harald Hoyer 66318b
+        find "${initdir}${kbddir}/" -name '*.bz2' -print -quit \
Harald Hoyer 66318b
+            | while read line; do
Harald Hoyer 66318b
+            dracut_install bzip2
Harald Hoyer 66318b
+            done
Harald Hoyer 66318b
     }
Harald Hoyer 66318b
 
Harald Hoyer 66318b
     install_local_i18n() {
Harald Hoyer 66318b
diff --git a/modules.d/99img-lib/module-setup.sh b/modules.d/99img-lib/module-setup.sh
Harald Hoyer 66318b
index eead2ab..f0e6dac 100755
Harald Hoyer 66318b
--- a/modules.d/99img-lib/module-setup.sh
Harald Hoyer 66318b
+++ b/modules.d/99img-lib/module-setup.sh
Harald Hoyer 66318b
@@ -17,7 +17,7 @@ install() {
Harald Hoyer 66318b
     dracut_install tar gzip dd
Harald Hoyer 66318b
     dracut_install -o cpio xz
Harald Hoyer 66318b
     # TODO: make this conditional on a cmdline flag / config option
Harald Hoyer 66318b
-    # dracut_install -o bzip2
Harald Hoyer 66318b
+    dracut_install -o bzip2
Harald Hoyer 66318b
     inst "$moddir/img-lib.sh" "/lib/img-lib.sh"
Harald Hoyer 66318b
 }
Harald Hoyer 66318b