qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 00/22] tests/docker: start using libvirt-ci's "lcitool" for dockerfiles
@ 2021-06-23 14:22 Daniel P. Berrangé
  2021-06-23 14:22 ` [PATCH v4 01/22] hw/usb/ccid: remove references to NSS Daniel P. Berrangé
                   ` (23 more replies)
  0 siblings, 24 replies; 51+ messages in thread
From: Daniel P. Berrangé @ 2021-06-23 14:22 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, Daniel P. Berrangé,
	Philippe Mathieu-Daudé, Philippe Mathieu-Daudé,
	Wainer dos Santos Moschetta, Willian Rampazzo, Alex Bennée

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.

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.

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/libvirt/libvirt-ci/-/blob/master/guests/lcitool/lcitool/ansible/vars/mappings.yml

A project merely has to have its list of pre-requisites enumerated

   https://gitlab.com/libvirt/libvirt-ci/-/blob/master/guests/lcitool/lcitool/ansible/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 (8, 8 Stream),
Fedora (32, 33, rawhide), OpenSUSE Leap (15.2) macOS (HomeBrew),
FreeBSD w/ Ports (11, 12, current).

At the end of this series, I have dockerfiles auto-generated for QEMU
covering Ubuntu 18.04 & 20.04, CentOS 8, Fedora 32 and OpenSUSE 15.2.

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 convert openbsd, netbsd, haiku since libvirt does not
target those distros itself.

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. Whomever runs this
needs to have a checkout of libvirt-ci.git. I previously used a
git submodule, but this causes chicken and egg problems with updates.
libvirt-ci won't want to take merge changes unless QEMU maintainers
have accepted the new series, but the new series needs the libvirt-ci
changes merged to update the submodule hash. Avoiding git submodules
eliminates this problem.

Changed in v4:

 - Refresh to cope with new libbpf, libffi & rtd theme packages
 - Drop use of git submodule
 - Improve documentation

Changed in v3:

 - Drop changes for CentOS 7
 - Catch up with newly added build deps
 - Add git submodule and make target for refresh

Changed in v2:

 - Remove more travis stuff from tests/docker/Makefile.include
 - Convert opensuse image to be auto-generated
 - Add SDL2_image package
 - QEMU package manifest is now officially merged in libvirt-ci.git

Daniel P. Berrangé (22):
  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 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: expand centos8 package list
  tests/docker: expand fedora package list
  tests/docker: expand ubuntu1804 package list
  tests/docker: expand ubuntu2004 package list
  tests/docker: expand opensuse-leap package list
  tests/docker: add script for automating container refresh
  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: auto-generate opensuse-leap with lcitool
  tests/docker: remove ubuntu container

 .gitlab-ci.d/containers.yml                   |   5 -
 .travis.yml                                   |  12 +-
 docs/ccid.txt                                 |  15 +-
 docs/devel/testing.rst                        |  34 ++-
 scripts/coverity-scan/coverity-scan.docker    |   1 -
 tests/docker/Makefile.include                 |  12 +
 tests/docker/common.rc                        |  19 +-
 tests/docker/docker.py                        |   4 +-
 tests/docker/dockerfiles-refresh.py           |  70 +++++
 tests/docker/dockerfiles/centos8.docker       | 170 +++++++++---
 .../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        | 259 ++++++++++--------
 tests/docker/dockerfiles/opensuse-leap.docker | 184 +++++++++----
 tests/docker/dockerfiles/ubuntu.docker        |  73 -----
 tests/docker/dockerfiles/ubuntu1804.docker    | 199 ++++++++++----
 tests/docker/dockerfiles/ubuntu2004.docker    | 215 ++++++++++-----
 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 +-
 28 files changed, 840 insertions(+), 464 deletions(-)
 create mode 100755 tests/docker/dockerfiles-refresh.py
 delete mode 100644 tests/docker/dockerfiles/ubuntu.docker

-- 
2.31.1




^ permalink raw reply	[flat|nested] 51+ messages in thread

* [PATCH v4 01/22] hw/usb/ccid: remove references to NSS
  2021-06-23 14:22 [PATCH v4 00/22] tests/docker: start using libvirt-ci's "lcitool" for dockerfiles Daniel P. Berrangé
@ 2021-06-23 14:22 ` Daniel P. Berrangé
  2021-06-25 18:11   ` Willian Rampazzo
  2021-07-05 10:37   ` Alex Bennée
  2021-06-23 14:22 ` [PATCH v4 02/22] tests/docker: don't use BUILDKIT in GitLab either Daniel P. Berrangé
                   ` (22 subsequent siblings)
  23 siblings, 2 replies; 51+ messages in thread
From: Daniel P. Berrangé @ 2021-06-23 14:22 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, Daniel P. Berrangé,
	Philippe Mathieu-Daudé, Philippe Mathieu-Daudé,
	Wainer dos Santos Moschetta, Willian Rampazzo, Alex Bennée

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 <marcandre.lureau@redhat.com>
    Date:   Sun Aug 30 11:48:40 2015 +0200

        libcacard: use the standalone project

Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 .travis.yml                                | 12 ++++++------
 docs/ccid.txt                              | 15 +++++++--------
 scripts/coverity-scan/coverity-scan.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 -
 7 files changed, 14 insertions(+), 19 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 4609240b5a..0faddf7b4e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -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
@@ -129,6 +129,7 @@ jobs:
           - libaio-dev
           - libattr1-dev
           - libbrlapi-dev
+          - libcacard-dev
           - libcap-ng-dev
           - libgcrypt20-dev
           - libgnutls28-dev
@@ -137,7 +138,6 @@ jobs:
           - liblttng-ust-dev
           - libncurses5-dev
           - libnfs-dev
-          - libnss3-dev
           - libpixman-1-dev
           - libpng-dev
           - librados-dev
@@ -163,6 +163,7 @@ jobs:
           - libaio-dev
           - libattr1-dev
           - libbrlapi-dev
+          - libcacard-dev
           - libcap-ng-dev
           - libgcrypt20-dev
           - libgnutls28-dev
@@ -171,7 +172,6 @@ jobs:
           - liblttng-ust-dev
           - libncurses5-dev
           - libnfs-dev
-          - libnss3-dev
           - libpixman-1-dev
           - libpng-dev
           - librados-dev
@@ -196,6 +196,7 @@ jobs:
           - libaio-dev
           - libattr1-dev
           - libbrlapi-dev
+          - libcacard-dev
           - libcap-ng-dev
           - libgcrypt20-dev
           - libgnutls28-dev
@@ -204,7 +205,6 @@ jobs:
           - liblttng-ust-dev
           - libncurses5-dev
           - libnfs-dev
-          - libnss3-dev
           - libpixman-1-dev
           - libpng-dev
           - librados-dev
@@ -238,6 +238,7 @@ jobs:
         apt_packages:
           - libaio-dev
           - libattr1-dev
+          - libcacard-dev
           - libcap-ng-dev
           - libgnutls28-dev
           - libiscsi-dev
@@ -245,7 +246,6 @@ jobs:
           - liblzo2-dev
           - libncurses-dev
           - libnfs-dev
-          - libnss3-dev
           - libpixman-1-dev
           - libsdl2-dev
           - libsdl2-image-dev
@@ -281,6 +281,7 @@ jobs:
           - libaio-dev
           - libattr1-dev
           - libbrlapi-dev
+          - libcacard-dev
           - libcap-ng-dev
           - libgcrypt20-dev
           - libgnutls28-dev
@@ -289,7 +290,6 @@ jobs:
           - liblttng-ust-dev
           - libncurses5-dev
           - libnfs-dev
-          - libnss3-dev
           - libpixman-1-dev
           - libpng-dev
           - librados-dev
diff --git a/docs/ccid.txt b/docs/ccid.txt
index c97fbd2de0..2b85b1bd42 100644
--- a/docs/ccid.txt
+++ b/docs/ccid.txt
@@ -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
 
diff --git a/scripts/coverity-scan/coverity-scan.docker b/scripts/coverity-scan/coverity-scan.docker
index 501ac67233..ecff6ac5b4 100644
--- a/scripts/coverity-scan/coverity-scan.docker
+++ b/scripts/coverity-scan/coverity-scan.docker
@@ -93,7 +93,6 @@ ENV PACKAGES \
     mingw64-SDL2 \
     ncurses-devel \
     nettle-devel \
-    nss-devel \
     numactl-devel \
     perl \
     perl-Test-Harness \
diff --git a/tests/docker/dockerfiles/fedora.docker b/tests/docker/dockerfiles/fedora.docker
index 00cac5d61c..9dde3f6a78 100644
--- a/tests/docker/dockerfiles/fedora.docker
+++ b/tests/docker/dockerfiles/fedora.docker
@@ -28,6 +28,7 @@ ENV PACKAGES \
     libasan \
     libattr-devel \
     libblockdev-mpath-devel \
+    libcacard-devel \
     libcap-ng-devel \
     libcurl-devel \
     libepoxy-devel \
@@ -82,7 +83,6 @@ ENV PACKAGES \
     ncurses-devel \
     nettle-devel \
     ninja-build \
-    nss-devel \
     numactl-devel \
     perl \
     perl-Test-Harness \
diff --git a/tests/docker/dockerfiles/ubuntu.docker b/tests/docker/dockerfiles/ubuntu.docker
index 24d1647a65..100cfa76e3 100644
--- a/tests/docker/dockerfiles/ubuntu.docker
+++ b/tests/docker/dockerfiles/ubuntu.docker
@@ -40,7 +40,6 @@ ENV PACKAGES \
     libncurses5-dev \
     libncursesw5-dev \
     libnfs-dev \
-    libnss3-dev \
     libnuma-dev \
     libpixman-1-dev \
     libpng-dev \
diff --git a/tests/docker/dockerfiles/ubuntu1804.docker b/tests/docker/dockerfiles/ubuntu1804.docker
index 2f1ec7c42b..86114be23a 100644
--- a/tests/docker/dockerfiles/ubuntu1804.docker
+++ b/tests/docker/dockerfiles/ubuntu1804.docker
@@ -27,7 +27,6 @@ ENV PACKAGES \
     libncurses5-dev \
     libncursesw5-dev \
     libnfs-dev \
-    libnss3-dev \
     libnuma-dev \
     libpixman-1-dev \
     librados-dev \
diff --git a/tests/docker/dockerfiles/ubuntu2004.docker b/tests/docker/dockerfiles/ubuntu2004.docker
index fe993fe2a3..b33ed139d9 100644
--- a/tests/docker/dockerfiles/ubuntu2004.docker
+++ b/tests/docker/dockerfiles/ubuntu2004.docker
@@ -31,7 +31,6 @@ ENV PACKAGES flex bison \
     libncurses5-dev \
     libncursesw5-dev \
     libnfs-dev \
-    libnss3-dev \
     libnuma-dev \
     libpixman-1-dev \
     librados-dev \
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [PATCH v4 02/22] tests/docker: don't use BUILDKIT in GitLab either
  2021-06-23 14:22 [PATCH v4 00/22] tests/docker: start using libvirt-ci's "lcitool" for dockerfiles Daniel P. Berrangé
  2021-06-23 14:22 ` [PATCH v4 01/22] hw/usb/ccid: remove references to NSS Daniel P. Berrangé
@ 2021-06-23 14:22 ` Daniel P. Berrangé
  2021-06-25 20:21   ` Willian Rampazzo
  2021-06-23 14:22 ` [PATCH v4 03/22] tests/docker: use project specific container registries Daniel P. Berrangé
                   ` (21 subsequent siblings)
  23 siblings, 1 reply; 51+ messages in thread
From: Daniel P. Berrangé @ 2021-06-23 14:22 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, Daniel P. Berrangé,
	Philippe Mathieu-Daudé, Philippe Mathieu-Daudé,
	Wainer dos Santos Moschetta, Willian Rampazzo, Alex Bennée

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

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 tests/docker/docker.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/docker/docker.py b/tests/docker/docker.py
index 4d9bb7c7ed..78dd13171e 100755
--- a/tests/docker/docker.py
+++ b/tests/docker/docker.py
@@ -228,7 +228,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
+            "GITLAB_CI" not in os.environ):
             os.environ["DOCKER_BUILDKIT"] = "1"
             self._buildkit = True
         else:
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [PATCH v4 03/22] tests/docker: use project specific container registries
  2021-06-23 14:22 [PATCH v4 00/22] tests/docker: start using libvirt-ci's "lcitool" for dockerfiles Daniel P. Berrangé
  2021-06-23 14:22 ` [PATCH v4 01/22] hw/usb/ccid: remove references to NSS Daniel P. Berrangé
  2021-06-23 14:22 ` [PATCH v4 02/22] tests/docker: don't use BUILDKIT in GitLab either Daniel P. Berrangé
@ 2021-06-23 14:22 ` Daniel P. Berrangé
  2021-06-25 20:24   ` Willian Rampazzo
  2021-07-05 12:07   ` Alex Bennée
  2021-06-23 14:22 ` [PATCH v4 04/22] tests/docker: use explicit docker.io registry Daniel P. Berrangé
                   ` (20 subsequent siblings)
  23 siblings, 2 replies; 51+ messages in thread
From: Daniel P. Berrangé @ 2021-06-23 14:22 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, Daniel P. Berrangé,
	Philippe Mathieu-Daudé, Philippe Mathieu-Daudé,
	Wainer dos Santos Moschetta, Willian Rampazzo, Alex Bennée

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. Fedora and OpenSUSE projects provide 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.

While CentOS also has a registry it is considerably outdated compared
to docker.io, and also only provides x86 images, while docker.io images
are multi-arch.

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 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 +-
 tests/docker/dockerfiles/opensuse-leap.docker      | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/tests/docker/dockerfiles/fedora-cris-cross.docker b/tests/docker/dockerfiles/fedora-cris-cross.docker
index 1dfff6e0b9..91c373fdd3 100644
--- a/tests/docker/dockerfiles/fedora-cris-cross.docker
+++ b/tests/docker/dockerfiles/fedora-cris-cross.docker
@@ -2,7 +2,7 @@
 # Cross compiler for cris system tests
 #
 
-FROM fedora:33
+FROM registry.fedoraproject.org/fedora:33
 ENV PACKAGES gcc-cris-linux-gnu
 RUN dnf install -y $PACKAGES
 RUN rpm -q $PACKAGES | sort > /packages.txt
diff --git a/tests/docker/dockerfiles/fedora-i386-cross.docker b/tests/docker/dockerfiles/fedora-i386-cross.docker
index 8004fd8ee5..dbb8195eb1 100644
--- a/tests/docker/dockerfiles/fedora-i386-cross.docker
+++ b/tests/docker/dockerfiles/fedora-i386-cross.docker
@@ -1,4 +1,4 @@
-FROM fedora:33
+FROM registry.fedoraproject.org/fedora:33
 ENV PACKAGES \
     bzip2 \
     ccache \
diff --git a/tests/docker/dockerfiles/fedora-win32-cross.docker b/tests/docker/dockerfiles/fedora-win32-cross.docker
index a638afb525..9fed35f4e1 100644
--- a/tests/docker/dockerfiles/fedora-win32-cross.docker
+++ b/tests/docker/dockerfiles/fedora-win32-cross.docker
@@ -1,4 +1,4 @@
-FROM fedora:33
+FROM registry.fedoraproject.org/fedora:33
 
 # Please keep this list sorted alphabetically
 ENV PACKAGES \
diff --git a/tests/docker/dockerfiles/fedora-win64-cross.docker b/tests/docker/dockerfiles/fedora-win64-cross.docker
index f53007ac86..fb641f6104 100644
--- a/tests/docker/dockerfiles/fedora-win64-cross.docker
+++ b/tests/docker/dockerfiles/fedora-win64-cross.docker
@@ -1,4 +1,4 @@
-FROM fedora:33
+FROM registry.fedoraproject.org/fedora:33
 
 # Please keep this list sorted alphabetically
 ENV PACKAGES \
diff --git a/tests/docker/dockerfiles/fedora.docker b/tests/docker/dockerfiles/fedora.docker
index 9dde3f6a78..a506e68d33 100644
--- a/tests/docker/dockerfiles/fedora.docker
+++ b/tests/docker/dockerfiles/fedora.docker
@@ -1,4 +1,4 @@
-FROM fedora:33
+FROM registry.fedoraproject.org/fedora:33
 
 # Please keep this list sorted alphabetically
 ENV PACKAGES \
diff --git a/tests/docker/dockerfiles/opensuse-leap.docker b/tests/docker/dockerfiles/opensuse-leap.docker
index f7e1cbfbe6..7ebff1b3a8 100644
--- a/tests/docker/dockerfiles/opensuse-leap.docker
+++ b/tests/docker/dockerfiles/opensuse-leap.docker
@@ -1,4 +1,4 @@
-FROM opensuse/leap:15.2
+FROM registry.opensuse.org/opensuse/leap:15.2
 
 # Please keep this list sorted alphabetically
 ENV PACKAGES \
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [PATCH v4 04/22] tests/docker: use explicit docker.io registry
  2021-06-23 14:22 [PATCH v4 00/22] tests/docker: start using libvirt-ci's "lcitool" for dockerfiles Daniel P. Berrangé
                   ` (2 preceding siblings ...)
  2021-06-23 14:22 ` [PATCH v4 03/22] tests/docker: use project specific container registries Daniel P. Berrangé
@ 2021-06-23 14:22 ` Daniel P. Berrangé
  2021-07-05 13:33   ` Alex Bennée
  2021-06-23 14:22 ` [PATCH v4 05/22] tests/docker: remove FEATURES env var from templates Daniel P. Berrangé
                   ` (19 subsequent siblings)
  23 siblings, 1 reply; 51+ messages in thread
From: Daniel P. Berrangé @ 2021-06-23 14:22 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, Daniel P. Berrangé,
	Philippe Mathieu-Daudé, Philippe Mathieu-Daudé,
	Wainer dos Santos Moschetta, Willian Rampazzo, Alex Bennée

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.

Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 tests/docker/dockerfiles/centos8.docker             | 2 +-
 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 +-
 7 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/tests/docker/dockerfiles/centos8.docker b/tests/docker/dockerfiles/centos8.docker
index 03e0440e03..8f810810f3 100644
--- a/tests/docker/dockerfiles/centos8.docker
+++ b/tests/docker/dockerfiles/centos8.docker
@@ -1,4 +1,4 @@
-FROM centos:8.3.2011
+FROM docker.io/centos:8
 
 RUN dnf -y update
 ENV PACKAGES \
diff --git a/tests/docker/dockerfiles/debian-xtensa-cross.docker b/tests/docker/dockerfiles/debian-xtensa-cross.docker
index ba4148299c..2f11b3b7bc 100644
--- a/tests/docker/dockerfiles/debian-xtensa-cross.docker
+++ b/tests/docker/dockerfiles/debian-xtensa-cross.docker
@@ -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 && \
diff --git a/tests/docker/dockerfiles/debian10.docker b/tests/docker/dockerfiles/debian10.docker
index 4ffe47671e..a27b88df55 100644
--- a/tests/docker/dockerfiles/debian10.docker
+++ b/tests/docker/dockerfiles/debian10.docker
@@ -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
diff --git a/tests/docker/dockerfiles/debian11.docker b/tests/docker/dockerfiles/debian11.docker
index 5adfd62d55..febf884f8f 100644
--- a/tests/docker/dockerfiles/debian11.docker
+++ b/tests/docker/dockerfiles/debian11.docker
@@ -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
diff --git a/tests/docker/dockerfiles/ubuntu.docker b/tests/docker/dockerfiles/ubuntu.docker
index 100cfa76e3..e0ff425c01 100644
--- a/tests/docker/dockerfiles/ubuntu.docker
+++ b/tests/docker/dockerfiles/ubuntu.docker
@@ -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 \
diff --git a/tests/docker/dockerfiles/ubuntu1804.docker b/tests/docker/dockerfiles/ubuntu1804.docker
index 86114be23a..adcdef8244 100644
--- a/tests/docker/dockerfiles/ubuntu1804.docker
+++ b/tests/docker/dockerfiles/ubuntu1804.docker
@@ -1,4 +1,4 @@
-FROM ubuntu:18.04
+FROM docker.io/library/ubuntu:18.04
 ENV PACKAGES \
     ccache \
     clang \
diff --git a/tests/docker/dockerfiles/ubuntu2004.docker b/tests/docker/dockerfiles/ubuntu2004.docker
index b33ed139d9..78755bc2e3 100644
--- a/tests/docker/dockerfiles/ubuntu2004.docker
+++ b/tests/docker/dockerfiles/ubuntu2004.docker
@@ -1,4 +1,4 @@
-FROM ubuntu:20.04
+FROM docker.io/library/ubuntu:20.04
 ENV PACKAGES flex bison \
     bsdmainutils \
     ccache \
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [PATCH v4 05/22] tests/docker: remove FEATURES env var from templates
  2021-06-23 14:22 [PATCH v4 00/22] tests/docker: start using libvirt-ci's "lcitool" for dockerfiles Daniel P. Berrangé
                   ` (3 preceding siblings ...)
  2021-06-23 14:22 ` [PATCH v4 04/22] tests/docker: use explicit docker.io registry Daniel P. Berrangé
@ 2021-06-23 14:22 ` Daniel P. Berrangé
  2021-06-25 20:51   ` Willian Rampazzo
                     ` (2 more replies)
  2021-06-23 14:22 ` [PATCH v4 06/22] tests/docker: fix sorting in package lists Daniel P. Berrangé
                   ` (18 subsequent siblings)
  23 siblings, 3 replies; 51+ messages in thread
