From 673a57c48a99736e4c832bccd3bbbbcbfae91fc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Mass=C3=A9?= Date: Sat, 19 Sep 2026 09:50:35 +0000 Subject: [PATCH] Merge cookbook's own examples into fcos-dev.ign `make fcos-vm` builds build/fcos-dev.ign but never merged the current project's own *-examples.ign, even though it was listed as a prerequisite and staged into butane's -d dir. The generated .bu only referenced what was passed to default-butane-spec.sh, and -examples was appended to the dependencies but never to $(PROJECT_NAME). Units gated on config that ships only as an example (e.g. ConditionPathExists) therefore stayed inactive on a fresh dev VM. Introduce a SELF variable so the dev spec includes the project's own examples while the test spec is left unchanged. base is filtered out of DEPS for its own build, so base-examples is not duplicated. Fixes #4 Co-Authored-By: Claude Opus 4.8 --- scripts/common.mk | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/common.mk b/scripts/common.mk index 6055a9c..89905fc 100644 --- a/scripts/common.mk +++ b/scripts/common.mk @@ -472,12 +472,14 @@ $(TOP_LEVEL_DIR)/build/local.ign: $(TOP_LEVEL_DIR)/local.bu .INTERMEDIATE: build/fcos-dev.bu build/fcos-test.bu # Generate the Butane specs for development and testing by merging the current project's spec with those of the dependencies. -# The development spec also includes the examples of the dependencies. -# Whereas the testing spec only includes the main specs of the dependencies. +# The development spec also includes the examples of the current project and of its dependencies. +# Whereas the testing spec only includes the main specs of the current project and of its dependencies. build/fcos-dev.bu build/fcos-test.bu: DEPS := $(if $(filter-out base,$(PROJECT_NAME)),base $(DEPENDENCIES),$(DEPENDENCIES)) build/fcos-dev.bu: DEPS := $(DEPS) $(addsuffix -examples,$(DEPS)) +build/fcos-test.bu: SELF := $(PROJECT_NAME) +build/fcos-dev.bu: SELF := $(PROJECT_NAME) $(PROJECT_NAME)-examples build/fcos-dev.bu build/fcos-test.bu: %.bu: Makefile $(SCRIPTS_DIR)/default-butane-spec.sh build - $(SCRIPTS_DIR)/default-butane-spec.sh $(PROJECT_NAME) $(DEPS) > $@ + $(SCRIPTS_DIR)/default-butane-spec.sh $(SELF) $(DEPS) > $@ # Generate the final Fedora CoreOS ignition files (dev & test) by merging the Butane spec with the local and project-specific ignition files, as well as those of the dependencies. build/fcos-dev.ign: $(TOP_LEVEL_DIR)/build/local.ign build/$(PROJECT_NAME).ign build/$(PROJECT_NAME)-examples.ign $(DEPENDENCIES_IGNITION_EXAMPLES_FILES)