Initial import
This commit is contained in:
parent
0263a3cfc3
commit
8858a2e08d
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
/rust-keylime-0.1.0~20211110gitd5a3191-vendor.tar.xz
|
||||
/rust-keylime-0.1.0~20211110gitd5a3191.tar.gz
|
||||
114
keylime-agent-rust.spec
Normal file
114
keylime-agent-rust.spec
Normal file
@ -0,0 +1,114 @@
|
||||
# keylime-agent-rust.spec
|
||||
# Generated by rust2rpm 20
|
||||
|
||||
# missing dev-dependencies: wiremock
|
||||
%bcond_with check
|
||||
|
||||
%global crate keylime_agent
|
||||
%global crate_version 0.1.0
|
||||
|
||||
# As the latest git version uses an unreleased tss-esapi crate, we
|
||||
# stick to an older version. FIXME: once the new tss-esapi crate is
|
||||
# available on crates.io, update the revision to the latest
|
||||
%global commit d5a31912eb9f69ea1c8fed59811089ff7c4ccebf
|
||||
%global shortcommit %(c=%{commit}; echo ${c:0:7})
|
||||
%global commitdate 20211110
|
||||
|
||||
%if 0%{?rhel}
|
||||
# RHEL: Use bundled deps as it doesn't ship Rust libraries
|
||||
%global bundled_rust_deps 1
|
||||
%else
|
||||
# Fedora: Use only system Rust libraries
|
||||
%global bundled_rust_deps 0
|
||||
%endif
|
||||
|
||||
Name: keylime-agent-rust
|
||||
Version: %{crate_version}~%{commitdate}git%{shortcommit}
|
||||
Release: 1%{?dist}
|
||||
Summary: Rust agent for Keylime
|
||||
|
||||
# Upstream license specification: Apache-2.0
|
||||
#
|
||||
# The build dependencies have the following licenses:
|
||||
#
|
||||
# 0BSD or MIT or ASL 2.0
|
||||
# ASL 2.0
|
||||
# ASL 2.0 or Boost
|
||||
# ASL 2.0 or MIT
|
||||
# ASL 2.0 with exceptions
|
||||
# BSD
|
||||
# MIT
|
||||
# MIT or ASL 2.0
|
||||
# MIT or ASL 2.0 or zlib
|
||||
# MIT or zlib or ASL 2.0
|
||||
# Unlicense or MIT
|
||||
# zlib or ASL 2.0 or MIT
|
||||
#
|
||||
License: ASL 2.0 and BSD and MIT
|
||||
URL: https://github.com/keylime/rust-keylime/
|
||||
# The source tarball is downloaded using the following commands:
|
||||
# spectool -g keylime-agent-rust.spec
|
||||
Source0: %{url}/archive/%{commit}/rust-keylime-%{version}.tar.gz
|
||||
# The vendor tarball is created using cargo vendor:
|
||||
# tar xf rust-keylime-%%{version}.tar.gz
|
||||
# cd rust-keylime-%%{version}
|
||||
# cargo vendor
|
||||
# tar jcf rust-keylime-%%{version}-vendor.tar.xz vendor
|
||||
Source1: rust-keylime-%{version}-vendor.tar.xz
|
||||
|
||||
ExclusiveArch: %{rust_arches}
|
||||
|
||||
%if 0%{?bundled_rust_deps}
|
||||
BuildRequires: rust-toolset
|
||||
BuildRequires: openssl-devel
|
||||
BuildRequires: libarchive-devel
|
||||
BuildRequires: tpm2-tss-devel
|
||||
%else
|
||||
BuildRequires: rust-packaging
|
||||
%endif
|
||||
|
||||
# Virtual Provides to support swapping between Python and Rust implementation
|
||||
Provides: keylime-agent
|
||||
Conflicts: keylime-agent
|
||||
|
||||
%description
|
||||
Rust agent for Keylime
|
||||
|
||||
%files
|
||||
%license LICENSE
|
||||
%doc README.md
|
||||
%{_bindir}/keylime_agent
|
||||
%{_bindir}/keylime_ima_emulator
|
||||
|
||||
%prep
|
||||
%autosetup -n rust-keylime-%{commit} -p1
|
||||
%if 0%{?bundled_rust_deps}
|
||||
# Source1 is vendored dependencies
|
||||
%cargo_prep -V 1
|
||||
%else
|
||||
%cargo_prep
|
||||
%endif
|
||||
%ifarch armv7hl
|
||||
# drop debuginfo generation for armv7hl OOM problems
|
||||
sed -i "s/debuginfo=2/debuginfo=0/" .cargo/config
|
||||
%endif
|
||||
|
||||
%if !0%{?bundled_rust_deps}
|
||||
%generate_buildrequires
|
||||
%cargo_generate_buildrequires
|
||||
%endif
|
||||
|
||||
%build
|
||||
%cargo_build
|
||||
|
||||
%install
|
||||
%cargo_install
|
||||
|
||||
%if %{with check}
|
||||
%check
|
||||
%cargo_test
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Mon Jan 24 2022 Daiki Ueno <dueno@redhat.com> - 0.1.0~20211110gitd5a3191-1
|
||||
- Initial package
|
||||
2
sources
Normal file
2
sources
Normal file
@ -0,0 +1,2 @@
|
||||
SHA512 (rust-keylime-0.1.0~20211110gitd5a3191-vendor.tar.xz) = d3f3013c9875707fb109560828ff4fb0553a7170608ef7d7fcb672de2b09ea6c1e6b937dc9a76f7cac6f63c0d339ac30bdf68bcc46d4560e98da2e8c4ef9a551
|
||||
SHA512 (rust-keylime-0.1.0~20211110gitd5a3191.tar.gz) = 32759c7ffbc4a6d482c729544384c051b87a481de6edb98381822208c29c8a7bc25e7c8786bce0e984ccf4ceab8b166db33b48e4f94e7ec827308d924acd0548
|
||||
Loading…
Reference in New Issue
Block a user