[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 |
|
---|
| 10 | <para><screen><userinput>patch -Np1 -i ../zlib-&zlib-patch-version;</userinput></screen></para>
|
---|
| 11 |
|
---|
[4ce8193] | 12 | <para>Prepare Zlib to be compiled:</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
|
---|
| 18 | quality in the dynamic zlib library.</para>
|
---|
| 19 |
|
---|
| 20 | <para>Some packages expect a static zlib library to be present
|
---|
| 21 | on the system. To satisfy those programs, compile both the
|
---|
| 22 | shared and static libraries:</para>
|
---|
| 23 |
|
---|
| 24 | <para><screen><userinput>make LIBS="libz.so.1.1.4 libz.a"</userinput></screen></para>
|
---|
| 25 |
|
---|
| 26 | <para>Install the libraries:</para>
|
---|
| 27 |
|
---|
| 28 | <para><screen><userinput>make LIBS="libz.so.1.1.4 libz.a" install</userinput></screen></para>
|
---|
| 29 |
|
---|
| 30 | <para>The shared zlib library should be installed in the
|
---|
| 31 | <filename>/lib</filename> directory. That way, in the event
|
---|
| 32 | that you must boot without the <filename>/usr</filename>
|
---|
| 33 | directory, vital system programs will still have access to
|
---|
[7bfad05] | 34 | the library:</para>
|
---|
[4ce8193] | 35 |
|
---|
| 36 | <para><screen><userinput>mv /usr/lib/libz.so.* /lib</userinput></screen></para>
|
---|
| 37 |
|
---|
| 38 | <para>The <filename>/usr/lib/libz.so</filename> symlink is
|
---|
| 39 | linked to a file which no longer exists, because we moved
|
---|
| 40 | it. Create a symbolic link to the new location of the
|
---|
| 41 | library:</para>
|
---|
| 42 |
|
---|
| 43 | <para><screen><userinput>ln -sf ../../lib/libz.so.1 /usr/lib/libz.so</userinput></screen></para>
|
---|
| 44 |
|
---|
| 45 | <para>Zlib does not install its manual page. Issue the
|
---|
| 46 | following command to install this documentation:</para>
|
---|
| 47 |
|
---|
| 48 | <para><screen><userinput>cp zlib.3 /usr/share/man/man3</userinput></screen></para>
|
---|
[24380c7] | 49 |
|
---|
| 50 | </sect2>
|
---|