Subject: bin/33045: NetBSD gzip rejects files GNU gzip accepts
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org>
From: seebs <seebs@vash.cel.plethora.net>
List: netbsd-bugs
Date: 03/10/2006 04:15:00
>Number:         33045
>Category:       bin
>Synopsis:       NetBSD's gzip rejects at least some files
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Mar 10 04:15:00 +0000 2006
>Originator:     seebs
>Release:        NetBSD 3.99.15
>Organization:
>Environment:
System: NetBSD vash.cel.plethora.net 3.99.15 NetBSD 3.99.15 (VASH) #1: Tue Jan 3 23:03:30 CST 2006 seebs@vash.cel.plethora.net:/sys/arch/i386/compile/VASH i386
Architecture: i386
Machine: i386
>Description:
	There exist files that GNU gzip can decompress ("ignoring trailing
	garbage") but which NetBSD gzip rejects as invalid.
>How-To-Repeat:
	Grab the MVPMC project's boot image for the MediaMVP, extract the
	ramdisk image, and try to decompress it:

        $ gzip -d ramdisk.gz
        gzip: input not gziped (MAGIC0)
        gzip: ramdisk.gz: uncompress failed
	$ /usr/pkg/bin/gunzip ramdisk.gz

	gunzip: ramdisk.gz: decompression OK, trailing garbage ignored
>Fix:
	Not sure.  It looks as though NetBSD is being stricter in checking
	compliance in some way.  The file in question is either the output
	of gzip, or the output of gzip plus trailing garbage which should
	be ignored.