fix: complete the deploy-tool dependency gate (end the whack-a-mole)

deploy-disk.sh had its own hardcoded tool check that was out of sync with
check-host-deps.sh, so builds got past the host gate and then failed at
deploy time with "missing host tool mkfs.btrfs" (btrfs-progs was never in
check-host-deps.sh).

- check-host-deps.sh: add mkfs.btrfs/btrfs (btrfs-progs) plus curl/git so
  `make deps` / check-host-deps --install covers the entire build + deploy
  path in one go.
- deploy-disk.sh: pre-flight now checks the full tool set (sgdisk,
  partprobe, mkfs.btrfs, btrfs, rsync, wipefs, truncate, + mkfs.vfat for
  efi) and reports ALL missing tools at once with the exact apt install
  command, instead of dying on the first one.
- build-live.sh: the live image explicitly installs gdisk, parted,
  dosfstools, btrfs-progs, rsync so the graphical installer always has the
  deploy tooling regardless of edition.
This commit is contained in:
Blake Ridgway
2026-08-21 21:00:38 -05:00
parent 1618897bc2
commit 52d5460227
3 changed files with 29 additions and 4 deletions

View File

@@ -55,12 +55,15 @@ chroot_run() { chroot "$LIVE_ROOT" /bin/bash -c "$*"; }
# ── 2. install live session packages ────────────────────────────────────────
log "[1/4] installing live-boot + X + installer dependencies"
mount_pseudo
# deploy tooling (gdisk parted dosfstools btrfs-progs rsync) is needed by
# deploy-disk.sh, which the graphical installer runs against the target disk.
chroot_run "export DEBIAN_FRONTEND=noninteractive
apt-get update -qq
apt-get install -y --no-install-recommends \
live-boot live-config-systemd live-tools \
xserver-xorg x11-xserver-utils openbox \
python3-gi gir1.2-gtk-3.0 gdisk parted dosfstools \
python3-gi gir1.2-gtk-3.0 \
gdisk parted dosfstools btrfs-progs rsync \
| tee /tmp/live-packages.log"
# Modern Xorg refuses to run as root, so the live session runs as a dedicated

View File

@@ -33,6 +33,12 @@ NEEDED=(
"sbverify|sbsigntool"
# hybrid ISO: mtools builds the embedded EFI image that grub-mkrescue uses
"mformat|mtools"
# deploy path (deploy-disk.sh): partition, btrfs, and copy tooling
"mkfs.btrfs|btrfs-progs"
"btrfs|btrfs-progs"
# toolchain / vendor downloads
"curl|curl"
"git|git"
)
MISSING=()

View File

@@ -42,10 +42,26 @@ validate_edition "$EDITION"
[[ -d "$ROOTFS" ]] || die "rootfs '$ROOTFS' does not exist (build it first: make rootfs-$EDITION)"
[[ -e "$DEV" ]] || die "device '$DEV' does not exist"
for tool in sgdisk mkfs.btrfs rsync; do
command -v "$tool" >/dev/null || die "missing host tool '$tool' (run: scripts/check-host-deps.sh --install)"
# ── deploy tool pre-flight ─────────────────────────────────────────────────
# Report EVERY missing tool at once (no one-at-a-time whack-a-mole), with the
# exact install command. Runs on the build host for image/install builds and
# inside the live image for the graphical installer.
declare -A TOOL_PKG=(
[sgdisk]=gdisk [partprobe]=parted
[mkfs.btrfs]=btrfs-progs [btrfs]=btrfs-progs
[rsync]=rsync [wipefs]=util-linux [truncate]=coreutils
[mkfs.vfat]=dosfstools
)
MISSING_TOOLS=()
for tool in sgdisk partprobe mkfs.btrfs btrfs rsync wipefs truncate mkfs.vfat; do
[[ "$tool" == "mkfs.vfat" && "$BOOT" != "efi" ]] && continue
command -v "$tool" >/dev/null 2>&1 || MISSING_TOOLS+=("$tool")
done
[[ "$BOOT" == "efi" ]] && { command -v mkfs.vfat >/dev/null || die "missing 'mkfs.vfat' (package: dosfstools)"; }
if [[ ${#MISSING_TOOLS[@]} -gt 0 ]]; then
pkgs=""
for t in "${MISSING_TOOLS[@]}"; do pkgs+=" ${TOOL_PKG[$t]}"; done
die "missing deploy tools: ${MISSING_TOOLS[*]} — install: apt-get install -y${pkgs} (or: scripts/check-host-deps.sh --install)"
fi
# device + partition naming: /dev/sda → /dev/sda1, /dev/nvme0n1 → /dev/nvme0n1p1, /dev/loop0 → /dev/loop0p1
part_of() {