Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to connect to the D-Bus system bus on FreeBSD #287

Closed
0mp opened this issue Mar 29, 2020 · 9 comments
Closed

Unable to connect to the D-Bus system bus on FreeBSD #287

0mp opened this issue Mar 29, 2020 · 9 comments

Comments

@0mp
Copy link
Contributor

0mp commented Mar 29, 2020

Hi,

I've recently packaged signal-cli for FreeBSD (https://www.freshports.org/net-im/signal-cli/).

The functionalities which do not require D-Bus to be involved are working fine (thanks your this wonderful piece of software BTW).

I cannot get signal-cli to authenticate against the dbus service running on my system, however. I've tried to connect to both the system bus and to the user one (I am not about the proper naming of things, D-Bus development/debugging is rather new to me).

I've started collecting my notes in a separate repo (https://github.com/0mp/freebsd-ports-signal-cli/) so that other interested developers could join the debugging efforts.

Currently, I am stuck with debugging at authentication against the system bus. Here's a snippet of the debug logs (the full log is in the repo I linked to earlier):

[org.freedesktop.dbus.Transport$SASL.auth()] AUTH state: 0
[org.freedesktop.dbus.Transport$SASL.send()] sending: AUTH

[org.freedesktop.dbus.Transport$SASL.auth()] AUTH state: 1
[org.freedesktop.dbus.Transport$SASL.receive()] received: REJECTED EXTERNAL
[org.freedesktop.dbus.Transport$SASL$Command.<init>()] Creating command from: [REJECTED, EXTERNAL]
[org.freedesktop.dbus.Transport$SASL$Command.<init>()] Created command: Command(3, 1, null, null)
[org.freedesktop.dbus.Transport$SASL.send()] sending: AUTH EXTERNAL 323438

[org.freedesktop.dbus.Transport$SASL.auth()] AUTH state: 1
[org.freedesktop.dbus.Transport$SASL.receive()] received: REJECTED EXTERNAL
[org.freedesktop.dbus.Transport$SASL$Command.<init>()] Creating command from: [REJECTED, EXTERNAL]
[org.freedesktop.dbus.Transport$SASL$Command.<init>()] Created command: Command(3, 1, null, null)
[org.freedesktop.dbus.DBusConnection.<init>()] java.io.IOException: Failed to auth
    at org.freedesktop.dbus.Transport.connect(Unknown Source)
    at org.freedesktop.dbus.Transport.<init>(Unknown Source)
    at org.freedesktop.dbus.DBusConnection.<init>(Unknown Source)
    at org.freedesktop.dbus.DBusConnection.getConnection(Unknown Source)
    at org.asamk.signal.commands.DaemonCommand.handleCommand(DaemonCommand.java:50)
    at org.asamk.signal.Main.handleCommands(Main.java:126)
    at org.asamk.signal.Main.main(Main.java:61)

Cheers!

@AsamK AsamK added the support label May 16, 2020
@grembo
Copy link

grembo commented May 22, 2020

Hi @0mp,

I ran into the same problem today trying to package signal-cli master (now I realized that I could've saved some of that effort - Duh!)

I'll send you a PM.

@0mp
Copy link
Contributor Author

0mp commented May 22, 2020

I'll send you a PM.

Cool! I'm waiting!

@grembo
Copy link

grembo commented May 22, 2020

I'll send you a PM.

Cool! I'm waiting!

It basically comes down to hypfvieh/dbus-java not supporting FreeBSD (cmsgcred).

I sent you an email with details.

@grembo
Copy link

grembo commented May 26, 2020

@0mp I implemented the missing bits in jnr-posix and dbus-java, I can now locally run signal-cli (and scli) successfully.

Pull requests:
jnr/jnr-posix#149
jnr/jnr-posix#150
hypfvieh/dbus-java#105

@0mp
Copy link
Contributor Author

0mp commented Jun 18, 2020

Nice, all the pending PRs were merged in those other repositories!

@grembo
Copy link

grembo commented Jun 19, 2020

Nice, all the pending PRs were merged in those other repositories!

Now all that's left to do is ask projects kindly to cut new releases ;)

@0mp
Copy link
Contributor Author

0mp commented Aug 6, 2020

I'm facing the following problem now: jnr/jnr-ffi#206

@grembo
Copy link

grembo commented Aug 9, 2020

@0mp you were lacking jffi-native (so not a problem with signal-cli), I opened 0mp/freebsd-ports-signal-cli#1 to fix the port skeleton.

@0mp
Copy link
Contributor Author

0mp commented Aug 11, 2020

signal-cli is now working just fine on FreeBSD! Thanks!

https://www.freshports.org/net-im/signal-cli

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants