## START: Set by rpmautospec ## (rpmautospec version 0.8.1) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 2; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec # Generated by rust2rpm 27 %bcond check 1 # Enable gpg signature verification by default %bcond gpgcheck 1 # prevent library files from being installed %global cargo_install_lib 0 %global soname libkryoptic_pkcs11 Name: kryoptic Version: 1.2.0 Release: %autorelease Summary: PKCS #11 software token written in Rust SourceLicense: GPL-3.0-or-later # Apache-2.0 # Apache-2.0 OR BSL-1.0 # Apache-2.0 OR MIT # BSD-2-Clause OR Apache-2.0 OR MIT # BSD-3-Clause # GPL-3.0-or-later # MIT # MIT OR Apache-2.0 # MIT-0 OR Apache-2.0 # Unlicense OR MIT License: Apache-2.0 AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND (BSD-3-Clause) AND (GPL-3.0-or-later) AND (MIT) AND (MIT OR Apache-2.0) AND (MIT-0 OR Apache-2.0) AND (Unlicense OR MIT) # LICENSE.dependencies contains a full license breakdown URL: https://github.com/latchset/kryoptic Source0: https://github.com/latchset/kryoptic/releases/download/v%{version}/%{name}-%{version}.tar.gz %if %{with gpgcheck} Source1: https://github.com/latchset/kryoptic/releases/download/v%{version}/%{name}-%{version}.tar.gz.asc Source2: https://people.redhat.com/~ssorce/simo_redhat.asc %endif # Update cryptoki to 0.10.0 Patch: kryoptic-fix-metadata.diff BuildRequires: cargo-rpm-macros >= 26 BuildRequires: openssl-devel %if %{with gpgcheck} BuildRequires: gnupg2 %endif %global _description %{expand: A PKCS #11 software token written in Rust.} %description %{_description} %package tools Requires: %{name}%{?_isa} = %{version}-%{release} Summary: Supporting tools for kryoptic software token %description tools Supporting tools for kryoptic software token. Most notably a migration tool for the SoftHSM database. %prep %if %{with gpgcheck} %{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}' %endif %autosetup -p1 %cargo_prep %generate_buildrequires %cargo_generate_buildrequires -f nssdb,pqc %build export CONFDIR=%{_sysconfdir} %cargo_build -f nssdb,pqc %{cargo_license_summary -f nssdb,pqc} %{cargo_license -f nssdb,pqc} > LICENSE.dependencies %install %cargo_install -f nssdb,pqc install -Dp target/rpm/%{soname}.so $RPM_BUILD_ROOT%{_libdir}/pkcs11/%{soname}.so rm -f $RPM_BUILD_ROOT%{_bindir}/{kryoptic_init,test_signature} mkdir -p $RPM_BUILD_ROOT%{_datadir}/p11-kit/modules/ echo "module: %{soname}.so" > $RPM_BUILD_ROOT%{_datadir}/p11-kit/modules/kryoptic.module %if %{with check} %check %cargo_test -f nssdb,pqc %endif %files %license LICENSE.txt %license LICENSE.dependencies %doc README.md %dir %{_libdir}/pkcs11 %{_libdir}/pkcs11/%{soname}.so # Co-owned with p11-kit so it is not hard dependency %dir %{_datadir}/p11-kit %dir %{_datadir}/p11-kit/modules %{_datadir}/p11-kit/modules/kryoptic.module %files tools %{_bindir}/softhsm_migrate %changelog ## START: Generated by rpmautospec * Thu Jun 19 2025 Jakub Jelen - 1.2.0-2 - Relax rust dependencies requirements for cryptoki and asn1 crates * Mon Jun 09 2025 Jakub Jelen - 1.2.0-1 - kryoptic-1.2.0-1 (#2371228) * Mon Apr 14 2025 Jakub Jelen - 1.1.0-1 - Update to next upstream release 1.1.0 * Mon Mar 17 2025 Jakub Jelen - 1.0.0-2 - Fix SPDX licence identifier * Tue Mar 11 2025 Jakub Jelen - 1.0.0-1 - 1.0.0 release * Wed Feb 26 2025 Jakub Jelen - 0.1.0^20250225.gitb37f7ee-3 - Install kryoptic to p11-kit registry * Tue Feb 25 2025 Jakub Jelen - 0.1.0^20250225.gitb37f7ee-2 - Update source in the rust2rpm conf * Tue Feb 25 2025 Jakub Jelen - 0.1.0^20250225.gitb37f7ee-1 - Update spec file based on the post-review comments * Tue Feb 25 2025 Jakub Jelen - 0.1.0^20250225.gitb37f7ee1-2 - Add sources * Tue Feb 25 2025 Jakub Jelen - 0.1.0^20250225.gitb37f7ee1-1 - Initial commit ## END: Generated by rpmautospec