Skip to contentSkip to conversation

automation: minor fixes and improvements

PATCH In review Roger Pau Monne 2 participants 11 messages Nov 21, 2023 – Nov 22, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

v2 cover automation: minor fixes and improvements

Hello,

Some assorted minor fixes and improvements, as a result of work I'm doing to expand the tests.

I've done a full run with the updated containers, and found no issues:

https://gitlab.com/xen-project/people/royger/xen/-/pipelines/1080250168

Thanks, Roger.

Roger Pau Monne (7):
automation: remove CR characters from serial output
automation: remove com1= parameter on QEMU smoke tests
automation: add Xen timestamps to all tests
automation: fix jessie/stretch images to use archive.debian.org apt
repos
automation: update tests to use Debian Bookworm
automation: set architecture in docker files
automation: switch to multi-platform images when possible

 automation/build/alpine/3.18-arm64v8.dockerfile          | 2 +-
 automation/build/alpine/3.18.dockerfile                  | 2 +-
 automation/build/archlinux/current-riscv64.dockerfile    | 2 +-
 automation/build/archlinux/current.dockerfile            | 2 +-
 automation/build/centos/7.dockerfile                     | 2 +-
 .../build/debian/bookworm-arm64v8-arm32-gcc.dockerfile   | 2 +-
 automation/build/debian/bookworm-arm64v8.dockerfile      | 2 +-
 automation/build/debian/bookworm-cppcheck.dockerfile     | 4 ++--
 automation/build/debian/bookworm-i386.dockerfile         | 2 +-
 automation/build/debian/bookworm.dockerfile              | 7 ++++++-
 automation/build/debian/bullseye-ppc64le.dockerfile      | 2 +-
 automation/build/debian/buster-gcc-ibt.dockerfile        | 4 ++--
 automation/build/debian/jessie-i386.dockerfile           | 7 +++++++
 automation/build/debian/jessie.dockerfile                | 9 ++++++++-
 automation/build/debian/stretch-i386.dockerfile          | 9 ++++++++-
 automation/build/debian/stretch.dockerfile               | 9 ++++++++-
 automation/build/fedora/29.dockerfile                    | 2 +-
 automation/build/suse/opensuse-leap.dockerfile           | 2 +-
 automation/build/suse/opensuse-tumbleweed.dockerfile     | 2 +-
 automation/build/ubuntu/bionic.dockerfile                | 2 +-
 automation/build/ubuntu/focal.dockerfile                 | 2 +-
 automation/build/ubuntu/trusty.dockerfile                | 2 +-
 automation/build/ubuntu/xenial-xilinx.dockerfile         | 2 +-
 automation/build/ubuntu/xenial.dockerfile                | 2 +-
 automation/gitlab-ci/test.yaml                           | 4 ++--
 automation/scripts/qemu-alpine-x86_64.sh                 | 7 +++++--
 automation/scripts/qemu-smoke-dom0-arm32.sh              | 5 +++--
 automation/scripts/qemu-smoke-dom0-arm64.sh              | 5 +++--
 automation/scripts/qemu-smoke-dom0less-arm32.sh          | 5 +++--
 automation/scripts/qemu-smoke-dom0less-arm64.sh          | 5 +++--
 automation/scripts/qemu-smoke-riscv64.sh                 | 2 +-
 automation/scripts/qemu-smoke-x86-64.sh                  | 3 +--
 automation/scripts/qemu-xtf-dom0less-arm64.sh            | 5 +++--
 automation/scripts/qubes-x86-64.sh                       | 4 ++--
 automation/scripts/xilinx-smoke-dom0less-arm64.sh        | 4 ++--
 .../tests-artifacts/alpine/3.18-arm64v8.dockerfile       | 2 +-
 automation/tests-artifacts/alpine/3.18.dockerfile        | 2 +-
 .../tests-artifacts/kernel/5.19-arm64v8.dockerfile       | 2 +-
 automation/tests-artifacts/kernel/6.1.19.dockerfile      | 2 +-
 .../qemu-system-aarch64/6.0.0-arm64v8.dockerfile         | 2 +-
 .../qemu-system-ppc64/8.1.0-ppc64.dockerfile             | 2 +-
 41 files changed, 92 insertions(+), 52 deletions(-)
Signature · 1 line
2.42.0
#1 lore raw

PATCH v2 1/7 automation: remove CR characters from serial output

The gitlab CI webpage seems to have issues displaying the \CR\CR\LF "\r\r\n" sequence on the web interface used as line returns by the Linux kernel serial output. This leads to the QEMU tests output looking like:

(XEN) Guest Loglevel: Nothing (Rate-limited: Errors and warnings) (XEN) *** Serial input to DOM0 (type 'CTRL-a' three times to switch input) (XEN) Freed 664kB init memory
mapping kernel into physical memory
about to get started...
qemu-system-x86_64: terminating on signal 15 from pid 52 (timeout)

This not helpful, so strip the CR characters from the output that goes to stdout, leaving the output in the serial output file untouched.

All usages of tee are adjusted to strip CR from the output.

Fixes 3030a73bf849 ('automation: add a QEMU based x86_64 Dom0/DomU test')

---
Changes since v1:
- Attempt to fix all usages of tee.

---
 automation/scripts/qemu-alpine-x86_64.sh          | 5 ++++-
 automation/scripts/qemu-smoke-dom0-arm32.sh       | 3 ++-
 automation/scripts/qemu-smoke-dom0-arm64.sh       | 3 ++-
 automation/scripts/qemu-smoke-dom0less-arm32.sh   | 3 ++-
 automation/scripts/qemu-smoke-dom0less-arm64.sh   | 3 ++-
 automation/scripts/qemu-smoke-riscv64.sh          | 2 +-
 automation/scripts/qemu-xtf-dom0less-arm64.sh     | 3 ++-
 automation/scripts/qubes-x86-64.sh                | 2 +-
 automation/scripts/xilinx-smoke-dom0less-arm64.sh | 2 +-
 9 files changed, 17 insertions(+), 9 deletions(-)
automation/scripts/qemu-alpine-x86_64.sh +4 -1
index 8c8d0b0cd759..a1c41c030a47 100755
@@ -84,7 +84,10 @@ qemu-system-x86_64 \
     -monitor none -serial stdio \
     -nographic \
     -device virtio-net-pci,netdev=n0 \
