+++ /dev/null
---- ash-linux-0.2/bltin/echo.c.foo Sat Sep 11 23:55:02 1999
-+++ ash-linux-0.2/bltin/echo.c Sat Sep 11 23:57:48 1999
-@@ -63,7 +63,13 @@
- if (argc)
- ap++;
- if ((p = *ap) != NULL) {
-- if (equal(p, "-n")) {
-+ if (equal(p,"-en") || equal(p,"-ne")) {
-+ nflag++;
-+#ifndef eflag
-+ eflag++;
-+#endif
-+ ap++;
-+ } else if (equal(p, "-n")) {
- nflag++;
- ap++;
- } else if (equal(p, "-e")) {
+++ /dev/null
---- ash-linux-0.2/eval.c.exit Wed Mar 29 15:43:37 2000
-+++ ash-linux-0.2/eval.c Wed Mar 29 15:39:29 2000
-@@ -206,12 +206,14 @@
- break;
- case NAND:
- evaltree(n->nbinary.ch1, EV_TESTED);
-+ flags |= EV_TESTED;
- if (evalskip || exitstatus != 0)
- goto out;
- evaltree(n->nbinary.ch2, flags);
- break;
- case NOR:
- evaltree(n->nbinary.ch1, EV_TESTED);
-+ flags |= EV_TESTED;
- if (evalskip || exitstatus == 0)
- goto out;
- evaltree(n->nbinary.ch2, flags);
-@@ -232,6 +234,7 @@
- int status = 0;
-
- evaltree(n->nif.test, EV_TESTED);
-+ flags |= EV_TESTED;
- if (evalskip)
- goto out;
- if (exitstatus == 0) {
+++ /dev/null
---- ash-linux-0.2/parser.c.foo Sat Sep 11 17:33:40 1999
-+++ ash-linux-0.2/parser.c Sat Sep 11 17:36:02 1999
-@@ -552,15 +552,11 @@
- }
- } else if (n->type == NTOFD || n->type == NFROMFD) {
- if (is_digit(wordtext[0]))
-- n->ndup.dupfd = digit_val(wordtext[0]);
-+ n->ndup.dupfd = atoi(wordtext);
- else if (wordtext[0] == '-')
- n->ndup.dupfd = -1;
- else
-- goto bad;
-- if (wordtext[1] != '\0') {
--bad:
- synerror("Bad fd number");
-- }
- } else {
- n->nfile.fname = (union node *)stalloc(sizeof (struct narg));
- n = n->nfile.fname;
+++ /dev/null
---- ash-linux-0.2/mkinit.c.orig Tue Aug 24 06:12:51 1993
-+++ ash-linux-0.2/mkinit.c Thu Sep 23 16:23:46 1999
-@@ -349,7 +350,7 @@
- if (! amiddecls)
- addchar('\n', &decls);
- q = NULL;
-- for (p = line1 + 6 ; *p != '=' && *p != '/' ; p++);
-+ for (p = line1 + 6 ; *p != '\n' && *p != '=' && *p != '/' ; p++);
- if (*p == '=') { /* eliminate initialization */
- for (q = p ; *q && *q != ';' ; q++);
- if (*q == '\0')
+++ /dev/null
-diff -Nur ash-linux-0.2.ORIG/jobs.c ash-linux-0.2/jobs.c
---- ash-linux-0.2.ORIG/jobs.c Mon Oct 4 15:48:14 1993
-+++ ash-linux-0.2/jobs.c Tue Jan 25 14:09:03 2000
-@@ -554,6 +554,7 @@
- } else if (mode == FORK_BG) {
- ignoresig(SIGINT);
- ignoresig(SIGQUIT);
-+ ignoresig(SIGHUP);
- if ((jp == NULL || jp->nprocs == 0)
- && ! fd0_redirected_p ()) {
- close(0);
-@@ -565,6 +566,7 @@
- if (mode == FORK_BG) {
- ignoresig(SIGINT);
- ignoresig(SIGQUIT);
-+ ignoresig(SIGHUP);
- if ((jp == NULL || jp->nprocs == 0)
- && ! fd0_redirected_p ()) {
- close(0);
+++ /dev/null
-diff -Nur ash-linux-0.2/Makefile ash-linux-0.2.orig/Makefile
---- ash-linux-0.2/Makefile Mon Oct 4 19:48:13 1993
-+++ ash-linux-0.2.orig/Makefile Tue Sep 29 09:48:30 1998
-@@ -1,5 +1,3 @@
--# Makefile,v 1.7 1993/08/09 04:58:18 mycroft Exp
--
- PROG= sh
- SRCS= builtins.c cd.c dirent.c bltin/echo.c error.c eval.c exec.c expand.c \
- input.c jobs.c mail.c main.c memalloc.c miscbltin.c \
-@@ -14,15 +12,15 @@
-
- OBJS = $(OBJ1) $(OBJ2)
-
--CFLAGS = -O2 -fomit-frame-pointer -m486 -DSHELL -I/usr/include/bsd -I.
--LDFLAGS = -s -lbsd
-+CFLAGS = $(OPT_FLAGS) -DSHELL -I/usr/include -I. -D__BIT_TYPES_DEFINED__
-+LDFLAGS += -s
-
- CLEANFILES =\
- builtins.c builtins.h init.c mkinit mknodes mksyntax \
- nodes.c nodes.h syntax.c syntax.h token.def
-
- all: $(OBJS)
-- $(CC) -o $(PROG) $(OBJS) $(LDFLAGS)
-+ $(CC) $(STATIC) -o $(PROG) $(OBJS) $(LDFLAGS)
-
- install: all
- install sh /bin/ash
-@@ -32,7 +30,7 @@
- token.def: mktokens
- sh ./mktokens
-
--builtins.h builtins.c: mkbuiltins builtins
-+builtins.h builtins.c: mkbuiltins
- sh ./mkbuiltins
-
- init.c: mkinit $(SRCS)
-@@ -56,4 +54,7 @@
-
- clean:
- rm -f core $(CLEANFILES) $(PROG) $(OBJS)
-+
-+.c.o:
-+ ${CC} ${CFLAGS} -o $@ -c $<
-
+++ /dev/null
-diff -Nur ash-linux-0.2/mknodes.c ash-linux-0.2.orig/mknodes.c
---- ash-linux-0.2/mknodes.c Mon Sep 6 11:04:23 1993
-+++ ash-linux-0.2.orig/mknodes.c Tue Sep 29 09:47:01 1998
-@@ -89,7 +89,7 @@
- struct str *curstr; /* current structure */
-
-
--FILE *infp = stdin;
-+FILE *infp;
- char line[1024];
- int linno;
- char *linep;
-@@ -118,6 +118,7 @@
- }
- output(argv[2]);
- return(0);
-+ infp = stdin;
- }
-
-
+++ /dev/null
-The code in question had undefined behaviour in C.
-
---- ash-linux-0.2/mksyntax.c.jj Tue Aug 24 11:12:52 1993
-+++ ash-linux-0.2/mksyntax.c Wed Jun 21 08:43:03 2000
-@@ -107,7 +107,7 @@ int digit_contig; /* true if digits are
-
- main() {
- char c;
-- char d;
-+ unsigned char d, e;
- int sign;
- int i;
- char buf[80];
-@@ -132,9 +132,10 @@ main() {
- sign = 1;
- else
- sign = 0;
-- for (nbits = 1 ; ; nbits++) {
-+ e = -1;
-+ for (nbits = 1 ; nbits < 31; nbits++) {
- d = (1 << nbits) - 1;
-- if (d == c)
-+ if (d == e)
- break;
- }
- printf("%s %d bit chars\n", sign? "signed" : "unsigned", nbits);
Summary(pl): Ma³y shell bourne'a
Summary(tr): Ufak bir bourne kabuðu
Name: ash
-Version: 0.2
-Release: 27
+Version: 0.3
+Release: 1
License: BSD
Group: Applications/Shells
Group(de): Applikationen/Shells
Group(pl): Aplikacje/Pow³oki
-Source0: ftp://sunsite.unc.edu/pub/Linux/system/shells/%{name}-linux-%{version}.tar.gz
-Patch0: %{name}-make.patch
-Patch1: %{name}-mknodes.patch
-Patch2: %{name}-fd.patch
-Patch3: %{name}-exit.patch
-Patch4: %{name}-echo.patch
-Patch5: %{name}-mksyntax.patch
-Patch6: %{name}-linux-sighup.patch
-Patch7: %{name}-linux-mkinit.patch
+Source0: ftp://ftp.pld.org.pl/people/malekith/%{name}-linux-%{version}.tar.gz
Prereq: fileutils
Prereq: grep
BuildRequires: glibc-static
%prep
%setup -q -n ash-linux-%{version}
-%patch0 -p1
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
-%patch4 -p1
-%patch5 -p1
-%patch6 -p1
-%patch7 -p1
%build
-%{__make} OPT_FLAGS="%{?debug:-O -g}%{!?debug:$RPM_OPT_FLAGS}" STATIC=-static
+%{__make} OPT_FLAGS="%{?debug:-O -g}%{!?debug:$RPM_OPT_FLAGS}" \
+ LDFLAGS="-static %{!?debug:-s}"
mv -f sh ash.static
-%{__make} OPT_FLAGS="%{?debug:-O -g}%{!?debug:$RPM_OPT_FLAGS}"
+%{__make} OPT_FLAGS="%{?debug:-O -g}%{!?debug:$RPM_OPT_FLAGS}" \
+ LDFLAGS="%{!?debug:-s}"
%install
rm -rf $RPM_BUILD_ROOT