Skip to content

common: add libartifact#392

Merged
Luap99 merged 1 commit into
podman-container-tools:mainfrom
baude:addlibartifact
Oct 16, 2025
Merged

common: add libartifact#392
Luap99 merged 1 commit into
podman-container-tools:mainfrom
baude:addlibartifact

Conversation

@baude

@baude baude commented Oct 15, 2025

Copy link
Copy Markdown
Contributor

this pr lands libartifact in common/pkg/libartifact. the code comes from podman unchanged with the exception of changing import paths and the definition of an ArtifactBlob being added.

https://issues.redhat.com/browse/RUN-3618

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

Copy link
Copy Markdown

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

@mheon

mheon commented Oct 16, 2025

Copy link
Copy Markdown
Contributor

LGTM

@Luap99 Luap99 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

to minor comments, I guess this ties into the discussion we were having about the formatter: podman-container-tools/podman#27291

Comment thread common/pkg/libartifact/store/store.go Outdated

// if the storage dir does not exist, we need to create it.
baseDir := filepath.Dir(artifactStore.indexPath())
if err := os.MkdirAll(baseDir, 0700); err != nil { //nolint:gofumpt

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

shouldn't this just be written as 0o700 instead of silencing the linter?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

sure, fixed.

Comment thread common/pkg/libartifact/store/store.go Outdated
if err := fileutils.Exists(path); err == nil {
return nil
}
return os.WriteFile(path, specV1.DescriptorEmptyJSON.Data, 0644) //nolint:gofumpt

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

same here 0o644

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

sure, fixed.

this pr lands libartifact in common/pkg/libartifact.  the code comes
from podman unchanged with the exception of changing import paths and
the definition of an ArtifactBlob being added.

I also had to change a bunch of things because the linters are more
strict here.

https://issues.redhat.com/browse/RUN-3618

Signed-off-by: Brent Baude <bbaude@redhat.com>
podmanbot pushed a commit to podmanbot/buildah that referenced this pull request Oct 16, 2025

@Luap99 Luap99 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@Luap99 Luap99 enabled auto-merge October 16, 2025 13:33
@Luap99 Luap99 merged commit aa970d2 into podman-container-tools:main Oct 16, 2025
9 of 16 checks passed
rhatdan pushed a commit to rhatdan/container-libs that referenced this pull request Nov 21, 2025
common: add libartifact
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
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.

4 participants