Subject: bin/27228: serious gzip/tar misfeature
To: None <>
From: None <>
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
>Originator:     David Brownlee
>Release:        NetBSD 2.0_RC4
System: NetBSD 2.0_RC4 NetBSD 2.0_RC4 (_ACPI_) #1: Mon Oct 11 13:05:11 BST 2004 i386
Architecture: i386
Machine: i386
	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
	would be extracted as

	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.


	Download jakarta-tomcat-5.0.28.tar.gz from

	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)