commit 428304f6bb2326b6141bc17fc20d5c5e5de083b9 Author: CentOS Sources Date: Tue Nov 8 01:36:08 2022 -0500 import libgdata-0.17.9-4.el8 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bc29ac9 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/libgdata-0.17.9.tar.xz diff --git a/.libgdata.metadata b/.libgdata.metadata new file mode 100644 index 0000000..7b44c0d --- /dev/null +++ b/.libgdata.metadata @@ -0,0 +1 @@ +942a98ae334d5ac97a041519d64ea48ddc654016 SOURCES/libgdata-0.17.9.tar.xz diff --git a/SOURCES/core-Always-refresh-authorization-when-creating-stre.patch b/SOURCES/core-Always-refresh-authorization-when-creating-stre.patch new file mode 100644 index 0000000..1de345b --- /dev/null +++ b/SOURCES/core-Always-refresh-authorization-when-creating-stre.patch @@ -0,0 +1,84 @@ +From 62a30455c32bdfb2a113d4708ba8dba57decc9e5 Mon Sep 17 00:00:00 2001 +From: Ondrej Holy +Date: Mon, 20 Jan 2020 13:51:20 +0100 +Subject: [PATCH] core: Always refresh authorization when creating streams + +Non-resumable upload streams quite often fail with authorization errors +as we are probably hitting some limits. The only way currently to deal +with them is to refresh authorization manually and upload everything +again as it is not possible to resume the transfer. This is big issue +for streaming operations provided by GVfs. I have made several tests +and realized that if we explicitely refresh the authorization before +the transfer, then those authorization errors doesn't occur. So let's +always refresh the authorization when constructing the streams and do +the same for upload streams as well as they are also affected. In theory, +the resumable streams could solve this better, however they currently +require content size to be specified at the beginning, which is not +usable for the streaming operations in GVfs. + +Fixes: https://gitlab.gnome.org/GNOME/libgdata/issues/23 +--- + gdata/gdata-download-stream.c | 13 +++++++++++++ + gdata/gdata-upload-stream.c | 14 ++++++++++++++ + 2 files changed, 27 insertions(+) + +diff --git a/gdata/gdata-download-stream.c b/gdata/gdata-download-stream.c +index 5bfd7048..a797de68 100644 +--- a/gdata/gdata-download-stream.c ++++ b/gdata/gdata-download-stream.c +@@ -855,11 +855,24 @@ static gpointer + download_thread (GDataDownloadStream *self) + { + GDataDownloadStreamPrivate *priv = self->priv; ++ GDataAuthorizer *authorizer; + + g_object_ref (self); + + g_assert (priv->network_cancellable != NULL); + ++ /* FIXME: Refresh authorization before sending message in order to prevent authorization errors during transfer. ++ * See: https://gitlab.gnome.org/GNOME/libgdata/issues/23 */ ++ authorizer = gdata_service_get_authorizer (priv->service); ++ if (authorizer) { ++ g_autoptr(GError) error = NULL; ++ ++ gdata_authorizer_refresh_authorization (authorizer, priv->cancellable, &error); ++ if (error != NULL) ++ g_debug ("Error returned when refreshing authorization: %s", error->message); ++ else ++ gdata_authorizer_process_request (authorizer, priv->authorization_domain, priv->message); ++ } + /* Connect to the got-headers signal so we can notify clients of the values of content-type and content-length */ + g_signal_connect (priv->message, "got-headers", (GCallback) got_headers_cb, self); + g_signal_connect (priv->message, "got-chunk", (GCallback) got_chunk_cb, self); +diff --git a/gdata/gdata-upload-stream.c b/gdata/gdata-upload-stream.c +index 85807fec..85738fd3 100644 +--- a/gdata/gdata-upload-stream.c ++++ b/gdata/gdata-upload-stream.c +@@ -1147,9 +1147,23 @@ static gpointer + upload_thread (GDataUploadStream *self) + { + GDataUploadStreamPrivate *priv = self->priv; ++ GDataAuthorizer *authorizer; + + g_assert (priv->cancellable != NULL); + ++ /* FIXME: Refresh authorization before sending message in order to prevent authorization errors during transfer. ++ * See: https://gitlab.gnome.org/GNOME/libgdata/issues/23 */ ++ authorizer = gdata_service_get_authorizer (priv->service); ++ if (authorizer) { ++ g_autoptr(GError) error = NULL; ++ ++ gdata_authorizer_refresh_authorization (authorizer, priv->cancellable, &error); ++ if (error != NULL) ++ g_debug ("Error returned when refreshing authorization: %s", error->message); ++ else ++ gdata_authorizer_process_request (authorizer, priv->authorization_domain, priv->message); ++ } ++ + while (TRUE) { + GDataServiceClass *klass; + gulong wrote_headers_signal, wrote_body_data_signal; +-- +2.36.0 + diff --git a/SPECS/libgdata.spec b/SPECS/libgdata.spec new file mode 100644 index 0000000..8c2af14 --- /dev/null +++ b/SPECS/libgdata.spec @@ -0,0 +1,322 @@ +Name: libgdata +Version: 0.17.9 +Release: 4%{?dist} +Summary: Library for the GData protocol + +License: LGPLv2+ +URL: https://wiki.gnome.org/Projects/libgdata +Source0: https://download.gnome.org/sources/%{name}/0.17/%{name}-%{version}.tar.xz + +# https://bugzilla.redhat.com/show_bug.cgi?id=2046098 +Patch0: core-Always-refresh-authorization-when-creating-stre.patch + +BuildRequires: gcr-devel +BuildRequires: glib2-devel +BuildRequires: gnome-online-accounts-devel +BuildRequires: gobject-introspection-devel +BuildRequires: gtk-doc +%if ! 0%{?rhel} +BuildRequires: uhttpmock-devel +%endif +BuildRequires: intltool +BuildRequires: json-glib-devel +BuildRequires: liboauth-devel +BuildRequires: libsoup-devel +BuildRequires: libxml2-devel +BuildRequires: vala-devel +BuildRequires: vala + +%if 0%{?fedora} +Obsoletes: compat-libgdata19 < 0.17.1 +%endif + +%description +libgdata is a GLib-based library for accessing online service APIs using the +GData protocol --- most notably, Google's services. It provides APIs to access +the common Google services, and has full asynchronous support. + +%package devel +Summary: Development files for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and header files for +developing applications that use %{name}. + +%prep +%autosetup -p1 + +%build +%configure \ +%if 0%{?rhel} + --disable-always-build-tests \ +%endif + --disable-silent-rules \ + --disable-static +make %{?_smp_mflags} CFLAGS="$CFLAGS -fno-strict-aliasing" + +%install +%make_install +find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' + +%find_lang gdata + + +%check +# Only the general test can be run without network access +# Actually, the general test doesn't work either without gconf +#cd gdata/tests +#./general + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + + +%files -f gdata.lang +%license COPYING +%doc NEWS README AUTHORS +%{_libdir}/libgdata.so.22* +%dir %{_libdir}/girepository-1.0 +%{_libdir}/girepository-1.0/GData-0.0.typelib + +%files devel +%{_includedir}/* +%{_libdir}/libgdata.so +%{_libdir}/pkgconfig/%{name}.pc +%{_datadir}/gtk-doc/ +%dir %{_datadir}/gir-1.0 +%{_datadir}/gir-1.0/GData-0.0.gir +%{_datadir}/vala/ + +%changelog +* Wed Jul 13 2022 Tomas Popela - 0.17.9-4 +- Switch to using autosetup so we don't forget to apply patches (#2046098) + +* Mon May 09 2022 Ondrej Holy - 0.17.9-3 +- Always refresh authorization when creating streams (#2046098) + +* Wed Feb 07 2018 Fedora Release Engineering - 0.17.9-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Aug 24 2017 Kalev Lember - 0.17.9-1 +- Update to 0.17.9 + +* Thu Aug 03 2017 Fedora Release Engineering - 0.17.8-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 0.17.8-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Thu Apr 20 2017 Kalev Lember - 0.17.8-1 +- Update to 0.17.8 + +* Mon Mar 06 2017 Kalev Lember - 0.17.7-1 +- Update to 0.17.7 + +* Fri Feb 10 2017 Fedora Release Engineering - 0.17.6-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Wed Oct 19 2016 Kalev Lember - 0.17.6-3 +- Fix RHEL 7 build + +* Thu Sep 22 2016 Kalev Lember - 0.17.6-2 +- BR vala instead of obsolete vala-tools subpackage + +* Wed Sep 21 2016 Kalev Lember - 0.17.6-1 +- Update to 0.17.6 +- Don't set group tags +- Co-own gir directories instead of depending on gobject-introspection +- Use make_install macro +- Update project URLs + +* Mon Sep 12 2016 Debarshi Ray - 0.17.5-2 +- Backport fix for crashes with zero-length files (GNOME #769727) + +* Thu Jun 30 2016 Kalev Lember - 0.17.5-1 +- Update to 0.17.5 + +* Thu Feb 04 2016 Fedora Release Engineering - 0.17.4-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Mon Jan 25 2016 Debarshi Ray - 0.17.4-2 +- Backport fix for opening PDFs from Google Drive (GNOME #759180) + +* Mon Dec 14 2015 Kalev Lember - 0.17.4-1 +- Update to 0.17.4 + +* Mon Sep 14 2015 Kalev Lember - 0.17.3-1 +- Update to 0.17.3 + +* Fri Jul 10 2015 Kalev Lember - 0.17.2-1 +- Update to 0.17.2 +- Use license macro for COPYING + +* Wed Jun 17 2015 Fedora Release Engineering - 0.17.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Thu May 28 2015 Debarshi Ray - 0.17.1-2 +- Obsolete the compatibility package + +* Fri Apr 24 2015 Debarshi Ray - 0.17.1-1 +- Update to 0.17.1 + +* Mon Nov 10 2014 Kalev Lember - 0.16.1-1 +- Update to 0.16.1 + +* Mon Nov 03 2014 Kalev Lember - 0.16.0-2 +- Fix the build on RHEL + +* Thu Sep 18 2014 Kalev Lember - 0.16.0-1 +- Update to 0.16.0 + +* Sun Aug 17 2014 Fedora Release Engineering - 0.15.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sun Aug 10 2014 Kalev Lember - 0.15.2-1 +- Update to 0.15.2 +- Tighten -devel deps with the _isa macro + +* Tue Jul 22 2014 Kalev Lember - 0.15.1-3 +- Rebuilt for gobject-introspection 1.41.4 + +* Sat Jun 07 2014 Fedora Release Engineering - 0.15.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Wed May 28 2014 Kalev Lember - 0.15.1-1 +- Update to 0.15.1 + +* Wed Jan 08 2014 Richard Hughes - 0.15.0-1 +- Update to 0.15.0 + +* Thu Aug 29 2013 Kalev Lember - 0.14.0-1 +- Update to 0.14.0 + +* Sat Aug 10 2013 Kalev Lember - 0.13.4-1 +- Update to 0.13.4 + +* Sat Aug 03 2013 Fedora Release Engineering - 0.13.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Tue Jul 16 2013 Matthias Clasen - 0.13.3-2 +- Disable strict aliasing, since the code is not strict-aliasing-clean + +* Tue Feb 26 2013 Kalev Lember - 0.13.3-1 +- Update to 0.13.3 +- Add vala bindings + +* Tue Feb 19 2013 Bastien Nocera 0.13.2-3 +- Co-own the gtk-doc directory (#604382) + +* Thu Feb 14 2013 Fedora Release Engineering - 0.13.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Tue Oct 02 2012 Kalev Lember - 0.13.2-1 +- Update to 0.13.2 + +* Sun Aug 12 2012 Debarshi Ray - 0.13.1-2 +- Add BuildRequires: gcr-devel gnome-online-accounts-devel + +* Tue Jul 31 2012 Richard Hughes - 0.13.1-1 +- Update to 0.13.1 + +* Thu Jul 19 2012 Fedora Release Engineering - 0.13.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Fri May 18 2012 Richard Hughes - 0.13.0-1 +- Update to 0.13.0 + +* Tue Apr 17 2012 Kalev Lember - 0.12.0-1 +- Update to 0.12.0 + +* Thu Mar 15 2012 Matthias Clasen - 0.11.1-1 +- Update to 0.11.1 + +* Tue Jan 17 2012 Dan HorĂ¡k - 0.11.0-3 +- update BR + +* Fri Jan 13 2012 Fedora Release Engineering - 0.11.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Tue Dec 20 2011 Matthias Clasen - 0.11.0-1 +- Update to 0.11.0 + +* Mon Sep 19 2011 Matthias Clasen - 0.10.1-1 +- Update to 0.10.1 + +* Mon Jul 04 2011 Matthew Barnes 0.9.1-1 +- Update to 0.9.1 + +* Mon Jun 13 2011 Bastien Nocera 0.9.0-1 +- Update to 0.9.0 + +* Fri May 20 2011 Bastien Nocera 0.8.1-1 +- Update to 0.8.1 + +* Mon Feb 07 2011 Fedora Release Engineering - 0.8.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Mon Jan 17 2011 Bastien Nocera 0.8.0-1 +- Update to 0.8.0 + +* Mon Oct 18 2010 Bastien Nocera 0.7.0-1 +- Update to 0.7.0 + +* Wed Sep 29 2010 jkeating - 0.6.4-6 +- Rebuilt for gcc bug 634757 + +* Wed Sep 22 2010 Matthias Clasen - 0.6.4-5 +- Rebuild with newer gobject-introspection +- Disable tests + +* Thu Jul 15 2010 Colin Walters - 0.6.4-4 +- Rebuild with new gobject-introspection +- Drop gir-repository-devel + +* Mon Jul 12 2010 Colin Walters - 0.6.4-2 +- Rebuild against new gobject-introspection + +* Thu Apr 08 2010 Bastien Nocera 0.6.4-1 +- Update to 0.6.4 + +* Wed Feb 17 2010 Bastien Nocera 0.6.1-2 +- Rebuild to update F-13 tag + +* Wed Feb 17 2010 Bastien Nocera 0.6.1-1 +- Update to 0.6.1 + +* Mon Feb 15 2010 Bastien Nocera 0.6.0-1 +- Update to 0.6.0 +- Add introspection support + +* Sun Nov 22 2009 Bastien Nocera 0.5.1-1 +- Update to 0.5.1 +- Fixes queries with non-ASCII characters + +* Tue Sep 22 2009 Bastien Nocera 0.5.0-1 +- Update to 0.5.0 + +* Tue Aug 11 2009 Bastien Nocera 0.4.0-3 +- Fix source URL + +* Fri Jul 24 2009 Fedora Release Engineering - 0.4.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Mon Jul 20 2009 Bastien Nocera 0.4.0-1 +- Update to 0.4.0 + +* Tue May 26 2009 Bastien Nocera 0.3.0-1 +- Update to 0.3.0 + +* Sat Apr 25 2009 Bastien Nocera 0.2.0-1 +- Update to 0.2.0 + +* Mon Apr 06 2009 - Bastien Nocera - 0.1.1-2 +- Add check, snippet from Jason Tibbitts + +* Wed Apr 01 2009 - Bastien Nocera - 0.1.1-1 +- Update to 0.1.1 + +* Wed Apr 01 2009 - Bastien Nocera - 0.1.0-1 +- First package +