Bug 137762

Summary: [handbook] [patch] proposed: mention "make delete-old" in sec 24.7 Rebuilding World
Product: Documentation Reporter: Anton Shterenlikht <as>
Component: Books & ArticlesAssignee: Benedict Reuschling <bcr>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
chapter.sgml.diff none

Description Anton Shterenlikht 2009-08-14 12:40:06 UTC
In section 24.7 "rebuilding world" of the handbook no mention is made of
these useful, or even essential, /usr/src/Makefile targets:

# delete-old          - Delete obsolete directories/files/libraries.
# delete-old-dirs     - Delete obsolete directories.
# delete-old-files    - Delete obsolete files.
# delete-old-libs     - Delete obsolete libraries.

This seems to be an important omission, as not running "make delete-old" or
"make delete-old-libs" can result in warnings like these:

/usr/bin/ld: warning: libz.so.4, needed by /usr/local/lib/libtiff.so, may confli
ct with libz.so.5
/usr/bin/ld: warning: librpcsvc.so.4, needed by /usr/local/lib/libXext.so, may c
onflict with librpcsvc.so.5

or build failures in ports, or various other inconsistencies.

I volunteer to write a paragraph or two about this somewhere in section 24.7.
Any comments?
Comment 1 Benedict Reuschling freebsd_committer freebsd_triage 2010-07-24 00:18:06 UTC
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I think this was recently discussed in [1] and from my point of view is
necessary.

If you would like to submit a draft version of your proposed changes,
then feel free to do so. Someone from doc can then look over it and
commit it to the handbook.

Thanks!

[1] http://docs.freebsd.org/cgi/mid.cgi?20100714083124.GE1742
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxKIykACgkQTSZQLkqBk0jOHwCfQSeNB7C+J3cUVC57SZ+Ok62L
zg0AoM8ksRfRSaalRBieuGqDCswGS5Sp
=Rchw
-----END PGP SIGNATURE-----
Comment 2 Anton Shterenlikht 2010-07-28 21:11:24 UTC
See patch attached. I added points 9 and 10 in section 24.7.1
and the new section 24.7.13.

Here's the new look:

http://eis.bris.ac.uk/~mexas/makeworld.html

Perhaps it's too long?

-- 
Anton Shterenlikht
Room 2.6, Queen's Building
Mech Eng Dept
Bristol University
University Walk, Bristol BS8 1TR, UK
Tel: +44 (0)117 331 5944
Fax: +44 (0)117 929 4423
Comment 3 Anton Shterenlikht 2010-09-13 16:50:32 UTC
Warren, sorry for the delay, and many thanks for your comments.

Here's a new separate section, very short:

http://seis.bris.ac.uk/~mexas/make-delete-old.html

Here's the patch:


*** /usr/doc/en_US.ISO8859-1/books/handbook/cutting-edge/chapter.sgml	2010-08-29 14:42:49.000000000 +0100
--- ./chapter.sgml	2010-09-13 16:39:41.000000000 +0100
***************
*** 3029,3034 ****
--- 3029,3084 ----
      </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>Remove obsolete files to prevent problems.</para>
+       <para>Check for obsolete files:</para>
+         <screen>&prompt.root; <userinput>cd /usr/src</userinput>
+ &prompt.root; <userinput>make check-old</userinput>
+ &prompt.root; <userinput>make check-old-libs</userinput></screen>
+        <para>If any obsolete files are found, they can be deleted with</para>
+        <screen>&prompt.root; <userinput>make delete-old</userinput>
+ &prompt.root; <userinput>make delete-old-libs</userinput></screen>
+        <tip>
+          <para>See <filename>/usr/src/Makefile</filename>
+            for more targets of interest.</para>
+        </tip>
+         <para>A prompt is displayed before deleting each obsolete file.
+           Be particularly cautious about deleting shared libraries,
+           which some applications may still depend on.</para>
+        <warning>
+          <title>Warning</title>
+            <para>Deleting obsolete files will break applications that still
+              depend on those obsolete files.</para>
+        </warning>
+         <para>Utilities checking shared library dependencies are available
+           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. The
+           <filename role="package">ports-mgmt/portmaster</filename>
+           utility can be used to automate this process.</para>
+ </sect1>
+ 
    <sect1 id="small-lan">
      <sect1info>
        <authorgroup>

-- 
Anton Shterenlikht
Room 2.6, Queen's Building
Mech Eng Dept
Bristol University
University Walk, Bristol BS8 1TR, UK
Tel: +44 (0)117 331 5944
Fax: +44 (0)117 929 4423
Comment 4 Anton Shterenlikht 2010-09-14 10:14:33 UTC
ok, how about this:

http://seis.bris.ac.uk/~mexas/make-delete-old.html

patch:


*** /usr/doc/en_US.ISO8859-1/books/handbook/cutting-edge/chapter.sgml	2010-08-29 14:42:49.000000000 +0100
--- ./chapter.sgml	2010-09-14 10:05:58.000000000 +0100
***************
*** 3029,3034 ****
--- 3029,3081 ----
      </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>Remove obsolete files to prevent problems.</para>
