Skip to content

Conversation

@mtrmac
Copy link
Contributor

@mtrmac mtrmac commented Nov 29, 2025

@lsm5 I’m thinking something vaguely like this will be necessary to support #375 (comment) , depending on users’ desires:

  • copy must write sha512
  • copy should write sha512 if at all possible
  • copy should write sha512 if it does not cost performance
  • vs. copy must not change existing image (because it is signed or --preserve-digests)

I don’t know whether we want to expose all of these options to users, but I do think we must make the algorithm choice based on source image+cannotModify…+user options, and this might be a possible way to structure that.

Warning: c/image/copy continues to make assumptions that would be broken by changing a digest algorithm during copy. This is unusable as is. I didn’t run the code at all.

@github-actions github-actions bot added the image Related to "image" package label Nov 29, 2025
podmanbot pushed a commit to podmanbot/buildah that referenced this pull request Nov 29, 2025
@podmanbot
Copy link

✅ A new PR has been created in buildah to vendor these changes: containers/buildah#6552

@mtrmac
Copy link
Contributor Author

mtrmac commented Dec 5, 2025

This is now on top of #530 .

I think I’d like to go one consistent step at a time: in this case, if this is extending PutBlobWithOptions, all transports should be updated. But it might be useful just to focus on making dir: work (… says he, not having tested the code at all yet).

The goal is to allow building the digest-choice-dependent machinery
from the bottom up without committing to an API while we don't understand
the problem space; for now, we don't expose any way for users to
actually make a choice.

This code is never called at this point, so this should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
for now, purely to let us internally work on implementing digest
choice / conversions; there is no way for a caller to set it.

Should not change behavior, the field has no users.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This is:
- UNUSABLE (no external API)
- INCOMPLETE (manifest digests, TryReusingBlob, ...)
- BROKEN (various code assumes that digest returned from upload matches input)
- INCONSISTENT (PutBlobOptions.Digests is only implemented in one transport,
  and silently ignored elsewhere)

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
podmanbot pushed a commit to podmanbot/buildah that referenced this pull request Dec 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

image Related to "image" package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants