From 3c98f4d9b35683b4c3c50e3a7d3cf10c71632c7e Mon Sep 17 00:00:00 2001 From: Siteshwar Vashisht Date: Mon, 12 Feb 2024 15:03:55 +0100 Subject: [PATCH] Fix an issue with adding newline in bracketed paste mode Resolves: #2168963 --- bash-5.2-add-newline.patch | 12 ++++++++++++ bash.spec | 9 ++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 bash-5.2-add-newline.patch diff --git a/bash-5.2-add-newline.patch b/bash-5.2-add-newline.patch new file mode 100644 index 0000000..073374f --- /dev/null +++ b/bash-5.2-add-newline.patch @@ -0,0 +1,12 @@ +diff --git a/lib/readline/rltty.c b/lib/readline/rltty.c +--- a/lib/readline/rltty.c ++++ b/lib/readline/rltty.c +@@ -694,6 +694,8 @@ rl_deprep_terminal (void) + fprintf (rl_outstream, BRACK_PASTE_FINI); + if (_rl_eof_found) + fprintf (rl_outstream, "\n"); ++ else if (_rl_echoing_p == 0) ++ fprintf (rl_outstream, "\n"); + } + + if (_rl_enable_keypad) diff --git a/bash.spec b/bash.spec index 85059ac..1b991d8 100644 --- a/bash.spec +++ b/bash.spec @@ -6,7 +6,7 @@ Version: %{baseversion}%{patchleveltag} Name: bash Summary: The GNU Bourne Again shell -Release: 7%{?dist} +Release: 8%{?dist} License: GPLv3+ Url: https://www.gnu.org/software/bash Source0: https://ftp.gnu.org/gnu/bash/bash-%{baseversion}.tar.gz @@ -94,6 +94,9 @@ Patch130: bash-5.2-check-xform.patch # Enable audit logs Patch131: bash-4.3-audit.patch +# Fix an issue with adding newline in bracketed paste mode +Patch132: bash-5.2-add-newline.patch + BuildRequires: gcc BuildRequires: texinfo bison BuildRequires: ncurses-devel @@ -326,6 +329,10 @@ end %{_libdir}/pkgconfig/%{name}.pc %changelog +* Mon Feb 12 2024 Siteshwar Vashisht - 5.1.8-8 +- Fix an issue with adding newline in bracketed paste mode + Resolves: #2168963 + * Wed Jan 24 2024 Siteshwar Vashisht - 5.1.8-7 - Restore audit logs in bash-4.3 or newer versions Resolves: RHEL-22619