feat: Implement build state tracking and interactive package specification creation

- Added StateTracker to manage build steps and allow resuming interrupted builds.
- Updated post_extract function to utilize StateTracker for patch and command execution.
- Introduced makefile.rs to handle building and installing packages via Makefile.
- Created interactive.rs for an interactive package specification creator with SHA256 computation for source URLs.
- Enhanced checksum verification to support multiple algorithms (SHA256, SHA512, MD5).
- Added example configuration files in contrib for system-wide and user-level Depot configurations.
- Updated tests to cover new functionality and ensure correctness of state tracking and interactive creation.
This commit is contained in:
2026-02-16 21:38:05 -06:00
parent 00ca2ebac6
commit 9a00608104
30 changed files with 3501 additions and 434 deletions
+3 -2
View File
@@ -40,13 +40,13 @@ impl Packager {
let file = fs::File::create(&output_path)
.with_context(|| format!("Failed to create output file: {}", output_path.display()))?;
// Respect zstd level from config (default to 3 if not specified)
// Respect zstd level from config (default to 19 if not specified)
let level = self
.config
.package_overrides
.get("compression_level")
.and_then(|v| v.as_integer())
.unwrap_or(3) as i32;
.unwrap_or(19) as i32;
let mut encoder = Encoder::new(file, level)?;
let _ = encoder.multithread(num_cpus() as u32);
@@ -231,6 +231,7 @@ mod tests {
homepage: "h".into(),
license: "MIT".into(),
},
packages: Vec::new(),
alternatives: Alternatives::default(),
manual_sources: Vec::new(),
source: Vec::new(),