Commit Graph

5 Commits

Author SHA1 Message Date
Blake Ridgway
9952f89783 fix: incremental rootfs builds so stale archives are never deployed
The deploy failed with "grub-install: command not found" in the chroot —
the installed rootfs archive was built BEFORE the BOOT/grub injection, so
it had no bootloader at all. build-iso.sh / build-image.sh only rebuilt
the rootfs when the archive was missing, never when sources changed, so
development fixes were silently absent from deployed images.

- build-rootfs.sh: incremental staleness check — skips a rebuild only when
  no input (scripts/, btrfs/, overlays/, editions/<e>/, versions.mk,
  toolchain debs) is newer than the artifact; FORCE=1 rebuilds anyway.
- build-iso.sh / build-image.sh: always delegate freshness to
  build-rootfs.sh instead of gating on file existence.
- deploy-disk.sh: defensive check that grub-install exists in the deployed
  rootfs, with a clear "stale archive — rebuild" message instead of a bare
  "command not found".
- docs/building.md: incremental-build note (FORCE=1 / make clean).
2026-08-22 02:46:03 -05:00
Blake Ridgway
52d5460227 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.
2026-08-21 21:00:38 -05:00
Blake Ridgway
1618897bc2 fix: deploy-disk.sh --boot argument parsing + installer combo ids
The installer failed with:

    deploy-disk.sh /dev/vda ... workstation --boot
    error: --boot must be bios|efi (got --boot)

Two bugs:

1. deploy-disk.sh treated $4 as the bare boot value, but every caller
   (installer, build-image.sh, install.sh) passes "--boot <val>", so $4
   was the literal "--boot". It now parses "--boot <bios|efi>", accepts a
   bare positional too, and falls back to the BOOT build variable. This
   also fixes build-image.sh / install.sh, which had the same mismatch.

2. installer/arcline-installer built the boot ComboBox with append(id,text)
   arguments swapped, so get_active_id() returned "UEFI (grub-efi-amd64)"
   instead of "efi". Fixed the id/text order.
2026-08-21 20:44:56 -05:00
Blake Ridgway
0361c12c07 fix: resolve grub-pc / grub-efi-amd64 "held broken packages" conflict
The edition package lists installed BOTH grub-pc and grub-efi-amd64
(+ shim-signed). Those provide the same bootloader role and conflict in
apt, so every rootfs build failed with "unable to correct problems, you
have held broken packages".

A rootfs now carries exactly ONE bootloader, chosen by the BOOT variable
(mirroring the existing --boot bios|efi deploy option):

- versions.mk / common.sh: BOOT := bios (bios -> grub-pc,
  efi -> grub-efi-amd64 + shim-signed + mokutil), exported via the
  Makefile.
- build-rootfs.sh validates BOOT early and injects the matching boot
  packages into the apt install; the static package lists no longer
  contain any grub package.
- deploy-disk.sh / build-image.sh / install.sh default --boot from the
  same BOOT variable, so a rootfs and the artifact deployed from it can
  never disagree (BOOT=efi make image-cloud produces a UEFI image).
- mokutil is now installed explicitly in the efi flavour (it was not
  pulled in because we install with --no-install-recommends).
- docs updated (building.md knob + rationale, secureboot.md note).
2026-08-21 14:15:10 -05:00
Blake Ridgway
51d87daa7b feat: add disk-deploy core, disk image builder, and installer
- deploy-disk.sh: the shared "write a finished system to a disk" step —
  partition (GPT bios/efi) -> btrfs layout via btrfs/init.sh -> rsync
  rootfs -> chroot (real fstab, GRUB, hostname). Carries the optional
  ARCLINE_SIGN hook; the signing tooling itself lands in a later commit.
- apply-fstab.sh: renders the edition fstab template with real root/efi
  UUIDs and drops the swap line.
- build-image.sh: rootfs -> bootable qcow2/raw disk image (sparse file +
  loop device + deploy), the cloud edition's primary output.
- install.sh: scripted installer for a real disk, confirmation-gated.
- Makefile: image-<edition> targets (+ minimal variants); build-edition.sh
  learns the "image" stage; cloud metadata now ships a disk image.
- check-host-deps.sh / GitLab CI: add gdisk, parted, rsync, dosfstools,
  qemu-utils, dpkg, sbsigntool to the build image.
2026-08-21 13:33:17 -05:00