* [PATCH] kbuild: deb-pkg fix install scripts for posix sh
@ 2009-07-05 18:17 maximilian attems
2009-07-08 7:28 ` Frans Pop
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: maximilian attems @ 2009-07-05 18:17 UTC (permalink / raw)
To: linux-kbuild; +Cc: sam, maximilian attems, Frans Pop, Andres Salomon
bash versus dash and posh disagree on expanding $@ within double quotes:
export x="$@"
see http://bugs.debian.org/381091 for details
just use the arglist with $*.
dpkg: error processing linux-image-2.6.31-rc1_2.6.31-rc1-18_i386.deb (--install):
subprocess pre-installation script returned error exit status 2
export: 6: 2.6.31-rc1-18: bad variable name
fixes http://bugzilla.kernel.org/show_bug.cgi?id=13567
seen on Ubuntu as there dash is the default sh,
versus bash on Debian.
Reported-by: Pauli <suokkos@gmail.com>
Cc: Frans Pop <elendil@planet.nl>
Cc: Andres Salomon <dilinger@debian.org>
Signed-off-by: maximilian attems <max@stro.at>
---
scripts/package/builddeb | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index b19f1f4..8b357b0 100644
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -89,7 +89,7 @@ for script in postinst postrm preinst prerm ; do
set -e
# Pass maintainer script parameters to hook scripts
-export DEB_MAINT_PARAMS="\$@"
+export DEB_MAINT_PARAMS="\$*"
test -d $debhookdir/$script.d && run-parts --arg="$version" $debhookdir/$script.d
exit 0
--
1.5.6.5
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] kbuild: deb-pkg fix install scripts for posix sh
2009-07-05 18:17 [PATCH] kbuild: deb-pkg fix install scripts for posix sh maximilian attems
@ 2009-07-08 7:28 ` Frans Pop
2009-07-09 21:49 ` Andres Salomon
2009-07-17 21:03 ` Sam Ravnborg
2 siblings, 0 replies; 4+ messages in thread
From: Frans Pop @ 2009-07-08 7:28 UTC (permalink / raw)
To: maximilian attems; +Cc: linux-kbuild, sam, Andres Salomon
On Sunday 05 July 2009, maximilian attems wrote:
> bash versus dash and posh disagree on expanding $@ within double
> quotes: export x="$@"
> see http://bugs.debian.org/381091 for details
> just use the arglist with $*.
[...]
> diff --git a/scripts/package/builddeb b/scripts/package/builddeb
> index b19f1f4..8b357b0 100644
> --- a/scripts/package/builddeb
> +++ b/scripts/package/builddeb
> @@ -89,7 +89,7 @@ for script in postinst postrm preinst prerm ; do
> set -e
>
> # Pass maintainer script parameters to hook scripts
> -export DEB_MAINT_PARAMS="\$@"
> +export DEB_MAINT_PARAMS="\$*"
Although blindly replacing "$@" by "$*" can cause regressions because they
*do* expand differently [1], I do not see a problem in this case given
that AFAIK Debian maintainer scripts only pass parameters without
whitespace in them.
Acked-by: Frans Pop <elendil@planet.nl>
[1] $@ preserves quoting; try the following:
cat <<EOF >test.fjp
#! /bin/bash
for i in "$*"; do echo $i; done
for i in "$@"; do echo $i; done
EOF
chmod +x test.fjp
./test.fjp This "is a" test
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] kbuild: deb-pkg fix install scripts for posix sh
2009-07-05 18:17 [PATCH] kbuild: deb-pkg fix install scripts for posix sh maximilian attems
2009-07-08 7:28 ` Frans Pop
@ 2009-07-09 21:49 ` Andres Salomon
2009-07-17 21:03 ` Sam Ravnborg
2 siblings, 0 replies; 4+ messages in thread
From: Andres Salomon @ 2009-07-09 21:49 UTC (permalink / raw)
To: maximilian attems; +Cc: linux-kbuild, sam, Frans Pop, linux-kernel
On Sun, 5 Jul 2009 20:17:34 +0200
maximilian attems <max@stro.at> wrote:
> bash versus dash and posh disagree on expanding $@ within double
> quotes: export x="$@"
> see http://bugs.debian.org/381091 for details
> just use the arglist with $*.
>
> dpkg: error processing linux-image-2.6.31-rc1_2.6.31-rc1-18_i386.deb
> (--install): subprocess pre-installation script returned error exit
> status 2 export: 6: 2.6.31-rc1-18: bad variable name
> fixes http://bugzilla.kernel.org/show_bug.cgi?id=13567
>
> seen on Ubuntu as there dash is the default sh,
> versus bash on Debian.
>
Acked-By: Andres Salomon <dilinger@collabora.co.uk>
This should be applied ASAP, as it breaks things for every
ubuntu user who attempts to use 'make deb-pkg'.
> Reported-by: Pauli <suokkos@gmail.com>
> Cc: Frans Pop <elendil@planet.nl>
> Cc: Andres Salomon <dilinger@debian.org>
> Signed-off-by: maximilian attems <max@stro.at>
> ---
> scripts/package/builddeb | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/scripts/package/builddeb b/scripts/package/builddeb
> index b19f1f4..8b357b0 100644
> --- a/scripts/package/builddeb
> +++ b/scripts/package/builddeb
> @@ -89,7 +89,7 @@ for script in postinst postrm preinst prerm ; do
> set -e
>
> # Pass maintainer script parameters to hook scripts
> -export DEB_MAINT_PARAMS="\$@"
> +export DEB_MAINT_PARAMS="\$*"
>
> test -d $debhookdir/$script.d && run-parts --arg="$version"
> $debhookdir/$script.d exit 0
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] kbuild: deb-pkg fix install scripts for posix sh
2009-07-05 18:17 [PATCH] kbuild: deb-pkg fix install scripts for posix sh maximilian attems
2009-07-08 7:28 ` Frans Pop
2009-07-09 21:49 ` Andres Salomon
@ 2009-07-17 21:03 ` Sam Ravnborg
2 siblings, 0 replies; 4+ messages in thread
From: Sam Ravnborg @ 2009-07-17 21:03 UTC (permalink / raw)
To: maximilian attems; +Cc: linux-kbuild, Frans Pop, Andres Salomon
On Sun, Jul 05, 2009 at 08:17:34PM +0200, maximilian attems wrote:
> bash versus dash and posh disagree on expanding $@ within double quotes:
> export x="$@"
> see http://bugs.debian.org/381091 for details
> just use the arglist with $*.
>
> dpkg: error processing linux-image-2.6.31-rc1_2.6.31-rc1-18_i386.deb (--install):
> subprocess pre-installation script returned error exit status 2
> export: 6: 2.6.31-rc1-18: bad variable name
> fixes http://bugzilla.kernel.org/show_bug.cgi?id=13567
>
> seen on Ubuntu as there dash is the default sh,
> versus bash on Debian.
>
> Reported-by: Pauli <suokkos@gmail.com>
> Cc: Frans Pop <elendil@planet.nl>
> Cc: Andres Salomon <dilinger@debian.org>
> Signed-off-by: maximilian attems <max@stro.at>
Applied to kbuild-fixes.git
Sam
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-07-17 21:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-05 18:17 [PATCH] kbuild: deb-pkg fix install scripts for posix sh maximilian attems
2009-07-08 7:28 ` Frans Pop
2009-07-09 21:49 ` Andres Salomon
2009-07-17 21:03 ` Sam Ravnborg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox