Add unified Minotari Ledger installer#7864
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a unified Python-based installer (install_minotari_ledger.py) along with unit tests to replace the previous model-specific shell and PowerShell scripts, which are now thin compatibility wrappers. The reviewer provided valuable feedback identifying three key issues in the new installer: a process replacement issue on Windows when using os.execve that causes overlapping shell output, a security vulnerability in parse_sha256_file where incorrect checksums could pass verification under certain conditions, and a potential crash if the Content-Length header contains an invalid integer. Addressing these issues will significantly improve the installer's robustness, security, and cross-platform compatibility.
|
Updated the branch:
Tests:
|
|
Update:
|
d95ea8c to
cfef2a7
Compare
Fixes #7795
Summary
ledgerwallettarget IDs and report the original Nano S as unsupported..zip.sha256sidecar, verify it, and safely extract the archive.minotari_ledger_wallet.apduartifacts throughledgerblue.runScript --scp; legacy manifest fallback is intentionally not supported.Correctness Note
The current stable Tari release may not include Ledger wallet assets, while pre-releases do. The default lookup scans recent non-draft releases, including pre-releases, and only selects a Ledger artifact when both the model zip and matching checksum sidecar are present.
Testing
uv run python applications/minotari_ledger_wallet/wallet/install_scripts/test_install_minotari_ledger.pyuv run python applications/minotari_ledger_wallet/wallet/install_scripts/install_minotari_ledger.py --helpuv run python -m py_compile applications/minotari_ledger_wallet/wallet/install_scripts/install_minotari_ledger.py applications/minotari_ledger_wallet/wallet/install_scripts/test_install_minotari_ledger.pyuvx ruff check applications/minotari_ledger_wallet/wallet/install_scripts/install_minotari_ledger.py applications/minotari_ledger_wallet/wallet/install_scripts/test_install_minotari_ledger.py--helpsmoke test--helpsmoke testgit diff --check