File tree Expand file tree Collapse file tree 2 files changed +42
-7
lines changed Expand file tree Collapse file tree 2 files changed +42
-7
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ name : RPM build
3+
4+ on :
5+ pull_request :
6+ branches : ["main"]
7+
8+ jobs :
9+ rpmbuild :
10+ name : Generate crate and run RPM Build
11+ runs-on : ubuntu-22.04
12+ container : fedora:rawhide
13+ steps :
14+ - name : Install Dependencies
15+ run : |
16+ dnf -y install rustc rpm-build cargo-rpm-macros openssl-devel \
17+ 'crate(asn1/default)' 'crate(bimap/default)' \
18+ 'crate(bindgen/default)' 'crate(bitflags/default)' 'crate(cfg-if/default)' \
19+ 'crate(clap)' 'crate(clap/cargo)' 'crate(clap/derive)' 'crate(clap/help)' \
20+ 'crate(clap/std)' 'crate(clap/usage)' 'crate(constant_time_eq/default)' \
21+ 'crate(data-encoding/default)' 'crate(getrandom/default) < 0.3.0~)' 'crate(hex/default)' \
22+ 'crate(itertools/default)' 'crate(libc/default)' 'crate(num-bigint/default)' \
23+ 'crate(num-integer/default)' 'crate(num-traits/default)' 'crate(once_cell/default)' \
24+ 'crate(paste/default)' 'crate(pkg-config/default)' 'crate(rusqlite/default)' \
25+ 'crate(serde/default)' 'crate(serde/derive)' 'crate(serde_json/default)' \
26+ 'crate(serial_test/default)' 'crate(toml)' 'crate(toml/display)' 'crate(toml/parse)' \
27+ 'crate(uuid/default)' 'crate(uuid/v4)'
28+
29+ - name : Checkout Repository
30+ uses : actions/checkout@v4
31+
32+ - name : RPM Build
33+ run : |
34+ cargo package --features=standard,dynamic,nssdb
35+ mkdir -p rpmbuild/SOURCES
36+ cp target/package/kryoptic-*.crate rpmbuild/SOURCES/
37+ rpmbuild --define "_topdir $PWD/rpmbuild" -ba \
38+ packaging/kryoptic.spec
39+
Original file line number Diff line number Diff line change 44# prevent library files from being installed
55%global cargo_install_lib 0
66
7- %global commit b37f7ee15473f0b7c9546855136d8b5ec3db1750
8- %global shortcommit %(c= %{commit }; echo ${c:0:7})
9- %global revision_date 20250225
10-
117Name: kryoptic
12- Version: 0.1.0^%{ revision_date }.git%{ shortcommit }
8+ Version: 0.1.0
139Release: %autorelease
1410Summary: PKCS #11 software token written in Rust
1511
@@ -28,7 +24,7 @@ License: Apache-2.0 AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (BSD
2824# LICENSE.dependencies contains a full license breakdown
2925
3026URL: https://github.com/latchset/kryoptic
31- Source: https://github.com/latchset/%{name }/archive/%{commit }/%{name }-%{shortcommit }.tar.gz
27+ Source: https://github.com/latchset/%{name }/archive/%{commit }/%{name }-%{version }.crate
3228
3329BuildRequires: cargo-rpm-macros >= 26
3430BuildRequires: openssl-devel
@@ -47,7 +43,7 @@ Supporting tools for kryoptic software token.
4743Most notably a migration tool for the SoftHSM database.
4844
4945%prep
50- %autosetup -n kryoptic-%{commit } -p1
46+ %autosetup -n kryoptic-%{version } -p1
5147%cargo_prep
5248
5349%generate_buildrequires
You can’t perform that action at this time.
0 commit comments