Subject: Re: objdirs and readonly /usr/src
To: Johnny Billquist <bqt@update.uu.se>
From: Andreas Kahari <ak+netbsd@freeshell.org>
List: current-users
Date: 02/21/2004 12:52:39
On Sat, Feb 21, 2004 at 01:35:15PM +0100, Johnny Billquist wrote:
> On Sat, 21 Feb 2004, Valeriy E. Ushakov wrote:
> 
> > On Sat, Feb 21, 2004 at 09:25:20 +0000, Dick Davies wrote:
> >
> > > I mount /usr/src readonly over NFS to my current box.
> > > When I try to build tools, I get this error:
> > >
> > >  cc  -O -o nbmake *.o
> > >  #    objdir  /usr/obj/tools
> > >  ln: obj: Read-only file system
> > >
> > > Which I assume is because build.sh can't make symlinks in /usr/src.
> > >
> > > Have I missed something?
> > > I'm starting to think rsync would be less hassle :)
> >
> > Hmm, I build from readonly sources all the time.  What do you have in
> > your mk.conf?   Sounds like you have some *OBJ* var set in there.
> 
> No, he have a silly problem that there is no one obvious right solution
> to.
> 
> As a part of building, you want to create symlinks from the whole /usr/src
> tree to somewhere local. So you create an obj symlink in every directory,
> pointing at somewhere local, writeable. But the creation of the actual
> symlink itself requires write access to the source directory.
> 
> Once all the obj symlinks have been created, you don't need write access
> to /usr/src, but in order to set things up, you do need write access.

So a union-mounted local directory on top of the NFS-mounted
directory doesn't work in NetBSD either (I had problems with
it in OpenBSD)?  I can't test it right now as I'm away from my
machines.

Andreas


-- 
Andreas Kähäri                      |-}{-|
                                    |{--}|
East Anglia                         |-}{-|
England                             |{--}|