Compare commits

..

No commits in common. "c9s" and "c8s" have entirely different histories.
c9s ... c8s

6 changed files with 109 additions and 108 deletions

38
.gitignore vendored
View File

@ -1,38 +1,2 @@
libgdata-0.6.4.tar.bz2 SOURCES/libgdata-0.17.9.tar.xz
/libgdata-0.7.0.tar.bz2
/libgdata-0.8.0.tar.bz2
/libgdata-0.8.1.tar.bz2
/libgdata-0.9.0.tar.xz
/libgdata-0.9.1.tar.bz2
/libgdata-0.9.1.tar.xz
/libgdata-0.10.0.tar.xz
/libgdata-0.10.1.tar.xz
/libgdata-0.11.0.tar.xz
/libgdata-0.11.1.tar.xz
/libgdata-0.12.0.tar.xz
/libgdata-0.13.0.tar.xz
/libgdata-0.13.1.tar.xz
/libgdata-0.13.2.tar.xz
/libgdata-0.13.3.tar.xz
/libgdata-0.13.4.tar.xz
/libgdata-0.14.0.tar.xz
/libgdata-0.15.0.tar.xz
/libgdata-0.15.1.tar.xz
/libgdata-0.15.2.tar.xz
/libgdata-0.16.0.tar.xz
/libgdata-0.16.1.tar.xz
/libgdata-0.17.1.tar.xz
/libgdata-0.17.2.tar.xz
/libgdata-0.17.3.tar.xz
/libgdata-0.17.4.tar.xz
/libgdata-0.17.5.tar.xz
/libgdata-0.17.6.tar.xz
/libgdata-0.17.7.tar.xz
/libgdata-0.17.8.tar.xz
/libgdata-0.17.9.tar.xz /libgdata-0.17.9.tar.xz
/libgdata-0.17.10.tar.xz
/libgdata-0.17.11.tar.xz
/libgdata-0.17.12.tar.xz
/libgdata-0.17.13.tar.xz
/libgdata-0.18.0.tar.xz
/libgdata-0.18.1.tar.xz

View File

@ -1 +0,0 @@
83884ff5defe2c1b3a5f9586d615e21474b608e5 libgdata-0.18.1.tar.xz

View File

@ -0,0 +1,84 @@
From 62a30455c32bdfb2a113d4708ba8dba57decc9e5 Mon Sep 17 00:00:00 2001
From: Ondrej Holy <oholy@redhat.com>
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

View File

@ -1,6 +1,6 @@
--- !Policy --- !Policy
product_versions: product_versions:
- rhel-9 - rhel-8
decision_context: osci_compose_gate decision_context: osci_compose_gate
rules: rules:
- !PassingTestCaseRule {test_case_name: desktop-qe.desktop-ci.tier1-gating.functional} - !PassingTestCaseRule {test_case_name: desktop-qe.desktop-ci.tier1-gating.functional}

View File

