mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-24 10:41:43 +00:00
Merge pull request #6249 from stevenhorsman/attestation-agent-bump
osbuilder: Make attestation-agent build
This commit is contained in:
commit
b1afabdef0
@ -670,23 +670,12 @@ EOF
|
||||
info "Install attestation-agent with KBC ${AA_KBC}"
|
||||
#git clone "${attestation_agent_url}" --branch "${attestation_agent_tag}" --single-branch
|
||||
git clone --depth=1 "${attestation_agent_url}" attestation-agent
|
||||
pushd attestation-agent/app
|
||||
|
||||
pushd attestation-agent
|
||||
git fetch --depth=1 origin "${attestation_agent_version}"
|
||||
git checkout FETCH_HEAD
|
||||
source "${HOME}/.cargo/env"
|
||||
target="${ARCH}-unknown-linux-${LIBC}"
|
||||
if [ "${AA_KBC}" == "eaa_kbc" ] && [ "${ARCH}" == "x86_64" ]; then
|
||||
RUSTFLAGS="-C link-args=-Wl,-rpath,/usr/local/lib/rats-tls"
|
||||
# Currently eaa_kbc module only support this specific platform
|
||||
target="x86_64-unknown-linux-gnu"
|
||||
fi
|
||||
if [ "$(uname -m)" != "$ARCH" ]; then
|
||||
RUSTFLAGS+=" -C linker=$CC"
|
||||
fi
|
||||
export RUSTFLAGS
|
||||
# Foreign CC is incompatible with libgit2 -- CC is still handled by `-C linker=...` flag
|
||||
CC= cargo build --release --target "${target}" --no-default-features --features "${AA_KBC}"
|
||||
install -D -o root -g root -m 0755 "target/${target}/release/attestation-agent" -t "${ROOTFS_DIR}/usr/local/bin/"
|
||||
[ "${AA_KBC}" == "eaa_kbc" ] && [ "${ARCH}" == "x86_64" ] && LIBC="gnu"
|
||||
make KBC=${AA_KBC} && make install DESTDIR="${ROOTFS_DIR}/usr/local/bin/"
|
||||
popd
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user