Invalid tar magic when streaming download

Jeffrey Fetterman jfetterm at mail.ccsf.edu
Fri Dec 6 01:07:00 UTC 2019


>This is with GNU tar, how many different versions of tar did you try, anyway???

>From my testing, GNU Tar doesn't need to use pipe gzip on tarballs,
but can't handle zipballs.

On Thu, Dec 5, 2019 at 7:03 PM Jeffrey Fetterman <jfetterm at mail.ccsf.edu> wrote:
>
> Hey, I'm not the one who decided that both zipballs and tarballs on
> GitHub should use DEFLATE compression on random files.
>
>
> On Thu, Dec 5, 2019 at 4:37 PM Eli Schwartz <eschwartz at archlinux.org> wrote:
> >
> > On 12/5/19 5:25 PM, Jeffrey Fetterman wrote:
> > > This does not work:
> > > curl -sL https://api.github.com/repos/mirror/busybox/tarball/master |
> > > busybox64 gzip | busybox64 tar -xf -
> > >
> > > But this does (note the lack of using busybox64 on the last part):
> > > curl -sL https://api.github.com/repos/mirror/busybox/tarball/master |
> > > busybox64 gzip | tar -xf -
> > >
> > > Tried using it with a non-busybox version of gzip, had the same
> > > result, busybox64 tar couldn't handle it but every other version of
> > > tar I have could.
> >
> > $ curl -sL https://api.github.com/repos/mirror/busybox/tarball/master |
> > busybox gzip | tar -xf - -C /tmp/foo
> > tar: Archive is compressed. Use -z option
> > tar: Error is not recoverable: exiting now
> >
> > $ curl -sL https://api.github.com/repos/mirror/busybox/tarball/master |
> > busybox gzip | tar -xzf - -C /tmp/foo
> > tar: This does not look like a tar archive
> > tar: Skipping to next header
> > tar: Exiting with failure status due to previous errors
> >
> > This is with GNU tar, how many different versions of tar did you try,
> > anyway???
> >
> > libarchive bsdtar works, which I guess means that libarchive permits you
> > to wrap a tarball in *two* layers of gzip compression, then extract the
> > contents. Personally, I would claim this is a buggy design goal, because
> > you'd have to be nuts to create tarballs with multiple layers of
> > recursive compression.
> >
> > --
> > Eli Schwartz
> > Arch Linux Bug Wrangler and Trusted User
> >
> > _______________________________________________
> > busybox mailing list
> > busybox at busybox.net
> > http://lists.busybox.net/mailman/listinfo/busybox


More information about the busybox mailing list