Subject: Unprivilege build creates MAKEDEV in /usr/src/etc
To: None <>
From: None <>
List: tech-toolchain
Date: 04/14/2005 17:16:30

I'm compiling NetBSD 2.0.2 userland in the unprivilege case (and outside
/usr/src by the way).
Making sets fails when trying to generate MAKEDEV, since MAKEDEV is
created in /usr/src/etc where my unprivilege user has nothing to do.

Here is the relevant part of the log:

(cd /usr/src/etc && /usr/local/obj/polynum.NETBSD-DISTRIB-generic_NetBSD-i386_NetBSD-i386/usr/src/tooldir.NetBSD-2.0-i386/bin/nbmake INSTALL_DONE=1 distribution)
STRIP=/usr/local/obj/polynum.NETBSD-DISTRIB-generic_NetBSD-i386_NetBSD-i386/usr/src/tooldir.NetBSD-2.0-i386/bin/i386--netbsdelf-strip /usr/local/obj/polynum.NETBSD-DISTRIB-generic_NetBSD-i386_NetBSD-i386/usr/src/tooldir.NetBSD-2.0-i386/bin/nbinstall -U -M /usr/local/obj/polynum.NETBSD-DISTRIB-generic_NetBSD-i386_NetBSD-i386/usr/src/destdir.i386/METALOG -D /usr/local/obj/polynum.NETBSD-DISTRIB-generic_NetBSD-i386_NetBSD-i386/usr/src/destdir.i386 -h sha1 -N /usr/src/etc -d -o root -g wheel -m 755 -T base_pkg /usr/local/obj/polynum.NETBSD-DISTRIB-generic_NetBSD-i386_NetBSD-i386/usr/src/destdir.i386
/usr/local/obj/polynum.NETBSD-DISTRIB-generic_NetBSD-i386_NetBSD-i386/usr/src/tooldir.NetBSD-2.0-i386/bin/nbmtree -def /usr/src/etc/mtree/NetBSD.dist -N /usr/src/etc  -p /usr/local/obj/polynum.NETBSD-DISTRIB-generic_NetBSD-i386_NetBSD-i386/usr/src/destdir.i386/ -U -W
(cd /usr/src/etc; /usr/local/obj/polynum.NETBSD-DISTRIB-generic_NetBSD-i386_NetBSD-i386/usr/src/tooldir.NetBSD-2.0-i386/bin/nbmake install-etc-files)
#    create  etc//usr/src/etc/MAKEDEV
MACHINE=i386 MACHINE_ARCH=i386  NETBSDSRCDIR=/usr/src  awk -f /usr/src/etc/MAKEDEV.awk /usr/src/etc/MAKEDEV.tmpl > /usr/src/etc/MAKEDEV
cannot create /usr/src/etc/MAKEDEV: permission denied

So with /usr/src/etc/Makefile {.TARGET} evaluates without prefixing
with the OBJDIR I'm compiling in.

Here are the commands passed in my own makefile:


all: distribution

# We are building with these features:
#	 - unpriviliged
#	 - taking into account the possibility for the source tree to be
#	 nonexec
#	 - finally building the sets
#	 - allowing to rebuild without cleaning (updating)
	NOCLEANDIR=yes sh $(NETBSDSRCDIR)/ -M $(OBJDIR) -a $(TARGET_ARCH) -X $(X11SRCDIR) -x -U distribution;\
	sh $(NETBSDSRCDIR)/ -M $(OBJDIR) -a $(TARGET_ARCH) -X $(X11SRCDIR) -x -U sets	 

This worked AFAIR with 2.0, what am I doing wrong resulting in MAKEDEV
not generated where it should be (outside sources)?

Thierry Laronde (Alceste) <tlaronde +AT+ polynum +dot+ com>  |
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C