lfs/chapter06/gzip-inst.xml
Gerard Beekmans fdfb226af0 Bill's typo fixes
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@2427 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
2003-02-05 18:29:23 +00:00

42 lines
1.4 KiB
XML

<sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
<sect2>
<title>Installation of Gzip</title>
<para>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.</para>
<para><screen><userinput>patch -Np1 -i ../gzip-&gzip-patch-version;.patch</userinput></screen></para>
<para>Prepare Gzip to be compiled:</para>
<para><screen><userinput>./configure --prefix=/usr</userinput></screen></para>
<para>Change the default installation directory for Gzip so it will
be installed in the <filename class="directory">/bin</filename>
directory:</para>
<para><screen><userinput>cp gzexe.in{,.backup} &amp;&amp;
sed 's%"BINDIR"%/bin%' gzexe.in.backup &gt; gzexe.in</userinput></screen></para>
<para>Continue with compiling the package:</para>
<para><screen><userinput>make</userinput></screen></para>
<para>Install the package:</para>
<para><screen><userinput>make install</userinput></screen></para>
<para>Move the Gzip binaries to the <filename
class="directory">/bin</filename> directory:</para>
<para><screen><userinput>mv /usr/bin/gzip /bin &amp;&amp;
rm /usr/bin/{gunzip,zcat} &amp;&amp;
ln -s gzip /bin/gunzip &amp;&amp;
ln -s gzip /bin/zcat &amp;&amp;
ln -s gunzip /bin/uncompress</userinput></screen></para>
</sect2>