Upgrade to 36b and updated arc4random.c file
This commit is contained in:
parent
2e61a296a8
commit
f3c9d1ddc9
@ -1,2 +1,2 @@
|
|||||||
mksh-R36.cpio.gz
|
mksh-R36b.cpio.gz
|
||||||
arc4random.c
|
arc4random.c
|
||||||
|
@ -1,95 +0,0 @@
|
|||||||
Patch by Thorsten Glaser <tg@mirbsd.org> for mksh <= 36, to solve
|
|
||||||
some kind of "bug" resulting in command hang in mksh and also high
|
|
||||||
cpu workload. For more information, please have a look to Red Hat
|
|
||||||
Bugzilla ID #474115. And this patch is already in upstream version
|
|
||||||
control system and will be included in upstream's next release.
|
|
||||||
|
|
||||||
--- mksh-36/check.t 2008-10-24 23:36:05.000000000 +0200
|
|
||||||
+++ mksh-36/check.t.alias 2008-12-02 22:36:13.000000000 +0100
|
|
||||||
@@ -7,7 +7,7 @@
|
|
||||||
# http://www.research.att.com/~gsf/public/ifs.sh
|
|
||||||
|
|
||||||
expected-stdout:
|
|
||||||
- @(#)MIRBSD KSH R36 2008/10/24
|
|
||||||
+ @(#)MIRBSD KSH R36 2008/10/24 RedHat-1
|
|
||||||
description:
|
|
||||||
Check version of shell.
|
|
||||||
stdin:
|
|
||||||
@@ -151,6 +151,20 @@
|
|
||||||
hi
|
|
||||||
there
|
|
||||||
---
|
|
||||||
+name: alias-9
|
|
||||||
+description:
|
|
||||||
+ Check that recursion is detected/avoided in aliases.
|
|
||||||
+time-limit: 3
|
|
||||||
+stdin:
|
|
||||||
+ echo -n >tf
|
|
||||||
+ alias ls=ls
|
|
||||||
+ ls
|
|
||||||
+ echo $(ls)
|
|
||||||
+ exit 0
|
|
||||||
+expected-stdout:
|
|
||||||
+ tf
|
|
||||||
+ tf
|
|
||||||
+---
|
|
||||||
name: arith-lazy-1
|
|
||||||
description:
|
|
||||||
Check that only one side of ternary operator is evaluated
|
|
||||||
--- mksh-36/lex.c 2008-10-10 23:31:05.000000000 +0200
|
|
||||||
+++ mksh-36/lex.c.alias 2008-12-02 22:33:53.000000000 +0100
|
|
||||||
@@ -904,16 +904,24 @@
|
|
||||||
/* prefer functions over aliases */
|
|
||||||
ktdelete(p);
|
|
||||||
else {
|
|
||||||
- Source *s;
|
|
||||||
+ Source *s = source;
|
|
||||||
|
|
||||||
- for (s = source; s->type == SALIAS; s = s->next)
|
|
||||||
+ while (s->flags & SF_HASALIAS)
|
|
||||||
if (s->u.tblp == p)
|
|
||||||
return LWORD;
|
|
||||||
+ else
|
|
||||||
+ s = s->next;
|
|
||||||
/* push alias expansion */
|
|
||||||
s = pushs(SALIAS, source->areap);
|
|
||||||
s->start = s->str = p->val.s;
|
|
||||||
s->u.tblp = p;
|
|
||||||
+ s->flags |= SF_HASALIAS;
|
|
||||||
s->next = source;
|
|
||||||
+ if (source->type == SEOF) {
|
|
||||||
+ /* prevent infinite recursion at EOS */
|
|
||||||
+ source->u.tblp = p;
|
|
||||||
+ source->flags |= SF_HASALIAS;
|
|
||||||
+ }
|
|
||||||
source = s;
|
|
||||||
afree(yylval.cp, ATEMP);
|
|
||||||
goto Again;
|
|
||||||
--- mksh-36/sh.h 2008-10-24 23:36:06.000000000 +0200
|
|
||||||
+++ mksh-36/sh.h.alias 2008-12-02 22:35:27.000000000 +0100
|
|
||||||
@@ -102,7 +102,7 @@
|
|
||||||
#ifdef EXTERN
|
|
||||||
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.245 2008/10/24 21:35:43 tg Exp $");
|
|
||||||
#endif
|
|
||||||
-#define MKSH_VERSION "R36 2008/10/24"
|
|
||||||
+#define MKSH_VERSION "R36 2008/10/24 RedHat-1"
|
|
||||||
|
|
||||||
#ifndef MKSH_INCLUDES_ONLY
|
|
||||||
|
|
||||||
@@ -1117,7 +1117,7 @@
|
|
||||||
union {
|
|
||||||
const char **strv; /* string [] */
|
|
||||||
struct shf *shf; /* shell file */
|
|
||||||
- struct tbl *tblp; /* alias (SALIAS) */
|
|
||||||
+ struct tbl *tblp; /* alias (SF_HASALIAS) */
|
|
||||||
char *freeme; /* also for SREREAD */
|
|
||||||
} u;
|
|
||||||
int line; /* line number */
|
|
||||||
@@ -1148,6 +1148,7 @@
|
|
||||||
#define SF_ALIASEND BIT(2) /* faking space at end of alias */
|
|
||||||
#define SF_TTY BIT(3) /* type == SSTDIN & it is a tty */
|
|
||||||
#define SF_FIRST BIT(4) /* initial state (to ignore UTF-8 BOM) */
|
|
||||||
+#define SF_HASALIAS BIT(5) /* u.tblp valid (SALIAS, SEOF) */
|
|
||||||
|
|
||||||
typedef union {
|
|
||||||
int i;
|
|
@ -2,14 +2,13 @@
|
|||||||
|
|
||||||
Summary: MirBSD enhanced version of the Korn Shell
|
Summary: MirBSD enhanced version of the Korn Shell
|
||||||
Name: mksh
|
Name: mksh
|
||||||
Version: 36
|
Version: 36b
|
||||||
Release: 2%{?dist}
|
Release: 1%{?dist}
|
||||||
License: BSD with advertising
|
License: BSD with advertising
|
||||||
Group: System Environment/Shells
|
Group: System Environment/Shells
|
||||||
URL: http://www.mirbsd.de/%{name}/
|
URL: http://www.mirbsd.de/%{name}/
|
||||||
Source0: http://www.mirbsd.org/MirOS/dist/mir/%{name}/%{name}-R%{version}.cpio.gz
|
Source0: http://www.mirbsd.org/MirOS/dist/mir/%{name}/%{name}-R%{version}.cpio.gz
|
||||||
Source1: http://www.mirbsd.org/MirOS/dist/hosted/other/arc4random.c
|
Source1: http://www.mirbsd.org/MirOS/dist/hosted/other/arc4random.c
|
||||||
Patch: mksh-36-alias.patch
|
|
||||||
Requires(post): grep
|
Requires(post): grep
|
||||||
Requires(postun): coreutils, grep
|
Requires(postun): coreutils, grep
|
||||||
BuildRequires: util-linux, ed
|
BuildRequires: util-linux, ed
|
||||||
@ -29,7 +28,6 @@ bourne shell replacement, pdksh successor and an alternative to the C shell.
|
|||||||
gzip -dc %{SOURCE0} | cpio -imd
|
gzip -dc %{SOURCE0} | cpio -imd
|
||||||
mv %{name}/* . && rm -rf %{name}
|
mv %{name}/* . && rm -rf %{name}
|
||||||
cp -f %{SOURCE1} .
|
cp -f %{SOURCE1} .
|
||||||
%patch -p1 -b .alias
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
CFLAGS="$RPM_OPT_FLAGS" sh Build.sh -r -j
|
CFLAGS="$RPM_OPT_FLAGS" sh Build.sh -r -j
|
||||||
@ -73,6 +71,9 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{_mandir}/man1/%{name}.1*
|
%{_mandir}/man1/%{name}.1*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sun Dec 14 2008 Robert Scheck <robert@fedoraproject.org> 36b-1
|
||||||
|
- Upgrade to 36b and updated arc4random.c file
|
||||||
|
|
||||||
* Tue Dec 02 2008 Robert Scheck <robert@fedoraproject.org> 36-2
|
* Tue Dec 02 2008 Robert Scheck <robert@fedoraproject.org> 36-2
|
||||||
- Upstream patch for command hang/high cpu workload (#474115)
|
- Upstream patch for command hang/high cpu workload (#474115)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user