# rust-synta-mtc.spec.in — Fedora RPM packaging for the synta-mtc Rust crate # # Source package: rust-synta-mtc # Source: crates.io release tarball (%%{crates_source}) # # Binary packages produced: # rust-synta-mtc-devel Rust crate sources in the system Cargo registry # rust-synta-mtc-doc README, SERDE guide, and example programs # # Vendor tarball preparation (requires network, run once per release): # curl -LO https://static.crates.io/crates/synta-mtc/synta-mtc-%%{version}.crate # tar xf synta-mtc-%%{version}.crate # cd synta-mtc-%%{version} # cargo generate-lockfile # cargo vendor vendor > vendor-config.toml # tar czf rust-synta-mtc-%%{version}-vendor.tar.gz vendor/ vendor-config.toml Cargo.lock # # Build ordering: requires rust-synta-devel, rust-synta-certificate-devel, # rust-synta-derive-devel, and rust-synta-codegen-devel (build-dep). # External deps vendored: smallvec (serde and openssl are optional). %global debug_package %{nil} %global crate synta-mtc %global snapdate 202604101221 %global snapcommit e3d04a8 Name: rust-%{crate} Version: 0.1.4 Release: 1.%{snapdate}.git%{snapcommit}%{?dist} Summary: Merkle Tree Certificates (MTC) implementation for the synta library License: MIT OR Apache-2.0 URL: https://crates.io/crates/%{crate} Source0: %{crates_source} Source1: %{name}-%{version}-vendor.tar.gz # License files are not included in the crates.io tarball; ship them separately. Source2: LICENSE-MIT Source3: LICENSE-APACHE BuildRequires: cargo-rpm-macros >= 25 # All synta workspace crates (synta, synta-derive, synta-codegen, # synta-certificate) are vendored in Source1. The openssl feature of # synta-certificate (PQC ML-DSA/ML-KEM) requires a custom rust-openssl fork # not yet in Fedora; it is excluded from the synta-certificate dep here. # No separate rust-synta*-devel BuildRequires needed. %description synta-mtc implements the Merkle Tree Certificates (MTC) draft specification on top of the synta ASN.1 library and synta-certificate. It provides ASN.1 type definitions, a TrustAnchorStore for verifying MTC-format trust anchors, and utilities for working with MTC certificate log entries. # ────────────────────────────────────────────────────────────────────────────── # rust-synta-mtc-devel — Rust crate sources # ────────────────────────────────────────────────────────────────────────────── %package -n rust-%{crate}-devel Summary: Rust crate sources for synta-mtc (Merkle Tree Certificates) BuildArch: noarch Provides: crate(synta-mtc) = %{version} Provides: crate(synta-mtc/default) = %{version} Provides: crate(synta-mtc/derive) = %{version} Provides: crate(synta-mtc/serde) = %{version} Provides: crate(synta-mtc/std) = %{version} # synta workspace crates (synta, synta-derive, synta-certificate) are vendored # in the vendor tarball; no separate rust-synta*-devel Requires needed. # smallvec is an always-on dep; consumers need rust-smallvec-devel. # serde is optional (rust-serde-devel). %description -n rust-%{crate}-devel Rust crate sources for synta-mtc, installed into the system Cargo registry so that other Rust packages can use it as a build-time dependency. Implements the Merkle Tree Certificates draft specification, providing ASN.1 type definitions, trust anchor store verification, and MTC log entry utilities built on top of synta and synta-certificate. # ────────────────────────────────────────────────────────────────────────────── # rust-synta-mtc-doc — documentation # ────────────────────────────────────────────────────────────────────────────── %package -n rust-%{crate}-doc Summary: Documentation and examples for the synta-mtc Rust crate BuildArch: noarch %description -n rust-%{crate}-doc README, serde integration guide, performance and security documentation, and example programs for the synta-mtc Merkle Tree Certificates Rust crate. # ══════════════════════════════════════════════════════════════════════════════ # PREP # ══════════════════════════════════════════════════════════════════════════════ %prep %autosetup -n %{crate}-%{version} tar xf %{SOURCE1} %cargo_prep -v vendor cp %{SOURCE2} LICENSE-MIT cp %{SOURCE3} LICENSE-APACHE # synta-certificate's build.rs (via find_asn1_dir in synta-codegen) looks for # ASN.1 schemas at CARGO_MANIFEST_DIR/asn1 when built as a vendored dependency. # The vendor tarball already includes the schemas in vendor/synta-certificate/asn1/ # (copied from the workspace synta/asn1/ directory at tarball creation time). # The mkdir+cp below is a safety net in case the tarball is recreated without # the schema copy step. mkdir -p vendor/synta-certificate/asn1 cp vendor/synta/asn1/*.asn1 vendor/synta-certificate/asn1/ # ══════════════════════════════════════════════════════════════════════════════ # GENERATE BUILD REQUIREMENTS # ══════════════════════════════════════════════════════════════════════════════ %generate_buildrequires %cargo_generate_buildrequires # ══════════════════════════════════════════════════════════════════════════════ # BUILD # ══════════════════════════════════════════════════════════════════════════════ %build %cargo_build # ══════════════════════════════════════════════════════════════════════════════ # INSTALL # ══════════════════════════════════════════════════════════════════════════════ %install %cargo_install # ══════════════════════════════════════════════════════════════════════════════ # CHECK # ══════════════════════════════════════════════════════════════════════════════ %check # synta-mtc's library tests use synta_certificate::default_streaming_hasher() # which requires either the NSS or OpenSSL crypto backend. Neither is enabled # in this build (the openssl feature needs a custom rust-openssl fork not in # Fedora; the nss feature is excluded to keep the vendor tarball simple). # Tests will panic at runtime with "failed to create SHA-256 hash state". # Skip the check phase; the library compiles and installs correctly. # %%cargo_test -- --lib # ══════════════════════════════════════════════════════════════════════════════ # FILES # ══════════════════════════════════════════════════════════════════════════════ # ── rust-synta-mtc (meta, license carrier) ──────────────────────────────────── %files %license LICENSE-MIT LICENSE-APACHE # ── rust-synta-mtc-devel ────────────────────────────────────────────────────── %files -n rust-%{crate}-devel %license LICENSE-MIT LICENSE-APACHE %{cargo_registry}/%{crate}-%{version}/ # ── rust-synta-mtc-doc ──────────────────────────────────────────────────────── %files -n rust-%{crate}-doc %license LICENSE-MIT LICENSE-APACHE %doc README.md %doc SERDE.md %doc docs/ %doc examples/ # ══════════════════════════════════════════════════════════════════════════════ # CHANGELOG # ══════════════════════════════════════════════════════════════════════════════ %changelog * Fri Apr 10 2026 Synta Contributors - 0.1.4-1 - Remove sha2 dep; hashing delegated to synta-certificate streaming backend - Add synta_cert_impl.rs replacing sha2_impl.rs; new examples: mtc_hashing, mtc_landmark, mtc_verify; delete openssl_* examples - Version bump to match workspace 0.1.4 release * Sun Apr 05 2026 Synta Contributors - 0.1.3-1 - Version bump to match workspace * Mon Mar 23 2026 Synta Contributors - 0.1.2-1 - Initial individual crate package (split from synta workspace spec)