Skip to content

Commit 5bca838

Browse files
committed
Fix chroot builds
1 parent 677b817 commit 5bca838

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎src/chroot.rs‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ use crate::exec;
33
use anyhow::{Context, Result};
44
use nix::unistd::{Uid, User};
55
use std::ffi::OsStr;
6+
use std::fs::Permissions;
67
use std::io::Write;
8+
use std::os::unix::fs::PermissionsExt;
79
use std::path::{Path, PathBuf};
810
use std::process::Command;
911

@@ -21,6 +23,8 @@ pub struct Chroot {
2123

2224
fn pacman_conf(pacman_conf: &str) -> Result<tempfile::NamedTempFile> {
2325
let mut tmp = tempfile::NamedTempFile::new()?;
26+
tmp.as_file()
27+
.set_permissions(Permissions::from_mode(0o644))?;
2428
let conf = pacmanconf::Config::expand_with_opts(None, Some(pacman_conf), Some("/"))?;
2529

2630
// Bug with dbpath in pacstrap

0 commit comments

Comments
 (0)