From e6fa01449fae1850596b3739a549e0213eab17a8 Mon Sep 17 00:00:00 2001 From: eabdullin Date: Wed, 14 May 2025 15:29:59 +0000 Subject: [PATCH] import UBI readline-8.2-11.el10 --- .gitignore | 2 +- .readline.metadata | 1 - SOURCES/Readline-7.0-patch-1.patch | 46 ------ SOURCES/Readline-7.0-patch-2.patch | 77 --------- SOURCES/Readline-7.0-patch-3.patch | 34 ---- ....0-shlib.patch => readline-8.0-shlib.patch | 33 +--- readline-8.2-patch-1.patch | 23 +++ readline-8.2-patch-10.patch | 38 +++++ readline-8.2-patch-2.patch | 25 +++ readline-8.2-patch-3.patch | 20 +++ readline-8.2-patch-4.patch | 39 +++++ readline-8.2-patch-5.patch | 23 +++ readline-8.2-patch-6.patch | 71 ++++++++ readline-8.2-patch-7.patch | 23 +++ readline-8.2-patch-8.patch | 48 ++++++ readline-8.2-patch-9.patch | 41 +++++ readline-8.3-sast.patch | 28 ++++ SPECS/readline.spec => readline.spec | 156 +++++++++++++----- sources | 1 + 19 files changed, 499 insertions(+), 230 deletions(-) delete mode 100644 .readline.metadata delete mode 100644 SOURCES/Readline-7.0-patch-1.patch delete mode 100644 SOURCES/Readline-7.0-patch-2.patch delete mode 100644 SOURCES/Readline-7.0-patch-3.patch rename SOURCES/readline-7.0-shlib.patch => readline-8.0-shlib.patch (56%) create mode 100644 readline-8.2-patch-1.patch create mode 100644 readline-8.2-patch-10.patch create mode 100644 readline-8.2-patch-2.patch create mode 100644 readline-8.2-patch-3.patch create mode 100644 readline-8.2-patch-4.patch create mode 100644 readline-8.2-patch-5.patch create mode 100644 readline-8.2-patch-6.patch create mode 100644 readline-8.2-patch-7.patch create mode 100644 readline-8.2-patch-8.patch create mode 100644 readline-8.2-patch-9.patch create mode 100644 readline-8.3-sast.patch rename SPECS/readline.spec => readline.spec (75%) create mode 100644 sources diff --git a/.gitignore b/.gitignore index 41815b5..e7e8ebd 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/readline-7.0.tar.gz +readline-8.2.tar.gz diff --git a/.readline.metadata b/.readline.metadata deleted file mode 100644 index e977ed1..0000000 --- a/.readline.metadata +++ /dev/null @@ -1 +0,0 @@ -d9095fa14a812495052357e1d678b3f2ac635463 SOURCES/readline-7.0.tar.gz diff --git a/SOURCES/Readline-7.0-patch-1.patch b/SOURCES/Readline-7.0-patch-1.patch deleted file mode 100644 index 6a35f7f..0000000 --- a/SOURCES/Readline-7.0-patch-1.patch +++ /dev/null @@ -1,46 +0,0 @@ -From acf3951d483e7b3478db4d731f4a8af99d27327d Mon Sep 17 00:00:00 2001 -From: Chet Ramey -Date: Wed, 16 Nov 2016 12:57:31 -0500 -Subject: [PATCH] Readline-7.0 patch 1 - ---- - history.c | 6 +++++- - patchlevel | 2 +- - 2 files changed, 6 insertions(+), 2 deletions(-) - -diff --git a/history.c b/history.c -index 3b8dbc5..9ff25a7 100644 ---- a/history.c -+++ b/history.c -@@ -57,6 +57,8 @@ extern int errno; - /* How big to make the_history when we first allocate it. */ - #define DEFAULT_HISTORY_INITIAL_SIZE 502 - -+#define MAX_HISTORY_INITIAL_SIZE 8192 -+ - /* The number of slots to increase the_history by. */ - #define DEFAULT_HISTORY_GROW_SIZE 50 - -@@ -307,7 +309,9 @@ add_history (string) - if (history_size == 0) - { - if (history_stifled && history_max_entries > 0) -- history_size = history_max_entries + 2; -+ history_size = (history_max_entries > MAX_HISTORY_INITIAL_SIZE) -+ ? MAX_HISTORY_INITIAL_SIZE -+ : history_max_entries + 2; - else - history_size = DEFAULT_HISTORY_INITIAL_SIZE; - the_history = (HIST_ENTRY **)xmalloc (history_size * sizeof (HIST_ENTRY *)); -diff --git a/patchlevel b/patchlevel -index d8c9df7..fdf4740 100644 ---- a/patchlevel -+++ b/patchlevel -@@ -1,3 +1,3 @@ - # Do not edit -- exists only for use by patch - --0 -+1 --- -2.9.3 - diff --git a/SOURCES/Readline-7.0-patch-2.patch b/SOURCES/Readline-7.0-patch-2.patch deleted file mode 100644 index 5246dda..0000000 --- a/SOURCES/Readline-7.0-patch-2.patch +++ /dev/null @@ -1,77 +0,0 @@ -From e3f5a97bfa54db0d4e4fe67e406e64f1a58508ea Mon Sep 17 00:00:00 2001 -From: Chet Ramey -Date: Sun, 29 Jan 2017 13:55:34 -0500 -Subject: [PATCH] Readline-7.0 patch 2 - ---- - history.c | 16 +++++++--------- - patchlevel | 2 +- - 2 files changed, 8 insertions(+), 10 deletions(-) - -diff --git a/history.c b/history.c -index 9ff25a7..129c57a 100644 ---- a/history.c -+++ b/history.c -@@ -279,6 +279,7 @@ add_history (string) - const char *string; - { - HIST_ENTRY *temp; -+ int new_length; - - if (history_stifled && (history_length == history_max_entries)) - { -@@ -295,13 +296,9 @@ add_history (string) - - /* Copy the rest of the entries, moving down one slot. Copy includes - trailing NULL. */ --#if 0 -- for (i = 0; i < history_length; i++) -- the_history[i] = the_history[i + 1]; --#else - memmove (the_history, the_history + 1, history_length * sizeof (HIST_ENTRY *)); --#endif - -+ new_length = history_length; - history_base++; - } - else -@@ -315,7 +312,7 @@ add_history (string) - else - history_size = DEFAULT_HISTORY_INITIAL_SIZE; - the_history = (HIST_ENTRY **)xmalloc (history_size * sizeof (HIST_ENTRY *)); -- history_length = 1; -+ new_length = 1; - } - else - { -@@ -325,14 +322,15 @@ add_history (string) - the_history = (HIST_ENTRY **) - xrealloc (the_history, history_size * sizeof (HIST_ENTRY *)); - } -- history_length++; -+ new_length = history_length + 1; - } - } - - temp = alloc_history_entry ((char *)string, hist_inittime ()); - -- the_history[history_length] = (HIST_ENTRY *)NULL; -- the_history[history_length - 1] = temp; -+ the_history[new_length] = (HIST_ENTRY *)NULL; -+ the_history[new_length - 1] = temp; -+ history_length = new_length; - } - - /* Change the time stamp of the most recent history entry to STRING. */ -diff --git a/patchlevel b/patchlevel -index fdf4740..7cbda82 100644 ---- a/patchlevel -+++ b/patchlevel -@@ -1,3 +1,3 @@ - # Do not edit -- exists only for use by patch - --1 -+2 --- -2.13.6 - diff --git a/SOURCES/Readline-7.0-patch-3.patch b/SOURCES/Readline-7.0-patch-3.patch deleted file mode 100644 index a79536a..0000000 --- a/SOURCES/Readline-7.0-patch-3.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 6c32f81cd66bbe86218469063690c84205661a5e Mon Sep 17 00:00:00 2001 -From: Chet Ramey -Date: Sun, 29 Jan 2017 13:55:51 -0500 -Subject: [PATCH] Readline-7.0 patch 3 - ---- - input.c | 1 + - patchlevel | 2 +- - 2 files changed, 2 insertions(+), 1 deletion(-) - -diff --git a/input.c b/input.c -index 286897d..24126ea 100644 ---- a/input.c -+++ b/input.c -@@ -513,6 +513,7 @@ rl_getc (stream) - result = 0; - #if defined (HAVE_PSELECT) - sigemptyset (&empty_set); -+ sigprocmask (SIG_BLOCK, (sigset_t *)NULL, &empty_set); - FD_ZERO (&readfds); - FD_SET (fileno (stream), &readfds); - result = pselect (fileno (stream) + 1, &readfds, NULL, NULL, NULL, &empty_set); -diff --git a/patchlevel b/patchlevel -index 7cbda82..ce3e355 100644 ---- a/patchlevel -+++ b/patchlevel -@@ -1,3 +1,3 @@ - # Do not edit -- exists only for use by patch - --2 -+3 --- -2.13.6 - diff --git a/SOURCES/readline-7.0-shlib.patch b/readline-8.0-shlib.patch similarity index 56% rename from SOURCES/readline-7.0-shlib.patch rename to readline-8.0-shlib.patch index 52b054b..9f53814 100644 --- a/SOURCES/readline-7.0-shlib.patch +++ b/readline-8.0-shlib.patch @@ -1,16 +1,4 @@ -From 5f7f73a57b16ef58769004fe2f4111baf1c81690 Mon Sep 17 00:00:00 2001 -From: Jan Chaloupka -Date: Mon, 21 Jul 2014 13:50:01 +0200 -Subject: [PATCH] shlib - ---- - shlib/Makefile.in | 2 +- - support/shlib-install | 2 +- - support/shobj-conf | 5 +++-- - 3 files changed, 5 insertions(+), 4 deletions(-) - diff --git a/shlib/Makefile.in b/shlib/Makefile.in -index eb16211..3a34840 100644 --- a/shlib/Makefile.in +++ b/shlib/Makefile.in @@ -178,7 +178,7 @@ $(SHARED_READLINE): $(SHARED_OBJ) @@ -22,25 +10,11 @@ index eb16211..3a34840 100644 # Since tilde.c is shared between readline and bash, make sure we compile # it with the right flags when it's built as part of readline -diff --git a/support/shlib-install b/support/shlib-install -index cfec3bd..f4eea27 100755 ---- a/support/shlib-install -+++ b/support/shlib-install -@@ -73,7 +73,7 @@ fi - case "$host_os" in - hpux*|darwin*|macosx*|linux*|solaris2*) - if [ -z "$uninstall" ]; then -- chmod 555 ${INSTALLDIR}/${LIBNAME} -+ chmod 755 ${INSTALLDIR}/${LIBNAME} - fi ;; - cygwin*|mingw*) - IMPLIBNAME=`echo ${LIBNAME} \ diff --git a/support/shobj-conf b/support/shobj-conf -index 1f64433..40827a4 100644 --- a/support/shobj-conf +++ b/support/shobj-conf @@ -126,10 +126,11 @@ sunos5*|solaris2*) - linux*-*|gnu*-*|k*bsd*-gnu-*|freebsd*-gentoo) + linux*-*|gnu*-*|k*bsd*-gnu-*|midnightbsd*|freebsd*|dragonfly*) SHOBJ_CFLAGS=-fPIC SHOBJ_LD='${CC}' - SHOBJ_LDFLAGS='-shared -Wl,-soname,$@' @@ -52,7 +26,4 @@ index 1f64433..40827a4 100644 + SHLIB_LIBS='-ltinfo' ;; - freebsd2*) --- -1.9.3 - + # Darwin/MacOS X diff --git a/readline-8.2-patch-1.patch b/readline-8.2-patch-1.patch new file mode 100644 index 0000000..da05187 --- /dev/null +++ b/readline-8.2-patch-1.patch @@ -0,0 +1,23 @@ +diff --git a/nls.c b/nls.c +--- a/nls.c ++++ b/nls.c +@@ -141,6 +141,10 @@ _rl_init_locale (void) + if (lspec == 0) + 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; + #endif +diff --git a/patchlevel b/patchlevel +index d8c9df7..fdf4740 100644 +--- a/patchlevel ++++ b/patchlevel +@@ -1,3 +1,3 @@ + # Do not edit -- exists only for use by patch + +-0 ++1 diff --git a/readline-8.2-patch-10.patch b/readline-8.2-patch-10.patch new file mode 100644 index 0000000..123a24f --- /dev/null +++ b/readline-8.2-patch-10.patch @@ -0,0 +1,38 @@ +diff --git a/complete.c b/complete.c +--- a/complete.c ++++ b/complete.c +@@ -2031,9 +2031,25 @@ rl_complete_internal (int what_to_do) + + 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. */ +- nontrivial_lcd = matches && compare_match (text, matches[0]) != 0; ++ 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); + xfree (text); +diff --git a/patchlevel b/patchlevel +--- a/patchlevel ++++ b/patchlevel +@@ -1,3 +1,3 @@ + # Do not edit -- exists only for use by patch + +-9 ++10 diff --git a/readline-8.2-patch-2.patch b/readline-8.2-patch-2.patch new file mode 100644 index 0000000..e8f08c3 --- /dev/null +++ b/readline-8.2-patch-2.patch @@ -0,0 +1,25 @@ +diff --git a/display.c b/display.c +--- a/display.c ++++ b/display.c +@@ -2683,11 +2683,8 @@ rl_forced_update_display (void) + register char *temp; + + if (visible_line) +- { +- temp = visible_line; +- while (*temp) +- *temp++ = '\0'; +- } ++ memset (visible_line, 0, line_size); ++ + rl_on_new_line (); + forced_display++; + (*rl_redisplay_function) (); +diff --git a/patchlevel b/patchlevel +--- a/patchlevel ++++ b/patchlevel +@@ -1,3 +1,3 @@ + # Do not edit -- exists only for use by patch + +-1 ++2 diff --git a/readline-8.2-patch-3.patch b/readline-8.2-patch-3.patch new file mode 100644 index 0000000..93e8bf3 --- /dev/null +++ b/readline-8.2-patch-3.patch @@ -0,0 +1,20 @@ +diff --git a/colors.c b/colors.c +--- a/colors.c ++++ b/colors.c +@@ -73,7 +73,7 @@ + static bool is_colored (enum indicator_no type); + static void restore_default_color (void); + +-#define RL_COLOR_PREFIX_EXTENSION "readline-colored-completion-prefix" ++#define RL_COLOR_PREFIX_EXTENSION ".readline-colored-completion-prefix" + + COLOR_EXT_TYPE *_rl_color_ext_list = 0; + +diff --git a/patchlevel b/patchlevel +--- a/patchlevel ++++ b/patchlevel +@@ -1,3 +1,3 @@ + # Do not edit -- exists only for use by patch + +-2 ++3 diff --git a/readline-8.2-patch-4.patch b/readline-8.2-patch-4.patch new file mode 100644 index 0000000..62997d0 --- /dev/null +++ b/readline-8.2-patch-4.patch @@ -0,0 +1,39 @@ +diff --git a/input.c b/input.c +--- a/input.c ++++ b/input.c +@@ -151,7 +151,9 @@ int rl_timeout_remaining (unsigned int *, unsigned int *); + + 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); + #if defined (RL_TIMEOUT_USE_SIGALRM) +@@ -248,7 +250,7 @@ rl_gather_tyi (void) + register int tem, result; + int chars_avail, k; + char input; +-#if defined(HAVE_SELECT) ++#if defined (HAVE_PSELECT) || defined (HAVE_SELECT) + fd_set readfds, exceptfds; + struct timeval timeout; + #endif +@@ -805,7 +807,7 @@ rl_getc (FILE *stream) + int result; + unsigned char c; + int fd; +-#if defined (HAVE_PSELECT) ++#if defined (HAVE_PSELECT) || defined (HAVE_SELECT) + sigset_t empty_set; + fd_set readfds; + #endif +diff --git a/patchlevel b/patchlevel +--- a/patchlevel ++++ b/patchlevel +@@ -1,3 +1,3 @@ + # Do not edit -- exists only for use by patch + +-3 ++4 diff --git a/readline-8.2-patch-5.patch b/readline-8.2-patch-5.patch new file mode 100644 index 0000000..085dad7 --- /dev/null +++ b/readline-8.2-patch-5.patch @@ -0,0 +1,23 @@ +diff --git a/callback.c b/callback.c +--- a/callback.c ++++ b/callback.c +@@ -115,7 +115,10 @@ rl_callback_handler_install (const char *prompt, rl_vcpfunc_t *linefunc) + #define CALLBACK_READ_RETURN() \ + do { \ + if (rl_persistent_signal_handlers == 0) \ +- rl_clear_signals (); \ ++ { \ ++ rl_clear_signals (); \ ++ if (_rl_caught_signal) _rl_signal_handler (_rl_caught_signal); \ ++ } \ + return; \ + } while (0) + #else +diff --git a/patchlevel b/patchlevel +--- a/patchlevel ++++ b/patchlevel +@@ -1,3 +1,3 @@ + # Do not edit -- exists only for use by patch + +-4 ++5 diff --git a/readline-8.2-patch-6.patch b/readline-8.2-patch-6.patch new file mode 100644 index 0000000..44723b4 --- /dev/null +++ b/readline-8.2-patch-6.patch @@ -0,0 +1,71 @@ +diff --git a/input.c b/input.c +--- a/input.c ++++ b/input.c +@@ -804,7 +804,7 @@ rl_read_key (void) + int + rl_getc (FILE *stream) + { +- int result; ++ int result, ostate, osig; + unsigned char c; + int fd; + #if defined (HAVE_PSELECT) || defined (HAVE_SELECT) +@@ -815,8 +815,22 @@ rl_getc (FILE *stream) + fd = fileno (stream); + 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 */ + + #if defined (__MINGW32__) +@@ -880,6 +894,9 @@ rl_getc (FILE *stream) + /* fprintf(stderr, "rl_getc: result = %d errno = %d\n", result, errno); */ + + 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 + the read to be interrupted if we caught SIGHUP, SIGTERM, or any +@@ -920,8 +937,17 @@ handle_error: + RL_CHECK_SIGNALS (); + #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 + } + } + +diff --git a/patchlevel b/patchlevel +--- a/patchlevel ++++ b/patchlevel +@@ -1,3 +1,3 @@ + # Do not edit -- exists only for use by patch + +-5 ++6 diff --git a/readline-8.2-patch-7.patch b/readline-8.2-patch-7.patch new file mode 100644 index 0000000..dbcde60 --- /dev/null +++ b/readline-8.2-patch-7.patch @@ -0,0 +1,23 @@ +diff --git a/display.c b/display.c +--- a/display.c ++++ b/display.c +@@ -3338,9 +3338,9 @@ _rl_update_final (void) + puts_face (&last_line[_rl_screenwidth - 1 + woff], + &last_face[_rl_screenwidth - 1 + woff], 1); + } +- _rl_vis_botlin = 0; +- if (botline_length > 0 || _rl_last_c_pos > 0) ++ 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++; + } +diff --git a/patchlevel b/patchlevel +--- a/patchlevel ++++ b/patchlevel +@@ -1,3 +1,3 @@ + # Do not edit -- exists only for use by patch + +-6 ++7 diff --git a/readline-8.2-patch-8.patch b/readline-8.2-patch-8.patch new file mode 100644 index 0000000..1748abc --- /dev/null +++ b/readline-8.2-patch-8.patch @@ -0,0 +1,48 @@ +diff --git a/bind.c b/bind.c +--- a/bind.c ++++ b/bind.c +@@ -1167,9 +1167,7 @@ _rl_init_file_error (va_alist) + /* **************************************************************** */ + + static int +-parse_comparison_op (s, indp) +- const char *s; +- int *indp; ++parse_comparison_op (const char *s, int *indp) + { + int i, peekc, op; + +diff --git a/patchlevel b/patchlevel +--- a/patchlevel ++++ b/patchlevel +@@ -1,3 +1,3 @@ + # Do not edit -- exists only for use by patch + +-7 ++8 +diff --git a/rltty.c b/rltty.c +--- a/rltty.c ++++ b/rltty.c +@@ -80,8 +80,7 @@ static int ksrflow; + /* Dummy call to force a backgrounded readline to stop before it tries + to get the tty settings. */ + static void +-set_winsize (tty) +- int tty; ++set_winsize (int tty) + { + #if defined (TIOCGWINSZ) + struct winsize w; +diff --git a/text.c b/text.c +--- a/text.c ++++ b/text.c +@@ -1764,8 +1764,7 @@ _rl_char_search (int count, int fdir, int bdir) + + #if defined (READLINE_CALLBACKS) + static int +-_rl_char_search_callback (data) +- _rl_callback_generic_arg *data; ++_rl_char_search_callback (_rl_callback_generic_arg *data) + { + _rl_callback_func = 0; + _rl_want_redisplay = 1; diff --git a/readline-8.2-patch-9.patch b/readline-8.2-patch-9.patch new file mode 100644 index 0000000..94829dc --- /dev/null +++ b/readline-8.2-patch-9.patch @@ -0,0 +1,41 @@ +diff --git a/complete.c b/complete.c +--- a/complete.c ++++ b/complete.c +@@ -2526,7 +2526,8 @@ rl_filename_completion_function (const char *text, int state) + temp = tilde_expand (dirname); + xfree (dirname); + dirname = temp; +- tilde_dirname = 1; ++ if (*dirname != '~') ++ tilde_dirname = 1; /* indicate successful tilde expansion */ + } + + /* We have saved the possibly-dequoted version of the directory name +@@ -2545,11 +2546,16 @@ rl_filename_completion_function (const char *text, int state) + xfree (users_dirname); + users_dirname = savestring (dirname); + } +- else if (tilde_dirname == 0 && rl_completion_found_quote && rl_filename_dequoting_function) ++ else if (rl_completion_found_quote && rl_filename_dequoting_function) + { +- /* delete single and double quotes */ ++ /* 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 = savestring (users_dirname); ++ dirname = temp; + } + directory = opendir (dirname); + +diff --git a/patchlevel b/patchlevel +--- a/patchlevel ++++ b/patchlevel +@@ -1,3 +1,3 @@ + # Do not edit -- exists only for use by patch + +-8 ++9 diff --git a/readline-8.3-sast.patch b/readline-8.3-sast.patch new file mode 100644 index 0000000..bbae331 --- /dev/null +++ b/readline-8.3-sast.patch @@ -0,0 +1,28 @@ +diff --git a/text.c b/text.c +--- a/text.c ++++ b/text.c +@@ -1409,8 +1409,7 @@ rl_change_case (int count, int op) + #if defined (HANDLE_MULTIBYTE) + WCHAR_T wc, nwc; + char mb[MB_LEN_MAX+1]; +- int mlen; +- size_t m; ++ size_t m, mlen; + mbstate_t mps; + #endif + +@@ -1479,12 +1478,12 @@ rl_change_case (int count, int op) + + memset (&ts, 0, sizeof (mbstate_t)); + mlen = WCRTOMB (mb, nwc, &ts); +- if (mlen < 0) ++ if (MB_INVALIDCH (mlen)) + { + nwc = wc; + memset (&ts, 0, sizeof (mbstate_t)); + mlen = WCRTOMB (mb, nwc, &ts); +- if (mlen < 0) /* should not happen */ ++ if (MB_INVALIDCH (mlen)) /* should not happen */ + strncpy (mb, rl_line_buffer + start, mlen = m); + } + if (mlen > 0) diff --git a/SPECS/readline.spec b/readline.spec similarity index 75% rename from SPECS/readline.spec rename to readline.spec index f3ca638..7ba89f5 100644 --- a/SPECS/readline.spec +++ b/readline.spec @@ -1,25 +1,37 @@ Summary: A library for editing typed command lines Name: readline -Version: 7.0 -Release: 10%{?dist} -License: GPLv3+ -URL: http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html +Version: 8.2 +Release: 11%{?dist} + +# * Main sources are GPL-3.0-or-later +# * examples/rlfe are GPL-2.0-or-later +# * docs are GFDL-1.3-no-invariants-or-later +License: GPL-3.0-or-later AND GPL-2.0-or-later AND GFDL-1.3-no-invariants-or-later + +URL: https://tiswww.case.edu/php/chet/readline/rltop.html Source: ftp://ftp.gnu.org/gnu/readline/readline-%{version}.tar.gz # Official upstream patches # Patches are converted to apply with '-p1' -Patch1: Readline-7.0-patch-1.patch -Patch2: Readline-7.0-patch-2.patch -Patch3: Readline-7.0-patch-3.patch +Patch1: readline-8.2-patch-1.patch +Patch2: readline-8.2-patch-2.patch +Patch3: readline-8.2-patch-3.patch +Patch4: readline-8.2-patch-4.patch +Patch5: readline-8.2-patch-5.patch +Patch6: readline-8.2-patch-6.patch +Patch7: readline-8.2-patch-7.patch +Patch8: readline-8.2-patch-8.patch +Patch9: readline-8.2-patch-9.patch +Patch10: readline-8.2-patch-10.patch +Patch11: readline-8.3-sast.patch # Other patches -# fix file permissions, remove RPATH, use CFLAGS -Patch101: readline-7.0-shlib.patch +# Remove RPATH, use CFLAGS +Patch101: readline-8.0-shlib.patch -Requires(post): info -Requires(preun): info +BuildRequires: make +BuildRequires: gcc BuildRequires: ncurses-devel -BuildRequires: git %description The Readline library provides a set of functions that allow users to @@ -32,9 +44,6 @@ commands. %package devel Summary: Files needed to develop programs which use the readline library Requires: %{name}%{?_isa} = %{version}-%{release} -Requires: ncurses-devel%{?_isa} -Requires(post): info -Requires(preun): info %description devel The Readline library provides a set of functions that allow users to @@ -54,37 +63,16 @@ library. %autosetup -p1 %build -export CPPFLAGS="-I%{_includedir}/ncurses" -%configure +%configure --with-curses --disable-install-examples %make_build %install %make_install -rm -rf $RPM_BUILD_ROOT%{_datadir}/readline -rm -rf $RPM_BUILD_ROOT%{_docdir}/readline -rm -f $RPM_BUILD_ROOT%{_infodir}/dir* +rm -vrf %{buildroot}%{_docdir}/readline +rm -vf %{buildroot}%{_infodir}/dir* -%post -/sbin/ldconfig -/sbin/install-info %{_infodir}/history.info %{_infodir}/dir || : -/sbin/install-info %{_infodir}/rluserman.info %{_infodir}/dir || : - -%postun -p /sbin/ldconfig - -%preun -if [ $1 = 0 ]; then - /sbin/install-info --delete %{_infodir}/history.info %{_infodir}/dir || : - /sbin/install-info --delete %{_infodir}/rluserman.info %{_infodir}/dir || : -fi - -%post devel -/sbin/install-info %{_infodir}/history.info %{_infodir}/dir || : - -%preun devel -if [ $1 = 0 ]; then - /sbin/install-info --delete %{_infodir}/readline.info %{_infodir}/dir || : -fi +%ldconfig_scriptlets %files %license COPYING USAGE @@ -99,6 +87,8 @@ fi %{_includedir}/readline/ %{_libdir}/libreadline.so %{_libdir}/libhistory.so +%{_libdir}/pkgconfig/%{name}.pc +%{_libdir}/pkgconfig/history.pc %{_mandir}/man3/readline.3* %{_mandir}/man3/history.3* %{_infodir}/readline.info* @@ -108,6 +98,92 @@ fi %{_libdir}/libhistory.a %changelog +* Tue Oct 29 2024 Troy Dawson - 8.2-11 +- Bump release for October 2024 mass rebuild: + Resolves: RHEL-64018 + +* Thu Aug 29 2024 Siteshwar Vashisht - 8.2-10 +- Fix issues identified by OpenScanHub + Resolves: RHEL-44656 + +* Mon Jun 24 2024 Troy Dawson - 8.2-9 +- Bump release for June 2024 mass rebuild + +* Fri Jan 26 2024 Fedora Release Engineering - 8.2-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Mon Jan 22 2024 Siteshwar Vashisht - 8.2-7 +- Update to readline-8.2 patchlevel 10 + Resolves: #2259635 + +* Mon Jan 22 2024 Fedora Release Engineering - 8.2-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Mon Aug 07 2023 Lukáš Zaoral - 8.2-5 +- migrate to SPDX license format + +* Fri Jul 21 2023 Fedora Release Engineering - 8.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Fri Jan 20 2023 Fedora Release Engineering - 8.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Thu Oct 06 2022 Siteshwar Vashisht - 8.2-2 +- Update to readline-8.2 patchlevel 1 + +* Wed Oct 05 2022 Siteshwar Vashisht - 8.2-1 +- Update to readline-8.2 + Resolves: #2129926 + +* Sat Jul 23 2022 Fedora Release Engineering - 8.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Fri Jan 21 2022 Fedora Release Engineering - 8.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Mon Jan 17 2022 Siteshwar Vashisht - 8.1-5 +- Add pkg-config configurations for libhistory + Resolves: #2026123 + +* Mon Jan 17 2022 Siteshwar Vashisht - 8.1-4 +- Update to readline-8.1 patchlevel 2 + Resolves: #2037430 + +* Fri Jul 23 2021 Fedora Release Engineering - 8.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Wed Jan 27 2021 Fedora Release Engineering - 8.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Jan 6 11:32:21 CET 2021 Siteshwar Vashisht - 8.1-1 +- Rebase to readline-8.1 + Resolves: #1904867 + +* Wed Jul 29 2020 Fedora Release Engineering - 8.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Thu Jan 30 2020 Fedora Release Engineering - 8.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Fri Jul 26 2019 Fedora Release Engineering - 8.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Sun Feb 17 2019 Igor Gnatenko - 8.0-2 +- Drop ABI compatibility library + +* Fri Feb 15 2019 Siteshwar Vashisht - 8.0-1 +- Rebase to readline-8.0 + +* Sat Feb 02 2019 Fedora Release Engineering - 7.0-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Sat Jul 14 2018 Fedora Release Engineering - 7.0-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Tue Jun 12 2018 Siteshwar Vashisht - 7.0-11 +- Update to readline-7.0 patchlevel 5 + Resolves: #1590316 + * Tue Apr 3 2018 Peter Robinson 7.0-10 - Move USAGE to %%license as it describes usage in a licensing context diff --git a/sources b/sources new file mode 100644 index 0000000..377dbda --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (readline-8.2.tar.gz) = 0a451d459146bfdeecc9cdd94bda6a6416d3e93abd80885a40b334312f16eb890f8618a27ca26868cebbddf1224983e631b1cbc002c1a4d1cd0d65fba9fea49a