The readline 6.3 is moved to readline-compat. The old 5.2 version is continue to be built in compat
Signed-off-by: Marcel Lorenz marcel.lorenz@ipfire.org --- config/rootfiles/common/readline | 8 +++--- config/rootfiles/common/readline-compat | 4 +++ lfs/readline | 12 ++++----- lfs/readline-compat | 40 ++++++++++++++++++---------- src/patches/readline/readline63-007 | 47 +++++++++++++++++++++++++++++++++ src/patches/readline/readline63-008 | 47 +++++++++++++++++++++++++++++++++ 6 files changed, 134 insertions(+), 24 deletions(-) create mode 100644 src/patches/readline/readline63-007 create mode 100644 src/patches/readline/readline63-008
diff --git a/config/rootfiles/common/readline b/config/rootfiles/common/readline index b2ac26d..412de70 100644 --- a/config/rootfiles/common/readline +++ b/config/rootfiles/common/readline @@ -8,11 +8,11 @@ #usr/include/readline/rltypedefs.h #usr/include/readline/tilde.h #usr/lib/libhistory.so -usr/lib/libhistory.so.6 -usr/lib/libhistory.so.6.3 +usr/lib/libhistory.so.7 +usr/lib/libhistory.so.7.0 #usr/lib/libreadline.so -usr/lib/libreadline.so.6 -usr/lib/libreadline.so.6.3 +usr/lib/libreadline.so.7 +usr/lib/libreadline.so.7.0 #usr/share/doc/readline #usr/share/doc/readline/CHANGES #usr/share/doc/readline/INSTALL diff --git a/config/rootfiles/common/readline-compat b/config/rootfiles/common/readline-compat index 1ff7325..ade6e6f 100644 --- a/config/rootfiles/common/readline-compat +++ b/config/rootfiles/common/readline-compat @@ -2,3 +2,7 @@ lib/libhistory.so.5 lib/libhistory.so.5.2 lib/libreadline.so.5 lib/libreadline.so.5.2 +usr/lib/libhistory.so.6 +usr/lib/libhistory.so.6.3 +usr/lib/libreadline.so.6 +usr/lib/libreadline.so.6.3 diff --git a/lfs/readline b/lfs/readline index eb488e3..1e3ea47 100644 --- a/lfs/readline +++ b/lfs/readline @@ -1,7 +1,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2007 Michael Tremer & Christian Schmidt # +# Copyright (C) 2016 IPFire Team info@ipfire.org # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -24,7 +24,7 @@
include Config
-VER = 6.3 +VER = 7.0
THISAPP = readline-$(VER) DL_FILE = $(THISAPP).tar.gz @@ -40,7 +40,7 @@ objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
-$(DL_FILE)_MD5 = 33c8fb279e981274f485fd91da77e94a +$(DL_FILE)_MD5 = 205b03a87fc83dab653b628c59b9fc91
install : $(TARGET)
@@ -71,9 +71,9 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
- for i in $$(seq 1 6); do \ - cd $(DIR_APP) && patch -Np0 < $(DIR_SRC)/src/patches/readline/readline63-$$(printf "%03d" "$${i}") || exit 1; \ - done + # prevent in some cases to trigger a linking bug in ldconfig + cd $(DIR_APP) && sed -i '/MV.*old/d' Makefile.in + cd $(DIR_APP) && sed -i '/{OLDSUFF}/c:' support/shlib-install
cd $(DIR_APP) && ./configure --prefix=/usr --disable-static cd $(DIR_APP) && make $(MAKETUNING) SHLIB_LIBS=-lncurses diff --git a/lfs/readline-compat b/lfs/readline-compat index 2f4388c..75675a0 100644 --- a/lfs/readline-compat +++ b/lfs/readline-compat @@ -24,7 +24,7 @@
include Config
-VER = 5.2 +VER = 6.3
THISAPP = readline-$(VER) DL_FILE = $(THISAPP).tar.gz @@ -36,11 +36,13 @@ TARGET = $(DIR_INFO)/$(THISAPP) # Top-level Rules ###############################################################################
-objects = $(DL_FILE) +objects = $(DL_FILE) readline-5.2.tar.gz
-$(DL_FILE) = $(DL_FROM)/$(DL_FILE) +$(DL_FILE) = $(DL_FROM)/$(DL_FILE) +readline-5.2.tar.gz = $(DL_FROM)/readline-5.2.tar.gz
-$(DL_FILE)_MD5 = e39331f32ad14009b9ff49cc10c5e751 +$(DL_FILE)_MD5 = 33c8fb279e981274f485fd91da77e94a +readline-5.2.tar.gz_MD5 = e39331f32ad14009b9ff49cc10c5e751
install : $(TARGET)
@@ -70,17 +72,27 @@ $(subst %,%_MD5,$(objects)) : $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE) - - for i in $$(seq 1 14); do \ - cd $(DIR_APP) && patch -Np0 < $(DIR_SRC)/src/patches/readline/readline52-$$(printf "%03d" "$${i}") || exit 1; \ + for i in $$(seq 1 8); do \ + cd $(DIR_APP) && patch -Np0 < $(DIR_SRC)/src/patches/readline/readline63-$$(printf "%03d" "$${i}") || exit 1; \ done - - cd $(DIR_APP) && ./configure --prefix=/usr --libdir=/lib --disable-static + cd $(DIR_APP) && ./configure --prefix=/usr --disable-static cd $(DIR_APP) && make $(MAKETUNING) SHLIB_LIBS=-lncurses - - cd $(DIR_APP)/shlib && install -m 755 libreadline.so.$(VER) /lib - cd $(DIR_APP)/shlib && install -m 755 libhistory.so.$(VER) /lib - ln -svf libreadline.so.$(VER) /lib/libreadline.so.5 - ln -svf libhistory.so.$(VER) /lib/libhistory.so.5 + cd $(DIR_APP)/shlib && install -m 755 libreadline.so.$(VER) /usr/lib + cd $(DIR_APP)/shlib && install -m 755 libhistory.so.$(VER) /usr/lib + ln -svf libreadline.so.$(VER) /usr/lib/libreadline.so.6 + ln -svf libhistory.so.$(VER) /usr/lib/libhistory.so.6 @rm -rf $(DIR_APP) + + # build 5.2 version + cd $(DIR_SRC) && tar axf $(DIR_DL)/readline-5.2.tar.gz + for i in $$(seq 1 14); do \ + cd $(DIR_SRC)/readline-5.2 && patch -Np0 < $(DIR_SRC)/src/patches/readline/readline52-$$(printf "%03d" "$${i}") || exit 1; \ + done + cd $(DIR_SRC)/readline-5.2 && ./configure --prefix=/usr --libdir=/lib --disable-static + cd $(DIR_SRC)/readline-5.2 && make $(MAKETUNING) SHLIB_LIBS=-lncurses + cd $(DIR_SRC)/readline-5.2/shlib && install -m 755 libreadline.so.5.2 /lib + cd $(DIR_SRC)/readline-5.2/shlib && install -m 755 libhistory.so.5.2 /lib + ln -svf libreadline.so.5.2 /lib/libreadline.so.5 + ln -svf libhistory.so.5.2 /lib/libhistory.so.5 + @rm -rf $(DIR_SRC)/readline-5.2 @$(POSTBUILD) diff --git a/src/patches/readline/readline63-007 b/src/patches/readline/readline63-007 new file mode 100644 index 0000000..1b65792 --- /dev/null +++ b/src/patches/readline/readline63-007 @@ -0,0 +1,47 @@ + READLINE PATCH REPORT + ===================== + +Readline-Release: 6.3 +Patch-ID: readline63-007 + +Bug-Reported-by: John Lenton +Bug-Reference-ID: +Bug-Reference-URL: https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1317476 + +Bug-Description: + +Readline should allow SIGALRM and SIGVTALRM (if available) to `interrupt' +rl_getc and cause the handler to run when not in a signal handling context. + +Patch (apply with `patch -p0'): + +*** ../readline-6.3-patched/input.c 2014-01-10 15:07:08.000000000 -0500 +--- input.c 2014-05-30 16:20:56.000000000 -0400 +*************** +*** 535,540 **** +--- 538,551 ---- + else if (_rl_caught_signal == SIGHUP || _rl_caught_signal == SIGTERM) + return (RL_ISSTATE (RL_STATE_READCMD) ? READERR : EOF); ++ /* keyboard-generated signals of interest */ + else if (_rl_caught_signal == SIGINT || _rl_caught_signal == SIGQUIT) + RL_CHECK_SIGNALS (); ++ /* non-keyboard-generated signals of interest */ ++ else if (_rl_caught_signal == SIGALRM ++ #if defined (SIGVTALRM) ++ || _rl_caught_signal == SIGVTALRM ++ #endif ++ ) ++ RL_CHECK_SIGNALS (); + + if (rl_signal_event_hook) +*** ../readline-6.3/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 + +! 6 +--- 1,3 ---- + # Do not edit -- exists only for use by patch + +! 7 diff --git a/src/patches/readline/readline63-008 b/src/patches/readline/readline63-008 new file mode 100644 index 0000000..691016f --- /dev/null +++ b/src/patches/readline/readline63-008 @@ -0,0 +1,47 @@ + READLINE PATCH REPORT + ===================== + +Readline-Release: 6.3 +Patch-ID: readline63-008 + +Bug-Reported-by: Jared Yanovich slovichon@gmail.com +Bug-Reference-ID: 20140625225019.GJ17044@nightderanger.psc.edu +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-06/msg00070.html + +Bug-Description: + +When the readline `revert-all-at-newline' option is set, pressing newline +when the current line is one retrieved from history results in a double free +and a segmentation fault. + +Patch (apply with `patch -p0'): + +*** ../readline-6.3-patched/misc.c 2012-09-01 18:03:11.000000000 -0400 +--- misc.c 2014-06-30 13:41:19.000000000 -0400 +*************** +*** 462,465 **** +--- 462,466 ---- + /* Set up rl_line_buffer and other variables from history entry */ + rl_replace_from_history (entry, 0); /* entry->line is now current */ ++ entry->data = 0; /* entry->data is now current undo list */ + /* Undo all changes to this history entry */ + while (rl_undo_list) +*************** +*** 469,473 **** + FREE (entry->line); + entry->line = savestring (rl_line_buffer); +- entry->data = 0; + } + entry = previous_history (); +--- 470,473 ---- +*** ../readline-6.3/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 + +! 7 +--- 1,3 ---- + # Do not edit -- exists only for use by patch + +! 8