linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [powerpc] do not expect executable permissions for in-tree shell scripts
@ 2010-06-05  8:10 Olaf Hering
  2010-06-05 17:32 ` Sean MacLennan
  0 siblings, 1 reply; 6+ messages in thread
From: Olaf Hering @ 2010-06-05  8:10 UTC (permalink / raw)
  To: linuxppc-dev, Benjamin Herrenschmidt; +Cc: stable


scripts in the kernel source do not have executable permissions if they were created with patch(1)
run mkuboot.sh with bash, its tagged as bash script.

/opt/cross/kernel/linux-2.6.33-cross-host-kernel-source/arch/powerpc/boot/wrapper: line 273: /opt/cross/kernel/linux-2.6.33-cross-host-kernel-source/scripts/mkuboot.sh: Permission denied

Signed-off-by: Olaf Hering <olaf@aepfle.de>

---

This happens with 2.6.33, other versions have this bug as well.

 arch/powerpc/boot/wrapper |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- linux-2.6.33-cross-host-kernel-source.orig/arch/powerpc/boot/wrapper
+++ linux-2.6.33-cross-host-kernel-source/arch/powerpc/boot/wrapper
@@ -270,7 +270,7 @@ membase=`${CROSS}objdump -p "$kernel" |
 case "$platform" in
 uboot)
     rm -f "$ofile"
-    ${MKIMAGE} -A ppc -O linux -T kernel -C gzip -a $membase -e $membase \
+    bash ${MKIMAGE} -A ppc -O linux -T kernel -C gzip -a $membase -e $membase \
 	$uboot_version -d "$vmz" "$ofile"
     if [ -z "$cacheit" ]; then
 	rm -f "$vmz"
@@ -330,7 +330,7 @@ coff)
     ;;
 cuboot*)
     gzip -f -9 "$ofile"
-    ${MKIMAGE} -A ppc -O linux -T kernel -C gzip -a "$base" -e "$entry" \
+    bash ${MKIMAGE} -A ppc -O linux -T kernel -C gzip -a "$base" -e "$entry" \
             $uboot_version -d "$ofile".gz "$ofile"
     ;;
 treeboot*)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] [powerpc] do not expect executable permissions for in-tree shell scripts
  2010-06-05  8:10 [PATCH] [powerpc] do not expect executable permissions for in-tree shell scripts Olaf Hering
@ 2010-06-05 17:32 ` Sean MacLennan
  2010-06-05 17:44   ` Olaf Hering
  0 siblings, 1 reply; 6+ messages in thread
From: Sean MacLennan @ 2010-06-05 17:32 UTC (permalink / raw)
  To: Olaf Hering; +Cc: linuxppc-dev, stable

On Sat, 5 Jun 2010 10:10:39 +0200
Olaf Hering <olaf@aepfle.de> wrote:

> scripts in the kernel source do not have executable permissions if
> they were created with patch(1) run mkuboot.sh with bash, its tagged
> as bash script.

Wouldn't it be better to use ${SHELL}? Not every system has bash.

Cheers,
   Sean

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] [powerpc] do not expect executable permissions for in-tree shell scripts
  2010-06-05 17:32 ` Sean MacLennan
@ 2010-06-05 17:44   ` Olaf Hering
  2010-06-05 18:00     ` Sean MacLennan
  0 siblings, 1 reply; 6+ messages in thread
From: Olaf Hering @ 2010-06-05 17:44 UTC (permalink / raw)
  To: Sean MacLennan; +Cc: linuxppc-dev, stable

On Sat, Jun 05, Sean MacLennan wrote:

> On Sat, 5 Jun 2010 10:10:39 +0200
> Olaf Hering <olaf@aepfle.de> wrote:
> 
> > scripts in the kernel source do not have executable permissions if
> > they were created with patch(1) run mkuboot.sh with bash, its tagged
> > as bash script.
> 
> Wouldn't it be better to use ${SHELL}? Not every system has bash.

Maybe.
As it stands right now, mkuboot.sh does not run without bash.


And:
Reality check please.
A _development system_ without bash, installed per default on every sane
Linux distro, does most likely not exist.


Olaf

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] [powerpc] do not expect executable permissions for in-tree shell scripts
  2010-06-05 17:44   ` Olaf Hering
@ 2010-06-05 18:00     ` Sean MacLennan
  2010-06-10  6:26       ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 6+ messages in thread
From: Sean MacLennan @ 2010-06-05 18:00 UTC (permalink / raw)
  To: Olaf Hering; +Cc: linuxppc-dev, stable

On Sat, 5 Jun 2010 19:44:37 +0200
Olaf Hering <olaf@aepfle.de> wrote:

> Maybe.
> As it stands right now, mkuboot.sh does not run without bash.
> 
> 
> And:
> Reality check please.
> A _development system_ without bash, installed per default on every
> sane Linux distro, does most likely not exist.

Hmmm, can't argue with that. I wouldn't consider building a kernel on
the warp sane ;) And to be honest, I am not sure anyone has tried. We
officially support it, but I have never done it and don't plan to try.

Cheers,
   Sean

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] [powerpc] do not expect executable permissions for in-tree shell scripts
  2010-06-05 18:00     ` Sean MacLennan
@ 2010-06-10  6:26       ` Benjamin Herrenschmidt
  2010-06-10 15:20         ` Olaf Hering
  0 siblings, 1 reply; 6+ messages in thread
From: Benjamin Herrenschmidt @ 2010-06-10  6:26 UTC (permalink / raw)
  To: Sean MacLennan; +Cc: linuxppc-dev, Olaf Hering, stable

On Sat, 2010-06-05 at 14:00 -0400, Sean MacLennan wrote:
> On Sat, 5 Jun 2010 19:44:37 +0200
> Olaf Hering <olaf@aepfle.de> wrote:
> 
> > Maybe.
> > As it stands right now, mkuboot.sh does not run without bash.
> > 
> > 
> > And:
> > Reality check please.
> > A _development system_ without bash, installed per default on every
> > sane Linux distro, does most likely not exist.
> 
> Hmmm, can't argue with that. I wouldn't consider building a kernel on
> the warp sane ;) And to be honest, I am not sure anyone has tried. We
> officially support it, but I have never done it and don't plan to try.

I still don't like it very much.. why not chmod'ing it +x instead ? :-)

Cheers,
Ben.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] [powerpc] do not expect executable permissions for in-tree shell scripts
  2010-06-10  6:26       ` Benjamin Herrenschmidt
@ 2010-06-10 15:20         ` Olaf Hering
  0 siblings, 0 replies; 6+ messages in thread
From: Olaf Hering @ 2010-06-10 15:20 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev, stable, Sean MacLennan

On Thu, Jun 10, Benjamin Herrenschmidt wrote:

> I still don't like it very much.. why not chmod'ing it +x instead ? :-)

I looked at a few other scripts in the source tree, they are called with
$(CONFIG_SHELL) <name>, or perl <name>, or awk <name> or even sh <name>.

So my change adds some sort of consistency and makes packaging more robust.


Olaf

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-06-10 15:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-05  8:10 [PATCH] [powerpc] do not expect executable permissions for in-tree shell scripts Olaf Hering
2010-06-05 17:32 ` Sean MacLennan
2010-06-05 17:44   ` Olaf Hering
2010-06-05 18:00     ` Sean MacLennan
2010-06-10  6:26       ` Benjamin Herrenschmidt
2010-06-10 15:20         ` Olaf Hering

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).