Fwd: MacPorts without root privileges: how?

Ryan Schmidt ryandesign at macports.org
Thu Feb 10 12:05:21 PST 2011


Forwarding this private mail to the list:

Begin forwarded message:

> From: "Keith J. Schultz" <keithjschultz at web.de>
> Date: February 10, 2011 01:45:01 CST
> To: Ryan Schmidt <ryandesign at macports.org>
> Subject: Re: MacPorts without root privileges: how?
> 
> Hi All,
> 
> Inorder for dbus to work it must have have "system/root"- privileges! dbus runs as two
> demons. One on the system level the other on the user level.
> 
> dbus can be installed, but the port file has to be modified so that the plist for the demons
> do not get installed into /library. Only problem is dbus has to be started by hand then,
> before anything that uses dbus will work! 
> 
> The plist are there so that launchd can start dbus when needed. Also, if anything unexpected
> happens and dbus comes down it is restarted automatically by launchd!
> 
> If you are worried about the demons let them be installed, and modify them or remove afterwards.
> 
> Also, ports only installs the .plists! then are not hooked into lauchd. you have to do that yourself!
> see "port notes dbus"
> 
> Hope this helps
> 	regards
> 		Keith.
> 
> Am 09.02.2011 um 21:38 schrieb Ryan Schmidt:
> 
>> On Feb 9, 2011, at 14:34, Gf B wrote:
>> 
>>> I installed MacPorts from source, with the --with-no-root-privileges flag, and configured it so that it uses ~/.macports/opt/local as its $prefix.
>>> 
>>> I want to run MacPorts on my laptop *always* without root privileges, because I don't want it to modify anything whatsoever outside of the $prefix mentioned above.
>>> 
>>> Still, despite the configuration described above, some installations are failing due to insufficient permissions.
>>> 
>>> For example, the installation of Emacs fails because the installation of dbus fails, and the latter fails because of this:
>>> 
>>> --->  Installing dbus @1.2.24_1
>>> Warning: addgroup only works when running as root.
>>> Warning: The requested group 'messagebus' was not created.
>>> Warning: adduser only works when running as root.
>>> Warning: The requested user 'messagebus' was not created.
>>> --->  Activating dbus @1.2.24_1
>>> Error: Target org.macports.activate returned: error copying "/Users/user531/.macports/opt/local/var/macports/software/dbus/1.2\
>>> .24_1/Library/LaunchDaemons/org.freedesktop.dbus-system.plist" to "/Library/LaunchDaemons/org.freedesktop.dbus-system.plist":\
>>> permission denied
>>> Error: Failed to install dbus
>>> 
>>> I'm fine with setting up the messagebus user and groups "by hand" using sudo, but I do not want MacPorts to put anything under /Library.  What must I do to get MacPorts to use a different location for these files?
>>> 
>>> In case I must finish this installation "manually", what must I do so that the installation of ports that depend on dbus do not croak on account of not having this dependency?
>> 
>> Some ports like dbus install system daemons. These daemons have launchd plists that help you start them. These plists must live in /Library/LaunchDaemons, and you need root privilege to write there. You cannot install ports depending on dbus until you have installed dbus. You'll probably have to use sudo to install ports like dbus that install system daemons.



More information about the macports-users mailing list