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.
This commit is contained in:
16
Makefile
16
Makefile
@@ -35,7 +35,7 @@ export TOOLCHAIN_REPO
|
||||
ROOT := $(CURDIR)
|
||||
EDITION := $(filter-out $@,$(MAKECMDGOALS))
|
||||
|
||||
.PHONY: help deps check toolchain test clean
|
||||
.PHONY: help deps check toolchain vendor test clean
|
||||
|
||||
# ── help ────────────────────────────────────────────────────────────────────
|
||||
help:
|
||||
@@ -45,9 +45,11 @@ help:
|
||||
@echo " make check Validate manifests + shell syntax"
|
||||
@echo " make rootfs-<edition> Build rootfs (server|workstation|cloud)"
|
||||
@echo " make iso-<edition> Build ISO (server|workstation|cloud)"
|
||||
@echo " make image-<edition> Build disk image (qcow2; cloud edition)"
|
||||
@echo " make iso Build ISO for every edition"
|
||||
@echo " make iso-<edition>-minimal Build ISO WITHOUT the Arcline toolchain"
|
||||
@echo " make toolchain Build the 11 Go tools into .deb"
|
||||
@echo " make vendor Build grafana/loki/promtail .debs"
|
||||
@echo " make test Run smoke tests against a built image"
|
||||
@echo " make clean Remove build/ artifacts"
|
||||
@echo
|
||||
@@ -70,19 +72,25 @@ check:
|
||||
# require fail if no .deb files are available
|
||||
# The *-minimal targets are a shortcut for ARCLINE_TOOLCHAIN=skip.
|
||||
define ISO_RULE
|
||||
.PHONY: rootfs-$(1) iso-$(1) clean-$(1) rootfs-$(1)-minimal iso-$(1)-minimal
|
||||
.PHONY: rootfs-$(1) iso-$(1) image-$(1) clean-$(1) rootfs-$(1)-minimal iso-$(1)-minimal image-$(1)-minimal
|
||||
rootfs-$(1):
|
||||
@./scripts/build-edition.sh $(1) rootfs
|
||||
|
||||
iso-$(1):
|
||||
@./scripts/build-edition.sh $(1) iso
|
||||
|
||||
image-$(1):
|
||||
@./scripts/build-edition.sh $(1) image
|
||||
|
||||
rootfs-$(1)-minimal:
|
||||
@ARCLINE_TOOLCHAIN=skip ./scripts/build-edition.sh $(1) rootfs
|
||||
|
||||
iso-$(1)-minimal:
|
||||
@ARCLINE_TOOLCHAIN=skip ./scripts/build-edition.sh $(1) iso
|
||||
|
||||
image-$(1)-minimal:
|
||||
@ARCLINE_TOOLCHAIN=skip ./scripts/build-edition.sh $(1) image
|
||||
|
||||
clean-$(1):
|
||||
@rm -rf "$(ROOTFS_DIR)/$(1)" "$(IMAGE_DIR)/$(1)"
|
||||
endef
|
||||
@@ -94,6 +102,10 @@ iso: $(foreach e,$(EDITIONS),iso-$(e))
|
||||
toolchain:
|
||||
@./toolchain/build-tools.sh
|
||||
|
||||
# ── vendor packaging (grafana / loki / promtail) ────────────────────────────
|
||||
vendor:
|
||||
@./toolchain/build-vendor.sh
|
||||
|
||||
# ── tests ───────────────────────────────────────────────────────────────────
|
||||
test:
|
||||
@./tests/run-tests.sh
|
||||
|
||||
Reference in New Issue
Block a user