From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 09072158096 for ; Sat, 8 Oct 2022 22:08:26 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D830BE0839; Sat, 8 Oct 2022 22:08:24 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C28EDE0839 for ; Sat, 8 Oct 2022 22:08:24 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E28383410E2 for ; Sat, 8 Oct 2022 22:08:23 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7D69A607 for ; Sat, 8 Oct 2022 22:08:22 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1665266893.f311a77983e608c3218f492ece715bced27f77a0.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-shells/bash/, app-shells/bash/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-shells/bash/bash-5.2_p2-r2.ebuild app-shells/bash/files/bash-5.2_p2-fix-for-brackets-in-nested-parameter-expansions.patch app-shells/bash/files/bash-5.2_p2-fixes-for-extglob-in-compat-mode.patch X-VCS-Directories: app-shells/bash/files/ app-shells/bash/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: f311a77983e608c3218f492ece715bced27f77a0 X-VCS-Branch: master Date: Sat, 8 Oct 2022 22:08:22 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: eed4a49d-4cf0-4094-b7be-c61220822ec0 X-Archives-Hash: d620e1964a8db86cabfbca550fb4523d commit: f311a77983e608c3218f492ece715bced27f77a0 Author: Sam James gentoo org> AuthorDate: Sat Oct 8 22:07:20 2022 +0000 Commit: Sam James gentoo org> CommitDate: Sat Oct 8 22:08:13 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f311a779 app-shells/bash: reorganise 5.2_p2-r2 patches Just splits the patches from 47950445cddff736a1e6c0c1346a20ab6b326cc1 into two. Closes: https://bugs.gentoo.org/873931 See: 47950445cddff736a1e6c0c1346a20ab6b326cc1 Thanks-to: Kerin Millar plushkava.net> Signed-off-by: Sam James gentoo.org> app-shells/bash/bash-5.2_p2-r2.ebuild | 3 +- ...r-brackets-in-nested-parameter-expansions.patch | 41 ++++++++++++++++++++++ ...h-5.2_p2-fixes-for-extglob-in-compat-mode.patch | 38 -------------------- 3 files changed, 43 insertions(+), 39 deletions(-) diff --git a/app-shells/bash/bash-5.2_p2-r2.ebuild b/app-shells/bash/bash-5.2_p2-r2.ebuild index 897cf5324a38..c79b71ca70ef 100644 --- a/app-shells/bash/bash-5.2_p2-r2.ebuild +++ b/app-shells/bash/bash-5.2_p2-r2.ebuild @@ -108,7 +108,8 @@ PATCHES=( # Patches from Chet sent to bash-bug ml "${FILESDIR}"/${PN}-5.0-syslog-history-extern.patch - "${FILESDIR}"/${PN}-5.2_p2-fixes-for-extglob-in-compat-mode.patch + "${FILESDIR}"/${P}-fix-for-brackets-in-nested-parameter-expansions.patch + "${FILESDIR}"/${P}-fixes-for-extglob-in-compat-mode.patch ) pkg_setup() { 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 new file mode 100644 index 000000000000..9c1b03f8b2df --- /dev/null +++ b/app-shells/bash/files/bash-5.2_p2-fix-for-brackets-in-nested-parameter-expansions.patch @@ -0,0 +1,41 @@ +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 index 06415b5cdaa4..16393c79af8b 100644 --- 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 @@ -213,44 +213,6 @@ https://git.savannah.gnu.org/cgit/bash.git/commit/?h=devel&id=22f21b760ed90eb77c This file is part of GNU Bash, the Bourne Again SHell. ---- 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; - } --- tests/extglob.right +++ tests/extglob.right @@ -182,3 +182,10 @@ no dotglob: .a .foo bar