diff --git a/SOURCES/zsh-4.3.6-8bit-prompts.patch b/SOURCES/zsh-4.3.6-8bit-prompts.patch
index 38cdd34..d759ddd 100644
--- a/SOURCES/zsh-4.3.6-8bit-prompts.patch
+++ b/SOURCES/zsh-4.3.6-8bit-prompts.patch
@@ -21,7 +21,7 @@ diff -ru zsh-4.3.9-orig/Functions/Prompts/prompt_bigfade_setup zsh-4.3.9/Functio
prompt_special_chars
+ fi
- PS1="%B%F{$fadebar}$schars[333]$schars[262]$schars[261]$schars[260]%B%F{$userhost}%K{$fadebar}%n@%m%b%k%f%F{$fadebar}%K{black}$schars[260]$schars[261]$schars[262]$schars[333]%b%f%k%F{$fadebar}%K{black}$schars[333]$schars[262]$schars[261]$schars[260]%B%F{$date}%K{black} %D{%a %b %d} %D{%I:%M:%S%P}$prompt_newline%B%F{$cwd}%K{black}$PWD>%b%f%k "
+ PS1="%B%F{$fadebar}$schars[333]$schars[262]$schars[261]$schars[260]%B%F{$userhost}%K{$fadebar}%n@%m%b%k%f%F{$fadebar}%K{black}$schars[260]$schars[261]$schars[262]$schars[333]%b%f%k%F{$fadebar}%K{black}$schars[333]$schars[262]$schars[261]$schars[260]%B%F{$date}%K{black} %D{%a %b %d} %D{%I:%M:%S%P}$prompt_newline%B%F{$cwd}%K{black}%d>%b%f%k "
PS2="%B%F{$fadebar}$schars[333]$schars[262]$schars[261]$schars[260]%b%F{$fadebar}%K{black}$schars[260]$schars[261]$schars[262]$schars[333]%F{$fadebar}%K{black}$schars[333]$schars[262]$schars[261]$schars[260]%B%F{$fadebar}>%b%f%k "
diff -ru zsh-4.3.9-orig/Functions/Prompts/prompt_elite2_setup zsh-4.3.9/Functions/Prompts/prompt_elite2_setup
--- zsh-4.3.9-orig/Functions/Prompts/prompt_elite2_setup 2008-07-14 10:04:18.000000000 -0400
@@ -96,7 +96,7 @@ diff -ru zsh-4.3.9-orig/Functions/Prompts/prompt_fade_setup zsh-4.3.9/Functions/
prompt_special_chars
+ fi
- PS1="%F{$fadebar_cwd}%B%K{$fadebar_cwd}$schars[333]$schars[262]$schars[261]$schars[260]%F{$userhost}%K{$fadebar_cwd}%B%n@%m%b%F{$fadebar_cwd}%K{black}$schars[333]$schars[262]$schars[261]$schars[260]%F{$date}%K{black}%B %D{%a %b %d} %D{%I:%M:%S%P} $prompt_newline%F{fadebar_cwd}%K{black}%B%~/%b%k%f "
+ PS1="%F{$fadebar_cwd}%B%K{$fadebar_cwd}$schars[333]$schars[262]$schars[261]$schars[260]%F{$userhost}%K{$fadebar_cwd}%B%n@%m%b%F{$fadebar_cwd}%K{black}$schars[333]$schars[262]$schars[261]$schars[260]%F{$date}%K{black}%B %D{%a %b %d} %D{%I:%M:%S%P} $prompt_newline%F{$fadebar_cwd}%K{black}%B%~/%b%k%f "
PS2="%F{$fadebar_cwd}%K{black}$schars[333]$schars[262]$schars[261]$schars[260]%f%k>"
diff -ru zsh-4.3.9-orig/Functions/Prompts/prompt_fire_setup zsh-4.3.9/Functions/Prompts/prompt_fire_setup
--- zsh-4.3.9-orig/Functions/Prompts/prompt_fire_setup 2008-07-14 10:04:18.000000000 -0400
diff --git a/SOURCES/zsh-5.0.2-noexec.patch b/SOURCES/zsh-5.0.2-noexec.patch
new file mode 100644
index 0000000..0615948
--- /dev/null
+++ b/SOURCES/zsh-5.0.2-noexec.patch
@@ -0,0 +1,59 @@
+From 7e4833e2341463c660655aa76e6a90f455021726 Mon Sep 17 00:00:00 2001
+From: Peter Stephenson
+Date: Fri, 18 Oct 2013 23:42:07 +0100
+Subject: [PATCH 1/2] 31846: fix NOEXEC option in execsimple() optimisation
+
+Upstream-commit: 8879c46a4897a0e347455334fc6b6732c203a220
+Signed-off-by: Kamil Dudka
+---
+ Src/exec.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/Src/exec.c b/Src/exec.c
+index 1ecbc39..51e8d09 100644
+--- a/Src/exec.c
++++ b/Src/exec.c
+@@ -1079,6 +1079,9 @@ execsimple(Estate state)
+ if (errflag)
+ return (lastval = 1);
+
++ if (!isset(EXECOPT))
++ return lastval = 0;
++
+ /* In evaluated traps, don't modify the line number. */
+ if (!IN_EVAL_TRAP() && !ineval && code)
+ lineno = code - 1;
+--
+2.1.0
+
+
+From 15500cd645958d2de544e851dabf7010199f7cf9 Mon Sep 17 00:00:00 2001
+From: Peter Stephenson
+Date: Sat, 19 Oct 2013 23:08:24 +0100
+Subject: [PATCH 2/2] Use VERBOSE option in execstring()
+
+Upstream-commit: 9a044f1a6ad4ecfdfeff2f89e1685a1d622cb029
+Signed-off-by: Kamil Dudka
+---
+ Src/exec.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/Src/exec.c b/Src/exec.c
+index 51e8d09..08e4b7d 100644
+--- a/Src/exec.c
++++ b/Src/exec.c
+@@ -1019,6 +1019,11 @@ execstring(char *s, int dont_change_job, int exiting, char *context)
+ Eprog prog;
+
+ pushheap();
++ if (isset(VERBOSE)) {
++ zputs(s, stderr);
++ fputc('\n', stderr);
++ fflush(stderr);
++ }
+ if ((prog = parse_string(s, 0)))
+ execode(prog, dont_change_job, exiting, context);
+ popheap();
+--
+2.1.0
+
diff --git a/SOURCES/zsh-serial.patch b/SOURCES/zsh-serial.patch
index 541781c..ebfde77 100644
--- a/SOURCES/zsh-serial.patch
+++ b/SOURCES/zsh-serial.patch
@@ -1,6 +1,6 @@
--- zsh-4.0.4/Src/builtin.c.open Tue Oct 16 02:49:17 2001
+++ zsh-4.0.4/Src/builtin.c Wed May 15 11:55:32 2002
-@@ -3489,7 +3489,7 @@ bin_read(char *name, char **args, char *
+@@ -5262,7 +5262,7 @@ bin_read(char *name, char **args, Options ops, UNUSED(int func))
if (!zleactive) {
if (SHTTY == -1) {
/* need to open /dev/tty specially */
@@ -11,7 +11,7 @@
init_shout();
--- zsh-4.0.4/Src/init.c.open Wed Oct 24 04:16:32 2001
+++ zsh-4.0.4/Src/init.c Wed May 15 12:00:07 2002
-@@ -397,7 +397,7 @@ init_io(void)
+@@ -508,7 +508,7 @@ init_io(void)
if (isatty(0)) {
zsfree(ttystrname);
if ((ttystrname = ztrdup(ttyname(0)))) {
@@ -20,7 +20,7 @@
#ifdef TIOCNXCL
/*
* See if the terminal claims to be busy. If so, and fd 0
-@@ -438,7 +438,7 @@ init_io(void)
+@@ -549,7 +549,7 @@ init_io(void)
ttystrname = ztrdup(ttyname(1));
}
if (SHTTY == -1 &&
@@ -29,8 +29,8 @@
zsfree(ttystrname);
ttystrname = ztrdup(ttyname(SHTTY));
}
-@@ -1235,3 +1235,33 @@ zsh_main(int argc, char **argv)
- : "use 'logout' to logout.", NULL, 0);
+@@ -1671,3 +1671,33 @@ zsh_main(UNUSED(int argc), char **argv)
+ : "use 'logout' to logout.");
}
}
+
diff --git a/SOURCES/zsh-test-C02-dev_fd-mock.patch b/SOURCES/zsh-test-C02-dev_fd-mock.patch
index 7e3447e..454da92 100644
--- a/SOURCES/zsh-test-C02-dev_fd-mock.patch
+++ b/SOURCES/zsh-test-C02-dev_fd-mock.patch
@@ -1,7 +1,7 @@
diff -ru zsh-4.3.6-orig/Test/C02cond.ztst zsh-4.3.6/Test/C02cond.ztst
--- zsh-4.3.6-orig/Test/C02cond.ztst 2008-02-27 06:41:13.000000000 -0500
+++ zsh-4.3.6/Test/C02cond.ztst 2008-08-25 17:39:13.000000000 -0400
-@@ -180,7 +180,8 @@
+@@ -187,7 +187,8 @@
print -u$ZTST_fd "Warning: not testing [[ -e /dev/fd/0 ]] (/dev/fd not supported)"
true
else
@@ -11,7 +11,7 @@ diff -ru zsh-4.3.6-orig/Test/C02cond.ztst zsh-4.3.6/Test/C02cond.ztst
fi
0dD:/dev/fd support in conds handled by access
-@@ -188,7 +189,8 @@
+@@ -195,7 +196,8 @@
print -u$ZTST_fd "Warning: not testing [[ -O /dev/fd/0 ]] (/dev/fd not supported)"
true
else
diff --git a/SPECS/zsh.spec b/SPECS/zsh.spec
index 72fbb6e..d34d37b 100644
--- a/SPECS/zsh.spec
+++ b/SPECS/zsh.spec
@@ -3,7 +3,7 @@
Summary: Powerful interactive shell
Name: zsh
Version: 5.0.2
-Release: 7%{?dist}
+Release: 7%{?dist}.1
License: MIT
URL: http://zsh.sourceforge.net/
Group: System Environment/Shells
@@ -16,11 +16,13 @@ Source5: zshenv.rhs
Source6: dotzshrc
Source7: zshprompt.pl
Source8: http://cgit.freedesktop.org/systemd/systemd/plain/shell-completion/systemd-zsh-completion.zsh
-# Give me better tools or die!
-%global _default_patch_fuzz 2
Patch0: zsh-serial.patch
Patch4: zsh-4.3.6-8bit-prompts.patch
Patch5: zsh-test-C02-dev_fd-mock.patch
+
+# fix NOEXEC option in execsimple() optimisation (#1146512)
+Patch7: zsh-5.0.2-noexec.patch
+
# Tmp.
Patch11: zsh-5.0.2.texi-itemx.patch
Patch12: http://ausil.fedorapeople.org/aarch64/zsh/zsh-aarch64.patch
@@ -59,6 +61,8 @@ This package contains the Zsh manual in html format.
%patch4 -p1
%patch5 -p1
+%patch7 -p1
+
%patch11 -p1
%patch12 -p1
@@ -177,6 +181,9 @@ fi
%doc Doc/*.html
%changelog
+* Thu Mar 19 2015 Kamil Dudka - 5.0.2-7.el7_1.1
+- fix NOEXEC option in execsimple() optimisation (#1146512)
+
* Tue Jan 28 2014 James Antill - 5.0.2-7
- Remove unneeded build require on tetex.
- Resolves: rhbz#1037828