Compare commits
No commits in common. "c8" and "c10s" have entirely different histories.
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
|||||||
SOURCES/rest-0.8.1.tar.xz
|
/rest-0.*.tar.xz
|
||||||
|
|||||||
@ -1 +0,0 @@
|
|||||||
602c81cfd088b3a06311d01c01954ae67c47b95d SOURCES/rest-0.8.1.tar.xz
|
|
||||||
40
0001-rest_proxy_call_sync-bail-out-if-no-payload.patch
Normal file
40
0001-rest_proxy_call_sync-bail-out-if-no-payload.patch
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
From fbad64abe28a96f591a30e3a5d3189c10172a414 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Adam Williamson <awilliam@redhat.com>
|
||||||
|
Date: Tue, 30 Aug 2022 10:03:57 -0700
|
||||||
|
Subject: [PATCH 1/2] rest_proxy_call_sync: bail out if no payload
|
||||||
|
|
||||||
|
goa-daemon is crashing on suspend/resume with a traceback that
|
||||||
|
points here: it calls rest_proxy_call_sync, that calls
|
||||||
|
_rest_proxy_send_message, assumes it gets a `payload` back,
|
||||||
|
and calls `finish_call` with it. However, it's not actually
|
||||||
|
guaranteed that `_rest_proxy_send_message` will return a payload
|
||||||
|
(a `GBytes`). There are three ways it can return `NULL` instead:
|
||||||
|
if it's passed a wrong proxy or message, or - when built against
|
||||||
|
libsoup3 - if there is an error sending the message (it passes
|
||||||
|
through the return value of `soup_session_send_and_read`, and
|
||||||
|
that's documented to be `NULL` on error).
|
||||||
|
|
||||||
|
If `payload` comes back `NULL`, let's just return `FALSE`, like
|
||||||
|
we do if there's a problem with the call or message.
|
||||||
|
|
||||||
|
Signed-off-by: Adam Williamson <awilliam@redhat.com>
|
||||||
|
---
|
||||||
|
rest/rest-proxy-call.c | 2 ++
|
||||||
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/rest/rest-proxy-call.c b/rest/rest-proxy-call.c
|
||||||
|
index 851b397..07b8b49 100644
|
||||||
|
--- a/rest/rest-proxy-call.c
|
||||||
|
+++ b/rest/rest-proxy-call.c
|
||||||
|
@@ -1428,6 +1428,8 @@ rest_proxy_call_sync (RestProxyCall *call,
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
payload = _rest_proxy_send_message (priv->proxy, message, priv->cancellable, error_out);
|
||||||
|
+ if (!payload)
|
||||||
|
+ return FALSE;
|
||||||
|
|
||||||
|
ret = finish_call (call, message, payload, error_out);
|
||||||
|
|
||||||
|
--
|
||||||
|
2.37.1
|
||||||
|
|
||||||
@ -0,0 +1,52 @@
|
|||||||
|
From 49c2d0ac00b959ce53cc00ca4e7758c21085722f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Adam Williamson <awilliam@redhat.com>
|
||||||
|
Date: Tue, 30 Aug 2022 10:59:01 -0700
|
||||||
|
Subject: [PATCH 2/2] Handle some potential problems in parsing oauth2 access
|
||||||
|
tokens
|
||||||
|
|
||||||
|
It's possible for `_rest_proxy_send_message` to return `NULL`,
|
||||||
|
which would mean the `payload` here would be `NULL`. If so,
|
||||||
|
we're not going to be able to do anything, so we should just
|
||||||
|
bail out.
|
||||||
|
|
||||||
|
It's also possible for `json_parser_load_from_data` to return
|
||||||
|
`FALSE` without setting an error. The most obvious way would be
|
||||||
|
if `data` was `NULL`, which the bailout avoids, but it could
|
||||||
|
also happen if we pass an invalid parser somehow. Let's just
|
||||||
|
handle that too, to be safe.
|
||||||
|
|
||||||
|
Signed-off-by: Adam Williamson <awilliam@redhat.com>
|
||||||
|
---
|
||||||
|
rest/rest-oauth2-proxy.c | 5 ++++-
|
||||||
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/rest/rest-oauth2-proxy.c b/rest/rest-oauth2-proxy.c
|
||||||
|
index 9511f97..a715b2b 100644
|
||||||
|
--- a/rest/rest-oauth2-proxy.c
|
||||||
|
+++ b/rest/rest-oauth2-proxy.c
|
||||||
|
@@ -68,18 +68,21 @@ rest_oauth2_proxy_parse_access_token (RestOAuth2Proxy *self,
|
||||||
|
gsize size;
|
||||||
|
gint expires_in;
|
||||||
|
gint created_at;
|
||||||
|
+ gboolean ret;
|
||||||
|
|
||||||
|
g_return_if_fail (REST_IS_OAUTH2_PROXY (self));
|
||||||
|
+ g_return_if_fail (payload);
|
||||||
|
|
||||||
|
data = g_bytes_get_data (payload, &size);
|
||||||
|
|
||||||
|
parser = json_parser_new ();
|
||||||
|
- json_parser_load_from_data (parser, data, size, &error);
|
||||||
|
+ ret = json_parser_load_from_data (parser, data, size, &error);
|
||||||
|
if (error != NULL)
|
||||||
|
{
|
||||||
|
g_task_return_error (task, error);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
+ g_return_if_fail (ret);
|
||||||
|
|
||||||
|
root = json_parser_get_root (parser);
|
||||||
|
root_object = json_node_get_object (root);
|
||||||
|
--
|
||||||
|
2.37.1
|
||||||
|
|
||||||
6
gating.yaml
Normal file
6
gating.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
--- !Policy
|
||||||
|
product_versions:
|
||||||
|
- rhel-10
|
||||||
|
decision_context: osci_compose_gate
|
||||||
|
rules:
|
||||||
|
- !PassingTestCaseRule {test_case_name: desktop-qe.desktop-ci.tier1-gating.functional}
|
||||||
@ -1,17 +1,28 @@
|
|||||||
Name: rest
|
Name: rest
|
||||||
Version: 0.8.1
|
Version: 0.9.1
|
||||||
Release: 3%{?dist}
|
Release: 11%{?dist}
|
||||||
Summary: A library for access to RESTful web services
|
Summary: A library for access to RESTful web services
|
||||||
|
|
||||||
License: LGPLv2
|
License: LGPL-2.1-only
|
||||||
URL: http://www.gnome.org
|
URL: https://gitlab.gnome.org/GNOME/librest
|
||||||
Source0: http://download.gnome.org/sources/%{name}/0.8/%{name}-%{version}.tar.xz
|
Source0: https://download.gnome.org/sources/%{name}/0.9/%{name}-%{version}.tar.xz
|
||||||
|
|
||||||
BuildRequires: glib2-devel
|
# Fix some crash paths exposed by the libsoup3 port, including a
|
||||||
BuildRequires: gobject-introspection-devel
|
# crash on suspend/resume with Google accounts:
|
||||||
BuildRequires: libsoup-devel
|
# https://gitlab.gnome.org/GNOME/librest/-/merge_requests/30
|
||||||
BuildRequires: libxml2-devel
|
Patch0: 0001-rest_proxy_call_sync-bail-out-if-no-payload.patch
|
||||||
BuildRequires: gtk-doc
|
Patch1: 0002-Handle-some-potential-problems-in-parsing-oauth2-acc.patch
|
||||||
|
|
||||||
|
BuildRequires: meson
|
||||||
|
BuildRequires: pkgconfig(glib-2.0)
|
||||||
|
BuildRequires: pkgconfig(gio-2.0)
|
||||||
|
BuildRequires: pkgconfig(gobject-introspection-1.0)
|
||||||
|
BuildRequires: pkgconfig(libsoup-3.0)
|
||||||
|
BuildRequires: pkgconfig(libxml-2.0)
|
||||||
|
BuildRequires: pkgconfig(json-glib-1.0)
|
||||||
|
BuildRequires: pkgconfig(libadwaita-1)
|
||||||
|
BuildRequires: pkgconfig(gtksourceview-5)
|
||||||
|
BuildRequires: pkgconfig(gi-docgen)
|
||||||
|
|
||||||
%description
|
%description
|
||||||
This library was designed to make it easier to access web services that
|
This library was designed to make it easier to access web services that
|
||||||
@ -29,47 +40,109 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
|
|||||||
%description devel
|
%description devel
|
||||||
Files for development with %{name}.
|
Files for development with %{name}.
|
||||||
|
|
||||||
|
%package demo
|
||||||
|
Summary: Demo application for %{name}
|
||||||
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
|
%description demo
|
||||||
|
Demo application for %{name}.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%autosetup -p1 -S gendiff
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure --disable-static --enable-gtk-doc --enable-introspection=yes
|
%meson
|
||||||
|
%meson_build
|
||||||
make %{?_smp_mflags} V=1
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
make install DESTDIR=%{buildroot} INSTALL='install -p'
|
%meson_install
|
||||||
|
|
||||||
#Remove libtool archives.
|
|
||||||
find %{buildroot} -type f -name "*.la" -delete
|
|
||||||
|
|
||||||
%post -p /sbin/ldconfig
|
|
||||||
|
|
||||||
%postun -p /sbin/ldconfig
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%license COPYING
|
%license COPYING
|
||||||
%doc AUTHORS README
|
%doc AUTHORS README.md
|
||||||
%{_libdir}/librest-0.7.so.0
|
%{_libdir}/librest-1.0.so.0*
|
||||||
%{_libdir}/librest-0.7.so.0.0.0
|
%{_libdir}/librest-extras-1.0.so.0*
|
||||||
%{_libdir}/librest-extras-0.7.so.0
|
%{_libdir}/girepository-1.0/Rest-1.0.typelib
|
||||||
%{_libdir}/librest-extras-0.7.so.0.0.0
|
%{_libdir}/girepository-1.0/RestExtras-1.0.typelib
|
||||||
%{_libdir}/girepository-1.0/Rest-0.7.typelib
|
|
||||||
%{_libdir}/girepository-1.0/RestExtras-0.7.typelib
|
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%{_includedir}/rest-0.7
|
%{_includedir}/rest-1.0/
|
||||||
%{_libdir}/pkgconfig/rest*
|
%{_libdir}/pkgconfig/rest-1.0.pc
|
||||||
%{_libdir}/librest-0.7.so
|
%{_libdir}/pkgconfig/rest-extras-1.0.pc
|
||||||
%{_libdir}/librest-extras-0.7.so
|
%{_libdir}/librest-1.0.so
|
||||||
%{_datadir}/gtk-doc/html/%{name}*0.7
|
%{_libdir}/librest-extras-1.0.so
|
||||||
%{_datadir}/gir-1.0/Rest-0.7.gir
|
%{_datadir}/doc/librest-1.0/
|
||||||
%{_datadir}/gir-1.0/RestExtras-0.7.gir
|
%{_datadir}/gir-1.0/Rest-1.0.gir
|
||||||
|
%{_datadir}/gir-1.0/RestExtras-1.0.gir
|
||||||
|
|
||||||
|
%files demo
|
||||||
|
%{_bindir}/librest-demo
|
||||||
|
%{_datadir}/applications/org.gnome.RestDemo.desktop
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Mon Oct 20 2025 Tomas Popela <tpopela@redhat.com> - 0.8.1-3
|
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 0.9.1-11
|
||||||
- Rebuild for shipping rest-devel in CRB
|
- Bump release for October 2024 mass rebuild:
|
||||||
- Resolves: RHEL-122462
|
Resolves: RHEL-64018
|
||||||
|
|
||||||
|
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 0.9.1-10
|
||||||
|
- Bump release for June 2024 mass rebuild
|
||||||
|
|
||||||
|
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.1-9
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.1-8
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.1-7
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.1-6
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Aug 30 2022 Adam Williamson <awilliam@redhat.com> - 0.9.1-5
|
||||||
|
- Backport MR #30 to fix some crashes in the libsoup3 port
|
||||||
|
|
||||||
|
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.1-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Jul 19 2022 Kalev Lember <klember@redhat.com> - 0.9.1-3
|
||||||
|
- Simplify files list a bit
|
||||||
|
- Split librest-demo out to a rest-demo subpackage
|
||||||
|
- Update source URLs
|
||||||
|
|
||||||
|
* Mon Jul 18 2022 Milan Crha <mcrha@redhat.com> - 0.9.1-1
|
||||||
|
- Update to 0.9.1
|
||||||
|
- Build against libsoup3
|
||||||
|
|
||||||
|
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.1-12
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sun Jan 16 2022 Peter Robinson <pbrobinson@fedoraproject.org> - 0.8.1-11
|
||||||
|
- Rebuild
|
||||||
|
|
||||||
|
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.1-10
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.1-9
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.1-8
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.1-7
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.1-6
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.1-5
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.1-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Jun 07 2018 Debarshi Ray <rishi@fedoraproject.org> - 0.8.1-3
|
||||||
|
- Fix the XML test
|
||||||
|
|
||||||
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.1-2
|
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.1-2
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||||
Loading…
Reference in New Issue
Block a user