Subject: Re: how to install -current?
To: Luke Mewburn <lukem@netbsd.org>
From: Greywolf <greywolf@starwolf.com>
List: current-users
Date: 01/22/2003 09:03:41
On Wed, 22 Jan 2003, Luke Mewburn wrote:

[LM: For all the complaints we get about build.sh's current syntax, I can
[LM: imagine a similar (or greater) level of complaints if we actually
[LM: *changed* it.  ("ooooh, change. evil. change bad. no change.").
[LM: A lose-lose siuation. :(

I'm not convinced of this.  build.sh is still young, still evolving,
and is thus not exempt from a flag day.

I'd say it should be re-examined thoroughly.  It really needs something
of a redesign, but it's not as grand and evil as all that.  build.sh
thus far has managed to build my sparc universe and my i386 universe
in half a working day.  I'm very pleased with the fact that IT WORKS.
The fact that I have to figure it all out every time I go to do so is
kind of a downer, but, as any reasonably sentient being will recognise
-- and I admit -- this is MY problem. :)

I'm in the boat of people who use alternate methods of calling build.sh;
mine is an environment wrapper script called 'tool' which, among other
things, knows how to find the various cross-build tools given a '-m
machtype' option (which it then sets up and passes to whatever I ask
for -- this lets me do things like:

	cd /sys/arch/i386/conf
	tool nbconfig RIVENDELL
	cd ../compile/RIVENDELL
	tool nbmake depend
	tool nbmake
	cd ../../../sparc/conf
	tool -m sparc nbconfig LOTHLORIEN
	cd ../compile/LOTHLORIEN
	tool -m sparc nbmake depend
	tool -m sparc nbmake

And of course the simple case
	cd /usr/src
	tool -m sparc build.sh

(it sets
	TOOLDIR=/usr/src/tools/tools.NetBSD-$REL-$ARCH
	PATH=$TOOLDIR/bin:$PATH
	OBJDIR=/export/obj/$ARCH
	RELEASEDIR=/export/release/$ARCH
	if [ "$ARCH" = `uname -m` ] ; then {
            DESTDIR=/altroot;
	}
	else {
	    DESTDIR=/export/build/$ARCH;
	} fi;

and then runs whatever you call.)

[LM: `-i idir' doesn't set INSTALLWORLDDIR in the same way that all other
[LM: variables set by build.sh are; it only temporarily sets it for the
[LM: duration of 'make installsets'.  The usage in build.sh and BUILDING
[LM: don't refer to the INSTALLWORLDDIR when documenting -i...
[LM:
[LM:
[LM:   | My second biggest gripe (which might be a subset of the above) is about
[LM:   | the fact that the "-i INSTALLWORLDDIR" option implies making a release,
[LM:   | instead of just installing an already-built release.  OK, you can force
[LM:   | it to be sensible by saying "-b -i INSTALLWORLDDIR" instead of just "-i
[LM:   | INSTALLWORLDDIR", but it's easy to forget.
[LM:
[LM: The documentation `-i idir' does not imply "make a release" to me.
[LM: All `-i idir' does is installs from DESTDIR to idir after the
[LM: buildtarget (which defaults to "build") completes.

I think the problem being addressed here is that without the proper OTHER
options, -i will rebuild the world before distributing the tree.

[LM:


				--*greywolf;
--
NetBSD: unshackling hardware designers and users from the bondage of WinTel.