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.
54 lines
1.8 KiB
Bash
Executable File
54 lines
1.8 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# ─────────────────────────────────────────────────────────────────────────────
|
|
# Arcline OS — host build-dependency check
|
|
#
|
|
# scripts/check-host-deps.sh → report what's missing
|
|
# scripts/check-host-deps.sh --install → apt-get install what's missing
|
|
#
|
|
# Builds run debootstrap (rootfs), copy overlays (standard tools), and produce
|
|
# a hybrid ISO via grub-mkrescue + mksquashfs.
|
|
# ─────────────────────────────────────────────────────────────────────────────
|
|
set -euo pipefail
|
|
source "$(dirname "${BASH_SOURCE[0]}")/common.sh"
|
|
|
|
NEEDED=(
|
|
"debootstrap|debootstrap"
|
|
"grub-mkrescue|grub2-common"
|
|
"mksquashfs|squashfs-tools"
|
|
"xorriso|xorriso"
|
|
"cpio|cpio"
|
|
"bash|bash"
|
|
)
|
|
|
|
MISSING=()
|
|
for entry in "${NEEDED[@]}"; do
|
|
bin="${entry%%|*}"; pkg="${entry##*|}"
|
|
if ! command -v "$bin" >/dev/null 2>&1; then
|
|
MISSING+=("$pkg")
|
|
warn "missing: $bin (package: $pkg)"
|
|
fi
|
|
done
|
|
|
|
if [[ ${#MISSING[@]} -eq 0 ]]; then
|
|
log "all host build dependencies present ✓"
|
|
exit 0
|
|
fi
|
|
|
|
if [[ "${1:-}" == "--install" ]]; then
|
|
log "installing: ${MISSING[*]}"
|
|
if [[ $EUID -ne 0 ]] && command -v sudo >/dev/null; then
|
|
sudo apt-get update
|
|
sudo apt-get install -y "${MISSING[@]}"
|
|
else
|
|
apt-get update
|
|
apt-get install -y "${MISSING[@]}"
|
|
fi
|
|
log "dependencies installed ✓"
|
|
else
|
|
echo
|
|
echo "Run the following to install them:"
|
|
echo " sudo apt-get install -y ${MISSING[*]}"
|
|
echo "or: scripts/check-host-deps.sh --install"
|
|
exit 1
|
|
fi
|