Subject: problem with ${SRC}/distrib/sets/maketars
To: None <current-users@netbsd.org>
From: Ronald van der Pol <Ronald.vanderPol@rvdp.org>
List: current-users
Date: 04/18/2004 13:33:36
I am trying to upgrade -current on i386. The build was done on a
fileserver. The machine to be upgraded mounts the build directories
readonly.

Trying to install gives this error:

# sh build.sh -o -u -U  \
-T /mnt/foo/tools-i386 \
-M /mnt/foo/obj-i386 \
-D -/mnt/foo/build-i386 \
-R /mnt/foo/release-i386 \
-V MKTOOLS=no   -w /tmp/foo install=/
===> build.sh command: build.sh -o -u -U -T /mnt/foo/tools-i386 -M /mnt/foo/obj-i386 -D /mnt/foo/build-i386 -R /mnt/foo/release-i386 -V MKTOOLS=no -w /tmp/foo install=/
===> build.sh started: Sun Apr 18 11:32:34 CEST 2004
===> MACHINE:          i386
===> MACHINE_ARCH:     i386
===> TOOLDIR path:     /mnt/foo/tools-i386
===> DESTDIR path:     /mnt/foo/build-i386
===> RELEASEDIR path:  /mnt/foo/release-i386
===> makewrapper:      /tmp/foo
===> Updated /tmp/foo
(cd /mnt/foo/src/distrib/sets &&  /mnt/foo/tools-i386/bin/nbmake INSTALLDIR=/ INSTALLSETS= installsets)
cd /mnt/foo/src/distrib/sets &&  DESTDIR=/mnt/foo/build-i386  MACHINE=i386 MACHINE_ARCH=i386  CKSUM=/mnt/foo/tools-i386/bin/nbcksum MAKE=/mnt/foo/tools-i386/bin/nbmake MTREE=/mnt/foo/tools-i386/bin/nbmtree  MKTEMP=/mnt/foo/tools-i386/bin/nbmktemp PAX=/mnt/foo/tools-i386/bin/nbpax HOST_SH=sh  sh ./maketars -d /mnt/foo/build-i386  -M /mnt/foo/build-i386/METALOG -N /mnt/foo/src/etc   -i / 
./maketars: cannot create /mnt/foo/build-i386/etc/mtree/set.base: permission denied
^C#

I think the problem is in ${SRC}/distrib/sets/maketars. I reverted this
file back to version 1.49 and that made the 'build.sh install=/' finish
without problems. Looking at version 1.52, line 150 looks funny. The
variable '$setfilesonly' only controls the echo(1). Below is a 'sh -x'
of the 1.52 version of maketars.

	rvdp

# cd /mnt/foo/src/distrib/sets &&  DESTDIR=/mnt/foo/build-i386  MACHINE=i386 MACHINE_ARCH=i386  CKSUM=/mnt/foo/tools-i386/bin/nbcksum MAKE=/mnt/foo/tools-i386/bin/nbmake MTREE=/mnt/foo/tools-i386/bin/nbmtree  MKTEMP=/mnt/foo/tools-i386/bin/nbmktemp PAX=/mnt/foo/tools-i386/bin/nbpax HOST_SH=sh  sh -x ./maketars -d /mnt/foo/build-i386  -M /mnt/foo/build-i386/METALOG -N /mnt/foo/src/etc   -i /
+ prog=maketars
+ : sh
+ : /mnt/foo/tools-i386/bin/nbmktemp
+ : /mnt/foo/tools-i386/bin/nbmtree
+ : /mnt/foo/tools-i386/bin/nbpax
+ dirname ./maketars
+ . ./sets.subr
+ MKVARS=       MKBFD                   MKCATPAGES              MKCRYPTO                MKCRYPTO_IDEA           MKCRYPTO_MDC2           MKCRYPTO_RC5            MKCVS                   MKDOC                   MKGDB                   MKHESIOD                MKINFO                  MKKERBEROS              MKKERBEROS4             MKLINT                  MKMAN                   MKMANZ                  MKNLS                   MKPIC                   MKPOSTFIX               MKPROFILE               MKSENDMAIL              MKSHARE                 MKSKEY                  MKUUCP                  MKYP            
+ oIFS=         

+ IFS=

