Invalid tar magic when streaming download

Eli Schwartz eschwartz at archlinux.org
Fri Dec 6 01:40:45 UTC 2019


On 12/5/19 8:07 PM, Jeffrey Fetterman wrote:
>> 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.

My point was rather that the command line you ran did not work with the
most common implementation of a 'tar' command in the wild, and one of
about 3 implementations you're likely to run into in the wild.

...

As for testing to find out what file formats it can handle...

That would undoubtedly be because GNU *tar* handles *tar* files, not
*zip* files. Handling zip is not like implementing an execve to some
decompressor as a preprocessor, it's a different file format. It would
be like expecting GNU tar to handle .docx files by drawing a GUI and
offering to input text and stylesheets and colorpickers and embed images
etc. ad nauseam.

It's a tar program, it handles tars.

The fact that another common implementation, bsdtar, does handle zip
formatted files, is because it actually intends to be a general archive
manager and is a thinly disguised interface for "libarchive", not
"libtar". This is such a surprising and notable fact, that the bsdtar
manual explicitly points out the following to draw your attention to it:

"This implementation can extract from tar, pax, cpio, zip, jar, ar, xar,
rpm, 7-zip, and ISO 9660 cdrom images and can create tar, pax, cpio, ar,
zip, 7-zip, and shar archives."

-- 
Eli Schwartz
Arch Linux Bug Wrangler and Trusted User

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 1601 bytes
Desc: OpenPGP digital signature
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20191205/53b0225a/attachment.asc>


More information about the busybox mailing list