aboutsummaryrefslogtreecommitdiff
path: root/tests/docker
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2024-10-18 18:01:22 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2024-11-06 17:12:17 +0100
commit951f71ad67bd474aba6925529daf45b747aac86e (patch)
tree1752a5c18e894c6db5f04f971df983b38e7f0e35 /tests/docker
parent5b1b5a8ae40d3fcbc3f9ede3fe9227064f9a480f (diff)
downloadqemu-951f71ad67bd474aba6925529daf45b747aac86e.zip
qemu-951f71ad67bd474aba6925529daf45b747aac86e.tar.gz
qemu-951f71ad67bd474aba6925529daf45b747aac86e.tar.bz2
dockerfiles: install bindgen from cargo on Ubuntu 22.04
Because Ubuntu 22.04 has a very old version of bindgen, that does not have the important option --allowlist-file, it will not be able to use --enable-rust out of the box. Instead, install the latest version of bindgen-cli via "cargo install" in the container, following QEMU's own documentation. Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tests/docker')
-rw-r--r--tests/docker/dockerfiles/ubuntu2204.docker6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/docker/dockerfiles/ubuntu2204.docker b/tests/docker/dockerfiles/ubuntu2204.docker
index 94697bd..e1b70b5 100644
--- a/tests/docker/dockerfiles/ubuntu2204.docker
+++ b/tests/docker/dockerfiles/ubuntu2204.docker
@@ -13,7 +13,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
eatmydata apt-get install --no-install-recommends -y \
bash \
bc \
- bindgen \
bison \
bsdextrautils \
bzip2 \
@@ -150,6 +149,11 @@ ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"
ENV NINJA "/usr/bin/ninja"
ENV PYTHON "/usr/bin/python3"
+ENV CARGO_HOME=/usr/local/cargo
+ENV PATH=$CARGO_HOME/bin:$PATH
+RUN DEBIAN_FRONTEND=noninteractive eatmydata \
+ apt install -y --no-install-recommends cargo
+RUN cargo install bindgen-cli
# As a final step configure the user (if env is defined)
ARG USER
ARG UID