Till Wegmüller
2024-04-07 6ca8c2ef2bffdfec8cc95c049ac3f2230dc6ca82
component(library/readline): Update to 8.2.10 with 6.3 as new compat

links so we can rebuild the dependants

Signed-off-by: Till Wegmueller <toasterson@gmail.com>
5 files deleted
11 files added
4 files modified
4 files renamed
2279 ■■■■■ changed files
components/library/readline/Makefile 24 ●●●●● patch | view | raw | blame | history
components/library/readline/manifests/sample-manifest.p5m 20 ●●●●● patch | view | raw | blame | history
components/library/readline/patches/bash43-021.patch_1 patch | view | raw | blame | history
components/library/readline/patches/history.3.patch 50 ●●●● patch | view | raw | blame | history
components/library/readline/patches/readline.h.patch_1 11 ●●●●● patch | view | raw | blame | history
components/library/readline/patches/readline63-001.patch_1 patch | view | raw | blame | history
components/library/readline/patches/readline63-002.patch_1 patch | view | raw | blame | history
components/library/readline/patches/readline63-004.patch_1 patch | view | raw | blame | history
components/library/readline/patches/readline82-001.patch 42 ●●●●● patch | view | raw | blame | history
components/library/readline/patches/readline82-002.patch 48 ●●●●● patch | view | raw | blame | history
components/library/readline/patches/readline82-003.patch 43 ●●●●● patch | view | raw | blame | history
components/library/readline/patches/readline82-004.patch 66 ●●●●● patch | view | raw | blame | history
components/library/readline/patches/readline82-005.patch 50 ●●●●● patch | view | raw | blame | history
components/library/readline/patches/readline82-006.patch 99 ●●●●● patch | view | raw | blame | history
components/library/readline/patches/readline82-007.patch 48 ●●●●● patch | view | raw | blame | history
components/library/readline/patches/readline82-008.patch 77 ●●●●● patch | view | raw | blame | history
components/library/readline/patches/readline82-009.patch 73 ●●●●● patch | view | raw | blame | history
components/library/readline/patches/readline82-010.patch 67 ●●●●● patch | view | raw | blame | history
components/library/readline/patches/readline_Makefile_in.patch_1 24 ●●●●● patch | view | raw | blame | history
components/library/readline/patches/readline_doc_Makefile_in.patch 15 ●●●●● patch | view | raw | blame | history
components/library/readline/patches/readline_libtermcap_filter_link.patch 18 ●●●●● patch | view | raw | blame | history
components/library/readline/readline-5.license 345 ●●●●● patch | view | raw | blame | history
components/library/readline/readline.license 1127 ●●●●● patch | view | raw | blame | history
components/library/readline/readline.p5m 32 ●●●●● patch | view | raw | blame | history
components/library/readline/Makefile
@@ -23,30 +23,30 @@
# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
#
BUILD_BITS= 32_and_64
BUILD_BITS= 64_and_32
include ../../../make-rules/shared-macros.mk
COMPONENT_NAME=        readline
COMPONENT_VERSION=    6.3
COMPONENT_REVISION=    7
COMPONENT_VERSION=    8.2
COMPONENT_SUMMARY=    GNU readline provides interactive line-editing and history
COMPONENT_DESCRIPTION= The GNU Readline library provides a set of functions for use by applications that allow users to edit command lines as they are typed in
COMPONENT_PROJECT_URL=    https://cnswww.cns.cwru.edu/php/chet/readline/rltop.html
COMPONENT_PROJECT_URL= https://tiswww.cwru.edu/php/chet/readline/rltop.html
COMPONENT_SRC=        $(COMPONENT_NAME)-$(COMPONENT_VERSION)
COMPONENT_ARCHIVE=    $(COMPONENT_SRC).tar.gz
COMPONENT_ARCHIVE_HASH= sha256:56ba6071b9462f980c5a72ab0023893b65ba6debb4eeb475d7a563dc65cafd43
COMPONENT_ARCHIVE_HASH= sha256:08835e57b5eb84f07f8fa50c7530e4b13b08265ffef340e4a4cce4ad6fb575fe
COMPONENT_ARCHIVE_URL= https://ftp.gnu.org/gnu/readline/$(COMPONENT_ARCHIVE)
COMPONENT_FMRI=        library/readline
COMPONENT_CLASSIFICATION=    System/Libraries
COMPONENT_LICENSE=    GPLv2, GPLv3, FDLv1.3
COMPONENT_LICENSE_FILE= COPYING
# For now, we want to continue to provide the libreadline and libhistory so's
# (and their links) from readline 5.2.
#
COMPONENT_VERSION_1=   5.2
COMPONENT_VERSION_1=   6.3
COMPONENT_SRC_1=       $(COMPONENT_NAME)-$(COMPONENT_VERSION_1)
COMPONENT_ARCHIVE_1=   $(COMPONENT_SRC_1).tar.gz
COMPONENT_ARCHIVE_HASH_1= sha256:12e88d96aee2cd1192500356f0535540db499282ca7f76339fb4228c31249f45
COMPONENT_ARCHIVE_HASH_1= sha256:56ba6071b9462f980c5a72ab0023893b65ba6debb4eeb475d7a563dc65cafd43
COMPONENT_ARCHIVE_URL_1= https://ftp.gnu.org/gnu/readline/$(COMPONENT_ARCHIVE_1)
SOURCE_DIR_1=          $(COMPONENT_DIR)/$(COMPONENT_SRC_1)
@@ -69,21 +69,17 @@
COMPONENT_TEST_TARGETS=
# Needed to build the test program.
COMPONENT_PRE_SYSTEM_TEST_ACTION += \
COMPONENT_PRE_TEST_ACTION += \
    (cd $(@D) ; $(GMAKE) libreadline.a ) ;
