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>
This commit is contained in:
Shashank Balaji 2025-09-17 19:14:36 +09:00 committed by Andrei Vagin
parent 67751bc11b
commit 25f8be0f60
35 changed files with 295 additions and 459 deletions

View file

@ -13,7 +13,7 @@ task:
nested_virtualization: true
setup_script: |
scripts/ci/apt-install make gcc pkg-config git perl-modules iproute2 kmod wget cpu-checker
contrib/apt-install make gcc pkg-config git perl-modules iproute2 kmod wget cpu-checker
sudo kvm-ok
build_script: |
make -C scripts/ci vagrant-fedora-no-vdso
@ -34,7 +34,7 @@ task:
setup_script: |
dnf config-manager --set-enabled crb # Same as CentOS 8 powertools
dnf -y install epel-release epel-next-release
dnf -y install --allowerasing asciidoc gcc git gnutls-devel libaio-devel libasan libcap-devel libnet-devel libnl3-devel libbsd-devel libselinux-devel make protobuf-c-devel protobuf-devel python-devel python-PyYAML python-protobuf python3-importlib-metadata xmlto libdrm-devel libuuid-devel
contrib/dependencies/dnf-packages.sh
# The image has a too old version of nettle which does not work with gnutls.
# Just upgrade to the latest to make the error go away.
dnf -y upgrade nettle nettle-devel
@ -63,7 +63,7 @@ task:
nested_virtualization: true
setup_script: |
scripts/ci/apt-install make gcc pkg-config git perl-modules iproute2 kmod wget cpu-checker
contrib/apt-install make gcc pkg-config git perl-modules iproute2 kmod wget cpu-checker
sudo kvm-ok
build_script: |
make -C scripts/ci vagrant-fedora-rawhide
@ -83,7 +83,7 @@ task:
nested_virtualization: true
setup_script: |
scripts/ci/apt-install make gcc pkg-config git perl-modules iproute2 kmod wget cpu-checker
contrib/apt-install make gcc pkg-config git perl-modules iproute2 kmod wget cpu-checker
sudo kvm-ok
build_script: |
make -C scripts/ci vagrant-fedora-non-root
@ -96,7 +96,7 @@ task:
memory: 4G
script: uname -a
build_script: |
scripts/ci/apt-install make
contrib/apt-install make
make -C scripts/ci local
task:
@ -107,7 +107,7 @@ task:
memory: 4G
script: uname -a
build_script: |
scripts/ci/apt-install make
contrib/apt-install make
make -C scripts/ci local CLANG=1
task:

View file

@ -19,7 +19,7 @@ jobs:
# Checkout pull request HEAD commit instead of merge commit
ref: ${{ github.event.pull_request.head.sha }}
- name: Install dependencies
run: sudo scripts/ci/apt-install libprotobuf-dev libprotobuf-c-dev protobuf-c-compiler protobuf-compiler python3-protobuf libnl-3-dev libnet-dev libcap-dev uuid-dev
run: sudo contrib/apt-install libprotobuf-dev libprotobuf-c-dev protobuf-c-compiler protobuf-compiler python3-protobuf libnl-3-dev libnet-dev libcap-dev uuid-dev
- name: Configure git user details
run: |
git config --global user.email "checkpoint-restore@users.noreply.github.com"

View file

@ -34,7 +34,7 @@ jobs:
- name: Install Packages (cpp)
if: ${{ matrix.language == 'cpp' }}
run: |
sudo scripts/ci/apt-install protobuf-c-compiler libprotobuf-c-dev libprotobuf-dev build-essential libprotobuf-dev libprotobuf-c-dev protobuf-c-compiler protobuf-compiler python3-protobuf libnet-dev pkg-config libnl-3-dev libbsd0 libbsd-dev iproute2 libcap-dev libaio-dev libbsd-dev python3-yaml libnl-route-3-dev gnutls-dev
sudo contrib/apt-install protobuf-c-compiler libprotobuf-c-dev libprotobuf-dev build-essential libprotobuf-dev libprotobuf-c-dev protobuf-c-compiler protobuf-compiler python3-protobuf libnet-dev pkg-config libnl-3-dev libbsd0 libbsd-dev iproute2 libcap-dev libaio-dev libbsd-dev python3-yaml libnl-route-3-dev gnutls-dev
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:

