1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-02-03 11:12:13 +00:00

Upgrade to 2.04

failglob patch removed - this sort of patches must be submitted to bash
maintainer
This commit is contained in:
Andrey A. Chernov 2000-05-07 20:33:34 +00:00
parent 38bae59b72
commit a4923c39c3
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=28346
21 changed files with 105 additions and 807 deletions

View File

@ -6,13 +6,13 @@
#
PORTNAME= bash
PORTVERSION= 2.03
PORTVERSION= 2.04
CATEGORIES= shells
MASTER_SITES= ${MASTER_SITE_GNU} \
ftp://ftp.cwru.edu/pub/bash/
MASTER_SITE_SUBDIR= bash
.if !defined(NOPORTDOCS)
DISTFILES= bash-2.03.tar.gz bash-doc-2.03.tar.gz
DISTFILES= bash-${PORTVERSION}.tar.gz bash-doc-${PORTVERSION}.tar.gz
.endif
MAINTAINER= ache@FreeBSD.org

View File

@ -1,2 +1,2 @@
MD5 (bash-2.03.tar.gz) = 70e356eae4fed395c9a0fc35b752f711
MD5 (bash-doc-2.03.tar.gz) = ede603422b9f6cf2ef70ee1a029987f0
MD5 (bash-2.04.tar.gz) = 49b548a8b72a4c925ff26930e4c31c6c
MD5 (bash-doc-2.04.tar.gz) = a9684d1095e7ea1adb8759c3f4fca13d

View File

