From da681b5f8c22a69fd640fadbf6f87e2a0b1bd8e4 Mon Sep 17 00:00:00 2001 From: Rex Hoffman Date: Sun, 24 Sep 2023 09:01:02 -0700 Subject: [PATCH] trying ci fix --- .github/workflows/dbus.xml | 22 +++++++++++++++++++ .setupkeystore.sh | 4 ++-- java-keyring/pom.xml | 18 +++++++++++++++ .../internal/kde/KWalletBackend.java | 9 ++++++++ pom.xml | 10 +++++++++ 5 files changed, 61 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/dbus.xml diff --git a/.github/workflows/dbus.xml b/.github/workflows/dbus.xml new file mode 100644 index 0000000..301b73c --- /dev/null +++ b/.github/workflows/dbus.xml @@ -0,0 +1,22 @@ + + + + + system + + + + + + /lib/dbus-1/dbus-daemon-launch-helper + + + /tmp/dbus-pid + + + unix:path=/tmp/test_system_bus_socket + diff --git a/.setupkeystore.sh b/.setupkeystore.sh index 35ec5ba..401f648 100755 --- a/.setupkeystore.sh +++ b/.setupkeystore.sh @@ -3,8 +3,8 @@ keyring="$1" set -x -if [ "$(expr substr $(uname -s) 1 5)" == "Linux" ] && [ "$keyring" == "gnome" ]; then - export $(dbus-launch) +if [ "$(expr substr $(uname -s) 1 5)" == "Linux" ] && [ "$keyring" == "gnome" ]; then + export $(dbus-launch) # --config-file=${GITHUB_WORKSPACE}/.github/workflows/dbus.xml) eval "$(echo '\n' | gnome-keyring-daemon --unlock)" echo xxx@gmail.com | secret-tool store --label="main" email address PASS=$(secret-tool lookup email address) diff --git a/java-keyring/pom.xml b/java-keyring/pom.xml index 7925bc5..8d672d0 100644 --- a/java-keyring/pom.xml +++ b/java-keyring/pom.xml @@ -24,6 +24,24 @@ de.swiesend secret-service + + + com.github.hypfvieh + dbus-java-transport-native-unixsocket + + + com.github.hypfvieh + dbus-java-core + + + + + com.github.hypfvieh + dbus-java-transport-jnr-unixsocket + + + com.github.hypfvieh + dbus-java-core net.java.dev.jna diff --git a/java-keyring/src/main/java/com/github/javakeyring/internal/kde/KWalletBackend.java b/java-keyring/src/main/java/com/github/javakeyring/internal/kde/KWalletBackend.java index c0ec770..309378e 100644 --- a/java-keyring/src/main/java/com/github/javakeyring/internal/kde/KWalletBackend.java +++ b/java-keyring/src/main/java/com/github/javakeyring/internal/kde/KWalletBackend.java @@ -43,8 +43,17 @@ public class KWalletBackend implements KeyringBackend { private DBusConnection connection; private int id = -1; + public KWalletBackend() throws BackendNotSupportedException { try { + // connection = DBusConnectionBuilder.forAddress(BusAddress.of(System.getProperty("DBUS_TCP_SESSION"))) + // .withRegisterSelf(true) + // .withShared(true) + // .transportConfig() + // .withAdditionalConfig("TIMEOUT", 10000) + // .back() + // .build(); + connection = DBusConnection.getConnection(DBusConnection.DBusBusType.SESSION); wallet = connection.getRemoteObject("org.kde.kwalletd5", "/modules/kwalletd5", KWallet.class, true); wallet.localWallet(); //attempt connection to wallet diff --git a/pom.xml b/pom.xml index afdcdd6..aa68401 100644 --- a/pom.xml +++ b/pom.xml @@ -58,6 +58,16 @@ jna-platform 5.13.0 + + com.github.hypfvieh + dbus-java-transport-jnr-unixsocket + 4.3.0 + + + com.github.hypfvieh + dbus-java-core + 4.3.0 + org.ow2.asm asm