summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2024-03-28 22:50:34 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-03-30 22:25:43 +0000
commit135c4f7b560073a1f9444ccc36402e0721b1dae1 (patch)
treeeec030089e66cfae765ff27f08ed9b347a974b70 /meta/recipes-core
parentd5d10db429917026b331279288bab9af31447316 (diff)
downloadpoky-135c4f7b560073a1f9444ccc36402e0721b1dae1.tar.gz
readline: Apply patches from readline-8.2-patches
These patches are submitted/backported to 8.2 release and address issues reported by different distros. (From OE-Core rev: c74048f5ff2e90b06c7a6d5866db4b94a6f1539d) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r--meta/recipes-core/readline/readline/readline82-001.patch45
-rw-r--r--meta/recipes-core/readline/readline/readline82-002.patch51
-rw-r--r--meta/recipes-core/readline/readline/readline82-003.patch46
-rw-r--r--meta/recipes-core/readline/readline/readline82-004.patch68
-rw-r--r--meta/recipes-core/readline/readline/readline82-005.patch53
-rw-r--r--meta/recipes-core/readline/readline/readline82-006.patch102
-rw-r--r--meta/recipes-core/readline/readline/readline82-007.patch51
-rw-r--r--meta/recipes-core/readline/readline/readline82-008.patch80
-rw-r--r--meta/recipes-core/readline/readline/readline82-009.patch76
-rw-r--r--meta/recipes-core/readline/readline/readline82-010.patch70
-rw-r--r--meta/recipes-core/readline/readline_8.2.bb12
11 files changed, 654 insertions, 0 deletions
diff --git a/meta/recipes-core/readline/readline/readline82-001.patch b/meta/recipes-core/readline/readline/readline82-001.patch
new file mode 100644
index 0000000000..4e9839db9c
--- /dev/null
+++ b/meta/recipes-core/readline/readline/readline82-001.patch
@@ -0,0 +1,45 @@
1 READLINE PATCH REPORT
2 =====================
3
4Readline-Release: 8.2
5Patch-ID: readline82-001
6
7Bug-Reported-by: Kan-Ru Chen <koster@debian.org>
8Bug-Reference-ID:
9Bug-Reference-URL: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1021109
10
11Bug-Description:
12
13Starting a readline application with an invalid locale specification for
14LC_ALL/LANG/LC_CTYPE can cause it crash on the first call to readline.
15
16Patch (apply with `patch -p0'):
17
18Upstream-Status: Submitted [https://ftp.gnu.org/gnu/readline/readline-8.2-patches/]
19Signed-off-by: Khem Raj <raj.khem@gmail.com>
20
21*** ../readline-8.2-patched/nls.c 2022-08-15 09:38:51.000000000 -0400
22--- nls.c 2022-10-05 09:23:22.000000000 -0400
23***************
24*** 142,145 ****
25--- 142,149 ----
26 lspec = "";
27 ret = setlocale (LC_CTYPE, lspec); /* ok, since it does not change locale */
28+ if (ret == 0 || *ret == 0)
29+ ret = setlocale (LC_CTYPE, (char *)NULL);
30+ if (ret == 0 || *ret == 0)
31+ ret = RL_DEFAULT_LOCALE;
32 #else
33 ret = (lspec == 0 || *lspec == 0) ? RL_DEFAULT_LOCALE : lspec;
34
35*** ../readline-8.2/patchlevel 2013-11-15 08:11:11.000000000 -0500
36--- patchlevel 2014-03-21 08:28:40.000000000 -0400
37***************
38*** 1,3 ****
39 # Do not edit -- exists only for use by patch
40
41! 0
42--- 1,3 ----
43 # Do not edit -- exists only for use by patch
44
45! 1
diff --git a/meta/recipes-core/readline/readline/readline82-002.patch b/meta/recipes-core/readline/readline/readline82-002.patch
new file mode 100644
index 0000000000..5629685dc1
--- /dev/null
+++ b/meta/recipes-core/readline/readline/readline82-002.patch
@@ -0,0 +1,51 @@
1 READLINE PATCH REPORT
2 =====================
3
4Readline-Release: 8.2
5Patch-ID: readline82-002
6
7Bug-Reported-by: srobertson@peratonlabs.com
8Bug-Reference-ID:
9Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2022-09/msg00049.html
10
11Bug-Description:
12
13It's possible for readline to try to zero out a line that's not null-
14terminated, leading to a memory fault.
15
16Patch (apply with `patch -p0'):
17
18Upstream-Status: Submitted [https://ftp.gnu.org/gnu/readline/readline-8.2-patches/]
19Signed-off-by: Khem Raj <raj.khem@gmail.com>
20
21*** ../readline-8.2-patched/display.c 2022-04-05 10:47:31.000000000 -0400
22--- display.c 2022-12-13 13:11:22.000000000 -0500
23***************
24*** 2684,2692 ****
25
26 if (visible_line)
27! {
28! temp = visible_line;
29! while (*temp)
30! *temp++ = '\0';
31! }
32 rl_on_new_line ();
33 forced_display++;
34--- 2735,2740 ----
35
36 if (visible_line)
37! memset (visible_line, 0, line_size);
38!
39 rl_on_new_line ();
40 forced_display++;
41*** ../readline-8.2/patchlevel 2013-11-15 08:11:11.000000000 -0500
42--- patchlevel 2014-03-21 08:28:40.000000000 -0400
43***************
44*** 1,3 ****
45 # Do not edit -- exists only for use by patch
46
47! 1
48--- 1,3 ----
49 # Do not edit -- exists only for use by patch
50
51! 2
diff --git a/meta/recipes-core/readline/readline/readline82-003.patch b/meta/recipes-core/readline/readline/readline82-003.patch
new file mode 100644
index 0000000000..61570bf4f4
--- /dev/null
+++ b/meta/recipes-core/readline/readline/readline82-003.patch
@@ -0,0 +1,46 @@
1 READLINE PATCH REPORT
2 =====================
3
4Readline-Release: 8.2
5Patch-ID: readline82-003
6
7Bug-Reported-by: Stefan Klinger <readline-gnu.org@stefan-klinger.de>
8Bug-Reference-ID:
9Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-readline/2023-08/msg00018.html
10
11Bug-Description:
12
13Patch (apply with `patch -p0'):
14
15The custom color prefix that readline uses to color possible completions
16must have a leading `.'.
17
18Upstream-Status: Submitted [https://ftp.gnu.org/gnu/readline/readline-8.2-patches/]
19Signed-off-by: Khem Raj <raj.khem@gmail.com>
20
21*** ../readline-8.2-patched/colors.c 2021-12-08 11:38:25.000000000 -0500
22--- colors.c 2023-08-28 16:40:04.000000000 -0400
23***************
24*** 74,78 ****
25 static void restore_default_color (void);
26
27! #define RL_COLOR_PREFIX_EXTENSION "readline-colored-completion-prefix"
28
29 COLOR_EXT_TYPE *_rl_color_ext_list = 0;
30--- 74,78 ----
31 static void restore_default_color (void);
32
33! #define RL_COLOR_PREFIX_EXTENSION ".readline-colored-completion-prefix"
34
35 COLOR_EXT_TYPE *_rl_color_ext_list = 0;
36*** ../readline-8.2/patchlevel 2013-11-15 08:11:11.000000000 -0500
37--- patchlevel 2014-03-21 08:28:40.000000000 -0400
38***************
39*** 1,3 ****
40 # Do not edit -- exists only for use by patch
41
42! 2
43--- 1,3 ----
44 # Do not edit -- exists only for use by patch
45
46! 3
diff --git a/meta/recipes-core/readline/readline/readline82-004.patch b/meta/recipes-core/readline/readline/readline82-004.patch
new file mode 100644
index 0000000000..cedc3d0fe4
--- /dev/null
+++ b/meta/recipes-core/readline/readline/readline82-004.patch
@@ -0,0 +1,68 @@
1 READLINE PATCH REPORT
2 =====================
3
4Readline-Release: 8.2
5Patch-ID: readline82-004
6
7Bug-Reported-by: Henry Bent <henry.r.bent@gmail.com>
8Bug-Reference-ID:
9Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2022-11/msg00044.html
10
11Bug-Description:
12
13Patch (apply with `patch -p0'):
14
15There are systems that supply one of select or pselect, but not both.
16
17Upstream-Status: Submitted [https://ftp.gnu.org/gnu/readline/readline-8.2-patches/]
18Signed-off-by: Khem Raj <raj.khem@gmail.com>
19
20*** ../readline-8.2-patched/input.c 2022-04-08 15:43:24.000000000 -0400
21--- input.c 2022-11-28 09:41:08.000000000 -0500
22***************
23*** 152,156 ****
24--- 152,158 ----
25 int _rl_timeout_init (void);
26 int _rl_timeout_sigalrm_handler (void);
27+ #if defined (RL_TIMEOUT_USE_SELECT)
28 int _rl_timeout_select (int, fd_set *, fd_set *, fd_set *, const struct timeval *, const sigset_t *);
29+ #endif
30
31 static void _rl_timeout_handle (void);
32***************
33*** 249,253 ****
34 int chars_avail, k;
35 char input;
36! #if defined(HAVE_SELECT)
37 fd_set readfds, exceptfds;
38 struct timeval timeout;
39--- 251,255 ----
40 int chars_avail, k;
41 char input;
42! #if defined (HAVE_PSELECT) || defined (HAVE_SELECT)
43 fd_set readfds, exceptfds;
44 struct timeval timeout;
45***************
46*** 806,810 ****
47 unsigned char c;
48 int fd;
49! #if defined (HAVE_PSELECT)
50 sigset_t empty_set;
51 fd_set readfds;
52--- 815,819 ----
53 unsigned char c;
54 int fd;
55! #if defined (HAVE_PSELECT) || defined (HAVE_SELECT)
56 sigset_t empty_set;
57 fd_set readfds;
58*** ../readline-8.2/patchlevel 2013-11-15 08:11:11.000000000 -0500
59--- patchlevel 2014-03-21 08:28:40.000000000 -0400
60***************
61*** 1,3 ****
62 # Do not edit -- exists only for use by patch
63
64! 3
65--- 1,3 ----
66 # Do not edit -- exists only for use by patch
67
68! 4
diff --git a/meta/recipes-core/readline/readline/readline82-005.patch b/meta/recipes-core/readline/readline/readline82-005.patch
new file mode 100644
index 0000000000..69c2e4f77a
--- /dev/null
+++ b/meta/recipes-core/readline/readline/readline82-005.patch
@@ -0,0 +1,53 @@
1 READLINE PATCH REPORT
2 =====================
3
4Readline-Release: 8.2
5Patch-ID: readline82-005
6
7Bug-Reported-by: Simon Marchi <simon.marchi@polymtl.ca>
8Bug-Reference-ID:
9Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-readline/2022-09/msg00005.html
10
11Bug-Description:
12
13If an application is using readline in callback mode, and a signal arrives
14after readline checks for it in rl_callback_read_char() but before it
15restores the application's signal handlers, it won't get processed until the
16next time the application calls rl_callback_read_char(). Readline needs to
17check for and resend any pending signals after restoring the application's
18signal handlers.
19
20Patch (apply with `patch -p0'):
21
22Upstream-Status: Submitted [https://ftp.gnu.org/gnu/readline/readline-8.2-patches/]
23Signed-off-by: Khem Raj <raj.khem@gmail.com>
24
25*** ../readline-8.2-patched/callback.c 2022-04-29 12:02:56.000000000 -0400
26--- callback.c 2022-10-11 10:59:06.000000000 -0400
27***************
28*** 116,120 ****
29 do { \
30 if (rl_persistent_signal_handlers == 0) \
31! rl_clear_signals (); \
32 return; \
33 } while (0)
34--- 116,123 ----
35 do { \
36 if (rl_persistent_signal_handlers == 0) \
37! { \
38! rl_clear_signals (); \
39! if (_rl_caught_signal) _rl_signal_handler (_rl_caught_signal); \
40! } \
41 return; \
42 } while (0)
43*** ../readline-8.2/patchlevel 2013-11-15 08:11:11.000000000 -0500
44--- patchlevel 2014-03-21 08:28:40.000000000 -0400
45***************
46*** 1,3 ****
47 # Do not edit -- exists only for use by patch
48
49! 4
50--- 1,3 ----
51 # Do not edit -- exists only for use by patch
52
53! 5
diff --git a/meta/recipes-core/readline/readline/readline82-006.patch b/meta/recipes-core/readline/readline/readline82-006.patch
new file mode 100644
index 0000000000..d66afe82c9
--- /dev/null
+++ b/meta/recipes-core/readline/readline/readline82-006.patch
@@ -0,0 +1,102 @@
1 READLINE PATCH REPORT
2 =====================
3
4Readline-Release: 8.2
5Patch-ID: readline82-006
6
7Bug-Reported-by: Tom de Vries <tdevries@suse.de>
8Bug-Reference-ID:
9Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-readline/2022-09/msg00001.html
10
11Bug-Description:
12
13This is a variant of the same issue as the one fixed by patch 5. In this
14case, the signal arrives and is pending before readline calls rl_getc().
15When this happens, the pending signal will be handled by the loop, but may
16alter or destroy some state that the callback uses. Readline needs to treat
17this case the same way it would if a signal interrupts pselect/select, so
18compound operations like searches and reading numeric arguments get cleaned
19up properly.
20
21Patch (apply with `patch -p0'):
22
23Upstream-Status: Submitted [https://ftp.gnu.org/gnu/readline/readline-8.2-patches/]
24Signed-off-by: Khem Raj <raj.khem@gmail.com>
25
26*** ../readline-8.2-patched/input.c 2022-12-22 16:15:48.000000000 -0500
27--- input.c 2023-01-10 11:53:45.000000000 -0500
28***************
29*** 812,816 ****
30 rl_getc (FILE *stream)
31 {
32! int result;
33 unsigned char c;
34 int fd;
35--- 812,816 ----
36 rl_getc (FILE *stream)
37 {
38! int result, ostate, osig;
39 unsigned char c;
40 int fd;
41***************
42*** 823,828 ****
43--- 823,842 ----
44 while (1)
45 {
46+ osig = _rl_caught_signal;
47+ ostate = rl_readline_state;
48+
49 RL_CHECK_SIGNALS ();
50
51+ #if defined (READLINE_CALLBACKS)
52+ /* Do signal handling post-processing here, but just in callback mode
53+ for right now because the signal cleanup can change some of the
54+ callback state, and we need to either let the application have a
55+ chance to react or abort some current operation that gets cleaned
56+ up by rl_callback_sigcleanup(). If not, we'll just run through the
57+ loop again. */
58+ if (osig != 0 && (ostate & RL_STATE_CALLBACK))
59+ goto postproc_signal;
60+ #endif
61+
62 /* We know at this point that _rl_caught_signal == 0 */
63
64***************
65*** 888,891 ****
66--- 902,908 ----
67
68 handle_error:
69+ osig = _rl_caught_signal;
70+ ostate = rl_readline_state;
71+
72 /* If the error that we received was EINTR, then try again,
73 this is simply an interrupted system call to read (). We allow
74***************
75*** 928,933 ****
76--- 945,959 ----
77 #endif /* SIGALRM */
78
79+ postproc_signal:
80+ /* POSIX says read(2)/pselect(2)/select(2) don't return EINTR for any
81+ reason other than being interrupted by a signal, so we can safely
82+ call the application's signal event hook. */
83 if (rl_signal_event_hook)
84 (*rl_signal_event_hook) ();
85+ #if defined (READLINE_CALLBACKS)
86+ else if (osig == SIGINT && (ostate & RL_STATE_CALLBACK) && (ostate & (RL_STATE_ISEARCH|RL_STATE_NSEARCH|RL_STATE_NUMERICARG)))
87+ /* just these cases for now */
88+ _rl_abort_internal ();
89+ #endif
90 }
91 }
92*** ../readline-8.2/patchlevel 2013-11-15 08:11:11.000000000 -0500
93--- patchlevel 2014-03-21 08:28:40.000000000 -0400
94***************
95*** 1,3 ****
96 # Do not edit -- exists only for use by patch
97
98! 5
99--- 1,3 ----
100 # Do not edit -- exists only for use by patch
101
102! 6
diff --git a/meta/recipes-core/readline/readline/readline82-007.patch b/meta/recipes-core/readline/readline/readline82-007.patch
new file mode 100644
index 0000000000..9fa1ccb552
--- /dev/null
+++ b/meta/recipes-core/readline/readline/readline82-007.patch
@@ -0,0 +1,51 @@
1 READLINE PATCH REPORT
2 =====================
3
4Readline-Release: 8.2
5Patch-ID: readline82-007
6
7Bug-Reported-by: Kevin Pulo <kev@pulo.com.au>
8Bug-Reference-ID:
9Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-readline/2022-11/msg00002.html
10
11Bug-Description:
12
13If readline is called with no prompt, it should display a newline if return
14is typed on an empty line. It should still suppress the final newline if
15return is typed on the last (empty) line of a multi-line command.
16
17Patch (apply with `patch -p0'):
18
19Upstream-Status: Submitted [https://ftp.gnu.org/gnu/readline/readline-8.2-patches/]
20Signed-off-by: Khem Raj <raj.khem@gmail.com>
21
22*** ../readline-8.2-patched/display.c 2022-04-05 10:47:31.000000000 -0400
23--- display.c 2022-12-13 13:11:22.000000000 -0500
24***************
25*** 3342,3348 ****
26 &last_face[_rl_screenwidth - 1 + woff], 1);
27 }
28! _rl_vis_botlin = 0;
29! if (botline_length > 0 || _rl_last_c_pos > 0)
30 rl_crlf ();
31 fflush (rl_outstream);
32 rl_display_fixed++;
33--- 3394,3400 ----
34 &last_face[_rl_screenwidth - 1 + woff], 1);
35 }
36! if ((_rl_vis_botlin == 0 && botline_length == 0) || botline_length > 0 || _rl_last_c_pos > 0)
37 rl_crlf ();
38+ _rl_vis_botlin = 0;
39 fflush (rl_outstream);
40 rl_display_fixed++;
41*** ../readline-8.2/patchlevel 2013-11-15 08:11:11.000000000 -0500
42--- patchlevel 2014-03-21 08:28:40.000000000 -0400
43***************
44*** 1,3 ****
45 # Do not edit -- exists only for use by patch
46
47! 6
48--- 1,3 ----
49 # Do not edit -- exists only for use by patch
50
51! 7
diff --git a/meta/recipes-core/readline/readline/readline82-008.patch b/meta/recipes-core/readline/readline/readline82-008.patch
new file mode 100644
index 0000000000..660cb1e00b
--- /dev/null
+++ b/meta/recipes-core/readline/readline/readline82-008.patch
@@ -0,0 +1,80 @@
1 READLINE PATCH REPORT
2 =====================
3
4Readline-Release: 8.2
5Patch-ID: readline82-008
6
7Bug-Reported-by:
8Bug-Reference-ID:
9Bug-Reference-URL:
10
11Bug-Description:
12
13Add missing prototypes for several function declarations.
14
15Patch (apply with `patch -p0'):
16
17Upstream-Status: Submitted [https://ftp.gnu.org/gnu/readline/readline-8.2-patches/]
18Signed-off-by: Khem Raj <raj.khem@gmail.com>
19
20*** ../readline-8.2-patched/text.c Wed Oct 27 11:03:59 2021
21--- text.c Thu Nov 16 16:24:58 2023
22***************
23*** 1765,1770 ****
24 #if defined (READLINE_CALLBACKS)
25 static int
26! _rl_char_search_callback (data)
27! _rl_callback_generic_arg *data;
28 {
29 _rl_callback_func = 0;
30--- 1765,1769 ----
31 #if defined (READLINE_CALLBACKS)
32 static int
33! _rl_char_search_callback (_rl_callback_generic_arg *data)
34 {
35 _rl_callback_func = 0;
36*** ../readline-8.2-patched/bind.c Wed Feb 9 11:02:22 2022
37--- bind.c Thu Nov 16 16:25:17 2023
38***************
39*** 1168,1174 ****
40
41 static int
42! parse_comparison_op (s, indp)
43! const char *s;
44! int *indp;
45 {
46 int i, peekc, op;
47--- 1168,1172 ----
48
49 static int
50! parse_comparison_op (const char *s, int *indp)
51 {
52 int i, peekc, op;
53*** ../readline-8.2-patched/rltty.c Fri Feb 18 11:14:22 2022
54--- rltty.c Thu Nov 16 16:25:36 2023
55***************
56*** 81,86 ****
57 to get the tty settings. */
58 static void
59! set_winsize (tty)
60! int tty;
61 {
62 #if defined (TIOCGWINSZ)
63--- 81,85 ----
64 to get the tty settings. */
65 static void
66! set_winsize (int tty)
67 {
68 #if defined (TIOCGWINSZ)
69
70*** ../readline-8.2/patchlevel 2013-11-15 08:11:11.000000000 -0500
71--- patchlevel 2014-03-21 08:28:40.000000000 -0400
72***************
73*** 1,3 ****
74 # Do not edit -- exists only for use by patch
75
76! 7
77--- 1,3 ----
78 # Do not edit -- exists only for use by patch
79
80! 8
diff --git a/meta/recipes-core/readline/readline/readline82-009.patch b/meta/recipes-core/readline/readline/readline82-009.patch
new file mode 100644
index 0000000000..1fcf7b3535
--- /dev/null
+++ b/meta/recipes-core/readline/readline/readline82-009.patch
@@ -0,0 +1,76 @@
1 READLINE PATCH REPORT
2 =====================
3
4Readline-Release: 8.2
5Patch-ID: readline82-009
6
7Bug-Reported-by: Stefan H. Holek <stefan@epy.co.at>
8Bug-Reference-ID: <50F8DA45-B7F3-4DE1-AB94-19AE42649CDC@epy.co.at>
9Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-readline/2022-10/msg00021.html
10
11Bug-Description:
12
13Fix issue where the directory name portion of the word to be completed (the
14part that is passed to opendir()) requires both tilde expansion and dequoting.
15Readline only performed tilde expansion in this case, so filename completion
16would fail.
17
18Patch (apply with `patch -p0'):
19
20Upstream-Status: Submitted [https://ftp.gnu.org/gnu/readline/readline-8.2-patches/]
21Signed-off-by: Khem Raj <raj.khem@gmail.com>
22
23*** ../readline-8.2-patched/complete.c 2022-04-05 10:47:06.000000000 -0400
24--- complete.c 2022-10-26 15:08:51.000000000 -0400
25***************
26*** 2527,2531 ****
27 xfree (dirname);
28 dirname = temp;
29! tilde_dirname = 1;
30 }
31
32--- 2527,2532 ----
33 xfree (dirname);
34 dirname = temp;
35! if (*dirname != '~')
36! tilde_dirname = 1; /* indicate successful tilde expansion */
37 }
38
39***************
40*** 2546,2554 ****
41 users_dirname = savestring (dirname);
42 }
43! else if (tilde_dirname == 0 && rl_completion_found_quote && rl_filename_dequoting_function)
44 {
45! /* delete single and double quotes */
46 xfree (dirname);
47! dirname = savestring (users_dirname);
48 }
49 directory = opendir (dirname);
50--- 2547,2560 ----
51 users_dirname = savestring (dirname);
52 }
53! else if (rl_completion_found_quote && rl_filename_dequoting_function)
54 {
55! /* We already ran users_dirname through the dequoting function.
56! If tilde_dirname == 1, we successfully performed tilde expansion
57! on dirname. Now we need to reconcile those results. We either
58! just copy the already-dequoted users_dirname or tilde expand it
59! if we tilde-expanded dirname. */
60! temp = tilde_dirname ? tilde_expand (users_dirname) : savestring (users_dirname);
61 xfree (dirname);
62! dirname = temp;
63 }
64 directory = opendir (dirname);
65
66*** ../readline-8.2/patchlevel 2013-11-15 08:11:11.000000000 -0500
67--- patchlevel 2014-03-21 08:28:40.000000000 -0400
68***************
69*** 1,3 ****
70 # Do not edit -- exists only for use by patch
71
72! 8
73--- 1,3 ----
74 # Do not edit -- exists only for use by patch
75
76! 9
diff --git a/meta/recipes-core/readline/readline/readline82-010.patch b/meta/recipes-core/readline/readline/readline82-010.patch
new file mode 100644
index 0000000000..6152953e91
--- /dev/null
+++ b/meta/recipes-core/readline/readline/readline82-010.patch
@@ -0,0 +1,70 @@
1 READLINE PATCH REPORT
2 =====================
3
4Readline-Release: 8.2
5Patch-ID: readline82-010
6
7Bug-Reported-by: Martin Castillo <castilma@uni-bremen.de>
8Bug-Reference-ID: <2d42153b-cf65-caba-dff1-cd3bc6268c7e@uni-bremen.de>
9Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-readline/2023-01/msg00000.html
10
11Bug-Description:
12
13Fix the case where text to be completed from the line buffer (quoted) is
14compared to the common prefix of the possible matches (unquoted) and the
15quoting makes the former appear to be longer than the latter. Readline
16assumes the match doesn't add any characters to the word and doesn't display
17multiple matches.
18
19Patch (apply with `patch -p0'):
20
21Upstream-Status: Submitted [https://ftp.gnu.org/gnu/readline/readline-8.2-patches/]
22Signed-off-by: Khem Raj <raj.khem@gmail.com>
23
24*** ../readline-8.2-patched/complete.c Tue Apr 5 10:47:06 2022
25--- complete.c Sat Jan 7 14:19:45 2023
26***************
27*** 2032,2038 ****
28 text = rl_copy_text (start, end);
29 matches = gen_completion_matches (text, start, end, our_func, found_quote, quote_char);
30 /* nontrivial_lcd is set if the common prefix adds something to the word
31 being completed. */
32! nontrivial_lcd = matches && compare_match (text, matches[0]) != 0;
33 if (what_to_do == '!' || what_to_do == '@')
34 tlen = strlen (text);
35--- 2038,2060 ----
36 text = rl_copy_text (start, end);
37 matches = gen_completion_matches (text, start, end, our_func, found_quote, quote_char);
38+ /* If TEXT contains quote characters, it will be dequoted as part of
39+ generating the matches, and the matches will not contain any quote
40+ characters. We need to dequote TEXT before performing the comparison.
41+ Since compare_match performs the dequoting, and we only want to do it
42+ once, we don't call compare_matches after dequoting TEXT; we call
43+ strcmp directly. */
44 /* nontrivial_lcd is set if the common prefix adds something to the word
45 being completed. */
46! if (rl_filename_completion_desired && rl_filename_quoting_desired &&
47! rl_completion_found_quote && rl_filename_dequoting_function)
48! {
49! char *t;
50! t = (*rl_filename_dequoting_function) (text, rl_completion_quote_character);
51! xfree (text);
52! text = t;
53! nontrivial_lcd = matches && strcmp (text, matches[0]) != 0;
54! }
55! else
56! nontrivial_lcd = matches && strcmp (text, matches[0]) != 0;
57 if (what_to_do == '!' || what_to_do == '@')
58 tlen = strlen (text);
59
60*** ../readline-8.2/patchlevel 2013-11-15 08:11:11.000000000 -0500
61--- patchlevel 2014-03-21 08:28:40.000000000 -0400
62***************
63*** 1,3 ****
64 # Do not edit -- exists only for use by patch
65
66! 9
67--- 1,3 ----
68 # Do not edit -- exists only for use by patch
69
70! 10
diff --git a/meta/recipes-core/readline/readline_8.2.bb b/meta/recipes-core/readline/readline_8.2.bb
index 3a47297fe1..f0dba31251 100644
--- a/meta/recipes-core/readline/readline_8.2.bb
+++ b/meta/recipes-core/readline/readline_8.2.bb
@@ -2,4 +2,16 @@ require readline.inc
2 2
3SRC_URI += " file://norpath.patch" 3SRC_URI += " file://norpath.patch"
4 4
5SRC_URI += "file://readline82-001.patch;striplevel=0 \
6 file://readline82-002.patch;striplevel=0 \
7 file://readline82-003.patch;striplevel=0 \
8 file://readline82-004.patch;striplevel=0 \
9 file://readline82-005.patch;striplevel=0 \
10 file://readline82-006.patch;striplevel=0 \
11 file://readline82-007.patch;striplevel=0 \
12 file://readline82-008.patch;striplevel=0 \
13 file://readline82-009.patch;striplevel=0 \
14 file://readline82-010.patch;striplevel=0 \
15 "
16
5SRC_URI[archive.sha256sum] = "3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35" 17SRC_URI[archive.sha256sum] = "3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35"