zlib-inst.xml 1.8 KB

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