tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

updating a piece of the running system from build.sh is too hard



I usually use BUILD-NetBSD, which runs build.sh like this:

===> build.sh command: ./build.sh -m i386 -j2 -x -u -U -O /usr/obj/gdt-5/i386 
-T /usr/obj/gdt-5/tools -D /usr/obj/gdt-5/destdir/i386 -R 
/usr/obj/gdt-5/releasedir -X /n0/gdt/NetBSD-5/xsrc release

This is basically a straightforward unpriv build, putting the dirs where
I want them.

I applied a patch to usr.bin/passwd, and went to rebuild it:

$ /usr/obj/gdt-5/tools/bin/nbmake-i386

and then put it in DESTDIR:

$ /usr/obj/gdt-5/tools/bin/nbmake-i386 install

and then tried to install to the running system via a method I've
previously suggested to others.

$ sudo /usr/obj/gdt-5/tools/bin/nbmake-i386 DESTDIR=/ install

But, the install command still had -M (for METALOG) and this resulted in
root-owned 555 /usr/bin/passwd (and /METALOG).

So after reading a bit I tried:

$ sudo USETOOLS=never /usr/obj/gdt-5/tools/bin/nbmake-i386 DESTDIR=/ install

but that still does METALOG.  On the other hand

$ sudo USETOOLS=no make install

doesn't look in my OBJDIR.  So I can

$ USETOOLS=no make; sudo USETOOLS=no make install; make cleandir

and get what I want, but that seems awkward.

Doing this

$ sudo USETOOLS=no 
MAKEOBJDIR='${.CURDIR:C,^/n0/gdt/NetBSD-5/src,/usr/obj/gdt-5/i386,}' make 
install

works fine, but is even more awkward.  (I don't really want to just set
MAKEOBJDIR in mk.conf because I typically build for multiple versions
and architectures, but perhaps nbmake-$arch will override this.)

Finally, after reading nbmake-i386 I did:

$ sudo /usr/obj/gdt-5/tools/bin/nbmake-i386 DESTDIR=/ MKUNPRIVED=no install

which did what I want.

Is there any easier way?  Should DESTDIR=/ automatically flip off
MKUNPRIVED for the install target?


Attachment: pgpNDjUeh698N.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index