Date: Thursday, October 20, 2022 @ 23:45:23
  Author: heftig
Revision: 458481

3.2.1-1

Added:
  libsoup3/trunk/0001-server-connection-Don-t-destroy-IO-data-during-steal.patch
  libsoup3/trunk/0002-server-connection-Ensure-we-clean-up-the-socket.patch
Modified:
  libsoup3/trunk/PKGBUILD

-----------------------------------------------------------------+
 0001-server-connection-Don-t-destroy-IO-data-during-steal.patch |   25 
+++++++++
 0002-server-connection-Ensure-we-clean-up-the-socket.patch      |   26 
++++++++++
 PKGBUILD                                                        |   23 ++++++--
 3 files changed, 67 insertions(+), 7 deletions(-)

Added: 0001-server-connection-Don-t-destroy-IO-data-during-steal.patch
===================================================================
--- 0001-server-connection-Don-t-destroy-IO-data-during-steal.patch             
                (rev 0)
+++ 0001-server-connection-Don-t-destroy-IO-data-during-steal.patch     
2022-10-20 23:45:23 UTC (rev 458481)
@@ -0,0 +1,25 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: "Jan Alexander Steffens (heftig)" <[email protected]>
+Date: Thu, 20 Oct 2022 23:30:12 +0000
+Subject: [PATCH] server-connection: Don't destroy IO data during steal
+
+When we're reacting to a websocket upgrade, the data is currently in use
+and cannot be destroyed yet.
+
+Fixes: https://gitlab.gnome.org/GNOME/libsoup/-/issues/309
+---
+ libsoup/server/soup-server-connection.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/libsoup/server/soup-server-connection.c 
b/libsoup/server/soup-server-connection.c
+index 380ac42b3c8f..166b5be958ff 100644
+--- a/libsoup/server/soup-server-connection.c
++++ b/libsoup/server/soup-server-connection.c
+@@ -559,7 +559,6 @@ soup_server_connection_steal (SoupServerConnection *conn)
+         soup_server_connection_get_local_address (conn);
+         soup_server_connection_get_remote_address (conn);
+ 
+-        g_clear_pointer (&priv->io_data, soup_server_message_io_destroy);
+         g_clear_object (&priv->conn);
+         g_clear_object (&priv->iostream);
+ 

Added: 0002-server-connection-Ensure-we-clean-up-the-socket.patch
===================================================================
--- 0002-server-connection-Ensure-we-clean-up-the-socket.patch                  
        (rev 0)
+++ 0002-server-connection-Ensure-we-clean-up-the-socket.patch  2022-10-20 
23:45:23 UTC (rev 458481)
@@ -0,0 +1,26 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: "Jan Alexander Steffens (heftig)" <[email protected]>
+Date: Thu, 20 Oct 2022 23:32:13 +0000
+Subject: [PATCH] server-connection: Ensure we clean up the socket
+
+If the `conn` has been freed due to stealing, we don't disconnect but we
+still need to clean up the socket.
+
+Fixes: https://gitlab.gnome.org/GNOME/libsoup/-/merge_requests/321#note_1578921
+---
+ libsoup/server/soup-server-connection.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/libsoup/server/soup-server-connection.c 
b/libsoup/server/soup-server-connection.c
+index 166b5be958ff..3250cf46844f 100644
+--- a/libsoup/server/soup-server-connection.c
++++ b/libsoup/server/soup-server-connection.c
+@@ -111,6 +111,8 @@ soup_server_connection_finalize (GObject *object)
+         if (priv->conn)
+                 disconnect_internal (conn);
+ 
++        g_clear_object (&priv->socket);
++
+         g_clear_pointer (&priv->io_data, soup_server_message_io_destroy);
+ 
+         g_clear_object (&priv->iostream);

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2022-10-20 23:45:22 UTC (rev 458480)
+++ PKGBUILD    2022-10-20 23:45:23 UTC (rev 458481)
@@ -3,16 +3,16 @@
 
 pkgbase=libsoup3
 pkgname=(libsoup3 libsoup3-docs)
-pkgver=3.2.0
+pkgver=3.2.1
 pkgrel=1
 pkgdesc="HTTP client/server library for GNOME"
-url=https://wiki.gnome.org/Projects/libsoup
+url="https://wiki.gnome.org/Projects/libsoup";
 arch=(x86_64)
 license=(LGPL)
 depends=(
   brotli
-  glib-networking 
-  glib2 
+  glib-networking
+  glib2
   krb5
   libnghttp2
   libpsl
@@ -33,9 +33,13 @@
   php-apache
 )
 options=(debug)
-_commit=b3d0ba2eca19d146c6669c760784b13db80b62ce  # tags/3.2.0^0
-source=("git+https://gitlab.gnome.org/GNOME/libsoup.git#commit=$_commit";)
-sha256sums=('SKIP')
+_commit=89c20462d24298734c7fd476ca4c87058438e52c  # tags/3.2.1^0
+source=("git+https://gitlab.gnome.org/GNOME/libsoup.git#commit=$_commit";
+        0001-server-connection-Don-t-destroy-IO-data-during-steal.patch
+        0002-server-connection-Ensure-we-clean-up-the-socket.patch)
+b2sums=('SKIP'
+        
'309547e8e465511c1f6bdcb40d77e4313801e1d8514a06222b56e1cdc66f646e52558754219e3f7f805b89375c4c9f54e371d52db7e3317da1cb4d15acf7048b'
+        
'd705bbaca99650be7b2e47e73be1d8303fea9209bce25c2a411da03f3adcfa0500f9b834d4b5b33ed727700472486703c4203ec1d28f762c6f32b8b2dcb8d08e')
 
 pkgver() {
   cd libsoup
@@ -44,6 +48,11 @@
 
 prepare() {
   cd libsoup
+  
+  # https://gitlab.gnome.org/GNOME/libsoup/-/issues/309
+  git cherry-pick -n 5ce3a206aeaab8c01431ead75ea8107729447d8b
+  git apply -3 
../0001-server-connection-Don-t-destroy-IO-data-during-steal.patch
+  git apply -3 ../0002-server-connection-Ensure-we-clean-up-the-socket.patch
 }
 
 build() {

Reply via email to