Skip to content
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

Port to securesystemslib with abstract files and directories (securesystemslib PR 232) #1024

Merged

Commits on May 12, 2020

  1. Remove redundant test logic

    Support for compressed files was removed in tuf v0.10.x leaving behind
    some vestiges like the test logic in test_repository_lib, which is
    duplicated below and carries a redundant comment, and setting compression
    on in generate_project_data.py
    
    Signed-off-by: Joshua Lock <jlock@vmware.com>
    joshuagl committed May 12, 2020
    Configuration menu
    Copy the full SHA
    4487a98 View commit details
    Browse the repository at this point in the history
  2. Remove outdated comments

    tuf removed support for compressed metadata in v0.10.x, therefore it is
    confusing to carry comments referring to compressed versions of metadata.
    
    Signed-off-by: Joshua Lock <jlock@vmware.com>
    joshuagl committed May 12, 2020
    Configuration menu
    Copy the full SHA
    431b808 View commit details
    Browse the repository at this point in the history
  3. Port to new securesystemslib w abstract filesystem

    Switch to using the new abstract files and directories support in
    securesystemslib by taking an object which implements
    securesystemslib.storage.StorageBackendInterface in the Repository
    constructor, passed in by tuf.repository_tool.create_new_repository() and
    tuf.repository_tool.load_repository()
    
    The Updater class in tuf.client.updater does not specify a storage backend
    and instead allows the functions in securesystemslib to perform the
    default action of instantiating a LocalFilesystemBackend, that is the
    updater does not currently support abstract filesystem backends and always
    defaults to using local storage.
    
    Finally we drop support for tuf.settings.CONSISTENT_METHOD as it's not as
    clear how different copying modes should work when the details of the
    underlying storage are abstracted away.
    
    Signed-off-by: Joshua Lock <jlock@vmware.com>
    joshuagl committed May 12, 2020
    Configuration menu
    Copy the full SHA
    0c0aaa9 View commit details
    Browse the repository at this point in the history
  4. Remove file existence checks in repository_lib

    Rather than check for the existence of metadata files before trying to
    load them in _load_top_level_metadata, we should just try and load them.
    
    This is more idiomatic Python through employing EAFP (Easier to Ask
    Forgiveness than Permission) principles.
    
    Signed-off-by: Joshua Lock <jlock@vmware.com>
    joshuagl committed May 12, 2020
    Configuration menu
    Copy the full SHA
    7384412 View commit details
    Browse the repository at this point in the history

Commits on May 19, 2020

  1. Make absence of fundamental roles fatal

    The specification lists four fundamental roles: root, targets, snapshot
    and timestamp. Loading a repository where those roles are not present
    should not be supported, therefore convert debug messages on the absence
    of metadata files for these fundamental roles into a RepositoryError
    exception.
    
    Signed-off-by: Joshua Lock <jlock@vmware.com>
    joshuagl committed May 19, 2020
    Configuration menu
    Copy the full SHA
    a187377 View commit details
    Browse the repository at this point in the history
  2. Allow generating targets metadata for non-local storage

    Utilise the abstract files and directories support to enable generating
    targets metadata for files which aren't necessarily locally accessible,
    rather than requiring that metadata for non-local files be provided via
    existing fileinfo structures.
    
    Signed-off-by: Joshua Lock <jlock@vmware.com>
    joshuagl committed May 19, 2020
    Configuration menu
    Copy the full SHA
    4e7b7b4 View commit details
    Browse the repository at this point in the history
  3. Update securesystemslib dependency

    We need the recently released securesystemslib 0.15.0 or newer for
    abstract storage support.
    
    Signed-off-by: Joshua Lock <jlock@vmware.com>
    joshuagl committed May 19, 2020
    Configuration menu
    Copy the full SHA
    be3c541 View commit details
    Browse the repository at this point in the history