-    -netdev user,id=n0,tftp=binaries,bootfile=/pxelinux.0 |& tee smoke.serial
+    -netdev user,id=n0,tftp=binaries,bootfile=/pxelinux.0 |& \
+        # Remove carriage returns from the stdout output, as gitlab
+        # interface chokes on them
+        tee smoke.serial | sed 's/\r//'
 
 set -e
 (grep -q "Domain-0" smoke.serial && grep -q "BusyBox" smoke.serial) || exit 1
automation/scripts/qemu-smoke-dom0-arm32.sh +2 -1
index e6f303064a83..281cae38b4bd 100755
@@ -91,7 +91,8 @@ timeout -k 1 720 \
    -no-reboot \
    -device virtio-net-pci,netdev=n0 \
    -netdev user,id=n0,tftp=./ \
-   -bios /usr/lib/u-boot/qemu_arm/u-boot.bin |& tee ${serial_log}
+   -bios /usr/lib/u-boot/qemu_arm/u-boot.bin |& \
+      tee ${serial_log} | sed 's/\r//'
 
 set -e
 (grep -q "Domain-0" ${serial_log} && grep -q "^/ #" ${serial_log}) || exit 1
automation/scripts/qemu-smoke-dom0-arm64.sh +2 -1
index 0bf5cfdc61f9..bb3d3a6a816e 100755
@@ -104,7 +104,8 @@ timeout -k 1 720 \
     -no-reboot \
     -device virtio-net-pci,netdev=n0 \
     -netdev user,id=n0,tftp=binaries \
-    -bios /usr/lib/u-boot/qemu_arm64/u-boot.bin |& tee smoke.serial
+    -bios /usr/lib/u-boot/qemu_arm64/u-boot.bin |& \
+        tee smoke.serial | sed 's/\r//'
 
 set -e
 (grep -q "Domain-0" smoke.serial && grep -q "BusyBox" smoke.serial) || exit 1
automation/scripts/qemu-smoke-dom0less-arm32.sh +2 -1
index fb8f044a51f6..737adaf1a9ad 100755
@@ -137,7 +137,8 @@ timeout -k 1 240 \
     -no-reboot \
     -device virtio-net-pci,netdev=n0 \
     -netdev user,id=n0,tftp=./ \
-    -bios /usr/lib/u-boot/qemu_arm/u-boot.bin |& tee ${serial_log}
+    -bios /usr/lib/u-boot/qemu_arm/u-boot.bin |& \
+        tee ${serial_log} | sed 's/\r//'
 
 set -e
 (grep -q "${dom0_prompt}" ${serial_log} && grep -q "${passed}" ${serial_log}) || exit 1
automation/scripts/qemu-smoke-dom0less-arm64.sh +2 -1
index 75f575424a4e..b5ce7efdd44e 100755
@@ -201,7 +201,8 @@ timeout -k 1 240 \
     -no-reboot \
     -device virtio-net-pci,netdev=n0 \
     -netdev user,id=n0,tftp=binaries \
-    -bios /usr/lib/u-boot/qemu_arm64/u-boot.bin |& tee smoke.serial
+    -bios /usr/lib/u-boot/qemu_arm64/u-boot.bin |& \
+        tee smoke.serial | sed 's/\r//'
 
 set -e
 (grep -q "^Welcome to Alpine Linux" smoke.serial && grep -q "${passed}" smoke.serial) || exit 1
automation/scripts/qemu-smoke-riscv64.sh +1 -1
index 4008191302f9..f90df3c051e9 100755
@@ -13,7 +13,7 @@ qemu-system-riscv64 \
     -nographic \
     -m 2g \
     -kernel binaries/xen \
-    |& tee smoke.serial
+    |& tee smoke.serial | sed 's/\r//'
 
 set -e
 (grep -q "All set up" smoke.serial) || exit 1
automation/scripts/qemu-xtf-dom0less-arm64.sh +2 -1
index 3ec9cf74e129..0c4578eda66e 100755
@@ -61,7 +61,8 @@ timeout -k 1 120 \
     -no-reboot \
     -device virtio-net-pci,netdev=n0 \
     -netdev user,id=n0,tftp=binaries \
-    -bios /usr/lib/u-boot/qemu_arm64/u-boot.bin |& tee smoke.serial
+    -bios /usr/lib/u-boot/qemu_arm64/u-boot.bin |& \
+        tee smoke.serial | sed 's/\r//'
 
 set -e
 (grep -q "${passed}" smoke.serial) || exit 1
automation/scripts/qubes-x86-64.sh +1 -1
index 51323b1ae040..adec0f1f25c7 100755
@@ -200,7 +200,7 @@ cp -f binaries/dom0-rootfs.cpio.gz $TFTP/initrd-dom0
 # the console
 mkfifo /tmp/console-stdin
 cat /tmp/console-stdin |\
-ssh $CONTROLLER console | tee smoke.serial &
+ssh $CONTROLLER console | tee smoke.serial | sed 's/\r//' &
 
 # start the system pointing at gitlab-ci predefined config
 ssh $CONTROLLER gitlabci poweron
automation/scripts/xilinx-smoke-dom0less-arm64.sh +1 -1
index 075305241c8d..2bf786f6ee86 100755
@@ -136,7 +136,7 @@ cd $START
 # connect to serial
 set +e
 stty -F /dev/ttyUSB0 115200
-timeout -k 1 120 nohup sh -c "cat /dev/ttyUSB0 | tee smoke.serial"
+timeout -k 1 120 nohup sh -c "cat /dev/ttyUSB0 | tee smoke.serial | sed 's/\r//'"
 
 # stop the board
 cd /scratch/gitlab-runner
Signature · 1 line
2.42.0
#2 lore raw

PATCH v2 2/7 automation: remove com1= parameter on QEMU smoke tests

In reply to Roger Pau Monne

The serial is already setup by the firmware, be consistent with the rest of the QEMU tests and don't specify a com1 setup.

Note it's also bogus, as the extra ',' will make the intended DPS argument to be parsed as the io-base.

---
Changes in v2:
- New in this version

---
 automation/scripts/qemu-smoke-x86-64.sh | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