# Build the test program.
COMPONENT_PRE_SYSTEM_TEST_ACTION += \
COMPONENT_PRE_TEST_ACTION += \
    (cd $(@D)/examples ; $(GMAKE) rlcat ) ;
# Get correct libreadline.so.6 from the proto area.
TEST_LIBPATH.32= $(PROTOUSRLIBDIR)
TEST_LIBPATH.64= $(PROTOUSRLIBDIR64)
COMPONENT_TEST_ENV += LD_LIBRARY_PATH=$(TEST_LIBPATH.$(BITS))
COMPONENT_SYSTEM_TEST_DIR= $(@D)/examples
COMPONENT_SYSTEM_TEST_CMD= $(CAT) $(SOURCE_DIR)/examples/Inputrc | ./rlcat
COMPONENT_SYSTEM_TEST_TARGETS=
# Macros to configure, build, and install the old version for the time being.
BUILD_OLD_DIR_32= $(COMPONENT_DIR)/build/$(COMPONENT_VERSION_1)-$(MACH32)
@@ -106,7 +102,7 @@
ASLR_MODE= $(ASLR_NOT_APPLICABLE)
test:        install $(TEST_32_and_64)
test:        install $(TEST_64_and_32)
# Auto-generated dependencies
REQUIRED_PACKAGES += system/library
components/library/readline/manifests/sample-manifest.p5m
@@ -31,18 +31,22 @@
file path=usr/include/readline/rlstdc.h
file path=usr/include/readline/rltypedefs.h
file path=usr/include/readline/tilde.h
link path=usr/lib/$(MACH64)/libhistory.so target=libhistory.so.6
file path=usr/lib/$(MACH64)/libhistory.so.5
link path=usr/lib/$(MACH64)/libhistory.so target=libhistory.so.8
file path=usr/lib/$(MACH64)/libhistory.so.6
link path=usr/lib/$(MACH64)/libreadline.so target=libreadline.so.6
file path=usr/lib/$(MACH64)/libreadline.so.5
file path=usr/lib/$(MACH64)/libhistory.so.8
link path=usr/lib/$(MACH64)/libreadline.so target=libreadline.so.8
file path=usr/lib/$(MACH64)/libreadline.so.6
link path=usr/lib/libhistory.so target=libhistory.so.6
file path=usr/lib/libhistory.so.5
file path=usr/lib/$(MACH64)/libreadline.so.8
file path=usr/lib/$(MACH64)/pkgconfig/history.pc
file path=usr/lib/$(MACH64)/pkgconfig/readline.pc
link path=usr/lib/libhistory.so target=libhistory.so.8
file path=usr/lib/libhistory.so.6
link path=usr/lib/libreadline.so target=libreadline.so.6
file path=usr/lib/libreadline.so.5
file path=usr/lib/libhistory.so.8
link path=usr/lib/libreadline.so target=libreadline.so.8
file path=usr/lib/libreadline.so.6
file path=usr/lib/libreadline.so.8
file path=usr/lib/pkgconfig/history.pc
file path=usr/lib/pkgconfig/readline.pc
file path=usr/share/doc/readline/CHANGES
file path=usr/share/doc/readline/INSTALL
file path=usr/share/doc/readline/README
components/library/readline/patches/bash43-021.patch_1
components/library/readline/patches/history.3.patch
@@ -1,5 +1,5 @@
--- readline-5.2/doc/history.3.orig    Mon Apr  4 00:12:21 2011
+++ readline-5.2/doc/history.3    Mon Apr  4 00:13:09 2011
--- readline-8.1/doc/history.3
+++ readline-8.1/doc/history.3
@@ -19,16 +19,16 @@
 .ds lp \fR\|(\fP
 .ds rp \fR\|)\fP
