diff options
author | Zach van Rijn <me@zv.io> | 2023-04-06 03:33:12 +0000 |
---|---|---|
committer | Zach van Rijn <me@zv.io> | 2023-04-06 03:33:55 +0000 |
commit | bd152f905f4f6d4de2f4ee11809b38cf41e2d9ab (patch) | |
tree | 2bb19e54ce47ca5eddd99b043980736cc70d545f | |
parent | 8437b3bbced0ace205d9745f838d7d4353641b63 (diff) | |
download | packages-bd152f905f4f6d4de2f4ee11809b38cf41e2d9ab.tar.gz packages-bd152f905f4f6d4de2f4ee11809b38cf41e2d9ab.tar.bz2 packages-bd152f905f4f6d4de2f4ee11809b38cf41e2d9ab.tar.xz packages-bd152f905f4f6d4de2f4ee11809b38cf41e2d9ab.zip |
system/zsh: add patch for deprecated egrep usage. fixes #977.
Commit 5d9ffc28fc6a0d99338cac0b020e3eac486bccfc bumped grep from
3.7 to 3.10, and 3.8 introduced warnings for use of egrep/fgrep,
which were deprecated in 2.5.3 from 2007.
These warnings cause zsh test diffs to fail.
Patch the tests to avoid deprecated behavior.
See also: #976.
-rw-r--r-- | system/zsh/APKBUILD | 5 | ||||
-rw-r--r-- | system/zsh/fix-deprecated-egrep.patch | 84 |
2 files changed, 88 insertions, 1 deletions
diff --git a/system/zsh/APKBUILD b/system/zsh/APKBUILD index 5aaa40f26..6ae71a896 100644 --- a/system/zsh/APKBUILD +++ b/system/zsh/APKBUILD @@ -4,7 +4,7 @@ # Maintainer: Dan Theisen <djt@hxx.in> pkgname=zsh pkgver=5.8.1 -pkgrel=0 +pkgrel=1 pkgdesc="A very advanced and programmable command interpreter (shell)" url="https://www.zsh.org/" arch="all" @@ -14,6 +14,8 @@ makedepends_host="ncurses-dev pcre-dev utmps-dev" install="zsh.post-install zsh.post-upgrade zsh.pre-deinstall" # Note the custom fetch() function source="https://www.zsh.org/pub/$pkgname-$pkgver.tar.xz + fix-deprecated-egrep.patch + skel zprofile zshrc @@ -180,6 +182,7 @@ _submv() { } sha512sums="f54a5a47ed15d134902613f6169c985680afc45a67538505e11b66b348fcb367145e9b8ae2d9eac185e07ef5f97254b85df01ba97294002a8c036fd02ed5e76d zsh-5.8.1.tar.xz +fdb5c46637c7e981c0889ea9f3acd450dcd51deab57bbce11c3778c0811a36fe16dfbe06aa997c1eaa4e5c056e99fb747d4a2c93b72b9acad8e590923bfaa4fe fix-deprecated-egrep.patch d820fcf65bb3c52f23e968110b5df1188fc0b64079312f64d22ffe35de3b4f3055d4d629b3b0f97a1bfaddf62dbc80676af31c3a1a79645632082abfc854cf97 skel 63167188e22bf8933eb420a5ba068ab897531b90c8d8b8ec892f26a9180267a971013046a72b810d5b9d3add427cf650df608b0e008cd0789681ed1371b172c3 zprofile 1675e016f97333cad89b587f4292d81b6bc10e27b75482e3e0c3808539c95bd49b907b6579fb98d817f77f2f2384c0df5afa3e2b6f43b6ae9b466925cd9ccffc zshrc" diff --git a/system/zsh/fix-deprecated-egrep.patch b/system/zsh/fix-deprecated-egrep.patch new file mode 100644 index 000000000..58d141002 --- /dev/null +++ b/system/zsh/fix-deprecated-egrep.patch @@ -0,0 +1,84 @@ +diff -ur a/StartupFiles/zshrc b/StartupFiles/zshrc +--- a/StartupFiles/zshrc 2023-04-06 03:22:25.087384786 +0000 ++++ b/StartupFiles/zshrc 2023-04-06 03:24:55.577428609 +0000 +@@ -29,7 +29,7 @@ + alias po=popd + alias d='dirs -v' + alias h=history +-alias grep=egrep ++alias grep='grep -E' + alias ll='ls -l' + alias la='ls -a' + +diff -ur a/Test/D07multibyte.ztst b/Test/D07multibyte.ztst +--- a/Test/D07multibyte.ztst 2023-04-06 03:22:25.023387336 +0000 ++++ b/Test/D07multibyte.ztst 2023-04-06 03:23:50.116009605 +0000 +@@ -6,7 +6,7 @@ + unset -m LC_\* + mb_ok= + langs=(en_{US,GB}.{UTF-,utf}8 en.UTF-8 +- $(locale -a 2>/dev/null | egrep 'utf8|UTF-8')) ++ $(locale -a 2>/dev/null | grep -E 'utf8|UTF-8')) + for LANG in $langs; do + if [[ é = ? ]]; then + mb_ok=1 +diff -ur a/Test/E01options.ztst b/Test/E01options.ztst +--- a/Test/E01options.ztst 2023-04-06 03:22:25.019387496 +0000 ++++ b/Test/E01options.ztst 2023-04-06 03:22:45.338578392 +0000 +@@ -649,7 +649,7 @@ + >noktarg1 + >0 1 + +- showopt() { setopt | egrep 'localoptions|ksharrays'; } ++ showopt() { setopt | grep -E 'localoptions|ksharrays'; } + f1() { setopt localoptions ksharrays; showopt } + f2() { setopt ksharrays; showopt } + setopt kshoptionprint +diff -ur a/Test/V07pcre.ztst b/Test/V07pcre.ztst +--- a/Test/V07pcre.ztst 2023-04-06 03:22:25.019387496 +0000 ++++ b/Test/V07pcre.ztst 2023-04-06 03:24:15.802995141 +0000 +@@ -13,7 +13,7 @@ + unset -m LC_\* + mb_ok= + langs=(en_{US,GB}.{UTF-,utf}8 en.UTF-8 +- $(locale -a 2>/dev/null | egrep 'utf8|UTF-8')) ++ $(locale -a 2>/dev/null | grep -E 'utf8|UTF-8')) + for LANG in $langs; do + if [[ é = ? ]]; then + mb_ok=1 +diff -ur a/Test/X02zlevi.ztst b/Test/X02zlevi.ztst +--- a/Test/X02zlevi.ztst 2023-04-06 03:22:25.023387336 +0000 ++++ b/Test/X02zlevi.ztst 2023-04-06 03:24:25.162626050 +0000 +@@ -4,7 +4,7 @@ + unset -m LC_\* + ZSH_TEST_LANG= + langs=(en_{US,GB}.{UTF-,utf}8 en.UTF-8 +- $(locale -a 2>/dev/null | egrep 'utf8|UTF-8')) ++ $(locale -a 2>/dev/null | grep -E 'utf8|UTF-8')) + for LANG in $langs; do + if [[ é = ? ]]; then + ZSH_TEST_LANG=$LANG +diff -ur a/Test/X03zlebindkey.ztst b/Test/X03zlebindkey.ztst +--- a/Test/X03zlebindkey.ztst 2023-04-06 03:22:25.015387655 +0000 ++++ b/Test/X03zlebindkey.ztst 2023-04-06 03:24:02.531518995 +0000 +@@ -5,7 +5,7 @@ + %prep + ZSH_TEST_LANG= + langs=(en_{US,GB}.{UTF-,utf}8 en.UTF-8 +- $(locale -a 2>/dev/null | egrep 'utf8|UTF-8')) ++ $(locale -a 2>/dev/null | grep -E 'utf8|UTF-8')) + for LANG in $langs; do + if [[ é = ? ]]; then + ZSH_TEST_LANG=$LANG +diff -ur a/Test/Y01completion.ztst b/Test/Y01completion.ztst +--- a/Test/Y01completion.ztst 2023-04-06 03:22:25.019387496 +0000 ++++ b/Test/Y01completion.ztst 2023-04-06 03:23:35.392592114 +0000 +@@ -4,7 +4,7 @@ + unset -m LC_\* + ZSH_TEST_LANG= + langs=(en_{US,GB}.{UTF-,utf}8 en.UTF-8 +- $(locale -a 2>/dev/null | egrep 'utf8|UTF-8')) ++ $(locale -a 2>/dev/null | grep -E 'utf8|UTF-8')) + for LANG in $langs; do + if [[ é = ? ]]; then + ZSH_TEST_LANG=$LANG |