automation/scripts/qemu-smoke-x86-64.sh +1 -2
index 188ff8e3d658..3014d07314b9 100755
@@ -19,8 +19,7 @@ set +e
 timeout -k 1 30 \
 qemu-system-x86_64 -nographic -kernel binaries/xen \
         -initrd xtf/tests/example/$k \
-        -append "loglvl=all com1=115200,,8n1 console=com1 noreboot \
-                 console_timestamps=boot $extra" \
+        -append "loglvl=all console=com1 noreboot console_timestamps=boot $extra" \
         -m 512 -monitor none -serial file:smoke.serial
 set -e
 grep -q 'Test result: SUCCESS' smoke.serial || exit 1
Signature · 1 line
2.42.0
Reviewed-by on v2 2/7
#3 lore raw

Re: [PATCH v2 2/7] automation: remove com1= parameter on QEMU smoke tests

Quoted 7 lines · Roger Pau Monne

The serial is already setup by the firmware, be consistent with the rest of the QEMU tests and don't specify a com1 setup.

Note it's also bogus, as the extra ',' will make the intended DPS argument to be parsed as the io-base.

Quoted 24 lines

---
Changes in v2:
- New in this version

---
 automation/scripts/qemu-smoke-x86-64.sh | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
automation/scripts/qemu-smoke-x86-64.sh +1 -2
index 188ff8e3d658..3014d07314b9 100755
@@ -19,8 +19,7 @@ set +e
 timeout -k 1 30 \
 qemu-system-x86_64 -nographic -kernel binaries/xen \
         -initrd xtf/tests/example/$k \
-        -append "loglvl=all com1=115200,,8n1 console=com1 noreboot \
-                 console_timestamps=boot $extra" \
+        -append "loglvl=all console=com1 noreboot console_timestamps=boot $extra" \
         -m 512 -monitor none -serial file:smoke.serial
 set -e
 grep -q 'Test result: SUCCESS' smoke.serial || exit 1
Signature · 1 line
2.42.0
#4 lore raw

PATCH v2 3/7 automation: add Xen timestamps to all tests

In reply to Roger Pau Monne

---
Changes since v1:
- Expand to all tests.

---
 automation/scripts/qemu-alpine-x86_64.sh          | 2 +-
 automation/scripts/qemu-smoke-dom0-arm32.sh       | 2 +-
 automation/scripts/qemu-smoke-dom0-arm64.sh       | 2 +-
 automation/scripts/qemu-smoke-dom0less-arm32.sh   | 2 +-
 automation/scripts/qemu-smoke-dom0less-arm64.sh   | 2 +-
 automation/scripts/qemu-xtf-dom0less-arm64.sh     | 2 +-
 automation/scripts/qubes-x86-64.sh                | 2 +-
 automation/scripts/xilinx-smoke-dom0less-arm64.sh | 2 +-
 8 files changed, 8 insertions(+), 8 deletions(-)
automation/scripts/qemu-alpine-x86_64.sh +1 -1
index a1c41c030a47..8e398dcea34b 100755
@@ -68,7 +68,7 @@ cd ../..
 cat >> binaries/pxelinux.0 << EOF
 #!ipxe
 
-kernel xen console=com1
+kernel xen console=com1 console_timestamps=boot
 module bzImage console=hvc0
 module xen-rootfs.cpio.gz
 boot
automation/scripts/qemu-smoke-dom0-arm32.sh +1 -1
index 281cae38b4bd..a4b487b08055 100755
@@ -63,7 +63,7 @@ XEN="xen-qemuarm"
 DOM0_KERNEL="zImage"
 DOM0_RAMDISK="initrd.gz"
 DOM0_CMD="console=hvc0 earlyprintk clk_ignore_unused root=/dev/ram0 rdinit=/sbin/init"
-XEN_CMD="console=dtuart dom0_mem=1024M bootscrub=0"
+XEN_CMD="console=dtuart dom0_mem=1024M bootscrub=0 console_timestamps=boot"
 
 NUM_DOMUS=0
 
automation/scripts/qemu-smoke-dom0-arm64.sh +1 -1
index bb3d3a6a816e..e0bb37af3610 100755
@@ -79,7 +79,7 @@ DEVICE_TREE="virt-gicv2.dtb"
 XEN="xen"
 DOM0_KERNEL="Image"
 DOM0_RAMDISK="xen-rootfs.cpio.gz"
-XEN_CMD="console=dtuart dom0_mem=1024M"
+XEN_CMD="console=dtuart dom0_mem=1024M console_timestamps=boot"
 
 NUM_DOMUS=0
 
automation/scripts/qemu-smoke-dom0less-arm32.sh +1 -1
index 737adaf1a9ad..7e3cfbe9c4d0 100755
@@ -89,7 +89,7 @@ MEMORY_END="0xC0000000"
 
 DEVICE_TREE="virt.dtb"
 XEN="xen"
-XEN_CMD="console=dtuart dom0_mem=512M bootscrub=0"
+XEN_CMD="console=dtuart dom0_mem=512M bootscrub=0 console_timestamps=boot"
 
 DOM0_KERNEL="vmlinuz"
 DOM0_RAMDISK="initrd.gz"
automation/scripts/qemu-smoke-dom0less-arm64.sh +1 -1
index b5ce7efdd44e..e748b8ef1699 100755
@@ -137,7 +137,7 @@ DEVICE_TREE="virt-gicv2.dtb"
 XEN="xen"
 DOM0_KERNEL="Image"
 DOM0_RAMDISK="dom0-rootfs.cpio.gz"
-XEN_CMD="console=dtuart dom0_mem=512M"
+XEN_CMD="console=dtuart dom0_mem=512M console_timestamps=boot"
 
 NUM_DOMUS=1
 DOMU_KERNEL[0]="Image"
automation/scripts/qemu-xtf-dom0less-arm64.sh +1 -1
index 0c4578eda66e..a667e0412c92 100755
@@ -33,7 +33,7 @@ MEMORY_END="0xC0000000"
 XEN="xen"
 DEVICE_TREE="virt-gicv2.dtb"
 
-XEN_CMD="console=dtuart"
+XEN_CMD="console=dtuart console_timestamps=boot"
 
 DOMU_KERNEL[0]="xtf-test"
 DOMU_MEM[0]="128"
automation/scripts/qubes-x86-64.sh +1 -1
index adec0f1f25c7..d81ed7b931cf 100755
@@ -185,7 +185,7 @@ TFTP=/scratch/gitlab-runner/tftp
 [email protected]
 
 echo "
