readline - Library with command line editing functions ChangeLog


# GNU readline 7.0
# ================
# Slackware 13.37, 14.0, 14.1: readline 5.2
# Slackware 14.2: readline 6.3

# Prerequisites:
# grep
# ncurses

# Below I just blow away existing library files before running 'make
# install' to ensure that extra files aren't left behind that are no longer
# needed.  If you run a production system with multiple local users (or some
# daemon) that may be using something linked with libreadline and/or
# libhistory, you'll want to skip that part below and you should clean up old
# files manually after you're done installing readline.  Try using
# lsof to see what might be using at that moment.

# If the download site used below is busy, try one of these:

# Get it
test -f installed/readline-7.0.tar.gz && mv installed/readline-7.0.tar.gz .
test ! -f readline-7.0.tar.gz &&

# Verify tarball w/ sha1sum:
# (this came from my gpg-verified tarball)
echo "d9095fa14a812495052357e1d678b3f2ac635463  readline-7.0.tar.gz" | \
sha1sum -c

# Verify tarball w/ sha256sum:
# (this also came from my gpg-verified tarball)
echo "750d437185286f40a369e1e4f4764eda932b9459b5ec9a731628393dd3d32334  r\
eadline-7.0.tar.gz" | sha256sum -c

# Verify tarball w/ gpg:
( gpg --list-keys 64EA74AB > /dev/null 2>&1 || gpg --recv-keys 64EA74AB ) &&
wget -nc &&
  gpg --verify readline-7.0.tar.gz.sig && rm readline-7.0.tar.gz.sig

# Extract the tarball
mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "readline-*" -exec rm -r {} \;
tar xzvf ~/readline-7.0.tar.gz
cd readline-7.0
test $UID = 0 && chown -R root:root .

# Apply patches
# In case this is done again to rebuild, we do not save *.rej files here
gpg --list-keys 64EA74AB > /dev/null 2>&1 || gpg --recv-keys 64EA74AB
for pnum in $(seq -f "%03g" -s ' ' 5); do
  wget -nc \\
readline70-${pnum} \\
readline70-${pnum}.sig &&
   gpg --verify readline70-${pnum}.sig && rm readline70-${pnum}.sig &&
     patch -p0 -N -r - < readline70-${pnum}
  echo "Hit enter to continue"

## Build it
# If your /usr/share/info is a symlink to /usr/info, you can skip that part
# If your /usr/share/man is a symlink to /usr/man, you can skip that part
# If you want to use termcap instead of curses/ncurses, skip that part

# Configure the build for 64-bit
test $(uname -m) = 'x86_64' &&
./configure --prefix=/usr --docdir=/usr/doc/readline-7.0 \
--infodir=/usr/info --libdir=/usr/lib64 --mandir=/usr/man --with-curses

# Configure the build for 64-bit
test $(uname -m) != 'x86_64' &&
./configure --prefix=/usr --docdir=/usr/doc/readline-7.0 \
--infodir=/usr/info --mandir=/usr/man --with-curses

# Build it

# Become root to install it

# If you are upgrading from an older full version of readline, like 6.x to
# 7.x, you will most likely have programs that are linked to the shared
# library for the older versions.  Check 'lsof /usr/lib*/*',
# restart those things after upgrading it to see if they start using the
# new one (i.e. they are linked to, not
# The safe bet is to leave the old shared library files where they are
# unless you are 100% sure nothing is using them.
# Anything that was compiled with the static libreadline.a that you had
# installed at the itme will need to be rebuilt and reinstalled to use
# the new one.

# Remove the installed Slackware package
# and are also in the 'aaa_elflibs'
# package, so they should still be there after you remove the package
test -x /sbin/removepkg && /sbin/removepkg readline

# Remove old docs from previous versions
find /usr/doc -maxdepth 1 -type d -name "readline-*" -exec rm -r {} \;

# Again, as noted above, if you are 100% sure nothing is using them,
# which is unlikely, remove the old library files from previous versions.
# Maybe even save a copy of them too if you do this.
( cd /usr/lib ; rm -f libreadline.* libhistory.* )
test -d /usr/lib64 &&
( cd /usr/lib64 ; rm -f libreadline.* libhistory.* )

# Install the new one
make install

# If you've got programs installed that are looking for the old shared
# library files that are no longer there, this may help by creating
# symlinks from the old names to the new .so symlink
for libdir in /usr/lib /usr/lib64;
  test ! -d $libdir && continue
  test ! -L ${libdir}/${libname}.so && continue
  for libname in libhistory libreadline;
    for libver in $(seq -s ' ' 4 6);
      test ! -L ${libdir}/${libname}.so.${libver} &&
       ln -s ${libdir}/${libname}.so ${libdir}/${libname}.so.${libver}
      test ! -L ${libdir}/${libname}.so.${libver} &&
       ln -s ${libdir}/${libname}.so ${libdir}/${libname}.so.${libver}

# Update the libraries that 'ld' knows about via /etc/

# If you use Perl and you have Term::ReadLine::Gnu installed, you should
# run this, or you may not be able to use the CPAN shell any more.
# If you don't know what I'm talking about, you probably don't need this,
# so don't bother.
# perl -MCPAN -e 'install Term::ReadLine::Gnu'

# Make sure your non-root user can remove the source later
chown -R $(logname) .
chmod -R u+w .

## Here is a list of some things that use readline.  If they no longer run
## and you get an error like this:
# error while loading shared libraries: cannot open shared
# object file: No such file or directory
## you should try creating symlinks as shown above.
# bc
# lftp
# parted
# ...and many more...

# Become yourself again

# Save the source for later
mkdir -p -m 0700 installed
rm -f installed/readline-*.tar.*
mv readline-7.0.tar.gz installed/

# If you ever want to uninstall readline, which I would NOT recommend,
# this should do it:
rm -f installed/readline-*.tar.*
test -d src/readline-* && ( cd src/readline-* ; make uninstall )
find /usr/doc -maxdepth 1 -type d -name "readline-*" -exec rm -r {} \;
test -d /usr/doc/readline && rm -r /usr/doc/readline
test -d /usr/include/readline && rm -r /usr/include/readline
( cd /usr/info
  rm -f )
( cd /usr/lib ; rm -f libhistory.* libreadline.* )
( cd /usr/man/man3 ; rm -f history.3 readline.3 readline.3.gz )
find /usr/share/doc -maxdepth 1 -type d -name "readline-*" -exec rm -r {} \;
test -d /usr/share/doc/readline && rm -r /usr/share/doc/readline
( cd /usr/share/info ; rm -f )
( cd /usr/share/man/man3 ; rm -f history.3 readline.3 readline.3.gz )
test -d /usr/share/readline && rm -r /usr/share/readline
find ~/src -maxdepth 1 -type d -name "readline-*" -exec rm -r {} \;
rm -f ~/installed/readline-*.tar.*

List of HOWTOs

Web page itself last updated: 2023-12-20 8:06pm (EDT -0400)
HOWTO last updated: 2018-07-25 1:30pm
Copyright © 2001-2024 Jason Englander. All Rights reserved.