Subject: why is MAKEDEV written into src/etc tree?
To: None <current-users@netbsd.org>
From: William Allen Simpson <wsimpson@greendragon.com>
List: current-users
Date: 03/11/2004 16:48:18
Each year, the large number of destabilising changes I've observed 
around the beginning of the year causes me to wait for the code to 
settle.  This year was no different, so I've not compiled and installed 
a new -current since Dec 24th.  With the recent call for testers, I've 
tried for the past couple of days.  No joy!

The sticking point today was an attempt to write into src/etc.  It 
appears there are more problems with read-only src (in my case, merely 
cvs'ing with a different user than building).

It seems to me that build.sh should *never* write into the src tree.

Using the command (completely fresh, cleaned-out obj):
  ./build.sh -O /usr/obj -T ../tools -u -U distribution


#    create  etc//home/current/src/etc/MAKEDEV
MACHINE=i386 MACHINE_ARCH=i386  NETBSDSRCDIR=/home/current/src  awk -f /home/current/src/etc/MAKEDEV.awk /home/current/src/etc/MAKEDEV.tmpl > /home/current/src/etc/MAKEDEV
cannot create /home/current/src/etc/MAKEDEV: permission denied

And later,

(  for metaent in passwd pwd.db spwd.db; do  echo "./etc/${metaent} type=file mode=0644 uname=root gname=wheel tags=etc_pkg";  done;  ) | /home/current/src/../tools/bin/nbcat -l >> /usr/obj/destdir.i386/METALOG
cd /usr/obj/etc && STRIP=/home/current/src/../tools/bin/i386--netbsdelf-strip /home/current/src/../tools/bin/nbinstall -U -M /usr/obj/destdir.i386/METALOG -D /usr/obj/destdir.i386 -h sha1 -N /home/current/src/etc -c -p -r -T etc_pkg -o root -g wheel -m 555  MAKEDEV /usr/obj/destdir.i386/dev
nbinstall: MAKEDEV: stat: No such file or directory

*** Failed target:  install-etc-files
*** Failed command: cd /usr/obj/etc && STRIP=/home/current/src/../tools/bin/i386--netbsdelf-strip /home/current/src/../tools/bin/nbinstall -U -M /usr/obj/destdir.i386/METALOG -D /usr/obj/destdir.i386 -h sha1 -N /home/current/src/etc -c -p -r -T etc_pkg -o root -g wheel -m 555 MAKEDEV /usr/obj/destdir.i386/dev
*** Error code 1

Stop.
nbmake: stopped in /home/current/src/etc

*** Failed target:  distribution
*** Failed command: (cd /home/current/src/etc; /home/current/src/../tools/bin/nbmake install-etc-files)
*** Error code 1

Stop.
-- 
William Allen Simpson
    Key fingerprint =  17 40 5E 67 15 6F 31 26  DD 0D B9 9B 6A 15 2C 32