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: lukem
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Apr 23 08:20:00 +0000 2008
>Closed-Date:
>Last-Modified: Mon Jun 05 05:16:58 +0000 2023
>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.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: toolchain-manager->lukem
Responsible-Changed-By: lukem@NetBSD.org
Responsible-Changed-When: Sat, 03 Jun 2023 21:07:38 +0000
Responsible-Changed-Why:
State-Changed-From-To: open->feedback
State-Changed-By: lukem@NetBSD.org
State-Changed-When: Sat, 03 Jun 2023 21:07:38 +0000
State-Changed-Why:
Are you able to reproduce this in a build of -current?
From: Mouse <mouse@Rodents-Montreal.ORG>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: toolchain/38487 (build.sh install breaks if -D and -O dirs are RO)
Date: Sat, 3 Jun 2023 17:48:36 -0400 (EDT)
> Are you able to reproduce this in a build of -current?
I have not tried. It has been at least a decade since I tried to build
-current (specifically, since core let GPLv3 code into the tree). I
have built 8.* and 9.* a few times for work, but I don't think I've
ever tried to install from -D and -O directories which are mounted RO.
I don't think I've ever tried this since I sent the PR, not even with
5.2.
That said, if it's not reproducible in -current by doing the analog of
what I sketch in the PR (do a build.sh -D ... -O ... -x -U build, then,
with the -D and -O directories on a read-only filesystem, try to
install into somewhere RW), it can probably be considered fixed.
This strikes me as a practical issue more because it would likely break
multiple parallel installs from shared -D and -O build directories than
because it breaks installs with a filesystem mounted RO.
/~\ The ASCII Mouse
\ / Ribbon Campaign
X Against HTML mouse@rodents-montreal.org
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B
State-Changed-From-To: feedback->open
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Mon, 05 Jun 2023 05:16:58 +0000
State-Changed-Why:
feedback received
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2023
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.