build,debian: extract reusable Debian format primitives from build/
Move the generic components out of src/build/ into a new src/debian/ module so they can be reused independently of the build pipeline: deb822 control parsing (plus the debian/control model), file checksum registry, debian/files registry, Debian version handling and changelog entry parsing. Merge OpenPGP clearsigning into utils/gpg.rs next to the existing key discovery helper, making signing available outside of builds. Delegate changelog.rs header/footer parsing to the new debian::changelog parser, removing the duplicate regex implementation. src/build/ keeps only build-specific logic: the pipeline driver, build types, environment setup and the .buildinfo/.changes writers.
This commit is contained in:
@@ -4,9 +4,9 @@
|
||||
|
||||
use std::path::Path;
|
||||
|
||||
use super::checksums::FileChecksums;
|
||||
use super::control::{write_paragraph, Paragraph};
|
||||
use super::files::FilesList;
|
||||
use crate::debian::checksums::FileChecksums;
|
||||
use crate::debian::control::{write_paragraph, Paragraph};
|
||||
use crate::debian::files::FilesList;
|
||||
|
||||
/// Everything needed to render a `.changes` file.
|
||||
#[derive(Debug, Clone)]
|
||||
@@ -178,7 +178,7 @@ mod tests {
|
||||
checksums.add_file(&dsc_path).unwrap();
|
||||
|
||||
let mut files_list = FilesList::new();
|
||||
files_list.add(super::super::files::FilesEntry::new(
|
||||
files_list.add(crate::debian::FilesEntry::new(
|
||||
"pkg_1.0.dsc",
|
||||
"utils",
|
||||
"optional",
|
||||
|
||||
Reference in New Issue
Block a user