-multiboot2 (http)/gitlab-ci/xen $CONSOLE_OPTS loglvl=all guest_loglvl=all dom0_mem=4G $extra_xen_opts
+multiboot2 (http)/gitlab-ci/xen $CONSOLE_OPTS loglvl=all guest_loglvl=all dom0_mem=4G console_timestamps=boot $extra_xen_opts
 module2 (http)/gitlab-ci/vmlinuz console=hvc0 root=/dev/ram0 earlyprintk=xen
 module2 (http)/gitlab-ci/initrd-dom0
 " > $TFTP/grub.cfg
automation/scripts/xilinx-smoke-dom0less-arm64.sh +1 -1
index 2bf786f6ee86..4a071c6ef148 100755
@@ -94,7 +94,7 @@ DEVICE_TREE="mpsoc_smmu.dtb"
 XEN="xen"
 DOM0_KERNEL="Image"
 DOM0_RAMDISK="dom0-rootfs.cpio.gz"
-XEN_CMD="console=dtuart dtuart=serial0 dom0_mem=1024M"
+XEN_CMD="console=dtuart dtuart=serial0 dom0_mem=1024M console_timestamps=boot"
 
 NUM_DOMUS=1
 DOMU_KERNEL[0]="Image"
Signature · 1 line
2.42.0
#5 lore raw

PATCH v2 4/7 automation: fix jessie/stretch images to use archive.debian.org apt repos

In reply to Roger Pau Monne

Otherwise it's impossible to build the images.

---
 automation/build/debian/jessie-i386.dockerfile  | 7 +++++++
 automation/build/debian/jessie.dockerfile       | 7 +++++++
 automation/build/debian/stretch-i386.dockerfile | 7 +++++++
 automation/build/debian/stretch.dockerfile      | 7 +++++++
 4 files changed, 28 insertions(+)
automation/build/debian/jessie-i386.dockerfile +7 -0
index c9ac15a3ffd6..a8dec82bb299 100644
@@ -10,6 +10,13 @@ WORKDIR /build
 
 ENTRYPOINT ["linux32"]
 
+# replace repos in archive as release is EOL
+RUN cat <<"END" > /etc/apt/sources.list
+deb http://archive.debian.org/debian/ jessie main contrib non-free
+deb http://archive.debian.org/debian/ jessie-backports main contrib non-free
+deb http://archive.debian.org/debian-security/ jessie/updates main contrib non-free
+END
+
 # build depends
 RUN apt-get update && \
     apt-get --quiet --yes install \
automation/build/debian/jessie.dockerfile +7 -0
index 63b2c1e5b771..5c71c3e3ea75 100644
@@ -8,6 +8,13 @@ ENV USER root
 RUN mkdir /build
 WORKDIR /build
 
+# replace repos in archive as release is EOL
+RUN cat <<"END" > /etc/apt/sources.list
+deb http://archive.debian.org/debian/ jessie main contrib non-free
+deb http://archive.debian.org/debian/ jessie-backports main contrib non-free
+deb http://archive.debian.org/debian-security/ jessie/updates main contrib non-free
+END
+
 # build depends
 RUN apt-get update && \
     apt-get --quiet --yes install \
automation/build/debian/stretch-i386.dockerfile +7 -0
index d93f74c979ef..9739651e25dd 100644
@@ -10,6 +10,13 @@ WORKDIR /build
 
 ENTRYPOINT ["linux32"]
 
+# replace repos in archive as release is EOL
+RUN cat <<"END" > /etc/apt/sources.list
+deb http://archive.debian.org/debian/ stretch main contrib non-free
+deb http://archive.debian.org/debian/ stretch-backports main contrib non-free
+deb http://archive.debian.org/debian-security/ stretch/updates main contrib non-free
+END
+
 # build depends
 RUN apt-get update && \
     apt-get --quiet --yes install \
automation/build/debian/stretch.dockerfile +7 -0
index 1af6c691f8f4..2f1a99f45017 100644
@@ -8,6 +8,13 @@ ENV USER root
 RUN mkdir /build
 WORKDIR /build
 
+# replace repos in archive as release is EOL
+RUN cat <<"END" > /etc/apt/sources.list
+deb http://archive.debian.org/debian/ stretch main contrib non-free
+deb http://archive.debian.org/debian/ stretch-backports main contrib non-free
+deb http://archive.debian.org/debian-security/ stretch/updates main contrib non-free
+END
+
 # build depends
 RUN apt-get update && \
     apt-get --quiet --yes install \
Signature · 1 line
2.42.0
#6 lore raw

PATCH v2 5/7 automation: update tests to use Debian Bookworm

In reply to Roger Pau Monne

Switch tests using Stretch to Bookworm, as Stretch is EOL.

Note the packages are not removed from the Stretch dockerfile, because the tests in stable branches will run using the old containers.

---
The Bookworm container needs to be updated to contain the required tools before pushing this change.

---
 automation/build/debian/bookworm.dockerfile | 5 +++++
 automation/gitlab-ci/test.yaml              | 4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)
automation/build/debian/bookworm.dockerfile +5 -0
index ae008c8d46e5..7aea081c13a9 100644
@@ -46,6 +46,11 @@ RUN apt-get update && \
         gnupg \
         apt-transport-https \
         golang \
+        # for test phase, qemu-smoke-* jobs
+        qemu-system-x86 \
+        # for test phase, qemu-alpine-* jobs
+        cpio \
+        busybox-static \
         && \
         apt-get autoremove -y && \
         apt-get clean && \
automation/gitlab-ci/test.yaml +2 -2
index 61e642cce0cc..6aabdb9d156f 100644
@@ -43,7 +43,7 @@
 .qemu-x86-64:
   extends: .test-jobs-common
   variables:
-    CONTAINER: debian:stretch
+    CONTAINER: debian:bookworm
     LOGFILE: qemu-smoke-x86-64.log
   artifacts:
     paths:
@@ -130,7 +130,7 @@
 build-each-commit-gcc:
   extends: .test-jobs-common
   variables:
-    CONTAINER: debian:stretch
+    CONTAINER: debian:bookworm
     XEN_TARGET_ARCH: x86_64
     CC: gcc
   script:
Signature · 1 line
2.42.0
#7 lore raw

