Created attachment 164166 [details] patch Since this is a convention, makeplist should also play along.
Created attachment 164167 [details] patch
Created attachment 164169 [details] patch
Created attachment 164170 [details] patch Expanded to also fill @user and @owner.
Created attachment 164171 [details] patch
I do not see how your user creds things is supposed to work, ports are build and staged as nobody (if you have BUILD_AS_NON_ROOT in poudriere, which you should have, and will be the default soon)
Please note that this only meant to affect 'make makeplist' which is done by the port developer usually as root. If the same script needs to also be run in the course of the automated builds, this operation needs to be disabled for such case.
I am sorry, but no, there is absolutely no need to do anything as root. I know I do not, and most committers do not. If *you* are doing everything as root, you are doing it wrong.
On development throw-away VM - of course, for ease of work. I am sure most people do the same. In case of some mistake there is always the "Roll back" button. The problem: how to generate pkg-plist when there are some files that have groups/users set and and pkg-plist changes? When do-install sets these they automatically get into pkg-plist. Otherwise I need to change @owner/@user manually every time the list changes.
The user running do-install should have the permissions to add users, this is all. This makes sense because this user creates files, and should be able to set file ownership to specific users/groups which happen to also be new. It doesn't have to be a root.
This is going backward, the user running do-install has no reason at all to run as root. The whole point of the @owner/... is exactly to prevent having to be root. Also you do not need to have a user created on the system to be able to package a files as the given user. Having make makeplist behaving differently when run as a user and run as root is something we probably don't want. Enforcing the user to be root to work on a simple port is also going backward. I am really happy not having anymore to be root to do 90% of my work. even passing to poudriere is done as a user for me (given I use a specially hacked version of poudriered)
Ports are not supposed to be built as root, so they can't install files as a different user, so this is not needed.