From: Daniel P. Berrangé @ 2021-06-23 14:22 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, Daniel P. Berrangé,
	Philippe Mathieu-Daudé, Philippe Mathieu-Daudé,
	Wainer dos Santos Moschetta, Willian Rampazzo, Alex Bennée

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.

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 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(-)

diff --git a/tests/docker/common.rc b/tests/docker/common.rc
index ebc5b97ecf..c5cc33d366 100755
--- a/tests/docker/common.rc
+++ b/tests/docker/common.rc
@@ -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()
diff --git a/tests/docker/dockerfiles/debian10.docker b/tests/docker/dockerfiles/debian10.docker
index a27b88df55..b414af1b9f 100644
--- a/tests/docker/dockerfiles/debian10.docker
+++ b/tests/docker/dockerfiles/debian10.docker
@@ -35,5 +35,3 @@ RUN apt update && \
         python3-sphinx \
         python3-sphinx-rtd-theme \
         $(apt-get -s build-dep --arch-only qemu | egrep ^Inst | fgrep '[all]' | cut -d\  -f2)
-
-ENV FEATURES docs
diff --git a/tests/docker/dockerfiles/fedora-win32-cross.docker b/tests/docker/dockerfiles/fedora-win32-cross.docker
index 9fed35f4e1..5a03e1af43 100644
--- a/tests/docker/dockerfiles/fedora-win32-cross.docker
+++ b/tests/docker/dockerfiles/fedora-win32-cross.docker
@@ -37,7 +37,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-
diff --git a/tests/docker/dockerfiles/fedora-win64-cross.docker b/tests/docker/dockerfiles/fedora-win64-cross.docker
index fb641f6104..ff706040c4 100644
--- a/tests/docker/dockerfiles/fedora-win64-cross.docker
+++ b/tests/docker/dockerfiles/fedora-win64-cross.docker
@@ -33,7 +33,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
diff --git a/tests/docker/dockerfiles/fedora.docker b/tests/docker/dockerfiles/fedora.docker
index a506e68d33..64a413f5e0 100644
--- a/tests/docker/dockerfiles/fedora.docker
+++ b/tests/docker/dockerfiles/fedora.docker
@@ -117,4 +117,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
diff --git a/tests/docker/dockerfiles/ubuntu.docker b/tests/docker/dockerfiles/ubuntu.docker
index e0ff425c01..f0e0180d21 100644
--- a/tests/docker/dockerfiles/ubuntu.docker
+++ b/tests/docker/dockerfiles/ubuntu.docker
@@ -69,4 +69,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
diff --git a/tests/docker/dockerfiles/ubuntu1804.docker b/tests/docker/dockerfiles/ubuntu1804.docker
index adcdef8244..0acdb0d9ad 100644
--- a/tests/docker/dockerfiles/ubuntu1804.docker
+++ b/tests/docker/dockerfiles/ubuntu1804.docker
@@ -55,7 +55,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
diff --git a/tests/docker/dockerfiles/ubuntu2004.docker b/tests/docker/dockerfiles/ubuntu2004.docker
index 78755bc2e3..88b3cfa136 100644
--- a/tests/docker/dockerfiles/ubuntu2004.docker
+++ b/tests/docker/dockerfiles/ubuntu2004.docker
@@ -70,7 +70,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.
diff --git a/tests/docker/run b/tests/docker/run
index 8edc7026ee..421393046b 100755
--- a/tests/docker/run
+++ b/tests/docker/run
@@ -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
diff --git a/tests/docker/test-clang b/tests/docker/test-clang
index 8c51ead518..b57e0119d9 100755
--- a/tests/docker/test-clang
+++ b/tests/docker/test-clang
@@ -13,7 +13,7 @@
 
 . common.rc
 
-requires clang
+requires_binary clang
 
 cd "$BUILD_DIR"
 
diff --git a/tests/docker/test-debug b/tests/docker/test-debug
index c050fa0d93..f52f16328c 100755
--- a/tests/docker/test-debug
+++ b/tests/docker/test-debug
@@ -14,7 +14,7 @@
 
 . common.rc
 
-requires clang asan
+requires_binary clang
 
 cd "$BUILD_DIR"
 
diff --git a/tests/docker/test-mingw b/tests/docker/test-mingw
index c30eb654eb..0bc6d78872 100755
--- a/tests/docker/test-mingw
+++ b/tests/docker/test-mingw
@@ -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"
 
diff --git a/tests/docker/test-misc b/tests/docker/test-misc
index cc94a738dd..2a3c2c2e1c 100755
--- a/tests/docker/test-misc
+++ b/tests/docker/test-misc
@@ -14,7 +14,7 @@
 
 . common.rc
 
-requires docs
+requires_binary sphinx-build-3 sphinx-build
 
 cd "$BUILD_DIR"
 
diff --git a/tests/docker/test-tsan b/tests/docker/test-tsan
index eb40ac45b7..53d90d2f79 100755
--- a/tests/docker/test-tsan
+++ b/tests/docker/test-tsan
@@ -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 \
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [PATCH v4 06/22] tests/docker: fix sorting in package lists
  2021-06-23 14:22 [PATCH v4 00/22] tests/docker: start using libvirt-ci's "lcitool" for dockerfiles Daniel P. Berrangé
                   ` (4 preceding siblings ...)
  2021-06-23 14:22 ` [PATCH v4 05/22] tests/docker: remove FEATURES env var from templates Daniel P. Berrangé
@ 2021-06-23 14:22 ` Daniel P. Berrangé
  2021-07-05 13:33   ` Alex Bennée
  2021-06-23 14:22 ` [PATCH v4 07/22] tests/docker: fix mistakes in centos " Daniel P. Berrangé
                   ` (17 subsequent siblings)
  23 siblings, 1 reply; 51+ messages in thread
From: Daniel P. Berrangé @ 2021-06-23 14:22 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, Daniel P. Berrangé,
	Philippe Mathieu-Daudé, Philippe Mathieu-Daudé,
	Wainer dos Santos Moschetta, Willian Rampazzo, Alex Bennée

This will make diffs in later patches clearer.

Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 tests/docker/dockerfiles/centos8.docker       |  2 +-
 tests/docker/dockerfiles/fedora.docker        |  4 ++--
 tests/docker/dockerfiles/opensuse-leap.docker | 16 ++++++++--------
 tests/docker/dockerfiles/ubuntu1804.docker    |  4 ++--
 tests/docker/dockerfiles/ubuntu2004.docker    |  8 +++++---
 5 files changed, 18 insertions(+), 16 deletions(-)

diff --git a/tests/docker/dockerfiles/centos8.docker b/tests/docker/dockerfiles/centos8.docker
index 8f810810f3..ee52305646 100644
--- a/tests/docker/dockerfiles/centos8.docker
+++ b/tests/docker/dockerfiles/centos8.docker
@@ -22,9 +22,9 @@ ENV PACKAGES \
     lzo-devel \
     make \
     mesa-libEGL-devel \
-    nmap-ncat \
     nettle-devel \
     ninja-build \
+    nmap-ncat \
     perl-Test-Harness \
     pixman-devel \
     python36 \
diff --git a/tests/docker/dockerfiles/fedora.docker b/tests/docker/dockerfiles/fedora.docker
index 64a413f5e0..4a0a84eb43 100644
--- a/tests/docker/dockerfiles/fedora.docker
+++ b/tests/docker/dockerfiles/fedora.docker
@@ -2,6 +2,7 @@ FROM registry.fedoraproject.org/fedora:33
 
 # Please keep this list sorted alphabetically
 ENV PACKAGES \
+    SDL2-devel \
     bc \
     brlapi-devel \
     bzip2 \
@@ -79,10 +80,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 \
@@ -97,7 +98,6 @@ ENV PACKAGES \
     python3-sphinx_rtd_theme \
     python3-virtualenv \
     rdma-core-devel \
-    SDL2-devel \
     snappy-devel \
     sparse \
     spice-server-devel \
diff --git a/tests/docker/dockerfiles/opensuse-leap.docker b/tests/docker/dockerfiles/opensuse-leap.docker
index 7ebff1b3a8..6011447181 100644
--- a/tests/docker/dockerfiles/opensuse-leap.docker
+++ b/tests/docker/dockerfiles/opensuse-leap.docker
@@ -9,46 +9,46 @@ ENV PACKAGES \
     cyrus-sasl-devel \
     gcc \
     gcc-c++ \
-    mkisofs \
     gettext-runtime \
     git \
     glib2-devel \
     glusterfs-devel \
-    libgnutls-devel \
     gtk3-devel \
+    libSDL2-devel \
+    libSDL2_image-devel \
     libaio-devel \
     libattr-devel \
     libcap-ng-devel \
     libepoxy-devel \
     libfdt-devel \
+    libgnutls-devel \
     libiscsi-devel \
     libjpeg8-devel \
+    libnuma-devel \
+    libpixman-1-0-devel \
     libpmem-devel \
     libpng16-devel \
     librbd-devel \
     libseccomp-devel \
+    libspice-server-devel \
     libssh-devel \
     lzo-devel \
     make \
-    libSDL2_image-devel \
+    mkisofs \
     ncurses-devel \
     ninja \
-    libnuma-devel \
     perl \
-    libpixman-1-0-devel \
     python3-base \
     python3-virtualenv \
     rdma-core-devel \
-    libSDL2-devel \
     snappy-devel \
-    libspice-server-devel \
     systemd-devel \
     systemtap-sdt-devel \
     tar \
     usbredir-devel \
     virglrenderer-devel \
-    xen-devel \
     vte-devel \
+    xen-devel \
     zlib-devel
 ENV QEMU_CONFIGURE_OPTS --python=/usr/bin/python3.6
 
diff --git a/tests/docker/dockerfiles/ubuntu1804.docker b/tests/docker/dockerfiles/ubuntu1804.docker
index 0acdb0d9ad..a50a35e6fe 100644
--- a/tests/docker/dockerfiles/ubuntu1804.docker
+++ b/tests/docker/dockerfiles/ubuntu1804.docker
@@ -46,10 +46,10 @@ ENV PACKAGES \
     libxen-dev \
     libzstd-dev \
     make \
-    python3-yaml \
+    ninja-build \
     python3-sphinx \
     python3-sphinx-rtd-theme \
-    ninja-build \
+    python3-yaml \
     sparse \
     xfslibs-dev
 RUN apt-get update && \
diff --git a/tests/docker/dockerfiles/ubuntu2004.docker b/tests/docker/dockerfiles/ubuntu2004.docker
index 88b3cfa136..eee2ef3cac 100644
--- a/tests/docker/dockerfiles/ubuntu2004.docker
+++ b/tests/docker/dockerfiles/ubuntu2004.docker
@@ -1,8 +1,10 @@
 FROM docker.io/library/ubuntu:20.04
-ENV PACKAGES flex bison \
+ENV PACKAGES \
+    bison \
     bsdmainutils \
     ccache \
     clang-10\
+    flex \
     gcc \
     gcovr \
     genisoimage \
@@ -65,8 +67,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
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [PATCH v4 07/22] tests/docker: fix mistakes in centos package lists
  2021-06-23 14:22 [PATCH v4 00/22] tests/docker: start using libvirt-ci's "lcitool" for dockerfiles Daniel P. Berrangé
                   ` (5 preceding siblings ...)
  2021-06-23 14:22 ` [PATCH v4 06/22] tests/docker: fix sorting in package lists Daniel P. Berrangé
@ 2021-06-23 14:22 ` Daniel P. Berrangé
  2021-07-05 13:33   ` Alex Bennée
  2021-06-23 14:22 ` [PATCH v4 08/22] tests/docker: fix mistakes in fedora package list Daniel P. Berrangé
                   ` (16 subsequent siblings)
  23 siblings, 1 reply; 51+ messages in thread
From: Daniel P. Berrangé @ 2021-06-23 14:22 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, Daniel P. Berrangé,
	Philippe Mathieu-Daudé, Philippe Mathieu-Daudé,
	Wainer dos Santos Moschetta, Willian Rampazzo, Alex Bennée

mesa-libEGL-devel is not used in QEMU at all, but mesa-libgbm-devel is.

spice-glib-devel is not use in QEMU at all, but spice-protocol is.
We also need the -devel package for spice-server, not the runtime.

There is no need to specifically refer to python36, we can just
use python3 as in other distros.

Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 tests/docker/dockerfiles/centos8.docker | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/docker/dockerfiles/centos8.docker b/tests/docker/dockerfiles/centos8.docker
index ee52305646..5f1c57b4ad 100644
--- a/tests/docker/dockerfiles/centos8.docker
+++ b/tests/docker/dockerfiles/centos8.docker
@@ -21,16 +21,16 @@ ENV PACKAGES \
     libgcrypt-devel \
     lzo-devel \
     make \
-    mesa-libEGL-devel \
+    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 \
     systemtap-sdt-devel \
     tar \
     zlib-devel
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [PATCH v4 08/22] tests/docker: fix mistakes in fedora package list
  2021-06-23 14:22 [PATCH v4 00/22] tests/docker: start using libvirt-ci's "lcitool" for dockerfiles Daniel P. Berrangé
                   ` (6 preceding siblings ...)
  2021-06-23 14:22 ` [PATCH v4 07/22] tests/docker: fix mistakes in centos " Daniel P. Berrangé
@ 2021-06-23 14:22 ` Daniel P. Berrangé
  2021-07-05 13:36   ` Alex Bennée
  2021-06-23 14:22 ` [PATCH v4 09/22] tests/docker: fix mistakes in ubuntu package lists Daniel P. Berrangé
                   ` (15 subsequent siblings)
  23 siblings, 1 reply; 51+ messages in thread
From: Daniel P. Berrangé @ 2021-06-23 14:22 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, Daniel P. Berrangé,
	Philippe Mathieu-Daudé, Philippe Mathieu-Daudé,
	Wainer dos Santos Moschetta, Willian Rampazzo, Alex Bennée

libblockdev-mpath-devel is not used by QEMU, rather it wants
device-mapper-multipath-devel.

Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 tests/docker/dockerfiles/fedora.docker | 1 -
 1 file changed, 1 deletion(-)

diff --git a/tests/docker/dockerfiles/fedora.docker b/tests/docker/dockerfiles/fedora.docker
index 4a0a84eb43..f667f03cc5 100644
--- a/tests/docker/dockerfiles/fedora.docker
+++ b/tests/docker/dockerfiles/fedora.docker
@@ -28,7 +28,6 @@ ENV PACKAGES \
     libaio-devel \
     libasan \
     libattr-devel \
-    libblockdev-mpath-devel \
     libcacard-devel \
     libcap-ng-devel \
     libcurl-devel \
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [PATCH v4 09/22] tests/docker: fix mistakes in ubuntu package lists
  2021-06-23 14:22 [PATCH v4 00/22] tests/docker: start using libvirt-ci's "lcitool" for dockerfiles Daniel P. Berrangé
                   ` (7 preceding siblings ...)
  2021-06-23 14:22 ` [PATCH v4 08/22] tests/docker: fix mistakes in fedora package list Daniel P. Berrangé
@ 2021-06-23 14:22 ` Daniel P. Berrangé
  2021-07-05 13:40   ` Alex Bennée
  2021-06-23 14:22 ` [PATCH v4 10/22] tests/docker: remove mingw packages from Fedora Daniel P. Berrangé
                   ` (14 subsequent siblings)
  23 siblings, 1 reply; 51+ messages in thread
From: Daniel P. Berrangé @ 2021-06-23 14:22 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, Daniel P. Berrangé,
	Philippe Mathieu-Daudé, Philippe Mathieu-Daudé,
	Wainer dos Santos Moschetta, Willian Rampazzo, Alex Bennée

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.

Remove vim since it is not a build pre-requisite and no other containers
include it.

Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 tests/docker/dockerfiles/ubuntu1804.docker |  3 ---
 tests/docker/dockerfiles/ubuntu2004.docker | 10 ++--------
 2 files changed, 2 insertions(+), 11 deletions(-)

diff --git a/tests/docker/dockerfiles/ubuntu1804.docker b/tests/docker/dockerfiles/ubuntu1804.docker
index a50a35e6fe..ee8545e4b1 100644
--- a/tests/docker/dockerfiles/ubuntu1804.docker
+++ b/tests/docker/dockerfiles/ubuntu1804.docker
@@ -5,7 +5,6 @@ ENV PACKAGES \
     gcc \
     gettext \
     git \
-    glusterfs-common \
     libaio-dev \
     libattr1-dev \
     libbrlapi-dev \
@@ -24,12 +23,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 \
diff --git a/tests/docker/dockerfiles/ubuntu2004.docker b/tests/docker/dockerfiles/ubuntu2004.docker
index eee2ef3cac..25f56adfb2 100644
--- a/tests/docker/dockerfiles/ubuntu2004.docker
+++ b/tests/docker/dockerfiles/ubuntu2004.docker
@@ -1,16 +1,13 @@
 FROM docker.io/library/ubuntu:20.04
 ENV PACKAGES \
-    bison \
     bsdmainutils \
     ccache \
-    clang-10\
-    flex \
+    clang \
     gcc \
     gcovr \
     genisoimage \
     gettext \
     git \
-    glusterfs-common \
     libaio-dev \
     libattr1-dev \
     libbrlapi-dev \
@@ -30,12 +27,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 \
@@ -53,7 +48,7 @@ ENV PACKAGES \
     libxen-dev \
     libzstd-dev \
     make \
-    netcat-openbsd \
+    ncat \
     ninja-build \
     python3-numpy \
     python3-opencv \
@@ -67,7 +62,6 @@ ENV PACKAGES \
     sparse \
     tesseract-ocr \
     tesseract-ocr-eng \
-    vim \
     xfslibs-dev
 RUN apt-get update && \
     DEBIAN_FRONTEND=noninteractive apt-get -y install $PACKAGES
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [PATCH v4 10/22] tests/docker: remove mingw packages from Fedora
  2021-06-23 14:22 [PATCH v4 00/22] tests/docker: start using libvirt-ci's "lcitool" for dockerfiles Daniel P. Berrangé
                   ` (8 preceding siblings ...)
  2021-06-23 14:22 ` [PATCH v4 09/22] tests/docker: fix mistakes in ubuntu package lists Daniel P. Berrangé
@ 2021-06-23 14:22 ` Daniel P. Berrangé
  2021-07-05 13:40   ` Alex Bennée
  2021-06-23 14:22 ` [PATCH v4 11/22] tests/docker: expand centos8 package list Daniel P. Berrangé
                   ` (13 subsequent siblings)
  23 siblings, 1 reply; 51+ messages in thread
From: Daniel P. Berrangé @ 2021-06-23 14:22 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, Daniel P. Berrangé,
	Philippe Mathieu-Daudé, Philippe Mathieu-Daudé,
	Wainer dos Santos Moschetta, Willian Rampazzo, Alex Bennée

There are dedicated containers providing mingw packages for Fedora.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 tests/docker/dockerfiles/fedora.docker | 27 --------------------------
 1 file changed, 27 deletions(-)

diff --git a/tests/docker/dockerfiles/fedora.docker b/tests/docker/dockerfiles/fedora.docker
index f667f03cc5..5849ea7617 100644
--- a/tests/docker/dockerfiles/fedora.docker
+++ b/tests/docker/dockerfiles/fedora.docker
@@ -52,33 +52,6 @@ ENV PACKAGES \
     lzo-devel \
     make \
     meson \
