deb: remove sbuild build mode
CI / build (push) Successful in 8m15s
CI / snap (push) Successful in 3m28s

This commit is contained in:
2026-07-24 14:32:47 +02:00
parent a0d35bb18e
commit 62ce4e3696
6 changed files with 5 additions and 63 deletions
-12
View File
@@ -1,7 +1,6 @@
mod cross;
mod ephemeral;
mod local;
mod sbuild;
use crate::context::{self, Context};
use std::error::Error;
@@ -11,8 +10,6 @@ use std::sync::Arc;
/// Build mode for the binary build
#[derive(PartialEq)]
pub enum BuildMode {
/// Use `sbuild` for the build, configured in unshare mode
Sbuild,
/// Local build, directly on the context
Local,
}
@@ -110,15 +107,6 @@ pub async fn build_binary_package(
)
.await?
}
BuildMode::Sbuild => sbuild::build(
&package,
&version,
arch,
series,
&build_root,
cross,
build_ctx.clone(),
)?,
};
// Retrieve produced .deb files
-44
View File
@@ -1,44 +0,0 @@
/// Sbuild binary package building
/// Call 'sbuild' with the dsc file to build the package with unshare
use crate::context::Context;
use std::error::Error;
use std::path::Path;
use std::sync::Arc;
pub fn build(
package: &str,
version: &str,
arch: &str,
series: &str,
build_root: &str,
cross: bool,
ctx: Arc<Context>,
) -> Result<(), Box<dyn Error>> {
// Find the actual package directory
let package_dir =
crate::deb::find_package_directory(Path::new(build_root), package, version, &ctx)?;
let package_dir_str = package_dir
.to_str()
.ok_or("Invalid package directory path")?;
let mut cmd = ctx.command("sbuild");
cmd.current_dir(package_dir_str);
cmd.arg("--chroot-mode=unshare");
cmd.arg("--no-clean-source");
if cross {
cmd.arg(format!("--host={}", arch));
} else {
cmd.arg(format!("--arch={}", arch));
}
cmd.arg(format!("--dist={}", series));
// Add output directory argument
cmd.arg(format!("--build-dir={}", build_root));
let status = cmd.status()?;
if !status.success() {
return Err(format!("sbuild failed with status: {}", status).into());
}
Ok(())
}