Opened 4 years ago

Closed 4 years ago

#59657 closed defect (invalid)

Impossible to 'port install dbus' without admin privileges

Reported by: AgilentGCMS Owned by: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Priority: Normal Milestone:
Component: ports Version: 2.6.2
Keywords: Cc:
Port: dbus

Description

I do not have root privileges on my work laptop, so I installed macports without root (--with-no-root-privileges) in a user directory. However, I can't install dbus without admin privileges, even the no_root variant:

$ port install dbus +no_startupitem +no_root
--->  Computing dependencies for dbus
The following dependencies will be installed:  expat
Continue? [Y/n]:
--->  Fetching distfiles for expat
--->  Verifying checksums for expat
--->  Extracting expat
--->  Configuring expat
--->  Building expat
--->  Staging expat into destroot
--->  Installing expat @2.2.9_0
--->  Activating expat @2.2.9_0
--->  Cleaning expat
--->  Installing dbus @1.12.16_0
--->  Activating dbus @1.12.16_0
Error: Failed to activate dbus: error renaming "/Users/sbasu1/packages/macports/var/macports/software/dbus/mpextractrrOYCWpA/Users/sbasu1/packages/macports/etc/LaunchDaemons/org.freedesktop.dbus-system.plist" to "/Library/LaunchDaemons/org.freedesktop.dbus-system.plist": permission denied
Error: See /Users/sbasu1/packages/macports/var/macports/logs/_Users_sbasu1_packages_macports_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_dbus/dbus/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port dbus failed

This sucks, because pretty much everything graphical seems to depend on dbus (aside: why on earth does a library like Qt5 depend on dbus?). How can I install Qt5 (and therefore dbus) without admin privileges?

Attachments (2)

main.log (522.8 KB) - added by AgilentGCMS 4 years ago.
main.log from 'port -v -s install dbus'
main.2.log (277.1 KB) - added by AgilentGCMS 4 years ago.
main.log after uninstall/clean/'-s install'

Download all attachments as: .zip

Change History (15)

comment:1 Changed 4 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Owner: set to MarcusCalhoun-Lopez
Status: newaccepted

It should be possible to install dbus without root privileges.
There is no main.log attached to this ticket, so I will have to guess about the details of your system.

I would suggest trying to build dbus from source: port -s install dbus.

If this does work, please attach the main.log.

By the way, to answer your aside, please see this page about Qt D-Bus.

comment:2 Changed 4 years ago by AgilentGCMS

I apologize, I'm a mac newbie (I'm more used to linux). Where can I find main.log?

Also, 'port -s install dbus' produced a similar error:

$ port -s install dbus
--->  Computing dependencies for dbus
The following dependencies will be installed:  expat
Continue? [Y/n]: Y
--->  Fetching distfiles for expat
--->  Verifying checksums for expat
--->  Extracting expat
--->  Configuring expat
--->  Building expat
--->  Staging expat into destroot
--->  Installing expat @2.2.9_0
--->  Activating expat @2.2.9_0
--->  Cleaning expat
--->  Installing dbus @1.12.16_0
--->  Activating dbus @1.12.16_0
Error: Failed to activate dbus: error renaming "/Users/sbasu1/packages/macports/var/macports/software/dbus/mpextract9tsisenG/Users/sbasu1/packages/macports/etc/LaunchDaemons/org.freedesktop.dbus-system.plist" to "/Library/LaunchDaemons/org.freedesktop.dbus-system.plist": permission denied
Error: See /Users/sbasu1/packages/macports/var/macports/logs/_Users_sbasu1_packages_macports_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_dbus/dbus/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port dbus failed

comment:3 Changed 4 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

The location of main.log is given in the error message: /Users/sbasu1/packages/macports/var/macports/logs/_Users_sbasu1_packages_macports_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_dbus/dbus/main.log.

Please try the following:

  • port uninstall dbus
  • port clean dbus
  • port -s install dbus

Changed 4 years ago by AgilentGCMS

Attachment: main.log added

main.log from 'port -v -s install dbus'

comment:4 Changed 4 years ago by AgilentGCMS

OK, found it. Attached

comment:5 Changed 4 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Thank you.

Hopefully the following will work:

  • port uninstall dbus
  • port clean dbus
  • port -s install dbus

Changed 4 years ago by AgilentGCMS

Attachment: main.2.log added

main.log after uninstall/clean/'-s install'

comment:6 Changed 4 years ago by AgilentGCMS

OK, done that, still failed. New main.log attached as well.

comment:7 Changed 4 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Let us try turning off startup items.

Please open /Users/sbasu1/packages/macports/etc/macports/macports.conf.
There should be a variable #startupitem_install yes.
Uncomment it and change it to startupitem_install no.

Then please rerun

  • port uninstall dbus
  • port clean dbus
  • port -s install dbus

comment:8 Changed 4 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

I just remembered, this issue is discussed in the MacPorts guide.

comment:9 Changed 4 years ago by jmroot (Joshua Root)

Yes, you just need to use startupitem_install no with non-root installations. This is not specific to dbus, it would be the same for every port that installs a startupitem. Yes, it would be nice if --without-startupitems was set automatically when using --with-no-root-privileges, that's #56743.

comment:10 Changed 4 years ago by jmroot (Joshua Root)

Also you don't need to build from source once you're configured correctly; the .plist will be transparently moved to the right place even if it's in /Library/LaunchDaemons in the binary archive.

comment:11 Changed 4 years ago by mf2k (Frank Schima)

Keywords: dbus removed

comment:12 Changed 4 years ago by AgilentGCMS

OK, that worked, thanks!

comment:13 Changed 4 years ago by jmroot (Joshua Root)

Resolution: invalid
Status: acceptedclosed

Glad to hear it.

Note: See TracTickets for help on using tickets.