diff --git a/os/mini/release-check.sh b/os/mini/release-check.sh index 3411bbfd1..3857b409c 100755 --- a/os/mini/release-check.sh +++ b/os/mini/release-check.sh @@ -607,11 +607,19 @@ payload_identity_verdict() { # + _pi=${1:-} _pd=${2:-} + _pval=$(sed -n 's/^payload=//p' "$_pi" 2>/dev/null | head -1) + _ptag= + if [ -n "$_pd" ] && [ -f "$_pd/1bit/README.txt" ]; then + _ptag=$(sed -n '1s/.*\(rc-[0-9][0-9]*-[0-9][0-9]*-[0-9][0-9]*-c[0-9][0-9]*[a-z]*\).*/\1/p' "$_pd/1bit/README.txt" 2>/dev/null) + fi + payload_name_verdict "$_pval" "$_ptag" +} + payload_modes_verdict() { # [] _f=${1:-} _d=${2:-} _sample=${3:-} case "$_f" in ''|*[!0-9]*) printf 'FAIL the payload'"'"'s file modes could not be counted (%s)' "${_f:-empty}"; return 0 ;; esac @@ -801,6 +846,21 @@ if [ "${1:-}" = --self-test ]; then check /y/1bit/1bit "$(PAYLOAD_DIR=/y identity_launcher_path aa '')" # PAYLOAD_DIR is honoured if [ -z "$(identity_launcher_path '' bbbb)" ]; then printf 'ok no claim yields no path (the row SKIPs)\n' else printf 'FAIL no claim should yield no path\n'; rc=1; fi + check FAIL "$(payload_name_verdict lemonade-onebit-rc-2026-11-05-c26 rc-2026-11-05-c26c)" # c26 must NOT match c26c + check FAIL "$(payload_name_verdict lemonade-onebit-rc-2026-11-05-c26b rc-2026-11-05-c26c)" # nor c26b + check FAIL "$(payload_name_verdict lemonade-onebit-rc-2026-11-08-c33x rc-2026-11-08-c33)" # the token must END there, not continue + check PASS "$(payload_name_verdict lemonade-onebit-rc-2026-11-08-c33.tar rc-2026-11-08-c33)" # a non-alphanumeric after it is fine + check PASS "$(payload_name_verdict lemonade-onebit-rc-2026-11-05-c26c rc-2026-11-05-c26c)" # the real c26c pair still passes + check PASS "$(payload_name_verdict lemonade-onebit-rc-2026-11-08-c33 rc-2026-11-08-c33)" # the label CONTAINS the token + check FAIL "$(payload_name_verdict lemonade-onebit-rc-2026-11-05-c26c rc-2026-11-08-c33)" # the c26 incident: must red + check SKIP "$(payload_name_verdict lemonade-onebit-rc-2026-11-08-c33 '')" # no README tag: not a pass by absence + check FAIL "$(payload_name_verdict unknown rc-2026-11-08-c33)" # PAYLOAD_NAME unset + check FAIL "$(payload_name_verdict '' rc-2026-11-08-c33)" # nothing stated + check PASS "$(payload_identity_verdict 2026.47.0~1.52a2a6b3 2026.47.0~1.52a2a6b3)" + check PASS "$(payload_identity_verdict 2026.47.0~1.52a2a6b3 2026.47.0~1752.52a2a6b3)" # the clone-count case: must NOT red + check FAIL "$(payload_identity_verdict 2026.47.0~1.52a2a6b3 2026.47.0~1.abcdef01)" # a different sha IS a different pin + check SKIP "$(payload_identity_verdict '' 2026.47.0~1.52a2a6b3)" + check FAIL "$(payload_identity_verdict 2026.47.0~1.52a2a6b3 '')" check PASS "$(memlock_verdict unlimited lemond)" check FAIL "$(memlock_verdict 65536 lemond /etc/security/limits.d/99-amdnpu-memlock.conf)" # a user's 99- winning over our 90- check FAIL "$(memlock_verdict 4294967296 1bit)" # finite is not what the driver asks for @@ -2115,6 +2175,23 @@ case "$ML" in *) fail memlock "${ML#FAIL }" ;; esac + +# ── the payload= label is consistent with the payload the image ships (engine#1557) ────────────── +if [ ! -f "$ID" ]; then + skip payload-name "no $ID in this image build, so there is no payload label to read (an image older than the identity file is not wrong, it is silent)" +elif [ -n "${_id_gitsha:-}" ]; then + skip payload-name "this image's identity is the mini schema (tag/engine/engine_sha256/built), which carries no payload= label and no ${PAYLOAD_DIR:-/opt/1bit-package}: there is nothing here to check" +elif [ ! -d "${PAYLOAD_DIR:-/opt/1bit-package}" ]; then + skip payload-name "no ${PAYLOAD_DIR:-/opt/1bit-package} in this image, so the payload's own README cannot be read" +else + PNV=$(payload_name_from_image "$ID" "${PAYLOAD_DIR:-/opt/1bit-package}") + case "$PNV" in + PASS*) pass payload-name "${PNV#PASS }" ;; + SKIP*) skip payload-name "${PNV#SKIP }" ;; + *) fail payload-name "${PNV#FAIL }" ;; + esac +fi + say "" # The back-off leaves a trace: a run that only passed because the partition freed in time must say so, or the next # person reads a clean transcript and believes nothing was ever refused.