[arch-commits] Commit in curl/trunk (2 files)

Christian Hesse eworm at gemini.archlinux.org
Thu Sep 16 09:41:36 UTC 2021


    Date: Thursday, September 16, 2021 @ 09:41:36
  Author: eworm
Revision: 424094

upgpkg: curl 7.79.0-3: fix issue with multiple streams

https://github.com/curl/curl/issues/7730

Added:
  curl/trunk/0001-Curl_http2_setup-do-not-change-connection-data-on-repeat-invokes.patch
Modified:
  curl/trunk/PKGBUILD

-----------------------------------------------------------------------------+
 0001-Curl_http2_setup-do-not-change-connection-data-on-repeat-invokes.patch |   47 ++++++++++
 PKGBUILD                                                                    |   32 ++++--
 2 files changed, 67 insertions(+), 12 deletions(-)

Added: 0001-Curl_http2_setup-do-not-change-connection-data-on-repeat-invokes.patch
===================================================================
--- 0001-Curl_http2_setup-do-not-change-connection-data-on-repeat-invokes.patch	                        (rev 0)
+++ 0001-Curl_http2_setup-do-not-change-connection-data-on-repeat-invokes.patch	2021-09-16 09:41:36 UTC (rev 424094)
@@ -0,0 +1,47 @@
+From 901804ef95777b8e735a55b77f8dd630a58c575b Mon Sep 17 00:00:00 2001
+From: Daniel Stenberg <daniel at haxx.se>
+Date: Thu, 16 Sep 2021 08:50:54 +0200
+Subject: [PATCH] Curl_http2_setup: don't change connection data on repeat
+ invokes
+
+Regression from 3cb8a748670ab88c (releasde in 7.79.0). That change moved
+transfer oriented inits to before the check but also erroneously moved a
+few connection oriented ones, which causes problems.
+
+Reported-by: Evangelos Foutras
+Fixes #7730
+Closes #7731
+---
+ lib/http2.c | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/lib/http2.c b/lib/http2.c
+index a3de607c7d24..6d63f43636a5 100644
+--- a/lib/http2.c
++++ b/lib/http2.c
+@@ -2221,12 +2221,6 @@ CURLcode Curl_http2_setup(struct Curl_easy *data,
+   stream->mem = data->state.buffer;
+   stream->len = data->set.buffer_size;
+ 
+-  httpc->inbuflen = 0;
+-  httpc->nread_inbuf = 0;
+-
+-  httpc->pause_stream_id = 0;
+-  httpc->drain_total = 0;
+-
+   multi_connchanged(data->multi);
+   /* below this point only connection related inits are done, which only needs
+      to be done once per connection */
+@@ -2252,6 +2246,12 @@ CURLcode Curl_http2_setup(struct Curl_easy *data,
+   conn->httpversion = 20;
+   conn->bundle->multiuse = BUNDLE_MULTIPLEX;
+ 
++  httpc->inbuflen = 0;
++  httpc->nread_inbuf = 0;
++
++  httpc->pause_stream_id = 0;
++  httpc->drain_total = 0;
++
+   infof(data, "Connection state changed (HTTP/2 confirmed)");
+ 
+   return CURLE_OK;

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-09-16 09:41:27 UTC (rev 424093)
+++ PKGBUILD	2021-09-16 09:41:36 UTC (rev 424094)
@@ -6,27 +6,35 @@
 
 pkgname=curl
 pkgver=7.79.0
-pkgrel=2
-pkgdesc="An URL retrieval utility and library"
+pkgrel=3
+pkgdesc='An URL retrieval utility and library'
 arch=('x86_64')
-url="https://curl.haxx.se"
+url='https://curl.haxx.se'
 license=('MIT')
 depends=('ca-certificates' 'brotli' 'libbrotlidec.so' 'krb5' 'libgssapi_krb5.so'
          'libidn2' 'libidn2.so' 'libnghttp2' 'libpsl' 'libpsl.so' 'libssh2' 'libssh2.so'
          'openssl' 'zlib' 'zstd' 'libzstd.so')
 provides=('libcurl.so')
-source=("https://curl.haxx.se/download/$pkgname-$pkgver.tar.gz"{,.asc})
+source=("https://curl.haxx.se/download/${pkgname}-${pkgver}.tar.gz"{,.asc}
+        '0001-Curl_http2_setup-do-not-change-connection-data-on-repeat-invokes.patch')
 sha512sums=('6529645774bd2687535cfaec5949281f305c2910da3bd4de22713ab370fde0d05c416579b46aef7eaaf5f73d882e96b8268b80b6802b978f9c54b0a837420dad'
-            'SKIP')
+            'SKIP'
+            'f83ba83073a90ab369c7c0e06d440d6d8be87c72800095c35d803bca246ea5ee73b811b210ce9d8a7ee137583ca3e839afd8eb9accf699f655e9db82a7bdef71')
 validpgpkeys=('27EDEAF22F3ABCEB50DB9A125CC908FDB71E12C2') # Daniel Stenberg
 
+prepare() {
+  cd "${pkgname}-${pkgver}"
+
+  patch -Np1 < ../0001-Curl_http2_setup-do-not-change-connection-data-on-repeat-invokes.patch
+}
+
 build() {
   mkdir build
   cd build
 
   "${srcdir}/${pkgname}-${pkgver}"/configure \
-    --prefix=/usr \
-    --mandir=/usr/share/man \
+    --prefix='/usr' \
+    --mandir='/usr/share/man' \
     --disable-ldap \
     --disable-ldaps \
     --disable-manual \
@@ -36,8 +44,8 @@
     --with-gssapi \
     --with-libssh2 \
     --with-openssl \
-    --with-random=/dev/urandom \
-    --with-ca-bundle=/etc/ssl/certs/ca-certificates.crt
+    --with-random='/dev/urandom' \
+    --with-ca-bundle='/etc/ssl/certs/ca-certificates.crt'
 
   sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
   make
@@ -46,11 +54,11 @@
 package() {
   cd build
 
-  make DESTDIR="$pkgdir" install
-  make DESTDIR="$pkgdir" install -C scripts
+  make DESTDIR="${pkgdir}" install
+  make DESTDIR="${pkgdir}" install -C scripts
 
   cd "${srcdir}/${pkgname}-${pkgver}"
 
   # license
-  install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m0644 COPYING
+  install -Dt "${pkgdir}/usr/share/licenses/$pkgname" -m0644 COPYING
 }



More information about the arch-commits mailing list