Add unblob so REA can extract firmware

unblob 26.6.4 (the version REA is verified with) is installed from its
PyPI wheel into /opt/unblob, with dependencies pinned to its uv.lock at
the release commit. A wrapper puts that venv first on PATH, and
REA_UNBLOB_COMMAND points REA's extract_firmware at it.

Its extractors follow upstream's install-deps.sh: Ubuntu packages,
sasquatch v4.5.1-6 (also used by binwalk) and onekey-sec's e2fsprogs
fork, whose debugfs rdump options the ext2/3/4 handler needs. The build
checks that unblob finds every extractor.

The uv.lock converter moves to scripts/ and skips the locked project
itself generically, since ghidra-mcp and unblob both use it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-02 18:20:01 +01:00
co-authored by Claude Opus 5.5
parent e61c004431
commit ab9bb3eae9
4 changed files with 80 additions and 26 deletions
-23
View File
@@ -1,23 +0,0 @@
"""Print pip constraints (name==version) for every package in a uv.lock.
Used at image build time to install the ghidra-mcp wheel with the exact
dependency versions its upstream lock file was tested with. A package that
uv resolved differently per Python version appears more than once; those
entries carry their resolution markers, so pip applies only the one that
matches the interpreter.
"""
import sys
import tomllib
with open(sys.argv[1], "rb") as f:
lock = tomllib.load(f)
for package in lock["package"]:
# The project itself is installed from the release wheel.
if package["name"] == "ghidra-mcp":
continue
line = f'{package["name"]}=={package["version"]}'
markers = package.get("resolution-markers")
if markers:
line += " ; " + " or ".join(f"({m})" for m in markers)
print(line)