-    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 \
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [PATCH v4 11/22] tests/docker: expand centos8 package list
  2021-06-23 14:22 [PATCH v4 00/22] tests/docker: start using libvirt-ci's "lcitool" for dockerfiles Daniel P. Berrangé
                   ` (9 preceding siblings ...)
  2021-06-23 14:22 ` [PATCH v4 10/22] tests/docker: remove mingw packages from Fedora Daniel P. Berrangé
@ 2021-06-23 14:22 ` Daniel P. Berrangé
  2021-07-05 13:40   ` Alex Bennée
  2021-07-05 20:27   ` Alex Bennée
  2021-06-23 14:22 ` [PATCH v4 12/22] tests/docker: expand fedora " Daniel P. Berrangé
                   ` (12 subsequent siblings)
  23 siblings, 2 replies; 51+ messages in thread
From: Daniel P. Berrangé @ 2021-06-23 14:22 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, Daniel P. Berrangé,
	Philippe Mathieu-Daudé, Philippe Mathieu-Daudé,
	Wainer dos Santos Moschetta, Willian Rampazzo, Alex Bennée

This is the fully expanded list of build pre-requisites QEMU can
conceivably use in any scenario.

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 tests/docker/dockerfiles/centos8.docker | 68 +++++++++++++++++++++++++
 1 file changed, 68 insertions(+)

diff --git a/tests/docker/dockerfiles/centos8.docker b/tests/docker/dockerfiles/centos8.docker
index 5f1c57b4ad..4cc4c0c8a1 100644
--- a/tests/docker/dockerfiles/centos8.docker
+++ b/tests/docker/dockerfiles/centos8.docker
@@ -3,36 +3,104 @@ FROM docker.io/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 \
+    ctags \
+    cyrus-sasl-devel \
+    daxctl-devel \
     dbus-daemon \
+    device-mapper-multipath-devel \
     diffutils \
+    findutils \
     gcc \
     gcc-c++ \
     genisoimage \
     gettext \
     git \
     glib2-devel \
+    glibc-langpack-en \
+    glibc-static \
+    glusterfs-api-devel \
+    gnutls-devel \
+    gtk3-devel \
+    hostname \
+    jemalloc-devel \
     libaio-devel \
+    libasan \
+    libattr-devel \
     libbpf-devel \
+    libcacard-devel \
+    libcap-ng-devel \
+    libcurl-devel \
+    libdrm-devel \
     libepoxy-devel \
     libfdt-devel \
     libffi-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 \
+    llvm \
     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-sphinx_rtd_theme \
+    python3-virtualenv \
+    python3-wheel \
     rdma-core-devel \
+    rpm \
+    sed \
+    snappy-devel \
     spice-protocol \
     spice-server-devel \
+    systemd-devel \
     systemtap-sdt-devel \
     tar \
+    texinfo \
+    usbredir-devel \
+    util-linux \
+    virglrenderer-devel \
+    vte291-devel \
+    which \
+    xfsprogs-devel \
     zlib-devel
 
 RUN dnf install -y dnf-plugins-core && \
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [PATCH v4 12/22] tests/docker: expand fedora package list
  2021-06-23 14:22 [PATCH v4 00/22] tests/docker: start using libvirt-ci's "lcitool" for dockerfiles Daniel P. Berrangé
                   ` (10 preceding siblings ...)
  2021-06-23 14:22 ` [PATCH v4 11/22] tests/docker: expand centos8 package list Daniel P. Berrangé
@ 2021-06-23 14:22 ` Daniel P. Berrangé
  2021-07-05 13:41   ` Alex Bennée
  2021-06-23 14:22 ` [PATCH v4 13/22] tests/docker: expand ubuntu1804 " Daniel P. Berrangé
                   ` (11 subsequent siblings)
  23 siblings, 1 reply; 51+ messages in thread
From: Daniel P. Berrangé @ 2021-06-23 14:22 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, Daniel P. Berrangé,
	Philippe Mathieu-Daudé, Philippe Mathieu-Daudé,
	Wainer dos Santos Moschetta, Willian Rampazzo, Alex Bennée

This is the fully expanded list of build pre-requisites QEMU can
conceivably use in any scenario.

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 tests/docker/dockerfiles/fedora.docker | 30 ++++++++++++++++++++++++--
 1 file changed, 28 insertions(+), 2 deletions(-)

diff --git a/tests/docker/dockerfiles/fedora.docker b/tests/docker/dockerfiles/fedora.docker
index 5849ea7617..eec1add7f6 100644
--- a/tests/docker/dockerfiles/fedora.docker
+++ b/tests/docker/dockerfiles/fedora.docker
@@ -3,63 +3,83 @@ FROM registry.fedoraproject.org/fedora:33
 # Please keep this list sorted alphabetically
 ENV PACKAGES \
     SDL2-devel \
+    SDL2_image-devel \
+    alsa-lib-devel \
     bc \
     brlapi-devel \
     bzip2 \
     bzip2-devel \
+    ca-certificates \
     capstone-devel \
     ccache \
     clang \
+    ctags \
     cyrus-sasl-devel \
+    daxctl-devel \
     dbus-daemon \
     device-mapper-multipath-devel \
     diffutils \
     findutils \
     gcc \
     gcc-c++ \
+    gcovr \
     genisoimage \
     gettext \
     git \
     glib2-devel \
+    glibc-langpack-en \
+    glibc-static \
     glusterfs-api-devel \
     gnutls-devel \
     gtk3-devel \
     hostname \
+    jemalloc-devel \
     libaio-devel \
     libasan \
     libattr-devel \
+    libbpf-devel \
     libcacard-devel \
     libcap-ng-devel \
     libcurl-devel \
+    libdrm-devel \
     libepoxy-devel \
     libfdt-devel \
-    libbpf-devel \
     libffi-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 \
     llvm \
+    lttng-ust-devel \
     lzo-devel \
     make \
+    mesa-libgbm-devel \
     meson \
     ncurses-devel \
     nettle-devel \
     ninja-build \
     nmap-ncat \
     numactl-devel \
-    perl \
+    openssh-clients \
+    pam-devel \
     perl-Test-Harness \
+    perl-base \
     pixman-devel \
+    pkgconfig \
+    pulseaudio-libs-devel \
     python3 \
     python3-PyYAML \
     python3-numpy \
@@ -70,19 +90,25 @@ ENV PACKAGES \
     python3-sphinx_rtd_theme \
     python3-virtualenv \
     rdma-core-devel \
+    rpm \
+    sed \
     snappy-devel \
     sparse \
+    spice-protocol \
     spice-server-devel \
     systemd-devel \
     systemtap-sdt-devel \
     tar \
     tesseract \
     tesseract-langpack-eng \
+    texinfo \
     usbredir-devel \
+    util-linux \
     virglrenderer-devel \
     vte291-devel \
     which \
     xen-devel \
+    xfsprogs-devel \
     zlib-devel
 ENV QEMU_CONFIGURE_OPTS --python=/usr/bin/python3
 
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [PATCH v4 13/22] tests/docker: expand ubuntu1804 package list
  2021-06-23 14:22 [PATCH v4 00/22] tests/docker: start using libvirt-ci's "lcitool" for dockerfiles Daniel P. Berrangé
                   ` (11 preceding siblings ...)
  2021-06-23 14:22 ` [PATCH v4 12/22] tests/docker: expand fedora " Daniel P. Berrangé
@ 2021-06-23 14:22 ` Daniel P. Berrangé
  2021-07-05 13:41   ` Alex Bennée
  2021-06-23 14:22 ` [PATCH v4 14/22] tests/docker: expand ubuntu2004 " Daniel P. Berrangé
                   ` (10 subsequent siblings)
  23 siblings, 1 reply; 51+ messages in thread
From: Daniel P. Berrangé @ 2021-06-23 14:22 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, Daniel P. Berrangé,
	Philippe Mathieu-Daudé, Philippe Mathieu-Daudé,
	Wainer dos Santos Moschetta, Willian Rampazzo, Alex Bennée

This is the fully expanded list of build pre-requisites QEMU can
conceivably use in any scenario.

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 tests/docker/dockerfiles/ubuntu1804.docker | 61 +++++++++++++++++++++-
 1 file changed, 60 insertions(+), 1 deletion(-)

diff --git a/tests/docker/dockerfiles/ubuntu1804.docker b/tests/docker/dockerfiles/ubuntu1804.docker
index ee8545e4b1..0880bf3e29 100644
--- a/tests/docker/dockerfiles/ubuntu1804.docker
+++ b/tests/docker/dockerfiles/ubuntu1804.docker
@@ -1,54 +1,113 @@
 FROM docker.io/library/ubuntu:18.04
 ENV PACKAGES \
+    bc \
+    bsdmainutils \
+    bzip2 \
+    ca-certificates \
     ccache \
     clang \
+    dbus \
+    debianutils \
+    diffutils \
+    exuberant-ctags \
+    findutils \
+    g++ \
     gcc \
+    gcovr \
+    genisoimage \
     gettext \
     git \
+    glusterfs-common \
+    hostname \
     libaio-dev \
+    libasan5 \
+    libasound2-dev \
     libattr1-dev \
     libbrlapi-dev \
     libbz2-dev \
+    libc6-dev \
     libcacard-dev \
     libcap-ng-dev \
+    libcapstone-dev \
     libcurl4-gnutls-dev \
+    libdaxctl-dev \
     libdrm-dev \
     libepoxy-dev \
     libfdt-dev \
     libffi-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 \
     libsdl2-dev \
+    libsdl2-image-dev \
     libseccomp-dev \
     libsnappy-dev \
     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 \
+    llvm \
+    locales \
     make \
+    multipath-tools \
+    netcat-openbsd \
+    nettle-dev \
     ninja-build \
+    openssh-client \
+    perl-base \
+    pkgconf \
+    python3 \
+    python3-numpy \
+    python3-opencv \
+    python3-pillow \
+    python3-pip \
+    python3-setuptools \
     python3-sphinx \
     python3-sphinx-rtd-theme \
+    python3-venv \
+    python3-wheel \
     python3-yaml \
+    rpm2cpio \
+    sed \
     sparse \
-    xfslibs-dev
+    systemtap-sdt-dev \
+    tar \
+    tesseract-ocr \
+    tesseract-ocr-eng \
+    texinfo \
+    xfslibs-dev \
+    zlib1g-dev
 RUN apt-get update && \
     DEBIAN_FRONTEND=noninteractive apt-get -y install $PACKAGES
 RUN dpkg -l $PACKAGES | sort > /packages.txt
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [PATCH v4 14/22] tests/docker: expand ubuntu2004 package list
  2021-06-23 14:22 [PATCH v4 00/22] tests/docker: start using libvirt-ci's "lcitool" for dockerfiles Daniel P. Berrangé
                   ` (12 preceding siblings ...)
  2021-06-23 14:22 ` [PATCH v4 13/22] tests/docker: expand ubuntu1804 " Daniel P. Berrangé
@ 2021-06-23 14:22 ` Daniel P. Berrangé
  2021-07-05 13:42   ` Alex Bennée
  2021-06-23 14:22 ` [PATCH v4 15/22] tests/docker: expand opensuse-leap " Daniel P. Berrangé
                   ` (9 subsequent siblings)
  23 siblings, 1 reply; 51+ messages in thread
From: Daniel P. Berrangé @ 2021-06-23 14:22 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, Daniel P. Berrangé,
	Philippe Mathieu-Daudé, Philippe Mathieu-Daudé,
	Wainer dos Santos Moschetta, Willian Rampazzo, Alex Bennée

This is the fully expanded list of build pre-requisites QEMU can
conceivably use in any scenario.

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 tests/docker/dockerfiles/ubuntu2004.docker | 50 +++++++++++++++++++++-
 1 file changed, 48 insertions(+), 2 deletions(-)

diff --git a/tests/docker/dockerfiles/ubuntu2004.docker b/tests/docker/dockerfiles/ubuntu2004.docker
index 25f56adfb2..39de63d012 100644
--- a/tests/docker/dockerfiles/ubuntu2004.docker
+++ b/tests/docker/dockerfiles/ubuntu2004.docker
@@ -1,25 +1,44 @@
 FROM docker.io/library/ubuntu:20.04
 ENV PACKAGES \
+    bc \
     bsdmainutils \
+    bzip2 \
+    ca-certificates \
     ccache \
     clang \
+    dbus \
+    debianutils \
+    diffutils \
+    exuberant-ctags \
+    findutils \
+    g++ \
     gcc \
     gcovr \
     genisoimage \
     gettext \
     git \
+    hostname \
     libaio-dev \
+    libasan5 \
+    libasound2-dev \
     libattr1-dev \
     libbrlapi-dev \
     libbz2-dev \
+    libc6-dev \
     libcacard-dev \
     libcap-ng-dev \
+    libcapstone-dev \
     libcurl4-gnutls-dev \
+    libdaxctl-dev \
     libdrm-dev \
     libepoxy-dev \
     libfdt-dev \
     libffi-dev \
     libgbm-dev \
+    libgcrypt20-dev \
+    libglib2.0-dev \
+    libglusterfs-dev \
+    libgnutls28-dev \
     libgtk-3-dev \
     libibverbs-dev \
     libiscsi-dev \
@@ -30,39 +49,66 @@ 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 \
     libsdl2-dev \
+    libsdl2-image-dev \
     libseccomp-dev \
     libslirp-dev \
     libsnappy-dev \
     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 \
+    llvm \
+    locales \
     make \
+    multipath-tools \
     ncat \
+    nettle-dev \
     ninja-build \
+    openssh-client \
+    perl-base \
+    pkgconf \
+    python3 \
     python3-numpy \
     python3-opencv \
-    python3-pil \
+    python3-pillow \
     python3-pip \
+    python3-setuptools \
     python3-sphinx \
     python3-sphinx-rtd-theme \
     python3-venv \
+    python3-wheel \
     python3-yaml \
     rpm2cpio \
+    sed \
     sparse \
+    systemtap-sdt-dev \
+    tar \
     tesseract-ocr \
     tesseract-ocr-eng \
-    xfslibs-dev
+    texinfo \
+    xfslibs-dev \
+    zlib1g-dev
 RUN apt-get update && \
     DEBIAN_FRONTEND=noninteractive apt-get -y install $PACKAGES
 RUN dpkg -l $PACKAGES | sort > /packages.txt
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [PATCH v4 15/22] tests/docker: expand opensuse-leap package list
  2021-06-23 14:22 [PATCH v4 00/22] tests/docker: start using libvirt-ci's "lcitool" for dockerfiles Daniel P. Berrangé
                   ` (13 preceding siblings ...)
  2021-06-23 14:22 ` [PATCH v4 14/22] tests/docker: expand ubuntu2004 " Daniel P. Berrangé
@ 2021-06-23 14:22 ` Daniel P. Berrangé
  2021-07-05 13:42   ` Alex Bennée
  2021-06-23 14:22 ` [PATCH v4 16/22] tests/docker: add script for automating container refresh Daniel P. Berrangé
                   ` (8 subsequent siblings)
  23 siblings, 1 reply; 51+ messages in thread
From: Daniel P. Berrangé @ 2021-06-23 14:22 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, Daniel P. Berrangé,
	Philippe Mathieu-Daudé, Philippe Mathieu-Daudé,
	Wainer dos Santos Moschetta, Willian Rampazzo, Alex Bennée

This is the fully expanded list of build pre-requisites QEMU can
conceivably use in any scenario.

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 tests/docker/dockerfiles/opensuse-leap.docker | 59 ++++++++++++++++++-
 1 file changed, 58 insertions(+), 1 deletion(-)

diff --git a/tests/docker/dockerfiles/opensuse-leap.docker b/tests/docker/dockerfiles/opensuse-leap.docker
index 6011447181..5a8bee0289 100644
--- a/tests/docker/dockerfiles/opensuse-leap.docker
+++ b/tests/docker/dockerfiles/opensuse-leap.docker
@@ -2,53 +2,110 @@ FROM registry.opensuse.org/opensuse/leap:15.2
 
 # Please keep this list sorted alphabetically
 ENV PACKAGES \
+    Mesa-devel \
+    alsa-lib-devel \
     bc \
     brlapi-devel \
     bzip2 \
+    ca-certificates \
     ccache \
+    clang \
+    ctags \
     cyrus-sasl-devel \
+    dbus-1 \
+    diffutils \
+    findutils \
     gcc \
     gcc-c++ \
+    gcovr \
     gettext-runtime \
     git \
     glib2-devel \
+    glibc-locale \
+    glibc-static \
     glusterfs-devel \
     gtk3-devel \
+    hostname \
+    jemalloc-devel \
     libSDL2-devel \
     libSDL2_image-devel \
     libaio-devel \
+    libasan6 \
     libattr-devel \
+    libbpf-devel \
+    libbz2-devel \
+    libcacard-devel \
     libcap-ng-devel \
+    libcurl-devel \
+    libdrm-devel \
     libepoxy-devel \
     libfdt-devel \
+    libffi-devel \
+    libgcrypt-devel \
     libgnutls-devel \
     libiscsi-devel \
     libjpeg8-devel \
+    libndctl-devel \
+    libnettle-devel \
+    libnfs-devel \
     libnuma-devel \
     libpixman-1-0-devel \
     libpmem-devel \
     libpng16-devel \
+    libpulse-devel \
     librbd-devel \
     libseccomp-devel \
     libspice-server-devel \
     libssh-devel \
+    libtasn1-devel \
+    libubsan1 \
+    libudev-devel \
+    libusb-1_0-devel \
+    libxml2-devel \
+    libzstd-devel \
+    llvm \
+    lttng-ust-devel \
     lzo-devel \
     make \
     mkisofs \
+    ncat \
     ncurses-devel \
     ninja \
-    perl \
+    openssh \
+    pam-devel \
+    perl-Test-Harness \
+    perl-base \
+    pkgconfig \
+    python3-Pillow \
+    python3-PyYAML \
+    python3-Sphinx \
     python3-base \
+    python3-numpy \
+    python3-opencv \
+    python3-pip \
+    python3-setuptools \
+    python3-sphinx_rtd_theme \
     python3-virtualenv \
+    python3-wheel \
     rdma-core-devel \
+    rpm \
+    sed \
     snappy-devel \
+    sparse \
+    spice-protocol-devel \
     systemd-devel \
     systemtap-sdt-devel \
     tar \
+    tesseract-ocr \
+    tesseract-ocr-traineddata-english \
+    texinfo \
     usbredir-devel \
+    util-linux \
     virglrenderer-devel \
     vte-devel \
+    which \
     xen-devel \
+    xfsprogs-devel \
     zlib-devel
 ENV QEMU_CONFIGURE_OPTS --python=/usr/bin/python3.6
 
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [PATCH v4 16/22] tests/docker: add script for automating container refresh
  2021-06-23 14:22 [PATCH v4 00/22] tests/docker: start using libvirt-ci's "lcitool" for dockerfiles Daniel P. Berrangé
                   ` (14 preceding siblings ...)
  2021-06-23 14:22 ` [PATCH v4 15/22] tests/docker: expand opensuse-leap " Daniel P. Berrangé
@ 2021-06-23 14:22 ` Daniel P. Berrangé
  2021-07-05 13:44   ` Alex Bennée
  2021-06-23 14:22 ` [PATCH v4 17/22] tests/docker: auto-generate centos8 with lcitool Daniel P. Berrangé
                   ` (7 subsequent siblings)
  23 siblings, 1 reply; 51+ messages in thread
From: Daniel P. Berrangé @ 2021-06-23 14:22 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, Daniel P. Berrangé,
	Philippe Mathieu-Daudé, Philippe Mathieu-Daudé,
	Wainer dos Santos Moschetta, Willian Rampazzo, Alex Bennée

This introduces

  https://gitlab.com/libvirt/libvirt-ci

as a git submodule at tests/docker/libvirt-ci

This submodule only needs to be checked out when needing to re-generate
the files in tests/docker/dockerfiles.

When a new build pre-requisite is needed for QEMU, it should be added to
the libvirt-ci project 'qemu.yml' file, and the submodule updated to the
new commit. The 'make docker-refresh' target will then re-create all the
dockerfiles with updated package lists. This ensures that all the
containers get exactly the same build pre-requisite packages installed.

It also facilitates the addition of containers targetting new distros
or updating existing containers to new versions of the same distro,
where packages might have been renamed.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 docs/devel/testing.rst              | 34 ++++++++++++++++--
 tests/docker/Makefile.include       | 12 +++++++
 tests/docker/dockerfiles-refresh.py | 56 +++++++++++++++++++++++++++++
 3 files changed, 100 insertions(+), 2 deletions(-)
 create mode 100755 tests/docker/dockerfiles-refresh.py

diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst
index 4e42392810..7882db85d4 100644
--- a/docs/devel/testing.rst
+++ b/docs/devel/testing.rst
@@ -372,8 +372,38 @@ Along with many other images, the ``centos8`` image is defined in a Dockerfile
 in ``tests/docker/dockerfiles/``, called ``centos8.docker``. ``make docker-help``
 command will list all the available images.
 
-To add a new image, simply create a new ``.docker`` file under the
-``tests/docker/dockerfiles/`` directory.
+Most of the existing Dockerfiles were written by hand, simply by creating a
+a new ``.docker`` file under the ``tests/docker/dockerfiles/`` directory.
+This has led to an inconsistent set of packages being present across the
+different containers.
+
+Thus going forward, QEMU is aiming to automatically generate the Dockerfiles
+using the ``lcitool`` program provided by the ``libvirt-ci`` project:
+
+  https://gitlab.com/libvirt/libvirt-ci
+
+In that project, there is a ``qemu.yml`` file defining the list of build
+pre-requisites needed by QEMU. This is processed together with the
+``mappings.yml`` file to compute the distro specific list of package names.
+The package names are then fed into a generator which emits a well structured
+dockerfile. The set of dockerfiles which are auto-generated is defined in
+the ``tests/docker/dockerfiles-refresh.py`` script.
+
+When preparing a patch series that changes dockerfiles managed by ``libvirt-ci``
+tools, the following steps should be takenL
+
+ * Fork the ``libvirt-ci`` project on gitlab
+
+ * Prepare changes to its ``qemu.yml`` file and optionally ``mappings.yml``
+   to define the packages to be added to QEMU's dockerfiles.
+
+ * In QEMU run ``make docker-refresh LCITOOL=/path/to/libvirt-ci/lcitool``
+   to re-create the dockerfiles in ``tests/docker/dockerfiles``
+
+ * Submit your changes to QEMU in the normal manner
+
+ * Submit ``libvirt-ci`` changes as a merge request, linking to the
+   QEMU patch series that uses them.
 
 A ``.pre`` script can be added beside the ``.docker`` file, which will be
 executed before building the image under the build context directory. This is
diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index ff5d732889..e8e5f497cc 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -27,6 +27,9 @@ DOCKER_TESTS := $(notdir $(shell \
 ENGINE := auto
 
 DOCKER_SCRIPT=$(SRC_PATH)/tests/docker/docker.py --engine $(ENGINE)
+REFRESH_SCRIPT=$(SRC_PATH)/tests/docker/dockerfiles-refresh.py
+# To be set to /path/to/checkout/of/libvirt-ci.git/lcitool
+LCITOOL=
 
 TESTS ?= %
 IMAGES ?= %
@@ -220,6 +223,7 @@ docker:
 	@echo '    docker-image:        Build all images.'
 	@echo '    docker-image-IMAGE:  Build image "IMAGE".'
 	@echo '    docker-run:          For manually running a "TEST" with "IMAGE".'
+	@echo '    docker-refresh:      Re-generate dockerfiles after updating libvirt-ci'
 	@echo
 	@echo 'Available container images:'
 	@echo '    $(DOCKER_IMAGES)'
@@ -302,3 +306,11 @@ docker-run-%:
 
 docker-clean:
 	$(call quiet-command, $(DOCKER_SCRIPT) clean)
+
+docker-refresh:
+	@if [ -z "$(LCITOOL)" ] ; \
+	then \
+	    echo "No lcitool path specified. Use 'make docker-refresh LCITOOL=/path/to/libvirt-ci.git/lcitool'"; \
+	    exit 1; \
+	fi
+	$(call quiet-command, $(REFRESH_SCRIPT) $(LCITOOL) $(SRC_PATH))
diff --git a/tests/docker/dockerfiles-refresh.py b/tests/docker/dockerfiles-refresh.py
new file mode 100755
index 0000000000..7f59ffbc59
--- /dev/null
+++ b/tests/docker/dockerfiles-refresh.py
@@ -0,0 +1,56 @@
+#!/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 os.path
+import subprocess
+
+if len(sys.argv) != 3:
+   print("syntax: %s PATH-TO-LCITOOL SRC-ROOT" % sys.argv[0], file=sys.stderr)
+   sys.exit(1)
+
+lcitool_path=sys.argv[1]
+src_root=sys.argv[2]
+
+def atomic_write(filename, content):
+   dst = os.path.join(src_root, "tests", "docker", "dockerfiles", filename)
+   try:
+      with open(dst + ".tmp", "w") as fp:
+         print(content, file=fp, end="")
+         os.replace(dst + ".tmp", dst)
+   except Exception as ex:
+      os.unlink(dst + ".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)
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [PATCH v4 17/22] tests/docker: auto-generate centos8 with lcitool
  2021-06-23 14:22 [PATCH v4 00/22] tests/docker: start using libvirt-ci's "lcitool" for dockerfiles Daniel P. Berrangé
                   ` (15 preceding siblings ...)
  2021-06-23 14:22 ` [PATCH v4 16/22] tests/docker: add script for automating container refresh Daniel P. Berrangé
@ 2021-06-23 14:22 ` Daniel P. Berrangé
  2021-06-23 14:22 ` [PATCH v4 18/22] tests/docker: auto-generate fedora " Daniel P. Berrangé
                   ` (6 subsequent siblings)
  23 siblings, 0 replies; 51+ messages in thread
