Date: Wednesday, February 15, 2023 @ 11:38:26
  Author: eworm
Revision: 469056

archrelease: copy trunk to testing-x86_64

Added:
  curl/repos/testing-x86_64/
  
curl/repos/testing-x86_64/0001-Revert-http2-minor-buffer-and-error-path-fixes.patch
    (from rev 469055, 
curl/trunk/0001-Revert-http2-minor-buffer-and-error-path-fixes.patch)
  curl/repos/testing-x86_64/PKGBUILD
    (from rev 469055, curl/trunk/PKGBUILD)
  curl/repos/testing-x86_64/keys/

-----------------------------------------------------------+
 0001-Revert-http2-minor-buffer-and-error-path-fixes.patch |   56 +++++
 PKGBUILD                                                  |  130 ++++++++++++
 2 files changed, 186 insertions(+)

Copied: 
curl/repos/testing-x86_64/0001-Revert-http2-minor-buffer-and-error-path-fixes.patch
 (from rev 469055, 
curl/trunk/0001-Revert-http2-minor-buffer-and-error-path-fixes.patch)
===================================================================
--- testing-x86_64/0001-Revert-http2-minor-buffer-and-error-path-fixes.patch    
                        (rev 0)
+++ testing-x86_64/0001-Revert-http2-minor-buffer-and-error-path-fixes.patch    
2023-02-15 11:38:26 UTC (rev 469056)
@@ -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",

Copied: curl/repos/testing-x86_64/PKGBUILD (from rev 469055, 
curl/trunk/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD                             (rev 0)
+++ testing-x86_64/PKGBUILD     2023-02-15 11:38:26 UTC (rev 469056)
@@ -0,0 +1,130 @@
+# Maintainer: Dave Reisner <[email protected]>
+# Contributor: Angel Velasquez <[email protected]>
+# Contributor: Eric Belanger <[email protected]>
+# Contributor: Lucien Immink <[email protected]>
+# Contributor: Daniel J Griffiths <[email protected]>
+
+pkgbase=curl
+pkgname=(curl libcurl-compat libcurl-gnutls)
+pkgver=7.88.0
+pkgrel=2
+pkgdesc='An URL retrieval utility and library'
+arch=('x86_64')
+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')
+makedepends=('patchelf')
+provides=('libcurl.so')
+source=("https://curl.haxx.se/download/${pkgname}-${pkgver}.tar.gz"{,.asc}
+        '0001-Revert-http2-minor-buffer-and-error-path-fixes.patch')
+sha512sums=('bfaac71e97a45d884be410872a55fdb365f9d03c11620fb12e82c7f26dbbb6a417b51dd0dc2a3631e95fb36e37a72c7f73fd6cf5f796c154f1424395c03c22cb'
+            'SKIP'
+            
'c06b5738290394e20c666fbb9d0f4b08ce5a3c668dd1ae2d6271b42235526b929c1caac1238aa05bc541a82eb6c9678a81f7d8dc2c3ad282188f934b9b036699')
+validpgpkeys=('27EDEAF22F3ABCEB50DB9A125CC908FDB71E12C2') # Daniel Stenberg
+
+_configure_options=(
+  --prefix='/usr'
+  --mandir='/usr/share/man'
+  --disable-ldap
+  --disable-ldaps
+  --disable-manual
+  --enable-ipv6
+  --enable-threaded-resolver
+  --with-gssapi
+  --with-libssh2
+  --with-random='/dev/urandom'
+  --with-ca-bundle='/etc/ssl/certs/ca-certificates.crt'
+)
+
+prepare() {
+  cd "${srcdir}/${pkgbase}-${pkgver}"
+
+  patch -Np1 < ../0001-Revert-http2-minor-buffer-and-error-path-fixes.patch
+}
+
+build() {
+  mkdir build-curl{,-compat,-gnutls}
+
+  # build curl
+  cd "${srcdir}"/build-curl
+
+  "${srcdir}/${pkgbase}-${pkgver}"/configure \
+    "${_configure_options[@]}" \
+    --with-openssl \
+    --enable-versioned-symbols
+  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
+  make
+
+  # build libcurl-compat
+  cd "${srcdir}"/build-curl-compat
+
+  "${srcdir}/${pkgbase}-${pkgver}"/configure \
+    "${_configure_options[@]}" \
+    --with-openssl \
+    --disable-versioned-symbols
+  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
+  make -C lib
+
+  # build libcurl-gnutls
+  cd "${srcdir}"/build-curl-gnutls
+
+  "${srcdir}/${pkgbase}-${pkgver}"/configure \
+    "${_configure_options[@]}" \
+    --disable-versioned-symbols \
+    --without-openssl \
+    --with-gnutls
+  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
+  make -C lib
+  patchelf --set-soname 'libcurl-gnutls.so.4' ./lib/.libs/libcurl.so
+}
+
+package_curl() {
+  cd build-curl
+
+  make DESTDIR="${pkgdir}" install
+  make DESTDIR="${pkgdir}" install -C scripts
+
+  cd "${srcdir}/${pkgname}-${pkgver}"
+
+  # license
+  install -Dt "${pkgdir}/usr/share/licenses/$pkgname" -m0644 COPYING
+}
+
+package_libcurl-compat() {
+  pkgdesc='An URL retrieval library (without versioned symbols)'
+  depends=('curl' 'openssl')
+
+  cd "${srcdir}"/build-curl-compat
+
+  make -C lib DESTDIR="${pkgdir}" install
+
+  mv "${pkgdir}"/usr/lib/libcurl{,-compat}.so.4.8.0
+  rm "${pkgdir}"/usr/lib/libcurl.{a,so}*
+  for version in 3 4.0.0 4.1.0 4.2.0 4.3.0 4.4.0 4.5.0 4.6.0 4.7.0; do
+    ln -s libcurl-compat.so.4.8.0 "${pkgdir}"/usr/lib/libcurl.so.${version}
+  done
+
+  install -dm 0755 "${pkgdir}"/usr/share/licenses
+  ln -s curl "${pkgdir}"/usr/share/licenses/libcurl-compat
+}
+
+package_libcurl-gnutls() {
+  pkgdesc='An URL retrieval library (without versioned symbols and linked 
against gnutls)'
+  depends=('curl' 'gnutls')
+
+  cd "${srcdir}"/build-curl-gnutls
+
+  make -C lib DESTDIR="${pkgdir}" install
+
+  mv "${pkgdir}"/usr/lib/libcurl{,-gnutls}.so.4.8.0
+  rm "${pkgdir}"/usr/lib/libcurl.{a,so}*
+  ln -s libcurl-gnutls.so.4 "${pkgdir}"/usr/lib/libcurl-gnutls.so
+  for version in 3 4 4.0.0 4.1.0 4.2.0 4.3.0 4.4.0 4.5.0 4.6.0 4.7.0; do
+    ln -s libcurl-gnutls.so.4.8.0 
"${pkgdir}"/usr/lib/libcurl-gnutls.so.${version}
+  done
+
+  install -dm 0755 "${pkgdir}"/usr/share/licenses
+  ln -s curl "${pkgdir}"/usr/share/licenses/libcurl-gnutls
+}

Reply via email to