From 3b281aad5a5505d100fb18be2983a6a004b30b77 Mon Sep 17 00:00:00 2001 From: bong-water-water-bong Date: Sun, 8 Nov 2026 20:17:50 -0400 Subject: [PATCH] os/mini: the identity hashes the engine where the image puts it, not where nothing is (#1550's find, main's defect) `install_origin "$bin" "$eng"` (#1553) installs the engine into `$root/opt/1bit/` and links `/bin/1bit` to it - **nothing writes `$root$bin` any more**. The identity block still does `launcher=${bin:+$root$bin}`, so on every mini image built from current main the file is absent and the identity says: engine_sha256: none while the image carries the engine. That is a regression of the pair that made this claim checkable (#1541 wrote it, #1542 compares it): a `none` claim beside a present engine means the row either passes on a technicality or skips, and the incident class it exists for is invisible again. Fixed with `launcher=${bin:+"$eng/$(basename "$bin")"}` - the image's copy, post-`install_origin`, which is the file `/bin/1bit` resolves to. Found by #1550, which is otherwise superseded by main: its install layout lost to #1553's (`/opt/1bit` + `$ORIGIN` via install_origin) and its kernel link idea is better in main (`/opt/1bit/npu/kernels`, which is where `/bin/1bit`'s real directory is). Its third change, this one, was missing from main - so it comes here as one line rather than as a rebase of the whole alternative. --- os/mini/mkimage.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/os/mini/mkimage.sh b/os/mini/mkimage.sh index 3df472409..caf3afe3d 100755 --- a/os/mini/mkimage.sh +++ b/os/mini/mkimage.sh @@ -530,7 +530,10 @@ lemver=$("$lem/bin/lemond" --version 2>/dev/null | sed -n 's/^lemond version \([ # the IMAGE's copy, not the build tree's and not the payload's: hashing "$root$bin" is post-`cp -L`, and nothing rewrites it # afterwards (the only `relocate`/patchelf calls are on the data-partition llama set). Hashing the build file would name # bytes the image may not carry, and hashing `$root/bin/1bit` would follow the symlink out to the host's build tree. - launcher=${bin:+$root$bin} + # engine#1543 follow-up: the engine is installed by `install_origin "$bin" "$eng"` into $root/opt/1bit, and + # /bin/1bit is a SYMLINK to it - nothing writes "$root$bin" any more, so hashing that path found no file and every + # mini image built from this tree wrote `engine_sha256: none` while carrying the engine. Hash the image's copy. + launcher=${bin:+"$eng/$(basename "$bin")"} if [ -n "${launcher:-}" ] && [ -f "$launcher" ]; then echo "engine_sha256: $(sha256sum "$launcher" | cut -c1-64)" else