The problem with gzip(1)

Hasso Tepper hasso at
Tue Mar 3 11:17:48 PST 2009

Xin LI wrote:
> NetBSD r1.87 of src/usr.bin/gzip/gzip.c would give a better chance (you
> would probably also want 1.88) for gzip(1) to survive with such archive
> (issue a warning, but not give a fail case).

Yes, I know. I updated gzip locally to the latest code from NetBSD. It 
then gives warning, but unpacks. But it also returns nonzero value which 
means that "gtar zxf" doesn't work - gtar errors out.

> FWIW FreeBSD's gzip is doing it this way as well.

Maybe ...

> Personally I would be inclined to issue such warning (thus the user
> would know that there is something wrong with the archive, but still
> allow obtaining data) rather than just to 100% match gzip behavior.
> What do you think about this case?

I wouldn't mind to change the code to whatever behavior, but ... Why the 
very same gzip works _without_ warning/error with the same archive on 
NetBSD? Why GNU gzip works _without_ warning/error with the same archive 
on every platform but DragonFly?

Hasso Tepper

More information about the Bugs mailing list