Bug 205280

Summary: Make 'make makeplist' generate @owner, @group, and @sample
Product: Ports & Packages Reporter: Yuri Victorovich <yuri>
Component: Ports FrameworkAssignee: Port Management Team <portmgr>
Status: Closed Not Accepted    
Severity: Affects Only Me CC: ports-bugs
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
patch
none
patch
none
patch
none
patch
none
patch none

Description Yuri Victorovich freebsd_committer freebsd_triage 2015-12-12 23:43:11 UTC
Created attachment 164166 [details]
patch

Since this is a convention, makeplist should also play along.
Comment 1 Yuri Victorovich freebsd_committer freebsd_triage 2015-12-12 23:45:16 UTC
Created attachment 164167 [details]
patch
Comment 2 Yuri Victorovich freebsd_committer freebsd_triage 2015-12-13 01:27:47 UTC
Created attachment 164169 [details]
patch
Comment 3 Yuri Victorovich freebsd_committer freebsd_triage 2015-12-13 03:16:50 UTC
Created attachment 164170 [details]
patch

Expanded to also fill @user and @owner.
Comment 4 Yuri Victorovich freebsd_committer freebsd_triage 2015-12-13 03:20:56 UTC
Created attachment 164171 [details]
patch
Comment 5 Mathieu Arnold freebsd_committer freebsd_triage 2015-12-13 10:08:03 UTC
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)
Comment 6 Yuri Victorovich freebsd_committer freebsd_triage 2015-12-13 10:16:32 UTC
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.
Comment 7 Mathieu Arnold freebsd_committer freebsd_triage 2015-12-13 10:26:33 UTC
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.
Comment 8 Yuri Victorovich freebsd_committer freebsd_triage 2015-12-13 10:33:40 UTC
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.
Comment 9 Yuri Victorovich freebsd_committer freebsd_triage 2015-12-13 10:42:40 UTC
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.
Comment 10 Baptiste Daroussin freebsd_committer freebsd_triage 2015-12-13 10:57:35 UTC
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)
Comment 11 Mathieu Arnold freebsd_committer freebsd_triage 2016-04-13 11:35:10 UTC
Ports are not supposed to be built as root, so they can't install files as a 
different user, so this is not needed.