mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-10-21 20:08:54 +00:00
Let's add the needed functions to start building the kata-agent, with or without the OPA support. For now this build is not used as part of the rootfs build, but later on this will (not as part of this series, though). Fixes: #8099 Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
38 lines
738 B
Bash
Executable File
38 lines
738 B
Bash
Executable File
#!/usr/bin/env bash
|
|
#
|
|
# Copyright (c) 2023 Intel Corporation
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
set -o errexit
|
|
set -o nounset
|
|
set -o pipefail
|
|
|
|
script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
|
source "${script_dir}/../../scripts/lib.sh"
|
|
|
|
init_env() {
|
|
source "$HOME/.cargo/env"
|
|
|
|
export LIBC=musl
|
|
export LIBSECCOMP_LINK_TYPE=static
|
|
export LIBSECCOMP_LIB_PATH=/usr/lib
|
|
|
|
# This is needed to workaround
|
|
# https://github.com/sfackler/rust-openssl/issues/1624
|
|
export OPENSSL_NO_VENDOR=Y
|
|
}
|
|
|
|
build_agent_from_source() {
|
|
echo "build agent from source"
|
|
|
|
init_env
|
|
|
|
cd src/agent
|
|
DESTDIR=${DESTDIR} AGENT_POLICY=${AGENT_POLICY} make
|
|
DESTDIR=${DESTDIR} AGENT_POLICY=${AGENT_POLICY} make install
|
|
}
|
|
|
|
build_agent_from_source $@
|