mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-26 07:22:20 +00:00
CC: Fix errors on building cc-builders on s390x
This is to fix errors on building cc-builders images on s390x. Fixes: #5677 Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
This commit is contained in:
parent
4ba26bf86a
commit
f24c47ea47
@ -14,7 +14,6 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
ENV TZ=UTC
|
||||
RUN apt-get update &&\
|
||||
apt-get --no-install-recommends install -y software-properties-common &&\
|
||||
add-apt-repository ppa:git-core/ppa -y &&\
|
||||
apt-get update && apt-get upgrade -y && \
|
||||
apt-get --no-install-recommends install -y \
|
||||
apt-utils \
|
||||
@ -61,11 +60,8 @@ RUN apt-get update &&\
|
||||
strip /usr/sbin/veritysetup.static && \
|
||||
popd && \
|
||||
echo "Build gen_init_cpio tool" && \
|
||||
git clone --depth 1 --filter=blob:none --sparse https://github.com/torvalds/linux.git && \
|
||||
pushd linux && \
|
||||
git sparse-checkout add usr && cd usr && make gen_init_cpio && \
|
||||
install gen_init_cpio /usr/sbin/ && \
|
||||
popd && \
|
||||
curl -LO https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/usr/gen_init_cpio.c && \
|
||||
make gen_init_cpio && mv gen_init_cpio /usr/sbin/ && rm -f gen_init_cpio.c && \
|
||||
popd && \
|
||||
rm -rf ${build_root}
|
||||
|
||||
|
@ -22,6 +22,7 @@ PREFIX=${PREFIX:-/opt/kata}
|
||||
container_image="${SHIM_V2_CONTAINER_BUILDER:-${CC_BUILDER_REGISTRY}:shim-v2-go-${GO_VERSION}-rust-${RUST_VERSION}-$(get_last_modification ${repo_root_dir} ${script_dir})-$(uname -m)}"
|
||||
|
||||
EXTRA_OPTS="${EXTRA_OPTS:-""}"
|
||||
VMM_CONFIGS="qemu fc"
|
||||
REMOVE_VMM_CONFIGS="${REMOVE_VMM_CONFIGS:-""}"
|
||||
|
||||
sudo docker pull ${container_image} || \
|
||||
@ -59,11 +60,15 @@ sudo docker run --rm -i -v "${repo_root_dir}:${repo_root_dir}" \
|
||||
"${container_image}" \
|
||||
bash -c "git config --global --add safe.directory ${repo_root_dir} && make PREFIX="${PREFIX}" DESTDIR="${DESTDIR}" ${EXTRA_OPTS} install"
|
||||
|
||||
sudo sed -i -e '/^initrd =/d' "${DESTDIR}/${PREFIX}/share/defaults/kata-containers/configuration-qemu.toml"
|
||||
sudo sed -i -e '/^initrd =/d' "${DESTDIR}/${PREFIX}/share/defaults/kata-containers/configuration-fc.toml"
|
||||
for vmm in ${VMM_CONFIGS}; do
|
||||
config_file="${DESTDIR}/${PREFIX}/share/defaults/kata-containers/configuration-${vmm}.toml"
|
||||
if [ -f ${config_file} ]; then
|
||||
sudo sed -i -e '/^initrd =/d' ${config_file}
|
||||
fi
|
||||
done
|
||||
|
||||
for vmm in ${REMOVE_VMM_CONFIGS}; do
|
||||
sudo rm "${DESTDIR}/${PREFIX}/share/defaults/kata-containers/configuration-$vmm.toml"
|
||||
sudo rm -f "${DESTDIR}/${PREFIX}/share/defaults/kata-containers/configuration-$vmm.toml"
|
||||
done
|
||||
|
||||
pushd "${DESTDIR}/${PREFIX}/share/defaults/kata-containers"
|
||||
|
Loading…
Reference in New Issue
Block a user