2009-09-25 19:01:40

by Mulyadi Santosa

[permalink] [raw]
Subject: [PATCH] generate-cmdlist.sh should be either executable or run as parameter of "."

I believe this is just a small glitch. generate-cmdlist.sh by default
should be made as executable. But since one might forgot to do it, we
could simply call it as an argument "." or "source" or even "sh -c". I
pick "."

Tested in 2.6.31

Signed-off-by: Mulyadi Santosa <[email protected]>

--- linux-2.6.31/tools/perf/Makefile.bak 2009-09-12 22:28:37.000000000 +0700
+++ linux-2.6.31/tools/perf/Makefile 2009-09-26 01:51:04.000000000 +0700
@@ -682,7 +682,7 @@
common-cmds.h: util/generate-cmdlist.sh command-list.txt

common-cmds.h: $(wildcard Documentation/perf-*.txt)
- $(QUIET_GEN)util/generate-cmdlist.sh > $@+ && mv $@+ $@
+ $(QUIET_GEN). util/generate-cmdlist.sh > $@+ && mv $@+ $@

$(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh
$(QUIET_GEN)$(RM) $@ $@+ && \


2009-09-30 12:08:33

by Ingo Molnar

[permalink] [raw]
Subject: Re: [PATCH] generate-cmdlist.sh should be either executable or run as parameter of "."


* Mulyadi Santosa <[email protected]> wrote:

> I believe this is just a small glitch. generate-cmdlist.sh by default
> should be made as executable. But since one might forgot to do it, we
> could simply call it as an argument "." or "source" or even "sh -c". I
> pick "."
>
> Tested in 2.6.31
>
> Signed-off-by: Mulyadi Santosa <[email protected]>

hm, generate-cmdlist.sh is executable in the upstream kernel repo. It
apparently isnt executable on your box - why?

Ingo

2009-09-30 12:18:04

by Sam Ravnborg

[permalink] [raw]
Subject: Re: [PATCH] generate-cmdlist.sh should be either executable or run as parameter of "."

On Wed, Sep 30, 2009 at 02:08:22PM +0200, Ingo Molnar wrote:
>
> * Mulyadi Santosa <[email protected]> wrote:
>
> > I believe this is just a small glitch. generate-cmdlist.sh by default
> > should be made as executable. But since one might forgot to do it, we
> > could simply call it as an argument "." or "source" or even "sh -c". I
> > pick "."
> >
> > Tested in 2.6.31
> >
> > Signed-off-by: Mulyadi Santosa <[email protected]>
>
> hm, generate-cmdlist.sh is executable in the upstream kernel repo. It
> apparently isnt executable on your box - why?

Whatever - we should try to avoid relying on executable bit being set.
umask can prevent this is tree is checkout as one user and build as another user.

Sam

2009-10-01 08:11:23

by Ingo Molnar

[permalink] [raw]
Subject: Re: [PATCH] generate-cmdlist.sh should be either executable or run as parameter of "."


* Sam Ravnborg <[email protected]> wrote:

> On Wed, Sep 30, 2009 at 02:08:22PM +0200, Ingo Molnar wrote:
> >
> > * Mulyadi Santosa <[email protected]> wrote:
> >
> > > I believe this is just a small glitch. generate-cmdlist.sh by default
> > > should be made as executable. But since one might forgot to do it, we
> > > could simply call it as an argument "." or "source" or even "sh -c". I
> > > pick "."
> > >
> > > Tested in 2.6.31
> > >
> > > Signed-off-by: Mulyadi Santosa <[email protected]>
> >
> > hm, generate-cmdlist.sh is executable in the upstream kernel repo. It
> > apparently isnt executable on your box - why?
>
> Whatever - we should try to avoid relying on executable bit being set.
> umask can prevent this is tree is checkout as one user and build as
> another user.

Fair enough - i'll queue the patch up.

Ingo

2009-10-01 09:59:23

by Mulyadi Santosa

[permalink] [raw]
Subject: [tip:perf/urgent] perf tools: Run generate-cmdlist.sh properly

Commit-ID: 1ad0560e8cdb6d5b381220dc2da187691b5ce124
Gitweb: http://git.kernel.org/tip/1ad0560e8cdb6d5b381220dc2da187691b5ce124
Author: Mulyadi Santosa <[email protected]>
AuthorDate: Sat, 26 Sep 2009 02:01:41 +0700
Committer: Ingo Molnar <[email protected]>
CommitDate: Thu, 1 Oct 2009 10:12:03 +0200

perf tools: Run generate-cmdlist.sh properly

Right now generate-cmdlist.sh is not executable, so we
should call it as an argument ".".

This fixes cases where due to different umask defaults
the generate-cmdlist.sh script is not executable in
a kernel tree checkout.

Signed-off-by: Mulyadi Santosa <[email protected]>
Acked-by: Sam Ravnborg <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Mike Galbraith <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>


---
tools/perf/Makefile | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index b5f1953..5881943 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -728,7 +728,7 @@ $(BUILT_INS): perf$X
common-cmds.h: util/generate-cmdlist.sh command-list.txt

common-cmds.h: $(wildcard Documentation/perf-*.txt)
- $(QUIET_GEN)util/generate-cmdlist.sh > $@+ && mv $@+ $@
+ $(QUIET_GEN). util/generate-cmdlist.sh > $@+ && mv $@+ $@

$(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh
$(QUIET_GEN)$(RM) $@ $@+ && \