diff --git a/.gitignore b/.gitignore index a107cdc..e185ed8 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ *.ign !fcos.bu !overlay.bu +!overlay-examples.bu __pycache__/ .pytest_cache/ **/build/*.tar.gz diff --git a/cookbooks/base/overlay.bu b/cookbooks/base/overlay.bu index 80d42c1..2413f41 100644 --- a/cookbooks/base/overlay.bu +++ b/cookbooks/base/overlay.bu @@ -1,21 +1,6 @@ variant: fcos version: 1.4.0 storage: - disks: - - device: /dev/vdb - wipe_table: false - partitions: - # Specify the partition number so that FCOS do not try to create a new - # partition at each VM redeployment. - - number: 1 - size_mib: 0 - start_mib: 0 - label: var - filesystems: - - path: /var - device: /dev/disk/by-partlabel/var - format: xfs - with_mount_unit: true directories: - path: /var/lib/private/sshd mode: 0700 diff --git a/local.bu.template b/local.bu.template index a9cfa17..70da847 100644 --- a/local.bu.template +++ b/local.bu.template @@ -1,5 +1,21 @@ variant: fcos version: 1.4.0 +storage: + disks: + - device: /dev/vdb + wipe_table: false + partitions: + # Specify the partition number so that FCOS do not try to create a new + # partition at each VM redeployment. + - number: 1 + size_mib: 0 + start_mib: 0 + label: var + filesystems: + - path: /var + device: /dev/disk/by-partlabel/var + format: xfs + with_mount_unit: true passwd: users: - name: john diff --git a/scripts/common.mk b/scripts/common.mk index 89905fc..406b14a 100644 --- a/scripts/common.mk +++ b/scripts/common.mk @@ -451,8 +451,9 @@ build/$(PROJECT_NAME).tar.gz build/$(PROJECT_NAME).bu build/$(PROJECT_NAME)-exam $(SCRIPTS_DIR)/generate-tarball.sh build/$(PROJECT_NAME).tar.gz; \ (cat $(SCRIPTS_DIR)/butane.blocklist; echo; for file in $$(find "$$TARGET_CHROOT"); do echo "$${file#$$TARGET_CHROOT}"; done) | sort -u | grep -v -E '^$$' > "$(BUTANE_BLOCKLIST)"; \ run make install-examples; \ + EXAMPLES_YQ_FILES="$$(if [ -f "overlay-examples.bu" ]; then echo "- overlay-examples.bu"; else echo "-"; fi)"; \ echo "generate-butane-spec.sh build/$(PROJECT_NAME)-examples.bu"; \ - $(SCRIPTS_DIR)/generate-butane-spec.sh build/$(PROJECT_NAME)-examples.bu; \ + $(SCRIPTS_DIR)/generate-butane-spec.sh | yq eval-all '. as $$item ireduce ({}; . *+ $$item)' $$EXAMPLES_YQ_FILES > build/$(PROJECT_NAME)-examples.bu; \ (cat $(SCRIPTS_DIR)/butane.blocklist; echo; for file in $$(find "$$TARGET_CHROOT"); do echo "$${file#$$TARGET_CHROOT}"; done) | sort -u | grep -v -E '^$$' > "$(BUTANE_BLOCKLIST)"; \ fi .PHONY: build/$(PROJECT_NAME).bu build/$(PROJECT_NAME)-examples.bu