2021-05-06 15:06:32 +00:00
|
|
|
#
|
|
|
|
# spec file for package rust-keylime
|
|
|
|
#
|
|
|
|
# Copyright (c) 2021 SUSE LLC
|
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
%global rustflags '-Clink-arg=-Wl,-z,relro,-z,now'
|
|
|
|
Name: rust-keylime
|
2021-08-16 14:40:34 +00:00
|
|
|
Version: 0.1.0+git.1629114992.890e8c9
|
2021-05-06 15:06:32 +00:00
|
|
|
Release: 0
|
|
|
|
Summary: Rust implementation of the keylime agent
|
2021-07-28 13:39:06 +00:00
|
|
|
License: Apache-2.0 AND MIT
|
2021-05-06 15:06:32 +00:00
|
|
|
URL: https://github.com/keylime/rust-keylime
|
|
|
|
Source: rust-keylime-%{version}.tar.xz
|
|
|
|
Source1: vendor.tar.xz
|
|
|
|
Source2: cargo_config
|
2021-07-28 13:39:06 +00:00
|
|
|
Source3: keylime_agent.service
|
|
|
|
Source4: keylime.xml
|
|
|
|
# PATCH-FIX-OPENSUSE keylime.conf.diff
|
|
|
|
Patch1: keylime.conf.diff
|
|
|
|
# PATCH-FIX-UPSTREAM generate-cargo-lock-file.patch gh#keylime/rust-keylime!244
|
|
|
|
Patch2: generate-cargo-lock-file.patch
|
2021-05-06 15:06:32 +00:00
|
|
|
BuildRequires: cargo
|
2021-07-28 13:39:06 +00:00
|
|
|
BuildRequires: firewall-macros
|
|
|
|
BuildRequires: libarchive-devel
|
2021-05-06 15:06:32 +00:00
|
|
|
BuildRequires: rust
|
|
|
|
BuildRequires: tpm2-0-tss-devel
|
2021-07-28 13:39:06 +00:00
|
|
|
BuildRequires: zeromq-devel
|
2021-05-06 15:06:32 +00:00
|
|
|
ExcludeArch: %{ix86} s390x ppc64 ppc64le armhfp armv7hl
|
|
|
|
|
|
|
|
%description
|
|
|
|
Rust implementation of keylime agent. Keylime is system integrity
|
|
|
|
monitoring system.
|
|
|
|
|
|
|
|
%prep
|
2021-07-28 13:39:06 +00:00
|
|
|
%autosetup -a1
|
2021-05-06 15:06:32 +00:00
|
|
|
mkdir .cargo
|
|
|
|
cp %{SOURCE2} .cargo/config
|
|
|
|
|
|
|
|
%build
|
|
|
|
RUSTFLAGS=%{rustflags} cargo build --release
|
|
|
|
|
|
|
|
%install
|
2021-07-28 13:39:06 +00:00
|
|
|
RUSTFLAGS=%{rustflags} cargo install --frozen --root=%{buildroot}%{_prefix} --path .
|
2021-05-06 15:06:32 +00:00
|
|
|
|
|
|
|
install -Dpm 644 keylime.conf %{buildroot}%{_sysconfdir}/keylime.conf
|
2021-07-28 13:39:06 +00:00
|
|
|
install -Dpm 644 %{SOURCE3} %{buildroot}%{_unitdir}/keylime_agent.service
|
|
|
|
|
|
|
|
install -D -m 644 %{SOURCE4} %{buildroot}%{_prefix}/lib/firewalld/services/keylime.xml
|
2021-05-06 15:06:32 +00:00
|
|
|
|
|
|
|
rm %{buildroot}%{_prefix}/.crates.toml
|
|
|
|
rm %{buildroot}%{_prefix}/.crates2.json
|
|
|
|
|
2021-07-28 13:39:06 +00:00
|
|
|
%pre
|
|
|
|
%service_add_pre keylime_agent.service
|
|
|
|
|
|
|
|
%post
|
|
|
|
%firewalld_reload
|
|
|
|
%service_add_post keylime_agent.service
|
|
|
|
|
|
|
|
%preun
|
|
|
|
%service_del_preun keylime_agent.service
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%service_del_postun keylime_agent.service
|
|
|
|
|
2021-05-06 15:06:32 +00:00
|
|
|
%files
|
2021-07-28 13:39:06 +00:00
|
|
|
%doc README.md
|
|
|
|
%license LICENSE
|
2021-05-06 15:06:32 +00:00
|
|
|
%{_bindir}/keylime_agent
|
|
|
|
%config(noreplace) %{_sysconfdir}/keylime.conf
|
2021-07-28 13:39:06 +00:00
|
|
|
%dir %{_prefix}/lib/firewalld
|
|
|
|
%dir %{_prefix}/lib/firewalld/services
|
|
|
|
%{_prefix}/lib/firewalld/services/keylime.xml
|
|
|
|
%{_unitdir}/keylime_agent.service
|
2021-05-06 15:06:32 +00:00
|
|
|
|
|
|
|
%changelog
|