
This directory contains patches to the GNU Bourne Again SHell (BASH)
version 1.05 + official patches for MINIX 1.5.10 (386 version)

To use this you need

     MINIX + Bruce Evans' 386 patches
     gcc, make etc (as in our port from plains.nodak)
     bash-1.05.tar.Z
     bash-1.05-patches.tar.Z

The bash source is available from prep.mit.edu (18.71.0.38) in
/u2/emacs.

Note that there is very little documentation with bash but a manual
page is available on slc2.ins.cwru.edu (129.22.8.104) in pub/bash.
Note this directory also contains a later version of bash
(bash-1.07.cwru.tar.Z) which has many bug fixes but I have not yet
ported it to MINIX.  I have heard that it does work and requires less
changes the than 1.05 but haven't got round to doing yet.

To build bash

1) Unpack bash-1.05.tar.Z

2) Unpack bash-1.05-patches.tar.Z
   apply these patches as per the instruction within

3) Unpack the minix patches
   Copy bash-m.diff to bash-1.05/ and type
      patch <bash-m-diff
   Copy readline.cdiff into bash-1.05/readline and type
      patch <readline.cdiff

4) DON'T follow the bash intsructions for building bash.  A new
   makefile is provided for building bash under minix.  This is
   because I found it too difficult to intregrate minix into the normal
   scheme due to their makefile requiring too many other things (awk
   cat -s etc -- which we have but not everybody does).

   Cope Makefile.minix bash-1.05/

   In bash-1.05/ type
     make -f Makefile.bash

5) Once this has finished (you may need to type make again if
   it runs out of memory).  type ./bash
   type ls RET ^P ^A ...
   You should be able to edit the line with ls on it with emacs
   commands.

6) Put bash in /usr/local/bin and install a .profile and .bashrc
   (examples are provided which allow you to have two logins one
   with shell bash and another with shell sh).

7) Edit your entry in the passwd file (last field) to use /usr/local/bin/bash
   DO NOT make root's shell bash as if things don't work you might never
   be able to login again.


Apologies for this not being very well packaged up.

BUGS.

bash under minix doesn't have job control (as minix doesn't have
job control).  

There is famous bug in bash 1.05 which if the builtin command history
is typed them bash gets a segmentation violation and core dumps.
The following is from the net, I don't know if it works
> In builtins.c, line 1704:
> 
> There is a reference to list->word->word, without a test for list
> being null. The previous if-expression does test for list being null,
> but this if is outside (after) of that. I am not sure if this is the
> right fix, but seems to "fix" the problem here:
> 
> ----
>   if (list && list->word && list->word->word &&  /* fix? */
>       strcmp (list->word->word, "-s") == 0)
>     {
>       extern int history_expand ();
> ----

There are other bugs but many of them are bugs in bash rather than 
bugs in the minix port.  If they annoy too much you should try and
port bash-1.07.cwru (or the official bash-1.08 when it comes out).
With these pacthes that should be quite easy.

Let me know if you have any problems


Alan W Black

Alan W Black                          80 South Bridge, Edinburgh, UK
Dept of Artificial Intelligence       tel: (+44) -31 650 2713
University of Edinburgh               email: awb@ed.ac.uk





