deb: cross-compilation, ephemeral contexts, local builds #1

Merged
vhaudiquet merged 41 commits from experimental-cross into main 2025-12-25 17:10:47 +00:00
Showing only changes of commit 631ca8e777 - Show all commits

View File

@@ -24,11 +24,13 @@ pub fn build(
let ctx = context::current();
if cross {
log::debug!("Setting up environment for local cross build...");
cross::setup_environment(&mut env, arch)?;
cross::ensure_repositories(arch, series)?;
}
// Update package lists
log::debug!("Updating package lists for local build...");
let status = ctx
.command("apt-get")
.envs(env.clone())
@@ -42,6 +44,7 @@ pub fn build(
}
// Install essential packages
log::debug!("Installing essential packages for local build...");
let mut cmd = ctx.command("apt-get");
cmd.envs(env.clone())
@@ -64,6 +67,7 @@ pub fn build(
}
// Install build dependencies
log::debug!("Installing build dependencies...");
let mut cmd = ctx.command("apt-get");
cmd.current_dir(format!("{build_root}/{package}"))
.envs(env.clone())
@@ -81,6 +85,7 @@ pub fn build(
}
// Run the build step
log::debug!("Building (debian/rules build) package...");
let status = ctx
.command("debian/rules")
.current_dir(format!("{build_root}/{package}"))