macports without root?

Daniel J. Luke dluke at geeklair.net
Sun Oct 15 13:50:44 PDT 2006


On Oct 15, 2006, at 3:04 PM, Marc André Selig wrote:
>> Is this a problem with that port, or does macports require root in  
>> general?
>
> Certain targets require root in general, notably destroot and install.

This is not true. If the destroot and install targets are writable by  
a non-root user, then a non-root user can run these targets (unless  
the port needs root for some other reason, like to set suid bits or  
add users/groups).

>> If it's the latter, any suggestions on how I could go about  
>> patching it to allow fully non-root user installations?
>
> I don't think there is a general solution to this.  port destroot  
> is like saying make install.  The software you're trying to install  
> takes over at that point, and in a unix world, it may well do  
> things that require root.  After all, make install is traditionally  
> run as root.  To change this, you have to change the software  
> you're trying to install to work around not having root access.

Right, individual packages may need root for other reasons.

Depending on one's goals, however, it may be acceptable to work- 
around these individually or just deal with them not working.  
Provided there's a compelling reason to run as non-root in the first  
place.

> IOW, you will probably have to patch individual portfiles to patch  
> the software being installed to not do anything during make install  
> that might need root.

--
Daniel J. Luke
+========================================================+
| *---------------- dluke at geeklair.net ----------------* |
| *-------------- http://www.geeklair.net -------------* |
+========================================================+
|   Opinions expressed are mine and do not necessarily   |
|          reflect the opinions of my employer.          |
+========================================================+


-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://lists.macosforge.org/pipermail/macports-dev/attachments/20061015/7e68a1ee/PGP.bin


More information about the macports-dev mailing list