mtab a real file now
[linux_from_scratch.git] / BOOK / chapter06 / gzip-inst.xml
blob28d387f77c25338fbde43f391acd539b5987b18e
1 <sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
3 <sect2>
4 <title>Installation of Gzip</title>
6 <para>A buffer overflow may occur if <userinput>gzip</userinput>
7 encounters a filename over 1020 characters in length. Apply the
8 patch to fix this problem:</para>
10 <para><screen><userinput>patch -Np1 -i ../gzip-&gzip-patch-version;.patch</userinput></screen></para>
12 <para>Prepare Gzip to be compiled:</para>
14 <para><screen><userinput>./configure --prefix=/usr</userinput></screen></para>
16 <para>Change the default installation directory for Gzip so it will
17 be installed in the <filename class="directory">/bin</filename>
18 directory:</para>
20 <para><screen><userinput>cp gzexe.in{,.backup} &amp;&amp;
21 sed 's%"BINDIR"%/bin%' gzexe.in.backup &gt; gzexe.in</userinput></screen></para>
23 <para>Continue with compiling the package:</para>
25 <para><screen><userinput>make</userinput></screen></para>
27 <para>Install the package:</para>
29 <para><screen><userinput>make install</userinput></screen></para>
31 <para>Move the Gzip binaries to the <filename
32 class="directory">/bin</filename> directory:</para>
34 <para><screen><userinput>mv /usr/bin/gzip /bin &amp;&amp;
35 rm /usr/bin/{gunzip,zcat} &amp;&amp;
36 ln -s gzip /bin/gunzip &amp;&amp;
37 ln -s gzip /bin/zcat &amp;&amp;
38 ln -s gunzip /bin/uncompress</userinput></screen></para>
40 </sect2>