NetBSD Problem Report #38487

From mouse@Sparkle.Rodents.Montreal.QC.CA  Wed Apr 23 08:15:42 2008
Return-Path: <mouse@Sparkle.Rodents.Montreal.QC.CA>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id 5117863B874
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 23 Apr 2008 08:15:42 +0000 (UTC)
Message-Id: <200804230815.EAA00063@Sparkle.Rodents.Montreal.QC.CA>
Date: Wed, 23 Apr 2008 04:14:46 -0400 (EDT)
From: mouse@netbsd.org
Reply-To: mouse@netbsd.org
To: gnats-bugs@gnats.NetBSD.org
Subject: [dM] install breaks on RO build tree
X-Send-Pr-Version: 3.95

>Number:         38487
>Category:       toolchain
>Synopsis:       build.sh install breaks if -D and -O dirs are RO
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Apr 23 08:20:00 +0000 2008
>Originator:     der Mouse
>Release:        NetBSD 4.0
>Organization:
	Dis-
>Environment:
System: NetBSD/i386 3.0 
Architecture: i386
Machine: i386
>Description:
	On a 3.0 i386 machine, I did a build of the 4.0 world using
	build.sh's build operation (with -U).  This worked fine.
	Later, I had the machine up single-user, with the filesystem
	containing the source, objdir, and destdir trees mounted
	read-only, and I tried to install the resulting 4.0 onto a
	secondary disk with build.sh's install operation.  This attempt
	broke because it tried to write into the objdir.  See the
	how-to-repeat section for full details.  Mail to tech-toolchain
	provoked a recommendation I send-pr; I hope my classification
	of the PR is appropriate.
