From 312b6ab2bb5f28dbaa1d089d6808839c9da62d22 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Sat, 24 Apr 2021 02:06:02 +0200 Subject: [PATCH] Upstream some changes from RHEL 9 Disable the Flickr and Foursquare providers. The Grilo code used for Flickr support has code quality issues; and Foursquare is only used by GNOME Maps which isn't part of RHEL 9. Remove Photos support from the Google provider because the PicasaWeb API implemented in libgdata no longer works. --- 0001-google-Remove-Photos-support.patch | 86 +++++++++++++++++++++++++ gnome-online-accounts.spec | 24 ++++++- 2 files changed, 107 insertions(+), 3 deletions(-) create mode 100644 0001-google-Remove-Photos-support.patch diff --git a/0001-google-Remove-Photos-support.patch b/0001-google-Remove-Photos-support.patch new file mode 100644 index 0000000..c554e5e --- /dev/null +++ b/0001-google-Remove-Photos-support.patch @@ -0,0 +1,86 @@ +From f17c21fc97e465b86ed27acceeea331624e66cd6 Mon Sep 17 00:00:00 2001 +From: Debarshi Ray +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 + diff --git a/gnome-online-accounts.spec b/gnome-online-accounts.spec index 0c6d3c4..6667b35 100644 --- a/gnome-online-accounts.spec +++ b/gnome-online-accounts.spec @@ -6,7 +6,7 @@ Name: gnome-online-accounts Version: 3.40.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Single sign-on framework for GNOME License: LGPLv2+ @@ -16,6 +16,11 @@ Source0: https://download.gnome.org/sources/gnome-online-accounts/3.40/%{name}-% # https://pagure.io/fedora-workstation/issue/83 Patch0: 0001-Remove-Documents-support.patch +# RHEL >=9 specific +# https://gitlab.gnome.org/GNOME/gnome-online-accounts/-/issues/63 +# https://bugzilla.redhat.com/show_bug.cgi?id=1913641 +Patch1: 0001-google-Remove-Photos-support.patch + BuildRequires: pkgconfig(gcr-3) BuildRequires: pkgconfig(gio-2.0) >= %{glib2_version} BuildRequires: pkgconfig(glib-2.0) >= %{glib2_version} @@ -57,8 +62,19 @@ developing applications that use %{name}. %setup -q %patch0 -p1 +%if 0%{?rhel} >= 9 +%patch1 -p1 +%endif + %build %configure \ +%if 0%{?fedora} || 0%{?rhel} < 9 + --enable-flickr \ + --enable-foursquare \ +%else + --disable-flickr \ + --disable-foursquare \ +%endif --disable-facebook \ --disable-lastfm \ --disable-media-server \ @@ -66,9 +82,7 @@ developing applications that use %{name}. --disable-static \ --enable-documentation \ --enable-fedora \ - --enable-foursquare \ --enable-exchange \ - --enable-flickr \ --enable-google \ --enable-gtk-doc \ --enable-imap-smtp \ @@ -120,6 +134,10 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %{_datadir}/vala/ %changelog +* Sat Apr 24 2021 Debarshi Ray - 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 - 3.40.0-1 - Update to 3.40.0 - Disable the Facebook provider