commit 7218210c398cd6d35860f378b1d4140459ae4acb
parent d15d250fb38fb5b0bb94679b377815e38f374cba
Author: Ryan Sepassi <rsepassi@gmail.com>
Date: Thu, 16 Jul 2026 10:56:52 -0700
Add dist-dev convenience target
Diffstat:
3 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/doc/RELEASE.md b/doc/RELEASE.md
@@ -62,6 +62,8 @@ The staging tree is `bin/kit`, `lib/libkit.a`, `include/`,
`KIT_SIGN_KEY=<path>`, `KIT_RELEASE_PUBKEYS=<path...>`, and
`KIT_UPDATE_INDEX_URL=<stable-url>`. It rejects the in-tree **NON-RELEASE** test
key unless a hermetic harness explicitly sets `KIT_RELEASE_ALLOW_TEST_KEY=1`.
+For a local packaging smoke test, `make dist-dev` invokes `make dist` with the
+checked-in non-release keypair and an inert `example.invalid` update URL.
The `.kpkg` is the canonical update unit; the `.tar.gz` carries its signed
manifest internally, and the extra detached `.minisig` lets a user with only
stock `minisign` verify before unpacking.
diff --git a/mk/dist.mk b/mk/dist.mk
@@ -7,10 +7,11 @@
# stock-minisign bootstrap path). Release trust is mandatory: callers provide
# KIT_SIGN_KEY, KIT_RELEASE_PUBKEYS, and KIT_UPDATE_INDEX_URL. Hermetic tests
# that intentionally use the in-tree non-release key must opt in explicitly
-# with KIT_RELEASE_ALLOW_TEST_KEY=1. The multi-target matrix + channel index
-# live in scripts/release.sh.
+# with KIT_RELEASE_ALLOW_TEST_KEY=1. `make dist-dev` supplies that hermetic
+# configuration as a convenience. The multi-target matrix + channel index live
+# in scripts/release.sh.
-.PHONY: dist
+.PHONY: dist dist-dev
ifneq ($(filter dist,$(MAKECMDGOALS)),)
ifeq ($(strip $(KIT_SIGN_KEY)),)
@@ -32,6 +33,13 @@ DIST_BASE = kit-$(KIT_VERSION)-$(KIT_HOST_TRIPLE)
DIST_KPKG = $(DIST_DIR)/$(DIST_BASE).kpkg
DIST_TARGZ = $(DIST_DIR)/$(DIST_BASE).tar.gz
+dist-dev:
+ $(MAKE) dist \
+ KIT_SIGN_KEY=test/dist/keys/nonrelease.key \
+ KIT_RELEASE_PUBKEYS=test/dist/keys/nonrelease.pub \
+ KIT_RELEASE_ALLOW_TEST_KEY=1 \
+ KIT_UPDATE_INDEX_URL=https://example.invalid/stable.index
+
dist:
@if [ ! -f "$(KIT_SIGN_KEY)" ]; then \
printf '%s\n' 'dist: KIT_SIGN_KEY is not a file: $(KIT_SIGN_KEY)' >&2; \
diff --git a/test/dist/run.sh b/test/dist/run.sh
@@ -65,6 +65,7 @@ run_ok "release-dist-explicit-test-shape" make -n -C "$repo_root" dist \
KIT_SIGN_KEY="$SECKEY" KIT_RELEASE_ALLOW_TEST_KEY=1 \
KIT_UPDATE_INDEX_URL=https://updates.example/stable.index \
KIT_RELEASE_PUBKEYS="$PUBKEY"
+run_ok "release-dist-dev-shape" make -n -C "$repo_root" dist-dev
# ---- local helpers ---------------------------------------------------------