From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 8DD9D158040 for ; Fri, 5 Jan 2024 05:57:52 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 808172BC0AA; Fri, 5 Jan 2024 05:57:51 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 626012BC0AA for ; Fri, 5 Jan 2024 05:57:51 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 50ABA3430BD for ; Fri, 5 Jan 2024 05:57:50 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id AF52314B4 for ; Fri, 5 Jan 2024 05:57:48 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1704434224.6da47de8d9c8087ff2f55c8fc4459387207a13cd.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/curl/, net-misc/curl/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-misc/curl/curl-8.5.0-r2.ebuild net-misc/curl/curl-9999.ebuild net-misc/curl/files/curl-8.5.0-mpd-stream-http-adjust_pollset.patch X-VCS-Directories: net-misc/curl/ net-misc/curl/files/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 6da47de8d9c8087ff2f55c8fc4459387207a13cd X-VCS-Branch: master Date: Fri, 5 Jan 2024 05:57:48 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: b187023e-bed6-4498-9973-8c0a080417e6 X-Archives-Hash: 85ce1464522e5e34baf1268a3f2bd802 commit: 6da47de8d9c8087ff2f55c8fc4459387207a13cd Author: Sam James gentoo org> AuthorDate: Fri Jan 5 05:56:33 2024 +0000 Commit: Sam James gentoo org> CommitDate: Fri Jan 5 05:57:04 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6da47de8 net-misc/curl: fix mpd streaming Bug: https://github.com/MusicPlayerDaemon/MPD/issues/1952 Bug: https://github.com/curl/curl/issues/12632 Closes: https://bugs.gentoo.org/916471 Signed-off-by: Sam James gentoo.org> .../{curl-9999.ebuild => curl-8.5.0-r2.ebuild} | 8 ++- net-misc/curl/curl-9999.ebuild | 5 +- ...curl-8.5.0-mpd-stream-http-adjust_pollset.patch | 69 ++++++++++++++++++++++ 3 files changed, 79 insertions(+), 3 deletions(-) diff --git a/net-misc/curl/curl-9999.ebuild b/net-misc/curl/curl-8.5.0-r2.ebuild similarity index 97% copy from net-misc/curl/curl-9999.ebuild copy to net-misc/curl/curl-8.5.0-r2.ebuild index 7d87477bc1f1..03cc7f61ebca 100644 --- a/net-misc/curl/curl-9999.ebuild +++ b/net-misc/curl/curl-8.5.0-r2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -123,11 +123,14 @@ QA_CONFIG_IMPL_DECL_SKIP=( IoctlSocket mach_absolute_time setmode + _fseeki64 ) PATCHES=( "${FILESDIR}"/${PN}-prefix.patch "${FILESDIR}"/${PN}-respect-cflags-3.patch + "${FILESDIR}"/${P}-ipv6-configure-c99.patch + "${FILESDIR}"/${P}-mpd-stream-http-adjust_pollset.patch ) src_prepare() { @@ -344,7 +347,8 @@ multilib_src_test() { # this ends up breaking when nproc is huge (like -j80). # The network sandbox causes tests 241 and 1083 to fail; these are typically skipped # as most gentoo users don't have an 'ip6-localhost' - multilib_is_native_abi && emake test TFLAGS="-n -v -a -k -am -p -j$((2*$(makeopts_jobs))) !241 !1083" + # Required deps for 1477 are not included in the release tarball for 8.5.0 + multilib_is_native_abi && emake test TFLAGS="-n -v -a -k -am -p -j$((2*$(makeopts_jobs))) !241 !1083 !1477" } multilib_src_install() { diff --git a/net-misc/curl/curl-9999.ebuild b/net-misc/curl/curl-9999.ebuild index 7d87477bc1f1..e390e3ae71bb 100644 --- a/net-misc/curl/curl-9999.ebuild +++ b/net-misc/curl/curl-9999.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -123,11 +123,14 @@ QA_CONFIG_IMPL_DECL_SKIP=( IoctlSocket mach_absolute_time setmode + _fseeki64 ) PATCHES=( "${FILESDIR}"/${PN}-prefix.patch "${FILESDIR}"/${PN}-respect-cflags-3.patch + "${FILESDIR}"/${P}-ipv6-configure-c99.patch + "${FILESDIR}"/${P}-mpd-stream-http-adjust_pollset.patch ) src_prepare() { diff --git a/net-misc/curl/files/curl-8.5.0-mpd-stream-http-adjust_pollset.patch b/net-misc/curl/files/curl-8.5.0-mpd-stream-http-adjust_pollset.patch new file mode 100644 index 000000000000..79a16a2cc7b4 --- /dev/null +++ b/net-misc/curl/files/curl-8.5.0-mpd-stream-http-adjust_pollset.patch @@ -0,0 +1,69 @@ +https://github.com/MusicPlayerDaemon/MPD/issues/1952 +https://github.com/curl/curl/issues/12632 +https://github.com/curl/curl/commit/8e2d7b9fa4264b94bd1d9838c84d16e4cd33fbea + +From 8e2d7b9fa4264b94bd1d9838c84d16e4cd33fbea Mon Sep 17 00:00:00 2001 +From: Stefan Eissing +Date: Thu, 4 Jan 2024 10:06:17 +0100 +Subject: [PATCH] http: adjust_pollset fix + +do not add a socket for POLLIN when the transfer does not want to send +(for example is paused). + +Follow-up to 47f5b1a + +Reported-by: bubbleguuum on github +Fixes #12632 +Closes #12633 +--- a/lib/cf-socket.c ++++ b/lib/cf-socket.c +@@ -1243,7 +1243,7 @@ static void cf_socket_adjust_pollset(struct Curl_cfilter *cf, + if(ctx->sock != CURL_SOCKET_BAD) { + if(!cf->connected) + Curl_pollset_set_out_only(data, ps, ctx->sock); +- else ++ else if(CURL_WANT_RECV(data)) + Curl_pollset_add_in(data, ps, ctx->sock); + CURL_TRC_CF(data, cf, "adjust_pollset -> %d socks", ps->num); + } +--- a/lib/http2.c ++++ b/lib/http2.c +@@ -2341,8 +2341,8 @@ static void cf_h2_adjust_pollset(struct Curl_cfilter *cf, + bool c_exhaust, s_exhaust; + + CF_DATA_SAVE(save, cf, data); +- c_exhaust = !nghttp2_session_get_remote_window_size(ctx->h2); +- s_exhaust = stream && stream->id >= 0 && ++ c_exhaust = want_send && !nghttp2_session_get_remote_window_size(ctx->h2); ++ s_exhaust = want_send && stream && stream->id >= 0 && + !nghttp2_session_get_stream_remote_window_size(ctx->h2, + stream->id); + want_recv = (want_recv || c_exhaust || s_exhaust); +--- a/lib/vquic/curl_ngtcp2.c ++++ b/lib/vquic/curl_ngtcp2.c +@@ -1166,9 +1166,10 @@ static void cf_ngtcp2_adjust_pollset(struct Curl_cfilter *cf, + bool c_exhaust, s_exhaust; + + CF_DATA_SAVE(save, cf, data); +- c_exhaust = !ngtcp2_conn_get_cwnd_left(ctx->qconn) || +- !ngtcp2_conn_get_max_data_left(ctx->qconn); +- s_exhaust = stream && stream->id >= 0 && stream->quic_flow_blocked; ++ c_exhaust = want_send && (!ngtcp2_conn_get_cwnd_left(ctx->qconn) || ++ !ngtcp2_conn_get_max_data_left(ctx->qconn)); ++ s_exhaust = want_send && stream && stream->id >= 0 && ++ stream->quic_flow_blocked; + want_recv = (want_recv || c_exhaust || s_exhaust); + want_send = (!s_exhaust && want_send) || + !Curl_bufq_is_empty(&ctx->q.sendbuf); +--- a/lib/vquic/curl_quiche.c ++++ b/lib/vquic/curl_quiche.c +@@ -1189,7 +1189,7 @@ static void cf_quiche_adjust_pollset(struct Curl_cfilter *cf, + + c_exhaust = FALSE; /* Have not found any call in quiche that tells + us if the connection itself is blocked */ +- s_exhaust = stream && stream->id >= 0 && ++ s_exhaust = want_send && stream && stream->id >= 0 && + (stream->quic_flow_blocked || !stream_is_writeable(cf, data)); + want_recv = (want_recv || c_exhaust || s_exhaust); + want_send = (!s_exhaust && want_send) || +