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

Generalize signature copy support #1593

Merged
merged 8 commits into from Jul 7, 2022
Merged

Commits on Jul 7, 2022

  1. Introduce ImageSourceInternalOnly

    Signed-off-by: Miloslav Trmač <mitr@redhat.com>
    mtrmac committed Jul 7, 2022
    Copy the full SHA
    43bd794 View commit details
    Browse the repository at this point in the history
  2. Rename local variables in storageImageSource.GetSignatures

    We want the "signatures" package name to be visible.
    
    Signed-off-by: Miloslav Trmač <mitr@redhat.com>
    mtrmac committed Jul 7, 2022
    Copy the full SHA
    1b6a4bf View commit details
    Browse the repository at this point in the history
  3. Fix error handling

    err is necessarily nil at that location, so this was returning
    no error indication.
    
    Signed-off-by: Miloslav Trmač <mitr@redhat.com>
    mtrmac committed Jul 7, 2022
    Copy the full SHA
    ba768be View commit details
    Browse the repository at this point in the history
  4. Rename a variable to be consistent

    Signed-off-by: Miloslav Trmač <mitr@redhat.com>
    mtrmac committed Jul 7, 2022
    Copy the full SHA
    f1f6bbc View commit details
    Browse the repository at this point in the history
  5. Add an internal/signature package

    We need something to wrap (format ID, actual data).
    
    And a shared helper for a file/blob representation for things like
    dir or c/storage.
    
    This looks quite immature.
    
    Tests of the non-simple signing will only be added with support for that format.
    
    Signed-off-by: Miloslav Trmač <mitr@redhat.com>
    mtrmac committed Jul 7, 2022
    Copy the full SHA
    fbf83e4 View commit details
    Browse the repository at this point in the history
  6. Introduce ImageDestination.PutSignaturesWithFormat

    NOTE: This makes implementation choices:
    - dir, docker LOOKASIDE, ostree and storage are going to store the
      generic-format blobs, and can represent any future formats
      of signatures.
    - docker X-R-S-S and OpenShift only accept simple signatures,
      and fail when copying the other kind.
    
    Signed-off-by: Miloslav Trmač <mitr@redhat.com>
    mtrmac committed Jul 7, 2022
    Copy the full SHA
    a5ad660 View commit details
    Browse the repository at this point in the history
  7. Introduce ImageSource.GetSignaturesWithFormat

    Signed-off-by: Miloslav Trmač <mitr@redhat.com>
    mtrmac committed Jul 7, 2022
    Copy the full SHA
    ad2c293 View commit details
    Browse the repository at this point in the history
  8. Generalize copy.Image to be able to copy signatures with any format

    Signed-off-by: Miloslav Trmač <mitr@redhat.com>
    mtrmac committed Jul 7, 2022
    Copy the full SHA
    4b4a5be View commit details
    Browse the repository at this point in the history