PATCH v2 6/7 automation: set architecture in docker files

In reply to Roger Pau Monne

Pass the desired architecture of the image in the FROM instruction if the image is possibly multi-platform.

This allows using the x86 Dockerfiles on OS X on arm64 hardware.

No functional change intended.

---
I haven't touched the Yocto dockerfile because I'm not sure how it's used.

---
 automation/build/alpine/3.18.dockerfile                       | 2 +-
 automation/build/archlinux/current-riscv64.dockerfile         | 2 +-
 automation/build/archlinux/current.dockerfile                 | 2 +-
 automation/build/centos/7.dockerfile                          | 2 +-
 automation/build/debian/bookworm.dockerfile                   | 2 +-
 automation/build/debian/bullseye-ppc64le.dockerfile           | 2 +-
 automation/build/debian/buster-gcc-ibt.dockerfile             | 4 ++--
 automation/build/debian/jessie.dockerfile                     | 2 +-
 automation/build/debian/stretch.dockerfile                    | 2 +-
 automation/build/fedora/29.dockerfile                         | 2 +-
 automation/build/suse/opensuse-leap.dockerfile                | 2 +-
 automation/build/suse/opensuse-tumbleweed.dockerfile          | 2 +-
 automation/build/ubuntu/bionic.dockerfile                     | 2 +-
 automation/build/ubuntu/focal.dockerfile                      | 2 +-
 automation/build/ubuntu/trusty.dockerfile                     | 2 +-
 automation/build/ubuntu/xenial-xilinx.dockerfile              | 2 +-
 automation/build/ubuntu/xenial.dockerfile                     | 2 +-
 automation/tests-artifacts/alpine/3.18.dockerfile             | 2 +-
 automation/tests-artifacts/kernel/6.1.19.dockerfile           | 2 +-
 .../tests-artifacts/qemu-system-ppc64/8.1.0-ppc64.dockerfile  | 2 +-
 20 files changed, 21 insertions(+), 21 deletions(-)
automation/build/alpine/3.18.dockerfile +1 -1
index 5d2a69a06010..4ae9cb5e9e30 100644
@@ -1,4 +1,4 @@
-FROM alpine:3.18
+FROM --platform=linux/amd64 alpine:3.18
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/build/archlinux/current-riscv64.dockerfile +1 -1
index abf8e7bf0b88..af75b5c720ce 100644
@@ -1,4 +1,4 @@
-FROM archlinux
+FROM --platform=linux/amd64 archlinux
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/build/archlinux/current.dockerfile +1 -1
index 47e79637a4a6..d974a1434fd5 100644
@@ -1,4 +1,4 @@
-FROM archlinux:base-devel
+FROM --platform=linux/amd64 archlinux:base-devel
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/build/centos/7.dockerfile +1 -1
index 69dcefb2f011..ab450f0b3a0e 100644
@@ -1,4 +1,4 @@
-FROM centos:7
+FROM --platform=linux/amd64 centos:7
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/build/debian/bookworm.dockerfile +1 -1
index 7aea081c13a9..459f8e30bdc6 100644
@@ -1,4 +1,4 @@
-FROM debian:bookworm
+FROM --platform=linux/amd64 debian:bookworm
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/build/debian/bullseye-ppc64le.dockerfile +1 -1
index 4de8458445ae..6fdfb6bc2b40 100644
@@ -1,4 +1,4 @@
-FROM debian:bullseye-slim
+FROM --platform=linux/amd64 debian:bullseye-slim
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/build/debian/buster-gcc-ibt.dockerfile +2 -2
index 96ab4fe8a2f1..6a3e50ef6b3f 100644
@@ -1,4 +1,4 @@
-FROM debian:buster-slim AS builder
+FROM --platform=linux/amd64 debian:buster-slim AS builder
 
 ENV DEBIAN_FRONTEND=noninteractive
 ENV USER root
@@ -41,7 +41,7 @@ RUN ./configure \
 RUN make -j`nproc` && make -j`nproc` install
 
 
-FROM debian:buster-slim
+FROM --platform=linux/amd64 debian:buster-slim
 COPY --from=builder /opt/gcc-11-ibt /opt/gcc-11-ibt
 
 LABEL maintainer.name="The Xen Project" \
automation/build/debian/jessie.dockerfile +1 -1
index 5c71c3e3ea75..32fc952fbc2d 100644
@@ -1,4 +1,4 @@
-FROM debian/eol:jessie
+FROM --platform=linux/amd64 debian/eol:jessie
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/build/debian/stretch.dockerfile +1 -1
index 2f1a99f45017..e2706a8f3589 100644
@@ -1,4 +1,4 @@
-FROM debian:stretch
+FROM --platform=linux/amd64 debian:stretch
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/build/fedora/29.dockerfile +1 -1
index e55b06a4517e..42a87ce6c84b 100644
@@ -1,4 +1,4 @@
-FROM fedora:29
+FROM --platform=linux/amd64 fedora:29
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/build/suse/opensuse-leap.dockerfile +1 -1
index 7010b71acaa0..e1ec38a41445 100644
@@ -1,4 +1,4 @@
-FROM opensuse/leap
+FROM --platform=linux/amd64 opensuse/leap
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/build/suse/opensuse-tumbleweed.dockerfile +1 -1
index 959e1f6939f0..38f6fda2ff1b 100644
@@ -1,4 +1,4 @@
-FROM opensuse/tumbleweed
+FROM --platform=linux/amd64 opensuse/tumbleweed
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/build/ubuntu/bionic.dockerfile +1 -1
index e15f54431efb..77d7f933860c 100644
@@ -1,4 +1,4 @@
-FROM ubuntu:18.04
+FROM --platform=linux/amd64 ubuntu:18.04
 LABEL maintainer.name="The Xen Project " \
       maintainer.email="[email protected]"
 
automation/build/ubuntu/focal.dockerfile +1 -1
index e3d11194ee2f..30a9b8e84ffe 100644
@@ -1,4 +1,4 @@
-FROM ubuntu:20.04
+FROM --platform=linux/amd64 ubuntu:20.04
 LABEL maintainer.name="The Xen Project " \
       maintainer.email="[email protected]"
 
