Sync from SUSE:SLFO:Main readline revision d2c406b8e3973aa83000e27a3140c693
This commit is contained in:
commit
937956e756
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
9
baselibs.conf
Normal file
9
baselibs.conf
Normal file
@ -0,0 +1,9 @@
|
||||
libreadline8
|
||||
obsoletes "readline-<targettype> <= <version>"
|
||||
provides "readline-<targettype> = <version>"
|
||||
readline-devel
|
||||
requires -readline-<targettype>
|
||||
requires "libreadline8-<targettype> = <version>"
|
||||
conflicts "readline5-devel-<targettype>"
|
||||
conflicts "readline6-devel-<targettype>"
|
||||
conflicts "readline7-devel-<targettype>"
|
129
readline-5.2-conf.patch
Normal file
129
readline-5.2-conf.patch
Normal file
@ -0,0 +1,129 @@
|
||||
---
|
||||
lib/readline/bind.c | 55 ++++++++++++++++++++++++++++++++++++++++++++-----------
|
||||
lib/readline/doc/rluser.texi | 3 ++-
|
||||
lib/readline/rlconf.h | 2 +-
|
||||
3 files changed, 47 insertions(+), 13 deletions(-)
|
||||
|
||||
--- lib/readline/bind.c
|
||||
+++ lib/readline/bind.c 2022-04-28 12:11:29.254618915 +0000
|
||||
@@ -962,6 +962,9 @@ rl_trim_arg_from_keyseq (const char *key
|
||||
/* The last key bindings file read. */
|
||||
static char *last_readline_init_file = (char *)NULL;
|
||||
|
||||
+/* Flag to read system init file */
|
||||
+static int read_system_init_file = 0;
|
||||
+
|
||||
/* The file we're currently reading key bindings from. */
|
||||
static const char *current_readline_init_file;
|
||||
static int current_readline_init_include_level;
|
||||
@@ -1029,11 +1032,14 @@ rl_re_read_init_file (int count, int ign
|
||||
return r;
|
||||
}
|
||||
|
||||
+/* Forward declarations */
|
||||
+static int sv_bell_style PARAMS((const char *));
|
||||
+
|
||||
/* Do key bindings from a file. If FILENAME is NULL it defaults
|
||||
to the first non-null filename from this list:
|
||||
1. the filename used for the previous call
|
||||
2. the value of the shell variable `INPUTRC'
|
||||
- 3. ~/.inputrc
|
||||
+ 3. /etc/inputrc and ~/.inputrc
|
||||
4. /etc/inputrc
|
||||
If the file existed and could be opened and read, 0 is returned,
|
||||
otherwise errno is returned. */
|
||||
@@ -1042,18 +1048,39 @@ rl_read_init_file (const char *filename)
|
||||
{
|
||||
/* Default the filename. */
|
||||
if (filename == 0)
|
||||
- filename = last_readline_init_file;
|
||||
- if (filename == 0)
|
||||
- filename = sh_get_env_value ("INPUTRC");
|
||||
- if (filename == 0 || *filename == 0)
|
||||
+ {
|
||||
+ filename = last_readline_init_file;
|
||||
+ if (filename == 0)
|
||||
+ {
|
||||
+ filename = sh_get_env_value ("INPUTRC");
|
||||
+ read_system_init_file = 0;
|
||||
+ }
|
||||
+ if (filename == 0)
|
||||
+ {
|
||||
+ filename = DEFAULT_INPUTRC;
|
||||
+ read_system_init_file = 1;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (*filename == 0)
|
||||
{
|
||||
filename = DEFAULT_INPUTRC;
|
||||
- /* Try to read DEFAULT_INPUTRC; fall back to SYS_INPUTRC on failure */
|
||||
- if (_rl_read_init_file (filename, 0) == 0)
|
||||
- return 0;
|
||||
- filename = SYS_INPUTRC;
|
||||
+ read_system_init_file = 1;
|
||||
}
|
||||
|
||||
+ sv_bell_style(sh_get_env_value("DEFAULT_BELL_STYLE"));
|
||||
+
|
||||
+ if (read_system_init_file)
|
||||
+ if (filename == last_readline_init_file)
|
||||
+ {
|
||||
+ filename = savestring (filename);
|
||||
+ _rl_read_init_file (SYS_INPUTRC, 0);
|
||||
+ free (last_readline_init_file);
|
||||
+ last_readline_init_file = filename;
|
||||
+ }
|
||||
+ else
|
||||
+ _rl_read_init_file (SYS_INPUTRC, 0);
|
||||
+
|
||||
#if defined (__MSDOS__)
|
||||
if (_rl_read_init_file (filename, 0) == 0)
|
||||
return 0;
|
||||
@@ -1811,7 +1838,14 @@ rl_parse_and_bind (char *string)
|
||||
rl_macro_bind (seq, &funname[1], _rl_keymap);
|
||||
}
|
||||
else
|
||||
- rl_bind_keyseq (seq, rl_named_function (funname));
|
||||
+ {
|
||||
+#if defined (PREFIX_META_HACK)
|
||||
+ if (_rl_stricmp (funname, "prefix-meta") == 0)
|
||||
+ rl_generic_bind (ISKMAP, seq, (char *)emacs_meta_keymap, _rl_keymap);
|
||||
+ else
|
||||
+#endif
|
||||
+ rl_bind_keyseq (seq, rl_named_function (funname));
|
||||
+ }
|
||||
|
||||
xfree (seq);
|
||||
return 0;
|
||||
@@ -1985,7 +2019,6 @@ typedef int _rl_sv_func_t (const char *)
|
||||
/* Forward declarations */
|
||||
static int sv_region_start_color (const char *);
|
||||
static int sv_region_end_color (const char *);
|
||||
-static int sv_bell_style (const char *);
|
||||
static int sv_combegin (const char *);
|
||||
static int sv_dispprefix (const char *);
|
||||
static int sv_compquery (const char *);
|
||||
--- lib/readline/doc/rluser.texi
|
||||
+++ lib/readline/doc/rluser.texi 2022-04-28 12:10:02.600171100 +0000
|
||||
@@ -350,7 +350,8 @@ file is taken from the value of the envi
|
||||
@end ifclear
|
||||
that variable is unset, the default is @file{~/.inputrc}. If that
|
||||
file does not exist or cannot be read, the ultimate default is
|
||||
-@file{/etc/inputrc}.
|
||||
+@file{/etc/inputrc}. If both @file{~/.inputrc} and @file{/etc/inputrc}
|
||||
+exist Readline will read first @file{/etc/inputrc} and then @file{~/.inputrc}.
|
||||
@ifset BashFeatures
|
||||
The @w{@code{bind}} builtin command can also be used to set Readline
|
||||
keybindings and variables.
|
||||
--- lib/readline/rlconf.h
|
||||
+++ lib/readline/rlconf.h 2022-04-28 12:10:02.600171100 +0000
|
||||
@@ -37,7 +37,7 @@
|
||||
#define HANDLE_SIGNALS
|
||||
|
||||
/* Ugly but working hack for binding prefix meta. */
|
||||
-#define PREFIX_META_HACK
|
||||
+#undef PREFIX_META_HACK
|
||||
|
||||
/* The next-to-last-ditch effort file name for a user-specific init file. */
|
||||
#define DEFAULT_INPUTRC "~/.inputrc"
|
14
readline-6.2-metamode.patch
Normal file
14
readline-6.2-metamode.patch
Normal file
@ -0,0 +1,14 @@
|
||||
---
|
||||
lib/readline/bind.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
--- lib/readline/bind.c
|
||||
+++ lib/readline/bind.c 2018-09-20 06:40:06.799183658 +0000
|
||||
@@ -1958,6 +1958,7 @@ static const struct {
|
||||
#if defined (VISIBLE_STATS)
|
||||
{ "visible-stats", &rl_visible_stats, 0 },
|
||||
#endif /* VISIBLE_STATS */
|
||||
+ { "meta-mode", &_rl_enable_meta, 0 },
|
||||
{ (char *)NULL, (int *)NULL, 0 }
|
||||
};
|
||||
|
43
readline-6.2-xmalloc.dif
Normal file
43
readline-6.2-xmalloc.dif
Normal file
@ -0,0 +1,43 @@
|
||||
---
|
||||
xfree.c | 3 +++
|
||||
xmalloc.c | 5 +++++
|
||||
xmalloc.h | 8 ++++++++
|
||||
3 files changed, 16 insertions(+)
|
||||
|
||||
--- xfree.c
|
||||
+++ xfree.c 2018-09-20 06:41:57.485165699 +0000
|
||||
@@ -47,3 +47,6 @@ xfree (PTR_T string)
|
||||
if (string)
|
||||
free (string);
|
||||
}
|
||||
+
|
||||
+#undef xfree
|
||||
+extern void xfree PARAMS((void *)) __attribute__ ((weak, alias ("_rl_xfree")));
|
||||
--- xmalloc.c
|
||||
+++ xmalloc.c 2018-09-20 06:41:57.485165699 +0000
|
||||
@@ -73,3 +73,8 @@ xrealloc (PTR_T pointer, size_t bytes)
|
||||
memory_error_and_abort ("xrealloc");
|
||||
return (temp);
|
||||
}
|
||||
+
|
||||
+#undef xmalloc
|
||||
+#undef xrealloc
|
||||
+extern PTR_T xmalloc PARAMS((size_t)) __attribute__ ((weak, alias ("_rl_xmalloc")));
|
||||
+extern PTR_T xrealloc PARAMS((void *, size_t)) __attribute__ ((weak, alias ("_rl_xrealloc")));
|
||||
--- xmalloc.h
|
||||
+++ xmalloc.h 2018-09-20 06:41:57.485165699 +0000
|
||||
@@ -38,6 +38,14 @@
|
||||
|
||||
#endif /* !PTR_T */
|
||||
|
||||
+#undef xmalloc
|
||||
+#undef xrealloc
|
||||
+#undef xfree
|
||||
+
|
||||
+#define xmalloc _rl_xmalloc
|
||||
+#define xrealloc _rl_xrealloc
|
||||
+#define xfree _rl_xfree
|
||||
+
|
||||
extern PTR_T xmalloc (size_t);
|
||||
extern PTR_T xrealloc (void *, size_t);
|
||||
extern void xfree (void *);
|
173
readline-6.3-destdir.patch
Normal file
173
readline-6.3-destdir.patch
Normal file
@ -0,0 +1,173 @@
|
||||
---
|
||||
shlib/Makefile.in | 9 +++++----
|
||||
support/shlib-install | 39 +++++++++++++++++++++++----------------
|
||||
2 files changed, 28 insertions(+), 20 deletions(-)
|
||||
|
||||
--- shlib/Makefile.in
|
||||
+++ shlib/Makefile.in 2020-10-12 15:18:05.027444750 +0000
|
||||
@@ -59,6 +59,7 @@ bindir = @bindir@
|
||||
libdir = @libdir@
|
||||
datadir = @datadir@
|
||||
localedir = @localedir@
|
||||
+linkagedir = $(libdir)
|
||||
|
||||
# Support an alternate destination root directory for package building
|
||||
DESTDIR =
|
||||
@@ -192,8 +193,8 @@ installdirs: $(topdir)/support/mkdirs
|
||||
-$(SHELL) $(topdir)/support/mkdirs $(DESTDIR)$(bindir)
|
||||
|
||||
install-supported: installdirs $(SHLIB_STATUS)
|
||||
- $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -V $(host_vendor) -d $(DESTDIR)$(libdir) -b $(DESTDIR)$(bindir) -i "$(INSTALL_DATA)" $(SHARED_HISTORY)
|
||||
- $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -V $(host_vendor) -d $(DESTDIR)$(libdir) -b $(DESTDIR)$(bindir) -i "$(INSTALL_DATA)" $(SHARED_READLINE)
|
||||
+ $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -V $(host_vendor) -dd $(DESTDIR) -d $(libdir) -l $(linkagedir) -b $(bindir) -i "$(INSTALL_DATA)" $(SHARED_HISTORY)
|
||||
+ $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -V $(host_vendor) -dd $(DESTDIR) -d $(libdir) -l $(linkagedir) -b $(bindir) -i "$(INSTALL_DATA)" $(SHARED_READLINE)
|
||||
@echo install: you may need to run ldconfig
|
||||
|
||||
install-unsupported:
|
||||
@@ -202,8 +203,8 @@ install-unsupported:
|
||||
install: install-$(SHLIB_STATUS)
|
||||
|
||||
uninstall-supported:
|
||||
- $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -V $(host_vendor) -d $(DESTDIR)$(libdir) -b $(DESTDIR)$(bindir) -U $(SHARED_HISTORY)
|
||||
- $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -V $(host_vendor) -d $(DESTDIR)$(libdir) -b $(DESTDIR)$(bindir) -U $(SHARED_READLINE)
|
||||
+ $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -V $(host_vendor) -dd $(DESTDIR) -d $(libdir) -l $(linkagedir) -b $(bindir) -U $(SHARED_HISTORY)
|
||||
+ $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -V $(host_vendor) -dd $(DESTDIR) -d $(libdir) -l $(linkagedir) -b $(bindir) -U $(SHARED_READLINE)
|
||||
@echo uninstall: you may need to run ldconfig
|
||||
|
||||
uninstall-unsupported:
|
||||
--- support/shlib-install
|
||||
+++ support/shlib-install 2020-10-12 15:24:18.932389177 +0000
|
||||
@@ -3,7 +3,7 @@
|
||||
# shlib-install - install a shared library and do any necessary host-specific
|
||||
# post-installation configuration (like ldconfig)
|
||||
#
|
||||
-# usage: shlib-install [-D] -O host_os [-V host_vendor] -d installation-dir [-b bin-dir] -i install-prog [-U] library
|
||||
+# usage: shlib-install [-D] -O host_os [-V host_vendor] -d installation-dir [-l linkage-dir] [-b bin-dir] -i install-prog [-U] library
|
||||
#
|
||||
# Chet Ramey
|
||||
# chet@po.cwru.edu
|
||||
@@ -12,7 +12,9 @@
|
||||
# defaults
|
||||
#
|
||||
INSTALLDIR=/usr/local/lib
|
||||
+LINKAGEDIR=
|
||||
LDCONFIG=ldconfig
|
||||
+DESTDIR=
|
||||
|
||||
PROGNAME=`basename $0`
|
||||
USAGE="$PROGNAME [-D] -O host_os [-V host_vendor] -d installation-dir [-b bin-dir] -i install-prog [-U] library"
|
||||
@@ -24,14 +26,19 @@ while [ $# -gt 0 ]; do
|
||||
-O) shift; host_os="$1"; shift ;;
|
||||
-V) shift; host_vendor="$1"; shift ;;
|
||||
-d) shift; INSTALLDIR="$1"; shift ;;
|
||||
+ -dd) shift; DESTDIR=$1; shift ;;
|
||||
-b) shift; BINDIR="$1" ; shift ;;
|
||||
-i) shift; INSTALLPROG="$1" ; shift ;;
|
||||
+ -l) shift; LINKAGEDIR="$1" ; shift ;;
|
||||
-D) echo=echo ; shift ;;
|
||||
-U) uninstall=true ; shift ;;
|
||||
-*) echo "$USAGE" >&2 ; exit 2;;
|
||||
*) break ;;
|
||||
esac
|
||||
done
|
||||
+if [ -z "$LINKAGEDIR" ]; then
|
||||
+ LINKAGEDIR="$INSTALLDIR"
|
||||
+fi
|
||||
|
||||
# set install target name
|
||||
LIBNAME="$1"
|
||||
@@ -49,18 +56,18 @@ LN="ln -s"
|
||||
# pre-install
|
||||
|
||||
if [ -z "$uninstall" ]; then
|
||||
- ${echo} $RM ${INSTALLDIR}/${LIBNAME}.${OLDSUFF}
|
||||
- if [ -f "$INSTALLDIR/$LIBNAME" ]; then
|
||||
- ${echo} $MV $INSTALLDIR/$LIBNAME ${INSTALLDIR}/${LIBNAME}.${OLDSUFF}
|
||||
+ ${echo} $RM ${DESTDIR}${INSTALLDIR}/${LIBNAME}.${OLDSUFF}
|
||||
+ if [ -f "${DESTDIR}$INSTALLDIR/$LIBNAME" ]; then
|
||||
+ ${echo} $MV ${DESTDIR}$INSTALLDIR/$LIBNAME ${DESTDIR}${INSTALLDIR}/${LIBNAME}.${OLDSUFF}
|
||||
fi
|
||||
fi
|
||||
|
||||
# install/uninstall
|
||||
|
||||
if [ -z "$uninstall" ] ; then
|
||||
- ${echo} eval ${INSTALLPROG} $LIBNAME ${INSTALLDIR}/${LIBNAME}
|
||||
+ ${echo} eval ${INSTALLPROG} $LIBNAME ${DESTDIR}${INSTALLDIR}/${LIBNAME}
|
||||
else
|
||||
- ${echo} ${RM} ${INSTALLDIR}/${LIBNAME}
|
||||
+ ${echo} ${RM} ${DESTDIR}${INSTALLDIR}/${LIBNAME}
|
||||
fi
|
||||
|
||||
# post-install/uninstall
|
||||
@@ -73,7 +80,7 @@ fi
|
||||
case "$host_os" in
|
||||
hpux*|darwin*|macosx*|linux*|solaris2*)
|
||||
if [ -z "$uninstall" ]; then
|
||||
- chmod 755 ${INSTALLDIR}/${LIBNAME}
|
||||
+ chmod 755 ${DESTDIR}${INSTALLDIR}/${LIBNAME}
|
||||
fi ;;
|
||||
cygwin*|mingw*)
|
||||
IMPLIBNAME=`echo ${LIBNAME} \
|
||||
@@ -111,8 +118,8 @@ case "$LIBNAME" in
|
||||
LINK1=`echo $LIBNAME | sed 's:\(.*\)\.[0-9]\.[0-9]:\1:'` # libname.dylib
|
||||
esac
|
||||
|
||||
-INSTALL_LINK1='${echo} cd $INSTALLDIR && ${echo} ${LN} $LIBNAME $LINK1'
|
||||
-INSTALL_LINK2='${echo} cd $INSTALLDIR && ${echo} ${LN} $LIBNAME $LINK2'
|
||||
+INSTALL_LINK1='${echo} cd ${DESTDIR}$INSTALLDIR && ${echo} ${LN} $LIBNAME $LINK1'
|
||||
+INSTALL_LINK2='${echo} cd ${DESTDIR}$INSTALLDIR && ${echo} ${LN} $LIBNAME $LINK2'
|
||||
|
||||
#
|
||||
# Create symlinks to the installed library. This section is incomplete.
|
||||
@@ -120,27 +127,27 @@ INSTALL_LINK2='${echo} cd $INSTALLDIR &&
|
||||
case "$host_os-$host_vendor" in
|
||||
*linux*|freebsd*|dragonfly*)
|
||||
# libname.so.M -> libname.so.M.N
|
||||
- ${echo} ${RM} ${INSTALLDIR}/$LINK2
|
||||
+ ${echo} ${RM} ${DESTDIR}${INSTALLDIR}/$LINK2
|
||||
if [ -z "$uninstall" ]; then
|
||||
eval $INSTALL_LINK2
|
||||
fi
|
||||
|
||||
# libname.so -> libname.so.M
|
||||
- ${echo} ${RM} ${INSTALLDIR}/$LINK1
|
||||
+ ${echo} ${RM} ${DESTDIR}${INSTALLDIR}/$LINK1
|
||||
if [ -z "$uninstall" ]; then
|
||||
- ${echo} cd $INSTALLDIR && ${echo} ${LN} $LINK2 $LINK1
|
||||
+ ${echo} cd ${DESTDIR}$INSTALLDIR && ${echo} ${LN} $LINK2 $LINK1
|
||||
fi
|
||||
;;
|
||||
|
||||
bsdi4*|*gnu*|darwin*|macosx*|netbsd*|mirbsd*)
|
||||
# libname.so.M -> libname.so.M.N
|
||||
- ${echo} ${RM} ${INSTALLDIR}/$LINK2
|
||||
+ ${echo} ${RM} ${DESTDIR}${INSTALLDIR}/$LINK2
|
||||
if [ -z "$uninstall" ]; then
|
||||
eval $INSTALL_LINK2
|
||||
fi
|
||||
|
||||
# libname.so -> libname.so.M.N
|
||||
- ${echo} ${RM} ${INSTALLDIR}/$LINK1
|
||||
+ ${echo} ${RM} ${DESTDIR}${INSTALLDIR}/$LINK1
|
||||
if [ -z "$uninstall" ]; then
|
||||
eval $INSTALL_LINK1
|
||||
fi
|
||||
@@ -148,7 +155,7 @@ bsdi4*|*gnu*|darwin*|macosx*|netbsd*|mir
|
||||
|
||||
solaris2*|aix4.[2-9]*|aix[5-9]*|osf*|irix[56]*|sysv[45]*|dgux*|interix*)
|
||||
# libname.so -> libname.so.M
|
||||
- ${echo} ${RM} ${INSTALLDIR}/$LINK1
|
||||
+ ${echo} ${RM} ${DESTDIR}${INSTALLDIR}/$LINK1
|
||||
if [ -z "$uninstall" ]; then
|
||||
eval $INSTALL_LINK1
|
||||
fi
|
||||
@@ -156,7 +163,7 @@ solaris2*|aix4.[2-9]*|aix[5-9]*|osf*|iri
|
||||
|
||||
hpux1*)
|
||||
# libname.sl -> libname.M
|
||||
- ${echo} ${RM} ${INSTALLDIR}/$LINK1.sl
|
||||
+ ${echo} ${RM} ${DESTDIR}${INSTALLDIR}/$LINK1.sl
|
||||
if [ -z "$uninstall" ]; then
|
||||
eval $INSTALL_LINK1
|
||||
fi
|
51
readline-6.3-input.dif
Normal file
51
readline-6.3-input.dif
Normal file
@ -0,0 +1,51 @@
|
||||
---
|
||||
lib/readline/input.c | 7 ++++++-
|
||||
lib/readline/readline.c | 7 +++++++
|
||||
2 files changed, 13 insertions(+), 1 deletion(-)
|
||||
|
||||
--- lib/readline/input.c
|
||||
+++ lib/readline/input.c 2018-11-29 08:29:58.432878428 +0000
|
||||
@@ -799,6 +799,8 @@ rl_read_key (void)
|
||||
return (c);
|
||||
}
|
||||
|
||||
+extern int _rl_read_zero_char_from_tty;
|
||||
+
|
||||
int
|
||||
rl_getc (FILE *stream)
|
||||
{
|
||||
@@ -846,7 +848,10 @@ rl_getc (FILE *stream)
|
||||
/* If zero characters are returned, then the file that we are
|
||||
reading from is empty! Return EOF in that case. */
|
||||
if (result == 0)
|
||||
- return (EOF);
|
||||
+ {
|
||||
+ _rl_read_zero_char_from_tty = 1;
|
||||
+ return (EOF);
|
||||
+ }
|
||||
|
||||
#if defined (__BEOS__)
|
||||
if (errno == EINTR)
|
||||
--- lib/readline/readline.c
|
||||
+++ lib/readline/readline.c 2018-11-29 08:29:58.432878428 +0000
|
||||
@@ -557,6 +557,9 @@ _rl_internal_char_cleanup (void)
|
||||
_rl_erase_entire_line ();
|
||||
}
|
||||
|
||||
+/* Catch EOF from tty, do not return command line */
|
||||
+int _rl_read_zero_char_from_tty = 0;
|
||||
+
|
||||
STATIC_CALLBACK int
|
||||
#if defined (READLINE_CALLBACKS)
|
||||
readline_internal_char (void)
|
||||
@@ -614,6 +617,10 @@ readline_internal_charloop (void)
|
||||
c = rl_read_key ();
|
||||
RL_UNSETSTATE(RL_STATE_READCMD);
|
||||
|
||||
+ /* Return here if terminal is closed */
|
||||
+ if (c == EOF && _rl_read_zero_char_from_tty)
|
||||
+ return (rl_done = 1);
|
||||
+
|
||||
/* look at input.c:rl_getc() for the circumstances under which this will
|
||||
be returned; punt immediately on read error without converting it to
|
||||
a newline; assume that rl_read_key has already called the signal
|
42
readline-6.3-rltrace.patch
Normal file
42
readline-6.3-rltrace.patch
Normal file
@ -0,0 +1,42 @@
|
||||
Even if used only by developers to debug readline library do not open
|
||||
temporary files from public location without O_EXCL (bcn#868822).
|
||||
|
||||
---
|
||||
lib/readline/util.c | 9 ++++++---
|
||||
1 file changed, 6 insertions(+), 3 deletions(-)
|
||||
|
||||
--- lib/readline/util.c
|
||||
+++ lib/readline/util.c 2018-09-20 06:47:51.238715688 +0000
|
||||
@@ -489,10 +489,12 @@ _rl_trace (va_alist)
|
||||
|
||||
if (_rl_tracefp == 0)
|
||||
_rl_tropen ();
|
||||
+ if (!_rl_tracefp)
|
||||
+ goto out;
|
||||
vfprintf (_rl_tracefp, format, args);
|
||||
fprintf (_rl_tracefp, "\n");
|
||||
fflush (_rl_tracefp);
|
||||
-
|
||||
+out:
|
||||
va_end (args);
|
||||
}
|
||||
|
||||
@@ -512,7 +514,7 @@ _rl_tropen (void)
|
||||
#endif
|
||||
snprintf (fnbuf, sizeof (fnbuf), "%s/rltrace.%ld", x, (long)getpid());
|
||||
unlink(fnbuf);
|
||||
- _rl_tracefp = fopen (fnbuf, "w+");
|
||||
+ _rl_tracefp = fopen (fnbuf, "w+xe");
|
||||
return _rl_tracefp != 0;
|
||||
}
|
||||
|
||||
@@ -521,7 +523,8 @@ _rl_trclose (void)
|
||||
{
|
||||
int r;
|
||||
|
||||
- r = fclose (_rl_tracefp);
|
||||
+ if (_rl_tracefp)
|
||||
+ r = fclose (_rl_tracefp);
|
||||
_rl_tracefp = 0;
|
||||
return r;
|
||||
}
|
49
readline-7.0-screen.patch
Normal file
49
readline-7.0-screen.patch
Normal file
@ -0,0 +1,49 @@
|
||||
Special for screen and its new TERM setting like TERM=screen.xterm-256color
|
||||
Map all "screen(-xxx)?.yyy(-zzz)?" to "screen" as well as map "konsole(-xxx)?"
|
||||
and "gnome(-xxx)?" to "xterm".
|
||||
|
||||
This helps to get /etc/inputrc work for most users.
|
||||
|
||||
---
|
||||
lib/readline/bind.c | 19 +++++++++++++++++--
|
||||
1 file changed, 17 insertions(+), 2 deletions(-)
|
||||
|
||||
--- lib/readline/bind.c
|
||||
+++ lib/readline/bind.c 2019-08-16 08:26:42.327029248 +0000
|
||||
@@ -1313,19 +1313,34 @@ parser_if (char *args)
|
||||
word in ARGS is the same as the value stored in rl_readline_name. */
|
||||
if (rl_terminal_name && _rl_strnicmp (args, "term=", 5) == 0)
|
||||
{
|
||||
- char *tem, *tname;
|
||||
+ char *tem, *tname, *talias;
|
||||
|
||||
- /* Terminals like "aaa-60" are equivalent to "aaa". */
|
||||
tname = savestring (rl_terminal_name);
|
||||
+ /* Various terminal types of screen are equivalent to "screen" */
|
||||
+ if (_rl_strnicmp (rl_terminal_name, "screen", 6) == 0)
|
||||
+ {
|
||||
+ tem = strchr (tname, '.');
|
||||
+ if (tem)
|
||||
+ *tem = '\0';
|
||||
+ }
|
||||
+ /* Terminals like "aaa-60" are equivalent to "aaa". */
|
||||
tem = strchr (tname, '-');
|
||||
if (tem)
|
||||
*tem = '\0';
|
||||
|
||||
+ /* Map terminal types "konsole" and "gnome" to "xterm" nowadays */
|
||||
+ talias = tname;
|
||||
+ if (_rl_stricmp("konsole", tname) == 0)
|
||||
+ talias = "xterm";
|
||||
+ if (_rl_stricmp("gnome", tname) == 0)
|
||||
+ talias = "xterm";
|
||||
+
|
||||
/* Test the `long' and `short' forms of the terminal name so that
|
||||
if someone has a `sun-cmd' and does not want to have bindings
|
||||
that will be executed if the terminal is a `sun', they can put
|
||||
`$if term=sun-cmd' into their .inputrc. */
|
||||
_rl_parsing_conditionalized_out = _rl_stricmp (args + 5, tname) &&
|
||||
+ _rl_stricmp (args + 5, talias) &&
|
||||
_rl_stricmp (args + 5, rl_terminal_name);
|
||||
xfree (tname);
|
||||
}
|
173
readline-8.2.dif
Normal file
173
readline-8.2.dif
Normal file
@ -0,0 +1,173 @@
|
||||
---
|
||||
Makefile.in | 4 +---
|
||||
complete.c | 6 +++---
|
||||
doc/Makefile.in | 2 +-
|
||||
doc/readline.3 | 11 +++++++++++
|
||||
examples/fileman.c | 2 +-
|
||||
history.h | 1 +
|
||||
readline.c | 7 +++++--
|
||||
readline.h | 3 ++-
|
||||
support/shobj-conf | 5 +++--
|
||||
9 files changed, 28 insertions(+), 13 deletions(-)
|
||||
|
||||
--- Makefile.in
|
||||
+++ Makefile.in 2022-04-28 12:16:56.148759888 +0000
|
||||
@@ -252,10 +252,8 @@ uninstall-pc:
|
||||
maybe-uninstall-pc: uninstall-pc
|
||||
|
||||
install-static: installdirs $(STATIC_LIBS) install-headers install-doc ${install_examples} install-pc
|
||||
- -$(MV) $(DESTDIR)$(libdir)/libreadline.a $(DESTDIR)$(libdir)/libreadline.old
|
||||
$(INSTALL_DATA) libreadline.a $(DESTDIR)$(libdir)/libreadline.a
|
||||
-test -n "$(RANLIB)" && $(RANLIB) $(DESTDIR)$(libdir)/libreadline.a
|
||||
- -$(MV) $(DESTDIR)$(libdir)/libhistory.a $(DESTDIR)$(libdir)/libhistory.old
|
||||
$(INSTALL_DATA) libhistory.a $(DESTDIR)$(libdir)/libhistory.a
|
||||
-test -n "$(RANLIB)" && $(RANLIB) $(DESTDIR)$(libdir)/libhistory.a
|
||||
|
||||
@@ -286,7 +284,7 @@ install-doc: installdirs
|
||||
$(INSTALL_DATA) $(OTHER_DOCS) $(DESTDIR)$(docdir)
|
||||
-( if test -d doc ; then \
|
||||
cd doc && \
|
||||
- ${MAKE} ${MFLAGS} infodir=$(infodir) DESTDIR=${DESTDIR} install; \
|
||||
+ ${MAKE} infodir=$(infodir) DESTDIR=${DESTDIR} install; \
|
||||
fi )
|
||||
|
||||
uninstall-doc:
|
||||
--- complete.c
|
||||
+++ complete.c 2022-04-28 12:16:56.148759888 +0000
|
||||
@@ -1148,7 +1148,7 @@ _rl_find_completion_word (int *fp, int *
|
||||
/* We didn't find an unclosed quoted substring upon which to do
|
||||
completion, so use the word break characters to find the
|
||||
substring on which to complete. */
|
||||
- while (rl_point = MB_PREVCHAR (rl_line_buffer, rl_point, MB_FIND_ANY))
|
||||
+ while ((rl_point = MB_PREVCHAR (rl_line_buffer, rl_point, MB_FIND_ANY)))
|
||||
{
|
||||
scan = rl_line_buffer[rl_point];
|
||||
|
||||
@@ -2216,7 +2216,7 @@ rl_completion_matches (const char *text,
|
||||
match_list = (char **)xmalloc ((match_list_size + 1) * sizeof (char *));
|
||||
match_list[1] = (char *)NULL;
|
||||
|
||||
- while (string = (*entry_function) (text, matches))
|
||||
+ while ((string = (*entry_function) (text, matches)))
|
||||
{
|
||||
if (RL_SIG_RECEIVED ())
|
||||
{
|
||||
@@ -2288,7 +2288,7 @@ rl_username_completion_function (const c
|
||||
}
|
||||
|
||||
#if defined (HAVE_GETPWENT)
|
||||
- while (entry = getpwent ())
|
||||
+ while ((entry = getpwent ()))
|
||||
{
|
||||
/* Null usernames should result in all users as possible completions. */
|
||||
if (namelen == 0 || (STREQN (username, entry->pw_name, namelen)))
|
||||
--- doc/Makefile.in
|
||||
+++ doc/Makefile.in 2022-04-28 12:16:56.148759888 +0000
|
||||
@@ -107,7 +107,7 @@ DIST_DOCS = $(DVIOBJ) $(PSOBJ) $(HTMLOBJ
|
||||
# $(RM) $@
|
||||
# -${TEXI2PDF} $<
|
||||
|
||||
-all: info dvi html ps text pdf
|
||||
+all: info html
|
||||
nodvi: info html text
|
||||
|
||||
xdist: $(DIST_DOCS)
|
||||
--- doc/readline.3
|
||||
+++ doc/readline.3 2022-04-28 12:16:56.148759888 +0000
|
||||
@@ -119,6 +119,14 @@ environment variable. If that variable
|
||||
.IR ~/.inputrc .
|
||||
If that file does not exist or cannot be read, the ultimate default is
|
||||
.IR /etc/inputrc .
|
||||
+If both files
|
||||
+.I ~/.inputrc
|
||||
+and
|
||||
+.I /etc/inputrc
|
||||
+exist readline will read first
|
||||
+.I /etc/inputrc
|
||||
+and then
|
||||
+.IR ~/.inputrc .
|
||||
When a program which uses the readline library starts up, the
|
||||
init file is read, and the key bindings and variables are set.
|
||||
There are only a few basic constructs allowed in the
|
||||
@@ -1564,6 +1572,9 @@ VI Command Mode functions
|
||||
.TP
|
||||
.FN ~/.inputrc
|
||||
Individual \fBreadline\fP initialization file
|
||||
+.TP
|
||||
+.FN /etc/inputrc
|
||||
+System \fBreadline\fP initialization file
|
||||
.PD
|
||||
.SH AUTHORS
|
||||
Brian Fox, Free Software Foundation
|
||||
--- examples/fileman.c
|
||||
+++ examples/fileman.c 2022-04-28 12:26:35.022374539 +0000
|
||||
@@ -377,7 +377,7 @@ com_stat (arg)
|
||||
|
||||
printf ("Statistics for `%s':\n", arg);
|
||||
|
||||
- printf ("%s has %d link%s, and is %lu byte%s in length.\n",
|
||||
+ printf ("%s has %lu link%s, and is %lu byte%s in length.\n",
|
||||
arg,
|
||||
finfo.st_nlink,
|
||||
(finfo.st_nlink == 1) ? "" : "s",
|
||||
--- history.h
|
||||
+++ history.h 2022-04-28 12:16:56.152759816 +0000
|
||||
@@ -32,6 +32,7 @@ extern "C" {
|
||||
# include "rlstdc.h"
|
||||
# include "rltypedefs.h"
|
||||
#else
|
||||
+# include <stdio.h>
|
||||
# include <readline/rlstdc.h>
|
||||
# include <readline/rltypedefs.h>
|
||||
#endif
|
||||
--- readline.c
|
||||
+++ readline.c 2022-04-28 12:16:56.152759816 +0000
|
||||
@@ -906,8 +906,11 @@ _rl_dispatch_subseq (register int key, K
|
||||
{
|
||||
/* Special case rl_do_lowercase_version (). */
|
||||
if (func == rl_do_lowercase_version)
|
||||
- /* Should we do anything special if key == ANYOTHERKEY? */
|
||||
- return (_rl_dispatch (_rl_to_lower ((unsigned char)key), map));
|
||||
+ {
|
||||
+ if (key == ANYOTHERKEY)
|
||||
+ return -1;
|
||||
+ return (_rl_dispatch (_rl_to_lower ((unsigned char)key), map));
|
||||
+ }
|
||||
|
||||
rl_executing_keymap = map;
|
||||
rl_executing_key = key;
|
||||
--- readline.h
|
||||
+++ readline.h 2022-04-28 12:17:48.115828027 +0000
|
||||
@@ -32,6 +32,7 @@ extern "C" {
|
||||
# include "keymaps.h"
|
||||
# include "tilde.h"
|
||||
#else
|
||||
+# include <stdio.h>
|
||||
# include <readline/rlstdc.h>
|
||||
# include <readline/rltypedefs.h>
|
||||
# include <readline/keymaps.h>
|
||||
@@ -496,7 +497,7 @@ extern char *rl_filename_completion_func
|
||||
|
||||
extern int rl_completion_mode (rl_command_func_t *);
|
||||
|
||||
-#if 0
|
||||
+#ifdef OLD_READLINE
|
||||
/* Backwards compatibility (compat.c). These will go away sometime. */
|
||||
extern void free_undo_list (void);
|
||||
extern int maybe_save_line (void);
|
||||
--- support/shobj-conf
|
||||
+++ support/shobj-conf 2022-04-28 12:18:35.078985803 +0000
|
||||
@@ -126,10 +126,11 @@ sunos5*|solaris2*)
|
||||
linux*-*|gnu*-*|k*bsd*-gnu-*|midnightbsd*|freebsd*|dragonfly*)
|
||||
SHOBJ_CFLAGS=-fPIC
|
||||
SHOBJ_LD='${CC}'
|
||||
- SHOBJ_LDFLAGS='-shared -Wl,-soname,$@'
|
||||
+ SHOBJ_LDFLAGS='-shared'
|
||||
|
||||
- SHLIB_XLDFLAGS='-Wl,-rpath,$(libdir) -Wl,-soname,`basename $@ $(SHLIB_MINOR)`'
|
||||
+ SHLIB_XLDFLAGS='-Wl,-rpath-link,$(libdir) -Wl,-soname,`basename $@ $(SHLIB_MINOR)`'
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
|
||||
+ echo 'int main () { return 0; }' | gcc -ltinfo -o /dev/null -xc - > /dev/null 2>&1 && SHLIB_LIBS=-ltinfo || SHLIB_LIBS=-lncurses
|
||||
;;
|
||||
|
||||
# Darwin/MacOS X
|
BIN
readline-8.2.tar.gz
(Stored with Git LFS)
Normal file
BIN
readline-8.2.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
readline-8.2.tar.gz.sig
Normal file
BIN
readline-8.2.tar.gz.sig
Normal file
Binary file not shown.
3050
readline.changes
Normal file
3050
readline.changes
Normal file
File diff suppressed because it is too large
Load Diff
24
readline.keyring
Normal file
24
readline.keyring
Normal 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-----
|
300
readline.spec
Normal file
300
readline.spec
Normal file
@ -0,0 +1,300 @@
|
||||
#
|
||||
# spec file for package readline
|
||||
#
|
||||
# Copyright (c) 2022 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%define rl_major 8
|
||||
%define rextend %{nil}
|
||||
|
||||
Name: readline
|
||||
Version: 8.2
|
||||
Release: 0
|
||||
Summary: The readline library
|
||||
License: GPL-3.0-or-later
|
||||
Group: Development/Libraries/C and C++
|
||||
URL: https://www.gnu.org/software/readline/
|
||||
# Git: http://git.savannah.gnu.org/cgit/bash.git
|
||||
Source0: https://ftp.gnu.org/gnu/readline/readline-%{version}%{rextend}.tar.gz
|
||||
Source1: https://ftp.gnu.org/gnu/readline/readline-%{version}%{rextend}.tar.gz.sig
|
||||
Source2: baselibs.conf
|
||||
Source4: https://tiswww.case.edu/php/chet/gpgkey.asc#/%{name}.keyring
|
||||
# signatures for official patches
|
||||
# official patches
|
||||
Patch101: readline82-001
|
||||
Source101: readline82-001.sig
|
||||
# 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 libreadline%{rl_major}
|
||||
Summary: The Readline Library
|
||||
Group: System/Libraries
|
||||
Suggests: readline-doc = %{version}
|
||||
Provides: bash:/%{_lib}/libreadline.so.%{rl_major}
|
||||
Provides: readline = %{version}
|
||||
Obsoletes: readline <= 6.3
|
||||
|
||||
%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.
|
||||
|
||||
%package devel
|
||||
Summary: Development files for readline
|
||||
Group: Development/Libraries/C and C++
|
||||
Requires: libreadline%{rl_major} = %{version}
|
||||
Requires: ncurses-devel
|
||||
Recommends: readline-doc = %{version}
|
||||
|
||||
%description devel
|
||||
This package contains the header files for the readline library.
|
||||
|
||||
%package devel-static
|
||||
Summary: Static library for development with readline
|
||||
Group: Development/Libraries/C and C++
|
||||
Requires: ncurses-devel
|
||||
Requires: readline-devel = %{version}
|
||||
Recommends: readline-doc = %{version}
|
||||
|
||||
%description devel-static
|
||||
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
|
||||
Supplements: (libreadline%{rl_major} and patterns-base-documentation)
|
||||
Provides: readline:%{_infodir}/readline.info.gz
|
||||
BuildArch: noarch
|
||||
|
||||
%description doc
|
||||
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}
|
||||
# official patches
|
||||
%patch101 -p0
|
||||
# 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
|
||||
LANG=POSIX
|
||||
LC_ALL=$LANG
|
||||
unset LC_CTYPE
|
||||
autoconf
|
||||
cflags ()
|
||||
{
|
||||
local flag=$1; shift
|
||||
local var=$1; shift
|
||||
test -n "${flag}" -a -n "${var}" || return
|
||||
case "${!var}" in
|
||||
*${flag}*) return
|
||||
esac
|
||||
set -o noclobber
|
||||
case "$flag" in
|
||||
-Wl,*)
|
||||
if echo 'int main () { return 0; }' | \
|
||||
${CC:-gcc} -Werror $flag -o /dev/null -xc - > /dev/null 2>&1 ; then
|
||||
eval $var=\${$var:+\$$var\ }$flag
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
if ${CC:-gcc} -Werror ${flag/#-Wno-/-W} -S -o /dev/null -xc /dev/null > /dev/null 2>&1 ; then
|
||||
eval $var=\${$var:+\$$var\ }$flag
|
||||
fi
|
||||
if ${CXX:-g++} -Werror ${flag/#-Wno-/-W} -S -o /dev/null -xc++ /dev/null > /dev/null 2>&1 ; then
|
||||
eval $var=\${$var:+\$$var\ }$flag
|
||||
fi
|
||||
esac
|
||||
set +o noclobber
|
||||
}
|
||||
LARGEFILE="$(getconf LFS_CFLAGS)"
|
||||
(cat > dyn.map)<<-'EOF'
|
||||
{
|
||||
*;
|
||||
!rl_*stream;
|
||||
};
|
||||
EOF
|
||||
(cat > rl.map)<<-'EOF'
|
||||
READLINE_6.3 {
|
||||
rl_change_environment;
|
||||
rl_clear_history;
|
||||
rl_executing_key;
|
||||
rl_executing_keyseq;
|
||||
rl_filename_stat_hook;
|
||||
rl_history_substr_search_backward;
|
||||
rl_history_substr_search_forward;
|
||||
rl_input_available_hook;
|
||||
rl_print_last_kbd_macro;
|
||||
rl_signal_event_hook;
|
||||
};
|
||||
|
||||
READLINE_7.0 {
|
||||
rl_bracketed_paste_begin;
|
||||
rl_callback_sigcleanup;
|
||||
rl_clear_visible_line;
|
||||
rl_pending_signal;
|
||||
rl_redraw_prompt_last_line;
|
||||
rl_tty_set_echoing;
|
||||
rl_vi_unix_word_rubout;
|
||||
rl_vi_yank_pop;
|
||||
history_file_version;
|
||||
history_lines_read_from_file;
|
||||
history_lines_written_to_file;
|
||||
history_multiline_entries;
|
||||
rl_persistent_signal_handlers;
|
||||
history_file_version;
|
||||
history_lines_read_from_file;
|
||||
history_lines_written_to_file;
|
||||
history_multiline_entries;
|
||||
rl_persistent_signal_handlers;
|
||||
} READLINE_6.3;
|
||||
|
||||
READLINE_8.0 {
|
||||
remove_history_range;
|
||||
rl_check_signals;
|
||||
rl_empty_keymap;
|
||||
rl_function_of_keyseq_len;
|
||||
rl_next_screen_line;
|
||||
rl_previous_screen_line;
|
||||
rl_set_keymap_name;
|
||||
history_quoting_state;
|
||||
} READLINE_7.0;
|
||||
|
||||
READLINE_8.1 {
|
||||
rl_activate_mark;
|
||||
rl_clear_display;
|
||||
rl_deactivate_mark;
|
||||
rl_keep_mark_active;
|
||||
rl_mark_active_p;
|
||||
rl_operate_and_get_next;
|
||||
} READLINE_8.0;
|
||||
|
||||
READLINE_8.2 {
|
||||
rl_fetch_history;
|
||||
rl_set_timeout;
|
||||
rl_timeout_remaining;
|
||||
rl_trim_arg_from_keyseq;
|
||||
rl_eof_found;
|
||||
rl_timeout_event_hook;
|
||||
} READLINE_8.1;
|
||||
EOF
|
||||
found=0
|
||||
for rl in %{_libdir}/libreadline.so.*.*
|
||||
do
|
||||
test READLINE_${rl##/*.so.} = READLINE_%{version} && found=1
|
||||
done
|
||||
if test $found = 0
|
||||
then
|
||||
%{warn:Warning, ABI change likely}
|
||||
sleep 5
|
||||
fi
|
||||
|
||||
CFLAGS="%{optflags} $LARGEFILE -D_GNU_SOURCE -D_RPM_OPT_FLAGS -g"
|
||||
LDFLAGS=""
|
||||
cflags -Wuninitialized CFLAGS
|
||||
cflags -Wextra CFLAGS
|
||||
cflags -Wno-unprototyped-calls CFLAGS
|
||||
cflags -Wno-switch-enum CFLAGS
|
||||
cflags -Wno-unused-variable CFLAGS
|
||||
cflags -Wno-unused-parameter CFLAGS
|
||||
cflags -Wno-parentheses CFLAGS
|
||||
cflags -ftree-loop-linear CFLAGS
|
||||
cflags -pipe CFLAGS
|
||||
cflags -Wl,--as-needed LDFLAGS
|
||||
cflags -Wl,-O2 LDFLAGS
|
||||
cflags -Wl,--version-script=${PWD}/rl.map LDFLAGS
|
||||
cflags -Wl,--dynamic-list=${PWD}/dyn.map LDFLAGS
|
||||
CC=gcc
|
||||
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 \
|
||||
--enable-multibyte \
|
||||
--disable-bracketed-paste-default \
|
||||
--prefix=%{_prefix} \
|
||||
--with-curses \
|
||||
--mandir=%{_mandir} \
|
||||
--infodir=%{_infodir} \
|
||||
--docdir=%{_docdir}/%{name} \
|
||||
--libdir=%{_libdir}
|
||||
%make_build
|
||||
%make_build documentation
|
||||
|
||||
%install
|
||||
%make_install everything htmldir=%{_docdir}/%{name} installdir=%{_docdir}/%{name}/examples
|
||||
|
||||
%post -n libreadline%{rl_major} -p /sbin/ldconfig
|
||||
%postun -n libreadline%{rl_major} -p /sbin/ldconfig
|
||||
|
||||
%files -n libreadline%{rl_major}
|
||||
%license COPYING
|
||||
%{_libdir}/libhistory.so.%{rl_major}
|
||||
%{_libdir}/libhistory.so.%{version}
|
||||
%{_libdir}/libreadline.so.%{rl_major}
|
||||
%{_libdir}/libreadline.so.%{version}
|
||||
|
||||
%files devel
|
||||
%{_includedir}/readline/
|
||||
%{_libdir}/libhistory.so
|
||||
%{_libdir}/libreadline.so
|
||||
%{_libdir}/pkgconfig/history.pc
|
||||
%{_libdir}/pkgconfig/readline.pc
|
||||
|
||||
%files devel-static
|
||||
%{_libdir}/libhistory.a
|
||||
%{_libdir}/libreadline.a
|
||||
|
||||
%files doc
|
||||
%{_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
|
42
readline82-001
Normal file
42
readline82-001
Normal file
@ -0,0 +1,42 @@
|
||||
READLINE PATCH REPORT
|
||||
=====================
|
||||
|
||||
Readline-Release: 8.2
|
||||
Patch-ID: readline82-001
|
||||
|
||||
Bug-Reported-by: Kan-Ru Chen <koster@debian.org>
|
||||
Bug-Reference-ID:
|
||||
Bug-Reference-URL: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1021109
|
||||
|
||||
Bug-Description:
|
||||
|
||||
Starting a readline application with an invalid locale specification for
|
||||
LC_ALL/LANG/LC_CTYPE can cause it crash on the first call to readline.
|
||||
|
||||
Patch (apply with `patch -p0'):
|
||||
|
||||
*** ../readline-8.2-patched/nls.c 2022-08-15 09:38:51.000000000 -0400
|
||||
--- nls.c 2022-10-05 09:23:22.000000000 -0400
|
||||
***************
|
||||
*** 142,145 ****
|
||||
--- 142,149 ----
|
||||
lspec = "";
|
||||
ret = setlocale (LC_CTYPE, lspec); /* ok, since it does not change locale */
|
||||
+ if (ret == 0 || *ret == 0)
|
||||
+ ret = setlocale (LC_CTYPE, (char *)NULL);
|
||||
+ if (ret == 0 || *ret == 0)
|
||||
+ ret = RL_DEFAULT_LOCALE;
|
||||
#else
|
||||
ret = (lspec == 0 || *lspec == 0) ? RL_DEFAULT_LOCALE : lspec;
|
||||
|
||||
*** ../readline-8.2/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
readline82-001.sig
Normal file
BIN
readline82-001.sig
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user