# This will clean up old versions of tar and will create the necessary
# directories for installing everything below. If you're replacing a
# Slackware-installed tar package, removing that package will leave a
# /bin/tar binary behind, because it's called 'tar-incoming' in the package.
cd
su
mkdir -p -m 0700 ~/installed ~/src
test -x /sbin/removepkg && /sbin/removepkg tar
find ~/src -maxdepth 1 -type d -name "tar-*" -exec rm -r {} \;
find /usr/share/locale -type f -name "tar.mo" -exec rm {} \;
find /bin -type l -name "tar-*" -exec rm {} \;
exit
# Below we use the shar (SHell ARchive) format instead of .tar.gz or
# .tar.bz2, that way you don't need to already have tar installed to install
# tar. You'll need gunzip to decompress the shar.gz file, and the shar file
# itself requires uudecode. uudecode is part of the GNU sharutils package.
# If you have gmime installed, be aware that the 1.13 and 1.14 shar files
# failed to decompress (it hung on certain files) for me with gmime's version
# of uudecode. I removed the temporary directory (_sh?????) that it left
# behind, I temporarily renamed uudecode to uudecode.old, copied the
# sharutils version from another box, and then it decompressed successfully
# (then restored the gmime version of uudecode).
# Here we install tar 1.13, patched to add bzip2 (-y) support. This
# particular version is used by the Slackware package utilities.
# Not sure why, but I was unable to build this on one Slackware 11.0
# machine, but was able to build it on a Slackware 9.1 machine (both
# far from stock Slackware).
# If you have trouble building it too, here's a binary:
# http://englanders.us/pub/linux/misc/tar-1.13
# Install it as /bin/tar-1.13
cd
test -f installed/tar-1.13.shar.gz && mv installed/tar-1.13.shar.gz .
test ! -f tar-1.13.shar.gz &&
wget http://ftpmirror.gnu.org/tar/tar-1.13.shar.gz
mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "tar-*" -exec rm -r {} \;
zcat ~/tar-1.13.shar.gz | sh
cd tar-1.13
test $UID = 0 && chown -R root:root .
# Patch it to add bzip2 support via -y (it's -j in later versions of tar)
wget -nc http://englanders.us/pub/linux/patches/notmine/\
tar-1.13-bzip2.diff &&
patch -p0 < tar-1.13-bzip2.diff
./configure --prefix=/usr --disable-nls
make
# Become root to install it
su
# Install this version as tar-1.13
install -s src/tar /bin/tar-1.13
# Make sure your non-root user can remove the source later
chown -R $USER .
chmod -R u+rw .
# Become yourself again
exit
# Remove old version tarballs, put the installed ones in ~/installed/:
cd
rm -f installed/installed/tar-*.shar*
mv tar-1.13.shar.gz installed/
# And now the current version
cd
test -f installed/tar-1.26.tar.bz2 && mv installed/tar-1.26.tar.bz2 .
test ! -f tar-1.26.tar.bz2 &&
wget http://ftpmirror.gnu.org/tar/tar-1.26.tar.bz2