Skip to content

Commit

Permalink
Fix an issue in _gpg (see comments)
Browse files Browse the repository at this point in the history
  • Loading branch information
depressed-pho committed Nov 23, 2021
1 parent dc6c826 commit 7c7dd3c
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 4 deletions.
5 changes: 2 additions & 3 deletions shells/zsh/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# $NetBSD: Makefile,v 1.99 2020/12/25 21:47:47 ryoon Exp $
# $NetBSD: Makefile,v 1.100 2021/11/23 19:42:43 pho Exp $

DISTNAME= zsh-5.8
PKGREVISION= 2
PKGREVISION= 3
CATEGORIES= shells
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=zsh/}
EXTRACT_SUFX= .tar.xz
Expand Down Expand Up @@ -77,7 +77,6 @@ SUBST_VARS.pkgdb= PKG_DBDIR
.include "options.mk"

pre-configure:
${RM} ${WRKSRC}/Completion/BSD/Command/_bsd_pkg.orig
cd ${WRKSRC}; autoreconf -fiv

post-install:
Expand Down
4 changes: 3 additions & 1 deletion shells/zsh/distinfo
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
$NetBSD: distinfo,v 1.73 2021/10/26 11:18:39 nia Exp $
$NetBSD: distinfo,v 1.74 2021/11/23 19:42:43 pho Exp $

BLAKE2s (zsh-5.8.tar.xz) = 3f0edcbb7b47f43f04cd373e98257702a1cfdc4efddcec12172cc1a34ac3b3da
SHA512 (zsh-5.8.tar.xz) = 96198ecef498b7d7945fecebbe6bf14065fa8c5d81a7662164579eba8206b79575812d292adea1864bc7487ac0818ba900e25f9ab3802449340de80417c2c533
Size (zsh-5.8.tar.xz) = 3193284 bytes
SHA1 (patch-Completion_BSD_Command___bsd__pkg) = 1f9e9e896d0424c13b7d01a3d9b7af0a5fcad363
SHA1 (patch-Completion_Unix_Command___gpg) = 226b6025e646f8c74e7e648f33a1001310c9ce3e
SHA1 (patch-Config_installfns.sh) = ef0b250a0121c0e4925022e02553aefa23e6cc8d
SHA1 (patch-aczsh.m4) = 36c270d8d7cf727f48787ef889b2bd89cbf065e2
SHA1 (patch-configure.ac) = e4c743b627aeb0a409170ed6c0c3d50d274661e0
26 changes: 26 additions & 0 deletions shells/zsh/patches/patch-Completion_Unix_Command___gpg
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
$NetBSD: patch-Completion_Unix_Command___gpg,v 1.1 2021/11/23 19:42:43 pho Exp $

Fix an issue in _gpg. Simply typing "gpg2 [TAB]" fails with an error:

_gpg:176: \[]*} not found

[pho@] I couldn't figure out what was really going on. These nested
parameter expansions don't look wrong, yet zsh-5.8 somehow fails to
process them. Maybe it's misinterpreted as an indexed array
assignment? Creating arrays with unquoted values is a bad idea anyway,
because they can easily cause shell expansions in a totally unexpected
way.

--- Completion/Unix/Command/_gpg.orig 2018-12-16 01:39:51.000000000 +0000
+++ Completion/Unix/Command/_gpg
@@ -173,8 +173,8 @@ fi
'--dump-options[show all options]'
)

-extra=( ${${${args#\([^\)]#\)}#\*}%%[:=\[]*} )
-extra=( ${allopts:|extra} )
+extra=( "${(@)${(@)${(@)args#\([^\)]#\)}#\*}%%[:=\[]*}" )
+extra=( "${(@)allopts:|extra}" )
_arguments -C -s -S -A "-*" $args $extra '*:args:->args' && ret=0

if [[ $state = args ]]; then
14 changes: 14 additions & 0 deletions shells/zsh/patches/patch-Config_installfns.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
$NetBSD: patch-Config_installfns.sh,v 1.1 2021/11/23 19:42:43 pho Exp $

Do not install backup files. This is pkgsrc-specific.

--- Config/installfns.sh.orig 2021-11-23 19:34:17.385780757 +0000
+++ Config/installfns.sh
@@ -18,6 +18,7 @@ for file in $allfuncs; do
if test -f $sdir_top/$file; then
case "$file" in
*/CVS/*) continue;;
+ *.orig) continue;;
esac
if test x$FUNCTIONS_SUBDIRS != x && test x$FUNCTIONS_SUBDIRS != xno; then
case "$file" in

0 comments on commit 7c7dd3c

Please sign in to comment.