[4ce8193] | 1 | <sect2><title> </title><para> </para></sect2>
|
---|
| 2 |
|
---|
[24380c7] | 3 | <sect2>
|
---|
| 4 | <title>Installation of Zlib</title>
|
---|
| 5 |
|
---|
[6e50755] | 6 | <para>Zlib has a potential buffer overflow in its gzprintf() function,
|
---|
| 7 | that, though difficult to take advantage of, should be taken care of. Do
|
---|
| 8 | so by applying this patch:</para>
|
---|
| 9 |
|
---|
[a9c70c2] | 10 | <para><screen><userinput>patch -Np1 -i ../zlib-&zlib-patch-version;.patch</userinput></screen></para>
|
---|
[6e50755] | 11 |
|
---|
[89fcc34] | 12 | <para>Now prepare Zlib for compilation:</para>
|
---|
[24380c7] | 13 |
|
---|
[f353a63] | 14 | <para><screen><userinput>CFLAGS="$CFLAGS -fPIC" \
|
---|
[4ce8193] | 15 | ./configure --prefix=/usr --shared</userinput></screen></para>
|
---|
| 16 |
|
---|
| 17 | <para>The <emphasis>-fPIC</emphasis> flag helps to assure
|
---|
[89fcc34] | 18 | quality in the dynamic Zlib library.</para>
|
---|
| 19 |
|
---|
| 20 | <para>Compile the package:</para>
|
---|
[4ce8193] | 21 |
|
---|
[9720145] | 22 | <para><screen><userinput>make</userinput></screen></para>
|
---|
[4ce8193] | 23 |
|
---|
[89fcc34] | 24 | <para>Install the shared libraries:</para>
|
---|
| 25 |
|
---|
| 26 | <para><screen><userinput>make install</userinput></screen></para>
|
---|
[4ce8193] | 27 |
|
---|
[89fcc34] | 28 | <para>Now also build and install the non-shared libraries:</para>
|
---|
| 29 | <para><screen><userinput>make clean
|
---|
[4a7a683] | 30 | ./configure --prefix=/usr
|
---|
| 31 | make
|
---|
| 32 | make test
|
---|
[9720145] | 33 | make install</userinput></screen></para>
|
---|
[4ce8193] | 34 |
|
---|
[89fcc34] | 35 | <para>The shared Zlib library should be installed in the
|
---|
[4ce8193] | 36 | <filename>/lib</filename> directory. That way, in the event
|
---|
| 37 | that you must boot without the <filename>/usr</filename>
|
---|
| 38 | directory, vital system programs will still have access to
|
---|
[7bfad05] | 39 | the library:</para>
|
---|
[4ce8193] | 40 |
|
---|
| 41 | <para><screen><userinput>mv /usr/lib/libz.so.* /lib</userinput></screen></para>
|
---|
| 42 |
|
---|
| 43 | <para>The <filename>/usr/lib/libz.so</filename> symlink is
|
---|
| 44 | linked to a file which no longer exists, because we moved
|
---|
| 45 | it. Create a symbolic link to the new location of the
|
---|
| 46 | library:</para>
|
---|
| 47 |
|
---|
| 48 | <para><screen><userinput>ln -sf ../../lib/libz.so.1 /usr/lib/libz.so</userinput></screen></para>
|
---|
| 49 |
|
---|
| 50 | <para>Zlib does not install its manual page. Issue the
|
---|
| 51 | following command to install this documentation:</para>
|
---|
| 52 |
|
---|
| 53 | <para><screen><userinput>cp zlib.3 /usr/share/man/man3</userinput></screen></para>
|
---|
[24380c7] | 54 |
|
---|
| 55 | </sect2>
|
---|