Subject: Re: how to install -current?
To: None <current-users@netbsd.org>
From: Pat Foley <pfoley@earthlink.net>
List: current-users
Date: 01/21/2003 20:11:30
Fcc: +outbox
Subject: Re: how to install -current?
In-Reply-To: Your message of "Tue, 21 Jan 2003 18:04:01 EST."
<20030121230401.85C0C7B4D@berkshire.research.att.com>
--------
"Steven M. Bellovin" <smb@research.att.com> writes:
> In message <20030121224225.GA3257@mewburn.net>, Luke Mewburn writes:
> >On Tue, Jan 21, 2003 at 04:49:35PM -0500, Steve Bellovin wrote:
> > | Given the problems sometimes reported in building -current, I prefer to
> > | do my compilation while still running the old system, so that I can do
> > | other things.
> > |
> > | ./build.sh -D /usr/netbsd
> > |
> > | (Stand back, wait a while.)
> >
> >This is sensible! This is, IMNSHO, the ONLY way to update.
> >You've hit the minor hitch with the scheme ...
> >
> >
> > | Great; it built. I reboot to single-user with the new kernel, and try
> > | to install:
> > |
> > | ./build.sh -D /usr/netbsd -i /
> > |
> > | It's recompiling the world...
> >
> >Yes; '-i ...' is performed after all the other operations.
> >The default operation is "make build", and unless you have UPDATE
> >set (or use build.sh -u), one of the the first things "make build"
> >does is "make clean". Which removes all your hard work from the first
> >pass :-(
> >
> >There's a couple of solutions:
> > ./build.sh -D /usr/netbsd -b -i /
> >
> > (`-b' only builds the "make" wrapper scripts, and doesn't do the
> > "make build" step. the documentation of this should be improved)
> >
> > ./build.sh -D /usr/netbsd -u -b -i /
> >
> > (still does the "make build", but with "UPDATE" set, so the
> > "make clean" doesn't run)
> >
> >
> >BTW: Where are you looking for your instructions on building?
> >I would like to ensure that the various instructions on how to
> >build in the source and on www.netbsd.org provide useful and
> >consistent information, and it seems that we're probably
> >deficient in that at this time.
> >
> /usr/src/BUILDING, though I can't check my -current copy right now
> because that machine is still rebuilding the world while in single-user
> mode....
>
> What's missing from that document is examples; there's too much
> knowledge assumed of the oral tradition. (And that says nothing of
> downright ambiguities. For example (and again, this is 1.6 I'm
> referring to), '-u' is described as "sets the UPDATE variable". The
> description of UPDATE is less than clear. Under "full builds", it says
> that it skips the "make cleandir", which is good. But the other
> description of UPDATE says that it compares file timestamps before
> installing to DESTDIR. Well, maybe that's good, but I suspect that the
> copies to DESTDIR are the least of the expense; it's all the
> compilations. And "make" is very good at comparing timestamps, if
> given half a chance. In other words, UPDATE isn't described very
> well...
>
> The documentation on building the toolchain is similarly obscure. If I
> think the tools haven't changed -- the usual case, if I haven't gone
> very long since the last time I build the world -- I *think* I need -T,
> but -t and -b seem to be in that space, too, though I *thinkI* I never
> want them...
This also might be worth mentioning:
If you _don't_ set TOOLDIR (with '-T' for instance) and you boot
a new kernel before installing or perhaps even before building
userland, then build.sh will ignore the old tools directory it
created. That one would have a name something like
"tools.NetBSD-1.6K-i386" but running the new kernel it's looking for
"tools.NetBSD-1.6L-i386". See what I mean? So it'll start
right off building tools all over again.
Whether that suggests setting TOOLDIR is a good idea or not,
I can't say.
Pat