Scaffold the Arcline OS build system ("the wires"): a transparent,
auditable pipeline that turns a Debian bookworm base into hardened OS
images for the server, workstation, and cloud editions.
- Makefile orchestrates everything (make iso-<edition>, check, test,
toolchain, clean); versions.mk is the single source of truth for
versions and paths.
- scripts/ is the plain-bash pipeline: debootstrap -> install packages
-> apply overlays -> in-chroot configure -> live ISO, plus a rootfs
archive along the way.
- ARCLINE_TOOLCHAIN=auto|skip|require controls whether the 11 Go tools
are bundled into an image (auto by default; minimal builds available
via make iso-<edition>-minimal).
- GPL-3.0 licensed, sponsored by Arcline IT LLC.
105 lines
5.2 KiB
Makefile
105 lines
5.2 KiB
Makefile
# ─────────────────────────────────────────────────────────────────────────────
|
|
# Arcline OS — top-level build orchestration
|
|
#
|
|
# The Makefile is a thin, readable wrapper around the scripts/ pipeline. It
|
|
# exists so that "make iso-server" is the one command that takes a host with
|
|
# the right build deps to a bootable Arcline OS ISO.
|
|
#
|
|
# Everything that has real logic lives in scripts/ — this file only wires
|
|
# editions to targets and passes through environment.
|
|
#
|
|
# Quick reference:
|
|
# make help → this message
|
|
# make deps → install host build dependencies
|
|
# make check → validate manifests + shell syntax (fast, safe)
|
|
# make rootfs-<edition> → build just the rootfs for an edition
|
|
# make iso-<edition> → build a bootable ISO for an edition
|
|
# make iso → build all editions
|
|
# make toolchain → build the 11 Arcline Go tools into .deb
|
|
# make test → run the smoke tests against a built image
|
|
# make clean → wipe build/
|
|
# ─────────────────────────────────────────────────────────────────────────────
|
|
|
|
SHELL := /bin/bash
|
|
.DEFAULT_GOAL := help
|
|
|
|
include versions.mk
|
|
|
|
# Pass edition + env through to the scripts.
|
|
export DISTRO_NAME DISTRO_ID VERSION RELEASE_NAME
|
|
export DEBIAN_SUITE DEBIAN_MIRROR SECURITY_MIRROR ARCH
|
|
export KERNEL_PACKAGE KERNEL_VERSION
|
|
export BUILD_DIR ROOTFS_DIR IMAGE_DIR DEB_DIR LOG_DIR ARTIFACT_DIR
|
|
export TOOLCHAIN_REPO
|
|
|
|
ROOT := $(CURDIR)
|
|
EDITION := $(filter-out $@,$(MAKECMDGOALS))
|
|
|
|
.PHONY: help deps check toolchain test clean
|
|
|
|
# ── help ────────────────────────────────────────────────────────────────────
|
|
help:
|
|
@echo "Arcline OS build targets"
|
|
@echo "───────────────────────"
|
|
@echo " make deps Install host build dependencies"
|
|
@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 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 test Run smoke tests against a built image"
|
|
@echo " make clean Remove build/ artifacts"
|
|
@echo
|
|
@echo "Configuration (see versions.mk):"
|
|
@echo " VERSION=$(VERSION) DEBIAN_SUITE=$(DEBIAN_SUITE) ARCH=$(ARCH)"
|
|
@echo " ARCLINE_TOOLCHAIN=auto|skip|require (toolchain in image builds)"
|
|
|
|
# ── host deps ────────────────────────────────────────────────────────────────
|
|
deps:
|
|
@./scripts/check-host-deps.sh
|
|
|
|
# ── validation (fast, no network, safe on any machine) ──────────────────────
|
|
check:
|
|
@./scripts/validate.sh
|
|
|
|
# ── edition builds ──────────────────────────────────────────────────────────
|
|
# ARCLINE_TOOLCHAIN controls whether the 11 Go tools are included:
|
|
# auto (default) install if build/debs/ has .deb files, else skip
|
|
# skip never install (minimal image)
|
|
# 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
|
|
rootfs-$(1):
|
|
@./scripts/build-edition.sh $(1) rootfs
|
|
|
|
iso-$(1):
|
|
@./scripts/build-edition.sh $(1) iso
|
|
|
|
rootfs-$(1)-minimal:
|
|
@ARCLINE_TOOLCHAIN=skip ./scripts/build-edition.sh $(1) rootfs
|
|
|
|
iso-$(1)-minimal:
|
|
@ARCLINE_TOOLCHAIN=skip ./scripts/build-edition.sh $(1) iso
|
|
|
|
clean-$(1):
|
|
@rm -rf "$(ROOTFS_DIR)/$(1)" "$(IMAGE_DIR)/$(1)"
|
|
endef
|
|
$(foreach e,$(EDITIONS),$(eval $(call ISO_RULE,$(e))))
|
|
|
|
iso: $(foreach e,$(EDITIONS),iso-$(e))
|
|
|
|
# ── toolchain ───────────────────────────────────────────────────────────────
|
|
toolchain:
|
|
@./toolchain/build-tools.sh
|
|
|
|
# ── tests ───────────────────────────────────────────────────────────────────
|
|
test:
|
|
@./tests/run-tests.sh
|
|
|
|
# ── clean ───────────────────────────────────────────────────────────────────
|
|
clean:
|
|
@rm -rf "$(BUILD_DIR)"
|
|
@echo "removed $(BUILD_DIR)/"
|