fix lfs missing bash

This commit is contained in:
2026-03-20 11:51:55 +01:00
parent d66d544066
commit 0d2cd53235

View File

@@ -92,14 +92,17 @@ echo " This will take a while (30-60+ minutes on 32 threads)."
echo " Logs will be in: ${LFS}/sources/logs/"
echo ""
# Run build-all.sh as the lfs user with a clean environment
# The build scripts source darkforge-env.sh internally, so we just
# need LFS set and the lfs user's PATH to find basic tools.
su -l lfs -c "
export LFS=${LFS}
source ${LFS}/sources/darkforge-env.sh
bash ${SCRIPTS_DEST}/build-all.sh
" || {
# Run build-all.sh as the lfs user with a clean environment.
# We use 'su' without -l to avoid the lfs .bash_profile which does
# 'exec env -i /bin/bash' and would swallow our -c command.
# Instead, we build the clean environment ourselves.
env -i HOME=/home/lfs TERM="${TERM}" \
LFS="${LFS}" \
LC_ALL=POSIX \
LFS_TGT=x86_64-darkforge-linux-gnu \
PATH="${LFS}/tools/bin:/usr/bin" \
MAKEFLAGS="-j32" \
su lfs -s /bin/bash -c "bash ${SCRIPTS_DEST}/build-all.sh" || {
fail "Build failed! Check logs in ${LFS}/sources/logs/"
}