Makefile: Add update-embedded-root rule #1301
Merged
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.
make update-embedded-root
ruleI'm not sure if the workflow is really needed but I decided to include it. I think automatically making a PR might be a bad idea (since there are no test suite tests for this we'd be trusting CI 100% and that doesn't sound right in this case).
Makefile rule uses the "plumbing" command to ensure the newest root has been downloaded and verified. Then it copies the newest TUF root and the trusted_root.json into the sources. The benefit here is that one does not need to manually find the cache directories when an update should be done.
Makefile rule hard codes XDG_DATA_HOME and XDG_CACHE_HOME for simplicity.
The workflow adds a new CI-dependency (github-script) but I believe the currently used actions do not provide the capabilities needed here.
I've created the "embedded-root-update" label manually in this project already so this should just work.