MAKEOBJDIRPREFIX Defines the prefix for directory names in the tree of
built objects. Defaults to /usr/obj if not defined.
This variable should only be set in the environment or
/etc/src-env.conf and not via /etc/make.conf or
/etc/src.conf or the command line.
Yeah, thanks, I see. But what about updating that via git, still would need to run it as rootWhy do you think you need to fiddle with permissions? /usr/src/ can be entirely read-only. Intermediate files are saved to /usr/obj/, or more specifically MAKEOBJDIRPREFIX.
git -C /usr/src pull
, or not?Exactly. Typing something likeMy /usr/src and /usr/obj are owned by me. That way I can operate git on src and I can do buildworld and buildkernel as my user.
Git is complex software with a large attack surface. Generally you shouldn't run it as root. Probably OK for the FreeBSD trees but anyway.
doas git ...
feels very uncomfortable.My /usr/src and /usr/obj are owned by me.
% eza -dl /usr/doc /usr/obj /usr/ports /usr/src
drwxr-xr-x - grahamperrin 4 May 20:56 /usr/doc
drwsr-xr-x - grahamperrin 4 Jan 00:46 /usr/obj
drwxr-xr-x - grahamperrin 19 Jul 23:19 /usr/ports
drwxr-xr-x - grahamperrin 19 Jul 01:56 /usr/src
%
That way I can operate git on src and I can do buildworld and buildkernel as my user. …
chown -vR grahamperrin /usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG/usr/ports/ ; chown -vR grahamperrin /usr/obj/usr/src/amd64.amd64/sys/GENERIC/usr/ports/