MacPorts without root privileges: how?

Keith J. Schultz keithjschultz at web.de
Fri Feb 11 00:45:22 PST 2011


First Off, Thany Ryan for passing on my other post.
I FORGOT again to reply all! ARRGHHHHH!!


Am 10.02.2011 um 21:14 schrieb Ryan Schmidt:

> 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.
	launchd requires its .plist to be in certain place inorder to start these process during start up and on demand, automatically.

	One can call launchd to load demons manually. If the demon is to run under root the call is done with root.
> 
>> 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.
	TRUE. It does not need to be load at boot-up, and is first started by launchd when required if the plists are installed in the right places!
> 
> 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.
	dbus is actually a two in one. a system wide demon and a user side demon.
> 
>> (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.
	Some programs work with and with dbus depending if it there or not!
>> 
>> 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.
	I think Gf B just needs the port to install. It is not essential for the port to succeed, by not installing the .plist! But, then again the port will not run unless
	dbus is started up.
> 
> 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 believe this is just what is required.

	regards
		Keith.


More information about the macports-users mailing list