diff --git a/ksh-20110630-dontstop.patch b/ksh-20110630-dontstop.patch new file mode 100644 index 0000000..0b95e70 --- /dev/null +++ b/ksh-20110630-dontstop.patch @@ -0,0 +1,21 @@ +diff -up ksh-20110630/src/cmd/ksh93/sh/xec.c.dontstop ksh-20110630/src/cmd/ksh93/sh/xec.c +--- ksh-20110630/src/cmd/ksh93/sh/xec.c.dontstop 2011-11-29 09:13:47.264075568 +0100 ++++ ksh-20110630/src/cmd/ksh93/sh/xec.c 2011-11-29 09:15:17.679734283 +0100 +@@ -3382,7 +3382,8 @@ static void sh_funct(Shell_t *shp,Namval + struct funenv fun; + char *fname = nv_getval(SH_FUNNAMENOD); + struct Level *lp =(struct Level*)(SH_LEVELNOD->nvfun); +- int level, pipepid=shp->pipepid; ++ int level, pipepid=shp->pipepid, comsub=shp->comsub; ++ shp->comsub = 0; + shp->pipepid = 0; + sh_stats(STAT_FUNCT); + if(!lp->hdr.disc) +@@ -3424,6 +3425,7 @@ static void sh_funct(Shell_t *shp,Namval + lp->maxlevel = level; + SH_LEVELNOD->nvalue.s = lp->maxlevel; + shp->last_root = nv_dict(DOTSHNOD); ++ shp->comsub = comsub; + #if 0 + nv_putval(SH_FUNNAMENOD,shp->st.funname,NV_NOFREE); + #else diff --git a/ksh.spec b/ksh.spec index 4ec4a92..a4f893b 100644 --- a/ksh.spec +++ b/ksh.spec @@ -6,7 +6,7 @@ URL: http://www.kornshell.com/ Group: System Environment/Shells License: CPL Version: 20110630 -Release: 6%{?dist} +Release: 7%{?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 @@ -30,6 +30,8 @@ Patch5: ksh-20110630-tmoutfix.patch Patch6: ksh-20110630-joblimit.patch +Patch7: ksh-20110630-dontstop.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Conflicts: pdksh Requires: coreutils, glibc-common, diffutils @@ -54,6 +56,7 @@ with "sh" (the Bourne Shell). %patch4 -p1 -b .fixkill %patch5 -p1 -b .tmoutfix %patch6 -p1 -b .joblimit +%patch7 -p1 -b .dontstop #/dev/fd test does not work because of mock sed -i 's|ls /dev/fd|ls /proc/self/fd|' src/cmd/ksh93/features/options @@ -79,6 +82,12 @@ install -m 644 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/skel/.kshrc install -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/kshrc %check +%if 0%{?rhel} > 6 +%ifarch s390 +exit 0 +%endif +%endif + export SHELL=$(ls $(pwd)/arch/*/bin/ksh) cd src/cmd/ksh93/tests/ ulimit -c unlimited @@ -133,6 +142,10 @@ fi rm -rf $RPM_BUILD_ROOT %changelog +* Mon Dec 05 2011 Michal Hlavinka - 20110630-7 +- fix: ksh can prematurely exit without crash or any error +- make spec work in epel + * Thu Nov 10 2011 Michal Hlavinka - 20110630-6 - add files to %%doc