public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/gnome:master commit in: media-sound/rhythmbox/, media-sound/rhythmbox/files/
@ 2011-03-17 19:44 Priit Laes
  0 siblings, 0 replies; 6+ messages in thread
From: Priit Laes @ 2011-03-17 19:44 UTC (permalink / raw
  To: gentoo-commits

commit:     87f6a46e2e6dec5f1a9163e362bfb747ad522b32
Author:     Priit Laes <plaes <AT> plaes <DOT> org>
AuthorDate: Thu Mar 17 19:43:45 2011 +0000
Commit:     Priit Laes <plaes <AT> plaes <DOT> org>
CommitDate: Thu Mar 17 19:43:45 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=87f6a46e

Add support for libdmapsharing-0.3

---
 .../files/libdmapsharing-0.3-support.patch         |  235 ++++++++++++++++++++
 media-sound/rhythmbox/rhythmbox-0.13.3.ebuild      |    8 +-
 media-sound/rhythmbox/rhythmbox-9999.ebuild        |    2 +-
 3 files changed, 242 insertions(+), 3 deletions(-)

diff --git a/media-sound/rhythmbox/files/libdmapsharing-0.3-support.patch b/media-sound/rhythmbox/files/libdmapsharing-0.3-support.patch
new file mode 100644
index 0000000..8798b28
--- /dev/null
+++ b/media-sound/rhythmbox/files/libdmapsharing-0.3-support.patch
@@ -0,0 +1,235 @@
+commit 0d3b198d1bdb3b15eaca1f1105a5940d45fd79b4
+Author: W. Michael Petullo <mike@flyn.org>
+Date:   Tue Jan 18 19:56:24 2011 -0600
+
+    Update to use libdmapsharing 3.0 API
+    
+    Signed-off-by: W. Michael Petullo <mike@flyn.org>
+
+diff --git a/configure.ac b/configure.ac
+index a69febe..8383e47 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -785,7 +785,7 @@ AC_ARG_ENABLE(daap,
+                              [Disable DAAP support]),,
+               enable_daap=auto)
+ if test "x$enable_daap" != "xno"; then
+-	PKG_CHECK_MODULES(DMAPSHARING, libdmapsharing-2.2 >= 2.1.6,
++	PKG_CHECK_MODULES(DMAPSHARING, libdmapsharing-3.0,
+ 			  have_libdmapsharing=yes,
+ 			  have_libdmapsharing=no)
+ 	if test "x$have_libdmapsharing" = "xno" -a "x$enable_daap" = "xyes"; then
+diff --git a/plugins/daap/rb-daap-container-record.c b/plugins/daap/rb-daap-container-record.c
+index 5957452..621b038 100644
+--- a/plugins/daap/rb-daap-container-record.c
++++ b/plugins/daap/rb-daap-container-record.c
+@@ -147,9 +147,9 @@ rb_daap_container_record_class_init (RBDAAPContainerRecordClass *klass)
+ static void
+ rb_daap_container_record_daap_iface_init (gpointer iface, gpointer data)
+ {
+-	DMAPContainerRecordInterface *dmap_container_record = iface;
++	DMAPContainerRecordIface *dmap_container_record = iface;
+ 
+-	g_assert (G_TYPE_FROM_INTERFACE (dmap_container_record) == TYPE_DMAP_CONTAINER_RECORD);
++	g_assert (G_TYPE_FROM_INTERFACE (dmap_container_record) == DMAP_TYPE_CONTAINER_RECORD);
+ 
+ 	dmap_container_record->get_id = rb_daap_container_record_get_id;
+ 	dmap_container_record->add_entry = rb_daap_container_record_add_entry;
+@@ -158,7 +158,7 @@ rb_daap_container_record_daap_iface_init (gpointer iface, gpointer data)
+ }
+ 
+ G_DEFINE_TYPE_WITH_CODE (RBDAAPContainerRecord, rb_daap_container_record, G_TYPE_OBJECT, 
+-			 G_IMPLEMENT_INTERFACE (TYPE_DMAP_CONTAINER_RECORD, rb_daap_container_record_daap_iface_init))
++			 G_IMPLEMENT_INTERFACE (DMAP_TYPE_CONTAINER_RECORD, rb_daap_container_record_daap_iface_init))
+ 
+ static void rb_daap_container_record_finalize (GObject *object)
+ {
+diff --git a/plugins/daap/rb-daap-record-factory.c b/plugins/daap/rb-daap-record-factory.c
+index be750e4..393cf31 100644
+--- a/plugins/daap/rb-daap-record-factory.c
++++ b/plugins/daap/rb-daap-record-factory.c
+@@ -55,15 +55,15 @@ rb_daap_record_factory_class_init (RBDAAPRecordFactoryClass *klass)
+ static void
+ rb_daap_record_factory_interface_init (gpointer iface, gpointer data)
+ {
+-	DMAPRecordFactoryInterface *factory = iface;
++	DMAPRecordFactoryIface *factory = iface;
+ 
+-	g_assert (G_TYPE_FROM_INTERFACE (factory) == TYPE_DMAP_RECORD_FACTORY);
++	g_assert (G_TYPE_FROM_INTERFACE (factory) == DMAP_TYPE_RECORD_FACTORY);
+ 
+ 	factory->create = rb_daap_record_factory_create;
+ }
+ 
+ G_DEFINE_TYPE_WITH_CODE (RBDAAPRecordFactory, rb_daap_record_factory, G_TYPE_OBJECT, 
+-			 G_IMPLEMENT_INTERFACE (TYPE_DMAP_RECORD_FACTORY,
++			 G_IMPLEMENT_INTERFACE (DMAP_TYPE_RECORD_FACTORY,
+ 					        rb_daap_record_factory_interface_init))
+ 
+ RBDAAPRecordFactory *
+diff --git a/plugins/daap/rb-daap-record.c b/plugins/daap/rb-daap-record.c
+index 91cca4b..ff5c127 100644
+--- a/plugins/daap/rb-daap-record.c
++++ b/plugins/daap/rb-daap-record.c
+@@ -346,9 +346,9 @@ rb_daap_record_class_init (RBDAAPRecordClass *klass)
+ static void
+ rb_daap_record_daap_iface_init (gpointer iface, gpointer data)
+ {
+-	DAAPRecordInterface *daap_record = iface;
++	DAAPRecordIface *daap_record = iface;
+ 
+-	g_assert (G_TYPE_FROM_INTERFACE (daap_record) == TYPE_DAAP_RECORD);
++	g_assert (G_TYPE_FROM_INTERFACE (daap_record) == DAAP_TYPE_RECORD);
+ 
+ 	daap_record->itunes_compat = rb_daap_record_itunes_compat;
+ 	daap_record->read = rb_daap_record_read;
+@@ -357,14 +357,14 @@ rb_daap_record_daap_iface_init (gpointer iface, gpointer data)
+ static void
+ rb_daap_record_dmap_iface_init (gpointer iface, gpointer data)
+ {
+-	DMAPRecordInterface *dmap_record = iface;
++	DMAPRecordIface *dmap_record = iface;
+ 
+-	g_assert (G_TYPE_FROM_INTERFACE (dmap_record) == TYPE_DMAP_RECORD);
++	g_assert (G_TYPE_FROM_INTERFACE (dmap_record) == DMAP_TYPE_RECORD);
+ }
+ 
+ G_DEFINE_TYPE_WITH_CODE (RBDAAPRecord, rb_daap_record, G_TYPE_OBJECT,
+-			 G_IMPLEMENT_INTERFACE (TYPE_DAAP_RECORD, rb_daap_record_daap_iface_init)
+-			 G_IMPLEMENT_INTERFACE (TYPE_DMAP_RECORD, rb_daap_record_dmap_iface_init))
++			 G_IMPLEMENT_INTERFACE (DAAP_TYPE_RECORD, rb_daap_record_daap_iface_init)
++			 G_IMPLEMENT_INTERFACE (DMAP_TYPE_RECORD, rb_daap_record_dmap_iface_init))
+ 
+ static void rb_daap_record_finalize (GObject *object)
+ {
+diff --git a/plugins/daap/rb-daap-source.c b/plugins/daap/rb-daap-source.c
+index c531428..ceec711 100644
+--- a/plugins/daap/rb-daap-source.c
++++ b/plugins/daap/rb-daap-source.c
+@@ -649,7 +649,7 @@ rb_daap_source_selected (RBDisplayPage *page)
+ 
+ 	factory = DMAP_RECORD_FACTORY (rb_daap_record_factory_new ());
+ 
+-	daap_source->priv->connection = dmap_connection_new (name,
++	daap_source->priv->connection = daap_connection_new (name,
+ 							     daap_source->priv->host,
+ 							     daap_source->priv->port,
+ 							     daap_source->priv->password_protected,
+diff --git a/plugins/daap/rb-dacp-player.c b/plugins/daap/rb-dacp-player.c
+index 0a49f1d..a8227b5 100644
+--- a/plugins/daap/rb-dacp-player.c
++++ b/plugins/daap/rb-dacp-player.c
+@@ -58,7 +58,7 @@ static void playing_song_changed (RBShellPlayer *shell_player, RhythmDBEntry *en
+ static void elapsed_changed (RBShellPlayer *shell_player, guint elapsed, RBDACPPlayer *player);
+ 
+ static DAAPRecord *rb_dacp_player_now_playing_record  (DACPPlayer *player);
+-static gchar *rb_dacp_player_now_playing_artwork (DACPPlayer *player, guint width, guint height);
++static const guchar *rb_dacp_player_now_playing_artwork (DACPPlayer *player, guint width, guint height);
+ static void rb_dacp_player_play_pause          (DACPPlayer *player);
+ static void rb_dacp_player_pause               (DACPPlayer *player);
+ static void rb_dacp_player_next_item           (DACPPlayer *player);
+@@ -86,9 +86,9 @@ static guint signals[LAST_SIGNAL] = { 0 };
+ static void
+ rb_dacp_player_iface_init (gpointer iface, gpointer data)
+ {
+-	DACPPlayerInterface *dacp_player = iface;
++	DACPPlayerIface *dacp_player = iface;
+ 
+-	g_assert (G_TYPE_FROM_INTERFACE (dacp_player) == TYPE_DACP_PLAYER);
++	g_assert (G_TYPE_FROM_INTERFACE (dacp_player) == DACP_TYPE_PLAYER);
+ 
+ 	dacp_player->now_playing_record  = rb_dacp_player_now_playing_record;
+ 	dacp_player->now_playing_artwork = rb_dacp_player_now_playing_artwork;
+@@ -102,7 +102,7 @@ rb_dacp_player_iface_init (gpointer iface, gpointer data)
+ }
+ 
+ G_DEFINE_TYPE_WITH_CODE (RBDACPPlayer, rb_dacp_player, G_TYPE_OBJECT,
+-                         G_IMPLEMENT_INTERFACE (TYPE_DACP_PLAYER, rb_dacp_player_iface_init))
++                         G_IMPLEMENT_INTERFACE (DACP_TYPE_PLAYER, rb_dacp_player_iface_init))
+ 
+ static void
+ rb_dacp_player_init (RBDACPPlayer *object)
+@@ -291,7 +291,7 @@ rb_dacp_player_now_playing_record (DACPPlayer *player)
+ 	}
+ }
+ 
+-static gchar *
++static const guchar *
+ rb_dacp_player_now_playing_artwork (DACPPlayer *player, guint width, guint height)
+ {
+ 	return NULL;
+diff --git a/plugins/daap/rb-dmap-container-db-adapter.c b/plugins/daap/rb-dmap-container-db-adapter.c
+index 0f3e640..e7a4b1a 100644
+--- a/plugins/daap/rb-dmap-container-db-adapter.c
++++ b/plugins/daap/rb-dmap-container-db-adapter.c
+@@ -139,9 +139,9 @@ rb_dmap_container_db_adapter_class_init (RBDMAPContainerDbAdapterClass *klass)
+ static void
+ rb_dmap_container_db_adapter_interface_init (gpointer iface, gpointer data)
+ {
+-	DMAPContainerDbInterface *dmap_db = iface;
++	DMAPContainerDbIface *dmap_db = iface;
+ 
+-	g_assert (G_TYPE_FROM_INTERFACE (dmap_db) == TYPE_DMAP_CONTAINER_DB);
++	g_assert (G_TYPE_FROM_INTERFACE (dmap_db) == DMAP_TYPE_CONTAINER_DB);
+ 
+ 	dmap_db->lookup_by_id = rb_dmap_container_db_adapter_lookup_by_id;
+ 	dmap_db->foreach = rb_dmap_container_db_adapter_foreach;
+@@ -149,7 +149,7 @@ rb_dmap_container_db_adapter_interface_init (gpointer iface, gpointer data)
+ }
+ 
+ G_DEFINE_TYPE_WITH_CODE (RBDMAPContainerDbAdapter, rb_dmap_container_db_adapter, G_TYPE_OBJECT, 
+-			 G_IMPLEMENT_INTERFACE (TYPE_DMAP_CONTAINER_DB, rb_dmap_container_db_adapter_interface_init))
++			 G_IMPLEMENT_INTERFACE (DMAP_TYPE_CONTAINER_DB, rb_dmap_container_db_adapter_interface_init))
+ 
+ static void
+ assign_id (RBPlaylistManager *mgr,
+diff --git a/plugins/daap/rb-rhythmdb-dmap-db-adapter.c b/plugins/daap/rb-rhythmdb-dmap-db-adapter.c
+index e6b6891..2d7eb48 100644
+--- a/plugins/daap/rb-rhythmdb-dmap-db-adapter.c
++++ b/plugins/daap/rb-rhythmdb-dmap-db-adapter.c
+@@ -247,9 +247,9 @@ rb_rhythmdb_dmap_db_adapter_class_init (RBRhythmDBDMAPDbAdapterClass *klass)
+ static void
+ rb_rhythmdb_dmap_db_adapter_interface_init (gpointer iface, gpointer data)
+ {
+-	DMAPDbInterface *dmap_db = iface;
++	DMAPDbIface *dmap_db = iface;
+ 
+-	g_assert (G_TYPE_FROM_INTERFACE (dmap_db) == TYPE_DMAP_DB);
++	g_assert (G_TYPE_FROM_INTERFACE (dmap_db) == DMAP_TYPE_DB);
+ 
+ 	dmap_db->add = rb_rhythmdb_dmap_db_adapter_add;
+ 	dmap_db->lookup_by_id = rb_rhythmdb_dmap_db_adapter_lookup_by_id;
+@@ -258,7 +258,7 @@ rb_rhythmdb_dmap_db_adapter_interface_init (gpointer iface, gpointer data)
+ }
+ 
+ G_DEFINE_TYPE_WITH_CODE (RBRhythmDBDMAPDbAdapter, rb_rhythmdb_dmap_db_adapter, G_TYPE_OBJECT, 
+-			 G_IMPLEMENT_INTERFACE (TYPE_DMAP_DB, rb_rhythmdb_dmap_db_adapter_interface_init))
++			 G_IMPLEMENT_INTERFACE (DMAP_TYPE_DB, rb_rhythmdb_dmap_db_adapter_interface_init))
+ 
+ RBRhythmDBDMAPDbAdapter *
+ rb_rhythmdb_dmap_db_adapter_new (RhythmDB *rdb, RhythmDBEntryType *entry_type)
+diff --git a/plugins/daap/rb-rhythmdb-query-model-dmap-db-adapter.c b/plugins/daap/rb-rhythmdb-query-model-dmap-db-adapter.c
+index 58abe5e..0a341e1 100644
+--- a/plugins/daap/rb-rhythmdb-query-model-dmap-db-adapter.c
++++ b/plugins/daap/rb-rhythmdb-query-model-dmap-db-adapter.c
+@@ -129,9 +129,9 @@ rb_rhythmdb_query_model_dmap_db_adapter_class_init (RBRhythmDBQueryModelDMAPDbAd
+ static void
+ rb_rhythmdb_query_model_dmap_db_adapter_interface_init (gpointer iface, gpointer data)
+ {
+-	DMAPDbInterface *dmap_db = iface;
++	DMAPDbIface *dmap_db = iface;
+ 
+-	g_assert (G_TYPE_FROM_INTERFACE (dmap_db) == TYPE_DMAP_DB);
++	g_assert (G_TYPE_FROM_INTERFACE (dmap_db) == DMAP_TYPE_DB);
+ 
+ 	dmap_db->add = rb_rhythmdb_query_model_dmap_db_adapter_add;
+ 	dmap_db->lookup_by_id = rb_rhythmdb_query_model_dmap_db_adapter_lookup_by_id;
+@@ -140,7 +140,7 @@ rb_rhythmdb_query_model_dmap_db_adapter_interface_init (gpointer iface, gpointer
+ }
+ 
+ G_DEFINE_TYPE_WITH_CODE (RBRhythmDBQueryModelDMAPDbAdapter, rb_rhythmdb_query_model_dmap_db_adapter, G_TYPE_OBJECT, 
+-			 G_IMPLEMENT_INTERFACE (TYPE_DMAP_DB, rb_rhythmdb_query_model_dmap_db_adapter_interface_init))
++			 G_IMPLEMENT_INTERFACE (DMAP_TYPE_DB, rb_rhythmdb_query_model_dmap_db_adapter_interface_init))
+ 
+ RBRhythmDBQueryModelDMAPDbAdapter *
+ rb_rhythmdb_query_model_dmap_db_adapter_new (RhythmDBQueryModel *model)

diff --git a/media-sound/rhythmbox/rhythmbox-0.13.3.ebuild b/media-sound/rhythmbox/rhythmbox-0.13.3.ebuild
index 7b57732..eb103e3 100644
--- a/media-sound/rhythmbox/rhythmbox-0.13.3.ebuild
+++ b/media-sound/rhythmbox/rhythmbox-0.13.3.ebuild
@@ -6,7 +6,7 @@ EAPI="2"
 GNOME2_LA_PUNT="yes"
 PYTHON_DEPEND="python? 2:2.5"
 
-inherit eutils gnome2 python multilib virtualx
+inherit autotools eutils gnome2 python multilib virtualx
 
 DESCRIPTION="Music management and playback software for GNOME"
 HOMEPAGE="http://www.rhythmbox.org/"
@@ -158,11 +158,15 @@ pkg_setup() {
 }
 
 src_prepare() {
+	epatch "${FILESDIR}/libdmapsharing-0.3-support.patch"
+	eautoreconf
+
 	gnome2_src_prepare
 
 	# disable pyc compiling
 	mv py-compile py-compile.orig
 	ln -s $(type -P true) py-compile
+
 }
 
 src_compile() {
@@ -192,5 +196,5 @@ pkg_postinst() {
 
 pkg_postrm() {
 	gnome2_pkg_postrm
-	python_mod_cleanup /usr/lib*/rhythmbox/plugins
+	python_mod_cleanup /usr/$(get_libdir)/rhythmbox/plugins
 }

diff --git a/media-sound/rhythmbox/rhythmbox-9999.ebuild b/media-sound/rhythmbox/rhythmbox-9999.ebuild
index bfeaca3..0960aa0 100644
--- a/media-sound/rhythmbox/rhythmbox-9999.ebuild
+++ b/media-sound/rhythmbox/rhythmbox-9999.ebuild
@@ -196,5 +196,5 @@ pkg_postinst() {
 
 pkg_postrm() {
 	gnome2_pkg_postrm
-	python_mod_cleanup /usr/lib*/rhythmbox/plugins
+	python_mod_cleanup /usr/$(get_libdir)/rhythmbox/plugins
 }



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] proj/gnome:master commit in: media-sound/rhythmbox/, media-sound/rhythmbox/files/
@ 2011-05-20 19:07 Priit Laes
  0 siblings, 0 replies; 6+ messages in thread
From: Priit Laes @ 2011-05-20 19:07 UTC (permalink / raw
  To: gentoo-commits

commit:     75048ddd00c7c2c55005ef9c5c93a0971c2acc95
Author:     Priit Laes <plaes <AT> plaes <DOT> org>
AuthorDate: Fri May 20 19:05:38 2011 +0000
Commit:     Priit Laes <plaes <AT> plaes <DOT> org>
CommitDate: Fri May 20 19:06:56 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=75048ddd

media-sound/rhythmbox: Bunch of fixes for DAAP plugin

---
 .../files/rhythmbox-daap-media-enum.patch          |   41 +++++++++
 .../rhythmbox/files/rhythmbox-daap-password.patch  |   86 ++++++++++++++++++++
 media-sound/rhythmbox/rhythmbox-0.13.3.ebuild      |    4 +-
 media-sound/rhythmbox/rhythmbox-9999.ebuild        |    2 +-
 4 files changed, 131 insertions(+), 2 deletions(-)

diff --git a/media-sound/rhythmbox/files/rhythmbox-daap-media-enum.patch b/media-sound/rhythmbox/files/rhythmbox-daap-media-enum.patch
new file mode 100644
index 0000000..9e15fb7
--- /dev/null
+++ b/media-sound/rhythmbox/files/rhythmbox-daap-media-enum.patch
@@ -0,0 +1,41 @@
+From d7230bc94184e341d477722e3844006ef9d4ed87 Mon Sep 17 00:00:00 2001
+From: W. Michael Petullo <mike@flyn.org>
+Date: Thu, 19 May 2011 03:05:06 +0000
+Subject: daap: treat DAAP record's mediakind property as en enum, not int
+
+Signed-off-by: W. Michael Petullo <mike@flyn.org>
+---
+diff --git a/plugins/daap/rb-daap-record.c b/plugins/daap/rb-daap-record.c
+index 08e28b5..50027c5 100644
+--- a/plugins/daap/rb-daap-record.c
++++ b/plugins/daap/rb-daap-record.c
+@@ -119,7 +119,7 @@ rb_daap_record_set_property (GObject *object,
+ 			record->priv->genre = g_value_dup_string (value);
+ 			break;
+ 		case PROP_MEDIAKIND:
+-			record->priv->mediakind = g_value_get_int (value);
++			record->priv->mediakind = g_value_get_enum (value);
+ 			break;
+ 		case PROP_FORMAT:
+ 			g_free (record->priv->format);
+@@ -201,7 +201,7 @@ rb_daap_record_get_property (GObject *object,
+ 			g_value_set_string (value, record->priv->genre);
+ 			break;
+ 		case PROP_MEDIAKIND:
+-			g_value_set_int (value, record->priv->mediakind);
++			g_value_set_enum (value, record->priv->mediakind);
+ 			break;
+ 		case PROP_FORMAT:
+ 			g_value_set_string (value, record->priv->format);
+@@ -437,9 +437,6 @@ rb_daap_record_new (RhythmDBEntry *entry)
+ 		record->priv->real_format = g_strdup (ext);
+ 		record->priv->format = g_strdup (record->priv->real_format);
+ 
+-		/* Only support songs */
+-		record->priv->mediakind = 1;
+-
+ 		record->priv->track    = rhythmdb_entry_get_ulong
+ 						(entry, RHYTHMDB_PROP_TRACK_NUMBER);
+ 
+--
+cgit v0.9

diff --git a/media-sound/rhythmbox/files/rhythmbox-daap-password.patch b/media-sound/rhythmbox/files/rhythmbox-daap-password.patch
new file mode 100644
index 0000000..b54e1ea
--- /dev/null
+++ b/media-sound/rhythmbox/files/rhythmbox-daap-password.patch
@@ -0,0 +1,86 @@
+From 2305ce47ad13c00979109192dbd34780b5bd944e Mon Sep 17 00:00:00 2001
+From: W. Michael Petullo <mike@flyn.org>
+Date: Tue, 17 May 2011 14:40:28 +0000
+Subject: daap: properly handle password-protected shares; req. libdmapsharing 2.9.9+ (bug #501389)
+
+Signed-off-by: W. Michael Petullo <mike@flyn.org>
+---
+diff --git a/configure.ac b/configure.ac
+index 124b1a2..5a82ab4 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -728,7 +728,7 @@ AC_ARG_ENABLE(daap,
+                              [Disable DAAP support]),,
+               enable_daap=auto)
+ if test "x$enable_daap" != "xno"; then
+-	PKG_CHECK_MODULES(DMAPSHARING, libdmapsharing-3.0,
++	PKG_CHECK_MODULES(DMAPSHARING, libdmapsharing-3.0 >= 2.9.9,
+ 			  have_libdmapsharing=yes,
+ 			  have_libdmapsharing=no)
+ 	if test "x$have_libdmapsharing" = "xno" -a "x$enable_daap" = "xyes"; then
+diff --git a/plugins/daap/rb-daap-source.c b/plugins/daap/rb-daap-source.c
+index 4e12aee..82d6b2f 100644
+--- a/plugins/daap/rb-daap-source.c
++++ b/plugins/daap/rb-daap-source.c
+@@ -429,16 +429,24 @@ ask_password (RBDAAPSource *source, const char *name, const char *keyring)
+ #endif
+ 	}
+ 
++	if (! password) {
++		rb_daap_source_disconnect (source);
++	}
++
+ 	return password;
+ }
+ 
+-static char *
+-connection_auth_cb (DMAPConnection   *connection,
+-		    const char       *name,
+-		    RBDAAPSource     *source)
++static void
++connection_auth_cb (DMAPConnection *connection,
++                    const char     *name,
++                    SoupSession    *session,
++                    SoupMessage    *msg,
++                    SoupAuth       *auth,
++                    gboolean        retrying,
++		    RBDAAPSource   *source)
+ {
+-#ifdef WITH_GNOME_KEYRING
+ 	gchar *password = NULL;
++#ifdef WITH_GNOME_KEYRING
+ 	GnomeKeyringResult keyringret;
+ 	gchar *keyring;
+ 	GList *list;
+@@ -473,11 +481,10 @@ connection_auth_cb (DMAPConnection   *connection,
+ 	if (list)
+ 		gnome_keyring_network_password_list_free (list); */
+ 	g_free (keyring);
+-	return password;
+ #else
+-	return ask_password (source, name, NULL);
++	password = ask_password (source, name, NULL);
+ #endif
+-
++	dmap_connection_authenticate_message (connection, session, msg, auth, password);
+ }
+ 
+ static void
+@@ -494,7 +501,6 @@ connection_connecting_cb (DMAPConnection       *connection,
+ 
+ 	switch (state) {
+ 	case DMAP_GET_INFO:
+-	case DMAP_GET_PASSWORD:
+ 	case DMAP_LOGIN:
+ 		source->priv->connection_status = _("Connecting to music share");
+ 		break;
+@@ -656,7 +662,6 @@ rb_daap_source_selected (RBDisplayPage *page)
+ 	daap_source->priv->connection = daap_connection_new (name,
+ 							     daap_source->priv->host,
+ 							     daap_source->priv->port,
+-							     daap_source->priv->password_protected,
+ 							     db,
+ 							     factory);
+ 	g_object_unref (entry_type);
+--
+cgit v0.9

diff --git a/media-sound/rhythmbox/rhythmbox-0.13.3.ebuild b/media-sound/rhythmbox/rhythmbox-0.13.3.ebuild
index 91be6ea..39a9f5d 100644
--- a/media-sound/rhythmbox/rhythmbox-0.13.3.ebuild
+++ b/media-sound/rhythmbox/rhythmbox-0.13.3.ebuild
@@ -42,7 +42,7 @@ COMMON_DEPEND=">=dev-libs/glib-2.25.12
 		brasero? ( >=app-cdr/brasero-0.9.1 )
 		!brasero? ( >=gnome-extra/nautilus-cd-burner-2.21.6 ) )
 	daap? (
-		net-libs/libdmapsharing:3.0
+		>=net-libs/libdmapsharing-2.9.9:3.0
 		>=net-dns/avahi-0.6 )
 	html? ( >=net-libs/webkit-gtk-1.1.17 )
 	gnome-keyring? ( >=gnome-base/gnome-keyring-0.4.9 )
@@ -161,6 +161,8 @@ pkg_setup() {
 
 src_prepare() {
 	epatch "${FILESDIR}/libdmapsharing-0.3-support.patch"
+	epatch "${FILESDIR}/rhythmbox-daap-media-enum.patch"
+	epatch "${FILESDIR}/rhythmbox-daap-password.patch"
 	eautoreconf
 
 	gnome2_src_prepare

diff --git a/media-sound/rhythmbox/rhythmbox-9999.ebuild b/media-sound/rhythmbox/rhythmbox-9999.ebuild
index 88cd4ec..d6179a1 100644
--- a/media-sound/rhythmbox/rhythmbox-9999.ebuild
+++ b/media-sound/rhythmbox/rhythmbox-9999.ebuild
@@ -43,7 +43,7 @@ COMMON_DEPEND=">=dev-libs/glib-2.26.0:2
 
 	cdr? ( >=app-cdr/brasero-2.91.90 )
 	daap? (
-		net-libs/libdmapsharing:3.0
+		>=net-libs/libdmapsharing-2.9.9:3.0
 		>=net-dns/avahi-0.6 )
 	gnome-keyring? ( >=gnome-base/gnome-keyring-0.4.9 )
 	html? ( >=net-libs/webkit-gtk-1.3.9:3 )



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] proj/gnome:master commit in: media-sound/rhythmbox/, media-sound/rhythmbox/files/
@ 2011-06-14  6:36 Nirbheek Chauhan
  0 siblings, 0 replies; 6+ messages in thread
From: Nirbheek Chauhan @ 2011-06-14  6:36 UTC (permalink / raw
  To: gentoo-commits

commit:     778aecc85a7210e4606040449b9ec0dd93d574bf
Author:     Alexandre Rostovtsev <tetromino <AT> gmail <DOT> com>
AuthorDate: Sat Jun 11 21:38:00 2011 +0000
Commit:     Nirbheek Chauhan <nirbheek <AT> gentoo <DOT> org>
CommitDate: Tue Jun 14 05:59:01 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=778aecc8

media-sound/rhythmbox: 0.13.3 was moved to gx86

Punt rb 0.13.3 and stale patches (in gx86 since March). Update the live
ebuild with changes from the in-gx86 ebuild (new udev flags, pkg_setup
changes) and otherwise update dependencies (runtime and build-time deps
on pygobject and libpeas; the coherence plugin imports gconf and pygtk
for some strange reason) to reflect the current state of the tree.

Other than the vala plugin (which does not build at the moment), the
live ebuild appears to compile and work.

Signed-off-by: Nirbheek Chauhan <nirbheek <AT> gentoo.org>

---
 .../files/libdmapsharing-0.3-support.patch         |  235 --------------------
 .../files/rhythmbox-daap-media-enum.patch          |   41 ----
 .../rhythmbox/files/rhythmbox-daap-password.patch  |   86 -------
 media-sound/rhythmbox/rhythmbox-0.13.3.ebuild      |  204 -----------------
 media-sound/rhythmbox/rhythmbox-9999.ebuild        |   37 ++-
 5 files changed, 25 insertions(+), 578 deletions(-)

diff --git a/media-sound/rhythmbox/files/libdmapsharing-0.3-support.patch b/media-sound/rhythmbox/files/libdmapsharing-0.3-support.patch
deleted file mode 100644
index 8798b28..0000000
--- a/media-sound/rhythmbox/files/libdmapsharing-0.3-support.patch
+++ /dev/null
@@ -1,235 +0,0 @@
-commit 0d3b198d1bdb3b15eaca1f1105a5940d45fd79b4
-Author: W. Michael Petullo <mike@flyn.org>
-Date:   Tue Jan 18 19:56:24 2011 -0600
-
-    Update to use libdmapsharing 3.0 API
-    
-    Signed-off-by: W. Michael Petullo <mike@flyn.org>
-
-diff --git a/configure.ac b/configure.ac
-index a69febe..8383e47 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -785,7 +785,7 @@ AC_ARG_ENABLE(daap,
-                              [Disable DAAP support]),,
-               enable_daap=auto)
- if test "x$enable_daap" != "xno"; then
--	PKG_CHECK_MODULES(DMAPSHARING, libdmapsharing-2.2 >= 2.1.6,
-+	PKG_CHECK_MODULES(DMAPSHARING, libdmapsharing-3.0,
- 			  have_libdmapsharing=yes,
- 			  have_libdmapsharing=no)
- 	if test "x$have_libdmapsharing" = "xno" -a "x$enable_daap" = "xyes"; then
-diff --git a/plugins/daap/rb-daap-container-record.c b/plugins/daap/rb-daap-container-record.c
-index 5957452..621b038 100644
---- a/plugins/daap/rb-daap-container-record.c
-+++ b/plugins/daap/rb-daap-container-record.c
-@@ -147,9 +147,9 @@ rb_daap_container_record_class_init (RBDAAPContainerRecordClass *klass)
- static void
- rb_daap_container_record_daap_iface_init (gpointer iface, gpointer data)
- {
--	DMAPContainerRecordInterface *dmap_container_record = iface;
-+	DMAPContainerRecordIface *dmap_container_record = iface;
- 
--	g_assert (G_TYPE_FROM_INTERFACE (dmap_container_record) == TYPE_DMAP_CONTAINER_RECORD);
-+	g_assert (G_TYPE_FROM_INTERFACE (dmap_container_record) == DMAP_TYPE_CONTAINER_RECORD);
- 
- 	dmap_container_record->get_id = rb_daap_container_record_get_id;
- 	dmap_container_record->add_entry = rb_daap_container_record_add_entry;
-@@ -158,7 +158,7 @@ rb_daap_container_record_daap_iface_init (gpointer iface, gpointer data)
- }
- 
- G_DEFINE_TYPE_WITH_CODE (RBDAAPContainerRecord, rb_daap_container_record, G_TYPE_OBJECT, 
--			 G_IMPLEMENT_INTERFACE (TYPE_DMAP_CONTAINER_RECORD, rb_daap_container_record_daap_iface_init))
-+			 G_IMPLEMENT_INTERFACE (DMAP_TYPE_CONTAINER_RECORD, rb_daap_container_record_daap_iface_init))
- 
- static void rb_daap_container_record_finalize (GObject *object)
- {
-diff --git a/plugins/daap/rb-daap-record-factory.c b/plugins/daap/rb-daap-record-factory.c
-index be750e4..393cf31 100644
---- a/plugins/daap/rb-daap-record-factory.c
-+++ b/plugins/daap/rb-daap-record-factory.c
-@@ -55,15 +55,15 @@ rb_daap_record_factory_class_init (RBDAAPRecordFactoryClass *klass)
- static void
- rb_daap_record_factory_interface_init (gpointer iface, gpointer data)
- {
--	DMAPRecordFactoryInterface *factory = iface;
-+	DMAPRecordFactoryIface *factory = iface;
- 
--	g_assert (G_TYPE_FROM_INTERFACE (factory) == TYPE_DMAP_RECORD_FACTORY);
-+	g_assert (G_TYPE_FROM_INTERFACE (factory) == DMAP_TYPE_RECORD_FACTORY);
- 
- 	factory->create = rb_daap_record_factory_create;
- }
- 
- G_DEFINE_TYPE_WITH_CODE (RBDAAPRecordFactory, rb_daap_record_factory, G_TYPE_OBJECT, 
--			 G_IMPLEMENT_INTERFACE (TYPE_DMAP_RECORD_FACTORY,
-+			 G_IMPLEMENT_INTERFACE (DMAP_TYPE_RECORD_FACTORY,
- 					        rb_daap_record_factory_interface_init))
- 
- RBDAAPRecordFactory *
-diff --git a/plugins/daap/rb-daap-record.c b/plugins/daap/rb-daap-record.c
-index 91cca4b..ff5c127 100644
---- a/plugins/daap/rb-daap-record.c
-+++ b/plugins/daap/rb-daap-record.c
-@@ -346,9 +346,9 @@ rb_daap_record_class_init (RBDAAPRecordClass *klass)
- static void
- rb_daap_record_daap_iface_init (gpointer iface, gpointer data)
- {
--	DAAPRecordInterface *daap_record = iface;
-+	DAAPRecordIface *daap_record = iface;
- 
--	g_assert (G_TYPE_FROM_INTERFACE (daap_record) == TYPE_DAAP_RECORD);
-+	g_assert (G_TYPE_FROM_INTERFACE (daap_record) == DAAP_TYPE_RECORD);
- 
- 	daap_record->itunes_compat = rb_daap_record_itunes_compat;
- 	daap_record->read = rb_daap_record_read;
-@@ -357,14 +357,14 @@ rb_daap_record_daap_iface_init (gpointer iface, gpointer data)
- static void
- rb_daap_record_dmap_iface_init (gpointer iface, gpointer data)
- {
--	DMAPRecordInterface *dmap_record = iface;
-+	DMAPRecordIface *dmap_record = iface;
- 
--	g_assert (G_TYPE_FROM_INTERFACE (dmap_record) == TYPE_DMAP_RECORD);
-+	g_assert (G_TYPE_FROM_INTERFACE (dmap_record) == DMAP_TYPE_RECORD);
- }
- 
- G_DEFINE_TYPE_WITH_CODE (RBDAAPRecord, rb_daap_record, G_TYPE_OBJECT,
--			 G_IMPLEMENT_INTERFACE (TYPE_DAAP_RECORD, rb_daap_record_daap_iface_init)
--			 G_IMPLEMENT_INTERFACE (TYPE_DMAP_RECORD, rb_daap_record_dmap_iface_init))
-+			 G_IMPLEMENT_INTERFACE (DAAP_TYPE_RECORD, rb_daap_record_daap_iface_init)
-+			 G_IMPLEMENT_INTERFACE (DMAP_TYPE_RECORD, rb_daap_record_dmap_iface_init))
- 
- static void rb_daap_record_finalize (GObject *object)
- {
-diff --git a/plugins/daap/rb-daap-source.c b/plugins/daap/rb-daap-source.c
-index c531428..ceec711 100644
---- a/plugins/daap/rb-daap-source.c
-+++ b/plugins/daap/rb-daap-source.c
-@@ -649,7 +649,7 @@ rb_daap_source_selected (RBDisplayPage *page)
- 
- 	factory = DMAP_RECORD_FACTORY (rb_daap_record_factory_new ());
- 
--	daap_source->priv->connection = dmap_connection_new (name,
-+	daap_source->priv->connection = daap_connection_new (name,
- 							     daap_source->priv->host,
- 							     daap_source->priv->port,
- 							     daap_source->priv->password_protected,
-diff --git a/plugins/daap/rb-dacp-player.c b/plugins/daap/rb-dacp-player.c
-index 0a49f1d..a8227b5 100644
---- a/plugins/daap/rb-dacp-player.c
-+++ b/plugins/daap/rb-dacp-player.c
-@@ -58,7 +58,7 @@ static void playing_song_changed (RBShellPlayer *shell_player, RhythmDBEntry *en
- static void elapsed_changed (RBShellPlayer *shell_player, guint elapsed, RBDACPPlayer *player);
- 
- static DAAPRecord *rb_dacp_player_now_playing_record  (DACPPlayer *player);
--static gchar *rb_dacp_player_now_playing_artwork (DACPPlayer *player, guint width, guint height);
-+static const guchar *rb_dacp_player_now_playing_artwork (DACPPlayer *player, guint width, guint height);
- static void rb_dacp_player_play_pause          (DACPPlayer *player);
- static void rb_dacp_player_pause               (DACPPlayer *player);
- static void rb_dacp_player_next_item           (DACPPlayer *player);
-@@ -86,9 +86,9 @@ static guint signals[LAST_SIGNAL] = { 0 };
- static void
- rb_dacp_player_iface_init (gpointer iface, gpointer data)
- {
--	DACPPlayerInterface *dacp_player = iface;
-+	DACPPlayerIface *dacp_player = iface;
- 
--	g_assert (G_TYPE_FROM_INTERFACE (dacp_player) == TYPE_DACP_PLAYER);
-+	g_assert (G_TYPE_FROM_INTERFACE (dacp_player) == DACP_TYPE_PLAYER);
- 
- 	dacp_player->now_playing_record  = rb_dacp_player_now_playing_record;
- 	dacp_player->now_playing_artwork = rb_dacp_player_now_playing_artwork;
-@@ -102,7 +102,7 @@ rb_dacp_player_iface_init (gpointer iface, gpointer data)
- }
- 
- G_DEFINE_TYPE_WITH_CODE (RBDACPPlayer, rb_dacp_player, G_TYPE_OBJECT,
--                         G_IMPLEMENT_INTERFACE (TYPE_DACP_PLAYER, rb_dacp_player_iface_init))
-+                         G_IMPLEMENT_INTERFACE (DACP_TYPE_PLAYER, rb_dacp_player_iface_init))
- 
- static void
- rb_dacp_player_init (RBDACPPlayer *object)
-@@ -291,7 +291,7 @@ rb_dacp_player_now_playing_record (DACPPlayer *player)
- 	}
- }
- 
--static gchar *
-+static const guchar *
- rb_dacp_player_now_playing_artwork (DACPPlayer *player, guint width, guint height)
- {
- 	return NULL;
-diff --git a/plugins/daap/rb-dmap-container-db-adapter.c b/plugins/daap/rb-dmap-container-db-adapter.c
-index 0f3e640..e7a4b1a 100644
---- a/plugins/daap/rb-dmap-container-db-adapter.c
-+++ b/plugins/daap/rb-dmap-container-db-adapter.c
-@@ -139,9 +139,9 @@ rb_dmap_container_db_adapter_class_init (RBDMAPContainerDbAdapterClass *klass)
- static void
- rb_dmap_container_db_adapter_interface_init (gpointer iface, gpointer data)
- {
--	DMAPContainerDbInterface *dmap_db = iface;
-+	DMAPContainerDbIface *dmap_db = iface;
- 
--	g_assert (G_TYPE_FROM_INTERFACE (dmap_db) == TYPE_DMAP_CONTAINER_DB);
-+	g_assert (G_TYPE_FROM_INTERFACE (dmap_db) == DMAP_TYPE_CONTAINER_DB);
- 
- 	dmap_db->lookup_by_id = rb_dmap_container_db_adapter_lookup_by_id;
- 	dmap_db->foreach = rb_dmap_container_db_adapter_foreach;
-@@ -149,7 +149,7 @@ rb_dmap_container_db_adapter_interface_init (gpointer iface, gpointer data)
- }
- 
- G_DEFINE_TYPE_WITH_CODE (RBDMAPContainerDbAdapter, rb_dmap_container_db_adapter, G_TYPE_OBJECT, 
--			 G_IMPLEMENT_INTERFACE (TYPE_DMAP_CONTAINER_DB, rb_dmap_container_db_adapter_interface_init))
-+			 G_IMPLEMENT_INTERFACE (DMAP_TYPE_CONTAINER_DB, rb_dmap_container_db_adapter_interface_init))
- 
- static void
- assign_id (RBPlaylistManager *mgr,
-diff --git a/plugins/daap/rb-rhythmdb-dmap-db-adapter.c b/plugins/daap/rb-rhythmdb-dmap-db-adapter.c
-index e6b6891..2d7eb48 100644
---- a/plugins/daap/rb-rhythmdb-dmap-db-adapter.c
-+++ b/plugins/daap/rb-rhythmdb-dmap-db-adapter.c
-@@ -247,9 +247,9 @@ rb_rhythmdb_dmap_db_adapter_class_init (RBRhythmDBDMAPDbAdapterClass *klass)
- static void
- rb_rhythmdb_dmap_db_adapter_interface_init (gpointer iface, gpointer data)
- {
--	DMAPDbInterface *dmap_db = iface;
-+	DMAPDbIface *dmap_db = iface;
- 
--	g_assert (G_TYPE_FROM_INTERFACE (dmap_db) == TYPE_DMAP_DB);
-+	g_assert (G_TYPE_FROM_INTERFACE (dmap_db) == DMAP_TYPE_DB);
- 
- 	dmap_db->add = rb_rhythmdb_dmap_db_adapter_add;
- 	dmap_db->lookup_by_id = rb_rhythmdb_dmap_db_adapter_lookup_by_id;
-@@ -258,7 +258,7 @@ rb_rhythmdb_dmap_db_adapter_interface_init (gpointer iface, gpointer data)
- }
- 
- G_DEFINE_TYPE_WITH_CODE (RBRhythmDBDMAPDbAdapter, rb_rhythmdb_dmap_db_adapter, G_TYPE_OBJECT, 
--			 G_IMPLEMENT_INTERFACE (TYPE_DMAP_DB, rb_rhythmdb_dmap_db_adapter_interface_init))
-+			 G_IMPLEMENT_INTERFACE (DMAP_TYPE_DB, rb_rhythmdb_dmap_db_adapter_interface_init))
- 
- RBRhythmDBDMAPDbAdapter *
- rb_rhythmdb_dmap_db_adapter_new (RhythmDB *rdb, RhythmDBEntryType *entry_type)
-diff --git a/plugins/daap/rb-rhythmdb-query-model-dmap-db-adapter.c b/plugins/daap/rb-rhythmdb-query-model-dmap-db-adapter.c
-index 58abe5e..0a341e1 100644
---- a/plugins/daap/rb-rhythmdb-query-model-dmap-db-adapter.c
-+++ b/plugins/daap/rb-rhythmdb-query-model-dmap-db-adapter.c
-@@ -129,9 +129,9 @@ rb_rhythmdb_query_model_dmap_db_adapter_class_init (RBRhythmDBQueryModelDMAPDbAd
- static void
- rb_rhythmdb_query_model_dmap_db_adapter_interface_init (gpointer iface, gpointer data)
- {
--	DMAPDbInterface *dmap_db = iface;
-+	DMAPDbIface *dmap_db = iface;
- 
--	g_assert (G_TYPE_FROM_INTERFACE (dmap_db) == TYPE_DMAP_DB);
-+	g_assert (G_TYPE_FROM_INTERFACE (dmap_db) == DMAP_TYPE_DB);
- 
- 	dmap_db->add = rb_rhythmdb_query_model_dmap_db_adapter_add;
- 	dmap_db->lookup_by_id = rb_rhythmdb_query_model_dmap_db_adapter_lookup_by_id;
-@@ -140,7 +140,7 @@ rb_rhythmdb_query_model_dmap_db_adapter_interface_init (gpointer iface, gpointer
- }
- 
- G_DEFINE_TYPE_WITH_CODE (RBRhythmDBQueryModelDMAPDbAdapter, rb_rhythmdb_query_model_dmap_db_adapter, G_TYPE_OBJECT, 
--			 G_IMPLEMENT_INTERFACE (TYPE_DMAP_DB, rb_rhythmdb_query_model_dmap_db_adapter_interface_init))
-+			 G_IMPLEMENT_INTERFACE (DMAP_TYPE_DB, rb_rhythmdb_query_model_dmap_db_adapter_interface_init))
- 
- RBRhythmDBQueryModelDMAPDbAdapter *
- rb_rhythmdb_query_model_dmap_db_adapter_new (RhythmDBQueryModel *model)

diff --git a/media-sound/rhythmbox/files/rhythmbox-daap-media-enum.patch b/media-sound/rhythmbox/files/rhythmbox-daap-media-enum.patch
deleted file mode 100644
index 9e15fb7..0000000
--- a/media-sound/rhythmbox/files/rhythmbox-daap-media-enum.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From d7230bc94184e341d477722e3844006ef9d4ed87 Mon Sep 17 00:00:00 2001
-From: W. Michael Petullo <mike@flyn.org>
-Date: Thu, 19 May 2011 03:05:06 +0000
-Subject: daap: treat DAAP record's mediakind property as en enum, not int
-
-Signed-off-by: W. Michael Petullo <mike@flyn.org>
----
-diff --git a/plugins/daap/rb-daap-record.c b/plugins/daap/rb-daap-record.c
-index 08e28b5..50027c5 100644
---- a/plugins/daap/rb-daap-record.c
-+++ b/plugins/daap/rb-daap-record.c
-@@ -119,7 +119,7 @@ rb_daap_record_set_property (GObject *object,
- 			record->priv->genre = g_value_dup_string (value);
- 			break;
- 		case PROP_MEDIAKIND:
--			record->priv->mediakind = g_value_get_int (value);
-+			record->priv->mediakind = g_value_get_enum (value);
- 			break;
- 		case PROP_FORMAT:
- 			g_free (record->priv->format);
-@@ -201,7 +201,7 @@ rb_daap_record_get_property (GObject *object,
- 			g_value_set_string (value, record->priv->genre);
- 			break;
- 		case PROP_MEDIAKIND:
--			g_value_set_int (value, record->priv->mediakind);
-+			g_value_set_enum (value, record->priv->mediakind);
- 			break;
- 		case PROP_FORMAT:
- 			g_value_set_string (value, record->priv->format);
-@@ -437,9 +437,6 @@ rb_daap_record_new (RhythmDBEntry *entry)
- 		record->priv->real_format = g_strdup (ext);
- 		record->priv->format = g_strdup (record->priv->real_format);
- 
--		/* Only support songs */
--		record->priv->mediakind = 1;
--
- 		record->priv->track    = rhythmdb_entry_get_ulong
- 						(entry, RHYTHMDB_PROP_TRACK_NUMBER);
- 
---
-cgit v0.9

diff --git a/media-sound/rhythmbox/files/rhythmbox-daap-password.patch b/media-sound/rhythmbox/files/rhythmbox-daap-password.patch
deleted file mode 100644
index b54e1ea..0000000
--- a/media-sound/rhythmbox/files/rhythmbox-daap-password.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-From 2305ce47ad13c00979109192dbd34780b5bd944e Mon Sep 17 00:00:00 2001
-From: W. Michael Petullo <mike@flyn.org>
-Date: Tue, 17 May 2011 14:40:28 +0000
-Subject: daap: properly handle password-protected shares; req. libdmapsharing 2.9.9+ (bug #501389)
-
-Signed-off-by: W. Michael Petullo <mike@flyn.org>
----
-diff --git a/configure.ac b/configure.ac
-index 124b1a2..5a82ab4 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -728,7 +728,7 @@ AC_ARG_ENABLE(daap,
-                              [Disable DAAP support]),,
-               enable_daap=auto)
- if test "x$enable_daap" != "xno"; then
--	PKG_CHECK_MODULES(DMAPSHARING, libdmapsharing-3.0,
-+	PKG_CHECK_MODULES(DMAPSHARING, libdmapsharing-3.0 >= 2.9.9,
- 			  have_libdmapsharing=yes,
- 			  have_libdmapsharing=no)
- 	if test "x$have_libdmapsharing" = "xno" -a "x$enable_daap" = "xyes"; then
-diff --git a/plugins/daap/rb-daap-source.c b/plugins/daap/rb-daap-source.c
-index 4e12aee..82d6b2f 100644
---- a/plugins/daap/rb-daap-source.c
-+++ b/plugins/daap/rb-daap-source.c
-@@ -429,16 +429,24 @@ ask_password (RBDAAPSource *source, const char *name, const char *keyring)
- #endif
- 	}
- 
-+	if (! password) {
-+		rb_daap_source_disconnect (source);
-+	}
-+
- 	return password;
- }
- 
--static char *
--connection_auth_cb (DMAPConnection   *connection,
--		    const char       *name,
--		    RBDAAPSource     *source)
-+static void
-+connection_auth_cb (DMAPConnection *connection,
-+                    const char     *name,
-+                    SoupSession    *session,
-+                    SoupMessage    *msg,
-+                    SoupAuth       *auth,
-+                    gboolean        retrying,
-+		    RBDAAPSource   *source)
- {
--#ifdef WITH_GNOME_KEYRING
- 	gchar *password = NULL;
-+#ifdef WITH_GNOME_KEYRING
- 	GnomeKeyringResult keyringret;
- 	gchar *keyring;
- 	GList *list;
-@@ -473,11 +481,10 @@ connection_auth_cb (DMAPConnection   *connection,
- 	if (list)
- 		gnome_keyring_network_password_list_free (list); */
- 	g_free (keyring);
--	return password;
- #else
--	return ask_password (source, name, NULL);
-+	password = ask_password (source, name, NULL);
- #endif
--
-+	dmap_connection_authenticate_message (connection, session, msg, auth, password);
- }
- 
- static void
-@@ -494,7 +501,6 @@ connection_connecting_cb (DMAPConnection       *connection,
- 
- 	switch (state) {
- 	case DMAP_GET_INFO:
--	case DMAP_GET_PASSWORD:
- 	case DMAP_LOGIN:
- 		source->priv->connection_status = _("Connecting to music share");
- 		break;
-@@ -656,7 +662,6 @@ rb_daap_source_selected (RBDisplayPage *page)
- 	daap_source->priv->connection = daap_connection_new (name,
- 							     daap_source->priv->host,
- 							     daap_source->priv->port,
--							     daap_source->priv->password_protected,
- 							     db,
- 							     factory);
- 	g_object_unref (entry_type);
---
-cgit v0.9

diff --git a/media-sound/rhythmbox/rhythmbox-0.13.3.ebuild b/media-sound/rhythmbox/rhythmbox-0.13.3.ebuild
deleted file mode 100644
index 39a9f5d..0000000
--- a/media-sound/rhythmbox/rhythmbox-0.13.3.ebuild
+++ /dev/null
@@ -1,204 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-sound/rhythmbox/rhythmbox-0.12.8-r1.ebuild,v 1.2 2010/07/06 15:46:43 ssuominen Exp $
-
-EAPI="2"
-GNOME2_LA_PUNT="yes"
-PYTHON_DEPEND="python? 2:2.5"
-
-inherit autotools eutils gnome2 python multilib virtualx
-if [[ ${PV} = 9999 ]]; then
-	inherit gnome2-live
-fi
-
-DESCRIPTION="Music management and playback software for GNOME"
-HOMEPAGE="http://www.rhythmbox.org/"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="+brasero cdr daap dbus doc gnome-keyring html ipod +lastfm libnotify lirc
-musicbrainz mtp nsplugin python test udev upnp vala webkit"
-if [[ ${PV} = 9999 ]]; then
-	KEYWORDS=""
-else
-	KEYWORDS="~amd64 ~ppc64 ~x86"
-fi
-
-# FIXME: double check what to do with fm-radio plugin
-# TODO: watchout for udev use flag changes
-COMMON_DEPEND=">=dev-libs/glib-2.25.12
-	dev-libs/libxml2
-	>=x11-libs/gtk+-2.20:2
-	>=dev-libs/dbus-glib-0.71
-	>=dev-libs/totem-pl-parser-2.32.1
-	>=gnome-base/gconf-2
-	>=gnome-extra/gnome-media-2.14
-	<gnome-extra/gnome-media-2.90
-	>=net-libs/libsoup-2.26:2.4
-	>=net-libs/libsoup-gnome-2.26:2.4
-	>=media-libs/gst-plugins-base-0.10.24
-
-	cdr? (
-		brasero? ( >=app-cdr/brasero-0.9.1 )
-		!brasero? ( >=gnome-extra/nautilus-cd-burner-2.21.6 ) )
-	daap? (
-		>=net-libs/libdmapsharing-2.9.9:3.0
-		>=net-dns/avahi-0.6 )
-	html? ( >=net-libs/webkit-gtk-1.1.17 )
-	gnome-keyring? ( >=gnome-base/gnome-keyring-0.4.9 )
-	lastfm? ( dev-libs/json-glib )
-	libnotify? ( >=x11-libs/libnotify-0.4.1 )
-	lirc? ( app-misc/lirc )
-	musicbrainz? ( media-libs/musicbrainz:3 )
-	udev? (
-		ipod? ( >=media-libs/libgpod-0.7.92[udev] )
-		mtp? ( >=media-libs/libmtp-0.3 )
-		>=sys-fs/udev-145[extras] )
-"
-RDEPEND="${COMMON_DEPEND}
-	>=media-plugins/gst-plugins-soup-0.10
-	>=media-plugins/gst-plugins-libmms-0.10
-	|| (
-		>=media-plugins/gst-plugins-cdparanoia-0.10
-		>=media-plugins/gst-plugins-cdio-0.10 )
-	>=media-plugins/gst-plugins-meta-0.10-r2:0.10
-	>=media-plugins/gst-plugins-taglib-0.10.6
-
-	nsplugin? ( net-libs/xulrunner )
-	python? (
-		>=dev-python/pygtk-2.8
-		>=dev-python/pygobject-2.15.4
-		>=dev-python/gconf-python-2.22
-		>=dev-python/libgnome-python-2.22
-		>=dev-python/gnome-keyring-python-2.22
-		>=dev-python/gst-python-0.10.8
-		dbus? ( dev-python/dbus-python )
-		webkit? (
-			dev-python/mako
-			dev-python/pywebkitgtk )
-		upnp? (
-			dev-python/louie
-			media-video/coherence
-			dev-python/twisted[gtk] ) )
-"
-# gtk-doc-am needed for eautoreconf
-#	dev-util/gtk-doc-am
-DEPEND="${COMMON_DEPEND}
-	dev-util/pkgconfig
-	>=dev-util/intltool-0.35
-	app-text/scrollkeeper
-	>=app-text/gnome-doc-utils-0.9.1
-	doc? ( >=dev-util/gtk-doc-1.4 )
-	test? ( dev-libs/check )
-	vala? ( >=dev-lang/vala-0.1.0:0.12 )
-"
-DOCS="AUTHORS ChangeLog DOCUMENTERS INTERNALS \
-	  MAINTAINERS MAINTAINERS.old NEWS README THANKS"
-
-pkg_setup() {
-	if ! use udev; then
-		if use ipod; then
-			ewarn "ipod support requires udev support.  Please"
-			ewarn "re-emerge with USE=udev to enable ipod support"
-		fi
-
-		if use mtp; then
-			ewarn "MTP support requires udev support.  Please"
-			ewarn "re-emerge with USE=udev to enable MTP support"
-		fi
-	fi
-
-	if ! use cdr ; then
-		ewarn "You have cdr USE flag disabled."
-		ewarn "You will not be able to burn CDs."
-	fi
-
-	if ! use python; then
-		if use dbus; then
-			ewarn "You need python support to use the im-status plugin"
-		fi
-
-		if use webkit; then
-			ewarn "You need python support in addition to webkit to be able to use"
-			ewarn "the context panel plugin."
-		fi
-
-		if use upnp; then
-			ewarn "You need python support in addition to upnp"
-		fi
-	fi
-
-	if use brasero; then
-		G2CONF="${G2CONF} $(use_with cdr libbrasero-media) --without-libnautilus-burn"
-	else
-		G2CONF="${G2CONF} $(use_with cdr libnautilus-burn) --without-libbrasero-media"
-	fi
-
-	G2CONF="${G2CONF}
-		MOZILLA_PLUGINDIR=/usr/$(get_libdir)/nsbrowser/plugins
-		VALAC=$(type -P valac-0.12)
-		--enable-mmkeys
-		--disable-scrollkeeper
-		--disable-schemas-install
-		--disable-static
-		$(use_enable daap)
-		$(use_enable lastfm)
-		$(use_enable libnotify)
-		$(use_enable lirc)
-		$(use_enable musicbrainz)
-		$(use_enable nsplugin browser-plugin)
-		$(use_enable python)
-		$(use_enable vala)
-		$(use_with daap mdns avahi)
-		$(use_with gnome-keyring)
-		$(use_with html webkit)
-		$(use_with ipod)
-		$(use_with mtp)
-		$(use_with udev gudev)"
-
-	export GST_INSPECT=/bin/true
-}
-
-src_prepare() {
-	epatch "${FILESDIR}/libdmapsharing-0.3-support.patch"
-	epatch "${FILESDIR}/rhythmbox-daap-media-enum.patch"
-	epatch "${FILESDIR}/rhythmbox-daap-password.patch"
-	eautoreconf
-
-	gnome2_src_prepare
-
-	# disable pyc compiling
-	mv py-compile py-compile.orig
-	ln -s $(type -P true) py-compile
-
-}
-
-src_compile() {
-	addpredict "$(unset HOME; echo ~)/.gconf"
-	addpredict "$(unset HOME; echo ~)/.gconfd"
-	gnome2_src_compile
-}
-
-src_test() {
-	unset SESSION_MANAGER
-	unset DBUS_SESSION_BUS_ADDRESS
-	Xemake check || die "test failed"
-}
-
-pkg_postinst() {
-	gnome2_pkg_postinst
-	if use python; then
-		python_need_rebuild
-		python_mod_optimize /usr/$(get_libdir)/rhythmbox/plugins
-	fi
-
-	ewarn
-	ewarn "If ${PN} doesn't play some music format, please check your"
-	ewarn "USE flags on media-plugins/gst-plugins-meta"
-	ewarn
-}
-
-pkg_postrm() {
-	gnome2_pkg_postrm
-	python_mod_cleanup /usr/$(get_libdir)/rhythmbox/plugins
-}

diff --git a/media-sound/rhythmbox/rhythmbox-9999.ebuild b/media-sound/rhythmbox/rhythmbox-9999.ebuild
index 9d81969..670f9d2 100644
--- a/media-sound/rhythmbox/rhythmbox-9999.ebuild
+++ b/media-sound/rhythmbox/rhythmbox-9999.ebuild
@@ -1,10 +1,12 @@
-# Copyright 1999-2010 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Header: /var/cvsroot/gentoo-x86/media-sound/rhythmbox/rhythmbox-0.12.8-r1.ebuild,v 1.2 2010/07/06 15:46:43 ssuominen Exp $
 
-EAPI="2"
+EAPI="3"
 GNOME2_LA_PUNT="yes"
 PYTHON_DEPEND="python? 2:2.5"
+PYTHON_USE_WITH="xml"
+PYTHON_USE_WITH_OPT="python"
 
 inherit eutils gnome2 python multilib virtualx
 if [[ ${PV} = 9999 ]]; then
@@ -16,8 +18,7 @@ HOMEPAGE="http://www.rhythmbox.org/"
 
 LICENSE="GPL-2"
 SLOT="0"
-IUSE="cdr daap dbus doc gnome-keyring html ipod +lastfm libnotify lirc
-musicbrainz mtp nsplugin python test udev upnp vala webkit"
+IUSE="cdr daap dbus doc gnome-keyring html ipod +lastfm libnotify lirc musicbrainz mtp nsplugin python test udev upnp vala webkit"
 if [[ ${PV} = 9999 ]]; then
 	KEYWORDS=""
 else
@@ -25,7 +26,6 @@ else
 fi
 
 # FIXME: double check what to do with fm-radio plugin
-# TODO: watchout for udev use flag changes
 # FIXME: Zeitgesti python plugin
 # NOTE:: Rhythmbox Uses dbus-glib, gdbus, and dbus-python right now
 COMMON_DEPEND=">=dev-libs/glib-2.26.0:2
@@ -34,6 +34,7 @@ COMMON_DEPEND=">=dev-libs/glib-2.26.0:2
 	>=x11-libs/gdk-pixbuf-2.18.0
 	>=dev-libs/dbus-glib-0.71
 	>=dev-libs/gobject-introspection-0.10.0
+	>=dev-libs/libpeas-0.7.3[gtk,python?]
 	>=dev-libs/totem-pl-parser-2.32.1
 	>=media-libs/libgnome-media-profiles-2.91.0:3
 	>=net-libs/libsoup-2.26:2.4
@@ -51,10 +52,11 @@ COMMON_DEPEND=">=dev-libs/glib-2.26.0:2
 	libnotify? ( >=x11-libs/libnotify-0.7.0 )
 	lirc? ( app-misc/lirc )
 	musicbrainz? ( media-libs/musicbrainz:3 )
+	python? ( >=dev-python/pygobject-2.28:2[introspection] )
 	udev? (
 		ipod? ( >=media-libs/libgpod-0.7.92[udev] )
 		mtp? ( >=media-libs/libmtp-0.3 )
-		>=sys-fs/udev-145[extras] )
+		|| ( >=sys-fs/udev-171[gudev] >=sys-fs/udev-145[extras] ) )
 "
 RDEPEND="${COMMON_DEPEND}
 	>=media-plugins/gst-plugins-soup-0.10
@@ -64,10 +66,7 @@ RDEPEND="${COMMON_DEPEND}
 		>=media-plugins/gst-plugins-cdio-0.10 )
 	>=media-plugins/gst-plugins-meta-0.10-r2:0.10
 	>=media-plugins/gst-plugins-taglib-0.10.6
-
-	nsplugin? ( net-libs/xulrunner )
 	python? (
-		>=dev-python/pygobject-2.15.4:2[introspection]
 		>=dev-python/gst-python-0.10.8
 
 		x11-libs/gdk-pixbuf:2[introspection]
@@ -78,12 +77,15 @@ RDEPEND="${COMMON_DEPEND}
 		gnome-keyring? ( dev-python/gnome-keyring-python )
 		webkit? (
 			dev-python/mako
-			net-libs/webkit-gtk:3[introspection] )
+			>=net-libs/webkit-gtk-1.3.9:3[introspection] )
 		upnp? (
+			>=dev-python/gconf-python-2.22
+			>=dev-python/pygtk-2.8:2
 			dev-python/louie
 			media-video/coherence
 			dev-python/twisted[gtk] ) )
-"
+
+	nsplugin? ( net-libs/xulrunner )"
 # gtk-doc-am needed for eautoreconf
 #	dev-util/gtk-doc-am
 DEPEND="${COMMON_DEPEND}
@@ -99,16 +101,26 @@ DOCS="AUTHORS ChangeLog DOCUMENTERS INTERNALS \
 	  MAINTAINERS MAINTAINERS.old NEWS README THANKS"
 
 pkg_setup() {
+	if use python; then
+		python_set_active_version 2
+		python_pkg_setup
+		G2CONF="${G2CONF} PYTHON=$(PYTHON -2)"
+	fi
+
 	if ! use udev; then
 		if use ipod; then
 			ewarn "ipod support requires udev support.  Please"
 			ewarn "re-emerge with USE=udev to enable ipod support"
+			G2CONF="${G2CONF} --without-ipod"
 		fi
 
 		if use mtp; then
 			ewarn "MTP support requires udev support.  Please"
 			ewarn "re-emerge with USE=udev to enable MTP support"
+			G2CONF="${G2CONF} --without-mtp"
 		fi
+	else
+		G2CONF="${G2CONF} $(use_with ipod) $(use_with mtp)"
 	fi
 
 	if ! use cdr ; then
@@ -140,8 +152,9 @@ pkg_setup() {
 		VALAC=$(type -P valac-0.10)
 		--enable-mmkeys
 		--disable-scrollkeeper
-		--disable-schemas-commpile
+		--disable-schemas-compile
 		--disable-static
+		--without-hal
 		$(use_enable daap)
 		$(use_enable lastfm)
 		$(use_enable libnotify)



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] proj/gnome:master commit in: media-sound/rhythmbox/, media-sound/rhythmbox/files/
@ 2013-03-02  8:52 Nirbheek Chauhan
  0 siblings, 0 replies; 6+ messages in thread
From: Nirbheek Chauhan @ 2013-03-02  8:52 UTC (permalink / raw
  To: gentoo-commits

commit:     b24186650aab8d3ffa860ea3b9284cc711d5a7ae
Author:     Nirbheek Chauhan <nirbheek <AT> gentoo <DOT> org>
AuthorDate: Sat Mar  2 08:47:39 2013 +0000
Commit:     Nirbheek Chauhan <nirbheek <AT> gentoo <DOT> org>
CommitDate: Sat Mar  2 08:48:35 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=b2418665

media-sound/rhythmbox: Update to latest git and add libsecret port

---
 .../rhythmbox-port-magnatune-to-libsecret.patch    |  119 +++++++
 .../files/rhythmbox-port-to-libsecret.patch        |  355 ++++++++++++++++++++
 media-sound/rhythmbox/rhythmbox-9999.ebuild        |   15 +-
 3 files changed, 483 insertions(+), 6 deletions(-)

diff --git a/media-sound/rhythmbox/files/rhythmbox-port-magnatune-to-libsecret.patch b/media-sound/rhythmbox/files/rhythmbox-port-magnatune-to-libsecret.patch
new file mode 100644
index 0000000..ddff723
--- /dev/null
+++ b/media-sound/rhythmbox/files/rhythmbox-port-magnatune-to-libsecret.patch
@@ -0,0 +1,119 @@
+From 937423f0cff334693a68bf9c9d13e3d477c7a969 Mon Sep 17 00:00:00 2001
+From: Nirbheek Chauhan <nirbheek.chauhan@collabora.co.uk>
+Date: Sat, 2 Mar 2013 14:09:26 +0530
+Subject: [PATCH 2/2] magnatune: Port to libsecret
+
+---
+diff --git a/plugins/magnatune/MagnatuneAccount.py b/plugins/magnatune/MagnatuneAccount.py
+index f8cf81b..6fdc406 100644
+--- a/plugins/magnatune/MagnatuneAccount.py
++++ b/plugins/magnatune/MagnatuneAccount.py
+@@ -1,4 +1,5 @@
+ # -*- Mode: python; coding: utf-8; tab-width: 8; indent-tabs-mode: t; -*-
++# vim: set sts=0 ts=8 sw=8 tw=0 noet :
+ #
+ # Copyright (C) 2012 Jonathan Matthew  <jonathan@d14n.org>
+ #
+@@ -24,10 +25,17 @@
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA.
+ 
+-from gi.repository import Gio, GnomeKeyring
++from gi.repository import Gio, Secret, SecretUnstable
+ 
+ __instance = None
+ 
++# We need to be able to fetch passwords stored by libgnome-keyring, so we use
++# a schema with SECRET_SCHEMA_DONT_MATCH_NAME set.
++# See: http://developer.gnome.org/libsecret/unstable/migrating-schemas.html
++MAGNATUNE_SCHEMA = Secret.Schema.new("org.gnome.rhythmbox.plugins.magnatune",
++					Secret.SchemaFlags.DONT_MATCH_NAME,
++					{"rhythmbox-plugin": Secret.SchemaAttributeType.STRING})
++
+ def instance():
+ 	global __instance
+ 	if __instance is None:
+@@ -36,54 +44,44 @@ def instance():
+ 
+ class MagnatuneAccount(object):
+ 	def __init__(self):
+-		self.keyring_item = None
+ 		self.settings = Gio.Settings("org.gnome.rhythmbox.plugins.magnatune")
+-
+-		self.keyring_attributes = GnomeKeyring.attribute_list_new()
+-		GnomeKeyring.attribute_list_append_string(self.keyring_attributes,
+-							  "rhythmbox-plugin",
+-							  "magnatune")
+-		(result, items) = GnomeKeyring.find_items_sync(GnomeKeyring.ItemType.GENERIC_SECRET,
+-							       self.keyring_attributes)
+-		if result == GnomeKeyring.Result.OK and len(items) != 0:
+-			(result, item) = GnomeKeyring.item_get_info_sync(None, items[0].item_id)
+-			if result == GnomeKeyring.Result.OK:
+-				self.keyring_item = item
+-			else:
+-				print "Couldn't get keyring item: " + GnomeKeyring.result_to_message(result)
+-		else:
+-			print "couldn't search keyring items: " + GnomeKeyring.result_to_message(result)
++		self.secret = None
++		self.keyring_attributes = {"rhythmbox-plugin": "magnatune"}
++                # Haha.
++                self.secret_service = SecretUnstable.Service.get_sync(SecretUnstable.ServiceFlags.OPEN_SESSION, None)
++		items = self.secret_service.search_sync(MAGNATUNE_SCHEMA,
++							self.keyring_attributes,
++							SecretUnstable.SearchFlags.LOAD_SECRETS,
++							None)
++		if not items:
++			# The Python API doesn't seem to have a way to differentiate between errors and no results.
++			print ("Couldn't find an existing keyring entry")
++			return
++		self.secret = items[0].get_secret().get()
+ 
+ 	def get(self):
+-		if self.keyring_item is None:
++		if self.secret is None:
+ 			return ('none', None, None)
+ 
+ 		account_type = self.settings['account-type']
+ 		try:
+-			(username, password) = self.keyring_item.get_secret().split("\n")
++			(username, password) = self.secret.split("\n")
+ 			return (account_type, username, password)
+ 		except ValueError:
+ 			return ('none', None, None)
+ 
+ 	def update(self, username, password):
+ 		secret = '\n'.join((username, password))
+-		if self.keyring_item is not None:
+-			if secret == self.keyring_item.get_secret():
+-				print "account details not changed"
+-				return
++		if secret == self.secret:
++			print "Account details not changed"
++			return
+ 
+-		(result, id) = GnomeKeyring.item_create_sync(None,
+-							     GnomeKeyring.ItemType.GENERIC_SECRET,
+-							     "Rhythmbox: Magnatune account information",
+-							     self.keyring_attributes,
+-							     secret,
+-							     True)
+-		if result == GnomeKeyring.Result.OK:
+-			if self.keyring_item is None:
+-				(result, item) = GnomeKeyring.item_get_info_sync(None, id)
+-				if result == GnomeKeyring.Result.OK:
+-					self.keyring_item = item
+-				else:
+-					print "couldn't fetch keyring itme: " + GnomeKeyring.result_to_message(result)
++		result = Secret.password_store_sync(MAGNATUNE_SCHEMA,
++							self.keyring_attributes,
++							Secret.COLLECTION_DEFAULT,
++							"Rhythmbox: Magnatune account information",
++							secret, None)
++		if not result:
++			print "Couldn't create keyring item!"
+ 		else:
+-			print "couldn't create keyring item: " + GnomeKeyring.result_to_message(result)
++			self.secret = secret
+-- 
+1.7.12.4
+

diff --git a/media-sound/rhythmbox/files/rhythmbox-port-to-libsecret.patch b/media-sound/rhythmbox/files/rhythmbox-port-to-libsecret.patch
new file mode 100644
index 0000000..c9255a1
--- /dev/null
+++ b/media-sound/rhythmbox/files/rhythmbox-port-to-libsecret.patch
@@ -0,0 +1,355 @@
+From e7880e08bd2eb0b3ea59c8bdb049300712e38993 Mon Sep 17 00:00:00 2001
+From: Nirbheek Chauhan <nirbheek.chauhan@collabora.co.uk>
+Date: Wed, 23 Jan 2013 02:29:10 +0530
+Subject: [PATCH] Port audioscrobbler and daap plugins from gnome-keyring to
+ libsecret
+
+---
+ configure.ac                                       | 41 +++++------
+ plugins/audioscrobbler/Makefile.am                 |  3 +-
+ .../rb-audioscrobbler-radio-source.c               | 46 ++++++------
+ plugins/daap/Makefile.am                           |  6 +-
+ plugins/daap/rb-daap-source.c                      | 82 ++++++++++------------
+ 5 files changed, 90 insertions(+), 88 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index f739a19..6ff98d6 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -223,26 +223,27 @@ fi
+ AM_CONDITIONAL(USE_MTP, test x"$use_mtp" = xyes)
+ 
+ 
+-dnl gnome-keyring support
+-
+-AC_ARG_WITH(gnome-keyring,
+-            AC_HELP_STRING([--with-gnome-keyring],
+-			   [Enable gnome-keyring support]),,
+-	      with_gnome_keyring=auto)
+-if test "x$with_gnome_keyring" != "xno"; then
+-
+-	PKG_CHECK_MODULES(GNOME_KEYRING, gnome-keyring-1, have_gnome_keyring=yes, have_gnome_keyring=no)
+-	if test "x$have_gnome_keyring" = "xno" -a "x$with_gnome_keyring" = "xyes"; then
+-	  AC_MSG_ERROR([gnome-keyring support explicitly requested but gnome-keyring couldn't be found])
++dnl libsecret keyring support
++
++AC_ARG_WITH(keyring,
++            AC_HELP_STRING([--with-keyring],
++			   [Enable keyring support using libsecret]),,
++	      with_keyring=auto)
++if test "x$with_keyring" != "xno"; then
++
++	PKG_CHECK_MODULES(LIBSECRET, libsecret-1, have_keyring=yes, have_keyring=no)
++	if test "x$have_keyring" = "xno" -a "x$with_keyring" = "xyes"; then
++	  AC_MSG_ERROR([keyring support explicitly requested but libsecret
++			could not be found])
+ 	fi
+-	if test "x$have_gnome_keyring" = "xyes"; then
+-	   AC_DEFINE(WITH_GNOME_KEYRING, 1, [Define if gnome-keyring support is enabled])
+-	   use_gnome_keyring=yes
+-	  AC_SUBST(GNOME_KEYRING_CFLAGS)
+-	  AC_SUBST(GNOME_KEYRING_LIBS)
++	if test "x$have_keyring" = "xyes"; then
++	   AC_DEFINE(WITH_LIBSECRET, 1, [Define if keyring support is enabled])
++	   use_keyring=yes
++	  AC_SUBST(LIBSECRET_CFLAGS)
++	  AC_SUBST(LIBSECRET_LIBS)
+ 	fi
+ fi
+-AM_CONDITIONAL(USE_GNOME_KEYRING, test x"$use_gnome_keyring" = xyes)
++AM_CONDITIONAL(USE_LIBSECRET, test x"$use_keyring" = xyes)
+ 
+ dnl Database
+ AC_ARG_WITH(database,
+@@ -919,10 +920,10 @@ if test x"$with_vala" = xyes; then
+ else
+ 	AC_MSG_NOTICE([   Vala plugin support disabled])
+ fi
+-if test x"$use_gnome_keyring" = xyes; then
+-	AC_MSG_NOTICE([** gnome-keyring support enabled])
++if test x"$use_keyring" = xyes; then
++	AC_MSG_NOTICE([** Libsecret keyring support enabled])
+ else
+-	AC_MSG_NOTICE([   gnome-keyring support disabled])
++	AC_MSG_NOTICE([   Libsecret keyring support disabled])
+ fi
+ if test "x$enable_fm_radio" != xno; then
+ 	AC_MSG_NOTICE([** FM radio support enabled])
+diff --git a/plugins/audioscrobbler/Makefile.am b/plugins/audioscrobbler/Makefile.am
+index 913a6b3..c139a34 100644
+--- a/plugins/audioscrobbler/Makefile.am
++++ b/plugins/audioscrobbler/Makefile.am
+@@ -31,6 +31,7 @@ libaudioscrobbler_la_LIBADD = 				\
+ 	$(top_builddir)/shell/librhythmbox-core.la	\
+ 	$(TOTEM_PLPARSER_LIBS)				\
+ 	$(JSON_GLIB_LIBS)				\
++	$(LIBSECRET_LIBS)				\
+ 	$(RHYTHMBOX_LIBS)
+ 
+ INCLUDES = 						\
+@@ -53,7 +54,7 @@ INCLUDES = 						\
+ 	$(TOTEM_PLPARSER_CFLAGS)			\
+ 	$(JSON_GLIB_CFLAGS)				\
+ 	$(RHYTHMBOX_CFLAGS)				\
+-	$(GNOME_KEYRING_CFLAGS)				\
++	$(LIBSECRET_CFLAGS)				\
+ 	-D_BSD_SOURCE
+ 
+ gtkbuilderdir = $(plugindatadir)
+diff --git a/plugins/audioscrobbler/rb-audioscrobbler-radio-source.c b/plugins/audioscrobbler/rb-audioscrobbler-radio-source.c
+index 6f5f3cf..9735537 100644
+--- a/plugins/audioscrobbler/rb-audioscrobbler-radio-source.c
++++ b/plugins/audioscrobbler/rb-audioscrobbler-radio-source.c
+@@ -35,8 +35,8 @@
+ #include <glib/gi18n.h>
+ #include <glib/gstdio.h>
+ 
+-#ifdef WITH_GNOME_KEYRING
+-#include <gnome-keyring.h>
++#ifdef WITH_LIBSECRET
++#include <libsecret/secret.h>
+ #endif
+ 
+ #include <totem-pl-parser.h>
+@@ -1054,28 +1054,33 @@ old_api_shake_hands (RBAudioscrobblerRadioSource *source)
+ 		g_free (password_hash);
+ 		g_free (msg_url);
+ 	} else {
+-#ifdef WITH_GNOME_KEYRING
+-		GnomeKeyringResult result;
++#ifdef WITH_LIBSECRET
+ 		char *password;
++		GError *error = NULL;
+ 
+ 		rb_debug ("attempting to retrieve password from keyring");
+-		result = gnome_keyring_find_password_sync (GNOME_KEYRING_NETWORK_PASSWORD,
+-		                                           &password,
+-		                                           "user", source->priv->username,
+-		                                           "server", rb_audioscrobbler_service_get_name (source->priv->service),
+-		                                           NULL);
++		password = secret_password_lookup_sync (SECRET_SCHEMA_COMPAT_NETWORK,
++							NULL, &error,
++							"user", source->priv->username,
++							"server", rb_audioscrobbler_service_get_name (source->priv->service),
++							NULL);
+ 
+-		if (result == GNOME_KEYRING_RESULT_OK) {
++		if (password) {
+ 			source->priv->old_api_password = g_strdup (password);
+ 			rb_debug ("password found. shaking hands");
+ 			old_api_shake_hands (source);
+ 		} else {
+-			rb_debug ("no password found");
++			if (error) {
++				rb_debug ("unable to lookup password: %s", error->message);
++				g_error_free (error);
++			} else {
++				rb_debug ("no password found");
++			}
+ #endif
+ 			rb_debug ("cannot shake hands. asking user for password");
+ 			display_password_info_bar (source);
+ 			source->priv->is_busy = FALSE;
+-#ifdef WITH_GNOME_KEYRING
++#ifdef WITH_LIBSECRET
+ 		}
+ #endif
+ 	}
+@@ -1277,7 +1282,7 @@ password_info_bar_response_cb (GtkInfoBar *info_bar,
+ 	g_free (source->priv->old_api_password);
+ 	source->priv->old_api_password = g_strdup (gtk_entry_get_text (GTK_ENTRY (source->priv->password_info_bar_entry)));
+ 
+-#ifdef WITH_GNOME_KEYRING
++#ifdef WITH_LIBSECRET
+ 	/* save the new password */
+ 	char *password_desc;
+ 
+@@ -1285,13 +1290,14 @@ password_info_bar_response_cb (GtkInfoBar *info_bar,
+ 	                                 rb_audioscrobbler_service_get_name (source->priv->service));
+ 
+ 	rb_debug ("saving password to keyring");
+-	gnome_keyring_store_password_sync (GNOME_KEYRING_NETWORK_PASSWORD,
+-	                                   GNOME_KEYRING_DEFAULT,
+-	                                   password_desc,
+-	                                   source->priv->old_api_password,
+-	                                   "user", source->priv->username,
+-	                                   "server", rb_audioscrobbler_service_get_name (source->priv->service),
+-	                                   NULL);
++	secret_password_store_sync (SECRET_SCHEMA_COMPAT_NETWORK,
++	                            NULL,
++	                            password_desc,
++	                            source->priv->old_api_password,
++				    NULL, NULL,
++	                            "user", source->priv->username,
++	                            "server", rb_audioscrobbler_service_get_name (source->priv->service),
++	                            NULL);
+ 
+ 	g_free (password_desc);
+ #endif
+diff --git a/plugins/daap/Makefile.am b/plugins/daap/Makefile.am
+index b950bef..f4bb907 100644
+--- a/plugins/daap/Makefile.am
++++ b/plugins/daap/Makefile.am
+@@ -63,9 +63,9 @@ INCLUDES = 						\
+ 	$(RHYTHMBOX_CFLAGS)				\
+ 	-D_BSD_SOURCE
+ 
+-if USE_GNOME_KEYRING
+-libdaap_la_LIBADD += $(GNOME_KEYRING_LIBS)
+-INCLUDES += $(GNOME_KEYRING_CFLAGS)
++if USE_LIBSECRET
++libdaap_la_LIBADD += $(LIBSECRET_LIBS)
++INCLUDES += $(LIBSECRET_CFLAGS)
+ endif
+ 
+ gtkbuilderdir = $(plugindatadir)
+diff --git a/plugins/daap/rb-daap-source.c b/plugins/daap/rb-daap-source.c
+index fb034f9..75e0dc4 100644
+--- a/plugins/daap/rb-daap-source.c
++++ b/plugins/daap/rb-daap-source.c
+@@ -35,8 +35,8 @@
+ #include <glib/gi18n.h>
+ #include <gtk/gtk.h>
+ 
+-#ifdef WITH_GNOME_KEYRING
+-#include <gnome-keyring.h>
++#ifdef WITH_LIBSECRET
++#include <libsecret/secret.h>
+ #endif
+ 
+ #include "rhythmdb.h"
+@@ -394,31 +394,36 @@ mount_op_reply_cb (GMountOperation *op,
+ 		   AuthData *auth_data)
+ {
+ 	const char *password;
+-	gchar *keyring;
+-#ifdef WITH_GNOME_KEYRING
+-	guint32 item_id;
++#ifdef WITH_LIBSECRET
++	gchar *label;
++	gchar *collection = NULL;
+ #endif
+ 
+ 	rb_debug ("mount op reply: %d", result);
+ 	password = g_mount_operation_get_password (op);
+ 
+-#ifdef WITH_GNOME_KEYRING
++#ifdef WITH_LIBSECRET
+ 	switch (g_mount_operation_get_password_save (op)) {
+ 	case G_PASSWORD_SAVE_NEVER:
+ 		break;
+ 
+ 	case G_PASSWORD_SAVE_FOR_SESSION:
+-		keyring = "session";
++		collection = SECRET_COLLECTION_SESSION;
+ 		/* fall through */
+ 
+ 	case G_PASSWORD_SAVE_PERMANENTLY:
+-		gnome_keyring_set_network_password_sync (keyring,
+-			NULL,
+-			"DAAP", auth_data->name,
+-			NULL, "daap",
+-			NULL, 0,
++		label = g_strdup_printf ("Rhythmbox DAAP password for %s", auth_data->name);
++		secret_password_store_sync (SECRET_SCHEMA_COMPAT_NETWORK,
++			collection,
++			label,
+ 			password,
+-			&item_id);
++			NULL,
++			NULL,
++			"domain", "DAAP",
++			"server", auth_data->name,
++			"protocol", "daap",
++			NULL);
++		g_free (label);
+ 		break;
+ 
+ 	default:
+@@ -443,7 +448,11 @@ mount_op_reply_cb (GMountOperation *op,
+ }
+ 
+ static void
+-ask_password (RBDAAPSource *source, const char *name, const char *keyring, SoupSession *session, SoupMessage *msg, SoupAuth *auth)
++ask_password (RBDAAPSource *source,
++	      const char *name,
++	      SoupSession *session,
++	      SoupMessage *msg,
++	      SoupAuth *auth)
+ {
+ 	GtkWindow *parent;
+ 	GMountOperation *mount_op;
+@@ -465,10 +474,8 @@ ask_password (RBDAAPSource *source, const char *name, const char *keyring, SoupS
+ 	g_signal_connect (mount_op, "reply", G_CALLBACK (mount_op_reply_cb), auth_data);
+ 
+ 	flags = G_ASK_PASSWORD_NEED_PASSWORD;
+-#ifdef WITH_GNOME_KEYRING
+-	if (gnome_keyring_is_available ()) {
+-		flags |= G_ASK_PASSWORD_SAVING_SUPPORTED;
+-	}
++#ifdef WITH_LIBSECRET
++	flags |= G_ASK_PASSWORD_SAVING_SUPPORTED;
+ #endif
+ 	message = g_strdup_printf (_("The music share '%s' requires a password to connect"), name);
+ 	g_signal_emit_by_name (mount_op, "ask-password", message, NULL, "DAAP", flags);
+@@ -485,44 +492,31 @@ connection_auth_cb (DMAPConnection *connection,
+ 		    RBDAAPSource   *source)
+ {
+ 	gchar *password = NULL;
+-#ifdef WITH_GNOME_KEYRING
+-	GnomeKeyringResult keyringret;
+-	gchar *keyring;
+-	GList *list = NULL;
++#ifdef WITH_LIBSECRET
++	GError *error = NULL;
+ 
+-	keyring = NULL;
+ 	if (!source->priv->tried_password) {
+-		gnome_keyring_get_default_keyring_sync (&keyring);
+-		keyringret = gnome_keyring_find_network_password_sync (
+-				NULL,
+-				"DAAP", name,
+-				NULL, "daap",
+-				NULL, 0, &list);
+-	} else {
+-		keyringret = GNOME_KEYRING_RESULT_CANCELLED;
++		password = secret_password_lookup_sync (SECRET_SCHEMA_COMPAT_NETWORK,
++				NULL, &error,
++				"domain", "DAAP",
++				"server", name,
++				"protocol", "daap",
++				NULL);
+ 	}
+ 
+-	if (keyringret == GNOME_KEYRING_RESULT_OK) {
+-		GnomeKeyringNetworkPasswordData *pwd_data;
+-
+-		if (list != NULL) {
+-			pwd_data = (GnomeKeyringNetworkPasswordData*)list->data;
+-			password = g_strdup (pwd_data->password);
+-		}
++	if (!error)
+ 		source->priv->tried_password = TRUE;
+-	}
++	else
++		g_error_free (error);
+ 
+ 	if (password == NULL) {
+-		ask_password (source, name, keyring, session, msg, auth);
++		ask_password (source, name, session, msg, auth);
+ 	} else {
+ 		dmap_connection_authenticate_message (connection, session, msg, auth, password);
+ 	}
+ 
+-	if (list)
+-		gnome_keyring_network_password_list_free (list);
+-	g_free (keyring);
+ #else
+-	ask_password (source, name, NULL, session, msg, auth);
++	ask_password (source, name, session, msg, auth);
+ #endif
+ }
+ 
+-- 
+1.7.12.4
+

diff --git a/media-sound/rhythmbox/rhythmbox-9999.ebuild b/media-sound/rhythmbox/rhythmbox-9999.ebuild
index 03d4b2f..ecb64c2 100644
--- a/media-sound/rhythmbox/rhythmbox-9999.ebuild
+++ b/media-sound/rhythmbox/rhythmbox-9999.ebuild
@@ -18,8 +18,8 @@ HOMEPAGE="http://www.rhythmbox.org/"
 
 LICENSE="GPL-2"
 SLOT="0"
-IUSE="cdr daap dbus doc gnome-keyring html ipod libnotify lirc mtp nsplugin
-+python test +udev upnp-av visualizer webkit zeitgeist"
+IUSE="cdr daap dbus doc keyring html ipod libnotify lirc mtp nsplugin +python
+test +udev upnp-av visualizer webkit zeitgeist"
 if [[ ${PV} = 9999 ]]; then
 	KEYWORDS=""
 else
@@ -36,7 +36,7 @@ REQUIRED_USE="
 COMMON_DEPEND=">=dev-libs/glib-2.32.0:2
 	dev-libs/json-glib
 	>=dev-libs/libxml2-2.7.8:2
-	>=x11-libs/gtk+-3.4:3[introspection]
+	>=x11-libs/gtk+-3.6:3[introspection]
 	>=x11-libs/gdk-pixbuf-2.18.0:2
 	>=dev-libs/gobject-introspection-0.10.0
 	>=dev-libs/libpeas-0.7.3[gtk,python?]
@@ -58,7 +58,7 @@ COMMON_DEPEND=">=dev-libs/glib-2.32.0:2
 		>=net-libs/libdmapsharing-2.9.16:3.0
 		>=net-dns/avahi-0.6
 		media-plugins/gst-plugins-soup:1.0 )
-	gnome-keyring? ( >=gnome-base/gnome-keyring-0.4.9 )
+	keyring? ( app-crypt/libsecret )
 	html? ( >=net-libs/webkit-gtk-1.3.9:3 )
 	libnotify? ( >=x11-libs/libnotify-0.7.0 )
 	lirc? ( app-misc/lirc )
@@ -87,7 +87,7 @@ RDEPEND="${COMMON_DEPEND}
 		x11-libs/pango[introspection]
 
 		dbus? ( sys-apps/dbus )
-		gnome-keyring? ( gnome-base/libgnome-keyring[introspection] )
+		keyring? ( >=app-crypt/libsecret-0.13[introspection] )
 		webkit? (
 			dev-python/mako
 			>=net-libs/webkit-gtk-1.3.9:3[introspection] ) )
@@ -130,7 +130,7 @@ pkg_setup() {
 		$(use_enable upnp-av grilo)
 		$(use_with cdr brasero)
 		$(use_with daap mdns avahi)
-		$(use_with gnome-keyring)
+		$(use_with keyring)
 		$(use_with html webkit)
 		$(use_with ipod)
 		$(use_with mtp)
@@ -141,6 +141,9 @@ pkg_setup() {
 
 src_prepare() {
 	gnome2_src_prepare
+	# https://bugzilla.gnome.org/show_bug.cgi?id=694981
+	epatch "${FILESDIR}/${PN}-port-to-libsecret.patch"
+	epatch "${FILESDIR}/${PN}-port-magnatune-to-libsecret.patch"
 	echo > py-compile
 }
 


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] proj/gnome:master commit in: media-sound/rhythmbox/, media-sound/rhythmbox/files/
@ 2013-03-05  1:33 Nirbheek Chauhan
  0 siblings, 0 replies; 6+ messages in thread
From: Nirbheek Chauhan @ 2013-03-05  1:33 UTC (permalink / raw
  To: gentoo-commits

commit:     7406e86f7bd839404acccf874b2068c496835bd4
Author:     Nirbheek Chauhan <nirbheek <AT> gentoo <DOT> org>
AuthorDate: Tue Mar  5 01:30:29 2013 +0000
Commit:     Nirbheek Chauhan <nirbheek <AT> gentoo <DOT> org>
CommitDate: Tue Mar  5 01:32:59 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=7406e86f

media-sound/rhythmbox: Update patch

---
 .../rhythmbox-port-magnatune-to-libsecret.patch    |  119 ----
 .../files/rhythmbox-port-to-libsecret.patch        |  744 +++++++++++++++++---
 media-sound/rhythmbox/rhythmbox-9999.ebuild        |    9 +-
 3 files changed, 646 insertions(+), 226 deletions(-)

diff --git a/media-sound/rhythmbox/files/rhythmbox-port-magnatune-to-libsecret.patch b/media-sound/rhythmbox/files/rhythmbox-port-magnatune-to-libsecret.patch
deleted file mode 100644
index ddff723..0000000
--- a/media-sound/rhythmbox/files/rhythmbox-port-magnatune-to-libsecret.patch
+++ /dev/null
@@ -1,119 +0,0 @@
-From 937423f0cff334693a68bf9c9d13e3d477c7a969 Mon Sep 17 00:00:00 2001
-From: Nirbheek Chauhan <nirbheek.chauhan@collabora.co.uk>
-Date: Sat, 2 Mar 2013 14:09:26 +0530
-Subject: [PATCH 2/2] magnatune: Port to libsecret
-
----
-diff --git a/plugins/magnatune/MagnatuneAccount.py b/plugins/magnatune/MagnatuneAccount.py
-index f8cf81b..6fdc406 100644
---- a/plugins/magnatune/MagnatuneAccount.py
-+++ b/plugins/magnatune/MagnatuneAccount.py
-@@ -1,4 +1,5 @@
- # -*- Mode: python; coding: utf-8; tab-width: 8; indent-tabs-mode: t; -*-
-+# vim: set sts=0 ts=8 sw=8 tw=0 noet :
- #
- # Copyright (C) 2012 Jonathan Matthew  <jonathan@d14n.org>
- #
-@@ -24,10 +25,17 @@
- # along with this program; if not, write to the Free Software
- # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA.
- 
--from gi.repository import Gio, GnomeKeyring
-+from gi.repository import Gio, Secret, SecretUnstable
- 
- __instance = None
- 
-+# We need to be able to fetch passwords stored by libgnome-keyring, so we use
-+# a schema with SECRET_SCHEMA_DONT_MATCH_NAME set.
-+# See: http://developer.gnome.org/libsecret/unstable/migrating-schemas.html
-+MAGNATUNE_SCHEMA = Secret.Schema.new("org.gnome.rhythmbox.plugins.magnatune",
-+					Secret.SchemaFlags.DONT_MATCH_NAME,
-+					{"rhythmbox-plugin": Secret.SchemaAttributeType.STRING})
-+
- def instance():
- 	global __instance
- 	if __instance is None:
-@@ -36,54 +44,44 @@ def instance():
- 
- class MagnatuneAccount(object):
- 	def __init__(self):
--		self.keyring_item = None
- 		self.settings = Gio.Settings("org.gnome.rhythmbox.plugins.magnatune")
--
--		self.keyring_attributes = GnomeKeyring.attribute_list_new()
--		GnomeKeyring.attribute_list_append_string(self.keyring_attributes,
--							  "rhythmbox-plugin",
--							  "magnatune")
--		(result, items) = GnomeKeyring.find_items_sync(GnomeKeyring.ItemType.GENERIC_SECRET,
--							       self.keyring_attributes)
--		if result == GnomeKeyring.Result.OK and len(items) != 0:
--			(result, item) = GnomeKeyring.item_get_info_sync(None, items[0].item_id)
--			if result == GnomeKeyring.Result.OK:
--				self.keyring_item = item
--			else:
--				print "Couldn't get keyring item: " + GnomeKeyring.result_to_message(result)
--		else:
--			print "couldn't search keyring items: " + GnomeKeyring.result_to_message(result)
-+		self.secret = None
-+		self.keyring_attributes = {"rhythmbox-plugin": "magnatune"}
-+                # Haha.
-+                self.secret_service = SecretUnstable.Service.get_sync(SecretUnstable.ServiceFlags.OPEN_SESSION, None)
-+		items = self.secret_service.search_sync(MAGNATUNE_SCHEMA,
-+							self.keyring_attributes,
-+							SecretUnstable.SearchFlags.LOAD_SECRETS,
-+							None)
-+		if not items:
-+			# The Python API doesn't seem to have a way to differentiate between errors and no results.
-+			print ("Couldn't find an existing keyring entry")
-+			return
-+		self.secret = items[0].get_secret().get()
- 
- 	def get(self):
--		if self.keyring_item is None:
-+		if self.secret is None:
- 			return ('none', None, None)
- 
- 		account_type = self.settings['account-type']
- 		try:
--			(username, password) = self.keyring_item.get_secret().split("\n")
-+			(username, password) = self.secret.split("\n")
- 			return (account_type, username, password)
- 		except ValueError:
- 			return ('none', None, None)
- 
- 	def update(self, username, password):
- 		secret = '\n'.join((username, password))
--		if self.keyring_item is not None:
--			if secret == self.keyring_item.get_secret():
--				print "account details not changed"
--				return
-+		if secret == self.secret:
-+			print "Account details not changed"
-+			return
- 
--		(result, id) = GnomeKeyring.item_create_sync(None,
--							     GnomeKeyring.ItemType.GENERIC_SECRET,
--							     "Rhythmbox: Magnatune account information",
--							     self.keyring_attributes,
--							     secret,
--							     True)
--		if result == GnomeKeyring.Result.OK:
--			if self.keyring_item is None:
--				(result, item) = GnomeKeyring.item_get_info_sync(None, id)
--				if result == GnomeKeyring.Result.OK:
--					self.keyring_item = item
--				else:
--					print "couldn't fetch keyring itme: " + GnomeKeyring.result_to_message(result)
-+		result = Secret.password_store_sync(MAGNATUNE_SCHEMA,
-+							self.keyring_attributes,
-+							Secret.COLLECTION_DEFAULT,
-+							"Rhythmbox: Magnatune account information",
-+							secret, None)
-+		if not result:
-+			print "Couldn't create keyring item!"
- 		else:
--			print "couldn't create keyring item: " + GnomeKeyring.result_to_message(result)
-+			self.secret = secret
--- 
-1.7.12.4
-

diff --git a/media-sound/rhythmbox/files/rhythmbox-port-to-libsecret.patch b/media-sound/rhythmbox/files/rhythmbox-port-to-libsecret.patch
index c9255a1..bd0ed8f 100644
--- a/media-sound/rhythmbox/files/rhythmbox-port-to-libsecret.patch
+++ b/media-sound/rhythmbox/files/rhythmbox-port-to-libsecret.patch
@@ -1,46 +1,78 @@
-From e7880e08bd2eb0b3ea59c8bdb049300712e38993 Mon Sep 17 00:00:00 2001
+From 5f992f68cc96ea0d494f30be4ff5386185fb5c18 Mon Sep 17 00:00:00 2001
 From: Nirbheek Chauhan <nirbheek.chauhan@collabora.co.uk>
 Date: Wed, 23 Jan 2013 02:29:10 +0530
-Subject: [PATCH] Port audioscrobbler and daap plugins from gnome-keyring to
- libsecret
+Subject: [PATCH] Port daap and magnatune plugins to libsecret
 
+The Magnatune plugin currently falls back to not saving the password at all if
+libsecret isn't found. This fallback code should be removed once libsecret
+becomes as prevalent as gnome-keyring was.
+
+Audioscrobbler used gnome-keyring for the old API, which no longer works.
+Hence, that code was removed.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=694981
+
+As a bonus, add cscope.out to .gitignore
 ---
- configure.ac                                       | 41 +++++------
- plugins/audioscrobbler/Makefile.am                 |  3 +-
- .../rb-audioscrobbler-radio-source.c               | 46 ++++++------
- plugins/daap/Makefile.am                           |  6 +-
- plugins/daap/rb-daap-source.c                      | 82 ++++++++++------------
- 5 files changed, 90 insertions(+), 88 deletions(-)
+ .gitignore                                         |   1 +
+ configure.ac                                       |  40 ++-
+ plugins/audioscrobbler/Makefile.am                 |   1 -
+ .../rb-audioscrobbler-radio-source.c               | 383 ++-------------------
+ .../rb-audioscrobbler-radio-source.h               |   3 -
+ plugins/daap/Makefile.am                           |   6 +-
+ plugins/daap/rb-daap-source.c                      |  82 ++---
+ plugins/magnatune/MagnatuneAccount.py              |  88 ++---
+ 8 files changed, 143 insertions(+), 461 deletions(-)
 
+diff --git a/.gitignore b/.gitignore
+index a0a2751..d27c9c0 100644
+--- a/.gitignore
++++ b/.gitignore
+@@ -4,6 +4,7 @@
+ .libs
+ *.pyc
+ *.plugin
++cscope.out
+ 
+ autom4te*.cache
+ stamp-h
 diff --git a/configure.ac b/configure.ac
-index f739a19..6ff98d6 100644
+index f739a19..58fde4d 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -223,26 +223,27 @@ fi
+@@ -59,6 +59,8 @@ LIBMTP_REQS=0.3.0
+ LIBPEAS_REQS=0.7.3
+ GRILO_REQS=0.2.0
+ LIBXML2_REQS=2.7.8
++# Needed for libsecret commit ddd9bdd2 for the Magnatune plugin
++LIBSECRET_REQS=0.14
+ 
+ LIBNOTIFY_REQS=0.7.0
+ BRASERO_MIN_REQS=2.31.5
+@@ -223,26 +225,28 @@ fi
  AM_CONDITIONAL(USE_MTP, test x"$use_mtp" = xyes)
  
  
 -dnl gnome-keyring support
--
++dnl libsecret keyring support
+ 
 -AC_ARG_WITH(gnome-keyring,
 -            AC_HELP_STRING([--with-gnome-keyring],
 -			   [Enable gnome-keyring support]),,
 -	      with_gnome_keyring=auto)
 -if test "x$with_gnome_keyring" != "xno"; then
--
++AC_ARG_WITH(libsecret,
++            AC_HELP_STRING([--with-libsecret],
++			   [Enable keyring support using libsecret]),,
++	      with_libsecret=auto)
++if test "x$with_libsecret" != "xno"; then
+ 
 -	PKG_CHECK_MODULES(GNOME_KEYRING, gnome-keyring-1, have_gnome_keyring=yes, have_gnome_keyring=no)
 -	if test "x$have_gnome_keyring" = "xno" -a "x$with_gnome_keyring" = "xyes"; then
 -	  AC_MSG_ERROR([gnome-keyring support explicitly requested but gnome-keyring couldn't be found])
-+dnl libsecret keyring support
-+
-+AC_ARG_WITH(keyring,
-+            AC_HELP_STRING([--with-keyring],
-+			   [Enable keyring support using libsecret]),,
-+	      with_keyring=auto)
-+if test "x$with_keyring" != "xno"; then
-+
-+	PKG_CHECK_MODULES(LIBSECRET, libsecret-1, have_keyring=yes, have_keyring=no)
-+	if test "x$have_keyring" = "xno" -a "x$with_keyring" = "xyes"; then
++	PKG_CHECK_MODULES(LIBSECRET, libsecret-1 >= $LIBSECRET_REQS,
++			  have_libsecret=yes, have_libsecret=no)
++	if test "x$have_libsecret" = "xno" -a "x$with_libsecret" = "xyes"; then
 +	  AC_MSG_ERROR([keyring support explicitly requested but libsecret
 +			could not be found])
  	fi
@@ -49,25 +81,25 @@ index f739a19..6ff98d6 100644
 -	   use_gnome_keyring=yes
 -	  AC_SUBST(GNOME_KEYRING_CFLAGS)
 -	  AC_SUBST(GNOME_KEYRING_LIBS)
-+	if test "x$have_keyring" = "xyes"; then
-+	   AC_DEFINE(WITH_LIBSECRET, 1, [Define if keyring support is enabled])
-+	   use_keyring=yes
++	if test "x$have_libsecret" = "xyes"; then
++	   AC_DEFINE(WITH_LIBSECRET, 1, [Define if libsecret support is enabled])
++	   use_libsecret=yes
 +	  AC_SUBST(LIBSECRET_CFLAGS)
 +	  AC_SUBST(LIBSECRET_LIBS)
  	fi
  fi
 -AM_CONDITIONAL(USE_GNOME_KEYRING, test x"$use_gnome_keyring" = xyes)
-+AM_CONDITIONAL(USE_LIBSECRET, test x"$use_keyring" = xyes)
++AM_CONDITIONAL(USE_LIBSECRET, test x"$use_libsecret" = xyes)
  
  dnl Database
  AC_ARG_WITH(database,
-@@ -919,10 +920,10 @@ if test x"$with_vala" = xyes; then
+@@ -919,10 +923,10 @@ if test x"$with_vala" = xyes; then
  else
  	AC_MSG_NOTICE([   Vala plugin support disabled])
  fi
 -if test x"$use_gnome_keyring" = xyes; then
 -	AC_MSG_NOTICE([** gnome-keyring support enabled])
-+if test x"$use_keyring" = xyes; then
++if test x"$use_libsecret" = xyes; then
 +	AC_MSG_NOTICE([** Libsecret keyring support enabled])
  else
 -	AC_MSG_NOTICE([   gnome-keyring support disabled])
@@ -76,98 +108,467 @@ index f739a19..6ff98d6 100644
  if test "x$enable_fm_radio" != xno; then
  	AC_MSG_NOTICE([** FM radio support enabled])
 diff --git a/plugins/audioscrobbler/Makefile.am b/plugins/audioscrobbler/Makefile.am
-index 913a6b3..c139a34 100644
+index 913a6b3..ca332f1 100644
 --- a/plugins/audioscrobbler/Makefile.am
 +++ b/plugins/audioscrobbler/Makefile.am
-@@ -31,6 +31,7 @@ libaudioscrobbler_la_LIBADD = 				\
- 	$(top_builddir)/shell/librhythmbox-core.la	\
- 	$(TOTEM_PLPARSER_LIBS)				\
- 	$(JSON_GLIB_LIBS)				\
-+	$(LIBSECRET_LIBS)				\
- 	$(RHYTHMBOX_LIBS)
- 
- INCLUDES = 						\
-@@ -53,7 +54,7 @@ INCLUDES = 						\
+@@ -53,7 +53,6 @@ INCLUDES = 						\
  	$(TOTEM_PLPARSER_CFLAGS)			\
  	$(JSON_GLIB_CFLAGS)				\
  	$(RHYTHMBOX_CFLAGS)				\
 -	$(GNOME_KEYRING_CFLAGS)				\
-+	$(LIBSECRET_CFLAGS)				\
  	-D_BSD_SOURCE
  
  gtkbuilderdir = $(plugindatadir)
 diff --git a/plugins/audioscrobbler/rb-audioscrobbler-radio-source.c b/plugins/audioscrobbler/rb-audioscrobbler-radio-source.c
-index 6f5f3cf..9735537 100644
+index 6f5f3cf..b0ddd52 100644
 --- a/plugins/audioscrobbler/rb-audioscrobbler-radio-source.c
 +++ b/plugins/audioscrobbler/rb-audioscrobbler-radio-source.c
-@@ -35,8 +35,8 @@
+@@ -35,10 +35,6 @@
  #include <glib/gi18n.h>
  #include <glib/gstdio.h>
  
 -#ifdef WITH_GNOME_KEYRING
 -#include <gnome-keyring.h>
-+#ifdef WITH_LIBSECRET
-+#include <libsecret/secret.h>
- #endif
- 
+-#endif
+-
  #include <totem-pl-parser.h>
-@@ -1054,28 +1054,33 @@ old_api_shake_hands (RBAudioscrobblerRadioSource *source)
- 		g_free (password_hash);
- 		g_free (msg_url);
- 	} else {
+ 
+ #include "rb-audioscrobbler-radio-source.h"
+@@ -170,9 +166,6 @@ struct _RBAudioscrobblerRadioSourcePrivate
+ 	GtkWidget *error_info_bar;
+ 	GtkWidget *error_info_bar_label;
+ 
+-	GtkWidget *password_info_bar;
+-	GtkWidget *password_info_bar_entry;
+-
+ 	RBEntryView *track_view;
+ 	RhythmDBQueryModel *track_model;
+ 
+@@ -184,13 +177,6 @@ struct _RBAudioscrobblerRadioSourcePrivate
+ 	RhythmDBEntry *playing_entry;
+ 
+ 	RBExtDB *art_store;
+-
+-	/* used when streaming radio using old api */
+-	char *old_api_password;
+-	char *old_api_session_id;
+-	char *old_api_base_url;
+-	char *old_api_base_path;
+-	gboolean old_api_is_banned;
+ };
+ 
+ #define RB_AUDIOSCROBBLER_RADIO_SOURCE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), RB_TYPE_AUDIOSCROBBLER_RADIO_SOURCE, RBAudioscrobblerRadioSourcePrivate))
+@@ -225,24 +211,9 @@ static void xspf_entry_parsed (TotemPlParser *parser,
+                                GHashTable *metadata,
+                                RBAudioscrobblerRadioSource *source);
+ 
+-/* old api */
+-static void old_api_shake_hands (RBAudioscrobblerRadioSource *source);
+-static void old_api_handshake_response_cb (SoupSession *session,
+-                                           SoupMessage *msg,
+-                                           gpointer user_data);
+-static void old_api_tune (RBAudioscrobblerRadioSource *source);
+-static void old_api_tune_response_cb (SoupSession *session,
+-                                      SoupMessage *msg,
+-                                      gpointer user_data);
+-static void old_api_fetch_playlist (RBAudioscrobblerRadioSource *source);
+-
+ /* info bar related things */
+ static void display_error_info_bar (RBAudioscrobblerRadioSource *source,
+                                     const char *message);
+-static void display_password_info_bar (RBAudioscrobblerRadioSource *source);
+-static void password_info_bar_response_cb (GtkInfoBar *info_bar,
+-                                           int response_id,
+-                                           RBAudioscrobblerRadioSource *source);
+ 
+ /* RBDisplayPage implementations */
+ static void impl_selected (RBDisplayPage *page);
+@@ -413,8 +384,6 @@ rb_audioscrobbler_radio_source_constructed (GObject *object)
+ 	RhythmDB *db;
+ 	GtkWidget *main_vbox;
+ 	GtkWidget *error_info_bar_content_area;
+-	GtkWidget *password_info_bar_label;
+-	GtkWidget *password_info_bar_content_area;
+ 	GtkAccelGroup *accel_group;
+ 	RBSourceToolbar *toolbar;
+ 
+@@ -446,23 +415,6 @@ rb_audioscrobbler_radio_source_constructed (GObject *object)
+ 	gtk_container_add (GTK_CONTAINER (error_info_bar_content_area), source->priv->error_info_bar_label);
+ 	gtk_box_pack_start (GTK_BOX (main_vbox), source->priv->error_info_bar, FALSE, FALSE, 0);
+ 
+-	/* password info bar */
+-	source->priv->password_info_bar = gtk_info_bar_new ();
+-	password_info_bar_label = gtk_label_new (_("You must enter your password to listen to this station"));
+-	password_info_bar_content_area = gtk_info_bar_get_content_area (GTK_INFO_BAR (source->priv->password_info_bar));
+-	gtk_container_add (GTK_CONTAINER (password_info_bar_content_area), password_info_bar_label);
+-	source->priv->password_info_bar_entry = gtk_entry_new ();
+-	gtk_entry_set_visibility (GTK_ENTRY (source->priv->password_info_bar_entry), FALSE);
+-	gtk_info_bar_add_action_widget (GTK_INFO_BAR (source->priv->password_info_bar),
+-	                                source->priv->password_info_bar_entry,
+-	                                GTK_RESPONSE_NONE);
+-	gtk_info_bar_add_button (GTK_INFO_BAR (source->priv->password_info_bar), GTK_STOCK_OK, GTK_RESPONSE_OK);
+-	g_signal_connect (source->priv->password_info_bar,
+-	                  "response",
+-	                  G_CALLBACK (password_info_bar_response_cb),
+-	                  source);
+-	gtk_box_pack_start (GTK_BOX (main_vbox), source->priv->password_info_bar, FALSE, FALSE, 0);
+-
+ 	/* entry view */
+ 	source->priv->track_view = rb_entry_view_new (db, G_OBJECT (shell_player), FALSE, FALSE);
+ 	rb_entry_view_append_column (source->priv->track_view, RB_ENTRY_VIEW_COL_TITLE, TRUE);
+@@ -541,11 +493,6 @@ rb_audioscrobbler_radio_source_finalize (GObject *object)
+ 	g_free (source->priv->session_key);
+ 	g_free (source->priv->station_url);
+ 
+-	g_free (source->priv->old_api_password);
+-	g_free (source->priv->old_api_session_id);
+-	g_free (source->priv->old_api_base_url);
+-	g_free (source->priv->old_api_base_path);
+-
+ 	G_OBJECT_CLASS (rb_audioscrobbler_radio_source_parent_class)->finalize (object);
+ }
+ 
+@@ -691,7 +638,6 @@ tune (RBAudioscrobblerRadioSource *source)
+ 
+ 	source->priv->is_busy = TRUE;
+ 	gtk_widget_hide (source->priv->error_info_bar);
+-	gtk_widget_hide (source->priv->password_info_bar);
+ 
+ 	sig_arg = g_strdup_printf ("api_key%smethodradio.tunesk%sstation%s%s",
+ 	                           rb_audioscrobbler_service_get_api_key (source->priv->service),
+@@ -772,44 +718,38 @@ tune_response_cb (SoupSession *session,
+ 
+ 			rb_debug ("tune request responded with error: %s", message);
+ 
+-			if (code == 4) {
+-				/* Our API key only allows streaming of radio to subscribers */
+-				rb_debug ("attempting to use old API to tune radio");
+-				old_api_tune (source);
++			/* show appropriate error message */
++			char *error_message = NULL;
++
++			if (code == 6) {
++				/* Invalid station url */
++				error_message = g_strdup (_("Invalid station URL"));
++			} else if (code == 12) {
++				/* Subscriber only station */
++				/* Translators: %s is the name of the audioscrobbler service, for example "Last.fm".
++				 * This message indicates that to listen to this radio station the user needs to be
++				 * a paying subscriber to the service. */
++				error_message = g_strdup_printf (_("This station is only available to %s subscribers"),
++								 rb_audioscrobbler_service_get_name (source->priv->service));
++			} else if (code == 20) {
++				/* Not enough content */
++				error_message = g_strdup (_("Not enough content to play station"));
++			} else if (code == 27) {
++				/* Deprecated station */
++				/* Translators: %s is the name of the audioscrobbler service, for example "Last.fm".
++				 * This message indicates that the service has deprecated this type of station. */
++				error_message = g_strdup_printf (_("%s no longer supports this type of station"),
++								 rb_audioscrobbler_service_get_name (source->priv->service));
+ 			} else {
+-				/* show appropriate error message */
+-				char *error_message = NULL;
+-
+-				if (code == 6) {
+-					/* Invalid station url */
+-					error_message = g_strdup (_("Invalid station URL"));
+-				} else if (code == 12) {
+-					/* Subscriber only station */
+-					/* Translators: %s is the name of the audioscrobbler service, for example "Last.fm".
+-					 * This message indicates that to listen to this radio station the user needs to be
+-					 * a paying subscriber to the service. */
+-					error_message = g_strdup_printf (_("This station is only available to %s subscribers"),
+-							                 rb_audioscrobbler_service_get_name (source->priv->service));
+-				} else if (code == 20) {
+-					/* Not enough content */
+-					error_message = g_strdup (_("Not enough content to play station"));
+-				} else if (code == 27) {
+-					/* Deprecated station */
+-					/* Translators: %s is the name of the audioscrobbler service, for example "Last.fm".
+-					 * This message indicates that the service has deprecated this type of station. */
+-					error_message = g_strdup_printf (_("%s no longer supports this type of station"),
+-							                 rb_audioscrobbler_service_get_name (source->priv->service));
+-				} else {
+-					/* Other error */
+-					error_message = g_strdup_printf (_("Error tuning station: %i - %s"), code, message);
+-				}
+-
+-				display_error_info_bar (source, error_message);
+-
+-				g_free (error_message);
+-
+-				source->priv->is_busy = FALSE;
++				/* Other error */
++				error_message = g_strdup_printf (_("Error tuning station: %i - %s"), code, message);
+ 			}
++
++			display_error_info_bar (source, error_message);
++
++			g_free (error_message);
++
++			source->priv->is_busy = FALSE;
+ 		} else {
+ 			rb_debug ("unexpected response from tune request: %s", msg->response_body->data);
+ 			display_error_info_bar(source, _("Error tuning station: unexpected response"));
+@@ -1030,229 +970,6 @@ xspf_entry_parsed (TotemPlParser *parser,
+ }
+ 
+ static void
+-old_api_shake_hands (RBAudioscrobblerRadioSource *source)
+-{
+-	if (source->priv->old_api_password != NULL) {
+-		char *password_hash;
+-		char *msg_url;
+-		SoupMessage *msg;
+-
+-		password_hash = g_compute_checksum_for_string (G_CHECKSUM_MD5, source->priv->old_api_password, -1);
+-
+-		msg_url = g_strdup_printf ("%sradio/handshake.php?username=%s&passwordmd5=%s",
+-			                   rb_audioscrobbler_service_get_old_radio_api_url (source->priv->service),
+-			                   source->priv->username,
+-			                   password_hash);
+-
+-		rb_debug ("sending old api handshake request: %s", msg_url);
+-		msg = soup_message_new ("GET", msg_url);
+-		soup_session_queue_message (source->priv->soup_session,
+-			                    msg,
+-			                    old_api_handshake_response_cb,
+-			                    source);
+-
+-		g_free (password_hash);
+-		g_free (msg_url);
+-	} else {
 -#ifdef WITH_GNOME_KEYRING
 -		GnomeKeyringResult result;
-+#ifdef WITH_LIBSECRET
- 		char *password;
-+		GError *error = NULL;
- 
- 		rb_debug ("attempting to retrieve password from keyring");
+-		char *password;
+-
+-		rb_debug ("attempting to retrieve password from keyring");
 -		result = gnome_keyring_find_password_sync (GNOME_KEYRING_NETWORK_PASSWORD,
 -		                                           &password,
 -		                                           "user", source->priv->username,
 -		                                           "server", rb_audioscrobbler_service_get_name (source->priv->service),
 -		                                           NULL);
-+		password = secret_password_lookup_sync (SECRET_SCHEMA_COMPAT_NETWORK,
-+							NULL, &error,
-+							"user", source->priv->username,
-+							"server", rb_audioscrobbler_service_get_name (source->priv->service),
-+							NULL);
- 
+-
 -		if (result == GNOME_KEYRING_RESULT_OK) {
-+		if (password) {
- 			source->priv->old_api_password = g_strdup (password);
- 			rb_debug ("password found. shaking hands");
- 			old_api_shake_hands (source);
- 		} else {
+-			source->priv->old_api_password = g_strdup (password);
+-			rb_debug ("password found. shaking hands");
+-			old_api_shake_hands (source);
+-		} else {
 -			rb_debug ("no password found");
-+			if (error) {
-+				rb_debug ("unable to lookup password: %s", error->message);
-+				g_error_free (error);
-+			} else {
-+				rb_debug ("no password found");
-+			}
- #endif
- 			rb_debug ("cannot shake hands. asking user for password");
- 			display_password_info_bar (source);
- 			source->priv->is_busy = FALSE;
+-#endif
+-			rb_debug ("cannot shake hands. asking user for password");
+-			display_password_info_bar (source);
+-			source->priv->is_busy = FALSE;
 -#ifdef WITH_GNOME_KEYRING
-+#ifdef WITH_LIBSECRET
- 		}
- #endif
- 	}
-@@ -1277,7 +1282,7 @@ password_info_bar_response_cb (GtkInfoBar *info_bar,
- 	g_free (source->priv->old_api_password);
- 	source->priv->old_api_password = g_strdup (gtk_entry_get_text (GTK_ENTRY (source->priv->password_info_bar_entry)));
+-		}
+-#endif
+-	}
+-}
+-
+-static void
+-old_api_handshake_response_cb (SoupSession *session,
+-                               SoupMessage *msg,
+-                               gpointer user_data)
+-{
+-	RBAudioscrobblerRadioSource *source;
+-
+-	source = RB_AUDIOSCROBBLER_RADIO_SOURCE (user_data);
+-
+-	if (msg->response_body->data == NULL) {
+-		g_free (source->priv->old_api_session_id);
+-		source->priv->old_api_session_id = NULL;
+-		rb_debug ("handshake failed: no response");
+-		display_error_info_bar (source, _("Error tuning station: no response"));
+-	} else {
+-		char **pieces;
+-		int i;
+-
+-		pieces = g_strsplit (msg->response_body->data, "\n", 0);
+-		for (i = 0; pieces[i] != NULL; i++) {
+-			gchar **values = g_strsplit (pieces[i], "=", 2);
+-
+-			if (values[0] == NULL) {
+-				rb_debug ("unexpected response content: %s", pieces[i]);
+-			} else if (strcmp (values[0], "session") == 0) {
+-				if (strcmp (values[1], "FAILED") == 0) {
+-					g_free (source->priv->old_api_session_id);
+-					source->priv->old_api_session_id = NULL;
+-
+-					rb_debug ("handshake failed: probably bad authentication. asking user for new password");
+-					g_free (source->priv->old_api_password);
+-					source->priv->old_api_password = NULL;
+-					display_password_info_bar (source);
+-				} else {
+-					g_free (source->priv->old_api_session_id);
+-					source->priv->old_api_session_id = g_strdup (values[1]);
+-					rb_debug ("session ID: %s", source->priv->old_api_session_id);
+-				}
+-			} else if (strcmp (values[0], "base_url") == 0) {
+-				g_free (source->priv->old_api_base_url);
+-				source->priv->old_api_base_url = g_strdup (values[1]);
+-				rb_debug ("base url: %s", source->priv->old_api_base_url);
+-			} else if (strcmp (values[0], "base_path") == 0) {
+-				g_free (source->priv->old_api_base_path);
+-				source->priv->old_api_base_path = g_strdup (values[1]);
+-				rb_debug ("base path: %s", source->priv->old_api_base_path);
+-			} else if (strcmp (values[0], "banned") == 0) {
+-				if (strcmp (values[1], "0") != 0) {
+-					source->priv->old_api_is_banned = TRUE;
+-				} else {
+-					source->priv->old_api_is_banned = FALSE;
+-				}
+-				rb_debug ("banned: %i", source->priv->old_api_is_banned);
+-			}
+-
+-			g_strfreev (values);
+-		}
+-		g_strfreev (pieces);
+-	}
+-
+-	/* if handshake was successful then tune */
+-	if (source->priv->old_api_session_id != NULL) {
+-		old_api_tune (source);
+-	} else {
+-		source->priv->is_busy = FALSE;
+-	}
+-}
+-
+-static void
+-old_api_tune (RBAudioscrobblerRadioSource *source)
+-{
+-	/* get a handshake first if we don't have one */
+-	if (source->priv->old_api_session_id == NULL) {
+-		old_api_shake_hands (source);
+-	} else {
+-		char *escaped_station_url;
+-		char *msg_url;
+-		SoupMessage *msg;
+-
+-		escaped_station_url = g_uri_escape_string (source->priv->station_url, NULL, FALSE);
+-
+-		msg_url = g_strdup_printf("http://%s%s/adjust.php?session=%s&url=%s",
+-			                  source->priv->old_api_base_url,
+-			                  source->priv->old_api_base_path,
+-			                  source->priv->old_api_session_id,
+-			                  escaped_station_url);
+-
+-		rb_debug ("sending old api tune request: %s", msg_url);
+-		msg = soup_message_new ("GET", msg_url);
+-		soup_session_queue_message (source->priv->soup_session,
+-			                    msg,
+-			                    old_api_tune_response_cb,
+-			                    source);
+-
+-		g_free (escaped_station_url);
+-		g_free (msg_url);
+-	}
+-}
+-
+-static void
+-old_api_tune_response_cb (SoupSession *session,
+-                          SoupMessage *msg,
+-                          gpointer user_data)
+-{
+-	RBAudioscrobblerRadioSource *source;
+-
+-	source = RB_AUDIOSCROBBLER_RADIO_SOURCE (user_data);
+-
+-	if (msg->response_body->data != NULL) {
+-		char **pieces;
+-		int i;
+-
+-		pieces = g_strsplit (msg->response_body->data, "\n", 0);
+-		for (i = 0; pieces[i] != NULL; i++) {
+-			gchar **values = g_strsplit (pieces[i], "=", 2);
+-
+-			if (values[0] == NULL) {
+-				rb_debug ("unexpected response from old api tune request: %s", pieces[i]);
+-			} else if (strcmp (values[0], "response") == 0) {
+-				if (strcmp (values[1], "OK") == 0) {
+-					rb_debug ("old api tune request was successful");
+-					/* no problems tuning, get the playlist */
+-					old_api_fetch_playlist (source);
+-				}
+-			} else if (strcmp (values[0], "error") == 0) {
+-				char *error_message;
+-				rb_debug ("old api tune request responded with error: %s", pieces[i]);
+-
+-				error_message = g_strdup_printf (_("Error tuning station: %s"), values[1]);
+-
+-
+-				g_free (error_message);
+-
+-				source->priv->is_busy = FALSE;
+-			}
+-			/* TODO: do something with other information given here */
+-
+-			g_strfreev (values);
+-		}
+-
+-		g_strfreev (pieces);
+-	} else {
+-		rb_debug ("no response from old api tune request");
+-		display_error_info_bar (source, _("Error tuning station: no response"));
+-		source->priv->is_busy = FALSE;
+-	}
+-}
+-
+-static void
+-old_api_fetch_playlist (RBAudioscrobblerRadioSource *source)
+-{
+-	char *msg_url;
+-	SoupMessage *msg;
+-
+-	msg_url = g_strdup_printf("http://%s%s/xspf.php?sk=%s&discovery=%i&desktop=%s",
+-		                  source->priv->old_api_base_url,
+-		                  source->priv->old_api_base_path,
+-		                  source->priv->old_api_session_id,
+-		                  0,
+-		                  "1.5");
+-
+-	rb_debug ("sending old api playlist request: %s", msg_url);
+-	msg = soup_message_new ("GET", msg_url);
+-	soup_session_queue_message (source->priv->soup_session,
+-		                    msg,
+-		                    fetch_playlist_response_cb,
+-		                    source);
+-
+-	g_free (msg_url);
+-}
+-
+-static void
+ display_error_info_bar (RBAudioscrobblerRadioSource *source,
+                         const char *message)
+ {
+@@ -1261,46 +978,6 @@ display_error_info_bar (RBAudioscrobblerRadioSource *source,
+ 	gtk_widget_show_all (source->priv->error_info_bar);
+ }
  
+-static void
+-display_password_info_bar (RBAudioscrobblerRadioSource *source)
+-{
+-	gtk_widget_show_all (source->priv->password_info_bar);
+-}
+-
+-static void
+-password_info_bar_response_cb (GtkInfoBar *info_bar,
+-                               int response_id,
+-                               RBAudioscrobblerRadioSource *source)
+-{
+-	gtk_widget_hide (source->priv->password_info_bar);
+-
+-	g_free (source->priv->old_api_password);
+-	source->priv->old_api_password = g_strdup (gtk_entry_get_text (GTK_ENTRY (source->priv->password_info_bar_entry)));
+-
 -#ifdef WITH_GNOME_KEYRING
-+#ifdef WITH_LIBSECRET
- 	/* save the new password */
- 	char *password_desc;
- 
-@@ -1285,13 +1290,14 @@ password_info_bar_response_cb (GtkInfoBar *info_bar,
- 	                                 rb_audioscrobbler_service_get_name (source->priv->service));
- 
- 	rb_debug ("saving password to keyring");
+-	/* save the new password */
+-	char *password_desc;
+-
+-	password_desc = g_strdup_printf (_("Password for streaming %s radio using the deprecated API"),
+-	                                 rb_audioscrobbler_service_get_name (source->priv->service));
+-
+-	rb_debug ("saving password to keyring");
 -	gnome_keyring_store_password_sync (GNOME_KEYRING_NETWORK_PASSWORD,
 -	                                   GNOME_KEYRING_DEFAULT,
 -	                                   password_desc,
@@ -175,17 +576,32 @@ index 6f5f3cf..9735537 100644
 -	                                   "user", source->priv->username,
 -	                                   "server", rb_audioscrobbler_service_get_name (source->priv->service),
 -	                                   NULL);
-+	secret_password_store_sync (SECRET_SCHEMA_COMPAT_NETWORK,
-+	                            NULL,
-+	                            password_desc,
-+	                            source->priv->old_api_password,
-+				    NULL, NULL,
-+	                            "user", source->priv->username,
-+	                            "server", rb_audioscrobbler_service_get_name (source->priv->service),
-+	                            NULL);
- 
- 	g_free (password_desc);
- #endif
+-
+-	g_free (password_desc);
+-#endif
+-
+-	gtk_entry_set_text (GTK_ENTRY (source->priv->password_info_bar_entry), "");
+-
+-	old_api_shake_hands (source);
+-}
+-
+ static gboolean
+ impl_can_remove (RBDisplayPage *page)
+ {
+diff --git a/plugins/audioscrobbler/rb-audioscrobbler-radio-source.h b/plugins/audioscrobbler/rb-audioscrobbler-radio-source.h
+index f38d857..08bb4a0 100644
+--- a/plugins/audioscrobbler/rb-audioscrobbler-radio-source.h
++++ b/plugins/audioscrobbler/rb-audioscrobbler-radio-source.h
+@@ -86,9 +86,6 @@ RBSource *rb_audioscrobbler_radio_source_new (RBAudioscrobblerProfilePage *paren
+                                               const char *station_name,
+                                               const char *station_url);
+ 
+-void rb_audioscrobbler_radio_source_set_old_api_password (RBAudioscrobblerRadioSource *source,
+-                                                          const char *password);
+-
+ G_END_DECLS
+ 
+ #endif /* __RB_AUDIOSCROBBLER_RADIO_SOURCE_H */
 diff --git a/plugins/daap/Makefile.am b/plugins/daap/Makefile.am
 index b950bef..f4bb907 100644
 --- a/plugins/daap/Makefile.am
@@ -350,6 +766,130 @@ index fb034f9..75e0dc4 100644
  #endif
  }
  
+diff --git a/plugins/magnatune/MagnatuneAccount.py b/plugins/magnatune/MagnatuneAccount.py
+index f8cf81b..93b04c9 100644
+--- a/plugins/magnatune/MagnatuneAccount.py
++++ b/plugins/magnatune/MagnatuneAccount.py
+@@ -1,4 +1,5 @@
+ # -*- Mode: python; coding: utf-8; tab-width: 8; indent-tabs-mode: t; -*-
++# vim: set sts=0 ts=8 sw=8 tw=0 noet :
+ #
+ # Copyright (C) 2012 Jonathan Matthew  <jonathan@d14n.org>
+ #
+@@ -24,10 +25,25 @@
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA.
+ 
+-from gi.repository import Gio, GnomeKeyring
++from gi.repository import Gio
++
++# Till libsecret completely replaces gnome-keyring, we'll fall back to not
++# saving the password if libsecret can't be found. This code can be removed later.
++try:
++	from gi.repository import Secret, SecretUnstable
++	# We need to be able to fetch passwords stored by libgnome-keyring, so we use
++	# a schema with SECRET_SCHEMA_DONT_MATCH_NAME set.
++	# See: http://developer.gnome.org/libsecret/unstable/migrating-schemas.html
++	MAGNATUNE_SCHEMA = Secret.Schema.new("org.gnome.rhythmbox.plugins.magnatune",
++						Secret.SchemaFlags.DONT_MATCH_NAME,
++						{"rhythmbox-plugin": Secret.SchemaAttributeType.STRING})
++except ImportError:
++	Secret = None
++	print ("You need to install libsecret and its introspection files to store your Magnatune password")
+ 
+ __instance = None
+ 
++
+ def instance():
+ 	global __instance
+ 	if __instance is None:
+@@ -36,54 +52,48 @@ def instance():
+ 
+ class MagnatuneAccount(object):
+ 	def __init__(self):
+-		self.keyring_item = None
+ 		self.settings = Gio.Settings("org.gnome.rhythmbox.plugins.magnatune")
+-
+-		self.keyring_attributes = GnomeKeyring.attribute_list_new()
+-		GnomeKeyring.attribute_list_append_string(self.keyring_attributes,
+-							  "rhythmbox-plugin",
+-							  "magnatune")
+-		(result, items) = GnomeKeyring.find_items_sync(GnomeKeyring.ItemType.GENERIC_SECRET,
+-							       self.keyring_attributes)
+-		if result == GnomeKeyring.Result.OK and len(items) != 0:
+-			(result, item) = GnomeKeyring.item_get_info_sync(None, items[0].item_id)
+-			if result == GnomeKeyring.Result.OK:
+-				self.keyring_item = item
+-			else:
+-				print "Couldn't get keyring item: " + GnomeKeyring.result_to_message(result)
+-		else:
+-			print "couldn't search keyring items: " + GnomeKeyring.result_to_message(result)
++		self.secret = None
++		self.keyring_attributes = {"rhythmbox-plugin": "magnatune"}
++		if Secret is None:
++			print ("Account details will not be saved because libsecret was not found")
++			return
++                # Haha.
++                self.secret_service = SecretUnstable.Service.get_sync(SecretUnstable.ServiceFlags.OPEN_SESSION, None)
++		items = self.secret_service.search_sync(MAGNATUNE_SCHEMA,
++							self.keyring_attributes,
++							SecretUnstable.SearchFlags.LOAD_SECRETS,
++							None)
++		if not items:
++			# The Python API doesn't seem to have a way to differentiate between errors and no results.
++			print ("Couldn't find an existing keyring entry")
++			return
++		self.secret = items[0].get_secret().get()
+ 
+ 	def get(self):
+-		if self.keyring_item is None:
++		if self.secret is None:
+ 			return ('none', None, None)
+ 
+ 		account_type = self.settings['account-type']
+ 		try:
+-			(username, password) = self.keyring_item.get_secret().split("\n")
++			(username, password) = self.secret.split("\n")
+ 			return (account_type, username, password)
+ 		except ValueError:
+ 			return ('none', None, None)
+ 
+ 	def update(self, username, password):
+ 		secret = '\n'.join((username, password))
+-		if self.keyring_item is not None:
+-			if secret == self.keyring_item.get_secret():
+-				print "account details not changed"
+-				return
+-
+-		(result, id) = GnomeKeyring.item_create_sync(None,
+-							     GnomeKeyring.ItemType.GENERIC_SECRET,
+-							     "Rhythmbox: Magnatune account information",
+-							     self.keyring_attributes,
+-							     secret,
+-							     True)
+-		if result == GnomeKeyring.Result.OK:
+-			if self.keyring_item is None:
+-				(result, item) = GnomeKeyring.item_get_info_sync(None, id)
+-				if result == GnomeKeyring.Result.OK:
+-					self.keyring_item = item
+-				else:
+-					print "couldn't fetch keyring itme: " + GnomeKeyring.result_to_message(result)
+-		else:
+-			print "couldn't create keyring item: " + GnomeKeyring.result_to_message(result)
++		if secret == self.secret:
++			print ("Account details not changed")
++			return
++		self.secret = secret
++		if Secret is None:
++			print ("Account details were not saved because libsecret was not found")
++			return
++		result = Secret.password_store_sync(MAGNATUNE_SCHEMA,
++							self.keyring_attributes,
++							Secret.COLLECTION_DEFAULT,
++							"Rhythmbox: Magnatune account information",
++							secret, None)
++		if not result:
++			print ("Couldn't create keyring item!")
 -- 
 1.7.12.4
 

diff --git a/media-sound/rhythmbox/rhythmbox-9999.ebuild b/media-sound/rhythmbox/rhythmbox-9999.ebuild
index ecb64c2..b66fd8d 100644
--- a/media-sound/rhythmbox/rhythmbox-9999.ebuild
+++ b/media-sound/rhythmbox/rhythmbox-9999.ebuild
@@ -18,7 +18,7 @@ HOMEPAGE="http://www.rhythmbox.org/"
 
 LICENSE="GPL-2"
 SLOT="0"
-IUSE="cdr daap dbus doc keyring html ipod libnotify lirc mtp nsplugin +python
+IUSE="cdr daap dbus doc +keyring html ipod libnotify lirc mtp nsplugin +python
 test +udev upnp-av visualizer webkit zeitgeist"
 if [[ ${PV} = 9999 ]]; then
 	KEYWORDS=""
@@ -58,7 +58,7 @@ COMMON_DEPEND=">=dev-libs/glib-2.32.0:2
 		>=net-libs/libdmapsharing-2.9.16:3.0
 		>=net-dns/avahi-0.6
 		media-plugins/gst-plugins-soup:1.0 )
-	keyring? ( app-crypt/libsecret )
+	keyring? ( >=app-crypt/libsecret-0.14 )
 	html? ( >=net-libs/webkit-gtk-1.3.9:3 )
 	libnotify? ( >=x11-libs/libnotify-0.7.0 )
 	lirc? ( app-misc/lirc )
@@ -87,7 +87,7 @@ RDEPEND="${COMMON_DEPEND}
 		x11-libs/pango[introspection]
 
 		dbus? ( sys-apps/dbus )
-		keyring? ( >=app-crypt/libsecret-0.13[introspection] )
+		keyring? ( >=app-crypt/libsecret-0.14[introspection] )
 		webkit? (
 			dev-python/mako
 			>=net-libs/webkit-gtk-1.3.9:3[introspection] ) )
@@ -130,7 +130,7 @@ pkg_setup() {
 		$(use_enable upnp-av grilo)
 		$(use_with cdr brasero)
 		$(use_with daap mdns avahi)
-		$(use_with keyring)
+		$(use_with keyring libsecret)
 		$(use_with html webkit)
 		$(use_with ipod)
 		$(use_with mtp)
@@ -143,7 +143,6 @@ src_prepare() {
 	gnome2_src_prepare
 	# https://bugzilla.gnome.org/show_bug.cgi?id=694981
 	epatch "${FILESDIR}/${PN}-port-to-libsecret.patch"
-	epatch "${FILESDIR}/${PN}-port-magnatune-to-libsecret.patch"
 	echo > py-compile
 }
 


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] proj/gnome:master commit in: media-sound/rhythmbox/, media-sound/rhythmbox/files/
@ 2013-04-20 16:49 Priit Laes
  0 siblings, 0 replies; 6+ messages in thread
From: Priit Laes @ 2013-04-20 16:49 UTC (permalink / raw
  To: gentoo-commits

commit:     64d1ed940001c3c6f1c16ac92287929307d44d28
Author:     Priit Laes <plaes <AT> plaes <DOT> org>
AuthorDate: Sat Apr 20 16:48:56 2013 +0000
Commit:     Priit Laes <plaes <AT> plaes <DOT> org>
CommitDate: Sat Apr 20 16:48:56 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=64d1ed94

media-sound/rhythmbox: Drop unneeded patch

---
 .../files/rhythmbox-port-to-libsecret.patch        |  895 --------------------
 media-sound/rhythmbox/rhythmbox-9999.ebuild        |    7 +-
 2 files changed, 2 insertions(+), 900 deletions(-)

diff --git a/media-sound/rhythmbox/files/rhythmbox-port-to-libsecret.patch b/media-sound/rhythmbox/files/rhythmbox-port-to-libsecret.patch
deleted file mode 100644
index bd0ed8f..0000000
--- a/media-sound/rhythmbox/files/rhythmbox-port-to-libsecret.patch
+++ /dev/null
@@ -1,895 +0,0 @@
-From 5f992f68cc96ea0d494f30be4ff5386185fb5c18 Mon Sep 17 00:00:00 2001
-From: Nirbheek Chauhan <nirbheek.chauhan@collabora.co.uk>
-Date: Wed, 23 Jan 2013 02:29:10 +0530
-Subject: [PATCH] Port daap and magnatune plugins to libsecret
-
-The Magnatune plugin currently falls back to not saving the password at all if
-libsecret isn't found. This fallback code should be removed once libsecret
-becomes as prevalent as gnome-keyring was.
-
-Audioscrobbler used gnome-keyring for the old API, which no longer works.
-Hence, that code was removed.
-
-https://bugzilla.gnome.org/show_bug.cgi?id=694981
-
-As a bonus, add cscope.out to .gitignore
----
- .gitignore                                         |   1 +
- configure.ac                                       |  40 ++-
- plugins/audioscrobbler/Makefile.am                 |   1 -
- .../rb-audioscrobbler-radio-source.c               | 383 ++-------------------
- .../rb-audioscrobbler-radio-source.h               |   3 -
- plugins/daap/Makefile.am                           |   6 +-
- plugins/daap/rb-daap-source.c                      |  82 ++---
- plugins/magnatune/MagnatuneAccount.py              |  88 ++---
- 8 files changed, 143 insertions(+), 461 deletions(-)
-
-diff --git a/.gitignore b/.gitignore
-index a0a2751..d27c9c0 100644
---- a/.gitignore
-+++ b/.gitignore
-@@ -4,6 +4,7 @@
- .libs
- *.pyc
- *.plugin
-+cscope.out
- 
- autom4te*.cache
- stamp-h
-diff --git a/configure.ac b/configure.ac
-index f739a19..58fde4d 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -59,6 +59,8 @@ LIBMTP_REQS=0.3.0
- LIBPEAS_REQS=0.7.3
- GRILO_REQS=0.2.0
- LIBXML2_REQS=2.7.8
-+# Needed for libsecret commit ddd9bdd2 for the Magnatune plugin
-+LIBSECRET_REQS=0.14
- 
- LIBNOTIFY_REQS=0.7.0
- BRASERO_MIN_REQS=2.31.5
-@@ -223,26 +225,28 @@ fi
- AM_CONDITIONAL(USE_MTP, test x"$use_mtp" = xyes)
- 
- 
--dnl gnome-keyring support
-+dnl libsecret keyring support
- 
--AC_ARG_WITH(gnome-keyring,
--            AC_HELP_STRING([--with-gnome-keyring],
--			   [Enable gnome-keyring support]),,
--	      with_gnome_keyring=auto)
--if test "x$with_gnome_keyring" != "xno"; then
-+AC_ARG_WITH(libsecret,
-+            AC_HELP_STRING([--with-libsecret],
-+			   [Enable keyring support using libsecret]),,
-+	      with_libsecret=auto)
-+if test "x$with_libsecret" != "xno"; then
- 
--	PKG_CHECK_MODULES(GNOME_KEYRING, gnome-keyring-1, have_gnome_keyring=yes, have_gnome_keyring=no)
--	if test "x$have_gnome_keyring" = "xno" -a "x$with_gnome_keyring" = "xyes"; then
--	  AC_MSG_ERROR([gnome-keyring support explicitly requested but gnome-keyring couldn't be found])
-+	PKG_CHECK_MODULES(LIBSECRET, libsecret-1 >= $LIBSECRET_REQS,
-+			  have_libsecret=yes, have_libsecret=no)
-+	if test "x$have_libsecret" = "xno" -a "x$with_libsecret" = "xyes"; then
-+	  AC_MSG_ERROR([keyring support explicitly requested but libsecret
-+			could not be found])
- 	fi
--	if test "x$have_gnome_keyring" = "xyes"; then
--	   AC_DEFINE(WITH_GNOME_KEYRING, 1, [Define if gnome-keyring support is enabled])
--	   use_gnome_keyring=yes
--	  AC_SUBST(GNOME_KEYRING_CFLAGS)
--	  AC_SUBST(GNOME_KEYRING_LIBS)
-+	if test "x$have_libsecret" = "xyes"; then
-+	   AC_DEFINE(WITH_LIBSECRET, 1, [Define if libsecret support is enabled])
-+	   use_libsecret=yes
-+	  AC_SUBST(LIBSECRET_CFLAGS)
-+	  AC_SUBST(LIBSECRET_LIBS)
- 	fi
- fi
--AM_CONDITIONAL(USE_GNOME_KEYRING, test x"$use_gnome_keyring" = xyes)
-+AM_CONDITIONAL(USE_LIBSECRET, test x"$use_libsecret" = xyes)
- 
- dnl Database
- AC_ARG_WITH(database,
-@@ -919,10 +923,10 @@ if test x"$with_vala" = xyes; then
- else
- 	AC_MSG_NOTICE([   Vala plugin support disabled])
- fi
--if test x"$use_gnome_keyring" = xyes; then
--	AC_MSG_NOTICE([** gnome-keyring support enabled])
-+if test x"$use_libsecret" = xyes; then
-+	AC_MSG_NOTICE([** Libsecret keyring support enabled])
- else
--	AC_MSG_NOTICE([   gnome-keyring support disabled])
-+	AC_MSG_NOTICE([   Libsecret keyring support disabled])
- fi
- if test "x$enable_fm_radio" != xno; then
- 	AC_MSG_NOTICE([** FM radio support enabled])
-diff --git a/plugins/audioscrobbler/Makefile.am b/plugins/audioscrobbler/Makefile.am
-index 913a6b3..ca332f1 100644
---- a/plugins/audioscrobbler/Makefile.am
-+++ b/plugins/audioscrobbler/Makefile.am
-@@ -53,7 +53,6 @@ INCLUDES = 						\
- 	$(TOTEM_PLPARSER_CFLAGS)			\
- 	$(JSON_GLIB_CFLAGS)				\
- 	$(RHYTHMBOX_CFLAGS)				\
--	$(GNOME_KEYRING_CFLAGS)				\
- 	-D_BSD_SOURCE
- 
- gtkbuilderdir = $(plugindatadir)
-diff --git a/plugins/audioscrobbler/rb-audioscrobbler-radio-source.c b/plugins/audioscrobbler/rb-audioscrobbler-radio-source.c
-index 6f5f3cf..b0ddd52 100644
---- a/plugins/audioscrobbler/rb-audioscrobbler-radio-source.c
-+++ b/plugins/audioscrobbler/rb-audioscrobbler-radio-source.c
-@@ -35,10 +35,6 @@
- #include <glib/gi18n.h>
- #include <glib/gstdio.h>
- 
--#ifdef WITH_GNOME_KEYRING
--#include <gnome-keyring.h>
--#endif
--
- #include <totem-pl-parser.h>
- 
- #include "rb-audioscrobbler-radio-source.h"
-@@ -170,9 +166,6 @@ struct _RBAudioscrobblerRadioSourcePrivate
- 	GtkWidget *error_info_bar;
- 	GtkWidget *error_info_bar_label;
- 
--	GtkWidget *password_info_bar;
--	GtkWidget *password_info_bar_entry;
--
- 	RBEntryView *track_view;
- 	RhythmDBQueryModel *track_model;
- 
-@@ -184,13 +177,6 @@ struct _RBAudioscrobblerRadioSourcePrivate
- 	RhythmDBEntry *playing_entry;
- 
- 	RBExtDB *art_store;
--
--	/* used when streaming radio using old api */
--	char *old_api_password;
--	char *old_api_session_id;
--	char *old_api_base_url;
--	char *old_api_base_path;
--	gboolean old_api_is_banned;
- };
- 
- #define RB_AUDIOSCROBBLER_RADIO_SOURCE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), RB_TYPE_AUDIOSCROBBLER_RADIO_SOURCE, RBAudioscrobblerRadioSourcePrivate))
-@@ -225,24 +211,9 @@ static void xspf_entry_parsed (TotemPlParser *parser,
-                                GHashTable *metadata,
-                                RBAudioscrobblerRadioSource *source);
- 
--/* old api */
--static void old_api_shake_hands (RBAudioscrobblerRadioSource *source);
--static void old_api_handshake_response_cb (SoupSession *session,
--                                           SoupMessage *msg,
--                                           gpointer user_data);
--static void old_api_tune (RBAudioscrobblerRadioSource *source);
--static void old_api_tune_response_cb (SoupSession *session,
--                                      SoupMessage *msg,
--                                      gpointer user_data);
--static void old_api_fetch_playlist (RBAudioscrobblerRadioSource *source);
--
- /* info bar related things */
- static void display_error_info_bar (RBAudioscrobblerRadioSource *source,
-                                     const char *message);
--static void display_password_info_bar (RBAudioscrobblerRadioSource *source);
--static void password_info_bar_response_cb (GtkInfoBar *info_bar,
--                                           int response_id,
--                                           RBAudioscrobblerRadioSource *source);
- 
- /* RBDisplayPage implementations */
- static void impl_selected (RBDisplayPage *page);
-@@ -413,8 +384,6 @@ rb_audioscrobbler_radio_source_constructed (GObject *object)
- 	RhythmDB *db;
- 	GtkWidget *main_vbox;
- 	GtkWidget *error_info_bar_content_area;
--	GtkWidget *password_info_bar_label;
--	GtkWidget *password_info_bar_content_area;
- 	GtkAccelGroup *accel_group;
- 	RBSourceToolbar *toolbar;
- 
-@@ -446,23 +415,6 @@ rb_audioscrobbler_radio_source_constructed (GObject *object)
- 	gtk_container_add (GTK_CONTAINER (error_info_bar_content_area), source->priv->error_info_bar_label);
- 	gtk_box_pack_start (GTK_BOX (main_vbox), source->priv->error_info_bar, FALSE, FALSE, 0);
- 
--	/* password info bar */
--	source->priv->password_info_bar = gtk_info_bar_new ();
--	password_info_bar_label = gtk_label_new (_("You must enter your password to listen to this station"));
--	password_info_bar_content_area = gtk_info_bar_get_content_area (GTK_INFO_BAR (source->priv->password_info_bar));
--	gtk_container_add (GTK_CONTAINER (password_info_bar_content_area), password_info_bar_label);
--	source->priv->password_info_bar_entry = gtk_entry_new ();
--	gtk_entry_set_visibility (GTK_ENTRY (source->priv->password_info_bar_entry), FALSE);
--	gtk_info_bar_add_action_widget (GTK_INFO_BAR (source->priv->password_info_bar),
--	                                source->priv->password_info_bar_entry,
--	                                GTK_RESPONSE_NONE);
--	gtk_info_bar_add_button (GTK_INFO_BAR (source->priv->password_info_bar), GTK_STOCK_OK, GTK_RESPONSE_OK);
--	g_signal_connect (source->priv->password_info_bar,
--	                  "response",
--	                  G_CALLBACK (password_info_bar_response_cb),
--	                  source);
--	gtk_box_pack_start (GTK_BOX (main_vbox), source->priv->password_info_bar, FALSE, FALSE, 0);
--
- 	/* entry view */
- 	source->priv->track_view = rb_entry_view_new (db, G_OBJECT (shell_player), FALSE, FALSE);
- 	rb_entry_view_append_column (source->priv->track_view, RB_ENTRY_VIEW_COL_TITLE, TRUE);
-@@ -541,11 +493,6 @@ rb_audioscrobbler_radio_source_finalize (GObject *object)
- 	g_free (source->priv->session_key);
- 	g_free (source->priv->station_url);
- 
--	g_free (source->priv->old_api_password);
--	g_free (source->priv->old_api_session_id);
--	g_free (source->priv->old_api_base_url);
--	g_free (source->priv->old_api_base_path);
--
- 	G_OBJECT_CLASS (rb_audioscrobbler_radio_source_parent_class)->finalize (object);
- }
- 
-@@ -691,7 +638,6 @@ tune (RBAudioscrobblerRadioSource *source)
- 
- 	source->priv->is_busy = TRUE;
- 	gtk_widget_hide (source->priv->error_info_bar);
--	gtk_widget_hide (source->priv->password_info_bar);
- 
- 	sig_arg = g_strdup_printf ("api_key%smethodradio.tunesk%sstation%s%s",
- 	                           rb_audioscrobbler_service_get_api_key (source->priv->service),
-@@ -772,44 +718,38 @@ tune_response_cb (SoupSession *session,
- 
- 			rb_debug ("tune request responded with error: %s", message);
- 
--			if (code == 4) {
--				/* Our API key only allows streaming of radio to subscribers */
--				rb_debug ("attempting to use old API to tune radio");
--				old_api_tune (source);
-+			/* show appropriate error message */
-+			char *error_message = NULL;
-+
-+			if (code == 6) {
-+				/* Invalid station url */
-+				error_message = g_strdup (_("Invalid station URL"));
-+			} else if (code == 12) {
-+				/* Subscriber only station */
-+				/* Translators: %s is the name of the audioscrobbler service, for example "Last.fm".
-+				 * This message indicates that to listen to this radio station the user needs to be
-+				 * a paying subscriber to the service. */
-+				error_message = g_strdup_printf (_("This station is only available to %s subscribers"),
-+								 rb_audioscrobbler_service_get_name (source->priv->service));
-+			} else if (code == 20) {
-+				/* Not enough content */
-+				error_message = g_strdup (_("Not enough content to play station"));
-+			} else if (code == 27) {
-+				/* Deprecated station */
-+				/* Translators: %s is the name of the audioscrobbler service, for example "Last.fm".
-+				 * This message indicates that the service has deprecated this type of station. */
-+				error_message = g_strdup_printf (_("%s no longer supports this type of station"),
-+								 rb_audioscrobbler_service_get_name (source->priv->service));
- 			} else {
--				/* show appropriate error message */
--				char *error_message = NULL;
--
--				if (code == 6) {
--					/* Invalid station url */
--					error_message = g_strdup (_("Invalid station URL"));
--				} else if (code == 12) {
--					/* Subscriber only station */
--					/* Translators: %s is the name of the audioscrobbler service, for example "Last.fm".
--					 * This message indicates that to listen to this radio station the user needs to be
--					 * a paying subscriber to the service. */
--					error_message = g_strdup_printf (_("This station is only available to %s subscribers"),
--							                 rb_audioscrobbler_service_get_name (source->priv->service));
--				} else if (code == 20) {
--					/* Not enough content */
--					error_message = g_strdup (_("Not enough content to play station"));
--				} else if (code == 27) {
--					/* Deprecated station */
--					/* Translators: %s is the name of the audioscrobbler service, for example "Last.fm".
--					 * This message indicates that the service has deprecated this type of station. */
--					error_message = g_strdup_printf (_("%s no longer supports this type of station"),
--							                 rb_audioscrobbler_service_get_name (source->priv->service));
--				} else {
--					/* Other error */
--					error_message = g_strdup_printf (_("Error tuning station: %i - %s"), code, message);
--				}
--
--				display_error_info_bar (source, error_message);
--
--				g_free (error_message);
--
--				source->priv->is_busy = FALSE;
-+				/* Other error */
-+				error_message = g_strdup_printf (_("Error tuning station: %i - %s"), code, message);
- 			}
-+
-+			display_error_info_bar (source, error_message);
-+
-+			g_free (error_message);
-+
-+			source->priv->is_busy = FALSE;
- 		} else {
- 			rb_debug ("unexpected response from tune request: %s", msg->response_body->data);
- 			display_error_info_bar(source, _("Error tuning station: unexpected response"));
-@@ -1030,229 +970,6 @@ xspf_entry_parsed (TotemPlParser *parser,
- }
- 
- static void
--old_api_shake_hands (RBAudioscrobblerRadioSource *source)
--{
--	if (source->priv->old_api_password != NULL) {
--		char *password_hash;
--		char *msg_url;
--		SoupMessage *msg;
--
--		password_hash = g_compute_checksum_for_string (G_CHECKSUM_MD5, source->priv->old_api_password, -1);
--
--		msg_url = g_strdup_printf ("%sradio/handshake.php?username=%s&passwordmd5=%s",
--			                   rb_audioscrobbler_service_get_old_radio_api_url (source->priv->service),
--			                   source->priv->username,
--			                   password_hash);
--
--		rb_debug ("sending old api handshake request: %s", msg_url);
--		msg = soup_message_new ("GET", msg_url);
--		soup_session_queue_message (source->priv->soup_session,
--			                    msg,
--			                    old_api_handshake_response_cb,
--			                    source);
--
--		g_free (password_hash);
--		g_free (msg_url);
--	} else {
--#ifdef WITH_GNOME_KEYRING
--		GnomeKeyringResult result;
--		char *password;
--
--		rb_debug ("attempting to retrieve password from keyring");
--		result = gnome_keyring_find_password_sync (GNOME_KEYRING_NETWORK_PASSWORD,
--		                                           &password,
--		                                           "user", source->priv->username,
--		                                           "server", rb_audioscrobbler_service_get_name (source->priv->service),
--		                                           NULL);
--
--		if (result == GNOME_KEYRING_RESULT_OK) {
--			source->priv->old_api_password = g_strdup (password);
--			rb_debug ("password found. shaking hands");
--			old_api_shake_hands (source);
--		} else {
--			rb_debug ("no password found");
--#endif
--			rb_debug ("cannot shake hands. asking user for password");
--			display_password_info_bar (source);
--			source->priv->is_busy = FALSE;
--#ifdef WITH_GNOME_KEYRING
--		}
--#endif
--	}
--}
--
--static void
--old_api_handshake_response_cb (SoupSession *session,
--                               SoupMessage *msg,
--                               gpointer user_data)
--{
--	RBAudioscrobblerRadioSource *source;
--
--	source = RB_AUDIOSCROBBLER_RADIO_SOURCE (user_data);
--
--	if (msg->response_body->data == NULL) {
--		g_free (source->priv->old_api_session_id);
--		source->priv->old_api_session_id = NULL;
--		rb_debug ("handshake failed: no response");
--		display_error_info_bar (source, _("Error tuning station: no response"));
--	} else {
--		char **pieces;
--		int i;
--
--		pieces = g_strsplit (msg->response_body->data, "\n", 0);
--		for (i = 0; pieces[i] != NULL; i++) {
--			gchar **values = g_strsplit (pieces[i], "=", 2);
--
--			if (values[0] == NULL) {
--				rb_debug ("unexpected response content: %s", pieces[i]);
--			} else if (strcmp (values[0], "session") == 0) {
--				if (strcmp (values[1], "FAILED") == 0) {
--					g_free (source->priv->old_api_session_id);
--					source->priv->old_api_session_id = NULL;
--
--					rb_debug ("handshake failed: probably bad authentication. asking user for new password");
--					g_free (source->priv->old_api_password);
--					source->priv->old_api_password = NULL;
--					display_password_info_bar (source);
--				} else {
--					g_free (source->priv->old_api_session_id);
--					source->priv->old_api_session_id = g_strdup (values[1]);
--					rb_debug ("session ID: %s", source->priv->old_api_session_id);
--				}
--			} else if (strcmp (values[0], "base_url") == 0) {
--				g_free (source->priv->old_api_base_url);
--				source->priv->old_api_base_url = g_strdup (values[1]);
--				rb_debug ("base url: %s", source->priv->old_api_base_url);
--			} else if (strcmp (values[0], "base_path") == 0) {
--				g_free (source->priv->old_api_base_path);
--				source->priv->old_api_base_path = g_strdup (values[1]);
--				rb_debug ("base path: %s", source->priv->old_api_base_path);
--			} else if (strcmp (values[0], "banned") == 0) {
--				if (strcmp (values[1], "0") != 0) {
--					source->priv->old_api_is_banned = TRUE;
--				} else {
--					source->priv->old_api_is_banned = FALSE;
--				}
--				rb_debug ("banned: %i", source->priv->old_api_is_banned);
--			}
--
--			g_strfreev (values);
--		}
--		g_strfreev (pieces);
--	}
--
--	/* if handshake was successful then tune */
--	if (source->priv->old_api_session_id != NULL) {
--		old_api_tune (source);
--	} else {
--		source->priv->is_busy = FALSE;
--	}
--}
--
--static void
--old_api_tune (RBAudioscrobblerRadioSource *source)
--{
--	/* get a handshake first if we don't have one */
--	if (source->priv->old_api_session_id == NULL) {
--		old_api_shake_hands (source);
--	} else {
--		char *escaped_station_url;
--		char *msg_url;
--		SoupMessage *msg;
--
--		escaped_station_url = g_uri_escape_string (source->priv->station_url, NULL, FALSE);
--
--		msg_url = g_strdup_printf("http://%s%s/adjust.php?session=%s&url=%s",
--			                  source->priv->old_api_base_url,
--			                  source->priv->old_api_base_path,
--			                  source->priv->old_api_session_id,
--			                  escaped_station_url);
--
--		rb_debug ("sending old api tune request: %s", msg_url);
--		msg = soup_message_new ("GET", msg_url);
--		soup_session_queue_message (source->priv->soup_session,
--			                    msg,
--			                    old_api_tune_response_cb,
--			                    source);
--
--		g_free (escaped_station_url);
--		g_free (msg_url);
--	}
--}
--
--static void
--old_api_tune_response_cb (SoupSession *session,
--                          SoupMessage *msg,
--                          gpointer user_data)
--{
--	RBAudioscrobblerRadioSource *source;
--
--	source = RB_AUDIOSCROBBLER_RADIO_SOURCE (user_data);
--
--	if (msg->response_body->data != NULL) {
--		char **pieces;
--		int i;
--
--		pieces = g_strsplit (msg->response_body->data, "\n", 0);
--		for (i = 0; pieces[i] != NULL; i++) {
--			gchar **values = g_strsplit (pieces[i], "=", 2);
--
--			if (values[0] == NULL) {
--				rb_debug ("unexpected response from old api tune request: %s", pieces[i]);
--			} else if (strcmp (values[0], "response") == 0) {
--				if (strcmp (values[1], "OK") == 0) {
--					rb_debug ("old api tune request was successful");
--					/* no problems tuning, get the playlist */
--					old_api_fetch_playlist (source);
--				}
--			} else if (strcmp (values[0], "error") == 0) {
--				char *error_message;
--				rb_debug ("old api tune request responded with error: %s", pieces[i]);
--
--				error_message = g_strdup_printf (_("Error tuning station: %s"), values[1]);
--
--
--				g_free (error_message);
--
--				source->priv->is_busy = FALSE;
--			}
--			/* TODO: do something with other information given here */
--
--			g_strfreev (values);
--		}
--
--		g_strfreev (pieces);
--	} else {
--		rb_debug ("no response from old api tune request");
--		display_error_info_bar (source, _("Error tuning station: no response"));
--		source->priv->is_busy = FALSE;
--	}
--}
--
--static void
--old_api_fetch_playlist (RBAudioscrobblerRadioSource *source)
--{
--	char *msg_url;
--	SoupMessage *msg;
--
--	msg_url = g_strdup_printf("http://%s%s/xspf.php?sk=%s&discovery=%i&desktop=%s",
--		                  source->priv->old_api_base_url,
--		                  source->priv->old_api_base_path,
--		                  source->priv->old_api_session_id,
--		                  0,
--		                  "1.5");
--
--	rb_debug ("sending old api playlist request: %s", msg_url);
--	msg = soup_message_new ("GET", msg_url);
--	soup_session_queue_message (source->priv->soup_session,
--		                    msg,
--		                    fetch_playlist_response_cb,
--		                    source);
--
--	g_free (msg_url);
--}
--
--static void
- display_error_info_bar (RBAudioscrobblerRadioSource *source,
-                         const char *message)
- {
-@@ -1261,46 +978,6 @@ display_error_info_bar (RBAudioscrobblerRadioSource *source,
- 	gtk_widget_show_all (source->priv->error_info_bar);
- }
- 
--static void
--display_password_info_bar (RBAudioscrobblerRadioSource *source)
--{
--	gtk_widget_show_all (source->priv->password_info_bar);
--}
--
--static void
--password_info_bar_response_cb (GtkInfoBar *info_bar,
--                               int response_id,
--                               RBAudioscrobblerRadioSource *source)
--{
--	gtk_widget_hide (source->priv->password_info_bar);
--
--	g_free (source->priv->old_api_password);
--	source->priv->old_api_password = g_strdup (gtk_entry_get_text (GTK_ENTRY (source->priv->password_info_bar_entry)));
--
--#ifdef WITH_GNOME_KEYRING
--	/* save the new password */
--	char *password_desc;
--
--	password_desc = g_strdup_printf (_("Password for streaming %s radio using the deprecated API"),
--	                                 rb_audioscrobbler_service_get_name (source->priv->service));
--
--	rb_debug ("saving password to keyring");
--	gnome_keyring_store_password_sync (GNOME_KEYRING_NETWORK_PASSWORD,
--	                                   GNOME_KEYRING_DEFAULT,
--	                                   password_desc,
--	                                   source->priv->old_api_password,
--	                                   "user", source->priv->username,
--	                                   "server", rb_audioscrobbler_service_get_name (source->priv->service),
--	                                   NULL);
--
--	g_free (password_desc);
--#endif
--
--	gtk_entry_set_text (GTK_ENTRY (source->priv->password_info_bar_entry), "");
--
--	old_api_shake_hands (source);
--}
--
- static gboolean
- impl_can_remove (RBDisplayPage *page)
- {
-diff --git a/plugins/audioscrobbler/rb-audioscrobbler-radio-source.h b/plugins/audioscrobbler/rb-audioscrobbler-radio-source.h
-index f38d857..08bb4a0 100644
---- a/plugins/audioscrobbler/rb-audioscrobbler-radio-source.h
-+++ b/plugins/audioscrobbler/rb-audioscrobbler-radio-source.h
-@@ -86,9 +86,6 @@ RBSource *rb_audioscrobbler_radio_source_new (RBAudioscrobblerProfilePage *paren
-                                               const char *station_name,
-                                               const char *station_url);
- 
--void rb_audioscrobbler_radio_source_set_old_api_password (RBAudioscrobblerRadioSource *source,
--                                                          const char *password);
--
- G_END_DECLS
- 
- #endif /* __RB_AUDIOSCROBBLER_RADIO_SOURCE_H */
-diff --git a/plugins/daap/Makefile.am b/plugins/daap/Makefile.am
-index b950bef..f4bb907 100644
---- a/plugins/daap/Makefile.am
-+++ b/plugins/daap/Makefile.am
-@@ -63,9 +63,9 @@ INCLUDES = 						\
- 	$(RHYTHMBOX_CFLAGS)				\
- 	-D_BSD_SOURCE
- 
--if USE_GNOME_KEYRING
--libdaap_la_LIBADD += $(GNOME_KEYRING_LIBS)
--INCLUDES += $(GNOME_KEYRING_CFLAGS)
-+if USE_LIBSECRET
-+libdaap_la_LIBADD += $(LIBSECRET_LIBS)
-+INCLUDES += $(LIBSECRET_CFLAGS)
- endif
- 
- gtkbuilderdir = $(plugindatadir)
-diff --git a/plugins/daap/rb-daap-source.c b/plugins/daap/rb-daap-source.c
-index fb034f9..75e0dc4 100644
---- a/plugins/daap/rb-daap-source.c
-+++ b/plugins/daap/rb-daap-source.c
-@@ -35,8 +35,8 @@
- #include <glib/gi18n.h>
- #include <gtk/gtk.h>
- 
--#ifdef WITH_GNOME_KEYRING
--#include <gnome-keyring.h>
-+#ifdef WITH_LIBSECRET
-+#include <libsecret/secret.h>
- #endif
- 
- #include "rhythmdb.h"
-@@ -394,31 +394,36 @@ mount_op_reply_cb (GMountOperation *op,
- 		   AuthData *auth_data)
- {
- 	const char *password;
--	gchar *keyring;
--#ifdef WITH_GNOME_KEYRING
--	guint32 item_id;
-+#ifdef WITH_LIBSECRET
-+	gchar *label;
-+	gchar *collection = NULL;
- #endif
- 
- 	rb_debug ("mount op reply: %d", result);
- 	password = g_mount_operation_get_password (op);
- 
--#ifdef WITH_GNOME_KEYRING
-+#ifdef WITH_LIBSECRET
- 	switch (g_mount_operation_get_password_save (op)) {
- 	case G_PASSWORD_SAVE_NEVER:
- 		break;
- 
- 	case G_PASSWORD_SAVE_FOR_SESSION:
--		keyring = "session";
-+		collection = SECRET_COLLECTION_SESSION;
- 		/* fall through */
- 
- 	case G_PASSWORD_SAVE_PERMANENTLY:
--		gnome_keyring_set_network_password_sync (keyring,
--			NULL,
--			"DAAP", auth_data->name,
--			NULL, "daap",
--			NULL, 0,
-+		label = g_strdup_printf ("Rhythmbox DAAP password for %s", auth_data->name);
-+		secret_password_store_sync (SECRET_SCHEMA_COMPAT_NETWORK,
-+			collection,
-+			label,
- 			password,
--			&item_id);
-+			NULL,
-+			NULL,
-+			"domain", "DAAP",
-+			"server", auth_data->name,
-+			"protocol", "daap",
-+			NULL);
-+		g_free (label);
- 		break;
- 
- 	default:
-@@ -443,7 +448,11 @@ mount_op_reply_cb (GMountOperation *op,
- }
- 
- static void
--ask_password (RBDAAPSource *source, const char *name, const char *keyring, SoupSession *session, SoupMessage *msg, SoupAuth *auth)
-+ask_password (RBDAAPSource *source,
-+	      const char *name,
-+	      SoupSession *session,
-+	      SoupMessage *msg,
-+	      SoupAuth *auth)
- {
- 	GtkWindow *parent;
- 	GMountOperation *mount_op;
-@@ -465,10 +474,8 @@ ask_password (RBDAAPSource *source, const char *name, const char *keyring, SoupS
- 	g_signal_connect (mount_op, "reply", G_CALLBACK (mount_op_reply_cb), auth_data);
- 
- 	flags = G_ASK_PASSWORD_NEED_PASSWORD;
--#ifdef WITH_GNOME_KEYRING
--	if (gnome_keyring_is_available ()) {
--		flags |= G_ASK_PASSWORD_SAVING_SUPPORTED;
--	}
-+#ifdef WITH_LIBSECRET
-+	flags |= G_ASK_PASSWORD_SAVING_SUPPORTED;
- #endif
- 	message = g_strdup_printf (_("The music share '%s' requires a password to connect"), name);
- 	g_signal_emit_by_name (mount_op, "ask-password", message, NULL, "DAAP", flags);
-@@ -485,44 +492,31 @@ connection_auth_cb (DMAPConnection *connection,
- 		    RBDAAPSource   *source)
- {
- 	gchar *password = NULL;
--#ifdef WITH_GNOME_KEYRING
--	GnomeKeyringResult keyringret;
--	gchar *keyring;
--	GList *list = NULL;
-+#ifdef WITH_LIBSECRET
-+	GError *error = NULL;
- 
--	keyring = NULL;
- 	if (!source->priv->tried_password) {
--		gnome_keyring_get_default_keyring_sync (&keyring);
--		keyringret = gnome_keyring_find_network_password_sync (
--				NULL,
--				"DAAP", name,
--				NULL, "daap",
--				NULL, 0, &list);
--	} else {
--		keyringret = GNOME_KEYRING_RESULT_CANCELLED;
-+		password = secret_password_lookup_sync (SECRET_SCHEMA_COMPAT_NETWORK,
-+				NULL, &error,
-+				"domain", "DAAP",
-+				"server", name,
-+				"protocol", "daap",
-+				NULL);
- 	}
- 
--	if (keyringret == GNOME_KEYRING_RESULT_OK) {
--		GnomeKeyringNetworkPasswordData *pwd_data;
--
--		if (list != NULL) {
--			pwd_data = (GnomeKeyringNetworkPasswordData*)list->data;
--			password = g_strdup (pwd_data->password);
--		}
-+	if (!error)
- 		source->priv->tried_password = TRUE;
--	}
-+	else
-+		g_error_free (error);
- 
- 	if (password == NULL) {
--		ask_password (source, name, keyring, session, msg, auth);
-+		ask_password (source, name, session, msg, auth);
- 	} else {
- 		dmap_connection_authenticate_message (connection, session, msg, auth, password);
- 	}
- 
--	if (list)
--		gnome_keyring_network_password_list_free (list);
--	g_free (keyring);
- #else
--	ask_password (source, name, NULL, session, msg, auth);
-+	ask_password (source, name, session, msg, auth);
- #endif
- }
- 
-diff --git a/plugins/magnatune/MagnatuneAccount.py b/plugins/magnatune/MagnatuneAccount.py
-index f8cf81b..93b04c9 100644
---- a/plugins/magnatune/MagnatuneAccount.py
-+++ b/plugins/magnatune/MagnatuneAccount.py
-@@ -1,4 +1,5 @@
- # -*- Mode: python; coding: utf-8; tab-width: 8; indent-tabs-mode: t; -*-
-+# vim: set sts=0 ts=8 sw=8 tw=0 noet :
- #
- # Copyright (C) 2012 Jonathan Matthew  <jonathan@d14n.org>
- #
-@@ -24,10 +25,25 @@
- # along with this program; if not, write to the Free Software
- # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA.
- 
--from gi.repository import Gio, GnomeKeyring
-+from gi.repository import Gio
-+
-+# Till libsecret completely replaces gnome-keyring, we'll fall back to not
-+# saving the password if libsecret can't be found. This code can be removed later.
-+try:
-+	from gi.repository import Secret, SecretUnstable
-+	# We need to be able to fetch passwords stored by libgnome-keyring, so we use
-+	# a schema with SECRET_SCHEMA_DONT_MATCH_NAME set.
-+	# See: http://developer.gnome.org/libsecret/unstable/migrating-schemas.html
-+	MAGNATUNE_SCHEMA = Secret.Schema.new("org.gnome.rhythmbox.plugins.magnatune",
-+						Secret.SchemaFlags.DONT_MATCH_NAME,
-+						{"rhythmbox-plugin": Secret.SchemaAttributeType.STRING})
-+except ImportError:
-+	Secret = None
-+	print ("You need to install libsecret and its introspection files to store your Magnatune password")
- 
- __instance = None
- 
-+
- def instance():
- 	global __instance
- 	if __instance is None:
-@@ -36,54 +52,48 @@ def instance():
- 
- class MagnatuneAccount(object):
- 	def __init__(self):
--		self.keyring_item = None
- 		self.settings = Gio.Settings("org.gnome.rhythmbox.plugins.magnatune")
--
--		self.keyring_attributes = GnomeKeyring.attribute_list_new()
--		GnomeKeyring.attribute_list_append_string(self.keyring_attributes,
--							  "rhythmbox-plugin",
--							  "magnatune")
--		(result, items) = GnomeKeyring.find_items_sync(GnomeKeyring.ItemType.GENERIC_SECRET,
--							       self.keyring_attributes)
--		if result == GnomeKeyring.Result.OK and len(items) != 0:
--			(result, item) = GnomeKeyring.item_get_info_sync(None, items[0].item_id)
--			if result == GnomeKeyring.Result.OK:
--				self.keyring_item = item
--			else:
--				print "Couldn't get keyring item: " + GnomeKeyring.result_to_message(result)
--		else:
--			print "couldn't search keyring items: " + GnomeKeyring.result_to_message(result)
-+		self.secret = None
-+		self.keyring_attributes = {"rhythmbox-plugin": "magnatune"}
-+		if Secret is None:
-+			print ("Account details will not be saved because libsecret was not found")
-+			return
-+                # Haha.
-+                self.secret_service = SecretUnstable.Service.get_sync(SecretUnstable.ServiceFlags.OPEN_SESSION, None)
-+		items = self.secret_service.search_sync(MAGNATUNE_SCHEMA,
-+							self.keyring_attributes,
-+							SecretUnstable.SearchFlags.LOAD_SECRETS,
-+							None)
-+		if not items:
-+			# The Python API doesn't seem to have a way to differentiate between errors and no results.
-+			print ("Couldn't find an existing keyring entry")
-+			return
-+		self.secret = items[0].get_secret().get()
- 
- 	def get(self):
--		if self.keyring_item is None:
-+		if self.secret is None:
- 			return ('none', None, None)
- 
- 		account_type = self.settings['account-type']
- 		try:
--			(username, password) = self.keyring_item.get_secret().split("\n")
-+			(username, password) = self.secret.split("\n")
- 			return (account_type, username, password)
- 		except ValueError:
- 			return ('none', None, None)
- 
- 	def update(self, username, password):
- 		secret = '\n'.join((username, password))
--		if self.keyring_item is not None:
--			if secret == self.keyring_item.get_secret():
--				print "account details not changed"
--				return
--
--		(result, id) = GnomeKeyring.item_create_sync(None,
--							     GnomeKeyring.ItemType.GENERIC_SECRET,
--							     "Rhythmbox: Magnatune account information",
--							     self.keyring_attributes,
--							     secret,
--							     True)
--		if result == GnomeKeyring.Result.OK:
--			if self.keyring_item is None:
--				(result, item) = GnomeKeyring.item_get_info_sync(None, id)
--				if result == GnomeKeyring.Result.OK:
--					self.keyring_item = item
--				else:
--					print "couldn't fetch keyring itme: " + GnomeKeyring.result_to_message(result)
--		else:
--			print "couldn't create keyring item: " + GnomeKeyring.result_to_message(result)
-+		if secret == self.secret:
-+			print ("Account details not changed")
-+			return
-+		self.secret = secret
-+		if Secret is None:
-+			print ("Account details were not saved because libsecret was not found")
-+			return
-+		result = Secret.password_store_sync(MAGNATUNE_SCHEMA,
-+							self.keyring_attributes,
-+							Secret.COLLECTION_DEFAULT,
-+							"Rhythmbox: Magnatune account information",
-+							secret, None)
-+		if not result:
-+			print ("Couldn't create keyring item!")
--- 
-1.7.12.4
-

diff --git a/media-sound/rhythmbox/rhythmbox-9999.ebuild b/media-sound/rhythmbox/rhythmbox-9999.ebuild
index c7fc2d4..629e7fe 100644
--- a/media-sound/rhythmbox/rhythmbox-9999.ebuild
+++ b/media-sound/rhythmbox/rhythmbox-9999.ebuild
@@ -34,7 +34,7 @@ REQUIRED_USE="
 
 # FIXME: double check what to do with fm-radio plugin
 # webkit-gtk-1.10 is needed because it uses gstreamer-1.0
-COMMON_DEPEND=">=dev-libs/glib-2.32.0:2
+COMMON_DEPEND=">=dev-libs/glib-2.34.0:2
 	dev-libs/json-glib
 	>=dev-libs/libxml2-2.7.8:2
 	>=x11-libs/gtk+-3.6:3[introspection]
@@ -57,7 +57,6 @@ COMMON_DEPEND=">=dev-libs/glib-2.32.0:2
 	cdr? ( >=app-cdr/brasero-2.91.90 )
 	daap? (
 		>=net-libs/libdmapsharing-2.9.16:3.0
-		>=net-dns/avahi-0.6
 		media-plugins/gst-plugins-soup:1.0 )
 	keyring? ( >=app-crypt/libsecret-0.14 )
 	html? ( >=net-libs/webkit-gtk-1.10:3 )
@@ -130,7 +129,7 @@ pkg_setup() {
 		$(use_enable python)
 		$(use_enable upnp-av grilo)
 		$(use_with cdr brasero)
-		$(use_with daap mdns avahi)
+		$(use_with daap)
 		$(use_with keyring libsecret)
 		$(use_with html webkit)
 		$(use_with ipod)
@@ -142,8 +141,6 @@ pkg_setup() {
 
 src_prepare() {
 	gnome2_src_prepare
-	# https://bugzilla.gnome.org/show_bug.cgi?id=694981
-	epatch "${FILESDIR}/${PN}-port-to-libsecret.patch"
 	echo > py-compile
 }
 


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-04-20 16:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-14  6:36 [gentoo-commits] proj/gnome:master commit in: media-sound/rhythmbox/, media-sound/rhythmbox/files/ Nirbheek Chauhan
  -- strict thread matches above, loose matches on Subject: below --
2013-04-20 16:49 Priit Laes
2013-03-05  1:33 Nirbheek Chauhan
2013-03-02  8:52 Nirbheek Chauhan
2011-05-20 19:07 Priit Laes
2011-03-17 19:44 Priit Laes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox