Installing Gzip-1.2.4a

Estimated build time:           0.03 SBU
Estimated required disk space:  2 MB

Contents of Gzip

Last checked against version 1.2.4a.

The gzip package contains programs to compress and decompress files using the Lempel-Ziv coding (LZ77).

Gzip installs the following:

Program Files

gunzip (link to gzip), gzexe, gzip, uncompress (link to gunzip), zcat (link to gzip), zcmp, zdiff, zforce, zgrep, zmore and znew

Gzip Installation Dependencies

Last checked against version 1.2.4a.

Bash: sh
Binutils: as, ld, nm
Fileutils: chmod, cp, install, ln, mv, rm
Gcc: cc1, collect2, cpp, cpp0, gcc
Grep: egrep, grep
Make: make
Sed: sed
Sh-utils: hostname
Textutils: cat, tr

Installation of Gzip

The following patch fixes a buffer overflow that occurs when a filename is longer than 1020 characters. It does this by inserting a check that the buffer is large enough for the given filename. The program exits with the message "Filename too long" if the buffer is not large enough.

patch -Np1 -i ../gzip-1.2.4b.patch

Prepare Gzip to be compiled:

./configure --prefix=/usr

Change the default installation directory for Gzip so it will be installed in the /bin directory:

cp gzexe.in{,.backup} &&
sed 's%"BINDIR"%/bin%' gzexe.in.backup > gzexe.in

Continue with compiling the package:

make

Install the package:

make install

Move the Gzip binaries to the /bin directory:

mv /usr/bin/gzip /bin &&
rm /usr/bin/{gunzip,zcat} &&
ln -s gzip /bin/gunzip &&
ln -s gzip /bin/zcat &&
ln -s gunzip /bin/uncompress