This commit is contained in:
2026-08-24 11:58:19 +02:00
parent 42fcfc2dfa
commit 429429e414
10 changed files with 477 additions and 189 deletions
+4 -13
View File
@@ -232,10 +232,7 @@ pub async fn build(
match ctx.read_file(&package_dir.join("debian/changelog")) {
Ok(content) => {
if let Ok(entry) = crate::debian::parse_changelog_entry_from_str(&content) {
env.insert(
"SOURCE_DATE_EPOCH".to_string(),
entry.timestamp.to_string(),
);
env.insert("SOURCE_DATE_EPOCH".to_string(), entry.timestamp.to_string());
}
}
Err(e) => log::debug!("cannot read changelog for SOURCE_DATE_EPOCH: {}", e),
@@ -336,9 +333,7 @@ pub async fn build(
// equivalent of dpkg-genbuildinfo -b + dpkg-genchanges -b, consuming
// debian/files produced by the build. Failures are logged but do not
// discard the produced binaries.
if let Err(e) =
generate_upload_metadata(package_dir_str, build_root, arch, cross, &env, &ctx)
{
if let Err(e) = generate_upload_metadata(package_dir_str, build_root, arch, cross, &env, &ctx) {
warn!("failed to generate .buildinfo/.changes: {}", e);
}
@@ -359,8 +354,7 @@ fn generate_upload_metadata(
let changelog_path = Path::new(package_dir).join("debian/changelog");
let changelog_content = ctx.read_file(&changelog_path)?;
let entry =
crate::debian::parse_changelog_entry_from_str(&changelog_content)?;
let entry = crate::debian::parse_changelog_entry_from_str(&changelog_content)?;
// Build architecture: the machine inside the build context.
let build_arch = ctx
@@ -395,10 +389,7 @@ fn generate_upload_metadata(
})
.unwrap_or_else(crate::build::env::current_vendor);
let profiles = crate::build::env::resolve_build_profiles(
&[],
&vendor,
);
let profiles = crate::build::env::resolve_build_profiles(&[], &vendor);
let source_date_epoch = env
.get("SOURCE_DATE_EPOCH")
.and_then(|v| v.parse::<i64>().ok())
+6 -2
View File
@@ -174,8 +174,12 @@ async fn build_binary_package_impl(
let deb_files: Vec<PathBuf> = remote_files
.into_iter()
.filter(|f| {
f.extension()
.is_some_and(|ext| matches!(ext.to_str(), Some("deb") | Some("buildinfo") | Some("changes")))
f.extension().is_some_and(|ext| {
matches!(
ext.to_str(),
Some("deb") | Some("buildinfo") | Some("changes")
)
})
})
.collect();
let total_debs = deb_files.len();