--- Begin Message ---
Package: release.debian.org
Control: affects -1 + src:curl
X-Debbugs-Cc: c...@packages.debian.org
User: release.debian....@packages.debian.org
Usertags: unblock
Severity: normal
Please unblock package curl
[ Reason ]
Cherry-picking 3 patches to address regressions, two from the previous release
and one long standing regression (that we will also fix on stable and have
already fixed in oldstable).
[ Impact ]
- tool_getparam_fix_ftp_pasv.patch: Fix fully broken --ftp-pasv CLI option;
- curl_path_make_SFTP_handle_a_path.patch: Fix handling of "/~" paths in SFTP;
- tool_operate_fix_return_code_when_retry_is_used_but_not_triggered.patch:
Fix exit code when "--retry" is used but not triggered.
[ Tests ]
Upstream has an extensive testsuite and all tests passed.
[ Risks ]
The only features touched are SFTP, FPT and "--retry", the changes are small
and targeted.
The only change without a unit test change is the SFTP one, but the other tests
are evidence of no regressions.
[ Checklist ]
[x] all changes are documented in the d/changelog
[x] I reviewed all changes and I approve them
[x] attach debdiff against the package in testing
[ Other info ]
unblock curl/8.14.1-2
--
Samuel Henrique <samueloph>
diff -Nru curl-8.14.1/debian/changelog curl-8.14.1/debian/changelog
--- curl-8.14.1/debian/changelog 2025-06-04 08:21:05.000000000 +0100
+++ curl-8.14.1/debian/changelog 2025-06-11 19:18:58.000000000 +0100
@@ -1,3 +1,16 @@
+curl (8.14.1-2) unstable; urgency=medium
+
+ * gbp pq import/export: Updated hunks offsets
+ * d/patches:
+ - tool_getparam_fix_ftp_pasv.patch: New upstream patch to fix regression
+ in --ftp-pasv
+ - curl_path_make_SFTP_handle_a_path.patch: New patch to fix longstanding
+ regression on paths /~ for SFTP
+ - tool_operate_fix_return_code_when_retry_is_used_but_not_triggered.patch:
+ New patch to fix regression from 8.14.1
+
+ -- Samuel Henrique <samuel...@debian.org> Wed, 11 Jun 2025 19:18:58 +0100
+
curl (8.14.1-1) unstable; urgency=medium
* New upstream version 8.14.1
diff -Nru
curl-8.14.1/debian/patches/build-Divide-mit-krb5-gssapi-link-flags-between-LDFLAGS-a.patch
curl-8.14.1/debian/patches/build-Divide-mit-krb5-gssapi-link-flags-between-LDFLAGS-a.patch
---
curl-8.14.1/debian/patches/build-Divide-mit-krb5-gssapi-link-flags-between-LDFLAGS-a.patch
2025-06-04 08:21:05.000000000 +0100
+++
curl-8.14.1/debian/patches/build-Divide-mit-krb5-gssapi-link-flags-between-LDFLAGS-a.patch
2025-06-11 19:18:58.000000000 +0100
@@ -17,10 +17,10 @@
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
-index 6455fca..2f2a26f 100644
+index 0be35a8..f2cc9ea 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -2031,7 +2031,8 @@ if test x"$want_gss" = xyes; then
+@@ -2030,7 +2030,8 @@ if test x"$want_gss" = xyes; then
gss_libs=`$GSSAPI_ROOT/bin/$host_alias-krb5-config --libs gssapi`
LIBS="$gss_libs $LIBS"
elif test "$PKGCONFIG" != "no"; then
diff -Nru curl-8.14.1/debian/patches/curl_path_make_SFTP_handle_a_path.patch
curl-8.14.1/debian/patches/curl_path_make_SFTP_handle_a_path.patch
--- curl-8.14.1/debian/patches/curl_path_make_SFTP_handle_a_path.patch
1970-01-01 01:00:00.000000000 +0100
+++ curl-8.14.1/debian/patches/curl_path_make_SFTP_handle_a_path.patch
2025-06-11 19:18:58.000000000 +0100
@@ -0,0 +1,30 @@
+From 0ede81dcc61844cecce8904fb4de24319afeb024 Mon Sep 17 00:00:00 2001
+From: Carlos Henrique Lima Melara <charlesmel...@riseup.net>
+Date: Thu, 5 Jun 2025 14:29:06 +0200
+Subject: [PATCH] curl_path: make SFTP handle a path like /~ properly.
+
+... without a trailing slash.
+
+Fixes #17534
+Closes #17542
+---
+ lib/vssh/curl_path.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/lib/vssh/curl_path.c b/lib/vssh/curl_path.c
+index 117d2e6009f6..474a5ecb8e27 100644
+--- a/lib/vssh/curl_path.c
++++ b/lib/vssh/curl_path.c
+@@ -84,6 +84,12 @@ CURLcode Curl_getworkingpath(struct Curl_easy *data,
+ return CURLE_OUT_OF_MEMORY;
+ }
+ }
++ else {
++ if(curlx_dyn_add(&npath, "/")) {
++ free(working_path);
++ return CURLE_OUT_OF_MEMORY;
++ }
++ }
+ }
+
+ if(curlx_dyn_len(&npath)) {
diff -Nru curl-8.14.1/debian/patches/series curl-8.14.1/debian/patches/series
--- curl-8.14.1/debian/patches/series 2025-06-04 08:21:05.000000000 +0100
+++ curl-8.14.1/debian/patches/series 2025-06-11 19:18:58.000000000 +0100
@@ -1,3 +1,8 @@
ZZZgnutls-build.patch
build-Divide-mit-krb5-gssapi-link-flags-between-LDFLAGS-a.patch
11_omit-directories-from-config.patch
+
+# Post 8.14.1 patches
+tool_getparam_fix_ftp_pasv.patch
+curl_path_make_SFTP_handle_a_path.patch
+tool_operate_fix_return_code_when_retry_is_used_but_not_triggered.patch
diff -Nru curl-8.14.1/debian/patches/tool_getparam_fix_ftp_pasv.patch
curl-8.14.1/debian/patches/tool_getparam_fix_ftp_pasv.patch
--- curl-8.14.1/debian/patches/tool_getparam_fix_ftp_pasv.patch 1970-01-01
01:00:00.000000000 +0100
+++ curl-8.14.1/debian/patches/tool_getparam_fix_ftp_pasv.patch 2025-06-11
19:18:58.000000000 +0100
@@ -0,0 +1,147 @@
+From 5f805eec1149c218145097ec2a24ac7fb7d46f25 Mon Sep 17 00:00:00 2001
+From: Dan Fandrich <d...@coneharvesters.com>
+Date: Fri, 6 Jun 2025 10:21:09 -0700
+Subject: [PATCH] tool_getparam: fix --ftp-pasv
+
+This boolean option was moved to the wrong handling function. Make it
+an ARG_NONE and move it to the correct handler and add a test to
+verify that the option works.
+
+Follow-up to 698491f44
+
+Reported-by: fjaell on github
+Fixes #17545
+Closes #17547
+---
+ docs/cmdline-opts/ftp-pasv.md | 3 +-
+ src/tool_getparam.c | 8 ++---
+ tests/data/Makefile.am | 2 +-
+ tests/data/test1547 | 59 +++++++++++++++++++++++++++++++++++
+ 4 files changed, 66 insertions(+), 6 deletions(-)
+ create mode 100644 tests/data/test1547
+
+diff --git a/docs/cmdline-opts/ftp-pasv.md b/docs/cmdline-opts/ftp-pasv.md
+index 964f9769ae59..02deee30ded8 100644
+--- a/docs/cmdline-opts/ftp-pasv.md
++++ b/docs/cmdline-opts/ftp-pasv.md
+@@ -6,7 +6,8 @@ Help: Send PASV/EPSV instead of PORT
+ Protocols: FTP
+ Added: 7.11.0
+ Category: ftp
+-Multi: boolean
++Multi: mutex
++Mutexed: ftp-port
+ See-also:
+ - disable-epsv
+ Example:
+diff --git a/src/tool_getparam.c b/src/tool_getparam.c
+index 51156e46b97e..6d7020987d0a 100644
+--- a/src/tool_getparam.c
++++ b/src/tool_getparam.c
+@@ -153,7 +153,7 @@ static const struct LongShort aliases[]= {
+ {"ftp-alternative-to-user", ARG_STRG, ' ', C_FTP_ALTERNATIVE_TO_USER},
+ {"ftp-create-dirs", ARG_BOOL, ' ', C_FTP_CREATE_DIRS},
+ {"ftp-method", ARG_STRG, ' ', C_FTP_METHOD},
+- {"ftp-pasv", ARG_BOOL, ' ', C_FTP_PASV},
++ {"ftp-pasv", ARG_NONE, ' ', C_FTP_PASV},
+ {"ftp-port", ARG_STRG, 'P', C_FTP_PORT},
+ {"ftp-pret", ARG_BOOL, ' ', C_FTP_PRET},
+ {"ftp-skip-pasv-ip", ARG_BOOL, ' ', C_FTP_SKIP_PASV_IP},
+@@ -1703,6 +1703,9 @@ static ParameterError opt_none(struct GlobalConfig
*global,
+ break;
+ case C_DUMP_CA_EMBED: /* --dump-ca-embed */
+ return PARAM_CA_EMBED_REQUESTED;
++ case C_FTP_PASV: /* --ftp-pasv */
++ tool_safefree(config->ftpport);
++ break;
+
+ case C_HTTP1_0: /* --http1.0 */
+ /* HTTP version 1.0 */
+@@ -2293,9 +2296,6 @@ static ParameterError opt_filestring(struct GlobalConfig
*global,
+ case C_URL: /* --url */
+ err = parse_url(global, config, nextarg);
+ break;
+- case C_FTP_PASV: /* --ftp-pasv */
+- tool_safefree(config->ftpport);
+- break;
+ case C_SOCKS5: /* --socks5 */
+ /* socks5 proxy to use, and resolves the name locally and passes on the
+ resolved address */
+diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am
+index 1ef85cd3a2da..446674605835 100644
+--- a/tests/data/Makefile.am
++++ b/tests/data/Makefile.am
+@@ -203,7 +203,7 @@ test1508 test1509 test1510 test1511 test1512 test1513
test1514 test1515 \
+ test1516 test1517 test1518 test1519 test1520 test1521 test1522 test1523 \
+ test1524 test1525 test1526 test1527 test1528 test1529 test1530 test1531 \
+ test1532 test1533 test1534 test1535 test1536 test1537 test1538 test1539 \
+-test1540 test1541 test1542 test1543 test1544 test1545 test1546 \
++test1540 test1541 test1542 test1543 test1544 test1545 test1546 test1547 \
+ \
+ test1550 test1551 test1552 test1553 test1554 test1555 test1556 test1557 \
+ test1558 test1559 test1560 test1561 test1562 test1563 test1564 test1565 \
+diff --git a/tests/data/test1547 b/tests/data/test1547
+new file mode 100644
+index 000000000000..244151a5abd1
+--- /dev/null
++++ b/tests/data/test1547
+@@ -0,0 +1,59 @@
++<testcase>
++# Based on test100 & test101
++<info>
++<keywords>
++FTP
++PASV
++LIST
++</keywords>
++</info>
++#
++# Server-side
++<reply>
++<data mode="text">
++total 20
++drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
++drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
++drwxr-xr-x 2 98 98 512 May 2 1996 curl-releases
++-r--r--r-- 1 0 1 35 Jul 16 1996 README
++lrwxrwxrwx 1 0 1 7 Dec 9 1999 bin -> usr/bin
++dr-xr-xr-x 2 0 1 512 Oct 1 1997 dev
++drwxrwxrwx 2 98 98 512 May 29 16:04 download.html
++dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc
++drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub
++dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr
++</data>
++</reply>
++
++#
++# Client-side
++<client>
++<server>
++ftp
++</server>
++<name>
++FTP dir list PASV overriding PORT
++</name>
++<command>
++ftp://%HOSTIP:%FTPPORT/test-%TESTNUMBER/ -P %CLIENTIP --ftp-pasv
++</command>
++</client>
++
++#
++# Verify data after the test has been "shot"
++<verify>
++<strip>
++QUIT
++</strip>
++<protocol>
++USER anonymous
++PASS f...@example.com
++PWD
++CWD test-%TESTNUMBER
++EPSV
++TYPE A
++LIST
++QUIT
++</protocol>
++</verify>
++</testcase>
diff -Nru
curl-8.14.1/debian/patches/tool_operate_fix_return_code_when_retry_is_used_but_not_triggered.patch
curl-8.14.1/debian/patches/tool_operate_fix_return_code_when_retry_is_used_but_not_triggered.patch
---
curl-8.14.1/debian/patches/tool_operate_fix_return_code_when_retry_is_used_but_not_triggered.patch
1970-01-01 01:00:00.000000000 +0100
+++
curl-8.14.1/debian/patches/tool_operate_fix_return_code_when_retry_is_used_but_not_triggered.patch
2025-06-11 19:18:58.000000000 +0100
@@ -0,0 +1,124 @@
+From b42776b4f4a6e9c9f5e3ff49d7bf610ad99c45c9 Mon Sep 17 00:00:00 2001
+From: Daniel Stenberg <dan...@haxx.se>
+Date: Mon, 9 Jun 2025 08:37:49 +0200
+Subject: [PATCH] tool_operate: fix return code when --retry is used but not
+ triggered
+
+Verify with test 752
+
+Reported-by: fjaell on github
+Fixes #17554
+Closes #17559
+---
+ src/tool_operate.c | 3 +-
+ tests/data/Makefile.am | 2 +-
+ tests/data/test752 | 72 ++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 75 insertions(+), 2 deletions(-)
+ create mode 100644 tests/data/test752
+
+diff --git a/src/tool_operate.c b/src/tool_operate.c
+index 24e79e6f61fa..2397de1686d9 100644
+--- a/src/tool_operate.c
++++ b/src/tool_operate.c
+@@ -548,8 +548,9 @@ static CURLcode retrycheck(struct OperationConfig *config,
+ *retryp = TRUE;
+ per->num_retries++;
+ *delayms = sleeptime;
++ result = CURLE_OK;
+ }
+- return CURLE_OK;
++ return result;
+ }
+
+
+diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am
+index 446674605835..ab21e0e220be 100644
+--- a/tests/data/Makefile.am
++++ b/tests/data/Makefile.am
+@@ -107,7 +107,7 @@ test709 test710 test711 test712 test713 test714 test715
test716 test717 \
+ test718 test719 test720 test721 test722 test723 test724 test725 test726 \
+ test727 test728 test729 test730 test731 test732 test733 test734 test735 \
+ test736 test737 test738 test739 test740 test741 test742 test743 test744 \
+-test745 test746 test747 test748 test749 test750 test751 \
++test745 test746 test747 test748 test749 test750 test751 test752 \
+ \
+ test780 test781 test782 test783 test784 test785 test786 test787 test788 \
+ test789 test790 test791 \
+diff --git a/tests/data/test752 b/tests/data/test752
+new file mode 100644
+index 000000000000..00f14909d125
+--- /dev/null
++++ b/tests/data/test752
+@@ -0,0 +1,72 @@
++<testcase>
++<info>
++<keywords>
++HTTP
++HTTP GET
++-f
++--retry
++</keywords>
++</info>
++
++#
++# Server-side
++<reply>
++<data crlf="yes">
++HTTP/1.1 404 nopes
++Date: Tue, 09 Nov 2010 14:49:00 GMT
++Server: test-server/fake
++Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
++ETag: "21025-dc7-39462498"
++Accept-Ranges: bytes
++Content-Length: 6
++Connection: close
++Content-Type: text/html
++Funny-head: yesyes
++
++-foo-
++</data>
++
++<datacheck crlf="yes">
++HTTP/1.1 404 nopes
++Date: Tue, 09 Nov 2010 14:49:00 GMT
++Server: test-server/fake
++Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
++ETag: "21025-dc7-39462498"
++Accept-Ranges: bytes
++Content-Length: 6
++Connection: close
++Content-Type: text/html
++Funny-head: yesyes
++
++</datacheck>
++</reply>
++
++#
++# Client-side
++<client>
++<server>
++http
++</server>
++<name>
++--retry and -f on a HTTP 404 response
++</name>
++<command>
++http://%HOSTIP:%HTTPPORT/%TESTNUMBER -f --retry 1
++</command>
++</client>
++
++#
++# Verify data after the test has been "shot"
++<verify>
++<protocol crlf="yes">
++GET /%TESTNUMBER HTTP/1.1
++Host: %HOSTIP:%HTTPPORT
++User-Agent: curl/%VERSION
++Accept: */*
++
++</protocol>
++<errorcode>
++22
++</errorcode>
++</verify>
++</testcase>
diff -Nru curl-8.14.1/debian/patches/ZZZgnutls-build.patch
curl-8.14.1/debian/patches/ZZZgnutls-build.patch
--- curl-8.14.1/debian/patches/ZZZgnutls-build.patch 2025-06-04
08:21:05.000000000 +0100
+++ curl-8.14.1/debian/patches/ZZZgnutls-build.patch 2025-06-11
19:18:58.000000000 +0100
@@ -16,7 +16,7 @@
7 files changed, 78 insertions(+), 8 deletions(-)
diff --git a/configure.ac b/configure.ac
-index 8a91594..6455fca 100644
+index 9a5dd60..0be35a8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -259,6 +259,16 @@ AS_HELP_STRING([--with-gnutls=PATH],[where to look for
GnuTLS, PATH points to th
@@ -36,7 +36,7 @@
OPT_MBEDTLS=no
AC_ARG_WITH(mbedtls,dnl
AS_HELP_STRING([--with-mbedtls=PATH],[where to look for mbedTLS, PATH points
to the installation root]),[
-@@ -2674,7 +2684,7 @@ AS_HELP_STRING([--disable-versioned-symbols], [Disable
versioned symbols in shar
+@@ -2673,7 +2683,7 @@ AS_HELP_STRING([--disable-versioned-symbols], [Disable
versioned symbols in shar
)
AC_SUBST([CURL_LIBCURL_VERSIONED_SYMBOLS_PREFIX],
["$versioned_symbols_flavour"])
@@ -59,7 +59,7 @@
# This might hold -Werror
CFLAGS += @CURL_CFLAG_EXTRAS@
diff --git a/lib/Makefile.am b/lib/Makefile.am
-index 8dac236..880a713 100644
+index 463b72e..5055fd9 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -32,7 +32,11 @@ EXTRA_DIST = config-mac.h config-os400.h config-plan9.h
config-riscos.h \
@@ -74,7 +74,7 @@
if BUILD_UNITTESTS
noinst_LTLIBRARIES = libcurlu.la
-@@ -97,59 +101,115 @@ endif
+@@ -88,59 +92,115 @@ endif
libcurl_unity.c: $(top_srcdir)/scripts/mk-unity.pl $(CSOURCES)
@PERL@ $(top_srcdir)/scripts/mk-unity.pl $(srcdir) $(CSOURCES)
--exclude $(curl_EXCLUDE) > libcurl_unity.c
--- End Message ---