Compare commits

...

No commits in common. 'i10fe' and 'c9' have entirely different histories.
i10fe ... c9

2
.gitignore vendored

@ -1 +1 @@
SOURCES/gnome-online-accounts-3.53.1.tar.xz SOURCES/gnome-online-accounts-3.40.0.tar.xz

@ -1 +1 @@
ddef94e235e859742c51c615795d42e2f6f1b71e SOURCES/gnome-online-accounts-3.53.1.tar.xz 547da191a47b8f35ced486fa94145b85ad45c864 SOURCES/gnome-online-accounts-3.40.0.tar.xz

@ -1,695 +0,0 @@
From 2212488b777035a619633284515c657075c9ed0d Mon Sep 17 00:00:00 2001
From: Dmitry Samoylik <Dmitriy.Samoylik@softline.com>
Date: Mon, 10 Feb 2025 14:30:49 +0300
Subject: [PATCH] Added yandex provider
---
data/icons/meson.build | 2 +
data/icons/scalable/goa-account-yandex.svg | 45 ++
.../symbolic/goa-account-yandex-symbolic.svg | 45 ++
meson.build | 12 +
meson_options.txt | 4 +
src/goabackend/goaoauth2handler.c | 7 +
src/goabackend/goaprovider.c | 4 +
src/goabackend/goayandexprovider.c | 402 ++++++++++++++++++
src/goabackend/goayandexprovider.h | 37 ++
src/goabackend/meson.build | 1 +
10 files changed, 559 insertions(+)
create mode 100644 data/icons/scalable/goa-account-yandex.svg
create mode 100644 data/icons/symbolic/goa-account-yandex-symbolic.svg
create mode 100644 src/goabackend/goayandexprovider.c
create mode 100644 src/goabackend/goayandexprovider.h
diff --git a/data/icons/meson.build b/data/icons/meson.build
index fdc661a..e32b7cf 100644
--- a/data/icons/meson.build
+++ b/data/icons/meson.build
@@ -6,6 +6,7 @@ icon_scalable_data = [
'goa-account-ms365.svg',
'goa-account-msn.svg',
'goa-account-owncloud.svg',
+ 'goa-account-yandex.svg',
]
icon_symbolic_data = [
@@ -14,6 +15,7 @@ icon_symbolic_data = [
'goa-account-google-symbolic.svg',
'goa-account-msn-symbolic.svg',
'goa-account-owncloud-symbolic.svg',
+ 'goa-account-yandex-symbolic.svg',
]
icons = [
diff --git a/data/icons/scalable/goa-account-yandex.svg b/data/icons/scalable/goa-account-yandex.svg
new file mode 100644
index 0000000..dd7624f
--- /dev/null
+++ b/data/icons/scalable/goa-account-yandex.svg
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ width="128"
+ height="128"
+ fill="none"
+ version="1.1"
+ id="svg6"
+ sodipodi:docname="goa-account-yandex.svg"
+ inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:svg="http://www.w3.org/2000/svg">
+ <defs
+ id="defs10" />
+ <sodipodi:namedview
+ id="namedview8"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageshadow="2"
+ inkscape:pageopacity="0.0"
+ inkscape:pagecheckerboard="0"
+ showgrid="false"
+ inkscape:zoom="3.1041667"
+ inkscape:cx="6.6040268"
+ inkscape:cy="32.214765"
+ inkscape:window-width="1600"
+ inkscape:window-height="831"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg6"
+ units="px" />
+ <path
+ d="m 2.8068309,62.777027 c 0,-33.16674 26.8792921,-60.0520375 60.0520371,-60.0520375 33.160731,0 60.052032,26.8852975 60.052032,60.0520375 0,33.166747 -26.891301,60.052043 -60.052032,60.052043 -33.172745,0 -60.0520371,-26.885296 -60.0520371,-60.052043 z"
+ fill="#fc3f1d"
+ id="path2"
+ style="stroke-width:6.0052" />
+ <path
+ d="m 72.133795,26.165699 h -7.118289 c -13.050211,0 -19.91428,6.609848 -19.91428,16.355126 0,11.016409 4.745529,16.177946 14.490817,22.79549 l 8.050452,5.423463 -23.134456,34.566882 H 27.220758 L 47.982446,74.383659 C 36.041588,65.824765 29.339297,57.512386 29.339297,43.452989 c 0,-17.626257 12.287531,-29.659558 35.591462,-29.659558 H 88.065216 V 105.22192 H 72.133795 Z"
+ fill="#ffffff"
+ id="path4"
+ style="stroke-width:7.70379" />
+</svg>
diff --git a/data/icons/symbolic/goa-account-yandex-symbolic.svg b/data/icons/symbolic/goa-account-yandex-symbolic.svg
new file mode 100644
index 0000000..528713f
--- /dev/null
+++ b/data/icons/symbolic/goa-account-yandex-symbolic.svg
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ width="16"
+ height="16"
+ fill="none"
+ version="1.1"
+ id="svg6"
+ sodipodi:docname="goa-account-yandex.svg"
+ inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:svg="http://www.w3.org/2000/svg">
+ <defs
+ id="defs10" />
+ <sodipodi:namedview
+ id="namedview8"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageshadow="2"
+ inkscape:pageopacity="0.0"
+ inkscape:pagecheckerboard="0"
+ showgrid="false"
+ inkscape:zoom="24.833333"
+ inkscape:cx="19.42953"
+ inkscape:cy="12"
+ inkscape:window-width="1600"
+ inkscape:window-height="831"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg6"
+ units="px" />
+ <path
+ d="m 1.1935759,7.6916685 c 0,-3.8106297 3.0882453,-6.8995649 6.8995649,-6.8995649 3.8099392,0 6.8995642,3.0889352 6.8995642,6.8995649 0,3.8106305 -3.089625,6.8995655 -6.8995642,6.8995655 -3.8113196,0 -6.8995649,-3.088935 -6.8995649,-6.8995655 z"
+ fill="#fc3f1d"
+ id="path2"
+ style="stroke-width:0.689956" />
+ <path
+ d="m 9.0981498,3.9138576 h -0.803668 c -1.4733923,0 -2.2483582,0.7462635 -2.2483582,1.8465241 0,1.2437728 0.5357789,1.8265194 1.6360394,2.5736529 L 8.5910746,8.9463533 5.9791511,12.849017 H 4.0273847 L 6.3714179,9.3577547 C 5.0232728,8.3914394 4.2665717,7.4529564 4.2665717,5.8656241 c 0,-1.9900365 1.3872851,-3.348619 4.0183427,-3.348619 H 10.896837 V 12.83945 H 9.0981498 Z"
+ fill="#ffffff"
+ id="path4"
+ style="stroke-width:0.869772" />
+</svg>
diff --git a/meson.build b/meson.build
index 95e17de..9d08775 100644
--- a/meson.build
+++ b/meson.build
@@ -174,6 +174,18 @@ config_h.set_quoted('GOA_GOOGLE_CLIENT_SECRET', google_client_secret)
enable_google = get_option('google')
config_h.set('GOA_GOOGLE_ENABLED', enable_google)
+# Yandex
+config_h.set_quoted('GOA_YANDEX_NAME', 'yandex')
+
+yandex_client_id = get_option('yandex_client_id')
+config_h.set_quoted('GOA_YANDEX_CLIENT_ID', yandex_client_id)
+
+yandex_client_secret = get_option('yandex_client_secret')
+config_h.set_quoted('GOA_YANDEX_CLIENT_SECRET', yandex_client_secret)
+
+enable_yandex = get_option('yandex')
+config_h.set('GOA_YANDEX_ENABLED', enable_yandex)
+
# IMAP/SMTP
config_h.set_quoted('GOA_IMAP_SMTP_NAME', 'imap_smtp')
diff --git a/meson_options.txt b/meson_options.txt
index 7b2d208..dfe22af 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -8,6 +8,10 @@ option('google', type: 'boolean', value: true, description: 'Enable Google provi
option('google_client_id', type: 'string', value: '44438659992-7kgjeitenc16ssihbtdjbgguch7ju55s.apps.googleusercontent.com', description: 'Google OAuth 2.0 client id')
option('google_client_secret', type: 'string', value: '-gMLuQyDiI0XrQS_vx_mhuYF', description: 'Google OAuth 2.0 client secret')
+option('yandex', type: 'boolean', value: true, description: 'Enable Yandex provider')
+option('yandex_client_id', type: 'string', value: 'aab3f89a0d504003bfa3bb5326f68575', description: 'Yandex OAuth 2.0 client id')
+option('yandex_client_secret', type: 'string', value: '4e6f4755f2ec457e9a80f0f43683fc32', description: 'Yandex OAuth 2.0 client secret')
+
option('imap_smtp', type: 'boolean', value: true, description: 'Enable IMAP/SMTP provider')
option('kerberos', type: 'boolean', value: true, description: 'Enable kerberos provider')
diff --git a/src/goabackend/goaoauth2handler.c b/src/goabackend/goaoauth2handler.c
index d510d3b..cd295c4 100644
--- a/src/goabackend/goaoauth2handler.c
+++ b/src/goabackend/goaoauth2handler.c
@@ -56,6 +56,11 @@ oauth2_providers[] =
{
.client_id = GOA_MS_GRAPH_CLIENT_ID,
},
+#endif
+#ifdef GOA_YANDEX_ENABLED
+ {
+ .client_id = GOA_YANDEX_CLIENT_ID,
+ },
#endif
{ NULL },
};
@@ -141,6 +146,8 @@ main (int argc,
return EXIT_FAILURE;
}
+ g_printerr("argv1: %s client_id: %s \n", argv[1], client_id);
+
if (!secret_password_store_sync (&oauth2_schema,
SECRET_COLLECTION_SESSION,
"GNOME Online Accounts OAuth2 URI",
diff --git a/src/goabackend/goaprovider.c b/src/goabackend/goaprovider.c
index b763c1e..1e5ce4f 100644
--- a/src/goabackend/goaprovider.c
+++ b/src/goabackend/goaprovider.c
@@ -30,6 +30,7 @@
#include "goawebdavprovider.h"
#include "goawindowsliveprovider.h"
#include "goamsgraphprovider.h"
+#include "goayandexprovider.h"
#ifdef GOA_FEDORA_ENABLED
#include "goafedoraprovider.h"
@@ -1176,6 +1177,9 @@ static struct
* important because it affects the order in which they are
* returned by goa_provider_get_all.
*/
+#ifdef GOA_YANDEX_ENABLED
+ { GOA_YANDEX_NAME, goa_yandex_provider_get_type },
+#endif
#ifdef GOA_GOOGLE_ENABLED
{ GOA_GOOGLE_NAME, goa_google_provider_get_type },
#endif
diff --git a/src/goabackend/goayandexprovider.c b/src/goabackend/goayandexprovider.c
new file mode 100644
index 0000000..d8c79a9
--- /dev/null
+++ b/src/goabackend/goayandexprovider.c
@@ -0,0 +1,402 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
+/*
+ * Copyright © 2011 2017 Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+#include <glib/gi18n-lib.h>
+
+#include <rest/rest.h>
+#include <json-glib/json-glib.h>
+
+#include "goaprovider.h"
+#include "goaprovider-priv.h"
+#include "goaoauth2provider.h"
+#include "goayandexprovider.h"
+#include "goaobjectskeletonutils.h"
+#include "goarestproxy.h"
+
+struct _GoaYandexProvider
+{
+ GoaOAuth2Provider parent_instance;
+ gchar *redirect_uri;
+};
+
+G_DEFINE_TYPE_WITH_CODE (GoaYandexProvider, goa_yandex_provider, GOA_TYPE_OAUTH2_PROVIDER,
+ goa_provider_ensure_extension_points_registered ();
+ g_io_extension_point_implement (GOA_PROVIDER_EXTENSION_POINT_NAME,
+ g_define_type_id,
+ GOA_YANDEX_NAME,
+ 0));
+
+/* ---------------------------------------------------------------------------------------------------- */
+
+static const gchar *
+get_provider_type (GoaProvider *provider)
+{
+ return GOA_YANDEX_NAME;
+}
+
+static gchar *
+get_provider_name (GoaProvider *provider,
+ GoaObject *object)
+{
+ return g_strdup (_("Yandex"));
+}
+
+static GoaProviderGroup
+get_provider_group (GoaProvider *provider)
+{
+ return GOA_PROVIDER_GROUP_BRANDED;
+}
+
+static GoaProviderFeatures
+get_provider_features (GoaProvider *provider)
+{
+ return GOA_PROVIDER_FEATURE_BRANDED |
+ GOA_PROVIDER_FEATURE_MAIL |
+ GOA_PROVIDER_FEATURE_CALENDAR |
+// GOA_PROVIDER_FEATURE_CONTACTS |
+ GOA_PROVIDER_FEATURE_FILES;
+}
+
+static const gchar *
+get_authorization_uri (GoaOAuth2Provider *oauth2_provider)
+{
+ return "https://oauth.yandex.ru/authorize";
+}
+
+static const gchar *
+get_token_uri (GoaOAuth2Provider *oauth2_provider)
+{
+ return "https://oauth.yandex.ru/token";
+}
+
+static const gchar *
+get_redirect_uri (GoaOAuth2Provider *oauth2_provider)
+{
+ G_LOCK_DEFINE_STATIC (redirect_uri);
+ GoaYandexProvider *self = GOA_YANDEX_PROVIDER (oauth2_provider);
+
+ G_LOCK (redirect_uri);
+
+ if (!self->redirect_uri) {
+ self->redirect_uri = g_strconcat ("goa-oauth2://localhost/", GOA_YANDEX_CLIENT_ID, NULL);
+ // self->redirect_uri = GOA_YANDEX_CLIENT_ID":goa-oauth2://localhost/";
+ // self->redirect_uri = "goa-oauth2://localhost/";
+ }
+
+ G_UNLOCK (redirect_uri);
+
+ return self->redirect_uri;
+
+}
+
+static const gchar *
+get_scope (GoaOAuth2Provider *oauth2_provider)
+{
+ return "login:email login:info mail:imap_full mail:imap_ro mail:smtp calendar:all yadisk:disk cloud_api:disk.read cloud_api:disk.write";
+}
+
+static guint
+get_credentials_generation (GoaProvider *provider)
+{
+ return 37;
+}
+
+static const gchar *
+get_client_id (GoaOAuth2Provider *oauth2_provider)
+{
+ return GOA_YANDEX_CLIENT_ID;
+}
+
+static const gchar *
+get_client_secret (GoaOAuth2Provider *oauth2_provider)
+{
+ return GOA_YANDEX_CLIENT_SECRET;
+}
+
+static gboolean
+get_use_pkce (GoaOAuth2Provider *oauth2_provider)
+{
+ return FALSE;
+}
+
+/* ---------------------------------------------------------------------------------------------------- */
+
+static gchar *
+get_identity_sync (GoaOAuth2Provider *oauth2_provider,
+ const gchar *access_token,
+ gchar **out_presentation_identity,
+ GCancellable *cancellable,
+ GError **error)
+{
+ GError *identity_error = NULL;
+ RestProxy *proxy = NULL;
+ RestProxyCall *call = NULL;
+ JsonParser *parser = NULL;
+ JsonObject *json_object;
+ gchar *ret = NULL;
+ gchar *id = NULL;
+
+ /* TODO: cancellable */
+
+ proxy = goa_rest_proxy_new ("https://login.yandex.ru/info", FALSE);
+ call = rest_proxy_new_call (proxy);
+ rest_proxy_call_set_method (call, "GET");
+ rest_proxy_call_add_param (call, "oauth_token", access_token);
+
+ if (!rest_proxy_call_sync (call, error))
+ goto out;
+ if (rest_proxy_call_get_status_code (call) != 200)
+ {
+ g_set_error (error,
+ GOA_ERROR,
+ GOA_ERROR_FAILED,
+ _("Expected status 200 when requesting your identity, instead got status %d (%s)"),
+ rest_proxy_call_get_status_code (call),
+ rest_proxy_call_get_status_message (call));
+ goto out;
+ }
+
+ parser = json_parser_new ();
+ if (!json_parser_load_from_data (parser,
+ rest_proxy_call_get_payload (call),
+ rest_proxy_call_get_payload_length (call),
+ &identity_error))
+ {
+ g_warning ("json_parser_load_from_data() failed: %s (%s, %d)",
+ identity_error->message,
+ g_quark_to_string (identity_error->domain),
+ identity_error->code);
+ g_set_error (error,
+ GOA_ERROR,
+ GOA_ERROR_FAILED,
+ _("Could not parse response"));
+ goto out;
+ }
+
+ json_object = json_node_get_object (json_parser_get_root (parser));
+ if (!json_object_has_member (json_object, "default_email"))
+ {
+ g_warning ("Did not find emails in JSON data");
+ g_set_error (error,
+ GOA_ERROR,
+ GOA_ERROR_FAILED,
+ _("Could not parse response"));
+ goto out;
+ }
+
+ id = g_strdup (json_object_get_string_member (json_object, "default_email"));
+
+ ret = id;
+ id = NULL;
+ if (out_presentation_identity != NULL)
+ *out_presentation_identity = g_strdup(ret);
+
+ out:
+ g_clear_object (&parser);
+ g_clear_error (&identity_error);
+ g_clear_object (&call);
+ g_clear_object (&proxy);
+ g_free (id);
+ return ret;
+}
+
+/* ---------------------------------------------------------------------------------------------------- */
+
+static gboolean
+build_object (GoaProvider *provider,
+ GoaObjectSkeleton *object,
+ GKeyFile *key_file,
+ const gchar *group,
+ GDBusConnection *connection,
+ gboolean just_added,
+ GError **error)
+{
+ GoaAccount *account = NULL;
+ GoaMail *mail = NULL;
+ gchar *uri_caldav;
+ gchar *uri_drive;
+ gchar *uri_carddav;
+ gboolean ret = FALSE;
+ gboolean mail_enabled;
+ gboolean files_enabled;
+ gboolean calendar_enabled;
+ gboolean contacts_enabled;
+ const gchar *email_address;
+ gchar *u_name, *u_name_pos;
+
+ /* Chain up */
+ if (!GOA_PROVIDER_CLASS (goa_yandex_provider_parent_class)->build_object (provider,
+ object,
+ key_file,
+ group,
+ connection,
+ just_added,
+ error))
+ goto out;
+
+ account = goa_object_get_account (GOA_OBJECT (object));
+ email_address = goa_account_get_identity (account);
+
+ /* Email */
+ mail = goa_object_get_mail (GOA_OBJECT (object));
+ mail_enabled = g_key_file_get_boolean (key_file, group, "MailEnabled", NULL);
+ if (mail_enabled)
+ {
+ if (mail == NULL)
+ {
+ mail = goa_mail_skeleton_new ();
+ g_object_set (G_OBJECT (mail),
+ "email-address", email_address,
+ "imap-supported", TRUE,
+ "imap-host", "imap.yandex.ru",
+ "imap-user-name", email_address,
+ "imap-use-ssl", TRUE,
+ "smtp-supported", TRUE,
+ "smtp-host", "smtp.yandex.ru",
+ "smtp-user-name", email_address,
+ "smtp-use-auth", TRUE,
+ "smtp-auth-xoauth2", TRUE,
+ "smtp-use-ssl", TRUE,
+ "smtp-use-tls", TRUE,
+ NULL);
+ goa_object_skeleton_set_mail (object, mail);
+ }
+ }
+ else
+ {
+ if (mail != NULL)
+ goa_object_skeleton_set_mail (object, NULL);
+ }
+
+ /* Calendar */
+ calendar_enabled = g_key_file_get_boolean (key_file, group, "CalendarEnabled", NULL);
+ uri_caldav = g_strconcat ("https://caldav.yandex.ru/", NULL);
+ goa_object_skeleton_attach_calendar (object, uri_caldav, calendar_enabled, FALSE);
+ g_free (uri_caldav);
+
+ /* Contacts */
+ // contacts_enabled = g_key_file_get_boolean (key_file, group, "ContactsEnabled", NULL);
+ // uri_carddav = g_strconcat ("https://carddav.yandex.ru/", NULL);
+ // goa_object_skeleton_attach_contacts (object, uri_carddav, contacts_enabled, FALSE);
+ // g_free (uri_carddav);
+
+ /* Files */
+ files_enabled = g_key_file_get_boolean (key_file, group, "FilesEnabled", NULL);
+ u_name = g_strdup(email_address);
+ u_name_pos = g_utf8_strchr(u_name, -1, '@');
+ if (u_name_pos){
+ *u_name_pos = '\0';
+ }
+ uri_drive = g_strconcat ("davs://", u_name, "@webdav.yandex.ru/", NULL);
+ goa_object_skeleton_attach_files (object, uri_drive, files_enabled, FALSE);
+ g_free (u_name);
+ g_free (uri_drive);
+
+
+ if (just_added)
+ {
+ goa_account_set_mail_disabled (account, !mail_enabled);
+ goa_account_set_calendar_disabled (account, !calendar_enabled);
+ goa_account_set_contacts_disabled (account, !contacts_enabled);
+ goa_account_set_files_disabled (account, !files_enabled);
+
+ g_signal_connect (account,
+ "notify::mail-disabled",
+ G_CALLBACK (goa_util_account_notify_property_cb),
+ (gpointer) "MailEnabled");
+ g_signal_connect (account,
+ "notify::calendar-disabled",
+ G_CALLBACK (goa_util_account_notify_property_cb),
+ (gpointer) "CalendarEnabled");
+ // g_signal_connect (account,
+ // "notify::contacts-disabled",
+ // G_CALLBACK (goa_util_account_notify_property_cb),
+ // (gpointer) "ContactsEnabled");
+ g_signal_connect (account,
+ "notify::files-disabled",
+ G_CALLBACK (goa_util_account_notify_property_cb),
+ (gpointer) "FilesEnabled");
+ }
+
+ ret = TRUE;
+
+ out:
+ g_clear_object (&mail);
+ g_clear_object (&account);
+ return ret;
+}
+
+/* ---------------------------------------------------------------------------------------------------- */
+
+static void
+add_account_key_values (GoaOAuth2Provider *oauth2_provider,
+ GVariantBuilder *builder)
+{
+ g_variant_builder_add (builder, "{ss}", "MailEnabled", "true");
+ g_variant_builder_add (builder, "{ss}", "CalendarEnabled", "true");
+ // g_variant_builder_add (builder, "{ss}", "ContactsEnabled", "true");
+ g_variant_builder_add (builder, "{ss}", "FilesEnabled", "true");
+}
+
+/* ---------------------------------------------------------------------------------------------------- */
+
+static void
+goa_yandex_finalize (GObject *object)
+{
+ GoaYandexProvider *self = GOA_YANDEX_PROVIDER (object);
+
+ g_free (self->redirect_uri);
+
+ G_OBJECT_CLASS (goa_yandex_provider_parent_class)->finalize (object);
+}
+
+static void
+goa_yandex_provider_init (GoaYandexProvider *self)
+{
+}
+
+static void
+goa_yandex_provider_class_init (GoaYandexProviderClass *klass)
+{
+ GoaProviderClass *provider_class;
+ GoaOAuth2ProviderClass *oauth2_class;
+ GObjectClass *object_class;
+
+ object_class = G_OBJECT_CLASS (klass);
+ object_class->finalize = goa_yandex_finalize;
+
+ provider_class = GOA_PROVIDER_CLASS (klass);
+ provider_class->get_provider_type = get_provider_type;
+ provider_class->get_provider_name = get_provider_name;
+ provider_class->get_provider_group = get_provider_group;
+ provider_class->get_provider_features = get_provider_features;
+ provider_class->build_object = build_object;
+ provider_class->get_credentials_generation = get_credentials_generation;
+
+ oauth2_class = GOA_OAUTH2_PROVIDER_CLASS (klass);
+ oauth2_class->get_authorization_uri = get_authorization_uri;
+ oauth2_class->get_client_id = get_client_id;
+ oauth2_class->get_client_secret = get_client_secret;
+ oauth2_class->get_identity_sync = get_identity_sync;
+ oauth2_class->get_redirect_uri = get_redirect_uri;
+ oauth2_class->get_scope = get_scope;
+ oauth2_class->get_token_uri = get_token_uri;
+ oauth2_class->get_use_pkce = get_use_pkce;
+ oauth2_class->add_account_key_values = add_account_key_values;
+}
diff --git a/src/goabackend/goayandexprovider.h b/src/goabackend/goayandexprovider.h
new file mode 100644
index 0000000..bd4315f
--- /dev/null
+++ b/src/goabackend/goayandexprovider.h
@@ -0,0 +1,37 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
+/*
+ * Copyright © 2011 2017 Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#if !defined (__GOA_BACKEND_INSIDE_GOA_BACKEND_H__) && !defined (GOA_BACKEND_COMPILATION)
+#error "Only <goabackend/goabackend.h> can be included directly."
+#endif
+
+#ifndef __GOA_YANDEX_PROVIDER_H__
+#define __GOA_YANDEX_PROVIDER_H__
+
+#include <glib-object.h>
+
+#include "goaoauth2provider-priv.h"
+
+G_BEGIN_DECLS
+
+#define GOA_TYPE_YANDEX_PROVIDER (goa_yandex_provider_get_type ())
+G_DECLARE_FINAL_TYPE (GoaYandexProvider, goa_yandex_provider, GOA, YANDEX_PROVIDER, GoaOAuth2Provider);
+
+G_END_DECLS
+
+#endif /* __GOA_YANDEX_PROVIDER_H__ */
diff --git a/src/goabackend/meson.build b/src/goabackend/meson.build
index 150a9fb..23dda34 100644
--- a/src/goabackend/meson.build
+++ b/src/goabackend/meson.build
@@ -26,6 +26,7 @@ libgoa_backend_sources = files(
'goautils.c',
'goawebdavprovider.c',
'goawindowsliveprovider.c',
+ 'goayandexprovider.c',
)
enum_headers = files('goabackendenums.h')
--
2.39.5

@ -0,0 +1,286 @@
From 0820053ff418bf64db56fa8e63133c3d2e504807 Mon Sep 17 00:00:00 2001
From: Debarshi Ray <debarshir@gnome.org>
Date: Fri, 23 Nov 2018 14:07:09 +0100
Subject: [PATCH] Remove Documents support
In theory, online integration for documents is still desired. However,
these days, GNOME Documents is weekly maintained and doesn't receive
much attention from designers and developers. Therefore, it needs to be
withdrawn from the set of core applications until the situation
changes.
https://pagure.io/fedora-workstation/issue/83
---
data/dbus-interfaces.xml | 3 +++
src/goabackend/goabackendenums.h | 2 +-
src/goabackend/goagoogleprovider.c | 12 ------------
src/goabackend/goaobjectskeletonutils.c | 23 -----------------------
src/goabackend/goaobjectskeletonutils.h | 3 ---
src/goabackend/goaowncloudprovider.c | 12 ------------
src/goabackend/goawindowsliveprovider.c | 17 ++---------------
7 files changed, 6 insertions(+), 66 deletions(-)
diff --git a/data/dbus-interfaces.xml b/data/dbus-interfaces.xml
index 21c42c13d003..072d6aaca3b6 100644
--- a/data/dbus-interfaces.xml
+++ b/data/dbus-interfaces.xml
@@ -668,6 +668,9 @@
An account object implements this interface if it provides
documents-like capabilities.
+
+ The #org.gnome.OnlineAccounts.Documents interface is not used
+ by any account.
-->
<interface name="org.gnome.OnlineAccounts.Documents">
</interface>
diff --git a/src/goabackend/goabackendenums.h b/src/goabackend/goabackendenums.h
index 638674aaf4e0..38f46fa8c193 100644
--- a/src/goabackend/goabackendenums.h
+++ b/src/goabackend/goabackendenums.h
@@ -63,7 +63,7 @@ typedef enum
* @GOA_PROVIDER_FEATURE_CALENDAR: Calendaring services (ie. CalDAV).
* @GOA_PROVIDER_FEATURE_CONTACTS: Addressbook services (ie. CardDAV).
* @GOA_PROVIDER_FEATURE_CHAT: Instant messaging services (ie. XMPP, IRC).
- * @GOA_PROVIDER_FEATURE_DOCUMENTS: Documents storage services (ie. Google Documents).
+ * @GOA_PROVIDER_FEATURE_DOCUMENTS: Documents storage services (ie. Google Documents); currently unused.
* @GOA_PROVIDER_FEATURE_PHOTOS: Photos storage services (ie. Flickr).
* @GOA_PROVIDER_FEATURE_FILES: Files storage services (ie. WebDAV).
* @GOA_PROVIDER_FEATURE_TICKETING: Ticketing services (ie. Kerberos).
diff --git a/src/goabackend/goagoogleprovider.c b/src/goabackend/goagoogleprovider.c
index 9e331c110119..9332c0fdca0b 100644
--- a/src/goabackend/goagoogleprovider.c
+++ b/src/goabackend/goagoogleprovider.c
@@ -69,7 +69,6 @@ get_provider_features (GoaProvider *provider)
GOA_PROVIDER_FEATURE_MAIL |
GOA_PROVIDER_FEATURE_CALENDAR |
GOA_PROVIDER_FEATURE_CONTACTS |
- GOA_PROVIDER_FEATURE_DOCUMENTS |
GOA_PROVIDER_FEATURE_PHOTOS |
GOA_PROVIDER_FEATURE_FILES |
GOA_PROVIDER_FEATURE_PRINTERS;
@@ -281,7 +280,6 @@ build_object (GoaProvider *provider,
gboolean mail_enabled;
gboolean calendar_enabled;
gboolean contacts_enabled;
- gboolean documents_enabled;
gboolean files_enabled;
gboolean photos_enabled;
gboolean printers_enabled;
@@ -344,10 +342,6 @@ build_object (GoaProvider *provider,
contacts_enabled,
FALSE);
- /* Documents */
- documents_enabled = g_key_file_get_boolean (key_file, group, "DocumentsEnabled", NULL);
- goa_object_skeleton_attach_documents (object, documents_enabled);
-
/* Photos */
photos_enabled = g_key_file_get_boolean (key_file, group, "PhotosEnabled", NULL);
goa_object_skeleton_attach_photos (object, photos_enabled);
@@ -367,7 +361,6 @@ build_object (GoaProvider *provider,
goa_account_set_mail_disabled (account, !mail_enabled);
goa_account_set_calendar_disabled (account, !calendar_enabled);
goa_account_set_contacts_disabled (account, !contacts_enabled);
- goa_account_set_documents_disabled (account, !documents_enabled);
goa_account_set_photos_disabled (account, !photos_enabled);
goa_account_set_files_disabled (account, !files_enabled);
goa_account_set_printers_disabled (account, !printers_enabled);
@@ -384,10 +377,6 @@ build_object (GoaProvider *provider,
"notify::contacts-disabled",
G_CALLBACK (goa_util_account_notify_property_cb),
(gpointer) "ContactsEnabled");
- g_signal_connect (account,
- "notify::documents-disabled",
- G_CALLBACK (goa_util_account_notify_property_cb),
- (gpointer) "DocumentsEnabled");
g_signal_connect (account,
"notify::photos-disabled",
G_CALLBACK (goa_util_account_notify_property_cb),
@@ -419,7 +408,6 @@ add_account_key_values (GoaOAuth2Provider *oauth2_provider,
g_variant_builder_add (builder, "{ss}", "MailEnabled", "true");
g_variant_builder_add (builder, "{ss}", "CalendarEnabled", "true");
g_variant_builder_add (builder, "{ss}", "ContactsEnabled", "true");
- g_variant_builder_add (builder, "{ss}", "DocumentsEnabled", "true");
g_variant_builder_add (builder, "{ss}", "PhotosEnabled", "true");
g_variant_builder_add (builder, "{ss}", "FilesEnabled", "true");
g_variant_builder_add (builder, "{ss}", "PrintersEnabled", "true");
diff --git a/src/goabackend/goaobjectskeletonutils.c b/src/goabackend/goaobjectskeletonutils.c
index 657bffd712f3..610c6ee26233 100644
--- a/src/goabackend/goaobjectskeletonutils.c
+++ b/src/goabackend/goaobjectskeletonutils.c
@@ -109,29 +109,6 @@ goa_object_skeleton_attach_contacts (GoaObjectSkeleton *object,
g_clear_object (&contacts);
}
-void
-goa_object_skeleton_attach_documents (GoaObjectSkeleton *object,
- gboolean documents_enabled)
-{
- GoaDocuments *documents;
-
- documents = goa_object_get_documents (GOA_OBJECT (object));
- if (documents_enabled)
- {
- if (documents == NULL)
- {
- documents = goa_documents_skeleton_new ();
- goa_object_skeleton_set_documents (object, documents);
- }
- }
- else
- {
- if (documents != NULL)
- goa_object_skeleton_set_documents (object, NULL);
- }
- g_clear_object (&documents);
-}
-
void
goa_object_skeleton_attach_photos (GoaObjectSkeleton *object,
gboolean photos_enabled)
diff --git a/src/goabackend/goaobjectskeletonutils.h b/src/goabackend/goaobjectskeletonutils.h
index 699695285028..6bc413c38f55 100644
--- a/src/goabackend/goaobjectskeletonutils.h
+++ b/src/goabackend/goaobjectskeletonutils.h
@@ -38,9 +38,6 @@ void goa_object_skeleton_attach_contacts (GoaObjectSkeleton *o
gboolean contacts_enabled,
gboolean accept_ssl_errors);
-void goa_object_skeleton_attach_documents (GoaObjectSkeleton *object,
- gboolean documents_enabled);
-
void goa_object_skeleton_attach_files (GoaObjectSkeleton *object,
const gchar *uri,
gboolean files_enabled,
diff --git a/src/goabackend/goaowncloudprovider.c b/src/goabackend/goaowncloudprovider.c
index 29d461a880d8..d1429661fe2e 100644
--- a/src/goabackend/goaowncloudprovider.c
+++ b/src/goabackend/goaowncloudprovider.c
@@ -72,7 +72,6 @@ get_provider_features (GoaProvider *provider)
return GOA_PROVIDER_FEATURE_BRANDED |
GOA_PROVIDER_FEATURE_CALENDAR |
GOA_PROVIDER_FEATURE_CONTACTS |
- GOA_PROVIDER_FEATURE_DOCUMENTS |
GOA_PROVIDER_FEATURE_FILES;
}
@@ -145,7 +144,6 @@ build_object (GoaProvider *provider,
gboolean accept_ssl_errors;
gboolean calendar_enabled;
gboolean contacts_enabled;
- gboolean documents_enabled;
gboolean files_enabled;
gboolean ret = FALSE;
const gchar *identity;
@@ -196,10 +194,6 @@ build_object (GoaProvider *provider,
goa_object_skeleton_attach_contacts (object, uri_carddav, contacts_enabled, accept_ssl_errors);
g_free (uri_carddav);
- /* Documents */
- documents_enabled = g_key_file_get_boolean (key_file, group, "DocumentsEnabled", NULL);
- goa_object_skeleton_attach_documents (object, documents_enabled);
-
/* Files */
files_enabled = g_key_file_get_boolean (key_file, group, "FilesEnabled", NULL);
uri_webdav = get_webdav_uri (uri);
@@ -210,7 +204,6 @@ build_object (GoaProvider *provider,
{
goa_account_set_calendar_disabled (account, !calendar_enabled);
goa_account_set_contacts_disabled (account, !contacts_enabled);
- goa_account_set_documents_disabled (account, !documents_enabled);
goa_account_set_files_disabled (account, !files_enabled);
g_signal_connect (account,
@@ -221,10 +214,6 @@ build_object (GoaProvider *provider,
"notify::contacts-disabled",
G_CALLBACK (goa_util_account_notify_property_cb),
(gpointer) "ContactsEnabled");
- g_signal_connect (account,
- "notify::documents-disabled",
- G_CALLBACK (goa_util_account_notify_property_cb),
- (gpointer) "DocumentsEnabled");
g_signal_connect (account,
"notify::files-disabled",
G_CALLBACK (goa_util_account_notify_property_cb),
@@ -750,7 +739,6 @@ add_account (GoaProvider *provider,
g_variant_builder_init (&details, G_VARIANT_TYPE ("a{ss}"));
g_variant_builder_add (&details, "{ss}", "CalendarEnabled", "true");
g_variant_builder_add (&details, "{ss}", "ContactsEnabled", "true");
- g_variant_builder_add (&details, "{ss}", "DocumentsEnabled", "true");
g_variant_builder_add (&details, "{ss}", "FilesEnabled", "true");
g_variant_builder_add (&details, "{ss}", "Uri", uri);
g_variant_builder_add (&details, "{ss}", "AcceptSslErrors", (accept_ssl_errors) ? "true" : "false");
diff --git a/src/goabackend/goawindowsliveprovider.c b/src/goabackend/goawindowsliveprovider.c
index 10c2dcff4738..be357465230a 100644
--- a/src/goabackend/goawindowsliveprovider.c
+++ b/src/goabackend/goawindowsliveprovider.c
@@ -73,8 +73,7 @@ static GoaProviderFeatures
get_provider_features (GoaProvider *provider)
{
return GOA_PROVIDER_FEATURE_BRANDED |
- GOA_PROVIDER_FEATURE_MAIL |
- GOA_PROVIDER_FEATURE_DOCUMENTS;
+ GOA_PROVIDER_FEATURE_MAIL;
}
static const gchar *
@@ -102,14 +101,13 @@ get_scope (GoaOAuth2Provider *oauth2_provider)
{
return "wl.imap,"
"wl.offline_access,"
- "wl.skydrive_update,"
"wl.emails";
}
static guint
get_credentials_generation (GoaProvider *provider)
{
- return 3;
+ return 4;
}
static const gchar *
@@ -276,7 +274,6 @@ build_object (GoaProvider *provider,
GoaAccount *account = NULL;
GoaMail *mail = NULL;
gboolean mail_enabled;
- gboolean documents_enabled;
gboolean ret = FALSE;
const gchar *email_address;
@@ -323,23 +320,14 @@ build_object (GoaProvider *provider,
goa_object_skeleton_set_mail (object, NULL);
}
- /* Documents */
- documents_enabled = g_key_file_get_boolean (key_file, group, "DocumentsEnabled", NULL);
- goa_object_skeleton_attach_documents (object, documents_enabled);
-
if (just_added)
{
goa_account_set_mail_disabled (account, !mail_enabled);
- goa_account_set_documents_disabled (account, !documents_enabled);
g_signal_connect (account,
"notify::mail-disabled",
G_CALLBACK (goa_util_account_notify_property_cb),
(gpointer) "MailEnabled");
- g_signal_connect (account,
- "notify::documents-disabled",
- G_CALLBACK (goa_util_account_notify_property_cb),
- (gpointer) "DocumentsEnabled");
}
ret = TRUE;
@@ -357,7 +345,6 @@ add_account_key_values (GoaOAuth2Provider *oauth2_provider,
GVariantBuilder *builder)
{
g_variant_builder_add (builder, "{ss}", "MailEnabled", "true");
- g_variant_builder_add (builder, "{ss}", "DocumentsEnabled", "true");
}
/* ---------------------------------------------------------------------------------------------------- */
--
2.30.2

@ -0,0 +1,86 @@
From f17c21fc97e465b86ed27acceeea331624e66cd6 Mon Sep 17 00:00:00 2001
From: Debarshi Ray <debarshir@gnome.org>
Date: Thu, 22 Apr 2021 01:51:52 +0200
Subject: [PATCH] google: Remove Photos support
In theory, support for photos is still desired. However, right now the
implementation of the Google PicasaWeb API in libgdata no longer works.
Until that's fixed, there's no point in advertising support for photos.
https://gitlab.gnome.org/GNOME/gnome-online-accounts/-/issues/63
https://bugzilla.redhat.com/show_bug.cgi?id=1913641
---
src/goabackend/goagoogleprovider.c | 15 ---------------
1 file changed, 15 deletions(-)
diff --git a/src/goabackend/goagoogleprovider.c b/src/goabackend/goagoogleprovider.c
index 9332c0fdca0b..b3c0f8fdcc66 100644
--- a/src/goabackend/goagoogleprovider.c
+++ b/src/goabackend/goagoogleprovider.c
@@ -69,7 +69,6 @@ get_provider_features (GoaProvider *provider)
GOA_PROVIDER_FEATURE_MAIL |
GOA_PROVIDER_FEATURE_CALENDAR |
GOA_PROVIDER_FEATURE_CONTACTS |
- GOA_PROVIDER_FEATURE_PHOTOS |
GOA_PROVIDER_FEATURE_FILES |
GOA_PROVIDER_FEATURE_PRINTERS;
}
@@ -117,9 +116,6 @@ get_scope (GoaOAuth2Provider *oauth2_provider)
"https://docs.googleusercontent.com/ "
"https://spreadsheets.google.com/feeds/ "
- /* Google PicasaWeb API (GData) */
- "https://picasaweb.google.com/data/ "
-
/* GMail IMAP and SMTP access */
"https://mail.google.com/ "
@@ -281,7 +277,6 @@ build_object (GoaProvider *provider,
gboolean calendar_enabled;
gboolean contacts_enabled;
gboolean files_enabled;
- gboolean photos_enabled;
gboolean printers_enabled;
const gchar *email_address;
@@ -342,10 +337,6 @@ build_object (GoaProvider *provider,
contacts_enabled,
FALSE);
- /* Photos */
- photos_enabled = g_key_file_get_boolean (key_file, group, "PhotosEnabled", NULL);
- goa_object_skeleton_attach_photos (object, photos_enabled);
-
/* Files */
files_enabled = g_key_file_get_boolean (key_file, group, "FilesEnabled", NULL);
uri_drive = g_strconcat ("google-drive://", email_address, "/", NULL);
@@ -361,7 +352,6 @@ build_object (GoaProvider *provider,
goa_account_set_mail_disabled (account, !mail_enabled);
goa_account_set_calendar_disabled (account, !calendar_enabled);
goa_account_set_contacts_disabled (account, !contacts_enabled);
- goa_account_set_photos_disabled (account, !photos_enabled);
goa_account_set_files_disabled (account, !files_enabled);
goa_account_set_printers_disabled (account, !printers_enabled);
@@ -377,10 +367,6 @@ build_object (GoaProvider *provider,
"notify::contacts-disabled",
G_CALLBACK (goa_util_account_notify_property_cb),
(gpointer) "ContactsEnabled");
- g_signal_connect (account,
- "notify::photos-disabled",
- G_CALLBACK (goa_util_account_notify_property_cb),
- (gpointer) "PhotosEnabled");
g_signal_connect (account,
"notify::files-disabled",
G_CALLBACK (goa_util_account_notify_property_cb),
@@ -408,7 +394,6 @@ add_account_key_values (GoaOAuth2Provider *oauth2_provider,
g_variant_builder_add (builder, "{ss}", "MailEnabled", "true");
g_variant_builder_add (builder, "{ss}", "CalendarEnabled", "true");
g_variant_builder_add (builder, "{ss}", "ContactsEnabled", "true");
- g_variant_builder_add (builder, "{ss}", "PhotosEnabled", "true");
g_variant_builder_add (builder, "{ss}", "FilesEnabled", "true");
g_variant_builder_add (builder, "{ss}", "PrintersEnabled", "true");
}
--
2.30.2

File diff suppressed because it is too large Load Diff

@ -1,70 +1,56 @@
## START: Set by rpmautospec %global gettext_version 0.19.8
## (rpmautospec version 0.7.3) %global glib2_version 2.52
## RPMAUTOSPEC: autorelease, autochangelog %global gtk3_version 3.19.12
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua: %global libsoup_version 2.42
release_number = 3; %global webkit2gtk3_version 2.26.0
base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
## END: Set by rpmautospec
%global gettext_version 0.22
%global glib2_version 2.78.3
%global gtk4_version 4.15.2
%global libadwaita_version 1.6~beta
%global libsoup_version 3.0
Name: gnome-online-accounts Name: gnome-online-accounts
Version: 3.53.1 Version: 3.40.0
Release: %{autorelease}.inferit Release: 3%{?dist}
Summary: Single sign-on framework for GNOME Summary: Single sign-on framework for GNOME
# Sources are LGPL-2.0-or-later, icons are CC-BY-SA-4.0. License: LGPLv2+
License: LGPL-2.0-or-later AND CC-BY-SA-4.0
URL: https://wiki.gnome.org/Projects/GnomeOnlineAccounts URL: https://wiki.gnome.org/Projects/GnomeOnlineAccounts
Source0: https://download.gnome.org/sources/%{name}/3.53/%{name}-%{version}.tar.xz Source0: https://download.gnome.org/sources/gnome-online-accounts/3.40/%{name}-%{version}.tar.xz
# MSVSphere # https://pagure.io/fedora-workstation/issue/83
Patch1001: 0001-Added-yandex-provider.patch Patch: 0001-Remove-Documents-support.patch
BuildRequires: pkgconfig(dbus-1) # https://gitlab.gnome.org/GNOME/gnome-online-accounts/-/issues/63
BuildRequires: pkgconfig(gcr-4) # https://bugzilla.redhat.com/show_bug.cgi?id=1913641
Patch: 0001-google-Remove-Photos-support.patch
Patch: kerberos-fixes.patch
BuildRequires: pkgconfig(gcr-3)
BuildRequires: pkgconfig(gio-2.0) >= %{glib2_version} BuildRequires: pkgconfig(gio-2.0) >= %{glib2_version}
BuildRequires: pkgconfig(glib-2.0) >= %{glib2_version} BuildRequires: pkgconfig(glib-2.0) >= %{glib2_version}
BuildRequires: pkgconfig(gobject-2.0) >= %{glib2_version} BuildRequires: pkgconfig(gobject-2.0) >= %{glib2_version}
BuildRequires: pkgconfig(gtk+-3.0) >= %{gtk3_version}
BuildRequires: pkgconfig(gobject-introspection-1.0) BuildRequires: pkgconfig(gobject-introspection-1.0)
BuildRequires: pkgconfig(krb5)
BuildRequires: pkgconfig(libadwaita-1) >= %{libadwaita_version}
BuildRequires: pkgconfig(libkeyutils)
BuildRequires: docbook-style-xsl
BuildRequires: gettext >= %{gettext_version} BuildRequires: gettext >= %{gettext_version}
BuildRequires: meson BuildRequires: gtk-doc
BuildRequires: vala BuildRequires: krb5-devel
BuildRequires: /usr/bin/desktop-file-validate BuildRequires: pkgconfig(webkit2gtk-4.0) >= %{webkit2gtk3_version}
%if !0%{?flatpak}
BuildRequires: /usr/bin/gi-docgen
BuildRequires: /usr/bin/xsltproc
BuildRequires: pkgconfig(gtk4) >= %{gtk4_version}
BuildRequires: pkgconfig(json-glib-1.0) BuildRequires: pkgconfig(json-glib-1.0)
BuildRequires: pkgconfig(libsecret-1) BuildRequires: pkgconfig(libsecret-1) >= 0.7
BuildRequires: pkgconfig(libsoup-3.0) >= %{libsoup_version} BuildRequires: pkgconfig(libsoup-2.4) >= %{libsoup_version}
BuildRequires: pkgconfig(rest-1.0) BuildRequires: pkgconfig(rest-0.7)
BuildRequires: pkgconfig(libxml-2.0) BuildRequires: pkgconfig(libxml-2.0)
%endif BuildRequires: vala
BuildRequires: make
BuildRequires: git
Requires: glib2%{?_isa} >= %{glib2_version} Requires: glib2%{?_isa} >= %{glib2_version}
%if !0%{?flatpak} Requires: gtk3%{?_isa} >= %{gtk3_version}
Requires: gtk4%{?_isa} >= %{gtk4_version} Requires: libsoup%{?_isa} >= %{libsoup_version}
Requires: libadwaita%{?_isa} >= %{libadwaita_version} Requires: webkit2gtk3%{?_isa} >= %{webkit2gtk3_version}
Requires: libsoup3%{?_isa} >= %{libsoup_version}
Requires: gvfs-goa
%endif
%description %description
GNOME Online Accounts provides interfaces so that applications and libraries GNOME Online Accounts provides interfaces so that applications and libraries
in GNOME can access the user's online accounts. It has providers for Google, in GNOME can access the user's online accounts. It has providers for Google,
Nextcloud, Flickr, Foursquare, Microsoft Account, Microsoft Exchange, Fedora, Nextcloud, Microsoft Account, Microsoft Exchange, Fedora, IMAP/SMTP and
IMAP/SMTP and Kerberos. Kerberos.
%package devel %package devel
Summary: Development files for %{name} Summary: Development files for %{name}
@ -75,236 +61,88 @@ The %{name}-devel package contains libraries and header files for
developing applications that use %{name}. developing applications that use %{name}.
%prep %prep
%autosetup -p1 %autosetup -S git
%build %build
%meson \ %configure \
%if 0%{?flatpak} --disable-facebook \
-Dgoabackend=false \ --disable-flickr \
%else --disable-foursquare \
-Dfedora=true \ --disable-lastfm \
%endif --disable-media-server \
%{nil} --disable-silent-rules \
--disable-static \
%meson_build --enable-compile-warnings=yes \
--enable-documentation \
--enable-fedora \
--enable-exchange \
--enable-google \
--enable-gtk-doc \
--enable-imap-smtp \
--enable-kerberos \
--enable-owncloud \
--enable-windows-live
%make_build
%install %install
%meson_install %make_install
find $RPM_BUILD_ROOT -name '*.la' -delete
%find_lang %{name} %find_lang %{name}
%check %ldconfig_scriptlets
%if !0%{?flatpak}
desktop-file-validate %{buildroot}/%{_datadir}/applications/org.gnome.OnlineAccounts.OAuth2.desktop
%endif
%files -f %{name}.lang %files -f %{name}.lang
%license COPYING %license COPYING
%doc NEWS README.md %doc COPYING
%dir %{_libdir}/girepository-1.0 %dir %{_libdir}/girepository-1.0
%{_libdir}/girepository-1.0/Goa-1.0.typelib %{_libdir}/girepository-1.0/Goa-1.0.typelib
%{_libdir}/libgoa-1.0.so.0 %{_libdir}/libgoa-1.0.so.0
%{_libdir}/libgoa-1.0.so.0.0.0 %{_libdir}/libgoa-1.0.so.0.0.0
%if !0%{?flatpak} %{_libdir}/libgoa-backend-1.0.so.1
%{_libdir}/libgoa-backend-1.0.so.2 %{_libdir}/libgoa-backend-1.0.so.1.0.0
%{_libdir}/libgoa-backend-1.0.so.2.0.0
%dir %{_libdir}/goa-1.0 %dir %{_libdir}/goa-1.0
%{_mandir}/man8/goa-daemon.8* %dir %{_libdir}/goa-1.0/web-extensions
%{_libdir}/goa-1.0/web-extensions/libgoawebextension.so
%{_prefix}/libexec/goa-daemon %{_prefix}/libexec/goa-daemon
%{_prefix}/libexec/goa-identity-service %{_prefix}/libexec/goa-identity-service
%{_prefix}/libexec/goa-oauth2-handler
%{_datadir}/applications/org.gnome.OnlineAccounts.OAuth2.desktop
%{_datadir}/dbus-1/services/org.gnome.OnlineAccounts.service %{_datadir}/dbus-1/services/org.gnome.OnlineAccounts.service
%{_datadir}/dbus-1/services/org.gnome.Identity.service %{_datadir}/dbus-1/services/org.gnome.Identity.service
%{_datadir}/glib-2.0/schemas/org.gnome.online-accounts.gschema.xml
%endif
%{_datadir}/icons/hicolor/*/apps/goa-*.svg %{_datadir}/icons/hicolor/*/apps/goa-*.svg
%{_datadir}/man/man8/goa-daemon.8*
%{_datadir}/glib-2.0/schemas/org.gnome.online-accounts.gschema.xml
%files devel %files devel
%{_includedir}/goa-1.0/ %{_includedir}/goa-1.0/
%{_libdir}/libgoa-1.0.so %{_libdir}/libgoa-1.0.so
%{_libdir}/libgoa-backend-1.0.so
%dir %{_datadir}/gir-1.0 %dir %{_datadir}/gir-1.0
%{_datadir}/gir-1.0/Goa-1.0.gir %{_datadir}/gir-1.0/Goa-1.0.gir
%{_libdir}/pkgconfig/goa-1.0.pc %{_libdir}/pkgconfig/goa-1.0.pc
%if !0%{?flatpak}
%{_libdir}/libgoa-backend-1.0.so
%{_libdir}/pkgconfig/goa-backend-1.0.pc %{_libdir}/pkgconfig/goa-backend-1.0.pc
%{_pkgdocdir}/Goa-1.0/ %dir %{_datadir}/gtk-doc
%endif %dir %{_datadir}/gtk-doc/html
%{_datadir}/gtk-doc/html/goa/
%{_libdir}/goa-1.0/include %{_libdir}/goa-1.0/include
%{_datadir}/vala/ %{_datadir}/vala/
%changelog %changelog
* Wed Feb 12 2025 Dmitriy Samoylik <samoylikdv@msvsphere-os.ru> - 3.53.1-3.inferit * Tue Jun 06 2023 Ray Strode <rstrode@redhat.com> - 3.40.0-3
- Added yandex provider - Backport various kerberos fixes from upstream
Resolves: #2177765
* Tue Feb 11 2025 Dmitriy Samoylik <samoylikdv@msvsphere-os.ru> - 3.53.1-3
- Rebuilt for MSVSphere 10
## START: Generated by rpmautospec
* Mon Feb 03 2025 Gwyn Ciesla <gwync@protonmail.com> - 3.53.1-2
- 3.53.1
* Mon Feb 03 2025 nmontero <nmontero@redhat.com> - 3.53.1-1
- Update to 3.53.1
* Thu Jan 16 2025 Fedora Release Engineering <releng@fedoraproject.org> - 3.53.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Mon Jan 13 2025 nmontero <nmontero@redhat.com> - 3.53.0-1
- Update to 3.53.0
* Mon Nov 25 2024 Gwyn Ciesla <gwync@protonmail.com> - 3.52.2-2
- 3.52.2
* Mon Nov 25 2024 nmontero <nmontero@redhat.com> - 3.52.2-1
- Update to 3.52.2
* Sun Oct 20 2024 David King <amigadave@amigadave.com> - 3.52.1-1
- Update to 3.52.1
* Wed Sep 25 2024 Yaakov Selkowitz <yselkowi@redhat.com> - 3.52.0-2
- Disable docs in flatpak builds
* Mon Sep 16 2024 Gwyn Ciesla <gwync@protonmail.com> - 3.52.0-1
- 3.52.0
* Sun Sep 01 2024 David King <amigadave@amigadave.com> - 3.51.3-1
- Update to 3.51.3
* Thu Aug 22 2024 David King <amigadave@amigadave.com> - 3.51.2-2
- Update to 3.51.2
* Thu Aug 22 2024 David King <amigadave@amigadave.com> - 3.51.2-1
- Update to 3.51.2
* Mon Aug 05 2024 nmontero <nmontero@redhat.com> - 3.51.1-1
- Update to 3.51.1
* Thu Jul 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.51.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Thu Jul 04 2024 David King <amigadave@amigadave.com> - 3.51.0-1
- Update to 3.51.0
* Wed May 29 2024 David King <amigadave@amigadave.com> - 3.50.2-2
- Add license for icons
* Tue May 28 2024 David King <amigadave@amigadave.com> - 3.50.2-1
- Update to 3.50.2
* Fri Apr 12 2024 Gwyn Ciesla <gwync@protonmail.com> - 3.50.1-1
- 3.50.1
* Thu Apr 11 2024 Michael Catanzaro <mcatanzaro@redhat.com> - 3.50.0-4
- Remove redundant meson options
* Mon Apr 08 2024 Yaakov Selkowitz <yselkowi@redhat.com> - 3.50.0-3
- Fix flatpak build
* Mon Mar 18 2024 David King <amigadave@amigadave.com> - 3.50.0-1
- Update to 3.50.0
* Mon Mar 04 2024 David King <amigadave@amigadave.com> - 3.49.4-1 * Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 3.40.0-2
- Update to 3.49.4 - Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Tue Feb 13 2024 Gwyn Ciesla <gwync@protonmail.com> - 3.49.2-1
- 3.49.2
* Mon Feb 12 2024 Gwyn Ciesla <gwync@protonmail.com> - 3.49.1-1
- 3.49.1
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.49.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.49.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Thu Jan 11 2024 Tomas Popela <tpopela@redhat.com> - 3.49.0-2
- Don't require WebKitGTK anymore as GOA now spawns your default web browser
instead of using the web view
- Remove the RHEL patch for dropping Google Photos support as it has
been dropped upstream.
* Wed Jan 10 2024 Gwyn Ciesla <gwync@protonmail.com> - 3.49.0-1
- 3.49.0
* Tue Dec 12 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 3.48.0-4
- Fix build with libxml2 2.12
* Wed Oct 18 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 3.48.0-3
- Disable backend components in flatpak builds
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.48.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Sat Mar 18 2023 David King <amigadave@amigadave.com> - 3.48.0-1
- Update to 3.48.0
* Fri Mar 03 2023 Gwyn Ciesla <gwync@protonmail.com> - 3.47.1-4
- ...but not for flatpaks.
* Thu Mar 02 2023 Gwyn Ciesla <gwync@protonmail.com> - 3.47.1-3
- Require gvfs-goa
* Thu Mar 02 2023 Gwyn Ciesla <gwync@protonmail.com> - 3.47.1-2
- migrated to SPDX license
* Sun Feb 26 2023 Gwyn Ciesla <gwync@protonmail.com> - 3.47.1-1
- 3.47.1
* Fri Jan 20 2023 Ray Strode <rstrode@redhat.com> - 3.46.0-6
- Add more kerberos fixes from upstream
Related: #2152695
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.46.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Mon Dec 26 2022 FeRD (Frank Dana) <ferdnyc@gmail.com> - 3.46.0-4
- Restore gtk-doc API documentation to -devel.
* Thu Dec 15 2022 Gwyn Ciesla <gwync@protonmail.com> - 3.46.0-3
- Patches for KRB cache issues.
* Wed Nov 30 2022 Gwyn Ciesla <gwync@protonmail.com> - 3.46.0-2
- Patch for multiple credential cache issues.
* Mon Sep 19 2022 Gwyn Ciesla <gwync@protonmail.com> - 3.46.0-1
- 3.46.0
* Mon Aug 08 2022 Kalev Lember <klember@redhat.com> - 3.45.2-1
- Update to 3.45.2
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.45.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Tue Jul 19 2022 Kalev Lember <klember@redhat.com> - 3.45.1-1
- Update to 3.45.1
- Switch to meson build system
- Build against libsoup3
* Wed Mar 30 2022 Debarshi Ray <rishi@fedoraproject.org> - 3.44.0-1
- Update to 3.44.0
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.43.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Oct 15 2021 Debarshi Ray <rishi@fedoraproject.org> - 3.43.1-1
- Update to 3.43.1
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.40.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Tue Apr 27 2021 Debarshi Ray <rishi@fedoraproject.org> - 3.40.0-3
- Disable the Foursquare provider on RHEL 8 too
* Sat Apr 24 2021 Debarshi Ray <rishi@fedoraproject.org> - 3.40.0-2
- Disable the Flickr and Foursquare providers on RHEL >= 9
- Remove Photos support from the Google provider on RHEL >= 9
* Thu Apr 22 2021 Debarshi Ray <rishi@fedoraproject.org> - 3.40.0-1 * Thu Apr 22 2021 Debarshi Ray <rishi@fedoraproject.org> - 3.40.0-1
- Update to 3.40.0 - Update to 3.40.0
- Disable the Facebook provider - Disable the Facebook, Flickr and Foursquare providers
- Remove Photos support from the Google provider
Resolves: #1913641
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 3.39.92-2
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Tue Mar 16 2021 Debarshi Ray <rishi@fedoraproject.org> - 3.39.92-1 * Tue Mar 16 2021 Debarshi Ray <rishi@fedoraproject.org> - 3.39.92-1
- Update to 3.39.92 - Update to 3.39.92
@ -828,4 +666,3 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/org.gnome.OnlineAcco
* Mon Jun 13 2011 Bastien Nocera <bnocera@redhat.com> 3.1.0-1 * Mon Jun 13 2011 Bastien Nocera <bnocera@redhat.com> 3.1.0-1
- First version - First version
## END: Generated by rpmautospec

Loading…
Cancel
Save