tests/docker: start using libvirt-ci's "lcitool" for dockerfiles
cover tests/docker: start using libvirt-ci's "lcitool" for dockerfiles
Currently the tests/docker/dockerfiles/*Dockerfile recipes are all hand written by contributors. There is a common design pattern, but the set of packages listed for installation leaves alot to be desired
- There is no consistency at all across distros
- Many potential build deps are not listed in the containers
- Some packages are not used by QEMU at all
- Adding new distros is an error prone task
The same applies to package lists for VMs, Cirrus CI / Travis CI, and probably more.
This problem is not unique to QEMU, libvirt faced the exact same issues and developed a program called "lcitool" which is part of the libvirt-ci git repository to reduce the burden in this area.
https://gitlab.com/libvirt-ci/libvirt-ci/
Despite its name, this repository is not tied to libvirt, and so as well as the 40+ libvirt git repos, it is also used by the libosinfo and virt-viewer projects for their CI needs. The idea is that all these projects can share the burden of libvirt-ci.
lcitool is capable of automating the installation and updating of VM images, creation of dockerfiles and creation of standalone package lists.
In this series I'm taking the easy step which is the generation of dockerfiles, since that is also where the most immediate value lies for QEMU.
The key concept in lcitool that brings a huge win in maintainability is that there is a single file which defines a mapping between a build pre-requisite and the native package on each targetted distro.
https://gitlab.com/berrange/libvirt-ci/-/blob/qemu/guests/lcitool/lcitool/=ansible/vars/mappings.yml
A project merely has to have its list of pre-requisites enumerated
https://gitlab.com/berrange/libvirt-ci/-/blob/qemu/guests/lcitool/lcitool/a=nsible/vars/projects/qemu.yml
The combination of these two files is enough to generate accurate package lists for any supported distro. Currently supported distros are Debian (10, sid), Ubuntu (18.04, 20.04), CentOS (7, 8, stream), Fedora (32, 33, rawhide), OpenSUSE (151) macOS (homebrew), FreeBSD (11, 12, current).
At the end of this series, I have dockerfiles auto-generated for QEMU covering Ubuntu 18.04 & 20.04, CentOS 7 & 8 and Fedora 32.
lcitool is also capable of generating dockerfiles for cross-compiled non-x86 architectures for Debian, and for mingw32/64 for Fedora. This is driven from the very same mapping.yml file listed above, which has attributes to indicate whether a given dependancy should be pulled from the native or cross build target. Again this means that we have strong guarantee of consistent deps being used between cross containers.
I have not converted cross containers in this series though, because the way we generated cross dockerfiles is different from how QEMU does it. lcitool will always generate fully self-contained dockerfiles, but QEMU currently uses layered dockerfiles for cross-builds, so all cross builds share a common intermediate container.
I could enhance lcitool to support layered containers for cross-builds, but before doing that I wondered how strongly people are attached to them ? If self-contained dockerfiles are acceptable I can do that more easily.
There is also scope for auto-generating the package lists for tests/vm and .cirrus.yml files, but I've not attempted that here. The same general idea appies - we just call lcitool to spit out a list of native packages for each case.
If converting tests/vm, we would need to add more distros to lcitool mappings.yml to covert openbsd, netbsd, haiku since libvirt does not target those distros itself.
Finally I wondered about the approach to integrating with lcitool.
I have provided a tests/docker/dockerfiles/refresh script that needs to be invoked periodically to re-generate them. eg when adding a new distro, or when the package lists change. I could add libvirt-ci.git as a sub-module and provide a more seemless integration, but open to suggestions. In libvirt*.git repos we don't bother with git submodules for libvirt-ci.git since whomever runs it to refresh containers just has a local checkout regardless.
Note since this is a proof of concept, the additions to libvirt-ci for QEMU are not part of the main git repo yet, they're just in my own fork on the "qemu" branch
https://gitlab.com/berrange/libvirt-ci/-/tree/qemu
Daniel P. Berrang=C3=A9 (23):
hw/usb/ccid: remove references to NSS tests/docker: don't use BUILDKIT in GitLab either tests/docker: use project specific container registries tests/docker: use explicit docker.io registry tests/docker: remove travis container tests/docker: remove FEATURES env var from templates tests/docker: fix sorting in package lists tests/docker: fix mistakes in centos package lists tests/docker: fix mistakes in fedora package list tests/docker: fix mistakes in ubuntu package lists tests/docker: remove mingw packages from Fedora tests/docker: add script for automating container refresh tests/docker: expand centos7 package list tests/docker: expand centos8 package list tests/docker: expand fedora package list tests/docker: expand ubuntu1804 package list tests/docker: expand ubuntu2004 package list tests/docker: auto-generate centos7 with lcitool tests/docker: auto-generate centos8 with lcitool tests/docker: auto-generate fedora with lcitool tests/docker: auto-generate ubuntu1804 with lcitool tests/docker: auto-generate ubuntu2004 with lcitool tests/docker: remove ubuntu container
.gitlab-ci.d/containers.yml | 5 - .travis.yml | 14 +- docs/ccid.txt | 15 +- scripts/coverity-scan/coverity-scan.docker | 1 - tests/docker/common.rc | 19 +- tests/docker/docker.py | 4 +- tests/docker/dockerfiles/centos7.docker | 157 +++++++++--- tests/docker/dockerfiles/centos8.docker | 153 ++++++++--- .../dockerfiles/debian-xtensa-cross.docker | 2 +- tests/docker/dockerfiles/debian10.docker | 4 +- tests/docker/dockerfiles/debian11.docker | 2 +- .../dockerfiles/fedora-cris-cross.docker | 2 +- .../dockerfiles/fedora-i386-cross.docker | 2 +- .../dockerfiles/fedora-win32-cross.docker | 3 +- .../dockerfiles/fedora-win64-cross.docker | 3 +- tests/docker/dockerfiles/fedora.docker | 241 ++++++++++-------- tests/docker/dockerfiles/refresh | 67 +++++ tests/docker/dockerfiles/travis.docker | 17 -- tests/docker/dockerfiles/ubuntu.docker | 71 ------ tests/docker/dockerfiles/ubuntu1804.docker | 185 +++++++++----- tests/docker/dockerfiles/ubuntu2004.docker | 197 +++++++++----- tests/docker/run | 3 - tests/docker/test-clang | 2 +- tests/docker/test-debug | 2 +- tests/docker/test-mingw | 3 +- tests/docker/test-misc | 2 +- tests/docker/test-tsan | 2 +- tests/docker/travis | 22 -- tests/docker/travis.py | 47 ---- 29 files changed, 732 insertions(+), 515 deletions(-) create mode 100755 tests/docker/dockerfiles/refresh delete mode 100644 tests/docker/dockerfiles/travis.docker delete mode 100644 tests/docker/dockerfiles/ubuntu.docker delete mode 100755 tests/docker/travis delete mode 100755 tests/docker/travis.py
--=20
2.28.0
PATCH 2/23 tests/docker: don't use BUILDKIT in GitLab either
Using BUILDKIT breaks with certain container registries such as CentOS, with docker build reporting an error such as
failed to solve with frontend dockerfile.v0:
failed to build LLB: failed to load cache key:
unexpected status code
https://registry.centos.org/v2/centos/manifests/7:
403 Forbidden
--- tests/docker/docker.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
tests/docker/docker.py +3 -1
@@ -222,7 +222,9 @@ class Docker(object): def __init__(self): self._command = _guess_engine_command() - if "docker" in self._command and "TRAVIS" not in os.environ: + if ("docker" in self._command and + "TRAVIS" not in os.environ and + "CI" not in os.environ): os.environ["DOCKER_BUILDKIT"] = "1" self._buildkit = True else:
Signature · 1 line
2.28.0
PATCH 1/23 hw/usb/ccid: remove references to NSS
In reply to Daniel P. BerrangéThe NSS package was previously pre-requisite for building CCID related features, however, this became obsolete when the libcacard library was spun off to a separate project:
commit 7b02f5447c64d1854468f758398c9f6fe9e5721f
Author: Marc-André Lureau <[email protected]>
Date: Sun Aug 30 11:48:40 2015 +0200
libcacard: use the standalone project
--- .travis.yml | 14 +++++++------- docs/ccid.txt | 15 +++++++-------- scripts/coverity-scan/coverity-scan.docker | 1 - tests/docker/dockerfiles/centos7.docker | 1 + tests/docker/dockerfiles/centos8.docker | 1 + tests/docker/dockerfiles/fedora.docker | 2 +- tests/docker/dockerfiles/ubuntu.docker | 1 - tests/docker/dockerfiles/ubuntu1804.docker | 1 - tests/docker/dockerfiles/ubuntu2004.docker | 1 - 9 files changed, 17 insertions(+), 20 deletions(-)
.travis.yml +7 -7
@@ -27,6 +27,7 @@ addons: - libattr1-dev - libbrlapi-dev - libcap-ng-dev + - libcacard-dev - libgcc-7-dev - libgnutls28-dev - libgtk-3-dev
@@ -34,7 +35,6 @@ addons: - liblttng-ust-dev - libncurses5-dev - libnfs-dev - - libnss3-dev - libpixman-1-dev - libpng-dev - librados-dev
@@ -249,6 +249,7 @@ jobs: - libaio-dev - libattr1-dev - libbrlapi-dev + - libcacard-dev - libcap-ng-dev - libgnutls28-dev - libgtk-3-dev
@@ -256,7 +257,6 @@ jobs: - liblttng-ust-dev - libnfs-dev - libncurses5-dev - - libnss3-dev - libpixman-1-dev - libpng-dev - librados-dev
@@ -290,6 +290,7 @@ jobs: - libaio-dev - libattr1-dev - libbrlapi-dev + - libcacard-dev - libcap-ng-dev - libgcrypt20-dev - libgnutls28-dev
@@ -298,7 +299,6 @@ jobs: - liblttng-ust-dev - libncurses5-dev - libnfs-dev - - libnss3-dev - libpixman-1-dev - libpng-dev - librados-dev
@@ -324,6 +324,7 @@ jobs: - libaio-dev - libattr1-dev - libbrlapi-dev + - libcacard-dev - libcap-ng-dev - libgcrypt20-dev - libgnutls28-dev
@@ -332,7 +333,6 @@ jobs: - liblttng-ust-dev - libncurses5-dev - libnfs-dev - - libnss3-dev - libpixman-1-dev - libpng-dev - librados-dev
@@ -357,6 +357,7 @@ jobs: - libaio-dev - libattr1-dev - libbrlapi-dev + - libcacard-dev - libcap-ng-dev - libgcrypt20-dev - libgnutls28-dev
@@ -365,7 +366,6 @@ jobs: - liblttng-ust-dev - libncurses5-dev - libnfs-dev - - libnss3-dev - libpixman-1-dev - libpng-dev - librados-dev
@@ -399,6 +399,7 @@ jobs: apt_packages: - libaio-dev - libattr1-dev + - libcacard-dev - libcap-ng-dev - libgnutls28-dev - libiscsi-dev
@@ -406,7 +407,6 @@ jobs: - liblzo2-dev - libncurses-dev - libnfs-dev - - libnss3-dev - libpixman-1-dev - libsdl2-dev - libsdl2-image-dev
@@ -442,6 +442,7 @@ jobs: - libaio-dev - libattr1-dev - libbrlapi-dev + - libcacard-dev - libcap-ng-dev - libgcrypt20-dev - libgnutls28-dev
@@ -450,7 +451,6 @@ jobs: - liblttng-ust-dev - libncurses5-dev - libnfs-dev - - libnss3-dev - libpixman-1-dev - libpng-dev - librados-dev
docs/ccid.txt +7 -8
@@ -34,15 +34,14 @@ reader and smart card (i.e. not backed by a physical device) using this device. 2. Building -The cryptographic functions and access to the physical card is done via NSS. - -Installing NSS: +The cryptographic functions and access to the physical card is done via the +libcacard library, whose development package must be installed prior to +building QEMU: In redhat/fedora: - yum install nss-devel -In ubuntu/debian: - apt-get install libnss3-dev - (not tested on ubuntu) + yum install libcacard-devel +In ubuntu: + apt-get install libcacard-dev Configuring and building: ./configure --enable-smartcard && make
@@ -51,7 +50,7 @@ Configuring and building: 3. Using ccid-card-emulated with hardware Assuming you have a working smartcard on the host with the current -user, using NSS, qemu acts as another NSS client using ccid-card-emulated: +user, using libcacard, QEMU acts as another client using ccid-card-emulated: qemu -usb -device usb-ccid -device ccid-card-emulated
scripts/coverity-scan/coverity-scan.docker +0 -1
@@ -93,7 +93,6 @@ ENV PACKAGES \ mingw64-SDL2 \ ncurses-devel \ nettle-devel \ - nss-devel \ numactl-devel \ perl \ perl-Test-Harness \
tests/docker/dockerfiles/centos7.docker +1 -0
@@ -17,6 +17,7 @@ ENV PACKAGES \ glib2-devel \ gnutls-devel \ libaio-devel \ + libcacard-devel \ libepoxy-devel \ libfdt-devel \ libgcrypt-devel \
tests/docker/dockerfiles/centos8.docker +1 -0
@@ -13,6 +13,7 @@ ENV PACKAGES \ git \ glib2-devel \ libaio-devel \ + libcacard-devel \ libepoxy-devel \ libgcrypt-devel \ lzo-devel \
tests/docker/dockerfiles/fedora.docker +1 -1
@@ -27,6 +27,7 @@ ENV PACKAGES \ libasan \ libattr-devel \ libblockdev-mpath-devel \ + libcacard-devel \ libcap-ng-devel \ libcurl-devel \ libepoxy-devel \
@@ -77,7 +78,6 @@ ENV PACKAGES \ ncurses-devel \ nettle-devel \ ninja-build \ - nss-devel \ numactl-devel \ perl \ perl-Test-Harness \
tests/docker/dockerfiles/ubuntu.docker +0 -1
@@ -39,7 +39,6 @@ ENV PACKAGES \ libncurses5-dev \ libncursesw5-dev \ libnfs-dev \ - libnss3-dev \ libnuma-dev \ libpixman-1-dev \ libpng-dev \
tests/docker/dockerfiles/ubuntu1804.docker +0 -1
@@ -26,7 +26,6 @@ ENV PACKAGES \ libncurses5-dev \ libncursesw5-dev \ libnfs-dev \ - libnss3-dev \ libnuma-dev \ libpixman-1-dev \ librados-dev \
tests/docker/dockerfiles/ubuntu2004.docker +0 -1
@@ -28,7 +28,6 @@ ENV PACKAGES flex bison \ libncurses5-dev \ libncursesw5-dev \ libnfs-dev \ - libnss3-dev \ libnuma-dev \ libpixman-1-dev \ librados-dev \
Signature · 1 line
2.28.0
PATCH 3/23 tests/docker: use project specific container registries
In reply to Daniel P. BerrangéSince Docker Hub has started to enforce pull rate limits on clients, it is preferrable to use project specific container registries where they are available. Both Fedora and CentOS provide such registries.
The images in these registries are also refreshed on a more regular basis than the ones in docker hub, so the package update should generally be faster.
--- tests/docker/dockerfiles/centos7.docker | 2 +- tests/docker/dockerfiles/centos8.docker | 2 +- tests/docker/dockerfiles/fedora-cris-cross.docker | 2 +- tests/docker/dockerfiles/fedora-i386-cross.docker | 2 +- tests/docker/dockerfiles/fedora-win32-cross.docker | 2 +- tests/docker/dockerfiles/fedora-win64-cross.docker | 2 +- tests/docker/dockerfiles/fedora.docker | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-)
tests/docker/dockerfiles/centos7.docker +1 -1
@@ -1,4 +1,4 @@ -FROM centos:7 +FROM registry.centos.org/centos:7 RUN yum install -y epel-release centos-release-xen-48 RUN yum -y update
tests/docker/dockerfiles/centos8.docker +1 -1
@@ -1,4 +1,4 @@ -FROM centos:8.1.1911 +FROM registry.centos.org/centos:8 RUN dnf -y update ENV PACKAGES \
tests/docker/dockerfiles/fedora-cris-cross.docker +1 -1
@@ -2,7 +2,7 @@ # Cross compiler for cris system tests # -FROM fedora:30 +FROM registry.fedoraproject.org/fedora:30 ENV PACKAGES gcc-cris-linux-gnu RUN dnf install -y $PACKAGES RUN rpm -q $PACKAGES | sort > /packages.txt
tests/docker/dockerfiles/fedora-i386-cross.docker +1 -1
@@ -1,4 +1,4 @@ -FROM fedora:30 +FROM registry.fedoraproject.org/fedora:30 ENV PACKAGES \ gcc \ glib2-devel.i686 \
tests/docker/dockerfiles/fedora-win32-cross.docker +1 -1
@@ -1,4 +1,4 @@ -FROM fedora:32 +FROM registry.fedoraproject.org/fedora:32 # Please keep this list sorted alphabetically ENV PACKAGES \
tests/docker/dockerfiles/fedora-win64-cross.docker +1 -1
@@ -1,4 +1,4 @@ -FROM fedora:32 +FROM registry.fedoraproject.org/fedora:32 # Please keep this list sorted alphabetically ENV PACKAGES \
tests/docker/dockerfiles/fedora.docker +1 -1
@@ -1,4 +1,4 @@ -FROM fedora:32 +FROM registry.fedoraproject.org/fedora:32 # Please keep this list sorted alphabetically ENV PACKAGES \
Signature · 1 line
2.28.0
PATCH 7/23 tests/docker: fix sorting in package lists
In reply to Daniel P. BerrangéThis wil make diffs in later patches clearer.
--- tests/docker/dockerfiles/centos7.docker | 4 ++-- tests/docker/dockerfiles/fedora.docker | 4 ++-- tests/docker/dockerfiles/ubuntu1804.docker | 4 ++-- tests/docker/dockerfiles/ubuntu2004.docker | 8 +++++--- 4 files changed, 11 insertions(+), 9 deletions(-)
tests/docker/dockerfiles/centos7.docker +2 -2
@@ -5,13 +5,14 @@ RUN yum -y update # Please keep this list sorted alphabetically ENV PACKAGES \ + SDL2-devel \ bzip2 \ bzip2-devel \ ccache \ csnappy-devel \ dbus-daemon \ - gcc-c++ \ gcc \ + gcc-c++ \ gettext \ git \ glib2-devel \
@@ -32,7 +33,6 @@ ENV PACKAGES \ perl-Test-Harness \ pixman-devel \ python3 \ - SDL2-devel \ spice-glib-devel \ spice-server-devel \ tar \
tests/docker/dockerfiles/fedora.docker +2 -2
@@ -2,6 +2,7 @@ FROM registry.fedoraproject.org/fedora:32 # Please keep this list sorted alphabetically ENV PACKAGES \ + SDL2-devel \ bc \ brlapi-devel \ bzip2 \
@@ -74,10 +75,10 @@ ENV PACKAGES \ mingw64-pixman \ mingw64-pkg-config \ mingw64-SDL2 \ - nmap-ncat \ ncurses-devel \ nettle-devel \ ninja-build \ + nmap-ncat \ numactl-devel \ perl \ perl-Test-Harness \
@@ -91,7 +92,6 @@ ENV PACKAGES \ python3-sphinx \ python3-virtualenv \ rdma-core-devel \ - SDL2-devel \ snappy-devel \ sparse \ spice-server-devel \
tests/docker/dockerfiles/ubuntu1804.docker +2 -2
@@ -45,9 +45,9 @@ ENV PACKAGES \ libxen-dev \ libzstd-dev \ make \ - python3-yaml \ - python3-sphinx \ ninja-build \ + python3-sphinx \ + python3-yaml \ sparse \ xfslibs-dev RUN apt-get update && \
tests/docker/dockerfiles/ubuntu2004.docker +5 -3
@@ -1,7 +1,9 @@ FROM docker.io/library/ubuntu:20.04 -ENV PACKAGES flex bison \ +ENV PACKAGES \ + bison \ ccache \ clang-10\ + flex \ gcc \ genisoimage \ gettext \
@@ -60,8 +62,8 @@ ENV PACKAGES flex bison \ sparse \ tesseract-ocr \ tesseract-ocr-eng \ - xfslibs-dev\ - vim + vim \ + xfslibs-dev RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get -y install $PACKAGES RUN dpkg -l $PACKAGES | sort > /packages.txt
Signature · 1 line
2.28.0
PATCH 4/23 tests/docker: use explicit docker.io registry
In reply to Daniel P. BerrangéIt is good practice to use an explicit registry for referencing the base image. This is because some distros will inject their own registries into the search path. For example registry.fedoraproject.org comes ahead of docker.io. Using an explicit registry avoids wasting time querying multiple registries for images that they won't have.
--- tests/docker/dockerfiles/debian-xtensa-cross.docker | 2 +- tests/docker/dockerfiles/debian10.docker | 2 +- tests/docker/dockerfiles/debian11.docker | 2 +- tests/docker/dockerfiles/ubuntu.docker | 2 +- tests/docker/dockerfiles/ubuntu1804.docker | 2 +- tests/docker/dockerfiles/ubuntu2004.docker | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-)
tests/docker/dockerfiles/debian-xtensa-cross.docker +1 -1
@@ -5,7 +5,7 @@ # using a prebuilt toolchains for Xtensa cores from: # https://github.com/foss-xtensa/toolchain/releases # -FROM debian:stretch-slim +FROM docker.io/library/debian:stretch-slim RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata && \
tests/docker/dockerfiles/debian10.docker +1 -1
@@ -7,7 +7,7 @@ # On its own you can't build much but the docker-foo-cross targets # build on top of the base debian image. # -FROM debian:buster-slim +FROM docker.io/library/debian:buster-slim # Duplicate deb line as deb-src RUN cat /etc/apt/sources.list | sed "s/^deb\ /deb-src /" >> /etc/apt/sources.list
tests/docker/dockerfiles/debian11.docker +1 -1
@@ -8,7 +8,7 @@ # On its own you can't build much but the docker-foo-cross targets # build on top of the base debian image. # -FROM debian:bullseye-slim +FROM docker.io/library/debian:bullseye-slim # Duplicate deb line as deb-src RUN cat /etc/apt/sources.list | sed "s/^deb\ /deb-src /" >> /etc/apt/sources.list
tests/docker/dockerfiles/ubuntu.docker +1 -1
@@ -9,7 +9,7 @@ # system won't pick up that it has changed. # -FROM ubuntu:20.04 +FROM docker.io/library/ubuntu:20.04 ENV PACKAGES \ ccache \ clang \
tests/docker/dockerfiles/ubuntu1804.docker +1 -1
@@ -1,4 +1,4 @@ -FROM ubuntu:18.04 +FROM docker.io/library/ubuntu:18.04 ENV PACKAGES \ ccache \ clang \
tests/docker/dockerfiles/ubuntu2004.docker +1 -1
@@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM docker.io/library/ubuntu:20.04 ENV PACKAGES flex bison \ ccache \ clang-10\
Signature · 1 line
2.28.0
PATCH 6/23 tests/docker: remove FEATURES env var from templates
In reply to Daniel P. BerrangéIn preparation for switching to auto-generated dockerfiles, remove the FEATURES env variable. The equivalent functionality can be achieved in most cases by just looking for existance of a binary.
The cases which don't correspond to binaries are simply dropped because configure/meson will probe for any requested feature anyway.
--- tests/docker/common.rc | 19 ++++++++++++++----- tests/docker/dockerfiles/debian10.docker | 2 -- .../dockerfiles/fedora-win32-cross.docker | 1 - .../dockerfiles/fedora-win64-cross.docker | 1 - tests/docker/dockerfiles/fedora.docker | 1 - tests/docker/dockerfiles/ubuntu.docker | 1 - tests/docker/dockerfiles/ubuntu1804.docker | 1 - tests/docker/dockerfiles/ubuntu2004.docker | 1 - tests/docker/run | 3 --- tests/docker/test-clang | 2 +- tests/docker/test-debug | 2 +- tests/docker/test-mingw | 3 ++- tests/docker/test-misc | 2 +- tests/docker/test-tsan | 2 +- 14 files changed, 20 insertions(+), 21 deletions(-)
tests/docker/common.rc +14 -5
@@ -15,14 +15,23 @@ # overriden by TARGET_LIST if the user sets it. DEF_TARGET_LIST=${DEF_TARGET_LIST:-"x86_64-softmmu,aarch64-softmmu"} -requires() +requires_binary() { + found=0 for c in $@; do - if ! echo "$FEATURES" | grep -wq -e "$c"; then - echo "Prerequisite '$c' not present, skip" - exit 0 - fi + for d in /bin /usr/bin /usr/local/bin + do + if test -f "$d/$c" + then + found=1 + fi + done done + if test "$found" != "1" + then + echo "Prerequisite '$c' not present, skip" + exit 0 + fi } configure_qemu()
tests/docker/dockerfiles/debian10.docker +0 -2
@@ -32,5 +32,3 @@ RUN apt update && \ python3 \ python3-sphinx \ $(apt-get -s build-dep qemu | egrep ^Inst | fgrep '[all]' | cut -d\ -f2) - -ENV FEATURES docs
tests/docker/dockerfiles/fedora-win32-cross.docker +0 -1
@@ -35,7 +35,6 @@ ENV PACKAGES \ RUN dnf install -y $PACKAGES RUN rpm -q $PACKAGES | sort > /packages.txt -ENV FEATURES mingw # Specify the cross prefix for this image (see tests/docker/common.rc) ENV QEMU_CONFIGURE_OPTS --cross-prefix=i686-w64-mingw32-
tests/docker/dockerfiles/fedora-win64-cross.docker +0 -1
@@ -31,7 +31,6 @@ ENV PACKAGES \ RUN dnf install -y $PACKAGES RUN rpm -q $PACKAGES | sort > /packages.txt -ENV FEATURES mingw # Specify the cross prefix for this image (see tests/docker/common.rc) ENV QEMU_CONFIGURE_OPTS --cross-prefix=x86_64-w64-mingw32- --disable-capstone
tests/docker/dockerfiles/fedora.docker +0 -1
@@ -111,4 +111,3 @@ ENV QEMU_CONFIGURE_OPTS --python=/usr/bin/python3 RUN dnf install -y $PACKAGES RUN rpm -q $PACKAGES | sort > /packages.txt ENV PATH $PATH:/usr/libexec/python3-sphinx/ -ENV FEATURES mingw clang pyyaml asan docs
tests/docker/dockerfiles/ubuntu.docker +0 -1
@@ -67,4 +67,3 @@ ENV PACKAGES \ RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get -y install $PACKAGES RUN dpkg -l $PACKAGES | sort > /packages.txt -ENV FEATURES clang pyyaml sdl2 docs
tests/docker/dockerfiles/ubuntu1804.docker +0 -1
@@ -53,7 +53,6 @@ ENV PACKAGES \ RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get -y install $PACKAGES RUN dpkg -l $PACKAGES | sort > /packages.txt -ENV FEATURES clang pyyaml sdl2 docs # https://bugs.launchpad.net/qemu/+bug/1838763 ENV QEMU_CONFIGURE_OPTS --disable-libssh
tests/docker/dockerfiles/ubuntu2004.docker +0 -1
@@ -65,7 +65,6 @@ ENV PACKAGES flex bison \ RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get -y install $PACKAGES RUN dpkg -l $PACKAGES | sort > /packages.txt -ENV FEATURES clang tsan pyyaml sdl2 # Apply patch https://reviews.llvm.org/D75820 # This is required for TSan in clang-10 to compile with QEMU.
tests/docker/run +0 -3
@@ -30,9 +30,6 @@ mkdir -p $TEST_DIR/{src,build,install} # Extract the source tarballs tar -C $TEST_DIR/src -xf $BASE/qemu.tar || { echo "Failed to untar source"; exit 2; } -if test -f $TEST_DIR/src/Makefile; then - export FEATURES="$FEATURES dtc" -fi if test -n "$SHOW_ENV"; then if test -f /packages.txt; then
tests/docker/test-clang +1 -1
@@ -13,7 +13,7 @@ . common.rc -requires clang +requires_binary clang cd "$BUILD_DIR"
tests/docker/test-debug +1 -1
@@ -14,7 +14,7 @@ . common.rc -requires clang asan +requires_binary clang cd "$BUILD_DIR"
tests/docker/test-mingw +2 -1
@@ -13,7 +13,8 @@ . common.rc -requires mingw dtc +requires_binary x86_64-w64-mingw32-gcc +requires_binary i686-w64-mingw32-gcc cd "$BUILD_DIR"
tests/docker/test-misc +1 -1
@@ -14,7 +14,7 @@ . common.rc -requires docs +requires_binary sphinx-build-3 sphinx-build cd "$BUILD_DIR"
tests/docker/test-tsan +1 -1
@@ -17,7 +17,7 @@ setup_tsan() { - requires clang tsan + requires_binary clang tsan_log_dir="/tmp/qemu-test/build/tsan" mkdir -p $tsan_log_dir > /dev/null || true EXTRA_CONFIGURE_OPTS="${EXTRA_CONFIGURE_OPTS} --enable-tsan \
Signature · 1 line
2.28.0
PATCH 5/23 tests/docker: remove travis container
In reply to Daniel P. BerrangéThe travis container that we have no longer matches what travis currently uses. As all x86 jobs are being moved to GitLab CI too, there is no compelling reason to update the travis container. It is simpler to just remove it.
--- tests/docker/dockerfiles/travis.docker | 17 ---------- tests/docker/travis | 22 ------------ tests/docker/travis.py | 47 -------------------------- 3 files changed, 86 deletions(-) delete mode 100644 tests/docker/dockerfiles/travis.docker delete mode 100755 tests/docker/travis delete mode 100755 tests/docker/travis.py
tests/docker/dockerfiles/travis.docker deleted +0 -17
@@ -1,17 +0,0 @@ -# -# Travis Image - this is broadly the same image that we run our CI -# tests on. -# -FROM travisci/ci-sardonyx:packer-1552557266-f909ac5 -ENV DEBIAN_FRONTEND noninteractive -ENV LANG en_US.UTF-8 -ENV LC_ALL en_US.UTF-8 -RUN sed -i "s/# deb-src/deb-src/" /etc/apt/sources.list -RUN apt-get update -RUN apt-get -y build-dep qemu -RUN apt-get -y install device-tree-compiler python3 python3-yaml dh-autoreconf gdb strace lsof net-tools gcovr ninja-build -# Travis tools require PhantomJS / Neo4j / Maven accessible -# in their PATH (QEMU build won't access them). -ENV PATH /usr/local/phantomjs/bin:/usr/local/phantomjs:/usr/local/neo4j-3.2.7/bin:/usr/local/maven-3.5.2/bin:/usr/local/cmake-3.9.2/bin:/usr/local/clang-5.0.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin -ENV FEATURES clang pyyaml docs -USER travis
tests/docker/travis deleted +0 -22
@@ -1,22 +0,0 @@ -#!/bin/bash -e -# -# Mimic a travis testing matrix -# -# Copyright (c) 2016 Red Hat Inc. -# -# Authors: -# Fam Zheng <[email protected]> -# -# This work is licensed under the terms of the GNU GPL, version 2 -# or (at your option) any later version. See the COPYING file in -# the top-level directory. - -. common.rc - -requires pyyaml -cmdfile=/tmp/travis_cmd_list.sh -$QEMU_SRC/tests/docker/travis.py $QEMU_SRC/.travis.yml > $cmdfile -chmod +x $cmdfile -cd "$QEMU_SRC" -unset BUILD_DIR SRC_DIR -$cmdfile
tests/docker/travis.py deleted +0 -47
47 lines not on this page · raw message
Signature · 1 line
2.28.0
PATCH 8/23 tests/docker: fix mistakes in centos package lists
In reply to Daniel P. Berrangédbus-daemon doesn't exist in centos7, it is part of dbus.
snappy is used by QEMU, not csnappy.
mesa-libEGL-devel is not used in QEMU at all, but mesa-libgbm-devel is.
vte291-devel is required for GTK3, not vte-devel.
spice-glib-devel is not use in QEMU at all, but spice-protocol is.
librdmacm-devel is a virtual provides for compat, the actual package used is rdma-core-devel.
There is no need to specifically refer to python36, we can just use python3 as in other distros.
--- tests/docker/dockerfiles/centos7.docker | 11 +++++------ tests/docker/dockerfiles/centos8.docker | 10 +++++----- 2 files changed, 10 insertions(+), 11 deletions(-)
tests/docker/dockerfiles/centos7.docker +5 -6
@@ -9,8 +9,7 @@ ENV PACKAGES \ bzip2 \ bzip2-devel \ ccache \ - csnappy-devel \ - dbus-daemon \ + dbus \ gcc \ gcc-c++ \ gettext \
@@ -22,21 +21,21 @@ ENV PACKAGES \ libepoxy-devel \ libfdt-devel \ libgcrypt-devel \ - librdmacm-devel \ libzstd-devel \ lzo-devel \ make \ - mesa-libEGL-devel \ mesa-libgbm-devel \ nettle-devel \ ninja-build \ perl-Test-Harness \ pixman-devel \ python3 \ - spice-glib-devel \ + rdma-core-devel \ + snappy-devel \ + spice-protocol \ spice-server-devel \ tar \ - vte-devel \ + vte291-devel \ xen-devel \ zlib-devel RUN yum install -y $PACKAGES
tests/docker/dockerfiles/centos8.docker +5 -5
@@ -18,16 +18,16 @@ ENV PACKAGES \ libgcrypt-devel \ lzo-devel \ make \ - mesa-libEGL-devel \ - nmap-ncat \ + mesa-libgbm-devel \ nettle-devel \ ninja-build \ + nmap-ncat \ perl-Test-Harness \ pixman-devel \ - python36 \ + python3 \ rdma-core-devel \ - spice-glib-devel \ - spice-server \ + spice-protocol \ + spice-server-devel \ tar \ zlib-devel
Signature · 1 line
2.28.0
PATCH 10/23 tests/docker: fix mistakes in ubuntu package lists
In reply to Daniel P. Berrangélibrados-dev is not required by QEMU directly, only librbd-dev.
glusterfs-common is not directly needed by QEMU.
QEMU uses ncursesw only on non-Windows hosts.
The clang package is clang 10.
flex and bison are not required by QEMU.
Standardize on nmap ncat implementation to match Fedora/CentOS.
vim-nox is preferred over vim as it is smaller and graphics aren't needed in containers.
--- tests/docker/dockerfiles/ubuntu1804.docker | 3 --- tests/docker/dockerfiles/ubuntu2004.docker | 11 +++-------- 2 files changed, 3 insertions(+), 11 deletions(-)
tests/docker/dockerfiles/ubuntu1804.docker +0 -3
@@ -5,7 +5,6 @@ ENV PACKAGES \ gcc \ gettext \ git \ - glusterfs-common \ libaio-dev \ libattr1-dev \ libbrlapi-dev \
@@ -23,12 +22,10 @@ ENV PACKAGES \ libjemalloc-dev \ libjpeg-turbo8-dev \ liblzo2-dev \ - libncurses5-dev \ libncursesw5-dev \ libnfs-dev \ libnuma-dev \ libpixman-1-dev \ - librados-dev \ librbd-dev \ librdmacm-dev \ libsasl2-dev \
tests/docker/dockerfiles/ubuntu2004.docker +3 -8
@@ -1,14 +1,11 @@ FROM docker.io/library/ubuntu:20.04 ENV PACKAGES \ - bison \ ccache \ - clang-10\ - flex \ + clang \ gcc \ genisoimage \ gettext \ git \ - glusterfs-common \ libaio-dev \ libattr1-dev \ libbrlapi-dev \
@@ -27,12 +24,10 @@ ENV PACKAGES \ libjpeg-turbo8-dev \ liblttng-ust-dev \ liblzo2-dev \ - libncurses5-dev \ libncursesw5-dev \ libnfs-dev \ libnuma-dev \ libpixman-1-dev \ - librados-dev \ librbd-dev \ librdmacm-dev \ libsasl2-dev \
@@ -49,7 +44,7 @@ ENV PACKAGES \ libxen-dev \ libzstd-dev \ make \ - netcat-openbsd \ + ncat \ ninja-build \ python3-numpy \ python3-opencv \
@@ -62,7 +57,7 @@ ENV PACKAGES \ sparse \ tesseract-ocr \ tesseract-ocr-eng \ - vim \ + vim-nox \ xfslibs-dev RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get -y install $PACKAGES
Signature · 1 line
2.28.0
PATCH 13/23 tests/docker: expand centos7 package list
In reply to Daniel P. BerrangéThis is the fully expanded list of build pre-requisites QEMU can conceivably use in any scenario.
--- tests/docker/dockerfiles/centos7.docker | 58 +++++++++++++++++++++++++ 1 file changed, 58 insertions(+)
tests/docker/dockerfiles/centos7.docker +58 -0
@@ -6,37 +6,95 @@ RUN yum -y update # Please keep this list sorted alphabetically ENV PACKAGES \ SDL2-devel \ + alsa-lib-devel \ + bc \ + brlapi-devel \ bzip2 \ bzip2-devel \ + ca-certificates \ + capstone-devel \ ccache \ + clang \ + cyrus-sasl-devel \ + daxctl-devel \ dbus \ + device-mapper-multipath-devel \ + diffutils \ + findutils \ gcc \ gcc-c++ \ + genisoimage \ gettext \ git \ glib2-devel \ + glibc-common \ + glusterfs-api-devel \ gnutls-devel \ + gtk3-devel \ + hostname \ libaio-devel \ + libasan \ + libattr-devel \ libcacard-devel \ + libcap-ng-devel \ + libcurl-devel \ + libdrm-devel \ libepoxy-devel \ libfdt-devel \ libgcrypt-devel \ + libiscsi-devel \ + libjpeg-devel \ + libnfs-devel \ + libpmem-devel \ + libpng-devel \ + librbd1-devel \ + libseccomp-devel \ + libssh-devel \ + libtasn1-devel \ + libudev-devel \ + libusbx-devel \ + libxml2-devel \ libzstd-devel \ lzo-devel \ make \ mesa-libgbm-devel \ + ncurses-devel \ nettle-devel \ ninja-build \ + nmap-ncat \ + numactl-devel \ + openssh-clients \ + pam-devel \ + perl \ perl-Test-Harness \ pixman-devel \ + pkgconfig \ + pulseaudio-libs-devel \ python3 \ + python3-PyYAML \ + python3-numpy \ + python3-pillow \ + python3-pip \ + python3-setuptools \ + python3-sphinx \ + python3-virtualenv \ + python3-wheel \ rdma-core-devel \ + rpm \ snappy-devel \ + sparse \ spice-protocol \ spice-server-devel \ + systemd-devel \ + systemtap-sdt-devel \ tar \ + texinfo \ + usbredir-devel \ + vim-minimal \ vte291-devel \ + which \ xen-devel \ + xfsprogs-devel \ zlib-devel RUN yum install -y $PACKAGES RUN rpm -q $PACKAGES | sort > /packages.txt
Signature · 1 line
2.28.0
PATCH 12/23 tests/docker: add script for automating container refresh
In reply to Daniel P. Berrangé--- tests/docker/dockerfiles/refresh | 53 ++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100755 tests/docker/dockerfiles/refresh
tests/docker/dockerfiles/refresh new file +53 -0
@@ -0,0 +1,53 @@ +#!/usr/bin/python3 +# +# Re-generate container recipes +# +# This script uses the "lcitool" available from +# +# https://gitlab.com/libvirt/libvirt-ci +# +# Copyright (c) 2020 Red Hat Inc. +# +# This work is licensed under the terms of the GNU GPL, version 2 +# or (at your option) any later version. See the COPYING file in +# the top-level directory. + +import sys +import os +import subprocess + +if len(sys.argv) != 2: + print("syntax: %s PATH-TO-LCITOOL" % sys.argv[0], file=sys.stderr) + sys.exit(1) + +lcitool_path=sys.argv[1] + +def atomic_write(filename, content): + try: + with open(filename + ".tmp", "w") as fp: + print(content, file=fp, end="") + os.replace(filename + ".tmp", filename) + except Exception as ex: + os.unlink(filename + ".tmp") + raise + +def generate_image(filename, host, cross=None, trailer=None): + print("Generate %s" % filename) + args = [lcitool_path, "dockerfile"] + if cross is not None: + args.extend(["--cross", cross]) + args.extend([host, "qemu"]) + lcitool=subprocess.run(args, capture_output=True) + + if lcitool.returncode != 0: + raise Exception("Failed to generate %s: %s" % (filename, lcitool.stderr)) + + content = lcitool.stdout.decode("utf8") + if trailer is not None: + content += trailer + atomic_write(filename, content) + +try: + pass +except Exception as ex: + print(str(ex), file=sys.stderr)
Signature · 1 line
2.28.0
PATCH 9/23 tests/docker: fix mistakes in fedora package list
In reply to Daniel P. Berrangéllvm is not required by QEMU, just clang.
libblockdev-mpath-devel is not used by QEMU, rather it wants device-mapper-multipath-devel.
--- tests/docker/dockerfiles/fedora.docker | 2 -- 1 file changed, 2 deletions(-)
tests/docker/dockerfiles/fedora.docker +0 -2
@@ -27,7 +27,6 @@ ENV PACKAGES \ libaio-devel \ libasan \ libattr-devel \ - libblockdev-mpath-devel \ libcacard-devel \ libcap-ng-devel \ libcurl-devel \
@@ -45,7 +44,6 @@ ENV PACKAGES \ libusbx-devel \ libxml2-devel \ libzstd-devel \ - llvm \ lzo-devel \ make \ mingw32-bzip2 \
Signature · 1 line
2.28.0
PATCH 17/23 tests/docker: expand ubuntu2004 package list
In reply to Daniel P. BerrangéThis is the fully expanded list of build pre-requisites QEMU can conceivably use in any scenario.
--- tests/docker/dockerfiles/ubuntu2004.docker | 42 +++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-)
tests/docker/dockerfiles/ubuntu2004.docker +41 -1
@@ -1,22 +1,39 @@ FROM docker.io/library/ubuntu:20.04 ENV PACKAGES \ + bc \ + bzip2 \ + ca-certificates \ ccache \ clang \ + dbus \ + debianutils \ + diffutils \ + findutils \ + g++ \ gcc \ genisoimage \ gettext \ git \ + hostname \ libaio-dev \ + libasan5 \ + libasound2-dev \ libattr1-dev \ libbrlapi-dev \ libbz2-dev \ libcacard-dev \ libcap-ng-dev \ + libcapstone-dev \ libcurl4-gnutls-dev \ + libdaxctl-dev \ libdrm-dev \ libepoxy-dev \ libfdt-dev \ libgbm-dev \ + libgcrypt20-dev \ + libglib2.0-dev \ + libglusterfs-dev \ + libgnutls28-dev \ libgtk-3-dev \ libibverbs-dev \ libiscsi-dev \
@@ -27,7 +44,11 @@ ENV PACKAGES \ libncursesw5-dev \ libnfs-dev \ libnuma-dev \ + libpam0g-dev \ libpixman-1-dev \ + libpmem-dev \ + libpng-dev \ + libpulse-dev \ librbd-dev \ librdmacm-dev \ libsasl2-dev \
@@ -37,28 +58,47 @@ ENV PACKAGES \ libspice-protocol-dev \ libspice-server-dev \ libssh-dev \ + libsystemd-dev \ + libtasn1-6-dev \ + libtest-harness-perl \ + libubsan1 \ + libudev-dev \ libusb-1.0-0-dev \ libusbredirhost-dev \ libvdeplug-dev \ + libvirglrenderer-dev \ libvte-2.91-dev \ libxen-dev \ + libxml2-dev \ libzstd-dev \ + locales \ make \ ncat \ + nettle-dev \ ninja-build \ + openssh-client \ + perl \ + pkgconf \ + python3 \ python3-numpy \ python3-opencv \ python3-pil \ python3-pip \ + python3-setuptools \ python3-sphinx \ python3-venv \ + python3-wheel \ python3-yaml \ rpm2cpio \ sparse \ + systemtap-sdt-dev \ + tar \ tesseract-ocr \ tesseract-ocr-eng \ + texinfo \ vim-nox \ - xfslibs-dev + xfslibs-dev \ + zlib1g-dev RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get -y install $PACKAGES RUN dpkg -l $PACKAGES | sort > /packages.txt
Signature · 1 line
2.28.0
PATCH 14/23 tests/docker: expand centos8 package list
In reply to Daniel P. BerrangéThis is the fully expanded list of build pre-requisites QEMU can conceivably use in any scenario.
--- tests/docker/dockerfiles/centos8.docker | 64 +++++++++++++++++++++++++ 1 file changed, 64 insertions(+)
tests/docker/dockerfiles/centos8.docker +64 -0
@@ -3,32 +3,96 @@ FROM registry.centos.org/centos:8 RUN dnf -y update ENV PACKAGES \ SDL2-devel \ + alsa-lib-devel \ + bc \ + brlapi-devel \ bzip2 \ bzip2-devel \ + ca-certificates \ + capstone-devel \ + ccache \ + clang \ + cyrus-sasl-devel \ + daxctl-devel \ dbus-daemon \ + device-mapper-multipath-devel \ + diffutils \ + findutils \ gcc \ gcc-c++ \ genisoimage \ gettext \ git \ glib2-devel \ + glibc-langpack-en \ + glusterfs-api-devel \ + gnutls-devel \ + gtk3-devel \ + hostname \ libaio-devel \ + libasan \ + libattr-devel \ libcacard-devel \ + libcap-ng-devel \ + libcurl-devel \ + libdrm-devel \ libepoxy-devel \ + libfdt-devel \ libgcrypt-devel \ + libiscsi-devel \ + libjpeg-devel \ + libnfs-devel \ + libpmem-devel \ + libpng-devel \ + librbd-devel \ + libseccomp-devel \ + libslirp-devel \ + libssh-devel \ + libtasn1-devel \ + libubsan \ + libudev-devel \ + libusbx-devel \ + libxml2-devel \ + libzstd-devel \ lzo-devel \ make \ mesa-libgbm-devel \ + ncurses-devel \ nettle-devel \ ninja-build \ nmap-ncat \ + numactl-devel \ + openssh-clients \ + pam-devel \ + perl \ perl-Test-Harness \ pixman-devel \ + pkgconfig \ + pulseaudio-libs-devel \ python3 \ + python3-PyYAML \ + python3-numpy \ + python3-pillow \ + python3-pip \ + python3-setuptools \ + python3-sphinx \ + python3-virtualenv \ + python3-wheel \ rdma-core-devel \ + rpm \ + snappy-devel \ spice-protocol \ spice-server-devel \ + systemd-devel \ + systemtap-sdt-devel \ tar \ + texinfo \ + usbredir-devel \ + vim-minimal \ + virglrenderer-devel \ + vte291-devel \ + which \ + xfsprogs-devel \ zlib-devel RUN dnf install -y dnf-plugins-core && \
Signature · 1 line
2.28.0
PATCH 18/23 tests/docker: auto-generate centos7 with lcitool
In reply to Daniel P. BerrangéThis commit is best examined using the "-b" option to diff.
--- tests/docker/dockerfiles/centos7.docker | 213 +++++++++++++----------- tests/docker/dockerfiles/refresh | 2 +- 2 files changed, 117 insertions(+), 98 deletions(-)
tests/docker/dockerfiles/centos7.docker +116 -97
@@ -1,100 +1,119 @@ +# THIS FILE IS AUTO-GENERATED +# +# $ lcitool dockerfile centos-7 qemu +# +# https://gitlab.com/berrange/libvirt-ci/-/commit/5ae4c04258978fae40be7113ac33587d71fe3c4f + FROM registry.centos.org/centos:7 -RUN yum install -y epel-release centos-release-xen-48 -RUN yum -y update +RUN echo 'skip_missing_names_on_install=0' >> /etc/yum.conf && \ + yum install -y epel-release && \ + yum install -y centos-release-xen-48 && \ + yum update -y && \ + yum install -y \ + SDL2-devel \ + alsa-lib-devel \ + bc \ + brlapi-devel \ + bzip2 \ + bzip2-devel \ + ca-certificates \ + capstone-devel \ + ccache \ + clang \ + cyrus-sasl-devel \ + daxctl-devel \ + dbus \ + device-mapper-multipath-devel \ + diffutils \ + findutils \ + gcc \ + gcc-c++ \ + genisoimage \ + gettext \ + git \ + glib2-devel \ + glibc-common \ + glusterfs-api-devel \ + gnutls-devel \ + gtk3-devel \ + hostname \ + libaio-devel \ + libasan \ + libattr-devel \ + libcacard-devel \ + libcap-ng-devel \ + libcurl-devel \ + libdrm-devel \ + libepoxy-devel \ + libfdt-devel \ + libgcrypt-devel \ + libiscsi-devel \ + libjpeg-devel \ + libnfs-devel \ + libpmem-devel \ + libpng-devel \ + librbd1-devel \ + libseccomp-devel \ + libssh-devel \ + libtasn1-devel \ + libudev-devel \ + libusbx-devel \ + libxml2-devel \ + libzstd-devel \ + lzo-devel \ + make \ + mesa-libgbm-devel \ + ncurses-devel \ + nettle-devel \ + ninja-build \ + nmap-ncat \ + numactl-devel \ + openssh-clients \ + pam-devel \ + perl \ + perl-Test-Harness \ + pixman-devel \ + pkgconfig \ + pulseaudio-libs-devel \ + python3 \ + python3-PyYAML \ + python3-numpy \ + python3-pillow \ + python3-pip \ + python3-setuptools \ + python3-sphinx \ + python3-virtualenv \ + python3-wheel \ + rdma-core-devel \ + rpm \ + snappy-devel \ + sparse \ + spice-protocol \ + spice-server-devel \ + systemd-devel \ + systemtap-sdt-devel \ + tar \ + texinfo \ + usbredir-devel \ + vim-minimal \ + vte291-devel \ + which \ + xen-devel \ + xfsprogs-devel \ + zlib-devel && \ + yum autoremove -y && \ + yum clean all -y && \ + rpm -qa | sort > /packages.txt && \ + mkdir -p /usr/libexec/ccache-wrappers && \ + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \ + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/$(basename /usr/bin/gcc) + +RUN pip3 install \ + meson==0.54.0 -# Please keep this list sorted alphabetically -ENV PACKAGES \ - SDL2-devel \ - alsa-lib-devel \ - bc \ - brlapi-devel \ - bzip2 \ - bzip2-devel \ - ca-certificates \ - capstone-devel \ - ccache \ - clang \ - cyrus-sasl-devel \ - daxctl-devel \ - dbus \ - device-mapper-multipath-devel \ - diffutils \ - findutils \ - gcc \ - gcc-c++ \ - genisoimage \ - gettext \ - git \ - glib2-devel \ - glibc-common \ - glusterfs-api-devel \ - gnutls-devel \ - gtk3-devel \ - hostname \ - libaio-devel \ - libasan \ - libattr-devel \ - libcacard-devel \ - libcap-ng-devel \ - libcurl-devel \ - libdrm-devel \ - libepoxy-devel \ - libfdt-devel \ - libgcrypt-devel \ - libiscsi-devel \ - libjpeg-devel \ - libnfs-devel \ - libpmem-devel \ - libpng-devel \ - librbd1-devel \ - libseccomp-devel \ - libssh-devel \ - libtasn1-devel \ - libudev-devel \ - libusbx-devel \ - libxml2-devel \ - libzstd-devel \ - lzo-devel \ - make \ - mesa-libgbm-devel \ - ncurses-devel \ - nettle-devel \ - ninja-build \ - nmap-ncat \ - numactl-devel \ - openssh-clients \ - pam-devel \ - perl \ - perl-Test-Harness \ - pixman-devel \ - pkgconfig \ - pulseaudio-libs-devel \ - python3 \ - python3-PyYAML \ - python3-numpy \ - python3-pillow \ - python3-pip \ - python3-setuptools \ - python3-sphinx \ - python3-virtualenv \ - python3-wheel \ - rdma-core-devel \ - rpm \ - snappy-devel \ - sparse \ - spice-protocol \ - spice-server-devel \ - systemd-devel \ - systemtap-sdt-devel \ - tar \ - texinfo \ - usbredir-devel \ - vim-minimal \ - vte291-devel \ - which \ - xen-devel \ - xfsprogs-devel \ - zlib-devel -RUN yum install -y $PACKAGES -RUN rpm -q $PACKAGES | sort > /packages.txt +ENV LANG "en_US.UTF-8" +ENV MAKE "/usr/bin/make" +ENV NINJA "/usr/bin/ninja-build" +ENV PYTHON "/usr/bin/python3" +ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
tests/docker/dockerfiles/refresh +1 -1
@@ -48,6 +48,6 @@ def generate_image(filename, host, cross=None, trailer=None): atomic_write(filename, content) try: - pass + generate_image("centos7.docker", "centos-7") except Exception as ex: print(str(ex), file=sys.stderr)
Signature · 1 line
2.28.0
PATCH 11/23 tests/docker: remove mingw packages from Fedora
In reply to Daniel P. BerrangéThere are dedicated containers provide mingw packages for Fedora.
--- tests/docker/dockerfiles/fedora.docker | 27 -------------------------- 1 file changed, 27 deletions(-)
tests/docker/dockerfiles/fedora.docker +0 -27
@@ -46,33 +46,6 @@ ENV PACKAGES \ libzstd-devel \ lzo-devel \ make \ - mingw32-bzip2 \ - mingw32-curl \ - mingw32-glib2 \ - mingw32-gmp \ - mingw32-gnutls \ - mingw32-gtk3 \ - mingw32-libjpeg-turbo \ - mingw32-libpng \ - mingw32-libtasn1 \ - mingw32-nettle \ - mingw32-nsis \ - mingw32-pixman \ - mingw32-pkg-config \ - mingw32-SDL2 \ - mingw64-bzip2 \ - mingw64-curl \ - mingw64-glib2 \ - mingw64-gmp \ - mingw64-gnutls \ - mingw64-gtk3 \ - mingw64-libjpeg-turbo \ - mingw64-libpng \ - mingw64-libtasn1 \ - mingw64-nettle \ - mingw64-pixman \ - mingw64-pkg-config \ - mingw64-SDL2 \ ncurses-devel \ nettle-devel \ ninja-build \
Signature · 1 line
2.28.0
PATCH 20/23 tests/docker: auto-generate fedora with lcitool
In reply to Daniel P. BerrangéThis commit is best examined using the "-b" option to diff.
--- tests/docker/dockerfiles/centos8.docker | 2 +- tests/docker/dockerfiles/fedora.docker | 233 +++++++++++++----------- tests/docker/dockerfiles/refresh | 1 + 3 files changed, 130 insertions(+), 106 deletions(-)
tests/docker/dockerfiles/centos8.docker +1 -1
@@ -2,7 +2,7 @@ # # $ lcitool dockerfile centos-8 qemu # -# https://gitlab.com/berrange/libvirt-ci/-/commit/5ae4c04258978fae40be7113ac33587d71fe3c4f +# https://gitlab.com/libvirt/libvirt-ci/-/commit/5ae4c04258978fae40be7113ac33587d71fe3c4f FROM registry.centos.org/centos:8
tests/docker/dockerfiles/fedora.docker +128 -105
236 lines not on this page · raw message
tests/docker/dockerfiles/refresh +1 -0
@@ -50,5 +50,6 @@ def generate_image(filename, host, cross=None, trailer=None): try: generate_image("centos7.docker", "centos-7") generate_image("centos8.docker", "centos-8") + generate_image("fedora.docker", "fedora-32") except Exception as ex: print(str(ex), file=sys.stderr)
Signature · 1 line
2.28.0
PATCH 22/23 tests/docker: auto-generate ubuntu2004 with lcitool
In reply to Daniel P. BerrangéThis commit is best examined using the "-b" option to diff.
--- tests/docker/dockerfiles/refresh | 6 + tests/docker/dockerfiles/ubuntu2004.docker | 230 ++++++++++++--------- 2 files changed, 133 insertions(+), 103 deletions(-)
tests/docker/dockerfiles/refresh +6 -0
@@ -57,5 +57,11 @@ try: generate_image("ubuntu1804.docker", "ubuntu-1804", trailer="".join(skipssh)) + + tsanhack = ["# Apply patch https://reviews.llvm.org/D75820\n", + "# This is required for TSan in clang-10 to compile with QEMU.\n", + "RUN sed -i 's/^const/static const/g' /usr/lib/llvm-10/lib/clang/10.0.0/include/sanitizer/tsan_interface.h\n"] + generate_image("ubuntu2004.docker", "ubuntu-2004", + trailer="".join(tsanhack)) except Exception as ex: print(str(ex), file=sys.stderr)
tests/docker/dockerfiles/ubuntu2004.docker +127 -103
235 lines not on this page · raw message
Signature · 1 line
2.28.0
PATCH 16/23 tests/docker: expand ubuntu1804 package list
In reply to Daniel P. BerrangéThis is the fully expanded list of build pre-requisites QEMU can conceivably use in any scenario.
--- tests/docker/dockerfiles/ubuntu1804.docker | 54 +++++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-)
tests/docker/dockerfiles/ubuntu1804.docker +53 -1
@@ -1,31 +1,54 @@ FROM docker.io/library/ubuntu:18.04 ENV PACKAGES \ + bc \ + bzip2 \ + ca-certificates \ ccache \ clang \ + dbus \ + debianutils \ + diffutils \ + findutils \ + g++ \ gcc \ + genisoimage \ gettext \ git \ + glusterfs-common \ + hostname \ libaio-dev \ + libasan5 \ + libasound2-dev \ libattr1-dev \ libbrlapi-dev \ libbz2-dev \ libcacard-dev \ libcap-ng-dev \ + libcapstone-dev \ libcurl4-gnutls-dev \ + libdaxctl-dev \ libdrm-dev \ libepoxy-dev \ libfdt-dev \ libgbm-dev \ + libgcrypt20-dev \ + libglib2.0-dev \ + libgnutls28-dev \ libgtk-3-dev \ libibverbs-dev \ libiscsi-dev \ libjemalloc-dev \ libjpeg-turbo8-dev \ + liblttng-ust-dev \ liblzo2-dev \ libncursesw5-dev \ libnfs-dev \ libnuma-dev \ + libpam0g-dev \ libpixman-1-dev \ + libpmem-dev \ + libpng-dev \ + libpulse-dev \ librbd-dev \ librdmacm-dev \ libsasl2-dev \
@@ -35,18 +58,47 @@ ENV PACKAGES \ libspice-protocol-dev \ libspice-server-dev \ libssh-dev \ + libsystemd-dev \ + libtasn1-6-dev \ + libtest-harness-perl \ + libubsan1 \ + libudev-dev \ libusb-1.0-0-dev \ libusbredirhost-dev \ libvdeplug-dev \ + libvirglrenderer-dev \ libvte-2.91-dev \ libxen-dev \ + libxml2-dev \ libzstd-dev \ + locales \ make \ + netcat-openbsd \ + nettle-dev \ ninja-build \ + openssh-client \ + perl \ + pkgconf \ + python3 \ + python3-numpy \ + python3-opencv \ + python3-pil \ + python3-pip \ + python3-setuptools \ python3-sphinx \ + python3-venv \ + python3-wheel \ python3-yaml \ + rpm2cpio \ sparse \ - xfslibs-dev + systemtap-sdt-dev \ + tar \ + tesseract-ocr \ + tesseract-ocr-eng \ + texinfo \ + vim-nox \ + xfslibs-dev \ + zlib1g-dev RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get -y install $PACKAGES RUN dpkg -l $PACKAGES | sort > /packages.txt
Signature · 1 line
2.28.0
PATCH 15/23 tests/docker: expand fedora package list
In reply to Daniel P. BerrangéThis is the fully expanded list of build pre-requisites QEMU can conceivably use in any scenario.
--- tests/docker/dockerfiles/fedora.docker | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+)
tests/docker/dockerfiles/fedora.docker +24 -0
@@ -3,13 +3,17 @@ FROM registry.fedoraproject.org/fedora:32 # Please keep this list sorted alphabetically ENV PACKAGES \ SDL2-devel \ + alsa-lib-devel \ bc \ brlapi-devel \ bzip2 \ bzip2-devel \ + ca-certificates \ + capstone-devel \ ccache \ clang \ cyrus-sasl-devel \ + daxctl-devel \ dbus-daemon \ device-mapper-multipath-devel \ diffutils \
@@ -20,40 +24,55 @@ ENV PACKAGES \ gettext \ git \ glib2-devel \ + glibc-langpack-en \ glusterfs-api-devel \ gnutls-devel \ gtk3-devel \ hostname \ + jemalloc-devel \ libaio-devel \ libasan \ libattr-devel \ libcacard-devel \ libcap-ng-devel \ libcurl-devel \ + libdrm-devel \ libepoxy-devel \ libfdt-devel \ + libgcrypt-devel \ libiscsi-devel \ libjpeg-devel \ + libnfs-devel \ libpmem-devel \ libpng-devel \ librbd-devel \ libseccomp-devel \ + libslirp-devel \ libssh-devel \ + libtasn1-devel \ libubsan \ libudev-devel \ + liburing-devel \ libusbx-devel \ libxml2-devel \ libzstd-devel \ + lttng-ust-devel \ lzo-devel \ make \ + mesa-libgbm-devel \ + meson \ ncurses-devel \ nettle-devel \ ninja-build \ nmap-ncat \ numactl-devel \ + openssh-clients \ + pam-devel \ perl \ perl-Test-Harness \ pixman-devel \ + pkgconfig \ + pulseaudio-libs-devel \ python3 \ python3-PyYAML \ python3-numpy \
@@ -63,19 +82,24 @@ ENV PACKAGES \ python3-sphinx \ python3-virtualenv \ rdma-core-devel \ + rpm \ snappy-devel \ sparse \ + spice-protocol \ spice-server-devel \ systemd-devel \ systemtap-sdt-devel \ tar \ tesseract \ tesseract-langpack-eng \ + texinfo \ usbredir-devel \ + vim-minimal \ virglrenderer-devel \ vte291-devel \ which \ xen-devel \ + xfsprogs-devel \ zlib-devel ENV QEMU_CONFIGURE_OPTS --python=/usr/bin/python3
Signature · 1 line
2.28.0
PATCH 21/23 tests/docker: auto-generate ubuntu1804 with lcitool
In reply to Daniel P. BerrangéThis commit is best examined using the "-b" option to diff.
--- tests/docker/dockerfiles/fedora.docker | 2 +- tests/docker/dockerfiles/refresh | 6 + tests/docker/dockerfiles/ubuntu1804.docker | 230 ++++++++++++--------- 3 files changed, 134 insertions(+), 104 deletions(-)
tests/docker/dockerfiles/fedora.docker +1 -1
@@ -2,7 +2,7 @@ # # $ lcitool dockerfile fedora-32 qemu # -# https://gitlab.com/berrange/libvirt-ci/-/commit/5ae4c04258978fae40be7113ac33587d71fe3c4f +# https://gitlab.com/libvirt/libvirt-ci/-/commit/5ae4c04258978fae40be7113ac33587d71fe3c4f FROM registry.fedoraproject.org/fedora:32
tests/docker/dockerfiles/refresh +6 -0
@@ -51,5 +51,11 @@ try: generate_image("centos7.docker", "centos-7") generate_image("centos8.docker", "centos-8") generate_image("fedora.docker", "fedora-32") + + skipssh = ["# https://bugs.launchpad.net/qemu/+bug/1838763\n", + "ENV QEMU_CONFIGURE_OPTS --disable-libssh\n"] + + generate_image("ubuntu1804.docker", "ubuntu-1804", + trailer="".join(skipssh)) except Exception as ex: print(str(ex), file=sys.stderr)
tests/docker/dockerfiles/ubuntu1804.docker +127 -103
234 lines not on this page · raw message
Signature · 1 line
2.28.0
PATCH 19/23 tests/docker: auto-generate centos8 with lcitool
In reply to Daniel P. BerrangéThis commit is best examined using the "-b" option to diff.
--- tests/docker/dockerfiles/centos7.docker | 2 +- tests/docker/dockerfiles/centos8.docker | 216 +++++++++++++----------- tests/docker/dockerfiles/refresh | 1 + 3 files changed, 120 insertions(+), 99 deletions(-)
tests/docker/dockerfiles/centos7.docker +1 -1
@@ -2,7 +2,7 @@ # # $ lcitool dockerfile centos-7 qemu # -# https://gitlab.com/berrange/libvirt-ci/-/commit/5ae4c04258978fae40be7113ac33587d71fe3c4f +# https://gitlab.com/libvirt/libvirt-ci/-/commit/5ae4c04258978fae40be7113ac33587d71fe3c4f FROM registry.centos.org/centos:7
tests/docker/dockerfiles/centos8.docker +118 -98
219 lines not on this page · raw message
tests/docker/dockerfiles/refresh +1 -0
@@ -49,5 +49,6 @@ def generate_image(filename, host, cross=None, trailer=None): try: generate_image("centos7.docker", "centos-7") + generate_image("centos8.docker", "centos-8") except Exception as ex: print(str(ex), file=sys.stderr)
Signature · 1 line
2.28.0
Re: [PATCH 04/23] tests/docker: use explicit docker.io registry
In reply to Daniel P. BerrangéQuoted 7 lines · Daniel P. Berrangé
It is good practice to use an explicit registry for referencing the base image. This is because some distros will inject their own registries into the search path. For example registry.fedoraproject.org comes ahead of docker.io. Using an explicit registry avoids wasting time querying multiple registries for images that they won't have.
Signed-off-by Daniel P. Berrangé <[email protected]>
Quoted 8 lines
--- tests/docker/dockerfiles/debian-xtensa-cross.docker | 2 +- tests/docker/dockerfiles/debian10.docker | 2 +- tests/docker/dockerfiles/debian11.docker | 2 +- tests/docker/dockerfiles/ubuntu.docker | 2 +- tests/docker/dockerfiles/ubuntu1804.docker | 2 +- tests/docker/dockerfiles/ubuntu2004.docker | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-)
PATCH 23/23 tests/docker: remove ubuntu container
In reply to Daniel P. BerrangéThis duplicates the ubuntu2004 container but with an inconsistent set of packages.
--- .gitlab-ci.d/containers.yml | 5 -- tests/docker/dockerfiles/ubuntu.docker | 69 -------------------------- 2 files changed, 74 deletions(-) delete mode 100644 tests/docker/dockerfiles/ubuntu.docker
.gitlab-ci.d/containers.yml +0 -5
@@ -241,8 +241,3 @@ amd64-ubuntu2004-container: <<: *container_job_definition variables: NAME: ubuntu2004 - -amd64-ubuntu-container: - <<: *container_job_definition - variables: - NAME: ubuntu
tests/docker/dockerfiles/ubuntu.docker deleted +0 -69
69 lines not on this page · raw message
Signature · 1 line
2.28.0
Re: [PATCH 09/23] tests/docker: fix mistakes in fedora package list
In reply to Daniel P. BerrangéQuoted 9 lines · Daniel P. Berrangé
llvm is not required by QEMU, just clang.
libblockdev-mpath-devel is not used by QEMU, rather it wants device-mapper-multipath-devel.
Signed-off-by Daniel P. Berrangé <[email protected]>--- tests/docker/dockerfiles/fedora.docker | 2 -- 1 file changed, 2 deletions(-)
Re: [PATCH 07/23] tests/docker: fix sorting in package lists
In reply to Daniel P. BerrangéQuoted 1 line · Daniel P. Berrangé
This wil make diffs in later patches clearer.
Typo "will".
Quoted 8 lines
Signed-off-by Daniel P. Berrangé <[email protected]>--- tests/docker/dockerfiles/centos7.docker | 4 ++-- tests/docker/dockerfiles/fedora.docker | 4 ++-- tests/docker/dockerfiles/ubuntu1804.docker | 4 ++-- tests/docker/dockerfiles/ubuntu2004.docker | 8 +++++--- 4 files changed, 11 insertions(+), 9 deletions(-)
Quoted 8 lines · Daniel P. Berrangé
The same applies to package lists for VMs, Cirrus CI / Travis CI, and probably more.
This problem is not unique to QEMU, libvirt faced the exact same issues and developed a program called "lcitool" which is part of the libvirt-ci git repository to reduce the burden in this area.
The above URL doesn't resolve for me; perhaps due to a typo. This works for me:
https://gitlab.com/libvirt/libvirt-ci
Quoted 4 lines
Despite its name, this repository is not tied to libvirt, and so as well as the 40+ libvirt git repos, it is also used by the libosinfo and virt-viewer projects for their CI needs. The idea is that all these projects can share the burden of libvirt-ci.
[...]
Signature · 1 line
/kashyap
Re: [PATCH 03/23] tests/docker: use project specific container registries
In reply to Daniel P. Berrangétests/docker/dockerfiles/centos8.docker line 1
Quoted 5 lines
tests/docker/dockerfiles/centos8.docker +1
-1@@ -1,4 +1,4 @@ -FROM centos:8.1.1911 +FROM registry.centos.org/centos:8
At least for centos-8 I've noticed the docker.io containters are multiarch whereas registry.centos.org has x86_64 only.
I think right now we don't use any !x86_64 containers due to gitlab having only x86_64 shared runners. So this isn't a blocker. Wanted to note that nevertheless ;)
take care,
Gerd
Re: [PATCH 03/23] tests/docker: use project specific container registries
Quoted 9 lines · Gerd Hoffmann
tests/docker/dockerfiles/centos8.docker line 1
Quoted 5 lines
tests/docker/dockerfiles/centos8.docker +1
-1@@ -1,4 +1,4 @@ -FROM centos:8.1.1911 +FROM registry.centos.org/centos:8At least for centos-8 I've noticed the docker.io containters are multiarch whereas registry.centos.org has
x86_64only.
Quoted 3 lines
I think right now we don't use any !x86_64 containers due to gitlab having only
x86_64shared runners. So this isn't a blocker. Wanted to note that nevertheless ;)
Interesting, I wonder if that's a mistake or not, because the Fedora / CentOS specific registries are supposed to be preferred, so I would have expected better content.
In any case, for non-x86_64 stuff we currently do have all the Debian cross-compiler containers available.
Regards,
Daniel
Signature · 3 lines
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
Re: [PATCH 18/23] tests/docker: auto-generate centos7 with lcitool
In reply to Daniel P. BerrangéHi,
tests/docker/dockerfiles/centos7.docker line 14
Quoted 6 lines
tests/docker/dockerfiles/centos7.docker +6
-0+RUN echo 'skip_missing_names_on_install=0' >> /etc/yum.conf && \ + yum install -y epel-release && \ + yum install -y centos-release-xen-48 && \ + yum update -y && \ + yum install -y \ + SDL2-devel \
More a comment for lcitool I guess: rpmbuild generates provides entries for pkg-config files, so 'SDL2-devel' can be replaced with 'pkgconfig(sdl2)'. Which should work fine on any rpm-based distro, no matter how the package is actually named.
Dunno whenever apt/deb has something simliar or whenever that actually can simplify things for lcitool ...
take care,
Gerd
Re: [PATCH 05/23] tests/docker: remove travis container
In reply to Daniel P. BerrangéQuoted 6 lines · Daniel P. Berrangé
The travis container that we have no longer matches what travis currently uses. As all x86 jobs are being moved to GitLab CI too, there is no compelling reason to update the travis container. It is simpler to just remove it.
Signed-off-by Daniel P. Berrangé <[email protected]>
Quoted 8 lines
--- tests/docker/dockerfiles/travis.docker | 17 ---------- tests/docker/travis | 22 ------------ tests/docker/travis.py | 47 -------------------------- 3 files changed, 86 deletions(-) delete mode 100644 tests/docker/dockerfiles/travis.docker delete mode 100755 tests/docker/travis delete mode 100755 tests/docker/travis.py
Re: [PATCH 18/23] tests/docker: auto-generate centos7 with lcitool
In reply to Gerd HoffmannQuoted 9 lines · Gerd Hoffmann
Hi,
tests/docker/dockerfiles/centos7.docker line 14
Quoted 6 lines
tests/docker/dockerfiles/centos7.docker +6
-0+RUN echo 'skip_missing_names_on_install=0' >> /etc/yum.conf && \ + yum install -y epel-release && \ + yum install -y centos-release-xen-48 && \ + yum update -y && \ + yum install -y \ + SDL2-devel \
Quoted 7 lines
More a comment for lcitool I guess: rpmbuild generates provides entries for pkg-config files, so 'SDL2-devel' can be replaced with 'pkgconfig(sdl2)'. Which should work fine on any rpm-based distro, no matter how the package is actually named.
Dunno whenever apt/deb has something simliar or whenever that actually can simplify things for lcitool ...
Yeah, it might cut down the mapping size, so i filed an issue
https://gitlab.com/libvirt/libvirt-ci/-/issues/2
Regards,
Daniel
Signature · 3 lines
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
Re: [PATCH 03/23] tests/docker: use project specific container registries
In reply to Daniel P. BerrangéHi,
Quoted 9 lines · Daniel P. Berrangé
Since Docker Hub has started to enforce pull rate limits on clients, it is preferrable to use project specific container registries where they are available. Both Fedora and CentOS provide such registries.
The images in these registries are also refreshed on a more regular basis than the ones in docker hub, so the package update should generally be faster.
Signed-off-by Daniel P. Berrangé <[email protected]>
Quoted 9 lines
--- tests/docker/dockerfiles/centos7.docker | 2 +- tests/docker/dockerfiles/centos8.docker | 2 +- tests/docker/dockerfiles/fedora-cris-cross.docker | 2 +- tests/docker/dockerfiles/fedora-i386-cross.docker | 2 +- tests/docker/dockerfiles/fedora-win32-cross.docker | 2 +- tests/docker/dockerfiles/fedora-win64-cross.docker | 2 +- tests/docker/dockerfiles/fedora.docker | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-)
I didn't find in Fedora's containers documents [1] if they have a policy on how long to retain old images (e.g. versions which reached EOL), and I didn't check CentOS's. Other than that,
[1] https://docs.fedoraproject.org/en-US/containers/
Quoted 74 lines
tests/docker/dockerfiles/centos7.docker +1
-1@@ -1,4 +1,4 @@ -FROM centos:7 +FROM registry.centos.org/centos:7 RUN yum install -y epel-release centos-release-xen-48 RUN yum -y updatetests/docker/dockerfiles/centos8.docker +1
-1@@ -1,4 +1,4 @@ -FROM centos:8.1.1911 +FROM registry.centos.org/centos:8 RUN dnf -y update ENV PACKAGES \tests/docker/dockerfiles/fedora-cris-cross.docker +1
-1@@ -2,7 +2,7 @@ # Cross compiler for cris system tests # -FROM fedora:30 +FROM registry.fedoraproject.org/fedora:30 ENV PACKAGES gcc-cris-linux-gnu RUN dnf install -y $PACKAGES RUN rpm -q $PACKAGES | sort > /packages.txttests/docker/dockerfiles/fedora-i386-cross.docker +1
-1@@ -1,4 +1,4 @@ -FROM fedora:30 +FROM registry.fedoraproject.org/fedora:30 ENV PACKAGES \ gcc \ glib2-devel.i686 \tests/docker/dockerfiles/fedora-win32-cross.docker +1
-1@@ -1,4 +1,4 @@ -FROM fedora:32 +FROM registry.fedoraproject.org/fedora:32 # Please keep this list sorted alphabetically ENV PACKAGES \tests/docker/dockerfiles/fedora-win64-cross.docker +1
-1@@ -1,4 +1,4 @@ -FROM fedora:32 +FROM registry.fedoraproject.org/fedora:32 # Please keep this list sorted alphabetically ENV PACKAGES \tests/docker/dockerfiles/fedora.docker +1
-1@@ -1,4 +1,4 @@ -FROM fedora:32 +FROM registry.fedoraproject.org/fedora:32 # Please keep this list sorted alphabetically ENV PACKAGES \
Re: [PATCH 04/23] tests/docker: use explicit docker.io registry
In reply to Daniel P. BerrangéQuoted 5 lines · Daniel P. Berrangé
It is good practice to use an explicit registry for referencing the base image. This is because some distros will inject their own registries into the search path. For example registry.fedoraproject.org comes ahead of docker.io. Using an explicit registry avoids wasting time querying multiple registries for images that they won't have.
Interesting.
Quoted 10 lines
Signed-off-by Daniel P. Berrangé <[email protected]>--- tests/docker/dockerfiles/debian-xtensa-cross.docker | 2 +- tests/docker/dockerfiles/debian10.docker | 2 +- tests/docker/dockerfiles/debian11.docker | 2 +- tests/docker/dockerfiles/ubuntu.docker | 2 +- tests/docker/dockerfiles/ubuntu1804.docker | 2 +- tests/docker/dockerfiles/ubuntu2004.docker | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-)
Quoted 73 lines
tests/docker/dockerfiles/debian-xtensa-cross.docker +1
-1@@ -5,7 +5,7 @@ # using a prebuilt toolchains for Xtensa cores from: # https://github.com/foss-xtensa/toolchain/releases # -FROM debian:stretch-slim +FROM docker.io/library/debian:stretch-slim RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata && \tests/docker/dockerfiles/debian10.docker +1
-1@@ -7,7 +7,7 @@ # On its own you can't build much but the docker-foo-cross targets # build on top of the base debian image. # -FROM debian:buster-slim +FROM docker.io/library/debian:buster-slim # Duplicate deb line as deb-src RUN cat /etc/apt/sources.list | sed "s/^deb\ /deb-src /" >> /etc/apt/sources.listtests/docker/dockerfiles/debian11.docker +1
-1@@ -8,7 +8,7 @@ # On its own you can't build much but the docker-foo-cross targets # build on top of the base debian image. # -FROM debian:bullseye-slim +FROM docker.io/library/debian:bullseye-slim # Duplicate deb line as deb-src RUN cat /etc/apt/sources.list | sed "s/^deb\ /deb-src /" >> /etc/apt/sources.listtests/docker/dockerfiles/ubuntu.docker +1
-1@@ -9,7 +9,7 @@ # system won't pick up that it has changed. # -FROM ubuntu:20.04 +FROM docker.io/library/ubuntu:20.04 ENV PACKAGES \ ccache \ clang \tests/docker/dockerfiles/ubuntu1804.docker +1
-1@@ -1,4 +1,4 @@ -FROM ubuntu:18.04 +FROM docker.io/library/ubuntu:18.04 ENV PACKAGES \ ccache \ clang \tests/docker/dockerfiles/ubuntu2004.docker +1
-1@@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM docker.io/library/ubuntu:20.04 ENV PACKAGES flex bison \ ccache \ clang-10\
Re: [PATCH 05/23] tests/docker: remove travis container
In reply to Daniel P. BerrangéQuoted 4 lines · Daniel P. Berrangé
The travis container that we have no longer matches what travis currently uses. As all x86 jobs are being moved to GitLab CI too, there is no compelling reason to update the travis container. It is simpler to just remove it.
IMHO above rationale makes sense.
Quoted 10 lines
Signed-off-by Daniel P. Berrangé <[email protected]>--- tests/docker/dockerfiles/travis.docker | 17 ---------- tests/docker/travis | 22 ------------ tests/docker/travis.py | 47 -------------------------- 3 files changed, 86 deletions(-)delete mode 100644 tests/docker/dockerfiles/travis.docker delete mode 100755 tests/docker/travis
delete mode 100755tests/docker/travis.py
The tests/docker/Makefile.include file should be cleaned up too.
Quoted 105 lines
tests/docker/dockerfiles/travis.docker deleted +0
-17@@ -1,17 +0,0 @@ -# -# Travis Image - this is broadly the same image that we run our CI -# tests on. -# -FROM travisci/ci-sardonyx:packer-1552557266-f909ac5 -ENV DEBIAN_FRONTEND noninteractive -ENV LANG en_US.UTF-8 -ENV LC_ALL en_US.UTF-8 -RUN sed -i "s/# deb-src/deb-src/" /etc/apt/sources.list -RUN apt-get update -RUN apt-get -y build-dep qemu -RUN apt-get -y install device-tree-compiler python3 python3-yaml dh-autoreconf gdb strace lsof net-tools gcovr ninja-build -# Travis tools require PhantomJS / Neo4j / Maven accessible -# in their PATH (QEMU build won't access them). -ENV PATH /usr/local/phantomjs/bin:/usr/local/phantomjs:/usr/local/neo4j-3.2.7/bin:/usr/local/maven-3.5.2/bin:/usr/local/cmake-3.9.2/bin:/usr/local/clang-5.0.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin -ENV FEATURES clang pyyaml docs -USER travistests/docker/travis deleted +0
-22@@ -1,22 +0,0 @@ -#!/bin/bash -e -# -# Mimic a travis testing matrix -# -# Copyright (c) 2016 Red Hat Inc. -# -# Authors: -# Fam Zheng <[email protected]> -# -# This work is licensed under the terms of the GNU GPL, version 2 -# or (at your option) any later version. See the COPYING file in -# the top-level directory. - -. common.rc - -requires pyyaml -cmdfile=/tmp/travis_cmd_list.sh -$QEMU_SRC/tests/docker/travis.py $QEMU_SRC/.travis.yml > $cmdfile -chmod +x $cmdfile -cd "$QEMU_SRC" -unset BUILD_DIR SRC_DIR -$cmdfiletests/docker/travis.py deleted +0
-47@@ -1,47 +0,0 @@ -#!/usr/bin/env python3 -# -# Travis YAML config parser -# -# Copyright (c) 2016 Red Hat Inc. -# -# Authors: -# Fam Zheng <[email protected]> -# -# This work is licensed under the terms of the GNU GPL, version 2 -# or (at your option) any later version. See the COPYING file in -# the top-level directory. - -import sys -import yaml -import itertools - -def load_yaml(fname): - return yaml.safe_load(open(fname, "r").read()) - -def conf_iter(conf): - # If "compiler" is omitted from the included env then Travis picks the - # first entry of the global compiler list. - default_compiler = conf["compiler"][0] - def env_to_list(env): - return env if isinstance(env, list) else [env] - for entry in conf["matrix"]["include"]: - yield {"env": env_to_list(entry["env"]), - "compiler": entry.get("compiler", default_compiler)} - -def main(): - if len(sys.argv) < 2: - sys.stderr.write("Usage: %s <travis-file>\n" % sys.argv[0]) - return 1 - conf = load_yaml(sys.argv[1]) - print("\n".join((": ${%s}" % var for var in conf["env"]["global"]))) - for config in conf_iter(conf): - print("(") - print("\n".join(config["env"])) - print("alias cc=" + config["compiler"]) - print("\n".join(conf["before_script"])) - print("\n".join(conf["script"])) - print(")") - return 0 - -if __name__ == "__main__": - sys.exit(main())