diff --git a/.gitignore b/.gitignore index 78b75b9..8e84601 100644 --- a/.gitignore +++ b/.gitignore @@ -36,3 +36,5 @@ INIT.2010-07-01.tgz /INIT.2011-05-05.tgz /ast-ksh.2011-06-30.tgz /INIT.2011-06-30.tgz +/ast-ksh.2012-01-01.tgz +/INIT.2012-01-01.tgz diff --git a/ksh-20110505-resume.patch b/ksh-20110505-resume.patch deleted file mode 100644 index 96cfa54..0000000 --- a/ksh-20110505-resume.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- old/src/cmd/ksh93/sh/xec.c Wed Jun 1 18:03:07 2011 -+++ old/src/cmd/ksh93/sh/xec.c.orig Tue Jun 7 16:20:47 2011 -@@ -2963,7 +2963,7 @@ - #else - myjob = job_post(shp,parent,postid); - #endif /* SHOPT_BGX */ -- if(job.waitall && (flags&FPOU)) -+ if(job.waitall && (flags&FPOU) && !sh_isoption(SH_MONITOR)) - { - job.curjobid = myjob+1; - if(job.exitval) diff --git a/ksh-20110630-ddotfix.patch b/ksh-20110630-ddotfix.patch deleted file mode 100644 index 5dc7734..0000000 --- a/ksh-20110630-ddotfix.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up ksh-20110630/src/cmd/ksh93/include/nval.h.ddotfix ksh-20110630/src/cmd/ksh93/include/nval.h ---- ksh-20110630/src/cmd/ksh93/include/nval.h.ddotfix 2011-12-07 14:31:31.793236351 +0100 -+++ ksh-20110630/src/cmd/ksh93/include/nval.h 2011-12-07 14:32:26.357677922 +0100 -@@ -198,7 +198,7 @@ struct Namval - - /* name-value pair macros */ - #define nv_isattr(np,f) ((np)->nvflag & (f)) --#define nv_onattr(n,f) ((n)->nvflag |= (f)) -+#define nv_onattr(n,f) ((n)?((n)->nvflag |= (f)):(f)) - #define nv_offattr(n,f) ((n)->nvflag &= ~(f)) - #define nv_isarray(np) (nv_isattr((np),NV_ARRAY)) - diff --git a/ksh-20110630-dontstop.patch b/ksh-20110630-dontstop.patch deleted file mode 100644 index 0b95e70..0000000 --- a/ksh-20110630-dontstop.patch +++ /dev/null @@ -1,21 +0,0 @@ -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-20110630-fixkill.patch b/ksh-20110630-fixkill.patch deleted file mode 100644 index c027bac..0000000 --- a/ksh-20110630-fixkill.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff -up ksh-20110630/src/cmd/ksh93/sh/jobs.c.orig ksh-20110630/src/cmd/ksh93/sh/jobs.c ---- ksh-20110630/src/cmd/ksh93/sh/jobs.c.orig 2011-08-12 11:50:39.059283656 +0200 -+++ ksh-20110630/src/cmd/ksh93/sh/jobs.c 2011-08-12 11:52:02.237911639 +0200 -@@ -1103,7 +1103,7 @@ static struct process *job_bystring(regi - - int job_kill(register struct process *pw,register int sig) - { -- Shell_t *shp = pw->p_shp; -+ Shell_t *shp; - register pid_t pid; - register int r; - const char *msg; -@@ -1116,6 +1116,7 @@ int job_kill(register struct process *pw - errno = ECHILD; - if(pw==0) - goto error; -+ shp = pw->p_shp; - pid = pw->p_pid; - #if SHOPT_COSHELL - if(pw->p_cojob) diff --git a/ksh-20110630-histfix.patch b/ksh-20110630-histfix.patch deleted file mode 100644 index 6d08682..0000000 --- a/ksh-20110630-histfix.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -up ksh-20110630/src/cmd/ksh93/edit/edit.c.histfix ksh-20110630/src/cmd/ksh93/edit/edit.c ---- ksh-20110630/src/cmd/ksh93/edit/edit.c.histfix 2011-03-03 16:20:03.000000000 +0100 -+++ ksh-20110630/src/cmd/ksh93/edit/edit.c 2011-12-07 15:55:50.576089698 +0100 -@@ -1655,7 +1655,7 @@ int ed_histgen(Edit_t *ep,const char *pa - History_t *hp; - off_t offset; - int ac=0,l,m,n,index1,index2; -- char *cp, **argv, **av, **ar; -+ char *cp, **argv=NULL, **av, **ar; - if(!(hp=ep->sh->gd->hist_ptr)) - return(0); - if(*pattern=='#') -@@ -1734,7 +1734,7 @@ int ed_histgen(Edit_t *ep,const char *pa - mplast->next = 0; - } - ep->hlist = (Histmatch_t**)argv; -- ep->hfirst = ep->hlist[0]; -+ ep->hfirst = ep->hlist ? ep->hlist[0] : NULL; - return(ep->hmax=ac); - } - diff --git a/ksh-20110630-ifsfix.patch b/ksh-20110630-ifsfix.patch deleted file mode 100644 index 4393005..0000000 --- a/ksh-20110630-ifsfix.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff -up ksh-20110630/src/cmd/ksh93/sh/subshell.c.ifsfix ksh-20110630/src/cmd/ksh93/sh/subshell.c ---- ksh-20110630/src/cmd/ksh93/sh/subshell.c.ifsfix 2011-06-09 15:16:19.000000000 +0200 -+++ ksh-20110630/src/cmd/ksh93/sh/subshell.c 2011-08-03 07:58:55.749400810 +0200 -@@ -304,7 +304,7 @@ static void nv_restore(struct subshell * - register Namval_t *mp, *np; - const char *save = sp->shpwd; - Namval_t *mpnext; -- int flags; -+ int flags,nofree; - sp->shpwd = 0; /* make sure sh_assignok doesn't save with nv_unset() */ - for(lp=sp->svar; lp; lp=lq) - { -@@ -327,7 +327,9 @@ static void nv_restore(struct subshell * - nv_setsize(mp,nv_size(np)); - if(!(flags&NV_MINIMAL)) - mp->nvenv = np->nvenv; -- mp->nvfun = np->nvfun; -+ nofree = mp->nvfun?mp->nvfun->nofree:0; -+ if((mp->nvfun = np->nvfun) && nofree) -+ mp->nvfun->nofree = nofree; - if(nv_isattr(np,NV_IDENT)) - { - nv_offattr(np,NV_IDENT); diff --git a/ksh-20110630-joblimit.patch b/ksh-20110630-joblimit.patch deleted file mode 100644 index 9860d57..0000000 --- a/ksh-20110630-joblimit.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff -up ksh-20110630/src/cmd/ksh93/sh/jobs.c.pidlimit ksh-20110630/src/cmd/ksh93/sh/jobs.c ---- ksh-20110630/src/cmd/ksh93/sh/jobs.c.pidlimit 2011-10-06 08:38:59.800632676 +0200 -+++ ksh-20110630/src/cmd/ksh93/sh/jobs.c 2011-10-06 08:39:51.434808924 +0200 -@@ -1983,13 +1983,13 @@ void job_subrestore(void* ptr) - for(jp=bck.list; jp; jp=jp->next) - if (!jp->next) - end = jp; -- - if(end) - end->next = bp->list; - else - bck.list = bp->list; - bck.count += bp->count; -- -+ while(bck.count > shgd->lim.child_max) -+ job_chksave(0); - for(pw=job.pwlist; pw; pw=pwnext) - { - pwnext = pw->p_nxtjob; diff --git a/ksh-20110630-tmoutfix.patch b/ksh-20110630-tmoutfix.patch deleted file mode 100644 index b08eb1b..0000000 --- a/ksh-20110630-tmoutfix.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up ksh-20110630/src/cmd/ksh93/bltins/read.c.tmoutfix ksh-20110630/src/cmd/ksh93/bltins/read.c ---- ksh-20110630/src/cmd/ksh93/bltins/read.c.tmoutfix 2011-09-22 09:30:20.421888036 +0200 -+++ ksh-20110630/src/cmd/ksh93/bltins/read.c 2011-09-22 09:31:14.148350534 +0200 -@@ -726,7 +726,7 @@ done: - if(!was_share) - sfset(iop,SF_SHARE,0); - nv_close(np); -- if((flags>>D_FLAG) && (shp->fdstatus[fd]&IOTTY)) -+ if(shp->fdstatus[fd]&IOTTY) - tty_cooked(fd); - if(flags&S_FLAG) - hist_flush(shp->gd->hist_ptr); diff --git a/ksh.spec b/ksh.spec index 1837580..d7242e1 100644 --- a/ksh.spec +++ b/ksh.spec @@ -1,12 +1,12 @@ -%global releasedate 2011-06-30 +%global releasedate 2012-01-01 Name: ksh Summary: The Original ATT Korn Shell URL: http://www.kornshell.com/ Group: System Environment/Shells -License: CPL -Version: 20110630 -Release: 9%{?dist} +License: EPL +Version: 20120101 +Release: 1%{?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,22 +20,6 @@ Patch1: ksh-20070328-builtins.patch #fix regression test suite to be usable during packagebuild - Fedora/RHEL specific Patch2: ksh-20100826-fixregr.patch -# for ksh < 2011-08-03 -Patch3: ksh-20110630-ifsfix.patch - -# sent upstream, for ksh <= 2011-08-12 -Patch4: ksh-20110630-fixkill.patch - -Patch5: ksh-20110630-tmoutfix.patch - -Patch6: ksh-20110630-joblimit.patch - -Patch7: ksh-20110630-dontstop.patch - -Patch8: ksh-20110630-ddotfix.patch - -Patch9: ksh-20110630-histfix.patch - BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Conflicts: pdksh Requires: coreutils, glibc-common, diffutils @@ -56,13 +40,6 @@ with "sh" (the Bourne Shell). %setup -q -T -D -a 1 %patch1 -p1 -b .builtins %patch2 -p1 -b .fixregr -%patch3 -p1 -b .ifsfix -%patch4 -p1 -b .fixkill -%patch5 -p1 -b .tmoutfix -%patch6 -p1 -b .joblimit -%patch7 -p1 -b .dontstop -%patch8 -p1 -b .ddotfix -%patch9 -p1 -b .histfix #/dev/fd test does not work because of mock sed -i 's|ls /dev/fd|ls /proc/self/fd|' src/cmd/ksh93/features/options @@ -75,7 +52,7 @@ export CCFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" export CC=gcc ./bin/package "make" -cp lib/package/LICENSES/cpl LICENSE +cp lib/package/LICENSES/epl LICENSE %install rm -rf $RPM_BUILD_ROOT @@ -148,6 +125,9 @@ fi rm -rf $RPM_BUILD_ROOT %changelog +* Thu Jan 05 2012 Michal Hlavinka - 20120101-1 +- ksh updated to 2012-01-01 + * Wed Dec 07 2011 Michal Hlavinka - 20110630-9 - do not crash when browsing through history containing comment (#733813) diff --git a/sources b/sources index a034c80..8b22f77 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -5f07713ecdb7dc2caa1def00672b308a ast-ksh.2011-06-30.tgz -de7e347b8e33130daad338a1e29112ff INIT.2011-06-30.tgz +546db2efb36ace2fd63dcfaeb6d0bfce ast-ksh.2012-01-01.tgz +95ad11566df5c0aeca9e01f3171dd3f4 INIT.2012-01-01.tgz