svn commit: r41772 - head/en_US.ISO8859-1/books/handbook/cutting-edge
Chris Rees
crees at FreeBSD.org
Wed May 29 17:46:30 UTC 2013
Author: crees
Date: Wed May 29 17:46:29 2013
New Revision: 41772
URL: http://svnweb.freebsd.org/changeset/doc/41772
Log:
Removing old files is not an optional step on updating and upgrading FreeBSD.
Reflect this by merging make delete-old section into the updating section.
This is a movement-only change; the content change will follow
PR: docs/162699
Approved by: gjb (mentor)
Modified:
head/en_US.ISO8859-1/books/handbook/cutting-edge/chapter.xml
Modified: head/en_US.ISO8859-1/books/handbook/cutting-edge/chapter.xml
==============================================================================
--- head/en_US.ISO8859-1/books/handbook/cutting-edge/chapter.xml Wed May 29 15:05:43 2013 (r41771)
+++ head/en_US.ISO8859-1/books/handbook/cutting-edge/chapter.xml Wed May 29 17:46:29 2013 (r41772)
@@ -2630,6 +2630,72 @@ Script done, …</screen>
</sect3>
</sect2>
+ <sect2 id="make-delete-old">
+ <sect2info>
+ <authorgroup>
+ <author>
+ <firstname>Anton</firstname>
+ <surname>Shterenlikht</surname>
+ <contrib>Based on notes provided by </contrib>
+ </author>
+ </authorgroup>
+ </sect2info>
+ <title>Deleting Obsolete Files, Directories and Libraries</title>
+
+ <indexterm>
+ <primary>Deleting obsolete files, directories and
+ libraries</primary>
+ </indexterm>
+
+ <para>As a part of the &os; development lifecycle, files and their
+ contents occasionally become obsolete. This may be because
+ functionality is implemented elsewhere, the version number of
+ the library has changed, or it was removed from the system
+ entirely. This includes old files, libraries, and directories,
+ which should be removed when updating the system. The benefit
+ is that the system is not cluttered with old files which take up
+ unnecessary space on the storage and backup media.
+ Additionally, if the old library has a security or stability
+ issue, the system should be updated to the newer library to keep
+ it safe and to prevent crashes caused by the old library.
+ Files, directories, and libraries which are considered obsolete
+ are listed in <filename>/usr/src/ObsoleteFiles.inc</filename>.
+ The following instructions should be used to remove obsolete
+ files during the system upgrade process.</para>
+
+ <para>Follow the steps outlined in <xref
+ linkend="canonical-build"/>. After the
+ <command>make <maketarget>installworld</maketarget></command>
+ and the subsequent <command>mergemaster</command> have finished
+ successfully, check for obsolete files and libraries as
+ follows:</para>
+
+ <screen>&prompt.root; <userinput>cd /usr/src</userinput>
+ &prompt.root; <userinput>make check-old</userinput></screen>
+
+ <para>If any obsolete files are found, they can be deleted using
+ the following command:</para>
+
+ <screen>&prompt.root; <userinput>make delete-old</userinput></screen>
+
+ <tip>
+ <para>Refer to <filename>/usr/src/Makefile</filename>
+ for more targets of interest.</para>
+ </tip>
+
+ <para>A prompt is displayed before deleting each obsolete file.
+ To skip the prompt and let the system remove these files
+ automatically, use
+ <makevar>BATCH_DELETE_OLD_FILES</makevar>:</para>
+
+ <screen>&prompt.root; <userinput>make -DBATCH_DELETE_OLD_FILES delete-old</userinput></screen>
+
+ <para>The same goal can be achieved by piping these commands
+ through <command>yes</command>:</para>
+
+ <screen>&prompt.root; <userinput>yes|make delete-old</userinput></screen>
+ </sect2>
+
<sect2 id="updating-upgrading-rebooting">
<title>Rebooting</title>
@@ -2637,6 +2703,49 @@ Script done, …</screen>
then reboot the system using &man.shutdown.8;:</para>
<screen>&prompt.root; <userinput>shutdown -r now</userinput></screen>
+ </sect2>
+
+ <sect2>
+ <title>Deleting obsolete libraries</title>
+
+ <warning>
+ <title>Warning</title>
+
+ <para>Deleting obsolete files will break applications that
+ still depend on those obsolete files. This is especially true
+ for old libraries. In most cases, the programs, ports, or
+ libraries that used the old library need to be recompiled
+ before <command>make
+ <maketarget>delete-old-libs</maketarget></command> is
+ executed.</para>
+ </warning>
+
+ <para>Utilities for checking shared library dependencies are
+ available from the Ports Collection in
+ <filename role="package">sysutils/libchk</filename> or <filename
+ role="package">sysutils/bsdadminscripts</filename>.</para>
+
+ <para>Obsolete shared libraries can conflict with newer libraries,
+ causing messages like these:</para>
+
+ <screen>/usr/bin/ld: warning: libz.so.4, needed by /usr/local/lib/libtiff.so, may conflict with libz.so.5
+ /usr/bin/ld: warning: librpcsvc.so.4, needed by /usr/local/lib/libXext.so, may conflict with librpcsvc.so.5</screen>
+
+ <para>To solve these problems, determine which port installed the
+ library:</para>
+
+ <screen>&prompt.root; <userinput>pkg_info -W /usr/local/lib/libtiff.so</userinput>
+ /usr/local/lib/libtiff.so was installed by package tiff-3.9.4
+ &prompt.root; <userinput>pkg_info -W /usr/local/lib/libXext.so</userinput>
+ /usr/local/lib/libXext.so was installed by package libXext-1.1.1,1</screen>
+
+ <para>Then deinstall, rebuild and reinstall the port. <filename
+ role="package">ports-mgmt/portmaster</filename> can be used to
+ automate this process. After all ports are rebuilt and no
+ longer use the old libraries, delete the old libraries using the
+ following command:</para>
+
+ <screen>&prompt.root; <userinput>make delete-old-libs</userinput></screen>
<para>You should now have successfully upgraded the &os;
system. Congratulations.</para>
@@ -2921,111 +3030,6 @@ Building everything..
</sect2>
</sect1>
- <sect1 id="make-delete-old">
- <sect1info>
- <authorgroup>
- <author>
- <firstname>Anton</firstname>
- <surname>Shterenlikht</surname>
- <contrib>Based on notes provided by </contrib>
- </author>
- </authorgroup>
- </sect1info>
- <title>Deleting Obsolete Files, Directories and Libraries</title>
-
- <indexterm>
- <primary>Deleting obsolete files, directories and
- libraries</primary>
- </indexterm>
-
- <para>As a part of the &os; development lifecycle, files and their
- contents occasionally become obsolete. This may be because
- functionality is implemented elsewhere, the version number of
- the library has changed, or it was removed from the system
- entirely. This includes old files, libraries, and directories,
- which should be removed when updating the system. The benefit
- is that the system is not cluttered with old files which take up
- unnecessary space on the storage and backup media.
- Additionally, if the old library has a security or stability
- issue, the system should be updated to the newer library to keep
- it safe and to prevent crashes caused by the old library.
- Files, directories, and libraries which are considered obsolete
- are listed in <filename>/usr/src/ObsoleteFiles.inc</filename>.
- The following instructions should be used to remove obsolete
- files during the system upgrade process.</para>
-
- <para>Follow the steps outlined in <xref
- linkend="canonical-build"/>. After the
- <command>make <maketarget>installworld</maketarget></command>
- and the subsequent <command>mergemaster</command> have finished
- successfully, check for obsolete files and libraries as
- follows:</para>
-
- <screen>&prompt.root; <userinput>cd /usr/src</userinput>
-&prompt.root; <userinput>make check-old</userinput></screen>
-
- <para>If any obsolete files are found, they can be deleted using
- the following command:</para>
-
- <screen>&prompt.root; <userinput>make delete-old</userinput></screen>
-
- <tip>
- <para>Refer to <filename>/usr/src/Makefile</filename>
- for more targets of interest.</para>
- </tip>
-
- <para>A prompt is displayed before deleting each obsolete file.
- To skip the prompt and let the system remove these files
- automatically, use
- <makevar>BATCH_DELETE_OLD_FILES</makevar>:</para>
-
- <screen>&prompt.root; <userinput>make -DBATCH_DELETE_OLD_FILES delete-old</userinput></screen>
-
- <para>The same goal can be achieved by piping these commands
- through <command>yes</command>:</para>
-
- <screen>&prompt.root; <userinput>yes|make delete-old</userinput></screen>
-
- <warning>
- <title>Warning</title>
-
- <para>Deleting obsolete files will break applications that
- still depend on those obsolete files. This is especially true
- for old libraries. In most cases, the programs, ports, or
- libraries that used the old library need to be recompiled
- before <command>make
- <maketarget>delete-old-libs</maketarget></command> is
- executed.</para>
- </warning>
-
- <para>Utilities for checking shared library dependencies are
- available from the Ports Collection in
- <filename role="package">sysutils/libchk</filename> or <filename
- role="package">sysutils/bsdadminscripts</filename>.</para>
-
- <para>Obsolete shared libraries can conflict with newer libraries,
- causing messages like these:</para>
-
- <screen>/usr/bin/ld: warning: libz.so.4, needed by /usr/local/lib/libtiff.so, may conflict with libz.so.5
-/usr/bin/ld: warning: librpcsvc.so.4, needed by /usr/local/lib/libXext.so, may conflict with librpcsvc.so.5</screen>
-
- <para>To solve these problems, determine which port installed the
- library:</para>
-
- <screen>&prompt.root; <userinput>pkg_info -W /usr/local/lib/libtiff.so</userinput>
-/usr/local/lib/libtiff.so was installed by package tiff-3.9.4
-&prompt.root; <userinput>pkg_info -W /usr/local/lib/libXext.so</userinput>
-/usr/local/lib/libXext.so was installed by package libXext-1.1.1,1</screen>
-
- <para>Then deinstall, rebuild and reinstall the port. <filename
- role="package">ports-mgmt/portmaster</filename> can be used to
- automate this process. After all ports are rebuilt and no
- longer use the old libraries, delete the old libraries using the
- following command:</para>
-
- <screen>&prompt.root; <userinput>make delete-old-libs</userinput></screen>
- </sect1>
-
<sect1 id="small-lan">
<sect1info>
<authorgroup>
More information about the svn-doc-all
mailing list