|
@@ -13,13 +13,7 @@ Estimated required disk space: &zlib-compsize;</screen>
|
|
|
<sect2>
|
|
|
<title>Installation of Zlib</title>
|
|
|
|
|
|
-<para>Zlib has a potential buffer overflow in its
|
|
|
-<emphasis>gzprintf()</emphasis> function, that, though difficult to take
|
|
|
-advantage of, should be taken care of by applying this patch:</para>
|
|
|
-
|
|
|
-<screen><userinput>patch -Np1 -i ../&zlib-patch;</userinput></screen>
|
|
|
-
|
|
|
-<para>Now prepare Zlib for compilation:</para>
|
|
|
+<para>Prepare Zlib for compilation:</para>
|
|
|
|
|
|
<screen><userinput>./configure --prefix=/usr --shared</userinput></screen>
|
|
|
|
|
@@ -33,45 +27,51 @@ afterwards.</para></note>
|
|
|
|
|
|
<screen><userinput>make</userinput></screen>
|
|
|
|
|
|
-<para>Install the shared libraries:</para>
|
|
|
+<para>This package has a test suite available which can perform a number of
|
|
|
+checks to ensure it built correctly. The test suite for Zlib is quick and
|
|
|
+painless so we recommend it be run. The following command will test the shared
|
|
|
+library:</para>
|
|
|
+
|
|
|
+<screen><userinput>make check</userinput></screen>
|
|
|
+
|
|
|
+<para>Install the shared library:</para>
|
|
|
|
|
|
<screen><userinput>make install</userinput></screen>
|
|
|
|
|
|
-<para>Now also build the non-shared libraries:</para>
|
|
|
+<para>Now also build the non-shared (static) library:</para>
|
|
|
<screen><userinput>make clean
|
|
|
./configure --prefix=/usr
|
|
|
make</userinput></screen>
|
|
|
|
|
|
-<para>This package has a test suite available which can perform a number of
|
|
|
-checks to ensure it built correctly. Should you choose to run it, the
|
|
|
-following command will do so:</para>
|
|
|
+<para>The following command will test the static library:</para>
|
|
|
|
|
|
-<screen><userinput>make test</userinput></screen>
|
|
|
+<screen><userinput>make check</userinput></screen>
|
|
|
|
|
|
<para>And install the package:</para>
|
|
|
|
|
|
<screen><userinput>make install</userinput></screen>
|
|
|
|
|
|
-<para>The shared Zlib library should be installed in the
|
|
|
-<filename>/lib</filename> directory. That way, in the event
|
|
|
-that you must boot without the <filename>/usr</filename>
|
|
|
-directory, vital system programs will still have access to
|
|
|
-the library:</para>
|
|
|
+<para>It is good policy and common practice to place important libraries into
|
|
|
+the <filename class="directory">/lib</filename> directory. This matters most
|
|
|
+in scenarios where <filename class="directory">/usr</filename> is on a
|
|
|
+separate partition. Essentially, the run-time components of any libraries
|
|
|
+depended upon by programs in <filename class="directory">/bin</filename> or
|
|
|
+<filename class="directory">/sbin</filename> should reside in
|
|
|
+<filename class="directory">/lib</filename> so that they are on the root
|
|
|
+partition and available in the event of
|
|
|
+<filename class="directory">/usr</filename> being inaccessible.</para>
|
|
|
+
|
|
|
+<para>Therefore we move the run-time components of the shared Zlib into
|
|
|
+<filename class="directory">/lib</filename> by issuing the following
|
|
|
+command:</para>
|
|
|
|
|
|
<screen><userinput>mv /usr/lib/libz.so.* /lib</userinput></screen>
|
|
|
|
|
|
-<para>The <filename>/usr/lib/libz.so</filename> symlink is
|
|
|
-linked to a file which no longer exists, because we moved
|
|
|
-it. Create a symbolic link to the new location of the
|
|
|
-library:</para>
|
|
|
+<para>Now we need to fix up the <filename>/usr/lib/libz.so</filename> symlink
|
|
|
+because we just moved the location of the file it points to:</para>
|
|
|
|
|
|
<screen><userinput>ln -sf ../../lib/libz.so.1 /usr/lib/libz.so</userinput></screen>
|
|
|
|
|
|
-<para>Zlib does not install its manual page. Issue the
|
|
|
-following command to install this documentation:</para>
|
|
|
-
|
|
|
-<screen><userinput>cp zlib.3 /usr/share/man/man3</userinput></screen>
|
|
|
-
|
|
|
</sect2>
|
|
|
|
|
|
</sect1>
|