From c0fcf23b6ca0b0988bc1d3b46040caa739688567dcbe62cfbff1fa548d554c71 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Wed, 22 Sep 2021 08:18:20 +0000 Subject: [PATCH] Accepting request 920800 from home:AZhou:branches:GNOME:Factory - Add libsecret-handle-UnknownObject.patch: some Secret Service API backend implementations (like keepassxc) throws UnknownObject instead of UnknownMethod, this patch handles it. (bsc#1190499, glgo#GNOME/libsecret!94) OBS-URL: https://build.opensuse.org/request/show/920800 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/libsecret?expand=0&rev=57 --- libsecret-handle-UnknownObject.patch | 30 ++++++++++++++++++++++++++++ libsecret.changes | 8 ++++++++ libsecret.spec | 3 +++ 3 files changed, 41 insertions(+) create mode 100644 libsecret-handle-UnknownObject.patch diff --git a/libsecret-handle-UnknownObject.patch b/libsecret-handle-UnknownObject.patch new file mode 100644 index 0000000..bfcb1d5 --- /dev/null +++ b/libsecret-handle-UnknownObject.patch @@ -0,0 +1,30 @@ +From d620c79d83acc1bae0bbd7153a691f952b74ca31 Mon Sep 17 00:00:00 2001 +From: Slava Aseev +Date: Mon, 16 Aug 2021 19:25:56 +0300 +Subject: [PATCH] Create default collection after DBus.Error.UnknownObject + +Some Secret Service API backend implementations (like keepassxc) +throws UnknownObject (instead of UnknownMethod as gnome-keyring do) +after creating an item in the non-existent +/org/freedesktop/secrets/aliases/default. +--- + libsecret/secret-methods.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/libsecret/secret-methods.c b/libsecret/secret-methods.c +index c4decf8..b9b696e 100644 +--- a/libsecret/secret-methods.c ++++ b/libsecret/secret-methods.c +@@ -1050,7 +1050,8 @@ on_store_create (GObject *source, + + if (!store->created_collection && + (g_error_matches (error, SECRET_ERROR, SECRET_ERROR_NO_SUCH_OBJECT) || +- g_error_matches (error, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD)) && ++ g_error_matches (error, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD) || ++ g_error_matches (error, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_OBJECT)) && + g_strcmp0 (store->collection_path, SECRET_ALIAS_PREFIX "default") == 0) { + properties = _secret_collection_properties_new (_("Default keyring")); + secret_service_create_collection_dbus_path (service, properties, "default", +-- +GitLab + diff --git a/libsecret.changes b/libsecret.changes index 30bd0d2..3827931 100644 --- a/libsecret.changes +++ b/libsecret.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Sep 22 06:23:46 UTC 2021 - Alynx Zhou + +- Add libsecret-handle-UnknownObject.patch: some Secret Service + API backend implementations (like keepassxc) throws + UnknownObject instead of UnknownMethod, this patch handles it. + (bsc#1190499, glgo#GNOME/libsecret!94) + ------------------------------------------------------------------- Thu Sep 16 02:01:38 UTC 2021 - Stanislav Brabec diff --git a/libsecret.spec b/libsecret.spec index 8453ccc..2feda8a 100644 --- a/libsecret.spec +++ b/libsecret.spec @@ -26,6 +26,8 @@ URL: https://wiki.gnome.org/Projects/Libsecret Source0: https://download.gnome.org/sources/libsecret/0.20/%{name}-%{version}.tar.xz Source99: baselibs.conf +# PATCH-FIX-UPSTREAM libsecret-handle-UnknownObject.patch bsc#1190499, glgo#GNOME/libsecret!94 alynx.zhou@suse.com -- handle UnknownObject which is thrown by some implementations +Patch0: libsecret-handle-UnknownObject.patch ## SLE-only patches start at 1000 # PATCH-FIX-SLE libsecret-bsc932232-use-libgcrypt-allocators.patch bsc#932232 hpj@suse.com -- use libgcrypt allocators for FIPS mode Patch1000: libsecret-bsc932232-use-libgcrypt-allocators.patch @@ -91,6 +93,7 @@ secrets. It communicates with the "Secret Service" using DBus. %prep %setup -q +%patch0 -p1 %if 0%{?sle_version} %patch1000 -p1 %endif