Skip to content

Commit e476178

Browse files
bors[bot]cyplo
andauthored
Merge #251
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 <[email protected]>
2 parents 9ef7231 + 9670884 commit e476178

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/docker.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -153,12 +153,12 @@ pub fn run(target: &Target,
153153

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

0 commit comments

Comments
 (0)