public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/curl] curl-v8.23.0-3: make zsh completion work again
@ 2026-11-03 12:37 Kamil Dudka
  0 siblings, 0 replies; 2+ messages in thread
From: Kamil Dudka @ 2026-11-03 12:37 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/curl
Branch : curl-v8.23.0-3
Commit : 9ace613273f52bce8206116b7ab8fb040f7199a1
Author : Kamil Dudka <kdudka@redhat.com>
Date   : 2019-02-11T13:22:07+01:00
Stats  : +84/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/curl/c/9ace613273f52bce8206116b7ab8fb040f7199a1?branch=curl-v8.23.0-3

Log:
make zsh completion work again

---
diff --git a/0001-curl-7.64.0-zsh-completion.patch b/0001-curl-7.64.0-zsh-completion.patch
new file mode 100644
index 0000000..770a15b
--- /dev/null
+++ b/0001-curl-7.64.0-zsh-completion.patch
@@ -0,0 +1,76 @@
+From 082034e2334b2d0795b2b324ff3e0635bb7d2b86 Mon Sep 17 00:00:00 2001
+From: Alessandro Ghedini <alessandro@ghedini.me>
+Date: Tue, 5 Feb 2019 20:44:14 +0000
+Subject: [PATCH 1/2] zsh.pl: update regex to better match curl -h output
+
+The current regex fails to match '<...>' arguments properly (e.g. those
+with spaces in them), which causes an completion script with wrong
+descriptions for some options.
+
+The problem can be reproduced as follows:
+
+% curl --reso<TAB>
+
+Upstream-commit: dbd32f3241b297b96ee11a51da1a661f528ca026
+Signed-off-by: Kamil Dudka <kdudka@redhat.com>
+---
+ scripts/zsh.pl | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/scripts/zsh.pl b/scripts/zsh.pl
+index 1257190..941b322 100755
+--- a/scripts/zsh.pl
++++ b/scripts/zsh.pl
+@@ -7,7 +7,7 @@ use warnings;
+ 
+ my $curl = $ARGV[0] || 'curl';
+ 
+-my $regex = '\s+(?:(-[^\s]+),\s)?(--[^\s]+)\s([^\s.]+)?\s+(.*)';
++my $regex = '\s+(?:(-[^\s]+),\s)?(--[^\s]+)\s*(\<.+?\>)?\s+(.*)';
+ my @opts = parse_main_opts('--help', $regex);
+ 
+ my $opts_str;
+-- 
+2.17.2
+
+
+From 45abc785e101346f19599aa5f9fa1617e525ec4d Mon Sep 17 00:00:00 2001
+From: Alessandro Ghedini <alessandro@ghedini.me>
+Date: Tue, 5 Feb 2019 21:06:26 +0000
+Subject: [PATCH 2/2] zsh.pl: escape ':' character
+
+':' is interpreted as separator by zsh, so if used as part of the argument
+or option's description it needs to be escaped.
+
+The problem can be reproduced as follows:
+
+% curl -E <TAB>
+
+Bug: https://bugs.debian.org/921452
+
+Upstream-commit: b3cc8017b7364f588365be2b2629c49c142efdb7
+Signed-off-by: Kamil Dudka <kdudka@redhat.com>
+---
+ scripts/zsh.pl | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/scripts/zsh.pl b/scripts/zsh.pl
+index 941b322..0f9cbec 100755
+--- a/scripts/zsh.pl
++++ b/scripts/zsh.pl
+@@ -45,9 +45,12 @@ sub parse_main_opts {
+ 
+         my $option = '';
+ 
++        $arg =~ s/\:/\\\:/g if defined $arg;
++
+         $desc =~ s/'/'\\''/g if defined $desc;
+         $desc =~ s/\[/\\\[/g if defined $desc;
+         $desc =~ s/\]/\\\]/g if defined $desc;
++        $desc =~ s/\:/\\\:/g if defined $desc;
+ 
+         $option .= '{' . trim($short) . ',' if defined $short;
+         $option .= trim($long)  if defined $long;
+-- 
+2.17.2
+

diff --git a/curl.spec b/curl.spec
index 1a410f0..3c8279d 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,10 +1,13 @@
 Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
 Name: curl
 Version: 7.64.0
-Release: 1%{?dist}
+Release: 2%{?dist}
 License: MIT
 Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
 
+# make zsh completion work again
+Patch1:   0001-curl-7.64.0-zsh-completion.patch
+
 # patch making libcurl multilib ready
 Patch101: 0101-curl-7.32.0-multilib.patch
 
@@ -166,6 +169,7 @@ be installed.
 %setup -q
 
 # upstream patches
+%patch1 -p1
 
 # Fedora patches
 %patch101 -p1
@@ -333,6 +337,9 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
 %{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
 
 %changelog
+* Mon Feb 11 2019 Kamil Dudka <kdudka@redhat.com> - 7.64.0-2
+- make zsh completion work again
+
 * Wed Feb 06 2019 Kamil Dudka <kdudka@redhat.com> - 7.64.0-1
 - new upstream release, which fixes the following vulnerabilities
     CVE-2019-3823 - SMTP end-of-response out-of-bounds read

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [rpms/curl] curl-v8.23.0-3: make zsh completion work again
@ 2026-11-03 12:36 Kamil Dudka
  0 siblings, 0 replies; 2+ messages in thread
From: Kamil Dudka @ 2026-11-03 12:36 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/curl
Branch : curl-v8.23.0-3
Commit : 8eae4647c316593330fe56022236557df9048b42
Author : Kamil Dudka <kdudka@redhat.com>
Date   : 2017-08-15T12:34:08+02:00
Stats  : +75/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/curl/c/8eae4647c316593330fe56022236557df9048b42?branch=curl-v8.23.0-3

Log:
make zsh completion work again

---
diff --git a/0001-curl-7.55.1-zsh-completion.patch b/0001-curl-7.55.1-zsh-completion.patch
new file mode 100644
index 0000000..8a37cd4
--- /dev/null
+++ b/0001-curl-7.55.1-zsh-completion.patch
@@ -0,0 +1,67 @@
+From 918eb4c10b60a58ea6b14bea7b9fbfba4d29598c Mon Sep 17 00:00:00 2001
+From: Kamil Dudka <kdudka@redhat.com>
+Date: Mon, 14 Aug 2017 16:13:32 +0200
+Subject: [PATCH] zsh.pl: produce a working completion script again
+
+Commit curl-7_54_0-118-g8b2f22e changed the output format of curl --help
+to use <file> and <dir> instead of FILE and DIR, which caused zsh.pl to
+produce a broken completion script:
+
+% curl --<TAB>
+_curl:10: no such file or directory: seconds
+
+Closes #1779
+
+Upstream-commit: ab2a7079cd2a1ec279b1e6b587ba48e50c155e91
+Signed-off-by: Kamil Dudka <kdudka@redhat.com>
+---
+ docs/cmdline-opts/cacert.d | 2 +-
+ scripts/zsh.pl             | 5 +++--
+ src/tool_help.c            | 2 +-
+ 3 files changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/docs/cmdline-opts/cacert.d b/docs/cmdline-opts/cacert.d
+index 04e1139..b2ecf90 100644
+--- a/docs/cmdline-opts/cacert.d
++++ b/docs/cmdline-opts/cacert.d
+@@ -1,5 +1,5 @@
+ Long: cacert
+-Arg: <CA certificate>
++Arg: <file>
+ Help: CA certificate to verify peer against
+ Protocols: TLS
+ ---
+diff --git a/scripts/zsh.pl b/scripts/zsh.pl
+index f0d8c19..82b4d9f 100755
+--- a/scripts/zsh.pl
++++ b/scripts/zsh.pl
+@@ -54,10 +54,11 @@ sub parse_main_opts {
+         $option .= '}' if defined $short;
+         $option .= '\'[' . trim($desc) . ']\'' if defined $desc;
+ 
+-        $option .= ":$arg" if defined $arg;
++        $option .= ":'$arg'" if defined $arg;
+ 
+         $option .= ':_files'
+-            if defined $arg and ($arg eq 'FILE' || $arg eq 'DIR');
++            if defined $arg and ($arg eq '<file>' || $arg eq '<filename>'
++                || $arg eq '<dir>');
+ 
+         push @list, $option;
+     }
+diff --git a/src/tool_help.c b/src/tool_help.c
+index 42dc779..a5bfaba 100644
+--- a/src/tool_help.c
++++ b/src/tool_help.c
+@@ -54,7 +54,7 @@ static const struct helptxt helptext[] = {
+    "Append to target file when uploading"},
+   {"    --basic",
+    "Use HTTP Basic Authentication"},
+-  {"    --cacert <CA certificate>",
++  {"    --cacert <file>",
+    "CA certificate to verify peer against"},
+   {"    --capath <dir>",
+    "CA directory to verify peer against"},
+-- 
+2.9.5
+

diff --git a/curl.spec b/curl.spec
index 78aff99..076a723 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,11 +1,14 @@
 Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
 Name: curl
 Version: 7.55.1
-Release: 1%{?dist}
+Release: 2%{?dist}
 License: MIT
 Group: Applications/Internet
 Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
 
+# make zsh completion work again
+Patch1:   0001-curl-7.55.1-zsh-completion.patch
+
 # patch making libcurl multilib ready
 Patch101: 0101-curl-7.32.0-multilib.patch
 
@@ -149,6 +152,7 @@ be installed.
 %setup -q
 
 # upstream patches
+%patch1 -p1
 
 # Fedora patches
 %patch101 -p1
@@ -302,6 +306,9 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
 %{_libdir}/libcurl.so.[0-9].[0-9].[0-9].minimal
 
 %changelog
+* Tue Aug 15 2017 Kamil Dudka <kdudka@redhat.com> 7.55.1-2
+- make zsh completion work again
+
 * Mon Aug 14 2017 Kamil Dudka <kdudka@redhat.com> 7.55.1-1
 - new upstream release
 

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-03 12:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-03 12:37 [rpms/curl] curl-v8.23.0-3: make zsh completion work again Kamil Dudka
  -- strict thread matches above, loose matches on Subject: below --
2026-11-03 12:36 Kamil Dudka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox