From bd6639d81e56f5cab56b7fe8e97b4dce950010b7 Mon Sep 17 00:00:00 2001 From: Itxaka Date: Thu, 24 Oct 2024 11:27:12 +0200 Subject: [PATCH] Add keylime agent (#1120) --- packages/utils/keylime-agent/build.yaml | 31 ++++++++++++++++++++ packages/utils/keylime-agent/definition.yaml | 6 ++++ 2 files changed, 37 insertions(+) create mode 100644 packages/utils/keylime-agent/build.yaml create mode 100644 packages/utils/keylime-agent/definition.yaml diff --git a/packages/utils/keylime-agent/build.yaml b/packages/utils/keylime-agent/build.yaml new file mode 100644 index 00000000..910e406e --- /dev/null +++ b/packages/utils/keylime-agent/build.yaml @@ -0,0 +1,31 @@ +image: ubuntu:24.04 +package_dir: /package + +env: +- PACKAGE_VERSION={{ .Values.version }} +- GITHUB_ORG={{ ( index .Values.labels "github.owner" ) }} +- GITHUB_REPO={{ ( index .Values.labels "github.repo" ) }} + +prelude: +- apt-get update && apt-get install -y git libclang-dev libssl-dev libtss2-dev libzmq3-dev pkg-config cargo make +- PACKAGE_VERSION=v${PACKAGE_VERSION%\+*} && git clone --depth=1 --branch ${PACKAGE_VERSION} https://github.com/${GITHUB_ORG}/${GITHUB_REPO} + +steps: +# build +- cd ${GITHUB_REPO} && RELEASE=1 TARGETDIR=/build make all +# create target dirs for package +- mkdir -p /package/usr/local/bin/ +- mkdir -p /package/etc/keylime/ +- mkdir -p /package/etc/systemd/system/ +- mkdir -p /package/usr/libexec/keylime/ +# Copy binaries +- cp /build/release/keylime_agent /package/usr/local/bin/ +- cp /build/release/keylime_ima_emulator /package/usr/local/bin/ +# copy default config +- cp ${GITHUB_REPO}/keylime-agent.conf /package/etc/keylime/ +# copy systemd services +- cp ${GITHUB_REPO}/dist/systemd/system/keylime_agent.service /package/etc/systemd/system/ +- cp ${GITHUB_REPO}/dist/systemd/system/var-lib-keylime-secure.mount /package/etc/systemd/system/ +# Some kind of needed shim for a bug +# Remove when https://github.com/keylime/rust-keylime/issues/325 is fixed +- cp ${GITHUB_REPO}/keylime-agent/tests/actions/shim.py /package/usr/libexec/keylime/ diff --git a/packages/utils/keylime-agent/definition.yaml b/packages/utils/keylime-agent/definition.yaml new file mode 100644 index 00000000..c445c9d5 --- /dev/null +++ b/packages/utils/keylime-agent/definition.yaml @@ -0,0 +1,6 @@ +name: "keylime-agent" +category: "utils" +version: "0.2.6" +labels: + github.repo: "rust-keylime" + github.owner: "keylime"