Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
831b2e5a69
!31 [sync] PR-28: Switch bracketed-paste mode from on to off to keep consistent with realine-8.0
From: @openeuler-sync-bot 
Reviewed-by: @hubin95 
Signed-off-by: @hubin95
2023-06-27 11:17:06 +00:00
chenziyang
ba16435dfb update readline.spec.
Add shell command to switch bracketed-paste mode from on to off to keep consistent with realine-8.0

Signed-off-by: 陈子扬 <chenziyang4@huawei.com>
(cherry picked from commit ffd252ec95142a0fb3f30250d7d61d1ce6f9fcb8)
2023-06-27 10:49:28 +08:00
openeuler-ci-bot
69ba0a33b2
!24 【轻量级 PR】:rebuild for next release
From: @markeryang 
Reviewed-by: @xiezhipeng1 
Signed-off-by: @xiezhipeng1
2022-11-01 09:21:07 +00:00
Markeryang
6e27040e4b
update for mass rebuild and upgrade verification 2022-10-25 08:40:39 +00:00
openeuler-ci-bot
cbe8222866 !22 update version to 8.1
Merge pull request !22 from 杨壮壮/openEuler-22.03-LTS-Next
2021-12-13 12:10:20 +00:00
yang_zhuang_zhuang
d5b813e09e update version to 8.1 2021-11-27 15:22:45 +08:00
openeuler-ci-bot
809d23e5dd !14 删除升级时拷贝的低版本动态库
From: @yang_zhuang_zhuang
Reviewed-by: @xiezhipeng1
Signed-off-by: @xiezhipeng1
2021-06-24 07:18:47 +00:00
yang_zhuang_zhuang
d8f282b5a4 Delete useless old version dynamic library 2021-06-24 14:46:02 +08:00
openeuler-ci-bot
0bb2c95db3 !9 Modify URL
From: @zou_lin77
Reviewed-by: @licihua
Signed-off-by: @licihua
2020-12-10 11:16:01 +08:00
zou_lin77
8f9ffdcce4 Modify URL 2020-12-09 16:38:04 +08:00
8 changed files with 28 additions and 203 deletions

View File

@ -1,35 +0,0 @@
From f585708e822e021e15e5bece1de482b63ba581df Mon Sep 17 00:00:00 2001
From: Chet Ramey <chet.ramey@case.edu>
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

View File

@ -1,52 +0,0 @@
From d063aa6a54e670adeaa9b71385394dbf8dc9ff63 Mon Sep 17 00:00:00 2001
From: Chet Ramey <chet.ramey@case.edu>
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

View File

@ -1,43 +0,0 @@
From c5ad6be530f5c1daf64a2d20df4baba9f6b57aa4 Mon Sep 17 00:00:00 2001
From: Chet Ramey <chet.ramey@case.edu>
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

View File

@ -1,59 +0,0 @@
From f5720c8cabbdb2387b4dc9e36633a73df6a634da Mon Sep 17 00:00:00 2001
From: Chet Ramey <chet.ramey@case.edu>
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

View File

@ -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

Binary file not shown.

BIN
readline-8.1.tar.gz Normal file

Binary file not shown.

View File

@ -1,19 +1,15 @@
Name: readline
Version: 8.0
Release: 1
Version: 8.1
Release: 3
Summary: Readline library for editing typed command lines
License: GPLv3+
URL: http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html
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 readline
BuildRequires: gcc gcc-c++ ncurses-devel
%description
The GNU Readline library provides a set of functions for use by
@ -56,7 +52,6 @@ export CPPFLAGS="-I%{_includedir}/ncurses"
%install
%make_install
cp -a %{_libdir}/lib{readline,history}.so.7* %{buildroot}%{_libdir}
%ldconfig_scriptlets
@ -82,8 +77,27 @@ cp -a %{_libdir}/lib{readline,history}.so.7* %{buildroot}%{_libdir}
%exclude %{_infodir}/dir*
%{_mandir}/man3/*.3.gz
%posttrans
if ! grep -q "enable-bracketed-paste" /etc/inputrc; then
echo "set enable-bracketed-paste 0" >> /etc/inputrc
fi
%changelog
* Wed Jun 14 2023 chenziyang <chenziyang4@huawei.com> - 8.1-3
- Add shell command to switch bracketed-paste mode from on to off to keep consistent with realine-8.0
* Tue Oct 25 2022 yanglongkang <yanglongkang@h-partners.com> - 8.1-2
- rebuild for next release
* Sat Nov 27 2021 yangzhuangzhuang <yangzhuangzhuang1@huawei.com> - 8.1-1
- update version to 8.1
* Thu Jun 24 2021 yangzhuangzhuang <yangzhuangzhuang1@huawei.com> - 8.0-3
- Delete useless old version dynamic library
* Wed Dec 9 2020 zoulin <zoulin13@huawei.com> - 8.0-2
- Modify URL
* Mon Jul 13 2020 wangchen <wangchen137@huawei.com> - 8.0-1
- update to 8.0