Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Dec 2001 12:06:24 -0500
From:      Peter Dufault <dufault@hda.com>
To:        current@freebsd.org
Subject:   My naive addendum to Matt's recommended dev/test env
Message-ID:  <20011214120624.A1153@hda.hda.com>

next in thread | raw e-mail | index | archive | help
I've been off FreeBSD for a while.  I've decided to follow Matt
Dillon's recommendations for setting up an NFS development system
from -stable to -current.  Here are my notes for the naive on
doing this.  This is all obvious, if you're new or out of it
this will save you a few hours getting up to date.
Sorry that I'm belaboring the obvious, these notes together with the
previous notes can be a time saver for the archives.

In these notes, I will change the system name
based on what OS it is running: either "release", "stable", or
"current".

Locate and read Matt Dillon's thread from November 2001 entitled "My
Recommended Development/Testing environment for -current", see
geocrawler or FreeBSD.org.

You must be running -stable to build -current.  It is a bug when
-stable can't build -current, it is irrelevant when the latest
formal release can't build -current.  Thus you must start
with the latest formal release.

Install -stable identically to the way you install
-current per Matt's notes.  This gives you a way to
track and build both -stable and -current.  Matt assumes this is obvious.

Do as much as possible non-root.
Matt's warnings about "don't install -current on top of -stable!"
are OK but better yet is do everything except "install" as
yourself so that you can't wipe things out by mistake.

The dangerous
step from my point of view is installing a new -stable on top of your
-release or -stable, -current work should be done on a crashable box.

To support non-root builds, set up /usr/obj/FreeBSD as a directory
owned by whomever you will build as.  Assuming "as" is yourself,
you can now do the build process without worrying about wrecking
anything.

Build -stable this way, logged in as yourself
(I set up scripts with key words associated with "stable" or "current"
just to make it easier):

> release:~% cd /FreeBSD/FreeBSD-stable
> release:/FreeBSD/FreeBSD-stable/% cvs checkout -r RELENG_4 src
> release:/FreeBSD/FreeBSD-stable/% cd src
> release:/FreeBSD/FreeBSD-stable/src/% make buildworld >& buildworld.out

[OBSERVATION: This next part seems particularly succeptible to introduced
bugs, I think I'm out of line according to the handbook in this next step,
see the warnings in the handbook about using a new "config" executable to
configure your kernel.  Can't this handbook warning be folded into the
"make buildkernel" from the working directory?]

Still running the latest released kernel and still logged in as
yourself build the -stable kernel:

> release:/FreeBSD/FreeBSD-stable/src/% make buildkernel
 
(bla-bla, kernel builds).

You've gone as far as you can non-root.  Now comes the part where
you can wipe out your -stable system, and if you're like me, you're
using your -stable system for at least some real work.  Re-read the section
in the handbook about doing backups and having copies of fixit
floppies before upgrading to -stable.  Once you've done, or decided
not to do, such backups, become root, install the new kernel, and
reboot to single user mode.

Note Well: the handbook says pay attention to any additional
make flags that you used in your "make" steps, you must use them
in your "make installworld" as well.

> release:/FreeBSD/FreeBSD-stable/src/% su (ohwha-tafool-iam)
> release:/FreeBSD/FreeBSD-stable/src/# make installkernel
 (bla-bla, stable kernel installs on top of your release system)
> release:/FreeBSD/FreeBSD-stable/src/# shutdown now
> (bla bla, reboot -s, "Enter full pathname" etc, now you're single user
>  running the stable kernel with the release world)
> # fsck -p
> # mount -u /
> # mount -a -t ufs
> # swapon -a
> # cd /FreeBSD/FreeBSD-stable/src
> # make installworld

(Lot's of noise as the stable kernel installs the stable world.  Then reboot)

> # sync
> # reboot

Now login as yourself running the stable kernel and the stable world.
You're now up to date on stable, follow Matt's advice, only
do it on the -stable box as yourself and not root.  Specifically:

Repeat the process and build -current on -stable, again as yourself,
but don't do any installs - you will do the installs only on your
crash -current box.

> stable:~% cd /FreeBSD/FreeBSD-current
> stable:/FreeBSD/FreeBSD-stable/% cvs checkout -r HEAD src
> stable:/FreeBSD/FreeBSD-stable/% cd src
> stable:/FreeBSD/FreeBSD-stable/src/% make buildworld >& buildworld.out

(The -current world builds)

Build the -current kernel, again as yourself:
> stable:/FreeBSD/FreeBSD-stable/src/% make buildkernel >& kernel.out

Now do all installs on the crash box.

Peter

--
Peter Dufault (dufault@hda.com)   Realtime development, Machine control,
HD Associates, Inc.               Fail-Safe systems, Agency approval

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011214120624.A1153>