Accepting request 821442 from Base:System

- add upstream keyring and verify source signature
- change custom handling of official upstream patches to standard,
  and verify signatures on official patches (forwarded request 821348 from AndreasStieger)

OBS-URL: https://build.opensuse.org/request/show/821442
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/readline?expand=0&rev=8
This commit is contained in:
Dominique Leuenberger 2020-08-02 10:27:26 +00:00 committed by Git OBS Bridge
commit 50a33a3730
13 changed files with 312 additions and 66 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:aedc170e9734144597d14354a861c72d2288a20a8f96179b6a821066d828082a
size 2426

BIN
readline-8.0.tar.gz.sig Normal file

Binary file not shown.

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Thu Jul 16 19:13:54 UTC 2020 - Andreas Stieger <andreas.stieger@gmx.de>
- add upstream keyring and verify source signature
- change custom handling of official upstream patches to standard,
and verify signatures on official patches
-------------------------------------------------------------------
Thu Feb 13 11:10:31 UTC 2020 - Dr. Werner Fink <werner@suse.de>

24
readline.keyring Normal file
View File

@ -0,0 +1,24 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.2.4 (Darwin)
mQGiBEEOsGwRBACFa0A1oa71HSZLWxAx0svXzhOZNQZOzqHmSuGOG92jIpQpr8Dp
vgRh40YpAwdcXb8QG1J5yGAKeevNE1zCFaA725vGSdHUyypHouV0xoWwukYO6qly
yX+2BZU+okBUqoWQkoWxiYaCSfzB2Ln7pmdys1fJhcgBKf3VjWCjd2XJTwCgoFJO
wyBFJdugjfwjSoRSwDOIMf0D/iQKqlWhIO1LGpMrGX0il0/x4zj0NAcSwAk7LaPZ
bN4UPjn5pqGEHBlf1+xDDQCkAoZ/VqESGZragl4VqJfxBr29Ag0UDvNbUbXoxQsA
Rdero1M8GiAIRc50hj7HXFoERwenbNDJL86GPLAQOTGOCa4W2o29nFfFjQrsrrYH
zVtyA/9oyKvTeEMJ7NA3VJdWcmn7gOu0FxEmSNhSoV1T4vP21Wf7f5niCCRKQLNy
Uy0wEApQi4tSysdz+AbgAc0b/bHYVzIf2uO2lIEZQNNt+3g2bmXgloWmW5fsm/di
50Gm1l1Na63d3RZ00SeFQos6WEwLUHEB0yp6KXluXLLIZitEJLQaQ2hldCBSYW1l
eSA8Y2hldEBjd3J1LmVkdT6IXgQTEQIAHgUCQQ6wbAIbAwYLCQgHAwIDFQIDAxYC
AQIeAQIXgAAKCRC7WGnwZOp0q87NAJ99FEzFvDdYzqCczXF6KKXi7YN5OACfacDY
soZcnnsy7EjBZL0zwGwb/sG5AQ0EQQ6wbxAEAJCukwDigRDPhAuI+lf+6P64lWan
IFOXIndqhvU13cDbQ/Wt5LwPzm2QTvd7F+fcHOgZ8KOFScbDpjJaRqwIybMTcIN0
B2pBLX/C10W1aY+cUrXZgXUGVISEMmpaP9v02auToo7XXVEHC+XLO9IU7/xaU98F
L69l6/K4xeNSBRM/AAMHA/wNAmRBpcyK0+VggZ5esQaIP/LyolAm2qwcmrd3dZi+
g24s7yjV0EUwvRP7xHRDQFgkAo6++QbuecU/J90lxrVnQwucZmfz9zgWDkT/MpfB
/CNRSKLFjhYq2yHmHWT6vEjw9Ry/hF6Pc0oh1a62USdfaKAiim0nVxxQmPmiRvtC
mYhJBBgRAgAJBQJBDrBvAhsMAAoJELtYafBk6nSr43AAn2ZZFQg8Gs/zUzvXMt7e
vaFqVTzcAJ0cHtKpP1i/4H4R9+OsYeQdxxWxTQ==
=2MjR
-----END PGP PUBLIC KEY BLOCK-----

View File