+     <para>Check for obsolete files:</para>
+     <screen>&prompt.root; <userinput>cd /usr/src</userinput>
+ &prompt.root; <userinput>make check-old</userinput>
+ &prompt.root; <userinput>make check-old-libs</userinput></screen>
+     <para>If any obsolete files are found, they can be deleted with</para>
+     <screen>&prompt.root; <userinput>make delete-old</userinput>
+ &prompt.root; <userinput>make delete-old-libs</userinput></screen>
+     <tip>
+       <para>See <filename>/usr/src/Makefile</filename>
+         for more targets of interest.</para>
+     </tip>
+     <para>A prompt is displayed before deleting each obsolete file.</para>
+     <warning>
+       <title>Warning</title>
+         <para>Deleting obsolete files will break applications that still
+           depend on those obsolete files.</para>
+     </warning>
+     <para>Utilities for checking shared library dependencies are available
+       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. The
+       <filename role="package">ports-mgmt/portmaster</filename>
+       utility can be used to automate this process.</para>
+ </sect1>
+ 
    <sect1 id="small-lan">
      <sect1info>
        <authorgroup>

-- 
Anton Shterenlikht
Room 2.6, Queen's Building
Mech Eng Dept
Bristol University
University Walk, Bristol BS8 1TR, UK
Tel: +44 (0)117 331 5944
Fax: +44 (0)117 929 4423
Comment 5 Anton Shterenlikht 2010-09-14 13:32:07 UTC
> Looks good!  The only thing I see is the indentation on the final
> </sect1> needs to match the opening <sect1>.  Thanks for your patience!
>

fixed:


*** /doc/en_US.ISO8859-1/books/handbook/cutting-edge/chapter.sgml	2010-08-29 14:42:49.000000000 +0100
--- ./chapter.sgml	2010-09-14 13:26:06.000000000 +0100
***************
*** 3029,3034 ****
--- 3029,3081 ----
      </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>Remove obsolete files to prevent problems.</para>
+     <para>Check for obsolete files:</para>
+     <screen>&prompt.root; <userinput>cd /usr/src</userinput>
+ &prompt.root; <userinput>make check-old</userinput>
+ &prompt.root; <userinput>make check-old-libs</userinput></screen>
+     <para>If any obsolete files are found, they can be deleted with</para>
+     <screen>&prompt.root; <userinput>make delete-old</userinput>
+ &prompt.root; <userinput>make delete-old-libs</userinput></screen>
+     <tip>
+       <para>See <filename>/usr/src/Makefile</filename>
+         for more targets of interest.</para>
+     </tip>
+     <para>A prompt is displayed before deleting each obsolete file.</para>
+     <warning>
+       <title>Warning</title>
+         <para>Deleting obsolete files will break applications that still
+           depend on those obsolete files.</para>
+     </warning>
+     <para>Utilities for checking shared library dependencies are available
+       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. The
+       <filename role="package">ports-mgmt/portmaster</filename>
+       utility can be used to automate this process.</para>
+   </sect1>
+ 
    <sect1 id="small-lan">
      <sect1info>
        <authorgroup>


-- 
Anton Shterenlikht
Room 2.6, Queen's Building
Mech Eng Dept
Bristol University
University Walk, Bristol BS8 1TR, UK
Tel: +44 (0)117 331 5944
Fax: +44 (0)117 929 4423
Comment 6 Alexander Best freebsd_committer freebsd_triage 2010-09-15 11:28:33 UTC
State Changed
From-To: open->analyzed

A patch has been submitted to take care of this issue.
Comment 7 Benedict Reuschling freebsd_committer freebsd_triage 2010-10-14 20:41:13 UTC
I seem to have lost some of the discussions in between.

Is the last patch you followed up with the complete patch or only a
correction to the larger patch above?
Can you post the last version (whole patch) again?

Thanks!

Benedict Reuschling
bcr@FreeBSD.org
The FreeBSD Documentation Project
Comment 8 Benedict Reuschling freebsd_committer freebsd_triage 2010-11-05 15:09:03 UTC
Responsible Changed
From-To: freebsd-doc->bcr

Let me finish up the work on this PR. :)
Comment 9 dfilter service freebsd_committer freebsd_triage 2010-12-04 17:56:19 UTC
bcr         2010-12-04 17:56:15 UTC

  FreeBSD doc repository

  Modified files:
    en_US.ISO8859-1/books/handbook/cutting-edge chapter.sgml 
  Log:
  Add a section about deleting old files, directories and libraries with a
  short description why this is necessary.
  
  PR:                 docs/137762
  Submitted by:       Anton Shterenlikht (mexas at bristol dot ac dot uk)
  With feedback from: gabor@, ed@ (BATCH_DELETE_OLD_FILES, a while ago)
  
  Revision  Changes    Path
  1.251     +87 -0     doc/en_US.ISO8859-1/books/handbook/cutting-edge/chapter.sgml
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 10 Benedict Reuschling freebsd_committer freebsd_triage 2010-12-04 18:02:23 UTC
State Changed
From-To: analyzed->closed

A modified version of your last patch was committed. Thanks for your 
patience and the original submission of the patch. PR closed!