@ -1,19 +1,11 @@
*** l Wed Apr 14 15:38:05 1999
--- Makefile.in Wed Apr 14 15:38:21 1999
***************
*** 550,556 ****
install: .made installdirs
$(INSTALL_PROGRAM) $(INSTALLMODE) $(Program) $(bindir)/$(Program)
! $(INSTALL_PROGRAM) $(INSTALLMODE) bashbug $(bindir)/bashbug
-( cd $(DOCDIR) ; $(MAKE) $(MFLAGS) \
man1dir=$(man1dir) man1ext=$(man1ext) \
man3dir=$(man3dir) man3ext=$(man3ext) \
--- 550,556 ----
install: .made installdirs
$(INSTALL_PROGRAM) $(INSTALLMODE) $(Program) $(bindir)/$(Program)
! $(INSTALL) $(INSTALLMODE) bashbug $(bindir)/bashbug
-( cd $(DOCDIR) ; $(MAKE) $(MFLAGS) \
man1dir=$(man1dir) man1ext=$(man1ext) \
man3dir=$(man3dir) man3ext=$(man3ext) \
--- Makefile.in.orig Wed Mar 1 22:52:12 2000
+++ Makefile.in Mon May 8 00:05:03 2000
@@ -582,7 +582,7 @@
install: .made installdirs
$(INSTALL_PROGRAM) $(INSTALLMODE) $(Program) $(bindir)/$(Program)
- $(INSTALL_PROGRAM) $(INSTALLMODE2) bashbug $(bindir)/bashbug
+ $(INSTALL) $(INSTALLMODE2) bashbug $(bindir)/bashbug
-( cd $(DOCDIR) ; $(MAKE) $(MFLAGS) \
man1dir=$(man1dir) man1ext=$(man1ext) \
man3dir=$(man3dir) man3ext=$(man3ext) \

View File

@ -1,19 +1,19 @@
--- configure.orig Thu Feb 18 21:12:00 1999
+++ configure Fri May 28 04:35:33 1999
@@ -733,7 +733,7 @@
sparc-netbsd*) opt_gnu_malloc=no ;; # needs 8-byte alignment
mips-irix6*) opt_gnu_malloc=no ;; # needs 8-byte alignment
sparc-linux*) opt_gnu_malloc=no ;; # sparc running linux; requires ELF
-#*-freebsd*) opt_gnu_malloc=no ;; # they claim it's better
+*-freebsd*) opt_gnu_malloc=no ;; # they claim it's better
*-aix*) opt_gnu_malloc=no ;; # AIX machines
*-nextstep*) opt_gnu_malloc=no ;; # NeXT machines running NeXTstep
*-rhapsody*) opt_gnu_malloc=no ;; # Apple Rhapsody
@@ -7086,7 +7086,7 @@
--- configure.orig Tue Feb 22 19:46:17 2000
+++ configure Mon May 8 00:23:05 2000
@@ -761,7 +761,7 @@
mips-irix6*) opt_bash_malloc=no ;; # needs 8-byte alignment
m68k-sysv) opt_bash_malloc=no ;; # fixes file descriptor leak in closedir
sparc-linux*) opt_bash_malloc=no ;; # sparc running linux; requires ELF
-#*-freebsd*) opt_bash_malloc=no ;; # they claim it's better
+*-freebsd*) opt_bash_malloc=no ;; # they claim it's better
*-aix*) opt_bash_malloc=no ;; # AIX machines
*-nextstep*) opt_bash_malloc=no ;; # NeXT machines running NeXTstep
*-rhapsody*) opt_bash_malloc=no ;; # Apple Rhapsody
@@ -8099,7 +8099,7 @@
then
echo $ac_n "checking shared object configuration for loadable builtins""... $ac_c" 1>&6
echo "configure:7089: checking shared object configuration for loadable builtins" >&5
- eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C ${CC} -c ${host_cpu} -o ${host_os} -v ${host_vendor}`
echo "configure:8102: checking shared object configuration for loadable builtins" >&5
- eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c ${host_cpu} -o ${host_os} -v ${host_vendor}`
+ eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c "${host_cpu}" -o "${host_os}" -v "${host_vendor}"`

View File

@ -1,18 +1,11 @@
--- support/shobj-conf.bak Tue Dec 29 23:05:29 1998
+++ support/shobj-conf Fri May 28 04:34:07 1999
@@ -86,13 +86,13 @@
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
;;
--- support/shobj-conf.orig Tue Sep 21 21:03:43 1999
+++ support/shobj-conf Mon May 8 00:12:30 2000
@@ -97,7 +97,7 @@
# ;;
# FreeBSD-3.x ELF
-freebsd3*)
+freebsd[34]*)
+freebsd[3-9]*)
SHOBJ_CFLAGS=-fpic
SHOBJ_LD='${CC}'
SHOBJ_LDFLAGS='-shared'
SHLIB_XLDFLAGS='-R$(libdir)'
- SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
;;
linux*)

View File

@ -1,198 +0,0 @@
Only in : .gdbinit
diff -rc bash-2.03.old/builtins/shopt.def builtins/shopt.def
*** bash-2.03.old/builtins/shopt.def Tue Nov 10 18:56:03 1998
--- builtins/shopt.def Mon Aug 2 17:16:36 1999
***************
*** 56,62 ****
#define OPTFMT "%-15s\t%s\n"
! extern int allow_null_glob_expansion, glob_dot_filenames;
extern int cdable_vars, mail_warning, source_uses_path;
extern int no_exit_on_failed_exec, print_shift_error;
extern int check_hashed_filenames, promptvars, interactive_comments;
--- 56,62 ----
#define OPTFMT "%-15s\t%s\n"
! extern int allow_null_glob_expansion, fail_glob_expansion, glob_dot_filenames;
extern int cdable_vars, mail_warning, source_uses_path;
extern int no_exit_on_failed_exec, print_shift_error;
extern int check_hashed_filenames, promptvars, interactive_comments;
***************
*** 128,133 ****
--- 128,134 ----
{ "mailwarn", &mail_warning, (Function *)NULL },
{ "nocaseglob", &glob_ignore_case, (Function *)NULL },
{ "nullglob", &allow_null_glob_expansion, (Function *)NULL },
+ { "failglob", &fail_glob_expansion, (Function *)NULL },
{ "promptvars", &promptvars, (Function *)NULL },
#if defined (RESTRICTED_SHELL)
{ "restricted_shell", &restricted_shell, set_restricted_shell },
diff -rc bash-2.03.old/doc/bash.1 doc/bash.1
*** bash-2.03.old/doc/bash.1 Wed Jan 20 22:48:04 1999
--- doc/bash.1 Mon Aug 2 17:37:38 1999
***************
*** 2305,2310 ****
--- 2305,2314 ----
.B nullglob
option is set, and no matches are found,
the word is removed.
+ If the
+ .B failglob
+ option is set, and no matches are found, an error message is printed
+ and the command is not executed.
If the shell option
.B nocaseglob
is enabled, the match is performed without regard to the case
diff -rc bash-2.03.old/doc/bashref.texi doc/bashref.texi
*** bash-2.03.old/doc/bashref.texi Wed Jan 20 22:47:01 1999
--- doc/bashref.texi Mon Aug 2 17:35:41 1999
***************
*** 1585,1591 ****
and replaced with an alphabetically sorted list of
file names matching the pattern. If no matching file names are found,
and the shell option @code{nullglob} is disabled, the word is left
! unchanged.
If the @code{nullglob} option is set, and no matches are found, the word
is removed.
If the shell option @code{nocaseglob} is enabled, the match is performed
--- 1585,1592 ----
and replaced with an alphabetically sorted list of
file names matching the pattern. If no matching file names are found,
and the shell option @code{nullglob} is disabled, the word is left
! unchanged. If the @code{failglob} option is set, an error message is
! printed and the commandline is not executed.
If the @code{nullglob} option is set, and no matches are found, the word
is removed.
If the shell option @code{nocaseglob} is enabled, the match is performed
***************
*** 1598,1605 ****
matched explicitly.
In other cases, the @samp{.} character is not treated specially.
! See the description of @code{shopt} in @ref{Bash Builtins},
! for a description of the @code{nocaseglob}, @code{nullglob},
and @code{dotglob} options.
The @code{GLOBIGNORE}
--- 1599,1606 ----
matched explicitly.
In other cases, the @samp{.} character is not treated specially.
! See the description of @code{shopt} in @ref{Bash Builtins}, for a
! description of the @code{nocaseglob}, @code{nullglob}, @code{failglob}
and @code{dotglob} options.
The @code{GLOBIGNORE}
***************
*** 3814,3819 ****
--- 3815,3824 ----
@item extglob
If set, the extended pattern matching features described above
(@pxref{Pattern Matching}) are enabled.
+
+ @item failglob
+ If set, filenames that have globbing characters in them, but don't match
+ anything, will cause an error.
@item histappend
If set, the history list is appended to the file named by the value
Only in bash-2.03.old/lib/readline/doc: Makefile
diff -rc bash-2.03.old/subst.c subst.c
*** bash-2.03.old/subst.c Wed Jan 20 18:13:52 1999
--- subst.c Mon Aug 2 17:17:17 1999
***************
*** 96,101 ****
--- 96,104 ----
a null file. */
int allow_null_glob_expansion;
+ /* Non-zero means to signal an error when globbing fails to match. */
+ int fail_glob_expansion;
+
/* Variables to keep track of which words in an expanded word list (the
output of expand_word_list_internal) are the result of globbing
expansions. GLOB_ARGV_FLAGS is used by execute_cmd.c. */
***************
*** 5667,5672 ****
--- 5670,5680 ----
{
output_list = (WORD_LIST *)list_append (glob_list, output_list);
PREPEND_LIST (tlist, disposables);
+ }
+ else if (fail_glob_expansion != 0)
+ {
+ report_error ("no match: %s", tlist->word->word);
+ jump_to_top_level (DISCARD);
}
else if (allow_null_glob_expansion == 0)
{
diff -rc bash-2.03.old/tests/shopt.right tests/shopt.right
*** bash-2.03.old/tests/shopt.right Thu Sep 3 21:16:28 1998
--- tests/shopt.right Mon Aug 2 17:31:19 1999
***************
*** 20,25 ****
--- 20,26 ----
shopt -u mailwarn
shopt -u nocaseglob
shopt -u nullglob
+ shopt -u failglob
shopt -s promptvars
shopt -u restricted_shell
shopt -u shift_verbose
***************
*** 51,56 ****
--- 52,58 ----
shopt -u mailwarn
shopt -u nocaseglob
shopt -u nullglob
+ shopt -u failglob
shopt -u restricted_shell
shopt -u shift_verbose
--
***************
*** 68,73 ****
--- 70,76 ----
mailwarn off
nocaseglob off
nullglob off
+ failglob off
restricted_shell off
shift_verbose off
--
***************
*** 190,192 ****
--- 193,197 ----
--
./shopt.tests: shopt: xyz1: unknown shell option name
./shopt.tests: shopt: xyz1: unknown option name
+ tmp/l1 tmp/l2 tmp/*4 tmp/l3
+ ./shopt.tests: no match: tmp/*4
diff -rc bash-2.03.old/tests/shopt.tests tests/shopt.tests
*** bash-2.03.old/tests/shopt.tests Thu Nov 20 17:59:32 1997
--- tests/shopt.tests Mon Aug 2 17:26:43 1999
***************
*** 21,26 ****
--- 21,27 ----
shopt -u mailwarn
shopt -u nocaseglob
shopt -u nullglob
+ shopt -u failglob
shopt -s promptvars
shopt -u shift_verbose
shopt -s sourcepath
***************
*** 91,93 ****
--- 92,102 ----
builtin printf -- "--\n"
shopt -p xyz1
shopt -o -p xyz1
+
+ mkdir tmp
+ touch tmp/l1 tmp/l2 tmp/l3
+ builtin echo tmp/l[12] tmp/*4 tmp/*3
+ shopt -s failglob
+ builtin echo tmp/l[12] tmp/*4 tmp/*3
+ rm -r tmp
+ shopt -u failglob

View File

@ -1,21 +0,0 @@
--- execute_cmd.c.orig Tue Dec 28 19:51:28 1999
+++ execute_cmd.c Tue Dec 28 19:52:15 1999
@@ -2207,7 +2207,8 @@
static int
execute_null_command (redirects, pipe_in, pipe_out, async, old_last_command_subst_pid)
REDIRECT *redirects;
- int pipe_in, pipe_out, async, old_last_command_subst_pid;
+ int pipe_in, pipe_out, async;
+ pid_t old_last_command_subst_pid;
{
if (pipe_in != NO_PIPE || pipe_out != NO_PIPE || async)
{
@@ -2955,7 +2956,7 @@
{
char *pathname, *command, **args;
int nofork;
- int pid;
+ pid_t pid;
nofork = (cmdflags & CMD_NO_FORK); /* Don't fork, just exec, if no pipes */
pathname = words->word->word;

View File

@ -6,13 +6,13 @@
#
PORTNAME= bash
PORTVERSION= 2.03
PORTVERSION= 2.04
CATEGORIES= shells
MASTER_SITES= ${MASTER_SITE_GNU} \
ftp://ftp.cwru.edu/pub/bash/
MASTER_SITE_SUBDIR= bash
.if !defined(NOPORTDOCS)
DISTFILES= bash-2.03.tar.gz bash-doc-2.03.tar.gz
DISTFILES= bash-${PORTVERSION}.tar.gz bash-doc-${PORTVERSION}.tar.gz
.endif
MAINTAINER= ache@FreeBSD.org

View File

@ -1,2 +1,2 @@
MD5 (bash-2.03.tar.gz) = 70e356eae4fed395c9a0fc35b752f711
MD5 (bash-doc-2.03.tar.gz) = ede603422b9f6cf2ef70ee1a029987f0
MD5 (bash-2.04.tar.gz) = 49b548a8b72a4c925ff26930e4c31c6c
MD5 (bash-doc-2.04.tar.gz) = a9684d1095e7ea1adb8759c3f4fca13d

View File

@ -1,19 +1,11 @@
*** l Wed Apr 14 15:38:05 1999
--- Makefile.in Wed Apr 14 15:38:21 1999
***************
*** 550,556 ****
install: .made installdirs
$(INSTALL_PROGRAM) $(INSTALLMODE) $(Program) $(bindir)/$(Program)
! $(INSTALL_PROGRAM) $(INSTALLMODE) bashbug $(bindir)/bashbug
-( cd $(DOCDIR) ; $(MAKE) $(MFLAGS) \
man1dir=$(man1dir) man1ext=$(man1ext) \
man3dir=$(man3dir) man3ext=$(man3ext) \
--- 550,556 ----
install: .made installdirs
$(INSTALL_PROGRAM) $(INSTALLMODE) $(Program) $(bindir)/$(Program)
! $(INSTALL) $(INSTALLMODE) bashbug $(bindir)/bashbug
-( cd $(DOCDIR) ; $(MAKE) $(MFLAGS) \
man1dir=$(man1dir) man1ext=$(man1ext) \
man3dir=$(man3dir) man3ext=$(man3ext) \
--- Makefile.in.orig Wed Mar 1 22:52:12 2000
+++ Makefile.in Mon May 8 00:05:03 2000
@@ -582,7 +582,7 @@
install: .made installdirs
$(INSTALL_PROGRAM) $(INSTALLMODE) $(Program) $(bindir)/$(Program)
- $(INSTALL_PROGRAM) $(INSTALLMODE2) bashbug $(bindir)/bashbug
+ $(INSTALL) $(INSTALLMODE2) bashbug $(bindir)/bashbug
-( cd $(DOCDIR) ; $(MAKE) $(MFLAGS) \
man1dir=$(man1dir) man1ext=$(man1ext) \
man3dir=$(man3dir) man3ext=$(man3ext) \

View File

@ -1,19 +1,19 @@
--- configure.orig Thu Feb 18 21:12:00 1999
+++ configure Fri May 28 04:35:33 1999
@@ -733,7 +733,7 @@
sparc-netbsd*) opt_gnu_malloc=no ;; # needs 8-byte alignment
mips-irix6*) opt_gnu_malloc=no ;; # needs 8-byte alignment
sparc-linux*) opt_gnu_malloc=no ;; # sparc running linux; requires ELF
-#*-freebsd*) opt_gnu_malloc=no ;; # they claim it's better
+*-freebsd*) opt_gnu_malloc=no ;; # they claim it's better
*-aix*) opt_gnu_malloc=no ;; # AIX machines
*-nextstep*) opt_gnu_malloc=no ;; # NeXT machines running NeXTstep
*-rhapsody*) opt_gnu_malloc=no ;; # Apple Rhapsody
@@ -7086,7 +7086,7 @@
--- configure.orig Tue Feb 22 19:46:17 2000
+++ configure Mon May 8 00:23:05 2000
@@ -761,7 +761,7 @@
mips-irix6*) opt_bash_malloc=no ;; # needs 8-byte alignment
m68k-sysv) opt_bash_malloc=no ;; # fixes file descriptor leak in closedir
sparc-linux*) opt_bash_malloc=no ;; # sparc running linux; requires ELF
-#*-freebsd*) opt_bash_malloc=no ;; # they claim it's better
+*-freebsd*) opt_bash_malloc=no ;; # they claim it's better
*-aix*) opt_bash_malloc=no ;; # AIX machines
*-nextstep*) opt_bash_malloc=no ;; # NeXT machines running NeXTstep
*-rhapsody*) opt_bash_malloc=no ;; # Apple Rhapsody
@@ -8099,7 +8099,7 @@
then
echo $ac_n "checking shared object configuration for loadable builtins""... $ac_c" 1>&6
echo "configure:7089: checking shared object configuration for loadable builtins" >&5
- eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C ${CC} -c ${host_cpu} -o ${host_os} -v ${host_vendor}`
echo "configure:8102: checking shared object configuration for loadable builtins" >&5
- eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c ${host_cpu} -o ${host_os} -v ${host_vendor}`
+ eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c "${host_cpu}" -o "${host_os}" -v "${host_vendor}"`

