commit: ab0259bdf5fd1c77ca72f7723e73d43d6820aa0f
Author: Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Wed May 7 14:29:28 2025 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed May 7 14:51:02 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ab0259bd
app-shells/bash: add 5.2_p37-r3 to rectify the misapplication of a backported
fix
While backporting commit e327891b52513bef0b34aac625c44f8fa6811f53 from
the devel branch, I accidentally left in a line that should have been
removed, resulting in bash occasionally segfaulting while using the -e
option of the read builtin. Address that mistake.
Additionally, correct a typo in the commit message of one of the other
patches ("incoprorate" > "incorporate").
Fixes: 0193ee11e3aa99775c546ac63346ec05c01a51f7
Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>
Signed-off-by: Sam James <sam <AT> gentoo.org>
...{bash-5.2_p37-r2.ebuild => bash-5.2_p37-r3.ebuild} | 0
...2_p32-erroneous-delimiter-pushback-condition.patch | 6 +++---
...lid-continuation-byte-ignored-as-delimiter-2.patch | 19 ++++++++++---------
3 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/app-shells/bash/bash-5.2_p37-r2.ebuild
b/app-shells/bash/bash-5.2_p37-r3.ebuild
similarity index 100%
rename from app-shells/bash/bash-5.2_p37-r2.ebuild
rename to app-shells/bash/bash-5.2_p37-r3.ebuild
diff --git
a/app-shells/bash/files/bash-5.2_p32-erroneous-delimiter-pushback-condition.patch
b/app-shells/bash/files/bash-5.2_p32-erroneous-delimiter-pushback-condition.patch
index 6e8000952644..e997c37cff15 100644
---
a/app-shells/bash/files/bash-5.2_p32-erroneous-delimiter-pushback-condition.patch
+++
b/app-shells/bash/files/bash-5.2_p32-erroneous-delimiter-pushback-condition.patch
@@ -1,4 +1,4 @@
-From 57fbf1c67f2d89365601f39e72781fba001fe2f3 Mon Sep 17 00:00:00 2001
+From 01463f6ae5a58b7309769596714e76b0d265b622 Mon Sep 17 00:00:00 2001
From: Kerin Millar <[email protected]>
Date: Mon, 28 Apr 2025 08:13:38 +0100
Subject: [PATCH 3/3] Backport fix for erroneous delimiter pushback condition
@@ -23,7 +23,7 @@ $'\315'
''
''
-With the upcoming 5.3-rc2, which will incoprorate this patch, all three
+With the upcoming 5.3-rc2, which will incorporate this patch, all three
records are read correctly.
<FOO>
@@ -47,7 +47,7 @@ Signed-off-by: Kerin Millar <[email protected]>
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git builtins/read.def builtins/read.def
-index 9fd9a74c..8000def3 100644
+index 48351c3c..70a3508b 100644
--- builtins/read.def
+++ builtins/read.def
@@ -1102,14 +1102,14 @@ read_mbchar (fd, string, ind, ch, delim, unbuffered)
diff --git
a/app-shells/bash/files/bash-5.2_p32-invalid-continuation-byte-ignored-as-delimiter-2.patch
b/app-shells/bash/files/bash-5.2_p32-invalid-continuation-byte-ignored-as-delimiter-2.patch
index ff6fdf25414b..ea27d3b3d194 100644
---
a/app-shells/bash/files/bash-5.2_p32-invalid-continuation-byte-ignored-as-delimiter-2.patch
+++
b/app-shells/bash/files/bash-5.2_p32-invalid-continuation-byte-ignored-as-delimiter-2.patch
@@ -1,4 +1,4 @@
-From fb31e1965baa732f9e4cdbe3a7d6691d7beb4e03 Mon Sep 17 00:00:00 2001
+From c87aca06c259b6283a499584d95c87f163accba0 Mon Sep 17 00:00:00 2001
From: Kerin Millar <[email protected]>
Date: Mon, 28 Apr 2025 07:59:25 +0100
Subject: [PATCH 2/3] Backport fix for invalid continuation bytes above 0x7F
@@ -26,11 +26,11 @@ Link:
https://mywiki.wooledge.org/BashPitfalls#IFS.3D_read_-r_-d_.27.27_filename
Link: https://lists.gnu.org/r/bug-bash/2024-08/msg00100.html
Signed-off-by: Kerin Millar <[email protected]>
---
- builtins/read.def | 40 +++++++++++++++++++++++-----------------
- 1 file changed, 23 insertions(+), 17 deletions(-)
+ builtins/read.def | 41 +++++++++++++++++++++++------------------
+ 1 file changed, 23 insertions(+), 18 deletions(-)
diff --git builtins/read.def builtins/read.def
-index 53b4bd81..9fd9a74c 100644
+index 53b4bd81..48351c3c 100644
--- builtins/read.def
+++ builtins/read.def
@@ -142,7 +142,7 @@ sh_timer *read_timeout;
@@ -80,16 +80,17 @@ index 53b4bd81..9fd9a74c 100644
mbchar[--i] = '\0'; /* unget the delimiter */
}
break; /* invalid multibyte character */
-@@ -1220,6 +1219,8 @@ edit_line (p, itext)
+@@ -1219,7 +1218,8 @@ edit_line (p, itext)
+
len = strlen (ret);
ret = (char *)xrealloc (ret, len + 2);
- ret[len++] = delim;
+- ret[len++] = delim;
+ if (delim > 0)
+ ret[len++] = delim;
ret[len] = '\0';
return ret;
}
-@@ -1240,7 +1241,7 @@ static rl_command_func_t *old_delim_func;
+@@ -1240,7 +1240,7 @@ static rl_command_func_t *old_delim_func;
static int old_newline_ctype;
static rl_command_func_t *old_newline_func;
@@ -98,7 +99,7 @@ index 53b4bd81..9fd9a74c 100644
static void
set_eol_delim (c)
-@@ -1252,19 +1253,21 @@ set_eol_delim (c)
+@@ -1252,19 +1252,21 @@ set_eol_delim (c)
initialize_readline ();
cmap = rl_get_keymap ();
@@ -128,7 +129,7 @@ index 53b4bd81..9fd9a74c 100644
delim_char = c;
}
-@@ -1280,7 +1283,10 @@ reset_eol_delim (cp)
+@@ -1280,7 +1282,10 @@ reset_eol_delim (cp)
cmap[RETURN].type = old_newline_ctype;
cmap[RETURN].function = old_newline_func;