automation/build/ubuntu/trusty.dockerfile +1 -1
index 22e294c20cac..0d33578c4e1d 100644
@@ -1,4 +1,4 @@
-FROM ubuntu:14.04
+FROM --platform=linux/amd64 ubuntu:14.04
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/build/ubuntu/xenial-xilinx.dockerfile +1 -1
index 5f7087135213..49f27b322995 100644
@@ -1,4 +1,4 @@
-FROM ubuntu:16.04
+FROM --platform=linux/amd64 ubuntu:16.04
 LABEL maintainer.name="The Xen Project " \
       maintainer.email="[email protected]"
 
automation/build/ubuntu/xenial.dockerfile +1 -1
index 2d2ba3e31f63..e8035434f804 100644
@@ -1,4 +1,4 @@
-FROM ubuntu:16.04
+FROM --platform=linux/amd64 ubuntu:16.04
 LABEL maintainer.name="The Xen Project " \
       maintainer.email="[email protected]"
 
automation/tests-artifacts/alpine/3.18.dockerfile +1 -1
index 5f521572b8fb..f1b4a8b7a191 100644
@@ -1,4 +1,4 @@
-FROM alpine:3.18
+FROM --platform=linux/amd64 alpine:3.18
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/tests-artifacts/kernel/6.1.19.dockerfile +1 -1
index d5b787c1cbb5..3a4096780d20 100644
@@ -1,4 +1,4 @@
-FROM debian:bookworm
+FROM --platform=linux/amd64 debian:bookworm
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/tests-artifacts/qemu-system-ppc64/8.1.0-ppc64.dockerfile +1 -1
index 7376ca46ff8e..65857147bf4f 100644
@@ -1,4 +1,4 @@
-FROM debian:bullseye-slim
+FROM --platform=linux/amd64 debian:bullseye-slim
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
Signature · 1 line
2.42.0
Reviewed-by on v2 6/7
#8 lore raw

Re: [PATCH v2 6/7] automation: set architecture in docker files

Quoted 8 lines · Roger Pau Monne

Pass the desired architecture of the image in the FROM instruction if the image is possibly multi-platform.

This allows using the x86 Dockerfiles on OS X on arm64 hardware.

No functional change intended.

Quoted 237 lines

---
I haven't touched the Yocto dockerfile because I'm not sure how it's used.

---
 automation/build/alpine/3.18.dockerfile                       | 2 +-
 automation/build/archlinux/current-riscv64.dockerfile         | 2 +-
 automation/build/archlinux/current.dockerfile                 | 2 +-
 automation/build/centos/7.dockerfile                          | 2 +-
 automation/build/debian/bookworm.dockerfile                   | 2 +-
 automation/build/debian/bullseye-ppc64le.dockerfile           | 2 +-
 automation/build/debian/buster-gcc-ibt.dockerfile             | 4 ++--
 automation/build/debian/jessie.dockerfile                     | 2 +-
 automation/build/debian/stretch.dockerfile                    | 2 +-
 automation/build/fedora/29.dockerfile                         | 2 +-
 automation/build/suse/opensuse-leap.dockerfile                | 2 +-
 automation/build/suse/opensuse-tumbleweed.dockerfile          | 2 +-
 automation/build/ubuntu/bionic.dockerfile                     | 2 +-
 automation/build/ubuntu/focal.dockerfile                      | 2 +-
 automation/build/ubuntu/trusty.dockerfile                     | 2 +-
 automation/build/ubuntu/xenial-xilinx.dockerfile              | 2 +-
 automation/build/ubuntu/xenial.dockerfile                     | 2 +-
 automation/tests-artifacts/alpine/3.18.dockerfile             | 2 +-
 automation/tests-artifacts/kernel/6.1.19.dockerfile           | 2 +-
 .../tests-artifacts/qemu-system-ppc64/8.1.0-ppc64.dockerfile  | 2 +-
 20 files changed, 21 insertions(+), 21 deletions(-)
automation/build/alpine/3.18.dockerfile +1 -1
index 5d2a69a06010..4ae9cb5e9e30 100644
@@ -1,4 +1,4 @@
-FROM alpine:3.18
+FROM --platform=linux/amd64 alpine:3.18
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/build/archlinux/current-riscv64.dockerfile +1 -1
index abf8e7bf0b88..af75b5c720ce 100644
@@ -1,4 +1,4 @@
-FROM archlinux
+FROM --platform=linux/amd64 archlinux
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/build/archlinux/current.dockerfile +1 -1
index 47e79637a4a6..d974a1434fd5 100644
@@ -1,4 +1,4 @@
-FROM archlinux:base-devel
+FROM --platform=linux/amd64 archlinux:base-devel
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/build/centos/7.dockerfile +1 -1
index 69dcefb2f011..ab450f0b3a0e 100644
@@ -1,4 +1,4 @@
-FROM centos:7
+FROM --platform=linux/amd64 centos:7
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/build/debian/bookworm.dockerfile +1 -1
index 7aea081c13a9..459f8e30bdc6 100644
@@ -1,4 +1,4 @@
-FROM debian:bookworm
+FROM --platform=linux/amd64 debian:bookworm
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/build/debian/bullseye-ppc64le.dockerfile +1 -1
index 4de8458445ae..6fdfb6bc2b40 100644
@@ -1,4 +1,4 @@
-FROM debian:bullseye-slim
+FROM --platform=linux/amd64 debian:bullseye-slim
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/build/debian/buster-gcc-ibt.dockerfile +2 -2
index 96ab4fe8a2f1..6a3e50ef6b3f 100644
@@ -1,4 +1,4 @@
-FROM debian:buster-slim AS builder
+FROM --platform=linux/amd64 debian:buster-slim AS builder
 
 ENV DEBIAN_FRONTEND=noninteractive
 ENV USER root
@@ -41,7 +41,7 @@ RUN ./configure \
 RUN make -j`nproc` && make -j`nproc` install
 
 
-FROM debian:buster-slim
+FROM --platform=linux/amd64 debian:buster-slim
 COPY --from=builder /opt/gcc-11-ibt /opt/gcc-11-ibt
 
 LABEL maintainer.name="The Xen Project" \
