zlib-inst.xml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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>Prepare Zlib to be compiled:</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><screen><userinput>make</userinput></screen></para>
  14. <para>Install the libraries:</para>
  15. <para><screen><userinput>make install
  16. make clean
  17. ./configure --prefix=/usr
  18. make
  19. make test
  20. make install</userinput></screen></para>
  21. <para>The shared zlib library should be installed in the
  22. <filename>/lib</filename> directory. That way, in the event
  23. that you must boot without the <filename>/usr</filename>
  24. directory, vital system programs will still have access to
  25. the library:</para>
  26. <para><screen><userinput>mv /usr/lib/libz.so.* /lib</userinput></screen></para>
  27. <para>The <filename>/usr/lib/libz.so</filename> symlink is
  28. linked to a file which no longer exists, because we moved
  29. it. Create a symbolic link to the new location of the
  30. library:</para>
  31. <para><screen><userinput>ln -sf ../../lib/libz.so.1 /usr/lib/libz.so</userinput></screen></para>
  32. <para>Zlib does not install its manual page. Issue the
  33. following command to install this documentation:</para>
  34. <para><screen><userinput>cp zlib.3 /usr/share/man/man3</userinput></screen></para>
  35. </sect2>