diff options
| author | Markus Volk <f_l_k@t-online.de> | 2022-11-07 20:48:50 +0100 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2022-11-09 10:17:15 -0800 |
| commit | 58c538fda7d1b1c337d158affe2ac91b82fe97e6 (patch) | |
| tree | 67542680a9cccd30dedfa7071024d68cd8a71b62 | |
| parent | dd6072afc286c6ac85bef91a96a7f8b2aafc458a (diff) | |
| download | meta-openembedded-58c538fda7d1b1c337d158affe2ac91b82fe97e6.tar.gz | |
gnome-online-accounts: update 3.44.0 -> 3.46.0
Signed-off-by: Khem Raj <raj.khem@gmail.com>
3 files changed, 31 insertions, 194 deletions
diff --git a/meta-gnome/recipes-gnome/gnome-online-accounts/files/0001-Update-to-rest-1.0.patch b/meta-gnome/recipes-gnome/gnome-online-accounts/files/0001-Update-to-rest-1.0.patch deleted file mode 100644 index 4a47fb2dbe..0000000000 --- a/meta-gnome/recipes-gnome/gnome-online-accounts/files/0001-Update-to-rest-1.0.patch +++ /dev/null | |||
| @@ -1,160 +0,0 @@ | |||
| 1 | From 3c4a6eda580c6e38aeedb63d73ae7b96cc7f9a07 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Carlos Garcia Campos <cgarcia@igalia.com> | ||
| 3 | Date: Mon, 7 Jun 2021 16:31:18 +0200 | ||
| 4 | Subject: [PATCH] Update to rest 1.0 | ||
| 5 | |||
| 6 | Updates to use the rest 1.0 API | ||
| 7 | |||
| 8 | Upstream-Status: Inappropriate [rest 1.0 is not released yet] | ||
| 9 | |||
| 10 | Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> | ||
| 11 | --- | ||
| 12 | configure.ac | 2 +- | ||
| 13 | src/goabackend/goalastfmprovider.c | 26 +++++++++++++------------- | ||
| 14 | src/goabackend/goaoauthprovider.c | 17 +++++++++++------ | ||
| 15 | src/goabackend/goarestproxy.h | 2 -- | ||
| 16 | 4 files changed, 25 insertions(+), 22 deletions(-) | ||
| 17 | |||
| 18 | diff --git a/configure.ac b/configure.ac | ||
| 19 | index 1f88bbd..e43303d 100644 | ||
| 20 | --- a/configure.ac | ||
| 21 | +++ b/configure.ac | ||
| 22 | @@ -129,7 +129,7 @@ if test "$enable_backend" != "no"; then | ||
| 23 | AC_SUBST(JSON_GLIB_CFLAGS) | ||
| 24 | AC_SUBST(JSON_GLIB_LIBS) | ||
| 25 | |||
| 26 | - PKG_CHECK_MODULES(REST, [rest-0.7]) | ||
| 27 | + PKG_CHECK_MODULES(REST, [rest-1.0]) | ||
| 28 | AC_SUBST(REST_CFLAGS) | ||
| 29 | AC_SUBST(REST_LIBS) | ||
| 30 | |||
| 31 | diff --git a/src/goabackend/goalastfmprovider.c b/src/goabackend/goalastfmprovider.c | ||
| 32 | index cb9a6f2..a2db037 100644 | ||
| 33 | --- a/src/goabackend/goalastfmprovider.c | ||
| 34 | +++ b/src/goabackend/goalastfmprovider.c | ||
| 35 | @@ -483,18 +483,18 @@ add_account_cb (GoaManager *manager, GAsyncResult *res, gpointer user_data) | ||
| 36 | |||
| 37 | static void | ||
| 38 | check_cb (RestProxyCall *call, | ||
| 39 | - const GError *error, | ||
| 40 | - GObject *weak_object, | ||
| 41 | + GAsyncResult *result, | ||
| 42 | gpointer user_data) | ||
| 43 | { | ||
| 44 | AddAccountData *data = user_data; | ||
| 45 | JsonNode *session; | ||
| 46 | - JsonParser *parser; | ||
| 47 | + JsonParser *parser = NULL; | ||
| 48 | JsonObject *json_obj; | ||
| 49 | JsonObject *session_obj; | ||
| 50 | const gchar *payload; | ||
| 51 | |||
| 52 | - parser = NULL; | ||
| 53 | + if (!rest_proxy_call_invoke_finish (call, result, &data->error)) | ||
| 54 | + goto out; | ||
| 55 | |||
| 56 | parser = json_parser_new (); | ||
| 57 | payload = rest_proxy_call_get_payload (call); | ||
| 58 | @@ -562,12 +562,12 @@ on_rest_proxy_call_cancelled_cb (GCancellable *cancellable, RestProxyCall *call) | ||
| 59 | } | ||
| 60 | |||
| 61 | static void | ||
| 62 | -lastfm_login (GoaProvider *provider, | ||
| 63 | - const gchar *username, | ||
| 64 | - const gchar *password, | ||
| 65 | - GCancellable *cancellable, | ||
| 66 | - RestProxyCallAsyncCallback callback, | ||
| 67 | - gpointer user_data) | ||
| 68 | +lastfm_login (GoaProvider *provider, | ||
| 69 | + const gchar *username, | ||
| 70 | + const gchar *password, | ||
| 71 | + GCancellable *cancellable, | ||
| 72 | + GAsyncReadyCallback callback, | ||
| 73 | + gpointer user_data) | ||
| 74 | { | ||
| 75 | AddAccountData *data = user_data; | ||
| 76 | RestProxyCall *call; | ||
| 77 | @@ -598,7 +598,7 @@ lastfm_login (GoaProvider *provider, | ||
| 78 | rest_proxy_call_add_param (call, "api_sig", sig_md5); | ||
| 79 | rest_proxy_call_add_param (call, "format", "json"); | ||
| 80 | |||
| 81 | - rest_proxy_call_async (call, callback, NULL, data, &data->error); | ||
| 82 | + rest_proxy_call_invoke_async (call, NULL, callback, data); | ||
| 83 | |||
| 84 | g_signal_connect (cancellable, "cancelled", G_CALLBACK (on_rest_proxy_call_cancelled_cb), call); | ||
| 85 | |||
| 86 | @@ -665,7 +665,7 @@ add_account (GoaProvider *provider, | ||
| 87 | username, | ||
| 88 | password, | ||
| 89 | data.cancellable, | ||
| 90 | - (RestProxyCallAsyncCallback) check_cb, | ||
| 91 | + (GAsyncReadyCallback) check_cb, | ||
| 92 | &data); | ||
| 93 | |||
| 94 | gtk_widget_set_sensitive (data.connect_button, FALSE); | ||
| 95 | @@ -819,7 +819,7 @@ refresh_account (GoaProvider *provider, | ||
| 96 | username, | ||
| 97 | password, | ||
| 98 | data.cancellable, | ||
| 99 | - (RestProxyCallAsyncCallback) check_cb, | ||
| 100 | + (GAsyncReadyCallback) check_cb, | ||
| 101 | &data); | ||
| 102 | gtk_widget_set_sensitive (data.connect_button, FALSE); | ||
| 103 | gtk_widget_show (data.progress_grid); | ||
| 104 | diff --git a/src/goabackend/goaoauthprovider.c b/src/goabackend/goaoauthprovider.c | ||
| 105 | index 0bfab6b..6a69251 100644 | ||
| 106 | --- a/src/goabackend/goaoauthprovider.c | ||
| 107 | +++ b/src/goabackend/goaoauthprovider.c | ||
| 108 | @@ -699,9 +699,15 @@ on_web_view_decide_policy (WebKitWebView *web_view, | ||
| 109 | } | ||
| 110 | |||
| 111 | static void | ||
| 112 | -rest_proxy_call_cb (RestProxyCall *call, const GError *error, GObject *weak_object, gpointer user_data) | ||
| 113 | +rest_proxy_call_cb (GObject *source, GAsyncResult *result, gpointer user_data) | ||
| 114 | { | ||
| 115 | + RestProxyCall *call = REST_PROXY_CALL (source); | ||
| 116 | IdentifyData *data = user_data; | ||
| 117 | + | ||
| 118 | + if (!rest_proxy_call_invoke_finish (call, result, &data->error)) | ||
| 119 | + { | ||
| 120 | + g_prefix_error (&data->error, _("Error getting a Request Token: ")); | ||
| 121 | + } | ||
| 122 | g_main_loop_quit (data->loop); | ||
| 123 | } | ||
| 124 | |||
| 125 | @@ -768,11 +774,7 @@ get_tokens_and_identity (GoaOAuthProvider *provider, | ||
| 126 | for (n = 0; request_params[n] != NULL; n += 2) | ||
| 127 | rest_proxy_call_add_param (call, request_params[n], request_params[n+1]); | ||
| 128 | } | ||
| 129 | - if (!rest_proxy_call_async (call, rest_proxy_call_cb, NULL, &data, &data.error)) | ||
| 130 | - { | ||
| 131 | - g_prefix_error (&data.error, _("Error getting a Request Token: ")); | ||
| 132 | - goto out; | ||
| 133 | - } | ||
| 134 | + rest_proxy_call_invoke_async (call, NULL, rest_proxy_call_cb, &data); | ||
| 135 | |||
| 136 | goa_utils_set_dialog_title (GOA_PROVIDER (provider), dialog, add_account); | ||
| 137 | |||
| 138 | @@ -794,6 +796,9 @@ get_tokens_and_identity (GoaOAuthProvider *provider, | ||
| 139 | g_main_loop_run (data.loop); | ||
| 140 | gtk_container_remove (GTK_CONTAINER (grid), spinner); | ||
| 141 | |||
| 142 | + if (data.error) | ||
| 143 | + goto out; | ||
| 144 | + | ||
| 145 | if (rest_proxy_call_get_status_code (call) != 200) | ||
| 146 | { | ||
| 147 | gchar *msg; | ||
| 148 | diff --git a/src/goabackend/goarestproxy.h b/src/goabackend/goarestproxy.h | ||
| 149 | index 09fb076..4948cb7 100644 | ||
| 150 | --- a/src/goabackend/goarestproxy.h | ||
| 151 | +++ b/src/goabackend/goarestproxy.h | ||
| 152 | @@ -27,8 +27,6 @@ | ||
| 153 | |||
| 154 | G_BEGIN_DECLS | ||
| 155 | |||
| 156 | -G_DEFINE_AUTOPTR_CLEANUP_FUNC (RestProxy, g_object_unref); | ||
| 157 | - | ||
| 158 | #define GOA_TYPE_REST_PROXY (goa_rest_proxy_get_type ()) | ||
| 159 | G_DECLARE_FINAL_TYPE (GoaRestProxy, goa_rest_proxy, GOA, REST_PROXY, RestProxy); | ||
| 160 | |||
diff --git a/meta-gnome/recipes-gnome/gnome-online-accounts/gnome-online-accounts_3.44.0.bb b/meta-gnome/recipes-gnome/gnome-online-accounts/gnome-online-accounts_3.44.0.bb deleted file mode 100644 index 451670e64f..0000000000 --- a/meta-gnome/recipes-gnome/gnome-online-accounts/gnome-online-accounts_3.44.0.bb +++ /dev/null | |||
| @@ -1,34 +0,0 @@ | |||
| 1 | SUMMARY = "GNOME Online Accounts - Single sign-on framework for GNOME" | ||
| 2 | LICENSE = "LGPL-2.0-or-later" | ||
| 3 | LIC_FILES_CHKSUM = "file://COPYING;md5=34c88b124db5fb2762c1676be7dadd36" | ||
| 4 | |||
| 5 | GNOMEBASEBUILDCLASS = "autotools" | ||
| 6 | |||
| 7 | inherit gnomebase gsettings gobject-introspection gsettings gtk-doc vala gettext features_check | ||
| 8 | |||
| 9 | ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" | ||
| 10 | |||
| 11 | DEPENDS = "glib-2.0" | ||
| 12 | |||
| 13 | SRC_URI += "file://0001-Update-to-rest-1.0.patch" | ||
| 14 | SRC_URI[archive.sha256sum] = "381d5d4106f435b6f87786aa049be784774e15996adcc02789807afc87ea7342" | ||
| 15 | |||
| 16 | # backend is required for gnome-control-center | ||
| 17 | PACKAGECONFIG = "backend other" | ||
| 18 | |||
| 19 | PACKAGECONFIG[backend] = "--enable-backend,--disable-backend,gtk+3 webkitgtk libsoup-2.4 json-glib libsecret rest libxml2" | ||
| 20 | PACKAGECONFIG[krb5] = "--enable-kerberos, --disable-kerberos , krb5 gcr" | ||
| 21 | |||
| 22 | # no extra dependencies! | ||
| 23 | PACKAGECONFIG[other] = " \ | ||
| 24 | --enable-facebook --enable-foursquare --enable-exchange --enable-flickr --enable-google --enable-imap-smtp --enable-owncloud --enable-windows-live,\ | ||
| 25 | --disable-facebook --disable-foursquare --disable-exchange --disable-flickr --disable-google --disable-imap-smtp --disable-owncloud --disable-windows-live, \ | ||
| 26 | " | ||
| 27 | |||
| 28 | FILES:${PN} += " \ | ||
| 29 | ${datadir}/dbus-1 \ | ||
| 30 | ${libdir}/goa-1.0/web-extensions/*.so \ | ||
| 31 | " | ||
| 32 | |||
| 33 | # looked into pkg-config file: it is not a bug - they mean it | ||
| 34 | FILES:${PN}-dev += "${libdir}/goa-1.0/include" | ||
diff --git a/meta-gnome/recipes-gnome/gnome-online-accounts/gnome-online-accounts_3.46.0.bb b/meta-gnome/recipes-gnome/gnome-online-accounts/gnome-online-accounts_3.46.0.bb new file mode 100644 index 0000000000..0603a2d89b --- /dev/null +++ b/meta-gnome/recipes-gnome/gnome-online-accounts/gnome-online-accounts_3.46.0.bb | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | SUMMARY = "GNOME Online Accounts - Single sign-on framework for GNOME" | ||
| 2 | LICENSE = "LGPL-2.0-or-later" | ||
| 3 | LIC_FILES_CHKSUM = "file://COPYING;md5=34c88b124db5fb2762c1676be7dadd36" | ||
| 4 | |||
| 5 | GNOMEBASEBUILDCLASS = "meson" | ||
| 6 | |||
| 7 | inherit gnomebase gsettings gobject-introspection gtk-icon-cache vala features_check | ||
| 8 | |||
| 9 | DEPENDS = "gtk+3 gtk+3-native gdk-pixbuf dbus json-glib libxml2 webkitgtk glib-2.0 rest libsecret" | ||
| 10 | |||
| 11 | SRC_URI[archive.sha256sum] = "5e7859ce4858a6b99d3995ed70527d66e297bb90bbf75ec8780fe9da22c1fcaa" | ||
| 12 | |||
| 13 | PACKAGECONFIG_SOUP ?= "soup3" | ||
| 14 | PACKAGECONFIG ?= "kerberos owncloud lastfm google windows_live ${PACKAGECONFIG_SOUP}" | ||
| 15 | |||
| 16 | PACKAGECONFIG[kerberos] = "-Dkerberos=true, -Dkerberos=false,krb5 gcr" | ||
| 17 | PACKAGECONFIG[exchange] = "-Dexchange=true, -Dexchange=false" | ||
| 18 | PACKAGECONFIG[google] = "-Dgoogle=true, -Dgoogle=false" | ||
| 19 | PACKAGECONFIG[owncloud] = "-Downcloud=true, -Downcloud=false" | ||
| 20 | PACKAGECONFIG[windows_live] = "-Dwindows_live=true, -Dwindows_live=false" | ||
| 21 | PACKAGECONFIG[lastfm] = "-Dlastfm=true, -Dlastfm=false" | ||
| 22 | PACKAGECONFIG[soup2] = ",,libsoup-2.4,,,soup3" | ||
| 23 | PACKAGECONFIG[soup3] = ",,libsoup-3.0,,,soup2" | ||
| 24 | |||
| 25 | FILES:${PN} += " \ | ||
| 26 | ${datadir}/dbus-1 \ | ||
| 27 | ${libdir}/goa-1.0/web-extensions/*.so \ | ||
| 28 | " | ||
| 29 | |||
| 30 | # looked into pkg-config file: it is not a bug - they mean it | ||
| 31 | FILES:${PN}-dev += "${libdir}/goa-1.0/include" | ||
