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>
59 lines
1.8 KiB
Docker
59 lines
1.8 KiB
Docker
#
|
|
# Docker cross-compiler target for riscv64
|
|
#
|
|
# Currently the only distro that gets close to cross compiling riscv64
|
|
# images is Debian Sid (with unofficial ports). As this is a moving
|
|
# target we keep the library list minimal and are aiming to migrate
|
|
# from this hack as soon as we are able.
|
|
#
|
|
FROM docker.io/library/debian:sid-slim
|
|
|
|
# Add ports
|
|
RUN apt update && \
|
|
DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata && \
|
|
DEBIAN_FRONTEND=noninteractive eatmydata apt update -yy && \
|
|
DEBIAN_FRONTEND=noninteractive eatmydata apt upgrade -yy
|
|
|
|
# Install common build utilities
|
|
RUN DEBIAN_FRONTEND=noninteractive eatmydata apt install -yy \
|
|
bison \
|
|
bc \
|
|
build-essential \
|
|
ca-certificates \
|
|
debian-ports-archive-keyring \
|
|
dpkg-dev \
|
|
flex \
|
|
gettext \
|
|
git \
|
|
libglib2.0-dev \
|
|
ninja-build \
|
|
pkg-config \
|
|
python3 \
|
|
python3-venv
|
|
|
|
# Add ports and riscv64 architecture
|
|
RUN echo "deb http://ftp.ports.debian.org/debian-ports/ sid main" >> /etc/apt/sources.list
|
|
RUN dpkg --add-architecture riscv64
|
|
|
|
# Duplicate deb line as deb-src
|
|
RUN cat /etc/apt/sources.list | sed "s/^deb\ /deb-src /" >> /etc/apt/sources.list
|
|
|
|
RUN apt update && \
|
|
DEBIAN_FRONTEND=noninteractive eatmydata \
|
|
apt install -y --no-install-recommends \
|
|
gcc-riscv64-linux-gnu \
|
|
libc6-dev-riscv64-cross \
|
|
libfdt-dev:riscv64 \
|
|
libffi-dev:riscv64 \
|
|
libglib2.0-dev:riscv64 \
|
|
libpixman-1-dev:riscv64
|
|
|
|
# Specify the cross prefix for this image (see tests/docker/common.rc)
|
|
ENV QEMU_CONFIGURE_OPTS --cross-prefix=riscv64-linux-gnu-
|
|
ENV DEF_TARGET_LIST riscv64-softmmu,riscv64-linux-user
|
|
# 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
|