git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git-archive's wrong documentation: really write pax rather than tar
@ 2011-08-03 22:17 Hin-Tak Leung
  2011-08-04  1:41 ` Jeff King
  0 siblings, 1 reply; 14+ messages in thread
From: Hin-Tak Leung @ 2011-08-03 22:17 UTC (permalink / raw)
  To: git, rene.scharfe

Had a bit of discussion on R-devel a few months ago, and now that I am doing something similiar again I decided to write and report this issue:

http://r.789695.n4.nabble.com/quot-R-CMD-check-quot-accepts-but-quot-R-CMD-INSTALL-quot-rejects-a-tar-ball-td3420479.html

The summary of the problem is that, git-archive's "--format=tar" option really write the pax format most of the time, and some cross-platform archive extraction library (rather than the all-powerful GNU tar) really does not think that's the tar format and bail out.

Is it possible to (1) add a warning in the man-page, or (2) actually fix the problem in git-archive ( archive-tar.c ) to generate more conformant archive packages?

Thanks. BTW, git (and git archive) is a great tool!

^ permalink raw reply	[flat|nested] 14+ messages in thread
* (unknown)
@ 2011-08-04 17:27 Hin-Tak Leung
  2011-08-04 17:54 ` git-archive's wrong documentation: really write pax rather than tar René Scharfe
  0 siblings, 1 reply; 14+ messages in thread
From: Hin-Tak Leung @ 2011-08-04 17:27 UTC (permalink / raw)
  To: Jeff King; +Cc: git, rene.scharfe

--- On Thu, 4/8/11, Jeff King <peff@peff.net> wrote:

> On Wed, Aug 03, 2011 at 11:17:59PM
> +0100, Hin-Tak Leung wrote:
> 
> > The summary of the problem is that, git-archive's
> "--format=tar"
> > option really write the pax format most of the time,
> and some
> > cross-platform archive extraction library (rather than
> the
> > all-powerful GNU tar) really does not think that's the
> tar format and
> > bail out.
> 
> Out of curiosity, what is the library? Putting pax headers
> into ustar
> format has been standardized in POSIX since 2001.

The R people wrote their own in the R language (and the person who responded to my post in that R-devel thread was possibly the one who wrote that part, I believe) - The main reason is probably cross-platform-ness and independence from other programming languages - they are gradually moving away from invoking system() (because they need to run on windows and they used to require many cygwin/mingw tools to build add-on packages).

The R code which does that, scan for certain patterns after seek() into the gunzip'ed stream after 512(?) bytes. It is in a file 
R/src/library/utils/R/tar.R under the source repository.

> That header contains useful information (the commit id from
> which the
> archive was generated). And there is a way to turn it off:
> give a tree
> id instead of a commit id. There is an example in the
> git-archive
> manpage that does exactly this already. Look for the
> example mentioning
> "pax header" here:
> 
>   http://www.kernel.org/pub/software/scm/git/docs/git-archive.html
> 
> It might be a bit more obvious to find if we actually had
> a
> --no-pax-header option, though.
> 
> -Peff
> 


I think I tried the tree example and the R code also didn't like it much... may be I'll give it another try.

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

end of thread, other threads:[~2011-08-10 19:56 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-03 22:17 git-archive's wrong documentation: really write pax rather than tar Hin-Tak Leung
2011-08-04  1:41 ` Jeff King
2011-08-04  1:56   ` Junio C Hamano
2011-08-04  2:00     ` Jeff King
2011-08-04  2:25       ` Junio C Hamano
2011-08-04  2:29         ` Jeff King
2011-08-04 17:39           ` René Scharfe
2011-08-04  2:13   ` Jeff King
2011-08-04 22:51     ` Junio C Hamano
  -- strict thread matches above, loose matches on Subject: below --
2011-08-04 17:27 (unknown) Hin-Tak Leung
2011-08-04 17:54 ` git-archive's wrong documentation: really write pax rather than tar René Scharfe
2011-08-04 18:33   ` Hin-Tak Leung
2011-08-06 18:57     ` René Scharfe
2011-08-10  3:08       ` Hin-Tak Leung
2011-08-10 19:55         ` René Scharfe

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).