sed - GNU stream editor ChangeLog


# GNU sed 4.2.1
# =============
# Slackware 12.1, 12.2, 13.0: sed 4.1.5
# Slackware 13.1, 13.37: sed 4.2.1

# I have not tried it, but there is another sed called super-sed:

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

# Prerequisites:
# texinfo (makeinfo is used to build HTML documentation)
# iconv
# Bison

test -f installed/sed-4.2.1.tar.bz2 && mv installed/sed-4.2.1.tar.bz2 .
test ! -f sed-4.2.1.tar.bz2 &&

# Verify tarball w/ md5sum:
# (this came from my gpg verified tarball)
echo "7d310fbd76e01a01115075c1fd3f455a  sed-4.2.1.tar.bz2" | md5sum -c

# Verify tarball w/ sha1sum:
# (this also came from my gpg verified tarball)
echo "ace93d23eabc00d3a8187ecf07d3a02b1b297810  sed-4.2.1.tar.bz2" | sha1sum -c

# Verify tarball w/ gpg:
( gpg --recv-keys A750566F > /dev/null 2>&1 || gpg --list-keys A750566F ) &&
wget -nc &&
  gpg --verify sed-4.2.1.tar.bz2.sig && rm sed-4.2.1.tar.bz2.sig

mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "sed-*" -exec rm -r {} \;
tar xjvf ~/sed-4.2.1.tar.bz2
cd sed-4.2.1
test $UID = 0 && chown -R root:root .

# If you don't have a sed binary installed (./configure uses it), do
# this first:
# (FYI - this did not work for me this time, but the regular build did)
sh ./
su -c "cp sed/sed /bin/"
cd ..
rm -r ./sed-4.2.1
tar xzvf ~/sed-4.2.1.tar.bz2
cd sed-4.2.1
test $UID = 0 && chown -R root:root .

./configure --prefix=/usr --bindir=/bin --infodir=/usr/info --mandir=/usr/man --disable-nls

# Become root to install it

# Remove old files that make cause issues
find /usr/doc -maxdepth 1 -type d -name "sed-*" -exec rm -r {} \;
rm -f /usr/info/* /usr/man/man1/sed.1*
find /usr/share/locale -type f -name "" -exec rm {} \; 2> /dev/null
find /var/adm/packages -type f -name "sed*" -exec mv -f {} /var/log/removed_packages/ \;
find /var/adm/scripts -type f -name "sed*" -exec mv -f {} /var/log/removed_scripts/ \;

# Install the new version, the sed binary will be stripped
make install-strip

# Everything prior to Slackware 9.0, and this howto as well, put sed in
# /usr/bin.  Slackware 9.0 puts sed in /bin and creates a symlink to it
# in /usr/bin.  Makes sense, sed is important and if your /usr is actually
# a mount of a remote filesystem, sed might not exist early on during boot-up.
# So here we remove the old binary and create a symlink to the new one:
rm -f /usr/bin/sed
ln -sf /bin/sed /usr/bin/sed

# Slackware >= 9.0 has a 'sed' package, everything prior to it included sed
# in the 'bin' package.  If you have < 9.0 and are really anal (like me),
# remove lines from the /var/adm/packages/bin* file that reference sed
# files that you just replaced:
# /usr/bin/sed
# /usr/doc/sed-*
# /usr/man/man1/sed.1.gz
# /usr/info/

# Make sure your non-root user can remove the source later
chown -R root:root $USER .
chmod -R u+rw .

# Become yourself again

mkdir -p -m 0700 installed
rm -f installed/sed-*.tar.*
mv sed-4.2.1.tar.bz2 installed/

List of HOWTOs

Last updated: 2020-04-29 10:24pm EDT(-0400)
Copyright © 2001-2020 Jason Englander. All Rights reserved.