summaryrefslogtreecommitdiff
path: root/app-shells
diff options
context:
space:
mode:
Diffstat (limited to 'app-shells')
-rw-r--r--app-shells/Manifest.gzbin8804 -> 8817 bytes
-rw-r--r--app-shells/bash/Manifest2
-rw-r--r--app-shells/bash/files/bash-5.2_p2-fix-for-brackets-in-nested-parameter-expansions.patch41
-rw-r--r--app-shells/bash/files/bash-5.2_p2-fixes-for-extglob-in-compat-mode.patch282
4 files changed, 0 insertions, 325 deletions
diff --git a/app-shells/Manifest.gz b/app-shells/Manifest.gz
index f27e7af54f65..ee2509d53f97 100644
--- a/app-shells/Manifest.gz
+++ b/app-shells/Manifest.gz
Binary files differ
diff --git a/app-shells/bash/Manifest b/app-shells/bash/Manifest
index 5bd6a69d13ef..7be4638514ed 100644
--- a/app-shells/bash/Manifest
+++ b/app-shells/bash/Manifest
@@ -1,6 +1,4 @@
AUX bash-5.0-syslog-history-extern.patch 376 BLAKE2B d883d3c3adbf8f4d19ecc3c2790754a7f6972682d1679b07d5bc599bdbfc019ba8ad4d1271ec550b59447db0a02f1219c9e6057a0b1c1c6c52f7750a746a07bf SHA512 c8dd17bdd8ccbd73061a7cbcb7351195e703a2c5fc6faf288ec3721fc6e526d88dd4b2201f87078a92ca134b98214ccfa935f82f585322f72e9a41fd51842b6a
-AUX bash-5.2_p2-fix-for-brackets-in-nested-parameter-expansions.patch 1565 BLAKE2B 2bf54251c7aba1d717faf805dd1495533e28af764b648117a9069984d40988313bb5a64060c6922a66e946895d33f21bcac2805d5692ac4b751fb56b648a7d17 SHA512 951f48a3a2737b1ea061e4c3379f121fe555a403071ea3f9dfe961f8fd2df69626c98bfc66dc460609793b33db04979cfc98acf4c1532b17d91e273548263abd
-AUX bash-5.2_p2-fixes-for-extglob-in-compat-mode.patch 7983 BLAKE2B 9fbc3cd196716dbd8e51619cd69a530edff2137276b3a7b41995d25d307d99fc4759d5c1ef4206e1bb049c28fb34bc3b6ca6920c4d16a18c687ccebddff16988 SHA512 2dcd0ee171b757e49da5873bd7d7db4f428eb40e22a6da5eb03b7e9fa2983c1d63ca4589eb86ca45bbb5d899d8a35993d0ba9ae7808a49ccd22634d618fa621d
AUX bash-5.2_p9-fix-for-extglob-in-compat-mode.patch 1064 BLAKE2B b351265373374788ff47e2c51c2fdb75ab44fd9e49e03141f9772422b3f3c68b519e4153039ae20d1810297223c3c05765ebbfc4d783bf5681b0b536a699412f SHA512 3070a867a64efbea197dd7724fb095f8efd1b3ca712af30836c6290fd521ecc6c7d92a3847333f941270462e6814bf82f2fad583f6cc5db4f2e92f6f512d9b03
AUX bash_logout 205 BLAKE2B b8c0266c3d1e31a714304a2b3b33389f042ae5bd497379f9b15ce31d47d1e3da73ba6536023953b00efe27b687e2ff45d94e3f01a13acc824dc12e31552c5b94 SHA512 7234250c03fc920996a381f9daef9e2d8ab1e1a29acdebed6669d8e0fe1c872a7fa343adf7d9ddc81225b0cd9eb223ba7ad1ff42448aff057fc6d6baa8f04a7d
AUX bashrc 3496 BLAKE2B eced5328d6ff2545c4e088ec5050ccd72fb5344bb83bd7d70b95840e68e642bd2a302c393b2ad12bd1ee9f42d51334043f8c1a0d36274bfd365339cec33cdec0 SHA512 39472c63db1f69cca8a92c5d330695f29e8f0b0524a6319482bbec394d91503d7c3a69dcd961927c7c404490efc8cf41b381e7bf4134098b750f47e5a47ff393
diff --git a/app-shells/bash/files/bash-5.2_p2-fix-for-brackets-in-nested-parameter-expansions.patch b/app-shells/bash/files/bash-5.2_p2-fix-for-brackets-in-nested-parameter-expansions.patch
deleted file mode 100644
index 9c1b03f8b2df..000000000000
--- a/app-shells/bash/files/bash-5.2_p2-fix-for-brackets-in-nested-parameter-expansions.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-https://git.savannah.gnu.org/cgit/bash.git/commit/?h=devel&id=22f21b760ed90eb77c3756e6ccf39b73c84f532a
-
---- subst.c
-+++ subst.c
-@@ -1798,6 +1798,9 @@ extract_heredoc_dolbrace_string (string, sindex, quoted, flags)
- return (result);
- }
-
-+#define PARAMEXPNEST_MAX 32 // for now
-+static int dbstate[PARAMEXPNEST_MAX];
-+
- /* Extract a parameter expansion expression within ${ and } from STRING.
- Obey the Posix.2 rules for finding the ending `}': count braces while
- skipping over enclosed quoted strings and command substitutions.
-@@ -1828,6 +1831,8 @@ extract_dollar_brace_string (string, sindex, quoted, flags)
- if (quoted == Q_HERE_DOCUMENT && dolbrace_state == DOLBRACE_QUOTE && (flags & SX_NOALLOC) == 0)
- return (extract_heredoc_dolbrace_string (string, sindex, quoted, flags));
-
-+ dbstate[0] = dolbrace_state;
-+
- pass_character = 0;
- nesting_level = 1;
- slen = strlen (string + *sindex) + *sindex;
-@@ -1852,6 +1857,8 @@ extract_dollar_brace_string (string, sindex, quoted, flags)
-
- if (string[i] == '$' && string[i+1] == LBRACE)
- {
-+ if (nesting_level < PARAMEXPNEST_MAX)
-+ dbstate[nesting_level] = dolbrace_state;
- nesting_level++;
- i += 2;
- if (dolbrace_state == DOLBRACE_QUOTE || dolbrace_state == DOLBRACE_WORD)
-@@ -1864,6 +1871,7 @@ extract_dollar_brace_string (string, sindex, quoted, flags)
- nesting_level--;
- if (nesting_level == 0)
- break;
-+ dolbrace_state = (nesting_level < PARAMEXPNEST_MAX) ? dbstate[nesting_level] : dbstate[0]; /* Guess using initial state */
- i++;
- continue;
- }
-
diff --git a/app-shells/bash/files/bash-5.2_p2-fixes-for-extglob-in-compat-mode.patch b/app-shells/bash/files/bash-5.2_p2-fixes-for-extglob-in-compat-mode.patch
deleted file mode 100644
index 16393c79af8b..000000000000
--- a/app-shells/bash/files/bash-5.2_p2-fixes-for-extglob-in-compat-mode.patch
+++ /dev/null
@@ -1,282 +0,0 @@
-https://bugs.gentoo.org/873931
-https://lists.gnu.org/archive/html/bug-bash/2022-10/msg00001.html
-https://git.savannah.gnu.org/cgit/bash.git/commit/?h=devel&id=22f21b760ed90eb77c3756e6ccf39b73c84f532a
-
---- MANIFEST
-+++ MANIFEST
-@@ -1131,6 +1131,7 @@ tests/extglob4.sub f
- tests/extglob5.sub f
- tests/extglob6.sub f
- tests/extglob7.sub f
-+tests/extglob8.sub f
- tests/func.tests f
- tests/func.right f
- tests/func1.sub f
---- builtins/common.h
-+++ builtins/common.h
-@@ -257,6 +257,10 @@ extern int print_shift_error;
- extern int expand_once_flag;
- #endif
-
-+#if defined (EXTENDED_GLOB)
-+extern int extglob_flag;
-+#endif
-+
- /* variables from source.def */
- extern int source_searches_cwd;
- extern int source_uses_path;
---- builtins/shopt.def
-+++ builtins/shopt.def
-@@ -1,7 +1,7 @@
- This file is shopt.def, from which is created shopt.c.
- It implements the Bash `shopt' builtin.
-
--Copyright (C) 1994-2021 Free Software Foundation, Inc.
-+Copyright (C) 1994-2022 Free Software Foundation, Inc.
-
- This file is part of GNU Bash, the Bourne Again SHell.
-
-@@ -149,6 +149,11 @@ static int shopt_set_complete_direxpand PARAMS((char *, int));
- static int set_assoc_expand PARAMS((char *, int));
- #endif
-
-+#if defined (EXTENDED_GLOB)
-+int extglob_flag = EXTGLOB_DEFAULT;
-+static int shopt_set_extglob PARAMS((char *, int));
-+#endif
-+
- static int shopt_set_debug_mode PARAMS((char *, int));
-
- static int shopt_login_shell;
-@@ -203,7 +208,7 @@ static struct {
- { "extdebug", &debugging_mode, shopt_set_debug_mode },
- #endif
- #if defined (EXTENDED_GLOB)
-- { "extglob", &extended_glob, (shopt_set_func_t *)NULL },
-+ { "extglob", &extglob_flag, shopt_set_extglob },
- #endif
- { "extquote", &extended_quote, (shopt_set_func_t *)NULL },
- { "failglob", &fail_glob_expansion, (shopt_set_func_t *)NULL },
-@@ -374,7 +379,7 @@ reset_shopt_options ()
- #endif
-
- #if defined (EXTENDED_GLOB)
-- extended_glob = EXTGLOB_DEFAULT;
-+ extended_glob = extglob_flag = EXTGLOB_DEFAULT;
- #endif
-
- #if defined (ARRAY_VARS)
-@@ -631,11 +636,24 @@ shopt_set_debug_mode (option_name, mode)
- return (0);
- }
-
-+#if defined (EXTENDED_GLOB)
-+static int
-+shopt_set_extglob (option_name, mode)
-+ char *option_name;
-+ int mode;
-+{
-+ extended_glob = extglob_flag;
-+ return 0;
-+}
-+#endif
-+
- #if defined (READLINE)
- static int
- shopt_enable_hostname_completion (option_name, mode)
- char *option_name;
- int mode;
-+
-+
- {
- return (enable_hostname_completion (mode));
- }
---- execute_cmd.c
-+++ execute_cmd.c
-@@ -3990,13 +3990,11 @@ execute_cond_node (cond)
- else
- #endif /* COND_REGEXP */
- {
-- int oe;
-- oe = extended_glob;
- extended_glob = 1;
- result = binary_test (cond->op->word, arg1, arg2, TEST_PATMATCH|TEST_ARITHEXP|TEST_LOCALE)
- ? EXECUTION_SUCCESS
- : EXECUTION_FAILURE;
-- extended_glob = oe;
-+ extended_glob = extglob_flag;
- }
- if (arg1 != nullstr)
- free (arg1);
---- parse.y
-+++ parse.y
-@@ -125,7 +125,7 @@ do { \
- } while (0)
-
- #if defined (EXTENDED_GLOB)
--extern int extended_glob;
-+extern int extended_glob, extglob_flag;
- #endif
-
- #if defined (TRANSLATABLE_STRINGS)
-@@ -312,8 +312,6 @@ static int token_before_that;
- /* The token read prior to token_before_that. */
- static int two_tokens_ago;
-
--static int global_extglob;
--
- /* The line number in a script where the word in a `case WORD', `select WORD'
- or `for WORD' begins. This is a nested command maximum, since the array
- index is decremented after a case, select, or for command is parsed. */
-@@ -3304,7 +3302,7 @@ reset_parser ()
- #if defined (EXTENDED_GLOB)
- /* Reset to global value of extended glob */
- if (parser_state & (PST_EXTPAT|PST_CMDSUBST))
-- extended_glob = global_extglob;
-+ extended_glob = extglob_flag;
- #endif
-
- parser_state = 0;
-@@ -4118,10 +4116,10 @@ parse_comsub (qc, open, close, lenp, flags)
- expand_aliases = posixly_correct != 0;
- #if defined (EXTENDED_GLOB)
- /* If (parser_state & PST_EXTPAT), we're parsing an extended pattern for a
-- conditional command and have already set global_extglob appropriately. */
-+ conditional command and have already set extended_glob appropriately. */
- if (shell_compatibility_level <= 51 && was_extpat == 0)
- {
-- local_extglob = global_extglob = extended_glob;
-+ local_extglob = extended_glob;
- extended_glob = 1;
- }
- #endif
-@@ -4229,7 +4227,7 @@ xparse_dolparen (base, string, indp, flags)
- {
- sh_parser_state_t ps;
- sh_input_line_state_t ls;
-- int orig_ind, nc, sflags, start_lineno;
-+ int orig_ind, nc, sflags, start_lineno, local_extglob;
- char *ret, *ep, *ostring;
-
- /*debug_parser(1);*/
-@@ -4272,7 +4270,7 @@ xparse_dolparen (base, string, indp, flags)
- old value will be restored by restore_parser_state(). */
- expand_aliases = 0;
- #if defined (EXTENDED_GLOB)
-- global_extglob = extended_glob; /* for reset_parser() */
-+ local_extglob = extended_glob;
- #endif
-
- token_to_read = DOLPAREN; /* let's trick the parser */
-@@ -4290,6 +4288,9 @@ xparse_dolparen (base, string, indp, flags)
- restore_input_line_state (&ls);
- restore_parser_state (&ps);
-
-+#if defined (EXTENDED_GLOB)
-+ extended_glob = local_extglob;
-+#endif
- token_to_read = 0;
-
- /* If parse_string returns < 0, we need to jump to top level with the
-@@ -4724,12 +4725,16 @@ cond_term ()
- }
-
- /* rhs */
-+#if defined (EXTENDED_GLOB)
- local_extglob = extended_glob;
- if (parser_state & PST_EXTPAT)
- extended_glob = 1;
-+#endif
- tok = read_token (READ);
-+#if defined (EXTENDED_GLOB)
- if (parser_state & PST_EXTPAT)
- extended_glob = local_extglob;
-+#endif
- parser_state &= ~(PST_REGEXP|PST_EXTPAT);
-
- if (tok == WORD)
-@@ -4776,7 +4781,6 @@ parse_cond_command ()
- {
- COND_COM *cexp;
-
-- global_extglob = extended_glob;
- cexp = cond_expr ();
- return (make_cond_command (cexp));
- }
---- patchlevel.h
-+++ patchlevel.h
-@@ -1,6 +1,6 @@
- /* patchlevel.h -- current bash patch level */
-
--/* Copyright (C) 2001-2021 Free Software Foundation, Inc.
-+/* Copyright (C) 2001-2022 Free Software Foundation, Inc.
-
- This file is part of GNU Bash, the Bourne Again SHell.
-
---- tests/extglob.right
-+++ tests/extglob.right
-@@ -182,3 +182,10 @@ no dotglob: .a .foo bar
- ? . .. .a .foo
- *
- bar
-+extglob off
-+x
-+extglob off
-+extglob off
-+extglob off
-+extglob off
-+extglob off
---- tests/extglob.tests
-+++ tests/extglob.tests
-@@ -386,5 +386,6 @@ ${THIS_SH} ./extglob4.sub
- ${THIS_SH} ./extglob5.sub
- ${THIS_SH} ./extglob6.sub
- ${THIS_SH} ./extglob7.sub
-+${THIS_SH} ./extglob8.sub
-
- exit 0
---- /dev/null
-+++ tests/extglob8.sub
-@@ -0,0 +1,33 @@
-+# This program is free software: you can redistribute it and/or modify
-+# it under the terms of the GNU General Public License as published by
-+# the Free Software Foundation, either version 3 of the License, or
-+# (at your option) any later version.
-+#
-+# This program is distributed in the hope that it will be useful,
-+# but WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+# GNU General Public License for more details.
-+#
-+# You should have received a copy of the GNU General Public License
-+# along with this program. If not, see <http://www.gnu.org/licenses/>.
-+#
-+# extglob option interaction with other parts of the shell that force
-+# extended_glob on; only an issue in compatibility mode
-+
-+shopt -u extglob
-+
-+BASH_COMPAT=50
-+shopt extglob
-+
-+echo $(echo $(echo $(echo $(echo $(echo x) ) ) ) )
-+shopt extglob
-+
-+shopt -u extglob
-+
-+[[ '' = $(shopt extglob >&2) ]]
-+shopt extglob
-+
-+shopt -u extglob
-+
-+[[ foo = $(: $(shopt extglob >&2)) ]]
-+shopt extglob
---- tests/run-extglob
-+++ tests/run-extglob
-@@ -1,4 +1,4 @@
- PATH=$PATH:`pwd`
- export PATH
--${THIS_SH} ./extglob.tests | grep -v '^expect' > ${BASH_TSTOUT}
-+${THIS_SH} ./extglob.tests 2>&1 | grep -v '^expect' > ${BASH_TSTOUT}
- diff ${BASH_TSTOUT} extglob.right && rm -f ${BASH_TSTOUT}
-