deb: default to ephemeral context with local builds
Some checks failed
CI / build (push) Failing after 1m28s
Some checks failed
CI / build (push) Failing after 1m28s
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
mod cross;
|
||||
mod ephemeral;
|
||||
mod local;
|
||||
mod sbuild;
|
||||
|
||||
@@ -42,21 +43,13 @@ pub fn build_binary_package(
|
||||
let mode = if let Some(m) = mode {
|
||||
m
|
||||
} else {
|
||||
// For cross-compilation, we use local with an ephemeral context
|
||||
// created by the cross-compilation handler (see below)
|
||||
if cross {
|
||||
BuildMode::Local
|
||||
} else {
|
||||
// By default, we use sbuild
|
||||
BuildMode::Sbuild
|
||||
}
|
||||
// By default, we use local build
|
||||
BuildMode::Local
|
||||
};
|
||||
|
||||
// Specific case: native cross-compilation, we don't allow that
|
||||
// instead this wraps to an automatic unshare chroot
|
||||
// using an ephemeral context
|
||||
let _guard = if cross && mode == BuildMode::Local {
|
||||
Some(cross::EphemeralContextGuard::new(series)?)
|
||||
// Create an ephemeral unshare context for all Local builds
|
||||
let _guard = if mode == BuildMode::Local {
|
||||
Some(ephemeral::EphemeralContextGuard::new(series)?)
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user