change ports default work directory prefix
freebsd-ports-local at be-well.ilk.org
Wed Oct 7 12:02:12 UTC 2015
Dirk Engling <erdgeist at erdgeist.org> writes:
> Today in EuroBSDCon's jail working group we discussed changing the
> default for WRKDIRPREFIX to /usr/obj/ports. This has the advantage of
> being able to share the ports tree between host system and jails.
> Another plus is that cleaning all work directories is much faster than a
> recursive make clean.
I set WRKDIRPREFIX in all cases (including the "real" system) for these
reasons. I don't use /usr/obj/ports, but /usr/obj is the best place that
exists in hier(7).
> With the current default, exposing the ports tree to jails potentially
> leaks information about installed programs, configured options or host
> specific generated secrets (thinking of LocalSettings.php).
I don't understand why any of these would be concerns. If there are work
directories littering the tree, that could leak some information, and
the distfiles set could leak some information, but not much and not
> On the down side, developers can't by default just copy the port, hack
> away and be sure to only modify files in their respective home directories.
When I do that, I'm running under my own UID, so I don't have permission
to write into /usr/obj. If I forget to set WRKDIRPREFIX, I'll get a
quick reminder. I don't think it's a problem.
> bapt@ asked me to discuss this here, also looking for potential other
> pitfalls I have not thought about.
People with unusual partitioning schemes might see some surprising
effects, but I think it's unlikely to break anything even in those
cases, and they may well set WRKDIRPREFIX already.
There are no significant downsides, and although I think the benefits
will turn out to mostly go to types of people who already set
WRKDIRPREFIX today, they are real.
In short: can't hurt, will help a bit, go ahead.
More information about the freebsd-ports