7.5. E2fsprogs-1.39

The E2fsprogs package contains the utilities for handling the ext2 file system. It also supports the ext3 journaling file system.

7.5.1. Installation of E2fsprogs

This package cannot be cross-compiled for ppc64 on some common architectures. The following patch fixes this:

patch -Np1 -i ../e2fsprogs-1.39-cross-1.patch

Make sure the libraries get installed to /tools/lib64:

chmod -v 0755 configure
cp -v configure{,.orig}
sed -e "/libdir=.*\/lib/s@/lib@/lib64@g" configure.orig > configure

The E2fsprogs documentation recommends that the package be built in a subdirectory of the source tree:

mkdir -v build
cd build

When cross-compiling configure cannot determine sizes and assumes short=2, int=4, long=4, long long=8. This is not correct for PowerPC64. Adjust the values with:

echo "ac_cv_sizeof_long=8" > config.cache

Prepare E2fsprogs for compilation:

CC="${CC} ${BUILD64}" ../configure --prefix=/tools \
--enable-elf-shlibs --disable-evms \
--build=${CLFS_HOST} --host=${CLFS_TARGET} --cache-file=config.cache

The meaning of the configure options:

--enable-elf-shlibs

This creates the shared libraries which some programs in this package use.

--disable-evms

This disables the building of the Enterprise Volume Management System (EVMS) plugin. This plugin is not up-to-date with the latest EVMS internal interfaces and EVMS is not installed as part of a base CLFS system, so the plugin is not required. See the EVMS website at http://evms.sourceforge.net/ for more information regarding EVMS.

make CC="${CC} ${BUILD64}"

Install the binaries and documentation:

make DESTDIR=${CLFS} install

The meaning of the make option:

DESTDIR=${CLFS}

The Makefile for e2fsprogs hard-codes a path to the mke2fs.conf file, attempting to install it into ${DESTDIR}/etc, causing the installation to fail as it tries to write to /etc. The DESTDIR parameter prevents this.

Install the shared libraries:

make install-libs

Create needed symlinks for a bootable system:

ln -sv /tools/sbin/{fsck.ext2,fsck.ext3,e2fsck} ${CLFS}/sbin

Details on this package are located in Section 10.40.2, “Contents of E2fsprogs.”