>How-To-Repeat:
	I built the 4.0 tree with

	./build.sh -D /usr/local/4.0/build/DESTDIR -O /usr/local/4.0/build/OBJDIR -U build

	in /usr/local/4.0/src, where I had the 4.0 source tree (yes, I
	made sure the -D and -O directories existed beforehand), and
	attempted to install with

	./build.sh -V USETOOLS=never -V TOOLDIR=/usr/local/4.0/build/OBJDIR/tooldir.NetBSD-3.0-i386 -D /usr/local/4.0/build/DESTDIR -O /usr/local/4.0/build/OBJDIR -U install=/mnt

	(/usr/local was a RO mount at install time).  Each of these was
	done under 3.0 kernel+userland.  The build was done as a
	nonprivileged user, the install attempt as root while booted
	single-user.  The errors from the install attempt:

	| ===> build.sh command: ./build.sh -V USETOOLS=never -V TOOLDIR=/usr/local/4.0/build/OBJDIR/tooldir.NetBSD-3.0-i386 -D /usr/local/4.0/build/DESTDIR -O /usr/local/4.0/build/OBJDIR -U install=/mnt
	| ===> build.sh started: Tue Apr 22 15:33:17 EDT 2008
	| ===> NetBSD version:   4.0
	| ===> MACHINE:          i386
	| ===> MACHINE_ARCH:     i386
	| ===> Build platform:   NetBSD 3.0 i386
	| ===> HOST_SH:          /bin/sh
	| ===> TOOLDIR path:     /usr/local/4.0/build/OBJDIR/tooldir.NetBSD-3.0-i386
	| ===> DESTDIR path:     /usr/local/4.0/build/DESTDIR
	| ===> RELEASEDIR path:  /usr/local/4.0/build/OBJDIR/releasedir
	| rm: /usr/local/4.0/build/OBJDIR/tooldir.NetBSD-3.0-i386/bin/nbmake-i386: Read-only file system
	| eval: cannot create /usr/local/4.0/build/OBJDIR/tooldir.NetBSD-3.0-i386/bin/nbmake-i386: read-only file system
	| eval: cannot create /usr/local/4.0/build/OBJDIR/tooldir.NetBSD-3.0-i386/bin/nbmake-i386: read-only file system
	| eval: cannot create /usr/local/4.0/build/OBJDIR/tooldir.NetBSD-3.0-i386/bin/nbmake-i386: read-only file system
	| eval: cannot create /usr/local/4.0/build/OBJDIR/tooldir.NetBSD-3.0-i386/bin/nbmake-i386: read-only file system
	| eval: cannot create /usr/local/4.0/build/OBJDIR/tooldir.NetBSD-3.0-i386/bin/nbmake-i386: read-only file system
	| eval: cannot create /usr/local/4.0/build/OBJDIR/tooldir.NetBSD-3.0-i386/bin/nbmake-i386: read-only file system
	| eval: cannot create /usr/local/4.0/build/OBJDIR/tooldir.NetBSD-3.0-i386/bin/nbmake-i386: read-only file system
	| eval: cannot create /usr/local/4.0/build/OBJDIR/tooldir.NetBSD-3.0-i386/bin/nbmake-i386: read-only file system
	| eval: cannot create /usr/local/4.0/build/OBJDIR/tooldir.NetBSD-3.0-i386/bin/nbmake-i386: read-only file system
	| eval: cannot create /usr/local/4.0/build/OBJDIR/tooldir.NetBSD-3.0-i386/bin/nbmake-i386: read-only file system
	| eval: cannot create /usr/local/4.0/build/OBJDIR/tooldir.NetBSD-3.0-i386/bin/nbmake-i386: read-only file system
	| eval: cannot create /usr/local/4.0/build/OBJDIR/tooldir.NetBSD-3.0-i386/bin/nbmake-i386: read-only file system
	| eval: cannot create /usr/local/4.0/build/OBJDIR/tooldir.NetBSD-3.0-i386/bin/nbmake-i386: read-only file system
	| eval: cannot create /usr/local/4.0/build/OBJDIR/tooldir.NetBSD-3.0-i386/bin/nbmake-i386: read-only file system
	| eval: cannot create /usr/local/4.0/build/OBJDIR/tooldir.NetBSD-3.0-i386/bin/nbmake-i386: read-only file system
	| eval: cannot create /usr/local/4.0/build/OBJDIR/tooldir.NetBSD-3.0-i386/bin/nbmake-i386: read-only file system
	| eval: cannot create /usr/local/4.0/build/OBJDIR/tooldir.NetBSD-3.0-i386/bin/nbmake-i386: read-only file system
	| eval: cannot create /usr/local/4.0/build/OBJDIR/tooldir.NetBSD-3.0-i386/bin/nbmake-i386: read-only file system
	| eval: cannot create /usr/local/4.0/build/OBJDIR/tooldir.NetBSD-3.0-i386/bin/nbmake-i386: read-only file system
	| chmod: /usr/local/4.0/build/OBJDIR/tooldir.NetBSD-3.0-i386/bin/nbmake-i386: Read-only file system
	| ===> makewrapper:      /usr/local/4.0/build/OBJDIR/tooldir.NetBSD-3.0-i386/bin/nbmake-i386
	| ===> Updated /usr/local/4.0/build/OBJDIR/tooldir.NetBSD-3.0-i386/bin/nbmake-i386
	| installsets ===> distrib/sets	(with: INSTALLDIR=/mnt INSTALLSETS=)
	| ( cat /usr/local/4.0/src/etc/mtree/NetBSD.dist ;  echo '/unset all' ;  cat /usr/local/4.0/build/DESTDIR/METALOG )  | /usr/local/4.0/build/OBJDIR/tooldir.NetBSD-3.0-i386/bin/nbmtree -C -k all -N /usr/local/4.0/src/etc > /usr/local/4.0/build/DESTDIR/METALOG.new &&  ( rm -f /usr/local/4.0/build/DESTDIR/METALOG ;  mv /usr/local/4.0/build/DESTDIR/METALOG.new /usr/local/4.0/build/DESTDIR/METALOG )
	| cannot create /usr/local/4.0/build/DESTDIR/METALOG.new: read-only file system
	| 
	| *** Failed target:  /usr/local/4.0/build/DESTDIR/METALOG.sanitised
	| *** Failed command: ( cat /usr/local/4.0/src/etc/mtree/NetBSD.dist ; echo '/unset all' ; cat /usr/local/4.0/build/DESTDIR/METALOG ) | /usr/local/4.0/build/OBJDIR/tooldir.NetBSD-3.0-i386/bin/nbmtree -C -k all -N /usr/local/4.0/src/etc > /usr/local/4.0/build/DESTDIR/METALOG.new && ( rm -f /usr/local/4.0/build/DESTDIR/METALOG ; mv /usr/local/4.0/build/DESTDIR/METALOG.new /usr/local/4.0/build/DESTDIR/METALOG )
	| *** Error code 2
	| 
	| Stop.
	| nbmake: stopped in /usr/local/4.0/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/local/4.0/src" ;; *) this="${dir}/"; real="/usr/local/4.0/src/${dir}" ;; esac; show=${this:-.}; echo "${target} ===> ${show%/}${1:+ (with: $@)}"; cd "${real}" && /usr/local/4.0/build/OBJDIR/tooldir.NetBSD-3.0-i386/bin/nbmake _THISDIR_="${this}" "$@" ${target}; }; _makedirtarget distrib/sets installsets INSTALLDIR=/mnt INSTALLSETS=
	| *** Error code 1
	| 
	| Stop.
	| nbmake: stopped in /usr/local/4.0/src
	| 
	| ERROR: Failed to make installworld to /mnt
	| *** BUILD ABORTED ***

	While composing this PR, I tried another install attempt, this
	time with the filesystem that was /usr/local in the above
	mounted (read-only) on /mnt and a different install-to
	directory, with the build.sh command-line updated to match:

	./build.sh -V USETOOLS=never -V TOOLDIR=/mnt/4.0/build/OBJDIR/tooldir.NetBSD-3.0-i386 -D /mnt/4.0/build/DESTDIR -O /mnt/4.0/build/OBJDIR -U install=/extra/mouse/tmp

	This failed in basically the same way, except it didn't produce
	as much output, ending with

	| ===> makewrapper:      /mnt/4.0/build/OBJDIR/tooldir.NetBSD-3.0-i386/bin/nbmake-i386
	| ===> Updated /mnt/4.0/build/OBJDIR/tooldir.NetBSD-3.0-i386/bin/nbmake-i386
	| exec: /usr/local/4.0/build/OBJDIR/tooldir.NetBSD-3.0-i386/bin/nbmake: not found
	| 
	| ERROR: Failed to make installworld to /extra/mouse/tmp
	| *** BUILD ABORTED ***

	Presumably the /usr/local/4.0/... path was compiled into
	something - which is another, related, problem, it seems to me.

	If I've left out anything important, just let me know.

>Fix:
	Unknown.

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.