From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4bnNmy71QSz34BB for ; Wed, 23 Jul 2025 19:02:42 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature RSA-PSS (4096 bits)) (Client CN "mail01.haj.ipfire.org", Issuer "R11" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4bnNmv341Dz34BZ for ; Wed, 23 Jul 2025 19:02:39 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (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 mail01.ipfire.org (Postfix) with ESMTPSA id 4bnNmt4vyBz372; Wed, 23 Jul 2025 19:02:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1753297358; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JlcNB3Eq7TRJyZY8k0UhMTEsKw7qDeATyEEycx3Uy1I=; b=odr1Q0Xxaa4OFVu6FOnpNlUOs35+k5wtlRtYXJU54rns5z8lUZDWDP+qxyb5c6GjI1rTby n4myxgnBQjzGR+N7iJE9tIauD8ccOCwQp3GX3WUUWqKara5Hz5rZeeeytlI7zyrsLMI6Pt DXEbQ/6GGZT7jT+LFNUOy9fBmBoGm3lyRTBB5aqRI0qb1HmrGa9uFcqYKRzC+y2nHNpeht TDNQJXB9B0bdR12ze4c80W/tbCwUYnbufQWrTjL7lTCz+qFl8pMhbkiI55Sg5q9/1AplWx eT6R1x3afgJ0hFmzDlr/mjWqjuWd48JBzHd+4F1MHZiD2+Pva9Ah1I58Fbwngg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1753297358; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JlcNB3Eq7TRJyZY8k0UhMTEsKw7qDeATyEEycx3Uy1I=; b=wBpRfrqNGGg4wOi9hue8xHoo/5VTOTIRPhbx7HLYfIy4aBdp6lxo0S/1MsiKqvNIjbcxcq hJiQcNi9qdWvuOBg== From: Adolf Belka To: development@lists.ipfire.org Cc: Adolf Belka Subject: [PATCH 2/2] readline: Update to version 8.3 with patch version 1 Date: Wed, 23 Jul 2025 21:02:31 +0200 Message-ID: <20250723190234.3127937-2-adolf.belka@ipfire.org> In-Reply-To: <20250723190234.3127937-1-adolf.belka@ipfire.org> References: <20250723190234.3127937-1-adolf.belka@ipfire.org> Precedence: list List-Id: List-Subscribe: , List-Unsubscribe: , List-Post: List-Help: Sender: Mail-Followup-To: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit - Update from version 8.2 with patch version 13 to 8.3 with patch version 1 - Update of rootfile - Changelog 8.3 New Features in Readline a. Output a newline if there is no prompt and readline reads an empty line. b. The history library falls back to stdio when writing the history list if mmap fails. c. New bindable variable `search-ignore-case', causes readline to perform case-insensitive incremental and non-incremental history searches. d. rl_full_quoting_desired: new application-settable variable, causes all completions to be quoted as if they were filenames. e. rl_macro_display_hook: new application-settable function pointer, used if the application wants to print macro values itself instead of letting readline do it f. rl_reparse_colors: new application-callable function, reparses $LS_COLORS (presumably after the user changes it) g. rl_completion_rewrite_hook: new application-settable function pointer, called to modify the word being completed before comparing it against pathnames from the file system. h. execute-named-command: a new bindable command that reads the name of a readline command from the standard input and executes it. Bound to M-x in emacs mode by default. i. Incremental and non-incremental searches now allow ^V/^Q (or, in the former case, anything bound to quoted-insert) to quote characters in the search string. j. Documentation has been significantly updated. k. New `force-meta-prefix' bindable variable, which forces the use of ESC as the meta prefix when using "\M-" in key bindings instead of overloading convert-meta. l. The default value for `readline-colored-completion-prefix' no longer has a leading `.'; the original report was based on a misunderstanding. m. There is a new bindable command, `export-completions', which writes the possible completions for a word to the standard output in a defined format. n. Readline can reset its idea of the screen dimensions when executing after a SIGCONT. Signed-off-by: Adolf Belka --- config/rootfiles/common/readline | 7 +- lfs/readline | 13 +- src/patches/readline/readline82-001 | 42 ----- src/patches/readline/readline82-002 | 48 ------ src/patches/readline/readline82-003 | 43 ----- src/patches/readline/readline82-004 | 65 -------- src/patches/readline/readline82-005 | 50 ------ src/patches/readline/readline82-006 | 99 ------------ src/patches/readline/readline82-007 | 48 ------ src/patches/readline/readline82-008 | 77 --------- src/patches/readline/readline82-009 | 73 --------- src/patches/readline/readline82-010 | 67 -------- src/patches/readline/readline82-011 | 75 --------- src/patches/readline/readline82-012 | 93 ----------- src/patches/readline/readline82-013 | 234 ---------------------------- src/patches/readline/readline83-001 | 64 ++++++++ 16 files changed, 77 insertions(+), 1021 deletions(-) delete mode 100644 src/patches/readline/readline82-001 delete mode 100644 src/patches/readline/readline82-002 delete mode 100644 src/patches/readline/readline82-003 delete mode 100644 src/patches/readline/readline82-004 delete mode 100644 src/patches/readline/readline82-005 delete mode 100644 src/patches/readline/readline82-006 delete mode 100644 src/patches/readline/readline82-007 delete mode 100644 src/patches/readline/readline82-008 delete mode 100644 src/patches/readline/readline82-009 delete mode 100644 src/patches/readline/readline82-010 delete mode 100644 src/patches/readline/readline82-011 delete mode 100644 src/patches/readline/readline82-012 delete mode 100644 src/patches/readline/readline82-013 create mode 100644 src/patches/readline/readline83-001 diff --git a/config/rootfiles/common/readline b/config/rootfiles/common/readline index 834a7046f..ecc3424fa 100644 --- a/config/rootfiles/common/readline +++ b/config/rootfiles/common/readline @@ -9,16 +9,19 @@ #usr/include/readline/tilde.h #usr/lib/libhistory.so usr/lib/libhistory.so.8 -usr/lib/libhistory.so.8.2 +usr/lib/libhistory.so.8.3 #usr/lib/libreadline.so usr/lib/libreadline.so.8 -usr/lib/libreadline.so.8.2 +usr/lib/libreadline.so.8.3 #usr/lib/pkgconfig/history.pc #usr/lib/pkgconfig/readline.pc #usr/share/doc/readline #usr/share/doc/readline/CHANGES #usr/share/doc/readline/INSTALL #usr/share/doc/readline/README +#usr/share/doc/readline/history.html +#usr/share/doc/readline/readline.html +#usr/share/doc/readline/rluserman.html #usr/share/info/history.info #usr/share/info/readline.info #usr/share/info/rluserman.info diff --git a/lfs/readline b/lfs/readline index cfe4cbf18..3546de678 100644 --- a/lfs/readline +++ b/lfs/readline @@ -1,7 +1,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2007-2024 IPFire Team # +# Copyright (C) 2007-2025 IPFire Team # # # # 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 # @@ -24,7 +24,8 @@ include Config -VER = 8.2 +VER = 8.3 +PATCHVER = 1 # https://ftp.gnu.org/gnu/readline/ THISAPP = readline-$(VER) @@ -41,7 +42,7 @@ objects = $(DL_FILE) $(DL_FILE) = $(DL_FROM)/$(DL_FILE) -$(DL_FILE)_BLAKE2 = 7974322b9c092a756a79e537df08e8532f8e0fcb598f77732e28287c33ebec9e9837ed88b43334c310892d56a871b423903f0f564def2fbe700a1004f2ae7b18 +$(DL_FILE)_BLAKE2 = 45d6fe7e34c56d309102a94aa776a7f5284201e844450e14ff818df9fa84a72154bdca70f11828c94954b080cbbe4666fa0b00ffa8460118ec8f3ea551b73dad install : $(TARGET) @@ -72,9 +73,11 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE) - for i in $$(seq 1 13); do \ - cd $(DIR_APP) && patch -Np0 < $(DIR_SRC)/src/patches/readline/readline82-$$(printf "%03d" "$${i}") || exit 1; \ +ifneq "$(PATCHVER)" "0" + for i in $$(seq 1 $(PATCHVER)); do \ + cd $(DIR_APP) && patch -Np0 < $(DIR_SRC)/src/patches/readline/readline$(subst .,,$(VER))-$$(printf "%03d" "$${i}") || exit 1; \ done +endif cd $(DIR_APP) && ./configure \ --prefix=/usr \ diff --git a/src/patches/readline/readline82-001 b/src/patches/readline/readline82-001 deleted file mode 100644 index a13ff4285..000000000 --- a/src/patches/readline/readline82-001 +++ /dev/null @@ -1,42 +0,0 @@ - READLINE PATCH REPORT - ===================== - -Readline-Release: 8.2 -Patch-ID: readline82-001 - -Bug-Reported-by: Kan-Ru Chen -Bug-Reference-ID: -Bug-Reference-URL: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1021109 - -Bug-Description: - -Starting a readline application with an invalid locale specification for -LC_ALL/LANG/LC_CTYPE can cause it crash on the first call to readline. - -Patch (apply with `patch -p0'): - -*** ../readline-8.2-patched/nls.c 2022-08-15 09:38:51.000000000 -0400 ---- nls.c 2022-10-05 09:23:22.000000000 -0400 -*************** -*** 142,145 **** ---- 142,149 ---- - lspec = ""; - ret = setlocale (LC_CTYPE, lspec); /* ok, since it does not change locale */ -+ if (ret == 0 || *ret == 0) -+ ret = setlocale (LC_CTYPE, (char *)NULL); -+ if (ret == 0 || *ret == 0) -+ ret = RL_DEFAULT_LOCALE; - #else - ret = (lspec == 0 || *lspec == 0) ? RL_DEFAULT_LOCALE : lspec; - -*** ../readline-8.2/patchlevel 2013-11-15 08:11:11.000000000 -0500 ---- patchlevel 2014-03-21 08:28:40.000000000 -0400 -*************** -*** 1,3 **** - # Do not edit -- exists only for use by patch - -! 0 ---- 1,3 ---- - # Do not edit -- exists only for use by patch - -! 1 diff --git a/src/patches/readline/readline82-002 b/src/patches/readline/readline82-002 deleted file mode 100644 index 453b9b85d..000000000 --- a/src/patches/readline/readline82-002 +++ /dev/null @@ -1,48 +0,0 @@ - READLINE PATCH REPORT - ===================== - -Readline-Release: 8.2 -Patch-ID: readline82-002 - -Bug-Reported-by: srobertson@peratonlabs.com -Bug-Reference-ID: -Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2022-09/msg00049.html - -Bug-Description: - -It's possible for readline to try to zero out a line that's not null- -terminated, leading to a memory fault. - -Patch (apply with `patch -p0'): - -*** ../readline-8.2-patched/display.c 2022-04-05 10:47:31.000000000 -0400 ---- display.c 2022-12-13 13:11:22.000000000 -0500 -*************** -*** 2684,2692 **** - - if (visible_line) -! { -! temp = visible_line; -! while (*temp) -! *temp++ = '\0'; -! } - rl_on_new_line (); - forced_display++; ---- 2735,2740 ---- - - if (visible_line) -! memset (visible_line, 0, line_size); -! - rl_on_new_line (); - forced_display++; -*** ../readline-8.2/patchlevel 2013-11-15 08:11:11.000000000 -0500 ---- patchlevel 2014-03-21 08:28:40.000000000 -0400 -*************** -*** 1,3 **** - # Do not edit -- exists only for use by patch - -! 1 ---- 1,3 ---- - # Do not edit -- exists only for use by patch - -! 2 diff --git a/src/patches/readline/readline82-003 b/src/patches/readline/readline82-003 deleted file mode 100644 index e9fe2c0d0..000000000 --- a/src/patches/readline/readline82-003 +++ /dev/null @@ -1,43 +0,0 @@ - READLINE PATCH REPORT - ===================== - -Readline-Release: 8.2 -Patch-ID: readline82-003 - -Bug-Reported-by: Stefan Klinger -Bug-Reference-ID: -Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-readline/2023-08/msg00018.html - -Bug-Description: - -Patch (apply with `patch -p0'): - -The custom color prefix that readline uses to color possible completions -must have a leading `.'. - -*** ../readline-8.2-patched/colors.c 2021-12-08 11:38:25.000000000 -0500 ---- colors.c 2023-08-28 16:40:04.000000000 -0400 -*************** -*** 74,78 **** - static void restore_default_color (void); - -! #define RL_COLOR_PREFIX_EXTENSION "readline-colored-completion-prefix" - - COLOR_EXT_TYPE *_rl_color_ext_list = 0; ---- 74,78 ---- - static void restore_default_color (void); - -! #define RL_COLOR_PREFIX_EXTENSION ".readline-colored-completion-prefix" - - COLOR_EXT_TYPE *_rl_color_ext_list = 0; -*** ../readline-8.2/patchlevel 2013-11-15 08:11:11.000000000 -0500 ---- patchlevel 2014-03-21 08:28:40.000000000 -0400 -*************** -*** 1,3 **** - # Do not edit -- exists only for use by patch - -! 2 ---- 1,3 ---- - # Do not edit -- exists only for use by patch - -! 3 diff --git a/src/patches/readline/readline82-004 b/src/patches/readline/readline82-004 deleted file mode 100644 index d60c662ec..000000000 --- a/src/patches/readline/readline82-004 +++ /dev/null @@ -1,65 +0,0 @@ - READLINE PATCH REPORT - ===================== - -Readline-Release: 8.2 -Patch-ID: readline82-004 - -Bug-Reported-by: Henry Bent -Bug-Reference-ID: -Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2022-11/msg00044.html - -Bug-Description: - -Patch (apply with `patch -p0'): - -There are systems that supply one of select or pselect, but not both. - -*** ../readline-8.2-patched/input.c 2022-04-08 15:43:24.000000000 -0400 ---- input.c 2022-11-28 09:41:08.000000000 -0500 -*************** -*** 152,156 **** ---- 152,158 ---- - int _rl_timeout_init (void); - int _rl_timeout_sigalrm_handler (void); -+ #if defined (RL_TIMEOUT_USE_SELECT) - int _rl_timeout_select (int, fd_set *, fd_set *, fd_set *, const struct timeval *, const sigset_t *); -+ #endif - - static void _rl_timeout_handle (void); -*************** -*** 249,253 **** - int chars_avail, k; - char input; -! #if defined(HAVE_SELECT) - fd_set readfds, exceptfds; - struct timeval timeout; ---- 251,255 ---- - int chars_avail, k; - char input; -! #if defined (HAVE_PSELECT) || defined (HAVE_SELECT) - fd_set readfds, exceptfds; - struct timeval timeout; -*************** -*** 806,810 **** - unsigned char c; - int fd; -! #if defined (HAVE_PSELECT) - sigset_t empty_set; - fd_set readfds; ---- 815,819 ---- - unsigned char c; - int fd; -! #if defined (HAVE_PSELECT) || defined (HAVE_SELECT) - sigset_t empty_set; - fd_set readfds; -*** ../readline-8.2/patchlevel 2013-11-15 08:11:11.000000000 -0500 ---- patchlevel 2014-03-21 08:28:40.000000000 -0400 -*************** -*** 1,3 **** - # Do not edit -- exists only for use by patch - -! 3 ---- 1,3 ---- - # Do not edit -- exists only for use by patch - -! 4 diff --git a/src/patches/readline/readline82-005 b/src/patches/readline/readline82-005 deleted file mode 100644 index 57f507f61..000000000 --- a/src/patches/readline/readline82-005 +++ /dev/null @@ -1,50 +0,0 @@ - READLINE PATCH REPORT - ===================== - -Readline-Release: 8.2 -Patch-ID: readline82-005 - -Bug-Reported-by: Simon Marchi -Bug-Reference-ID: -Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-readline/2022-09/msg00005.html - -Bug-Description: - -If an application is using readline in callback mode, and a signal arrives -after readline checks for it in rl_callback_read_char() but before it -restores the application's signal handlers, it won't get processed until the -next time the application calls rl_callback_read_char(). Readline needs to -check for and resend any pending signals after restoring the application's -signal handlers. - -Patch (apply with `patch -p0'): - -*** ../readline-8.2-patched/callback.c 2022-04-29 12:02:56.000000000 -0400 ---- callback.c 2022-10-11 10:59:06.000000000 -0400 -*************** -*** 116,120 **** - do { \ - if (rl_persistent_signal_handlers == 0) \ -! rl_clear_signals (); \ - return; \ - } while (0) ---- 116,123 ---- - do { \ - if (rl_persistent_signal_handlers == 0) \ -! { \ -! rl_clear_signals (); \ -! if (_rl_caught_signal) _rl_signal_handler (_rl_caught_signal); \ -! } \ - return; \ - } while (0) -*** ../readline-8.2/patchlevel 2013-11-15 08:11:11.000000000 -0500 ---- patchlevel 2014-03-21 08:28:40.000000000 -0400 -*************** -*** 1,3 **** - # Do not edit -- exists only for use by patch - -! 4 ---- 1,3 ---- - # Do not edit -- exists only for use by patch - -! 5 diff --git a/src/patches/readline/readline82-006 b/src/patches/readline/readline82-006 deleted file mode 100644 index 9e315e889..000000000 --- a/src/patches/readline/readline82-006 +++ /dev/null @@ -1,99 +0,0 @@ - READLINE PATCH REPORT - ===================== - -Readline-Release: 8.2 -Patch-ID: readline82-006 - -Bug-Reported-by: Tom de Vries -Bug-Reference-ID: -Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-readline/2022-09/msg00001.html - -Bug-Description: - -This is a variant of the same issue as the one fixed by patch 5. In this -case, the signal arrives and is pending before readline calls rl_getc(). -When this happens, the pending signal will be handled by the loop, but may -alter or destroy some state that the callback uses. Readline needs to treat -this case the same way it would if a signal interrupts pselect/select, so -compound operations like searches and reading numeric arguments get cleaned -up properly. - -Patch (apply with `patch -p0'): - -*** ../readline-8.2-patched/input.c 2022-12-22 16:15:48.000000000 -0500 ---- input.c 2023-01-10 11:53:45.000000000 -0500 -*************** -*** 812,816 **** - rl_getc (FILE *stream) - { -! int result; - unsigned char c; - int fd; ---- 812,816 ---- - rl_getc (FILE *stream) - { -! int result, ostate, osig; - unsigned char c; - int fd; -*************** -*** 823,828 **** ---- 823,842 ---- - while (1) - { -+ osig = _rl_caught_signal; -+ ostate = rl_readline_state; -+ - RL_CHECK_SIGNALS (); - -+ #if defined (READLINE_CALLBACKS) -+ /* Do signal handling post-processing here, but just in callback mode -+ for right now because the signal cleanup can change some of the -+ callback state, and we need to either let the application have a -+ chance to react or abort some current operation that gets cleaned -+ up by rl_callback_sigcleanup(). If not, we'll just run through the -+ loop again. */ -+ if (osig != 0 && (ostate & RL_STATE_CALLBACK)) -+ goto postproc_signal; -+ #endif -+ - /* We know at this point that _rl_caught_signal == 0 */ - -*************** -*** 888,891 **** ---- 902,908 ---- - - handle_error: -+ osig = _rl_caught_signal; -+ ostate = rl_readline_state; -+ - /* If the error that we received was EINTR, then try again, - this is simply an interrupted system call to read (). We allow -*************** -*** 928,933 **** ---- 945,959 ---- - #endif /* SIGALRM */ - -+ postproc_signal: -+ /* POSIX says read(2)/pselect(2)/select(2) don't return EINTR for any -+ reason other than being interrupted by a signal, so we can safely -+ call the application's signal event hook. */ - if (rl_signal_event_hook) - (*rl_signal_event_hook) (); -+ #if defined (READLINE_CALLBACKS) -+ else if (osig == SIGINT && (ostate & RL_STATE_CALLBACK) && (ostate & (RL_STATE_ISEARCH|RL_STATE_NSEARCH|RL_STATE_NUMERICARG))) -+ /* just these cases for now */ -+ _rl_abort_internal (); -+ #endif - } - } -*** ../readline-8.2/patchlevel 2013-11-15 08:11:11.000000000 -0500 ---- patchlevel 2014-03-21 08:28:40.000000000 -0400 -*************** -*** 1,3 **** - # Do not edit -- exists only for use by patch - -! 5 ---- 1,3 ---- - # Do not edit -- exists only for use by patch - -! 6 diff --git a/src/patches/readline/readline82-007 b/src/patches/readline/readline82-007 deleted file mode 100644 index b0394e0bb..000000000 --- a/src/patches/readline/readline82-007 +++ /dev/null @@ -1,48 +0,0 @@ - READLINE PATCH REPORT - ===================== - -Readline-Release: 8.2 -Patch-ID: readline82-007 - -Bug-Reported-by: Kevin Pulo -Bug-Reference-ID: -Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-readline/2022-11/msg00002.html - -Bug-Description: - -If readline is called with no prompt, it should display a newline if return -is typed on an empty line. It should still suppress the final newline if -return is typed on the last (empty) line of a multi-line command. - -Patch (apply with `patch -p0'): - -*** ../readline-8.2-patched/display.c 2022-04-05 10:47:31.000000000 -0400 ---- display.c 2022-12-13 13:11:22.000000000 -0500 -*************** -*** 3342,3348 **** - &last_face[_rl_screenwidth - 1 + woff], 1); - } -! _rl_vis_botlin = 0; -! if (botline_length > 0 || _rl_last_c_pos > 0) - rl_crlf (); - fflush (rl_outstream); - rl_display_fixed++; ---- 3394,3400 ---- - &last_face[_rl_screenwidth - 1 + woff], 1); - } -! if ((_rl_vis_botlin == 0 && botline_length == 0) || botline_length > 0 || _rl_last_c_pos > 0) - rl_crlf (); -+ _rl_vis_botlin = 0; - fflush (rl_outstream); - rl_display_fixed++; -*** ../readline-8.2/patchlevel 2013-11-15 08:11:11.000000000 -0500 ---- patchlevel 2014-03-21 08:28:40.000000000 -0400 -*************** -*** 1,3 **** - # Do not edit -- exists only for use by patch - -! 6 ---- 1,3 ---- - # Do not edit -- exists only for use by patch - -! 7 diff --git a/src/patches/readline/readline82-008 b/src/patches/readline/readline82-008 deleted file mode 100644 index 2d8b368f1..000000000 --- a/src/patches/readline/readline82-008 +++ /dev/null @@ -1,77 +0,0 @@ - READLINE PATCH REPORT - ===================== - -Readline-Release: 8.2 -Patch-ID: readline82-008 - -Bug-Reported-by: -Bug-Reference-ID: -Bug-Reference-URL: - -Bug-Description: - -Add missing prototypes for several function declarations. - -Patch (apply with `patch -p0'): - -*** ../readline-8.2-patched/text.c Wed Oct 27 11:03:59 2021 ---- text.c Thu Nov 16 16:24:58 2023 -*************** -*** 1765,1770 **** - #if defined (READLINE_CALLBACKS) - static int -! _rl_char_search_callback (data) -! _rl_callback_generic_arg *data; - { - _rl_callback_func = 0; ---- 1765,1769 ---- - #if defined (READLINE_CALLBACKS) - static int -! _rl_char_search_callback (_rl_callback_generic_arg *data) - { - _rl_callback_func = 0; -*** ../readline-8.2-patched/bind.c Wed Feb 9 11:02:22 2022 ---- bind.c Thu Nov 16 16:25:17 2023 -*************** -*** 1168,1174 **** - - static int -! parse_comparison_op (s, indp) -! const char *s; -! int *indp; - { - int i, peekc, op; ---- 1168,1172 ---- - - static int -! parse_comparison_op (const char *s, int *indp) - { - int i, peekc, op; -*** ../readline-8.2-patched/rltty.c Fri Feb 18 11:14:22 2022 ---- rltty.c Thu Nov 16 16:25:36 2023 -*************** -*** 81,86 **** - to get the tty settings. */ - static void -! set_winsize (tty) -! int tty; - { - #if defined (TIOCGWINSZ) ---- 81,85 ---- - to get the tty settings. */ - static void -! set_winsize (int tty) - { - #if defined (TIOCGWINSZ) - -*** ../readline-8.2/patchlevel 2013-11-15 08:11:11.000000000 -0500 ---- patchlevel 2014-03-21 08:28:40.000000000 -0400 -*************** -*** 1,3 **** - # Do not edit -- exists only for use by patch - -! 7 ---- 1,3 ---- - # Do not edit -- exists only for use by patch - -! 8 diff --git a/src/patches/readline/readline82-009 b/src/patches/readline/readline82-009 deleted file mode 100644 index b3acc4150..000000000 --- a/src/patches/readline/readline82-009 +++ /dev/null @@ -1,73 +0,0 @@ - READLINE PATCH REPORT - ===================== - -Readline-Release: 8.2 -Patch-ID: readline82-009 - -Bug-Reported-by: Stefan H. Holek -Bug-Reference-ID: <50F8DA45-B7F3-4DE1-AB94-19AE42649CDC@epy.co.at> -Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-readline/2022-10/msg00021.html - -Bug-Description: - -Fix issue where the directory name portion of the word to be completed (the -part that is passed to opendir()) requires both tilde expansion and dequoting. -Readline only performed tilde expansion in this case, so filename completion -would fail. - -Patch (apply with `patch -p0'): - -*** ../readline-8.2-patched/complete.c 2022-04-05 10:47:06.000000000 -0400 ---- complete.c 2022-10-26 15:08:51.000000000 -0400 -*************** -*** 2527,2531 **** - xfree (dirname); - dirname = temp; -! tilde_dirname = 1; - } - ---- 2527,2532 ---- - xfree (dirname); - dirname = temp; -! if (*dirname != '~') -! tilde_dirname = 1; /* indicate successful tilde expansion */ - } - -*************** -*** 2546,2554 **** - users_dirname = savestring (dirname); - } -! else if (tilde_dirname == 0 && rl_completion_found_quote && rl_filename_dequoting_function) - { -! /* delete single and double quotes */ - xfree (dirname); -! dirname = savestring (users_dirname); - } - directory = opendir (dirname); ---- 2547,2560 ---- - users_dirname = savestring (dirname); - } -! else if (rl_completion_found_quote && rl_filename_dequoting_function) - { -! /* We already ran users_dirname through the dequoting function. -! If tilde_dirname == 1, we successfully performed tilde expansion -! on dirname. Now we need to reconcile those results. We either -! just copy the already-dequoted users_dirname or tilde expand it -! if we tilde-expanded dirname. */ -! temp = tilde_dirname ? tilde_expand (users_dirname) : savestring (users_dirname); - xfree (dirname); -! dirname = temp; - } - directory = opendir (dirname); - -*** ../readline-8.2/patchlevel 2013-11-15 08:11:11.000000000 -0500 ---- patchlevel 2014-03-21 08:28:40.000000000 -0400 -*************** -*** 1,3 **** - # Do not edit -- exists only for use by patch - -! 8 ---- 1,3 ---- - # Do not edit -- exists only for use by patch - -! 9 diff --git a/src/patches/readline/readline82-010 b/src/patches/readline/readline82-010 deleted file mode 100644 index d2ca5eae2..000000000 --- a/src/patches/readline/readline82-010 +++ /dev/null @@ -1,67 +0,0 @@ - READLINE PATCH REPORT - ===================== - -Readline-Release: 8.2 -Patch-ID: readline82-010 - -Bug-Reported-by: Martin Castillo -Bug-Reference-ID: <2d42153b-cf65-caba-dff1-cd3bc6268c7e@uni-bremen.de> -Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-readline/2023-01/msg00000.html - -Bug-Description: - -Fix the case where text to be completed from the line buffer (quoted) is -compared to the common prefix of the possible matches (unquoted) and the -quoting makes the former appear to be longer than the latter. Readline -assumes the match doesn't add any characters to the word and doesn't display -multiple matches. - -Patch (apply with `patch -p0'): - -*** ../readline-8.2-patched/complete.c Tue Apr 5 10:47:06 2022 ---- complete.c Sat Jan 7 14:19:45 2023 -*************** -*** 2032,2038 **** - text = rl_copy_text (start, end); - matches = gen_completion_matches (text, start, end, our_func, found_quote, quote_char); - /* nontrivial_lcd is set if the common prefix adds something to the word - being completed. */ -! nontrivial_lcd = matches && compare_match (text, matches[0]) != 0; - if (what_to_do == '!' || what_to_do == '@') - tlen = strlen (text); ---- 2038,2060 ---- - text = rl_copy_text (start, end); - matches = gen_completion_matches (text, start, end, our_func, found_quote, quote_char); -+ /* If TEXT contains quote characters, it will be dequoted as part of -+ generating the matches, and the matches will not contain any quote -+ characters. We need to dequote TEXT before performing the comparison. -+ Since compare_match performs the dequoting, and we only want to do it -+ once, we don't call compare_matches after dequoting TEXT; we call -+ strcmp directly. */ - /* nontrivial_lcd is set if the common prefix adds something to the word - being completed. */ -! if (rl_filename_completion_desired && rl_filename_quoting_desired && -! rl_completion_found_quote && rl_filename_dequoting_function) -! { -! char *t; -! t = (*rl_filename_dequoting_function) (text, rl_completion_quote_character); -! xfree (text); -! text = t; -! nontrivial_lcd = matches && strcmp (text, matches[0]) != 0; -! } -! else -! nontrivial_lcd = matches && strcmp (text, matches[0]) != 0; - if (what_to_do == '!' || what_to_do == '@') - tlen = strlen (text); - -*** ../readline-8.2/patchlevel 2013-11-15 08:11:11.000000000 -0500 ---- patchlevel 2014-03-21 08:28:40.000000000 -0400 -*************** -*** 1,3 **** - # Do not edit -- exists only for use by patch - -! 9 ---- 1,3 ---- - # Do not edit -- exists only for use by patch - -! 10 diff --git a/src/patches/readline/readline82-011 b/src/patches/readline/readline82-011 deleted file mode 100644 index 3ad7a8ffd..000000000 --- a/src/patches/readline/readline82-011 +++ /dev/null @@ -1,75 +0,0 @@ - READLINE PATCH REPORT - ===================== - -Readline-Release: 8.2 -Patch-ID: readline82-011 - -Bug-Reported-by: Grisha Levit -Bug-Reference-ID: -Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2024-02/msg00075.html - -Bug-Description: - -Patch (apply with `patch -p0'): - -Some systems (e.g., macOS) send signals early on in interactive initialization, -so readline should retry a failed open of the init file. - -*** ../readline-8.2-patched/bind.c Wed Feb 9 11:02:22 2022 ---- bind.c Tue Apr 23 15:07:13 2024 -*************** -*** 979,987 **** - int i, file; - -! file = -1; -! if (((file = open (filename, O_RDONLY, 0666)) < 0) || (fstat (file, &finfo) < 0)) - { - if (file >= 0) - close (file); - return ((char *)NULL); - } ---- 969,986 ---- - int i, file; - -! file = open (filename, O_RDONLY, 0666); -! /* If the open is interrupted, retry once */ -! if (file < 0 && errno == EINTR) - { -+ RL_CHECK_SIGNALS (); -+ file = open (filename, O_RDONLY, 0666); -+ } -+ -+ if ((file < 0) || (fstat (file, &finfo) < 0)) -+ { -+ i = errno; - if (file >= 0) - close (file); -+ errno = i; - return ((char *)NULL); - } -*************** -*** 992,999 **** ---- 991,1001 ---- - if (file_size != finfo.st_size || file_size + 1 < file_size) - { -+ i = errno; - if (file >= 0) - close (file); - #if defined (EFBIG) - errno = EFBIG; -+ #else -+ errno = i; - #endif - return ((char *)NULL); - -*** ../readline-8.2/patchlevel 2013-11-15 08:11:11.000000000 -0500 ---- patchlevel 2014-03-21 08:28:40.000000000 -0400 -*************** -*** 1,3 **** - # Do not edit -- exists only for use by patch - -! 10 ---- 1,3 ---- - # Do not edit -- exists only for use by patch - -! 11 diff --git a/src/patches/readline/readline82-012 b/src/patches/readline/readline82-012 deleted file mode 100644 index cbcb4cdaf..000000000 --- a/src/patches/readline/readline82-012 +++ /dev/null @@ -1,93 +0,0 @@ - READLINE PATCH REPORT - ===================== - -Readline-Release: 8.2 -Patch-ID: readline82-012 - -Bug-Reported-by: Grisha Levit -Bug-Reference-ID: -Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-readline/2023-11/msg00019.html - -Bug-Description: - -If a user happens to bind do-lowercase-version to something that isn't a -capital letter, so _rl_to_lower doesn't change anything and the result is -still bound to do-lowercase-version, readline can recurse infinitely. - -Patch (apply with `patch -p0'): - -*** ../readline-8.2-patched/readline.c Thu Aug 11 18:35:37 2022 ---- readline.c Fri Feb 2 12:05:36 2024 -*************** -*** 900,905 **** - /* Special case rl_do_lowercase_version (). */ - if (func == rl_do_lowercase_version) -! /* Should we do anything special if key == ANYOTHERKEY? */ -! return (_rl_dispatch (_rl_to_lower ((unsigned char)key), map)); - - rl_executing_keymap = map; ---- 912,926 ---- - /* Special case rl_do_lowercase_version (). */ - if (func == rl_do_lowercase_version) -! { -! /* Should we do anything special if key == ANYOTHERKEY? */ -! newkey = _rl_to_lower ((unsigned char)key); -! if (newkey != key) -! return (_rl_dispatch (newkey, map)); -! else -! { -! rl_ding (); /* gentle failure */ -! return 0; -! } -! } - - rl_executing_keymap = map; -*************** -*** 1110,1114 **** - func = m[ANYOTHERKEY].function; - if (type == ISFUNC && func == rl_do_lowercase_version) -! r = _rl_dispatch (_rl_to_lower ((unsigned char)key), map); - else if (type == ISFUNC) - { ---- 1131,1139 ---- - func = m[ANYOTHERKEY].function; - if (type == ISFUNC && func == rl_do_lowercase_version) -! { -! int newkey = _rl_to_lower ((unsigned char)key); -! /* check that there is actually a lowercase version to avoid infinite recursion */ -! r = (newkey != key) ? _rl_dispatch (newkey, map) : 1; -! } - else if (type == ISFUNC) - { - -*** ../readline-8.2-patched/isearch.c Thu Aug 11 18:35:37 2022 ---- isearch.c Fri Feb 2 12:05:36 2024 -*************** -*** 429,433 **** - f = cxt->keymap[c].function; - if (f == rl_do_lowercase_version) -! f = cxt->keymap[_rl_to_lower (c)].function; - } - ---- 431,439 ---- - f = cxt->keymap[c].function; - if (f == rl_do_lowercase_version) -! { -! f = cxt->keymap[_rl_to_lower (c)].function; -! if (f == rl_do_lowercase_version) -! f = rl_insert; -! } - } - - -*** ../readline-8.2/patchlevel 2013-11-15 08:11:11.000000000 -0500 ---- patchlevel 2014-03-21 08:28:40.000000000 -0400 -*************** -*** 1,3 **** - # Do not edit -- exists only for use by patch - -! 11 ---- 1,3 ---- - # Do not edit -- exists only for use by patch - -! 12 diff --git a/src/patches/readline/readline82-013 b/src/patches/readline/readline82-013 deleted file mode 100644 index cb4164fbe..000000000 --- a/src/patches/readline/readline82-013 +++ /dev/null @@ -1,234 +0,0 @@ - READLINE PATCH REPORT - ===================== - -Readline-Release: 8.2 -Patch-ID: readline82-013 - -Bug-Reported-by: Grisha Levit -Bug-Reference-ID: +Bug-Reference-ID: +Bug-Reference-URL: + +Bug-Description: + +If an application uses readline's event hook, it is called while waiting for +input. There is a bug in the function that waits for available input that +causes it not to read that input under certain circumstances, resulting in +a loop where the event hook continues to be called, but there is no input +to stop it. + +Patch (apply with `patch -p0'): + +*** ../readline-8.3/input.c Fri May 2 09:29:05 2025 +--- input.c Tue Jul 8 15:37:13 2025 +*************** +*** 262,266 **** + tty = fileno (rl_instream); + +! /* Move this up here to give it first shot, but it can't set chars_avail */ + /* XXX - need rl_chars_available_hook? */ + if (rl_input_available_hook) +--- 262,267 ---- + tty = fileno (rl_instream); + +! /* Move this up here to give it first shot, but it can't set chars_avail, +! so we assume a single character is available. */ + /* XXX - need rl_chars_available_hook? */ + if (rl_input_available_hook) +*************** +*** 269,272 **** +--- 270,275 ---- + if (result == 0) + result = -1; ++ else ++ chars_avail = 1; + } + +*************** +*** 286,289 **** +--- 289,293 ---- + if (result <= 0) + return 0; /* Nothing to read. */ ++ result = -1; /* there is something, so check how many chars below */ + } + #endif +*** ../readline-8.3/patchlevel 2013-11-15 08:11:11.000000000 -0500 +--- patchlevel 2014-03-21 08:28:40.000000000 -0400 +*************** +*** 1,3 **** + # Do not edit -- exists only for use by patch + +! 0 +--- 1,3 ---- + # Do not edit -- exists only for use by patch + +! 1 -- 2.50.1