zlib-inst.xml 1.8 KB

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