NetBSD-Bugs archive

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

toolchain/46460: build.sh install command choosing incorrect DESTDIR and RELEASEDIR



>Number:         46460
>Category:       toolchain
>Synopsis:       build.sh install command choosing incorrect DESTDIR and 
>RELEASEDIR
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu May 17 19:40:00 +0000 2012
>Originator:     Jason Boyer
>Release:        5.1.2
>Organization:
>Environment:
NetBSD brushfire 5.1.2 NetBSD 5.1.2 (BRUSHFIRE) #2: Wed May 16 15:47:05 EDT 
2012  root@brushfire:/usr/obj/sys/arch/i386/compile/BRUSHFIRE i386

>Description:
Running 'release' or 'distribution' commands to build.sh without specifying 
them results in one set of defaults for RELEASEDIR and DESTDIR, 'install' 
command results in another. This is technically a dupe of 25125, but I didn't 
see any way to add to it. Setting RELEASEDIR and DESTDIR in /etc/mk.conf allows 
installation to succeed, but shouldn't be necessary.

/etc/mk.conf sets:
BSDOBJDIR=/usr/obj
TOOLDIR=/usr/tools

'distribution' defaults:
DESTDIR path:     /usr/src/destdir.i386
RELEASEDIR path:  /usr/src/releasedir

'install=/' defaults:
DESTDIR path:     /usr/src/obj/destdir.i386
RELEASEDIR path:  /usr/src/obj/releasedir

Summary of successful 'sudo ./build.sh distribution' followed by failed 'sudo 
./build.sh install=/' in case it helps:
===> Successful make distribution
===> build.sh ended:   Thu May 17 11:48:40 EDT 2012
===> Summary of results:
         build.sh command: ./build.sh distribution
         build.sh started: Thu May 17 08:07:10 EDT 2012
         NetBSD version:   5.1.2
         MACHINE:          i386
         MACHINE_ARCH:     i386
         Build platform:   NetBSD 5.1.2 i386
         HOST_SH:          /bin/sh
         TOOLDIR path:     /usr/tools
         DESTDIR path:     /usr/src/destdir.i386
         RELEASEDIR path:  /usr/src/releasedir
         makewrapper:      /usr/tools/bin/nbmake-i386
         Updated /usr/tools/bin/nbmake-i386
         Successful make distribution
         build.sh ended:   Thu May 17 11:48:40 EDT 2012
===> .
brushfire: {3} sudo ./build.sh install=/
Password:
===> build.sh command: ./build.sh install=/
===> build.sh started: Thu May 17 12:06:02 EDT 2012
===> NetBSD version:   5.1.2
===> MACHINE:          i386
===> MACHINE_ARCH:     i386
===> Build platform:   NetBSD 5.1.2 i386
===> HOST_SH:          /bin/sh
===> TOOLDIR path:     /usr/tools
===> DESTDIR path:     /usr/src/obj/destdir.i386
===> RELEASEDIR path:  /usr/src/obj/releasedir
===> makewrapper:      /usr/tools/bin/nbmake-i386
===> Updated /usr/tools/bin/nbmake-i386
installsets ===> distrib/sets   (with: INSTALLDIR=/ INSTALLSETS=)
cd /usr/src/distrib/sets &&  DESTDIR=/usr/src/obj/destdir.i386  MACHINE=i386 
MACHINE_ARCH=i386  AWK=/usr/tools/bin/nbawk  CKSUM=/usr/tools/bin/nbcksum  
DB=/usr/tools/bin/nbdb  HOST_SH=/bin/sh  MAKE=/usr/tools/bin/nbmake  
MKTEMP=/usr/tools/bin/nbmktemp  MTREE=/usr/tools/bin/nbmtree  
PAX=/usr/tools/bin/nbpax  SED=/usr/tools/bin/nbsed  
TSORT=/usr/tools/bin/nbtsort\ -q  /bin/sh ./maketars -d 
/usr/src/obj/destdir.i386    -N /usr/src/etc   -i /
cp: /usr/src/obj/destdir.i386/etc/mtree/set.base: No such file or directory
cp: /usr/src/obj/destdir.i386/etc/mtree/set.comp: No such file or directory
cp: /usr/src/obj/destdir.i386/etc/mtree/set.games: No such file or directory
cp: /usr/src/obj/destdir.i386/etc/mtree/set.man: No such file or directory
cp: /usr/src/obj/destdir.i386/etc/mtree/set.misc: No such file or directory
cp: /usr/src/obj/destdir.i386/etc/mtree/set.tests: No such file or directory
cp: /usr/src/obj/destdir.i386/etc/mtree/set.text: No such file or directory
Copying set base
cd: can't cd to /usr/src/obj/destdir.i386
./maketars: cannot open /usr/src/obj/destdir.i386/etc/mtree/set.base: no such 
file
Copying set comp
cd: can't cd to /usr/src/obj/destdir.i386
./maketars: cannot open /usr/src/obj/destdir.i386/etc/mtree/set.comp: no such 
file
Copying set games
cd: can't cd to /usr/src/obj/destdir.i386
./maketars: cannot open /usr/src/obj/destdir.i386/etc/mtree/set.games: no such 
file
Copying set man
cd: can't cd to /usr/src/obj/destdir.i386
./maketars: cannot open /usr/src/obj/destdir.i386/etc/mtree/set.man: no such 
file
Copying set misc
cd: can't cd to /usr/src/obj/destdir.i386
./maketars: cannot open /usr/src/obj/destdir.i386/etc/mtree/set.misc: no such 
file
Copying set tests
cd: can't cd to /usr/src/obj/destdir.i386
./maketars: cannot open /usr/src/obj/destdir.i386/etc/mtree/set.tests: no such 
file
Copying set text
cd: can't cd to /usr/src/obj/destdir.i386
./maketars: cannot open /usr/src/obj/destdir.i386/etc/mtree/set.text: no such 
file

