4 Commits

Author SHA256 Message Date
7c368f87bb Accepting request 1298875 from GNOME:Apps
- Update to version 0.10.2:
  + Rename Meson project to librest
- Changes from version 0.10.1:
  + Allow to use the CI to publish the release
  + Use G_DEFINE_QUARK when possible
- Changes from version 0.10.0:
  + Handle some potential problems in parsing oauth2 access tokens
  + Allow to use rest and rest-extras from a single header
  + Fix the declaration of the RestOAuth2Error quark function
  + Name the RestOAuth2Error enum
  + Fixes several annotation issues
- Drop patches merged upstream:
  + 0001-rest_proxy_call_sync-bail-out-if-no-payload.patch
  + 0002-Handle-some-potential-problems-in-parsing-oauth2-acc.patch
- Update URL and Source following upstream name changes. (forwarded request 1298433 from iznogood)

OBS-URL: https://build.opensuse.org/request/show/1298875
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/librest?expand=0&rev=32
2025-08-12 15:03:36 +00:00
ccfec69fa4 - Update to version 0.10.2:
+ Rename Meson project to librest
- Changes from version 0.10.1:
  + Allow to use the CI to publish the release
  + Use G_DEFINE_QUARK when possible
- Changes from version 0.10.0:
  + Handle some potential problems in parsing oauth2 access tokens
  + Allow to use rest and rest-extras from a single header
  + Fix the declaration of the RestOAuth2Error quark function
  + Name the RestOAuth2Error enum
  + Fixes several annotation issues
- Drop patches merged upstream:
  + 0001-rest_proxy_call_sync-bail-out-if-no-payload.patch
  + 0002-Handle-some-potential-problems-in-parsing-oauth2-acc.patch
- Update URL and Source following upstream name changes.

OBS-URL: https://build.opensuse.org/package/show/GNOME:Apps/librest?expand=0&rev=49
2025-08-11 14:15:58 +00:00
f9167d00bc Accepting request 1278255 from GNOME:Apps
Fix date format in old changelog entries (forwarded request 1277786 from dimstar)

OBS-URL: https://build.opensuse.org/request/show/1278255
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/librest?expand=0&rev=31
2025-05-23 12:28:29 +00:00
3b4cc1baa8 Fix date format in old changelog entries
OBS-URL: https://build.opensuse.org/package/show/GNOME:Apps/librest?expand=0&rev=47
2025-05-18 09:30:16 +00:00
6 changed files with 28 additions and 109 deletions

View File

@@ -1,40 +0,0 @@
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

View File

@@ -1,52 +0,0 @@
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

3
librest-0.10.2.tar.xz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7b6cb912bb3a22cfa7dcf005925dcb62883024db0c09099486e7d6851185c9b8
size 71936

View File

@@ -1,3 +1,22 @@
-------------------------------------------------------------------
Fri Aug 8 18:19:09 UTC 2025 - Bjørn Lie <bjorn.lie@gmail.com>
- Update to version 0.10.2:
+ Rename Meson project to librest
- Changes from version 0.10.1:
+ Allow to use the CI to publish the release
+ Use G_DEFINE_QUARK when possible
- Changes from version 0.10.0:
+ Handle some potential problems in parsing oauth2 access tokens
+ Allow to use rest and rest-extras from a single header
+ Fix the declaration of the RestOAuth2Error quark function
+ Name the RestOAuth2Error enum
+ Fixes several annotation issues
- Drop patches merged upstream:
+ 0001-rest_proxy_call_sync-bail-out-if-no-payload.patch
+ 0002-Handle-some-potential-problems-in-parsing-oauth2-acc.patch
- Update URL and Source following upstream name changes.
-------------------------------------------------------------------
Sun Feb 26 20:28:38 UTC 2023 - Luciano Santos <luc14n0@opensuse.org>
@@ -296,9 +315,7 @@ Tue Dec 29 02:00:13 UTC 2009 - glin@novell.com
-------------------------------------------------------------------
Fri Nov 6 07:51:03 UTC 2009 - glin@novell.com
- Upddate to 0.6.1
-------------------------------------------------------------------
- Update to 0.6.1
* 四 7月 16 2009 Gary Lin <glin@novell.com> 0.520090716
- Update to commit ff4561e2a8c38f49127f6e3b2ce7c238a29e1571

View File

@@ -1,7 +1,7 @@
#
# spec file for package librest
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2025 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,25 +16,19 @@
#
%define _name rest
%define sover 0
%define abi 1.0
%define abi_pkg 1_0
%define libname librest-%{abi_pkg}-%{sover}
Name: librest
Version: 0.9.1
Version: 0.10.2
Release: 0
Summary: Library to access RESTful web services
License: LGPL-2.1-only
Group: Development/Libraries/GNOME
URL: http://git.gnome.org/browse/librest/
Source0: http://download.gnome.org/sources/rest/0.9/%{_name}-%{version}.tar.xz
URL: https://gitlab.gnome.org/GNOME/librest
Source0: http://download.gnome.org/sources/%{name}/0.10/%{name}-%{version}.tar.xz
Source99: baselibs.conf
# PATCH-FIX-UPSTREAM 0001-rest_proxy_call_sync-bail-out-if-no-payload.patch -- rest_proxy_call_sync: bail out if no payload
Patch0: 0001-rest_proxy_call_sync-bail-out-if-no-payload.patch
# PATCH-FIX-UPSTREAM 0002-Handle-some-potential-problems-in-parsing-oauth2-acc.patch -- Handle some potential problems in parsing oauth2 access tokens
Patch1: 0002-Handle-some-potential-problems-in-parsing-oauth2-acc.patch
BuildRequires: gtk-doc
BuildRequires: meson
@@ -103,7 +97,7 @@ service should have urls that represent remote objects, which methods
can then be called on.
%prep
%autosetup -p1 -n %{_name}-%{version}
%autosetup -p1
%build
# We should be able to pass both these (though just the first should be needed) - it fails the build however

Binary file not shown.