Skip to content

Stop depending on github.com/opencontainers/runc#785

Merged
mtrmac merged 1 commit into
containers:mainfrom
mtrmac:no-runc
Apr 24, 2026
Merged

Stop depending on github.com/opencontainers/runc#785
mtrmac merged 1 commit into
containers:mainfrom
mtrmac:no-runc

Conversation

@mtrmac
Copy link
Copy Markdown
Contributor

@mtrmac mtrmac commented Apr 23, 2026

We only use a single 9-line function, so replace that with a local (and improved) version.

This will allow us to remove the dependency on runc, and avoid the bureaucy of investigating and documenting how we (don't need to) handle unrelated vulnerabilities in that codebase.

Cc: @kolyshkin @TomSweeneyRedHat

Following up on #781 . There is also a caller in Buildah (potentially benefiting from making the new function public), I’ll leave that one to others, incl. the decision whether the code should live in c/common or Buildah proper.

We only use a single 9-line function, so replace that
with a local (and improved) version.

This will allow us to remove the dependency on runc,
and avoid the bureaucy of investigating and documenting
how we (don't need to) handle unrelated vulnerabilities in that
codebase.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
@github-actions github-actions Bot added the common Related to "common" package label Apr 23, 2026
Copy link
Copy Markdown
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Member

@lsm5 lsm5 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Member

@giuseppe giuseppe left a comment

Choose a reason for hiding this comment

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

LGTM

@lsm5
Copy link
Copy Markdown
Member

lsm5 commented Apr 24, 2026

ELN job failure is odd. Don't see that on other recent PRs, nor on skopeo. Maybe a retrigger would solve it if it matters.

@mtrmac
Copy link
Copy Markdown
Contributor Author

mtrmac commented Apr 24, 2026

For peace of mind, I did re-run the ELN job and it passed.

@mtrmac mtrmac merged commit d8db758 into containers:main Apr 24, 2026
17 checks passed
@mtrmac mtrmac deleted the no-runc branch April 24, 2026 17:02
if err != nil {
return false
}
return len(buf) >= 1 && buf[0] == 'Y'
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.

nit: I'd simplify that to len(buf) > 0.

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.

FWIW compilers routinely make these kinds of optimizations nowadays: https://godbolt.org/z/Yv1GrKEYE .

Copy link
Copy Markdown
Contributor

@kolyshkin kolyshkin left a comment

Choose a reason for hiding this comment

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

LGTM

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.

5 participants