View file

@ -15,7 +15,7 @@ jobs:
- name: Remove iptables
run: sudo apt remove -y iptables
- name: Install libnftables-dev
run: sudo scripts/ci/apt-install libnftables-dev
run: sudo contrib/apt-install libnftables-dev
- name: chmod 755 /home/runner
# CRIU's tests are sometimes running as some random user and need
# to be able to access the test files.

View file

@ -32,11 +32,35 @@ To clone CRIU repo and switch to the proper branch, run:
git checkout criu-dev
```
### Compile
### Building from source
First, you need to install compile-time dependencies. Check [Installation dependencies](https://criu.org/Installation#Dependencies) for more info. Alternatively, you can use the Nix flake to set up a development environment by running `nix develop`.
Follow these steps to compile CRIU from source code.
To compile CRIU, run:
#### Installing build dependencies
First, you need to install the required build dependencies. We provide scripts to simplify this process for several Linux distributions in [contrib/dependencies](contrib/dependencies). For a complete list of dependencies, please refer to the [installation guide](https://criu.org/Installation).
##### On Ubuntu/Debian-based systems:
```
./contrib/dependencies/apt-packages.sh
```
##### On Fedora/CentOS-based systems:
```
./contrib/dependencies/dnf-packages.sh
```
##### Using Nix:
```
nix develop
```
#### Compiling CRIU
Once the dependencies are installed, you can compile CRIU by running the `make` command from the root of the source directory:
```
make

View file

