Skip to contentSkip to conversation

tests/docker: start using libvirt-ci's "lcitool" for dockerfiles

PATCH Superseded Daniel P. Berrangé 6 participants 44 messages Nov 24, 2021 – Dec 15, 2021

Subsystems (2)

v4 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

v4 cover tests/docker: start using libvirt-ci's "lcitool" for dockerfiles

Currently the tests/docker/dockerfiles/*Dockerfile recipes are all hand written by contributors. There is a common design pattern, but the set of packages listed for installation leaves alot to be desired

- There is no consistency at all across distros
- Many potential build deps are not listed in the containers
- Some packages are not used by QEMU at all
- Adding new distros is an error prone task

The same applies to package lists for VMs, Cirrus CI / Travis CI, and probably more.

This problem is not unique to QEMU, libvirt faced the exact same issues and developed a program called "lcitool" which is part of the libvirt-ci git repository to reduce the burden in this area.

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 and Cirrus CI variables, since that is 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 then to have its list of pre-requisites enumerated For example:

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 distro targets are

 $ lcitool targets
  alpine-314
  alpine-edge
  centos-8
  centos-stream-8
  centos-stream-9
  debian-10
  debian-11
  debian-sid
  fedora-34
  fedora-35
  fedora-rawhide
  freebsd-12
  freebsd-13
  freebsd-current
  macos-11
  opensuse-leap-152
  opensuse-tumbleweed
  ubuntu-1804
  ubuntu-2004

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

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 lcitool 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've got a pending enhancement to lcitool to support split layers for the cross-buld dockerfiles. An alternative is to just use fully self-contained dockerfiles for cross builds too though.

There is also scope for auto-generating the package lists for tests/vm, but I've not attempted that yet. The same general idea appies - we just call lcitool to spit out a yml file containing a list of native packages for each VM target.

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 'make lcitool-refresh' target that needs to be invoked whenever the local files need re-generating with updated package lists. This can be either when adding a new distro target or when some build pre-requisite is added. This make target will checkout the libvirt-ci.git submodule to do its work.

One unsolved problem here is that the rebase to Fedora 35 has caused the oss-fuzz job in CI to reliably fail with a timeout. Running locally on F35 the fuzz script never finishes even after 24 hours. There's a genuine problem hiding in there in the tests or code itself, that newer clang has likely exposed.

Changed in v5:

- Re-introduce use of git submodule
- Pull qemu.yml package list into qemu.git not libvirt-ci.git
- Improved make trget integration for refreshing files
- Also convert Alpine dockerfile
- Also generate cirrus CI variables files
- Rebase fedora dockerfile to F35, since F33 is no longer supported by libvirt-ci as it is end of life by Fedora.

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é (17):
ui: avoid compiler warnings from unused clipboard info variable
meson: require liburing >= 0.3
ui: avoid warnings about directdb on Alpine / musl libc
ci: explicitly skip I/O tests on alpine
tests/docker: switch fedora image to release 35
tests: integrate lcitool for generating build env manifests tests/docker: auto-generate centos8.docker with lcitool tests/docker: auto-generate fedora.docker with lcitool tests/docker: auto-generate ubuntu1804.docker with lcitool tests/docker: auto-generate ubuntu2004.docker with lcitool tests/docker: auto-generate opensuse-leap.docker with lcitool tests/docker: remove ubuntu.docker container .gitlab-ci.d/cirrus: auto-generate variables with lcitool tests/docker: updates to alpine package list tests/docker: fix sorting of alpine image package lists tests/docker: fully expand the alpine package list tests/docker: auto-generate alpine.docker with lcitool

John Snow (1):
spice: Update QXLInterface for spice >= 0.15.0

 .gitlab-ci.d/buildtest.yml                    |   2 +-
 .gitlab-ci.d/cirrus/freebsd-12.vars           |  11 +-
 .gitlab-ci.d/cirrus/freebsd-13.vars           |  11 +-
 .gitlab-ci.d/cirrus/macos-11.vars             |  11 +-
 .gitlab-ci.d/containers.yml                   |   5 -
 .gitmodules                                   |   3 +
 Makefile                                      |   2 +
 docs/devel/testing.rst                        | 104 ++++++-
 hw/display/qxl.c                              |  14 +-
 include/ui/qemu-spice.h                       |   6 +
 include/ui/sdl2.h                             |  11 +
 meson.build                                   |   3 +-
 tests/docker/dockerfiles/alpine.docker        | 175 ++++++++----
 tests/docker/dockerfiles/centos8.docker       | 243 ++++++++--------
 tests/docker/dockerfiles/fedora.docker        | 262 ++++++++++--------
 tests/docker/dockerfiles/opensuse-leap.docker | 245 ++++++++--------
 tests/docker/dockerfiles/ubuntu.docker        |  71 -----
 tests/docker/dockerfiles/ubuntu1804.docker    | 255 +++++++++--------
 tests/docker/dockerfiles/ubuntu2004.docker    | 257 +++++++++--------
 tests/lcitool/Makefile.include                |  17 ++
 tests/lcitool/libvirt-ci                      |   1 +
 tests/lcitool/projects/qemu.yml               | 115 ++++++++
 tests/lcitool/refresh                         |  96 +++++++
 ui/clipboard.c                                |   3 +-
 ui/spice-display.c                            |  11 +
 25 files changed, 1217 insertions(+), 717 deletions(-)
 delete mode 100644 tests/docker/dockerfiles/ubuntu.docker
 create mode 100644 tests/lcitool/Makefile.include
 create mode 160000 tests/lcitool/libvirt-ci
 create mode 100644 tests/lcitool/projects/qemu.yml
 create mode 100755 tests/lcitool/refresh
Signature · 1 line
2.33.1
#1 lore raw

PATCH v4 1/18 ui: avoid compiler warnings from unused clipboard info variable

With latest clang 13.0.0 we get

../ui/clipboard.c:47:34: error: variable 'old' set but not used [-Werror,-Wunused-but-set-variable]

    g_autoptr(QemuClipboardInfo) old = NULL;
                                 ^

The compiler can't tell that we only declared this variable in order to get the side effect of free'ing it when out of scope.

This pattern is a little dubious for a use of g_autoptr, so rewrite the code to avoid it.

---
 ui/clipboard.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
ui/clipboard.c +1 -2
index d7b008d62a..7672058e84 100644
@@ -44,12 +44,11 @@ void qemu_clipboard_peer_release(QemuClipboardPeer *peer,
 
 void qemu_clipboard_update(QemuClipboardInfo *info)
 {
-    g_autoptr(QemuClipboardInfo) old = NULL;
     assert(info->selection < QEMU_CLIPBOARD_SELECTION__COUNT);
 
     notifier_list_notify(&clipboard_notifiers, info);
 
-    old = cbinfo[info->selection];
+    qemu_clipboard_info_unref(cbinfo[info->selection]);
     cbinfo[info->selection] = qemu_clipboard_info_ref(info);
 }
 
Signature · 1 line
2.33.1
Reviewed-by Tested-by on v4 1/18
#2 lore raw

Re: [PATCH v4 01/18] ui: avoid compiler warnings from unused clipboard info variable

Quoted 9 lines · Daniel P. Berrangé

With latest clang 13.0.0 we get

../ui/clipboard.c:47:34: error: variable 'old' set but not used [-Werror,-Wunused-but-set-variable]

    g_autoptr(QemuClipboardInfo) old = NULL;
                                 ^

The compiler can't tell that we only declared this variable in order to get the side effect of free'ing it when out of scope.

Quoted 7 lines

This pattern is a little dubious for a use of g_autoptr, so rewrite the code to avoid it.

---
 ui/clipboard.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
#3 lore raw

Re: [PATCH v4 01/18] ui: avoid compiler warnings from unused clipboard info variable

Quoted 13 lines · Philippe Mathieu-Daudé
Quoted 12 lines · Daniel P. Berrangé

With latest clang 13.0.0 we get

../ui/clipboard.c:47:34: error: variable 'old' set but not used [-Werror,-Wunused-but-set-variable]

    g_autoptr(QemuClipboardInfo) old = NULL;
                                 ^

The compiler can't tell that we only declared this variable in order to get the side effect of free'ing it when out of scope.

This pattern is a little dubious for a use of g_autoptr, so rewrite the code to avoid it.

Quoted 8 lines
Quoted 4 lines
---
 ui/clipboard.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Could we get this patch directly applied as a buildfix?

#4 lore raw

PATCH v4 2/18 spice: Update QXLInterface for spice >= 0.15.0

In reply to Daniel P. Berrangé

From: John Snow <[email protected]>

spice updated the spelling (and arguments) of "attache_worker" in 0.15.0. Update QEMU to match, preventing -Wdeprecated-declarations compilations from reporting build errors.

See also:
https://gitlab.freedesktop.org/spice/spice/-/commit/974692bda1e77af92b71ed43b022439448492cb9

---
 hw/display/qxl.c        | 14 +++++++++++++-
 include/ui/qemu-spice.h |  6 ++++++
 ui/spice-display.c      | 11 +++++++++++
 3 files changed, 30 insertions(+), 1 deletion(-)
hw/display/qxl.c +13 -1
index 29c80b4289..1da6703e44 100644
@@ -517,13 +517,20 @@ static int qxl_track_command(PCIQXLDevice *qxl, struct QXLCommandExt *ext)
 
 /* spice display interface callbacks */
 
-static void interface_attach_worker(QXLInstance *sin, QXLWorker *qxl_worker)
+static void interface_attached_worker(QXLInstance *sin)
 {
     PCIQXLDevice *qxl = container_of(sin, PCIQXLDevice, ssd.qxl);
 
     trace_qxl_interface_attach_worker(qxl->id);
 }
 
