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

Support Acquire-By-Hash for index files #664

Merged
merged 15 commits into from
Nov 30, 2017

Commits on Nov 30, 2017

  1. Support Acquire-By-Hash for index files

    The added "aptly publish repo" option "-access-by-hash" publishes
    the index files (Packages*, Sources*) also as hardlinked hashes.
    Example:
     /dists/yakkety/main/binary-amd64/by-hash/SHA512/31833ec39acc...
    The Release files indicate this with the option "Acquire-By-Hash: yes"
    
    This is used by apt >= 1.2.0 and prevents the "Hash sum mismatch" race
    condition between a server side "aptly publish repo" and "apt-get update"
    on a client.
    See: http://www.chiark.greenend.org.uk/~cjwatson/blog/no-more-hash-sum-mismatch-errors.html
    
    This implementation uses symlinks in the by-hash/*/ directory for keeping
    only two versions of the index files and deleting older files
    automatically.
    
    Note: this only works with aptly.FileSystemPublishedStorage
    
    Closes: aptly-dev#536
    
    Signed-off-by: André Roth <neolynx@gmail.com>
    neolynx authored and Oliver Sauder committed Nov 30, 2017
    Configuration menu
    Copy the full SHA
    bb2db7e View commit details
    Browse the repository at this point in the history
  2. Extend PublishedStorage interface for Acquire-By-Hash

    Signed-off-by: André Roth <neolynx@gmail.com>
    neolynx authored and Oliver Sauder committed Nov 30, 2017
    Configuration menu
    Copy the full SHA
    e079127 View commit details
    Browse the repository at this point in the history
  3. Extend s3 storage with link and file exists methods

    Oliver Sauder committed Nov 30, 2017
    Configuration menu
    Copy the full SHA
    7498fd8 View commit details
    Browse the repository at this point in the history
  4. Extend swift storage with link and file exists methods

    Oliver Sauder committed Nov 30, 2017
    Configuration menu
    Copy the full SHA
    438e206 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    092a7ed View commit details
    Browse the repository at this point in the history
  6. Extend publish snapshot test with acquire by hash

    Oliver Sauder committed Nov 30, 2017
    Configuration menu
    Copy the full SHA
    2bd0b78 View commit details
    Browse the repository at this point in the history
  7. Fix linting errors

    Oliver Sauder committed Nov 30, 2017
    Configuration menu
    Copy the full SHA
    d6b4b79 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    4718625 View commit details
    Browse the repository at this point in the history
  9. Add acquire by hash when updating publish

    Oliver Sauder committed Nov 30, 2017
    Configuration menu
    Copy the full SHA
    b4f3573 View commit details
    Browse the repository at this point in the history
  10. Update man page and bash completion

    Oliver Sauder committed Nov 30, 2017
    Configuration menu
    Copy the full SHA
    f5e1e19 View commit details
    Browse the repository at this point in the history
  11. Order publish parameters in bash completion

    This makes it easier maintainable.
    Oliver Sauder committed Nov 30, 2017
    Configuration menu
    Copy the full SHA
    674a0e8 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    2e48860 View commit details
    Browse the repository at this point in the history
  13. Implement FileExists in files storage as simple stat to improve perfo…

    …rmance
    Oliver Sauder committed Nov 30, 2017
    Configuration menu
    Copy the full SHA
    3efa105 View commit details
    Browse the repository at this point in the history
  14. Build src path on basis of storage prefix when symlinking

    Oliver Sauder committed Nov 30, 2017
    Configuration menu
    Copy the full SHA
    e504fdc View commit details
    Browse the repository at this point in the history
  15. Adjust FileExists to differentiate between error and actual file exis…

    …tence
    Oliver Sauder committed Nov 30, 2017
    Configuration menu
    Copy the full SHA
    b2bf4f7 View commit details
    Browse the repository at this point in the history