taviso / 123elf

A native port of Lotus 1-2-3 to Linux.
1.17k stars 59 forks source link

gunzip 1.6 on Ubuntu 18.04 fails to unzip `.z` files #61

Closed dtwilliamson closed 2 years ago

dtwilliamson commented 2 years ago

In extract.sh, the find ... gunzip step fails with

invalid compressed data--code out of range

for many files using gunzip 1.6 on Ubuntu 18.04. I tried a few other ways to extract the .z files on my Linux machine, but the one that worked was using gunzip 272.250.1 on MacOS.

taviso commented 2 years ago

Hmm, can you check if uncompress works (I think the package is called ncompress)? I do know gzip had broken lzw/pack support for a while, and 1.6 is quite old... but if I can add a workaround I will!

dtwilliamson commented 2 years ago

On my system gunzip and uncompress are identical (per diff) shell scripts that do this:

exec gzip -d "$@"

damouze commented 2 years ago

I am having the same issue in Devuan ascii. Uncompress works, although it should be called as uncompress.real instead and each .z file needs to be renamed to .Z and I was able to test it by uncompressing a single file.

taviso commented 2 years ago

Hmm, that's really annoying - I think gzip 1.9 and later work!

https://lists.gnu.org/archive/html/bug-gzip/2017-10/msg00003.html

I wonder if Ubuntu can be convinced to grab the patch...

taviso commented 2 years ago

Okay - I think I will have to have a script that downloads and compiles gzip if your gzip version is less than 1.9, it's a shame but I don't see any other easy option.

(Unless anyone has a better idea?)

dtwilliamson commented 2 years ago

I'm running an older version of Ubuntu. The version of gzip in 20.04 is 1.10. If it's not a security issue, I doubt that they'll backport it.

taviso commented 2 years ago

Okay, I tested it with 18.04, once you have a modern gzip it does seem to work okay! I'll commit a quick script and add some docs.