From Gerhard.Sittig@gmx.net  Sun Jul 21 11:17:18 2002
Return-Path: <Gerhard.Sittig@gmx.net>
Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 56A1037B405
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 21 Jul 2002 11:17:18 -0700 (PDT)
Received: from mail.gmx.net (mail.gmx.net [213.165.64.20])
	by mx1.FreeBSD.org (Postfix) with SMTP id DEEF343E58
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 21 Jul 2002 11:17:16 -0700 (PDT)
	(envelope-from Gerhard.Sittig@gmx.net)
Received: (qmail 21385 invoked by uid 0); 21 Jul 2002 18:17:15 -0000
Received: from p50910112.dip0.t-ipconnect.de (HELO mail.gsinet.sittig.org) (80.145.1.18)
  by mail.gmx.net (mp013-rz3) with SMTP; 21 Jul 2002 18:17:15 -0000
Received: (qmail 10985 invoked from network); 21 Jul 2002 14:51:49 -0000
Received: from shell.gsinet.sittig.org (192.168.11.153)
  by mail.gsinet.sittig.org with SMTP; 21 Jul 2002 14:51:49 -0000
Received: (from sittig@localhost)
	by shell.gsinet.sittig.org (8.11.3/8.11.3) id g6LEpnn10981
	for FreeBSD-gnats-submit@freebsd.org; Sun, 21 Jul 2002 16:51:49 +0200 (CEST)
	(envelope-from sittig)
Message-Id: <20020721165149.B1494@shell.gsinet.sittig.org>
Date: Sun, 21 Jul 2002 16:51:49 +0200
From: Gerhard Sittig <Gerhard.Sittig@gmx.net>
To: FreeBSD-gnats-submit@freebsd.org
Subject: [PATCH] "mergemaster -p" in UPDATING's "COMMON ITEMS" section
X-Send-Pr-Version: 3.2

>Number:         40851
>Category:       docs
>Synopsis:       [PATCH] "mergemaster -p" in UPDATING's "COMMON ITEMS" section
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-doc
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jul 21 11:20:04 PDT 2002
>Closed-Date:    Thu May 11 13:11:29 GMT 2006
>Last-Modified:  Thu May 11 13:11:29 GMT 2006
>Originator:     Gerhard Sittig
>Release:        FreeBSD 4.6-STABLE i386
>Organization:
System Defenestrators Inc.
>Environment:

FreeBSD's 4.x branch and a "-p capable" mergemaster as well as
the -CURRENT branch

>Description:

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.

>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".

>Fix:

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

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.


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.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: pav 
State-Changed-When: Thu May 11 13:11:12 UTC 2006 
State-Changed-Why:  
These days, mergemaster -p step is part of UPDATING instructions. 
Sorry for not getting to your PR earlier. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=40851 
>Unformatted:
