From 3b109a4cdfab4a87941b40ffbca0b7fbba6405dd Mon Sep 17 00:00:00 2001 From: bong-water-water-bong Date: Sun, 8 Nov 2026 19:02:24 -0400 Subject: [PATCH 1/2] release-check: payload= is compared with the payload the image carries (Fixes #1557) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The engine half of #1481 closed; this is the half that was kept open on purpose. `payload=` was a DECLARED value — `PAYLOAD_NAME` from the build's environment (container-build.sh:352) — and nothing compared it with the bytes, so c32 and c33 both shipped `payload=lemonade-onebit-rc-2026-11-05-c26c` beside later payloads. The engine sha is computed from a file; the name is taken from an environment variable, which is how one wrong variable makes an identity half true. New row `identity-payload`, from a pure `payload_verdict() `: claim matches a tarball stem in /data/SHA256SUMS -> PASS claim names something else -> FAIL (the c32/c33 shape) claim empty or `unknown` with a payload present -> FAIL (a declaration that cannot be true) no payload tarball named in the table -> SKIP (not a pass by absence) The authority is the data partition's own checksum table — the same file the `sha256sums` row verifies beside it, so it is a fact about the image rather than about the build environment. Deliberately not the payload directory's name: the tree is always /opt/1bit-package, so comparing against that would pass for any claim at all, the vacuous check the issue warns about. Four self-test cases, which is the acceptance the issue asked for (`cmake --build` runs them via ctest `release_check_row`): current cut PASS, the c26c-in-a-c33-image FAIL, `unknown` FAIL, absent tarball SKIP. Whole self-test: 123 checks, PASS under **both** dash and bash (it runs as `#!/bin/sh` in the image). Option (2) from the issue — comparing against the release bundle's tarball name — is deliberately not here: that is a bundle-side check and belongs where the bundle is assembled, as the issue says. The release-body rule also stands untouched: the payload name in a release body comes from the bundle and SHA256SUMS, not from this file. Fixes #1557. --- os/mini/release-check.sh | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/os/mini/release-check.sh b/os/mini/release-check.sh index d1f35b7ad..5c4f78261 100755 --- a/os/mini/release-check.sh +++ b/os/mini/release-check.sh @@ -591,6 +591,29 @@ identity_launcher_path() { else printf '%s\n' "${PAYLOAD_DIR:-/opt/1bit-package}/1bit/1bit"; fi } +# Does the identity's `payload=` name a payload the image actually carries? engine#1557: it was a DECLARED value +# (PAYLOAD_NAME from the build's environment, container-build.sh:352) and nothing compared it, so c32 and c33 both +# shipped `payload=lemonade-onebit-rc-2026-11-05-c26c` beside later payloads. +# +# The authority is the data partition's own checksum table: /data/SHA256SUMS lists the payload tarball(s) the image +# was built with, so `.tar.zst` present there is a fact about the image, not about the build's environment. +# Deliberately NOT the payload directory's name: the tree is always /opt/1bit-package, so comparing against it +# would pass for any claim at all - the vacuous check the issue warns about. +# +# SKIP, never a pass, when the image carries no payload tarball in its table (an image-only cut, or a stick whose +# data partition was written by an older layout): a row that cannot see the bytes must not call the claim true. +payload_verdict() { # + _pc=${1:-} _pp=${2:-} + if [ -z "$_pp" ]; then printf 'SKIP no payload tarball named in /data/SHA256SUMS, so payload= cannot be compared with the bytes'; return 0; fi + case "$_pc" in + ''|unknown) printf 'FAIL the identity names no payload (payload=%s) while the data partition carries %s - a declaration that cannot be true' "${_pc:-empty}" "$(printf '%s' "$_pp" | tr '\n' ' ')"; return 0 ;; + esac + _hit=0 + for _s in $_pp; do [ "$_s" = "$_pc" ] && _hit=1; done + if [ "$_hit" = 1 ]; then printf 'PASS payload=%s is the payload this image carries' "$_pc" + else printf 'FAIL the identity claims payload=%s but the data partition carries %s - the c32/c33 shape' "$_pc" "$(printf '%s' "$_pp" | tr '\n' ' ')"; fi +} + identity_verdict() { _ce=${1:-} _ae=${2:-} _ch=${3:-} _ah=${4:-} case "$_ce" in ''|*[!0-9a-f]*) printf 'FAIL the identity file'"'"'s engine_sha256 is not a hex digest (%s) - malformed, not merely old' "${_ce:-empty}"; return 0 ;; esac @@ -759,6 +782,11 @@ if [ "${1:-}" = --self-test ]; then check PASS "$(identity_verdict aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb)" check FAIL "$(identity_verdict aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 7ba2110811111111111111111111111111111111111111111111111111111111 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb)" # the c26-in-a-c32-image shape: engine claim vs shipped launcher check FAIL "$(identity_verdict aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc)" # libhsa claim vs the runtime the image carries + # engine#1557: payload= against the payload tarball the data partition names + check PASS "$(payload_verdict lemonade-onebit-rc-2026-11-08-c33 'lemonade-onebit-rc-2026-11-08-c33')" + check FAIL "$(payload_verdict lemonade-onebit-rc-2026-11-05-c26c 'lemonade-onebit-rc-2026-11-08-c33')" # the c32/c33 shape: an inherited name beside a later payload + check FAIL "$(payload_verdict unknown 'lemonade-onebit-rc-2026-11-08-c33')" # the writer's default, with a payload present + check SKIP "$(payload_verdict lemonade-onebit-rc-2026-11-08-c33 '')" # no tarball in the table: not a pass by absence check FAIL "$(identity_verdict 89a6c386 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb)" # malformed claim is FAIL, not unknown check FAIL "$(identity_verdict aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa '' bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb)" # nothing to check the claim against check PASS "$(identity_verdict aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa none '')" # `none` and nothing on the loader path: consistent @@ -1868,6 +1896,18 @@ if [ -f "$ID" ]; then *) fail identity "${_idv#FAIL } (${_idinfo})" ;; esac fi + # engine#1557: payload= was the one field of this file nothing checked. The stems come from the data partition's + # own table, the same file the sha256sums row verifies beside it. + _pv_stems= + if [ -f /data/SHA256SUMS ]; then + _pv_stems=$(sed -n 's|.*[ ]||p' /data/SHA256SUMS 2>/dev/null | sed -n 's|\.tar\.zst$||p' | sort -u) + fi + _pvv=$(payload_verdict "${_id_name:-}" "$_pv_stems") + case "$_pvv" in + PASS*) pass identity-payload "${_pvv#PASS }" ;; + SKIP*) skip identity-payload "${_pvv#SKIP }" ;; + *) fail identity-payload "${_pvv#FAIL }" ;; + esac if [ -f /data/SHA256SUMS ]; then if (cd /data && sha256sum -c SHA256SUMS >/dev/null 2>&1); then pass sha256sums "/data/SHA256SUMS verifies" else fail sha256sums "/data/SHA256SUMS does not verify (cd /data && sha256sum -c SHA256SUMS)"; fi From c259aeecbc84436a7a0e83a85a1238fdc0a11a60 Mon Sep 17 00:00:00 2001 From: bong-water-water-bong Date: Sun, 8 Nov 2026 19:41:40 -0400 Subject: [PATCH 2/2] release-check: the identity's payload is checked by CONTENT, in-repo (Fixes #1557) The first version of this row anchored on a payload tarball stem in /data/SHA256SUMS, and the review was right that no such writer exists: the payload tarball is packed outside this repo, nothing writes it into any SHA256SUMS, and the only .tar.zst a data partition holds is the PROOF bundle - so the stem parse would have passed a claim naming a proof bundle. The review's two options both wanted a writer. There is one in-repo, and it was already writing the field: container-build.sh writes `payload=${PAYLOAD_NAME}` from the /payload tree it was handed. So it now writes a fact about that same tree: payload_manifest=$(find /payload -type f | sed 's|^/payload/||' | LC_ALL=C sort | sha256sum) and release-check recomputes the SAME expression over the payload the image carries (/opt/1bit-package) and compares. A different payload has a different path list, which is the lie that survived two cycles - the name stays in the row's message as the human-readable claim it is. No packer, no tarball, no SHA256SUMS. claim matches the payload present -> PASS manifest differs -> FAIL (the c32/c33 shape) manifest is not a hex digest -> FAIL (malformed, not merely old) no manifest (the mini schema) -> SKIP (says payload= is still only a declaration) payload not at the appliance path -> SKIP (never a pass by absence) Cost: metadata only, and the payload-modes row already walks the same tree - no new order of work at boot. Five self-test arms; whole self-test 124 checks, PASS under dash and bash (the image runs it as /bin/sh). Own-fault worth recording: my first edit left the old payload_verdict in place beside the new one, so the self-test fired the OLD arms and reported two "want PASS, got FAIL" lines - the duplicate was 800 bytes away in the same file. Removed; the run quoted above is from the file with one verdict. Fixes #1557. --- os/mini/release-check.sh | 77 +++++++++++++++++++++++++--------- os/v3/puppy/container-build.sh | 12 ++++++ 2 files changed, 70 insertions(+), 19 deletions(-) diff --git a/os/mini/release-check.sh b/os/mini/release-check.sh index 5c4f78261..5a0a8d0ab 100755 --- a/os/mini/release-check.sh +++ b/os/mini/release-check.sh @@ -591,6 +591,45 @@ identity_launcher_path() { else printf '%s\n' "${PAYLOAD_DIR:-/opt/1bit-package}/1bit/1bit"; fi } +# Does the identity describe the payload the image actually carries? engine#1557: `payload=` is a DECLARED value +# (PAYLOAD_NAME from the build's environment, container-build.sh:352) and nothing compared it with the bytes, so c32 +# and c33 both shipped `payload=lemonade-onebit-rc-2026-11-05-c26c` beside later payloads. +# +# A name cannot be checked from inside the image — the image has no copy of its own tarball, which is why the first +# version of this row (matching a stem in /data/SHA256SUMS) was wrong: nothing in this repo writes a payload tarball +# there, and the only .tar.zst a data partition holds is the PROOF bundle. So the check is on CONTENT instead: the +# build writes `payload_manifest=` beside the name +# (container-build.sh, "engine#1557"), and this row recomputes the same expression over the payload present. A +# different payload has a different path list, which is the lie that survived two cycles; the name stays in the row's +# message as the human-readable claim it is. +# +# The image-side walk is metadata only and the payload-modes row below already walks the same tree, so this adds no +# order of cost. SKIP, never a pass, when the identity has no manifest (the mini schema) or the payload is not where +# an appliance keeps it: a row that cannot see the bytes must not call the claim true. +payload_verdict() { # + _pc=${1:-} _pm=${2:-} _pa=${3:-} + if [ -z "$_pa" ]; then printf 'SKIP the payload is not at the appliance path, so the identity cannot be compared with it'; return 0; fi + case "$_pm" in + '') printf 'SKIP this image states no payload_manifest (the mini schema), so payload=%s is still only a declaration' "${_pc:-unknown}" ;; + *[!0-9a-f]*) printf 'FAIL the identity payload_manifest is not a hex digest (%s) - malformed, not merely old' "$_pm" ;; + *) if [ "$_pm" = "$_pa" ]; then printf 'PASS payload=%s, manifest matches the payload the image carries' "${_pc:-unknown}" + else printf 'FAIL the identity describes a different payload (manifest %s) than the one present (%s) - the c32/c33 shape' "$_pm" "$_pa"; fi ;; + esac +} + +# Which file's bytes does an `engine_sha256` claim have to match? Two schemas, two layouts (engine#1481/#1541): +# * v3 (`container-build.sh`): the payload launcher at /opt/1bit-package/1bit/1bit; +# * mini (`os/mini/mkimage.sh`): the engine the image RUNS, /bin/1bit - a symlink to the image's own copy. Inside the +# booted image that symlink resolves to the image copy, which is why reading it here is right; on the build host the +# same expression escapes to the build tree, so the WRITER hashes $root$bin instead of hashing the symlink. +# An empty first argument means "no checkable claim"; then the git short sha (if any) decides whether the row SKIPs. +# Pure, so --self-test drives it: +identity_launcher_path() { + [ -n "${1:-}" ] || return 0 + if [ -n "${2:-}" ]; then printf '%s\n' "${MINI_LAUNCHER:-/bin/1bit}" + else printf '%s\n' "${PAYLOAD_DIR:-/opt/1bit-package}/1bit/1bit"; fi +} + # Does the identity's `payload=` name a payload the image actually carries? engine#1557: it was a DECLARED value # (PAYLOAD_NAME from the build's environment, container-build.sh:352) and nothing compared it, so c32 and c33 both # shipped `payload=lemonade-onebit-rc-2026-11-05-c26c` beside later payloads. @@ -602,17 +641,6 @@ identity_launcher_path() { # # SKIP, never a pass, when the image carries no payload tarball in its table (an image-only cut, or a stick whose # data partition was written by an older layout): a row that cannot see the bytes must not call the claim true. -payload_verdict() { # - _pc=${1:-} _pp=${2:-} - if [ -z "$_pp" ]; then printf 'SKIP no payload tarball named in /data/SHA256SUMS, so payload= cannot be compared with the bytes'; return 0; fi - case "$_pc" in - ''|unknown) printf 'FAIL the identity names no payload (payload=%s) while the data partition carries %s - a declaration that cannot be true' "${_pc:-empty}" "$(printf '%s' "$_pp" | tr '\n' ' ')"; return 0 ;; - esac - _hit=0 - for _s in $_pp; do [ "$_s" = "$_pc" ] && _hit=1; done - if [ "$_hit" = 1 ]; then printf 'PASS payload=%s is the payload this image carries' "$_pc" - else printf 'FAIL the identity claims payload=%s but the data partition carries %s - the c32/c33 shape' "$_pc" "$(printf '%s' "$_pp" | tr '\n' ' ')"; fi -} identity_verdict() { _ce=${1:-} _ae=${2:-} _ch=${3:-} _ah=${4:-} @@ -782,11 +810,12 @@ if [ "${1:-}" = --self-test ]; then check PASS "$(identity_verdict aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb)" check FAIL "$(identity_verdict aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 7ba2110811111111111111111111111111111111111111111111111111111111 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb)" # the c26-in-a-c32-image shape: engine claim vs shipped launcher check FAIL "$(identity_verdict aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc)" # libhsa claim vs the runtime the image carries - # engine#1557: payload= against the payload tarball the data partition names - check PASS "$(payload_verdict lemonade-onebit-rc-2026-11-08-c33 'lemonade-onebit-rc-2026-11-08-c33')" - check FAIL "$(payload_verdict lemonade-onebit-rc-2026-11-05-c26c 'lemonade-onebit-rc-2026-11-08-c33')" # the c32/c33 shape: an inherited name beside a later payload - check FAIL "$(payload_verdict unknown 'lemonade-onebit-rc-2026-11-08-c33')" # the writer's default, with a payload present - check SKIP "$(payload_verdict lemonade-onebit-rc-2026-11-08-c33 '')" # no tarball in the table: not a pass by absence + # engine#1557: the identity's payload manifest against the payload present + check PASS "$(payload_verdict lemonade-onebit-rc-2026-11-08-c33 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)" + check FAIL "$(payload_verdict lemonade-onebit-rc-2026-11-05-c26c cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)" # the c32/c33 shape: an identity describing another payload + check FAIL "$(payload_verdict lemonade-onebit-rc-2026-11-08-c33 not-a-digest aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)" # malformed claim + check SKIP "$(payload_verdict lemonade-onebit-rc-2026-11-08-c33 '' aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)" # mini schema: no manifest to compare + check SKIP "$(payload_verdict lemonade-onebit-rc-2026-11-08-c33 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa '')" # payload not at the appliance path check FAIL "$(identity_verdict 89a6c386 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb)" # malformed claim is FAIL, not unknown check FAIL "$(identity_verdict aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa '' bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb)" # nothing to check the claim against check PASS "$(identity_verdict aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa none '')" # `none` and nothing on the loader path: consistent @@ -1896,9 +1925,19 @@ if [ -f "$ID" ]; then *) fail identity "${_idv#FAIL } (${_idinfo})" ;; esac fi - # engine#1557: payload= was the one field of this file nothing checked. The stems come from the data partition's - # own table, the same file the sha256sums row verifies beside it. - _pv_stems= + # engine#1557: payload= and its manifest against the payload the image actually carries + _pv_claim=$(sed -n 's/^payload_manifest *[=:] *//p' "$ID" 2>/dev/null | head -1 | tr -d '[:space:]') + _pv_actual= + _pv_dir=${PAYLOAD_DIR:-/opt/1bit-package} + if [ -d "$_pv_dir" ]; then + _pv_actual=$(find "$_pv_dir" -type f 2>/dev/null | sed "s|^$_pv_dir/||" | LC_ALL=C sort | sha256sum | cut -d' ' -f1) + fi + _pvv=$(payload_verdict "${_id_name:-}" "$_pv_claim" "$_pv_actual") + case "$_pvv" in + PASS*) pass identity-payload "${_pvv#PASS }" ;; + SKIP*) skip identity-payload "${_pvv#SKIP }" ;; + *) fail identity-payload "${_pvv#FAIL }" ;; + esac if [ -f /data/SHA256SUMS ]; then _pv_stems=$(sed -n 's|.*[ ]||p' /data/SHA256SUMS 2>/dev/null | sed -n 's|\.tar\.zst$||p' | sort -u) fi diff --git a/os/v3/puppy/container-build.sh b/os/v3/puppy/container-build.sh index 25cffedd0..ddcfdb1cc 100644 --- a/os/v3/puppy/container-build.sh +++ b/os/v3/puppy/container-build.sh @@ -350,7 +350,19 @@ if [ -n "${PAYLOAD:-}" ]; then "$skeleton/etc/1bit/onebit-models.txt" || { echo "build: REFUSED: could not write /etc/1bit/onebit-models.txt from the payload catalogue" >&2 exit 1; } + # engine#1557: `payload=` names the payload, and a name is only a claim. This records a fact about the same + # /payload tree - the sorted list of its file paths - so release-check can compare the identity with the tree + # the image actually carries. Cheap on both sides (metadata only, and the image-side walk already happens for + # the payload-modes row), and it needs no packer: the build is what has the payload, so the build is the writer. +# The payload's own identity, algorithmically: relative file paths, sorted, hashed. release-check.sh recomputes it +# over /opt/1bit-package with the SAME expression (grep for "engine#1557" there); the two must stay identical, which +# is why it is one line of find|sed|sort|sha256sum and not a script. +payload_manifest() { # + find "$1" -type f 2>/dev/null | sed "s|^$1/||" | LC_ALL=C sort | sha256sum | cut -d' ' -f1 +} + { echo "payload=${PAYLOAD_NAME:-unknown}" + echo "payload_manifest=$(payload_manifest /payload)" echo "engine_sha256=$(sha256sum /payload/1bit/1bit | cut -c1-64)" if [ -n "${LIBHSA_DIR:-}" ]; then echo "libhsa_sha256=$(sha256sum /libhsa-runtime/libhsa-runtime64.so.1 | cut -c1-64)"