+#if !(SPICE_HAS_ATTACHED_WORKER)
+static void interface_attach_worker(QXLInstance *sin, QXLWorker *qxl_worker)
+{
+    interface_attached_worker(sin);
+}
+#endif
+
 static void interface_set_compression_level(QXLInstance *sin, int level)
 {
     PCIQXLDevice *qxl = container_of(sin, PCIQXLDevice, ssd.qxl);
@@ -1131,7 +1138,12 @@ static const QXLInterface qxl_interface = {
     .base.major_version      = SPICE_INTERFACE_QXL_MAJOR,
     .base.minor_version      = SPICE_INTERFACE_QXL_MINOR,
 
+#if SPICE_HAS_ATTACHED_WORKER
+    .attached_worker         = interface_attached_worker,
+#else
     .attache_worker          = interface_attach_worker,
+#endif
+
     .set_compression_level   = interface_set_compression_level,
 #if SPICE_NEEDS_SET_MM_TIME
     .set_mm_time             = interface_set_mm_time,
include/ui/qemu-spice.h +6 -0
index 71ecd6cfd1..21fe195e18 100644
@@ -40,6 +40,12 @@ int qemu_spice_migrate_info(const char *hostname, int port, int tls_port,
 #define SPICE_NEEDS_SET_MM_TIME 0
 #endif
 
+#if defined(SPICE_SERVER_VERSION) && (SPICE_SERVER_VERSION >= 0x000f00)
+#define SPICE_HAS_ATTACHED_WORKER 1
+#else
+#define SPICE_HAS_ATTACHED_WORKER 0
+#endif
+
 #else  /* CONFIG_SPICE */
 
 #include "qemu/error-report.h"
ui/spice-display.c +11 -0
index f59c69882d..1a60cebb7d 100644
@@ -500,10 +500,17 @@ void qemu_spice_display_refresh(SimpleSpiceDisplay *ssd)
 
 /* spice display interface callbacks */
 
+#if SPICE_HAS_ATTACHED_WORKER
+static void interface_attached_worker(QXLInstance *sin)
+{
+    /* nothing to do */
+}
+#else
 static void interface_attach_worker(QXLInstance *sin, QXLWorker *qxl_worker)
 {
     /* nothing to do */
 }
+#endif
 
 static void interface_set_compression_level(QXLInstance *sin, int level)
 {
@@ -702,7 +709,11 @@ static const QXLInterface dpy_interface = {
     .base.major_version      = SPICE_INTERFACE_QXL_MAJOR,
     .base.minor_version      = SPICE_INTERFACE_QXL_MINOR,
 
+#if SPICE_HAS_ATTACHED_WORKER
+    .attached_worker         = interface_attached_worker,
+#else
     .attache_worker          = interface_attach_worker,
+#endif
     .set_compression_level   = interface_set_compression_level,
 #if SPICE_NEEDS_SET_MM_TIME
     .set_mm_time             = interface_set_mm_time,
Signature · 1 line
2.33.1
Reviewed-by Tested-by on v4 2/18
#5 lore raw

Re: [PATCH v4 02/18] spice: Update QXLInterface for spice >= 0.15.0

Quoted 10 lines · Daniel P. Berrangé

From: John Snow <[email protected]>

spice updated the spelling (and arguments) of "attache_worker" in 0.15.0. Update QEMU to match, preventing -Wdeprecated-declarations compilations from reporting build errors.

See also:
https://gitlab.freedesktop.org/spice/spice/-/commit/974692bda1e77af92b71ed43b022439448492cb9

Missing your S-o-b?

Quoted 5 lines
---
 hw/display/qxl.c        | 14 +++++++++++++-
 include/ui/qemu-spice.h |  6 ++++++
 ui/spice-display.c      | 11 +++++++++++
 3 files changed, 30 insertions(+), 1 deletion(-)
#6 lore raw

PATCH v4 3/18 meson: require liburing >= 0.3

In reply to Daniel P. Berrangé

openSUSE Leap 15.2 ships with liburing == 0.2 against which QEMU fails to build.

../util/fdmon-io_uring.c: In function ‘fdmon_io_uring_need_wait’:
../util/fdmon-io_uring.c:305:9: error: implicit declaration of function ‘io_uring_sq_ready’; did you mean ‘io_uring_cq_ready’? [-Werror=implicit-function-declaration]

     if (io_uring_sq_ready(&ctx->fdmon_io_uring)) {
         ^~~~~~~~~~~~~~~~~
         io_uring_cq_ready

This method was introduced in liburing 0.3, so set that as a minimum requirement.

---
 meson.build | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meson.build +2 -1
index e2d38a43e6..04d36bf47e 100644
@@ -427,7 +427,8 @@ if not get_option('linux_aio').auto() or have_block
 endif
 linux_io_uring = not_found
 if not get_option('linux_io_uring').auto() or have_block
-  linux_io_uring = dependency('liburing', required: get_option('linux_io_uring'),
+  linux_io_uring = dependency('liburing', version: '>=0.3',
+                              required: get_option('linux_io_uring'),
                               method: 'pkg-config', kwargs: static_kwargs)
 endif
 libxml2 = not_found
Signature · 1 line
2.33.1
#7 lore raw

Re: [PATCH v4 03/18] meson: require liburing >= 0.3

Cc'ing Stefan & Stefano.

Quoted 32 lines · Daniel P. Berrangé

openSUSE Leap 15.2 ships with liburing == 0.2 against which QEMU fails to build.

../util/fdmon-io_uring.c: In function ‘fdmon_io_uring_need_wait’:
../util/fdmon-io_uring.c:305:9: error: implicit declaration of function ‘io_uring_sq_ready’; did you mean ‘io_uring_cq_ready’? [-Werror=implicit-function-declaration]

     if (io_uring_sq_ready(&ctx->fdmon_io_uring)) {
         ^~~~~~~~~~~~~~~~~
         io_uring_cq_ready

This method was introduced in liburing 0.3, so set that as a minimum requirement.

---
 meson.build | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meson.build +2 -1
index e2d38a43e6..04d36bf47e 100644
@@ -427,7 +427,8 @@ if not get_option('linux_aio').auto() or have_block
 endif
 linux_io_uring = not_found
 if not get_option('linux_io_uring').auto() or have_block
-  linux_io_uring = dependency('liburing', required: get_option('linux_io_uring'),
+  linux_io_uring = dependency('liburing', version: '>=0.3',
+                              required: get_option('linux_io_uring'),
                               method: 'pkg-config', kwargs: static_kwargs)
 endif
 libxml2 = not_found
#8 lore raw

Re: [PATCH v4 03/18] meson: require liburing >= 0.3

+Cole too, who reviewed commit ae60ab7eb20 ("aio-posix: fix test-aio /aio/event/wait with fdmon-io_uring").

Quoted 14 lines · Philippe Mathieu-Daudé

Cc'ing Stefan & Stefano.

Quoted 11 lines · Daniel P. Berrangé

openSUSE Leap 15.2 ships with liburing == 0.2 against which QEMU fails to build.

../util/fdmon-io_uring.c: In function ‘fdmon_io_uring_need_wait’:
../util/fdmon-io_uring.c:305:9: error: implicit declaration of function ‘io_uring_sq_ready’; did you mean ‘io_uring_cq_ready’? [-Werror=implicit-function-declaration]

     if (io_uring_sq_ready(&ctx->fdmon_io_uring)) {
         ^~~~~~~~~~~~~~~~~
         io_uring_cq_ready

This method was introduced in liburing 0.3, so set that as a minimum requirement.

Indeed:

https://github.com/axboe/liburing/compare/liburing-0.2...liburing-0.3#diff-e0178cba1dc791a3b22c0a516225980907931d18a2773adf584e8dcffb51a2caR330

Quoted 5 lines
Quoted 5 lines
---
 meson.build | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Quoted 10 lines

meson.build if not get_option('linux_aio').auto() or have_block · line 430

Quoted 10 lines
meson.build +1 -1
index e2d38a43e6..04d36bf47e 100644
@@ -427,7 +427,8 @@ if not get_option('linux_aio').auto() or have_block
 endif
 linux_io_uring = not_found
 if not get_option('linux_io_uring').auto() or have_block
-  linux_io_uring = dependency('liburing', required: get_option('linux_io_uring'),
+  linux_io_uring = dependency('liburing', version: '>=0.3',
Quoted 5 lines
Quoted 5 lines
meson.build +1 -0
+                              required: get_option('linux_io_uring'),
                               method: 'pkg-config', kwargs: static_kwargs)
 endif
 libxml2 = not_found
Reviewed-by
#9 lore raw

Re: [PATCH v4 03/18] meson: require liburing >= 0.3

In reply to Philippe Mathieu-Daudé
Quoted 20 lines · Philippe Mathieu-Daudé

Cc'ing Stefan & Stefano.

Quoted 17 lines · Daniel P. Berrangé

openSUSE Leap 15.2 ships with liburing == 0.2 against which QEMU fails to build.

../util/fdmon-io_uring.c: In function ‘fdmon_io_uring_need_wait’:
../util/fdmon-io_uring.c:305:9: error: implicit declaration of function ‘io_uring_sq_ready’; did you mean ‘io_uring_cq_ready’? [-Werror=implicit-function-declaration]

     if (io_uring_sq_ready(&ctx->fdmon_io_uring)) {
         ^~~~~~~~~~~~~~~~~
         io_uring_cq_ready

This method was introduced in liburing 0.3, so set that as a minimum requirement.

---
 meson.build | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Quoted 16 lines
Quoted 6 lines
meson.build +0 -0
index e2d38a43e6..04d36bf47e 100644

meson.build if not get_option('linux_aio').auto() or have_block · line 434

Quoted 9 lines
meson.build +2 -1
@@ -427,7 +427,8 @@ if not get_option('linux_aio').auto() or have_block
 endif
 linux_io_uring = not_found
 if not get_option('linux_io_uring').auto() or have_block
-  linux_io_uring = dependency('liburing', required: get_option('linux_io_uring'),
+  linux_io_uring = dependency('liburing', version: '>=0.3',
+                              required: get_option('linux_io_uring'),
                               method: 'pkg-config', kwargs: static_kwargs)
 endif
 libxml2 = not_found
Reviewed-by
#10 lore raw

Re: [PATCH v4 03/18] meson: require liburing >= 0.3

In reply to Philippe Mathieu-Daudé
Quoted 1 line · Philippe Mathieu-Daudé

Cc'ing Stefan & Stefano.

Thanks Phil!

Quoted 19 lines · Daniel P. Berrangé
Quoted 17 lines

openSUSE Leap 15.2 ships with liburing == 0.2 against which QEMU fails to build.

../util/fdmon-io_uring.c: In function ‘fdmon_io_uring_need_wait’:
../util/fdmon-io_uring.c:305:9: error: implicit declaration of function ‘io_uring_sq_ready’; did you mean ‘io_uring_cq_ready’? [-Werror=implicit-function-declaration]

     if (io_uring_sq_ready(&ctx->fdmon_io_uring)) {
         ^~~~~~~~~~~~~~~~~
         io_uring_cq_ready

This method was introduced in liburing 0.3, so set that as a minimum requirement.

---
 meson.build | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Quoted 16 lines
Quoted 6 lines
meson.build +0 -0
index e2d38a43e6..04d36bf47e 100644

meson.build if not get_option('linux_aio').auto() or have_block · line 434

Quoted 9 lines
meson.build +2 -1
@@ -427,7 +427,8 @@ if not get_option('linux_aio').auto() or have_block
 endif
 linux_io_uring = not_found
 if not get_option('linux_io_uring').auto() or have_block
-  linux_io_uring = dependency('liburing', required: get_option('linux_io_uring'),
+  linux_io_uring = dependency('liburing', version: '>=0.3',
+                              required: get_option('linux_io_uring'),
                               method: 'pkg-config', kwargs: static_kwargs)
 endif
 libxml2 = not_found

LGTM!

#11 lore raw

Re: [PATCH v4 03/18] meson: require liburing >= 0.3

In reply to Daniel P. Berrangé
Quoted 23 lines · Daniel P. Berrangé

openSUSE Leap 15.2 ships with liburing == 0.2 against which QEMU fails to build.

../util/fdmon-io_uring.c: In function ‘fdmon_io_uring_need_wait’:
../util/fdmon-io_uring.c:305:9: error: implicit declaration of function ‘io_uring_sq_ready’; did you mean ‘io_uring_cq_ready’? [-Werror=implicit-function-declaration]

      if (io_uring_sq_ready(&ctx->fdmon_io_uring)) {
          ^~~~~~~~~~~~~~~~~
          io_uring_cq_ready

This method was introduced in liburing 0.3, so set that as a minimum requirement.

---
  meson.build | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
meson.build +0 -0
index e2d38a43e6..04d36bf47e 100644

meson.build if not get_option('linux_aio').auto() or have_block · line 434

Quoted 9 lines
meson.build +2 -1
@@ -427,7 +427,8 @@ if not get_option('linux_aio').auto() or have_block
  endif
  linux_io_uring = not_found
  if not get_option('linux_io_uring').auto() or have_block
-  linux_io_uring = dependency('liburing', required: get_option('linux_io_uring'),
+  linux_io_uring = dependency('liburing', version: '>=0.3',
+                              required: get_option('linux_io_uring'),
                                method: 'pkg-config', kwargs: static_kwargs)
  endif
  libxml2 = not_found

Thanks for fixing this. I didn't notice it on openSUSE SLE 15.2. I just checked my system openSUSE SLE 15.3, the version is 0.6 which is much newer.

Thanks
Li

#12 lore raw

PATCH v4 4/18 ui: avoid warnings about directdb on Alpine / musl libc

In reply to Daniel P. Berrangé

On Alpine, SDL is built with directfb support and this triggers warnings during QEMU build

In file included from /usr/include/directfb/direct/thread.h:38,

                 from /usr/include/directfb/direct/debug.h:43,
                 from /usr/include/directfb/direct/interface.h:36,
                 from /usr/include/directfb/directfb.h:49,
                 from /usr/include/SDL2/SDL_syswm.h:80,
                 from /builds/berrange/qemu/include/ui/sdl2.h:8,
                 from ../ui/sdl2-gl.c:31:
/usr/include/directfb/direct/os/waitqueue.h:41:25: error: redundant redeclaration of 'direct_waitqueue_init' [-Werror=redundant-decls]
   41 | DirectResult DIRECT_API direct_waitqueue_init        ( DirectWaitQueue *queue );
      |                         ^~~~~~~~~~~~~~~~~~~~~
---
 include/ui/sdl2.h | 11 +++++++++++
 1 file changed, 11 insertions(+)
include/ui/sdl2.h +11 -0
index f85c117a78..0330978df8 100644
@@ -5,7 +5,18 @@
 #undef WIN32_LEAN_AND_MEAN
 
 #include <SDL.h>
+
+/* with Alpine / muslc SDL headers pull in directfb headers
+ * which in turn trigger warning about redundant decls for
+ * direct_waitqueue_deinit.
+ */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wredundant-decls"
+
 #include <SDL_syswm.h>
+
+#pragma GCC diagnostic pop
+
 #ifdef CONFIG_SDL_IMAGE
 # include <SDL_image.h>
 #endif
Signature · 1 line
2.33.1
#13 lore raw

Re: [PATCH v4 04/18] ui: avoid warnings about directdb on Alpine / musl libc

Quoted 4 lines · Daniel P. Berrangé

On Alpine, SDL is built with directfb support and this triggers warnings during QEMU build

In file included from /usr/include/directfb/direct/thread.h:38,

Quoted 9 lines
                  from /usr/include/directfb/direct/debug.h:43,
                  from /usr/include/directfb/direct/interface.h:36,
                  from /usr/include/directfb/directfb.h:49,
                  from /usr/include/SDL2/SDL_syswm.h:80,
                  from /builds/berrange/qemu/include/ui/sdl2.h:8,
                  from ../ui/sdl2-gl.c:31:
/usr/include/directfb/direct/os/waitqueue.h:41:25: error: redundant redeclaration of 'direct_waitqueue_init' [-Werror=redundant-decls]
    41 | DirectResult DIRECT_API direct_waitqueue_init        ( DirectWaitQueue *queue );
       |                         ^~~~~~~~~~~~~~~~~~~~~

I think that's a bug in the SDL2 package of Alpine. I've had trouble with that one in the past already ... so not sure whether it's our job now to work around bugs in that crappy Alpine package... I'd prefer if we simply do not compile-test SDL on Alpine instead.

Thomas

#14 lore raw

Re: [PATCH v4 04/18] ui: avoid warnings about directdb on Alpine / musl libc

Quoted 15 lines · Thomas Huth
Quoted 4 lines · Daniel P. Berrangé

On Alpine, SDL is built with directfb support and this triggers warnings during QEMU build

In file included from /usr/include/directfb/direct/thread.h:38,

Quoted 9 lines
                  from /usr/include/directfb/direct/debug.h:43,
                  from /usr/include/directfb/direct/interface.h:36,
                  from /usr/include/directfb/directfb.h:49,
                  from /usr/include/SDL2/SDL_syswm.h:80,
                  from /builds/berrange/qemu/include/ui/sdl2.h:8,
                  from ../ui/sdl2-gl.c:31:
/usr/include/directfb/direct/os/waitqueue.h:41:25: error: redundant redeclaration of 'direct_waitqueue_init' [-Werror=redundant-decls]
    41 | DirectResult DIRECT_API direct_waitqueue_init        ( DirectWaitQueue *queue );
       |                         ^~~~~~~~~~~~~~~~~~~~~
Quoted 4 lines

I think that's a bug in the SDL2 package of Alpine. I've had trouble with that one in the past already ... so not sure whether it's our job now to work around bugs in that crappy Alpine package... I'd prefer if we simply do not compile-test SDL on Alpine instead.

It is a harmless bug in directfb headers, which has no ill effects other than producing a warning when some app uses -Wredundant-decls. Of course Alpine would ideally get this patched, but at the same time it is reasonable for Alpine users to want SDL and if someone has this package installed already we don't want QEMU build to break due to -Werror.

Case in point, as we auto-generate dockerfiles to ensure all pre-requisites are installed in all dockerfiles, the Alpine dockerfile gains SDL and exposes this bug. We could turn off -Werror but that's a overly big hammer compared to this targetted fix.

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
#15 lore raw

Re: [PATCH v4 04/18] ui: avoid warnings about directdb on Alpine / musl libc

Quoted 21 lines · Daniel P. Berrangé
Quoted 15 lines · Thomas Huth
Quoted 4 lines · Daniel P. Berrangé

On Alpine, SDL is built with directfb support and this triggers warnings during QEMU build

In file included from /usr/include/directfb/direct/thread.h:38,

Quoted 9 lines
                  from /usr/include/directfb/direct/debug.h:43,
                  from /usr/include/directfb/direct/interface.h:36,
                  from /usr/include/directfb/directfb.h:49,
                  from /usr/include/SDL2/SDL_syswm.h:80,
                  from /builds/berrange/qemu/include/ui/sdl2.h:8,
                  from ../ui/sdl2-gl.c:31:
/usr/include/directfb/direct/os/waitqueue.h:41:25: error: redundant redeclaration of 'direct_waitqueue_init' [-Werror=redundant-decls]
    41 | DirectResult DIRECT_API direct_waitqueue_init        ( DirectWaitQueue *queue );
       |                         ^~~~~~~~~~~~~~~~~~~~~
Quoted 4 lines

I think that's a bug in the SDL2 package of Alpine. I've had trouble with that one in the past already ... so not sure whether it's our job now to work around bugs in that crappy Alpine package... I'd prefer if we simply do not compile-test SDL on Alpine instead.

Quoted 6 lines

It is a harmless bug in directfb headers, which has no ill effects other than producing a warning when some app uses -Wredundant-decls. Of course Alpine would ideally get this patched, but at the same time it is reasonable for Alpine users to want SDL and if someone has this package installed already we don't want QEMU build to break due to -Werror.

We should avoid adding #pragma directives in generic header, but I agree -Wredundant-decls is harmless here, so:

Quoted 9 lines

Case in point, as we auto-generate dockerfiles to ensure all pre-requisites are installed in all dockerfiles, the Alpine dockerfile gains SDL and exposes this bug. We could turn off -Werror but that's a overly big hammer compared to this targetted fix.

Regards,
Daniel

#16 lore raw

PATCH v4 5/18 ci: explicitly skip I/O tests on alpine

In reply to Daniel P. Berrangé

The block I/O tests don't work on Alpine because their alternative libc impl emits different strings for errnos, which breaks the expected output matching. e.g.

=== IO: pattern 102
wrote 512/512 bytes at offset 512
512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-qemu-img: Error while reading offset 0 of blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.IMGFMT: Input/output error +qemu-img: Error while reading offset 0 of blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.IMGFMT: I/O error
4
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Formatting 'TEST_DIR/t.IMGFMT.2', fmt=IMGFMT size=0

Currently the I/O tests are skipped as a side effect of the Alpine image containing a minimal busybox 'sed' binary, rather than GNU Sed. This is a fragile assumption that will be invalidated when the dockerfile is changed to be autogenerated from a standardized package list that includes GNU Sed.

---
 .gitlab-ci.d/buildtest.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
.gitlab-ci.d/buildtest.yml +1 -1
index 71d0f407ad..e1fe37e563 100644
@@ -24,7 +24,7 @@ check-system-alpine:
       artifacts: true
   variables:
     IMAGE: alpine
-    MAKE_CHECK_ARGS: check
+    MAKE_CHECK_ARGS: check-unit check-qtest
 
 avocado-system-alpine:
   extends: .avocado_test_job_template
Signature · 1 line
2.33.1
#17 lore raw

Re: [PATCH v4 05/18] ci: explicitly skip I/O tests on alpine

Quoted 29 lines · Daniel P. Berrangé

The block I/O tests don't work on Alpine because their alternative libc impl emits different strings for errnos, which breaks the expected output matching. e.g.

=== IO: pattern 102
wrote 512/512 bytes at offset 512
512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)

(quoted diff) +1 -1
-qemu-img: Error while reading offset 0 of blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.IMGFMT: Input/output error
+qemu-img: Error while reading offset 0 of blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.IMGFMT: I/O error
  4
  Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
  Formatting 'TEST_DIR/t.IMGFMT.2', fmt=IMGFMT size=0

Currently the I/O tests are skipped as a side effect of the Alpine image containing a minimal busybox 'sed' binary, rather than GNU Sed. This is a fragile assumption that will be invalidated when the dockerfile is changed to be autogenerated from a standardized package list that includes GNU Sed.

---
  .gitlab-ci.d/buildtest.yml | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
.gitlab-ci.d/buildtest.yml +0 -0
index 71d0f407ad..e1fe37e563 100644

.gitlab-ci.d/buildtest.yml check-system-alpine: · line 27

Quoted 5 lines
.gitlab-ci.d/buildtest.yml +1 -1
@@ -24,7 +24,7 @@ check-system-alpine:
        artifacts: true
    variables:
      IMAGE: alpine
-    MAKE_CHECK_ARGS: check
+    MAKE_CHECK_ARGS: check-unit check-qtest

Hmm, that's just a work-around ... what if some user wants to run "make check" on an Alpine installation that has the real GNU sed installed? ... I think this rather requires some fixing in the iotests instead - or maybe the related tests should simply not be in the "auto" group anymore?

Thomas

#18 lore raw

Re: [PATCH v4 05/18] ci: explicitly skip I/O tests on alpine

Quoted 27 lines · Thomas Huth
Quoted 26 lines · Daniel P. Berrangé

The block I/O tests don't work on Alpine because their alternative libc impl emits different strings for errnos, which breaks the expected output matching. e.g.

=== IO: pattern 102
  wrote 512/512 bytes at offset 512
  512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -qemu-img: Error while reading offset 0 of blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.IMGFMT: Input/output error +qemu-img: Error while reading offset 0 of blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.IMGFMT: I/O error 4
  Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 Formatting 'TEST_DIR/t.IMGFMT.2', fmt=IMGFMT size=0

Currently the I/O tests are skipped as a side effect of the Alpine image containing a minimal busybox 'sed' binary, rather than GNU Sed. This is a fragile assumption that will be invalidated when the dockerfile is changed to be autogenerated from a standardized package list that includes GNU Sed.

---
  .gitlab-ci.d/buildtest.yml | 2 +-

  1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 15 lines
Quoted 10 lines
.gitlab-ci.d/buildtest.yml +0 -0
index 71d0f407ad..e1fe37e563 100644
@@ -24,7 +24,7 @@ check-system-alpine:

        artifacts: true
    variables:
      IMAGE: alpine
-    MAKE_CHECK_ARGS: check
+    MAKE_CHECK_ARGS: check-unit check-qtest

Hmm, that's just a work-around ... what if some user wants to run "make check" on an Alpine installation that has the real GNU sed installed? ... I think this rather requires some fixing in the iotests instead - or maybe the related tests should simply not be in the "auto" group anymore?

Or kludge EIO in error_setg_errno_internal()?

#19 lore raw

Re: [PATCH v4 05/18] ci: explicitly skip I/O tests on alpine

In reply to Thomas Huth
Quoted 25 lines · Thomas Huth
Quoted 24 lines · Daniel P. Berrangé

The block I/O tests don't work on Alpine because their alternative libc impl emits different strings for errnos, which breaks the expected output matching. e.g.

=== IO: pattern 102
wrote 512/512 bytes at offset 512
512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)

(quoted diff) +1 -1
-qemu-img: Error while reading offset 0 of blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.IMGFMT: Input/output error
+qemu-img: Error while reading offset 0 of blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.IMGFMT: I/O error
  4
  Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
  Formatting 'TEST_DIR/t.IMGFMT.2', fmt=IMGFMT size=0

Currently the I/O tests are skipped as a side effect of the Alpine image containing a minimal busybox 'sed' binary, rather than GNU Sed. This is a fragile assumption that will be invalidated when the dockerfile is changed to be autogenerated from a standardized package list that includes GNU Sed.

---
  .gitlab-ci.d/buildtest.yml | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 15 lines

.gitlab-ci.d/buildtest.yml check-system-alpine: · line 27

Quoted 10 lines
.gitlab-ci.d/buildtest.yml +1 -1
index 71d0f407ad..e1fe37e563 100644
@@ -24,7 +24,7 @@ check-system-alpine:
        artifacts: true
    variables:
      IMAGE: alpine
-    MAKE_CHECK_ARGS: check
+    MAKE_CHECK_ARGS: check-unit check-qtest

Hmm, that's just a work-around ... what if some user wants to run "make check" on an Alpine installation that has the real GNU sed installed? ... I think this rather requires some fixing in the iotests instead - or maybe the related tests should simply not be in the "auto" group anymore?

Of course, the I/o tests should be fixed, but that's a big job that on one has volunteered for.

Taking the tests in question out of the "auto" group would be very detrimental for test coverage on other platforms. There are many affected tests so that is not desirable.

As explained above, the CI job is already skipping the I/O tests today as a side effect of only having Busybox sed. This change just makes that explicit in the CI config so it is clear that we're missing this coverage and won't accidentally break when GNU Sed appears in the dockerfile.

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
#20 lore raw

Re: [PATCH v4 05/18] ci: explicitly skip I/O tests on alpine

Quoted 15 lines · Daniel P. Berrangé
Quoted 14 lines · Thomas Huth
Quoted 13 lines · Daniel P. Berrangé

The block I/O tests don't work on Alpine because their alternative libc impl emits different strings for errnos, which breaks the expected output matching. e.g.

=== IO: pattern 102
wrote 512/512 bytes at offset 512
512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)

(quoted diff) +1 -1
-qemu-img: Error while reading offset 0 of blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.IMGFMT: Input/output error
+qemu-img: Error while reading offset 0 of blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.IMGFMT: I/O error
  4
  Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
  Formatting 'TEST_DIR/t.IMGFMT.2', fmt=IMGFMT size=0
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

Currently the I/O tests are skipped as a side effect of the Alpine image containing a minimal busybox 'sed' binary, rather than GNU Sed. This is a fragile assumption that will be invalidated when the dockerfile is changed to be autogenerated from a standardized package list that includes GNU Sed.

"GNU sed" in lowercase? ("stream editor", 2 occurrences in description).

Quoted 29 lines
Quoted 6 lines
Quoted 6 lines
---
  .gitlab-ci.d/buildtest.yml | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 15 lines

.gitlab-ci.d/buildtest.yml check-system-alpine: · line 27

Quoted 10 lines
.gitlab-ci.d/buildtest.yml +1 -1
index 71d0f407ad..e1fe37e563 100644
@@ -24,7 +24,7 @@ check-system-alpine:
        artifacts: true
    variables:
      IMAGE: alpine
-    MAKE_CHECK_ARGS: check
+    MAKE_CHECK_ARGS: check-unit check-qtest

Hmm, that's just a work-around ... what if some user wants to run "make check" on an Alpine installation that has the real GNU sed installed? ... I think this rather requires some fixing in the iotests instead - or maybe the related tests should simply not be in the "auto" group anymore?

Of course, the I/o tests should be fixed, but that's a big job that on one has volunteered for.

Taking the tests in question out of the "auto" group would be very detrimental for test coverage on other platforms. There are many affected tests so that is not desirable.

Quoted 5 lines

As explained above, the CI job is already skipping the I/O tests today as a side effect of only having Busybox sed. This change just makes that explicit in the CI config so it is clear that we're missing this coverage and won't accidentally break when GNU Sed appears in the dockerfile.

This sounds reasonable.

#21 lore raw

PATCH v4 6/18 tests/docker: switch fedora image to release 35

In reply to Daniel P. Berrangé

The Fedora 33 release is shortly end of life. Switch to the newest Fedora 35 to maximise lifespan until we need to update again.

---
 tests/docker/dockerfiles/fedora.docker | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/docker/dockerfiles/fedora.docker +1 -1
index c6fd7e1113..855aefaac5 100644
@@ -1,4 +1,4 @@
-FROM registry.fedoraproject.org/fedora:33
+FROM registry.fedoraproject.org/fedora:35
 
 # Please keep this list sorted alphabetically
 ENV PACKAGES \
Signature · 1 line
2.33.1
Reviewed-by Tested-by on v4 6/18
#22 lore raw

Re: [PATCH v4 06/18] tests/docker: switch fedora image to release 35

Quoted 7 lines · Daniel P. Berrangé

The Fedora 33 release is shortly end of life. Switch to the newest Fedora 35 to maximise lifespan until we need to update again.

---
 tests/docker/dockerfiles/fedora.docker | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
#23 lore raw

PATCH v4 7/18 tests: integrate lcitool for generating build env manifests

In reply to Daniel P. Berrangé

This introduces

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

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

The 'lcitool' program within this submodule will be used to automatically generate build environment manifests from a definition of requirements in tests/lcitool/projects/qemu.yml

It will ultimately be capable of generating

- Dockerfiles
- Package lists for installation in VMs
- Variables for configuring Cirrus CI environments

When a new build pre-requisite is needed for QEMU, if this package is not currently known to libvirt-ci, it must first be added to the 'mappings.yml' file in the above git repo.

Then the submodule can be updated and the build pre-requisite added to the tests/lcitool/projects/qemu.yml file. Now all the build env manifests can be re-generated using 'make lcitool-refresh'

This ensures that when a new build pre-requisite is introduced, it is added to all the different OS containers, VMs and Cirrus CI environments consistently.

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.

---
 .gitmodules                     |   3 +
 Makefile                        |   2 +
 docs/devel/testing.rst          | 104 ++++++++++++++++++++++++++++-
 tests/lcitool/Makefile.include  |  17 +++++
 tests/lcitool/libvirt-ci        |   1 +
 tests/lcitool/projects/qemu.yml | 115 ++++++++++++++++++++++++++++++++
 tests/lcitool/refresh           |  67 +++++++++++++++++++
 7 files changed, 306 insertions(+), 3 deletions(-)
 create mode 100644 tests/lcitool/Makefile.include
 create mode 160000 tests/lcitool/libvirt-ci
 create mode 100644 tests/lcitool/projects/qemu.yml
 create mode 100755 tests/lcitool/refresh
.gitmodules +3 -0
index 08b1b48a09..84425d87e2 100644
@@ -64,3 +64,6 @@
 [submodule "roms/vbootrom"]
 	path = roms/vbootrom
 	url = https://gitlab.com/qemu-project/vbootrom.git
+[submodule "tests/lcitool/libvirt-ci"]
+	path = tests/lcitool/libvirt-ci
+	url = http://gitlab.com/libvirt/libvirt-ci
Makefile +2 -0
index 74c5b46d38..aec4728240 100644
@@ -287,6 +287,7 @@ cscope:
 # Needed by "meson install"
 export DESTDIR
 
+include $(SRC_PATH)/tests/lcitool/Makefile.include
 include $(SRC_PATH)/tests/docker/Makefile.include
 include $(SRC_PATH)/tests/vm/Makefile.include
 
@@ -316,6 +317,7 @@ endif
 	@echo  'Test targets:'
 	$(call print-help,check,Run all tests (check-help for details))
 	$(call print-help,bench,Run all benchmarks)
+	$(call print-help,lcitool-help,Help about targets for managing build environment manifests)
 	$(call print-help,docker-help,Help about targets running tests inside containers)
 	$(call print-help,vm-help,Help about targets running tests inside VM)
 	@echo  ''
docs/devel/testing.rst +101 -3

115 lines not on this page · raw message

tests/lcitool/Makefile.include new file +17 -0
new file mode 100644
index 0000000000..cff7c0b814
@@ -0,0 +1,17 @@
+
+LCITOOL_REFRESH = $(SRC_PATH)/tests/lcitool/refresh
+
+lcitool:
+	@echo 'Manage build environment manifests'
+	@echo
+	@echo 'Available targets:'
+	@echo
+	@echo '    lcitool:             Print this help.'
+	@echo '    lcitool-refresh:     Re-generate all build environment manifests.'
+	@echo
+
+lcitool-help: lcitool
+
+lcitool-refresh:
+	$(call quiet-command, git submodule update --init $(SRC_PATH)/tests/lcitool/libvirt-ci)
+	$(call quiet-command, $(LCITOOL_REFRESH))
tests/lcitool/libvirt-ci new file +1 -0
new file mode 160000
index 0000000000..29cec2153b
@@ -0,0 +1 @@
+Subproject commit 29cec2153b9a4dbb2e66f1cbc9866a4eff519cfd
tests/lcitool/projects/qemu.yml new file +115 -0

115 lines not on this page · raw message

tests/lcitool/refresh new file +67 -0

67 lines not on this page · raw message

Signature · 1 line
2.33.1
Reviewed-by on v4 7/18
#24 lore raw

Re: [PATCH v4 07/18] tests: integrate lcitool for generating build env manifests

Quoted 32 lines · Daniel P. Berrangé

This introduces

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

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

The 'lcitool' program within this submodule will be used to automatically generate build environment manifests from a definition of requirements in tests/lcitool/projects/qemu.yml

It will ultimately be capable of generating

- Dockerfiles
- Package lists for installation in VMs
- Variables for configuring Cirrus CI environments

When a new build pre-requisite is needed for QEMU, if this package is not currently known to libvirt-ci, it must first be added to the 'mappings.yml' file in the above git repo.

Then the submodule can be updated and the build pre-requisite added to the tests/lcitool/projects/qemu.yml file. Now all the build env manifests can be re-generated using 'make lcitool-refresh'

This ensures that when a new build pre-requisite is introduced, it is added to all the different OS containers, VMs and Cirrus CI environments consistently.

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.

Quoted 5 lines
---
 .gitmodules                     |   3 +
 Makefile                        |   2 +
 docs/devel/testing.rst          | 104 ++++++++++++++++++++++++++++-

Thanks for the detailed documentation.

Quoted 9 lines
 tests/lcitool/Makefile.include  |  17 +++++
 tests/lcitool/libvirt-ci        |   1 +
 tests/lcitool/projects/qemu.yml | 115 ++++++++++++++++++++++++++++++++
 tests/lcitool/refresh           |  67 +++++++++++++++++++
 7 files changed, 306 insertions(+), 3 deletions(-)
 create mode 100644 tests/lcitool/Makefile.include
 create mode 160000 tests/lcitool/libvirt-ci
 create mode 100644 tests/lcitool/projects/qemu.yml
 create mode 100755 tests/lcitool/refresh
#25 lore raw

PATCH v4 8/18 tests/docker: auto-generate centos8.docker with lcitool

In reply to Daniel P. Berrangé

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

---
 tests/docker/dockerfiles/centos8.docker | 243 +++++++++++++-----------
 tests/lcitool/refresh                   |   2 +
 2 files changed, 135 insertions(+), 110 deletions(-)
tests/docker/dockerfiles/centos8.docker +133 -110
index 7f135f8e8c..3c62b62a99 100644
@@ -1,112 +1,135 @@
-FROM docker.io/centos:8
+# THIS FILE WAS AUTO-GENERATED
+#
+#  $ lcitool dockerfile centos-8 qemu
+#
+# https://gitlab.com/libvirt/libvirt-ci
 
-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 \
-    libselinux-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 centos-release-advanced-virtualization && \
-  dnf install -y epel-release && \
-  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 \
+        bash \
+        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 \
+        glib2-static \
+        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 \
+        libselinux-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 \
+        pcre-static \
+        perl \
+        perl-Test-Harness \
+        pixman-devel \
+        pkgconfig \
+        pulseaudio-libs-devel \
+        python3 \
+        python3-PyYAML \
+        python3-numpy \
+        python3-pillow \
+        python3-pip \
+        python3-sphinx \
+        python3-sphinx_rtd_theme \
+        python3-virtualenv \
+        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 \
+        zlib-static && \
+    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
+
+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"
tests/lcitool/refresh +2 -0
index b47e25f64b..824b1c0ef2 100755
@@ -61,6 +61,8 @@ def generate_dockerfile(host, target, cross=None, trailer=None):
    generate(filename, cmd, trailer)
 
 try:
+   generate_dockerfile("centos8", "centos-8")
+
    sys.exit(0)
 except Exception as ex:
    print(str(ex), file=sys.stderr)
Signature · 1 line
2.33.1
#26 lore raw

PATCH v4 9/18 tests/docker: auto-generate fedora.docker with lcitool

In reply to Daniel P. Berrangé

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

---
 tests/docker/dockerfiles/fedora.docker | 260 ++++++++++++++-----------
 tests/lcitool/refresh                  |   1 +
 2 files changed, 146 insertions(+), 115 deletions(-)
tests/docker/dockerfiles/fedora.docker +145 -115
index 855aefaac5..6784878b56 100644
@@ -1,118 +1,148 @@
+# THIS FILE WAS AUTO-GENERATED
+#
+#  $ lcitool dockerfile fedora-35 qemu
+#
+# https://gitlab.com/libvirt/libvirt-ci
+
 FROM registry.fedoraproject.org/fedora:35
 
-# 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 \
-    libselinux-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 \
+        bash \
+        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 \
+        glib2-static \
+        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 \
+        libselinux-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 \
+        pcre-static \
+        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 \
+        zlib-static && \
+    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"
tests/lcitool/refresh +1 -0
index 824b1c0ef2..d79d2b8c06 100755
@@ -62,6 +62,7 @@ def generate_dockerfile(host, target, cross=None, trailer=None):
 
 try:
    generate_dockerfile("centos8", "centos-8")
+   generate_dockerfile("fedora", "fedora-35")
 
    sys.exit(0)
 except Exception as ex:
Signature · 1 line
2.33.1
#27 lore raw

PATCH v4 10/18 tests/docker: auto-generate ubuntu1804.docker with lcitool

In reply to Daniel P. Berrangé

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

---
 tests/docker/dockerfiles/ubuntu1804.docker | 255 ++++++++++++---------
 tests/lcitool/refresh                      |   7 +
 2 files changed, 149 insertions(+), 113 deletions(-)
tests/docker/dockerfiles/ubuntu1804.docker +142 -113
index 450fd06d0d..0ffa3c4d4b 100644
@@ -1,117 +1,146 @@
+# THIS FILE WAS AUTO-GENERATED
+#
+#  $ lcitool dockerfile ubuntu-1804 qemu
+#
+# https://gitlab.com/libvirt/libvirt-ci
+
 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 \
-    libselinux-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 \
+            bash \
+            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 \
+            libpcre2-dev \
+            libpixman-1-dev \
+            libpmem-dev \
+            libpng-dev \
+            libpulse-dev \
+            librbd-dev \
+            librdmacm-dev \
+            libsasl2-dev \
+            libsdl2-dev \
+            libsdl2-image-dev \
+            libseccomp-dev \
+            libselinux1-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
tests/lcitool/refresh +7 -0
index d79d2b8c06..1e30674d67 100755
@@ -60,9 +60,16 @@ def generate_dockerfile(host, target, cross=None, trailer=None):
    cmd.extend([target, "qemu"])
    generate(filename, cmd, trailer)
 
+ubuntu1804_skipssh = [
+   "# https://bugs.launchpad.net/qemu/+bug/1838763\n",
+   "ENV QEMU_CONFIGURE_OPTS --disable-libssh\n"
+]
+
 try:
    generate_dockerfile("centos8", "centos-8")
    generate_dockerfile("fedora", "fedora-35")
+   generate_dockerfile("ubuntu1804", "ubuntu-1804",
+                       trailer="".join(ubuntu1804_skipssh))
 
    sys.exit(0)
 except Exception as ex:
Signature · 1 line
2.33.1
#28 lore raw

PATCH v4 11/18 tests/docker: auto-generate ubuntu2004.docker with lcitool

In reply to Daniel P. Berrangé

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

---
 tests/docker/dockerfiles/ubuntu2004.docker | 257 ++++++++++++---------
 tests/lcitool/refresh                      |   9 +-
 2 files changed, 151 insertions(+), 115 deletions(-)
tests/docker/dockerfiles/ubuntu2004.docker +143 -114
index 15a026be09..40402b91fe 100644
@@ -1,119 +1,148 @@
+# THIS FILE WAS AUTO-GENERATED
+#
+#  $ lcitool dockerfile ubuntu-2004 qemu
+#
+# https://gitlab.com/libvirt/libvirt-ci
+
 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 \
-    libselinux-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 \
+            bash \
+            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 \
+            libpcre2-dev \
+            libpixman-1-dev \
+            libpmem-dev \
+            libpng-dev \
+            libpulse-dev \
+            librbd-dev \
+            librdmacm-dev \
+            libsasl2-dev \
+            libsdl2-dev \
+            libsdl2-image-dev \
+            libseccomp-dev \
+            libselinux1-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
tests/lcitool/refresh +8 -1
index 1e30674d67..310bad1315 100755
@@ -65,12 +65,19 @@ ubuntu1804_skipssh = [
    "ENV QEMU_CONFIGURE_OPTS --disable-libssh\n"
 ]
 
+ubuntu2004_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"
+]
+
 try:
    generate_dockerfile("centos8", "centos-8")
    generate_dockerfile("fedora", "fedora-35")
    generate_dockerfile("ubuntu1804", "ubuntu-1804",
                        trailer="".join(ubuntu1804_skipssh))
-
+   generate_dockerfile("ubuntu2004", "ubuntu-2004",
+                       trailer="".join(ubuntu2004_tsanhack))
    sys.exit(0)
 except Exception as ex:
    print(str(ex), file=sys.stderr)
Signature · 1 line
2.33.1
#29 lore raw

PATCH v4 12/18 tests/docker: auto-generate opensuse-leap.docker with lcitool

In reply to Daniel P. Berrangé

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

---
 tests/docker/dockerfiles/opensuse-leap.docker | 245 ++++++++++--------
 tests/lcitool/refresh                         |   1 +
 2 files changed, 135 insertions(+), 111 deletions(-)
tests/docker/dockerfiles/opensuse-leap.docker +134 -111
index 3bbdb67f4f..5510bdf19c 100644
@@ -1,114 +1,137 @@
+# THIS FILE WAS AUTO-GENERATED
+#
+#  $ lcitool dockerfile opensuse-leap-152 qemu
+#
+# https://gitlab.com/libvirt/libvirt-ci
+
 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 \
-    libselinux-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 \
+           bash \
+           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 \
+           libselinux-devel \
+           libspice-server-devel \
+           libssh-devel \
+           libtasn1-devel \
+           libubsan1 \
+           libudev-devel \
+           liburing-devel \
+           libusb-1_0-devel \
+           libxml2-devel \
+           libzstd-devel \
+           llvm \
+           lttng-ust-devel \
+           lzo-devel \
+           make \
+           mkisofs \
+           ncat \
+           ncurses-devel \
+           ninja \
+           openssh \
+           pam-devel \
+           pcre-devel-static \
+           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 \
+           zlib-devel-static && \
+    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"
tests/lcitool/refresh +1 -0
index 310bad1315..b8a69cee59 100755
@@ -78,6 +78,7 @@ try:
                        trailer="".join(ubuntu1804_skipssh))
    generate_dockerfile("ubuntu2004", "ubuntu-2004",
                        trailer="".join(ubuntu2004_tsanhack))
+   generate_dockerfile("opensuse-leap", "opensuse-leap-152")
    sys.exit(0)
 except Exception as ex:
    print(str(ex), file=sys.stderr)
Signature · 1 line
2.33.1
#30 lore raw

PATCH v4 13/18 tests/docker: remove ubuntu.docker container

In reply to Daniel P. Berrangé

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

---
 .gitlab-ci.d/containers.yml            |  5 --
 tests/docker/dockerfiles/ubuntu.docker | 71 --------------------------
 2 files changed, 76 deletions(-)
 delete mode 100644 tests/docker/dockerfiles/ubuntu.docker
.gitlab-ci.d/containers.yml +0 -5
index cd06d3f5f4..b9b675fdcb 100644
@@ -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:
tests/docker/dockerfiles/ubuntu.docker deleted +0 -71

71 lines not on this page · raw message

Signature · 1 line
2.33.1
#31 lore raw

PATCH v4 14/18 .gitlab-ci.d/cirrus: auto-generate variables with lcitool

In reply to Daniel P. Berrangé

The current Cirrus CI variables files were previously generated by using lcitool. This change wires them up to the refresh script to make that link explicit.

This changes the package list because libvirt-ci now knows about the mapping for dtc on FreeBSD and macOS platforms.

The variables are also now emit in sorted order for stability across runs.

---
 .gitlab-ci.d/cirrus/freebsd-12.vars | 11 +++++++----
 .gitlab-ci.d/cirrus/freebsd-13.vars | 11 +++++++----
 .gitlab-ci.d/cirrus/macos-11.vars   | 11 ++++++-----
 tests/lcitool/refresh               | 10 ++++++++++
 4 files changed, 30 insertions(+), 13 deletions(-)
.gitlab-ci.d/cirrus/freebsd-12.vars +7 -4
index 2099b21354..9c52266811 100644
@@ -2,12 +2,15 @@
 #
 #  $ lcitool variables freebsd-12 qemu
 #
-# https://gitlab.com/libvirt/libvirt-ci/-/commit/c7e275ab27ac0dcd09da290817b9adeea1fd1eb1
+# https://gitlab.com/libvirt/libvirt-ci
 
-PACKAGING_COMMAND='pkg'
 CCACHE='/usr/local/bin/ccache'
+CPAN_PKGS=''
+CROSS_PKGS=''
 MAKE='/usr/local/bin/gmake'
 NINJA='/usr/local/bin/ninja'
-PYTHON='/usr/local/bin/python3'
+PACKAGING_COMMAND='pkg'
 PIP3='/usr/local/bin/pip-3.8'
-PKGS='alsa-lib bash bzip2 ca_root_nss capstone4 ccache cdrkit-genisoimage ctags curl cyrus-sasl dbus diffutils gettext git glib gmake gnutls gsed gtk3 libepoxy libffi libgcrypt libjpeg-turbo libnfs libspice-server libssh libtasn1 libxml2 llvm lttng-ust lzo2 meson ncurses nettle ninja opencv p5-Test-Harness perl5 pixman pkgconf png py38-numpy py38-pillow py38-pip py38-sphinx py38-sphinx_rtd_theme py38-virtualenv py38-yaml python3 rpm2cpio sdl2 sdl2_image snappy spice-protocol tesseract texinfo usbredir virglrenderer vte3 zstd'
+PKGS='alsa-lib bash bzip2 ca_root_nss capstone4 ccache cdrkit-genisoimage ctags curl cyrus-sasl dbus diffutils dtc gettext git glib gmake gnutls gsed gtk3 libepoxy libffi libgcrypt libjpeg-turbo libnfs libspice-server libssh libtasn1 libxml2 llvm lttng-ust lzo2 meson ncurses nettle ninja opencv p5-Test-Harness perl5 pixman pkgconf png py38-numpy py38-pillow py38-pip py38-sphinx py38-sphinx_rtd_theme py38-virtualenv py38-yaml python3 rpm2cpio sdl2 sdl2_image snappy spice-protocol tesseract texinfo usbredir virglrenderer vte3 zstd'
+PYPI_PKGS=''
+PYTHON='/usr/local/bin/python3'
.gitlab-ci.d/cirrus/freebsd-13.vars +7 -4
index 323fe806d5..7b44dba324 100644
@@ -2,12 +2,15 @@
 #
 #  $ lcitool variables freebsd-13 qemu
 #
-# https://gitlab.com/libvirt/libvirt-ci/-/commit/c7e275ab27ac0dcd09da290817b9adeea1fd1eb1
+# https://gitlab.com/libvirt/libvirt-ci
 
-PACKAGING_COMMAND='pkg'
 CCACHE='/usr/local/bin/ccache'
+CPAN_PKGS=''
+CROSS_PKGS=''
 MAKE='/usr/local/bin/gmake'
 NINJA='/usr/local/bin/ninja'
-PYTHON='/usr/local/bin/python3'
+PACKAGING_COMMAND='pkg'
 PIP3='/usr/local/bin/pip-3.8'
-PKGS='alsa-lib bash bzip2 ca_root_nss capstone4 ccache cdrkit-genisoimage ctags curl cyrus-sasl dbus diffutils gettext git glib gmake gnutls gsed gtk3 libepoxy libffi libgcrypt libjpeg-turbo libnfs libspice-server libssh libtasn1 libxml2 llvm lttng-ust lzo2 meson ncurses nettle ninja opencv p5-Test-Harness perl5 pixman pkgconf png py38-numpy py38-pillow py38-pip py38-sphinx py38-sphinx_rtd_theme py38-virtualenv py38-yaml python3 rpm2cpio sdl2 sdl2_image snappy spice-protocol tesseract texinfo usbredir virglrenderer vte3 zstd'
+PKGS='alsa-lib bash bzip2 ca_root_nss capstone4 ccache cdrkit-genisoimage ctags curl cyrus-sasl dbus diffutils dtc gettext git glib gmake gnutls gsed gtk3 libepoxy libffi libgcrypt libjpeg-turbo libnfs libspice-server libssh libtasn1 libxml2 llvm lttng-ust lzo2 meson ncurses nettle ninja opencv p5-Test-Harness perl5 pixman pkgconf png py38-numpy py38-pillow py38-pip py38-sphinx py38-sphinx_rtd_theme py38-virtualenv py38-yaml python3 rpm2cpio sdl2 sdl2_image snappy spice-protocol tesseract texinfo usbredir virglrenderer vte3 zstd'
+PYPI_PKGS=''
+PYTHON='/usr/local/bin/python3'
.gitlab-ci.d/cirrus/macos-11.vars +6 -5
index cbec8a44a3..613d1373c2 100644
@@ -2,14 +2,15 @@
 #
 #  $ lcitool variables macos-11 qemu
 #
-# https://gitlab.com/libvirt/libvirt-ci/-/commit/c7e275ab27ac0dcd09da290817b9adeea1fd1eb1
+# https://gitlab.com/libvirt/libvirt-ci
 
-PACKAGING_COMMAND='brew'
 CCACHE='/usr/local/bin/ccache'
+CPAN_PKGS='Test::Harness'
+CROSS_PKGS=''
 MAKE='/usr/local/bin/gmake'
 NINJA='/usr/local/bin/ninja'
-PYTHON='/usr/local/bin/python3'
+PACKAGING_COMMAND='brew'
 PIP3='/usr/local/bin/pip3'
-PKGS='bash bc bzip2 capstone ccache cpanminus ctags curl dbus diffutils gcovr gettext git glib gnu-sed gnutls gtk+3 jemalloc jpeg-turbo libepoxy libffi libgcrypt libiscsi libnfs libpng libslirp libssh libtasn1 libusb libxml2 llvm lzo make meson ncurses nettle ninja perl pixman pkg-config python3 rpm2cpio sdl2 sdl2_image snappy sparse spice-protocol tesseract texinfo usbredir vde vte3 zlib zstd'
+PKGS='bash bc bzip2 capstone ccache cpanminus ctags curl dbus diffutils dtc gcovr gettext git glib gnu-sed gnutls gtk+3 jemalloc jpeg-turbo libepoxy libffi libgcrypt libiscsi libnfs libpng libslirp libssh libtasn1 libusb libxml2 llvm lzo make meson ncurses nettle ninja perl pixman pkg-config python3 rpm2cpio sdl2 sdl2_image snappy sparse spice-protocol tesseract texinfo usbredir vde vte3 zlib zstd'
 PYPI_PKGS='PyYAML numpy pillow sphinx sphinx-rtd-theme virtualenv'
-CPAN_PKGS='Test::Harness'
+PYTHON='/usr/local/bin/python3'
tests/lcitool/refresh +10 -0
index b8a69cee59..b8cf0a7386 100755
@@ -60,6 +60,11 @@ def generate_dockerfile(host, target, cross=None, trailer=None):
    cmd.extend([target, "qemu"])
    generate(filename, cmd, trailer)
 
+def generate_cirrus(target, trailer=None):
+   filename = Path(src_dir, ".gitlab-ci.d", "cirrus", target + ".vars")
+   cmd = [lcitool_path, "variables", target, "qemu"]
+   generate(filename, cmd, trailer)
+
 ubuntu1804_skipssh = [
    "# https://bugs.launchpad.net/qemu/+bug/1838763\n",
    "ENV QEMU_CONFIGURE_OPTS --disable-libssh\n"
@@ -79,6 +84,11 @@ try:
    generate_dockerfile("ubuntu2004", "ubuntu-2004",
                        trailer="".join(ubuntu2004_tsanhack))
    generate_dockerfile("opensuse-leap", "opensuse-leap-152")
+
+   generate_cirrus("freebsd-12")
+   generate_cirrus("freebsd-13")
+   generate_cirrus("macos-11")
+
    sys.exit(0)
 except Exception as ex:
    print(str(ex), file=sys.stderr)
Signature · 1 line
2.33.1
Reviewed-by on v4 14/18
#32 lore raw

Re: [PATCH v4 14/18] .gitlab-ci.d/cirrus: auto-generate variables with lcitool

Quoted 3 lines · Daniel P. Berrangé

The current Cirrus CI variables files were previously generated by using lcitool. This change wires them up to the refresh script to make that link explicit.

Nice.

Quoted 13 lines

This changes the package list because libvirt-ci now knows about the mapping for dtc on FreeBSD and macOS platforms.

The variables are also now emit in sorted order for stability across runs.

---
 .gitlab-ci.d/cirrus/freebsd-12.vars | 11 +++++++----
 .gitlab-ci.d/cirrus/freebsd-13.vars | 11 +++++++----
 .gitlab-ci.d/cirrus/macos-11.vars   | 11 ++++++-----
 tests/lcitool/refresh               | 10 ++++++++++
 4 files changed, 30 insertions(+), 13 deletions(-)
#33 lore raw

PATCH v4 15/18 tests/docker: updates to alpine package list

In reply to Daniel P. Berrangé

Cleanup the package lists by removing some entries that we don't need to directly reference

binutils: implied by the compiler toolchain
coreutils: not required by QEMU build mesa-egl mesa-gbm: implied by mesa-dev
ninja: alias for samurai package
shadow: not required by QEMU build
util-linux-dev: not directly required by QEMU build

---
 tests/docker/dockerfiles/alpine.docker | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
tests/docker/dockerfiles/alpine.docker +1 -7
index 7e6997e301..5a1808726e 100644
@@ -8,9 +8,7 @@ RUN apk upgrade
 ENV PACKAGES \
 	alsa-lib-dev \
 	bash \
-	binutils \
 	ccache \
-	coreutils \
 	curl-dev \
 	g++ \
 	gcc \
@@ -33,22 +31,18 @@ ENV PACKAGES \
 	lzo-dev \
 	make \
 	mesa-dev \
-	mesa-egl \
-	mesa-gbm \
 	meson \
 	ncurses-dev \
-	ninja \
 	perl \
 	pulseaudio-dev \
 	python3 \
 	py3-sphinx \
 	py3-sphinx_rtd_theme \
-	shadow \
+	samurai \
 	snappy-dev \
 	spice-dev \
 	texinfo \
 	usbredir-dev \
-	util-linux-dev \
 	vde2-dev \
 	virglrenderer-dev \
 	vte3-dev \
Signature · 1 line
2.33.1
Reviewed-by on v4 15/18
#34 lore raw

Re: [PATCH v4 15/18] tests/docker: updates to alpine package list

Quoted 7 lines · Daniel P. Berrangé

Cleanup the package lists by removing some entries that we don't need to directly reference

binutils: implied by the compiler toolchain
coreutils: not required by QEMU build
mesa-egl mesa-gbm: implied by mesa-dev
ninja: alias for samurai package

I'd rather keep the alias to avoid looking for ninja or for what samurai is. Anyhow,

Quoted 7 lines

shadow: not required by QEMU build
util-linux-dev: not directly required by QEMU build

---
 tests/docker/dockerfiles/alpine.docker | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
#35 lore raw

Re: [PATCH v4 15/18] tests/docker: updates to alpine package list

Quoted 11 lines · Philippe Mathieu-Daudé
Quoted 7 lines · Daniel P. Berrangé

Cleanup the package lists by removing some entries that we don't need to directly reference

binutils: implied by the compiler toolchain
coreutils: not required by QEMU build
mesa-egl mesa-gbm: implied by mesa-dev
ninja: alias for samurai package

I'd rather keep the alias to avoid looking for ninja or for what samurai is. Anyhow,

This change was done to align with the package lists that lcitool will generate. In lcitool we always aim to use the canonical package name, rather than any alias, so it is explicit what impl we're using for something.

Quoted 10 lines
Quoted 7 lines

shadow: not required by QEMU build
util-linux-dev: not directly required by QEMU build

---
 tests/docker/dockerfiles/alpine.docker | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
#36 lore raw

Re: [PATCH v4 15/18] tests/docker: updates to alpine package list

Quoted 10 lines · Daniel P. Berrangé
Quoted 9 lines · Philippe Mathieu-Daudé
Quoted 7 lines · Daniel P. Berrangé

Cleanup the package lists by removing some entries that we don't need to directly reference

binutils: implied by the compiler toolchain
coreutils: not required by QEMU build
mesa-egl mesa-gbm: implied by mesa-dev
ninja: alias for samurai package

Quoted 7 lines
Quoted 2 lines

I'd rather keep the alias to avoid looking for ninja or for what samurai is. Anyhow,

This change was done to align with the package lists that lcitool will generate. In lcitool we always aim to use the canonical package name, rather than any alias, so it is explicit what impl we're using for something.

OK then.

Quoted 1 line
Quoted 1 line
#37 lore raw

PATCH v4 16/18 tests/docker: fix sorting of alpine image package lists

In reply to Daniel P. Berrangé

"python" sorts alphabetically after "py3-xxxx"

---
 tests/docker/dockerfiles/alpine.docker | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/docker/dockerfiles/alpine.docker +1 -1
index 5a1808726e..ca4b3b58d2 100644
@@ -35,9 +35,9 @@ ENV PACKAGES \
 	ncurses-dev \
 	perl \
 	pulseaudio-dev \
-	python3 \
 	py3-sphinx \
 	py3-sphinx_rtd_theme \
+	python3 \
 	samurai \
 	snappy-dev \
 	spice-dev \
Signature · 1 line
2.33.1
#39 lore raw

PATCH v4 17/18 tests/docker: fully expand the alpine package list

In reply to Daniel P. Berrangé

Add many extra alpine packages to cover the various optional QEMU build dependancies pulled in by other dockerfiles.

---
 tests/docker/dockerfiles/alpine.docker | 58 +++++++++++++++++++++++++-
 1 file changed, 57 insertions(+), 1 deletion(-)
tests/docker/dockerfiles/alpine.docker +57 -1
index ca4b3b58d2..0ac30c8014 100644
@@ -7,11 +7,29 @@ RUN apk upgrade
 # Please keep this list sorted alphabetically
 ENV PACKAGES \
 	alsa-lib-dev \
+	attr-dev \
 	bash \
+	bc \
+	bzip2 \
+	bzip2-dev \
+	ca-certificates \
+	capstone-dev \
 	ccache \
+	cdrkit \
+	ceph-dev \
+	clang \
+	ctags \
 	curl-dev \
+	cyrus-sasl-dev \
+	dbus \
+	diffutils \
+	dtc-dev \
+	eudev-dev \
+	findutils \
 	g++ \
 	gcc \
+	gcovr \
+	gettext \
 	git \
 	glib-dev \
 	glib-static \
@@ -20,34 +38,72 @@ ENV PACKAGES \
 	libaio-dev \
 	libbpf-dev \
 	libcap-ng-dev \
+	libdrm-dev \
+	libepoxy-dev \
 	libffi-dev \
+	libgcrypt-dev \
 	libjpeg-turbo-dev \
 	libnfs-dev \
 	libpng-dev \
 	libseccomp-dev \
+	libselinux-dev \
+	libslirp-dev \
 	libssh-dev \
+	libtasn1-dev \
+	liburing-dev \
 	libusb-dev \
 	libxml2-dev \
+	linux-pam-dev \
+	llvm11 \
+	lttng-ust-dev \
 	lzo-dev \
 	make \
 	mesa-dev \
 	meson \
+	multipath-tools \
 	ncurses-dev \
+	ndctl-dev \
+	net-tools \
+	nettle-dev \
+	nmap-ncat \
+	numactl-dev \
+	openssh-client \
+	pcre-dev \
 	perl \
+	perl-test-harness \
+	pixman-dev \
+	pkgconf \
 	pulseaudio-dev \
+	py3-numpy \
+	py3-pillow \
+	py3-pip \
 	py3-sphinx \
 	py3-sphinx_rtd_theme \
+	py3-virtualenv \
+	py3-yaml \
 	python3 \
+	rpm2cpio \
 	samurai \
+	sdl2-dev \
+	sdl2_image-dev \
+	sed \
 	snappy-dev \
+	sparse \
 	spice-dev \
+	spice-protocol \
+	tar \
+	tesseract-ocr \
 	texinfo \
 	usbredir-dev \
+	util-linux \
 	vde2-dev \
 	virglrenderer-dev \
 	vte3-dev \
+	which \
+	xen-dev \
 	xfsprogs-dev \
 	zlib-dev \
-	zlib-static
+	zlib-static \
+	zstd-dev
 
 RUN apk add $PACKAGES
Signature · 1 line
2.33.1
Reviewed-by on v4 17/18
#40 lore raw

Re: [PATCH v4 17/18] tests/docker: fully expand the alpine package list

Quoted 2 lines · Daniel P. Berrangé

Add many extra alpine packages to cover the various optional QEMU build dependancies pulled in by other dockerfiles.

Typo "dependencies".

Quoted 4 lines
---
 tests/docker/dockerfiles/alpine.docker | 58 +++++++++++++++++++++++++-
 1 file changed, 57 insertions(+), 1 deletion(-)
#41 lore raw

PATCH v4 18/18 tests/docker: auto-generate alpine.docker with lcitool

In reply to Daniel P. Berrangé

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

---
 tests/docker/dockerfiles/alpine.docker | 225 +++++++++++++------------
 tests/lcitool/refresh                  |   1 +
 2 files changed, 120 insertions(+), 106 deletions(-)
tests/docker/dockerfiles/alpine.docker +119 -106
index 0ac30c8014..97c7a88d1f 100644
@@ -1,109 +1,122 @@
+# THIS FILE WAS AUTO-GENERATED
+#
+#  $ lcitool dockerfile alpine-edge qemu
+#
+# https://gitlab.com/libvirt/libvirt-ci
 
-FROM alpine:edge
+FROM docker.io/library/alpine:edge
 
-RUN apk update
-RUN apk upgrade
+RUN apk update && \
+    apk upgrade && \
+    apk add \
+        alsa-lib-dev \
+        attr-dev \
+        bash \
+        bc \
+        bzip2 \
+        bzip2-dev \
+        ca-certificates \
+        capstone-dev \
+        ccache \
+        cdrkit \
+        ceph-dev \
+        clang \
+        ctags \
+        curl-dev \
+        cyrus-sasl-dev \
+        dbus \
+        diffutils \
+        dtc-dev \
+        eudev-dev \
+        findutils \
+        g++ \
+        gcc \
+        gcovr \
+        gettext \
+        git \
+        glib-dev \
+        glib-static \
+        gnutls-dev \
+        gtk+3.0-dev \
+        libaio-dev \
+        libbpf-dev \
+        libcap-ng-dev \
+        libdrm-dev \
+        libepoxy-dev \
+        libffi-dev \
+        libgcrypt-dev \
+        libjpeg-turbo-dev \
+        libnfs-dev \
+        libpng-dev \
+        libseccomp-dev \
+        libselinux-dev \
+        libslirp-dev \
+        libssh-dev \
+        libtasn1-dev \
+        liburing-dev \
+        libusb-dev \
+        libxml2-dev \
+        linux-pam-dev \
+        llvm11 \
+        lttng-ust-dev \
+        lzo-dev \
+        make \
+        mesa-dev \
+        meson \
+        multipath-tools \
+        ncurses-dev \
+        ndctl-dev \
+        net-tools \
+        nettle-dev \
+        nmap-ncat \
+        numactl-dev \
+        openssh-client \
+        pcre-dev \
+        perl \
+        perl-test-harness \
+        pixman-dev \
+        pkgconf \
+        pulseaudio-dev \
+        py3-numpy \
+        py3-pillow \
+        py3-pip \
+        py3-sphinx \
+        py3-sphinx_rtd_theme \
+        py3-virtualenv \
+        py3-yaml \
+        python3 \
+        rpm2cpio \
+        samurai \
+        sdl2-dev \
+        sdl2_image-dev \
+        sed \
+        snappy-dev \
+        sparse \
+        spice-dev \
+        spice-protocol \
+        tar \
+        tesseract-ocr \
+        texinfo \
+        usbredir-dev \
+        util-linux \
+        vde2-dev \
+        virglrenderer-dev \
+        vte3-dev \
+        which \
+        xen-dev \
+        xfsprogs-dev \
+        zlib-dev \
+        zlib-static \
+        zstd-dev && \
+    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
 
-# Please keep this list sorted alphabetically
-ENV PACKAGES \
-	alsa-lib-dev \
-	attr-dev \
-	bash \
-	bc \
-	bzip2 \
-	bzip2-dev \
-	ca-certificates \
-	capstone-dev \
-	ccache \
-	cdrkit \
-	ceph-dev \
-	clang \
-	ctags \
-	curl-dev \
-	cyrus-sasl-dev \
-	dbus \
-	diffutils \
-	dtc-dev \
-	eudev-dev \
-	findutils \
-	g++ \
-	gcc \
-	gcovr \
-	gettext \
-	git \
-	glib-dev \
-	glib-static \
-	gnutls-dev \
-	gtk+3.0-dev \
-	libaio-dev \
-	libbpf-dev \
-	libcap-ng-dev \
-	libdrm-dev \
-	libepoxy-dev \
-	libffi-dev \
-	libgcrypt-dev \
-	libjpeg-turbo-dev \
-	libnfs-dev \
-	libpng-dev \
-	libseccomp-dev \
-	libselinux-dev \
-	libslirp-dev \
-	libssh-dev \
-	libtasn1-dev \
-	liburing-dev \
-	libusb-dev \
-	libxml2-dev \
-	linux-pam-dev \
-	llvm11 \
-	lttng-ust-dev \
-	lzo-dev \
-	make \
-	mesa-dev \
-	meson \
-	multipath-tools \
-	ncurses-dev \
-	ndctl-dev \
-	net-tools \
-	nettle-dev \
-	nmap-ncat \
-	numactl-dev \
-	openssh-client \
-	pcre-dev \
-	perl \
-	perl-test-harness \
-	pixman-dev \
-	pkgconf \
-	pulseaudio-dev \
-	py3-numpy \
-	py3-pillow \
-	py3-pip \
-	py3-sphinx \
-	py3-sphinx_rtd_theme \
-	py3-virtualenv \
-	py3-yaml \
-	python3 \
-	rpm2cpio \
-	samurai \
-	sdl2-dev \
-	sdl2_image-dev \
-	sed \
-	snappy-dev \
-	sparse \
-	spice-dev \
-	spice-protocol \
-	tar \
-	tesseract-ocr \
-	texinfo \
-	usbredir-dev \
-	util-linux \
-	vde2-dev \
-	virglrenderer-dev \
-	vte3-dev \
-	which \
-	xen-dev \
-	xfsprogs-dev \
-	zlib-dev \
-	zlib-static \
-	zstd-dev
-
-RUN apk add $PACKAGES
+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"
tests/lcitool/refresh +1 -0
index b8cf0a7386..033120e223 100755
@@ -84,6 +84,7 @@ try:
    generate_dockerfile("ubuntu2004", "ubuntu-2004",
                        trailer="".join(ubuntu2004_tsanhack))
    generate_dockerfile("opensuse-leap", "opensuse-leap-152")
+   generate_dockerfile("alpine", "alpine-edge")
 
    generate_cirrus("freebsd-12")
    generate_cirrus("freebsd-13")
Signature · 1 line
2.33.1
Reviewed-by on v4 18/18
#42 lore raw

Re: [PATCH v4 18/18] tests/docker: auto-generate alpine.docker with lcitool

Quoted 7 lines · Daniel P. Berrangé

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

---
 tests/docker/dockerfiles/alpine.docker | 225 +++++++++++++------------
 tests/lcitool/refresh                  |   1 +
 2 files changed, 120 insertions(+), 106 deletions(-)
#43 lore raw
In reply to Daniel P. Berrangé
Quoted 5 lines · Daniel P. Berrangé

One unsolved problem here is that the rebase to Fedora 35 has caused the oss-fuzz job in CI to reliably fail with a timeout. Running locally on F35 the fuzz script never finishes even after 24 hours. There's a genuine problem hiding in there in the tests or code itself, that newer clang has likely exposed.

Well something has changed in the last month - either Fedora 35 got some fixes or something in QEMU got fixed. The oss-fuzz jobs now pass on Fedora 35 reliably both locally and in CI.

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|