Subject: Re: problem with build.sh and rdonly filesystem
To: Ronald van der Pol <Ronald.vanderPol@rvdp.org>
From: Luke Mewburn <luke@mewburn.net>
List: current-users
Date: 03/05/2003 15:20:12
On Wed, Mar 05, 2003 at 11:26:49AM +1100, Luke Mewburn wrote:
  | On Tue, Mar 04, 2003 at 10:50:45PM +0100, Ronald van der Pol wrote:
  |   | I haven't built current for about a month.
  |   | 
  |   | I have successfully built on an NFS server. The filesytem is mounted
  |   | read-only on the host I which to install.
  |   | 
  |   | # sh build.sh -U -M /net/NetBSD/obj-i386 -T /net/NetBSD/tools-i386 \
  |   | -D /net/NetBSD/build-i386 -V MKTOOLS=no  install=/
  |   | ===> build.sh command: build.sh -U -M /net/NetBSD/obj-i386 \
  |   | -T /net/NetBSD/tools-i386 -D /net/NetBSD/build-i386 -V MKTOOLS=no install=/
  |   | ===> build.sh started: Tue Mar  4 22:35:30 CET 2003
  |   | mkdir: /net/NetBSD/obj-i386: Read-only file system
  |   | ===> DESTDIR path: /net/NetBSD/build-i386
  |   | ===> TOOLDIR path: /net/NetBSD/tools-i386
  |   | mkdir: /net/NetBSD/tools-i386/bin: Read-only file system
  |   | 
  |   | ERROR: mkdir of '/net/NetBSD/tools-i386/bin' failed
  |   | *** BUILD ABORTED ***
  |   | #
  |   | 
  |   | It looks like createmakewrapper() is always run and always tries
  |   | to mkdir.
  | 
  | (I haven't checked this myself; I'm just speculating).
  | 
  | I'm surprised the second mkdir (of ..../bin) fails, since it uses
  | "mkdir -p", it shouldn't fail.   Actually, I've just tested this:
  | 	ordinary user, no perms, existing dir
  | 	the following exits 0:
  | 		mkdir -p /usr/bin
  | 
  | 	ordinary user, no perms, r-o file system, existing dir
  | 	the following exits 1:
  | 		mkdir -p /readonlymount/existingdir
  | 
  | I would argue that the latter should exit 0.
  | A quick check against Solaris 8 reveals that it does exit 0 in the
  | latter case.

Ok, I've taken a further look at this.

It was a problem accidentally introduced in rev 1.27 of mkdir.c.
I've committed a fix (rev 1.28).

Update your mkdir sources and reinstall, and the problem should be
resolved.


  | So, at the moment, you're stuck  :-(.  If you just needed to write
  | the wrapper to another path, I'd suggest looking at the "-w wrapper"
  | option to build.sh
  | 
  | 
  | I'll think about another solution.

I thought of the solution - see above ;-)


Luke.