From 9bbd2dcdfe59d90c5c464ff1c83bc18ccf619ecc Mon Sep 17 00:00:00 2001 From: sherlock2010 <15151851377@163.com> Date: Wed, 19 Nov 2025 16:09:03 +0800 Subject: [PATCH] runtests: don't try to stop stunnel before trying again --- ...ry-to-stop-stunnel-before-trying-aga.patch | 47 +++++++++++++++++++ curl.spec | 9 +++- 2 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 backport-runtests-don-t-try-to-stop-stunnel-before-trying-aga.patch diff --git a/backport-runtests-don-t-try-to-stop-stunnel-before-trying-aga.patch b/backport-runtests-don-t-try-to-stop-stunnel-before-trying-aga.patch new file mode 100644 index 0000000..29ac4bf --- /dev/null +++ b/backport-runtests-don-t-try-to-stop-stunnel-before-trying-aga.patch @@ -0,0 +1,47 @@ +From f9e8c5f5781c85a16f1da1c55af02e0bdd688af6 Mon Sep 17 00:00:00 2001 +From: Dan Fandrich +Date: Mon, 17 Apr 2023 16:57:17 -0700 +Subject: [PATCH] runtests: don't try to stop stunnel before trying again + +Calling stopserver() before retrying stunnel due to an error would stop +the dependent server (such as HTTP) meaning stunnel would have nothing +to talk to when it came up. Don't try to force a stop when it didn't +actually start. Also, don't mark the server as bad for future use when +it starts up on a retry. + +Reported-by: eaglegai at github +Tested-by: eaglegai at github +Fixes #10976 + +Conflict:change file +context adapt +delete change of code which not exist +Reference:https://github.com/curl/curl/commit/f9e8c5f5781c85a16f1da1c55af02e0bdd688af6 +--- + tests/runtests.pl |4 +++- + 1 file changed, 3 insertions(+), 1 deletions(-) + +diff --git a/tests/runtests.pl b/tests/runtests.pl +index f877374b1..ae0e1cd2c 100644 +--- a/tests/runtests.pl ++++ b/tests/runtests.pl +@@ -1372,12 +1372,15 @@ sub runhttpsserver { + + if($httpspid <= 0 || !pidexists($httpspid)) { + # it is NOT alive +- stopserver($server, "$pid2"); ++ # don't call stopserver since that will also kill the dependent ++ # server that has already been started properly + displaylogs($testnumcheck); + $doesntrun{$pidfile} = 1; + $httpspid = $pid2 = 0; + next; + } ++ ++ $doesntrun{$pidfile} = 0; + # we have a server! + if($verbose) { + logmsg "RUN: $srvrname server is PID $httpspid port $port\n"; +-- +2.43.0 + diff --git a/curl.spec b/curl.spec index a534ca7..33f8f41 100644 --- a/curl.spec +++ b/curl.spec @@ -6,7 +6,7 @@ Name: curl Version: 7.79.1 -Release: 42 +Release: 43 Summary: Curl is used in command lines or scripts to transfer data License: MIT URL: https://curl.haxx.se/ @@ -122,6 +122,7 @@ Patch108: backport-openssl-fix-crash-on-missing-cert-password.patch Patch109: backport-curl_path-make-SFTP-handle-a-path-like-properly.patch Patch110: backport-tool_getparam-clear-argument-only-when-needed.patch Patch111: backport-CVE-2025-9086.patch +Patch112: backport-runtests-don-t-try-to-stop-stunnel-before-trying-aga.patch BuildRequires: automake brotli-devel coreutils gcc groff krb5-devel BuildRequires: libidn2-devel libnghttp2-devel libpsl-devel @@ -290,6 +291,12 @@ rm -rf ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la %{_mandir}/man3/* %changelog +* Wed Nov 19 2025 zhouyihang - 7.79.1-43 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC:runtests: don't try to stop stunnel before trying again + * Fri Sep 12 2025 zhouyihang - 7.79.1-42 - Type:CVE - CVE:CVE-2025-9086 -- Gitee