Subject: bin/27228: serious gzip/tar misfeature
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <abs@absd.org>
List: netbsd-bugs
Date: 10/11/2004 22:11:56
>Number:         27228
>Category:       bin
>Synopsis:       serious gzip/tar misfeature
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Oct 11 21:12:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     David Brownlee
>Release:        NetBSD 2.0_RC4
>Organization:
	
>Environment:
	
	
System: NetBSD tll.i.purplei.com 2.0_RC4 NetBSD 2.0_RC4 (_ACPI_) #1: Mon Oct 11 13:05:11 BST 2004 root@tll.i.purplei.com:/var/obj/i386/files/netbsd/2.0/sys/arch/i386/compile/_ACPI_ i386
Architecture: i386
Machine: i386
>Description:
	Certain gzipped tarfiles are not extracted correctly if they
	are decompressed by gzip in a pipe to tar. They extract fine if
	gunzipped first and then extracted.

	The filenames extracted are in some cases truncated - for example
	    .../apache/jasper/compiler/Node.TaglibDirective.html
	would be extracted as
	    .../apache/jaspe

	Its quite possible there is a problem with the tarfile, but extraction
	works perfectly on 1.6.x, on 2.0 using a 1.6.x gzip, and on 2.0 if
	the file is gunzipped before extraction.

>How-To-Repeat:

	Download jakarta-tomcat-5.0.28.tar.gz from 
	    http://jakarta.apache.org/site/binindex.cgi

	The problem is exhibited by either of the following two
	commands (with slightly different results in each)
	    gzip -dc jakarta-tomcat-5.0.28.tar.gz | tar xpf -
	    tar xzpf jakarta-tomcat-5.0.28.tar.gz

	After uncompressing the tar.gz with gunzip, both the
	following two commands work wuthout problem
	    cat jakarta-tomcat-5.0.28.tar | tar xpf -
	    tar xpf jakarta-tomcat-5.0.28.tar

	Interestingly, after recompressing the tar with gzip, the
	problem is still present with
	    tar xzpf jakarta-tomcat-5.0.28.tar.gz

	Additional data point - the problem does not occur using a gzip
	binary from 1.6.x (still keeping the tar binary from 2.0_x)

>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: