Date: Tuesday, November 15, 2022 @ 22:42:05
Author: heftig
Revision: 461859
archrelease: copy trunk to extra-x86_64
Added:
librest/repos/extra-x86_64/30.patch
(from rev 461858, librest/trunk/30.patch)
librest/repos/extra-x86_64/PKGBUILD
(from rev 461858, librest/trunk/PKGBUILD)
Deleted:
librest/repos/extra-x86_64/PKGBUILD
----------+
30.patch | 73 ++++++++++++++++++++++++++++
PKGBUILD | 154 +++++++++++++++++++++++++++++++------------------------------
2 files changed, 153 insertions(+), 74 deletions(-)
Copied: librest/repos/extra-x86_64/30.patch (from rev 461858,
librest/trunk/30.patch)
===================================================================
--- 30.patch (rev 0)
+++ 30.patch 2022-11-15 22:42:05 UTC (rev 461859)
@@ -0,0 +1,73 @@
+From fbad64abe28a96f591a30e3a5d3189c10172a414 Mon Sep 17 00:00:00 2001
+From: Adam Williamson <[email protected]>
+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 <[email protected]>
+---
+ 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);
+
+--
+GitLab
+
+
+From 8049048a0f7d52b3f4101c7123797fed099d4cc8 Mon Sep 17 00:00:00 2001
+From: Adam Williamson <[email protected]>
+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.
+
+Signed-off-by: Adam Williamson <[email protected]>
+---
+ rest/rest-oauth2-proxy.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/rest/rest-oauth2-proxy.c b/rest/rest-oauth2-proxy.c
+index 9511f97..7d5780d 100644
+--- a/rest/rest-oauth2-proxy.c
++++ b/rest/rest-oauth2-proxy.c
+@@ -70,6 +70,8 @@ rest_oauth2_proxy_parse_access_token (RestOAuth2Proxy *self,
+ gint created_at;
+
+ g_return_if_fail (REST_IS_OAUTH2_PROXY (self));
++ if (!payload)
++ return;
+
+ data = g_bytes_get_data (payload, &size);
+
+--
+GitLab
+
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2022-11-15 22:41:56 UTC (rev 461858)
+++ PKGBUILD 2022-11-15 22:42:05 UTC (rev 461859)
@@ -1,74 +0,0 @@
-# Maintainer: Jan Alexander Steffens (heftig) <[email protected]>
-
-pkgbase=librest
-pkgname=(librest librest-docs librest-demos)
-pkgver=0.9.1
-pkgrel=1
-pkgdesc="Library for accessing RESTful web services"
-url="https://gitlab.gnome.org/GNOME/librest"
-arch=(x86_64)
-license=(LGPL)
-depends=(glib2 libxml2 libsoup3 json-glib)
-makedepends=(gobject-introspection git meson gi-docgen vala libadwaita
- gtksourceview5)
-options=(debug)
-_commit=aa9e968e381ede159414c6338da24d61ad0b5d8b # tags/0.9.1^0
-source=("git+https://gitlab.gnome.org/GNOME/librest.git#commit=$_commit")
-sha256sums=('SKIP')
-
-pkgver() {
- cd librest
- git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
-}
-
-prepare() {
- cd librest
-}
-
-build() {
- arch-meson librest build
- meson compile -C build
-}
-
-check() {
- meson test -C build --print-errorlogs
-}
-
-_pick() {
- local p="$1" f d; shift
- for f; do
- d="$srcdir/$p/${f#$pkgdir/}"
- mkdir -p "$(dirname "$d")"
- mv "$f" "$d"
- rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
- done
-}
-
-package_librest() {
- depends+=(libg{lib,object,io}-2.0.so libxml2.so libsoup-3.0.so
- libjson-glib-1.0.so)
- provides+=(librest{,-extras}-1.0.so)
-
- meson install -C build --destdir "$pkgdir"
-
- cd "$pkgdir"
-
- _pick docs usr/share/doc
-
- _pick demo usr/bin/librest-demo
- _pick demo usr/share/applications/org.gnome.RestDemo.desktop
-}
-
-package_librest-docs() {
- pkgdesc+=" (documentation)"
- depends=()
- mv docs/* "$pkgdir"
-}
-
-package_librest-demos() {
- pkgdesc+=" (demo applications)"
- depends=(librest libadwaita gtksourceview5)
- mv demo/* "$pkgdir"
-}
-
-# vim:set sw=2 et:
Copied: librest/repos/extra-x86_64/PKGBUILD (from rev 461858,
librest/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2022-11-15 22:42:05 UTC (rev 461859)
@@ -0,0 +1,80 @@
+# Maintainer: Jan Alexander Steffens (heftig) <[email protected]>
+
+pkgbase=librest
+pkgname=(librest librest-docs librest-demos)
+pkgver=0.9.1
+pkgrel=2
+pkgdesc="Library for accessing RESTful web services"
+url="https://gitlab.gnome.org/GNOME/librest"
+arch=(x86_64)
+license=(LGPL)
+depends=(glib2 libxml2 libsoup3 json-glib)
+makedepends=(gobject-introspection git meson gi-docgen vala libadwaita
+ gtksourceview5)
+options=(debug)
+_commit=aa9e968e381ede159414c6338da24d61ad0b5d8b # tags/0.9.1^0
+source=("git+https://gitlab.gnome.org/GNOME/librest.git#commit=$_commit"
+ 30.patch)
+b2sums=('SKIP'
+
'a5e54797a758b67c7f9aa6e90cd7b6435dfa1f7abc86b9b88c0c98e78724b15308ca8af4ccb138d1d01948e54ed9bf930ee37a7d253e6c979846f93f92fef2c2')
+
+pkgver() {
+ cd librest
+ git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
+}
+
+prepare() {
+ cd librest
+
+ # https://bugs.archlinux.org/task/76560
+ # https://gitlab.gnome.org/GNOME/librest/-/merge_requests/30
+ git apply -3 ../30.patch
+}
+
+build() {
+ arch-meson librest build -D vapi=true
+ meson compile -C build
+}
+
+check() {
+ meson test -C build --print-errorlogs
+}
+
+_pick() {
+ local p="$1" f d; shift
+ for f; do
+ d="$srcdir/$p/${f#$pkgdir/}"
+ mkdir -p "$(dirname "$d")"
+ mv "$f" "$d"
+ rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
+ done
+}
+
+package_librest() {
+ depends+=(libg{lib,object,io}-2.0.so libxml2.so libsoup-3.0.so
+ libjson-glib-1.0.so)
+ provides+=(librest{,-extras}-1.0.so)
+
+ meson install -C build --destdir "$pkgdir"
+
+ cd "$pkgdir"
+
+ _pick docs usr/share/doc
+
+ _pick demo usr/bin/librest-demo
+ _pick demo usr/share/applications/org.gnome.RestDemo.desktop
+}
+
+package_librest-docs() {
+ pkgdesc+=" (documentation)"
+ depends=()
+ mv docs/* "$pkgdir"
+}
+
+package_librest-demos() {
+ pkgdesc+=" (demo applications)"
+ depends=(librest libadwaita gtksourceview5)
+ mv demo/* "$pkgdir"
+}
+
+# vim:set sw=2 sts=-1 et: