Date: Wednesday, February 15, 2023 @ 11:38:20
  Author: eworm
Revision: 469055

upgpkg: curl 7.88.0-2: revert faulty commit

Added:
  curl/trunk/0001-Revert-http2-minor-buffer-and-error-path-fixes.patch
Modified:
  curl/trunk/PKGBUILD
Deleted:
  curl/trunk/0001-typecheck_accept_expressions_for_option_info_parameters.patch
  
curl/trunk/0002-cfilters_Curl_conn_get_select_socks_use_the_first_non_connected_filter.patch

-----------------------------------------------------------------------------------+
 0001-Revert-http2-minor-buffer-and-error-path-fixes.patch                      
   |   56 ++++++++++
 0001-typecheck_accept_expressions_for_option_info_parameters.patch             
   |   49 --------
 
0002-cfilters_Curl_conn_get_select_socks_use_the_first_non_connected_filter.patch
 |   34 ------
 PKGBUILD                                                                       
   |   10 +
 4 files changed, 62 insertions(+), 87 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:20 UTC (rev 469055)
@@ -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",

Deleted: 0001-typecheck_accept_expressions_for_option_info_parameters.patch
===================================================================
--- 0001-typecheck_accept_expressions_for_option_info_parameters.patch  
2023-02-15 10:30:37 UTC (rev 469054)
+++ 0001-typecheck_accept_expressions_for_option_info_parameters.patch  
2023-02-15 11:38:20 UTC (rev 469055)
@@ -1,49 +0,0 @@
-From e2aed004302e51cfa5b6ce8c8ab65ef92aa83196 Mon Sep 17 00:00:00 2001
-From: Patrick Monnerat <[email protected]>
-Date: Fri, 23 Dec 2022 15:35:27 +0100
-Subject: typecheck: accept expressions for option/info parameters
-
-As expressions can have side effects, evaluate only once.
-
-To enable deprecation reporting only once, get rid of the __typeof__
-use to define the local temporary variable and use the target type
-(CURLoption/CURLINFO). This also avoids multiple reports on type
-conflicts (if some) by the curlcheck_* macros.
-
-Note that CURLOPT_* and CURLINFO_* symbols may be deprecated, but not
-their values: a curl_easy_setopt call with an integer constant as option
-will never report a deprecation.
-
-Reported-by: Thomas Klausner
-Fixes #10148
-Closes #10149
----
- include/curl/typecheck-gcc.h | 6 ++----
- 1 file changed, 2 insertions(+), 4 deletions(-)
-
-diff --git a/include/curl/typecheck-gcc.h b/include/curl/typecheck-gcc.h
-index bf655bb632..85aa8b7b49 100644
---- a/include/curl/typecheck-gcc.h
-+++ b/include/curl/typecheck-gcc.h
-@@ -42,9 +42,8 @@
-  */
- #define curl_easy_setopt(handle, option, value)                         \
-   __extension__({                                                       \
--      CURL_IGNORE_DEPRECATION(__typeof__(option) _curl_opt = option;)   \
-+      CURLoption _curl_opt = (option);                                  \
-       if(__builtin_constant_p(_curl_opt)) {                             \
--        (void) option;                                                  \
-         CURL_IGNORE_DEPRECATION(                                        \
-           if(curlcheck_long_option(_curl_opt))                          \
-             if(!curlcheck_long(value))                                  \
-@@ -120,9 +119,8 @@
- /* wraps curl_easy_getinfo() with typechecking */
- #define curl_easy_getinfo(handle, info, arg)                            \
-   __extension__({                                                       \
--      CURL_IGNORE_DEPRECATION(__typeof__(info) _curl_info = info;)      \
-+      CURLINFO _curl_info = (info);                                     \
-       if(__builtin_constant_p(_curl_info)) {                            \
--        (void) info;                                                    \
-         CURL_IGNORE_DEPRECATION(                                        \
-           if(curlcheck_string_info(_curl_info))                         \
-             if(!curlcheck_arr((arg), char *))                           \

Deleted: 
0002-cfilters_Curl_conn_get_select_socks_use_the_first_non_connected_filter.patch
===================================================================
--- 
0002-cfilters_Curl_conn_get_select_socks_use_the_first_non_connected_filter.patch
   2023-02-15 10:30:37 UTC (rev 469054)
+++ 
0002-cfilters_Curl_conn_get_select_socks_use_the_first_non_connected_filter.patch
   2023-02-15 11:38:20 UTC (rev 469055)
@@ -1,34 +0,0 @@
-From 728400f875e845f72ee5602edb905f6301ade3e7 Mon Sep 17 00:00:00 2001
-From: Daniel Stenberg <[email protected]>
-Date: Mon, 26 Dec 2022 09:59:20 +0100
-Subject: cfilters:Curl_conn_get_select_socks: use the first non-connected
- filter
-
-When there are filters addded for both socket and SSL, the code
-previously checked the SSL sockets during connect when it *should* first
-check the socket layer until that has connected.
-
-Fixes #10157
-Fixes #10146
-Closes #10160
-
-Reviewed-by: Stefan Eissing
----
- lib/cfilters.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/lib/cfilters.c b/lib/cfilters.c
-index 8951533418..8b05fbc8f4 100644
---- a/lib/cfilters.c
-+++ b/lib/cfilters.c
-@@ -437,6 +437,10 @@ int Curl_conn_get_select_socks(struct Curl_easy *data, 
int sockindex,
-   DEBUGASSERT(data);
-   DEBUGASSERT(data->conn);
-   cf = data->conn->cfilter[sockindex];
-+
-+  /* if the next one is not yet connected, that's the one we want */
-+  while(cf && cf->next && !cf->next->connected)
-+    cf = cf->next;
-   if(cf) {
-     return cf->cft->get_select_socks(cf, data, socks);
-   }

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2023-02-15 10:30:37 UTC (rev 469054)
+++ PKGBUILD    2023-02-15 11:38:20 UTC (rev 469055)
@@ -7,7 +7,7 @@
 pkgbase=curl
 pkgname=(curl libcurl-compat libcurl-gnutls)
 pkgver=7.88.0
-pkgrel=1
+pkgrel=2
 pkgdesc='An URL retrieval utility and library'
 arch=('x86_64')
 url='https://curl.haxx.se'
@@ -17,9 +17,11 @@
          'openssl' 'zlib' 'zstd' 'libzstd.so')
 makedepends=('patchelf')
 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-Revert-http2-minor-buffer-and-error-path-fixes.patch')
 
sha512sums=('bfaac71e97a45d884be410872a55fdb365f9d03c11620fb12e82c7f26dbbb6a417b51dd0dc2a3631e95fb36e37a72c7f73fd6cf5f796c154f1424395c03c22cb'
-            'SKIP')
+            'SKIP'
+            
'c06b5738290394e20c666fbb9d0f4b08ce5a3c668dd1ae2d6271b42235526b929c1caac1238aa05bc541a82eb6c9678a81f7d8dc2c3ad282188f934b9b036699')
 validpgpkeys=('27EDEAF22F3ABCEB50DB9A125CC908FDB71E12C2') # Daniel Stenberg
 
 _configure_options=(
@@ -39,7 +41,7 @@
 prepare() {
   cd "${srcdir}/${pkgbase}-${pkgver}"
 
-  #patch -Np1 < ../
+  patch -Np1 < ../0001-Revert-http2-minor-buffer-and-error-path-fixes.patch
 }
 
 build() {

Reply via email to