commit ca2b84eca8c7c38f7a0f74005783bd8e9e5decf39d805126238b9b11aa654c51 Author: Marcus Meissner Date: Thu May 6 15:06:32 2021 +0000 Accepting request 890792 from home:aplanas:keylime Alternative keylime-agent written in Rust. This is a WIP software fetched from git (see _service). Seems that this will replace the keylime agent written in Python in some future. If accepted, I would like to be co-maintainer, as this will change for a long time until it reach a stable release. OBS-URL: https://build.opensuse.org/request/show/890792 OBS-URL: https://build.opensuse.org/package/show/security/rust-keylime?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/_service b/_service new file mode 100644 index 0000000..a1de614 --- /dev/null +++ b/_service @@ -0,0 +1,21 @@ + + + 0.0.1+git.%ct.%h + master + https://github.com/keylime/rust-keylime.git + git + enable + + + xz + *.tar + + + + + + + + + + diff --git a/_servicedata b/_servicedata new file mode 100644 index 0000000..ad07911 --- /dev/null +++ b/_servicedata @@ -0,0 +1,4 @@ + + + https://github.com/keylime/rust-keylime.git + f6095257e6f6b306705a0869005b1b6c2e706b9a \ No newline at end of file diff --git a/cargo_config b/cargo_config new file mode 100644 index 0000000..97852b5 --- /dev/null +++ b/cargo_config @@ -0,0 +1,5 @@ +[source.crates-io] +replace-with = "vendored-sources" + +[source.vendored-sources] +directory = "vendor" diff --git a/rust-keylime-0.0.1+git.1618949271.f609525.tar.xz b/rust-keylime-0.0.1+git.1618949271.f609525.tar.xz new file mode 100644 index 0000000..83abcd8 --- /dev/null +++ b/rust-keylime-0.0.1+git.1618949271.f609525.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:65752d5f7d04bf10dfa0a84a931577b51d24d38dc7f458bd5d67eeabf750f6b1 +size 30600 diff --git a/rust-keylime.changes b/rust-keylime.changes new file mode 100644 index 0000000..4d45e21 --- /dev/null +++ b/rust-keylime.changes @@ -0,0 +1,15 @@ +------------------------------------------------------------------- +Tue May 04 12:23:18 UTC 2021 - aplanas@suse.com + +- Update to version 0.0.1+git.1618949271.f609525: + * Add more TPM helper functions + * Use PKeys consistently + * Rebase on tss-esapi 5.0 + * Pass a PKeyRef to asym_verify + * Use #[[from] from thiserror + * Fix uppercase acronyms + * Add testing feature + * Remove port bindings for agent + * More verbose TPM and revocation error, verbose success + * Fix docker networking + diff --git a/rust-keylime.spec b/rust-keylime.spec new file mode 100644 index 0000000..293936b --- /dev/null +++ b/rust-keylime.spec @@ -0,0 +1,59 @@ +# +# 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 +Version: 0.0.1+git.1618949271.f609525 +Release: 0 +Summary: Rust implementation of the keylime agent +License: MIT +URL: https://github.com/keylime/rust-keylime +Source: rust-keylime-%{version}.tar.xz +Source1: vendor.tar.xz +Source2: cargo_config +BuildRequires: cargo +BuildRequires: czmq-devel +BuildRequires: rust +BuildRequires: tpm2-0-tss-devel +ExcludeArch: %{ix86} s390x ppc64 ppc64le armhfp armv7hl + +%description +Rust implementation of keylime agent. Keylime is system integrity +monitoring system. + +%prep +%setup -qa1 +mkdir .cargo +cp %{SOURCE2} .cargo/config + +%build +RUSTFLAGS=%{rustflags} cargo build --release + +%install +RUSTFLAGS=%{rustflags} cargo install --root=%{buildroot}%{_prefix} --path . + +install -Dpm 644 keylime.conf %{buildroot}%{_sysconfdir}/keylime.conf + +rm %{buildroot}%{_prefix}/.crates.toml +rm %{buildroot}%{_prefix}/.crates2.json + +%files +%{_bindir}/keylime_agent +%config(noreplace) %{_sysconfdir}/keylime.conf + +%changelog diff --git a/vendor.tar.xz b/vendor.tar.xz new file mode 100644 index 0000000..9470974 --- /dev/null +++ b/vendor.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bbce59efe0342440068cb9f6450019eb2a0f6bab7c8d89b9a387d119fa77b96e +size 15347840