Opened 14 years ago

Closed 11 years ago

Last modified 10 years ago

#26742 closed defect (fixed)

dbus @1.2.24 [install fail for non-root users]

Reported by: mh6@… Owned by: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Priority: Normal Milestone:
Component: ports Version: 1.9.1
Keywords: Cc: su-v
Port: dbus

Description

Hi,

I tried to install dbus with a macports installed in a custom $prefix as non-root user.

while it throws warnings about not being able to create users/groups during the build (which is ok), it also tries to put the LaunchAgent into the system directory and not the /Users/ one.

Error: Target org.macports.activate returned: error copying "/Users/mh6/var/macports/software/dbus/1.2.24_1/Library/LaunchAgents/org.freedesktop.dbus-session.plist" to "/Library/LaunchAgents/org.freedesktop.dbus-session.plist": permission denied

While the Portfile itself passes the custom install location through, Patch4 hardcodes it to /Library/LaunchAgents

Would be nice if someone could change it to ${prefix}/Library/LaunchAgents

thanks,

Michael

Change History (10)

comment:1 Changed 14 years ago by jmroot (Joshua Root)

Owner: changed from macports-tickets@… to mcalhoun@…
Port: dbus added

Please remember to fill in the Port field and cc the maintainer.

comment:2 Changed 14 years ago by jmroot (Joshua Root)

Does the no_root variant not do what you want? Or are you asking for that to be selected automatically based on install_user/uid/whatever?

comment:3 Changed 14 years ago by su-v

Cc: suv-sf@… added

Cc Me!

comment:4 Changed 14 years ago by www.macports.org@…

Cc: www.macports.org@… added

Cc Me!

comment:5 Changed 14 years ago by www.macports.org@…

To answer jmr's question: I gave a quick look at dbus config files and from what I understand the no_root variant does not seem to install the user LaunchAgents at all. It looks like dbus' full functionality can only be obtained via root even though in the case of a full non root MacPorts installation this is not necessary since launchd fully supports non root services. It seems logical to expect dbus to use /Users/<user-folder-name>/ instead of / when MacPorts is installed under a non root user.

comment:6 Changed 13 years ago by demis.ucsb@…

In case anyone else has this problem, I solved it by installing as root (I have root user enabled on my Mac OS 10.5 system):

su -
/opt/local/bin/port -vd uninstall dbus
/opt/local/bin/port -vd clean dbus
/opt/local/bin/port -vd install dbus

(did the uninstall/cleans because dbus's LaunchAgent copy failed while installing p27-spyder)

comment:7 in reply to:  6 Changed 13 years ago by demis.ucsb@…

Should point out that I don't understand why it was failing when the original install command used sudo anyway.

Debug log showed that it couldn't perform "adduser" and "addgroup" commands without being run as root - but running sudo port ... should suffice, no? Perhaps this relates to previous issue that the LaunchAgent should probably go into ${HOME}/Library/LaunchAgents, instead of the systemwide /Library/launchAgents. Still the inability of sudo port to obtain correct permissions is weird.

comment:8 Changed 12 years ago by posita (Matt Bogosian)

sudo should not be necessary to install via no_root. To the point of comment # 5, "${HOME}/Library/LaunchAgents" is generally a valid configuration directory for launchd:

% man launchd

launchd(8)                BSD System Manager's Manual               launchd(8)

NAME
     launchd -- System wide and per-user daemon/agent manager

...


FILES
     ~/Library/LaunchAgents         Per-user agents provided by the user.
...

comment:9 in reply to:  description Changed 11 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Resolution: fixed
Status: newclosed

Patch4 (files/0004-enable-launchd.patch), which hardcodes /Library/LaunchAgents, was removed in r79191, so this was probably fixed back then.

Replying to mh6@…:

While the Portfile itself passes the custom install location through, Patch4 hardcodes it to /Library/LaunchAgents

comment:10 Changed 10 years ago by www.macports.org@…

Cc: www.macports.org@… removed

Cc Me!

Note: See TracTickets for help on using tickets.