From: Daniel P. Berrangé @ 2021-06-23 14:22 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, Daniel P. Berrangé,
	Philippe Mathieu-Daudé, Philippe Mathieu-Daudé,
	Wainer dos Santos Moschetta, Willian Rampazzo, Alex Bennée

This commit is best examined using the "-b" option to diff.

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 tests/docker/dockerfiles-refresh.py     |   2 +-
 tests/docker/dockerfiles/centos8.docker | 238 +++++++++++++-----------
 2 files changed, 132 insertions(+), 108 deletions(-)

diff --git a/tests/docker/dockerfiles-refresh.py b/tests/docker/dockerfiles-refresh.py
index 7f59ffbc59..309ec4f5f4 100755
--- a/tests/docker/dockerfiles-refresh.py
+++ b/tests/docker/dockerfiles-refresh.py
@@ -51,6 +51,6 @@ def generate_image(filename, host, cross=None, trailer=None):
    atomic_write(filename, content)
 
 try:
-   pass
+   generate_image("centos8.docker", "centos-8")
 except Exception as ex:
    print(str(ex), file=sys.stderr)
diff --git a/tests/docker/dockerfiles/centos8.docker b/tests/docker/dockerfiles/centos8.docker
index 4cc4c0c8a1..982f2e99ee 100644
--- a/tests/docker/dockerfiles/centos8.docker
+++ b/tests/docker/dockerfiles/centos8.docker
@@ -1,109 +1,133 @@
-FROM docker.io/centos:8
+# THIS FILE WAS AUTO-GENERATED
+#
+#  $ lcitool dockerfile centos-8 qemu
+#
+# https://gitlab.com/libvirt/libvirt-ci/-/commit/e9aa46cbbbbd0c02285e9dde1f91b3110b2444b7
 
-RUN dnf -y update
-ENV PACKAGES \
-    SDL2-devel \
-    alsa-lib-devel \
-    bc \
-    brlapi-devel \
-    bzip2 \
-    bzip2-devel \
-    ca-certificates \
-    capstone-devel \
-    ccache \
-    clang \
-    ctags \
-    cyrus-sasl-devel \
-    daxctl-devel \
-    dbus-daemon \
-    device-mapper-multipath-devel \
-    diffutils \
-    findutils \
-    gcc \
-    gcc-c++ \
-    genisoimage \
-    gettext \
-    git \
-    glib2-devel \
-    glibc-langpack-en \
-    glibc-static \
-    glusterfs-api-devel \
-    gnutls-devel \
-    gtk3-devel \
-    hostname \
-    jemalloc-devel \
-    libaio-devel \
-    libasan \
-    libattr-devel \
-    libbpf-devel \
-    libcacard-devel \
-    libcap-ng-devel \
-    libcurl-devel \
-    libdrm-devel \
-    libepoxy-devel \
-    libfdt-devel \
-    libffi-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 \
-    llvm \
-    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-sphinx_rtd_theme \
-    python3-virtualenv \
-    python3-wheel \
-    rdma-core-devel \
-    rpm \
-    sed \
-    snappy-devel \
-    spice-protocol \
-    spice-server-devel \
-    systemd-devel \
-    systemtap-sdt-devel \
-    tar \
-    texinfo \
-    usbredir-devel \
-    util-linux \
-    virglrenderer-devel \
-    vte291-devel \
-    which \
-    xfsprogs-devel \
-    zlib-devel
+FROM docker.io/library/centos:8
 
-RUN dnf install -y dnf-plugins-core && \
-  dnf config-manager --set-enabled powertools && \
-  dnf install -y $PACKAGES
-RUN rpm -q $PACKAGES | sort > /packages.txt
+RUN dnf update -y && \
+    dnf install 'dnf-command(config-manager)' -y && \
+    dnf config-manager --set-enabled -y powertools && \
+    dnf install -y centos-release-advanced-virtualization && \
+    dnf install -y epel-release && \
+    dnf install -y \
+        SDL2-devel \
+        alsa-lib-devel \
+        bc \
+        brlapi-devel \
+        bzip2 \
+        bzip2-devel \
+        ca-certificates \
+        capstone-devel \
+        ccache \
+        clang \
+        ctags \
+        cyrus-sasl-devel \
+        daxctl-devel \
+        dbus-daemon \
+        device-mapper-multipath-devel \
+        diffutils \
+        findutils \
+        gcc \
+        gcc-c++ \
+        genisoimage \
+        gettext \
+        git \
+        glib2-devel \
+        glibc-langpack-en \
+        glibc-static \
+        glusterfs-api-devel \
+        gnutls-devel \
+        gtk3-devel \
+        hostname \
+        jemalloc-devel \
+        libaio-devel \
+        libasan \
+        libattr-devel \
+        libbpf-devel \
+        libcacard-devel \
+        libcap-ng-devel \
+        libcurl-devel \
+        libdrm-devel \
+        libepoxy-devel \
+        libfdt-devel \
+        libffi-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 \
+        llvm \
+        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-sphinx_rtd_theme \
+        python3-virtualenv \
+        python3-wheel \
+        rdma-core-devel \
+        rpm \
+        sed \
+        snappy-devel \
+        spice-protocol \
+        spice-server-devel \
+        systemd-devel \
+        systemtap-sdt-devel \
+        tar \
+        texinfo \
+        usbredir-devel \
+        util-linux \
+        virglrenderer-devel \
+        vte291-devel \
+        which \
+        xfsprogs-devel \
+        zlib-devel && \
+    dnf autoremove -y && \
+    dnf clean all -y && \
+    rpm -qa | sort > /packages.txt && \
+    mkdir -p /usr/libexec/ccache-wrappers && \
+    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/c++ && \
+    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \
+    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/clang && \
+    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/g++ && \
+    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc
+
+RUN pip3 install \
+         gcovr \
+         meson==0.56.0
+
+ENV LANG "en_US.UTF-8"
+ENV MAKE "/usr/bin/make"
+ENV NINJA "/usr/bin/ninja"
+ENV PYTHON "/usr/bin/python3"
+ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [PATCH v4 18/22] tests/docker: auto-generate fedora with lcitool
  2021-06-23 14:22 [PATCH v4 00/22] tests/docker: start using libvirt-ci's "lcitool" for dockerfiles Daniel P. Berrangé
                   ` (16 preceding siblings ...)
  2021-06-23 14:22 ` [PATCH v4 17/22] tests/docker: auto-generate centos8 with lcitool Daniel P. Berrangé
@ 2021-06-23 14:22 ` Daniel P. Berrangé
  2021-06-23 14:22 ` [PATCH v4 19/22] tests/docker: auto-generate ubuntu1804 " Daniel P. Berrangé
                   ` (5 subsequent siblings)
  23 siblings, 0 replies; 51+ messages in thread
From: Daniel P. Berrangé @ 2021-06-23 14:22 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, Daniel P. Berrangé,
	Philippe Mathieu-Daudé, Philippe Mathieu-Daudé,
	Wainer dos Santos Moschetta, Willian Rampazzo, Alex Bennée

This commit is best examined using the "-b" option to diff.

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 tests/docker/dockerfiles-refresh.py    |   1 +
 tests/docker/dockerfiles/fedora.docker | 254 ++++++++++++++-----------
 2 files changed, 141 insertions(+), 114 deletions(-)

diff --git a/tests/docker/dockerfiles-refresh.py b/tests/docker/dockerfiles-refresh.py
index 309ec4f5f4..8f6047f9b0 100755
--- a/tests/docker/dockerfiles-refresh.py
+++ b/tests/docker/dockerfiles-refresh.py
@@ -52,5 +52,6 @@ def generate_image(filename, host, cross=None, trailer=None):
 
 try:
    generate_image("centos8.docker", "centos-8")
+   generate_image("fedora.docker", "fedora-33")
 except Exception as ex:
    print(str(ex), file=sys.stderr)
diff --git a/tests/docker/dockerfiles/fedora.docker b/tests/docker/dockerfiles/fedora.docker
index eec1add7f6..530f82accd 100644
--- a/tests/docker/dockerfiles/fedora.docker
+++ b/tests/docker/dockerfiles/fedora.docker
@@ -1,117 +1,143 @@
+# THIS FILE WAS AUTO-GENERATED
+#
+#  $ lcitool dockerfile fedora-33 qemu
+#
+# https://gitlab.com/libvirt/libvirt-ci/-/commit/e9aa46cbbbbd0c02285e9dde1f91b3110b2444b7
+
 FROM registry.fedoraproject.org/fedora:33
 
-# Please keep this list sorted alphabetically
-ENV PACKAGES \
-    SDL2-devel \
-    SDL2_image-devel \
-    alsa-lib-devel \
-    bc \
-    brlapi-devel \
-    bzip2 \
-    bzip2-devel \
-    ca-certificates \
-    capstone-devel \
-    ccache \
-    clang \
-    ctags \
-    cyrus-sasl-devel \
-    daxctl-devel \
-    dbus-daemon \
-    device-mapper-multipath-devel \
-    diffutils \
-    findutils \
-    gcc \
-    gcc-c++ \
-    gcovr \
-    genisoimage \
-    gettext \
-    git \
-    glib2-devel \
-    glibc-langpack-en \
-    glibc-static \
-    glusterfs-api-devel \
-    gnutls-devel \
-    gtk3-devel \
-    hostname \
-    jemalloc-devel \
-    libaio-devel \
-    libasan \
-    libattr-devel \
-    libbpf-devel \
-    libcacard-devel \
-    libcap-ng-devel \
-    libcurl-devel \
-    libdrm-devel \
-    libepoxy-devel \
-    libfdt-devel \
-    libffi-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 \
-    llvm \
-    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-Test-Harness \
-    perl-base \
-    pixman-devel \
-    pkgconfig \
-    pulseaudio-libs-devel \
-    python3 \
-    python3-PyYAML \
-    python3-numpy \
-    python3-opencv \
-    python3-pillow \
-    python3-pip \
-    python3-sphinx \
-    python3-sphinx_rtd_theme \
-    python3-virtualenv \
-    rdma-core-devel \
-    rpm \
-    sed \
-    snappy-devel \
-    sparse \
-    spice-protocol \
-    spice-server-devel \
-    systemd-devel \
-    systemtap-sdt-devel \
-    tar \
-    tesseract \
-    tesseract-langpack-eng \
-    texinfo \
-    usbredir-devel \
-    util-linux \
-    virglrenderer-devel \
-    vte291-devel \
-    which \
-    xen-devel \
-    xfsprogs-devel \
-    zlib-devel
-ENV QEMU_CONFIGURE_OPTS --python=/usr/bin/python3
+RUN dnf install -y nosync && \
+    echo -e '#!/bin/sh\n\
+if test -d /usr/lib64\n\
+then\n\
+    export LD_PRELOAD=/usr/lib64/nosync/nosync.so\n\
+else\n\
+    export LD_PRELOAD=/usr/lib/nosync/nosync.so\n\
+fi\n\
+exec "$@"' > /usr/bin/nosync && \
+    chmod +x /usr/bin/nosync && \
+    nosync dnf update -y && \
+    nosync dnf install -y \
+        SDL2-devel \
+        SDL2_image-devel \
+        alsa-lib-devel \
+        bc \
+        brlapi-devel \
+        bzip2 \
+        bzip2-devel \
+        ca-certificates \
+        capstone-devel \
+        ccache \
+        clang \
+        ctags \
+        cyrus-sasl-devel \
+        daxctl-devel \
+        dbus-daemon \
+        device-mapper-multipath-devel \
+        diffutils \
+        findutils \
+        gcc \
+        gcc-c++ \
+        gcovr \
+        genisoimage \
+        gettext \
+        git \
+        glib2-devel \
+        glibc-langpack-en \
+        glibc-static \
+        glusterfs-api-devel \
+        gnutls-devel \
+        gtk3-devel \
+        hostname \
+        jemalloc-devel \
+        libaio-devel \
+        libasan \
+        libattr-devel \
+        libbpf-devel \
+        libcacard-devel \
+        libcap-ng-devel \
+        libcurl-devel \
+        libdrm-devel \
+        libepoxy-devel \
+        libfdt-devel \
+        libffi-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 \
+        llvm \
+        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-Test-Harness \
+        perl-base \
+        pixman-devel \
+        pkgconfig \
+        pulseaudio-libs-devel \
+        python3 \
+        python3-PyYAML \
+        python3-numpy \
+        python3-opencv \
+        python3-pillow \
+        python3-pip \
+        python3-sphinx \
+        python3-sphinx_rtd_theme \
+        python3-virtualenv \
+        rdma-core-devel \
+        rpm \
+        sed \
+        snappy-devel \
+        sparse \
+        spice-protocol \
+        spice-server-devel \
+        systemd-devel \
+        systemtap-sdt-devel \
+        tar \
+        tesseract \
+        tesseract-langpack-eng \
+        texinfo \
+        usbredir-devel \
+        util-linux \
+        virglrenderer-devel \
+        vte291-devel \
+        which \
+        xen-devel \
+        xfsprogs-devel \
+        zlib-devel && \
+    nosync dnf autoremove -y && \
+    nosync dnf clean all -y && \
+    rpm -qa | sort > /packages.txt && \
+    mkdir -p /usr/libexec/ccache-wrappers && \
+    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/c++ && \
+    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \
+    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/clang && \
+    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/g++ && \
+    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc
 
-RUN dnf install -y $PACKAGES
-RUN rpm -q $PACKAGES | sort > /packages.txt
-ENV PATH $PATH:/usr/libexec/python3-sphinx/
+ENV LANG "en_US.UTF-8"
+ENV MAKE "/usr/bin/make"
+ENV NINJA "/usr/bin/ninja"
+ENV PYTHON "/usr/bin/python3"
+ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [PATCH v4 19/22] tests/docker: auto-generate ubuntu1804 with lcitool
  2021-06-23 14:22 [PATCH v4 00/22] tests/docker: start using libvirt-ci's "lcitool" for dockerfiles Daniel P. Berrangé
                   ` (17 preceding siblings ...)
  2021-06-23 14:22 ` [PATCH v4 18/22] tests/docker: auto-generate fedora " Daniel P. Berrangé
@ 2021-06-23 14:22 ` Daniel P. Berrangé
  2021-06-23 14:22 ` [PATCH v4 20/22] tests/docker: auto-generate ubuntu2004 " Daniel P. Berrangé
                   ` (4 subsequent siblings)
  23 siblings, 0 replies; 51+ messages in thread
From: Daniel P. Berrangé @ 2021-06-23 14:22 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, Daniel P. Berrangé,
	Philippe Mathieu-Daudé, Philippe Mathieu-Daudé,
	Wainer dos Santos Moschetta, Willian Rampazzo, Alex Bennée

This commit is best examined using the "-b" option to diff.

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 tests/docker/dockerfiles-refresh.py        |   6 +
 tests/docker/dockerfiles/ubuntu1804.docker | 251 ++++++++++++---------
 2 files changed, 145 insertions(+), 112 deletions(-)

