bump oc/selinux to v1.15.0, remove !linux wrappers#6864
Conversation
|
@kolyshkin smoke test is smoking |
@TomSweeneyRedHat I only see "pr should include tests", can you please add |
|
The cross-compile check should catch any problems created by the removal of the non-Linux bits, if there are any. |
|
@containers/buildah-maintainers PTAL |
mtrmac
left a comment
There was a problem hiding this comment.
ACK but I’ll leave the final merge decision to experts.
| @@ -23,7 +17,7 @@ func setupSelinux(g *generate.Generator, processLabel, mountLabel string) { | |||
| } | |||
|
|
|||
| func runLabelStdioPipes(stdioPipe [][]int, processLabel, mountLabel string) error { | |||
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
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>
/kind cleanup
What this PR does / why we need it:
deps: bump oc/selinux to v1.15.0
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?