diff --git a/Readline-7.0-patch-2.patch b/Readline-7.0-patch-2.patch new file mode 100644 index 0000000..5246dda --- /dev/null +++ b/Readline-7.0-patch-2.patch @@ -0,0 +1,77 @@ +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/Readline-7.0-patch-3.patch b/Readline-7.0-patch-3.patch new file mode 100644 index 0000000..a79536a --- /dev/null +++ b/Readline-7.0-patch-3.patch @@ -0,0 +1,34 @@ +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/readline.spec b/readline.spec index 1005303..c7c4778 100644 --- a/readline.spec +++ b/readline.spec @@ -1,7 +1,7 @@ Summary: A library for editing typed command lines Name: readline Version: 7.0 -Release: 8%{?dist} +Release: 9%{?dist} License: GPLv3+ URL: http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html Source: ftp://ftp.gnu.org/gnu/readline/readline-%{version}.tar.gz @@ -9,6 +9,8 @@ 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 # Other patches # fix file permissions, remove RPATH, use CFLAGS @@ -106,6 +108,10 @@ fi %{_libdir}/libhistory.a %changelog +* Mon Mar 26 2018 Siteshwar Vashisht - 7.0-9 +- Update to readline-7.0 patchlevel 3 + Resolves: #1547804 + * Fri Feb 09 2018 Fedora Release Engineering - 7.0-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild