38 lines
995 B
Bash
38 lines
995 B
Bash
# Set the package we're building.
|
|
package="coreutils-9.5"
|
|
extension=".tar.xz"
|
|
|
|
# Decompress the source.
|
|
echo "Unpacking ${package}${extension} ..."
|
|
tar xvf ${package}${extension}
|
|
|
|
# Enter the unpacked sources.
|
|
echo "Entering ${package} directory ..."
|
|
cd ${package}
|
|
|
|
# LFS commands.
|
|
patch -Np1 -i ../coreutils-9.5-i18n-2.patch
|
|
autoreconf -fiv
|
|
FORCE_UNSAFE_CONFIGURE=1 ./configure \
|
|
--prefix=/usr \
|
|
--enable-no-install-program=kill,uptime
|
|
make
|
|
make NON_ROOT_USERNAME=tester check-root
|
|
groupadd -g 102 dummy -U tester
|
|
chown -R tester .
|
|
su tester -c "PATH=$PATH make -k RUN_EXPENSIVE_TESTS=yes check" \
|
|
< /dev/null
|
|
groupdel dummy
|
|
make install
|
|
mv -v /usr/bin/chroot /usr/sbin
|
|
mv -v /usr/share/man/man1/chroot.1 /usr/share/man/man8/chroot.8
|
|
sed -i 's/"1"/"8"/' /usr/share/man/man8/chroot.8
|
|
|
|
# Exit sources directory.
|
|
echo "Exiting ${package} directory ..."
|
|
cd ..
|
|
|
|
# Remove the directory of source files.
|
|
echo "Removing ${package} directory ..."
|
|
rm -rf ${package}
|