View File

@ -1,18 +1,11 @@
--- support/shobj-conf.bak Tue Dec 29 23:05:29 1998
+++ support/shobj-conf Fri May 28 04:34:07 1999
@@ -86,13 +86,13 @@
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
;;
--- support/shobj-conf.orig Tue Sep 21 21:03:43 1999
+++ support/shobj-conf Mon May 8 00:12:30 2000
@@ -97,7 +97,7 @@
# ;;
# FreeBSD-3.x ELF
-freebsd3*)
+freebsd[34]*)
+freebsd[3-9]*)
SHOBJ_CFLAGS=-fpic
SHOBJ_LD='${CC}'
SHOBJ_LDFLAGS='-shared'
SHLIB_XLDFLAGS='-R$(libdir)'
- SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
;;
linux*)

View File

@ -1,198 +0,0 @@
Only in : .gdbinit
diff -rc bash-2.03.old/builtins/shopt.def builtins/shopt.def
*** bash-2.03.old/builtins/shopt.def Tue Nov 10 18:56:03 1998
--- builtins/shopt.def Mon Aug 2 17:16:36 1999
***************
*** 56,62 ****
#define OPTFMT "%-15s\t%s\n"
! extern int allow_null_glob_expansion, glob_dot_filenames;
extern int cdable_vars, mail_warning, source_uses_path;
extern int no_exit_on_failed_exec, print_shift_error;
extern int check_hashed_filenames, promptvars, interactive_comments;
--- 56,62 ----
#define OPTFMT "%-15s\t%s\n"
! extern int allow_null_glob_expansion, fail_glob_expansion, glob_dot_filenames;
extern int cdable_vars, mail_warning, source_uses_path;
extern int no_exit_on_failed_exec, print_shift_error;
extern int check_hashed_filenames, promptvars, interactive_comments;
***************
*** 128,133 ****
--- 128,134 ----
{ "mailwarn", &mail_warning, (Function *)NULL },
{ "nocaseglob", &glob_ignore_case, (Function *)NULL },
{ "nullglob", &allow_null_glob_expansion, (Function *)NULL },
+ { "failglob", &fail_glob_expansion, (Function *)NULL },
{ "promptvars", &promptvars, (Function *)NULL },
#if defined (RESTRICTED_SHELL)
{ "restricted_shell", &restricted_shell, set_restricted_shell },
diff -rc bash-2.03.old/doc/bash.1 doc/bash.1
*** bash-2.03.old/doc/bash.1 Wed Jan 20 22:48:04 1999
--- doc/bash.1 Mon Aug 2 17:37:38 1999
***************
*** 2305,2310 ****
--- 2305,2314 ----
.B nullglob
option is set, and no matches are found,
the word is removed.
+ If the
+ .B failglob
+ option is set, and no matches are found, an error message is printed
+ and the command is not executed.
If the shell option
.B nocaseglob
is enabled, the match is performed without regard to the case
diff -rc bash-2.03.old/doc/bashref.texi doc/bashref.texi
*** bash-2.03.old/doc/bashref.texi Wed Jan 20 22:47:01 1999
--- doc/bashref.texi Mon Aug 2 17:35:41 1999
***************
*** 1585,1591 ****
and replaced with an alphabetically sorted list of
file names matching the pattern. If no matching file names are found,
and the shell option @code{nullglob} is disabled, the word is left
! unchanged.
If the @code{nullglob} option is set, and no matches are found, the word
is removed.
If the shell option @code{nocaseglob} is enabled, the match is performed
--- 1585,1592 ----
and replaced with an alphabetically sorted list of
file names matching the pattern. If no matching file names are found,
and the shell option @code{nullglob} is disabled, the word is left
! unchanged. If the @code{failglob} option is set, an error message is
! printed and the commandline is not executed.
If the @code{nullglob} option is set, and no matches are found, the word
is removed.
If the shell option @code{nocaseglob} is enabled, the match is performed
***************
*** 1598,1605 ****
matched explicitly.
In other cases, the @samp{.} character is not treated specially.
! See the description of @code{shopt} in @ref{Bash Builtins},
! for a description of the @code{nocaseglob}, @code{nullglob},
and @code{dotglob} options.
The @code{GLOBIGNORE}
--- 1599,1606 ----
matched explicitly.
In other cases, the @samp{.} character is not treated specially.
! See the description of @code{shopt} in @ref{Bash Builtins}, for a
! description of the @code{nocaseglob}, @code{nullglob}, @code{failglob}
and @code{dotglob} options.
The @code{GLOBIGNORE}
***************
*** 3814,3819 ****
--- 3815,3824 ----
@item extglob
If set, the extended pattern matching features described above
(@pxref{Pattern Matching}) are enabled.
+
+ @item failglob
+ If set, filenames that have globbing characters in them, but don't match
+ anything, will cause an error.
@item histappend
If set, the history list is appended to the file named by the value
Only in bash-2.03.old/lib/readline/doc: Makefile
diff -rc bash-2.03.old/subst.c subst.c
*** bash-2.03.old/subst.c Wed Jan 20 18:13:52 1999
--- subst.c Mon Aug 2 17:17:17 1999
***************
*** 96,101 ****
--- 96,104 ----
a null file. */
int allow_null_glob_expansion;
+ /* Non-zero means to signal an error when globbing fails to match. */
+ int fail_glob_expansion;
+
/* Variables to keep track of which words in an expanded word list (the
output of expand_word_list_internal) are the result of globbing
expansions. GLOB_ARGV_FLAGS is used by execute_cmd.c. */
***************
*** 5667,5672 ****
--- 5670,5680 ----
{
output_list = (WORD_LIST *)list_append (glob_list, output_list);
PREPEND_LIST (tlist, disposables);
+ }
+ else if (fail_glob_expansion != 0)
+ {
+ report_error ("no match: %s", tlist->word->word);
+ jump_to_top_level (DISCARD);
}
else if (allow_null_glob_expansion == 0)
{
diff -rc bash-2.03.old/tests/shopt.right tests/shopt.right
*** bash-2.03.old/tests/shopt.right Thu Sep 3 21:16:28 1998
--- tests/shopt.right Mon Aug 2 17:31:19 1999
***************
*** 20,25 ****
--- 20,26 ----
shopt -u mailwarn
shopt -u nocaseglob
shopt -u nullglob
+ shopt -u failglob
shopt -s promptvars
shopt -u restricted_shell
shopt -u shift_verbose
***************
*** 51,56 ****
--- 52,58 ----
shopt -u mailwarn
shopt -u nocaseglob
shopt -u nullglob
+ shopt -u failglob
shopt -u restricted_shell
shopt -u shift_verbose
--
***************
*** 68,73 ****
--- 70,76 ----
mailwarn off
nocaseglob off
nullglob off
+ failglob off
restricted_shell off
shift_verbose off
--
***************
*** 190,192 ****
--- 193,197 ----
--
./shopt.tests: shopt: xyz1: unknown shell option name
./shopt.tests: shopt: xyz1: unknown option name
+ tmp/l1 tmp/l2 tmp/*4 tmp/l3
+ ./shopt.tests: no match: tmp/*4
diff -rc bash-2.03.old/tests/shopt.tests tests/shopt.tests
*** bash-2.03.old/tests/shopt.tests Thu Nov 20 17:59:32 1997
--- tests/shopt.tests Mon Aug 2 17:26:43 1999
***************
*** 21,26 ****
--- 21,27 ----
shopt -u mailwarn
shopt -u nocaseglob
shopt -u nullglob
+ shopt -u failglob
shopt -s promptvars
shopt -u shift_verbose
shopt -s sourcepath
***************
*** 91,93 ****
--- 92,102 ----
builtin printf -- "--\n"
shopt -p xyz1
shopt -o -p xyz1
+
+ mkdir tmp
+ touch tmp/l1 tmp/l2 tmp/l3
+ builtin echo tmp/l[12] tmp/*4 tmp/*3
+ shopt -s failglob
+ builtin echo tmp/l[12] tmp/*4 tmp/*3
+ rm -r tmp
+ shopt -u failglob

View File

@ -1,21 +0,0 @@
--- execute_cmd.c.orig Tue Dec 28 19:51:28 1999
+++ execute_cmd.c Tue Dec 28 19:52:15 1999
@@ -2207,7 +2207,8 @@
static int
execute_null_command (redirects, pipe_in, pipe_out, async, old_last_command_subst_pid)
REDIRECT *redirects;
- int pipe_in, pipe_out, async, old_last_command_subst_pid;
+ int pipe_in, pipe_out, async;
+ pid_t old_last_command_subst_pid;
{
if (pipe_in != NO_PIPE || pipe_out != NO_PIPE || async)
{
@@ -2955,7 +2956,7 @@
{
char *pathname, *command, **args;
int nofork;
- int pid;
+ pid_t pid;
nofork = (cmdflags & CMD_NO_FORK); /* Don't fork, just exec, if no pipes */
pathname = words->word->word;

View File

@ -6,13 +6,13 @@
#
PORTNAME= bash
PORTVERSION= 2.03
PORTVERSION= 2.04
CATEGORIES= shells
MASTER_SITES= ${MASTER_SITE_GNU} \
ftp://ftp.cwru.edu/pub/bash/
MASTER_SITE_SUBDIR= bash
.if !defined(NOPORTDOCS)
DISTFILES= bash-2.03.tar.gz bash-doc-2.03.tar.gz
DISTFILES= bash-${PORTVERSION}.tar.gz bash-doc-${PORTVERSION}.tar.gz
.endif
MAINTAINER= ache@FreeBSD.org

View File

@ -1,2 +1,2 @@
MD5 (bash-2.03.tar.gz) = 70e356eae4fed395c9a0fc35b752f711
MD5 (bash-doc-2.03.tar.gz) = ede603422b9f6cf2ef70ee1a029987f0
MD5 (bash-2.04.tar.gz) = 49b548a8b72a4c925ff26930e4c31c6c
MD5 (bash-doc-2.04.tar.gz) = a9684d1095e7ea1adb8759c3f4fca13d

View File

@ -1,19 +1,11 @@
*** l Wed Apr 14 15:38:05 1999
--- Makefile.in Wed Apr 14 15:38:21 1999
***************
*** 550,556 ****
install: .made installdirs
$(INSTALL_PROGRAM) $(INSTALLMODE) $(Program) $(bindir)/$(Program)
! $(INSTALL_PROGRAM) $(INSTALLMODE) bashbug $(bindir)/bashbug
-( cd $(DOCDIR) ; $(MAKE) $(MFLAGS) \
man1dir=$(man1dir) man1ext=$(man1ext) \
man3dir=$(man3dir) man3ext=$(man3ext) \
--- 550,556 ----
install: .made installdirs
$(INSTALL_PROGRAM) $(INSTALLMODE) $(Program) $(bindir)/$(Program)
! $(INSTALL) $(INSTALLMODE) bashbug $(bindir)/bashbug
-( cd $(DOCDIR) ; $(MAKE) $(MFLAGS) \
man1dir=$(man1dir) man1ext=$(man1ext) \
man3dir=$(man3dir) man3ext=$(man3ext) \
--- Makefile.in.orig Wed Mar 1 22:52:12 2000
+++ Makefile.in Mon May 8 00:05:03 2000
@@ -582,7 +582,7 @@
install: .made installdirs
$(INSTALL_PROGRAM) $(INSTALLMODE) $(Program) $(bindir)/$(Program)
- $(INSTALL_PROGRAM) $(INSTALLMODE2) bashbug $(bindir)/bashbug
+ $(INSTALL) $(INSTALLMODE2) bashbug $(bindir)/bashbug
-( cd $(DOCDIR) ; $(MAKE) $(MFLAGS) \
man1dir=$(man1dir) man1ext=$(man1ext) \
man3dir=$(man3dir) man3ext=$(man3ext) \

View File

@ -1,19 +1,19 @@
--- configure.orig Thu Feb 18 21:12:00 1999
+++ configure Fri May 28 04:35:33 1999
@@ -733,7 +733,7 @@
sparc-netbsd*) opt_gnu_malloc=no ;; # needs 8-byte alignment
mips-irix6*) opt_gnu_malloc=no ;; # needs 8-byte alignment
sparc-linux*) opt_gnu_malloc=no ;; # sparc running linux; requires ELF
-#*-freebsd*) opt_gnu_malloc=no ;; # they claim it's better
+*-freebsd*) opt_gnu_malloc=no ;; # they claim it's better
*-aix*) opt_gnu_malloc=no ;; # AIX machines
*-nextstep*) opt_gnu_malloc=no ;; # NeXT machines running NeXTstep
*-rhapsody*) opt_gnu_malloc=no ;; # Apple Rhapsody
@@ -7086,7 +7086,7 @@
--- configure.orig Tue Feb 22 19:46:17 2000
+++ configure Mon May 8 00:23:05 2000
@@ -761,7 +761,7 @@
mips-irix6*) opt_bash_malloc=no ;; # needs 8-byte alignment
m68k-sysv) opt_bash_malloc=no ;; # fixes file descriptor leak in closedir
sparc-linux*) opt_bash_malloc=no ;; # sparc running linux; requires ELF
-#*-freebsd*) opt_bash_malloc=no ;; # they claim it's better
+*-freebsd*) opt_bash_malloc=no ;; # they claim it's better
*-aix*) opt_bash_malloc=no ;; # AIX machines
*-nextstep*) opt_bash_malloc=no ;; # NeXT machines running NeXTstep
*-rhapsody*) opt_bash_malloc=no ;; # Apple Rhapsody
@@ -8099,7 +8099,7 @@
then
echo $ac_n "checking shared object configuration for loadable builtins""... $ac_c" 1>&6
echo "configure:7089: checking shared object configuration for loadable builtins" >&5
- eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C ${CC} -c ${host_cpu} -o ${host_os} -v ${host_vendor}`
echo "configure:8102: checking shared object configuration for loadable builtins" >&5
- eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c ${host_cpu} -o ${host_os} -v ${host_vendor}`
+ eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c "${host_cpu}" -o "${host_os}" -v "${host_vendor}"`

View File

@ -1,18 +1,11 @@
--- support/shobj-conf.bak Tue Dec 29 23:05:29 1998
+++ support/shobj-conf Fri May 28 04:34:07 1999
@@ -86,13 +86,13 @@
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
;;
--- support/shobj-conf.orig Tue Sep 21 21:03:43 1999
+++ support/shobj-conf Mon May 8 00:12:30 2000
@@ -97,7 +97,7 @@
# ;;
# FreeBSD-3.x ELF
-freebsd3*)
+freebsd[34]*)
+freebsd[3-9]*)
SHOBJ_CFLAGS=-fpic
SHOBJ_LD='${CC}'
SHOBJ_LDFLAGS='-shared'
SHLIB_XLDFLAGS='-R$(libdir)'
- SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
;;
linux*)

View File

@ -1,198 +0,0 @@
Only in : .gdbinit
diff -rc bash-2.03.old/builtins/shopt.def builtins/shopt.def
*** bash-2.03.old/builtins/shopt.def Tue Nov 10 18:56:03 1998
--- builtins/shopt.def Mon Aug 2 17:16:36 1999
***************
*** 56,62 ****
#define OPTFMT "%-15s\t%s\n"
! extern int allow_null_glob_expansion, glob_dot_filenames;
extern int cdable_vars, mail_warning, source_uses_path;
extern int no_exit_on_failed_exec, print_shift_error;
extern int check_hashed_filenames, promptvars, interactive_comments;
--- 56,62 ----
#define OPTFMT "%-15s\t%s\n"
! extern int allow_null_glob_expansion, fail_glob_expansion, glob_dot_filenames;
extern int cdable_vars, mail_warning, source_uses_path;
extern int no_exit_on_failed_exec, print_shift_error;
extern int check_hashed_filenames, promptvars, interactive_comments;
***************
*** 128,133 ****
--- 128,134 ----
{ "mailwarn", &mail_warning, (Function *)NULL },
{ "nocaseglob", &glob_ignore_case, (Function *)NULL },
{ "nullglob", &allow_null_glob_expansion, (Function *)NULL },
+ { "failglob", &fail_glob_expansion, (Function *)NULL },
{ "promptvars", &promptvars, (Function *)NULL },
#if defined (RESTRICTED_SHELL)
{ "restricted_shell", &restricted_shell, set_restricted_shell },
diff -rc bash-2.03.old/doc/bash.1 doc/bash.1
*** bash-2.03.old/doc/bash.1 Wed Jan 20 22:48:04 1999
--- doc/bash.1 Mon Aug 2 17:37:38 1999
***************
*** 2305,2310 ****
--- 2305,2314 ----
.B nullglob
option is set, and no matches are found,
the word is removed.
+ If the
+ .B failglob
+ option is set, and no matches are found, an error message is printed
+ and the command is not executed.
If the shell option
.B nocaseglob
is enabled, the match is performed without regard to the case
diff -rc bash-2.03.old/doc/bashref.texi doc/bashref.texi
*** bash-2.03.old/doc/bashref.texi Wed Jan 20 22:47:01 1999
--- doc/bashref.texi Mon Aug 2 17:35:41 1999
***************
*** 1585,1591 ****
and replaced with an alphabetically sorted list of
file names matching the pattern. If no matching file names are found,
and the shell option @code{nullglob} is disabled, the word is left
! unchanged.
If the @code{nullglob} option is set, and no matches are found, the word
is removed.
If the shell option @code{nocaseglob} is enabled, the match is performed
--- 1585,1592 ----
and replaced with an alphabetically sorted list of
file names matching the pattern. If no matching file names are found,
and the shell option @code{nullglob} is disabled, the word is left
! unchanged. If the @code{failglob} option is set, an error message is
! printed and the commandline is not executed.
If the @code{nullglob} option is set, and no matches are found, the word
is removed.
If the shell option @code{nocaseglob} is enabled, the match is performed
***************
*** 1598,1605 ****
matched explicitly.
In other cases, the @samp{.} character is not treated specially.
! See the description of @code{shopt} in @ref{Bash Builtins},
! for a description of the @code{nocaseglob}, @code{nullglob},
and @code{dotglob} options.
The @code{GLOBIGNORE}
--- 1599,1606 ----
matched explicitly.
In other cases, the @samp{.} character is not treated specially.
! See the description of @code{shopt} in @ref{Bash Builtins}, for a
! description of the @code{nocaseglob}, @code{nullglob}, @code{failglob}
and @code{dotglob} options.
The @code{GLOBIGNORE}
***************
*** 3814,3819 ****
--- 3815,3824 ----
@item extglob
If set, the extended pattern matching features described above
(@pxref{Pattern Matching}) are enabled.
+
+ @item failglob
+ If set, filenames that have globbing characters in them, but don't match
+ anything, will cause an error.
@item histappend
If set, the history list is appended to the file named by the value
Only in bash-2.03.old/lib/readline/doc: Makefile
diff -rc bash-2.03.old/subst.c subst.c
*** bash-2.03.old/subst.c Wed Jan 20 18:13:52 1999
--- subst.c Mon Aug 2 17:17:17 1999
***************
*** 96,101 ****
--- 96,104 ----
a null file. */
int allow_null_glob_expansion;
+ /* Non-zero means to signal an error when globbing fails to match. */
+ int fail_glob_expansion;
+
/* Variables to keep track of which words in an expanded word list (the
output of expand_word_list_internal) are the result of globbing
expansions. GLOB_ARGV_FLAGS is used by execute_cmd.c. */
***************
*** 5667,5672 ****
--- 5670,5680 ----
{
output_list = (WORD_LIST *)list_append (glob_list, output_list);
PREPEND_LIST (tlist, disposables);
+ }
+ else if (fail_glob_expansion != 0)
+ {
+ report_error ("no match: %s", tlist->word->word);
+ jump_to_top_level (DISCARD);
}
else if (allow_null_glob_expansion == 0)
{
diff -rc bash-2.03.old/tests/shopt.right tests/shopt.right
*** bash-2.03.old/tests/shopt.right Thu Sep 3 21:16:28 1998
--- tests/shopt.right Mon Aug 2 17:31:19 1999
***************
*** 20,25 ****
--- 20,26 ----
shopt -u mailwarn
shopt -u nocaseglob
shopt -u nullglob
+ shopt -u failglob
shopt -s promptvars
shopt -u restricted_shell
shopt -u shift_verbose
***************
*** 51,56 ****
--- 52,58 ----
shopt -u mailwarn
shopt -u nocaseglob
shopt -u nullglob
+ shopt -u failglob
shopt -u restricted_shell
shopt -u shift_verbose
--
***************
*** 68,73 ****
--- 70,76 ----
mailwarn off
nocaseglob off
nullglob off
+ failglob off
restricted_shell off
shift_verbose off
--
***************
*** 190,192 ****
--- 193,197 ----
--
./shopt.tests: shopt: xyz1: unknown shell option name
./shopt.tests: shopt: xyz1: unknown option name
+ tmp/l1 tmp/l2 tmp/*4 tmp/l3
+ ./shopt.tests: no match: tmp/*4
diff -rc bash-2.03.old/tests/shopt.tests tests/shopt.tests
*** bash-2.03.old/tests/shopt.tests Thu Nov 20 17:59:32 1997
--- tests/shopt.tests Mon Aug 2 17:26:43 1999
***************
*** 21,26 ****
--- 21,27 ----
shopt -u mailwarn
shopt -u nocaseglob
shopt -u nullglob
+ shopt -u failglob
shopt -s promptvars
shopt -u shift_verbose
shopt -s sourcepath
***************
*** 91,93 ****
--- 92,102 ----
builtin printf -- "--\n"
shopt -p xyz1
shopt -o -p xyz1
+
+ mkdir tmp
+ touch tmp/l1 tmp/l2 tmp/l3
+ builtin echo tmp/l[12] tmp/*4 tmp/*3
+ shopt -s failglob
+ builtin echo tmp/l[12] tmp/*4 tmp/*3
+ rm -r tmp
+ shopt -u failglob

View File

@ -1,21 +0,0 @@
--- execute_cmd.c.orig Tue Dec 28 19:51:28 1999
+++ execute_cmd.c Tue Dec 28 19:52:15 1999
@@ -2207,7 +2207,8 @@
static int
execute_null_command (redirects, pipe_in, pipe_out, async, old_last_command_subst_pid)
REDIRECT *redirects;
- int pipe_in, pipe_out, async, old_last_command_subst_pid;
+ int pipe_in, pipe_out, async;
+ pid_t old_last_command_subst_pid;
{
if (pipe_in != NO_PIPE || pipe_out != NO_PIPE || async)
{
@@ -2955,7 +2956,7 @@
{
char *pathname, *command, **args;
int nofork;
- int pid;
+ pid_t pid;
nofork = (cmdflags & CMD_NO_FORK); /* Don't fork, just exec, if no pipes */
pathname = words->word->word;