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:
|
Fixes #7795
Summary
ledgerwallettarget IDs and report the original Nano S as unsupported..zip.sha256sidecar, and safely extract the archive.minotari_ledger_wallet.apduartifacts directly, withapp_*.json/app_*.tomlmanifest fallback for older archives.Correctness Note
The current stable Tari release does not include Ledger wallet assets, while
v5.4.0-pre.1does. The default lookup scans recent non-draft releases, including pre-releases, so the installer can find the newest usable Ledger artifact instead of stopping at a release with no matching assets.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.pygit diff --checkv5.4.0-pre.1assets and checksum sidecars fornanosplus,nanox,stax, andflex.