# rust-synta-certificate.spec.in — Fedora RPM packaging for synta-certificate # # Source package: rust-synta-certificate # Source: crates.io release tarball (%%{crates_source}) # # Binary packages produced: # rust-synta-certificate-devel Rust crate sources in the system Cargo registry # rust-synta-certificate-doc README documentation # # Vendor tarball preparation (requires network, run once per release): # curl -LO https://static.crates.io/crates/synta-certificate/synta-certificate-%%{version}.crate # tar xf synta-certificate-%%{version}.crate # cd synta-certificate-%%{version} # cargo generate-lockfile # cargo vendor vendor > vendor-config.toml # tar czf rust-synta-certificate-%%{version}-vendor.tar.gz vendor/ vendor-config.toml Cargo.lock # # Build ordering: requires rust-synta-devel, rust-synta-derive-devel, and # rust-synta-codegen-devel (build-dep for ASN.1 code generation). # openssl-devel is required for the openssl and deprecated-pkcs12-algorithms # features; these are optional but the vendor tarball includes their deps. %global debug_package %{nil} %global crate synta-certificate %global snapdate 202604112257 %global snapcommit 05dfe2d Name: rust-%{crate} Version: 0.1.6 Release: 1.%{snapdate}.git%{snapcommit}%{?dist} Summary: X.509 certificate ASN.1 structures 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) are vendored # in Source1 because synta-codegen on crates.io predates the known_choice_types # API used by this build.rs. No separate rust-synta*-devel BuildRequires. # # The openssl and deprecated-pkcs12-algorithms features (ML-DSA/ML-KEM PQC # signing) require a custom rust-openssl fork not yet in Fedora; they are # excluded from this build via --no-default-features. openssl-devel is # therefore not required. %description synta-certificate provides X.509 certificate, CRL, CSR, and OCSP response ASN.1 type definitions built on top of the synta core library. It includes support for PKCS#7 and PKCS#12 archive reading, with optional OpenSSL-backed PKCS#12 decryption. # ────────────────────────────────────────────────────────────────────────────── # rust-synta-certificate-devel — Rust crate sources # ────────────────────────────────────────────────────────────────────────────── %package -n rust-%{crate}-devel Summary: Rust crate sources for synta-certificate (X.509 ASN.1 types) BuildArch: noarch Provides: crate(synta-certificate) = %{version} Provides: crate(synta-certificate/alloc) = %{version} Provides: crate(synta-certificate/default) = %{version} Provides: crate(synta-certificate/derive) = %{version} Provides: crate(synta-certificate/serde) = %{version} Provides: crate(synta-certificate/std) = %{version} # openssl and deprecated-pkcs12-algorithms features require a custom # rust-openssl fork (PQC ML-DSA/ML-KEM) not yet in the Fedora repo; # they are excluded from this package until rust-openssl gains PQC support. # synta workspace crates are vendored in the vendor tarball; no separate # rust-synta-devel or rust-synta-derive-devel Requires needed at install time. %description -n rust-%{crate}-devel Rust crate sources for synta-certificate, installed into the system Cargo registry so that other Rust packages can use it as a build-time dependency. Provides X.509 certificate, CRL, CSR, and OCSP response type definitions, PKCS#7 CMS parsing, PKCS#12 archive reading (with optional OpenSSL-backed decryption), and OID/algorithm utilities for the synta ASN.1 library. The openssl and deprecated-pkcs12-algorithms features require openssl-devel to be installed in the build root. # ────────────────────────────────────────────────────────────────────────────── # rust-synta-certificate-doc — documentation # ────────────────────────────────────────────────────────────────────────────── %package -n rust-%{crate}-doc Summary: Documentation for the synta-certificate Rust crate BuildArch: noarch %description -n rust-%{crate}-doc README and documentation for the synta-certificate X.509 ASN.1 types 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 uses find_asn1_dir() from synta-codegen to # locate ASN.1 schema files. The vendor tarball includes the full synta # workspace crate (including asn1/ schemas) at vendor/synta/; copy them to # the crate-local asn1/ directory so find_asn1_dir() finds them at option 1 # (CARGO_MANIFEST_DIR/asn1) without needing cargo metadata to locate synta. mkdir -p asn1 cp vendor/synta/asn1/*.asn1 asn1/ # ══════════════════════════════════════════════════════════════════════════════ # GENERATE BUILD REQUIREMENTS # ══════════════════════════════════════════════════════════════════════════════ %generate_buildrequires %cargo_generate_buildrequires # ══════════════════════════════════════════════════════════════════════════════ # BUILD # ══════════════════════════════════════════════════════════════════════════════ %build # Build without openssl feature: the openssl/PQC (ML-DSA, ML-KEM) support # requires a custom rust-openssl fork not yet in Fedora. The std, derive, # and serde features cover all X.509 / PKCS parsing functionality. %cargo_build -- --no-default-features --features std,derive,serde # ══════════════════════════════════════════════════════════════════════════════ # INSTALL # ══════════════════════════════════════════════════════════════════════════════ %install %cargo_install -- --no-default-features --features std,derive,serde # ══════════════════════════════════════════════════════════════════════════════ # CHECK # ══════════════════════════════════════════════════════════════════════════════ %check %cargo_test -- --no-default-features --features std,derive,serde --lib # ══════════════════════════════════════════════════════════════════════════════ # FILES # ══════════════════════════════════════════════════════════════════════════════ # ── rust-synta-certificate (meta, license carrier) ──────────────────────────── %files %license LICENSE-MIT LICENSE-APACHE # ── rust-synta-certificate-devel ────────────────────────────────────────────── %files -n rust-%{crate}-devel %license LICENSE-MIT LICENSE-APACHE %{cargo_registry}/%{crate}-%{version}/ # ── rust-synta-certificate-doc ──────────────────────────────────────────────── %files -n rust-%{crate}-doc %license LICENSE-MIT LICENSE-APACHE %doc README.md # ══════════════════════════════════════════════════════════════════════════════ # CHANGELOG # ══════════════════════════════════════════════════════════════════════════════ %changelog * Fri Apr 10 2026 Synta Contributors - 0.1.4-1 - Add streaming hasher abstraction (HashState, StreamingHasher, ErasedStreamingHasher) - Add default_streaming_hasher() factory; NSS symmetric.rs backend for streaming - Version bump to match workspace 0.1.4 release * Sun Apr 05 2026 Synta Contributors - 0.1.3-1 - Add CertificateList::crl_number(), PublicKey from raw RSA/EC components, and 8 new DN attribute OIDs in oids::attr (RFC 4519 + EV jurisdiction) * Mon Mar 23 2026 Synta Contributors - 0.1.2-1 - Initial individual crate package (split from synta workspace spec)