MacPorts without root privileges: how?

Ryan Schmidt ryandesign at macports.org
Thu Feb 10 12:14:57 PST 2011


On Feb 10, 2011, at 14:02, Gf B wrote:
> On Wed, Feb 9, 2011 at 3:38 PM, Ryan Schmidt wrote:
>> Some ports like dbus install system daemons. These daemons have launchd plists that help you start them. These plists must live in /Library/LaunchDaemons,
> 
> ???
> 
> What's wrong with just running "launchctl load [-w] /path/to/my/plist"?

I thought launchd required the plist to be in a certain place, and for it to be owned by root and to have the proper permissions. I may be wrong.

> Clearly, the dbus port is not required at the machine's boot-up, not even if one wants to ultimately run ports that depend on dbus.

It was my understanding that that is in fact what is required. There is a component of dbus that must run as root for the system, and another component that must be run as the user currently logged in. This is necessary for applications to be able to use dbus. I don't actually understand much about dbus or what it is or does, nor have I attempted to use it myself, but this is what I have come to understand based on what the port says at installation time and previous discussion on the list.

> (In fact, IRC, when one installs the Emacs+x11 port using root privileges, one can start using Emacs on X11 right away, without having to reboot the machine or do anything that launches the dbus daemon.)  This means that dbus can be started just as well when the user logs in, for example, along with other programs that start automatically at this time.  If this reasoning is correct, then the problem here is to modify the port activation code so that it is possible to make different arrangements for getting the dbus plists loaded without touching /Library.
> 
> At the very least, I would like to find out how to make the installation appear successful, even when the activation step failed (so that ports that depend on dbus will still be installed by MacPorts).

You're asking "how can I make MacPorts think it worked when it didn't work"; I can't help with that. A port *must* be activated before it can be considered to be a satisfied dependency.

You may wish to take a look at the output of "port variants dbus" -- the +no_startupitem and +no_root variants may be useful to you.


> I'll make sure that the necessary daemons are properly started, etc.  (Actually, the extent of Emacs' dependence on dbus is not entirely clear to me; I find it a bit hard to believe that it's an absolute requirement.)
> 
> Can someone point me to the files that I would need to hack to achieve any this?





More information about the macports-users mailing list