*** Failed target:  installsets
*** Failed command: cd /usr/src/distrib/sets && 
DESTDIR=/usr/src/obj/destdir.i386 MACHINE=i386 MACHINE_ARCH=i386 
AWK=/usr/tools/bin/nbawk CKSUM=/usr/tools/bin/nbcksum DB=/usr/tools/bin/nbdb 
HOST_SH=/bin/sh MAKE=/usr/tools/bin/nbmake MKTEMP=/usr/tools/bin/nbmktemp 
MTREE=/usr/tools/bin/nbmtree PAX=/usr/tools/bin/nbpax SED=/usr/tools/bin/nbsed 
TSORT=/usr/tools/bin/nbtsort\ -q /bin/sh ./maketars -d 
/usr/src/obj/destdir.i386 -N /usr/src/etc -i /
*** Error code 14

Stop.
nbmake: stopped in /usr/src/distrib/sets

*** Failed target:  installworld
*** Failed command: _makedirtarget() { dir="$1"; shift; target="$1"; shift; 
case "${dir}" in /*) this="${dir}/"; real="${dir}" ;; .) this=""; 
real="/usr/src" ;; *) this="${dir}/"; real="/usr/src/${dir}" ;; esac; 
show=${this:-.}; echo "${target} ===> ${show%/}${1:+ (with: $@)}"; cd "${real}" 
&& /usr/tools/bin/nbmake _THISDIR_="${this}" "$@" ${target}; }; _makedirtarget 
distrib/sets installsets INSTALLDIR=/ INSTALLSETS=
*** Error code 1

Stop.
nbmake: stopped in /usr/src

ERROR: Failed to make installworld to /
*** BUILD ABORTED ***
>How-To-Repeat:
checkout netbsd-5-1-2-RELEASE
set BSDOBJDIR and TOOLDIR in /etc/mk.conf
sudo build.sh kernel=whatever
reboot
sudo build.sh distribution
sudo build.sh install=/
>Fix:
in build.sh function validatemakeparams() - Lines 1074 to 1084 are:

         TOOLDIR=$(getmakevar TOOLDIR)
         statusmsg "TOOLDIR path:     ${TOOLDIR}"
         DESTDIR=$(getmakevar DESTDIR)
         RELEASEDIR=$(getmakevar RELEASEDIR)
         RELEASEMACHINEDIR=$(getmakevar RELEASEMACHINEDIR)
         if ! $do_expertmode; then
                 _SRC_TOP_OBJ_=$(getmakevar _SRC_TOP_OBJ_)
                 : ${DESTDIR:=${_SRC_TOP_OBJ_}/destdir.${MACHINE}}
                 : ${RELEASEDIR:=${_SRC_TOP_OBJ_}/releasedir}
                 makeenv="${makeenv} DESTDIR RELEASEDIR"
         fi

_SRC_TOP_OBJ is either different in distribution vs. install, or DESTDIR and 
RELEASEDIR are set in a different way in each. I haven't had time to 
investigate further.



Home | Main Index | Thread Index | Old Index