diff --git a/ksh-20100309-compsubst.patch b/ksh-20100309-compsubst.patch new file mode 100644 index 0000000..d2bed21 --- /dev/null +++ b/ksh-20100309-compsubst.patch @@ -0,0 +1,11 @@ +--- a/src/cmd/ksh93/sh/jobs.c 2010-03-10 23:57:41.000000000 +0530 ++++ b/src/cmd/ksh93/sh/jobs.c 2010-04-20 18:12:15.000000000 +0530 +@@ -1341,7 +1341,7 @@ int job_wait(register pid_t pid) + sfprintf(sfstderr,"ksh: job line %4d: wait pid=%d critical=%d flags=%o\n",__LINE__,getpid(),job.in_critical,pw->p_flag); + #endif /* DEBUG*/ + errno = 0; +- if(sh.coutpipe>=0 && sh.cpid==lastpid) ++ if(sh.coutpipe>=0 && sh.cpid && sh.cpid==lastpid ) + { + sh_close(sh.coutpipe); + sh_close(sh.cpipe[1]); diff --git a/ksh-20100309-fixwhence.patch b/ksh-20100309-fixwhence.patch new file mode 100644 index 0000000..5b3cbff --- /dev/null +++ b/ksh-20100309-fixwhence.patch @@ -0,0 +1,14 @@ +diff -up ksh-20100309/src/cmd/ksh93/bltins/whence.c.fixwh ksh-20100309/src/cmd/ksh93/bltins/whence.c +--- ksh-20100309/src/cmd/ksh93/bltins/whence.c.fixwh 2008-09-19 16:13:40.000000000 +0200 ++++ ksh-20100309/src/cmd/ksh93/bltins/whence.c 2010-04-29 12:03:22.744013139 +0200 +@@ -234,7 +234,10 @@ static int whence(Shell_t *shp,char **ar + } + } + if(flags&Q_FLAG) ++ { + r |= !cp; ++ pp = 0; ++ } + else if(cp) + { + if(flags&V_FLAG) diff --git a/ksh.spec b/ksh.spec index 8e711aa..86a935d 100644 --- a/ksh.spec +++ b/ksh.spec @@ -6,7 +6,7 @@ URL: http://www.kornshell.com/ Group: System Environment/Shells License: CPL Version: 20100309 -Release: 3%{?dist} +Release: 4%{?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 @@ -15,12 +15,19 @@ Source4: dotkshrc #don't use not wanted/needed builtins - Fedora specific Patch1: ksh-20070328-builtins.patch -#435159 - check if there is looped list +#debugging, 435159 - check if there is looped list Patch2: ksh-20090630-jlist.patch #sent upstream, 572291 - tty settings not restored after timed out read for utf-8 locale Patch3: ksh-20100309-restoretty.patch +#sent upstream, rhbz#584704 +Patch4: ksh-20100309-compsubst.patch + +#sent upstream, rhbz#587127, for ksh <2010-03-19 +Patch5: ksh-20100309-fixwhence.patch + + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Conflicts: pdksh Requires: coreutils, glibc-common, diffutils @@ -40,6 +47,8 @@ with "sh" (the Bourne Shell). %patch1 -p1 -b .builtins %patch2 -p1 -b .jlist %patch3 -p1 -b .restoretty +%patch4 -p1 -b .compsubst +%patch5 -p1 -b .fixwhence #/dev/fd test does not work because of mock sed -i 's|ls /dev/fd|ls /proc/self/fd|' src/cmd/ksh93/features/options @@ -95,6 +104,10 @@ fi rm -rf $RPM_BUILD_ROOT %changelog +* Wed May 05 2010 Michal Hlavinka - 20100309-4 +- fix infinite loop when whence builtin is used with -q option (#587127) +- fix stdin for double command substitution (#584007) + * Mon Mar 29 2010 Michal Hlavinka - 20100309-3 - fix typo in last patch