@ -1,14 +1,16 @@
Name: libgdata Name: libgdata
Version: 0.18.1 Version: 0.17.9
Release: 4%{?dist} Release: 4%{?dist}
Summary: Library for the GData protocol Summary: Library for the GData protocol
License: LGPLv2+ License: LGPLv2+
URL: https://wiki.gnome.org/Projects/libgdata URL: https://wiki.gnome.org/Projects/libgdata
Source0: https://download.gnome.org/sources/%{name}/0.18/%{name}-%{version}.tar.xz 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: gcr-devel
BuildRequires: gettext
BuildRequires: glib2-devel BuildRequires: glib2-devel
BuildRequires: gnome-online-accounts-devel BuildRequires: gnome-online-accounts-devel
BuildRequires: gobject-introspection-devel BuildRequires: gobject-introspection-devel
@ -16,10 +18,12 @@ BuildRequires: gtk-doc
%if ! 0%{?rhel} %if ! 0%{?rhel}
BuildRequires: uhttpmock-devel BuildRequires: uhttpmock-devel
%endif %endif
BuildRequires: intltool
BuildRequires: json-glib-devel BuildRequires: json-glib-devel
BuildRequires: liboauth-devel
BuildRequires: libsoup-devel BuildRequires: libsoup-devel
BuildRequires: libxml2-devel BuildRequires: libxml2-devel
BuildRequires: meson BuildRequires: vala-devel
BuildRequires: vala BuildRequires: vala
%if 0%{?fedora} %if 0%{?fedora}
@ -43,21 +47,17 @@ developing applications that use %{name}.
%autosetup -p1 %autosetup -p1
%build %build
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" %configure \
%meson \
%if 0%{?rhel} %if 0%{?rhel}
-Dalways_build_tests=false \ --disable-always-build-tests \
%else
-Dalways_build_tests=true \
%endif %endif
-Dinstalled_tests=false \ --disable-silent-rules \
-Dgtk_doc=true \ --disable-static
-Doauth1=disabled \ make %{?_smp_mflags} CFLAGS="$CFLAGS -fno-strict-aliasing"
%{nil}
%meson_build
%install %install
%meson_install %make_install
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
%find_lang gdata %find_lang gdata
@ -68,7 +68,9 @@ export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
#cd gdata/tests #cd gdata/tests
#./general #./general
%ldconfig_scriptlets %post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files -f gdata.lang %files -f gdata.lang
@ -88,59 +90,11 @@ export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
%{_datadir}/vala/ %{_datadir}/vala/
%changelog %changelog
* Sun Aug 22 2021 Debarshi Ray <rishi@fedoraproject.org> - 0.18.1-4 * Wed Jul 13 2022 Tomas Popela <tpopela@redhat.com> - 0.17.9-4
- Drop the unused BuildRequires on liboauth - Switch to using autosetup so we don't forget to apply patches (#2046098)
Resolves: #1996380
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 0.18.1-3 * Mon May 09 2022 Ondrej Holy <oholy@redhat.com> - 0.17.9-3
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags - Always refresh authorization when creating streams (#2046098)
Related: rhbz#1991688
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 0.18.1-2
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Fri Mar 05 2021 Kalev Lember <klember@redhat.com> - 0.18.1-1
- Update to 0.18.1
* Wed Feb 17 2021 Kalev Lember <klember@redhat.com> - 0.18.0-1
- Update to 0.18.0
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.17.13-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Sat Dec 12 2020 Debarshi Ray <rishi@fedoraproject.org> - 0.17.13-2
- Remove uhttpmock-devel from BuildRequires on RHEL 9
* Thu Sep 03 2020 Kalev Lember <klember@redhat.com> - 0.17.13-1
- Update to 0.17.13
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.17.12-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Thu Jul 16 2020 Merlin Mathesius <mmathesi@redhat.com> - 0.17.12-2
- Minor conditional fixes for ELN
* Mon Mar 02 2020 Kalev Lember <klember@redhat.com> - 0.17.12-1
- Update to 0.17.12
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.17.11-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Wed Aug 21 2019 Kalev Lember <klember@redhat.com> - 0.17.11-1
- Update to 0.17.11
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.17.10-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Mon Jul 08 2019 Kalev Lember <klember@redhat.com> - 0.17.10-1
- Update to 0.17.10
- Switch to the meson build system
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.17.9-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.17.9-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.17.9-2 * Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.17.9-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

View File

@ -1 +1 @@
SHA512 (libgdata-0.18.1.tar.xz) = 15ff708760ca5023b692fd565c26a7c3acf035073534c0cd3f1f90e46ee0c60d14dedf360d3ac146d37135e200d9c2bc4b657e81468d0efde4821a9219875b98 SHA512 (libgdata-0.17.9.tar.xz) = 90289309cbdc4ec6932bf385ddbfcc75c0c2f8b9ca356329298aaa37f6c3db7a16de20e5c947c16c595e43e729a664e4d6d3e2c5a60bb1e463a13d1306f374ce