diff options
author | naddy <naddy@FreeBSD.org> | 2001-11-21 09:40:39 +0800 |
---|---|---|
committer | naddy <naddy@FreeBSD.org> | 2001-11-21 09:40:39 +0800 |
commit | 3f48a3754d61152837e73de5b14294a051097db2 (patch) | |
tree | b527acb97099b342d15bcb8b3253452840fdff5f | |
parent | 5c3a687ad6a42aba14fd23bcd4471c31747fd6e3 (diff) | |
download | freebsd-ports-gnome-3f48a3754d61152837e73de5b14294a051097db2.tar.gz freebsd-ports-gnome-3f48a3754d61152837e73de5b14294a051097db2.tar.zst freebsd-ports-gnome-3f48a3754d61152837e73de5b14294a051097db2.zip |
* Update to 2.05a.
* Split failglob patch into per-file patches.
Reviewed by: obrien
39 files changed, 567 insertions, 618 deletions
diff --git a/shells/bash/Makefile b/shells/bash/Makefile index b0714728c1d7..4086b65db63c 100644 --- a/shells/bash/Makefile +++ b/shells/bash/Makefile @@ -7,7 +7,7 @@ # PORTNAME= bash -PORTVERSION= 2.05 +PORTVERSION= 2.05a CATEGORIES= shells MASTER_SITES= ${MASTER_SITE_GNU} \ ftp://ftp.cwru.edu/pub/bash/ diff --git a/shells/bash/distinfo b/shells/bash/distinfo index d20c3e2558a1..280f0ce20569 100644 --- a/shells/bash/distinfo +++ b/shells/bash/distinfo @@ -1,2 +1,2 @@ -MD5 (bash-2.05.tar.gz) = fe40d1633203c1ca6f2a6dfc6d097c48 -MD5 (bash-doc-2.05.tar.gz) = 9bb3026e0a7cafcf592eea8f357e9f14 +MD5 (bash-2.05a.tar.gz) = eeabc3f624861c4a8a687f7701db3d06 +MD5 (bash-doc-2.05a.tar.gz) = c86e07eb43c3a1a9b2c830b6bff1331d diff --git a/shells/bash/files/patch-aa b/shells/bash/files/patch-aa deleted file mode 100644 index f30ca9d79b7b..000000000000 --- a/shells/bash/files/patch-aa +++ /dev/null @@ -1,21 +0,0 @@ -*** doc/Makefile.in.bak Fri Jan 31 00:12:33 1997 ---- doc/Makefile.in Sat Jun 28 02:23:01 1997 -*************** -*** 155,161 **** - -$(INSTALL_DATA) $(srcdir)/bashref.info $(infodir)/bash.info - # run install-info if it is present to update the info directory - if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \ -! install-info --dir-file=$(infodir)/dir $(infodir)/bash.info; \ - else true; fi - - uninstall: ---- 155,163 ---- - -$(INSTALL_DATA) $(srcdir)/bashref.info $(infodir)/bash.info - # run install-info if it is present to update the info directory - if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \ -! install-info \ -! --entry="* BASH: (bash). Bash Reference Manual." \ -! --dir-file=$(infodir)/dir $(infodir)/bash.info; \ - else true; fi - - uninstall: diff --git a/shells/bash/files/patch-ab b/shells/bash/files/patch-ab index db11179f5a31..f810ff94da33 100644 --- a/shells/bash/files/patch-ab +++ b/shells/bash/files/patch-ab @@ -1,11 +1,24 @@ ---- Makefile.in.orig Wed Mar 1 22:52:12 2000 -+++ Makefile.in Mon May 8 00:05:03 2000 -@@ -582,7 +582,7 @@ + +$FreeBSD$ + +--- Makefile.in.orig Mon Nov 12 17:42:45 2001 ++++ Makefile.in Wed Nov 21 00:08:16 2001 +@@ -59,6 +59,7 @@ + + INSTALL = @INSTALL@ + INSTALL_PROGRAM = @INSTALL_PROGRAM@ ++INSTALL_SCRIPT = @INSTALL_SCRIPT@ + INSTALL_DATA = @INSTALL_DATA@ + INSTALLMODE= -m 0755 + INSTALLMODE2 = -m 0555 +@@ -627,8 +628,8 @@ + @${SHELL} $(SUPPORT_SRC)mkdirs $(DESTDIR)$(infodir) install: .made installdirs - $(INSTALL_PROGRAM) $(INSTALLMODE) $(Program) $(bindir)/$(Program) -- $(INSTALL_PROGRAM) $(INSTALLMODE2) bashbug $(bindir)/bashbug -+ $(INSTALL) $(INSTALLMODE2) bashbug $(bindir)/bashbug +- $(INSTALL_PROGRAM) $(INSTALLMODE) $(Program) $(DESTDIR)$(bindir)/$(Program) +- $(INSTALL_PROGRAM) $(INSTALLMODE2) bashbug $(DESTDIR)$(bindir)/bashbug ++ $(INSTALL_PROGRAM) $(Program) $(DESTDIR)$(bindir)/$(Program) ++ $(INSTALL_SCRIPT) bashbug $(DESTDIR)$(bindir)/bashbug -( cd $(DOCDIR) ; $(MAKE) $(MFLAGS) \ man1dir=$(man1dir) man1ext=$(man1ext) \ man3dir=$(man3dir) man3ext=$(man3ext) \ diff --git a/shells/bash/files/patch-ac b/shells/bash/files/patch-ac index 713ba4c2022e..51506a030580 100644 --- a/shells/bash/files/patch-ac +++ b/shells/bash/files/patch-ac @@ -1,14 +1,14 @@ $FreeBSD$ ---- configure.orig Tue Jan 23 19:57:28 2001 -+++ configure Tue Apr 10 12:17:23 2001 -@@ -763,7 +763,7 @@ +--- configure.orig Mon Nov 19 18:27:10 2001 ++++ configure Mon Nov 19 18:27:17 2001 +@@ -1108,7 +1108,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 ++*-freebsd*) opt_bash_malloc=no ;; # they claim it's better + *-openbsd*) opt_bash_malloc=no ;; # they claim it needs eight-bit alignment *-aix*) opt_bash_malloc=no ;; # AIX machines *-nextstep*) opt_bash_malloc=no ;; # NeXT machines running NeXTstep - *-macos*) opt_bash_malloc=no ;; # Apple MacOS X diff --git a/shells/bash/files/patch-ae b/shells/bash/files/patch-ae deleted file mode 100644 index c0ae0bccf270..000000000000 --- a/shells/bash/files/patch-ae +++ /dev/null @@ -1,151 +0,0 @@ -diff -ru ../work/bash-2.04/builtins/shopt.def ./builtins/shopt.def ---- ../work/bash-2.04/builtins/shopt.def Tue Sep 21 17:20:01 1999 -+++ ./builtins/shopt.def Wed May 24 12:18:31 2000 -@@ -56,7 +56,7 @@ - - #define OPTFMT "%-15s\t%s\n" - --extern int allow_null_glob_expansion, glob_dot_filenames; -+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; -@@ -137,6 +137,7 @@ - #endif - { "nocaseglob", &glob_ignore_case, (Function *)NULL }, - { "nullglob", &allow_null_glob_expansion, (Function *)NULL }, -+ { "failglob", &fail_glob_expansion, (Function *)NULL }, - #if defined (PROGRAMMABLE_COMPLETION) - { "progcomp", &prog_completion_enabled, (Function *)NULL }, - #endif -diff -ru ../work/bash-2.04/doc/bash.1 ./doc/bash.1 ---- ../work/bash-2.04/doc/bash.1 Tue Mar 14 17:37:56 2000 -+++ ./doc/bash.1 Wed May 24 12:17:39 2000 -@@ -2414,6 +2414,10 @@ - .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 -ru ../work/bash-2.04/doc/bashref.texi ./doc/bashref.texi ---- ../work/bash-2.04/doc/bashref.texi Tue Mar 14 17:38:33 2000 -+++ ./doc/bashref.texi Wed May 24 12:17:39 2000 -@@ -1679,7 +1679,8 @@ - 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. -+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 -@@ -1692,8 +1693,8 @@ - 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}, -+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} -@@ -3319,6 +3320,10 @@ - @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 ../work/bash-2.04/lib/readline/doc: Makefile -diff -ru ../work/bash-2.04/subst.c ./subst.c ---- ../work/bash-2.04/subst.c Tue Mar 14 16:42:02 2000 -+++ ./subst.c Wed May 24 12:17:39 2000 -@@ -106,6 +106,9 @@ - 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. */ -@@ -6018,6 +6021,11 @@ - { - 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 -ru ../work/bash-2.04/tests/shopt.right ./tests/shopt.right ---- ../work/bash-2.04/tests/shopt.right Tue Sep 21 17:55:58 1999 -+++ ./tests/shopt.right Wed May 24 12:17:23 2000 -@@ -21,6 +21,7 @@ - shopt -u no_empty_cmd_completion - shopt -u nocaseglob - shopt -u nullglob -+shopt -u failglob - shopt -s progcomp - shopt -s promptvars - shopt -u restricted_shell -@@ -56,6 +57,7 @@ - shopt -u no_empty_cmd_completion - shopt -u nocaseglob - shopt -u nullglob -+shopt -u failglob - shopt -u restricted_shell - shopt -u shift_verbose - shopt -u xpg_echo -@@ -75,6 +77,7 @@ - no_empty_cmd_completion off - nocaseglob off - nullglob off -+failglob off - restricted_shell off - shift_verbose off - xpg_echo off -@@ -198,3 +201,5 @@ - -- - ./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 -ru ../work/bash-2.04/tests/shopt.tests ./tests/shopt.tests ---- ../work/bash-2.04/tests/shopt.tests Tue Sep 21 17:49:32 1999 -+++ ./tests/shopt.tests Wed May 24 12:17:39 2000 -@@ -21,6 +21,7 @@ - shopt -u mailwarn - shopt -u nocaseglob - shopt -u nullglob -+shopt -u failglob - shopt -s promptvars - shopt -u shift_verbose - shopt -s sourcepath -@@ -92,3 +93,11 @@ - 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 diff --git a/shells/bash/files/patch-builtins_shopt.def b/shells/bash/files/patch-builtins_shopt.def new file mode 100644 index 000000000000..4a896b397684 --- /dev/null +++ b/shells/bash/files/patch-builtins_shopt.def @@ -0,0 +1,22 @@ + +$FreeBSD$ + +--- builtins/shopt.def.orig Tue Sep 11 21:55:06 2001 ++++ builtins/shopt.def Tue Nov 20 23:52:45 2001 +@@ -56,7 +56,7 @@ + + #define OPTFMT "%-15s\t%s\n" + +-extern int allow_null_glob_expansion, glob_dot_filenames; ++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; +@@ -140,6 +140,7 @@ + #endif + { "nocaseglob", &glob_ignore_case, (shopt_set_func_t *)NULL }, + { "nullglob", &allow_null_glob_expansion, (shopt_set_func_t *)NULL }, ++ { "failglob", &fail_glob_expansion, (Function *)NULL }, + #if defined (PROGRAMMABLE_COMPLETION) + { "progcomp", &prog_completion_enabled, (shopt_set_func_t *)NULL }, + #endif diff --git a/shells/bash/files/patch-doc_bash.1 b/shells/bash/files/patch-doc_bash.1 new file mode 100644 index 000000000000..fc26ea10be05 --- /dev/null +++ b/shells/bash/files/patch-doc_bash.1 @@ -0,0 +1,16 @@ + +$FreeBSD$ + +--- doc/bash.1.orig Tue Nov 13 18:55:59 2001 ++++ doc/bash.1 Tue Nov 20 23:52:45 2001 +@@ -2473,6 +2473,10 @@ + .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 --git a/shells/bash/files/patch-doc_bashref.texi b/shells/bash/files/patch-doc_bashref.texi new file mode 100644 index 000000000000..b4fc6acc6e6e --- /dev/null +++ b/shells/bash/files/patch-doc_bashref.texi @@ -0,0 +1,37 @@ + +$FreeBSD$ + +--- doc/bashref.texi.orig Tue Nov 13 18:55:03 2001 ++++ doc/bashref.texi Tue Nov 20 23:52:45 2001 +@@ -1700,7 +1700,8 @@ + 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. ++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 +@@ -1713,8 +1714,8 @@ + 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}, ++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 @env{GLOBIGNORE} +@@ -3372,6 +3373,10 @@ + @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 diff --git a/shells/bash/files/patch-execute_cmd.c b/shells/bash/files/patch-execute_cmd.c deleted file mode 100644 index e50bfb5bd1e0..000000000000 --- a/shells/bash/files/patch-execute_cmd.c +++ /dev/null @@ -1,20 +0,0 @@ ---- execute_cmd.c.shellfunc Tue Jan 25 11:29:11 2000 -+++ execute_cmd.c Tue May 2 21:26:24 2000 -@@ -2762,6 +2762,8 @@ - if (tc && (flags & CMD_IGNORE_RETURN)) - tc->flags |= CMD_IGNORE_RETURN; - -+ old_shell_function = this_shell_function; -+ - if (subshell == 0) - { - begin_unwind_frame ("function_calling"); -@@ -2843,6 +2845,8 @@ - - if (variable_context == 0 || this_shell_function == 0) - make_funcname_visible (0); -+ -+ this_shell_function = old_shell_function; - - return (result); - } diff --git a/shells/bash/files/patch-subst.c b/shells/bash/files/patch-subst.c new file mode 100644 index 000000000000..8ef29a8b5774 --- /dev/null +++ b/shells/bash/files/patch-subst.c @@ -0,0 +1,27 @@ + +$FreeBSD$ + +--- subst.c.orig Mon Nov 5 20:19:49 2001 ++++ subst.c Tue Nov 20 23:52:45 2001 +@@ -121,6 +121,9 @@ + a null file. */ + int allow_null_glob_expansion; + ++/* Non-zero means to signal an error when globbing fails to match. */ ++int fail_glob_expansion; ++ + #if 0 + /* Variables to keep track of which words in an expanded word list (the + output of expand_word_list_internal) are the result of globbing +@@ -6132,6 +6135,11 @@ + { + 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 --git a/shells/bash/files/patch-tests_shopt.right b/shells/bash/files/patch-tests_shopt.right new file mode 100644 index 000000000000..fbbd9a8a27ff --- /dev/null +++ b/shells/bash/files/patch-tests_shopt.right @@ -0,0 +1,35 @@ + +$FreeBSD$ + +--- tests/shopt.right.orig Wed May 9 19:40:39 2001 ++++ tests/shopt.right Tue Nov 20 23:52:45 2001 +@@ -22,6 +22,7 @@ + shopt -u no_empty_cmd_completion + shopt -u nocaseglob + shopt -u nullglob ++shopt -u failglob + shopt -s progcomp + shopt -s promptvars + shopt -u restricted_shell +@@ -58,6 +59,7 @@ + shopt -u no_empty_cmd_completion + shopt -u nocaseglob + shopt -u nullglob ++shopt -u failglob + shopt -u restricted_shell + shopt -u shift_verbose + shopt -u xpg_echo +@@ -78,6 +80,7 @@ + no_empty_cmd_completion off + nocaseglob off + nullglob off ++failglob off + restricted_shell off + shift_verbose off + xpg_echo off +@@ -205,3 +208,5 @@ + -- + ./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 --git a/shells/bash/files/patch-tests_shopt.tests b/shells/bash/files/patch-tests_shopt.tests new file mode 100644 index 000000000000..ad2eac3d811e --- /dev/null +++ b/shells/bash/files/patch-tests_shopt.tests @@ -0,0 +1,25 @@ + +$FreeBSD$ + +--- tests/shopt.tests.orig Tue Sep 21 17:49:32 1999 ++++ tests/shopt.tests Tue Nov 20 23:52:45 2001 +@@ -21,6 +21,7 @@ + shopt -u mailwarn + shopt -u nocaseglob + shopt -u nullglob ++shopt -u failglob + shopt -s promptvars + shopt -u shift_verbose + shopt -s sourcepath +@@ -92,3 +93,11 @@ + 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 diff --git a/shells/bash2/Makefile b/shells/bash2/Makefile index b0714728c1d7..4086b65db63c 100644 --- a/shells/bash2/Makefile +++ b/shells/bash2/Makefile @@ -7,7 +7,7 @@ # PORTNAME= bash -PORTVERSION= 2.05 +PORTVERSION= 2.05a CATEGORIES= shells MASTER_SITES= ${MASTER_SITE_GNU} \ ftp://ftp.cwru.edu/pub/bash/ diff --git a/shells/bash2/distinfo b/shells/bash2/distinfo index d20c3e2558a1..280f0ce20569 100644 --- a/shells/bash2/distinfo +++ b/shells/bash2/distinfo @@ -1,2 +1,2 @@ -MD5 (bash-2.05.tar.gz) = fe40d1633203c1ca6f2a6dfc6d097c48 -MD5 (bash-doc-2.05.tar.gz) = 9bb3026e0a7cafcf592eea8f357e9f14 +MD5 (bash-2.05a.tar.gz) = eeabc3f624861c4a8a687f7701db3d06 +MD5 (bash-doc-2.05a.tar.gz) = c86e07eb43c3a1a9b2c830b6bff1331d diff --git a/shells/bash2/files/patch-aa b/shells/bash2/files/patch-aa deleted file mode 100644 index f30ca9d79b7b..000000000000 --- a/shells/bash2/files/patch-aa +++ /dev/null @@ -1,21 +0,0 @@ -*** doc/Makefile.in.bak Fri Jan 31 00:12:33 1997 ---- doc/Makefile.in Sat Jun 28 02:23:01 1997 -*************** -*** 155,161 **** - -$(INSTALL_DATA) $(srcdir)/bashref.info $(infodir)/bash.info - # run install-info if it is present to update the info directory - if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \ -! install-info --dir-file=$(infodir)/dir $(infodir)/bash.info; \ - else true; fi - - uninstall: ---- 155,163 ---- - -$(INSTALL_DATA) $(srcdir)/bashref.info $(infodir)/bash.info - # run install-info if it is present to update the info directory - if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \ -! install-info \ -! --entry="* BASH: (bash). Bash Reference Manual." \ -! --dir-file=$(infodir)/dir $(infodir)/bash.info; \ - else true; fi - - uninstall: diff --git a/shells/bash2/files/patch-ab b/shells/bash2/files/patch-ab index db11179f5a31..f810ff94da33 100644 --- a/shells/bash2/files/patch-ab +++ b/shells/bash2/files/patch-ab @@ -1,11 +1,24 @@ ---- Makefile.in.orig Wed Mar 1 22:52:12 2000 -+++ Makefile.in Mon May 8 00:05:03 2000 -@@ -582,7 +582,7 @@ + +$FreeBSD$ + +--- Makefile.in.orig Mon Nov 12 17:42:45 2001 ++++ Makefile.in Wed Nov 21 00:08:16 2001 +@@ -59,6 +59,7 @@ + + INSTALL = @INSTALL@ + INSTALL_PROGRAM = @INSTALL_PROGRAM@ ++INSTALL_SCRIPT = @INSTALL_SCRIPT@ + INSTALL_DATA = @INSTALL_DATA@ + INSTALLMODE= -m 0755 + INSTALLMODE2 = -m 0555 +@@ -627,8 +628,8 @@ + @${SHELL} $(SUPPORT_SRC)mkdirs $(DESTDIR)$(infodir) install: .made installdirs - $(INSTALL_PROGRAM) $(INSTALLMODE) $(Program) $(bindir)/$(Program) -- $(INSTALL_PROGRAM) $(INSTALLMODE2) bashbug $(bindir)/bashbug -+ $(INSTALL) $(INSTALLMODE2) bashbug $(bindir)/bashbug +- $(INSTALL_PROGRAM) $(INSTALLMODE) $(Program) $(DESTDIR)$(bindir)/$(Program) +- $(INSTALL_PROGRAM) $(INSTALLMODE2) bashbug $(DESTDIR)$(bindir)/bashbug ++ $(INSTALL_PROGRAM) $(Program) $(DESTDIR)$(bindir)/$(Program) ++ $(INSTALL_SCRIPT) bashbug $(DESTDIR)$(bindir)/bashbug -( cd $(DOCDIR) ; $(MAKE) $(MFLAGS) \ man1dir=$(man1dir) man1ext=$(man1ext) \ man3dir=$(man3dir) man3ext=$(man3ext) \ diff --git a/shells/bash2/files/patch-ac b/shells/bash2/files/patch-ac index 713ba4c2022e..51506a030580 100644 --- a/shells/bash2/files/patch-ac +++ b/shells/bash2/files/patch-ac @@ -1,14 +1,14 @@ $FreeBSD$ ---- configure.orig Tue Jan 23 19:57:28 2001 -+++ configure Tue Apr 10 12:17:23 2001 -@@ -763,7 +763,7 @@ +--- configure.orig Mon Nov 19 18:27:10 2001 ++++ configure Mon Nov 19 18:27:17 2001 +@@ -1108,7 +1108,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 ++*-freebsd*) opt_bash_malloc=no ;; # they claim it's better + *-openbsd*) opt_bash_malloc=no ;; # they claim it needs eight-bit alignment *-aix*) opt_bash_malloc=no ;; # AIX machines *-nextstep*) opt_bash_malloc=no ;; # NeXT machines running NeXTstep - *-macos*) opt_bash_malloc=no ;; # Apple MacOS X diff --git a/shells/bash2/files/patch-ae b/shells/bash2/files/patch-ae deleted file mode 100644 index c0ae0bccf270..000000000000 --- a/shells/bash2/files/patch-ae +++ /dev/null @@ -1,151 +0,0 @@ -diff -ru ../work/bash-2.04/builtins/shopt.def ./builtins/shopt.def ---- ../work/bash-2.04/builtins/shopt.def Tue Sep 21 17:20:01 1999 -+++ ./builtins/shopt.def Wed May 24 12:18:31 2000 -@@ -56,7 +56,7 @@ - - #define OPTFMT "%-15s\t%s\n" - --extern int allow_null_glob_expansion, glob_dot_filenames; -+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; -@@ -137,6 +137,7 @@ - #endif - { "nocaseglob", &glob_ignore_case, (Function *)NULL }, - { "nullglob", &allow_null_glob_expansion, (Function *)NULL }, -+ { "failglob", &fail_glob_expansion, (Function *)NULL }, - #if defined (PROGRAMMABLE_COMPLETION) - { "progcomp", &prog_completion_enabled, (Function *)NULL }, - #endif -diff -ru ../work/bash-2.04/doc/bash.1 ./doc/bash.1 ---- ../work/bash-2.04/doc/bash.1 Tue Mar 14 17:37:56 2000 -+++ ./doc/bash.1 Wed May 24 12:17:39 2000 -@@ -2414,6 +2414,10 @@ - .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 -ru ../work/bash-2.04/doc/bashref.texi ./doc/bashref.texi ---- ../work/bash-2.04/doc/bashref.texi Tue Mar 14 17:38:33 2000 -+++ ./doc/bashref.texi Wed May 24 12:17:39 2000 -@@ -1679,7 +1679,8 @@ - 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. -+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 -@@ -1692,8 +1693,8 @@ - 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}, -+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} -@@ -3319,6 +3320,10 @@ - @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 ../work/bash-2.04/lib/readline/doc: Makefile -diff -ru ../work/bash-2.04/subst.c ./subst.c ---- ../work/bash-2.04/subst.c Tue Mar 14 16:42:02 2000 -+++ ./subst.c Wed May 24 12:17:39 2000 -@@ -106,6 +106,9 @@ - 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. */ -@@ -6018,6 +6021,11 @@ - { - 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 -ru ../work/bash-2.04/tests/shopt.right ./tests/shopt.right ---- ../work/bash-2.04/tests/shopt.right Tue Sep 21 17:55:58 1999 -+++ ./tests/shopt.right Wed May 24 12:17:23 2000 -@@ -21,6 +21,7 @@ - shopt -u no_empty_cmd_completion - shopt -u nocaseglob - shopt -u nullglob -+shopt -u failglob - shopt -s progcomp - shopt -s promptvars - shopt -u restricted_shell -@@ -56,6 +57,7 @@ - shopt -u no_empty_cmd_completion - shopt -u nocaseglob - shopt -u nullglob -+shopt -u failglob - shopt -u restricted_shell - shopt -u shift_verbose - shopt -u xpg_echo -@@ -75,6 +77,7 @@ - no_empty_cmd_completion off - nocaseglob off - nullglob off -+failglob off - restricted_shell off - shift_verbose off - xpg_echo off -@@ -198,3 +201,5 @@ - -- - ./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 -ru ../work/bash-2.04/tests/shopt.tests ./tests/shopt.tests ---- ../work/bash-2.04/tests/shopt.tests Tue Sep 21 17:49:32 1999 -+++ ./tests/shopt.tests Wed May 24 12:17:39 2000 -@@ -21,6 +21,7 @@ - shopt -u mailwarn - shopt -u nocaseglob - shopt -u nullglob -+shopt -u failglob - shopt -s promptvars - shopt -u shift_verbose - shopt -s sourcepath -@@ -92,3 +93,11 @@ - 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 diff --git a/shells/bash2/files/patch-builtins_shopt.def b/shells/bash2/files/patch-builtins_shopt.def new file mode 100644 index 000000000000..4a896b397684 --- /dev/null +++ b/shells/bash2/files/patch-builtins_shopt.def @@ -0,0 +1,22 @@ + +$FreeBSD$ + +--- builtins/shopt.def.orig Tue Sep 11 21:55:06 2001 ++++ builtins/shopt.def Tue Nov 20 23:52:45 2001 +@@ -56,7 +56,7 @@ + + #define OPTFMT "%-15s\t%s\n" + +-extern int allow_null_glob_expansion, glob_dot_filenames; ++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; +@@ -140,6 +140,7 @@ + #endif + { "nocaseglob", &glob_ignore_case, (shopt_set_func_t *)NULL }, + { "nullglob", &allow_null_glob_expansion, (shopt_set_func_t *)NULL }, ++ { "failglob", &fail_glob_expansion, (Function *)NULL }, + #if defined (PROGRAMMABLE_COMPLETION) + { "progcomp", &prog_completion_enabled, (shopt_set_func_t *)NULL }, + #endif diff --git a/shells/bash2/files/patch-doc_bash.1 b/shells/bash2/files/patch-doc_bash.1 new file mode 100644 index 000000000000..fc26ea10be05 --- /dev/null +++ b/shells/bash2/files/patch-doc_bash.1 @@ -0,0 +1,16 @@ + +$FreeBSD$ + +--- doc/bash.1.orig Tue Nov 13 18:55:59 2001 ++++ doc/bash.1 Tue Nov 20 23:52:45 2001 +@@ -2473,6 +2473,10 @@ + .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 --git a/shells/bash2/files/patch-doc_bashref.texi b/shells/bash2/files/patch-doc_bashref.texi new file mode 100644 index 000000000000..b4fc6acc6e6e --- /dev/null +++ b/shells/bash2/files/patch-doc_bashref.texi @@ -0,0 +1,37 @@ + +$FreeBSD$ + +--- doc/bashref.texi.orig Tue Nov 13 18:55:03 2001 ++++ doc/bashref.texi Tue Nov 20 23:52:45 2001 +@@ -1700,7 +1700,8 @@ + 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. ++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 +@@ -1713,8 +1714,8 @@ + 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}, ++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 @env{GLOBIGNORE} +@@ -3372,6 +3373,10 @@ + @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 diff --git a/shells/bash2/files/patch-execute_cmd.c b/shells/bash2/files/patch-execute_cmd.c deleted file mode 100644 index e50bfb5bd1e0..000000000000 --- a/shells/bash2/files/patch-execute_cmd.c +++ /dev/null @@ -1,20 +0,0 @@ ---- execute_cmd.c.shellfunc Tue Jan 25 11:29:11 2000 -+++ execute_cmd.c Tue May 2 21:26:24 2000 -@@ -2762,6 +2762,8 @@ - if (tc && (flags & CMD_IGNORE_RETURN)) - tc->flags |= CMD_IGNORE_RETURN; - -+ old_shell_function = this_shell_function; -+ - if (subshell == 0) - { - begin_unwind_frame ("function_calling"); -@@ -2843,6 +2845,8 @@ - - if (variable_context == 0 || this_shell_function == 0) - make_funcname_visible (0); -+ -+ this_shell_function = old_shell_function; - - return (result); - } diff --git a/shells/bash2/files/patch-subst.c b/shells/bash2/files/patch-subst.c new file mode 100644 index 000000000000..8ef29a8b5774 --- /dev/null +++ b/shells/bash2/files/patch-subst.c @@ -0,0 +1,27 @@ + +$FreeBSD$ + +--- subst.c.orig Mon Nov 5 20:19:49 2001 ++++ subst.c Tue Nov 20 23:52:45 2001 +@@ -121,6 +121,9 @@ + a null file. */ + int allow_null_glob_expansion; + ++/* Non-zero means to signal an error when globbing fails to match. */ ++int fail_glob_expansion; ++ + #if 0 + /* Variables to keep track of which words in an expanded word list (the + output of expand_word_list_internal) are the result of globbing +@@ -6132,6 +6135,11 @@ + { + 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 --git a/shells/bash2/files/patch-tests_shopt.right b/shells/bash2/files/patch-tests_shopt.right new file mode 100644 index 000000000000..fbbd9a8a27ff --- /dev/null +++ b/shells/bash2/files/patch-tests_shopt.right @@ -0,0 +1,35 @@ + +$FreeBSD$ + +--- tests/shopt.right.orig Wed May 9 19:40:39 2001 ++++ tests/shopt.right Tue Nov 20 23:52:45 2001 +@@ -22,6 +22,7 @@ + shopt -u no_empty_cmd_completion + shopt -u nocaseglob + shopt -u nullglob ++shopt -u failglob + shopt -s progcomp + shopt -s promptvars + shopt -u restricted_shell +@@ -58,6 +59,7 @@ + shopt -u no_empty_cmd_completion + shopt -u nocaseglob + shopt -u nullglob ++shopt -u failglob + shopt -u restricted_shell + shopt -u shift_verbose + shopt -u xpg_echo +@@ -78,6 +80,7 @@ + no_empty_cmd_completion off + nocaseglob off + nullglob off ++failglob off + restricted_shell off + shift_verbose off + xpg_echo off +@@ -205,3 +208,5 @@ + -- + ./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 --git a/shells/bash2/files/patch-tests_shopt.tests b/shells/bash2/files/patch-tests_shopt.tests new file mode 100644 index 000000000000..ad2eac3d811e --- /dev/null +++ b/shells/bash2/files/patch-tests_shopt.tests @@ -0,0 +1,25 @@ + +$FreeBSD$ + +--- tests/shopt.tests.orig Tue Sep 21 17:49:32 1999 ++++ tests/shopt.tests Tue Nov 20 23:52:45 2001 +@@ -21,6 +21,7 @@ + shopt -u mailwarn + shopt -u nocaseglob + shopt -u nullglob ++shopt -u failglob + shopt -s promptvars + shopt -u shift_verbose + shopt -s sourcepath +@@ -92,3 +93,11 @@ + 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 diff --git a/shells/bash3/Makefile b/shells/bash3/Makefile index b0714728c1d7..4086b65db63c 100644 --- a/shells/bash3/Makefile +++ b/shells/bash3/Makefile @@ -7,7 +7,7 @@ # PORTNAME= bash -PORTVERSION= 2.05 +PORTVERSION= 2.05a CATEGORIES= shells MASTER_SITES= ${MASTER_SITE_GNU} \ ftp://ftp.cwru.edu/pub/bash/ diff --git a/shells/bash3/distinfo b/shells/bash3/distinfo index d20c3e2558a1..280f0ce20569 100644 --- a/shells/bash3/distinfo +++ b/shells/bash3/distinfo @@ -1,2 +1,2 @@ -MD5 (bash-2.05.tar.gz) = fe40d1633203c1ca6f2a6dfc6d097c48 -MD5 (bash-doc-2.05.tar.gz) = 9bb3026e0a7cafcf592eea8f357e9f14 +MD5 (bash-2.05a.tar.gz) = eeabc3f624861c4a8a687f7701db3d06 +MD5 (bash-doc-2.05a.tar.gz) = c86e07eb43c3a1a9b2c830b6bff1331d diff --git a/shells/bash3/files/patch-aa b/shells/bash3/files/patch-aa deleted file mode 100644 index f30ca9d79b7b..000000000000 --- a/shells/bash3/files/patch-aa +++ /dev/null @@ -1,21 +0,0 @@ -*** doc/Makefile.in.bak Fri Jan 31 00:12:33 1997 ---- doc/Makefile.in Sat Jun 28 02:23:01 1997 -*************** -*** 155,161 **** - -$(INSTALL_DATA) $(srcdir)/bashref.info $(infodir)/bash.info - # run install-info if it is present to update the info directory - if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \ -! install-info --dir-file=$(infodir)/dir $(infodir)/bash.info; \ - else true; fi - - uninstall: ---- 155,163 ---- - -$(INSTALL_DATA) $(srcdir)/bashref.info $(infodir)/bash.info - # run install-info if it is present to update the info directory - if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \ -! install-info \ -! --entry="* BASH: (bash). Bash Reference Manual." \ -! --dir-file=$(infodir)/dir $(infodir)/bash.info; \ - else true; fi - - uninstall: diff --git a/shells/bash3/files/patch-ab b/shells/bash3/files/patch-ab index db11179f5a31..f810ff94da33 100644 --- a/shells/bash3/files/patch-ab +++ b/shells/bash3/files/patch-ab @@ -1,11 +1,24 @@ ---- Makefile.in.orig Wed Mar 1 22:52:12 2000 -+++ Makefile.in Mon May 8 00:05:03 2000 -@@ -582,7 +582,7 @@ + +$FreeBSD$ + +--- Makefile.in.orig Mon Nov 12 17:42:45 2001 ++++ Makefile.in Wed Nov 21 00:08:16 2001 +@@ -59,6 +59,7 @@ + + INSTALL = @INSTALL@ + INSTALL_PROGRAM = @INSTALL_PROGRAM@ ++INSTALL_SCRIPT = @INSTALL_SCRIPT@ + INSTALL_DATA = @INSTALL_DATA@ + INSTALLMODE= -m 0755 + INSTALLMODE2 = -m 0555 +@@ -627,8 +628,8 @@ + @${SHELL} $(SUPPORT_SRC)mkdirs $(DESTDIR)$(infodir) install: .made installdirs - $(INSTALL_PROGRAM) $(INSTALLMODE) $(Program) $(bindir)/$(Program) -- $(INSTALL_PROGRAM) $(INSTALLMODE2) bashbug $(bindir)/bashbug -+ $(INSTALL) $(INSTALLMODE2) bashbug $(bindir)/bashbug +- $(INSTALL_PROGRAM) $(INSTALLMODE) $(Program) $(DESTDIR)$(bindir)/$(Program) +- $(INSTALL_PROGRAM) $(INSTALLMODE2) bashbug $(DESTDIR)$(bindir)/bashbug ++ $(INSTALL_PROGRAM) $(Program) $(DESTDIR)$(bindir)/$(Program) ++ $(INSTALL_SCRIPT) bashbug $(DESTDIR)$(bindir)/bashbug -( cd $(DOCDIR) ; $(MAKE) $(MFLAGS) \ man1dir=$(man1dir) man1ext=$(man1ext) \ man3dir=$(man3dir) man3ext=$(man3ext) \ diff --git a/shells/bash3/files/patch-ac b/shells/bash3/files/patch-ac index 713ba4c2022e..51506a030580 100644 --- a/shells/bash3/files/patch-ac +++ b/shells/bash3/files/patch-ac @@ -1,14 +1,14 @@ $FreeBSD$ ---- configure.orig Tue Jan 23 19:57:28 2001 -+++ configure Tue Apr 10 12:17:23 2001 -@@ -763,7 +763,7 @@ +--- configure.orig Mon Nov 19 18:27:10 2001 ++++ configure Mon Nov 19 18:27:17 2001 +@@ -1108,7 +1108,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 ++*-freebsd*) opt_bash_malloc=no ;; # they claim it's better + *-openbsd*) opt_bash_malloc=no ;; # they claim it needs eight-bit alignment *-aix*) opt_bash_malloc=no ;; # AIX machines *-nextstep*) opt_bash_malloc=no ;; # NeXT machines running NeXTstep - *-macos*) opt_bash_malloc=no ;; # Apple MacOS X diff --git a/shells/bash3/files/patch-ae b/shells/bash3/files/patch-ae deleted file mode 100644 index c0ae0bccf270..000000000000 --- a/shells/bash3/files/patch-ae +++ /dev/null @@ -1,151 +0,0 @@ -diff -ru ../work/bash-2.04/builtins/shopt.def ./builtins/shopt.def ---- ../work/bash-2.04/builtins/shopt.def Tue Sep 21 17:20:01 1999 -+++ ./builtins/shopt.def Wed May 24 12:18:31 2000 -@@ -56,7 +56,7 @@ - - #define OPTFMT "%-15s\t%s\n" - --extern int allow_null_glob_expansion, glob_dot_filenames; -+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; -@@ -137,6 +137,7 @@ - #endif - { "nocaseglob", &glob_ignore_case, (Function *)NULL }, - { "nullglob", &allow_null_glob_expansion, (Function *)NULL }, -+ { "failglob", &fail_glob_expansion, (Function *)NULL }, - #if defined (PROGRAMMABLE_COMPLETION) - { "progcomp", &prog_completion_enabled, (Function *)NULL }, - #endif -diff -ru ../work/bash-2.04/doc/bash.1 ./doc/bash.1 ---- ../work/bash-2.04/doc/bash.1 Tue Mar 14 17:37:56 2000 -+++ ./doc/bash.1 Wed May 24 12:17:39 2000 -@@ -2414,6 +2414,10 @@ - .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 -ru ../work/bash-2.04/doc/bashref.texi ./doc/bashref.texi ---- ../work/bash-2.04/doc/bashref.texi Tue Mar 14 17:38:33 2000 -+++ ./doc/bashref.texi Wed May 24 12:17:39 2000 -@@ -1679,7 +1679,8 @@ - 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. -+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 -@@ -1692,8 +1693,8 @@ - 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}, -+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} -@@ -3319,6 +3320,10 @@ - @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 ../work/bash-2.04/lib/readline/doc: Makefile -diff -ru ../work/bash-2.04/subst.c ./subst.c ---- ../work/bash-2.04/subst.c Tue Mar 14 16:42:02 2000 -+++ ./subst.c Wed May 24 12:17:39 2000 -@@ -106,6 +106,9 @@ - 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. */ -@@ -6018,6 +6021,11 @@ - { - 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 -ru ../work/bash-2.04/tests/shopt.right ./tests/shopt.right ---- ../work/bash-2.04/tests/shopt.right Tue Sep 21 17:55:58 1999 -+++ ./tests/shopt.right Wed May 24 12:17:23 2000 -@@ -21,6 +21,7 @@ - shopt -u no_empty_cmd_completion - shopt -u nocaseglob - shopt -u nullglob -+shopt -u failglob - shopt -s progcomp - shopt -s promptvars - shopt -u restricted_shell -@@ -56,6 +57,7 @@ - shopt -u no_empty_cmd_completion - shopt -u nocaseglob - shopt -u nullglob -+shopt -u failglob - shopt -u restricted_shell - shopt -u shift_verbose - shopt -u xpg_echo -@@ -75,6 +77,7 @@ - no_empty_cmd_completion off - nocaseglob off - nullglob off -+failglob off - restricted_shell off - shift_verbose off - xpg_echo off -@@ -198,3 +201,5 @@ - -- - ./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 -ru ../work/bash-2.04/tests/shopt.tests ./tests/shopt.tests ---- ../work/bash-2.04/tests/shopt.tests Tue Sep 21 17:49:32 1999 -+++ ./tests/shopt.tests Wed May 24 12:17:39 2000 -@@ -21,6 +21,7 @@ - shopt -u mailwarn - shopt -u nocaseglob - shopt -u nullglob -+shopt -u failglob - shopt -s promptvars - shopt -u shift_verbose - shopt -s sourcepath -@@ -92,3 +93,11 @@ - 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 diff --git a/shells/bash3/files/patch-builtins_shopt.def b/shells/bash3/files/patch-builtins_shopt.def new file mode 100644 index 000000000000..4a896b397684 --- /dev/null +++ b/shells/bash3/files/patch-builtins_shopt.def @@ -0,0 +1,22 @@ + +$FreeBSD$ + +--- builtins/shopt.def.orig Tue Sep 11 21:55:06 2001 ++++ builtins/shopt.def Tue Nov 20 23:52:45 2001 +@@ -56,7 +56,7 @@ + + #define OPTFMT "%-15s\t%s\n" + +-extern int allow_null_glob_expansion, glob_dot_filenames; ++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; +@@ -140,6 +140,7 @@ + #endif + { "nocaseglob", &glob_ignore_case, (shopt_set_func_t *)NULL }, + { "nullglob", &allow_null_glob_expansion, (shopt_set_func_t *)NULL }, ++ { "failglob", &fail_glob_expansion, (Function *)NULL }, + #if defined (PROGRAMMABLE_COMPLETION) + { "progcomp", &prog_completion_enabled, (shopt_set_func_t *)NULL }, + #endif diff --git a/shells/bash3/files/patch-doc_bash.1 b/shells/bash3/files/patch-doc_bash.1 new file mode 100644 index 000000000000..fc26ea10be05 --- /dev/null +++ b/shells/bash3/files/patch-doc_bash.1 @@ -0,0 +1,16 @@ + +$FreeBSD$ + +--- doc/bash.1.orig Tue Nov 13 18:55:59 2001 ++++ doc/bash.1 Tue Nov 20 23:52:45 2001 +@@ -2473,6 +2473,10 @@ + .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 --git a/shells/bash3/files/patch-doc_bashref.texi b/shells/bash3/files/patch-doc_bashref.texi new file mode 100644 index 000000000000..b4fc6acc6e6e --- /dev/null +++ b/shells/bash3/files/patch-doc_bashref.texi @@ -0,0 +1,37 @@ + +$FreeBSD$ + +--- doc/bashref.texi.orig Tue Nov 13 18:55:03 2001 ++++ doc/bashref.texi Tue Nov 20 23:52:45 2001 +@@ -1700,7 +1700,8 @@ + 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. ++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 +@@ -1713,8 +1714,8 @@ + 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}, ++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 @env{GLOBIGNORE} +@@ -3372,6 +3373,10 @@ + @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 diff --git a/shells/bash3/files/patch-execute_cmd.c b/shells/bash3/files/patch-execute_cmd.c deleted file mode 100644 index e50bfb5bd1e0..000000000000 --- a/shells/bash3/files/patch-execute_cmd.c +++ /dev/null @@ -1,20 +0,0 @@ ---- execute_cmd.c.shellfunc Tue Jan 25 11:29:11 2000 -+++ execute_cmd.c Tue May 2 21:26:24 2000 -@@ -2762,6 +2762,8 @@ - if (tc && (flags & CMD_IGNORE_RETURN)) - tc->flags |= CMD_IGNORE_RETURN; - -+ old_shell_function = this_shell_function; -+ - if (subshell == 0) - { - begin_unwind_frame ("function_calling"); -@@ -2843,6 +2845,8 @@ - - if (variable_context == 0 || this_shell_function == 0) - make_funcname_visible (0); -+ -+ this_shell_function = old_shell_function; - - return (result); - } diff --git a/shells/bash3/files/patch-subst.c b/shells/bash3/files/patch-subst.c new file mode 100644 index 000000000000..8ef29a8b5774 --- /dev/null +++ b/shells/bash3/files/patch-subst.c @@ -0,0 +1,27 @@ + +$FreeBSD$ + +--- subst.c.orig Mon Nov 5 20:19:49 2001 ++++ subst.c Tue Nov 20 23:52:45 2001 +@@ -121,6 +121,9 @@ + a null file. */ + int allow_null_glob_expansion; + ++/* Non-zero means to signal an error when globbing fails to match. */ ++int fail_glob_expansion; ++ + #if 0 + /* Variables to keep track of which words in an expanded word list (the + output of expand_word_list_internal) are the result of globbing +@@ -6132,6 +6135,11 @@ + { + 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 --git a/shells/bash3/files/patch-tests_shopt.right b/shells/bash3/files/patch-tests_shopt.right new file mode 100644 index 000000000000..fbbd9a8a27ff --- /dev/null +++ b/shells/bash3/files/patch-tests_shopt.right @@ -0,0 +1,35 @@ + +$FreeBSD$ + +--- tests/shopt.right.orig Wed May 9 19:40:39 2001 ++++ tests/shopt.right Tue Nov 20 23:52:45 2001 +@@ -22,6 +22,7 @@ + shopt -u no_empty_cmd_completion + shopt -u nocaseglob + shopt -u nullglob ++shopt -u failglob + shopt -s progcomp + shopt -s promptvars + shopt -u restricted_shell +@@ -58,6 +59,7 @@ + shopt -u no_empty_cmd_completion + shopt -u nocaseglob + shopt -u nullglob ++shopt -u failglob + shopt -u restricted_shell + shopt -u shift_verbose + shopt -u xpg_echo +@@ -78,6 +80,7 @@ + no_empty_cmd_completion off + nocaseglob off + nullglob off ++failglob off + restricted_shell off + shift_verbose off + xpg_echo off +@@ -205,3 +208,5 @@ + -- + ./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 --git a/shells/bash3/files/patch-tests_shopt.tests b/shells/bash3/files/patch-tests_shopt.tests new file mode 100644 index 000000000000..ad2eac3d811e --- /dev/null +++ b/shells/bash3/files/patch-tests_shopt.tests @@ -0,0 +1,25 @@ + +$FreeBSD$ + +--- tests/shopt.tests.orig Tue Sep 21 17:49:32 1999 ++++ tests/shopt.tests Tue Nov 20 23:52:45 2001 +@@ -21,6 +21,7 @@ + shopt -u mailwarn + shopt -u nocaseglob + shopt -u nullglob ++shopt -u failglob + shopt -s promptvars + shopt -u shift_verbose + shopt -s sourcepath +@@ -92,3 +93,11 @@ + 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 |