1 | <sect2><title> </title><para> </para></sect2>
|
---|
2 |
|
---|
3 | <sect2>
|
---|
4 | <title>Installation of Zlib</title>
|
---|
5 |
|
---|
6 | <para>Zlib has a potential buffer overflow in its
|
---|
7 | <emphasis>gzprintf()</emphasis> function, that, though difficult to take
|
---|
8 | advantage of, should be taken care of by applying this patch:</para>
|
---|
9 |
|
---|
10 | <screen><userinput>patch -Np1 -i ../&zlib-patch;</userinput></screen>
|
---|
11 |
|
---|
12 | <para>Now prepare Zlib for compilation:</para>
|
---|
13 |
|
---|
14 | <screen><userinput>./configure --prefix=/usr --shared</userinput></screen>
|
---|
15 |
|
---|
16 | <para>Note: Zlib is known to build its shared library incorrectly if a CFLAGS
|
---|
17 | is specified in the environment. If you are using your own CFLAGS variables,
|
---|
18 | ensure you add the <emphasis role="strong">-fPIC</emphasis> directive during
|
---|
19 | this stage, and remove it afterwards.</para>
|
---|
20 |
|
---|
21 | <para>Compile the package:</para>
|
---|
22 |
|
---|
23 | <screen><userinput>make</userinput></screen>
|
---|
24 |
|
---|
25 | <para>Install the shared libraries:</para>
|
---|
26 |
|
---|
27 | <screen><userinput>make install</userinput></screen>
|
---|
28 |
|
---|
29 | <para>Now also build the non-shared libraries:</para>
|
---|
30 | <screen><userinput>make clean
|
---|
31 | ./configure --prefix=/usr
|
---|
32 | make</userinput></screen>
|
---|
33 |
|
---|
34 | <para>This package has a test suite available which can perform a number of
|
---|
35 | checks to ensure it built correctly. Should you choose to run it, the
|
---|
36 | following command will do so:</para>
|
---|
37 |
|
---|
38 | <screen><userinput>make test</userinput></screen>
|
---|
39 |
|
---|
40 | <para>And install the package:</para>
|
---|
41 |
|
---|
42 | <screen><userinput>make install</userinput></screen>
|
---|
43 |
|
---|
44 | <para>The shared Zlib library should be installed in the
|
---|
45 | <filename>/lib</filename> directory. That way, in the event
|
---|
46 | that you must boot without the <filename>/usr</filename>
|
---|
47 | directory, vital system programs will still have access to
|
---|
48 | the library:</para>
|
---|
49 |
|
---|
50 | <screen><userinput>mv /usr/lib/libz.so.* /lib</userinput></screen>
|
---|
51 |
|
---|
52 | <para>The <filename>/usr/lib/libz.so</filename> symlink is
|
---|
53 | linked to a file which no longer exists, because we moved
|
---|
54 | it. Create a symbolic link to the new location of the
|
---|
55 | library:</para>
|
---|
56 |
|
---|
57 | <screen><userinput>ln -sf ../../lib/libz.so.1 /usr/lib/libz.so</userinput></screen>
|
---|
58 |
|
---|
59 | <para>Zlib does not install its manual page. Issue the
|
---|
60 | following command to install this documentation:</para>
|
---|
61 |
|
---|
62 | <screen><userinput>cp zlib.3 /usr/share/man/man3</userinput></screen>
|
---|
63 |
|
---|
64 | </sect2>
|
---|