@ -464,7 +464,8 @@ ruff:
shellcheck:
shellcheck --version
shellcheck scripts/*.sh
shellcheck scripts/ci/*.sh scripts/ci/apt-install
shellcheck scripts/ci/*.sh
shellcheck contrib/apt-install contrib/dependencies/*.sh
shellcheck -x test/others/crit/*.sh
shellcheck -x test/others/libcriu/*.sh
shellcheck -x test/others/crit/*.sh test/others/criu-coredump/*.sh

View file

@ -1,19 +0,0 @@
# Required packages for development in Debian
build-essential
libprotobuf-dev
libprotobuf-c-dev
protobuf-c-compiler
protobuf-compiler
python3-protobuf
libnet-dev
# Extra packages, required for testing and building other tools
pkg-config
libnl-3-dev
libbsd0
libbsd-dev
iproute2
libcap-dev
libaio-dev
python3-yaml
libnl-route-3-dev

View file

@ -0,0 +1,38 @@
#!/usr/bin/env sh
apk add --no-cache \
asciidoctor \
bash \
build-base \
coreutils \
e2fsprogs \
git \
gnutls-dev \
go \
ip6tables \
iproute2 \
iptables \
iptables-legacy \
libaio-dev \
libbsd-dev \
libcap-dev \
libcap-utils \
libdrm-dev \
libnet-dev \
libnl3-dev \
nftables \
nftables-dev \
pkgconfig \
procps \
protobuf-c-compiler \
protobuf-c-dev \
protobuf-dev \
py3-importlib-metadata \
py3-pip \
py3-protobuf \
py3-yaml \
python3 \
sudo \
tar \
util-linux \
util-linux-dev

View file

@ -0,0 +1,34 @@
#!/usr/bin/env sh
APT_INSTALL="$(cd "$(dirname "$0")/.." >/dev/null 2>&1 && pwd)/apt-install"
if [ ! -x "$APT_INSTALL" ]; then
echo "Error: apt-install not found or not executable"
exit 1
fi
"$APT_INSTALL" \
crossbuild-essential-"${DEBIAN_ARCH}" \
iproute2:"${DEBIAN_ARCH}" \
libaio-dev:"${DEBIAN_ARCH}" \
libbz2-dev:"${DEBIAN_ARCH}" \
libc6-"${DEBIAN_ARCH}"-cross \
libc6-dev-"${DEBIAN_ARCH}"-cross \
libcap-dev:"${DEBIAN_ARCH}" \
libexpat1-dev:"${DEBIAN_ARCH}" \
libgnutls28-dev:"${DEBIAN_ARCH}" \
libnet-dev:"${DEBIAN_ARCH}" \
libnftables-dev:"${DEBIAN_ARCH}" \
libnl-3-dev:"${DEBIAN_ARCH}" \
libnl-route-3-dev:"${DEBIAN_ARCH}" \
libprotobuf-c-dev:"${DEBIAN_ARCH}" \
libprotobuf-dev:"${DEBIAN_ARCH}" \
libssl-dev:"${DEBIAN_ARCH}" \
ncurses-dev:"${DEBIAN_ARCH}" \
uuid-dev:"${DEBIAN_ARCH}" \
libdrm-dev:"${DEBIAN_ARCH}" \
build-essential \
pkg-config \
git \
protobuf-c-compiler \
protobuf-compiler \
python3-protobuf

View file

@ -0,0 +1,40 @@
#!/usr/bin/env sh
APT_INSTALL="$(cd "$(dirname "$0")/.." >/dev/null 2>&1 && pwd)/apt-install"
if [ ! -x "$APT_INSTALL" ]; then
echo "Error: apt-install not found or not executable"
exit 1
fi
"$APT_INSTALL" \
asciidoctor \
bash \
bsdmainutils \
build-essential \
gdb \
git-core \
iptables \
kmod \
libaio-dev \
libbsd-dev \
libcap-dev \
libdrm-dev \
libgnutls28-dev \
libgnutls30 \
libnet-dev \
libnl-3-dev \
libnl-route-3-dev \
libperl-dev \
libprotobuf-c-dev \
libprotobuf-dev \
libselinux-dev \
pkg-config \
protobuf-c-compiler \
protobuf-compiler \
python3-importlib-metadata \
python3-pip \
python3-protobuf \
python3-yaml \
time \
util-linux \
uuid-dev

View file

@ -0,0 +1,35 @@
#!/usr/bin/env sh
dnf install -y \
asciidoc \
binutils \
gcc \
git \
glibc-devel \
gnutls-devel \
iproute \
iptables \
libaio-devel \
libasan \
libbpf-devel \
libbsd-devel \
libcap-devel \
libdrm-devel \
libnet-devel \
libnl3-devel \
libselinux-devel \
libuuid-devel \
make \
nftables \
pkg-config \
protobuf \
protobuf-c \
protobuf-c-devel \
protobuf-compiler \
protobuf-devel \
python-devel \
python3-importlib-metadata \
python3-protobuf \
python3-pyyaml \
rubygem-asciidoctor \
xmlto

View file

@ -0,0 +1,31 @@
#!/usr/bin/env sh
pacman -Syu --noconfirm \
asciidoctor \
base-devel \
bash \
coreutils \
diffutils \
git \
gnutls \
go \
iproute2 \
iptables \
libaio \
libbsd \
libcap \
libdrm \
libnet \
libnl \
nftables \
pkg-config \
protobuf \
protobuf-c \
python-importlib-metadata \
python-pip \
python-protobuf \
python-yaml \
sudo \
tar \
util-linux \
util-linux-libs

View file

@ -1,49 +1,12 @@
FROM alpine
ARG CC=gcc
RUN apk update && apk add \
$CC \
bash \
build-base \
coreutils \
procps \
git \
gnutls-dev \
libaio-dev \
libcap-dev \
libnet-dev \
libnl3-dev \
nftables \
nftables-dev \
pkgconfig \
protobuf-c-dev \
protobuf-dev \
py3-pip \
py3-protobuf \
python3 \
sudo \
libcap-utils \
libdrm-dev \
util-linux \
util-linux-dev
COPY . /criu
WORKDIR /criu
RUN make mrproper && date && make -j $(nproc) CC="$CC" && date
RUN apk add \
ip6tables \
iptables \
iptables-legacy \
nftables \
iproute2 \
tar \
bash \
go \
e2fsprogs \
py-yaml \
py3-importlib-metadata \
asciidoctor
RUN apk add --no-cache "$CC" && /criu/contrib/dependencies/apk-packages.sh
RUN make mrproper && date && make -j $(nproc) CC="$CC" && date
# The rpc test cases are running as user #1000, let's add the user
RUN adduser -u 1000 -D test

View file

@ -5,40 +5,11 @@ ARG CC=gcc
# Initialize machine ID
RUN systemd-machine-id-setup
RUN pacman -Syu --noconfirm \
$CC \
bash \
make \
coreutils \
git \
gnutls \
libaio \
libcap \
libnet \
libnl \
nftables \
pkgconfig \
protobuf-c \
protobuf \
python-pip \
python-protobuf \
which \
sudo \
iptables \
nftables \
iproute2 \
tar \
bash \
go \
python-yaml \
asciidoctor \
python-importlib-metadata \
libdrm \
util-linux-libs \
diffutils
COPY . /criu
WORKDIR /criu
RUN pacman -Syu --noconfirm "$CC" && contrib/dependencies/pacman-packages.sh
RUN make mrproper && date && make -j $(nproc) CC="$CC" && date
# The rpc test cases are running as user #1000, let's add the user

View file

@ -1,48 +0,0 @@
FROM registry.centos.org/centos/centos:8
ARG CC=gcc
RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm dnf-plugins-core
RUN yum config-manager --set-enabled powertools
RUN yum install -y --allowerasing \
asciidoc \
coreutils \
chkconfig \
diffutils \
findutils \
gcc \
git \
gnutls-devel \
iproute \
iptables \
libaio-devel \
libasan \
libcap-devel \
libnet-devel \
libnl3-devel \
libselinux-devel \
make \
procps-ng \
protobuf-c-devel \
protobuf-devel \
python3-devel \
python3-PyYAML \
python3-protobuf \
python3-pip \
sudo \
tar \
which \
xmlto
RUN alternatives --set python /usr/bin/python3
ENV PYTHON=python3
COPY . /criu
WORKDIR /criu
RUN make mrproper && date && make -j $(nproc) CC="$CC" && date
# The rpc test cases are running as user #1000, let's add the user
RUN adduser -u 1000 test
RUN make -C test/zdtm -j $(nproc)

View file

@ -1,11 +1,10 @@
ARG CC=gcc
COPY scripts/ci/prepare-for-fedora-rawhide.sh /bin/prepare-for-fedora-rawhide.sh
RUN /bin/prepare-for-fedora-rawhide.sh
COPY . /criu
WORKDIR /criu
RUN dnf install -y "$CC" && scripts/ci/prepare-for-fedora-rawhide.sh
RUN make mrproper && date && make -j $(nproc) CC="$CC" && date
# The rpc test cases are running as user #1000, let's add the user

View file

@ -1,30 +1,11 @@
FROM docker.io/library/eclipse-temurin:11-alpine
ARG CC=gcc
RUN apk update && apk add \
bash \
build-base \
coreutils \
git \
gnutls-dev \
libaio-dev \
libcap-dev \
libnet-dev \
libnl3-dev \
pkgconfig \
protobuf-c-dev \
protobuf-dev \
python3 \
sudo \
maven \
ip6tables \
iptables \
util-linux-dev \
bash
COPY . /criu
WORKDIR /criu
RUN apk add --no-cache maven "$CC" && contrib/dependencies/apk-packages.sh
RUN make mrproper && make -j $(nproc) CC="$CC"
ENTRYPOINT mvn -q -f test/javaTests/pom.xml test
ENTRYPOINT ["mvn", "-q", "-f", "test/javaTests/pom.xml", "test"]

View file

@ -1,33 +1,11 @@
FROM docker.io/library/eclipse-temurin:11-focal
ARG CC=gcc
COPY scripts/ci/apt-install /bin/apt-install
RUN apt-install protobuf-c-compiler \
libprotobuf-c-dev \
libaio-dev \
libprotobuf-dev \
protobuf-compiler \
libcap-dev \
libnl-3-dev \
gdb \
bash \
python3-protobuf \
python3-yaml \
libnet-dev \
libnl-route-3-dev \
libbsd-dev \
make \
git \
pkg-config \
iptables \
gcc \
uuid-dev \
maven
COPY . /criu
WORKDIR /criu
RUN contrib/apt-install maven "$CC" && contrib/dependencies/apt-packages.sh
RUN make mrproper && make -j $(nproc) CC="$CC"
ENTRYPOINT mvn -q -f test/javaTests/pom.xml test
ENTRYPOINT ["mvn", "-q", "-f", "test/javaTests/pom.xml", "test"]

View file

@ -1,32 +1,10 @@
ARG CC=gcc
COPY scripts/ci/apt-install /bin/apt-install
RUN apt-install \
libnet-dev \
libnl-route-3-dev \
$CC \
bsdmainutils \
build-essential \
git-core \
iptables \
libaio-dev \
libcap-dev \
libgnutls28-dev \
libgnutls30 \
libnl-3-dev \
libprotobuf-c-dev \
libprotobuf-dev \
libselinux-dev \
pkg-config \
protobuf-c-compiler \
protobuf-compiler \
uuid-dev \
python3-minimal
COPY . /criu
WORKDIR /criu
RUN contrib/apt-install "$CC" && contrib/dependencies/apt-packages.sh
RUN uname -m && setarch linux32 uname -m && setarch --list
RUN make mrproper && date && \

View file

@ -1,34 +1,12 @@
FROM docker.io/library/ibm-semeru-runtimes:open-11-jdk-focal
ARG CC=gcc
COPY scripts/ci/apt-install /bin/apt-install
RUN apt-install protobuf-c-compiler \
libprotobuf-c-dev \
libaio-dev \
libprotobuf-dev \
protobuf-compiler \
libcap-dev \
libnl-3-dev \
gdb \
bash \
python3-protobuf \
python3-yaml \
libnet-dev \
libnl-route-3-dev \
libbsd-dev \
make \
git \
pkg-config \
iptables \
gcc \
uuid-dev \
maven
RUN mkdir -p /etc/criu && echo 'ghost-limit 16777216' > /etc/criu/default.conf
COPY . /criu
WORKDIR /criu
RUN contrib/apt-install maven "$CC" && contrib/dependencies/apt-packages.sh
RUN make mrproper && make -j $(nproc) CC="$CC"
ENTRYPOINT mvn -f test/javaTests/pom.xml test
ENTRYPOINT ["mvn", "-f", "test/javaTests/pom.xml", "test"]

View file

@ -1,5 +1,3 @@
COPY scripts/ci/apt-install /bin/apt-install
# Add the cross compiler sources
RUN apt-get clean -y && apt-get update -y && apt-get install -y --no-install-recommends gnupg2
@ -12,33 +10,6 @@ COPY scripts/ci/riscv64-cross/riscv64-sources.list /etc/apt/sources.list.d/
RUN dpkg --add-architecture ${DEBIAN_ARCH} && \
apt-get update -y
# Install required packages
RUN apt-get install -y --no-install-recommends \
build-essential \
pkg-config \
git \
crossbuild-essential-${DEBIAN_ARCH} \
libc6-dev-${DEBIAN_ARCH}-cross \
libc6-${DEBIAN_ARCH}-cross \
libbz2-dev:${DEBIAN_ARCH} \
libexpat1-dev:${DEBIAN_ARCH} \
ncurses-dev:${DEBIAN_ARCH} \
libssl-dev:${DEBIAN_ARCH} \
protobuf-c-compiler \
protobuf-compiler \
python3-protobuf \
libnl-3-dev:${DEBIAN_ARCH} \
libprotobuf-dev:${DEBIAN_ARCH} \
libnet-dev:${DEBIAN_ARCH} \
libprotobuf-c-dev:${DEBIAN_ARCH} \
libcap-dev:${DEBIAN_ARCH} \
libaio-dev:${DEBIAN_ARCH} \
uuid-dev:${DEBIAN_ARCH} \
libnl-route-3-dev:${DEBIAN_ARCH} \
libnftables-dev:${DEBIAN_ARCH} \
libgnutls28-dev:${DEBIAN_ARCH} \
iproute2:${DEBIAN_ARCH}
ENV CROSS_COMPILE=${CROSS_TRIPLET}- \
CROSS_ROOT=/usr/${CROSS_TRIPLET} \
AS=/usr/bin/${CROSS_TRIPLET}-as \
@ -55,4 +26,6 @@ ENV PATH="${PATH}:${CROSS_ROOT}/bin" \
COPY . /criu
WORKDIR /criu
RUN contrib/dependencies/apt-cross-packages.sh
RUN make mrproper && date && make -j $(nproc) zdtm && date

View file

@ -1,30 +1,7 @@
COPY scripts/ci/apt-install /bin/apt-install
# Add the cross compiler sources
RUN echo "deb http://deb.debian.org/debian/ stable main" >> /etc/apt/sources.list && \
dpkg --add-architecture ${DEBIAN_ARCH}
RUN apt-install \
crossbuild-essential-${DEBIAN_ARCH} \
libc6-dev-${DEBIAN_ARCH}-cross \
libc6-${DEBIAN_ARCH}-cross \
libbz2-dev:${DEBIAN_ARCH} \
libexpat1-dev:${DEBIAN_ARCH} \
ncurses-dev:${DEBIAN_ARCH} \
libssl-dev:${DEBIAN_ARCH} \
protobuf-c-compiler \
protobuf-compiler \
python3-protobuf \
libnl-3-dev:${DEBIAN_ARCH} \
libprotobuf-dev:${DEBIAN_ARCH} \
libnet-dev:${DEBIAN_ARCH} \
uuid-dev:${DEBIAN_ARCH} \
libprotobuf-c-dev:${DEBIAN_ARCH} \
libcap-dev:${DEBIAN_ARCH} \
libaio-dev:${DEBIAN_ARCH} \
libnl-route-3-dev:${DEBIAN_ARCH} \
libdrm-dev:${DEBIAN_ARCH}
ENV CROSS_COMPILE=${CROSS_TRIPLET}- \
CROSS_ROOT=/usr/${CROSS_TRIPLET} \
AS=/usr/bin/${CROSS_TRIPLET}-as \
@ -41,6 +18,8 @@ ENV PATH="${PATH}:${CROSS_ROOT}/bin" \
COPY . /criu
WORKDIR /criu
RUN contrib/dependencies/apt-cross-packages.sh
# amdgpu_plugin with armv7 is not supported
RUN make mrproper && date && \
make -j $(nproc) && \

View file

@ -1,40 +1,12 @@
ARG CC=gcc
COPY scripts/ci/apt-install /bin/apt-install
# On Ubuntu, kernel modules such as ip_tables and xt_mark may not be loaded by default
# We need to install kmod to enable iptables to load these modules for us.
RUN apt-install \
libnet-dev \
libnl-route-3-dev \
$CC \
bsdmainutils \
build-essential \
git-core \
iptables \
libaio-dev \
libbsd-dev \
libcap-dev \
libgnutls28-dev \
libgnutls30 \
libnftables-dev \
libnl-3-dev \
libprotobuf-c-dev \
libprotobuf-dev \
libselinux-dev \
iproute2 \
kmod \
pkg-config \
protobuf-c-compiler \
protobuf-compiler \
python3-minimal \
python3-protobuf \
uuid-dev \
python3-yaml
COPY . /criu
WORKDIR /criu
# On Ubuntu, kernel modules such as ip_tables and xt_mark may not be loaded by default
# We need to install kmod to enable iptables to load these modules for us.
RUN contrib/apt-install "$CC" && contrib/dependencies/apt-packages.sh
RUN git clean -dfx && date && \
# Check single object build
make -j $(nproc) CC="$CC" criu/parasite-syscall.o && \

View file

@ -1,29 +1,7 @@
COPY scripts/ci/apt-install /bin/apt-install
# Add the cross compiler sources
RUN echo "deb http://deb.debian.org/debian/ unstable main" >> /etc/apt/sources.list && \
dpkg --add-architecture ${DEBIAN_ARCH}
RUN apt-install \
crossbuild-essential-${DEBIAN_ARCH} \
libc6-dev-${DEBIAN_ARCH}-cross \
libc6-${DEBIAN_ARCH}-cross \
libbz2-dev:${DEBIAN_ARCH} \
libexpat1-dev:${DEBIAN_ARCH} \
ncurses-dev:${DEBIAN_ARCH} \
libssl-dev:${DEBIAN_ARCH} \
protobuf-c-compiler \
protobuf-compiler \
python3-protobuf \
libnl-3-dev:${DEBIAN_ARCH} \
libprotobuf-dev:${DEBIAN_ARCH} \
uuid-dev:${DEBIAN_ARCH} \
libnet-dev:${DEBIAN_ARCH} \
libprotobuf-c-dev:${DEBIAN_ARCH} \
libcap-dev:${DEBIAN_ARCH} \
libaio-dev:${DEBIAN_ARCH} \
libnl-route-3-dev:${DEBIAN_ARCH}
ENV CROSS_COMPILE=${CROSS_TRIPLET}- \
CROSS_ROOT=/usr/${CROSS_TRIPLET} \
AS=/usr/bin/${CROSS_TRIPLET}-as \
@ -40,4 +18,6 @@ ENV PATH="${PATH}:${CROSS_ROOT}/bin" \
COPY . /criu
WORKDIR /criu
RUN contrib/dependencies/apt-cross-packages.sh
RUN make mrproper && date && make -j $(nproc) zdtm && date

View file

@ -1,5 +1,5 @@
FROM ubuntu:24.04
COPY scripts/ci/apt-install /bin/apt-install
COPY contrib/apt-install /bin/apt-install
RUN apt-install gcc-multilib

View file

@ -1,4 +1,4 @@
ARCHES := x86_64 fedora-asan fedora-rawhide armv7hf centos8
ARCHES := x86_64 fedora-asan fedora-rawhide armv7hf
STABLE_CROSS_ARCHES := armv7-stable-cross aarch64-stable-cross ppc64-stable-cross mips64el-stable-cross riscv64-stable-cross
UNSTABLE_CROSS_ARCHES := armv7-unstable-cross aarch64-unstable-cross ppc64-unstable-cross mips64el-unstable-cross
NON_CLANG := $(UNSTABLE_CROSS_ARCHES) $(STABLE_CROSS_ARCHES)

View file

@ -11,7 +11,7 @@ ifdef CLANG
target-suffix = -clang
endif
TARGETS := alpine fedora-rawhide centos8 archlinux
TARGETS := alpine fedora-rawhide archlinux
ZDTM_OPTS :=
UNAME := $(shell uname -m)
export UNAME

View file

@ -7,7 +7,7 @@ set -x -e -o pipefail
# https://github.com/moby/moby/issues/50750 for details on the bug.
export DEBIAN_FRONTEND=noninteractive
apt remove -y docker-ce docker-ce-cli
./apt-install -y ca-certificates curl
../../contrib/apt-install -y ca-certificates curl
install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
chmod a+r /etc/apt/keyrings/docker.asc
@ -18,7 +18,7 @@ echo \
apt update -y
apt-cache madison docker-ce | awk '{ print $3 }'
verstr="$(apt-cache madison docker-ce | awk '{ print $3 }' | sort | grep -v ':28\.'| tail -n 1)"
./apt-install -y "docker-ce=$verstr" "docker-ce-cli=$verstr"
../../contrib/apt-install -y "docker-ce=$verstr" "docker-ce-cli=$verstr"
# docker checkpoint and restore is an experimental feature
echo '{ "experimental": true }' > /etc/docker/daemon.json

View file

@ -2,6 +2,8 @@
cd ../.. || exit 1
sudo modprobe iptable_filter
failures=""
docker build -t criu-openj9-ubuntu-test:latest -f scripts/build/Dockerfile.openj9-ubuntu .

View file

@ -4,7 +4,7 @@ set -o nounset
set -o errexit
set -x
./apt-install \
../../contrib/apt-install \
apt-transport-https \
ca-certificates \
curl \
@ -19,7 +19,7 @@ add-apt-repository \
$(lsb_release -cs) \
stable test"
./apt-install docker-ce
../../contrib/apt-install docker-ce
# shellcheck source=/dev/null
. /etc/lsb-release

View file

@ -1,43 +1,22 @@
#!/bin/bash
set -e -x
contrib/dependencies/dnf-packages.sh
dnf install -y \
diffutils \
e2fsprogs \
findutils \
gawk \
gcc \
git \
gnutls-devel \
gzip \
iproute \
iptables \
nftables \
nftables-devel \
libaio-devel \
libasan \
libcap-devel \
libnet-devel \
libnl3-devel \
libbsd-devel \
kmod \
libselinux-utils \
make \
procps-ng \
protobuf-c-devel \
protobuf-devel \
python3-PyYAML \
python3-protobuf \
python3-pip \
python3-importlib-metadata \
python-unversioned-command \
redhat-rpm-config \
sudo \
tar \
which \
e2fsprogs \
rubygem-asciidoctor \
libdrm-devel \
libuuid-devel \
kmod
which
# /tmp is no longer 755 in the rawhide container image and breaks CI - fix it
chmod 1777 /tmp

View file

@ -1,12 +1,7 @@
#!/bin/bash
set -x -e
CI_PKGS=(protobuf-c-compiler libprotobuf-c-dev libaio-dev libgnutls28-dev
libgnutls30 libprotobuf-dev protobuf-compiler libcap-dev
libnl-3-dev gdb bash libnet-dev util-linux asciidoctor
libnl-route-3-dev time libbsd-dev python3-yaml uuid-dev
libperl-dev pkg-config python3-protobuf python3-pip
python3-importlib-metadata libdrm-dev)
CI_PKGS=()
X86_64_PKGS=(gcc-multilib)
@ -60,7 +55,8 @@ ci_prep () {
CI_PKGS+=("${X86_64_PKGS[@]}")
fi
scripts/ci/apt-install "${CI_PKGS[@]}"
contrib/dependencies/apt-packages.sh
contrib/apt-install "${CI_PKGS[@]}"
chmod a+x "$HOME"
}
@ -187,7 +183,7 @@ if [ "${COMPAT_TEST}x" = "yx" ] ; then
done
apt-get remove "${INCOMPATIBLE_LIBS[@]}"
dpkg --add-architecture i386
scripts/ci/apt-install "${IA32_PKGS[@]}"
contrib/apt-install "${IA32_PKGS[@]}"
mkdir -p /usr/lib/x86_64-linux-gnu/
mv "$REFUGE"/* /usr/lib/x86_64-linux-gnu/
fi

View file

@ -22,9 +22,8 @@ setup() {
wget --no-check-certificate https://releases.hashicorp.com/vagrant/${VAGRANT_VERSION}/vagrant_${VAGRANT_VERSION}-1_"$(dpkg --print-architecture)".deb -O /tmp/vagrant.deb && \
dpkg -i /tmp/vagrant.deb
./apt-install libvirt-clients libvirt-daemon-system libvirt-dev qemu-utils qemu-system \
ruby build-essential libxml2-dev qemu-kvm rsync ebtables dnsmasq-base \
openssh-client
../../contrib/apt-install libvirt-clients libvirt-daemon-system libvirt-dev qemu-utils qemu-system \
ruby build-essential libxml2-dev qemu-kvm rsync ebtables dnsmasq-base openssh-client
systemctl restart libvirtd
vagrant plugin install vagrant-libvirt
vagrant init cloud-image/fedora-${FEDORA_VERSION} --box-version ${FEDORA_BOX_VERSION}
@ -41,16 +40,13 @@ setup() {
vagrant up --provider=libvirt --no-tty
mkdir -p /root/.ssh
vagrant ssh-config >> /root/.ssh/config
ssh default sudo dnf upgrade -y
ssh default sudo dnf install -y gcc git gnutls-devel nftables-devel libaio-devel \
libasan libcap-devel libnet-devel libnl3-devel libbsd-devel make protobuf-c-devel \
protobuf-devel python3-protobuf python3-importlib-metadata \
rubygem-asciidoctor iptables libselinux-devel libbpf-devel python3-yaml libuuid-devel
# Disable sssd to avoid zdtm test failures in pty04 due to sssd socket
ssh default sudo systemctl mask sssd
ssh default 'sudo mkdir -p --mode=777 /vagrant && mv $HOME/criu.tar /vagrant && cd /vagrant && tar xf criu.tar'
ssh default sudo dnf upgrade -y
ssh default sudo /vagrant/criu/contrib/dependencies/dnf-packages.sh
ssh default cat /proc/cmdline
}

View file

@ -1,25 +0,0 @@
#!/bin/bash
# Install required packages for development environment in Debian Distro
REQ_PKGS=${REQ_PKGS:=contrib/debian/dev-packages.lst}
help_msg="Install required packages for development environment in Debian Distro
Usage:
scripts/install-debian-pkgs.sh"
function print_help()
{
exec echo -e "$help_msg"
}
function process()
{
sudo apt-get update
sudo apt-get install -yq "$( sed 's/\#.*$//' "${REQ_PKGS}" )"
}
if [ "$1" = "--help" ] || [ "$1" = "-h" ]; then
print_help
else
process
fi