diff --git a/ksh-20140415-hokaido.patch b/ksh-20140415-hokaido.patch index 5aedf10..5ff6927 100644 --- a/ksh-20140415-hokaido.patch +++ b/ksh-20140415-hokaido.patch @@ -1,8 +1,7 @@ -diff -up ksh-20140415/src/cmd/ksh93/sh/subshell.c.hokaido ksh-20140415/src/cmd/ksh93/sh/subshell.c -diff -up ksh-20140415/src/cmd/ksh93/sh/xec.c.hokaido ksh-20140415/src/cmd/ksh93/sh/xec.c ---- ksh-20140415/src/cmd/ksh93/sh/xec.c.hokaido 2014-03-17 22:13:55.000000000 +0100 -+++ ksh-20140415/src/cmd/ksh93/sh/xec.c 2014-05-20 18:23:49.712532290 +0200 -@@ -1630,12 +1630,20 @@ tryagain: +diff -up ksh-20120801/src/cmd/ksh93/sh/xec.c.hokaido ksh-20120801/src/cmd/ksh93/sh/xec.c +--- ksh-20120801/src/cmd/ksh93/sh/xec.c.hokaido 2014-09-18 14:41:57.696756230 +0200 ++++ ksh-20120801/src/cmd/ksh93/sh/xec.c 2014-09-18 14:43:55.439205247 +0200 +@@ -1633,12 +1633,20 @@ int sh_exec(register const Shnode_t *t, #endif /* SHOPT_COSHELL */ if(shp->subshell) { @@ -11,7 +10,7 @@ diff -up ksh-20140415/src/cmd/ksh93/sh/xec.c.hokaido ksh-20140415/src/cmd/ksh93/ + shp->comsub = 2; sh_subtmpfile(shp); + shp->comsub = comsubsave; -+ if(shp->comsub==1 && !(shp->fdstatus[1]&IONOSEEK)) ++ if(shp->comsub==1 && (!(shp->fdstatus[1]&IONOSEEK))) + unpipe = iousepipe(shp); + if((type&(FAMP|TFORK))==(FAMP|TFORK)) @@ -24,3 +23,15 @@ diff -up ksh-20140415/src/cmd/ksh93/sh/xec.c.hokaido ksh-20140415/src/cmd/ksh93/ sh_subfork(); } } +@@ -2107,7 +2115,11 @@ int sh_exec(register const Shnode_t *t, + job.curjobid = 0; + if(shp->subshell) + { ++ int comsubsave = shp->comsub; ++ if(comsubsave==1) ++ shp->comsub = 2; + sh_subtmpfile(shp); ++ shp->comsub = comsubsave; + if(shp->comsub==1 && !(shp->fdstatus[1]&IONOSEEK)) + iousepipe(shp); + } diff --git a/ksh.spec b/ksh.spec index f26d800..5c0e8ba 100644 --- a/ksh.spec +++ b/ksh.spec @@ -9,7 +9,7 @@ Group: System Environment/Shells #CPL everywhere else (for KSH itself) License: CPL Version: %{releasedate} -Release: 20%{?dist} +Release: 21%{?dist} Source0: http://www.research.att.com/~gsf/download/tgz/ast-ksh.%{release_date}.tgz Source1: http://www.research.att.com/~gsf/download/tgz/INIT.%{release_date}.tgz Source2: kshcomp.conf @@ -118,7 +118,8 @@ Patch49: ksh-20120801-cdfix3.patch # sent upstream, rhbz#1116506 Patch50: ksh-20120801-locking.patch -Patch100: ksh-20130613-cdfix4.patch +Patch51: ksh-20130613-cdfix4.patch +Patch52: ksh-20120801-xufix.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Conflicts: pdksh @@ -174,7 +175,8 @@ with "sh" (the Bourne Shell). %patch48 -p1 -b .fununset %patch49 -p1 -b .cdfix3 %patch50 -p1 -b .locking -%patch100 -p1 -b .cdfix4 +%patch51 -p1 -b .cdfix4 +%patch52 -p1 -b .xufix #/dev/fd test does not work because of mock sed -i 's|ls /dev/fd|ls /proc/self/fd|' src/cmd/ksh93/features/options @@ -275,6 +277,10 @@ fi rm -rf $RPM_BUILD_ROOT %changelog +* Fri Mar 06 2015 Michal Hlavinka - 20120801-21 +- exporting fixed with variable corrupted its data (#1192027) +- ksh hangs when command substitution containing a pipe fills out the pipe buffer (#1121204) + * Wed Aug 27 2014 Michal Hlavinka - 20120801-20 - cd builtin file descriptor operations messed with IO redirections (#1133586)