Created attachment 193769 [details] Unified diff The default option to create a symlink in /etc blocks installation as a non-root user. Attached is an example patch to have this default on only when installing as root. There may be a better way to detect the installing user, but this patch does the trick. I'm experimenting installing multiple ports trees as a non-privileged user both for development and testing purposes, and for deployment of static snapshots for long-term scientific studies that must use the same software version throughout.
The user doing the build is unrelated to the user installing the package so the proposed patch is wrong.
Created attachment 193787 [details] Unified diff I wasn't expecting the first patch to fly as it stood. It was only intended to clarify the problem and start a dialogue. After doing a little more research, I think simply respecting INSTALL_AS_USER might be the right approach. The user must define this variable and point point others such as LOCALBASE, PREFIX, etc. to a location where they have write access. From bsd.ports.mk: # - Like USE_PACKAGE_DEPENDS, but do not fallback on source. # INSTALL_AS_USER # - Define this to install as the current user, intended # for systems where you have no root access. # DISABLE_SIZE - Do not check the size of a distfile even if the SIZE field
what is the current status? Does ports-secteam have to be active here?
(In reply to Jochen Neumeister from comment #3) I don't think this is a problem, users can change OPTIONS if they want to create the package in a different way. I think it should be closed as rejected.