mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-21 02:40:57 +00:00
build: cache: Cache root_hash.txt used by the shim-v2
Let's cache the root_hash.txt from the confidential image so we can use them later on to decide whether there was a rootfs change that would require shim-v2 to be rebuilt. Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
This commit is contained in:
parent
d2d9792720
commit
9c84998de9
@ -1145,6 +1145,21 @@ handle_build() {
|
|||||||
fi
|
fi
|
||||||
tar tvf "${modules_final_tarball_path}"
|
tar tvf "${modules_final_tarball_path}"
|
||||||
;;
|
;;
|
||||||
|
shim-v2)
|
||||||
|
if [ "${MEASURED_ROOTFS}" = "yes" ]; then
|
||||||
|
local image_conf_tarball="${workdir}/kata-static-rootfs-image-confidential.tar.xz"
|
||||||
|
if [ ! -f "${image_conf_tarball}" ]; then
|
||||||
|
die "Building the shim-v2 with MEASURED_ROOTFS support requires a rootfs confidential image tarball"
|
||||||
|
fi
|
||||||
|
|
||||||
|
local root_hash_basedir="./opt/kata/share/kata-containers/"
|
||||||
|
if ! tar xvf ${image_conf_tarball} ${root_hash_basedir}root_hash.txt --transform s,${root_hash_basedir},,; then
|
||||||
|
die "Building the shim-v2 with MEASURED_ROOTFS support requres a rootfs confidential image tarball built with MEASURED_ROOTFS support"
|
||||||
|
fi
|
||||||
|
|
||||||
|
mv root_hash.txt shim-v2-root_hash.txt
|
||||||
|
fi
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
pushd ${workdir}
|
pushd ${workdir}
|
||||||
@ -1210,6 +1225,13 @@ handle_build() {
|
|||||||
"kata-static-${build_target}-modules.tar.xz"
|
"kata-static-${build_target}-modules.tar.xz"
|
||||||
)
|
)
|
||||||
;;
|
;;
|
||||||
|
shim-v2)
|
||||||
|
if [ "${MEASURED_ROOTFS}" = "yes" ]; then
|
||||||
|
files_to_push+=(
|
||||||
|
"shim-v2-root_hash.txt"
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
Loading…
Reference in New Issue
Block a user