Closed Freso closed 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:
su - <abs user>
env - makepkg
env -
in the PKGBUILD
unset DBUS_SESSION_BUS_ADDRESS
(with an additional unset DISPLAY
otherwise build() takes longer)The real solution is of course to report this upstream (python-keyring and that possibly leads to python-secretstorage then).
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.
gna.. in my case I really need that unset DBUS_SESSION_BUS_ADDRESS
in build(). Additionally to unset DISPLAY
.
As noted by @Freso : while the environment is wrong, this shoudn't matter for a simple import keyring
(reopening).
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
Now reported upstream in jaraco/keyring#183.
python-keyring 7.0-1 makes the PKGBUILD build fine without the added workarounds.
It still breaks for me. The error message is the same, the trace is different.
All errors fixed and now unsets necessary with python-keyring 7.0.1 and python-secretstorage 2.1.4.
See
makepkg
output at https://gist.github.com/Freso/d8f7441be9ff43ea2af8 on an otherwise updated x86_64 Arch Linux system.