Re: [PATCH v2 1/1] perf tools: Make target to generate selfcontained source tarball

From: Arnaldo Carvalho de Melo
Date: Mon May 31 2010 - 19:06:58 EST


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@xxxxxxxxxxxxxx>
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@xxxxxxxxxxxxxx>
Signed-off-by: Junio C Hamano <junkio@xxxxxxx>

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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/