diff --git a/tests/docker/dockerfiles-refresh.py b/tests/docker/dockerfiles-refresh.py
index 8f6047f9b0..e39a6c1192 100755
--- a/tests/docker/dockerfiles-refresh.py
+++ b/tests/docker/dockerfiles-refresh.py
@@ -53,5 +53,11 @@ def generate_image(filename, host, cross=None, trailer=None):
 try:
    generate_image("centos8.docker", "centos-8")
    generate_image("fedora.docker", "fedora-33")
+
+   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)
diff --git a/tests/docker/dockerfiles/ubuntu1804.docker b/tests/docker/dockerfiles/ubuntu1804.docker
index 0880bf3e29..4e0b2bde33 100644
--- a/tests/docker/dockerfiles/ubuntu1804.docker
+++ b/tests/docker/dockerfiles/ubuntu1804.docker
@@ -1,116 +1,143 @@
+# THIS FILE WAS AUTO-GENERATED
+#
+#  $ lcitool dockerfile ubuntu-1804 qemu
+#
+# https://gitlab.com/libvirt/libvirt-ci/-/commit/e9aa46cbbbbd0c02285e9dde1f91b3110b2444b7
+
 FROM docker.io/library/ubuntu:18.04
-ENV PACKAGES \
-    bc \
-    bsdmainutils \
-    bzip2 \
-    ca-certificates \
-    ccache \
-    clang \
-    dbus \
-    debianutils \
-    diffutils \
-    exuberant-ctags \
-    findutils \
-    g++ \
-    gcc \
-    gcovr \
-    genisoimage \
-    gettext \
-    git \
-    glusterfs-common \
-    hostname \
-    libaio-dev \
-    libasan5 \
-    libasound2-dev \
-    libattr1-dev \
-    libbrlapi-dev \
-    libbz2-dev \
-    libc6-dev \
-    libcacard-dev \
-    libcap-ng-dev \
-    libcapstone-dev \
-    libcurl4-gnutls-dev \
-    libdaxctl-dev \
-    libdrm-dev \
-    libepoxy-dev \
-    libfdt-dev \
-    libffi-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 \
-    libsdl2-dev \
-    libsdl2-image-dev \
-    libseccomp-dev \
-    libsnappy-dev \
-    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 \
-    llvm \
-    locales \
-    make \
-    multipath-tools \
-    netcat-openbsd \
-    nettle-dev \
-    ninja-build \
-    openssh-client \
-    perl-base \
-    pkgconf \
-    python3 \
-    python3-numpy \
-    python3-opencv \
-    python3-pillow \
-    python3-pip \
-    python3-setuptools \
-    python3-sphinx \
-    python3-sphinx-rtd-theme \
-    python3-venv \
-    python3-wheel \
-    python3-yaml \
-    rpm2cpio \
-    sed \
-    sparse \
-    systemtap-sdt-dev \
-    tar \
-    tesseract-ocr \
-    tesseract-ocr-eng \
-    texinfo \
-    xfslibs-dev \
-    zlib1g-dev
-RUN apt-get update && \
-    DEBIAN_FRONTEND=noninteractive apt-get -y install $PACKAGES
-RUN dpkg -l $PACKAGES | sort > /packages.txt
 
+RUN export DEBIAN_FRONTEND=noninteractive && \
+    apt-get update && \
+    apt-get install -y eatmydata && \
+    eatmydata apt-get dist-upgrade -y && \
+    eatmydata apt-get install --no-install-recommends -y \
+            bc \
+            bsdmainutils \
+            bzip2 \
+            ca-certificates \
+            ccache \
+            clang \
+            dbus \
+            debianutils \
+            diffutils \
+            exuberant-ctags \
+            findutils \
+            g++ \
+            gcc \
+            gcovr \
+            genisoimage \
+            gettext \
+            git \
+            glusterfs-common \
+            hostname \
+            libaio-dev \
+            libasan5 \
+            libasound2-dev \
+            libattr1-dev \
+            libbrlapi-dev \
+            libbz2-dev \
+            libc6-dev \
+            libcacard-dev \
+            libcap-ng-dev \
+            libcapstone-dev \
+            libcurl4-gnutls-dev \
+            libdaxctl-dev \
+            libdrm-dev \
+            libepoxy-dev \
+            libfdt-dev \
+            libffi-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 \
+            libsdl2-dev \
+            libsdl2-image-dev \
+            libseccomp-dev \
+            libsnappy-dev \
+            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 \
+            llvm \
+            locales \
+            make \
+            multipath-tools \
+            netcat-openbsd \
+            nettle-dev \
+            ninja-build \
+            openssh-client \
+            perl-base \
+            pkgconf \
+            python3 \
+            python3-numpy \
+            python3-opencv \
+            python3-pillow \
+            python3-pip \
+            python3-setuptools \
+            python3-sphinx \
+            python3-sphinx-rtd-theme \
+            python3-venv \
+            python3-wheel \
+            python3-yaml \
+            rpm2cpio \
+            sed \
+            sparse \
+            systemtap-sdt-dev \
+            tar \
+            tesseract-ocr \
+            tesseract-ocr-eng \
+            texinfo \
+            xfslibs-dev \
+            zlib1g-dev && \
+    eatmydata apt-get autoremove -y && \
+    eatmydata apt-get autoclean -y && \
+    sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
+    dpkg-reconfigure locales && \
+    dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
+    mkdir -p /usr/libexec/ccache-wrappers && \
+    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/c++ && \
+    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \
+    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/clang && \
+    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/g++ && \
+    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc
+
+RUN pip3 install \
+         meson==0.56.0
+
+ENV LANG "en_US.UTF-8"
+ENV MAKE "/usr/bin/make"
+ENV NINJA "/usr/bin/ninja"
+ENV PYTHON "/usr/bin/python3"
+ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
 # https://bugs.launchpad.net/qemu/+bug/1838763
 ENV QEMU_CONFIGURE_OPTS --disable-libssh
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [PATCH v4 20/22] tests/docker: auto-generate ubuntu2004 with lcitool
  2021-06-23 14:22 [PATCH v4 00/22] tests/docker: start using libvirt-ci's "lcitool" for dockerfiles Daniel P. Berrangé
                   ` (18 preceding siblings ...)
  2021-06-23 14:22 ` [PATCH v4 19/22] tests/docker: auto-generate ubuntu1804 " Daniel P. Berrangé
@ 2021-06-23 14:22 ` Daniel P. Berrangé
  2021-06-23 14:28 ` [PATCH v4 21/22] tests/docker: auto-generate opensuse-leap " Daniel P. Berrangé
                   ` (3 subsequent siblings)
  23 siblings, 0 replies; 51+ messages in thread
From: Daniel P. Berrangé @ 2021-06-23 14:22 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, Daniel P. Berrangé,
	Philippe Mathieu-Daudé, Philippe Mathieu-Daudé,
	Wainer dos Santos Moschetta, Willian Rampazzo, Alex Bennée

This commit is best examined using the "-b" option to diff.

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 tests/docker/dockerfiles-refresh.py        |   6 +
 tests/docker/dockerfiles/ubuntu2004.docker | 253 ++++++++++++---------
 2 files changed, 146 insertions(+), 113 deletions(-)

diff --git a/tests/docker/dockerfiles-refresh.py b/tests/docker/dockerfiles-refresh.py
index e39a6c1192..df2dfc60e8 100755
--- a/tests/docker/dockerfiles-refresh.py
+++ b/tests/docker/dockerfiles-refresh.py
@@ -59,5 +59,11 @@ def generate_image(filename, host, cross=None, trailer=None):
 
    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)
diff --git a/tests/docker/dockerfiles/ubuntu2004.docker b/tests/docker/dockerfiles/ubuntu2004.docker
index 39de63d012..1d3c842b39 100644
--- a/tests/docker/dockerfiles/ubuntu2004.docker
+++ b/tests/docker/dockerfiles/ubuntu2004.docker
@@ -1,118 +1,145 @@
+# THIS FILE WAS AUTO-GENERATED
+#
+#  $ lcitool dockerfile ubuntu-2004 qemu
+#
+# https://gitlab.com/libvirt/libvirt-ci/-/commit/e9aa46cbbbbd0c02285e9dde1f91b3110b2444b7
+
 FROM docker.io/library/ubuntu:20.04
-ENV PACKAGES \
-    bc \
-    bsdmainutils \
-    bzip2 \
-    ca-certificates \
-    ccache \
-    clang \
-    dbus \
-    debianutils \
-    diffutils \
-    exuberant-ctags \
-    findutils \
-    g++ \
-    gcc \
-    gcovr \
-    genisoimage \
-    gettext \
-    git \
-    hostname \
-    libaio-dev \
-    libasan5 \
-    libasound2-dev \
-    libattr1-dev \
-    libbrlapi-dev \
-    libbz2-dev \
-    libc6-dev \
-    libcacard-dev \
-    libcap-ng-dev \
-    libcapstone-dev \
-    libcurl4-gnutls-dev \
-    libdaxctl-dev \
-    libdrm-dev \
-    libepoxy-dev \
-    libfdt-dev \
-    libffi-dev \
-    libgbm-dev \
-    libgcrypt20-dev \
-    libglib2.0-dev \
-    libglusterfs-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 \
-    libsdl2-dev \
-    libsdl2-image-dev \
-    libseccomp-dev \
-    libslirp-dev \
-    libsnappy-dev \
-    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 \
-    llvm \
-    locales \
-    make \
-    multipath-tools \
-    ncat \
-    nettle-dev \
-    ninja-build \
-    openssh-client \
-    perl-base \
-    pkgconf \
-    python3 \
-    python3-numpy \
-    python3-opencv \
-    python3-pillow \
-    python3-pip \
-    python3-setuptools \
-    python3-sphinx \
-    python3-sphinx-rtd-theme \
-    python3-venv \
-    python3-wheel \
-    python3-yaml \
-    rpm2cpio \
-    sed \
-    sparse \
-    systemtap-sdt-dev \
-    tar \
-    tesseract-ocr \
-    tesseract-ocr-eng \
-    texinfo \
-    xfslibs-dev \
-    zlib1g-dev
-RUN apt-get update && \
-    DEBIAN_FRONTEND=noninteractive apt-get -y install $PACKAGES
-RUN dpkg -l $PACKAGES | sort > /packages.txt
 
+RUN export DEBIAN_FRONTEND=noninteractive && \
+    apt-get update && \
+    apt-get install -y eatmydata && \
+    eatmydata apt-get dist-upgrade -y && \
+    eatmydata apt-get install --no-install-recommends -y \
+            bc \
+            bsdmainutils \
+            bzip2 \
+            ca-certificates \
+            ccache \
+            clang \
+            dbus \
+            debianutils \
+            diffutils \
+            exuberant-ctags \
+            findutils \
+            g++ \
+            gcc \
+            gcovr \
+            genisoimage \
+            gettext \
+            git \
+            hostname \
+            libaio-dev \
+            libasan5 \
+            libasound2-dev \
+            libattr1-dev \
+            libbrlapi-dev \
+            libbz2-dev \
+            libc6-dev \
+            libcacard-dev \
+            libcap-ng-dev \
+            libcapstone-dev \
+            libcurl4-gnutls-dev \
+            libdaxctl-dev \
+            libdrm-dev \
+            libepoxy-dev \
+            libfdt-dev \
+            libffi-dev \
+            libgbm-dev \
+            libgcrypt20-dev \
+            libglib2.0-dev \
+            libglusterfs-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 \
+            libsdl2-dev \
+            libsdl2-image-dev \
+            libseccomp-dev \
+            libslirp-dev \
+            libsnappy-dev \
+            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 \
+            llvm \
+            locales \
+            make \
+            multipath-tools \
+            ncat \
+            nettle-dev \
+            ninja-build \
+            openssh-client \
+            perl-base \
+            pkgconf \
+            python3 \
+            python3-numpy \
+            python3-opencv \
+            python3-pillow \
+            python3-pip \
+            python3-setuptools \
+            python3-sphinx \
+            python3-sphinx-rtd-theme \
+            python3-venv \
+            python3-wheel \
+            python3-yaml \
+            rpm2cpio \
+            sed \
+            sparse \
+            systemtap-sdt-dev \
+            tar \
+            tesseract-ocr \
+            tesseract-ocr-eng \
+            texinfo \
+            xfslibs-dev \
+            zlib1g-dev && \
+    eatmydata apt-get autoremove -y && \
+    eatmydata apt-get autoclean -y && \
+    sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
+    dpkg-reconfigure locales && \
+    dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
+    mkdir -p /usr/libexec/ccache-wrappers && \
+    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/c++ && \
+    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \
+    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/clang && \
+    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/g++ && \
+    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc
+
+RUN pip3 install \
+         meson==0.56.0
+
+ENV LANG "en_US.UTF-8"
+ENV MAKE "/usr/bin/make"
+ENV NINJA "/usr/bin/ninja"
+ENV PYTHON "/usr/bin/python3"
+ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
 # Apply patch https://reviews.llvm.org/D75820
 # This is required for TSan in clang-10 to compile with QEMU.
 RUN sed -i 's/^const/static const/g' /usr/lib/llvm-10/lib/clang/10.0.0/include/sanitizer/tsan_interface.h
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [PATCH v4 21/22] tests/docker: auto-generate opensuse-leap with lcitool
  2021-06-23 14:22 [PATCH v4 00/22] tests/docker: start using libvirt-ci's "lcitool" for dockerfiles Daniel P. Berrangé
                   ` (19 preceding siblings ...)
  2021-06-23 14:22 ` [PATCH v4 20/22] tests/docker: auto-generate ubuntu2004 " Daniel P. Berrangé
@ 2021-06-23 14:28 ` Daniel P. Berrangé
  2021-06-23 14:29 ` [PATCH v4 22/22] tests/docker: remove ubuntu container Daniel P. Berrangé
                   ` (2 subsequent siblings)
  23 siblings, 0 replies; 51+ messages in thread
From: Daniel P. Berrangé @ 2021-06-23 14:28 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, Daniel P. Berrangé,
	Philippe Mathieu-Daudé, Philippe Mathieu-Daudé,
	Wainer dos Santos Moschetta, Willian Rampazzo, Alex Bennée

This commit is best examined using the "-b" option to diff.

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 tests/docker/dockerfiles-refresh.py           |   1 +
 tests/docker/dockerfiles/opensuse-leap.docker | 239 ++++++++++--------
 2 files changed, 130 insertions(+), 110 deletions(-)

diff --git a/tests/docker/dockerfiles-refresh.py b/tests/docker/dockerfiles-refresh.py
index df2dfc60e8..ba37f38383 100755
--- a/tests/docker/dockerfiles-refresh.py
+++ b/tests/docker/dockerfiles-refresh.py
@@ -65,5 +65,6 @@ def generate_image(filename, host, cross=None, trailer=None):
                "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))
+   generate_image("opensuse-leap.docker", "opensuse-leap-152")
 except Exception as ex:
    print(str(ex), file=sys.stderr)
diff --git a/tests/docker/dockerfiles/opensuse-leap.docker b/tests/docker/dockerfiles/opensuse-leap.docker
index 5a8bee0289..484f4f55af 100644
--- a/tests/docker/dockerfiles/opensuse-leap.docker
+++ b/tests/docker/dockerfiles/opensuse-leap.docker
@@ -1,113 +1,132 @@
+# THIS FILE WAS AUTO-GENERATED
+#
+#  $ lcitool dockerfile opensuse-leap-152 qemu
+#
+# https://gitlab.com/libvirt/libvirt-ci/-/commit/e9aa46cbbbbd0c02285e9dde1f91b3110b2444b7
+
 FROM registry.opensuse.org/opensuse/leap:15.2
 
-# Please keep this list sorted alphabetically
-ENV PACKAGES \
-    Mesa-devel \
-    alsa-lib-devel \
-    bc \
-    brlapi-devel \
-    bzip2 \
-    ca-certificates \
-    ccache \
-    clang \
-    ctags \
-    cyrus-sasl-devel \
-    dbus-1 \
-    diffutils \
-    findutils \
-    gcc \
-    gcc-c++ \
-    gcovr \
-    gettext-runtime \
-    git \
-    glib2-devel \
-    glibc-locale \
-    glibc-static \
-    glusterfs-devel \
-    gtk3-devel \
-    hostname \
-    jemalloc-devel \
-    libSDL2-devel \
-    libSDL2_image-devel \
-    libaio-devel \
-    libasan6 \
-    libattr-devel \
-    libbpf-devel \
-    libbz2-devel \
-    libcacard-devel \
-    libcap-ng-devel \
-    libcurl-devel \
-    libdrm-devel \
-    libepoxy-devel \
-    libfdt-devel \
-    libffi-devel \
-    libgcrypt-devel \
-    libgnutls-devel \
-    libiscsi-devel \
-    libjpeg8-devel \
-    libndctl-devel \
-    libnettle-devel \
-    libnfs-devel \
-    libnuma-devel \
-    libpixman-1-0-devel \
-    libpmem-devel \
-    libpng16-devel \
-    libpulse-devel \
-    librbd-devel \
-    libseccomp-devel \
-    libspice-server-devel \
-    libssh-devel \
-    libtasn1-devel \
-    libubsan1 \
-    libudev-devel \
-    libusb-1_0-devel \
-    libxml2-devel \
-    libzstd-devel \
-    llvm \
-    lttng-ust-devel \
-    lzo-devel \
-    make \
-    mkisofs \
-    ncat \
-    ncurses-devel \
-    ninja \
-    openssh \
-    pam-devel \
-    perl-Test-Harness \
-    perl-base \
-    pkgconfig \
-    python3-Pillow \
-    python3-PyYAML \
-    python3-Sphinx \
-    python3-base \
-    python3-numpy \
-    python3-opencv \
-    python3-pip \
-    python3-setuptools \
-    python3-sphinx_rtd_theme \
-    python3-virtualenv \
-    python3-wheel \
-    rdma-core-devel \
-    rpm \
-    sed \
-    snappy-devel \
-    sparse \
-    spice-protocol-devel \
-    systemd-devel \
-    systemtap-sdt-devel \
-    tar \
-    tesseract-ocr \
-    tesseract-ocr-traineddata-english \
-    texinfo \
-    usbredir-devel \
-    util-linux \
-    virglrenderer-devel \
-    vte-devel \
-    which \
-    xen-devel \
-    xfsprogs-devel \
-    zlib-devel
-ENV QEMU_CONFIGURE_OPTS --python=/usr/bin/python3.6
+RUN zypper update -y && \
+    zypper install -y \
+           Mesa-devel \
+           alsa-lib-devel \
+           bc \
+           brlapi-devel \
+           bzip2 \
+           ca-certificates \
+           ccache \
+           clang \
+           ctags \
+           cyrus-sasl-devel \
+           dbus-1 \
+           diffutils \
+           findutils \
+           gcc \
+           gcc-c++ \
+           gcovr \
+           gettext-runtime \
+           git \
+           glib2-devel \
+           glibc-locale \
+           glibc-static \
+           glusterfs-devel \
+           gtk3-devel \
+           hostname \
+           jemalloc-devel \
+           libSDL2-devel \
+           libSDL2_image-devel \
+           libaio-devel \
+           libasan6 \
+           libattr-devel \
+           libbpf-devel \
+           libbz2-devel \
+           libcacard-devel \
+           libcap-ng-devel \
+           libcurl-devel \
+           libdrm-devel \
+           libepoxy-devel \
+           libfdt-devel \
+           libffi-devel \
+           libgcrypt-devel \
+           libgnutls-devel \
+           libiscsi-devel \
+           libjpeg8-devel \
+           libndctl-devel \
+           libnettle-devel \
+           libnfs-devel \
+           libnuma-devel \
+           libpixman-1-0-devel \
+           libpmem-devel \
+           libpng16-devel \
+           libpulse-devel \
+           librbd-devel \
+           libseccomp-devel \
+           libspice-server-devel \
+           libssh-devel \
+           libtasn1-devel \
+           libubsan1 \
+           libudev-devel \
+           libusb-1_0-devel \
+           libxml2-devel \
+           libzstd-devel \
+           llvm \
+           lttng-ust-devel \
+           lzo-devel \
+           make \
+           mkisofs \
+           ncat \
+           ncurses-devel \
+           ninja \
+           openssh \
+           pam-devel \
+           perl-Test-Harness \
+           perl-base \
+           pkgconfig \
+           python3-Pillow \
+           python3-PyYAML \
+           python3-Sphinx \
+           python3-base \
+           python3-numpy \
+           python3-opencv \
+           python3-pip \
+           python3-setuptools \
+           python3-sphinx_rtd_theme \
+           python3-virtualenv \
+           python3-wheel \
+           rdma-core-devel \
+           rpm \
+           sed \
+           snappy-devel \
+           sparse \
+           spice-protocol-devel \
+           systemd-devel \
+           systemtap-sdt-devel \
+           tar \
+           tesseract-ocr \
+           tesseract-ocr-traineddata-english \
+           texinfo \
+           usbredir-devel \
+           util-linux \
+           virglrenderer-devel \
+           vte-devel \
+           which \
+           xen-devel \
+           xfsprogs-devel \
+           zlib-devel && \
+    zypper clean --all && \
+    rpm -qa | sort > /packages.txt && \
+    mkdir -p /usr/libexec/ccache-wrappers && \
+    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/c++ && \
+    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \
+    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/clang && \
+    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/g++ && \
+    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc
+
+RUN pip3 install \
+         meson==0.56.0
 
