aboutsummaryrefslogtreecommitdiffstats
path: root/chapter06/gzip-inst.xml
blob: 06b9441f98a32e3229ce77e7fc2e1815c22fb9c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>

<sect2>
<title>Installation of Gzip</title>

<para>Prepare Gzip to be compiled:</para>

<para><screen><userinput>
patch -Np1 -i ../gzip-&gzip-patch-version;.patch &amp;&amp; 
./configure --prefix=/usr &amp;&amp;
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>And finish off installing the package:</para>

<para><screen><userinput>make install</userinput></screen></para>

<para>Move the Gzip binaries to the root partition:</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>

<sect2>
<title>Command explanations</title>

<para><userinput>patch -Np1 -i ../gzip-1.2.4b.patch:</userinput>
This patch fixes a buffer overflow that occurs when a filename is
longer than 1020 characters.</para>

<para><userinput>
cp gzexe.in{,.backup} &amp;&amp;
sed 's%"BINDIR"%/bin%' gzexe.in.backup &gt; gzexe.in</userinput>
Change the default installation directory for Gzip so it will be
installed on the root partition.</para>


</sect2>