DragonFly bugs List (threaded) for 2009-03
DragonFly BSD
DragonFly bugs List (threaded) for 2009-03
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: The problem with gzip(1)


From: YONETANI Tomokazu <qhwt+dfly@xxxxxxxxxx>
Date: Wed, 4 Mar 2009 09:24:08 +0900

On Tue, Mar 03, 2009 at 07:41:29PM +0200, Hasso Tepper wrote:
> Our gzip(1) has a trouble unpacking lokigames/idsoftware etc archives (a 
> shell script and tar.gz in one file) making these packages fail in 
> pkgsrc. The main trouble is that it's not gzip(1) itself and probably not 
> libz either that causes the problem, but something else. I have exactly 
> the same problem with GNU gzip from pkgsrc in DragonFly, but GNU gzip 
> works just fine with these archives on every other platform I have access 
> to. Our tar doesn't have problem either with these files (not using gzip, 
> but libz directly).
> 
> Finding out what exactly causes it is beyond my skills at the moment ...
> 
> The testcase:
> 
> $ fetch \
> ftp://ftp.estpak.ee/pub/FreeBSD/ports/distfiles/linuxq3apoint-1.32b.x86.run
> $ sed '1,265d' linuxq3apoint-1.32b.x86.run | gzip -cd > /dev/null
> gzip: input not gziped (MAGIC0)

gzip is complaining about the new line that sed appended.

$ sed '1,265d' linuxq3apoint-1.32b.x86.run >a
$ perl -e 'open(A,"./linuxq3apoint-1.32b.x86.run");$_=join("",<A>);$_=~s/.*?\neval \$finish; exit \$res\n//s;print' >b
$ ls -l a b
-rw-r--r--  1 qhwt  wheel  31472010 Mar  4 09:19 a
-rw-r--r--  1 qhwt  wheel  31472009 Mar  4 09:17 b
$ hd -vs 31472000 a
01e03980  01 b1 e3 8c 0a 00 70 47  02 0a                    |......pG..|
01e0398a
$ hd -vs 31472000 b
01e03980  01 b1 e3 8c 0a 00 70 47  02                       |......pG.|
01e03989
$ gzip -vt a b
gzip: input not gziped (MAGIC0)
a:		  NOT OK
gzip: a: uncompress failed
b:		  OK



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]