Skip to content

Commit

Permalink
Merge #251
Browse files Browse the repository at this point in the history
251: Support mounting on SELinux r=reitermarkus a=cyplo

This should allow `cross` to work on both non-SELinux enabled systems
and SELinux ones.

I've tested on Fedora 29 for SELinux system.

Fixes #112 that was originally reported from Fedora as well I believe.

Co-authored-by: Cyryl Płotnicki <cyplo@cyplo.net>
  • Loading branch information
bors[bot] and cyplo committed Aug 25, 2019
2 parents 9ef7231 + 9670884 commit e476178
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/docker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,12 @@ pub fn run(target: &Target,

docker
.args(&["-e", &format!("CROSS_RUNNER={}", runner.unwrap_or_else(|| String::new()))])
.args(&["-v", &format!("{}:/xargo", xargo_dir.display())])
.args(&["-v", &format!("{}:/cargo", cargo_dir.display())])
.args(&["-v", &format!("{}:/xargo:Z", xargo_dir.display())])
.args(&["-v", &format!("{}:/cargo:Z", cargo_dir.display())])
.args(&["-v", "/cargo/bin"]) // Prevent `bin` from being mounted inside the Docker container.
.args(&["-v", &format!("{}:/project:ro", root.display())])
.args(&["-v", &format!("{}:/rust:ro", sysroot.display())])
.args(&["-v", &format!("{}:/target", target_dir.display())])
.args(&["-v", &format!("{}:/project:Z,ro", root.display())])
.args(&["-v", &format!("{}:/rust:Z,ro", sysroot.display())])
.args(&["-v", &format!("{}:/target:Z", target_dir.display())])
.args(&["-w", "/project"])
.args(&["-it", &image(toml, target)?])
.args(&["sh", "-c", &format!("PATH=$PATH:/rust/bin {:?}", cmd)])
Expand Down

0 comments on commit e476178

Please sign in to comment.