a22a4b29ad
Several debian-based tests need the python3-venv dependency as a consequence of Debian debundling the "ensurepip" module normally included with Python. As mkvenv.py stands as of this commit, Debian requires EITHER: (A) setuptools and pip, or (B) ensurepip mkvenv is a few seconds faster if you have setuptools and pip, so developers should prefer the first requirement. For the purposes of CI, the time-save is a wash; it's only a matter of who is responsible for installing pip and when; the timing is about the same. Arbitrarily, I chose adding ensurepip to the test configuration because it is normally part of the Python stdlib, and always having it allows us a more consistent cross-platform environment. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20230511035435.734312-12-jsnow@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
42 lines
1.4 KiB
Docker
42 lines
1.4 KiB
Docker
#
|
|
# Docker Hexagon cross-compiler target
|
|
#
|
|
# This docker target is used for building hexagon tests. As it also
|
|
# needs to be able to build QEMU itself in CI we include its
|
|
# build-deps.
|
|
#
|
|
FROM docker.io/library/debian:11-slim
|
|
|
|
# Duplicate deb line as deb-src
|
|
RUN cat /etc/apt/sources.list | sed "s/^deb\ /deb-src /" >> /etc/apt/sources.list
|
|
RUN apt-get update && \
|
|
DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata && \
|
|
DEBIAN_FRONTEND=noninteractive eatmydata \
|
|
# Install common build utilities
|
|
apt-get install -y --no-install-recommends \
|
|
curl \
|
|
xz-utils \
|
|
ca-certificates \
|
|
bison \
|
|
flex \
|
|
git \
|
|
ninja-build \
|
|
python3-venv && \
|
|
# Install QEMU build deps for use in CI
|
|
DEBIAN_FRONTEND=noninteractive eatmydata \
|
|
apt build-dep -yy --arch-only qemu
|
|
|
|
|
|
ENV TOOLCHAIN_INSTALL /opt
|
|
ENV TOOLCHAIN_RELEASE 16.0.0
|
|
ENV TOOLCHAIN_BASENAME "clang+llvm-${TOOLCHAIN_RELEASE}-cross-hexagon-unknown-linux-musl"
|
|
ENV TOOLCHAIN_URL https://codelinaro.jfrog.io/artifactory/codelinaro-toolchain-for-hexagon/v${TOOLCHAIN_RELEASE}/${TOOLCHAIN_BASENAME}.tar.xz
|
|
|
|
RUN curl -#SL "$TOOLCHAIN_URL" | tar -xJC "$TOOLCHAIN_INSTALL"
|
|
ENV PATH $PATH:${TOOLCHAIN_INSTALL}/${TOOLCHAIN_BASENAME}/x86_64-linux-gnu/bin
|
|
# As a final step configure the user (if env is defined)
|
|
ARG USER
|
|
ARG UID
|
|
RUN if [ "${USER}" ]; then \
|
|
id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi
|