Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package grilo-plugins for openSUSE:Factory checked in at 2022-09-21 14:39:55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/grilo-plugins (Old) and /work/SRC/openSUSE:Factory/.grilo-plugins.new.2083 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "grilo-plugins" Wed Sep 21 14:39:55 2022 rev:57 rq:1003711 version:0.3.15 Changes: -------- --- /work/SRC/openSUSE:Factory/grilo-plugins/grilo-plugins.changes 2022-09-01 22:10:29.200131856 +0200 +++ /work/SRC/openSUSE:Factory/.grilo-plugins.new.2083/grilo-plugins.changes 2022-09-21 14:40:16.937397171 +0200 @@ -1,0 +2,7 @@ +Tue Sep 13 11:39:30 UTC 2022 - Bj??rn Lie <bjorn....@gmail.com> + +- Add d1c0835d.patch: flickr: remove GOA support. GNOME Online + accounts removed flicker backend so we need to remove it here + too. + +------------------------------------------------------------------- New: ---- d1c0835d.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ grilo-plugins.spec ++++++ --- /var/tmp/diff_new_pack.PCFwdP/_old 2022-09-21 14:40:17.453398602 +0200 +++ /var/tmp/diff_new_pack.PCFwdP/_new 2022-09-21 14:40:17.457398613 +0200 @@ -25,6 +25,9 @@ Group: Productivity/Multimedia/Other URL: https://live.gnome.org/Grilo Source0: https://download.gnome.org/sources/grilo-plugins/0.3/%{name}-%{version}.tar.xz +# PATCH-FIX-UPSTREAM d1c0835d.patch -- flickr: remove GOA support +Patch0: https://gitlab.gnome.org/GNOME/grilo-plugins/-/commit/d1c0835d.patch + BuildRequires: docbook_4 BuildRequires: fdupes BuildRequires: gperf ++++++ d1c0835d.patch ++++++ >From d1c0835da8f1e3968b1047e262ed4ae51e4e118d Mon Sep 17 00:00:00 2001 From: Victor Toso <victort...@gnome.org> Date: Sat, 27 Aug 2022 09:33:43 +0200 Subject: [PATCH] flickr: remove GOA support GNOME Online accounts removed flicker backend so we need to remove it here too. https://gitlab.gnome.org/GNOME/gnome-online-accounts/-/merge_requests/86 This basically reverts 2b973109 "flickr: use GOA to get user's accounts" --- meson.build | 2 +- src/flickr/grl-flickr.c | 202 ---------------------------------------- 2 files changed, 1 insertion(+), 203 deletions(-) diff --git a/meson.build b/meson.build index 62c8f837..dce2069a 100644 --- a/meson.build +++ b/meson.build @@ -128,7 +128,7 @@ plugins = [ # NAME, REQ_DEPS, OPT_DEPS ['dleyna', [gio_dep, gio_unix_dep], []], ['dmap', [libdmapsharing_dep, libxml_dep], []], ['filesystem', [grilo_pls_dep], []], - ['flickr', [grilo_net_dep, libxml_dep, oauth_dep], [goa_dep]], + ['flickr', [grilo_net_dep, libxml_dep, oauth_dep], []], ['freebox', [grilo_pls_dep, avahi_client_dep, avahi_glib_dep, avahi_gobject_dep], []], ['gravatar', [], []], ['local-metadata', [gio_dep, libmediaart_dep], []], diff --git a/src/flickr/grl-flickr.c b/src/flickr/grl-flickr.c index a0b86994..d49026e7 100644 --- a/src/flickr/grl-flickr.c +++ b/src/flickr/grl-flickr.c @@ -35,11 +35,6 @@ #include <errno.h> #include <math.h> -#ifdef GOA_ENABLED -#define GOA_API_IS_SUBJECT_TO_CHANGE -#include <goa/goa.h> -#endif - #include "grl-flickr.h" #include "gflickr.h" @@ -81,17 +76,6 @@ struct _GrlFlickrSourcePrivate { gchar *user_id; }; -#ifdef GOA_ENABLED -/* - * data passed when creating personal source - * when is GOA enabled, we need even goa_account_id, not only plugin - */ -struct token_cb_data { - GrlPlugin *plugin; - gchar *goa_account_id; -}; -#endif /* GOA_ENABLED */ - static void token_info_cb (GFlickr *f, GHashTable *info, @@ -100,20 +84,11 @@ static void token_info_cb (GFlickr *f, static GrlFlickrSource *grl_flickr_source_public_new (const gchar *flickr_api_key, const gchar *flickr_secret); -#ifdef GOA_ENABLED -static void grl_flickr_source_personal_new (GrlPlugin *plugin, - const gchar *flickr_api_key, - const gchar *flickr_secret, - const gchar *flickr_token, - const gchar *token_secret, - gchar *goa_account_id); -#else static void grl_flickr_source_personal_new (GrlPlugin *plugin, const gchar *flickr_api_key, const gchar *flickr_secret, const gchar *flickr_token, const gchar *token_secret); -#endif /* GOA_ENABLED */ static void grl_flickr_source_finalize (GObject *object); @@ -133,10 +108,6 @@ static void grl_flickr_source_resolve (GrlSource *source, static void grl_flickr_source_search (GrlSource *source, GrlSourceSearchSpec *ss); -#ifdef GOA_ENABLED -static GList *grl_flickr_get_goa_multiple_config (GrlPlugin *plugin, gboolean public); -#endif - /* =================== Flickr Plugin =============== */ gboolean @@ -155,12 +126,6 @@ grl_flickr_plugin_init (GrlRegistry *registry, GRL_LOG_DOMAIN_INIT (flickr_log_domain, "flickr"); -#ifdef GOA_ENABLED - GRL_DEBUG ("GOA enabled"); - gboolean create_public_from_goa = FALSE; - gchar *goa_account_id = NULL; -#endif - GRL_DEBUG ("flickr_plugin_init"); /* Initialize i18n */ @@ -168,30 +133,10 @@ grl_flickr_plugin_init (GrlRegistry *registry, bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); if (configs == NULL) { -#ifdef GOA_ENABLED - GRL_DEBUG ("No user config passed."); - create_public_from_goa = TRUE; -#else GRL_INFO ("Configuration not provided! Plugin not loaded"); return FALSE; -#endif /* GOA_ENABLED */ } -#ifdef GOA_ENABLED - /* When is GOA enabled, add all configs from GOA too */ - GList *goa_config = grl_flickr_get_goa_multiple_config (plugin, - create_public_from_goa); - - if (goa_config == NULL) - { - GRL_INFO ("Cannot get flickr sources from GOA."); - } - else - { - configs = g_list_concat (configs, goa_config); - } -#endif /* GOA_ENABLED */ - while (configs) { config = GRL_CONFIG (configs->data); @@ -204,22 +149,11 @@ grl_flickr_plugin_init (GrlRegistry *registry, GRL_INFO ("Required API key or secret configuration not provdied. " " Plugin not loaded"); } else if (flickr_token && flickr_token_secret) { -#ifdef GOA_ENABLED - goa_account_id = grl_config_get_string (config, "goa-account-id"); - - grl_flickr_source_personal_new (plugin, - flickr_key, - flickr_secret, - flickr_token, - flickr_token_secret, - goa_account_id); -#else grl_flickr_source_personal_new (plugin, flickr_key, flickr_secret, flickr_token, flickr_token_secret); -#endif /* GOA_ENABLED */ } else if (public_source_created) { GRL_WARNING ("Only one public source can be created"); } else { @@ -285,22 +219,12 @@ grl_flickr_source_public_new (const gchar *flickr_api_key, return source; } -#ifdef GOA_ENABLED -static void -grl_flickr_source_personal_new (GrlPlugin *plugin, - const gchar *flickr_api_key, - const gchar *flickr_secret, - const gchar *flickr_token, - const gchar *flickr_token_secret, - gchar *goa_account_id) -#else static void grl_flickr_source_personal_new (GrlPlugin *plugin, const gchar *flickr_api_key, const gchar *flickr_secret, const gchar *flickr_token, const gchar *flickr_token_secret) -#endif /* GOA_ENABLED */ { GFlickr *f; @@ -309,19 +233,8 @@ grl_flickr_source_personal_new (GrlPlugin *plugin, f = g_flickr_new (flickr_api_key, flickr_secret, flickr_token, flickr_token_secret); -#ifdef GOA_ENABLED - struct token_cb_data *data; - - data = g_slice_new (struct token_cb_data); - data->plugin = plugin; - data->goa_account_id = goa_account_id; - - g_flickr_auth_checkToken (f, flickr_token, token_info_cb, - (gpointer) data); -#else g_flickr_auth_checkToken (f, flickr_token, token_info_cb, (gpointer) plugin); -#endif /* GOA_ENABLED */ } static void @@ -375,13 +288,7 @@ token_info_cb (GFlickr *f, gchar *source_name; gchar *username; -#ifdef GOA_ENABLED - struct token_cb_data *data = (struct token_cb_data *) user_data; - GrlPlugin *plugin = data->plugin; -#else GrlPlugin *plugin = (GrlPlugin *) user_data; -#endif - if (!info) { GRL_WARNING ("Wrong token!"); @@ -395,21 +302,7 @@ token_info_cb (GFlickr *f, fullname = g_hash_table_lookup (info, "user_fullname"); /* Set source id */ -#ifdef GOA_ENABLED - if (data->goa_account_id != NULL) - { - source_id = g_strdup_printf (PERSONAL_SOURCE_ID, data->goa_account_id); - - g_free (data->goa_account_id); - g_slice_free (struct token_cb_data, data); - } - else - { - source_id = g_strdup_printf (PERSONAL_SOURCE_ID, username); - } -#else source_id = g_strdup_printf (PERSONAL_SOURCE_ID, username); -#endif /* GOA_ENABLED */ source_name = g_strdup_printf (PERSONAL_SOURCE_NAME, fullname); source_desc = g_strdup_printf (PERSONAL_SOURCE_DESC, fullname); @@ -844,101 +737,6 @@ gettags_cb (GFlickr *f, GList *taglist, gpointer user_data) } } -#ifdef GOA_ENABLED -static GList * -grl_flickr_get_goa_multiple_config (GrlPlugin *plugin, gboolean public) -{ - GList *tmp; - GList *list = NULL; - GError *error = NULL; - GrlConfig *conf = NULL; - GList *configs = NULL; - - gchar *access_token; - gchar *token_secret; - - gboolean public_created = FALSE; - - GoaAccount *acc = NULL; - GoaOAuthBased *oauth = NULL; - GoaClient *cl = goa_client_new_sync (NULL, &error); - - if (error != NULL) - { - GRL_ERROR ("%s\n", error->message); - return NULL; - } - - list = goa_client_get_accounts (cl); - tmp = g_list_first (list); - - /* find flickr one's and get tokens */ - while (tmp != NULL) - { - acc = goa_object_peek_account (tmp->data); - - if (strcmp (goa_account_get_provider_type (acc), "flickr") == 0) - { - oauth = goa_object_peek_oauth_based (tmp->data); - - if (oauth != NULL) - { - conf = grl_config_new (grl_plugin_get_id (plugin), - NULL); - - /* Consumer data */ - grl_config_set_api_key (conf, - goa_oauth_based_get_consumer_key (oauth)); - grl_config_set_api_secret (conf, - goa_oauth_based_get_consumer_secret (oauth)); - - /* enable recognize that this config is from goa */ - grl_config_set_string (conf, "goa-account-id", - goa_account_get_id (acc)); - - /* if public == TRUE, create one public source */ - if (public == TRUE && public_created == FALSE) - { - configs = g_list_append (configs, conf); - public_created = TRUE; - - continue; /* Use this personal source again, but this time with tokens */ - } - - /* Get Access Token */ - if (! goa_oauth_based_call_get_access_token_sync (oauth, - &access_token, - &token_secret, - NULL, NULL, - &error)) - { - - /* No access token doesn't mean error */ - GRL_INFO ("Access token: %s\n", error->message); - g_error_free (error); - } - else - { - grl_config_set_api_token (conf, access_token); - grl_config_set_api_token_secret (conf, token_secret); - - g_clear_pointer (&access_token, g_free); - g_clear_pointer (&token_secret, g_free); - } - - configs = g_list_append (configs, conf); - } - } - tmp = g_list_next (tmp); - } - - g_object_unref (cl); - g_list_free_full (list, g_object_unref); - - return configs; -} -#endif /* FLICKR_GOA_ENABLED */ - /* ================== API Implementation ================ */ static const GList * -- GitLab