-
Notifications
You must be signed in to change notification settings - Fork 275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Linking or copying consistent metadata #374
Comments
Did this get addressed? We discussed this a long ways back. On Thu, Sep 29, 2016 at 10:02 AM, Vladimir Diaz [email protected]
|
If writting a consistent snapshot, the snapshot should be written first and and then a copy or link to it should be created.
I partially implemented this here: https://github.com/vladimir-v-diaz/tuf/blob/ecordell-root-versioning/tuf/repository_lib.py#L2015-L2047. The fix points @kwang100 is working on the configurable option to either create a copy of the consistent snapshot, or a link to it. Consistent snapshots are now written as follows: [2016-10-18 17:33:53,016 UTC] [tuf.repository_lib] [INFO] [write_metadata_file:2031@repository_lib.py]
Creating a consistent snapshot for u'/home/vlad/projects/tuf/tests/tmp6TEQkg/tmpL3SxRM/repository/metadata.staged/root.json'
[2016-10-18 17:33:53,016 UTC] [tuf.repository_lib] [DEBUG] [write_metadata_file:2032@repository_lib.py]
Saving u'/home/vlad/projects/tuf/tests/tmp6TEQkg/tmpL3SxRM/repository/metadata.staged/2.root.json'
[2016-10-18 17:33:53,022 UTC] [tuf.repository_lib] [INFO] [write_metadata_file:2041@repository_lib.py]
Pointing u'/home/vlad/projects/tuf/tests/tmp6TEQkg/tmpL3SxRM/repository/metadata.staged/root.json' to the consistent snapshot.
[2016-10-18 17:33:53,023 UTC] [tuf.repository_lib] [INFO] [_write_compressed_metadata:2139@repository_lib.py]
Saving u'/home/vlad/projects/tuf/tests/tmp6TEQkg/tmpL3SxRM/repository/metadata.staged/2.root.json.gz'
[2016-10-18 17:33:53,029 UTC] [tuf.repository_lib] [INFO] [write_metadata_file:2045@repository_lib.py]
Not creating a consistent snapshot for u'/home/vlad/projects/tuf/tests/tmp6TEQkg/tmpL3SxRM/repository/metadata.staged/snapshot.json'
... |
… to realize consistent snapshot 2. Repository_lib.py line 478 minor bug correction 3. Solve issue theupdateframework#374 theupdateframework#374 4. Repoistory_tool.py line 791 TODO reminder for no-longer-used keys 5. Some other corrections on comments
… to realize consistent snapshot 2. Repository_lib.py line 478 minor bug correction 3. Solve issue theupdateframework#374 theupdateframework#374 4. Repoistory_tool.py line 791 TODO reminder for no-longer-used keys 5. Some other corrections on comments
This issue has now been fully addressed. Remaining feature (option to use either a hard link or file copy) merged in PR #385 |
A contributor reports:
We probably want to support the second solution (for clients / devices with limited space). Creating a true copy or a hard link should also probably be an option (i.e., tuf.conf.consistent_method = copy (or link)).
The text was updated successfully, but these errors were encountered: