Linux HOWTOs

About | Home | Search


HOWTO: xfsprogs
Description: Utilities for the XFS filesystem
Click here for ChangeLog
NOTE: I use GNU tar >= 1.13.25 so it's -j for .tar.bz2 files,
it's safe to assume that make, gcc, binutils, fileutils/coreutils, gawk, sed, and grep are prerequisites for almost everything


# xfsprogs 3.1.11
# ===============
# Slackware 13.0: xfsprogs 3.0.1
# Slackware 13.1: xfsprogs 3.1.1
# Slackware 13.37: xfsprogs 3.1.4
# Slackware 14.0: xfsprogs 3.1.8

# Prerequisites:
# libtool
# tar
# gzip
# gettext (if you don't use --enable-gettext=no)
# rpm (optional?)

# Get it
cd
test -f installed/xfsprogs-3.1.11.tar.gz &&
 mv installed/xfsprogs-3.1.11.tar.gz .
test ! -f xfsprogs-3.1.11.tar.gz &&
 wget ftp://oss.sgi.com/projects/xfs/cmd_tars/xfsprogs-3.1.11.tar.gz

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

# Read ./README and ./doc/INSTALL

# Fix the ability to pass --docdir to configure:
test ! -f include/builddefs.in.orig &&
 cp -a include/builddefs.in include/builddefs.in.orig
cat include/builddefs.in.orig | sed 's%@datadir@/doc/@pkg_name@%@docdir@%' \
 > include/builddefs.in

# Configure the build, build it
./configure --prefix=/usr --bindir=/usr/sbin --sbindir=/sbin\
 --libexecdir=/usr/lib --libdir=/lib --docdir=/usr/doc/xfsprogs\
 --mandir=/usr/man --enable-gettext=no
make

# Become root to install it
su

# Remove the Slackware package, if there is one
test -x /sbin/removepkg && /sbin/removepkg xfsprogs

# Install it
# (the chown is to avoid installed versions being installed by your
# non-root user)
chown -R root:root .
make install
make install-dev
ldconfig

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

# You may want to look through /usr/include/xfs to see if there are
#  old files from previous versions that you can remove
# The Slackware xfsdump package may have a conflicting /usr/sbin/xfs_fsr
test -x /usr/sbin/xfs_fsr &&
 ln -sf /sbin/xfs_fsr /usr/sbin/xfs_fsr

# Become yourself again
exit

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


# If you ever want to uninstall xfsprogs, this should do it:
cd
su
# This may be over agressive, but it changes often enough...
# Files from other packages may get zapped too: xfsdump, dmapi
( cd /sbin ; rm -f *.xfs xfs_* )
test -d /usr/doc/xfsprogs && rm -r /usr/doc/xfsprogs
test -d /usr/include/disk && rm -r /usr/include/disk
test -d /usr/include/xfs && rm -r /usr/include/xfs
( cd /usr/lib ; rm -f libdisk.* libhandle.* libxcmd.* libxfs.* libxlog.* )
( cd /usr/sbin ; rm -f xfs_* )
test -d /usr/share/doc/xfsprogs && rm -r /usr/share/doc/xfsprogs
( cd /usr/man/man3 ; rm -f attr_list_by_handle.3 attr_multi_by_handle.3 \
 fd_to_handle.3 free_handle.3 fssetdm_by_handle.3 \
 getparentpaths_by_handle.3 getparents_by_handle.3 handle_to_fshandle.3 \
 open_by_handle.3 path_to_fshandle.3 path_to_handle.3 readlink_by_handle.3 \
 xfsctl.3 )
rm -f /usr/man/man5/xfs.5
( cd /usr/man/man8 ; rm -f *.xfs.8 xfs_*.8 )
ldconfig
exit
find ~/src -maxdepth 1 -type d -name "xfsprogs-*" -exec rm -r {} \;
rm -f ~/installed/xfsprogs-*.tar.*

Back to the list


Last updated: Wed, 29 Apr 2020 22:04:50 -0400
Jason Englander <jason at englanders dot us>