[ksh] fix ( ) compound list altering environment
Michal Hlavinka
mhlavink at fedoraproject.org
Mon Mar 7 10:40:00 UTC 2011
commit 524fb3b137ba32675dec7fa2ddf91013630c985f
Author: Michal Hlavinka <mhlavink at redhat.com>
Date: Mon Mar 7 11:39:51 2011 +0100
fix ( ) compound list altering environment
ksh-20110208-clist.patch | 12 ++++++++++++
ksh.spec | 8 +++++++-
2 files changed, 19 insertions(+), 1 deletions(-)
---
diff --git a/ksh-20110208-clist.patch b/ksh-20110208-clist.patch
new file mode 100644
index 0000000..4f9d1ed
--- /dev/null
+++ b/ksh-20110208-clist.patch
@@ -0,0 +1,12 @@
+diff -up ksh-20110208/src/cmd/ksh93/sh/subshell.c.clist ksh-20110208/src/cmd/ksh93/sh/subshell.c
+--- ksh-20110208/src/cmd/ksh93/sh/subshell.c.clist 2010-11-03 21:01:11.000000000 +0100
++++ ksh-20110208/src/cmd/ksh93/sh/subshell.c 2011-03-02 15:52:14.339083830 +0100
+@@ -242,7 +242,7 @@ Namval_t *sh_assignok(register Namval_t
+ if(!sp->shpwd || np==SH_LEVELNOD || np==L_ARGNOD || np==SH_SUBSCRNOD || np==SH_NAMENOD)
+ return(np);
+ /* don't bother to save if in newer scope */
+- if(sp->var!=shp->var_tree && shp->last_root==shp->var_tree)
++ if(sp->var!=shp->var_tree && sp->var!=shp->var_base && shp->last_root==shp->var_tree)
+ return(np);
+ if((ap=nv_arrayptr(np)) && (mp=nv_opensub(np)))
+ {
diff --git a/ksh.spec b/ksh.spec
index c593fbe..7f5cf21 100644
--- a/ksh.spec
+++ b/ksh.spec
@@ -6,7 +6,7 @@ URL: http://www.kornshell.com/
Group: System Environment/Shells
License: CPL
Version: 20110208
-Release: 1%{?dist}
+Release: 2%{?dist}
Source0: http://www.research.att.com/~gsf/download/tgz/ast-ksh.%{releasedate}.tgz
Source1: http://www.research.att.com/~gsf/download/tgz/INIT.%{releasedate}.tgz
Source3: kshrc.rhs
@@ -20,6 +20,8 @@ Patch1: ksh-20070328-builtins.patch
#fix regression test suite to be usable during packagebuild - Fedora/RHEL specific
Patch2: ksh-20100826-fixregr.patch
+Patch3: ksh-20110208-clist.patch
+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Conflicts: pdksh
Requires: coreutils, glibc-common, diffutils
@@ -40,6 +42,7 @@ with "sh" (the Bourne Shell).
%setup -q -T -D -a 1
%patch1 -p1 -b .builtins
%patch2 -p1 -b .fixregr
+%patch3 -p1 -b .clist
#/dev/fd test does not work because of mock
sed -i 's|ls /dev/fd|ls /proc/self/fd|' src/cmd/ksh93/features/options
@@ -118,6 +121,9 @@ fi
rm -rf $RPM_BUILD_ROOT
%changelog
+* Mon Mar 07 2011 Michal Hlavinka <mhlavink at redhat.com> - 20110208-2
+- fix ( ) compound list altering environment
+
* Wed Feb 09 2011 Michal Hlavinka <mhlavink at redhat.com> - 20110208-1
- ksh updated to 2011-02-08
More information about the scm-commits
mailing list