Initial commit of LFS notes and scripts.

This commit is contained in:
Shaun Setlock
2025-01-20 15:44:57 -05:00
commit 386dc3cec7
78 changed files with 2628 additions and 0 deletions

37
lfs-scripts/coreutils.sh Normal file
View File

@@ -0,0 +1,37 @@
# 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}