+ /mnt/foo/tools-i386/bin/nbmake -B -f- all
+ eval export MACHINE=i386
+ export MACHINE=i386
+ eval export MACHINE_ARCH=i386
+ export MACHINE_ARCH=i386
+ eval export MACHINE_CPU=i386
+ export MACHINE_CPU=i386
+ eval export HAVE_GCC3=yes
+ export HAVE_GCC3=yes
+ eval export OBJECT_FMT=ELF
+ export OBJECT_FMT=ELF
+ eval export TOOLCHAIN_MISSING=no
+ export TOOLCHAIN_MISSING=no
+ eval export MKBFD=yes
+ export MKBFD=yes
+ eval export MKCATPAGES=yes
+ export MKCATPAGES=yes
+ eval export MKCRYPTO=yes
+ export MKCRYPTO=yes
+ eval export MKCRYPTO_IDEA=no
+ export MKCRYPTO_IDEA=no
+ eval export MKCRYPTO_MDC2=no
+ export MKCRYPTO_MDC2=no
+ eval export MKCRYPTO_RC5=no
+ export MKCRYPTO_RC5=no
+ eval export MKCVS=yes
+ export MKCVS=yes
+ eval export MKDOC=yes
+ export MKDOC=yes
+ eval export MKGDB=yes
+ export MKGDB=yes
+ eval export MKHESIOD=yes
+ export MKHESIOD=yes
+ eval export MKINFO=yes
+ export MKINFO=yes
+ eval export MKKERBEROS=yes
+ export MKKERBEROS=yes
+ eval export MKKERBEROS4=yes
+ export MKKERBEROS4=yes
+ eval export MKLINT=yes
+ export MKLINT=yes
+ eval export MKMAN=yes
+ export MKMAN=yes
+ eval export MKMANZ=no
+ export MKMANZ=no
+ eval export MKNLS=yes
+ export MKNLS=yes
+ eval export MKPIC=yes
+ export MKPIC=yes
+ eval export MKPOSTFIX=yes
+ export MKPOSTFIX=yes
+ eval export MKPROFILE=yes
+ export MKPROFILE=yes
+ eval export MKSENDMAIL=yes
+ export MKSENDMAIL=yes
+ eval export MKSHARE=yes
+ export MKSHARE=yes
+ eval export MKSKEY=yes
+ export MKSKEY=yes
+ eval export MKUUCP=yes
+ export MKUUCP=yes
+ eval export MKYP=yes
+ export MKYP=yes
+ eval x11_version=4
+ x11_version=4
+ IFS=  

+ dirname ./maketars
+ setsdir=.
+ nlists=base comp etc games man misc text
+ xlists=xbase4 xcomp4 xcontrib4 xfont4 xmisc4 xserver4
+ obsolete=0
+ lkm=yes
+ [ i386 = evbppc ]
+ [ ELF = ELF ]
+ shlib=elf
+ stlib=elf
+ [ yes = no ]
+ [ i386 = m68000 ]
+ lists=base comp etc games man misc text
+ tars=
+ dest=/mnt/foo/build-i386
+ metalog=
+ installdir=
+ etcdir=
+ setfilesonly=false
+ getopts bxi:a:m:s:SM:N:d:t: ch
+ dest=/mnt/foo/build-i386
+ getopts bxi:a:m:s:SM:N:d:t: ch
+ metalog=/mnt/foo/build-i386/METALOG
+ getopts bxi:a:m:s:SM:N:d:t: ch
+ etcdir=/mnt/foo/src/etc
+ getopts bxi:a:m:s:SM:N:d:t: ch
+ installdir=/
+ getopts bxi:a:m:s:SM:N:d:t: ch
+ shift 8
+ [ -n / ]
+ + echosed base -e comp s/ etc / /;s/ xetc / / etc
 games man misc text
+ lists=base comp games man misc text
+ [ -n  ]
+ [ -z  -a -z / ]
+ [ -z /mnt/foo/build-i386 ]
+ : /mnt/foo/src/etc
+ /mnt/foo/tools-i386/bin/nbmktemp -d /tmp/maketars.XXXXXX
+ SDIR=/tmp/maketars.16183a
+ setlistdir=/mnt/foo/build-i386/etc/mtree
+ trap cleanup 0 2 3 13
+ [ -n /mnt/foo/build-i386/METALOG ]
+ + /mnt/foo/tools-i386/bin/nbmtreecat -C /mnt/foo/src/etc/mtree/NetBSD.dist -k
 all -N /mnt/foo/src/etc
+ echo /unset all
+ cat /mnt/foo/build-i386/METALOG
+ rv=0
+ [ 0 -ne 0 ]
+ sh ./makeflist -a i386 -m i386 -s . base
+ [ -n /mnt/foo/build-i386/METALOG ]
+ false
+ sort -u
+ awk -f getdirs.awk /tmp/maketars.16183a/flist.base
./maketars: cannot create /mnt/foo/build-i386/etc/mtree/set.base: permission denied
+ sh ./makeflist -a i386 -m i386 -s . comp
+ [ -n /mnt/foo/build-i386/METALOG ]
+ false
+ awk+  -fsort getdirs.awk -u /tmp/maketars.16183a/flist.comp

./maketars: cannot create /mnt/foo/build-i386/etc/mtree/set.comp: permission denied
+ sh ./makeflist -a i386 -m i386 -s . games
^C+ cleanup
+ es=130
+ /bin/rm -rf /tmp/maketars.16183a
+ exit 130
+ cleanup
+ es=130
+ /bin/rm -rf /tmp/maketars.16183a
+ exit 130
#