diff options
| author | Liu Yiding <liuyd.fnst@fujitsu.com> | 2025-08-27 11:05:16 +0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-08-28 10:47:09 +0100 |
| commit | 7001bdc3d7f197af5464a1709be7035bdf68807f (patch) | |
| tree | d7433338ab6607b0a81f3242d9651ecf83cb344b | |
| parent | d0403b973ff378ddbeeb54b6f4edaee5c08cfa08 (diff) | |
| download | poky-7001bdc3d7f197af5464a1709be7035bdf68807f.tar.gz | |
readline: backport a patch to fix issue that readline can't work with samba
smbclient can't accept input after readline upgrade to 8.3
| root # smbclient //192.168.2.16/test -N
| Try "help" to get a list of possible commands.
| smb: \>
similar issue has been reported:
https://lists.gnu.org/archive/html/bug-readline/2025-07/msg00011.html
(From OE-Core rev: e2478467b45ed2a80c32a7ee0a673555a3c98bf5)
Signed-off-by: Liu Yiding <liuyd.fnst@fujitsu.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-core/readline/readline/fix-for-readline-event-hook.patch | 55 | ||||
| -rw-r--r-- | meta/recipes-core/readline/readline_8.3.bb | 1 |
2 files changed, 56 insertions, 0 deletions
diff --git a/meta/recipes-core/readline/readline/fix-for-readline-event-hook.patch b/meta/recipes-core/readline/readline/fix-for-readline-event-hook.patch new file mode 100644 index 0000000000..f2ec506f5c --- /dev/null +++ b/meta/recipes-core/readline/readline/fix-for-readline-event-hook.patch | |||
| @@ -0,0 +1,55 @@ | |||
| 1 | From 15970c431517a046099d8294c91d778b1da9b29d Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Chet Ramey <chet.ramey@case.edu> | ||
| 3 | Date: Fri, 11 Jul 2025 11:51:15 -0400 | ||
| 4 | Subject: Readline-8.3 patch 1: fix for readline event hook | ||
| 5 | |||
| 6 | |||
| 7 | Upstream-Status: Backport [https://cgit.git.savannah.gnu.org/cgit/readline.git/commit/?id=15970c431517a046099d8294c91d778b1da9b29d] | ||
| 8 | Signed-off-by: Chet Ramey <chet.ramey@case.edu> | ||
| 9 | --- | ||
| 10 | input.c | 6 +++++- | ||
| 11 | patchlevel | 2 +- | ||
| 12 | 2 files changed, 6 insertions(+), 2 deletions(-) | ||
| 13 | |||
| 14 | diff --git a/input.c b/input.c | ||
| 15 | index e6a39e2..3383edb 100644 | ||
| 16 | --- a/input.c | ||
| 17 | +++ b/input.c | ||
| 18 | @@ -261,13 +261,16 @@ rl_gather_tyi (void) | ||
| 19 | input = 0; | ||
| 20 | tty = fileno (rl_instream); | ||
| 21 | |||
| 22 | - /* Move this up here to give it first shot, but it can't set chars_avail */ | ||
| 23 | + /* Move this up here to give it first shot, but it can't set chars_avail, | ||
| 24 | + so we assume a single character is available. */ | ||
| 25 | /* XXX - need rl_chars_available_hook? */ | ||
| 26 | if (rl_input_available_hook) | ||
| 27 | { | ||
| 28 | result = (*rl_input_available_hook) (); | ||
| 29 | if (result == 0) | ||
| 30 | result = -1; | ||
| 31 | + else | ||
| 32 | + chars_avail = 1; | ||
| 33 | } | ||
| 34 | |||
| 35 | #if defined (HAVE_PSELECT) || defined (HAVE_SELECT) | ||
| 36 | @@ -285,6 +288,7 @@ rl_gather_tyi (void) | ||
| 37 | #endif | ||
| 38 | if (result <= 0) | ||
| 39 | return 0; /* Nothing to read. */ | ||
| 40 | + result = -1; /* there is something, so check how many chars below */ | ||
| 41 | } | ||
| 42 | #endif | ||
| 43 | |||
| 44 | diff --git a/patchlevel b/patchlevel | ||
| 45 | index d8c9df7..fdf4740 100644 | ||
| 46 | --- a/patchlevel | ||
| 47 | +++ b/patchlevel | ||
| 48 | @@ -1,3 +1,3 @@ | ||
| 49 | # Do not edit -- exists only for use by patch | ||
| 50 | |||
| 51 | -0 | ||
| 52 | +1 | ||
| 53 | -- | ||
| 54 | cgit v1.2.3 | ||
| 55 | |||
diff --git a/meta/recipes-core/readline/readline_8.3.bb b/meta/recipes-core/readline/readline_8.3.bb index ff5dec6c0a..a2f23eb353 100644 --- a/meta/recipes-core/readline/readline_8.3.bb +++ b/meta/recipes-core/readline/readline_8.3.bb | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | require readline.inc | 1 | require readline.inc |
| 2 | 2 | ||
| 3 | SRC_URI += "file://norpath.patch \ | 3 | SRC_URI += "file://norpath.patch \ |
| 4 | file://fix-for-readline-event-hook.patch \ | ||
| 4 | " | 5 | " |
| 5 | 6 | ||
| 6 | SRC_URI[archive.sha256sum] = "fe5383204467828cd495ee8d1d3c037a7eba1389c22bc6a041f627976f9061cc" | 7 | SRC_URI[archive.sha256sum] = "fe5383204467828cd495ee8d1d3c037a7eba1389c22bc6a041f627976f9061cc" |
