Subject: OBJDIRS and etcupdate behavior
To: None <current-users@NetBSD.org>
From: Eye of the Beholder <eye.of.the.8eholder@gmail.com>
List: current-users
Date: 04/28/2006 17:17:23
Hello.
I track -current for some time and i want to ask about etcupdate behavior.

When i compiled the base system without objdirs everything worked perfectly.
After reading some articles, i started to use OBJ dirs in order for the process to be
cleaner.

my /etc/mk.conf has the following regarding the base system:
BSDOBJDIR=/usr/obj
MAKEOBJDIRPREFIX=/usr/obj
DESTDIR=/usr/obj/destdir
RELEASEDIR=/usr/obj/release
TOOLDIR=/usr/obj/tools
BUILD=yes
MKNLS=yes
MKOBJDIRS=yes
MKPOSTFIX=no
MKKERBEROS=no
MKUPDATE=yes
MKYP=no
MKMANZ=yes
USETOOLS=yes

the build commands i use are the following:
./build.sh -D /usr/obj/destdir -M /usr/obj -R /usr/obj/release -T /usr/obj/tools -u tools
./build.sh -D /usr/obj/destdir -M /usr/obj -R /usr/obj/release -T /usr/obj/tools -u -o kernel=CONF
./build.sh -D /usr/obj/destdir -M /usr/obj -R /usr/obj/release -T /usr/obj/tools -u -o distribution
(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.

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)
b) etcupdate -s /usr/obj/usr/src (In the "*** Checking for new directories" stage it prompts
to create hundreds of directores like tools/binutils/build/binutils/doc etc)
c) etcupdate -s /usr/obj/destdir/ (Same as b but with different dirs like altroot dev)
d) etcupdate -s /usr/obj/release/i386/binary/sets/etc.tgz (works perfectly)

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 ?
** Should it remain /usr/src but then why it doesn't find any differences ?
I know i can use the etc.tgz way but i would like to know which is the proper directory and what
i have done wrong.

*** This gave me suspicions if "postinstall -s /usr/src" is right.

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.
I found two ways around this.
a) run build.sh and then remove all files belonging to the sets i don't want (e.g games.tgz)
which is a bit messy
b) go to distrib/sets and manually run "make installsets INSTALLDIR=/ INSTALLSETS=base ..."
(all the sets i want except etc ofcourse)

**** Is there any better way that i might not know ? (shouldn't INSTALLSETS have a variable
like the INSTALLDIR has the INSTALLWORLDDIR ? )


I am sorry if my questions are simple and/or stupid but i got confused and would like to read
your opinions.

Thank you and sorry for my long post.