Date: Wednesday, February 15, 2023 @ 11:38:33
  Author: eworm
Revision: 1400643

upgpkg: lib32-curl 7.88.0-2: revert faulty commit

Added:
  lib32-curl/trunk/0001-Revert-http2-minor-buffer-and-error-path-fixes.patch
Modified:
  lib32-curl/trunk/PKGBUILD

-----------------------------------------------------------+
 0001-Revert-http2-minor-buffer-and-error-path-fixes.patch |   56 ++++++++++++
 PKGBUILD                                                  |   14 ++-
 2 files changed, 67 insertions(+), 3 deletions(-)

Added: 0001-Revert-http2-minor-buffer-and-error-path-fixes.patch
===================================================================
--- 0001-Revert-http2-minor-buffer-and-error-path-fixes.patch                   
        (rev 0)
+++ 0001-Revert-http2-minor-buffer-and-error-path-fixes.patch   2023-02-15 
11:38:33 UTC (rev 1400643)
@@ -0,0 +1,56 @@
+From 7c5f90353e2e107b9464a73dbdd58e5cc90ec22f Mon Sep 17 00:00:00 2001
+From: Christian Hesse <[email protected]>
+Date: Wed, 15 Feb 2023 12:22:41 +0100
+Subject: [PATCH 1/1] Revert "http2: minor buffer and error path fixes"
+
+This reverts commit 8c762f59983a3e9e2b80fdb34aa5e08f1d9a1c7d.
+---
+ lib/http2.c                         | 17 ++++-------------
+ tests/tests-httpd/test_05_errors.py | 18 +++++++-----------
+ 2 files changed, 11 insertions(+), 24 deletions(-)
+
+diff --git a/lib/http2.c b/lib/http2.c
+index 46fc74645..db968ed2d 100644
+--- a/lib/http2.c
++++ b/lib/http2.c
+@@ -1905,9 +1905,8 @@ static ssize_t cf_h2_recv(struct Curl_cfilter *cf, 
struct Curl_easy *data,
+ 
+   if(stream->memlen) {
+     ssize_t retlen = stream->memlen;
+-
+-    /* TODO: all this buffer handling is very brittle */
+-    stream->len += stream->memlen;
++    DEBUGF(LOG_CF(data, cf, "[h2sid=%u] recv: returns %zd",
++                  stream->stream_id, retlen));
+     stream->memlen = 0;
+ 
+     if(ctx->pause_stream_id == stream->stream_id) {
+@@ -1919,10 +1918,6 @@ static ssize_t cf_h2_recv(struct Curl_cfilter *cf, 
struct Curl_easy *data,
+       Curl_expire(data, 0, EXPIRE_RUN_NOW);
+     }
+     else if(stream->closed) {
+-      if(stream->reset || stream->error) {
+-        nread = http2_handle_stream_close(cf, data, stream, err);
+-        goto out;
+-      }
+       /* this stream is closed, trigger a another read ASAP to detect that */
+       DEBUGF(LOG_CF(data, cf, "[h2sid=%u] is closed now, run again",
+                     stream->stream_id));
+@@ -1934,15 +1929,11 @@ static ssize_t cf_h2_recv(struct Curl_cfilter *cf, 
struct Curl_easy *data,
+     }
+ 
+     nread = retlen;
+-    DEBUGF(LOG_CF(data, cf, "[h2sid=%u] cf_h2_recv -> %zd",
+-                  stream->stream_id, nread));
+     goto out;
+   }
+ 
+-  if(stream->closed) {
+-    nread = http2_handle_stream_close(cf, data, stream, err);
+-    goto out;
+-  }
++  if(stream->closed)
++    return http2_handle_stream_close(cf, data, stream, err);
+ 
+   if(!data->state.drain && Curl_conn_cf_data_pending(cf->next, data)) {
+     DEBUGF(LOG_CF(data, cf, "[h2sid=%u] pending data, set drain",

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2023-02-15 11:24:03 UTC (rev 1400642)
+++ PKGBUILD    2023-02-15 11:38:33 UTC (rev 1400643)
@@ -8,7 +8,7 @@
 pkgbase=lib32-curl
 pkgname=(lib32-curl lib32-libcurl-compat lib32-libcurl-gnutls)
 pkgver=7.88.0
-pkgrel=1
+pkgrel=2
 pkgdesc='An URL retrieval utility and library (32-bit)'
 arch=('x86_64')
 url='https://curl.haxx.se'
@@ -17,9 +17,11 @@
          'lib32-libpsl' 'lib32-zlib' 'lib32-zstd')
 makedepends=('lib32-gnutls' 'lib32-openssl')
 provides=('libcurl.so')
-source=("https://curl.haxx.se/download/curl-${pkgver}.tar.gz"{,.asc})
+source=("https://curl.haxx.se/download/curl-${pkgver}.tar.gz"{,.asc}
+        '0001-Revert-http2-minor-buffer-and-error-path-fixes.patch')
 
sha512sums=('bfaac71e97a45d884be410872a55fdb365f9d03c11620fb12e82c7f26dbbb6a417b51dd0dc2a3631e95fb36e37a72c7f73fd6cf5f796c154f1424395c03c22cb'
-            'SKIP')
+            'SKIP'
+            
'c06b5738290394e20c666fbb9d0f4b08ce5a3c668dd1ae2d6271b42235526b929c1caac1238aa05bc541a82eb6c9678a81f7d8dc2c3ad282188f934b9b036699')
 validpgpkeys=('27EDEAF22F3ABCEB50DB9A125CC908FDB71E12C2') # Daniel Stenberg
 
 _configure_options=(
@@ -37,6 +39,12 @@
   --libdir='/usr/lib32'
 )
 
+prepare() {
+  cd "${srcdir}/curl-${pkgver}"
+
+  patch -Np1 < ../0001-Revert-http2-minor-buffer-and-error-path-fixes.patch
+}
+
 build() {
   export CC="gcc -m32"
   export CXX="g++ -m32"

Reply via email to