From 7f5648173fa57bf021e0678806ffa00426305fcc Mon Sep 17 00:00:00 2001 From: Liwei Ge Date: Wed, 28 Oct 2020 15:31:26 +0800 Subject: [PATCH] [build][test]Fix A05execution test case build issue zsh build will fail when run A05execution test Test ./A05execution.ztst failed: output differs from expected as shown above for: path=(/bin ${ZTST_testdir}/command.tmp/) tstcmd-interp-too-long 2>&1; echo "status $?" path=($storepath) Signed-off-by: Liwei Ge Signed-off-by: weitao zhou --- 1001-zsh-fix-A05execution-test.patch | 28 ++++++++++++++++++++++++++++ zsh.spec | 10 +++++++++- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 1001-zsh-fix-A05execution-test.patch diff --git a/1001-zsh-fix-A05execution-test.patch b/1001-zsh-fix-A05execution-test.patch new file mode 100644 index 0000000..1d6318c --- /dev/null +++ b/1001-zsh-fix-A05execution-test.patch @@ -0,0 +1,28 @@ +diff --git a/Test/A05execution.ztst b/Test/A05execution.ztst +index 567bd25..5d3d460 100644 +--- a/Test/A05execution.ztst ++++ b/Test/A05execution.ztst +@@ -52,12 +52,17 @@ + 0:path (4) + *>foo */command.tmp/tstcmd-arg + +- path=(/bin ${ZTST_testdir}/command.tmp/) +- tstcmd-interp-too-long 2>&1; echo "status $?" +- path=($storepath) +-0:path (5) +-*>*tstcmd-interp-too-long: bad interpreter: x*xn: no such file or directory +->status 127 ++ # Just check this exits with non-zero status, ++ # as output and status code can differ. ++ ( ++ path=(/bin ${ZTST_testdir}/command.tmp/) ++ if tstcmd-interp-too-long >/dev/null 2>&1; then ++ exit 0 ++ else ++ exit 1 ++ fi ++ ) ++1:path (5) + + functst() { print $# arguments:; print -l $*; } + functst "Eines Morgens" "als Gregor Samsa" diff --git a/zsh.spec b/zsh.spec index c9f75b3..daf6f6d 100644 --- a/zsh.spec +++ b/zsh.spec @@ -1,7 +1,8 @@ +%define anolis_release .0.1 Summary: Powerful interactive shell Name: zsh Version: 5.5.1 -Release: 6%{?dist}.2 +Release: 6%{anolis_release}%{?dist}.2 License: MIT URL: http://zsh.sourceforge.net/ Source0: https://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.xz @@ -24,6 +25,10 @@ Patch3: 0003-zsh-5.5.1-parse-error-exit-status.patch # drop privileges securely when unsetting PRIVILEGED option (CVE-2019-20044) Patch4: 0004-zsh-5.5.1-CVE-2019-20044.patch +# Begin: Anolis customized patches +Patch1001: 1001-zsh-fix-A05execution-test.patch +# End: Anolis customized patches + BuildRequires: autoconf BuildRequires: coreutils BuildRequires: gawk @@ -179,6 +184,9 @@ fi %doc Doc/*.html %changelog +* Tue Dec 07 2021 Weitao Zhou 5.5.1-6.0.1.2 +- Fix A05execution test case issue + * Tue Mar 03 2020 Kamil Dudka - 5.5.1-6.el8_1.2 - improve printing of error messages introduced by the fix of CVE-2019-20044 -- Gitee