[4ce8193] | 1 | <sect2><title> </title><para> </para></sect2>
|
---|
| 2 |
|
---|
[24380c7] | 3 | <sect2>
|
---|
| 4 | <title>Installation of Zlib</title>
|
---|
| 5 |
|
---|
[c84ddd9] | 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>
|
---|
[6e50755] | 9 |
|
---|
[21ba4e3] | 10 | <screen><userinput>patch -Np1 -i ../&zlib-patch;</userinput></screen>
|
---|
[6e50755] | 11 |
|
---|
[89fcc34] | 12 | <para>Now prepare Zlib for compilation:</para>
|
---|
[24380c7] | 13 |
|
---|
[21ba4e3] | 14 | <screen><userinput>./configure --prefix=/usr --shared</userinput></screen>
|
---|
[4ce8193] | 15 |
|
---|
[980599d] | 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>
|
---|
[89fcc34] | 20 |
|
---|
| 21 | <para>Compile the package:</para>
|
---|
[4ce8193] | 22 |
|
---|
[21ba4e3] | 23 | <screen><userinput>make</userinput></screen>
|
---|
[4ce8193] | 24 |
|
---|
[89fcc34] | 25 | <para>Install the shared libraries:</para>
|
---|
| 26 |
|
---|
[21ba4e3] | 27 | <screen><userinput>make install</userinput></screen>
|
---|
[4ce8193] | 28 |
|
---|
[0841437] | 29 | <para>Now also build the non-shared libraries:</para>
|
---|
[21ba4e3] | 30 | <screen><userinput>make clean
|
---|
[4a7a683] | 31 | ./configure --prefix=/usr
|
---|
[21ba4e3] | 32 | make</userinput></screen>
|
---|
[0841437] | 33 |
|
---|
[39dbad2] | 34 | <para>This package has a test suite available which can perform a number of
|
---|
[0841437] | 35 | checks to ensure it built correctly. Should you choose to run it, the
|
---|
| 36 | following command will do so:</para>
|
---|
| 37 |
|
---|
[21ba4e3] | 38 | <screen><userinput>make test</userinput></screen>
|
---|
[0841437] | 39 |
|
---|
| 40 | <para>And install the package:</para>
|
---|
| 41 |
|
---|
[21ba4e3] | 42 | <screen><userinput>make install</userinput></screen>
|
---|
[4ce8193] | 43 |
|
---|
[89fcc34] | 44 | <para>The shared Zlib library should be installed in the
|
---|
[4ce8193] | 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
|
---|
[7bfad05] | 48 | the library:</para>
|
---|
[4ce8193] | 49 |
|
---|
[21ba4e3] | 50 | <screen><userinput>mv /usr/lib/libz.so.* /lib</userinput></screen>
|
---|
[4ce8193] | 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 |
|
---|
[21ba4e3] | 57 | <screen><userinput>ln -sf ../../lib/libz.so.1 /usr/lib/libz.so</userinput></screen>
|
---|
[4ce8193] | 58 |
|
---|
| 59 | <para>Zlib does not install its manual page. Issue the
|
---|
| 60 | following command to install this documentation:</para>
|
---|
| 61 |
|
---|
[21ba4e3] | 62 | <screen><userinput>cp zlib.3 /usr/share/man/man3</userinput></screen>
|
---|
[24380c7] | 63 |
|
---|
| 64 | </sect2>
|
---|