Commit eebdf0a3 authored by Daniel Kahn Gillmor's avatar Daniel Kahn Gillmor

Import Upstream version 2.01

parent 28161460
This diff is collapsed.
This diff is collapsed.
This document details the incompatibilites between this version of bash,
bash-2.0, and the previous version, bash-1.14. These were discovered
by alpha and beta testers, so they will likely be encountered by a
significant number of users.
bash-2.01, and the previous widely-available version, bash-1.14. These
were discovered by alpha and beta testers, so they will likely be
encountered by a significant number of users.
1. Bash now uses a new quoting syntax, $"...", to do locale-specific
string translation. Users who have relied on the (undocumented)
......@@ -71,8 +71,33 @@ significant number of users.
command_oriented_history, glob_dot_filenames, allow_null_glob_expansion,
nolinks, hostname_completion_file, noclobber, no_exit_on_failed_exec, and
cdable_vars. Most of them are now implemented with the new `shopt'
builtin; others were already implemented by `set'.
builtin; others were already implemented by `set'. Here is a list of
correspondences:
MAIL_WARNING shopt mailwarn
notify set -o notify
history_control HISTCONTROL
command_oriented_history shopt cmdhist
glob_dot_filenames shopt dotglob
allow_null_glob_expansion shopt nullglob
nolinks set -o physical
hostname_completion_file HOSTFILE
noclobber set -o noclobber
no_exit_on_failed_exec shopt execfail
cdable_vars shopt cdable_vars
8. `ulimit' now sets both hard and soft limits and reports the soft limit
by default (when neither -H nor -S is specified). This is compatible
with versions of sh and ksh that implement `ulimit'. The bash-1.14
behavior of, for example,
ulimit -c 0
can be obtained with
ulimit -S -c 0
It may be useful to define an alias:
alias ulimit="ulimit -S"
8. The `ulimit' builtins now sets both hard and soft limits and reports the
soft limit by default (when neither -H nor -S is specified). This is
compatible with versions of sh and ksh that implement `ulimit'.
......@@ -6,10 +6,13 @@ By chet:
SunOS 4.1.4
SunOS 5.5
BSDI BSD/OS 2.1
Motorola SVR3.2
FreeBSD 2.1.5
FreeBSD 2.1.7
NetBSD 1.2
AIX 4.2
AIX 4.1.4
HP/UX 9.05, 10.01, 10.10, 10.20
Linux 2.0.29 (libc 5.3.12)
Linux 2.0.4 (libc 5.3.12)
By other testers:
......
......@@ -77,6 +77,9 @@ The following list is what's changed when `POSIX mode' is in effect:
20. Assignment statements preceding POSIX.2 `special' builtins persist
in the shell environment after the builtin completes.
21. The `export' and `readonly' builtin commands display their output
in the format required by POSIX.2.
There is other POSIX.2 behavior that Bash does not implement.
Specifically:
......
This diff is collapsed.
Basic Installation
==================
These are generic installation instructions for Bash.
These are installation instructions for Bash.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
......@@ -24,7 +24,15 @@ they can be considered for the next release.
The file `configure.in' is used to create `configure' by a program
called Autoconf. You only need `configure.in' if you want to change it
or regenerate `configure' using a newer version of Autoconf. If you do
this, make sure you are using Autoconf version 2.9 or newer.
this, make sure you are using Autoconf version 2.10 or newer.
If you need to change `configure.in' or regenerate `configure', you
will need to create two files: `_distribution' and `_patchlevel'.
`_distribution' should contain the major and minor version numbers of
the Bash distribution, for example `2.01'. `_patchlevel' should
contain the patch level of the Bash distribution, `0' for example. The
script `support/mkconffiles' has been provided to automate the creation
of these files.
The simplest way to compile Bash is:
......@@ -179,21 +187,27 @@ configure Bash without a feature that is enabled by default, use
Here is a complete list of the `--enable-' and `--with-' options that
the Bash `configure' recognizes.
`--with-gnu-malloc'
Use the GNU version of `malloc' in `lib/malloc/malloc.c'. This is
not the same `malloc' that appears in GNU libc, but an older
version derived from the 4.2 BSD `malloc'. This `malloc' is very
fast, but wastes a lot of space. This option is enabled by
default. The `NOTES' file contains a list of systems for which
this should be turned off.
`--with-afs'
Define if you are using the Andrew File System from Transarc.
`--with-curses'
Use the curses library instead of the termcap library. This should
be supplied if your system has an inadequate or incomplete termcap
database.
`--with-glibc-malloc'
Use the GNU libc version of `malloc' in `lib/malloc/gmalloc.c'.
This is somewhat slower than the default `malloc', but wastes
considerably less space.
`--with-afs'
Define if you are using the Andrew File System from Transarc.
`--with-gnu-malloc'
Use the GNU version of `malloc' in `lib/malloc/malloc.c'. This is
not the same `malloc' that appears in GNU libc, but an older
version derived from the 4.2 BSD `malloc'. This `malloc' is very
fast, but wastes a lot of space. This option is enabled by
default. The `NOTES' file contains a list of systems for which
this should be turned off, and `configure' disables this option
automatically for a number of systems.
`--with-purify'
Define this to use the Purify memory allocation checker from Pure
......@@ -211,32 +225,48 @@ All of the following options except for `disabled-builtins' and
`usg-echo-default' are enabled by default, unless the operating system
does not provide the necessary support.
`--enable-job-control'
This enables job control features, if the OS supports them.
`--enable-alias'
Allow alias expansion and include the `alias' and `unalias'
builtins.
`--enable-readline'
Include support for command-line editing and history with the Bash
version of the Readline library.
`--enable-history'
Include command history and the `fc' and `history' builtin
commands.
`--enable-array-variables'
Include support for one-dimensional array shell variables.
`--enable-bang-history'
Include support for `csh'-like history substitution.
`--enable-brace-expansion'
Include `csh'-like brace expansion ( `b{a,b}c' ==> `bac bbc' ).
`--enable-command-timing'
Include support for recognizing `time' as a reserved word and for
displaying timing statistics for the pipeline following `time'.
This allows pipelines as well as shell builtins and functions to
be timed.
`--enable-directory-stack'
Include support for a `csh'-like directory stack and the `pushd',
`popd', and `dirs' builtins.
`--enable-restricted'
Include support for a "restricted shell". If this is enabled,
Bash, when called as `rbash', enters a restricted mode. See *Note
The Restricted Shell::, for a description of restricted mode.
`--enable-disabled-builtins'
Allow builtin commands to be invoked via `builtin xxx' even after
`xxx' has been disabled using `enable -n xxx'. See *Note Bash
Builtins::, for details of the `builtin' and `enable' builtin
commands.
`--enable-dparen-arithmetic'
Include support for the `ksh' `((...))' command.
`--enable-help-builtin'
Include the `help' builtin, which displays help on shell builtins
and variables.
`--enable-history'
Include command history and the `fc' and `history' builtin
commands.
`--enable-job-control'
This enables job control features, if the OS supports them.
`--enable-process-substitution'
This enables process substitution (*note Process Substitution::.)
......@@ -247,35 +277,19 @@ does not provide the necessary support.
characters in the `$PS1', `$PS2', `$PS3', and `$PS4' prompt
strings.
`--enable-readline'
Include support for command-line editing and history with the Bash
version of the Readline library.
`--enable-restricted'
Include support for a "restricted shell". If this is enabled,
Bash, when called as `rbash', enters a restricted mode. See *Note
The Restricted Shell::, for a description of restricted mode.
`--enable-select'
Include the `ksh' `select' builtin, which allows the generation of
simple menus.
`--enable-help-builtin'
Include the `help' builtin, which displays help on shell builtins
and variables.
`--enable-array-variables'
Include support for one-dimensional array shell variables.
`--enable-dparen-arithmetic'
Include support for the `ksh' `((...))' command.
`--enable-brace-expansion'
Include `csh'-like brace expansion ( `b{a,b}c' ==> `bac bbc' ).
`--enable-disabled-builtins'
Allow builtin commands to be invoked via `builtin xxx' even after
`xxx' has been disabled using `enable -n xxx'. See *Note Bash
Builtins::, for details of the `builtin' and `enable' builtin
commands.
`--enable-command-timing'
Include support for recognizing `time' as a reserved word and for
displaying timing statistics for the pipeline following `time'.
This allows pipelines as well as shell builtins and functions to
be timed.
`--enable-usg-echo-default'
Make the `echo' builtin expand backslash-escaped characters by
default, without requiring the `-e' option. This makes the Bash
......
......@@ -40,6 +40,7 @@ MANIFEST f
NEWS f
NOTES f
README f
AUTHORS f
configure.in f
configure f
Makefile.in f
......@@ -62,6 +63,7 @@ unwind_prot.c f
dispose_cmd.c f
getcwd.c f
bashhist.c f
hashcmd.c f
hashlib.c f
parse.y f
pathexp.c f
......@@ -112,10 +114,10 @@ externs.h f
siglist.h f
subst.h f
dispose_cmd.h f
hashcmd.h f
bashansi.h f
bashtty.h f
bashjmp.h f
bashwait.h f
bashintl.h f
make_cmd.h f
execute_cmd.h f
......@@ -125,7 +127,10 @@ pathnames.h f
y.tab.c f
y.tab.h f
posixdir.h f
posixjmp.h f
posixstat.h f
posixwait.h f
unionwait.h f
stdc.h f
ansi_stdlib.h f
memalloc.h f
......@@ -154,7 +159,6 @@ builtins/getopt.c f
builtins/getopt.h f
builtins/getopts.def f
builtins/hash.def f
builtins/hashcom.h f
builtins/help.def f
builtins/let.def f
builtins/history.def f
......@@ -203,6 +207,7 @@ lib/malloc/stub.c f
lib/malloc/i386-alloca.s f
lib/malloc/x386-alloca.s f
lib/posixheaders/posixdir.h f
lib/posixheaders/posixjmp.h f
lib/posixheaders/posixstat.h f
lib/posixheaders/ansi_stdlib.h f
lib/posixheaders/stdc.h f
......@@ -240,6 +245,7 @@ lib/readline/macro.c f
lib/readline/input.c f
lib/readline/callback.c f
lib/readline/nls.c f
lib/readline/shell.c f
lib/readline/tilde.c f
lib/readline/tilde.h f
lib/readline/rldefs.h f
......@@ -252,6 +258,7 @@ lib/readline/history.h f
lib/readline/histlib.h f
lib/readline/chardefs.h f
lib/readline/posixdir.h f
lib/readline/posixjmp.h f
lib/readline/posixstat.h f
lib/readline/ansi_stdlib.h f
lib/readline/doc/Makefile f
......@@ -266,6 +273,7 @@ lib/readline/examples/fileman.c f
lib/readline/examples/manexamp.c f
lib/readline/examples/histexamp.c f
lib/readline/examples/rltest.c f
lib/readline/examples/rl.c f
lib/readline/examples/Inputrc f
lib/termcap/Makefile.in f
lib/termcap/termcap.c f
......@@ -318,11 +326,13 @@ doc/builtins.1 f
doc/article.ms f
support/config.guess f
support/config.sub f
support/printenv f 755
support/printenv.sh f 755
support/printenv.c f
support/bash.xbm f
support/mkclone f 755
support/mkconffiles f 755
support/mkdirs f 755
support/mkversion.c f
support/mkversion.sh f 755
support/mksignames.c f
support/bashbug.sh f
support/recho.c f
......@@ -332,6 +342,7 @@ support/fixlinks f 755
support/install.sh f 755
support/texi2dvi f
support/texi2html f
support/xenix-link.sh f 755
examples/bashdb/PERMISSION f
examples/bashdb/README f
examples/bashdb/bashdb f
......@@ -386,6 +397,7 @@ examples/functions/seq f
examples/functions/mhfold f
examples/functions/repeat2 f
examples/functions/lowercase f
examples/functions/xalias.bash f
examples/scripts/shprompt f
examples/scripts/adventure.sh f
examples/scripts/precedence f
......@@ -393,7 +405,9 @@ examples/scripts/bcsh.sh f
examples/scripts/inpath f
examples/scripts/nohup.bash f
examples/scripts/vtree2 f
examples/scripts/vtree3 f
examples/scripts/scrollbar f
examples/scripts/spin.bash f
examples/scripts/zprintf f
examples/startup-files/README f
examples/startup-files/Bashrc f
......@@ -412,15 +426,48 @@ tests/array.tests f
tests/array.right f
tests/braces-tests f
tests/braces.right f
tests/builtins.tests f
tests/builtins.right f
tests/builtins.sub1 f
tests/source.sub1 f
tests/source.sub2 f
tests/source.sub3 f
tests/source.sub4 f
tests/dirstack.tests f
tests/dirstack.right f
tests/dollar-at.sh f
tests/dollar-star.sh f
tests/dollar.right f
tests/errors.tests f
tests/errors.right f
tests/execscript f
tests/execscript.right f
tests/execscript.sub f 755
tests/execscript.sub2 f
tests/execscript.sub3 f
tests/execscript.sub4 f
tests/exp-tests f
tests/exp.right f
tests/func.tests f
tests/func.right f
tests/getopts.tests f
tests/getopts.right f
tests/getopts.sub1 f
tests/getopts.sub2 f
tests/getopts.sub3 f
tests/getopts.sub4 f
tests/getopts.sub5 f
tests/getopts.sub6 f
tests/getopts.sub7 f
tests/glob-test f
tests/glob.right f
tests/heredoc.tests f
tests/heredoc.right f
tests/histexpand.tests f
tests/histexpand.right f
tests/history.tests f
tests/history.right f
tests/history.list f
tests/ifs-test-1.sh f
tests/ifs-test-2.sh f
tests/ifs-test-3.sh f
......@@ -430,11 +477,12 @@ tests/ifs.3.right f
tests/input-line.sh f
tests/input-line.sub f
tests/input.right f
tests/minus-e f
tests/minus-e.right f
tests/jobs.tests f
tests/jobs.right f
tests/more-exp.tests f
tests/more-exp.right f
tests/new-exp.tests f
tests/new-exp.sub1 f
tests/new-exp.right f
tests/nquote.tests f
tests/nquote.right f
......@@ -446,19 +494,39 @@ tests/quote.tests f
tests/quote.right f
tests/read.tests f
tests/read.right f
tests/redir.tests f
tests/redir.right f
tests/redir1.sub f
tests/redir2.sub f
tests/redir3.sub f
tests/redir3.in1 f
tests/redir3.in2 f
tests/redir4.sub f
tests/redir4.in1 f
tests/rhs-exp.tests f
tests/rhs-exp.right f
tests/rsh.tests f
tests/rsh.right f
tests/run-all f
tests/run-minimal f
tests/run-arith f
tests/run-array f
tests/run-braces f
tests/run-builtins f
tests/run-dirstack f
tests/run-dollars f
tests/run-errors f
tests/run-execscript f
tests/run-exp-tests f
tests/run-func f
tests/run-getopts f
tests/run-glob-test f
tests/run-heredoc f
tests/run-histexpand f
tests/run-history f
tests/run-ifs-tests f
tests/run-input-test f
tests/run-minus-e f
tests/run-jobs f
tests/run-more-exp f
tests/run-new-exp f
tests/run-nquote f
......@@ -466,11 +534,15 @@ tests/run-posix2 f
tests/run-precedence f
tests/run-quote f
tests/run-read f
tests/run-redir f
tests/run-rhs-exp f
tests/run-rsh f
tests/run-set-e-test f
tests/run-strip f
tests/run-test f
tests/run-tilde f
tests/run-trap f
tests/run-type f
tests/run-varenv f
tests/set-e-test f
tests/set-e.right f
......@@ -480,21 +552,19 @@ tests/test-tests f
tests/test.right f
tests/tilde-tests f
tests/tilde.right f
tests/trap.tests f
tests/trap.right f
tests/trap.sub1 f 755
tests/type.tests f
tests/type.right f
tests/varenv.right f
tests/varenv.sh f
tests/misc/chld-trap.sh f
tests/misc/dot-test-1.sh f
tests/misc/dot-test-1.sub f
tests/misc/gotest f
tests/version f
tests/version.mini f
tests/misc/haertel.perftest f
tests/misc/perf-script f
tests/misc/redir.t1.sh f
tests/misc/redir.t2.sh f
tests/misc/redir.t3.sh f
tests/misc/redir.t3.sub f
tests/misc/redir.t4.sh f
tests/misc/run.r1.sh f
tests/misc/run.r2.sh f
tests/misc/run.r3.sh f
tests/misc/sigint.t1.sh f
tests/misc/sigint.t2.sh f
tests/misc/sigint.t3.sh f
......
This diff is collapsed.
This is a terse description of the new features added to bash-2.01 since
the release of bash-2.0. As always, the manual page (doc/bash.1) is the
place to look for complete descriptions.
1. New Features in Bash
a. There is a new builtin array variable: GROUPS, the set of groups to which
the user belongs. This is used by the test suite.
2. New Features in Readline
a. If a key sequence bound to `universal-argument' is read while reading a
numeric argument started with `universal-argument', it terminates the
argument but is otherwise ignored. This provides a way to insert multiple
instances of a digit string, and is how GNU emacs does it.
-------------------------------------------------------------------------------
This is a terse description of the new features added to bash-2.0 since
the release of bash-1.14.7. As always, the manual page (doc/bash.1) is
the place to look for complete descriptions.
......
Platform-Specific Configuration Notes
=====================================
Platform-Specific Configuration and Operation Notes
===================================================
1. configure --without-gnu-malloc on:
......@@ -10,7 +10,7 @@ Platform-Specific Configuration Notes
all machines running SunOS YP code: SunOS4, SunOS5, HP/UX
linux (optional)
linux (optional, but don't do it if you're using Doug Lea's malloc)
QNX 4.2
other OSF/1 machines (KSR/1, HP, IBM AIX/ESA)
......@@ -32,11 +32,108 @@ being built and linked against, but there is only a stub file in the archive.)
3. Bash cannot be built in a directory separate from the source directory
using configure --srcdir=... unless the version of `make' you're using
does $VPATH handling right. The SunOS make, for one, does not seem to
do it right. The script support/mkclone can be used to create a
`build tree' using symlinks to get around this.
4. I've had reports that username completion does not work on IRIX 5.3
when linking with -lnsl. This is only a problem when you're running
NIS. Editing the Makefile after configure runs and removing the
`-lnsl' from the assignment to `LIBS' fixes the problem.
does $VPATH handling right. The script support/mkclone can be used to
create a `build tree' using symlinks to get around this.
4. I've had reports that username completion (as well as tilde expansion
and \u prompt expansion) does not work on IRIX 5.3 when linking with
-lnsl. This is only a problem when you're running NIS, since
apparently -lnsl supports only /etc/passwd and not the NIS functions
for retrieving usernames and passwords. Editing the Makefile after
configure runs and removing the `-lnsl' from the assignment to `LIBS'
fixes the problem.
5. There is a problem with Red Hat Linux's `makewhatis' script.
Running `makewhatis' with bash-2.0 results in error messages
like this:
/usr/sbin/makewhatis: cd: manpath: No such file or directory
/usr/sbin/makewhatis: manpath/whatis: No such file or directory
chmod: manpath/whatis: No such file or directory
/usr/sbin/makewhatis: cd: catpath: No such file or directory
/usr/sbin/makewhatis: catpath/whatis: No such file or directory
chmod: catpath/whatis: No such file or directory
The problem is with `makewhatis'. Red Hat (and possibly other
Linux distributors) uses a construct like this in the code:
eval path=$"$pages"path
to do indirect variable expansion. This `happened to work' in
bash-1.14 and previous versions, but that was more an accident
of implementation than anything else -- it was never supported
and certainly is not portable.
Bash-2.0 has a new feature that gives a new meaning to $"...".
This is explained more completely in item 1 in the COMPAT file.
The three lines in the `makewhatis' script that need to be changed
look like this:
eval $topath=$"$topath":$name
[...]
eval path=$"$pages"path
[...]
eval path=$"$pages"path
The portable way to write this code is
eval $topath="\$$topath":$name
eval path="\$$pages"path
eval path="\$$pages"path
You could also experiment with another new bash feature: ${!var}.
This does indirect variable expansion, making the use of eval
unnecessary.
6. There is a problem with syslogd on many Linux distributions (Red Hat
and Slackware are two that I have received reports about). syslogd
sends a SIGINT to its parent process, which is waiting for the daemon
to finish its initialization. The parent process then dies due to
the SIGINT, and bash reports it, causing unexpected console output
while the system is booting that looks something like
starting daemons: syslogd/etc/rc.d/rc.M: line 29: 38 Interrupt ${NET}/syslogd
Bash-2.0 reports events such as processes dying in scripts due to
signals when the standard output is a tty. Bash-1.14.x and previous
versions did not report such events.
This should probably be reported as a bug to whatever Linux distributor
people see the problem on. In my opinion, syslogd should be changed to
use some other method of communication, or the wrapper function (which
appeared to be `daemon' when I looked at it some time ago) or script
(which appeared to be `syslog') should catch SIGINT, since it's an
expected event, and exit cleanly.
7. Several people have reported that `dip' (a program for SLIP/PPP
on Linux) does not work with bash-2.0 installed as /bin/sh.
I don't run any Linux boxes myself, and do not have the dip
code handy to look at, but the `problem' with bash-2.0, as
it has been related to me, is that bash requires the `-p'
option to be supplied at invocation if it is to run setuid
or setgid.
This means, among other things, that setuid or setgid programs
which call system(3) (a horrendously bad practice in any case)
relinquish their setuid/setgid status in the child that's forked
to execute /bin/sh.
The following is an *unofficial* patch to bash-2.0 that causes it
to not require `-p' to run setuid or setgid if invoked as `sh'.
It has been reported to work on Linux. It will make your system
vulnerable to bogus system(3) calls in setuid executables.
--- ../bash-2.0.orig/shell.c Wed Dec 18 14:16:30 1996
+++ shell.c Fri Mar 7 13:12:03 1997
@@ -347,7 +347,7 @@
if (posixly_correct)
posix_initialize (posixly_correct);
- if (running_setuid && privileged_mode == 0)
+ if (running_setuid && privileged_mode == 0 && act_like_sh == 0)
disable_priv_mode ();