Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 May 2020 20:18:11 +0200
From:      Ede Wolf <>
Subject:   Re: Moving sources (base/ports) from /usr
Message-ID:  <>
In-Reply-To: <>
References:  <> <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
Thanks very much for answering.

That seems like a quite legit way to do this. If I am not mistaken, your 
idea is also what Dragonfly is doing, when been given it a /build 
partition during boot. As a side note.

However, the insteresting question behind using variables, from a 
beginners point of view, is, while they all relate to building stuff, 
why do all of those have to be defined in different places?

Like WRKDIRPREFIX in make.conf (according to portmaster(8)), 
MAKEOBJDIRPREFIX in src-env and absolutely not in make.conf (why ever), 
while DISTDIR seems to be an environment variable, that would imply 
/etc/profile (or csh equivalent)

(, albeit quite old). And of course 
portsnap has it's own set of variables in its own config.

Anyway, for the record, so far I've managed to move /usr/src by 
accidentally having read some message that it is called SOURCEDIR, not 
SRCDIR. A first step.

make.conf may not be the best place to define this, but in lack of a 
more appropriate place it seems to work. I may play around moving this 

The only really documented variable, MAKEOBJDIRPREFIX= in src-env.conf, 
throws a lot of warnings to use ?= instead (something that at first 
glance would absolutely foil the whole idea behind it), but seems to 
work as well.
At least I've managed to build and install world that way with the src, 
ports and obj folders having been completely deleted below /usr.

While the nullmount option may eventually be the way to go for a more 
serious box, out of curiosity I'll try to get it up and running this way 
as well. And more importantly, going to understand this multitude of 
places. If possible for a mere mortal.

Have not found time to gig into ports, but
WRKDIRPREFIX and DISTDIR are the ones to set here. PORTSDIR seems only 
to be used by portsnap. But have to try these as of yet.

I do rememeber having read somewhere that WRKDIRPREFIX may also be used 
for buildworld, but have so far not been able to find this information 

But thanks again very much for getting back. And if someone has some 
logic to share behind all this, I'm all ear.


Am 12.05.20 um 09:01 schrieb Dewayne Geraghty:
> Hi Ede,
> Something like this might help, where you construct:
> /import/src
> /import/ports
> then on as needed basis, you can
> mount_nullfs /import/src /usr/src
> mount_nullfs /import/ports /usr/ports
> I have something like this when I'm using one source (for src and ports)
> on a virtual disk under virtualbox (on Win) across multiple VM's.  This
> also means I don't have to fiddle with variables.
> Cheers.
> On 9/05/2020 5:04 am, Ede Wolf wrote:
>> Hi,
>> As the title implies, I would like to move everything src/build related
>> from /usr to a different folder, let's call it /import. And since it
>> won't be mounted permanently, I'd rather like not to use links. That would certainly work, but it's ugly.
>> So I am looking for a more clean way of archiving this, but currently I am having trouble to find a
>> comprehensive list of the  variables, that would need to be set, and more over, where the proper place woulf be, to do so.
>> More often than not it is not /etc/make.conf
>> For MAKEOBJDIRPREFIX it is src-env.conf, but what about the others?
>> SRCDIR, PORTSDIR, WRKDIRPREFIX, DISTFILES, WRKSRC? Is that list correct and/or complete?
>> Is there any documentation providing a decent overview of the
>> environment (base as well as ports)? Or maybe anyone is running this
>> kind of setup as well?
>> Thanks for helping out
>> Ede
>> _______________________________________________
>> mailing list
>> To unsubscribe, send any mail to ""
> _______________________________________________
> mailing list
> To unsubscribe, send any mail to ""

Want to link to this message? Use this URL: <>