@ -16,51 +16,61 @@
#
%define rl_major 8
Name: readline
BuildRequires: autoconf
BuildRequires: fdupes
%if %suse_version > 1220
BuildRequires: makeinfo
%endif
BuildRequires: ncurses-devel
BuildRequires: patchutils
BuildRequires: pkg-config
BuildRequires: sed
%define rextend %nil
Version: 8.0
Release: 0
Summary: The readline library
License: GPL-3.0-or-later
Group: Development/Libraries/C and C++
URL: http://www.gnu.org/software/readline/
URL: https://www.gnu.org/software/readline/
# Git: http://git.savannah.gnu.org/cgit/bash.git
Source0: ftp://ftp.gnu.org/gnu/readline/readline-%{version}%{rextend}.tar.gz
Source1: readline-%{version}-patches.tar.bz2
Source0: ftp://ftp.gnu.org/gnu/readline/readline-%{version}.tar.gz
Source1: ftp://ftp.gnu.org/gnu/readline/readline-%{version}.tar.gz.sig
Source2: baselibs.conf
Patch0: readline-%{version}.dif
Patch1: readline-6.3-input.dif
Patch2: readline-5.2-conf.patch
Patch3: readline-6.2-metamode.patch
Patch5: readline-6.2-xmalloc.dif
Patch6: readline-6.3-destdir.patch
Patch7: readline-6.3-rltrace.patch
Patch8: readline-7.0-screen.patch
%{expand: %%global rl_major %(echo %{version} | sed -r 's/.[0-9]+//g')}
Source4: https://tiswww.case.edu/php/chet/gpgkey.asc#/%{name}.keyring
# signatures for official patches
Source101: ftp://ftp.gnu.org/gnu/readline/readline-%{version}-patches/readline80-001.sig
Source102: ftp://ftp.gnu.org/gnu/readline/readline-%{version}-patches/readline80-002.sig
Source103: ftp://ftp.gnu.org/gnu/readline/readline-%{version}-patches/readline80-003.sig
Source104: ftp://ftp.gnu.org/gnu/readline/readline-%{version}-patches/readline80-004.sig
# official patches
Patch101: ftp://ftp.gnu.org/gnu/readline/readline-%{version}-patches/readline80-001
Patch102: ftp://ftp.gnu.org/gnu/readline/readline-%{version}-patches/readline80-002
Patch103: ftp://ftp.gnu.org/gnu/readline/readline-%{version}-patches/readline80-003
Patch104: ftp://ftp.gnu.org/gnu/readline/readline-%{version}-patches/readline80-004
# local patches
Patch200: readline-%{version}.dif
Patch201: readline-6.3-input.dif
Patch202: readline-5.2-conf.patch
Patch203: readline-6.2-metamode.patch
Patch205: readline-6.2-xmalloc.dif
Patch206: readline-6.3-destdir.patch
Patch207: readline-6.3-rltrace.patch
Patch208: readline-7.0-screen.patch
BuildRequires: autoconf
BuildRequires: fdupes
BuildRequires: ncurses-devel
BuildRequires: pkgconfig
#
%if 0%{?suse_version} > 1220
BuildRequires: makeinfo
%endif
%description
The readline library is used by the Bourne Again Shell (bash, the
standard command interpreter) for easy editing of command lines. This
includes history and search functionality.
%package -n libreadline8
%package -n libreadline%{rl_major}
Summary: The Readline Library
Group: System/Libraries
Provides: bash:/%{_lib}/libreadline.so.%{rl_major}
Suggests: readline-doc = %{version}
Provides: bash:/%{_lib}/libreadline.so.%{rl_major}
Provides: readline = %{version}
Obsoletes: readline <= 6.3
%description -n libreadline8
%description -n libreadline%{rl_major}
The readline library is used by the Bourne Again Shell (bash, the
standard command interpreter) for easy editing of command lines. This
includes history and search functionality.
@ -68,7 +78,7 @@ includes history and search functionality.
%package devel
Summary: Development files for readline
Group: Development/Libraries/C and C++
Requires: libreadline8 = %{version}
Requires: libreadline%{rl_major} = %{version}
Requires: ncurses-devel
Recommends: readline-doc = %{version}
@ -88,9 +98,10 @@ This package contains the static library for the readline library.
%package doc
Summary: Documentation how to Use and Program with the Readline Library
Group: Documentation/Other
Requires(post): %{install_info_prereq}
Requires(preun): %{install_info_prereq}
Supplements: (libreadline%{rl_major} and patterns-base-documentation)
Provides: readline:%{_infodir}/readline.info.gz
Supplements: packageand(libreadline8:patterns-base-documentation)
PreReq: %install_info_prereq
BuildArch: noarch
%description doc
@ -98,27 +109,21 @@ This package contains the documentation for using the readline library
as well as programming with the interface of the readline library.
%prep
%setup -q -n readline-%{version}%{rextend} -b1
for patch in ../readline-%{version}-patches/*; do
test -e $patch || break
let level=0 || true
file=$(lsdiff --files=1 $patch)
if test ! -e $file ; then
file=${file#*/}
let level++ || true
fi
sed -ri '/^\*\*\* \.\./{ s@\.\./readline-%{version}[^/]*/@@ }' $patch
echo Patch $patch
patch -s -p$level < $patch
done
%patch1 -p2 -b .zerotty
%patch2 -p2 -b .conf
%patch3 -p2 -b .metamode
%patch5 -p0 -b .xm
%patch6 -p0 -b .destdir
%patch7 -p2 -b .tmp
%patch8 -p2 -b .screen
%patch0 -p0 -b .0
%setup -q
# official patches
%patch101 -b .001
%patch102 -b .002
%patch103 -b .003
%patch104 -b .004
# local patches
%patch201 -p2 -b .zerotty
%patch202 -p2 -b .conf
%patch203 -p2 -b .metamode
%patch205 -b .xm
%patch206 -b .destdir
%patch207 -p2 -b .tmp
%patch208 -p2 -b .screen
%patch200 -b .0
%build
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
@ -193,6 +198,7 @@ CC_FOR_BUILD="$CC"
CFLAGS_FOR_BUILD="$CFLAGS"
LDFLAGS_FOR_BUILD="$LDFLAGS"
export CC_FOR_BUILD CFLAGS_FOR_BUILD LDFLAGS_FOR_BUILD CFLAGS LDFLAGS CC
# FIXME: you should use the %%configure macro
./configure --build=%{_target_cpu}-suse-linux \
--enable-static \
--enable-shared \
@ -203,8 +209,8 @@ export CC_FOR_BUILD CFLAGS_FOR_BUILD LDFLAGS_FOR_BUILD CFLAGS LDFLAGS CC
--infodir=%{_infodir} \
--docdir=%{_docdir}/%{name} \
--libdir=%{_libdir}
make
make documentation
%make_build
%make_build documentation
%install
%make_install htmldir=%{_docdir}/%{name} installdir=%{_docdir}/%{name}/examples \
@ -224,10 +230,8 @@ mv -vf %{buildroot}/%{_lib}/pkgconfig/readline.pc \
%{buildroot}/%{_libdir}/pkgconfig/readline.pc
rm -vrf %{buildroot}%{_datadir}/readline/
%post -n libreadline8 -p /sbin/ldconfig
%postun -n libreadline8 -p /sbin/ldconfig
%post -n libreadline%{rl_major} -p /sbin/ldconfig
%postun -n libreadline%{rl_major} -p /sbin/ldconfig
%post doc
%install_info --info-dir=%{_infodir} %{_infodir}/history.info.gz
%install_info --info-dir=%{_infodir} %{_infodir}/readline.info.gz
@ -238,7 +242,7 @@ rm -vrf %{buildroot}%{_datadir}/readline/
%install_info_delete --info-dir=%{_infodir} %{_infodir}/readline.info.gz
%install_info_delete --info-dir=%{_infodir} %{_infodir}/rluserman.info.gz
%files -n libreadline8
%files -n libreadline%{rl_major}
%license COPYING
/%{_lib}/libhistory.so.%{rl_major}
/%{_lib}/libhistory.so.%{version}
@ -256,11 +260,11 @@ rm -vrf %{buildroot}%{_datadir}/readline/
%{_libdir}/libreadline.a
%files doc
%doc %{_infodir}/history.info*
%doc %{_infodir}/readline.info*
%doc %{_infodir}/rluserman.info*
%doc %{_mandir}/man3/history.3*
%doc %{_mandir}/man3/readline.3*
%{_infodir}/history.info%{?ext_info}
%{_infodir}/readline.info%{?ext_info}
%{_infodir}/rluserman.info%{?ext_info}
%{_mandir}/man3/history.3%{?ext_man}
%{_mandir}/man3/readline.3%{?ext_man}
%doc %{_docdir}/%{name}/
%changelog

