diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2016-09-18 00:35:16 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2016-09-18 00:40:09 +0200 |
commit | 72696bba828e30c8558c498211c416770097d39f (patch) | |
tree | 1c77368d2fcf7d78158c01ac69b1488c47b9348f /main | |
parent | dcae48e7228c197a2d00b08d6322c1e32744e7d5 (diff) | |
download | aports-72696bba828e30c8558c498211c416770097d39f.tar.bz2 aports-72696bba828e30c8558c498211c416770097d39f.tar.xz |
main/zsh: backport some patches from upstream
These patches are copied from Fedora package. Both of them has been
already accepted by upstream.
Diffstat (limited to 'main')
-rw-r--r-- | main/zsh/APKBUILD | 18 | ||||
-rw-r--r-- | main/zsh/fix-oom-fatal-error.patch | 91 | ||||
-rw-r--r-- | main/zsh/fix-vcs_info.patch | 58 |
3 files changed, 162 insertions, 5 deletions
diff --git a/main/zsh/APKBUILD b/main/zsh/APKBUILD index 1346e5a3a2..91a3e65364 100644 --- a/main/zsh/APKBUILD +++ b/main/zsh/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=zsh pkgver=5.2 -pkgrel=0 +pkgrel=1 pkgdesc="A very advanced and programmable command interpreter (shell)" url="http://www.zsh.org/" arch="all" @@ -12,7 +12,9 @@ makedepends="ncurses-dev" install="zsh.post-install zsh.post-upgrade zsh.pre-deinstall" source="http://www.zsh.org/pub/$pkgname-$pkgver.tar.xz zprofile - fix-zle-segfault.patch" + fix-zle-segfault.patch + fix-oom-fatal-error.patch + fix-vcs_info.patch" subpackages="$pkgname-doc" builddir="$srcdir/$pkgname-$pkgver" @@ -52,10 +54,16 @@ package() { md5sums="afe96fde08b70e23c1cab1ca7a68fb34 zsh-5.2.tar.xz a5e93cd6880da04a63fc4fcaaa03987f zprofile -1413688affa980b053dd2cdc784f8626 fix-zle-segfault.patch" +1413688affa980b053dd2cdc784f8626 fix-zle-segfault.patch +e928fc47e21e8d6fed9008b397d4f2f7 fix-oom-fatal-error.patch +0220f95cc0bceefdc13ebf994716ad9d fix-vcs_info.patch" sha256sums="f17916320ffaa844bbd7ce48ceeb5945fc5f3eff64b149b4229bbfbdf3795a9d zsh-5.2.tar.xz e3c3625d966c8277274798f26241857df5fc520e18674deba6cc356f6b022d63 zprofile -7b8bfec6f7c0df6954eb27a000ff1d077e37a1ec9fd9f37c247a53922cf0c9be fix-zle-segfault.patch" +7b8bfec6f7c0df6954eb27a000ff1d077e37a1ec9fd9f37c247a53922cf0c9be fix-zle-segfault.patch +08285e5794b72be52adf891673342ad3a0faca6912792bff120c81229c80d29e fix-oom-fatal-error.patch +ab5557588a0530f1ed423f5b0fae1445465abeac4eb7820f7df8604b456a1d39 fix-vcs_info.patch" sha512sums="9938af95e09203a0a313f441e0c23279136806f6f087475ca9a66c678c57ecffc87f73ece8133a36700af8de7cb5d1bec8559eabdec2b66102062e64026c2e72 zsh-5.2.tar.xz 59182b99447872ded8adf0d890e9359ee47fce0b7acb2808f4308f945885fbf6d977a0917bbb5c0f21454caf3ba06ab092127732da4f84292d6ab0989a0110fe zprofile -f17016b4cb95932caabdfca273696f4a444f1e45c8e7d458db54ae12542fce87bdd6fc6c4cd070948041f50760389179c69c12296665b7b9651007faafbdbee7 fix-zle-segfault.patch" +f17016b4cb95932caabdfca273696f4a444f1e45c8e7d458db54ae12542fce87bdd6fc6c4cd070948041f50760389179c69c12296665b7b9651007faafbdbee7 fix-zle-segfault.patch +3a6060af73e3aa29bf3606fb8d7c8c68080f83a7e9d0b5614356ef0981773d836bbb6abfc7c3142e5037dd9c36a688ccdb44b81bbca5206c67ae3d8e1b6b23a6 fix-oom-fatal-error.patch +addf598f1f380f08fd5682efedc493bd37f7a3c606da74ad87efe18906dcecfad7f19fdfe1b9a03bf2dc8d265d2738fd43f3d0fae78767837699c5614a5369bb fix-vcs_info.patch" diff --git a/main/zsh/fix-oom-fatal-error.patch b/main/zsh/fix-oom-fatal-error.patch new file mode 100644 index 0000000000..00755e242c --- /dev/null +++ b/main/zsh/fix-oom-fatal-error.patch @@ -0,0 +1,91 @@ +From 3925a4fbed618504f49e2a8a5551cc5800d9353b Mon Sep 17 00:00:00 2001 +From: Peter Stephenson <pws@zsh.org> +Date: Mon, 25 Jan 2016 15:43:06 +0000 +Subject: [PATCH 1/2] 37776: Set errflag before calls to zwarning(). + +This avoids an attempt to call zerr() or zerrnam() recusrively. + +Upstream-commit: be32864e6ff6a872d63314b4baedbfbf2eed54bd +Signed-off-by: Kamil Dudka <kdudka@redhat.com> +--- + Src/utils.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Src/utils.c b/Src/utils.c +index 4640970..9ce3ee9 100644 +--- a/Src/utils.c ++++ b/Src/utils.c +@@ -169,12 +169,12 @@ VA_DCL + errflag |= ERRFLAG_ERROR; + return; + } ++ errflag |= ERRFLAG_ERROR; + + VA_START(ap, fmt); + VA_GET_ARG(ap, fmt, const char *); + zwarning(NULL, fmt, ap); + va_end(ap); +- errflag |= ERRFLAG_ERROR; + } + + /**/ +@@ -188,13 +188,13 @@ VA_DCL + + if (errflag || noerrs) + return; ++ errflag |= ERRFLAG_ERROR; + + VA_START(ap, fmt); + VA_GET_ARG(ap, cmd, const char *); + VA_GET_ARG(ap, fmt, const char *); + zwarning(cmd, fmt, ap); + va_end(ap); +- errflag |= ERRFLAG_ERROR; + } + + /**/ +-- +2.5.0 + + +From 7a028030cfdcd85b61950e4a530442ebff359f4c Mon Sep 17 00:00:00 2001 +From: Kamil Dudka <kdudka@redhat.com> +Date: Mon, 25 Jan 2016 18:01:07 +0100 +Subject: [PATCH 2/2] 37780: Care printing error if nothing to print. + +Upstream-commit: 69c86cd2c3f1533d9b4b345f98d3922418bc6dac +Signed-off-by: Kamil Dudka <kdudka@redhat.com> +--- + Src/utils.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/Src/utils.c b/Src/utils.c +index 9ce3ee9..bb3c241 100644 +--- a/Src/utils.c ++++ b/Src/utils.c +@@ -133,9 +133,11 @@ zwarning(const char *cmd, const char *fmt, va_list ap) + if (isatty(2)) + zleentry(ZLE_CMD_TRASH); + ++ char *prefix = scriptname ? scriptname : (argzero ? argzero : ""); ++ + if (cmd) { + if (unset(SHINSTDIN) || locallevel) { +- nicezputs(scriptname ? scriptname : argzero, stderr); ++ nicezputs(prefix, stderr); + fputc((unsigned char)':', stderr); + } + nicezputs(cmd, stderr); +@@ -147,8 +149,7 @@ zwarning(const char *cmd, const char *fmt, va_list ap) + * program/script is running. It's also set in shell functions, + * so test locallevel, too. + */ +- nicezputs((isset(SHINSTDIN) && !locallevel) ? "zsh" : +- scriptname ? scriptname : argzero, stderr); ++ nicezputs((isset(SHINSTDIN) && !locallevel) ? "zsh" : prefix, stderr); + fputc((unsigned char)':', stderr); + } + +-- +2.5.0 + diff --git a/main/zsh/fix-vcs_info.patch b/main/zsh/fix-vcs_info.patch new file mode 100644 index 0000000000..8432bf85c5 --- /dev/null +++ b/main/zsh/fix-vcs_info.patch @@ -0,0 +1,58 @@ +From 17f17599d33e334d3ec78ab94956f440f18aaf04 Mon Sep 17 00:00:00 2001 +From: Peter Stephenson <pws@zsh.org> +Date: Tue, 8 Dec 2015 12:59:48 +0000 +Subject: [PATCH 1/2] 37347: Remove incorrect local for msgs in VCS info + +Upstream-commit: 4105f79a3a9b5a85c4ce167865e5ac661be160dc +Signed-off-by: Kamil Dudka <kdudka@redhat.com> +--- + Functions/VCS_Info/VCS_INFO_nvcsformats | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/Functions/VCS_Info/VCS_INFO_nvcsformats b/Functions/VCS_Info/VCS_INFO_nvcsformats +index 203a86d..581aa5a 100644 +--- a/Functions/VCS_Info/VCS_INFO_nvcsformats ++++ b/Functions/VCS_Info/VCS_INFO_nvcsformats +@@ -4,7 +4,6 @@ + + setopt localoptions noksharrays NO_shwordsplit + local c v rr +-local -a msgs + + if [[ $1 == '-preinit-' ]] ; then + c='default' +-- +2.5.0 + + +From b5cea7b0719e7d1d97dc76ed3df91c865596644a Mon Sep 17 00:00:00 2001 +From: Frank Terbeck <ft@bewatermyfriend.org> +Date: Wed, 30 Dec 2015 14:58:32 +0100 +Subject: [PATCH 2/2] 37451: vcs_info: Declare "msgs" in early context + +The parameter *is* being declared with the redefinition of the +function, but not in its initial form, which gets you a warning +about the parameter being defined globally. This fixes it. + +Upstream-commit: dab6e7c2319c0aadb39eb9cce677e0a35da8314d +Signed-off-by: Kamil Dudka <kdudka@redhat.com> +--- + Functions/VCS_Info/vcs_info | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Functions/VCS_Info/vcs_info b/Functions/VCS_Info/vcs_info +index 628dde9..f13f6b5 100644 +--- a/Functions/VCS_Info/vcs_info ++++ b/Functions/VCS_Info/vcs_info +@@ -10,7 +10,7 @@ + + setopt localoptions noksharrays extendedglob NO_shwordsplit + local file func sys +-local -a static_functions ++local -a static_functions msgs + local -i maxexports + + static_functions=( +-- +2.5.0 + |