Skip to main content

Crate rpm_spec_profile

Crate rpm_spec_profile 

Source
Expand description

Distribution profiles for the RPM spec analyzer.

A Profile is the resolved target environment a .spec file is analyzed against — identity (family/vendor/dist tag), the full macro registry, rpmlib features, license/group whitelists. Layered: builtin baseline → rpm --showrc dump → user overrides.

Sources of profile data:

  1. Builtins compiled into the binary (data/<name>.toml, loaded via builtin). On first release only generic exists.
  2. A rpm --showrc dump from the target host, parsed by showrc.
  3. User overrides in .rpmspec.toml [profiles.<name>.*], deserialised via config_layer and merged on top.

Entry point: resolve_profile.

Re-exports§

pub use config_layer::ListOverride;
pub use config_layer::MacroOverride;
pub use config_layer::ProfileEntry;
pub use config_layer::ProfileIdentityOverride;
pub use config_layer::ProfileSection;
pub use overrides::CliDefine;
pub use overrides::DefineParseError;
pub use overrides::parse_define;
pub use resolve::ResolveError;
pub use resolve::ResolveOptions;
pub use resolve::resolve as resolve_profile;
pub use types::ArchInfo;
pub use types::Family;
pub use types::GroupList;
pub use types::Identity;
pub use types::LayerInfo;
pub use types::LicenseList;
pub use types::MacroEntry;
pub use types::MacroRegistry;
pub use types::MacroValue;
pub use types::Profile;
pub use types::Provenance;
pub use types::RpmlibFeatures;
pub use types::ValidationMode;

Modules§

autodetect
Derive [Identity] fields from a parsed rpm --showrc macro list.
builtin
Built-in profile catalogue.
config_layer
.rpmspec.toml shape for the profile system.
merge
Layered merge for Profile data.
overrides
Parser for ad-hoc macro overrides supplied as raw NAME VALUE strings. Modelled on rpmbuild --define 'NAME VALUE' so packagers coming from rpmbuild get the same syntax: a single argument, name and value separated by ASCII whitespace, value preserved verbatim (including embedded whitespace and trailing whitespace) up to the end of the argument.
resolve
Top-level resolver: turns a ProfileSection into a fully merged Profile.
showrc
Parser for rpm --showrc output.
types
Core data types for distribution profiles.