After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 679855 - libsecret migration
libsecret migration
Status: RESOLVED FIXED
Product: evince
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Evince Maintainers
Evince Maintainers
Depends on:
Blocks: 679893
 
 
Reported: 2012-07-13 13:25 UTC by Stef Walter
Modified: 2013-01-05 11:54 UTC
See Also:
GNOME target: 3.8
GNOME version: ---


Attachments
WIP patch to migrate to libsecret (5.08 KB, patch)
2012-07-13 13:25 UTC, Stef Walter
committed Details | Review

Description Stef Walter 2012-07-13 13:25:04 UTC
Created attachment 218724 [details] [review]
WIP patch to migrate to libsecret

libsecret is a new client for the Secret Service DBus API. The Secret Service
allows storage of passwords in a common way on the desktop. Supported by
gnome-keyring and ksecretservice.

libsecret solves many problems with libgnome-keyring. Relevant to evince: it
solves threading issues, uses GDBus instead of dbus-glib.

A future GNOME goal will be to migrate away from libgnome-keyring to libsecret:

https://live.gnome.org/GnomeGoals/LibsecretMigration

I've done a rough WIP patch in order to make sure that the libsecret API
covered all the use cases. I'll attach that patch here. I hope the patch is a
help for the migration, but I don't plan to iterate on it at the current time.

Some notes about the patch:

 * I chose an arbitrary schema name for the stored items, you may want to
   change it to something better:
     org.gnome.Evince.Document
 * I haven't tested the patch. I'm not familiar with how to trigger all the
   various code paths and logic.
Comment 1 Christian Persch 2012-07-13 19:45:59 UTC
Maybe now is the time to use the async variants of the API instead of sync ones :-)
Comment 2 Olav Vitters 2012-07-13 20:41:20 UTC
Per r-t: Targetting GNOME 3.6
Comment 3 Stef Walter 2012-07-14 11:19:24 UTC
Yeah, async is always nice, especially since those sync methods can block for a long time due to prompts. Now that prompting is usually in the shell, some of the problems are mitigated, but blocking on a sync call to another process can still cause unexpected results.

Just a heads up: Please look at the patch critically. I did the patch as a way to try out the API, and it's not ready to commit. There may be memory leaks or other logic errors. Most libsecret getters return data that must be unreferenced or freed.
Comment 4 Carlos Garcia Campos 2012-09-08 14:24:21 UTC
Does libsecret need a new version of gnome-keyring? I get this error when trying to save a password in the session:

** Message: Remote error from secret service: org.freedesktop.Secret.Error.NoSuchObject: The '/org/freedesktop/secrets/aliases/session' object does not exist
Comment 5 Stef Walter 2012-09-16 05:27:47 UTC
Yes it does. Unfortunately, the /org/freedesktop/secrets/aliases/session alias did not exist in previous versions of gnome-keyring.
Comment 6 Carlos Garcia Campos 2012-09-17 09:51:17 UTC
Ok, I think it's already too late in the cycle, so I'll postpone this for 3.8
Comment 7 Matthias Clasen 2013-01-02 04:25:08 UTC
would be nice to get this done for 3.8
Comment 8 Carlos Garcia Campos 2013-01-05 11:54:05 UTC
Comment on attachment 218724 [details] [review]
WIP patch to migrate to libsecret

Committed with some fixes. Thanks