diff --git a/mksh-39c-dblalias.patch b/mksh-39c-dblalias.patch deleted file mode 100644 index fd04f5f..0000000 --- a/mksh-39c-dblalias.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- a/check.t 2010/07/19 22:41:01 1.383 -+++ b/check.t 2010/07/21 11:31:13 1.384 -@@ -184,6 +184,17 @@ stdin: - expected-stdout: - tf - tf -+--- -+name: alias-10 -+description: -+ Check that recursion is detected/avoided in aliases. -+ Regression, introduced during an old bugfix. -+stdin: -+ alias foo='print hello ' -+ alias bar='foo world' -+ echo $(bar) -+expected-stdout: -+ hello world - --- - name: arith-lazy-1 - description: ---- a/lex.c 2010/07/17 22:09:36 1.116 -+++ b/lex.c 2010/07/21 11:31:15 1.117 -@@ -1110,7 +1110,7 @@ yylex(int cf) - else { - Source *s = source; - -- while (s->flags & SF_HASALIAS) -+ while (s && (s->flags & SF_HASALIAS)) - if (s->u.tblp == p) - return (LWORD); - else diff --git a/mksh-39c-fixsetx.patch b/mksh-39c-fixsetx.patch deleted file mode 100644 index d2917fe..0000000 --- a/mksh-39c-fixsetx.patch +++ /dev/null @@ -1,69 +0,0 @@ ---- old/shf.c 2009/11/28 14:28:03 1.35 -+++ new/shf.c 2010/07/19 22:41:04 1.36 -@@ -636,32 +636,45 @@ shf_write(const char *buf, int nbytes, s - shf->wnleft -= ncopy; - } - if (nbytes > 0) { -- /* Flush deals with strings and sticky errors */ -- if (shf_emptybuf(shf, EB_GROW) == EOF) -- return (EOF); -- if (nbytes > shf->wbsize) { -- ncopy = nbytes; -- if (shf->wbsize) -- ncopy -= nbytes % shf->wbsize; -- nbytes -= ncopy; -- while (ncopy > 0) { -- n = write(shf->fd, buf, ncopy); -- if (n < 0) { -- if (errno == EINTR && -- !(shf->flags & SHF_INTERRUPT)) -- continue; -- shf->flags |= SHF_ERROR; -- shf->errno_ = errno; -- shf->wnleft = 0; -- /* Note: fwrite(3S) returns 0 for -- * errors - this doesn't */ -+ if (shf->flags & SHF_STRING) { -+ /* resize buffer until there's enough space left */ -+ while (nbytes > shf->wnleft) -+ if (shf_emptybuf(shf, EB_GROW) == EOF) - return (EOF); -+ /* then write everything into the buffer */ -+ } else { -+ /* flush deals with sticky errors */ -+ if (shf_emptybuf(shf, EB_GROW) == EOF) -+ return (EOF); -+ /* write chunks larger than window size directly */ -+ if (nbytes > shf->wbsize) { -+ ncopy = nbytes; -+ if (shf->wbsize) -+ ncopy -= nbytes % shf->wbsize; -+ nbytes -= ncopy; -+ while (ncopy > 0) { -+ n = write(shf->fd, buf, ncopy); -+ if (n < 0) { -+ if (errno == EINTR && -+ !(shf->flags & SHF_INTERRUPT)) -+ continue; -+ shf->flags |= SHF_ERROR; -+ shf->errno_ = errno; -+ shf->wnleft = 0; -+ /* -+ * Note: fwrite(3) returns 0 -+ * for errors - this doesn't -+ */ -+ return (EOF); -+ } -+ buf += n; -+ ncopy -= n; - } -- buf += n; -- ncopy -= n; - } -+ /* ... and buffer the rest */ - } - if (nbytes > 0) { -+ /* write remaining bytes to buffer */ - memcpy(shf->wp, buf, nbytes); - shf->wp += nbytes; - shf->wnleft -= nbytes; diff --git a/mksh-39c-fixsusbst.patch b/mksh-39c-fixsusbst.patch deleted file mode 100644 index 4e74886..0000000 --- a/mksh-39c-fixsusbst.patch +++ /dev/null @@ -1,47 +0,0 @@ -diff -up mksh-39c/check.t.fixsubst mksh-39c/check.t ---- mksh-39c/check.t.fixsubst 2011-01-04 15:55:30.493395051 +0100 -+++ mksh-39c/check.t 2011-01-04 15:57:48.681133798 +0100 -@@ -4452,6 +4452,22 @@ expected-stderr-pattern: - /bad substitution/ - expected-exit: 1 - --- -+name: xxx-variable-syntax-2 -+stdin: -+ set 0 -+ echo ${*:0} -+expected-stderr-pattern: -+ /bad substitution/ -+expected-exit: 1 -+--- -+name: xxx-variable-syntax-3 -+stdin: -+ set -A foo 0 -+ echo ${foo[*]:0} -+expected-stderr-pattern: -+ /bad substitution/ -+expected-exit: 1 -+--- - name: xxx-substitution-eval-order - description: - Check order of evaluation of expressions -diff -up mksh-39c/eval.c.fixsubst mksh-39c/eval.c ---- mksh-39c/eval.c.fixsubst 2010-02-25 21:18:39.000000000 +0100 -+++ mksh-39c/eval.c 2011-01-04 15:55:30.500394934 +0100 -@@ -1016,6 +1016,8 @@ varsub(Expand *xp, const char *sp, const - case '=': /* can't assign to a vector */ - case '%': /* can't trim a vector (yet) */ - case '#': -+ case '0': -+ case '/': - return (-1); - } - if (e->loc->argc == 0) { -@@ -1039,6 +1041,8 @@ varsub(Expand *xp, const char *sp, const - case '%': /* can't trim a vector (yet) */ - case '#': - case '?': -+ case '0': -+ case '/': - return (-1); - } - XPinit(wv, 32); diff --git a/mksh.spec b/mksh.spec index 8f836f8..7b66fee 100644 --- a/mksh.spec +++ b/mksh.spec @@ -2,17 +2,14 @@ Summary: MirBSD enhanced version of the Korn Shell Name: mksh -Version: 39c -Release: 5%{?dist} +Version: 40b +Release: 1%{?dist} # BSD (setmode.c), ISC (strlcpy.c), MirOS (the rest) License: MirOS and ISC and BSD Group: System Environment/Shells URL: http://www.mirbsd.de/%{name}.htm Source0: http://www.mirbsd.org/MirOS/dist/mir/%{name}/%{name}-R%{version}.cpio.gz Source1: dot-mkshrc -Patch1: mksh-39c-fixsetx.patch -Patch2: mksh-39c-dblalias.patch -Patch3: mksh-39c-fixsusbst.patch Requires(post): grep Requires(postun): sed BuildRequires: util-linux, ed @@ -32,15 +29,6 @@ bourne shell replacement, pdksh successor and an alternative to the C shell. gzip -dc %{SOURCE0} | cpio -imd mv %{name}/* . && rm -rf %{name} -# from upstream cvs, for mksh < "R39 2010/07/19", rhbz#616771 -%patch1 -p1 -b .fixsetx - -# from upstream cvs, for mksh < "R39 2010/07/21", rhbz#616777 -%patch2 -p1 -b .dblalias - -# from upstream cvs, for mksh < "R39 2010/05/17", rhbz#618274 -%patch3 -p1 -b .fixsubst - %build CFLAGS="$RPM_OPT_FLAGS" sh Build.sh -r -combine @@ -82,6 +70,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man1/%{name}.1* %changelog +* Thu Jul 28 2011 Robert Scheck 40b-1 +- Upgrade to 40b + * Tue Feb 08 2011 Fedora Release Engineering - 39c-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild