Skip to content

bump oc/selinux to v1.15.0, remove !linux wrappers#6864

Merged
giuseppe merged 2 commits into
podman-container-tools:mainfrom
kolyshkin:selinux1150
May 28, 2026
Merged

bump oc/selinux to v1.15.0, remove !linux wrappers#6864
giuseppe merged 2 commits into
podman-container-tools:mainfrom
kolyshkin:selinux1150

Conversation

@kolyshkin

Copy link
Copy Markdown
Contributor

/kind cleanup

What this PR does / why we need it:

  1. deps: bump oc/selinux to v1.15.0

  2. selinux: simplify code

    Remove the !linux version since oc/selinux now has a !linux wrappers,
    and selinux.GetEnabled always returns false on !linux.

How to verify it

Which issue(s) this PR fixes:

None

Special notes for your reviewer:

Does this PR introduce a user-facing change?

NONE

@dosubot dosubot Bot added the size:S This PR changes 10-29 lines, ignoring generated files. label May 21, 2026
@TomSweeneyRedHat

Copy link
Copy Markdown
Contributor

@kolyshkin smoke test is smoking

@kolyshkin

Copy link
Copy Markdown
Contributor Author

@kolyshkin smoke test is smoking

@TomSweeneyRedHat I only see "pr should include tests", can you please add No new tests?

@nalind nalind added the No New Tests Allow PR to proceed without adding regression tests label May 26, 2026
@nalind

nalind commented May 26, 2026

Copy link
Copy Markdown
Contributor

The cross-compile check should catch any problems created by the removal of the non-Linux bits, if there are any.

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

@nalind

nalind commented May 26, 2026

Copy link
Copy Markdown
Contributor

@containers/buildah-maintainers 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.

ACK but I’ll leave the final merge decision to experts.

Comment thread selinux.go
@@ -23,7 +17,7 @@ func setupSelinux(g *generate.Generator, processLabel, mountLabel string) {
}

func runLabelStdioPipes(stdioPipe [][]int, processLabel, mountLabel string) error {

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.

This code with /proc/self/fd remains Linux-specific (although unreachable on other platforms due to selinux.GetEnabled()). I’ll leave it to Buildah maintainers to decide whether they prefer strict platform separation or to avoid the extra stub.

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.

If that's a concern, I've added another guard (runtime.GOOS == "linux") which has zero runtime overhead because runtime.GOOS is a constant, so the compiled code should be identical to what we had before.

@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels May 26, 2026

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

Comment thread selinux.go Outdated
kolyshkin added 2 commits May 27, 2026 12:05
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Remove the !linux version since oc/selinux now has a !linux wrappers,
and selinux.GetEnabled always returns false on !linux.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>

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

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

@giuseppe giuseppe merged commit 64db27a into podman-container-tools:main May 28, 2026
40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

No New Tests Allow PR to proceed without adding regression tests size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants