bzip2 - A block-sorting file compressor ChangeLog

HOWTO


# bzip2 1.0.8
# ===========
# Slackware 14.0, 14.1, 14.2: bzip2 1.0.6
# Slackware 15.0: bzip2 1.0.8

# Various web sites related to bzip2:
# http://www.bzip.org/
# https://bzip2.sourceforge.net/
# https://sourceforge.net/projects/bzip2/
# https://www.sourceware.org/bzip2/

# bzip2 1.0.8 CHANGES

# Get the tarball
cd
test -f installed/bzip2-1.0.8.tar.gz && mv installed/bzip2-1.0.8.tar.gz .
test ! -f bzip2-1.0.8.tar.gz &&
wget https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz

# Verify tarball w/ md5sum:
echo "083f5e675d73f3233c7930ebe20425a533feedeaaa9d8cc86831312a65\
81cefbe6ed0d08d2fa89be81082f2a5abdabca8b3c080bf97218a1bd59dc118a3\
0b9f3  bzip2-1.0.8.tar.gz" | sha512sum -c

# Verify tarball w/ gpg:
# https://www.sourceware.org/pub/bzip2/gpgkey-5C1D1AA44BE649DE760A.gpg
( gpg --list-keys 12768A96795990107A0D2FDFFC57E3CCACD99A78 > /dev/null 2>&1 ||
  gpg --keyserver keyserver.ubuntu.com \
   --recv-keys 12768A96795990107A0D2FDFFC57E3CCACD99A78 ) &&
wget -nc https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz.sig &&
  gpg --verify bzip2-1.0.8.tar.gz.sig && rm bzip2-1.0.8.tar.gz.sig

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

# Build the shared (.so.x.x) library and a bzip2 binary that uses it
make -f Makefile-libbz2_so

# Build the static (.a) library and the static bzip2 and bzip2recover
# programs
make

# Become root to remove old files and install it
su

# If you are not 64-bit, use /lib instead of /lib64 below

# You may want to save a copy of /lib64/libbz2.so.1.0.? before doing this
# (if it's from the aaa_elflibs or bzip2 package)
test -x /sbin/removepkg && /sbin/removepkg bzip2

# Remove old bzip2 files, and symlinks but not the .so.1.0.X file
for pfx in /usr /usr/local;
do
  ( cd ${pfx}/bin
    rm -f bzcmp bzdiff bzegrep bzfgrep bzgrep bzip2recover bzless bzmore )
  ( cd ${pfx}/lib64
    test -L libbz2.so.1.0 && rm libbz2.so.1.0
    test -L libbz2.so.1 && rm libbz2.so.1
    test -L libbz2.so && rm libbz2.so )
  ( cd ${pfx}/man/cat1 &&
     rm -f bzip2.1 bzip2.1.gz )
  ( cd ${pfx}/man/man1
    rm -f bzip2.1 bzip2.1.gz bzip2recover.1 bzip2recover.1.gz )
  rm -f ${pfx}/include/bzlib.h
done
( cd /bin
  rm -f bzcmp bzdiff bzegrep bzfgrep bzgrep bzip2 bzip2recover bzless bzmore )
( cd /lib64
  test -L libbz2.so.1.0 && rm libbz2.so.1.0
  test -L libbz2.so.1 && rm libbz2.so.1
  test -L libbz2.so && rm libbz2.so )

# There is a 'make install' but it has /lib/ hard set, doesn't use a LIBDIR,
# etc...  This part here is super-duper-overkill, but we know what's
# happening...

# Install the library files in /usr/lib64 and some symlinks
install -m 755 libbz2.a /usr/lib64/
install -m 755 libbz2.so.1.0.8 /lib64/
ln -s /lib64/libbz2.so.1.0.8 /lib64/libbz2.so.1.0
ln -s /lib64/libbz2.so.1.0 /lib64/libbz2.so.1
ln -s /lib64/libbz2.so.1 /usr/lib64/libbz2.so
ldconfig

# Install bzip2 and bzip2recover in /bin
test ! -f bzip2-static && mv -f bzip2 bzip2-static
cp -a bzip2-shared bzip2
install -m 755 -s bzip2 bzip2recover /bin/
ln -sf /bin/bzip2 /bin/bunzip2
ln -sf /bin/bzip2 /bin/bzcat

# Install bzdiff and bzcmp symlink
install -m 755 bzdiff /usr/bin/
ln -sf /usr/bin/bzdiff /usr/bin/bzcmp

# Install bzgrep and bzegrep, bzfgrep symlinks
install -m 755 bzgrep /usr/bin/
ln -sf /usr/bin/bzgrep /usr/bin/bzegrep
ln -sf /usr/bin/bzgrep /usr/bin/bzfgrep

# Install bzmore and bzless symlink
install -m 755 bzmore /usr/bin/
ln -sf /usr/bin/bzmore /usr/bin/bzless

# Install header file
install -m 644 bzlib.h /usr/include/

# Install man pages
install -m 644 bzip2.1 bzdiff.1 bzgrep.1 bzmore.1 /usr/man/man1/
ln -sf /usr/man/man1/bzdiff.1 /usr/man/man1/bzcmp.1
ln -sf /usr/man/man1/bzgrep.1 /usr/man/man1/bzegrep.1
ln -sf /usr/man/man1/bzgrep.1 /usr/man/man1/bzfgrep.1
ln -sf /usr/man/man1/bzmore.1 /usr/man/man1/bzless.1

## If you care about such things, you may want to open up
## /var/adm/packages/*elflibs* in a text editor and remove the lines
## that refer to these [ Slackware 8.1, 12.2, 14.2 ]:
# lib/incoming/libbz2.so.1.0.2
# lib/libbz2.so.1.0.4
# lib64/libbz2.so.1.0.6

# Become yourself again
exit

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

List of HOWTOs

Web page itself last updated: 2023-12-20 8:06pm (EDT -0400)
HOWTO last updated: 2023-10-16 10:45pm
Copyright © 2001-2024 Jason Englander. All Rights reserved.
[HTML5]