Files
pkh/src/debian/mod.rs
T
vhaudiquet c2e1288bc5 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.
2026-08-23 01:43:41 +02:00

23 lines
882 B
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):
//!
//! - [`control`]: deb822 paragraph parsing/writing and `debian/control`
//! - [`checksums`]: file checksum registry (`Dpkg::Checksums` equivalent)
//! - [`files`]: `debian/files` artifact registry (`Dpkg::Dist::Files`)
//! - [`version`]: Debian version splitting/validation
//! - [`changelog`]: `debian/changelog` entry parsing
pub mod changelog;
pub mod checksums;
pub mod control;
pub mod files;
pub mod version;
pub use changelog::{parse_changelog_entry, ChangelogEntry};
pub use checksums::{Entry as ChecksumEntry, FileChecksums};
pub use control::{parse_paragraphs, write_paragraph, ControlInfo, Paragraph};
pub use files::{FilesEntry, FilesList};
pub use version::DebianVersion;