[dracut/f16] fix 750603

Tom Callaway spot at fedoraproject.org
Tue Nov 1 19:32:01 UTC 2011


commit 360acc530a1a74221628befe80728854968e1210
Author: Tom "spot" Callaway <tcallawa at redhat.com>
Date:   Tue Nov 1 15:31:56 2011 -0400

    fix 750603

 ...nst_script-should-call-inst_simple-750603.patch |   28 ++++++++++++++++++++
 dracut.spec                                        |   10 ++++++-
 2 files changed, 37 insertions(+), 1 deletions(-)
---
diff --git a/0001-inst_script-should-call-inst_simple-750603.patch b/0001-inst_script-should-call-inst_simple-750603.patch
new file mode 100644
index 0000000..ad61aa6
--- /dev/null
+++ b/0001-inst_script-should-call-inst_simple-750603.patch
@@ -0,0 +1,28 @@
+From 0fdc68eb96b2820eedbe789c2544b2bc3a49c549 Mon Sep 17 00:00:00 2001
+From: "Brian C. Lane" <bcl at redhat.com>
+Date: Tue, 1 Nov 2011 12:13:57 -0700
+Subject: [PATCH] inst_script should call inst_simple (#750603)
+
+inst_script checks for a shebang, if it doesn't exist it exits.
+If it does it should not be calling inst_binary, it should call
+inst_simple like it used to.
+---
+ dracut-functions |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/dracut-functions b/dracut-functions
+index 23aa14f..5e2acd3 100755
+--- a/dracut-functions
++++ b/dracut-functions
+@@ -449,7 +449,7 @@ inst_script() {
+     [[ $debug ]] && _line=$(echo -n "$_line" | tr -c -d '[:print:][:space:]')
+     _shebang_regex='(#! *)(/[^ ]+).*'
+     [[ $_line =~ $_shebang_regex ]] || return 1
+-    inst "${BASH_REMATCH[2]}" && inst_binary "$@"
++    inst "${BASH_REMATCH[2]}" && inst_simple "$@"
+ }
+ 
+ # same as above, but specialized for symlinks
+-- 
+1.7.6.4
+
diff --git a/dracut.spec b/dracut.spec
index 6e7f6d5..891051a 100644
--- a/dracut.spec
+++ b/dracut.spec
@@ -8,7 +8,7 @@
 
 Name: dracut
 Version: 013
-Release: 17%{?dist}
+Release: 18%{?dist}
 
 Summary: Initramfs generator using udev
 %if 0%{?fedora} || 0%{?rhel} > 6
@@ -79,6 +79,7 @@ Patch92: 0092-dracut-functions-inst_dir-handle-relative-symlinks.patch
 Patch93: 0093-90livenet-module-setup.sh-silence-check-for-wget.patch
 Patch95: 0095-90livenet-do-not-install-by-default.patch
 Patch96: 0096-dracut-functions-do-not-install-files-from-current-d.patch
+Patch97: 0001-inst_script-should-call-inst_simple-750603.patch
 
 BuildArch: noarch
 BuildRequires: dash bash
@@ -268,6 +269,7 @@ This package contains tools to assemble the local initrd and host configuration.
 %patch93 -p1
 %patch95 -p1
 %patch96 -p1
+%patch97 -p1
 
 chmod a+x modules.d/*/*.sh
 find . -name '*.orig' -print0 | xargs -0 rm -f
@@ -409,6 +411,12 @@ rm -rf $RPM_BUILD_ROOT
 %dir /var/lib/dracut/overlay
 
 %changelog
+* Tue Nov 01 2011 Tom Callaway <spot at fedoraproject.org> 013-18
+- do not try to run inst_binary on a shell script if we know 
+  it is a shell script, this fails. call inst_simple instead.
+  Thanks to Brian C. Lane. 
+Resolves: rhbz#750603
+
 * Tue Nov 01 2011 Harald Hoyer <harald at redhat.com> 013-17
 - Do not drop backslashes, when reading the kernel command line
 Resolves: rhbz#748663


More information about the scm-commits mailing list