criu/scripts/build/Dockerfile.riscv64-stable-cross.tmpl
Shashank Balaji 25f8be0f60 ci: use package-manager dependency install scripts
Currently, adding a package which is required either for development or testing
requires it to be added in multiple places due to many duplicated Dockerfiles
and installation scripts. This makes it difficult to ensure that all scripts
are updated appropriately and can lead to some places being missed.

This patch consolidates the list of dependencies and adds installation
scripts for each package-manager used in our CI (apk, apt, dnf, pacman).

This change also replaces the `debian/dev-packages.lst` as this subfolder
conflicts with the Ubuntu/Debian packing scripts used for CRIU:
https://github.com/rst0git/criu-deb-packages

This patch also removes the CentOS 8 build scripts as it is EOL
and the container registry is no longer available.

Signed-off-by: Shashank Balaji <shashank.mahadasyam@sony.com>
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2025-11-02 07:48:23 -08:00

31 lines
1 KiB
Cheetah

# Add the cross compiler sources
RUN apt-get clean -y && apt-get update -y && apt-get install -y --no-install-recommends gnupg2
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 871920D1991BC93C 8D69674688B6CB36 B523E5F3FC4E5F2C
COPY scripts/ci/riscv64-cross/amd64-sources.list /etc/apt/sources.list
COPY scripts/ci/riscv64-cross/riscv64-sources.list /etc/apt/sources.list.d/
RUN dpkg --add-architecture ${DEBIAN_ARCH} && \
apt-get update -y
ENV CROSS_COMPILE=${CROSS_TRIPLET}- \
CROSS_ROOT=/usr/${CROSS_TRIPLET} \
AS=/usr/bin/${CROSS_TRIPLET}-as \
AR=/usr/bin/${CROSS_TRIPLET}-ar \
CC=/usr/bin/${CROSS_TRIPLET}-gcc \
CPP=/usr/bin/${CROSS_TRIPLET}-cpp \
CXX=/usr/bin/${CROSS_TRIPLET}-g++ \
LD=/usr/bin/${CROSS_TRIPLET}-ld \
FC=/usr/bin/${CROSS_TRIPLET}-gfortran
ENV PATH="${PATH}:${CROSS_ROOT}/bin" \
PKG_CONFIG_PATH=/usr/lib/${CROSS_TRIPLET}/pkgconfig
COPY . /criu
WORKDIR /criu
RUN contrib/dependencies/apt-cross-packages.sh
RUN make mrproper && date && make -j $(nproc) zdtm && date