-RUN zypper update -y && zypper --non-interactive 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"
+ENV PYTHON "/usr/bin/python3"
+ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [PATCH v4 22/22] tests/docker: remove ubuntu container
  2021-06-23 14:22 [PATCH v4 00/22] tests/docker: start using libvirt-ci's "lcitool" for dockerfiles Daniel P. Berrangé
                   ` (20 preceding siblings ...)
  2021-06-23 14:28 ` [PATCH v4 21/22] tests/docker: auto-generate opensuse-leap " Daniel P. Berrangé
@ 2021-06-23 14:29 ` Daniel P. Berrangé
  2021-06-23 14:42 ` [PATCH v4 00/22] tests/docker: start using libvirt-ci's "lcitool" for dockerfiles no-reply
  2021-07-05 14:51 ` Alex Bennée
  23 siblings, 0 replies; 51+ messages in thread
From: Daniel P. Berrangé @ 2021-06-23 14:29 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, Daniel P. Berrangé,
	Philippe Mathieu-Daudé, Philippe Mathieu-Daudé,
	Wainer dos Santos Moschetta, Willian Rampazzo, Alex Bennée

This duplicates the ubuntu2004 container but with an inconsistent set of
packages.

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 .gitlab-ci.d/containers.yml            |  5 --
 tests/docker/dockerfiles/ubuntu.docker | 71 --------------------------
 2 files changed, 76 deletions(-)
 delete mode 100644 tests/docker/dockerfiles/ubuntu.docker

diff --git a/.gitlab-ci.d/containers.yml b/.gitlab-ci.d/containers.yml
index cd06d3f5f4..b9b675fdcb 100644
--- a/.gitlab-ci.d/containers.yml
+++ b/.gitlab-ci.d/containers.yml
@@ -29,11 +29,6 @@ amd64-ubuntu2004-container:
   variables:
     NAME: ubuntu2004
 
-amd64-ubuntu-container:
-  extends: .container_job_template
-  variables:
-    NAME: ubuntu
-
 amd64-opensuse-leap-container:
   extends: .container_job_template
   variables:
diff --git a/tests/docker/dockerfiles/ubuntu.docker b/tests/docker/dockerfiles/ubuntu.docker
deleted file mode 100644
index f0e0180d21..0000000000
--- a/tests/docker/dockerfiles/ubuntu.docker
+++ /dev/null
@@ -1,71 +0,0 @@
-#
-# Latest Ubuntu Release
-#
-# Useful for testing against relatively bleeding edge libraries and
-# compilers. We also have seperate recipe for the most recent LTS
-# release.
-#
-# When updating use the full tag not :latest otherwise the build
-# system won't pick up that it has changed.
-#
-
-FROM docker.io/library/ubuntu:20.04
-ENV PACKAGES \
-    ccache \
-    clang \
-    dbus \
-    gcc \
-    gettext \
-    git \
-    glusterfs-common \
-    libaio-dev \
-    libattr1-dev \
-    libbrlapi-dev \
-    libbz2-dev \
-    libcacard-dev \
-    libcap-ng-dev \
-    libcurl4-gnutls-dev \
-    libdrm-dev \
-    libepoxy-dev \
-    libfdt-dev \
-    libffi-dev \
-    libgbm-dev \
-    libgnutls28-dev \
-    libgtk-3-dev \
-    libibverbs-dev \
-    libiscsi-dev \
-    libjemalloc-dev \
-    libjpeg-turbo8-dev \
-    liblzo2-dev \
-    libncurses5-dev \
-    libncursesw5-dev \
-    libnfs-dev \
-    libnuma-dev \
-    libpixman-1-dev \
-    libpng-dev \
-    librados-dev \
-    librbd-dev \
-    librdmacm-dev \
-    libsasl2-dev \
-    libsdl2-dev \
-    libseccomp-dev \
-    libsnappy-dev \
-    libspice-protocol-dev \
-    libspice-server-dev \
-    libssh-dev \
-    libusb-1.0-0-dev \
-    libusbredirhost-dev \
-    libvdeplug-dev \
-    libvte-2.91-dev \
-    libxen-dev \
-    libzstd-dev \
-    make \
-    ninja-build \
-    python3-yaml \
-    python3-sphinx \
-    python3-sphinx-rtd-theme \
-    sparse \
-    xfslibs-dev
-RUN apt-get update && \
-    DEBIAN_FRONTEND=noninteractive apt-get -y install $PACKAGES
-RUN dpkg -l $PACKAGES | sort > /packages.txt
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 51+ messages in thread

* Re: [PATCH v4 00/22] tests/docker: start using libvirt-ci's "lcitool" for dockerfiles
  2021-06-23 14:22 [PATCH v4 00/22] tests/docker: start using libvirt-ci's "lcitool" for dockerfiles Daniel P. Berrangé
                   ` (21 preceding siblings ...)
  2021-06-23 14:29 ` [PATCH v4 22/22] tests/docker: remove ubuntu container Daniel P. Berrangé
@ 2021-06-23 14:42 ` no-reply
  2021-07-05 14:51 ` Alex Bennée
  23 siblings, 0 replies; 51+ messages in thread
From: no-reply @ 2021-06-23 14:42 UTC (permalink / raw)
  To: berrange
  Cc: fam, peter.maydell, thuth, berrange, alex.bennee, qemu-devel,
	wainersm, f4bug, willianr, philmd

Patchew URL: https://patchew.org/QEMU/20210623142245.307776-1-berrange@redhat.com/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Type: series
Message-id: 20210623142245.307776-1-berrange@redhat.com
Subject: [PATCH v4 00/22] tests/docker: start using libvirt-ci's "lcitool" for dockerfiles

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 - [tag update]      patchew/20210622154820.1978982-1-richard.henderson@linaro.org -> patchew/20210622154820.1978982-1-richard.henderson@linaro.org
 * [new tag]         patchew/20210623142245.307776-1-berrange@redhat.com -> patchew/20210623142245.307776-1-berrange@redhat.com
Switched to a new branch 'test'
9758826 tests/docker: remove ubuntu container
ef3ef4e tests/docker: auto-generate opensuse-leap with lcitool
895aed9 tests/docker: auto-generate ubuntu2004 with lcitool
2119de5 tests/docker: auto-generate ubuntu1804 with lcitool
03e1cd3 tests/docker: auto-generate fedora with lcitool
c62c731 tests/docker: auto-generate centos8 with lcitool
d64ab33 tests/docker: add script for automating container refresh
c2baddd tests/docker: expand opensuse-leap package list
3dd08f6 tests/docker: expand ubuntu2004 package list
0b1a6dd tests/docker: expand ubuntu1804 package list
e518827 tests/docker: expand fedora package list
d19b072 tests/docker: expand centos8 package list
e281ae9 tests/docker: remove mingw packages from Fedora
574be70 tests/docker: fix mistakes in ubuntu package lists
88cd410 tests/docker: fix mistakes in fedora package list
bfc10c9 tests/docker: fix mistakes in centos package lists
4c6b851 tests/docker: fix sorting in package lists
f923bf8 tests/docker: remove FEATURES env var from templates
6ba5000 tests/docker: use explicit docker.io registry
c579052 tests/docker: use project specific container registries
7bd0b09 tests/docker: don't use BUILDKIT in GitLab either
155fe73 hw/usb/ccid: remove references to NSS

=== OUTPUT BEGIN ===
1/22 Checking commit 155fe7320a76 (hw/usb/ccid: remove references to NSS)
2/22 Checking commit 7bd0b09da0eb (tests/docker: don't use BUILDKIT in GitLab either)
3/22 Checking commit c5790521a51c (tests/docker: use project specific container registries)
4/22 Checking commit 6ba5000cb228 (tests/docker: use explicit docker.io registry)
5/22 Checking commit f923bf8c6a02 (tests/docker: remove FEATURES env var from templates)
6/22 Checking commit 4c6b85101644 (tests/docker: fix sorting in package lists)
7/22 Checking commit bfc10c97c4b9 (tests/docker: fix mistakes in centos package lists)
8/22 Checking commit 88cd410064a6 (tests/docker: fix mistakes in fedora package list)
9/22 Checking commit 574be70f0bbe (tests/docker: fix mistakes in ubuntu package lists)
10/22 Checking commit e281ae966f35 (tests/docker: remove mingw packages from Fedora)
11/22 Checking commit d19b07286aaa (tests/docker: expand centos8 package list)
12/22 Checking commit e518827eb832 (tests/docker: expand fedora package list)
13/22 Checking commit 0b1a6dd81adf (tests/docker: expand ubuntu1804 package list)
14/22 Checking commit 3dd08f63b4f6 (tests/docker: expand ubuntu2004 package list)
15/22 Checking commit c2baddde6702 (tests/docker: expand opensuse-leap package list)
16/22 Checking commit d64ab332097d (tests/docker: add script for automating container refresh)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#114: 
new file mode 100755

total: 0 errors, 1 warnings, 123 lines checked

Patch 16/22 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
17/22 Checking commit c62c7311eed8 (tests/docker: auto-generate centos8 with lcitool)
18/22 Checking commit 03e1cd3c038c (tests/docker: auto-generate fedora with lcitool)
19/22 Checking commit 2119de590b58 (tests/docker: auto-generate ubuntu1804 with lcitool)
20/22 Checking commit 895aed9013c2 (tests/docker: auto-generate ubuntu2004 with lcitool)
ERROR: line over 90 characters
#28: FILE: tests/docker/dockerfiles-refresh.py:65:
+               "RUN sed -i 's/^const/static const/g' /usr/lib/llvm-10/lib/clang/10.0.0/include/sanitizer/tsan_interface.h\n"]

total: 1 errors, 0 warnings, 270 lines checked

Patch 20/22 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

21/22 Checking commit ef3ef4e88131 (tests/docker: auto-generate opensuse-leap with lcitool)
22/22 Checking commit 975882640606 (tests/docker: remove ubuntu container)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#35: 
deleted file mode 100644

total: 0 errors, 1 warnings, 11 lines checked

Patch 22/22 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/20210623142245.307776-1-berrange@redhat.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com

^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [PATCH v4 01/22] hw/usb/ccid: remove references to NSS
  2021-06-23 14:22 ` [PATCH v4 01/22] hw/usb/ccid: remove references to NSS Daniel P. Berrangé
@ 2021-06-25 18:11   ` Willian Rampazzo
  2021-07-05 10:37   ` Alex Bennée
  1 sibling, 0 replies; 51+ messages in thread
From: Willian Rampazzo @ 2021-06-25 18:11 UTC (permalink / raw)
  To: Daniel P. Berrangé
  Cc: Fam Zheng, Peter Maydell, Thomas Huth,
	Philippe Mathieu-Daudé,
	qemu-devel, Wainer dos Santos Moschetta,
	Philippe Mathieu-Daudé,
	Alex Bennée

On Wed, Jun 23, 2021 at 11:23 AM Daniel P. Berrangé <berrange@redhat.com> wrote:
>
> 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 <marcandre.lureau@redhat.com>
>     Date:   Sun Aug 30 11:48:40 2015 +0200
>
>         libcacard: use the standalone project
>
> Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>  .travis.yml                                | 12 ++++++------
>  docs/ccid.txt                              | 15 +++++++--------
>  scripts/coverity-scan/coverity-scan.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 -
>  7 files changed, 14 insertions(+), 19 deletions(-)
>

Reviewed-by: Willian Rampazzo <willianr@redhat.com>



^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [PATCH v4 02/22] tests/docker: don't use BUILDKIT in GitLab either
  2021-06-23 14:22 ` [PATCH v4 02/22] tests/docker: don't use BUILDKIT in GitLab either Daniel P. Berrangé
@ 2021-06-25 20:21   ` Willian Rampazzo
  0 siblings, 0 replies; 51+ messages in thread
From: Willian Rampazzo @ 2021-06-25 20:21 UTC (permalink / raw)
  To: Daniel P. Berrangé
  Cc: Fam Zheng, Peter Maydell, Thomas Huth,
	Philippe Mathieu-Daudé,
	qemu-devel, Wainer dos Santos Moschetta,
	Philippe Mathieu-Daudé,
	Alex Bennée

On Wed, Jun 23, 2021 at 11:23 AM Daniel P. Berrangé <berrange@redhat.com> wrote:
>
> 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
>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>  tests/docker/docker.py | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>

Reviewed-by: Willian Rampazzo <willianr@redhat.com>



^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [PATCH v4 03/22] tests/docker: use project specific container registries
  2021-06-23 14:22 ` [PATCH v4 03/22] tests/docker: use project specific container registries Daniel P. Berrangé
@ 2021-06-25 20:24   ` Willian Rampazzo
  2021-07-05 12:07   ` Alex Bennée
  1 sibling, 0 replies; 51+ messages in thread
From: Willian Rampazzo @ 2021-06-25 20:24 UTC (permalink / raw)
  To: Daniel P. Berrangé
  Cc: Fam Zheng, Peter Maydell, Thomas Huth,
	Philippe Mathieu-Daudé,
	qemu-devel, Wainer dos Santos Moschetta,
	Philippe Mathieu-Daudé,
	Alex Bennée

On Wed, Jun 23, 2021 at 11:23 AM Daniel P. Berrangé <berrange@redhat.com> wrote:
>
> Since Docker Hub has started to enforce pull rate limits on clients, it
> is preferrable to use project specific container registries where they

s/preferrable/preferable/

> are available. Fedora and OpenSUSE projects provide 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.
>
> While CentOS also has a registry it is considerably outdated compared
> to docker.io, and also only provides x86 images, while docker.io images
> are multi-arch.
>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>  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 +-
>  tests/docker/dockerfiles/opensuse-leap.docker      | 2 +-
>  6 files changed, 6 insertions(+), 6 deletions(-)
>

Reviewed-by: Willian Rampazzo <willianr@redhat.com>



^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [PATCH v4 05/22] tests/docker: remove FEATURES env var from templates
  2021-06-23 14:22 ` [PATCH v4 05/22] tests/docker: remove FEATURES env var from templates Daniel P. Berrangé
@ 2021-06-25 20:51   ` Willian Rampazzo
  2021-07-05 12:20   ` Alex Bennée
  2021-07-05 12:36   ` Alex Bennée
  2 siblings, 0 replies; 51+ messages in thread
From: Willian Rampazzo @ 2021-06-25 20:51 UTC (permalink / raw)
  To: Daniel P. Berrangé
  Cc: Fam Zheng, Peter Maydell, Thomas Huth,
	Philippe Mathieu-Daudé,
	qemu-devel, Wainer dos Santos Moschetta,
	Philippe Mathieu-Daudé,
	Alex Bennée

On Wed, Jun 23, 2021 at 11:23 AM Daniel P. Berrangé <berrange@redhat.com> wrote:
>
> 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.

s/existance/existence/

>
> The cases which don't correspond to binaries are simply dropped because
> configure/meson will probe for any requested feature anyway.
>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>  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(-)
>

Reviewed-by: Willian Rampazzo <willianr@redhat.com>



^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [PATCH v4 01/22] hw/usb/ccid: remove references to NSS
  2021-06-23 14:22 ` [PATCH v4 01/22] hw/usb/ccid: remove references to NSS Daniel P. Berrangé
  2021-06-25 18:11   ` Willian Rampazzo
@ 2021-07-05 10:37   ` Alex Bennée
  1 sibling, 0 replies; 51+ messages in thread
From: Alex Bennée @ 2021-07-05 10:37 UTC (permalink / raw)
  To: Daniel P. Berrangé
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, qemu-devel,
	Wainer dos Santos Moschetta, Philippe Mathieu-Daudé,
	Willian Rampazzo, Philippe Mathieu-Daudé


Daniel P. Berrangé <berrange@redhat.com> writes:

> 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 <marcandre.lureau@redhat.com>
>     Date:   Sun Aug 30 11:48:40 2015 +0200
>
>         libcacard: use the standalone project
>
> Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

-- 
Alex Bennée


^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [PATCH v4 03/22] tests/docker: use project specific container registries
  2021-06-23 14:22 ` [PATCH v4 03/22] tests/docker: use project specific container registries Daniel P. Berrangé
  2021-06-25 20:24   ` Willian Rampazzo
@ 2021-07-05 12:07   ` Alex Bennée
  1 sibling, 0 replies; 51+ messages in thread
From: Alex Bennée @ 2021-07-05 12:07 UTC (permalink / raw)
  To: Daniel P. Berrangé
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, qemu-devel,
	Wainer dos Santos Moschetta, Philippe Mathieu-Daudé,
	Willian Rampazzo, Philippe Mathieu-Daudé


Daniel P. Berrangé <berrange@redhat.com> writes:

> 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. Fedora and OpenSUSE projects provide 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.
>
> While CentOS also has a registry it is considerably outdated compared
> to docker.io, and also only provides x86 images, while docker.io images
> are multi-arch.
>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

-- 
Alex Bennée


^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [PATCH v4 05/22] tests/docker: remove FEATURES env var from templates
  2021-06-23 14:22 ` [PATCH v4 05/22] tests/docker: remove FEATURES env var from templates Daniel P. Berrangé
  2021-06-25 20:51   ` Willian Rampazzo
@ 2021-07-05 12:20   ` Alex Bennée
  2021-07-05 12:36   ` Alex Bennée
  2 siblings, 0 replies; 51+ messages in thread
From: Alex Bennée @ 2021-07-05 12:20 UTC (permalink / raw)
  To: Daniel P. Berrangé
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, qemu-devel,
	Wainer dos Santos Moschetta, Philippe Mathieu-Daudé,
	Willian Rampazzo, Philippe Mathieu-Daudé


Daniel P. Berrangé <berrange@redhat.com> writes:

> 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.
>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

-- 
Alex Bennée


^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [PATCH v4 05/22] tests/docker: remove FEATURES env var from templates
  2021-06-23 14:22 ` [PATCH v4 05/22] tests/docker: remove FEATURES env var from templates Daniel P. Berrangé
  2021-06-25 20:51   ` Willian Rampazzo
  2021-07-05 12:20   ` Alex Bennée
@ 2021-07-05 12:36   ` Alex Bennée
  2 siblings, 0 replies; 51+ messages in thread
From: Alex Bennée @ 2021-07-05 12:36 UTC (permalink / raw)
  To: Daniel P. Berrangé
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, qemu-devel,
	Wainer dos Santos Moschetta, Philippe Mathieu-Daudé,
	Willian Rampazzo, Philippe Mathieu-Daudé


Daniel P. Berrangé <berrange@redhat.com> writes:

> 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.
>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

-- 
Alex Bennée


^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [PATCH v4 04/22] tests/docker: use explicit docker.io registry
  2021-06-23 14:22 ` [PATCH v4 04/22] tests/docker: use explicit docker.io registry Daniel P. Berrangé
@ 2021-07-05 13:33   ` Alex Bennée
  0 siblings, 0 replies; 51+ messages in thread
From: Alex Bennée @ 2021-07-05 13:33 UTC (permalink / raw)
  To: Daniel P. Berrangé
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, qemu-devel,
	Wainer dos Santos Moschetta, Philippe Mathieu-Daudé,
	Willian Rampazzo, Philippe Mathieu-Daudé


Daniel P. Berrangé <berrange@redhat.com> writes:

> 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.
>
> Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

-- 
Alex Bennée


^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [PATCH v4 06/22] tests/docker: fix sorting in package lists
  2021-06-23 14:22 ` [PATCH v4 06/22] tests/docker: fix sorting in package lists Daniel P. Berrangé
