gzip - Compress or expand gzip (*.gz) files ChangeLog

HOWTO


# GNU zip 1.13 (2023-08-19)
# ============
# Slackware 14.0: gzip 1.5
# Slackware 14.1: gzip 1.6
# Slackware 14.2: gzip 1.8
# Slackware 15.0: gzip 1.11
#
# Always check 'patches' for updates

# Prerequisites:
# tar
# XZ Utils

# gzip home page at gnu.org
# Savannah: GNU gzip
# info-gnu: gzip-1.13 released [stable]
# https://savannah.gnu.org/news/?id=10501 (announcement via Savannah instead)
# gzip manual
# Slackware-current source gzip
# pigz - A parallel implementation of gzip for modern multi-processor, multi-core machines

# If you don't have tar and xz/unxz, you can also download it as a tar.gz,
# or zip file, or even get an older version of gzip that comes as a tar or
# shar file to extract this one with it.

# If you have any issues downloading it as done below, here are download
# options:
# https://ftpmirror.gnu.org/gzip/ (automatic redirect)
# https://ftp.gnu.org/gnu/gzip/
# http://ftp.gnu.org/gnu/gzip/
# https://www.gnu.org/prep/ftp.html (GNU mirrors list)

# Get the source tarball
cd
test -f installed/gzip-1.13.tar.xz && mv installed/gzip-1.13.tar.xz .
test ! -f gzip-1.13.tar.xz &&
wget https://ftpmirror.gnu.org/gnu/gzip/gzip-1.13.tar.xz

# Verify base64-encoded SHA256 checksum w/ cksum from coreutils >= 9.2:
# (this came from the release announcement)
echo "dFTraTXbF8ZlVXbC4bD6vv04tNCTbg+H9IzQYs6RoFc=  gzip-1.13.tar.xz" | \
cksum -a sha256 -c

# Verify tarball w/ sha256sum:
# [ To match the base64-encoded checksum without cksum from coreutils >= 9.2
#   requires some extra handling ]
# echo "dFTraTXbF8ZlVXbC4bD6vv04tNCTbg+H9IzQYs6RoFc="
# sha256sum -b gzip-1.13.tar.xz | cut -d' ' -f1 | xxd -r -p | base64
# shasum -a 256 -b gzip-1.13.tar.xz | awk '{ print $1 }' | xxd -r -p | base64
# openssl sha256 -binary gzip-1.13.tar.xz | openssl base64
echo "7454eb6935db17c6655576c2e1b0fabefd38b4d0936e0f87f48cd062ce91a0\
57  gzip-1.13.tar.xz" | sha256sum -c

# Verify tarball w/ gpg:
# (gpg --locate-external-key jim@meyering.net)
# (https://savannah.gnu.org/project/release-gpgkeys.php?group=gzip)
# (https://ftp.gnu.org/gnu/gnu-keyring.gpg)
( gpg --list-keys 7FD9FCCB000BEEEE > /dev/null ||
  gpg --recv-keys 7FD9FCCB000BEEEE ) &&
wget -nc https://ftpmirror.gnu.org/gnu/gzip/gzip-1.13.tar.xz.sig &&
  gpg --verify gzip-1.13.tar.xz.sig && rm gzip-1.13.tar.xz.sig

## If you have a tar that is so old there is no -J|--xz, do this
# xz -dc ~/gzip-1.13.tar.xz | tar xv

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

# Read ./README and ./INSTALL
# If upgrading, read ./NEWS and/or ./ChangeLog

# Configure the build
./configure --prefix=/usr --bindir=/bin --infodir=/usr/info --mandir=/usr/man

# Build it
make

# Check the build
make check

# Become root to install it
su

# Make sure the new gzip seems to be OK
./gzip --version

# Remove the Slackware package
test -x /sbin/removepkg && /sbin/removepkg gzip

# Remove old versions of files to avoid conflicts, broken symlinks, etc.
for fname in gunzip gzexe gzip zcat zcmp zdiff zegrep zfgrep zforce zgrep \
zless zmore znew;
do
  rm -f /bin/${fname} /usr/bin/${fname} /usr/man/man1/${fname}.1*
done
test -d /usr/doc/gzip && rm -r /usr/doc/gzip
find /usr/doc -maxdepth 1 -type d -name "gzip-*" -exec rm -r {} \;
rm -f /usr/info/gzip.info*

# Install the new version, strip binaries
make install-strip

# Create symlinks in /usr/bin pointing to the binaries in /bin
for fname in gunzip gzexe gzip zcat zcmp zdiff zegrep zfgrep zforce zgrep \
zless zmore znew;
do
  test ! -L /usr/bin/${fname} && ln -s /bin/${fname} /usr/bin/${fname}
  ls -l /bin/${fname} /usr/bin/${fname}
done

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

# Become yourself again
exit

# Save the tarball for later
cd
mkdir -p -m 0700 installed
rm -f installed/gzip-*.tar*
mv gzip-1.13.tar.xz installed/


# If you ever want to uninstall gzip (?), this should do it:
# ('make uninstall' as root in a configured source should be enough,
#  and then removing the /usr/bin symlinks)
cd
su
test -d src/gzip-* && ( cd src/gzip-* ; make uninstall )
( cd /bin ; rm -f gunzip gzexe gzip zcat zcmp zdiff zegrep zfgrep \
zforce zgrep zless zmore znew )
( cd /usr/bin ; rm -f gunzip gzexe gzip zcat zcmp zdiff zegrep zfgrep \
zforce zgrep zless zmore znew )
( cd /usr/man/man1 ; rm -f gunzip.1 gzexe.1 gzip.1 zcat.1 zcmp.1 zdiff.1 \
zforce.1 zgrep.1 zless.1 zmore.1 znew.1 )
rm -f /usr/info/gzip.info* /usr/share/info/gzip.info*
( cd /usr/share/man/man1 ; rm -f gunzip.1 gzexe.1 gzip.1 zcat.1 zcmp.1 \
zdiff.1 zforce.1 zgrep.1 zless.1 zmore.1 znew.1 )
exit
find ~/src -maxdepth 1 -type d -name "gzip-*" -exec rm -r {} \;
rm -f ~/installed/gzip-*.tar.*

List of HOWTOs

Web page itself last updated: 2023-12-20 8:06pm (EST -0500)
HOWTO last updated: 2024-05-16 3:42pm
Copyright © 2001-2024 Jason Englander. All Rights reserved.
[HTML5]