refactor: unified multi-profile build system
Add 4 configurable profiles (stable-cinnamon, stable-niri, mainline-cinnamon, mainline-niri) with a single unified build entry point. - iso/build.sh: replaces build-iso.sh / build-live-iso.sh / build-niri-live-iso.sh; accepts --profile and --type flags - iso/_inner-build-unified.sh: replaces the three _inner-build-*.sh scripts; branches on BUILD_TYPE / DESKTOP / KERNEL_PKG env vars - config/profiles/stable-niri/: new — linux (k6) + niri/Wayland/noctalia - config/profiles/mainline-cinnamon/: new — linux-mainline (k7) + Cinnamon/X11 - config/profiles/mainline-niri/packages.live.list: symlink added - config/profiles/stable-cinnamon/packages.live.list: symlink added - Makefile: PROFILE variable (default stable-cinnamon), shellcheck updated - installer/install.sh: respects DEFAULT_PROFILE env (set by live ISO) - tests/run-qemu-test.sh: passes PROFILE through to build and overlay Live ISOs embed the installer pre-configured for the same profile they were built with (DEFAULT_PROFILE in /etc/profile.d/).
This commit is contained in:
28
Makefile
28
Makefile
@@ -1,8 +1,12 @@
|
||||
# Void Installer — XPS 17 (xps9700)
|
||||
#
|
||||
# Profiles: stable-cinnamon | stable-niri | mainline-cinnamon | mainline-niri
|
||||
# kernel: stable = Void's linux (k6), mainline = linux-mainline (k7)
|
||||
# DE: cinnamon = Cinnamon/X11, niri = niri+noctalia-shell/Wayland
|
||||
#
|
||||
# Targets:
|
||||
# make iso build the auto-installing ISO (uses docker)
|
||||
# make live build the full Cinnamon live desktop ISO
|
||||
# make iso build the auto-installing ISO (PROFILE=stable-cinnamon)
|
||||
# make live build the full desktop live ISO (PROFILE=stable-cinnamon)
|
||||
# make test-disk create a fresh QEMU test disk that mimics XPS 17 layout
|
||||
# make test full automated QEMU smoke test
|
||||
# make test-iso rebuild only the TEST ISO variant
|
||||
@@ -10,10 +14,16 @@
|
||||
# make shellcheck lint all installer/build shell scripts
|
||||
# make clean remove build/, out/ (cache stays)
|
||||
# make distclean also remove cache/
|
||||
#
|
||||
# Examples:
|
||||
# make live PROFILE=mainline-niri
|
||||
# make iso PROFILE=stable-cinnamon
|
||||
# make test PROFILE=mainline-cinnamon
|
||||
|
||||
PROJECT_DIR := $(CURDIR)
|
||||
OUT := $(PROJECT_DIR)/out
|
||||
SECRETS := $(PROJECT_DIR)/secrets.env
|
||||
PROFILE ?= stable-cinnamon
|
||||
|
||||
.PHONY: all iso live live-qemu test test-disk test-iso qemu shellcheck clean distclean check-secrets check-docker
|
||||
|
||||
@@ -27,10 +37,10 @@ check-docker:
|
||||
@docker info >/dev/null 2>&1 || { echo "ERROR: docker daemon unreachable (in 'docker' group? systemctl start docker?)"; exit 1; }
|
||||
|
||||
iso: check-secrets check-docker
|
||||
$(PROJECT_DIR)/iso/build-iso.sh
|
||||
$(PROJECT_DIR)/iso/build.sh --profile $(PROFILE) --type installer
|
||||
|
||||
live: check-secrets check-docker
|
||||
$(PROJECT_DIR)/iso/build-live-iso.sh
|
||||
$(PROJECT_DIR)/iso/build.sh --profile $(PROFILE) --type live
|
||||
|
||||
# Launch the live ISO in QEMU with 12 GB RAM so nix packages fit in the tmpfs.
|
||||
# The live session is a pure-RAM tmpfs overlay; Cinnamon + nix need ~7-8 GB total.
|
||||
@@ -38,14 +48,14 @@ live-qemu:
|
||||
$(PROJECT_DIR)/tests/launch-live-qemu.sh
|
||||
|
||||
test-iso: check-secrets check-docker
|
||||
REBUILD_ISO=1 $(PROJECT_DIR)/tests/run-qemu-test.sh
|
||||
REBUILD_ISO=1 PROFILE=$(PROFILE) $(PROJECT_DIR)/tests/run-qemu-test.sh
|
||||
|
||||
test-disk:
|
||||
$(PROJECT_DIR)/tests/make-test-disk.sh $(OUT)/test-disk.img
|
||||
|
||||
test: check-secrets check-docker
|
||||
@mkdir -p $(OUT)
|
||||
$(PROJECT_DIR)/tests/run-qemu-test.sh
|
||||
PROFILE=$(PROFILE) $(PROJECT_DIR)/tests/run-qemu-test.sh
|
||||
|
||||
qemu:
|
||||
$(PROJECT_DIR)/tests/interactive-qemu.sh
|
||||
@@ -55,10 +65,8 @@ shellcheck:
|
||||
shellcheck -x \
|
||||
$(PROJECT_DIR)/installer/install.sh \
|
||||
$(PROJECT_DIR)/installer/lib/*.sh \
|
||||
$(PROJECT_DIR)/iso/build-iso.sh \
|
||||
$(PROJECT_DIR)/iso/_inner-build.sh \
|
||||
$(PROJECT_DIR)/iso/_inner-build-live.sh \
|
||||
$(PROJECT_DIR)/iso/build-live-iso.sh \
|
||||
$(PROJECT_DIR)/iso/build.sh \
|
||||
$(PROJECT_DIR)/iso/_inner-build-unified.sh \
|
||||
$(PROJECT_DIR)/tests/*.sh \
|
||||
$(PROJECT_DIR)/tests/lib/*.sh
|
||||
|
||||
|
||||
Reference in New Issue
Block a user