@ 2021-07-05 13:33   ` Alex Bennée
  0 siblings, 0 replies; 51+ messages in thread
From: Alex Bennée @ 2021-07-05 13:33 UTC (permalink / raw)
  To: Daniel P. Berrangé
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, qemu-devel,
	Wainer dos Santos Moschetta, Philippe Mathieu-Daudé,
	Willian Rampazzo, Philippe Mathieu-Daudé


Daniel P. Berrangé <berrange@redhat.com> writes:

> This will make diffs in later patches clearer.
>
> Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

-- 
Alex Bennée


^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [PATCH v4 07/22] tests/docker: fix mistakes in centos package lists
  2021-06-23 14:22 ` [PATCH v4 07/22] tests/docker: fix mistakes in centos " Daniel P. Berrangé
@ 2021-07-05 13:33   ` Alex Bennée
  0 siblings, 0 replies; 51+ messages in thread
From: Alex Bennée @ 2021-07-05 13:33 UTC (permalink / raw)
  To: Daniel P. Berrangé
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, qemu-devel,
	Wainer dos Santos Moschetta, Philippe Mathieu-Daudé,
	Willian Rampazzo, Philippe Mathieu-Daudé


Daniel P. Berrangé <berrange@redhat.com> writes:

> mesa-libEGL-devel is not used in QEMU at all, but mesa-libgbm-devel is.
>
> spice-glib-devel is not use in QEMU at all, but spice-protocol is.
> We also need the -devel package for spice-server, not the runtime.
>
> There is no need to specifically refer to python36, we can just
> use python3 as in other distros.
>
> Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

-- 
Alex Bennée


^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [PATCH v4 08/22] tests/docker: fix mistakes in fedora package list
  2021-06-23 14:22 ` [PATCH v4 08/22] tests/docker: fix mistakes in fedora package list Daniel P. Berrangé
@ 2021-07-05 13:36   ` Alex Bennée
  0 siblings, 0 replies; 51+ messages in thread
From: Alex Bennée @ 2021-07-05 13:36 UTC (permalink / raw)
  To: Daniel P. Berrangé
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, qemu-devel,
	Wainer dos Santos Moschetta, Philippe Mathieu-Daudé,
	Willian Rampazzo, Philippe Mathieu-Daudé


Daniel P. Berrangé <berrange@redhat.com> writes:

> libblockdev-mpath-devel is not used by QEMU, rather it wants
> device-mapper-multipath-devel.
>
> Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

-- 
Alex Bennée


^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [PATCH v4 09/22] tests/docker: fix mistakes in ubuntu package lists
  2021-06-23 14:22 ` [PATCH v4 09/22] tests/docker: fix mistakes in ubuntu package lists Daniel P. Berrangé
@ 2021-07-05 13:40   ` Alex Bennée
  0 siblings, 0 replies; 51+ messages in thread
From: Alex Bennée @ 2021-07-05 13:40 UTC (permalink / raw)
  To: Daniel P. Berrangé
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, qemu-devel,
	Wainer dos Santos Moschetta, Philippe Mathieu-Daudé,
	Willian Rampazzo, Philippe Mathieu-Daudé


Daniel P. Berrangé <berrange@redhat.com> writes:

> 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.
>
> Remove vim since it is not a build pre-requisite and no other containers
> include it.
>
> Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

-- 
Alex Bennée


^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [PATCH v4 10/22] tests/docker: remove mingw packages from Fedora
  2021-06-23 14:22 ` [PATCH v4 10/22] tests/docker: remove mingw packages from Fedora Daniel P. Berrangé
@ 2021-07-05 13:40   ` Alex Bennée
  0 siblings, 0 replies; 51+ messages in thread
From: Alex Bennée @ 2021-07-05 13:40 UTC (permalink / raw)
  To: Daniel P. Berrangé
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, qemu-devel,
	Wainer dos Santos Moschetta, Philippe Mathieu-Daudé,
	Willian Rampazzo, Philippe Mathieu-Daudé


Daniel P. Berrangé <berrange@redhat.com> writes:

> There are dedicated containers providing mingw packages for Fedora.
>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

-- 
Alex Bennée


^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [PATCH v4 11/22] tests/docker: expand centos8 package list
  2021-06-23 14:22 ` [PATCH v4 11/22] tests/docker: expand centos8 package list Daniel P. Berrangé
@ 2021-07-05 13:40   ` Alex Bennée
  2021-07-05 20:27   ` Alex Bennée
  1 sibling, 0 replies; 51+ messages in thread
From: Alex Bennée @ 2021-07-05 13:40 UTC (permalink / raw)
  To: Daniel P. Berrangé
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, qemu-devel,
	Wainer dos Santos Moschetta, Philippe Mathieu-Daudé,
	Willian Rampazzo, Philippe Mathieu-Daudé


Daniel P. Berrangé <berrange@redhat.com> writes:

> This is the fully expanded list of build pre-requisites QEMU can
> conceivably use in any scenario.
>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

-- 
Alex Bennée


^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [PATCH v4 12/22] tests/docker: expand fedora package list
  2021-06-23 14:22 ` [PATCH v4 12/22] tests/docker: expand fedora " Daniel P. Berrangé
@ 2021-07-05 13:41   ` Alex Bennée
  0 siblings, 0 replies; 51+ messages in thread
From: Alex Bennée @ 2021-07-05 13:41 UTC (permalink / raw)
  To: Daniel P. Berrangé
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, qemu-devel,
	Wainer dos Santos Moschetta, Philippe Mathieu-Daudé,
	Willian Rampazzo, Philippe Mathieu-Daudé


Daniel P. Berrangé <berrange@redhat.com> writes:

> This is the fully expanded list of build pre-requisites QEMU can
> conceivably use in any scenario.
>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

-- 
Alex Bennée


^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [PATCH v4 13/22] tests/docker: expand ubuntu1804 package list
  2021-06-23 14:22 ` [PATCH v4 13/22] tests/docker: expand ubuntu1804 " Daniel P. Berrangé
@ 2021-07-05 13:41   ` Alex Bennée
  0 siblings, 0 replies; 51+ messages in thread
From: Alex Bennée @ 2021-07-05 13:41 UTC (permalink / raw)
  To: Daniel P. Berrangé
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, qemu-devel,
	Wainer dos Santos Moschetta, Philippe Mathieu-Daudé,
	Willian Rampazzo, Philippe Mathieu-Daudé


Daniel P. Berrangé <berrange@redhat.com> writes:

> This is the fully expanded list of build pre-requisites QEMU can
> conceivably use in any scenario.
>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

-- 
Alex Bennée


^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [PATCH v4 14/22] tests/docker: expand ubuntu2004 package list
  2021-06-23 14:22 ` [PATCH v4 14/22] tests/docker: expand ubuntu2004 " Daniel P. Berrangé
@ 2021-07-05 13:42   ` Alex Bennée
  0 siblings, 0 replies; 51+ messages in thread
From: Alex Bennée @ 2021-07-05 13:42 UTC (permalink / raw)
  To: Daniel P. Berrangé
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, qemu-devel,
	Wainer dos Santos Moschetta, Philippe Mathieu-Daudé,
	Willian Rampazzo, Philippe Mathieu-Daudé


Daniel P. Berrangé <berrange@redhat.com> writes:

> This is the fully expanded list of build pre-requisites QEMU can
> conceivably use in any scenario.
>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

-- 
Alex Bennée


^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [PATCH v4 15/22] tests/docker: expand opensuse-leap package list
  2021-06-23 14:22 ` [PATCH v4 15/22] tests/docker: expand opensuse-leap " Daniel P. Berrangé
@ 2021-07-05 13:42   ` Alex Bennée
  0 siblings, 0 replies; 51+ messages in thread
From: Alex Bennée @ 2021-07-05 13:42 UTC (permalink / raw)
  To: Daniel P. Berrangé
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, qemu-devel,
	Wainer dos Santos Moschetta, Philippe Mathieu-Daudé,
	Willian Rampazzo, Philippe Mathieu-Daudé


Daniel P. Berrangé <berrange@redhat.com> writes:

> This is the fully expanded list of build pre-requisites QEMU can
> conceivably use in any scenario.
>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

-- 
Alex Bennée


^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [PATCH v4 16/22] tests/docker: add script for automating container refresh
  2021-06-23 14:22 ` [PATCH v4 16/22] tests/docker: add script for automating container refresh Daniel P. Berrangé
@ 2021-07-05 13:44   ` Alex Bennée
  2021-07-05 14:56     ` Daniel P. Berrangé
  0 siblings, 1 reply; 51+ messages in thread
From: Alex Bennée @ 2021-07-05 13:44 UTC (permalink / raw)
  To: Daniel P. Berrangé
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, qemu-devel,
	Wainer dos Santos Moschetta, Philippe Mathieu-Daudé,
	Willian Rampazzo, Philippe Mathieu-Daudé


Daniel P. Berrangé <berrange@redhat.com> writes:

> This introduces
>
>   https://gitlab.com/libvirt/libvirt-ci
>
> as a git submodule at tests/docker/libvirt-ci
>
> This submodule only needs to be checked out when needing to re-generate
> the files in tests/docker/dockerfiles.
>
> When a new build pre-requisite is needed for QEMU, it should be added to
> the libvirt-ci project 'qemu.yml' file, and the submodule updated to the
> new commit.

It seems a bit weird to have the canonical description of QEMU
dependencies live in another project does it not?

> The 'make docker-refresh' target will then re-create all the
> dockerfiles with updated package lists. This ensures that all the
> containers get exactly the same build pre-requisite packages installed.
>
> It also facilitates the addition of containers targetting new distros
> or updating existing containers to new versions of the same distro,
> where packages might have been renamed.
>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>  docs/devel/testing.rst              | 34 ++++++++++++++++--
>  tests/docker/Makefile.include       | 12 +++++++
>  tests/docker/dockerfiles-refresh.py | 56 +++++++++++++++++++++++++++++
>  3 files changed, 100 insertions(+), 2 deletions(-)
>  create mode 100755 tests/docker/dockerfiles-refresh.py
>
> diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst
> index 4e42392810..7882db85d4 100644
> --- a/docs/devel/testing.rst
> +++ b/docs/devel/testing.rst
> @@ -372,8 +372,38 @@ Along with many other images, the ``centos8`` image is defined in a Dockerfile
>  in ``tests/docker/dockerfiles/``, called ``centos8.docker``. ``make docker-help``
>  command will list all the available images.
>  
> -To add a new image, simply create a new ``.docker`` file under the
> -``tests/docker/dockerfiles/`` directory.
> +Most of the existing Dockerfiles were written by hand, simply by creating a
> +a new ``.docker`` file under the ``tests/docker/dockerfiles/`` directory.
> +This has led to an inconsistent set of packages being present across the
> +different containers.
> +
> +Thus going forward, QEMU is aiming to automatically generate the Dockerfiles
> +using the ``lcitool`` program provided by the ``libvirt-ci`` project:
> +
> +  https://gitlab.com/libvirt/libvirt-ci
> +
> +In that project, there is a ``qemu.yml`` file defining the list of build
> +pre-requisites needed by QEMU. This is processed together with the
> +``mappings.yml`` file to compute the distro specific list of package names.
> +The package names are then fed into a generator which emits a well structured
> +dockerfile. The set of dockerfiles which are auto-generated is defined in
> +the ``tests/docker/dockerfiles-refresh.py`` script.
> +
> +When preparing a patch series that changes dockerfiles managed by ``libvirt-ci``
> +tools, the following steps should be takenL
> +
> + * Fork the ``libvirt-ci`` project on gitlab
> +
> + * Prepare changes to its ``qemu.yml`` file and optionally ``mappings.yml``
> +   to define the packages to be added to QEMU's dockerfiles.
> +
> + * In QEMU run ``make docker-refresh LCITOOL=/path/to/libvirt-ci/lcitool``
> +   to re-create the dockerfiles in ``tests/docker/dockerfiles``

If lcitool could be a pre-requisite (even as a developer only one)
should we consider having a submodule and QEMU mirror of it?

> +
> + * Submit your changes to QEMU in the normal manner
> +
> + * Submit ``libvirt-ci`` changes as a merge request, linking to the
> +   QEMU patch series that uses them.

This just seems clunky and likely to therefor not get used. I would
prefer keeping the meta-data within the project, maybe with a check that
ensures the dockerfiles have not gone out of sync with their "idealised"
form.

>  
>  A ``.pre`` script can be added beside the ``.docker`` file, which will be
>  executed before building the image under the build context directory. This is
> diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
> index ff5d732889..e8e5f497cc 100644
> --- a/tests/docker/Makefile.include
> +++ b/tests/docker/Makefile.include
> @@ -27,6 +27,9 @@ DOCKER_TESTS := $(notdir $(shell \
>  ENGINE := auto
>  
>  DOCKER_SCRIPT=$(SRC_PATH)/tests/docker/docker.py --engine $(ENGINE)
> +REFRESH_SCRIPT=$(SRC_PATH)/tests/docker/dockerfiles-refresh.py
> +# To be set to /path/to/checkout/of/libvirt-ci.git/lcitool
> +LCITOOL=

Another argument for a sub-module?

-- 
Alex Bennée


^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [PATCH v4 00/22] tests/docker: start using libvirt-ci's "lcitool" for dockerfiles
  2021-06-23 14:22 [PATCH v4 00/22] tests/docker: start using libvirt-ci's "lcitool" for dockerfiles Daniel P. Berrangé
                   ` (22 preceding siblings ...)
  2021-06-23 14:42 ` [PATCH v4 00/22] tests/docker: start using libvirt-ci's "lcitool" for dockerfiles no-reply
@ 2021-07-05 14:51 ` Alex Bennée
  23 siblings, 0 replies; 51+ messages in thread
From: Alex Bennée @ 2021-07-05 14:51 UTC (permalink / raw)
  To: Daniel P. Berrangé
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, qemu-devel,
	Wainer dos Santos Moschetta, Philippe Mathieu-Daudé,
	Willian Rampazzo, Philippe Mathieu-Daudé


Daniel P. Berrangé <berrange@redhat.com> writes:

> 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.

Queued patches 1-15 to testing/next, thanks.

-- 
Alex Bennée


^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [PATCH v4 16/22] tests/docker: add script for automating container refresh
  2021-07-05 13:44   ` Alex Bennée
@ 2021-07-05 14:56     ` Daniel P. Berrangé
  2021-07-05 15:26       ` Alex Bennée
  0 siblings, 1 reply; 51+ messages in thread
From: Daniel P. Berrangé @ 2021-07-05 14:56 UTC (permalink / raw)
  To: Alex Bennée
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, qemu-devel,
	Wainer dos Santos Moschetta, Philippe Mathieu-Daudé,
	Willian Rampazzo, Philippe Mathieu-Daudé

On Mon, Jul 05, 2021 at 02:44:34PM +0100, Alex Bennée wrote:
> 
> Daniel P. Berrangé <berrange@redhat.com> writes:
> 
> > This introduces
> >
> >   https://gitlab.com/libvirt/libvirt-ci
> >
> > as a git submodule at tests/docker/libvirt-ci
> >
> > This submodule only needs to be checked out when needing to re-generate
> > the files in tests/docker/dockerfiles.
> >
> > When a new build pre-requisite is needed for QEMU, it should be added to
> > the libvirt-ci project 'qemu.yml' file, and the submodule updated to the
> > new commit.
> 
> It seems a bit weird to have the canonical description of QEMU
> dependencies live in another project does it not?

Yes, this is something I've been struggling with, since there
are varying use cases here.

The "lcitool" command was originally written to automate the
provisioning of virtual machines, suitable to act as runners
for a CI tool.

The VMs would be suitable for building a variety of projects,
so would need to be installed with the dependancies of all
projects. It makes sense to have the list of dependancies
in one central place. If you have them kept in each respective
project's git repo, then you have to checkout 20 git repos to
get their dependancies, before you can provision the VM.

It still supports VM provisioning, but now also supports
the Dockerfile generation too in parallel. With the
dockerfiles, you still have a need to access the dependancy
information from outside the main project. For example,
when building libvirt-perl.git, it wants to know the
dependancies needed by libvirt.git, so that it can do
a chained build of the two.

Potentially libvirt would also want to build qemu.git
first, so it can then test libvirt with latest QEMU.

So these things all end up driving towards the idea of
storing the build dependancies separate from the project.

It is definitely sub-optimal though, in that it introduces
a synchronization problem between the 2 respective git
repos for changes.

For libvirt we've mostly just accepted that pain of needing
to merge stuff in lock-step, but I think it is worse when
dealing with QEMU becasue the subsystem maintainer model
means stuff merges in 2 phases, so there's not a ideal
synchronization point.

> > The 'make docker-refresh' target will then re-create all the
> > dockerfiles with updated package lists. This ensures that all the
> > containers get exactly the same build pre-requisite packages installed.
> >
> > It also facilitates the addition of containers targetting new distros
> > or updating existing containers to new versions of the same distro,
> > where packages might have been renamed.
> >
> > Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> > ---
> >  docs/devel/testing.rst              | 34 ++++++++++++++++--
> >  tests/docker/Makefile.include       | 12 +++++++
> >  tests/docker/dockerfiles-refresh.py | 56 +++++++++++++++++++++++++++++
> >  3 files changed, 100 insertions(+), 2 deletions(-)
> >  create mode 100755 tests/docker/dockerfiles-refresh.py
> >
> > diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst
> > index 4e42392810..7882db85d4 100644
> > --- a/docs/devel/testing.rst
> > +++ b/docs/devel/testing.rst
> > @@ -372,8 +372,38 @@ Along with many other images, the ``centos8`` image is defined in a Dockerfile
> >  in ``tests/docker/dockerfiles/``, called ``centos8.docker``. ``make docker-help``
> >  command will list all the available images.
> >  
> > -To add a new image, simply create a new ``.docker`` file under the
> > -``tests/docker/dockerfiles/`` directory.
> > +Most of the existing Dockerfiles were written by hand, simply by creating a
> > +a new ``.docker`` file under the ``tests/docker/dockerfiles/`` directory.
> > +This has led to an inconsistent set of packages being present across the
> > +different containers.
> > +
> > +Thus going forward, QEMU is aiming to automatically generate the Dockerfiles
> > +using the ``lcitool`` program provided by the ``libvirt-ci`` project:
> > +
> > +  https://gitlab.com/libvirt/libvirt-ci
> > +
> > +In that project, there is a ``qemu.yml`` file defining the list of build
> > +pre-requisites needed by QEMU. This is processed together with the
> > +``mappings.yml`` file to compute the distro specific list of package names.
> > +The package names are then fed into a generator which emits a well structured
> > +dockerfile. The set of dockerfiles which are auto-generated is defined in
> > +the ``tests/docker/dockerfiles-refresh.py`` script.
> > +
> > +When preparing a patch series that changes dockerfiles managed by ``libvirt-ci``
> > +tools, the following steps should be takenL
> > +
> > + * Fork the ``libvirt-ci`` project on gitlab
> > +
> > + * Prepare changes to its ``qemu.yml`` file and optionally ``mappings.yml``
> > +   to define the packages to be added to QEMU's dockerfiles.
> > +
> > + * In QEMU run ``make docker-refresh LCITOOL=/path/to/libvirt-ci/lcitool``
> > +   to re-create the dockerfiles in ``tests/docker/dockerfiles``
> 
> If lcitool could be a pre-requisite (even as a developer only one)
> should we consider having a submodule and QEMU mirror of it?

I did have a submodule in the previous posting, but that creates its
own pain, because there's a chicken and egg problem to updates. Stuff
won't want to be merged into libvirt-ci.git until it is accepted by
a QEMU maintainer, but we need the submodule update ready before
it can be accepted by the QEMU maintainer. There's no nice way to
break that cycle without introducing a bit of manual work and
synchoronization at time of merge to master, which is not desirable
for QEMU IMHO

> > + * Submit your changes to QEMU in the normal manner
> > +
> > + * Submit ``libvirt-ci`` changes as a merge request, linking to the
> > +   QEMU patch series that uses them.
> 
> This just seems clunky and likely to therefor not get used. I would
> prefer keeping the meta-data within the project, maybe with a check that
> ensures the dockerfiles have not gone out of sync with their "idealised"
> form.


Regards,
Daniel
-- 
|: 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 :|



^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [PATCH v4 16/22] tests/docker: add script for automating container refresh
  2021-07-05 14:56     ` Daniel P. Berrangé