38
readline80-001 Normal file
View File

@ -0,0 +1,38 @@
READLINE PATCH REPORT
=====================
Readline-Release: 8.0
Patch-ID: readline80-001
Bug-Reported-by: chet.ramey@case.edu
Bug-Reference-ID:
Bug-Reference-URL:
Bug-Description:
The history file reading code doesn't close the file descriptor open to
the history file when it encounters a zero-length file.
Patch (apply with `patch -p0'):
*** ../readline-8.0-patched/histfile.c 2018-06-11 09:14:52.000000000 -0400
--- histfile.c 2019-05-16 15:55:57.000000000 -0400
***************
*** 306,309 ****
--- 312,316 ----
{
free (input);
+ close (file);
return 0; /* don't waste time if we don't have to */
}
*** ../readline-8.0/patchlevel 2013-11-15 08:11:11.000000000 -0500
--- patchlevel 2014-03-21 08:28:40.000000000 -0400
***************
*** 1,3 ****
# Do not edit -- exists only for use by patch
! 0
--- 1,3 ----
# Do not edit -- exists only for use by patch
! 1

BIN
readline80-001.sig Normal file

Binary file not shown.

60
readline80-002 Normal file
View File

@ -0,0 +1,60 @@
READLINE PATCH REPORT
=====================
Readline-Release: 8.0
Patch-ID: readline80-002
Bug-Reported-by: lessbug@qq.com
Bug-Reference-ID: <tencent_6AA531D9A5CC4121D86BD5CDA2E0DA98C605@qq.com>
Bug-Reference-URL:
Bug-Description:
When using previous-history to go back beyond the beginning of the history list,
it's possible to move to an incorrect partial line.
Patch (apply with `patch -p0'):
*** ../readline-8.0-patched/misc.c 2017-07-07 17:30:12.000000000 -0400
--- misc.c 2019-05-16 11:43:46.000000000 -0400
***************
*** 577,580 ****
--- 590,594 ----
{
HIST_ENTRY *old_temp, *temp;
+ int had_saved_line;
if (count < 0)
***************
*** 589,592 ****
--- 603,607 ----
/* 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 ();
***************
*** 612,616 ****
if (temp == 0)
{
! rl_maybe_unsave_line ();
rl_ding ();
}
--- 627,632 ----
if (temp == 0)
{
! if (had_saved_line == 0)
! _rl_free_saved_history_line ();
rl_ding ();
}
*** ../readline-8.0/patchlevel 2013-11-15 08:11:11.000000000 -0500
--- patchlevel 2014-03-21 08:28:40.000000000 -0400
***************
*** 1,3 ****
# Do not edit -- exists only for use by patch
! 1
--- 1,3 ----
# Do not edit -- exists only for use by patch
! 2

BIN
readline80-002.sig Normal file

Binary file not shown.

69
readline80-003 Normal file
View File

@ -0,0 +1,69 @@
READLINE PATCH REPORT
=====================
Readline-Release: 8.0
Patch-ID: readline80-003
Bug-Reported-by: HIROSE Masaaki <hirose31@gmail.com>
Bug-Reference-ID: <CAGSOfA-RqiTe=+GsXsDKyZrrMWH4bDbXgMVVegMa6OjqC5xbnQ@mail.gmail.com>
Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2019-05/msg00038.html
Bug-Description:
Reading history entries with timestamps can result in history entries joined
by linefeeds.
Patch (apply with `patch -p0'):
*** ../readline-8.0-patched/histfile.c 2018-06-11 09:14:52.000000000 -0400
--- histfile.c 2019-05-16 15:55:57.000000000 -0400
***************
*** 370,376 ****
has_timestamps = HIST_TIMESTAMP_START (buffer);
! history_multiline_entries += has_timestamps && history_write_timestamps;
/* Skip lines until we are at FROM. */
for (line_start = line_end = buffer; line_end < bufend && current_line < from; line_end++)
if (*line_end == '\n')
--- 370,378 ----
has_timestamps = HIST_TIMESTAMP_START (buffer);
! 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')
***************
*** 381,385 ****
--- 383,398 ----
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;
+ }
}
*** ../readline-8.0/patchlevel 2013-11-15 08:11:11.000000000 -0500
--- patchlevel 2014-03-21 08:28:40.000000000 -0400
***************
*** 1,3 ****
# Do not edit -- exists only for use by patch
! 2
--- 1,3 ----
# Do not edit -- exists only for use by patch
! 3

