Subject: Re: OBJDIRS and etcupdate behavior
To: None <current-users@NetBSD.org>
From: Alan Barrett <apb@cequrux.com>
List: current-users
Date: 05/02/2006 23:39:31
On Fri, 28 Apr 2006, Eye of the Beholder wrote:
> [build]
> (reboot with new kernel)
> ./build.sh -D /usr/obj/destdir -M /usr/obj -R /usr/obj/release -T /usr/obj/tools -u -o install=/
> postinstall -s /usr/src -d / check (and then fix what it finds)
> 
> Now, i will describe my "problem"
> After that i run "etcupdate -s /usr/src". Whenever i compiled the
> base system and run this command i was getting that no differences
> exist. When it ran it said to remove the tmproot and finish.

Perhaps postinstall made all the necessary changes before you ran
etcupdate?

> Today it occured to me that maybe i shouldn't use "-s /usr/src" since
> i use object directories.  So, i tried the following choices:
> a) etcupdate -s /usr/src (it doesn't find any differences)

That should work.

> b) etcupdate -s /usr/obj/usr/src

Don't do that.  There are a few different things that can be
passed to the -s flag of etcupdate, but an object directory
is not one of them.

> c) etcupdate -s /usr/obj/destdir/ (Same as b but with different dirs
> like altroot dev)

Don't do that either.

> d) etcupdate -s /usr/obj/release/i386/binary/sets/etc.tgz (works
> perfectly)

Using etc.tgz is the best method.

> I use etc.tgz now and it works perfectly and finds the differences and
> files missing.
> * So my question is what is the proper directory to use for etcupdate ?

It's best to use a tgz file, or a temporary directory in which you have
unpacked a tgz file.  If you insist on using a source directory, then
use the top level source directory (e.g. /usr/src).

> P.S When i run the "install=/" stage build.sh runs "make installworld"
> which goes in the distrib/sets directory and runs "make installsets
> INSTALLDIR=${INSTALLWORLDDIR:U/} INSTALLSETS="
> 
> This command installs all sets even if they don't exist in the system.

Yes.

> I found two ways around this.

Why would you want a "way around this"?  What are you trying to achieve?

--apb (Alan Barrett)