diff --git a/fix-file-descriptor-leak-with-z.patch b/fix-file-descriptor-leak-with-z.patch deleted file mode 100644 index dc0622ea4bbfbb9909a893ad842c57464f21d901..0000000000000000000000000000000000000000 --- a/fix-file-descriptor-leak-with-z.patch +++ /dev/null @@ -1,35 +0,0 @@ -From f585708e822e021e15e5bece1de482b63ba581df Mon Sep 17 00:00:00 2001 -From: Chet Ramey -Date: Wed, 14 Aug 2019 11:28:48 -0400 -Subject: [PATCH 1/4] Readline-8.0 patch 1: fix file descriptor leak with - zero-length history file - ---- - histfile.c | 1 + - patchlevel | 2 +- - 2 files changed, 2 insertions(+), 1 deletion(-) - -diff --git a/histfile.c b/histfile.c -index dc64bde..a8a92aa 100644 ---- a/histfile.c -+++ b/histfile.c -@@ -305,6 +305,7 @@ read_history_range (const char *filename, int from, int to) - if (file_size == 0) - { - free (input); -+ close (file); - return 0; /* don't waste time if we don't have to */ - } - -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 --- -1.8.3.1 - diff --git a/fix-problems-moving-back-beyond-start-of-history.patch b/fix-problems-moving-back-beyond-start-of-history.patch deleted file mode 100644 index f820309789d5fa23da354c9c9e9dd06412cdb621..0000000000000000000000000000000000000000 --- a/fix-problems-moving-back-beyond-start-of-history.patch +++ /dev/null @@ -1,52 +0,0 @@ -From d063aa6a54e670adeaa9b71385394dbf8dc9ff63 Mon Sep 17 00:00:00 2001 -From: Chet Ramey -Date: Fri, 7 Feb 2020 14:56:45 -0500 -Subject: [PATCH 2/4] fix problems moving back beyond start of history - ---- - misc.c | 5 ++++- - patchlevel | 2 +- - 2 files changed, 5 insertions(+), 2 deletions(-) - -diff --git a/misc.c b/misc.c -index 64b1457..42005b0 100644 ---- a/misc.c -+++ b/misc.c -@@ -576,6 +576,7 @@ int - rl_get_previous_history (int count, int key) - { - HIST_ENTRY *old_temp, *temp; -+ int had_saved_line; - - if (count < 0) - return (rl_get_next_history (-count, key)); -@@ -588,6 +589,7 @@ rl_get_previous_history (int count, int key) - _rl_history_saved_point = (rl_point == rl_end) ? -1 : rl_point; - - /* If we don't have a line saved, then save this one. */ -+ had_saved_line = _rl_saved_line_for_history != 0; - rl_maybe_save_line (); - - /* If the current line has changed, save the changes. */ -@@ -611,7 +613,8 @@ rl_get_previous_history (int count, int key) - - if (temp == 0) - { -- rl_maybe_unsave_line (); -+ if (had_saved_line == 0) -+ _rl_free_saved_history_line (); - rl_ding (); - } - else -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 --- -1.8.3.1 - diff --git a/problems-restoring-the-history-file-are-not-signaled.patch b/problems-restoring-the-history-file-are-not-signaled.patch deleted file mode 100644 index 51766b1c5f3b9312489437f82295edd83fa65346..0000000000000000000000000000000000000000 --- a/problems-restoring-the-history-file-are-not-signaled.patch +++ /dev/null @@ -1,43 +0,0 @@ -From c5ad6be530f5c1daf64a2d20df4baba9f6b57aa4 Mon Sep 17 00:00:00 2001 -From: Chet Ramey -Date: Fri, 7 Feb 2020 14:58:55 -0500 -Subject: [PATCH 4/4] problems restoring the history file are not signaled - correctly to the calling application - ---- - histfile.c | 2 ++ - patchlevel | 2 +- - 2 files changed, 3 insertions(+), 1 deletion(-) - -diff --git a/histfile.c b/histfile.c -index 6c3adc9..8eb3496 100644 ---- a/histfile.c -+++ b/histfile.c -@@ -620,6 +620,7 @@ history_truncate_file (const char *fname, int lines) - - if (rv != 0) - { -+ rv = errno; - if (tempname) - unlink (tempname); - history_lines_written_to_file = 0; -@@ -767,6 +768,7 @@ mmap_error: - - if (rv != 0) - { -+ rv = errno; - if (tempname) - unlink (tempname); - history_lines_written_to_file = 0; -diff --git a/patchlevel b/patchlevel -index ce3e355..626a945 100644 ---- a/patchlevel -+++ b/patchlevel -@@ -1,3 +1,3 @@ - # Do not edit -- exists only for use by patch - --3 -+4 --- -1.8.3.1 - diff --git a/reading-history-entries-with-timestamps-can-result-i.patch b/reading-history-entries-with-timestamps-can-result-i.patch deleted file mode 100644 index 9e69e375cfdbd09427cb3582284dcdc676247f5d..0000000000000000000000000000000000000000 --- a/reading-history-entries-with-timestamps-can-result-i.patch +++ /dev/null @@ -1,59 +0,0 @@ -From f5720c8cabbdb2387b4dc9e36633a73df6a634da Mon Sep 17 00:00:00 2001 -From: Chet Ramey -Date: Fri, 7 Feb 2020 14:57:47 -0500 -Subject: [PATCH 3/4] reading history entries with timestamps can result in - joined entries - ---- - histfile.c | 15 ++++++++++++++- - patchlevel | 2 +- - 2 files changed, 15 insertions(+), 2 deletions(-) - -diff --git a/histfile.c b/histfile.c -index a8a92aa..6c3adc9 100644 ---- a/histfile.c -+++ b/histfile.c -@@ -369,9 +369,11 @@ read_history_range (const char *filename, int from, int to) - } - - has_timestamps = HIST_TIMESTAMP_START (buffer); -- history_multiline_entries += has_timestamps && history_write_timestamps; -+ history_multiline_entries += has_timestamps && history_write_timestamps; - - /* Skip lines until we are at FROM. */ -+ if (has_timestamps) -+ last_ts = buffer; - for (line_start = line_end = buffer; line_end < bufend && current_line < from; line_end++) - if (*line_end == '\n') - { -@@ -380,7 +382,18 @@ read_history_range (const char *filename, int from, int to) - line. We should check more extensively here... */ - if (HIST_TIMESTAMP_START(p) == 0) - current_line++; -+ else -+ last_ts = p; - line_start = p; -+ /* If we are at the last line (current_line == from) but we have -+ timestamps (has_timestamps), then line_start points to the -+ text of the last command, and we need to skip to its end. */ -+ if (current_line >= from && has_timestamps) -+ { -+ for (line_end = p; line_end < bufend && *line_end != '\n'; line_end++) -+ ; -+ line_start = (*line_end == '\n') ? line_end + 1 : line_end; -+ } - } - - /* If there are lines left to gobble, then gobble them now. */ -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 --- -1.8.3.1 - diff --git a/readline-8.0-shlib.patch b/readline-8.0-shlib.patch index bbcf82b0b902adf82d23f59b6dd9bb793bfcd209..7a65e0ce86a9af5d86f492eb5c3699f378cb3783 100644 --- a/readline-8.0-shlib.patch +++ b/readline-8.0-shlib.patch @@ -9,7 +9,7 @@ Subject: [PATCH] shlib 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/shlib/Makefile.in b/shlib/Makefile.in -index eb16211..3a34840 100644 +index d138524..b68b0cc 100644 --- a/shlib/Makefile.in +++ b/shlib/Makefile.in @@ -178,7 +178,7 @@ $(SHARED_READLINE): $(SHARED_OBJ) @@ -22,11 +22,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/shobj-conf b/support/shobj-conf -index 1f64433..40827a4 100644 +index 5a3f977..0668a33 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-*|freebsd*|dragonfly*) SHOBJ_CFLAGS=-fPIC SHOBJ_LD='${CC}' - SHOBJ_LDFLAGS='-shared -Wl,-soname,$@' @@ -38,7 +38,7 @@ index 1f64433..40827a4 100644 + SHLIB_LIBS='-ltinfo' ;; - freebsd2*) + # Darwin/MacOS X -- -1.9.3 +1.8.3.1 diff --git a/readline-8.0.tar.gz b/readline-8.1.tar.gz similarity index 30% rename from readline-8.0.tar.gz rename to readline-8.1.tar.gz index a44bd03f685809861b829d1620b3ae89d97952ed..6dcc949fd974ab414efb7539997e2a900b948dbf 100644 Binary files a/readline-8.0.tar.gz and b/readline-8.1.tar.gz differ diff --git a/readline.spec b/readline.spec index d3800a198709575727e965bebb6c80068e0c8e48..0adf1a72a7e8a09681504644374f9f88a155866c 100644 --- a/readline.spec +++ b/readline.spec @@ -1,6 +1,6 @@ Name: readline -Version: 8.0 -Release: 3 +Version: 8.1 +Release: 1 Summary: Readline library for editing typed command lines License: GPLv3+ @@ -8,10 +8,6 @@ URL: http://tiswww.case.edu/php/chet/readline/rltop.html Source0: http://git.savannah.gnu.org/cgit/readline.git/snapshot/%{name}-%{version}.tar.gz Patch0: readline-8.0-shlib.patch -Patch1: fix-file-descriptor-leak-with-z.patch -Patch2: fix-problems-moving-back-beyond-start-of-history.patch -Patch3: reading-history-entries-with-timestamps-can-result-i.patch -Patch4: problems-restoring-the-history-file-are-not-signaled.patch BuildRequires: gcc gcc-c++ ncurses-devel @@ -83,6 +79,9 @@ export CPPFLAGS="-I%{_includedir}/ncurses" %changelog +* Sat Nov 27 2021 yangzhuangzhuang - 8.1-1 +- update version to 8.1 + * Thu Jun 24 2021 yangzhuangzhuang - 8.0-3 - Delete useless old version dynamic library