Skip to content

image/directory: store manifest and signature with digest algorithm prefix#535

Merged
mtrmac merged 3 commits into
podman-container-tools:mainfrom
lsm5:more-dir-digest
Dec 9, 2025
Merged

image/directory: store manifest and signature with digest algorithm prefix#535
mtrmac merged 3 commits into
podman-container-tools:mainfrom
lsm5:more-dir-digest

Conversation

@lsm5

@lsm5 lsm5 commented Dec 8, 2025

Copy link
Copy Markdown
Contributor

see individual commits for manifestPath and signaturePath

@github-actions github-actions Bot added the image Related to "image" package label Dec 8, 2025
podmanbot pushed a commit to podmanbot/buildah that referenced this pull request Dec 8, 2025
@podmanbot

Copy link
Copy Markdown

✅ A new PR has been created in buildah to vendor these changes: podman-container-tools/buildah#6577

@lsm5

lsm5 commented Dec 8, 2025

Copy link
Copy Markdown
Contributor Author

@mtrmac PTAL

@mtrmac mtrmac left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes LGTM, but usesNonSHA256Digest also needs updating.

podmanbot pushed a commit to podmanbot/buildah that referenced this pull request Dec 9, 2025
@lsm5

lsm5 commented Dec 9, 2025

Copy link
Copy Markdown
Contributor Author

These changes LGTM, but usesNonSHA256Digest also needs updating.

@mtrmac added along with additional version tests for manifest and signatures. PTAL.

@mtrmac mtrmac left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Code LGTM.

I’d prefer another test extension, but I don’t think it’s really blocking. Let me know.

Comment thread image/directory/directory_dest_test.go Outdated
@lsm5 lsm5 marked this pull request as draft December 9, 2025 20:13
podmanbot pushed a commit to podmanbot/buildah that referenced this pull request Dec 9, 2025

@mtrmac mtrmac left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, merge whenever ready.

Comment thread image/directory/directory_dest_test.go Outdated
lsm5 added 3 commits December 9, 2025 16:23
Refactor the TestVersionAssignment blob tests to use a function-based
approach instead of inline code. This prepares the test structure for
adding manifest and signature tests in subsequent commits.

The loop over algorithms is moved outside the put function for better
code organization.

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
When storing manifests with non-canonical digest algorithms (e.g., sha512),
store the manifest file under the provided digest algorithm with an algorithm
prefix (e.g., "sha512-abc.manifest.json" instead of just "abc.manifest.json").

SHA256 (canonical) digests continue to be stored without a prefix for
backward compatibility.

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
When storing signatures with non-canonical digest algorithms (e.g., sha512),
store the signature file under the provided digest algorithm with an algorithm
prefix (e.g., "sha512-abc.signature-1" instead of just "abc.signature-1").

SHA256 (canonical) digests continue to be stored without a prefix for
backward compatibility.

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
@lsm5

lsm5 commented Dec 9, 2025

Copy link
Copy Markdown
Contributor Author

LGTM, merge whenever ready.

@mtrmac I don't have merge rights here, so maybe you or someone from @containers/container-libs-maintainers could take care of it please.

@lsm5 lsm5 marked this pull request as ready for review December 9, 2025 21:37
podmanbot pushed a commit to podmanbot/buildah that referenced this pull request Dec 9, 2025
@mtrmac mtrmac merged commit 11eddca into podman-container-tools:main Dec 9, 2025
24 checks passed
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.

3 participants