From c017c3cda203d29a2ef682d1502eff921d688b7d Mon Sep 17 00:00:00 2001 From: Mouad Charradi Date: Wed, 13 Jul 2022 15:16:31 +0100 Subject: [PATCH] curl: update to 7.84.0. --- ...eturn-fatal-error-on-EINTR-from-poll.patch | 40 +++++++++++++++++++ srcpkgs/curl/template | 8 ++-- 2 files changed, 44 insertions(+), 4 deletions(-) create mode 100644 srcpkgs/curl/patches/0001-select-do-not-return-fatal-error-on-EINTR-from-poll.patch diff --git a/srcpkgs/curl/patches/0001-select-do-not-return-fatal-error-on-EINTR-from-poll.patch b/srcpkgs/curl/patches/0001-select-do-not-return-fatal-error-on-EINTR-from-poll.patch new file mode 100644 index 000000000000..c2456da0e1d7 --- /dev/null +++ b/srcpkgs/curl/patches/0001-select-do-not-return-fatal-error-on-EINTR-from-poll.patch @@ -0,0 +1,40 @@ +From 52e822173aa3cd4f610531d32fbf943f026cdca6 Mon Sep 17 00:00:00 2001 +From: Thomas Weißschuh +Date: Sun, 3 Jul 2022 18:20:44 +0200 +Subject: select: do not return fatal error on EINTR from poll() + +The same was done for select() in 5912da25 but poll() was missed. + +Bug: https://bugs.archlinux.org/task/75201 +Reported-by: Alexandre Bury (gyscos at archlinux) + +Ref: https://github.com/curl/curl/issues/8921 +Ref: https://github.com/curl/curl/pull/8961 +Ref: https://github.com/curl/curl/commit/5912da25#r77584294 + +Closes https://github.com/curl/curl/pull/9091 +--- + lib/select.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/lib/select.c b/lib/select.c +index c16358d56..2ac074677 100644 +--- a/lib/select.c ++++ b/lib/select.c +@@ -310,8 +310,12 @@ int Curl_poll(struct pollfd ufds[], unsigned int nfds, timediff_t timeout_ms) + else + pending_ms = 0; + r = poll(ufds, nfds, pending_ms); +- if(r <= 0) ++ if(r <= 0) { ++ if((r == -1) && (SOCKERRNO == EINTR)) ++ /* make EINTR from select or poll not a "lethal" error */ ++ r = 0; + return r; ++ } + + for(i = 0; i < nfds; i++) { + if(ufds[i].fd == CURL_SOCKET_BAD) +-- +cgit v1.2.3-18-g5258 + diff --git a/srcpkgs/curl/template b/srcpkgs/curl/template index 00cbfd709875..7f8d4053b71d 100644 --- a/srcpkgs/curl/template +++ b/srcpkgs/curl/template @@ -1,6 +1,6 @@ # Template file for 'curl' pkgname=curl -version=7.83.1 +version=7.84.0 revision=1 build_style=gnu-configure configure_args="ac_cv_sizeof_off_t=8 --enable-threaded-resolver --enable-ipv6 @@ -24,7 +24,7 @@ license="MIT" homepage="https://curl.haxx.se" changelog="https://curl.haxx.se/changes.html#${version//./_}" distfiles="${homepage}/download/${pkgname}-${version}.tar.bz2" -checksum=f539a36fb44a8260ec5d977e4e0dbdd2eee29ed90fcedaa9bc3c9f78a113bff0 +checksum=702fb26e73190a3bd77071aa146f507b9817cc4dfce218d2ab87f00cd3bc059d build_options="gnutls gssapi ldap rtmp ssh ssl zstd" build_options_default="ssh ssl zstd" vopt_conflict ssl gnutls @@ -55,10 +55,10 @@ post_install() { fi # Fix linker search paths when necessary - if [ -n "$XBPS_CROSS_BASE" ]; then + if [ -n "${XBPS_CROSS_BASE}" ]; then # Leave $XBPS_CROSS_BASE in --configure to reflect how it was built vsed -i $DESTDIR/usr/bin/curl-config \ - -e "/[ ]*--static-libs)/,/[ ]*;;/ s,-L$XBPS_CROSS_BASE,-L," + -e "/[ ]*--static-libs)/,/[ ]*;;/ s,-L${XBPS_CROSS_BASE},-L," fi vlicense COPYING