dracut/0012-make-bzip2-optional.patch

58 lines
1.9 KiB
Diff
Raw Normal View History

From b7ddf6c1d8c861a75865b4b0fb716d838e4885ab Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
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"
}