@ 2021-07-05 15:26       ` Alex Bennée
  0 siblings, 0 replies; 51+ messages in thread
From: Alex Bennée @ 2021-07-05 15:26 UTC (permalink / raw)
  To: Daniel P. Berrangé
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, qemu-devel,
	Wainer dos Santos Moschetta, Philippe Mathieu-Daudé,
	Willian Rampazzo, Philippe Mathieu-Daudé


Daniel P. Berrangé <berrange@redhat.com> writes:

> On Mon, Jul 05, 2021 at 02:44:34PM +0100, Alex Bennée wrote:
>> 
>> Daniel P. Berrangé <berrange@redhat.com> writes:
>> 
>> > This introduces
>> >
>> >   https://gitlab.com/libvirt/libvirt-ci
>> >
>> > as a git submodule at tests/docker/libvirt-ci
>> >
>> > This submodule only needs to be checked out when needing to re-generate
>> > the files in tests/docker/dockerfiles.
>> >
>> > When a new build pre-requisite is needed for QEMU, it should be added to
>> > the libvirt-ci project 'qemu.yml' file, and the submodule updated to the
>> > new commit.
>> 
>> It seems a bit weird to have the canonical description of QEMU
>> dependencies live in another project does it not?
>
> Yes, this is something I've been struggling with, since there
> are varying use cases here.
>
> The "lcitool" command was originally written to automate the
> provisioning of virtual machines, suitable to act as runners
> for a CI tool.
>
> The VMs would be suitable for building a variety of projects,
> so would need to be installed with the dependancies of all
> projects. It makes sense to have the list of dependancies
> in one central place. If you have them kept in each respective
> project's git repo, then you have to checkout 20 git repos to
> get their dependancies, before you can provision the VM.
>
> It still supports VM provisioning, but now also supports
> the Dockerfile generation too in parallel. With the
> dockerfiles, you still have a need to access the dependancy
> information from outside the main project. For example,
> when building libvirt-perl.git, it wants to know the
> dependancies needed by libvirt.git, so that it can do
> a chained build of the two.
>
> Potentially libvirt would also want to build qemu.git
> first, so it can then test libvirt with latest QEMU.
>
> So these things all end up driving towards the idea of
> storing the build dependancies separate from the project.
>
> It is definitely sub-optimal though, in that it introduces
> a synchronization problem between the 2 respective git
> repos for changes.
>
> For libvirt we've mostly just accepted that pain of needing
> to merge stuff in lock-step, but I think it is worse when
> dealing with QEMU becasue the subsystem maintainer model
> means stuff merges in 2 phases, so there's not a ideal
> synchronization point.
>
>> > The 'make docker-refresh' target will then re-create all the
>> > dockerfiles with updated package lists. This ensures that all the
>> > containers get exactly the same build pre-requisite packages installed.
>> >
>> > It also facilitates the addition of containers targetting new distros
>> > or updating existing containers to new versions of the same distro,
>> > where packages might have been renamed.
>> >
>> > Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
>> > ---
>> >  docs/devel/testing.rst              | 34 ++++++++++++++++--
>> >  tests/docker/Makefile.include       | 12 +++++++
>> >  tests/docker/dockerfiles-refresh.py | 56 +++++++++++++++++++++++++++++
>> >  3 files changed, 100 insertions(+), 2 deletions(-)
>> >  create mode 100755 tests/docker/dockerfiles-refresh.py
>> >
>> > diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst
>> > index 4e42392810..7882db85d4 100644
>> > --- a/docs/devel/testing.rst
>> > +++ b/docs/devel/testing.rst
>> > @@ -372,8 +372,38 @@ Along with many other images, the ``centos8`` image is defined in a Dockerfile
>> >  in ``tests/docker/dockerfiles/``, called ``centos8.docker``. ``make docker-help``
>> >  command will list all the available images.
>> >  
>> > -To add a new image, simply create a new ``.docker`` file under the
>> > -``tests/docker/dockerfiles/`` directory.
>> > +Most of the existing Dockerfiles were written by hand, simply by creating a
>> > +a new ``.docker`` file under the ``tests/docker/dockerfiles/`` directory.
>> > +This has led to an inconsistent set of packages being present across the
>> > +different containers.
>> > +
>> > +Thus going forward, QEMU is aiming to automatically generate the Dockerfiles
>> > +using the ``lcitool`` program provided by the ``libvirt-ci`` project:
>> > +
>> > +  https://gitlab.com/libvirt/libvirt-ci
>> > +
>> > +In that project, there is a ``qemu.yml`` file defining the list of build
>> > +pre-requisites needed by QEMU. This is processed together with the
>> > +``mappings.yml`` file to compute the distro specific list of package names.
>> > +The package names are then fed into a generator which emits a well structured
>> > +dockerfile. The set of dockerfiles which are auto-generated is defined in
>> > +the ``tests/docker/dockerfiles-refresh.py`` script.
>> > +
>> > +When preparing a patch series that changes dockerfiles managed by ``libvirt-ci``
>> > +tools, the following steps should be takenL
>> > +
>> > + * Fork the ``libvirt-ci`` project on gitlab
>> > +
>> > + * Prepare changes to its ``qemu.yml`` file and optionally ``mappings.yml``
>> > +   to define the packages to be added to QEMU's dockerfiles.
>> > +
>> > + * In QEMU run ``make docker-refresh LCITOOL=/path/to/libvirt-ci/lcitool``
>> > +   to re-create the dockerfiles in ``tests/docker/dockerfiles``
>> 
>> If lcitool could be a pre-requisite (even as a developer only one)
>> should we consider having a submodule and QEMU mirror of it?
>
> I did have a submodule in the previous posting, but that creates its
> own pain, because there's a chicken and egg problem to updates. Stuff
> won't want to be merged into libvirt-ci.git until it is accepted by
> a QEMU maintainer, but we need the submodule update ready before
> it can be accepted by the QEMU maintainer. There's no nice way to
> break that cycle without introducing a bit of manual work and
> synchoronization at time of merge to master, which is not desirable
> for QEMU IMHO

Can't lcitool be improved to accept out-of-its-tree metadata? 

>> > + * Submit your changes to QEMU in the normal manner
>> > +
>> > + * Submit ``libvirt-ci`` changes as a merge request, linking to the
>> > +   QEMU patch series that uses them.
>> 
>> This just seems clunky and likely to therefor not get used. I would
>> prefer keeping the meta-data within the project, maybe with a check that
>> ensures the dockerfiles have not gone out of sync with their "idealised"
>> form.
>
>
> Regards,
> Daniel


-- 
Alex Bennée


^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [PATCH v4 11/22] tests/docker: expand centos8 package list
  2021-06-23 14:22 ` [PATCH v4 11/22] tests/docker: expand centos8 package list Daniel P. Berrangé
  2021-07-05 13:40   ` Alex Bennée
@ 2021-07-05 20:27   ` Alex Bennée
  2021-07-05 21:41     ` Daniel P. Berrangé
  1 sibling, 1 reply; 51+ messages in thread
From: Alex Bennée @ 2021-07-05 20:27 UTC (permalink / raw)
  To: Daniel P. Berrangé
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, qemu-devel,
	Wainer dos Santos Moschetta, Philippe Mathieu-Daudé,
	Willian Rampazzo, Philippe Mathieu-Daudé


Daniel P. Berrangé <berrange@redhat.com> writes:

> This is the fully expanded list of build pre-requisites QEMU can
> conceivably use in any scenario.
>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>  tests/docker/dockerfiles/centos8.docker | 68 +++++++++++++++++++++++++
>  1 file changed, 68 insertions(+)
>
> diff --git a/tests/docker/dockerfiles/centos8.docker b/tests/docker/dockerfiles/centos8.docker
> index 5f1c57b4ad..4cc4c0c8a1 100644
> --- a/tests/docker/dockerfiles/centos8.docker
> +++ b/tests/docker/dockerfiles/centos8.docker
> @@ -3,36 +3,104 @@ FROM docker.io/centos:8
>  RUN dnf -y update
>  ENV PACKAGES \
>      SDL2-devel \
> +    alsa-lib-devel \
> +    bc \
> +    brlapi-devel \
>      bzip2 \
>      bzip2-devel \
> +    ca-certificates \
> +    capstone-devel \

CentOS8 doesn't seem to package capstone-devel or is it meant to come
from somewhere else?

-- 
Alex Bennée


^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [PATCH v4 11/22] tests/docker: expand centos8 package list
  2021-07-05 20:27   ` Alex Bennée
@ 2021-07-05 21:41     ` Daniel P. Berrangé
  2021-07-05 21:45       ` Daniel P. Berrangé
  0 siblings, 1 reply; 51+ messages in thread
From: Daniel P. Berrangé @ 2021-07-05 21:41 UTC (permalink / raw)
  To: Alex Bennée
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, qemu-devel,
	Wainer dos Santos Moschetta, Philippe Mathieu-Daudé,
	Willian Rampazzo, Philippe Mathieu-Daudé

On Mon, Jul 05, 2021 at 09:27:56PM +0100, Alex Bennée wrote:
> 
> Daniel P. Berrangé <berrange@redhat.com> writes:
> 
> > This is the fully expanded list of build pre-requisites QEMU can
> > conceivably use in any scenario.
> >
> > Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> > Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> > ---
> >  tests/docker/dockerfiles/centos8.docker | 68 +++++++++++++++++++++++++
> >  1 file changed, 68 insertions(+)
> >
> > diff --git a/tests/docker/dockerfiles/centos8.docker b/tests/docker/dockerfiles/centos8.docker
> > index 5f1c57b4ad..4cc4c0c8a1 100644
> > --- a/tests/docker/dockerfiles/centos8.docker
> > +++ b/tests/docker/dockerfiles/centos8.docker
> > @@ -3,36 +3,104 @@ FROM docker.io/centos:8
> >  RUN dnf -y update
> >  ENV PACKAGES \
> >      SDL2-devel \
> > +    alsa-lib-devel \
> > +    bc \
> > +    brlapi-devel \
> >      bzip2 \
> >      bzip2-devel \
> > +    ca-certificates \
> > +    capstone-devel \
> 
> CentOS8 doesn't seem to package capstone-devel or is it meant to come
> from somewhere else?

It comes in via the EPEL repository, along with a few other of the
packages listed here. Take a look at this job, line 1385 onwards:

  https://gitlab.com/berrange/qemu/-/jobs/1369975075


Regards,
Daniel
-- 
|: 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 :|



^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [PATCH v4 11/22] tests/docker: expand centos8 package list
  2021-07-05 21:41     ` Daniel P. Berrangé
@ 2021-07-05 21:45       ` Daniel P. Berrangé
  2021-07-06  8:20         ` Alex Bennée
  0 siblings, 1 reply; 51+ messages in thread
From: Daniel P. Berrangé @ 2021-07-05 21:45 UTC (permalink / raw)
  To: Alex Bennée, Fam Zheng, Peter Maydell, Thomas Huth,
	qemu-devel, Wainer dos Santos Moschetta,
	Philippe Mathieu-Daudé,
	Willian Rampazzo, Philippe Mathieu-Daudé

On Mon, Jul 05, 2021 at 10:41:55PM +0100, Daniel P. Berrangé wrote:
> On Mon, Jul 05, 2021 at 09:27:56PM +0100, Alex Bennée wrote:
> > 
> > Daniel P. Berrangé <berrange@redhat.com> writes:
> > 
> > > This is the fully expanded list of build pre-requisites QEMU can
> > > conceivably use in any scenario.
> > >
> > > Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> > > Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> > > ---
> > >  tests/docker/dockerfiles/centos8.docker | 68 +++++++++++++++++++++++++
> > >  1 file changed, 68 insertions(+)
> > >
> > > diff --git a/tests/docker/dockerfiles/centos8.docker b/tests/docker/dockerfiles/centos8.docker
> > > index 5f1c57b4ad..4cc4c0c8a1 100644
> > > --- a/tests/docker/dockerfiles/centos8.docker
> > > +++ b/tests/docker/dockerfiles/centos8.docker
> > > @@ -3,36 +3,104 @@ FROM docker.io/centos:8
> > >  RUN dnf -y update
> > >  ENV PACKAGES \
> > >      SDL2-devel \
> > > +    alsa-lib-devel \
> > > +    bc \
> > > +    brlapi-devel \
> > >      bzip2 \
> > >      bzip2-devel \
> > > +    ca-certificates \
> > > +    capstone-devel \
> > 
> > CentOS8 doesn't seem to package capstone-devel or is it meant to come
> > from somewhere else?
> 
> It comes in via the EPEL repository, along with a few other of the
> packages listed here. Take a look at this job, line 1385 onwards:
> 
>   https://gitlab.com/berrange/qemu/-/jobs/1369975075

Oh actually, this is a bisect issue in the series. The EPEL and
advanced virt repos are only enabled in the later patch in the
series that converts to lcitool auto-generation.

IOW, this current patch should have gained:

 RUN dnf install -y dnf-plugins-core && \
   dnf config-manager --set-enabled powertools && \
+  dnf install -y centos-release-advanced-virtualization && \
+  dnf install -y epel-release && \
   dnf install -y $PACKAGES


Regards,
Daniel
-- 
|: 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 :|



^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [PATCH v4 11/22] tests/docker: expand centos8 package list
  2021-07-05 21:45       ` Daniel P. Berrangé
@ 2021-07-06  8:20         ` Alex Bennée
  0 siblings, 0 replies; 51+ messages in thread
From: Alex Bennée @ 2021-07-06  8:20 UTC (permalink / raw)
  To: Daniel P. Berrangé
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, qemu-devel,
	Wainer dos Santos Moschetta, Philippe Mathieu-Daudé,
	Willian Rampazzo, Philippe Mathieu-Daudé


Daniel P. Berrangé <berrange@redhat.com> writes:

> On Mon, Jul 05, 2021 at 10:41:55PM +0100, Daniel P. Berrangé wrote:
>> On Mon, Jul 05, 2021 at 09:27:56PM +0100, Alex Bennée wrote:
>> > 
>> > Daniel P. Berrangé <berrange@redhat.com> writes:
>> > 
>> > > This is the fully expanded list of build pre-requisites QEMU can
>> > > conceivably use in any scenario.
>> > >
>> > > Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>> > > Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
>> > > ---
>> > >  tests/docker/dockerfiles/centos8.docker | 68 +++++++++++++++++++++++++
>> > >  1 file changed, 68 insertions(+)
>> > >
>> > > diff --git a/tests/docker/dockerfiles/centos8.docker b/tests/docker/dockerfiles/centos8.docker
>> > > index 5f1c57b4ad..4cc4c0c8a1 100644
>> > > --- a/tests/docker/dockerfiles/centos8.docker
>> > > +++ b/tests/docker/dockerfiles/centos8.docker
>> > > @@ -3,36 +3,104 @@ FROM docker.io/centos:8
>> > >  RUN dnf -y update
>> > >  ENV PACKAGES \
>> > >      SDL2-devel \
>> > > +    alsa-lib-devel \
>> > > +    bc \
>> > > +    brlapi-devel \
>> > >      bzip2 \
>> > >      bzip2-devel \
>> > > +    ca-certificates \
>> > > +    capstone-devel \
>> > 
>> > CentOS8 doesn't seem to package capstone-devel or is it meant to come
>> > from somewhere else?
>> 
>> It comes in via the EPEL repository, along with a few other of the
>> packages listed here. Take a look at this job, line 1385 onwards:
>> 
>>   https://gitlab.com/berrange/qemu/-/jobs/1369975075
>
> Oh actually, this is a bisect issue in the series. The EPEL and
> advanced virt repos are only enabled in the later patch in the
> series that converts to lcitool auto-generation.
>
> IOW, this current patch should have gained:
>
>  RUN dnf install -y dnf-plugins-core && \
>    dnf config-manager --set-enabled powertools && \
> +  dnf install -y centos-release-advanced-virtualization && \
> +  dnf install -y epel-release && \
>    dnf install -y $PACKAGES

OK I'll revert my deletions and fix that up.

>
>
> Regards,
> Daniel


-- 
Alex Bennée


^ permalink raw reply	[flat|nested] 51+ messages in thread

end of thread, other threads:[~2021-07-06  8:21 UTC | newest]

Thread overview: 51+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-23 14:22 [PATCH v4 00/22] tests/docker: start using libvirt-ci's "lcitool" for dockerfiles Daniel P. Berrangé
2021-06-23 14:22 ` [PATCH v4 01/22] hw/usb/ccid: remove references to NSS Daniel P. Berrangé
2021-06-25 18:11   ` Willian Rampazzo
2021-07-05 10:37   ` Alex Bennée
2021-06-23 14:22 ` [PATCH v4 02/22] tests/docker: don't use BUILDKIT in GitLab either Daniel P. Berrangé
2021-06-25 20:21   ` Willian Rampazzo
2021-06-23 14:22 ` [PATCH v4 03/22] tests/docker: use project specific container registries Daniel P. Berrangé
2021-06-25 20:24   ` Willian Rampazzo
2021-07-05 12:07   ` Alex Bennée
2021-06-23 14:22 ` [PATCH v4 04/22] tests/docker: use explicit docker.io registry Daniel P. Berrangé
2021-07-05 13:33   ` Alex Bennée
2021-06-23 14:22 ` [PATCH v4 05/22] tests/docker: remove FEATURES env var from templates Daniel P. Berrangé
2021-06-25 20:51   ` Willian Rampazzo
2021-07-05 12:20   ` Alex Bennée
2021-07-05 12:36   ` Alex Bennée
2021-06-23 14:22 ` [PATCH v4 06/22] tests/docker: fix sorting in package lists Daniel P. Berrangé
2021-07-05 13:33   ` Alex Bennée
2021-06-23 14:22 ` [PATCH v4 07/22] tests/docker: fix mistakes in centos " Daniel P. Berrangé
2021-07-05 13:33   ` Alex Bennée
2021-06-23 14:22 ` [PATCH v4 08/22] tests/docker: fix mistakes in fedora package list Daniel P. Berrangé
2021-07-05 13:36   ` Alex Bennée
2021-06-23 14:22 ` [PATCH v4 09/22] tests/docker: fix mistakes in ubuntu package lists Daniel P. Berrangé
2021-07-05 13:40   ` Alex Bennée
2021-06-23 14:22 ` [PATCH v4 10/22] tests/docker: remove mingw packages from Fedora Daniel P. Berrangé
2021-07-05 13:40   ` Alex Bennée
2021-06-23 14:22 ` [PATCH v4 11/22] tests/docker: expand centos8 package list Daniel P. Berrangé
2021-07-05 13:40   ` Alex Bennée
2021-07-05 20:27   ` Alex Bennée
2021-07-05 21:41     ` Daniel P. Berrangé
2021-07-05 21:45       ` Daniel P. Berrangé
2021-07-06  8:20         ` Alex Bennée
2021-06-23 14:22 ` [PATCH v4 12/22] tests/docker: expand fedora " Daniel P. Berrangé
2021-07-05 13:41   ` Alex Bennée
2021-06-23 14:22 ` [PATCH v4 13/22] tests/docker: expand ubuntu1804 " Daniel P. Berrangé
2021-07-05 13:41   ` Alex Bennée
2021-06-23 14:22 ` [PATCH v4 14/22] tests/docker: expand ubuntu2004 " Daniel P. Berrangé
2021-07-05 13:42   ` Alex Bennée
2021-06-23 14:22 ` [PATCH v4 15/22] tests/docker: expand opensuse-leap " Daniel P. Berrangé
2021-07-05 13:42   ` Alex Bennée
2021-06-23 14:22 ` [PATCH v4 16/22] tests/docker: add script for automating container refresh Daniel P. Berrangé
2021-07-05 13:44   ` Alex Bennée
2021-07-05 14:56     ` Daniel P. Berrangé
2021-07-05 15:26       ` Alex Bennée
2021-06-23 14:22 ` [PATCH v4 17/22] tests/docker: auto-generate centos8 with lcitool Daniel P. Berrangé
2021-06-23 14:22 ` [PATCH v4 18/22] tests/docker: auto-generate fedora " Daniel P. Berrangé
2021-06-23 14:22 ` [PATCH v4 19/22] tests/docker: auto-generate ubuntu1804 " Daniel P. Berrangé
2021-06-23 14:22 ` [PATCH v4 20/22] tests/docker: auto-generate ubuntu2004 " Daniel P. Berrangé
2021-06-23 14:28 ` [PATCH v4 21/22] tests/docker: auto-generate opensuse-leap " Daniel P. Berrangé
2021-06-23 14:29 ` [PATCH v4 22/22] tests/docker: remove ubuntu container Daniel P. Berrangé
2021-06-23 14:42 ` [PATCH v4 00/22] tests/docker: start using libvirt-ci's "lcitool" for dockerfiles no-reply
2021-07-05 14:51 ` Alex Bennée

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).