ia64: don't assume that unwcheck.py is executable
PATCH 2/3 ia64: don't assume that unwcheck.py is executable
From: Andrew Morton <[email protected]>
Don't assume that this file has execute permissions. For example, patch(1) loses that information.
---
arch/ia64/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/ia64/Makefile renamed from arch/ia64/Makefile~ia64-dont-assume-that-unwcheckpy-is-executable +1 -1
@@ -77,7 +77,7 @@ vmlinux.gz: vmlinux $(Q)$(MAKE) $(build)=$(boot) $@ unwcheck: vmlinux - -$(Q)READELF=$(READELF) $(srctree)/arch/ia64/scripts/unwcheck.py $< + -$(Q)READELF=$(READELF) $(CONFIG_SHELL) $(srctree)/arch/ia64/scripts/unwcheck.py $< archclean: $(Q)$(MAKE) $(clean)=$(boot)
_
arch/ia64/Makefile vmlinux.gz: vmlinux · line 80
Quoted 9 lines · [email protected] writes:
diff -puN
arch/ia64/Makefile~ia64-dont-assume-that-unwcheckpy-is-executablearch/ia64/Makefilearch/ia64/Makefile renamed from arch/ia64/Makefile~ia64-dont-assume-that-unwcheckpy-is-executable +1
-1@@ -77,7 +77,7 @@ vmlinux.gz: vmlinux $(Q)$(MAKE) $(build)=$(boot) $@ unwcheck: vmlinux - -$(Q)READELF=$(READELF) $(srctree)/arch/ia64/scripts/unwcheck.py $< + -$(Q)READELF=$(READELF) $(CONFIG_SHELL) $(srctree)/arch/ia64/scripts/unwcheck.py $<
unwcheck.py is not a shell script.
Andreas.
Signature · 4 lines
Andreas Schwab, SuSE Labs, [email protected] SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."
Quoted 8 lines · On Thu, 06 Dec 2007 00:06:14 +0100 Andreas Schwab <[email protected]> wrote:
Quoted 6 lines · [email protected] writes:
diff -puN
arch/ia64/Makefile~ia64-dont-assume-that-unwcheckpy-is-executablearch/ia64/Makefilearch/ia64/Makefile renamed from arch/ia64/Makefile~ia64-dont-assume-that-unwcheckpy-is-executable +0
-0@@ -77,7 +77,7 @@ vmlinux.gz: vmlinux $(Q)$(MAKE) $(build)=$(boot) $@
Quoted 6 lines
arch/ia64/Makefile vmlinux.gz: vmlinux · line 80
Quoted 3 lines
arch/ia64/Makefile renamed from arch/ia64/Makefile~ia64-dont-assume-that-unwcheckpy-is-executable +1
-1unwcheck: vmlinux - -$(Q)READELF=$(READELF) $(srctree)/arch/ia64/scripts/unwcheck.py $< + -$(Q)READELF=$(READELF) $(CONFIG_SHELL) $(srctree)/arch/ia64/scripts/unwcheck.py $<
unwcheck.pyis not a shell script.
Oh well, whatever. Please treat this as a bug report.
ie: someone please fix it.
Quoted 3 lines
Oh well, whatever. Please treat this as a bug report.
ie: someone please fix it.
Perhaps with?
- -$(Q)READELF=$(READELF) $(srctree)/arch/ia64/scripts/unwcheck.py $<
+ -$(Q)READELF=$(READELF) python $(srctree)/arch/ia64/scripts/unwcheck.py $<
Review
Quoted 8 lines · Tony
Quoted 3 lines
Oh well, whatever. Please treat this as a bug report.
ie: someone please fix it.
Perhaps with?
(quoted diff) +1
-1- -$(Q)READELF=$(READELF) $(srctree)/arch/ia64/scripts/unwcheck.py $< + -$(Q)READELF=$(READELF) python $(srctree)/arch/ia64/scripts/unwcheck.py $<
Spsoe so. We get fancy with CONFIG_SHELL, but for flex/bison/gperf it appears that kbuild just expects them to be present in $PATH.
Sam?
Quoted 18 lines · Andrew Morton
Quoted 8 lines · On Thu, 06 Dec 2007 00:06:14 +0100 Andreas Schwab <[email protected]> wrote:
Quoted 6 lines · [email protected] writes:
diff -puN
arch/ia64/Makefile~ia64-dont-assume-that-unwcheckpy-is-executablearch/ia64/Makefilearch/ia64/Makefile renamed from arch/ia64/Makefile~ia64-dont-assume-that-unwcheckpy-is-executable +0
-0@@ -77,7 +77,7 @@ vmlinux.gz: vmlinux $(Q)$(MAKE) $(build)=$(boot) $@Quoted 6 lines
arch/ia64/Makefile vmlinux.gz: vmlinux · line 80
Quoted 3 lines
arch/ia64/Makefile renamed from arch/ia64/Makefile~ia64-dont-assume-that-unwcheckpy-is-executable +1
-1unwcheck: vmlinux - -$(Q)READELF=$(READELF) $(srctree)/arch/ia64/scripts/unwcheck.py $< + -$(Q)READELF=$(READELF) $(CONFIG_SHELL) $(srctree)/arch/ia64/scripts/unwcheck.py $<
unwcheck.pyis not a shell script.
Quoted 3 lines
Oh well, whatever. Please treat this as a bug report.
ie: someone please fix it.
s/$(CONFIG_SHELL)/python/
Andreas.
Signature · 4 lines
Andreas Schwab, SuSE Labs, [email protected] SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."
Quoted 9 lines · Andrew Morton
Quoted 5 lines
arch/ia64/Makefile vmlinux.gz: vmlinux · line 80
Quoted 2 lines
arch/ia64/Makefile renamed from arch/ia64/Makefile~ia64-dont-assume-that-unwcheckpy-is-executable +1
-1- -$(Q)READELF=$(READELF) $(srctree)/arch/ia64/scripts/unwcheck.py $< + -$(Q)READELF=$(READELF) $(CONFIG_SHELL) $(srctree)/arch/ia64/scripts/unwcheck.py $<
unwcheck.pyis not a shell script.Oh well, whatever. Please treat this as a bug report.
ie: someone please fix it.
Best would be to get rid of python. Having another scripting language as built requirement, and that only on ia64 doesn't sound like a particularly good idea.
Quoted 7 lines · On Thu, 6 Dec 2007 07:45:57 +0000 Christoph Hellwig <[email protected]> wrote:
Quoted 6 lines · Andrew Morton
Quoted 5 lines
arch/ia64/Makefile vmlinux.gz: vmlinux · line 80
Quoted 2 lines
arch/ia64/Makefile renamed from arch/ia64/Makefile~ia64-dont-assume-that-unwcheckpy-is-executable +1
-1- -$(Q)READELF=$(READELF) $(srctree)/arch/ia64/scripts/unwcheck.py $< + -$(Q)READELF=$(READELF) $(CONFIG_SHELL) $(srctree)/arch/ia64/scripts/unwcheck.py $<
unwcheck.pyis not a shell script.
Quoted 7 lines
Quoted 3 lines
Oh well, whatever. Please treat this as a bug report.
ie: someone please fix it.
Best would be to get rid of python. Having another scripting language as built requirement, and that only on ia64 doesn't sound like a particularly good idea.
It's probably not a big deal - especially as ia64 kernels are presuably not as likely to be built in wild and whacky enviroments like some other architectures.
afacit the script is optional anyway - it "check and verifies unwind info". If python isn't available, just skip it..
Review
Quoted 8 lines · Tony
Quoted 3 lines
Oh well, whatever. Please treat this as a bug report.
ie: someone please fix it.
Perhaps with?
(quoted diff) +1
-1- -$(Q)READELF=$(READELF) $(srctree)/arch/ia64/scripts/unwcheck.py $< + -$(Q)READELF=$(READELF) python $(srctree)/arch/ia64/scripts/unwcheck.py $<
We do not have as much incompatibility among phython (or personal preference) than we have for diver shells - so calling phython is fine.
That said I really do not like adding phython to the required tools even though this is ia64 specific.
This script was previously written in perl wich is more widely used. What was the exact reason switching to phython and can we do the same in perl?
Sam
Quoted 1 line
What was the exact reason switching to phython and can we do the same in perl?
It was a shell script (using awk) before it was pythonised. The motivation was correct functionality when cross-building on a 32-bit host. Here's the commit:
-Tony
Quoted 7 lines · Tony
Quoted 1 line
What was the exact reason switching to phython and can we do the same in perl?
It was a shell script (using awk) before it was pythonised. The motivation was correct functionality when cross-building on a 32-bit host. Here's the commit:
If you read the comments in the phyton file is says:
+# Based on a shell/awk script originally written by Harish Patil, +# which was converted to Perl by Matthew Chapman, which was converted +# to Python by David Mosberger.
So somewhere a perl variant has existed.
Sam
Quoted 1 line
So somewhere a perl variant has existed.
This mail thread http://tinyurl.com/2vuacw points to the perl version. But it doesn't appear to have ever been checked into the tree (and the mail message says that it also suffers from the not-working for a 64-bit binary when running on a 32-bit host issue ... though it claims that it would be easy to fix).
I can't actually see the script because the web server at unsw.edu.au seems to feel that it should execute the perl script rather than show me the contents of it :-(
-Tony
P.S. The python version was checked in almost four years ago ... perhaps it isn't too big of a deal that we are using it.