| Summary: | Handbook/Upgrading instructions: should mention delete-old in order | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Documentation | Reporter: | Chris Rees <utisoft> | ||||
| Component: | Books & Articles | Assignee: | Chris Rees <crees> | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Only Me | ||||||
| Priority: | Normal | ||||||
| Version: | Latest | ||||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
|
Description
Chris Rees
2011-11-20 19:40:09 UTC
On Sun, 20 Nov 2011, Chris Rees wrote:
> I understand it's usually better practice to make two diffs; one moving
> the section and the other with the content changes; I'm happy to provide those
> if the change is OK.
A smaller diff with just the content changes is easier to review.
That said, a quick once-over on the full diff seems okay. Thanks for
putting it together.
-Ben Kaduk
On 21 November 2011 06:36, Benjamin Kaduk <kaduk@mit.edu> wrote: > On Sun, 20 Nov 2011, Chris Rees wrote: > >> =A0 =A0 =A0 =A0I understand it's usually better practice to make two dif= fs; one >> moving >> the section and the other with the content changes; I'm happy to provide >> those >> if the change is OK. > > A smaller diff with just the content changes is easier to review. > > That said, a quick once-over on the full diff seems okay. =A0Thanks for > putting it together. Yeah, I'll make another diff then when I get back home. Should be a few ho= urs. Thanks for the review. Chris Hey, Sorry about the huge delay :/ New patches: For moving the content: http://www.bayofrum.net/~crees/patches/doc-cutting-edge-move-make-delete-old.diff For editing the moved content: http://www.bayofrum.net/~crees/patches/doc-cutting-edge-content-changes.diff Applying patch 1 then patch 2 should give the correct result. Chris Responsible Changed From-To: freebsd-doc->eadler I'll take it. Responsible Changed From-To: eadler->freebsd-doc I won't be getting to this any time soon Responsible Changed From-To: freebsd-doc->crees I can deal. 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> _______________________________________________ svn-doc-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-doc-all To unsubscribe, send any mail to "svn-doc-all-unsubscribe@freebsd.org" Author: crees Date: Wed May 29 17:50:03 2013 New Revision: 41773 URL: http://svnweb.freebsd.org/changeset/doc/41773 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 change rewords the section such that it fits in with the content around it, and is the followup commit to r41772. 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 17:46:29 2013 (r41772) +++ head/en_US.ISO8859-1/books/handbook/cutting-edge/chapter.xml Wed May 29 17:50:03 2013 (r41773) @@ -1875,11 +1875,30 @@ Fetching 133 new ports or files... done. </listitem> <listitem> + <para><command>make + <maketarget>delete-old</maketarget></command></para> + + <para>This target deletes old (obsolete) files. This is important + because sometimes they cause problems if left on the disk, for + example the presence of the old <filename>utmp.h</filename> + causes problems in some ports when the new + <filename>utmpx.h</filename> is installed.</para> + </listitem> + + <listitem> <para>Reboot.</para> <para>A full machine reboot is needed now to load the new kernel and new world with new configuration files.</para> </listitem> + + <listitem> + <para><command>make <maketarget>delete-old-libs</maketarget></command></para> + + <para>Remove any obsolete libraries to avoid conflicts with newer + ones. Make sure that all ports have been rebuilt + before old libraries are removed.</para> + </listitem> </orderedlist> <para>Upgrades from one release of the same &os; branch to a @@ -1935,7 +1954,9 @@ Fetching 133 new ports or files... done. &prompt.root; <userinput>cd /usr/src</userinput> &prompt.root; <userinput>make installworld</userinput> &prompt.root; <userinput>mergemaster</userinput> -&prompt.root; <userinput>reboot</userinput></screen> +&prompt.root; <userinput>make delete-old</userinput> +&prompt.root; <userinput>reboot</userinput> +&prompt.root; <userinput>make delete-old-libs</userinput></screen> <warning> <title>Read Further Explanations</title> @@ -2640,11 +2661,10 @@ Script done, …</screen> </author> </authorgroup> </sect2info> - <title>Deleting Obsolete Files, Directories and Libraries</title> + <title>Deleting Obsolete Files and Directories</title> <indexterm> - <primary>Deleting obsolete files, directories and - libraries</primary> + <primary>Deleting obsolete files and directories</primary> </indexterm> <para>As a part of the &os; development lifecycle, files and their @@ -2663,15 +2683,14 @@ Script done, …</screen> 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> + <para>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> +&prompt.root; <userinput>make check-old</userinput></screen> <para>If any obsolete files are found, they can be deleted using the following command:</para> @@ -2705,7 +2724,7 @@ Script done, …</screen> <screen>&prompt.root; <userinput>shutdown -r now</userinput></screen> </sect2> - <sect2> + <sect2 id="make-delete-old-libs"> <title>Deleting obsolete libraries</title> <warning> @@ -2729,7 +2748,7 @@ Script done, …</screen> 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> +/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> _______________________________________________ svn-doc-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-doc-all To unsubscribe, send any mail to "svn-doc-all-unsubscribe@freebsd.org" State Changed From-To: open->closed Committed. |