This allows users to transparently build FreeBSD from, for example, ~/src/freebsd-src.
Diff Detail
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
I like the idea, but I wonder if it'd be better to modify pw(8) to create a directory under /usr/obj/home with the correct ownership?
I don't object it, but I somehow feel it might be overkill to create a directory which is not very useful for most of users and systems that are not building codes from their home. Also this is only useful for the code resides under /home/**. How about adding some checks and print information and instructions (of setting MAKEOBJDIRPREFIX or asking superuser to create that directory for them) in Makefile.* or *.mk files?
From a sysadm's perspective, I also not very sure it's a good idea to add one more (and uncommon) place other than /tmp (and /var/tmp) where non-superuser can write files to by default. It might cause a DoS issue to the system.
I like the idea, but I wonder if it'd be better to modify pw(8) to create a directory under /usr/obj/home with the correct ownership?
I'm not wedded to this patch, I'd just like us to have one standardized and documented preferred method. Maybe we suggest
mkdir -p /usr/obj/home/${USER}
chown ${USER}:${USER} /usr/obj/home/$USERand pw(8) could offer to do that as @markj suggests
I somehow feel it might be overkill to create a directory which is not very useful for most of users
This is also somewhat true for /usr/obj though I'd say
I'd rather not add new uses of the sticky bit.
and pw(8) could offer to do that as @markj suggests
Do you mean adduser? pw isn't interactive.
From a sysadm's perspective, I also not very sure it's a good idea to add one more (and uncommon) place other than /tmp (and /var/tmp) where non-superuser can write files to by default. It might cause a DoS issue to the system.
Maybe /usr/obj/home/foo can be a symlink to /home/foo/obj instead, though that's perhaps a bit sneaky.
That would run afoul of other setups. For example, on my desktop /usr/home (still old school) is a ZFS dataset on a mirror of SSDs, whereas /usr/obj is a M.2 drive I use for scratch data, so that symlink would be cross-purposes.
I think that we should just document /usr/obj (as we do today) and let users figure out how to configure it. We might document some best practices somewhere, but I'm leery to hardcode anything by default.