New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #26742 (new defect)

Opened 3 years ago

Last modified 8 months ago

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

Reported by: mh6@… Owned by: mcalhoun@…
Priority: Normal Milestone:
Component: ports Version: 1.9.1
Keywords: Cc: suv-sf@…, www.macports.org@…
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

comment:1 Changed 3 years ago by jmr@…

  • Owner changed from macports-tickets@… to mcalhoun@…
  • Port set to dbus

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

comment:2 Changed 3 years ago by jmr@…

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 2 years ago by suv-sf@…

  • Cc suv-sf@… added

Cc Me!

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

  • Cc www.macports.org@… added

Cc Me!

comment:5 Changed 2 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 follow-up: ↓ 7 Changed 18 months 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 18 months 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 8 months ago by mtb19@…

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.
...
Note: See TracTickets for help on using tickets.