Do you always have to be root to create or maintain a port?

To date, if I'm working on a port to fix a bug or upgrade it I'm doing it as root. Is there a better way?
 
It depends where is located your ports' tree. If you use the default setting, then you have to use root. But you can create a local copy of ports' tree in an user directory and work there. Perhaps it may require some changes to directories settings (like cache, etc).
Personally, when I work on a port, I use chroot or jail for that, to be sure that I notice all the port's dependencies. ;)
 
But you can create a local copy of ports' tree in an user directory and work there.
Yep, that's how I do it normally. Work on a local copy in my home directory. You can even build the port there (the ports tree doesn't require to be in /usr/ports), actually installing it would require root access. Although you could set PREFIX to a directory you can write to.

Some useful environment variables to set when working on your own account:
Code:
     WRKDIRPREFIX  Where to create any temporary files.  Useful if PORTSDIR is
                   read-only (perhaps mounted from a CD-ROM).
Code:
     DISTDIR       Where to find/put distfiles, normally distfiles/ in
                   PORTSDIR.
Code:
     PREFIX        Where to install this port (usually set to the same as
                   LOCALBASE).
 
Back
Top