Repository navigation
Conversation
The metadata in tests/repository_data expires on 2030-01-01. From then on 28 tests in test_trusted_metadata_set and test_updater_ng error, mostly with "ExpiredMetadataError: Final root.json is expired". Move the expiry to 2050-01-01, like generated_data and fishy_rolenames, and re-sign the files with the keys in tests/repository_data/keystore. Besides "expires" and the signatures, only the snapshot hash in timestamp.json changes. Update the two values in test_api.py that depend on these files: the expected expiry and the blake2b-256 of snapshot.json. Signed-off-by: yarrrly <yarrrly@users.noreply.github.com>
This branch has not been deployed
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.
Description of the changes being introduced by the pull request:
The metadata in
tests/repository_dataexpires at 2030-01-01T00:00:00Z. Once the clock passes it, 28 of the 208 tests error, 27 of them withExpiredMetadataError: Final root.json is expired. Debian's archive rebuild with the clock set to 2030-08-09 hit the same error: https://bugs.debian.org/1127133This moves
expiresto 2050-01-01 (generated_dataandfishy_rolenamesalready expire in 2050) and re-signs the 13 files with the keys intests/repository_data/keystore. Apart fromexpiresand the signatures, only the snapshot hash in the twotimestamp.jsonfiles changes.git diff --textshows the JSON diff, which GitHub hides (*.json binary). Intest_api.pythe two values that depend on these files are updated: the expected expiry and the blake2b-256 ofsnapshot.json.To check, from the repository root with
time-machineinstalled:On develop this gives
FAILED (errors=28). With this change it passes, also with the clock at 2049-12-31. At today's date the suite, coverage (98%), ruff and mypy give the same results as before.If you would rather have the script in the tree (see #1806), I can add it.
Script used to re-sign (run from the repository root)