Subject: Re: objdirs and readonly /usr/src
To: Valeriy E. Ushakov <uwe@ptc.spbu.ru>
From: Johnny Billquist <bqt@update.uu.se>
List: current-users
Date: 02/21/2004 14:36:22
On Sat, 21 Feb 2004, Valeriy E. Ushakov wrote:

> On Sat, Feb 21, 2004 at 13:35:15 +0100, Johnny Billquist wrote:
>
> > > >  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.
>
> What you describe is only one way to use objdirs, that indeed requires
> write permissions to create obj symlinks in the src tree.  But the
> build process can use a method, that doesn't require obj symlinks at
> all.

Certainly, there are always ways around this problem. Like I said, there
is no one right solution to the problem. But the problem he have is
exactly that the build process tries to create symlinks in his readonly
/usr/src tree.
And the easiest way (in my opinion) is just to create the darn obj
symlinks, and then he'll be happy.

Your solution, by the way, isn't related to OBJDIR, unless I'm totally
mistaken, but actually solves the problem by having a union fs. OBJDIR
just tells *where* the obj symlinks should point. They are still created
in the /usr/src tree.

	Johnny

Johnny Billquist                  || "I'm on a bus
                                  ||  on a psychedelic trip
email: bqt@update.uu.se           ||  Reading murder books
pdp is alive!                     ||  tryin' to stay hip" - B. Idol