fix(driver-podman): make std::path::Path import unconditional - #2770
Open
Ygnas wants to merge 1 commit into
Open
fix(driver-podman): make std::path::Path import unconditional#2770Ygnas wants to merge 1 commit into
Ygnas wants to merge 1 commit into
Conversation
The userns config commit (d51a653) added `supervisor_bin_path: Option<&Path>` to `build_container_spec_for_image` without a cfg gate, but the `use std::path::Path` import was gated behind `#[cfg(target_os = "linux")]`. This broke compilation on macOS. The import was originally Linux-only because its sole consumer, `selinux_enabled()`, is cfg-gated — but the new function is platform-independent, so the import must be too. Signed-off-by: Ignas Baranauskas <ibaranau@redhat.com>
Ygnas
requested review from
a team,
derekwaynecarr,
mrunalp and
sjenning
as code owners
August 17, 2026 09:03
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
supervisor_bin_path: Option<&Path>tobuild_container_spec_for_imagewithout a cfg gate, but theuse std::path::Pathimport was still gated behind#[cfg(target_os = "linux")](added by fix(driver-podman): gate Linux-only Path import #2188 whenPathwas only used in the Linux-onlyselinux_enabled()). This breaks compilation on macOS.Related Issue
Regression from #2562, reverses the now-incorrect gate from #2188.
Changes
#[cfg(target_os = "linux")]fromuse std::path::PathsincePathis now used in platform-independent code.Testing
cargo checkpasses on macOSmise run pre-commitpassesChecklist