Bug 40851

Summary: [PATCH] "mergemaster -p" in UPDATING's "COMMON ITEMS" section
Product: Documentation Reporter: Gerhard Sittig <Gerhard.Sittig>
Component: Books & ArticlesAssignee: freebsd-doc (Nobody) <doc>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Gerhard Sittig 2002-07-21 19:20:04 UTC
Updating the source, building the tools (world) and compiling the
source is not always sufficient to update a system.  The sendmail
update lately introduced new user accounts which are already
needed when building the world.  That's what a new mergemaster
mode ("pre buildworld mode") was introduced for to prepare what
is needed but lacking.

UPDATING in -STABLE does not mention the needed "mergemaster -p"
step in its COMMON ITEMS section.  UPDATING in -CURRENT seems to
have the "mergemaster -p" invocation in the wrong place.

Fix: Here is what I suggest to add to -STABLE's UPDATING:



For -CURRENT I'm not sure if the "mergemaster -p" -- which is
located right before the "make installworld" step in single user
mode -- should move up right before the "make buildworld" command.
Even if the situations handled by mergemaster's pre buildworld
mode up to now only applied in the installworld phase, I'm not
certain that it always will be this way.  Future buildworld or
buildkernel phases might need some preparation done by
'mergemaster -p'.  I would vote for running 'mergemaster -p'
even before buildworld just to be safe.


virtually yours   82D1 9B9C 01DC 4FB4 D7B4  61BE 3F49 4F77 72DE DA76
Gerhard Sittig   true | mail -s "get gpg key" Gerhard.Sittig@gmx.net
-- 
     If you don't understand or are scared by any of the above
             ask your parents or an adult to help you.--byp8fBUnFEUYMrugezbDphNRFJj5BKpnMm6geGcijKkDAe3l
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

Index: UPDATING
===================================================================
RCS file: /CVSREPO/FreeBSD/src/UPDATING,v
retrieving revision 1.73.2.72
diff -u -r1.73.2.72 UPDATING
--- UPDATING	2002/07/05 12:48:52	1.73.2.72
+++ UPDATING	2002/07/20 21:18:37
@@ -447,6 +447,7 @@
 	To update from 4.0-RELEASE or later to the most current
 	4.x-STABLE
 	----------
+	sh usr.sbin/mergemaster/mergemaster.sh -p [3]
 	make buildworld
 	make buildkernel KERNCONF=YOUR_KERNEL_HERE
 	make installkernel KERNCONF=YOUR_KERNEL_HERE
@@ -466,6 +467,12 @@
 	[2] If you do not run mergemaster, you will likely hit a
 	number of show stopper problems.  The biggest one is that
 	your /etc/pam.conf won't let you log in using ssh.
+	[3] Sometimes building or installing the new source tree
+	has prerequisites an older system doesn't satisfy.  This
+	is what the "pre buildworld mode" of mergemaster was
+	introduced for.  Make sure to either install the new
+	version of mergemaster before buildworld or run mergemaster
+	from its source directory where the new version is available.
 
 What follows are older entries for those people upgrading from earlier
 versions of -stable/-current.
How-To-Repeat: 
Upgrading a FreeBSD 4.0-RELEASE system to 4.6-RELEASE by means
of the following commands fails:

  [ install 4.0-R without sources ]
  # cd /usr
  # rmdir src
  # cvs -q -d $REPO co -r RELENG_4_6_0_RELEASE src
  # cd src
  # make buildworld
  # make buildkernel
  # make installkernel
  # reboot & exit  [ with a following 'boot -s' ]
  # mount -a -t nonfs
  # cd /usr/src
  # make installworld  [ <-- this step fails ]
  # mergemaster

The missing smmsp and mailnull account prevent mtree(8) from
working correctly.  This is when the installworld step fails.
Simply calling "mergemaster -p" here only brings up an error
message since the in $PATH mergemaster is too old and doesn't
know this option.

Calling "usr.sbin/mergemaster/mergemaster.sh -p" works as
expected, the following installworld step completes and after
running "the usual" mergemaster the upgrade succeeded.  I did
not try to "install the new mergemaster and then run it".
Comment 1 Pav Lucistnik freebsd_committer freebsd_triage 2006-05-11 14:11:12 UTC
State Changed
From-To: open->closed

These days, mergemaster -p step is part of UPDATING instructions. 
Sorry for not getting to your PR earlier.