deb: use qemu_binfmt on ephemeral/local builds of different arch
Some checks failed
CI / build (push) Failing after 18m19s
CI / snap (push) Has been skipped

This commit is contained in:
2026-02-11 11:58:59 +01:00
parent 97725efb34
commit 7c53b268dd
2 changed files with 54 additions and 17 deletions

View File

@@ -49,8 +49,15 @@ pub async fn build_binary_package(
};
// Create an ephemeral unshare context for all Local builds
// Use qemu_binfmt when target architecture differs from host and cross is not requested
let chroot_arch = if mode == BuildMode::Local && arch != current_arch && !cross {
Some(arch)
} else {
None
};
let mut guard = if mode == BuildMode::Local {
Some(ephemeral::EphemeralContextGuard::new(series).await?)
Some(ephemeral::EphemeralContextGuard::new(series, chroot_arch).await?)
} else {
None
};