Skip to content

libartifact: skip bare tag names from OCI layout annotations - #1027

Open
saschagrunert wants to merge 1 commit into
podman-container-tools:mainfrom
saschagrunert:fix-artifact-bare-tag-name
Open

libartifact: skip bare tag names from OCI layout annotations#1027
saschagrunert wants to merge 1 commit into
podman-container-tools:mainfrom
saschagrunert:fix-artifact-bare-tag-name

Conversation

@saschagrunert

@saschagrunert saschagrunert commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

External tools like skopeo write only the tag portion (e.g. 1.14.4) into the org.opencontainers.image.ref.name annotation in index.json when creating OCI layouts. This is correct per the OCI image layout spec, which defines the annotation as a local reference name within the layout. Consumers that call ParseNormalizedNamed on the artifact name would turn this into the nonsensical docker.io/library/1.14.4. This PR detects names without a / as bare tags and skips setting them, so the artifact remains unnamed rather than getting a wrong name.

Reported in cri-o/cri-o#10151.

@github-actions github-actions Bot added the common Related to "common" package label Jul 27, 2026
@packit-as-a-service

Copy link
Copy Markdown

Packit jobs failed. @containers/packit-build please check.

1 similar comment
@packit-as-a-service

Copy link
Copy Markdown

Packit jobs failed. @containers/packit-build please check.

External tools like skopeo write only the tag portion (e.g. "1.14.4")
into the org.opencontainers.image.ref.name annotation in index.json.
Consumers that call ParseNormalizedNamed on the artifact name would
turn this into the nonsensical "docker.io/library/1.14.4". Detect
names without a "/" as bare tags and skip setting them.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>

@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,

I’m inclined to say this is unsupported.

  • (Skopeo writes whatever name the user put into the reference.)
  • AFAIK, common/pkg/libartifact, just like c/storage, is an internal implementation detail subject to change, and external access by other tools is not expected. E.g. there is a lock file which other tools are not going to work with.

@baude WDYT?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

common Related to "common" package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants