Multiple changes
- quirks: added quirks, that does nothing for now - deb: install arch-independant dependencies (too much is better) - deb: added linux-riscv crossbuild test
This commit is contained in:
+16
-15
@@ -185,22 +185,22 @@ pub async fn build(
|
||||
return Err("Could not install build-dependencies for the build".into());
|
||||
}
|
||||
|
||||
// // Install arch-independant build dependencies
|
||||
// log::debug!("Installing arch-independant build dependencies...");
|
||||
// let status = ctx.command("apt-get")
|
||||
// .current_dir(package_dir_str)
|
||||
// .envs(env.clone())
|
||||
// .arg("-y")
|
||||
// .arg("build-dep")
|
||||
// .arg("--indep-only")
|
||||
// .arg("./")
|
||||
// .status()?;
|
||||
// Install arch-independant build dependencies
|
||||
log::debug!("Installing arch-independant build dependencies...");
|
||||
let status = ctx
|
||||
.command("apt-get")
|
||||
.current_dir(package_dir_str)
|
||||
.envs(env.clone())
|
||||
.arg("-y")
|
||||
.arg("build-dep")
|
||||
.arg("./")
|
||||
.status()?;
|
||||
|
||||
// // If build-dep fails, we try to explain the failure using dose-debcheck
|
||||
// if !status.success() {
|
||||
// dose3_explain_dependencies(package, version, arch, build_root, cross)?;
|
||||
// return Err("Could not install build-dependencies for the build".into());
|
||||
// }
|
||||
// If build-dep fails, we try to explain the failure using dose-debcheck
|
||||
if !status.success() {
|
||||
dose3_explain_dependencies(package, version, arch, build_root, cross)?;
|
||||
return Err("Could not install build-dependencies for the build".into());
|
||||
}
|
||||
|
||||
// Run the build step
|
||||
log::debug!("Building (debian/rules build) package...");
|
||||
@@ -260,6 +260,7 @@ fn dose3_explain_dependencies(
|
||||
}
|
||||
|
||||
// Transform the dsc file into a 'Source' stanza (replacing 'Source' with 'Package')
|
||||
// TODO: Remove potential GPG headers/signature
|
||||
let dsc_path = find_dsc_file(build_root, package, version)?;
|
||||
let mut dsc_content = ctx.read_file(&dsc_path)?;
|
||||
dsc_content = dsc_content.replace("Source", "Package");
|
||||
|
||||
@@ -288,6 +288,17 @@ mod tests {
|
||||
test_build_end_to_end("hello", "sid", None, None, false).await;
|
||||
}
|
||||
|
||||
/// This is a specific test case for the linux-riscv package on Ubuntu
|
||||
/// It is important to ensure that pkh can cross-compile linux-riscv, as
|
||||
/// for risc-v hardware is still rare and cross-compilation is necessary
|
||||
/// to debug and test
|
||||
#[tokio::test]
|
||||
#[test_log::test]
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
async fn test_deb_linux_riscv_ubuntu_cross_end_to_end() {
|
||||
test_build_end_to_end("linux-riscv", "questing", None, Some("riscv64"), true).await;
|
||||
}
|
||||
|
||||
/// This is a specific test case for the latest gcc package on Debian
|
||||
/// The GCC package is complex and hard to build, with specific stages
|
||||
/// and system-bound scripts. Building it requires specific things that
|
||||
|
||||
Reference in New Issue
Block a user