Conversation
Replaces the two Python packers that had been copied between projects and then edited apart. The container comes from rpi-loader-ota, so the packer and the firmware that installs a bundle are now the same code by construction rather than by anyone remembering. A bundle.toml rather than arguments: what goes into a bundle is a property of the project, not of the invocation. Arguments could just about carry a kernel and one directory, which is what the scripts did; they cannot carry a settings file, a firmware blob and a certificate with a destination each, and the moment they try, a card's layout lives in a Makefile in a form nothing can check. Directory sources are packed recursively now that a bundle can carry a path, sorted so the same tree always produces the same bytes, and dotfiles are skipped at every level. --upload posts the result to a running board and prints what it says the update cost its card. Plain HTTP, and ureq with default features off, so no TLS reaches the dependency tree of a tool whose endpoint is a board on a local network. The tests build real directory trees and check the result by parsing it with rpi-loader-ota, the same code the firmware runs: a failure there means the packer and the installer disagree, which is the one thing the crate exists to prevent. Note that `make package` for the CLI cannot pass until rpi-loader-ota 0.1.0 is on crates.io. cargo strips the path dependency when packaging and resolves the version, which is what proves the published crate would build.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces the two Python packers that had been copied between projects and then edited apart. The container comes from rpi-loader-ota, so the packer and the firmware that installs a bundle are now the same code by construction rather than by anyone remembering.
A bundle.toml rather than arguments: what goes into a bundle is a property of the project, not of the invocation. Arguments could just about carry a kernel and one directory, which is what the scripts did; they cannot carry a settings file, a firmware blob and a certificate with a destination each, and the moment they try, a card's layout lives in a Makefile in a form nothing can check.
Directory sources are packed recursively now that a bundle can carry a path, sorted so the same tree always produces the same bytes, and dotfiles are skipped at every level.
--upload posts the result to a running board and prints what it says the update cost its card. Plain HTTP, and ureq with default features off, so no TLS reaches the dependency tree of a tool whose endpoint is a board on a local network.
The tests build real directory trees and check the result by parsing it with rpi-loader-ota, the same code the firmware runs: a failure there means the packer and the installer disagree, which is the one thing the crate exists to prevent.
Note that
make packagefor the CLI cannot pass until rpi-loader-ota 0.1.0 is on crates.io. cargo strips the path dependency when packaging and resolves the version, which is what proves the published crate would build.