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 694981 - Port from gnome-keyring to libsecret
Port from gnome-keyring to libsecret
Status: RESOLVED FIXED
Product: rhythmbox
Classification: Other
Component: Plugins (other)
HEAD
Other Linux
: Normal enhancement
: ---
Assigned To: RhythmBox Maintainers
RhythmBox Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-03-02 06:07 UTC by Nirbheek Chauhan
Modified: 2013-03-25 21:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Port audioscrobbler and daap plugins (12.28 KB, patch)
2013-03-02 06:07 UTC, Nirbheek Chauhan
none Details | Review
Port audioscrobbler and daap plugins (11.42 KB, patch)
2013-03-02 06:10 UTC, Nirbheek Chauhan
reviewed Details | Review
Port magnatune plugin (5.36 KB, patch)
2013-03-02 08:40 UTC, Nirbheek Chauhan
reviewed Details | Review
Port magnatune and daap plugins, and remove gnome-keyring from audioscrobbler (31.74 KB, patch)
2013-03-05 01:20 UTC, Nirbheek Chauhan
committed Details | Review

Description Nirbheek Chauhan 2013-03-02 06:07:15 UTC
Created attachment 237776 [details] [review]
Port audioscrobbler and daap plugins

Hello,

I'll be attaching some patches to port Rhythmbox's plugins from gnome-keyring to libsecret. The first patch ports the C plugins daap and audioscrobbler. I've been using this patch for a month, and it seems to be working great so far. A patch for magnatune will follow soon.
Comment 1 Nirbheek Chauhan 2013-03-02 06:10:54 UTC
Created attachment 237777 [details] [review]
Port audioscrobbler and daap plugins

I attached an old patch above. Here's the version of the patch ported to current master.
Comment 2 Nirbheek Chauhan 2013-03-02 08:40:32 UTC
Created attachment 237779 [details] [review]
Port magnatune plugin
Comment 3 Jonathan Matthew 2013-03-03 10:57:42 UTC
Review of attachment 237777 [details] [review]:

I'm pretty sure the 'old API' referenced in the audioscrobbler code is no longer supported by last.fm or libre.fm, so that code should just be removed.

::: configure.ac
@@ +228,3 @@
+AC_ARG_WITH(keyring,
+            AC_HELP_STRING([--with-keyring],
+			   [Enable keyring support using libsecret]),,

I think this should probably be --with-libsecret etc. rather than --with-keyring
Comment 4 Jonathan Matthew 2013-03-03 11:00:53 UTC
Review of attachment 237779 [details] [review]:

::: plugins/magnatune/MagnatuneAccount.py
@@ +26,3 @@
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA.
 
+from gi.repository import Gio, Secret, SecretUnstable

We should really handle the case where libsecret isn't installed or isn't new enough here. I'm not sure exactly what we should do though.
Comment 5 Nirbheek Chauhan 2013-03-05 01:20:14 UTC
Created attachment 238068 [details] [review]
Port magnatune and daap plugins, and remove gnome-keyring from audioscrobbler

(In reply to comment #3)
> Review of attachment 237777 [details] [review]:
> 
> I'm pretty sure the 'old API' referenced in the audioscrobbler code is no
> longer supported by last.fm or libre.fm, so that code should just be removed.
> 

This patch removes that — I'm not sure if I caught all the obsolete code though, could you verify that?

> ::: configure.ac
> @@ +228,3 @@
> +AC_ARG_WITH(keyring,
> +            AC_HELP_STRING([--with-keyring],
> +               [Enable keyring support using libsecret]),,
> 
> I think this should probably be --with-libsecret etc. rather than
> --with-keyring

Fixed!

(In reply to comment #4)
> Review of attachment 237779 [details] [review]:
> 
> ::: plugins/magnatune/MagnatuneAccount.py
> @@ +26,3 @@
>  # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA.
> 
> +from gi.repository import Gio, Secret, SecretUnstable
> 
> We should really handle the case where libsecret isn't installed or isn't new
> enough here. I'm not sure exactly what we should do though.

The attached version of the patch skips searching/storing if libsecret couldn't be found, and prints errors to the console. However, the plugin continues to work. Maybe this is a decent compromise till libsecret becomes prevalent enough?

Also, I tried to find a way to detect the libsecret version through the introspection API, but I could only get at the API version (which is useless). Maybe we should just rely on configure.ac to get the version right for us.
Comment 6 Jonathan Matthew 2013-03-25 21:49:38 UTC
All looks good, pushed as commit 1fac0aa. Thanks for working on this.