@@ -20,7 +20,7 @@
 .if t \fI\\$1\fP \fB\\$2\fP \\*(lp\fI\\$3,\|\\$4,\|\\$5\fP\|\\*(rp
 .if n \fI\\$1\fP \fB\\$2\fP \\*(lp\fI\\$3, \\$4, \\$5\fP\\*(rp
 .br
@@ -331,14 +331,14 @@
@@ -346,61 +346,61 @@ This section describes functions used to
 the state of the History library when you want to use the history
 functions in your program.
 
@@ -38,7 +38,6 @@
 Set the state of the history list according to \fIstate\fP.
 
 .SS History List Management
@@ -346,43 +346,43 @@
 These functions manage individual entries on the history list, or set
 parameters managing the list itself.
 
@@ -46,6 +45,9 @@
+.F1 void add_history "const char *string"
 Place \fIstring\fP at the end of the history list.  The associated data
 field (if any) is set to \fBNULL\fP.
 If the maximum number of history entries has been set using
 \fBstifle_history()\fP, and the new number of history entries would exceed
 that maximum, the oldest history entry is removed.
 
-.Fn1 void add_history_time "const char *string"
+.F1 void add_history_time "const char *string"
@@ -78,6 +80,7 @@
-.Fn1 void stifle_history "int max"
+.F1 void stifle_history "int max"
 Stifle the history list, remembering only the last \fImax\fP entries.
 The history list will contain only \fImax\fP entries at a time.
 
-.Fn1 int unstifle_history "void"
+.F1 int unstifle_history "void"
@@ -91,7 +94,7 @@
 Returns non-zero if the history is stifled, zero if it is not.
 
 .SS Information About the History List
@@ -390,29 +390,29 @@
@@ -408,30 +408,30 @@ Returns non-zero if the history is stifl
 These functions return information about the entire history list or
 individual list entries.
 
@@ -113,10 +116,11 @@
 
-.Fn1 "HIST_ENTRY *" history_get "int offset"
+.F1 "HIST_ENTRY *" history_get "int offset"
 Return the history entry at position \fIoffset\fP, starting from
 \fBhistory_base\fP.
 If there is no entry there, or if \fIoffset\fP
 is greater than the history length, return a \fBNULL\fP pointer.
 Return the history entry at position \fIoffset\fP.
 The range of valid values of \fIoffset\fP starts at \fBhistory_base\fP
 and ends at \fBhistory_length\fP \- 1.
 If there is no entry there, or if \fIoffset\fP is outside the valid
 range, return a \fBNULL\fP pointer.
 
-.Fn1 "time_t" history_get_time "HIST_ENTRY *"
+.F1 "time_t" history_get_time "HIST_ENTRY *"
@@ -127,7 +131,7 @@
 Return the number of bytes that the primary history entries are using.
 This function returns the sum of the lengths of all the lines in the
 history.
@@ -422,18 +422,18 @@
@@ -441,18 +441,18 @@ history.
 These functions allow the current index into the history list to be
 set or changed.
 
@@ -146,10 +150,10 @@
 
-.Fn1 "HIST_ENTRY *" next_history "void"
+.F1 "HIST_ENTRY *" next_history "void"
 Move the current history offset forward to the next history entry, and
 return the a pointer to that entry.  If there is no next entry, return
 a \fBNULL\fP pointer.
@@ -445,7 +445,7 @@
 If the current history offset refers to a valid history entry,
 increment the current history offset.
 If the possibly-incremented history offset refers to a valid history
@@ -466,7 +466,7 @@ a specific string.  Searching may be per
 from the current history position.  The search may be \fIanchored\fP,
 meaning that the string must match at the beginning of the history entry.
 
@@ -158,7 +162,7 @@
 Search the history for \fIstring\fP, starting at the current history offset.
 If \fIdirection\fP is less than 0, then the search is through
 previous entries, otherwise through subsequent entries.
@@ -455,7 +455,7 @@
@@ -476,7 +476,7 @@ returned is the offset in the line of th
 \fIstring\fP was found.  Otherwise, nothing is changed, and a -1 is
 returned.
 
@@ -167,7 +171,7 @@
 Search the history for \fIstring\fP, starting at the current history
 offset.  The search is anchored: matching lines must begin with
 \fIstring\fP.  If \fIdirection\fP is less than 0, then the search is
@@ -464,7 +464,7 @@
@@ -485,7 +485,7 @@ If \fIstring\fP is found, then the
 current history index is set to that entry, and the return value is 0. 
 Otherwise, nothing is changed, and a -1 is returned. 
 
@@ -176,7 +180,7 @@
 Search for \fIstring\fP in the history list, starting at \fIpos\fP, an
 absolute index into the list.  If \fIdirection\fP is negative, the search
 proceeds backward from \fIpos\fP, otherwise forward.  Returns the absolute
@@ -474,12 +474,12 @@
@@ -495,12 +495,12 @@ index of the history element where \fIst
 The History library can read the history from and write it to a file.
 This section documents the functions for managing a history file.
 
@@ -191,7 +195,7 @@
 Read a range of lines from \fIfilename\fP, adding them to the history list.
 Start reading at line \fIfrom\fP and end at \fIto\fP.
 If \fIfrom\fP is zero, start at the beginning.  If \fIto\fP is less than
@@ -487,7 +487,7 @@
@@ -508,19 +508,19 @@ If \fIfrom\fP is zero, start at the begi
 \fBNULL\fP, then read from \fI~/.history\fP.  Returns 0 if successful,
 or \fBerrno\fP if not.
 
@@ -200,7 +204,6 @@
 Write the current history to \fIfilename\fP, overwriting \fIfilename\fP
 if necessary.
 If \fIfilename\fP is \fBNULL\fP, then write the history list to \fI~/.history\fP.
@@ -494,12 +494,12 @@
 Returns 0 on success, or \fBerrno\fP on a read or write error.
 
 
@@ -215,7 +218,7 @@
 Truncate the history file \fIfilename\fP, leaving only the last
 \fInlines\fP lines.
 If \fIfilename\fP is \fBNULL\fP, then \fI~/.history\fP is truncated.
@@ -509,7 +509,7 @@
@@ -530,7 +530,7 @@ Returns 0 on success, or \fBerrno\fP on
 
 These functions implement history expansion.
 
@@ -224,8 +227,8 @@
 Expand \fIstring\fP, placing the result into \fIoutput\fP, a pointer
 to a string.  Returns:
 .RS
@@ -534,7 +534,7 @@
 If an error ocurred in expansion, then \fIoutput\fP contains a descriptive
@@ -555,7 +555,7 @@ as with the \fB:p\fP modifier.
 If an error occurred in expansion, then \fIoutput\fP contains a descriptive
 error message.
 
-.Fn3 "char *" get_history_event "const char *string" "int *cindex" "int qchar"
@@ -233,7 +236,7 @@
 Returns the text of the history event beginning at \fIstring\fP +
 \fI*cindex\fP.  \fI*cindex\fP is modified to point to after the event
 specifier.  At function entry, \fIcindex\fP points to the index into
@@ -542,7 +542,7 @@
@@ -563,14 +563,14 @@ specifier.  At function entry, \fIcindex
 is a character that is allowed to end the event specification in addition
 to the ``normal'' terminating characters.
 
@@ -242,7 +245,6 @@
 Return an array of tokens parsed out of \fIstring\fP, much as the
 shell might.
 The tokens are split on the characters in the
@@ -549,7 +549,7 @@
 \fBhistory_word_delimiters\fP variable,
 and shell quoting conventions are obeyed.
 
components/library/readline/patches/readline.h.patch_1
File was deleted
components/library/readline/patches/readline63-001.patch_1
components/library/readline/patches/readline63-002.patch_1
components/library/readline/patches/readline63-004.patch_1
components/library/readline/patches/readline82-001.patch
New file
@@ -0,0 +1,42 @@
               READLINE PATCH REPORT
               =====================
Readline-Release: 8.2
Patch-ID: readline82-001
Bug-Reported-by:    Kan-Ru Chen <koster@debian.org>
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
--- a/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
--- a/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
components/library/readline/patches/readline82-002.patch
New file
@@ -0,0 +1,48 @@
               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
--- a/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
--- a/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
components/library/readline/patches/readline82-003.patch
New file
@@ -0,0 +1,43 @@
               READLINE PATCH REPORT
               =====================
Readline-Release: 8.2
Patch-ID: readline82-003
Bug-Reported-by:    Stefan Klinger <readline-gnu.org@stefan-klinger.de>
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
--- a/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
--- a/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
components/library/readline/patches/readline82-004.patch
New file
@@ -0,0 +1,66 @@
               READLINE PATCH REPORT
               =====================
Readline-Release: 8.2
Patch-ID: readline82-004
Bug-Reported-by:    Henry Bent <henry.r.bent@gmail.com>
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
--- a/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
--- a/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
components/library/readline/patches/readline82-005.patch
New file
@@ -0,0 +1,50 @@
               READLINE PATCH REPORT
               =====================
Readline-Release: 8.2
Patch-ID: readline82-005
Bug-Reported-by:    Simon Marchi <simon.marchi@polymtl.ca>
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
--- a/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
--- a/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
components/library/readline/patches/readline82-006.patch
New file
@@ -0,0 +1,99 @@
               READLINE PATCH REPORT
               =====================
Readline-Release: 8.2
Patch-ID: readline82-006
Bug-Reported-by:    Tom de Vries <tdevries@suse.de>
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
--- a/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
--- a/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
components/library/readline/patches/readline82-007.patch
New file
@@ -0,0 +1,48 @@
               READLINE PATCH REPORT
               =====================
Readline-Release: 8.2
Patch-ID: readline82-007
Bug-Reported-by:    Kevin Pulo <kev@pulo.com.au>
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
--- a/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
--- a/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
components/library/readline/patches/readline82-008.patch
New file
@@ -0,0 +1,77 @@
               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
--- a/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
--- a/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
--- a/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
--- a/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
components/library/readline/patches/readline82-009.patch
New file
@@ -0,0 +1,73 @@
               READLINE PATCH REPORT
               =====================
Readline-Release: 8.2
Patch-ID: readline82-009
Bug-Reported-by:    Stefan H. Holek <stefan@epy.co.at>
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
--- a/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
--- a/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
components/library/readline/patches/readline82-010.patch
New file
@@ -0,0 +1,67 @@
               READLINE PATCH REPORT
               =====================
Readline-Release: 8.2
Patch-ID: readline82-010
Bug-Reported-by:    Martin Castillo <castilma@uni-bremen.de>
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
--- a/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
--- a/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
components/library/readline/patches/readline_Makefile_in.patch_1
File was deleted
components/library/readline/patches/readline_doc_Makefile_in.patch
New file
@@ -0,0 +1,15 @@
--- readline-7.0/doc/Makefile.in    2018-11-30 07:41:04.950711458 +0000
+++ readline-7.0/doc/Makefile.in    2018-11-30 07:40:36.469953378 +0000
@@ -52,7 +52,11 @@ INSTALL_DATA = @INSTALL_DATA@
 BUILD_DIR = @BUILD_DIR@
 TEXINPUTDIR = $(srcdir)
-MAKEINFO    = LANGUAGE= makeinfo
+# modification for solaris nv sfw-workspace nightly build
+# MAKEINFO    = LANGUAGE= makeinfo
+MAKEINFO    = makeinfo
+# end of modification
+
 TEXI2DVI    = $(srcdir)/texi2dvi
 TEXI2HTML   = $(srcdir)/texi2html
 QUIETPS     = #set this to -q to shut up dvips
components/library/readline/patches/readline_libtermcap_filter_link.patch
File was deleted
components/library/readline/readline-5.license
File was deleted
components/library/readline/readline.license
File was deleted
components/library/readline/readline.p5m
@@ -23,17 +23,7 @@
set name=info.source-url value=$(COMPONENT_ARCHIVE_URL)
set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
#license $(COMPONENT_LICENSE_FILE) license='$(COMPONENT_LICENSE)'
# This license action only needed for the old readline 5.2 libraries.
license readline-5.license license=GPLv2 \
    com.oracle.info.description="GNU readline version 5 libraries" \
    com.oracle.info.name=readline com.oracle.info.tpno=$(TPNO_V5) \
    com.oracle.info.version=$(COMPONENT_VERSION)
license readline.license license="GPLv3, FDLv1.3" \
    com.oracle.info.description="GNU readline" com.oracle.info.name=readline \
    com.oracle.info.tpno=$(TPNO_V6) \
    com.oracle.info.version=$(COMPONENT_VERSION)
license $(COMPONENT_LICENSE_FILE) license='$(COMPONENT_LICENSE)'
<transform file path=.+/share/info/dir -> drop>
@@ -47,18 +37,22 @@
file path=usr/include/readline/rlstdc.h
file path=usr/include/readline/rltypedefs.h
file path=usr/include/readline/tilde.h
link path=usr/lib/$(MACH64)/libhistory.so target=libhistory.so.6
file path=usr/lib/$(MACH64)/libhistory.so.5
link path=usr/lib/$(MACH64)/libhistory.so target=libhistory.so.8
file path=usr/lib/$(MACH64)/libhistory.so.6
link path=usr/lib/$(MACH64)/libreadline.so target=libreadline.so.6
file path=usr/lib/$(MACH64)/libreadline.so.5
file path=usr/lib/$(MACH64)/libhistory.so.8
link path=usr/lib/$(MACH64)/libreadline.so target=libreadline.so.8
file path=usr/lib/$(MACH64)/libreadline.so.6
link path=usr/lib/libhistory.so target=libhistory.so.6
file path=usr/lib/libhistory.so.5
file path=usr/lib/$(MACH64)/libreadline.so.8
file path=usr/lib/$(MACH64)/pkgconfig/history.pc
file path=usr/lib/$(MACH64)/pkgconfig/readline.pc
link path=usr/lib/libhistory.so target=libhistory.so.8
file path=usr/lib/libhistory.so.6
link path=usr/lib/libreadline.so target=libreadline.so.6
file path=usr/lib/libreadline.so.5
file path=usr/lib/libhistory.so.8
link path=usr/lib/libreadline.so target=libreadline.so.8
file path=usr/lib/libreadline.so.6
file path=usr/lib/libreadline.so.8
file path=usr/lib/pkgconfig/history.pc
file path=usr/lib/pkgconfig/readline.pc
file path=usr/share/doc/readline/CHANGES
file path=usr/share/doc/readline/INSTALL
file path=usr/share/doc/readline/README