From f22d15b679a13fa8be815249ba1508e73a8c81ed Mon Sep 17 00:00:00 2001 From: Felipe Coury Date: Wed, 17 Jun 2026 22:12:02 -0400 Subject: [PATCH] fix(install): support older awk checksum parsing (#28784) ## Why The standalone installer validates package checksums with an awk interval expression. Older mawk releases do not support that expression, so they reject valid 64-character digests and report that the release manifest is missing an entry. This affects both x64 and ARM64 systems on common Debian-derived environments. Fixes #24219. ## What Changed Replace the awk interval expression with an explicit length check plus rejection of non-hexadecimal characters. This preserves the existing SHA-256 validation and lowercase normalization while working with older awk implementations. ## How to Test 1. Build and run the checksum predicate with mawk 1.3.4 20121129. 2. Confirm the old interval predicate rejects a valid 64-character digest. 3. Confirm the updated predicate accepts that digest. 4. Put the old mawk binary first on PATH as awk and run scripts/install/install.sh with an isolated HOME, CODEX_HOME, and CODEX_INSTALL_DIR. 5. Confirm Codex installs successfully and the installed binary reports version 0.140.0. 6. Verify the predicate rejects wrong-length digests, non-hexadecimal digests, and entries for another asset while accepting uppercase hexadecimal digests. --- scripts/install/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install/install.sh b/scripts/install/install.sh index 23980b0c5..7513efc42 100755 --- a/scripts/install/install.sh +++ b/scripts/install/install.sh @@ -213,7 +213,7 @@ package_archive_digest() { manifest_path="$2" digest="$(awk -v asset="$asset" ' - $2 == asset && $1 ~ /^[0-9a-fA-F]{64}$/ { + $2 == asset && length($1) == 64 && $1 !~ /[^0-9a-fA-F]/ { print tolower($1) found = 1 exit