From 721ffad1f0adc8ce7a758cbfab5c9388ed9c669a Mon Sep 17 00:00:00 2001 From: "Lance R. Vick" Date: Sat, 3 Aug 2024 15:52:30 -0700 Subject: [PATCH] cache/determinism fixes and doc updates --- Makefile | 8 +++++--- README.md | 12 ++++++++++++ 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 36a8970..4420b0c 100644 --- a/Makefile +++ b/Makefile @@ -8,8 +8,9 @@ export ## Use env vars from latest release when reproducing ifdef REPRODUCE - include dist/release.env - export +include dist/release.env +NO_CACHE := --no-cache +export endif .DEFAULT_GOAL := @@ -24,12 +25,13 @@ default: \ out/airgap.iso: Containerfile $(shell git ls-files rootfs) docker build \ --progress=plain \ - --output type=local,dest=out \ + --output type=local,rewrite-timestamp=true,dest=out \ --build-arg VERSION="$(VERSION)" \ --build-arg GIT_REF="$(GIT_REF)" \ --build-arg GIT_AUTHOR="$(GIT_AUTHOR)" \ --build-arg GIT_KEY="$(GIT_KEY)" \ --build-arg GIT_TIMESTAMP="$(GIT_TIMESTAMP)" \ + $(NO_CACHE) \ -f Containerfile \ . diff --git a/README.md b/README.md index ac14337..81295e9 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,18 @@ make attest make sign ``` +## Provisioning ## + +1. Write airgap.iso to CD-ROM or SD Card + a. `dd if=out/airgap.iso of=/dev/sda bs=1M conv=sync status=progress` + b. `cdrecord out/airgap.iso` + +2. Verify media still produces expected hash + ``` + sha256sum out/airgap.iso + head -c $(stat -c '%s' airgap.iso) /dev/sda | sha256sum + ``` + ## Setup ## Assumes target is running Pureboot or Coreboot/heads