From 0d2cd53235b100cbe3f1e0c988d2948e3e740ed3 Mon Sep 17 00:00:00 2001 From: Danny Date: Fri, 20 Mar 2026 11:51:55 +0100 Subject: [PATCH] fix lfs missing bash --- toolchain/bootstrap.sh | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/toolchain/bootstrap.sh b/toolchain/bootstrap.sh index 63e530c..bd81ff4 100644 --- a/toolchain/bootstrap.sh +++ b/toolchain/bootstrap.sh @@ -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/" }