MiSTer Downloader Tool
Posted: Thu Sep 16, 2021 11:11 am
This is a new updater designed with robustness, speed and safety in mind.
URL: https://github.com/MiSTer-devel/Downloader_MiSTer
Robustness
- It validates every downloaded file against its hash, eliminating the possibility of corrupted downloads.
- It removes old invalid files and avoids duplications. That means, the downloader will delete files that have been renamed on GitHub, and install them again with the new names.
- Can't miss an update because of some fluke with the GitHub API.
- In fact, it doesn't have to query the GitHub API at all, which has severe usage restrictions.
- It doesn't have to read brittle GitHub HTML code to decide what has to download neither.
- It has extensive automated test coverage, through unit, integration and end-to-end system tests.
Speed
- Fresh installs are around 3x faster than with the MiSTer Updater.
- Incremental updates are nearly instant.
- It can consistently download many files in parallel without issues.
- Lots of opportunities to make it even faster in next iterations.
Safety
- It uses secure connections. If you don't have the proper certificates, it will help you to install them. Most users will have some certificates already, since the system provides them by default.
- It doesn't run INI files that can contain arbitrary code under the root user. That could lead to hackers taking total control of your system through a malicious INI file. Instead, it uses a very safe INI parser (ConfigParser from Python).
- Hash validation will guarantee that downloaded files are trusted.
In short, this tool will solve long-standing issues that users were facing with the old Updater script, while providing other nice benefits. Many problems previously experienced by the users were related to corrupted downloads, and these should go away.
All files installed through the Downloader by default are coming from this repository: https://github.com/MiSTer-devel/Distribution_MiSTer . In fact, it will be a 1:1 copy of that structure into your system.
From a more technical point of view, the whole thing has been implemented with Python, which makes it quite maintainable, modular and efficient. So it should be more approachable to new contributors. Internally, it uses a database that's being auto-generated in the server, and this DB just contains the links of what it has to fetch. This DB format will be documented soon. And that might be useful to make this solution much more expandable, by just modifying the downloader.ini file. It's not officially supported yet, though. There are a few other things in the code that are not documented yet, so keep in mind, if you find a feature that is not documented, it's not officially supported, and that means it could go away in the future without notice (in reality, it's unlikely, but still, we should keep this as a principle).
The current Roadmap is on the README.md from the GitHub repository. If you miss a feature from old MiSTer Updater script, you probably should keep using it for the mean time.
Any feedback is very welcomed.
PD. Thanks to all the people that has helped me to test this project. Specially, thanks to Pig_Saint, atrac17, Sorgelig, amoore2600, Kitrix, Fed, jotego, Antonio, ItalianGrandma, Guillermo, and probably others that I might have forgotten along the long way (sorry!). That kind of feedback is always invaluable.
URL: https://github.com/MiSTer-devel/Downloader_MiSTer
Robustness
- It validates every downloaded file against its hash, eliminating the possibility of corrupted downloads.
- It removes old invalid files and avoids duplications. That means, the downloader will delete files that have been renamed on GitHub, and install them again with the new names.
- Can't miss an update because of some fluke with the GitHub API.
- In fact, it doesn't have to query the GitHub API at all, which has severe usage restrictions.
- It doesn't have to read brittle GitHub HTML code to decide what has to download neither.
- It has extensive automated test coverage, through unit, integration and end-to-end system tests.
Speed
- Fresh installs are around 3x faster than with the MiSTer Updater.
- Incremental updates are nearly instant.
- It can consistently download many files in parallel without issues.
- Lots of opportunities to make it even faster in next iterations.
Safety
- It uses secure connections. If you don't have the proper certificates, it will help you to install them. Most users will have some certificates already, since the system provides them by default.
- It doesn't run INI files that can contain arbitrary code under the root user. That could lead to hackers taking total control of your system through a malicious INI file. Instead, it uses a very safe INI parser (ConfigParser from Python).
- Hash validation will guarantee that downloaded files are trusted.
In short, this tool will solve long-standing issues that users were facing with the old Updater script, while providing other nice benefits. Many problems previously experienced by the users were related to corrupted downloads, and these should go away.
All files installed through the Downloader by default are coming from this repository: https://github.com/MiSTer-devel/Distribution_MiSTer . In fact, it will be a 1:1 copy of that structure into your system.
From a more technical point of view, the whole thing has been implemented with Python, which makes it quite maintainable, modular and efficient. So it should be more approachable to new contributors. Internally, it uses a database that's being auto-generated in the server, and this DB just contains the links of what it has to fetch. This DB format will be documented soon. And that might be useful to make this solution much more expandable, by just modifying the downloader.ini file. It's not officially supported yet, though. There are a few other things in the code that are not documented yet, so keep in mind, if you find a feature that is not documented, it's not officially supported, and that means it could go away in the future without notice (in reality, it's unlikely, but still, we should keep this as a principle).
The current Roadmap is on the README.md from the GitHub repository. If you miss a feature from old MiSTer Updater script, you probably should keep using it for the mean time.
Any feedback is very welcomed.
PD. Thanks to all the people that has helped me to test this project. Specially, thanks to Pig_Saint, atrac17, Sorgelig, amoore2600, Kitrix, Fed, jotego, Antonio, ItalianGrandma, Guillermo, and probably others that I might have forgotten along the long way (sorry!). That kind of feedback is always invaluable.