Extend the metadata writers to binary-only uploads and wire them into the 'pkh deb' flow: - build/binary.rs generates <pkg>_<ver>_<arch>.buildinfo/.changes through any Context: debian/files consumption, encounter-order Architecture accumulation (sorted in .buildinfo like dpkg-genbuildinfo), sorted Binary lists, dpkg-formatted Description lines with udeb suffixes, Installed-Build-Depends closure over the context status DB, and binNMU handling (Source: pkg (prev), Binary-Only-Changes, previous .dsc redistribution); - artifact digests are computed inside the context via coreutils (md5sum/sha1sum/sha256sum/stat) so chrooted/remote trees work; - deb/local.rs runs the generation after 'rules binary', exports SOURCE_DATE_EPOCH from the changelog (reproducibility), and resolves vendor/profiles inside the context; deb/mod.rs retrieves the new artifacts alongside the debs; - reusable helpers added: FilesList::parse/render, parse_changelog_entry_from_str, parse_previous_version_from_str, installed_build_depends_from_content. Differential gate: same tree built with real 'dpkg-buildpackage -b' and with the pkh flow; .changes/.buildinfo compared field-by-field modulo machine-dependent fields, artifact checksums included.
30 lines
1.1 KiB
Rust
30 lines
1.1 KiB
Rust
//! Reusable Debian format primitives.
|
|
//!
|
|
//! These components are independent from any build orchestration and can be
|
|
//! used by any pkh submodule (or external consumers of the library):
|
|
//!
|
|
//! - [`arch`]: Debian architecture tables and lookups (dpkg-architecture)
|
|
//! - [`control`]: deb822 paragraph parsing/writing and `debian/control`
|
|
//! - [`checksums`]: file checksum registry (`Dpkg::Checksums` equivalent)
|
|
//! - [`deps`]: dependency grammar and evaluation (dpkg-checkbuilddeps)
|
|
//! - [`files`]: `debian/files` artifact registry (`Dpkg::Dist::Files`)
|
|
//! - [`version`]: Debian version splitting/validation/comparison
|
|
//! - [`changelog`]: `debian/changelog` entry parsing
|
|
|
|
pub mod arch;
|
|
pub mod changelog;
|
|
pub mod checksums;
|
|
pub mod control;
|
|
pub mod deps;
|
|
pub mod files;
|
|
pub mod version;
|
|
|
|
pub use changelog::{
|
|
ChangelogEntry, parse_changelog_entry, parse_changelog_entry_from_str,
|
|
parse_previous_version_from_str,
|
|
};
|
|
pub use checksums::{Entry as ChecksumEntry, FileChecksums};
|
|
pub use control::{ControlInfo, Paragraph, parse_paragraphs, write_paragraph};
|
|
pub use files::{FilesEntry, FilesList};
|
|
pub use version::DebianVersion;
|