Re: tar/libarchive gzip problem [was: portsnap corrupted]

From: Tim Kientzle <kientzle_at_freebsd.org>
Date: Wed, 31 Dec 2008 09:54:15 -0800
Thanks for the report, Simon.

I have in fact been refactoring the decompression
support recently.  I've been testing pretty carefully
as I go, but it's certainly possible that I broke
something.   I'll take a careful look over the weekend.
And, of course, test even more before I commit the
next round of refactoring, which is almost done. ;-/

Tim

Simon L. Nielsen wrote:
> Hey Tim,
> 
> I think one of the recent changes to tar or libarchive broke gzip
> handling in some cases.  See more below.
> 
> [portsnap extract fails with gzip error]
> 
> I'm not sure why I didn't run into it in my tests, but I think the
> problem is in tar / libarchive's handling of gzip files.  Taking one
> random "broken" file [1] it fails with tar's build in decompression,
> but works using external zcat.
> 
> [1] http://portsnap1.freebsd.org/f/19faa3b8bd15bb8f4cd9f665a7623887729f3bd834d780e8b069df979f228e8d.gz
> http://people.freebsd.org/~simon/tmp/19faa3b8bd15bb8f4cd9f665a7623887729f3bd834d780e8b069df979f228e8d.gz
> 
> 
> Broken system:
> 
> [simon_at_eddie:/tmp] tar --version
> bsdtar 2.5.903a - libarchive 2.5.903a
> [simon_at_eddie:/tmp] uname -a
> FreeBSD eddie.nitro.dk 8.0-CURRENT FreeBSD 8.0-CURRENT #1: Tue Dec 30 22:28:33 CET 2008     simon_at_eddie.nitro.dk:/FreeBSD/obj/FreeBSD/system-CURRENT/sys/EDDIE  i386
> [simon_at_eddie:/tmp] tar tvf 19faa3b8bd15bb8f4cd9f665a7623887729f3bd834d780e8b069df979f228e8d.gz > /dev/null
> tar: Error opening archive: Invalid GZip header (saw 99 at offset 1)
> [simon_at_eddie:/tmp] zcat 19faa3b8bd15bb8f4cd9f665a7623887729f3bd834d780e8b069df979f228e8d.gz | tar tf - > /dev/null 
> [simon_at_eddie:/tmp] zcat 19faa3b8bd15bb8f4cd9f665a7623887729f3bd834d780e8b069df979f228e8d.gz | sha256 
> 19faa3b8bd15bb8f4cd9f665a7623887729f3bd834d780e8b069df979f228e8d
> 
> 
> OK system:
> 
> [simon_at_benji:/tmp] tar --version
> bsdtar 2.5.5 - libarchive 2.5.5
> [simon_at_benji:/tmp] uname -a
> FreeBSD benji.s 7.1-RC2 FreeBSD 7.1-RC2 #0: Tue Dec 23 15:18:30 UTC 2008     root_at_logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
> [simon_at_benji:/tmp] tar tvf 19faa3b8bd15bb8f4cd9f665a7623887729f3bd834d780e8b069df979f228e8d.gz > /dev/null 
> [simon_at_benji:/tmp] zcat 19faa3b8bd15bb8f4cd9f665a7623887729f3bd834d780e8b069df979f228e8d.gz | sha256 
> 19faa3b8bd15bb8f4cd9f665a7623887729f3bd834d780e8b069df979f228e8d
> 
> 
> Another OK system:
> 
> [simon_at_ref8-amd64:files] tar --version
> bsdtar 2.5.5 - libarchive 2.5.5
> [simon_at_ref8-amd64:files] uname -a
> FreeBSD ref8-amd64.freebsd.org 8.0-CURRENT FreeBSD 8.0-CURRENT #2 r184542:185402: Fri Nov 28 19:14:40 UTC 2008     peter_at_ref8-amd64.freebsd.org:/scratch/src/sys/amd64/compile/REF8-AMD64  amd64
> [simon_at_ref8-amd64:files] tar tvf 19faa3b8bd15bb8f4cd9f665a7623887729f3bd834d780e8b069df979f228e8d.gz > /dev/null
> [simon_at_ref8-amd64:files] zcat 19faa3b8bd15bb8f4cd9f665a7623887729f3bd834d780e8b069df979f228e8d.gz | sha256
> 19faa3b8bd15bb8f4cd9f665a7623887729f3bd834d780e8b069df979f228e8d
> 
Received on Wed Dec 31 2008 - 16:54:20 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:39 UTC