automation/build/debian/jessie.dockerfile +1 -1
index 5c71c3e3ea75..32fc952fbc2d 100644
@@ -1,4 +1,4 @@
-FROM debian/eol:jessie
+FROM --platform=linux/amd64 debian/eol:jessie
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/build/debian/stretch.dockerfile +1 -1
index 2f1a99f45017..e2706a8f3589 100644
@@ -1,4 +1,4 @@
-FROM debian:stretch
+FROM --platform=linux/amd64 debian:stretch
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/build/fedora/29.dockerfile +1 -1
index e55b06a4517e..42a87ce6c84b 100644
@@ -1,4 +1,4 @@
-FROM fedora:29
+FROM --platform=linux/amd64 fedora:29
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/build/suse/opensuse-leap.dockerfile +1 -1
index 7010b71acaa0..e1ec38a41445 100644
@@ -1,4 +1,4 @@
-FROM opensuse/leap
+FROM --platform=linux/amd64 opensuse/leap
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/build/suse/opensuse-tumbleweed.dockerfile +1 -1
index 959e1f6939f0..38f6fda2ff1b 100644
@@ -1,4 +1,4 @@
-FROM opensuse/tumbleweed
+FROM --platform=linux/amd64 opensuse/tumbleweed
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/build/ubuntu/bionic.dockerfile +1 -1
index e15f54431efb..77d7f933860c 100644
@@ -1,4 +1,4 @@
-FROM ubuntu:18.04
+FROM --platform=linux/amd64 ubuntu:18.04
 LABEL maintainer.name="The Xen Project " \
       maintainer.email="[email protected]"
 
automation/build/ubuntu/focal.dockerfile +1 -1
index e3d11194ee2f..30a9b8e84ffe 100644
@@ -1,4 +1,4 @@
-FROM ubuntu:20.04
+FROM --platform=linux/amd64 ubuntu:20.04
 LABEL maintainer.name="The Xen Project " \
       maintainer.email="[email protected]"
 
automation/build/ubuntu/trusty.dockerfile +1 -1
index 22e294c20cac..0d33578c4e1d 100644
@@ -1,4 +1,4 @@
-FROM ubuntu:14.04
+FROM --platform=linux/amd64 ubuntu:14.04
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/build/ubuntu/xenial-xilinx.dockerfile +1 -1
index 5f7087135213..49f27b322995 100644
@@ -1,4 +1,4 @@
-FROM ubuntu:16.04
+FROM --platform=linux/amd64 ubuntu:16.04
 LABEL maintainer.name="The Xen Project " \
       maintainer.email="[email protected]"
 
automation/build/ubuntu/xenial.dockerfile +1 -1
index 2d2ba3e31f63..e8035434f804 100644
@@ -1,4 +1,4 @@
-FROM ubuntu:16.04
+FROM --platform=linux/amd64 ubuntu:16.04
 LABEL maintainer.name="The Xen Project " \
       maintainer.email="[email protected]"
 
automation/tests-artifacts/alpine/3.18.dockerfile +1 -1
index 5f521572b8fb..f1b4a8b7a191 100644
@@ -1,4 +1,4 @@
-FROM alpine:3.18
+FROM --platform=linux/amd64 alpine:3.18
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/tests-artifacts/kernel/6.1.19.dockerfile +1 -1
index d5b787c1cbb5..3a4096780d20 100644
@@ -1,4 +1,4 @@
-FROM debian:bookworm
+FROM --platform=linux/amd64 debian:bookworm
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/tests-artifacts/qemu-system-ppc64/8.1.0-ppc64.dockerfile +1 -1
index 7376ca46ff8e..65857147bf4f 100644
@@ -1,4 +1,4 @@
-FROM debian:bullseye-slim
+FROM --platform=linux/amd64 debian:bullseye-slim
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
Signature · 1 line
2.42.0
#9 lore raw

PATCH v2 7/7 automation: switch to multi-platform images when possible

In reply to Roger Pau Monne

Instead of using specific architecture image, switch to using multi-arch ones and specify the desired architecture using the --platform option.

---
I haven't touched the Yocto dockerfile because I'm not sure how it's used.

---
 automation/build/alpine/3.18-arm64v8.dockerfile               | 2 +-
 automation/build/debian/bookworm-arm64v8-arm32-gcc.dockerfile | 2 +-
 automation/build/debian/bookworm-arm64v8.dockerfile           | 2 +-
 automation/build/debian/bookworm-cppcheck.dockerfile          | 4 ++--
 automation/build/debian/bookworm-i386.dockerfile              | 2 +-
 automation/build/debian/stretch-i386.dockerfile               | 2 +-
 automation/tests-artifacts/alpine/3.18-arm64v8.dockerfile     | 2 +-
 automation/tests-artifacts/kernel/5.19-arm64v8.dockerfile     | 2 +-
 .../qemu-system-aarch64/6.0.0-arm64v8.dockerfile              | 2 +-
 9 files changed, 10 insertions(+), 10 deletions(-)
automation/build/alpine/3.18-arm64v8.dockerfile +1 -1
index 470f5d72a921..91e90220240f 100644
@@ -1,4 +1,4 @@
-FROM arm64v8/alpine:3.18
+FROM --platform=linux/arm64/v8 alpine:3.18
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/build/debian/bookworm-arm64v8-arm32-gcc.dockerfile +1 -1
index b3295c435ed5..a05ffeac04f9 100644
@@ -1,4 +1,4 @@
-FROM arm64v8/debian:bookworm
+FROM --platform=linux/arm64/v8 debian:bookworm
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/build/debian/bookworm-arm64v8.dockerfile +1 -1
index 640b1e0eadf2..2c432aacb765 100644
@@ -1,4 +1,4 @@
-FROM arm64v8/debian:bookworm
+FROM --platform=linux/arm64/v8 debian:bookworm
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/build/debian/bookworm-cppcheck.dockerfile +2 -2
index d64fb7b18c66..633268376d56 100644
@@ -1,4 +1,4 @@
-FROM arm64v8/debian:bookworm AS builder
+FROM --platform=linux/arm64/v8 debian:bookworm AS builder
 
 ENV DEBIAN_FRONTEND=noninteractive
 ENV CPPCHECK_VERSION=2.7
@@ -24,7 +24,7 @@ RUN curl -fsSLO https://github.com/danmar/cppcheck/archive/"$CPPCHECK_VERSION".t
         FILESDIR=/usr/share/cppcheck \
         HAVE_RULES=yes CXXFLAGS="-O2 -DNDEBUG -Wall -Wno-sign-compare -Wno-unused-function"
 
