Correct Debian 5.1.55 binary and verify embedded version before install

This commit is contained in:
Andrei Smaliak 2026-11-01 14:28:14 +01:00
parent 2050f141e3
commit 3e209a492b
9 changed files with 65 additions and 8 deletions

View File

@ -0,0 +1,9 @@
# stage_itscreen 1.0.37 — EVAx10 5.1.55 revision 2
- Correct the 1.0.36 publication: its binary actually reported 5.1.54 despite
the 5.1.55 manifest. Replace it with a clean ARM64 build reporting 5.1.55 / 5010055.
- Advance the stage version so devices with 1.0.36 are offered the correction.
- Preserve registration, media and settings; retain the existing stage update contract.
- Exact binary digest and source commit are in stage_itscreen/release-provenance.json.
- Before replacing the installed binary, execute `--version` and require both version
and native build number to match the release provenance; reject mislabeled files.

View File

@ -23,7 +23,7 @@
"version": "1.0.0"
},
"stage_itscreen": {
"version": "1.0.36"
"version": "1.0.37"
},
"stage_reverse_tunnels": {
"version": "1.0.2"

Binary file not shown.

View File

@ -1 +1 @@
5e9ab66b072aaa64a1b033992bf6bdc77a1a83c4a35342cbde58f4581753505d itscreen
5e14d2cabd2821620e03467bc5d8bc98d87895d3f6f22c3f82a9cf414c6d13d0 itscreen

View File

@ -1,14 +1,16 @@
{
"schema_version": 1,
"client_version": "5.1.55",
"stage_version": "1.0.36",
"stage_version": "1.0.37",
"platform": "linux",
"architecture": "arm64",
"source_repository": "https://git.iomatex.com/Development/It-screenClient.git",
"source_branch": "iomatex_dev",
"source_commit": "47147d767678bcbb19dc48b578b51ff65a2f2278",
"source_commit": "c4739d5dd87ba43c94578af0c6745b0086829175",
"binary": "itscreen",
"sha256": "5e9ab66b072aaa64a1b033992bf6bdc77a1a83c4a35342cbde58f4581753505d",
"assembly_method": "Native release build and validation on the Debian 11 ARM64 bench with Qt 5.15.2",
"native_version_code": 5010055
"sha256": "5e14d2cabd2821620e03467bc5d8bc98d87895d3f6f22c3f82a9cf414c6d13d0",
"assembly_method": "Clean isolated release build from git archive using iomatex-debian-dev:local; --version and linked libraries verified on Debian 11 ARM64",
"native_version_code": 5010055,
"release_revision": 2,
"verified_version_output": "5.1.55 5010055"
}

View File

@ -517,6 +517,8 @@ install_itscreen_binary() (
src=$(mktemp /userdata/.iomatex-client.XXXXXX)
trap 'rm -f "$src"' EXIT
python3 "$IOMATEX_PROJECT_ROOT/offline/git_delivery.py" fetch stage_itscreen/itscreen "$src"
chmod 0755 "$src"
python3 "$SCRIPT_DIR/verify_client_release.py" "$src" "$SCRIPT_DIR/release-provenance.json"
install -m 0755 -o "$ITS_USER" -g "$ITS_GROUP" "$src" "$ITS_BINARY"
)

View File

@ -0,0 +1,23 @@
import json
import tempfile
import unittest
from pathlib import Path
from verify_client_release import verify
class EmbeddedReleaseTest(unittest.TestCase):
def test_matching_and_mislabeled_binaries(self):
with tempfile.TemporaryDirectory() as directory:
root = Path(directory)
manifest = root / 'release.json'
manifest.write_text(json.dumps({'client_version': '5.1.55', 'native_version_code': 5010055}))
binary = root / 'client'
for output, accepted in [('5.1.55 5010055', True), ('5.1.54 5010054', False), ('5.1.55 5010054', False), ('', False)]:
with self.subTest(output=output):
binary.write_text('#!/bin/sh\nprintf "%s\\n" "' + output + '"\n')
binary.chmod(0o755)
if accepted:
self.assertEqual(verify(binary, manifest), output)
else:
with self.assertRaises(ValueError):
verify(binary, manifest)

View File

@ -0,0 +1,21 @@
#!/usr/bin/env python3
"""Check the executable itself before installing a client release."""
import json
import subprocess
import sys
def verify(binary, provenance):
with open(provenance, encoding="utf-8") as stream:
metadata = json.load(stream)
expected = f"{metadata['client_version']} {metadata['native_version_code']}"
result = subprocess.run([str(binary), "--version"], capture_output=True,
text=True, timeout=10, check=True)
actual = result.stdout.strip()
if actual != expected:
raise ValueError(f"Client release mismatch: expected {expected!r}, got {actual!r}")
return actual
if __name__ == "__main__":
print(verify(sys.argv[1], sys.argv[2]))

View File

@ -1,3 +1,3 @@
{
"version": "1.0.36"
"version": "1.0.37"
}