From 5b605e1960f6ea716e92e66ec88de0cb2ceab6a5 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 8 Jun 2009 13:22:30 -0400 Subject: [PATCH] Fix bash shebang and recognise bash scripts as editable shell scripts when converting to deb. Closes: #532330 (Thanks, Bruce Stephens) --- Alien/Package/Deb.pm | 2 +- Alien/Package/Rpm.pm | 2 +- debian/changelog | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Alien/Package/Deb.pm b/Alien/Package/Deb.pm index 67d5d96..38fd540 100644 --- a/Alien/Package/Deb.pm +++ b/Alien/Package/Deb.pm @@ -738,7 +738,7 @@ sub postinst { return $postinst unless %$owninfo; my ($firstline, $rest)=split(/\n/, $postinst, 2); - if ($firstline !~ m/^#!\s*\/bin\/sh/) { + if ($firstline !~ m/^#!\s*\/bin\/(ba)?sh/) { print STDERR "warning: unable to add ownership fixup code to postinst as the postinst is not a shell script!\n"; return $postinst; } diff --git a/Alien/Package/Rpm.pm b/Alien/Package/Rpm.pm index 467f6d0..e3a0771 100644 --- a/Alien/Package/Rpm.pm +++ b/Alien/Package/Rpm.pm @@ -497,7 +497,7 @@ sub _script_helper { $value="#!/bin/bash\n$prefixcode$value"; } else { - $value=~s@^#!\s*/bin/sh(\s)@#/bin/bash$1@; + $value=~s@^#!\s*/bin/sh(\s)@#!/bin/bash$1@; $value=~s/\n/\n$prefixcode/s; } $this->{$script} = $value; diff --git a/debian/changelog b/debian/changelog index e5b70fe..7fd6e1d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,9 @@ alien (8.76) UNRELEASED; urgency=low * Avoid using hostname -f for portability to unix systems, such as Solaris, where any options _set_ the hostname. + * Fix bash shebang and recognise bash scripts as editable + shell scripts when converting to deb. Closes: #532330 + (Thanks, Bruce Stephens) -- Joey Hess Fri, 29 May 2009 13:02:54 -0400