Details on this package are located in Section 6.46.5, “Contents 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"
EOFThe 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.cacheAdd the proper prefix to the passwd program:
cp config.h{,.orig}
sed "/PASSWD_PROGRAM/s/passwd/${CLFS_TARGET}-&/" config.h.orig > config.hCompile the package:
make
Install the package:
make install
![[Note]](../images/note.png)
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.”