BIN
readline80-003.sig Normal file

Binary file not shown.

47
readline80-004 Normal file
View File

@ -0,0 +1,47 @@
READLINE PATCH REPORT
=====================
Readline-Release: 8.0
Patch-ID: readline80-004
Bug-Reported-by: auroralanes@protonmail.ch
Bug-Reference-ID: <WikEDKluAyoha9IDLp83rbN7_Uinr2rrpvSV_z4wmt9qur9piN-FNOn17P0cAizEVah1Fvc9d641vIIWX_7SC6EUTz0CatnOH-C-UK3rPYc=@protonmail.ch>
Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-readline/2020-01/msg00008.html
Bug-Description:
If writing the history file fails, and renaming the backup history file fails,
it's possible for readline's history code to return the wrong error to its
caller.
Patch (apply with `patch -p0'):
*** ../bash-20200124/lib/readline/histfile.c 2019-11-19 10:31:58.000000000 -0500
--- histfile.c 2020-02-01 16:28:29.000000000 -0500
***************
*** 621,624 ****
--- 621,625 ----
if (rv != 0)
{
+ rv = errno;
if (tempname)
unlink (tempname);
***************
*** 768,771 ****
--- 769,773 ----
if (rv != 0)
{
+ rv = errno;
if (tempname)
unlink (tempname);
*** ../readline-8.0/patchlevel 2013-11-15 08:11:11.000000000 -0500
--- patchlevel 2014-03-21 08:28:40.000000000 -0400
***************
*** 1,3 ****
# Do not edit -- exists only for use by patch
! 3
--- 1,3 ----
# Do not edit -- exists only for use by patch
! 4

BIN
readline80-004.sig Normal file

Binary file not shown.