-FROM arm64v8/debian:bookworm
+FROM --platform=linux/arm64/v8 debian:bookworm
 COPY --from=builder /usr/bin/cppcheck /usr/bin/cppcheck
 COPY --from=builder /usr/share/cppcheck /usr/share/cppcheck
 
automation/build/debian/bookworm-i386.dockerfile +1 -1
index 559bf670f0f1..89a650338566 100644
@@ -1,4 +1,4 @@
-FROM i386/debian:bookworm
+FROM --platform=linux/i386 debian:bookworm
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/build/debian/stretch-i386.dockerfile +1 -1
index 9739651e25dd..da93fed8ea68 100644
@@ -1,4 +1,4 @@
-FROM i386/debian:stretch
+FROM --platform=linux/i386 debian:stretch
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/tests-artifacts/alpine/3.18-arm64v8.dockerfile +1 -1
index cbd96d9bc6b0..94f69621f40e 100644
@@ -1,4 +1,4 @@
-FROM arm64v8/alpine:3.18
+FROM --platform=linux/arm64/v8 alpine:3.18
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/tests-artifacts/kernel/5.19-arm64v8.dockerfile +1 -1
index a53a97d7277e..b0875ca0ddd1 100644
@@ -1,4 +1,4 @@
-FROM arm64v8/debian:bookworm
+FROM --platform=linux/arm64/v8 debian:bookworm
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/tests-artifacts/qemu-system-aarch64/6.0.0-arm64v8.dockerfile +1 -1
index e277e13b60b9..fb7b7b506e94 100644
@@ -1,4 +1,4 @@
-FROM arm64v8/debian:bookworm
+FROM --platform=linux/arm64/v8 debian:bookworm
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
Signature · 1 line
2.42.0
Reviewed-by on v2 7/7
#10 lore raw

Re: [PATCH v2 7/7] automation: switch to multi-platform images when possible

Quoted 4 lines · Roger Pau Monne

Instead of using specific architecture image, switch to using multi-arch ones and specify the desired architecture using the --platform option.

Quoted 116 lines

---
I haven't touched the Yocto dockerfile because I'm not sure how it's used.

---
 automation/build/alpine/3.18-arm64v8.dockerfile               | 2 +-
 automation/build/debian/bookworm-arm64v8-arm32-gcc.dockerfile | 2 +-
 automation/build/debian/bookworm-arm64v8.dockerfile           | 2 +-
 automation/build/debian/bookworm-cppcheck.dockerfile          | 4 ++--
 automation/build/debian/bookworm-i386.dockerfile              | 2 +-
 automation/build/debian/stretch-i386.dockerfile               | 2 +-
 automation/tests-artifacts/alpine/3.18-arm64v8.dockerfile     | 2 +-
 automation/tests-artifacts/kernel/5.19-arm64v8.dockerfile     | 2 +-
 .../qemu-system-aarch64/6.0.0-arm64v8.dockerfile              | 2 +-
 9 files changed, 10 insertions(+), 10 deletions(-)
automation/build/alpine/3.18-arm64v8.dockerfile +1 -1
index 470f5d72a921..91e90220240f 100644
@@ -1,4 +1,4 @@
-FROM arm64v8/alpine:3.18
+FROM --platform=linux/arm64/v8 alpine:3.18
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/build/debian/bookworm-arm64v8-arm32-gcc.dockerfile +1 -1
index b3295c435ed5..a05ffeac04f9 100644
@@ -1,4 +1,4 @@
-FROM arm64v8/debian:bookworm
+FROM --platform=linux/arm64/v8 debian:bookworm
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/build/debian/bookworm-arm64v8.dockerfile +1 -1
index 640b1e0eadf2..2c432aacb765 100644
@@ -1,4 +1,4 @@
-FROM arm64v8/debian:bookworm
+FROM --platform=linux/arm64/v8 debian:bookworm
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/build/debian/bookworm-cppcheck.dockerfile +2 -2
index d64fb7b18c66..633268376d56 100644
@@ -1,4 +1,4 @@
-FROM arm64v8/debian:bookworm AS builder
+FROM --platform=linux/arm64/v8 debian:bookworm AS builder
 
 ENV DEBIAN_FRONTEND=noninteractive
 ENV CPPCHECK_VERSION=2.7
@@ -24,7 +24,7 @@ RUN curl -fsSLO https://github.com/danmar/cppcheck/archive/"$CPPCHECK_VERSION".t
         FILESDIR=/usr/share/cppcheck \
         HAVE_RULES=yes CXXFLAGS="-O2 -DNDEBUG -Wall -Wno-sign-compare -Wno-unused-function"
 
-FROM arm64v8/debian:bookworm
+FROM --platform=linux/arm64/v8 debian:bookworm
 COPY --from=builder /usr/bin/cppcheck /usr/bin/cppcheck
 COPY --from=builder /usr/share/cppcheck /usr/share/cppcheck
 
automation/build/debian/bookworm-i386.dockerfile +1 -1
index 559bf670f0f1..89a650338566 100644
@@ -1,4 +1,4 @@
-FROM i386/debian:bookworm
+FROM --platform=linux/i386 debian:bookworm
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/build/debian/stretch-i386.dockerfile +1 -1
index 9739651e25dd..da93fed8ea68 100644
@@ -1,4 +1,4 @@
-FROM i386/debian:stretch
+FROM --platform=linux/i386 debian:stretch
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/tests-artifacts/alpine/3.18-arm64v8.dockerfile +1 -1
index cbd96d9bc6b0..94f69621f40e 100644
@@ -1,4 +1,4 @@
-FROM arm64v8/alpine:3.18
+FROM --platform=linux/arm64/v8 alpine:3.18
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/tests-artifacts/kernel/5.19-arm64v8.dockerfile +1 -1
index a53a97d7277e..b0875ca0ddd1 100644
@@ -1,4 +1,4 @@
-FROM arm64v8/debian:bookworm
+FROM --platform=linux/arm64/v8 debian:bookworm
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/tests-artifacts/qemu-system-aarch64/6.0.0-arm64v8.dockerfile +1 -1
index e277e13b60b9..fb7b7b506e94 100644
@@ -1,4 +1,4 @@
-FROM arm64v8/debian:bookworm
+FROM --platform=linux/arm64/v8 debian:bookworm
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
Signature · 1 line
2.42.0