5.15. Shadow-4.1.4.2 - Native

5.15.1. Installation of Shadow

The following patch changes the hard-coded /etc in the sources to whatever was passed to configure. It also allows the utilities to run as a user other then root:

patch -Np1 -i ../shadow-4.1.4.2-sysroot_hacks-1.patch

The following value is added to config.cache to make sure that the passwd program is found:

cat > config.cache << EOF
shadow_cv_passwd_dir=${CLFS}/bin"
EOF

The following value causes Shadow to use its internal lckpwdf instead of the one provided by EGLIBC. The one provided by EGLIBC will attempt to modify the host system:

cat >> config.cache << EOF
ac_cv_func_lckpwdf=no
EOF

Prepare Shadow for compilation:

./configure --prefix=${CLFS}/cross-tools --sbindir=${CLFS}/cross-tools/bin \
    --sysconfdir=$CLFS/etc --disable-shared --without-libpam \
    --without-audit --without-selinux --program-prefix=${CLFS_TARGET}- \
    --without-nscd --cache-file=config.cache

Add the proper prefix to the passwd program:

cp config.h{,.orig}
sed "/PASSWD_PROGRAM/s/passwd/${CLFS_TARGET}-&/" config.h.orig > config.h

Compile the package:

make

Install the package:

make install
[Note]

Note

The tools built on this page will be used later in this book.

Details on this package are located in Section 6.46.5, “Contents of Shadow.”