* [PATCH 1/1] perf tools: Make target to generate self contained source tarball
@ 2010-05-28 18:53 Arnaldo Carvalho de Melo
2010-05-29 7:29 ` Sam Ravnborg
0 siblings, 1 reply; 11+ messages in thread
From: Arnaldo Carvalho de Melo @ 2010-05-28 18:53 UTC (permalink / raw)
To: Michal Marek
Cc: Sam Ravnborg, David S. Miller, Frédéric Weisbecker,
Ingo Molnar, Mike Galbraith, Paul Mackerras, Peter Zijlstra,
Stephane Eranian, Tom Zanussi, Linux Kernel Mailing List
Hi Michal, Sam,
Are you OK with with this change?
- Arnaldo
commit 0871c6215cb617ecb87a7f84db4627c7ee93c877
Author: Arnaldo Carvalho de Melo <acme@redhat.com>
Date: Thu May 27 12:12:00 2010 -0300
perf tools: Make target to generate self contained source tarball
Useful for when people want to try some version of the perf tools and don't
wants to download the kernel tarball.
Here is a session using this new target:
[root@emilia linux-2.6-tip]# make help | grep -i perf
Perf packaging:
perf-dist - Generate perf-2.6.34.tar.gz source tarball
[root@emilia linux-2.6-tip]# make perf-dist
[root@emilia linux-2.6-tip]# ls -la perf-2.6.34.tar.gz
-rw-r--r-- 1 root root 366277 May 27 12:09 perf-2.6.34.tar.gz
[root@emilia linux-2.6-tip]# tar xf perf-2.6.34.tar.gz
[root@emilia linux-2.6-tip]# cd perf-2.6.34
[root@emilia perf-2.6.34]# ls
arch HEAD include lib tools
[root@emilia perf-2.6.34]# cat HEAD
5ad90e4ea4a096af9f0a362e34dfae5686a191ef
[root@emilia perf-2.6.34]# cd tools/perf
[root@emilia perf]# make -j9 2>&1 | tail
CC arch/x86/util/dwarf-regs.o
CC util/probe-finder.o
CC util/newt.o
CC util/scripting-engines/trace-event-perl.o
CC scripts/perl/Perf-Trace-Util/Context.o
CC perf.o
CC builtin-help.o
AR libperf.a
LINK perf
rm .perf.dev.null
[root@emilia perf]# ./perf record -a sleep 1
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.066 MB perf.data (~2900 samples) ]
[root@emilia perf]# ./perf report | head -12
# Events: 17 cycles
#
# Overhead Command Shared Object Symbol
# ........ ............... ................. ......
#
29.40% ksoftirqd/4 [kernel.kallsyms] [k] _spin_lock
23.88% sleep [kernel.kallsyms] [k] unmap_vmas
22.10% init [kernel.kallsyms] [k] resched_task
4.97% perf [kernel.kallsyms] [k] format_decode
4.93% perf [kernel.kallsyms] [k] mangle_path
4.90% perf [kernel.kallsyms] [k] _spin_lock
4.90% perf [ext4] [k] __ext4_get_inode_loc
[root@emilia perf]#
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
diff --git a/Makefile b/Makefile
index ebc8225..ab45bd5 100644
--- a/Makefile
+++ b/Makefile
@@ -356,8 +356,9 @@ KBUILD_AFLAGS := -D__ASSEMBLY__
# Read KERNELRELEASE from include/config/kernel.release (if it exists)
KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
KERNELVERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
+PERF_TARNAME=perf-$(KERNELVERSION)
-export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION
+export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION PERF_TARNAME
export ARCH SRCARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC
export CPP AR NM STRIP OBJCOPY OBJDUMP
export MAKE AWK GENKSYMS INSTALLKERNEL PERL UTS_MACHINE
@@ -411,7 +412,7 @@ endif
no-dot-config-targets := clean mrproper distclean \
cscope TAGS tags help %docs check% \
include/linux/version.h headers_% \
- kernelrelease kernelversion
+ kernelrelease kernelversion perf-dist
config-targets := 0
mixed-targets := 0
@@ -1269,6 +1270,9 @@ help:
@echo 'Kernel packaging:'
@$(MAKE) $(build)=$(package-dir) help
@echo ''
+ @echo 'Perf packaging:'
+ @echo ' perf-dist - Generate $(PERF_TARNAME).tar.gz source tarball'
+ @echo ''
@echo 'Documentation targets:'
@$(MAKE) -f $(srctree)/Documentation/DocBook/Makefile dochelp
@echo ''
@@ -1403,6 +1407,15 @@ prepare: ;
scripts: ;
endif # KBUILD_EXTMOD
+perf-dist:
+ @git archive --prefix=$(PERF_TARNAME)/ HEAD^{tree} \
+ `cat tools/perf/MANIFEST` -o $(PERF_TARNAME).tar
+ @mkdir -p $(PERF_TARNAME)
+ @git rev-parse HEAD > $(PERF_TARNAME)/HEAD
+ @tar rf $(PERF_TARNAME).tar $(PERF_TARNAME)/HEAD
+ @rm -r $(PERF_TARNAME)
+ @gzip -f -9 $(PERF_TARNAME).tar
+
# Generate tags for editors
# ---------------------------------------------------------------------------
quiet_cmd_tags = GEN $@
diff --git a/tools/perf/MANIFEST b/tools/perf/MANIFEST
new file mode 100644
index 0000000..8c7fc0c
--- /dev/null
+++ b/tools/perf/MANIFEST
@@ -0,0 +1,12 @@
+tools/perf
+include/linux/perf_event.h
+include/linux/rbtree.h
+include/linux/list.h
+include/linux/hash.h
+include/linux/stringify.h
+lib/rbtree.c
+include/linux/swab.h
+arch/*/include/asm/unistd*.h
+include/linux/poison.h
+include/linux/magic.h
+include/linux/hw_breakpoint.h
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 1/1] perf tools: Make target to generate self contained source tarball
2010-05-28 18:53 [PATCH 1/1] perf tools: Make target to generate self contained source tarball Arnaldo Carvalho de Melo
@ 2010-05-29 7:29 ` Sam Ravnborg
2010-05-29 13:40 ` Arnaldo Carvalho de Melo
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Sam Ravnborg @ 2010-05-29 7:29 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: Michal Marek, David S. Miller, Fr?d?ric Weisbecker, Ingo Molnar,
Mike Galbraith, Paul Mackerras, Peter Zijlstra, Stephane Eranian,
Tom Zanussi, Linux Kernel Mailing List
On Fri, May 28, 2010 at 03:53:57PM -0300, Arnaldo Carvalho de Melo wrote:
> Hi Michal, Sam,
>
> Are you OK with with this change?
No - I do not like it :-)
But I like the concept.
We have some minimal infrastructure to support packaging
and this seems like an OK fit for this too.
Only drawback is that you need to configure your kernel
before you can pack the source tarball.
Moving the packaging support to scripts/package/
avoiding any changes to the top-level Makefile.
Appended is my attemt to add it to said file.
But my git did not support the '-o' option so it is untested.
To apply it you need your MANIFEST file (obviously).
Help will say:
$ make help | grep perf
perf-pkg - Build perf-2.6.34.tar.gz source tarball
You may consider to restructure cmd_perf a little so
it exits on error. I just did the quick version here.
Sam
diff --git a/scripts/package/Makefile b/scripts/package/Makefile
index 62fcc3a..475f023 100644
--- a/scripts/package/Makefile
+++ b/scripts/package/Makefile
@@ -111,6 +111,24 @@ tar%pkg: FORCE
clean-dirs += $(objtree)/tar-install/
+# perf-pkg - generate a source tarball with perf source
+# ---------------------------------------------------------------------------
+perf-tar=perf-$(KERNELVERSION)
+
+quiet_cmd_perf = TAR
+ cmd_perf = \
+git archive --prefix=$(perf-tar)/ HEAD^{tree} \
+ $$(cat tools/perf/MANIFEST) -o $(perf-tar).tar; \
+mkdir -p $(perf-tar); \
+git rev-parse HEAD > $(perf-tar)/HEAD; \
+tar rf $(perf-tar).tar $(perf-tar)/HEAD; \
+rm -r $(perf-tar); \
+gzip -f -9 $(perf-tar).tar
+
+
+perf-pkg: FORCE
+ $(call cmd,perf)
+
# Help text displayed when executing 'make help'
# ---------------------------------------------------------------------------
help: FORCE
@@ -120,4 +138,5 @@ help: FORCE
@echo ' tar-pkg - Build the kernel as an uncompressed tarball'
@echo ' targz-pkg - Build the kernel as a gzip compressed tarball'
@echo ' tarbz2-pkg - Build the kernel as a bzip2 compressed tarball'
+ @echo ' perf-pkg - Build $(perf-tar).tar.gz source tarball'
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 1/1] perf tools: Make target to generate self contained source tarball
2010-05-29 7:29 ` Sam Ravnborg
@ 2010-05-29 13:40 ` Arnaldo Carvalho de Melo
2010-05-31 15:42 ` Arnaldo Carvalho de Melo
2010-05-31 17:42 ` [PATCH v2 " Arnaldo Carvalho de Melo
2 siblings, 0 replies; 11+ messages in thread
From: Arnaldo Carvalho de Melo @ 2010-05-29 13:40 UTC (permalink / raw)
To: Sam Ravnborg
Cc: Michal Marek, David S. Miller, Fr?d?ric Weisbecker, Ingo Molnar,
Mike Galbraith, Paul Mackerras, Peter Zijlstra, Stephane Eranian,
Tom Zanussi, Linux Kernel Mailing List
Em Sat, May 29, 2010 at 09:29:48AM +0200, Sam Ravnborg escreveu:
> On Fri, May 28, 2010 at 03:53:57PM -0300, Arnaldo Carvalho de Melo wrote:
> > Hi Michal, Sam,
> > Are you OK with with this change?
> No - I do not like it :-)
> But I like the concept.
I saw the scripts/package, but felt it wasn't quite there where it fits,
because there all existing cases build binary packages and this is
purely a source package, guess I was wrong then :-)
> We have some minimal infrastructure to support packaging
> and this seems like an OK fit for this too.
> Only drawback is that you need to configure your kernel
> before you can pack the source tarball.
>
> Moving the packaging support to scripts/package/
> avoiding any changes to the top-level Makefile.
>
> Appended is my attemt to add it to said file.
> But my git did not support the '-o' option so it is untested.
>
> To apply it you need your MANIFEST file (obviously).
>
> Help will say:
> $ make help | grep perf
> perf-pkg - Build perf-2.6.34.tar.gz source tarball
>
>
> You may consider to restructure cmd_perf a little so
> it exits on error. I just did the quick version here.
I'll try to do that later today, thanks a lot!
> Sam
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/1] perf tools: Make target to generate self contained source tarball
2010-05-29 7:29 ` Sam Ravnborg
2010-05-29 13:40 ` Arnaldo Carvalho de Melo
@ 2010-05-31 15:42 ` Arnaldo Carvalho de Melo
2010-05-31 17:42 ` [PATCH v2 " Arnaldo Carvalho de Melo
2 siblings, 0 replies; 11+ messages in thread
From: Arnaldo Carvalho de Melo @ 2010-05-31 15:42 UTC (permalink / raw)
To: Sam Ravnborg
Cc: Michal Marek, David S. Miller, Frédéric Weisbecker,
Ingo Molnar, Mike Galbraith, Paul Mackerras, Peter Zijlstra,
Stephane Eranian, Tom Zanussi, Linux Kernel Mailing List
Em Sat, May 29, 2010 at 09:29:48AM +0200, Sam Ravnborg escreveu:
> On Fri, May 28, 2010 at 03:53:57PM -0300, Arnaldo Carvalho de Melo wrote:
> > Hi Michal, Sam,
> >
> > Are you OK with with this change?
>
> No - I do not like it :-)
>
> But I like the concept.
>
> We have some minimal infrastructure to support packaging
> and this seems like an OK fit for this too.
> Only drawback is that you need to configure your kernel
> before you can pack the source tarball.
Which is really annoying, can't we lift that requirement for source
tarballs? I'm looking into this now.
- Arnaldo
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v2 1/1] perf tools: Make target to generate self contained source tarball
2010-05-29 7:29 ` Sam Ravnborg
2010-05-29 13:40 ` Arnaldo Carvalho de Melo
2010-05-31 15:42 ` Arnaldo Carvalho de Melo
@ 2010-05-31 17:42 ` Arnaldo Carvalho de Melo
2010-05-31 18:06 ` Sam Ravnborg
2010-05-31 20:11 ` Michal Marek
2 siblings, 2 replies; 11+ messages in thread
From: Arnaldo Carvalho de Melo @ 2010-05-31 17:42 UTC (permalink / raw)
To: Sam Ravnborg
Cc: Michal Marek, David S. Miller, Frédéric Weisbecker,
Ingo Molnar, Mike Galbraith, Paul Mackerras, Peter Zijlstra,
Stephane Eranian, Tom Zanussi, Linux Kernel Mailing List
Em Sat, May 29, 2010 at 09:29:48AM +0200, Sam Ravnborg escreveu:
> On Fri, May 28, 2010 at 03:53:57PM -0300, Arnaldo Carvalho de Melo wrote:
> > Hi Michal, Sam,
> >
> > Are you OK with with this change?
>
> No - I do not like it :-)
>
> But I like the concept.
>
> We have some minimal infrastructure to support packaging
> and this seems like an OK fit for this too.
> Only drawback is that you need to configure your kernel
> before you can pack the source tarball.
>
> Moving the packaging support to scripts/package/
> avoiding any changes to the top-level Makefile.
What about this one?
It touches one line in the top level Makefile, but that can be
considered not perf specific, i.e. if building source tarballs
(-src-pkg suffixed targets) is considered useful, and I think it is,
then that can be used for building source tarballs with some processing,
i.e. adding the HEAD to the tarball being generated, like I'm doing
for perf.
- Arnaldo
>From d52ecf309d18144edced515d4839b7e8fe0f20c0 Mon Sep 17 00:00:00 2001
From: Arnaldo Carvalho de Melo <acme@redhat.com>
Date: Mon, 31 May 2010 11:13:21 -0300
Subject: [PATCH 1/1] perf tools: Make target to generate self contained source tarball
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Useful for when people want to try some version of the perf tools and don't
wants to download the kernel tarball.
Here is a session using this new target:
[root@emilia linux-2.6-tip]# make help | grep -i perf
perf-tar-src-pkg - Build perf-2.6.35-rc1.tar source tarball
perf-targz-src-pkg - Build perf-2.6.35-rc1.tar.gz source tarball
perf-tarbz2-src-pkg - Build perf-2.6.35-rc1.tar.bz2 source tarball
[root@emilia linux-2.6-tip]# make perf-tarbz2-src-pkg
TAR
[root@emilia linux-2.6-tip]# ls -la perf-2.6.35-rc1.tar.bz2
-rw-r--r-- 1 root root 295731 May 31 11:18 perf-2.6.35-rc1.tar.bz2
[root@emilia linux-2.6-tip]# tar xf perf-2.6.35-rc1.tar.bz2
[root@emilia linux-2.6-tip]# cd perf-2.6.35-rc1
[root@emilia perf-2.6.35-rc1]# ls
arch HEAD include lib tools
[root@emilia perf-2.6.35-rc1]# cd tools/perf
[root@emilia perf]# make -j9 2>&1 | tail
CC arch/x86/util/dwarf-regs.o
CC util/probe-finder.o
CC util/newt.o
CC util/scripting-engines/trace-event-perl.o
CC scripts/perl/Perf-Trace-Util/Context.o
CC perf.o
CC builtin-help.o
AR libperf.a
LINK perf
rm .perf.dev.null
[root@emilia perf]# ./perf record -a sleep 1
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.262 MB perf.data (~11457 samples) ]
[root@emilia perf]# ./perf report | head -12
# Events: 6K cycles
#
# Overhead Command Shared Object Symbol
# ........ ............... .................. ......
#
4.73% perf [kernel.kallsyms] [k] format_decode
4.49% perf libc-2.12.so [.] _IO_file_underflow_internal
4.38% init [kernel.kallsyms] [k] mwait_idle
3.29% perf [kernel.kallsyms] [k] vsnprintf
2.38% init [kernel.kallsyms] [k] sched_clock_local
2.35% init [kernel.kallsyms] [k] apic_timer_interrupt
1.86% sirq-timer/5 [kernel.kallsyms] [k] find_busiest_group
[root@emilia perf]#
Cc: David S. Miller <davem@davemloft.net>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Michal Marek <mmarek@suse.cz>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
Makefile | 2 +-
scripts/package/Makefile | 37 +++++++++++++++++++++++++++++++------
tools/perf/MANIFEST | 12 ++++++++++++
3 files changed, 44 insertions(+), 7 deletions(-)
create mode 100644 tools/perf/MANIFEST
diff --git a/Makefile b/Makefile
index 6e39ec7..0ab0c6f 100644
--- a/Makefile
+++ b/Makefile
@@ -411,7 +411,7 @@ endif
no-dot-config-targets := clean mrproper distclean \
cscope TAGS tags help %docs check% \
include/linux/version.h headers_% \
- kernelrelease kernelversion
+ kernelrelease kernelversion %src-pkg
config-targets := 0
mixed-targets := 0
diff --git a/scripts/package/Makefile b/scripts/package/Makefile
index 62fcc3a..18513b0 100644
--- a/scripts/package/Makefile
+++ b/scripts/package/Makefile
@@ -111,13 +111,38 @@ tar%pkg: FORCE
clean-dirs += $(objtree)/tar-install/
+# perf-pkg - generate a source tarball with perf source
+# ---------------------------------------------------------------------------
+
+perf-tar=perf-$(KERNELVERSION)
+
+quiet_cmd_perf_tar = TAR
+ cmd_perf_tar = \
+git archive --prefix=$(perf-tar)/ HEAD^{tree} \
+ $$(cat $(srctree)/tools/perf/MANIFEST) -o $(perf-tar).tar; \
+mkdir -p $(perf-tar); \
+git rev-parse HEAD > $(perf-tar)/HEAD; \
+tar rf $(perf-tar).tar $(perf-tar)/HEAD; \
+rm -r $(perf-tar); \
+$(if $(findstring tar-src,$@),, \
+$(if $(findstring bz2,$@),bzip2, \
+$(if $(findstring gz,$@),gzip, \
+$(error unknown target $@))) \
+ -f -9 $(perf-tar).tar)
+
+perf-%pkg: FORCE
+ $(call cmd,perf_tar)
+
# Help text displayed when executing 'make help'
# ---------------------------------------------------------------------------
help: FORCE
- @echo ' rpm-pkg - Build both source and binary RPM kernel packages'
- @echo ' binrpm-pkg - Build only the binary kernel package'
- @echo ' deb-pkg - Build the kernel as an deb package'
- @echo ' tar-pkg - Build the kernel as an uncompressed tarball'
- @echo ' targz-pkg - Build the kernel as a gzip compressed tarball'
- @echo ' tarbz2-pkg - Build the kernel as a bzip2 compressed tarball'
+ @echo ' rpm-pkg - Build both source and binary RPM kernel packages'
+ @echo ' binrpm-pkg - Build only the binary kernel package'
+ @echo ' deb-pkg - Build the kernel as an deb package'
+ @echo ' tar-pkg - Build the kernel as an uncompressed tarball'
+ @echo ' targz-pkg - Build the kernel as a gzip compressed tarball'
+ @echo ' tarbz2-pkg - Build the kernel as a bzip2 compressed tarball'
+ @echo ' perf-tar-src-pkg - Build $(perf-tar).tar source tarball'
+ @echo ' perf-targz-src-pkg - Build $(perf-tar).tar.gz source tarball'
+ @echo ' perf-tarbz2-src-pkg - Build $(perf-tar).tar.bz2 source tarball'
diff --git a/tools/perf/MANIFEST b/tools/perf/MANIFEST
new file mode 100644
index 0000000..8c7fc0c
--- /dev/null
+++ b/tools/perf/MANIFEST
@@ -0,0 +1,12 @@
+tools/perf
+include/linux/perf_event.h
+include/linux/rbtree.h
+include/linux/list.h
+include/linux/hash.h
+include/linux/stringify.h
+lib/rbtree.c
+include/linux/swab.h
+arch/*/include/asm/unistd*.h
+include/linux/poison.h
+include/linux/magic.h
+include/linux/hw_breakpoint.h
--
1.6.5.2
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH v2 1/1] perf tools: Make target to generate self contained source tarball
2010-05-31 17:42 ` [PATCH v2 " Arnaldo Carvalho de Melo
@ 2010-05-31 18:06 ` Sam Ravnborg
2010-05-31 20:11 ` Michal Marek
1 sibling, 0 replies; 11+ messages in thread
From: Sam Ravnborg @ 2010-05-31 18:06 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: Michal Marek, David S. Miller, Fr?d?ric Weisbecker, Ingo Molnar,
Mike Galbraith, Paul Mackerras, Peter Zijlstra, Stephane Eranian,
Tom Zanussi, Linux Kernel Mailing List
On Mon, May 31, 2010 at 02:42:07PM -0300, Arnaldo Carvalho de Melo wrote:
> Em Sat, May 29, 2010 at 09:29:48AM +0200, Sam Ravnborg escreveu:
> > On Fri, May 28, 2010 at 03:53:57PM -0300, Arnaldo Carvalho de Melo wrote:
> > > Hi Michal, Sam,
> > >
> > > Are you OK with with this change?
> >
> > No - I do not like it :-)
> >
> > But I like the concept.
> >
> > We have some minimal infrastructure to support packaging
> > and this seems like an OK fit for this too.
> > Only drawback is that you need to configure your kernel
> > before you can pack the source tarball.
> >
> > Moving the packaging support to scripts/package/
> > avoiding any changes to the top-level Makefile.
>
> What about this one?
>
> It touches one line in the top level Makefile, but that can be
> considered not perf specific, i.e. if building source tarballs
> (-src-pkg suffixed targets) is considered useful, and I think it is,
> then that can be used for building source tarballs with some processing,
> i.e. adding the HEAD to the tarball being generated, like I'm doing
> for perf.
Both the top-level Makefile change and the package stuff can be considered:
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Sam
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2 1/1] perf tools: Make target to generate self contained source tarball
2010-05-31 17:42 ` [PATCH v2 " Arnaldo Carvalho de Melo
2010-05-31 18:06 ` Sam Ravnborg
@ 2010-05-31 20:11 ` Michal Marek
2010-05-31 23:06 ` Arnaldo Carvalho de Melo
1 sibling, 1 reply; 11+ messages in thread
From: Michal Marek @ 2010-05-31 20:11 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: Sam Ravnborg, David S. Miller, Frédéric Weisbecker,
Ingo Molnar, Mike Galbraith, Paul Mackerras, Peter Zijlstra,
Stephane Eranian, Tom Zanussi, Linux Kernel Mailing List
On 31.5.2010 19:42, Arnaldo Carvalho de Melo wrote:
> +git archive --prefix=$(perf-tar)/ HEAD^{tree} \
If you use plain "HEAD" (a commit-ish) instead if HEAD^{tree}, then
git archive will store the commit id in the archive metadata and the
user can then use git get-tar-commit-id to extract it.
> + $$(cat $(srctree)/tools/perf/MANIFEST) -o $(perf-tar).tar; \
> +mkdir -p $(perf-tar); \
> +git rev-parse HEAD > $(perf-tar)/HEAD; \
> +tar rf $(perf-tar).tar $(perf-tar)/HEAD; \
... then this HEAD file might not even be necessary (even if you keep
it, it would be nice not to break git get-tar-commit-id).
Michal
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2 1/1] perf tools: Make target to generate self contained source tarball
2010-05-31 20:11 ` Michal Marek
@ 2010-05-31 23:06 ` Arnaldo Carvalho de Melo
2010-06-01 10:28 ` Michal Marek
0 siblings, 1 reply; 11+ messages in thread
From: Arnaldo Carvalho de Melo @ 2010-05-31 23:06 UTC (permalink / raw)
To: Michal Marek
Cc: Sam Ravnborg, David S. Miller, Frédéric Weisbecker,
Ingo Molnar, Mike Galbraith, Paul Mackerras, Peter Zijlstra,
Stephane Eranian, Tom Zanussi, Eduardo Habkost,
Linux Kernel Mailing List
Em Mon, May 31, 2010 at 10:11:24PM +0200, Michal Marek escreveu:
> On 31.5.2010 19:42, Arnaldo Carvalho de Melo wrote:
> > +git archive --prefix=$(perf-tar)/ HEAD^{tree} \
>
> If you use plain "HEAD" (a commit-ish) instead if HEAD^{tree}, then
> git archive will store the commit id in the archive metadata and the
> user can then use git get-tar-commit-id to extract it.
I just used what was in git.git and then when talking with a git
enthusiast, he showed me this:
[acme@emilia git]$ git show 9cd625b79babaf50f50a0e5d96903eaacb1ee600
commit 9cd625b79babaf50f50a0e5d96903eaacb1ee600
Author: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Date: Sun Jun 18 15:25:33 2006 +0200
Make release tarballs friendlier to older tar versions
git-tar-tree adds an extended pax header to archives if its first
parameter points to a commit. It confuses older tars and isn't
very useful in the case of git anyway, so stop doing it.
Idea: Junio, implementation: Junio. I just wrote it up. :-)
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <junkio@cox.net>
diff --git a/Makefile b/Makefile
index 2a1e639..28517f4 100644
--- a/Makefile
+++ b/Makefile
@@ -667,7 +667,7 @@ git.spec: git.spec.in
GIT_TARNAME=git-$(GIT_VERSION)
dist: git.spec git-tar-tree
- ./git-tar-tree HEAD $(GIT_TARNAME) > $(GIT_TARNAME).tar
+ ./git-tar-tree HEAD^{tree} $(GIT_TARNAME) > $(GIT_TARNAME).tar
@mkdir -p $(GIT_TARNAME)
@cp git.spec $(GIT_TARNAME)
@echo $(GIT_VERSION) > $(GIT_TARNAME)/version
[acme@emilia git]$
We definetely want to have this working with old installations.
> > + $$(cat $(srctree)/tools/perf/MANIFEST) -o $(perf-tar).tar; \
> > +mkdir -p $(perf-tar); \
> > +git rev-parse HEAD > $(perf-tar)/HEAD; \
> > +tar rf $(perf-tar).tar $(perf-tar)/HEAD; \
>
> ... then this HEAD file might not even be necessary (even if you keep
> it, it would be nice not to break git get-tar-commit-id).
Well, what about the other aspects of the patch, is this the only issue
you have found with it?
- Arnaldo
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH v2 1/1] perf tools: Make target to generate self contained source tarball
2010-05-31 23:06 ` Arnaldo Carvalho de Melo
@ 2010-06-01 10:28 ` Michal Marek
2010-06-04 17:35 ` Arnaldo Carvalho de Melo
0 siblings, 1 reply; 11+ messages in thread
From: Michal Marek @ 2010-06-01 10:28 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: Sam Ravnborg, David S. Miller, Frédéric Weisbecker,
Ingo Molnar, Mike Galbraith, Paul Mackerras, Peter Zijlstra,
Stephane Eranian, Tom Zanussi, Eduardo Habkost,
Linux Kernel Mailing List
On 1.6.2010 01:06, Arnaldo Carvalho de Melo wrote:
> Em Mon, May 31, 2010 at 10:11:24PM +0200, Michal Marek escreveu:
>> On 31.5.2010 19:42, Arnaldo Carvalho de Melo wrote:
>>> +git archive --prefix=$(perf-tar)/ HEAD^{tree} \
>>
>> If you use plain "HEAD" (a commit-ish) instead if HEAD^{tree}, then
>> git archive will store the commit id in the archive metadata and the
>> user can then use git get-tar-commit-id to extract it.
>
> I just used what was in git.git and then when talking with a git
> enthusiast, he showed me this:
>
> [acme@emilia git]$ git show 9cd625b79babaf50f50a0e5d96903eaacb1ee600
> commit 9cd625b79babaf50f50a0e5d96903eaacb1ee600
> Author: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
> Date: Sun Jun 18 15:25:33 2006 +0200
>
> Make release tarballs friendlier to older tar versions
...
Ah, ok.
> Well, what about the other aspects of the patch, is this the only issue
> you have found with it?
The patch is OK.
Acked-by: Michal Marek <mmarek@suse.cz>
Michal
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2 1/1] perf tools: Make target to generate self contained source tarball
2010-06-01 10:28 ` Michal Marek
@ 2010-06-04 17:35 ` Arnaldo Carvalho de Melo
2010-06-07 10:11 ` Michal Marek
0 siblings, 1 reply; 11+ messages in thread
From: Arnaldo Carvalho de Melo @ 2010-06-04 17:35 UTC (permalink / raw)
To: Michal Marek
Cc: Sam Ravnborg, David S. Miller, Frédéric Weisbecker,
Ingo Molnar, Mike Galbraith, Paul Mackerras, Peter Zijlstra,
Stephane Eranian, Tom Zanussi, Eduardo Habkost,
Linux Kernel Mailing List
Em Tue, Jun 01, 2010 at 12:28:58PM +0200, Michal Marek escreveu:
> On 1.6.2010 01:06, Arnaldo Carvalho de Melo wrote:
> > Well, what about the other aspects of the patch, is this the only issue
> > you have found with it?
>
> The patch is OK.
>
> Acked-by: Michal Marek <mmarek@suse.cz>
Argh, there was one last detail, so that we don't require that the
kernel be configured first, and as we don't use KERNELRELEASE at all in
the -src-pkg targets, would that be OK with you too?
[acme@emilia linux-2.6-tip]$ git diff Makefile
diff --git a/Makefile b/Makefile
index 0ab0c6f..6e186a1 100644
--- a/Makefile
+++ b/Makefile
@@ -1215,6 +1215,8 @@ distclean: mrproper
# rpm target kept for backward compatibility
package-dir := $(srctree)/scripts/package
+%src-pkg: FORCE
+ $(Q)$(MAKE) $(build)=$(package-dir) $@
%pkg: include/config/kernel.release FORCE
$(Q)$(MAKE) $(build)=$(package-dir) $@
rpm: include/config/kernel.release FORCE
[acme@emilia linux-2.6-tip]$
On a make mrproper'ed kernel we get:
a linux-2.6-tip]$ LANG= make perf-tarbz2-src-pkg
/bin/sh: include/config/kernel.release: No such file or directory
make: *** [include/config/kernel.release] Error 1
[acme@emilia linux-2.6-tip]$
:-\
If you're ok with it, I'll add it as a follow on patch that I'll send
via Ingo.
- Arnaldo
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH v2 1/1] perf tools: Make target to generate self contained source tarball
2010-06-04 17:35 ` Arnaldo Carvalho de Melo
@ 2010-06-07 10:11 ` Michal Marek
0 siblings, 0 replies; 11+ messages in thread
From: Michal Marek @ 2010-06-07 10:11 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: Sam Ravnborg, David S. Miller, Frédéric Weisbecker,
Ingo Molnar, Mike Galbraith, Paul Mackerras, Peter Zijlstra,
Stephane Eranian, Tom Zanussi, Eduardo Habkost,
Linux Kernel Mailing List
On 4.6.2010 19:35, Arnaldo Carvalho de Melo wrote:
> Em Tue, Jun 01, 2010 at 12:28:58PM +0200, Michal Marek escreveu:
>> On 1.6.2010 01:06, Arnaldo Carvalho de Melo wrote:
>>> Well, what about the other aspects of the patch, is this the only issue
>>> you have found with it?
>>
>> The patch is OK.
>>
>> Acked-by: Michal Marek <mmarek@suse.cz>
>
> Argh, there was one last detail, so that we don't require that the
> kernel be configured first, and as we don't use KERNELRELEASE at all in
> the -src-pkg targets, would that be OK with you too?
>
> [acme@emilia linux-2.6-tip]$ git diff Makefile
> diff --git a/Makefile b/Makefile
> index 0ab0c6f..6e186a1 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1215,6 +1215,8 @@ distclean: mrproper
> # rpm target kept for backward compatibility
> package-dir := $(srctree)/scripts/package
>
> +%src-pkg: FORCE
> + $(Q)$(MAKE) $(build)=$(package-dir) $@
> %pkg: include/config/kernel.release FORCE
> $(Q)$(MAKE) $(build)=$(package-dir) $@
> rpm: include/config/kernel.release FORCE
> [acme@emilia linux-2.6-tip]$
>
> On a make mrproper'ed kernel we get:
>
> a linux-2.6-tip]$ LANG= make perf-tarbz2-src-pkg
> /bin/sh: include/config/kernel.release: No such file or directory
> make: *** [include/config/kernel.release] Error 1
> [acme@emilia linux-2.6-tip]$
>
> :-\
>
> If you're ok with it, I'll add it as a follow on patch that I'll send
> via Ingo.
Looks ok to me, any future *-src-pkg target will also just package
sources and thus not depend on the configuration.
Acked-by: Michal Marek <mmarek@suse.cz>
Michal
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2010-06-07 10:11 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-28 18:53 [PATCH 1/1] perf tools: Make target to generate self contained source tarball Arnaldo Carvalho de Melo
2010-05-29 7:29 ` Sam Ravnborg
2010-05-29 13:40 ` Arnaldo Carvalho de Melo
2010-05-31 15:42 ` Arnaldo Carvalho de Melo
2010-05-31 17:42 ` [PATCH v2 " Arnaldo Carvalho de Melo
2010-05-31 18:06 ` Sam Ravnborg
2010-05-31 20:11 ` Michal Marek
2010-05-31 23:06 ` Arnaldo Carvalho de Melo
2010-06-01 10:28 ` Michal Marek
2010-06-04 17:35 ` Arnaldo Carvalho de Melo
2010-06-07 10:11 ` Michal Marek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox