JonnyJD / musicbrainz-isrcsubmit

script to submit ISRCs from disc to musicbrainz
http://jonnyjd.github.io/musicbrainz-isrcsubmit/
GNU General Public License v3.0
40 stars 13 forks source link

isrcsubmit{,-git} PKGBUILDs do not build (DBusException) #108

Closed Freso closed 8 years ago

Freso commented 8 years ago

See makepkg output at https://gist.github.com/Freso/d8f7441be9ff43ea2af8 on an otherwise updated x86_64 Arch Linux system.

JonnyJD commented 8 years ago

This seems to be an "upstream problem":

import keyring
...
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

Trying import keyring with the user currently using X/dbus works fine. Changing to another user (like to build packages) with su abs breaks this because DBUS_SESSION_BUS_ADDRESS is set, but the corresponding socket is not accessible to the user abs so import keyring fails with the above error message.

So this is kind of similar (but not the same) as #90.

The current possible workarounds:

The real solution is of course to report this upstream (python-keyring and that possibly leads to python-secretstorage then).

JonnyJD commented 8 years ago

Oh, my error message is different:

dbus.exceptions.DBusException: org.freedesktop.DBus.Error.AccessDenied: Failed to connect to socket /run/user/1000/bus: Permission denied

That explains why the DBUS solution doesn't work for you.

unset DISPLAY (in both package(), check() and build()) should work for everybody.

JonnyJD commented 8 years ago

gna.. in my case I really need that unset DBUS_SESSION_BUS_ADDRESS in build(). Additionally to unset DISPLAY.

JonnyJD commented 8 years ago

Hm, since it is arguably wrong to have environment variables for sockets you don't have access to: not reported upstream.

Our workaround for allowing users to run makepkg without clearing the environment is commited to AUR in 2 parts: 7f179cbf and 8c25731b (and isrcsubmit-git accordingly).

JonnyJD commented 8 years ago

As noted by @Freso : while the environment is wrong, this shoudn't matter for a simple import keyring (reopening).

JonnyJD commented 8 years ago

For reference, the parts of my environment look like this:

DISPLAY=:0.1
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus

My main user owning the dbus session has the id 1000. The user running import keyring has the id 1007. The socket naturally looks like this: srw-rw-rw- 1 1000 100 0 Dec 23 01:46 /run/user/1000/bus

JonnyJD commented 8 years ago

Now reported upstream in jaraco/keyring#183.

Freso commented 8 years ago

python-keyring 7.0-1 makes the PKGBUILD build fine without the added workarounds.

JonnyJD commented 8 years ago

It still breaks for me. The error message is the same, the trace is different.

JonnyJD commented 8 years ago

All errors fixed and now unsets necessary with python-keyring 7.0.1 and python-secretstorage 2.1.4.