[PATCH v2 00/10] Big CI update (and some bug fixes)

v2 of: https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/thread/MMENB... diff to v1: - Juggled some patches around, namely: squashed Fedora and AlmaLinux drop & reintroduction patches, reordered some for easier review. - Switched website job to AlmaLinux 9 - Enhanced commit message on the last commit to explain seemingly unrelated changes. Example of green pipeline: https://gitlab.com/MichalPrivoznik/libvirt/-/pipelines/1281843566 Michal Prívozník (10): domaincapsmock: Drop link time dependency on virQEMUCapsGet() qemuxml2argvmock: Drop link time dependency on qemuFDPassDirectNew() testutilsqemu: Don't leak struct testQemuArgs::vdpafds security: Fix return types of .probe callbacks meson: Disable -fsanitize=function ci: Switch from AlmaLinux 8 to AlmaLinux 9 ci: Switch from Fedora 38 to Fedora 40 ci: Drop Ubuntu 20.04 meson: Bump glib version to 2.58.0 ci: Introduce Ubuntu 24.04 .gitlab-ci.yml | 6 +- .../{almalinux-8.sh => almalinux-9.sh} | 8 +- ci/buildenv/centos-stream-9.sh | 1 + ci/buildenv/debian-12-cross-aarch64.sh | 1 + ci/buildenv/debian-12-cross-armv6l.sh | 1 + ci/buildenv/debian-12-cross-armv7l.sh | 1 + ci/buildenv/debian-12-cross-i686.sh | 1 + ci/buildenv/debian-12-cross-mips64el.sh | 1 + ci/buildenv/debian-12-cross-mipsel.sh | 1 + ci/buildenv/debian-12-cross-ppc64le.sh | 1 + ci/buildenv/debian-12-cross-s390x.sh | 1 + ci/buildenv/debian-12.sh | 1 + ci/buildenv/debian-sid-cross-aarch64.sh | 1 + ci/buildenv/debian-sid-cross-armv6l.sh | 1 + ci/buildenv/debian-sid-cross-armv7l.sh | 1 + ci/buildenv/debian-sid-cross-i686.sh | 1 + ci/buildenv/debian-sid-cross-mips64el.sh | 1 + ci/buildenv/debian-sid-cross-ppc64le.sh | 1 + ci/buildenv/debian-sid-cross-s390x.sh | 1 + ci/buildenv/debian-sid.sh | 1 + ci/buildenv/fedora-39.sh | 1 + ...-mingw32.sh => fedora-40-cross-mingw32.sh} | 1 + ...-mingw64.sh => fedora-40-cross-mingw64.sh} | 1 + ci/buildenv/{fedora-38.sh => fedora-40.sh} | 1 + ci/buildenv/fedora-rawhide-cross-mingw32.sh | 1 + ci/buildenv/fedora-rawhide-cross-mingw64.sh | 1 + ci/buildenv/fedora-rawhide.sh | 1 + .../{ubuntu-2004.sh => ubuntu-2404.sh} | 8 +- ...ux-8.Dockerfile => almalinux-9.Dockerfile} | 10 +- ci/containers/centos-stream-9.Dockerfile | 1 + .../debian-12-cross-aarch64.Dockerfile | 1 + .../debian-12-cross-armv6l.Dockerfile | 1 + .../debian-12-cross-armv7l.Dockerfile | 1 + ci/containers/debian-12-cross-i686.Dockerfile | 1 + .../debian-12-cross-mips64el.Dockerfile | 1 + .../debian-12-cross-mipsel.Dockerfile | 1 + .../debian-12-cross-ppc64le.Dockerfile | 1 + .../debian-12-cross-s390x.Dockerfile | 1 + ci/containers/debian-12.Dockerfile | 1 + .../debian-sid-cross-aarch64.Dockerfile | 1 + .../debian-sid-cross-armv6l.Dockerfile | 1 + .../debian-sid-cross-armv7l.Dockerfile | 1 + .../debian-sid-cross-i686.Dockerfile | 1 + .../debian-sid-cross-mips64el.Dockerfile | 1 + .../debian-sid-cross-ppc64le.Dockerfile | 1 + .../debian-sid-cross-s390x.Dockerfile | 1 + ci/containers/debian-sid.Dockerfile | 1 + ci/containers/fedora-39.Dockerfile | 1 + ...ile => fedora-40-cross-mingw32.Dockerfile} | 3 +- ...ile => fedora-40-cross-mingw64.Dockerfile} | 3 +- ...ora-38.Dockerfile => fedora-40.Dockerfile} | 3 +- .../fedora-rawhide-cross-mingw32.Dockerfile | 1 + .../fedora-rawhide-cross-mingw64.Dockerfile | 1 + ci/containers/fedora-rawhide.Dockerfile | 1 + ...2004.Dockerfile => ubuntu-2404.Dockerfile} | 11 +- ci/gitlab/builds.yml | 113 ++++++++-------- ci/gitlab/containers.yml | 54 ++++---- ci/integration.yml | 24 ---- ci/lcitool/projects/libvirt.yml | 1 + ci/manifest.yml | 40 +++--- meson.build | 15 ++- src/libvirt_private.syms | 1 - src/security/security_apparmor.c | 2 +- src/security/security_selinux.c | 2 +- src/util/glibcompat.c | 125 ------------------ src/util/glibcompat.h | 10 -- tests/domaincapsmock.c | 13 +- tests/qemuxml2argvmock.c | 8 +- tests/testutilsqemu.c | 1 + 69 files changed, 203 insertions(+), 305 deletions(-) rename ci/buildenv/{almalinux-8.sh => almalinux-9.sh} (93%) rename ci/buildenv/{fedora-38-cross-mingw32.sh => fedora-40-cross-mingw32.sh} (98%) rename ci/buildenv/{fedora-38-cross-mingw64.sh => fedora-40-cross-mingw64.sh} (98%) rename ci/buildenv/{fedora-38.sh => fedora-40.sh} (99%) rename ci/buildenv/{ubuntu-2004.sh => ubuntu-2404.sh} (94%) rename ci/containers/{almalinux-8.Dockerfile => almalinux-9.Dockerfile} (91%) rename ci/containers/{fedora-38-cross-mingw32.Dockerfile => fedora-40-cross-mingw32.Dockerfile} (97%) rename ci/containers/{fedora-38-cross-mingw64.Dockerfile => fedora-40-cross-mingw64.Dockerfile} (97%) rename ci/containers/{fedora-38.Dockerfile => fedora-40.Dockerfile} (97%) rename ci/containers/{ubuntu-2004.Dockerfile => ubuntu-2404.Dockerfile} (93%) -- 2.43.2

While Linux linker has no trouble resolving the symbols, valgrind does. It has probably something to do with the fact that we don't tell what symbols to export from mock libraries. Anyway, just resolve the symbol at runtime. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> --- tests/domaincapsmock.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tests/domaincapsmock.c b/tests/domaincapsmock.c index 6ae0c4ad45..73ff992ebd 100644 --- a/tests/domaincapsmock.c +++ b/tests/domaincapsmock.c @@ -49,16 +49,19 @@ virHostCPUGetPhysAddrSize(const virArch hostArch, #if WITH_QEMU static bool (*real_virQEMUCapsGetKVMSupportsSecureGuest)(virQEMUCaps *qemuCaps); +static bool (*real_virQEMUCapsGet)(virQEMUCaps *qemuCaps, virQEMUCapsFlags flag); bool virQEMUCapsGetKVMSupportsSecureGuest(virQEMUCaps *qemuCaps) { - if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_MACHINE_CONFIDENTAL_GUEST_SUPPORT) && - virQEMUCapsGet(qemuCaps, QEMU_CAPS_S390_PV_GUEST)) - return true; - - if (!real_virQEMUCapsGetKVMSupportsSecureGuest) + if (!real_virQEMUCapsGet) { + VIR_MOCK_REAL_INIT(virQEMUCapsGet); VIR_MOCK_REAL_INIT(virQEMUCapsGetKVMSupportsSecureGuest); + } + + if (real_virQEMUCapsGet(qemuCaps, QEMU_CAPS_MACHINE_CONFIDENTAL_GUEST_SUPPORT) && + real_virQEMUCapsGet(qemuCaps, QEMU_CAPS_S390_PV_GUEST)) + return true; return real_virQEMUCapsGetKVMSupportsSecureGuest(qemuCaps); } -- 2.43.2

While Linux linker has no trouble resolving the symbols, valgrind does. It has probably something to do with the fact that we don't tell what symbols to export from mock libraries. Anyway, just resolve the symbol at runtime. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> --- tests/qemuxml2argvmock.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/qemuxml2argvmock.c b/tests/qemuxml2argvmock.c index 9cc97199c4..7bcad7284d 100644 --- a/tests/qemuxml2argvmock.c +++ b/tests/qemuxml2argvmock.c @@ -40,6 +40,8 @@ #define VIR_FROM_THIS VIR_FROM_NONE +static qemuFDPassDirect * (*real_qemuFDPassDirectNew)(const char *name, int *fd); + long virGetSystemPageSize(void) { return 4096; @@ -212,6 +214,10 @@ qemuInterfaceOpenVhostNet(virDomainObj *vm G_GNUC_UNUSED, size_t vhostfdSize = net->driver.virtio.queues; size_t i; + if (!real_qemuFDPassDirectNew) { + VIR_MOCK_REAL_INIT(qemuFDPassDirectNew); + } + if (!vhostfdSize) vhostfdSize = 1; @@ -222,7 +228,7 @@ qemuInterfaceOpenVhostNet(virDomainObj *vm G_GNUC_UNUSED, g_autofree char *name = g_strdup_printf("vhostfd-%s%zu", net->info.alias, i); int fd = STDERR_FILENO + 42 + i; - netpriv->vhostfds = g_slist_prepend(netpriv->vhostfds, qemuFDPassDirectNew(name, &fd)); + netpriv->vhostfds = g_slist_prepend(netpriv->vhostfds, real_qemuFDPassDirectNew(name, &fd)); } netpriv->vhostfds = g_slist_reverse(netpriv->vhostfds); -- 2.43.2

Allocated in testQemuInfoSetArgs(), the vdpafds member of testQemuArgs is never freed. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> --- tests/testutilsqemu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/testutilsqemu.c b/tests/testutilsqemu.c index 9c12a165b1..d70850cb5d 100644 --- a/tests/testutilsqemu.c +++ b/tests/testutilsqemu.c @@ -966,6 +966,7 @@ testQemuInfoFree(testQemuInfo *info) g_clear_pointer(&info->args.fakeCapsAdd, virBitmapFree); g_clear_pointer(&info->args.fakeCapsDel, virBitmapFree); g_clear_pointer(&info->args.fds, g_hash_table_unref); + g_clear_pointer(&info->args.vdpafds, g_hash_table_unref); g_clear_object(&info->nbdkitCaps); g_clear_pointer(&info->args.fakeNbdkitCaps, virBitmapFree); g_free(info); -- 2.43.2

The .probe member of virSecurityDriver struct is declared to return virSecurityDriverStatus enum. But there are two instances (AppArmorSecurityManagerProbe() and virSecuritySELinuxDriverProbe()) where callbacks are defined to return an integer. This is an undefined behavior because integer has strictly bigger space of possible values than the enum. Defined those aforementioned callbacks so that they return the correct enum instead of int. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> --- src/security/security_apparmor.c | 2 +- src/security/security_selinux.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/security/security_apparmor.c b/src/security/security_apparmor.c index c1dc859751..27184aef7f 100644 --- a/src/security/security_apparmor.c +++ b/src/security/security_apparmor.c @@ -315,7 +315,7 @@ AppArmorSetSecurityHostLabel(virSCSIVHostDevice *dev G_GNUC_UNUSED, } /* Called on libvirtd startup to see if AppArmor is available */ -static int +static virSecurityDriverStatus AppArmorSecurityManagerProbe(const char *virtDriver G_GNUC_UNUSED) { g_autofree char *template_qemu = NULL; diff --git a/src/security/security_selinux.c b/src/security/security_selinux.c index aaec34ff8b..e29f627bc2 100644 --- a/src/security/security_selinux.c +++ b/src/security/security_selinux.c @@ -1039,7 +1039,7 @@ virSecuritySELinuxReserveLabel(virSecurityManager *mgr, } -static int +static virSecurityDriverStatus virSecuritySELinuxDriverProbe(const char *virtDriver) { if (is_selinux_enabled() <= 0) -- 2.43.2

Strictly speaking, xdrproc_t is declared as following: typedef bool_t (*xdrproc_t)(XDR *, ...); But our rpcgen generates properly typed functions, e.g.: bool_t xdr_virNetMessageError(XDR *xdrs, virNetMessageError *objp) Now, these functions of ours are passed around as callbacks (via an argument of xdrproc_t type), for instance in virNetMessageEncodePayload(). But these two types are strictly different. We silence the compiler by typecasting the callbacks when passing them, but strictly speaking - calling such callback later, when a function of xdrproc_t is expected is an undefined behavior. Ideally, we would fix our rpcgen to generate proper function headers, but: a) my brain is too small to do that, and b) we would lose compiler protection if an xdr_*() function is called directly but argument of a wrong type is passed. Silence UBSAN for now. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> --- meson.build | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/meson.build b/meson.build index e8b0094b91..cb374ab118 100644 --- a/meson.build +++ b/meson.build @@ -438,6 +438,19 @@ if cc.get_id() == 'clang' cc_flags += [ '-fsemantic-interposition' ] endif +if get_option('b_sanitize') != 'none' + # This is needed because of xdrproc_t. It's declared as a pointer to a + # function with variable arguments. But for catching type related problems at + # compile time, our rpcgen generates functions with proper types, say: + # + # bool_t xdr_TestEnum(XDR *, TestEnum *); + # + # But passing xdr_TestEnum as a callback where xdrproc_t type is expected is + # undefined behavior. Yet, we want the comfort of compile time checks, so + # just disable the sanitizer warning for now. It's a big hammer though. + cc_flags += [ '-fno-sanitize=function' ] +endif + supported_cc_flags = [] if get_option('warning_level') == '2' supported_cc_flags = cc.get_supported_arguments(cc_flags) -- 2.43.2

By the time of release, it's going to be more than two years since AlmaLinux 9 was released and per our support policy, AlmaLinux 8 (the previous major release) will be not supported. Switch from AlmaLinux 8 to AlmaLinux 9. This also means the website_job which depends on AlmaLinux 8 needs to be moved to newer AlmaLinux. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> --- .gitlab-ci.yml | 6 +++--- ci/buildenv/{almalinux-8.sh => almalinux-9.sh} | 8 +++----- ...linux-8.Dockerfile => almalinux-9.Dockerfile} | 10 ++++------ ci/gitlab/builds.yml | 16 ++++++++-------- ci/gitlab/containers.yml | 4 ++-- ci/manifest.yml | 2 +- 6 files changed, 21 insertions(+), 25 deletions(-) rename ci/buildenv/{almalinux-8.sh => almalinux-9.sh} (93%) rename ci/containers/{almalinux-8.Dockerfile => almalinux-9.Dockerfile} (91%) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b879b88f74..81ac2ecddd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -67,7 +67,7 @@ include: website_job: extends: .gitlab_native_build_job needs: - - job: x86_64-almalinux-8-container + - job: x86_64-almalinux-9-container optional: true script: - source ci/jobs.sh @@ -83,8 +83,8 @@ website_job: paths: - website variables: - NAME: almalinux-8 - TARGET_BASE_IMAGE: docker.io/library/almalinux:8 + NAME: almalinux-9 + TARGET_BASE_IMAGE: docker.io/library/almalinux:9 # On push to master publish the website from 'website_job' via gitlab pages pages: diff --git a/ci/buildenv/almalinux-8.sh b/ci/buildenv/almalinux-9.sh similarity index 93% rename from ci/buildenv/almalinux-8.sh rename to ci/buildenv/almalinux-9.sh index a962576414..f0826e1313 100644 --- a/ci/buildenv/almalinux-8.sh +++ b/ci/buildenv/almalinux-9.sh @@ -7,8 +7,7 @@ function install_buildenv() { 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 config-manager --set-enabled -y crb dnf install -y epel-release dnf install -y \ audit-libs-devel \ @@ -17,6 +16,7 @@ function install_buildenv() { ca-certificates \ ccache \ clang \ + clang-devel \ cpp \ cyrus-sasl-devel \ device-mapper-devel \ @@ -31,7 +31,6 @@ function install_buildenv() { glib2-devel \ glibc-devel \ glibc-langpack-en \ - glusterfs-api-devel \ gnutls-devel \ grep \ iproute \ @@ -61,13 +60,12 @@ function install_buildenv() { lvm2 \ make \ meson \ - netcf-devel \ nfs-utils \ ninja-build \ numactl-devel \ numad \ parted-devel \ - perl \ + perl-base \ pkgconfig \ polkit \ python3 \ diff --git a/ci/containers/almalinux-8.Dockerfile b/ci/containers/almalinux-9.Dockerfile similarity index 91% rename from ci/containers/almalinux-8.Dockerfile rename to ci/containers/almalinux-9.Dockerfile index af8a7b24d4..68608b12a9 100644 --- a/ci/containers/almalinux-8.Dockerfile +++ b/ci/containers/almalinux-9.Dockerfile @@ -4,12 +4,11 @@ # # https://gitlab.com/libvirt/libvirt-ci -FROM docker.io/library/almalinux:8 +FROM docker.io/library/almalinux:9 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 config-manager --set-enabled -y crb && \ dnf install -y epel-release && \ dnf install -y \ audit-libs-devel \ @@ -18,6 +17,7 @@ RUN dnf update -y && \ ca-certificates \ ccache \ clang \ + clang-devel \ cpp \ cyrus-sasl-devel \ device-mapper-devel \ @@ -32,7 +32,6 @@ RUN dnf update -y && \ glib2-devel \ glibc-devel \ glibc-langpack-en \ - glusterfs-api-devel \ gnutls-devel \ grep \ iproute \ @@ -62,13 +61,12 @@ RUN dnf update -y && \ lvm2 \ make \ meson \ - netcf-devel \ nfs-utils \ ninja-build \ numactl-devel \ numad \ parted-devel \ - perl \ + perl-base \ pkgconfig \ polkit \ python3 \ diff --git a/ci/gitlab/builds.yml b/ci/gitlab/builds.yml index 1629e02525..6ed5c578dd 100644 --- a/ci/gitlab/builds.yml +++ b/ci/gitlab/builds.yml @@ -7,30 +7,30 @@ # Native build jobs -x86_64-almalinux-8: +x86_64-almalinux-9: extends: .native_build_job needs: - - job: x86_64-almalinux-8-container + - job: x86_64-almalinux-9-container optional: true allow_failure: false variables: JOB_OPTIONAL: 1 - NAME: almalinux-8 + NAME: almalinux-9 RPM: skip - TARGET_BASE_IMAGE: docker.io/library/almalinux:8 + TARGET_BASE_IMAGE: docker.io/library/almalinux:9 -x86_64-almalinux-8-clang: +x86_64-almalinux-9-clang: extends: .native_build_job needs: - - job: x86_64-almalinux-8-container + - job: x86_64-almalinux-9-container optional: true allow_failure: false variables: CC: clang - NAME: almalinux-8 + NAME: almalinux-9 RPM: skip - TARGET_BASE_IMAGE: docker.io/library/almalinux:8 + TARGET_BASE_IMAGE: docker.io/library/almalinux:9 x86_64-alpine-319: diff --git a/ci/gitlab/containers.yml b/ci/gitlab/containers.yml index b7ae60b10a..c1e7a0a67e 100644 --- a/ci/gitlab/containers.yml +++ b/ci/gitlab/containers.yml @@ -7,11 +7,11 @@ # Native container jobs -x86_64-almalinux-8-container: +x86_64-almalinux-9-container: extends: .container_job allow_failure: false variables: - NAME: almalinux-8 + NAME: almalinux-9 x86_64-alpine-319-container: diff --git a/ci/manifest.yml b/ci/manifest.yml index 84d31866fc..ab1a2cff30 100644 --- a/ci/manifest.yml +++ b/ci/manifest.yml @@ -6,7 +6,7 @@ gitlab: project: libvirt targets: - almalinux-8: + almalinux-9: jobs: - arch: x86_64 builds: false -- 2.43.2

Since Fedora 40 was released recently, Fedora 38 is now unsupported. Drop Fedora 38 and introduce Fedora 40 to our CI. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> --- ...-mingw32.sh => fedora-40-cross-mingw32.sh} | 0 ...-mingw64.sh => fedora-40-cross-mingw64.sh} | 0 ci/buildenv/{fedora-38.sh => fedora-40.sh} | 0 ...ile => fedora-40-cross-mingw32.Dockerfile} | 2 +- ...ile => fedora-40-cross-mingw64.Dockerfile} | 2 +- ...ora-38.Dockerfile => fedora-40.Dockerfile} | 2 +- ci/gitlab/builds.yml | 46 +++++++++---------- ci/gitlab/containers.yml | 22 ++++----- ci/integration.yml | 24 ---------- ci/manifest.yml | 26 +++++------ 10 files changed, 50 insertions(+), 74 deletions(-) rename ci/buildenv/{fedora-38-cross-mingw32.sh => fedora-40-cross-mingw32.sh} (100%) rename ci/buildenv/{fedora-38-cross-mingw64.sh => fedora-40-cross-mingw64.sh} (100%) rename ci/buildenv/{fedora-38.sh => fedora-40.sh} (100%) rename ci/containers/{fedora-38-cross-mingw32.Dockerfile => fedora-40-cross-mingw32.Dockerfile} (98%) rename ci/containers/{fedora-38-cross-mingw64.Dockerfile => fedora-40-cross-mingw64.Dockerfile} (98%) rename ci/containers/{fedora-38.Dockerfile => fedora-40.Dockerfile} (98%) diff --git a/ci/buildenv/fedora-38-cross-mingw32.sh b/ci/buildenv/fedora-40-cross-mingw32.sh similarity index 100% rename from ci/buildenv/fedora-38-cross-mingw32.sh rename to ci/buildenv/fedora-40-cross-mingw32.sh diff --git a/ci/buildenv/fedora-38-cross-mingw64.sh b/ci/buildenv/fedora-40-cross-mingw64.sh similarity index 100% rename from ci/buildenv/fedora-38-cross-mingw64.sh rename to ci/buildenv/fedora-40-cross-mingw64.sh diff --git a/ci/buildenv/fedora-38.sh b/ci/buildenv/fedora-40.sh similarity index 100% rename from ci/buildenv/fedora-38.sh rename to ci/buildenv/fedora-40.sh diff --git a/ci/containers/fedora-38-cross-mingw32.Dockerfile b/ci/containers/fedora-40-cross-mingw32.Dockerfile similarity index 98% rename from ci/containers/fedora-38-cross-mingw32.Dockerfile rename to ci/containers/fedora-40-cross-mingw32.Dockerfile index 54eb714505..9721481171 100644 --- a/ci/containers/fedora-38-cross-mingw32.Dockerfile +++ b/ci/containers/fedora-40-cross-mingw32.Dockerfile @@ -4,7 +4,7 @@ # # https://gitlab.com/libvirt/libvirt-ci -FROM registry.fedoraproject.org/fedora:38 +FROM registry.fedoraproject.org/fedora:40 RUN dnf install -y nosync && \ printf '#!/bin/sh\n\ diff --git a/ci/containers/fedora-38-cross-mingw64.Dockerfile b/ci/containers/fedora-40-cross-mingw64.Dockerfile similarity index 98% rename from ci/containers/fedora-38-cross-mingw64.Dockerfile rename to ci/containers/fedora-40-cross-mingw64.Dockerfile index 7578805c02..f25012abb6 100644 --- a/ci/containers/fedora-38-cross-mingw64.Dockerfile +++ b/ci/containers/fedora-40-cross-mingw64.Dockerfile @@ -4,7 +4,7 @@ # # https://gitlab.com/libvirt/libvirt-ci -FROM registry.fedoraproject.org/fedora:38 +FROM registry.fedoraproject.org/fedora:40 RUN dnf install -y nosync && \ printf '#!/bin/sh\n\ diff --git a/ci/containers/fedora-38.Dockerfile b/ci/containers/fedora-40.Dockerfile similarity index 98% rename from ci/containers/fedora-38.Dockerfile rename to ci/containers/fedora-40.Dockerfile index fe06346cc6..32a9cdae12 100644 --- a/ci/containers/fedora-38.Dockerfile +++ b/ci/containers/fedora-40.Dockerfile @@ -4,7 +4,7 @@ # # https://gitlab.com/libvirt/libvirt-ci -FROM registry.fedoraproject.org/fedora:38 +FROM registry.fedoraproject.org/fedora:40 RUN dnf install -y nosync && \ printf '#!/bin/sh\n\ diff --git a/ci/gitlab/builds.yml b/ci/gitlab/builds.yml index 6ed5c578dd..7edb0d0712 100644 --- a/ci/gitlab/builds.yml +++ b/ci/gitlab/builds.yml @@ -127,21 +127,6 @@ x86_64-debian-sid: TARGET_BASE_IMAGE: docker.io/library/debian:sid-slim -x86_64-fedora-38: - extends: .native_build_job - needs: - - job: x86_64-fedora-38-container - optional: true - allow_failure: false - variables: - NAME: fedora-38 - TARGET_BASE_IMAGE: registry.fedoraproject.org/fedora:38 - artifacts: - expire_in: 1 day - paths: - - libvirt-rpms - - x86_64-fedora-39: extends: .native_build_job needs: @@ -157,6 +142,21 @@ x86_64-fedora-39: - libvirt-rpms +x86_64-fedora-40: + extends: .native_build_job + needs: + - job: x86_64-fedora-40-container + optional: true + allow_failure: false + variables: + NAME: fedora-40 + TARGET_BASE_IMAGE: registry.fedoraproject.org/fedora:40 + artifacts: + expire_in: 1 day + paths: + - libvirt-rpms + + x86_64-fedora-rawhide: extends: .native_build_job needs: @@ -547,29 +547,29 @@ s390x-debian-sid: TARGET_BASE_IMAGE: docker.io/library/debian:sid-slim -mingw32-fedora-38: +mingw32-fedora-40: extends: .cross_build_job needs: - - job: mingw32-fedora-38-container + - job: mingw32-fedora-40-container optional: true allow_failure: false variables: CROSS: mingw32 JOB_OPTIONAL: 1 - NAME: fedora-38 - TARGET_BASE_IMAGE: registry.fedoraproject.org/fedora:38 + NAME: fedora-40 + TARGET_BASE_IMAGE: registry.fedoraproject.org/fedora:40 -mingw64-fedora-38: +mingw64-fedora-40: extends: .cross_build_job needs: - - job: mingw64-fedora-38-container + - job: mingw64-fedora-40-container optional: true allow_failure: false variables: CROSS: mingw64 - NAME: fedora-38 - TARGET_BASE_IMAGE: registry.fedoraproject.org/fedora:38 + NAME: fedora-40 + TARGET_BASE_IMAGE: registry.fedoraproject.org/fedora:40 mingw32-fedora-rawhide: diff --git a/ci/gitlab/containers.yml b/ci/gitlab/containers.yml index c1e7a0a67e..fb153a1234 100644 --- a/ci/gitlab/containers.yml +++ b/ci/gitlab/containers.yml @@ -57,13 +57,6 @@ x86_64-debian-sid-container: NAME: debian-sid -x86_64-fedora-38-container: - extends: .container_job - allow_failure: false - variables: - NAME: fedora-38 - - x86_64-fedora-39-container: extends: .container_job allow_failure: false @@ -71,6 +64,13 @@ x86_64-fedora-39-container: NAME: fedora-39 +x86_64-fedora-40-container: + extends: .container_job + allow_failure: false + variables: + NAME: fedora-40 + + x86_64-fedora-rawhide-container: extends: .container_job allow_failure: true @@ -292,19 +292,19 @@ s390x-debian-sid-container: NAME: debian-sid-cross-s390x -mingw32-fedora-38-container: +mingw32-fedora-40-container: extends: .container_job allow_failure: false variables: JOB_OPTIONAL: 1 - NAME: fedora-38-cross-mingw32 + NAME: fedora-40-cross-mingw32 -mingw64-fedora-38-container: +mingw64-fedora-40-container: extends: .container_job allow_failure: false variables: - NAME: fedora-38-cross-mingw64 + NAME: fedora-40-cross-mingw64 mingw32-fedora-rawhide-container: diff --git a/ci/integration.yml b/ci/integration.yml index d3859c54e8..2fc8d02956 100644 --- a/ci/integration.yml +++ b/ci/integration.yml @@ -25,30 +25,6 @@ centos-stream-9-tests: ref: master artifacts: true -# NOTE The integration tests use artifacts produced by the libvirt-perl -# and libvirt-python CI jobs, so the new target needs to be introduced -# there before it can be used here. The VM template for the target -# also needs to be created on the runner host. -fedora-38-tests: - extends: .integration_tests - variables: - # needed by libvirt-gitlab-executor - DISTRO: fedora-38 - # can be overridden in forks to set a different runner tag - LIBVIRT_CI_INTEGRATION_RUNNER_TAG: redhat-vm-host - tags: - - $LIBVIRT_CI_INTEGRATION_RUNNER_TAG - needs: - - x86_64-fedora-38 - - project: libvirt/libvirt-perl - job: x86_64-fedora-38 - ref: master - artifacts: true - - project: libvirt/libvirt-python - job: x86_64-fedora-38 - ref: master - artifacts: true - # NOTE The integration tests use artifacts produced by the libvirt-perl # and libvirt-python CI jobs, so the new target needs to be introduced # there before it can be used here. The VM template for the target diff --git a/ci/manifest.yml b/ci/manifest.yml index ab1a2cff30..e78d81f1f4 100644 --- a/ci/manifest.yml +++ b/ci/manifest.yml @@ -144,19 +144,6 @@ targets: containers: false builds: false - fedora-38: - jobs: - - arch: x86_64 - artifacts: - expire_in: 1 day - paths: - - libvirt-rpms - - - arch: mingw32 - builds: false - - - arch: mingw64 - fedora-39: jobs: - arch: x86_64 @@ -165,6 +152,19 @@ targets: paths: - libvirt-rpms + fedora-40: + jobs: + - arch: x86_64 + artifacts: + expire_in: 1 day + paths: + - libvirt-rpms + + - arch: mingw32 + builds: false + + - arch: mingw64 + fedora-rawhide: jobs: - arch: x86_64 -- 2.43.2

It's now more than two years since Ubuntu 22.04 was released and per our support policy, Ubuntu 20.04 (the previous major release) is now not supported. Remove it from our CI testing. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> --- ci/buildenv/ubuntu-2004.sh | 103 -------------------------- ci/containers/ubuntu-2004.Dockerfile | 107 --------------------------- ci/gitlab/builds.yml | 28 ++----- ci/gitlab/containers.yml | 21 ++---- ci/manifest.yml | 8 -- 5 files changed, 14 insertions(+), 253 deletions(-) delete mode 100644 ci/buildenv/ubuntu-2004.sh delete mode 100644 ci/containers/ubuntu-2004.Dockerfile diff --git a/ci/buildenv/ubuntu-2004.sh b/ci/buildenv/ubuntu-2004.sh deleted file mode 100644 index e001fcf012..0000000000 --- a/ci/buildenv/ubuntu-2004.sh +++ /dev/null @@ -1,103 +0,0 @@ -# THIS FILE WAS AUTO-GENERATED -# -# $ lcitool manifest ci/manifest.yml -# -# https://gitlab.com/libvirt/libvirt-ci - -function install_buildenv() { - export DEBIAN_FRONTEND=noninteractive - apt-get update - apt-get dist-upgrade -y - apt-get install --no-install-recommends -y \ - augeas-lenses \ - augeas-tools \ - bash-completion \ - black \ - ca-certificates \ - ccache \ - clang \ - codespell \ - cpp \ - diffutils \ - dwarves \ - ebtables \ - flake8 \ - gcc \ - gettext \ - git \ - grep \ - iproute2 \ - iptables \ - kmod \ - libacl1-dev \ - libapparmor-dev \ - libattr1-dev \ - libaudit-dev \ - libblkid-dev \ - libc6-dev \ - libcap-ng-dev \ - libcurl4-gnutls-dev \ - libdevmapper-dev \ - libfuse-dev \ - libglib2.0-dev \ - libglusterfs-dev \ - libgnutls28-dev \ - libiscsi-dev \ - libnetcf-dev \ - libnl-3-dev \ - libnl-route-3-dev \ - libnuma-dev \ - libopenwsman-dev \ - libparted-dev \ - libpcap0.8-dev \ - libpciaccess-dev \ - librbd-dev \ - libreadline-dev \ - libsanlock-dev \ - libsasl2-dev \ - libselinux1-dev \ - libssh-dev \ - libssh2-1-dev \ - libtirpc-dev \ - libudev-dev \ - libxen-dev \ - libxml2-dev \ - libxml2-utils \ - libyajl-dev \ - locales \ - lvm2 \ - make \ - nfs-common \ - ninja-build \ - numad \ - open-iscsi \ - perl-base \ - pkgconf \ - policykit-1 \ - python3 \ - python3-docutils \ - python3-pip \ - python3-pytest \ - python3-setuptools \ - python3-wheel \ - qemu-utils \ - sed \ - systemtap-sdt-dev \ - wireshark-dev \ - xsltproc - sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen - dpkg-reconfigure locales - rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED - 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/cc - ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/clang - ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc - /usr/bin/pip3 install meson==0.56.0 -} - -export CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers" -export LANG="en_US.UTF-8" -export MAKE="/usr/bin/make" -export NINJA="/usr/bin/ninja" -export PYTHON="/usr/bin/python3" diff --git a/ci/containers/ubuntu-2004.Dockerfile b/ci/containers/ubuntu-2004.Dockerfile deleted file mode 100644 index b43b85873e..0000000000 --- a/ci/containers/ubuntu-2004.Dockerfile +++ /dev/null @@ -1,107 +0,0 @@ -# THIS FILE WAS AUTO-GENERATED -# -# $ lcitool manifest ci/manifest.yml -# -# https://gitlab.com/libvirt/libvirt-ci - -FROM docker.io/library/ubuntu:20.04 - -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 \ - augeas-lenses \ - augeas-tools \ - bash-completion \ - black \ - ca-certificates \ - ccache \ - clang \ - codespell \ - cpp \ - diffutils \ - dwarves \ - ebtables \ - flake8 \ - gcc \ - gettext \ - git \ - grep \ - iproute2 \ - iptables \ - kmod \ - libacl1-dev \ - libapparmor-dev \ - libattr1-dev \ - libaudit-dev \ - libblkid-dev \ - libc6-dev \ - libcap-ng-dev \ - libcurl4-gnutls-dev \ - libdevmapper-dev \ - libfuse-dev \ - libglib2.0-dev \ - libglusterfs-dev \ - libgnutls28-dev \ - libiscsi-dev \ - libnetcf-dev \ - libnl-3-dev \ - libnl-route-3-dev \ - libnuma-dev \ - libopenwsman-dev \ - libparted-dev \ - libpcap0.8-dev \ - libpciaccess-dev \ - librbd-dev \ - libreadline-dev \ - libsanlock-dev \ - libsasl2-dev \ - libselinux1-dev \ - libssh-dev \ - libssh2-1-dev \ - libtirpc-dev \ - libudev-dev \ - libxen-dev \ - libxml2-dev \ - libxml2-utils \ - libyajl-dev \ - locales \ - lvm2 \ - make \ - nfs-common \ - ninja-build \ - numad \ - open-iscsi \ - perl-base \ - pkgconf \ - policykit-1 \ - python3 \ - python3-docutils \ - python3-pip \ - python3-pytest \ - python3-setuptools \ - python3-wheel \ - qemu-utils \ - sed \ - systemtap-sdt-dev \ - wireshark-dev \ - xsltproc && \ - eatmydata apt-get autoremove -y && \ - eatmydata apt-get autoclean -y && \ - sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \ - dpkg-reconfigure locales && \ - rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED && \ - 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/cc && \ - ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/clang && \ - ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc - -RUN /usr/bin/pip3 install meson==0.56.0 - -ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers" -ENV LANG "en_US.UTF-8" -ENV MAKE "/usr/bin/make" -ENV NINJA "/usr/bin/ninja" -ENV PYTHON "/usr/bin/python3" diff --git a/ci/gitlab/builds.yml b/ci/gitlab/builds.yml index 7edb0d0712..859dea89d9 100644 --- a/ci/gitlab/builds.yml +++ b/ci/gitlab/builds.yml @@ -206,20 +206,6 @@ x86_64-opensuse-tumbleweed: TARGET_BASE_IMAGE: registry.opensuse.org/opensuse/tumbleweed:latest -x86_64-ubuntu-2004: - extends: .native_build_job - needs: - - job: x86_64-ubuntu-2004-container - optional: true - allow_failure: false - variables: - ASAN_OPTIONS: verify_asan_link_order=0 - MESON_ARGS: -Db_lundef=false -Db_sanitize=address,undefined - NAME: ubuntu-2004 - TARGET_BASE_IMAGE: docker.io/library/ubuntu:20.04 - UBSAN_OPTIONS: print_stacktrace=1:halt_on_error=1 - - x86_64-ubuntu-2204: extends: .native_build_job needs: @@ -461,7 +447,7 @@ aarch64-debian-sid: needs: - job: aarch64-debian-sid-container optional: true - allow_failure: false + allow_failure: true variables: CROSS: aarch64 JOB_OPTIONAL: 1 @@ -474,7 +460,7 @@ armv6l-debian-sid: needs: - job: armv6l-debian-sid-container optional: true - allow_failure: false + allow_failure: true variables: CROSS: armv6l JOB_OPTIONAL: 1 @@ -487,7 +473,7 @@ armv7l-debian-sid: needs: - job: armv7l-debian-sid-container optional: true - allow_failure: false + allow_failure: true variables: CROSS: armv7l JOB_OPTIONAL: 1 @@ -500,7 +486,7 @@ i686-debian-sid: needs: - job: i686-debian-sid-container optional: true - allow_failure: false + allow_failure: true variables: CROSS: i686 JOB_OPTIONAL: 1 @@ -513,7 +499,7 @@ mips64el-debian-sid: needs: - job: mips64el-debian-sid-container optional: true - allow_failure: false + allow_failure: true variables: CROSS: mips64el JOB_OPTIONAL: 1 @@ -526,7 +512,7 @@ ppc64le-debian-sid: needs: - job: ppc64le-debian-sid-container optional: true - allow_failure: false + allow_failure: true variables: CROSS: ppc64le JOB_OPTIONAL: 1 @@ -539,7 +525,7 @@ s390x-debian-sid: needs: - job: s390x-debian-sid-container optional: true - allow_failure: false + allow_failure: true variables: CROSS: s390x JOB_OPTIONAL: 1 diff --git a/ci/gitlab/containers.yml b/ci/gitlab/containers.yml index fb153a1234..ff0396b799 100644 --- a/ci/gitlab/containers.yml +++ b/ci/gitlab/containers.yml @@ -92,13 +92,6 @@ x86_64-opensuse-tumbleweed-container: NAME: opensuse-tumbleweed -x86_64-ubuntu-2004-container: - extends: .container_job - allow_failure: false - variables: - NAME: ubuntu-2004 - - x86_64-ubuntu-2204-container: extends: .container_job allow_failure: false @@ -238,7 +231,7 @@ s390x-debian-12-container: aarch64-debian-sid-container: extends: .container_job - allow_failure: false + allow_failure: true variables: JOB_OPTIONAL: 1 NAME: debian-sid-cross-aarch64 @@ -246,7 +239,7 @@ aarch64-debian-sid-container: armv6l-debian-sid-container: extends: .container_job - allow_failure: false + allow_failure: true variables: JOB_OPTIONAL: 1 NAME: debian-sid-cross-armv6l @@ -254,7 +247,7 @@ armv6l-debian-sid-container: armv7l-debian-sid-container: extends: .container_job - allow_failure: false + allow_failure: true variables: JOB_OPTIONAL: 1 NAME: debian-sid-cross-armv7l @@ -262,7 +255,7 @@ armv7l-debian-sid-container: i686-debian-sid-container: extends: .container_job - allow_failure: false + allow_failure: true variables: JOB_OPTIONAL: 1 NAME: debian-sid-cross-i686 @@ -270,7 +263,7 @@ i686-debian-sid-container: mips64el-debian-sid-container: extends: .container_job - allow_failure: false + allow_failure: true variables: JOB_OPTIONAL: 1 NAME: debian-sid-cross-mips64el @@ -278,7 +271,7 @@ mips64el-debian-sid-container: ppc64le-debian-sid-container: extends: .container_job - allow_failure: false + allow_failure: true variables: JOB_OPTIONAL: 1 NAME: debian-sid-cross-ppc64le @@ -286,7 +279,7 @@ ppc64le-debian-sid-container: s390x-debian-sid-container: extends: .container_job - allow_failure: false + allow_failure: true variables: JOB_OPTIONAL: 1 NAME: debian-sid-cross-s390x diff --git a/ci/manifest.yml b/ci/manifest.yml index e78d81f1f4..80a341034e 100644 --- a/ci/manifest.yml +++ b/ci/manifest.yml @@ -217,14 +217,6 @@ targets: PATH_EXTRA: /usr/local/opt/ccache/libexec:/usr/local/opt/gettext/bin:/usr/local/opt/libpcap/bin:/usr/local/opt/libxslt/bin PKG_CONFIG_PATH: /usr/local/opt/curl/lib/pkgconfig:/usr/local/opt/libpcap/lib/pkgconfig:/usr/local/opt/libxml2/lib/pkgconfig:/usr/local/opt/ncurses/lib/pkgconfig:/usr/local/opt/readline/lib/pkgconfig - ubuntu-2004: - jobs: - - arch: x86_64 - variables: - ASAN_OPTIONS: verify_asan_link_order=0 - MESON_ARGS: -Db_lundef=false -Db_sanitize=address,undefined - UBSAN_OPTIONS: print_stacktrace=1:halt_on_error=1 - ubuntu-2204: jobs: - arch: x86_64 -- 2.43.2

Now that we don't have any distro stuck with glib-2.56.0, we can bump the glib version. In fact, this is needed, because of g_clear_pointer. Since v7.4.0-rc1~301 we declare at compile time what version of glib APIs we want to use (by setting GLIB_VERSION_MIN_REQUIRED = GLIB_VERSION_MAX_ALLOWED = 2.56.0), regardless of actual glib version in the host. And since we currently require glib-2.56.0 and force glib to use APIs of that version, some newer bits are slipping from us. For instance: regular function version of g_clear_pointer() is used instead of a fancy macro. So what? Well, g_clear_pointer() function typecasts passed free function to void (*)(void *) and then calls it. Well, this triggers UBSAN, understandably. But with glib-2.58.0 the g_clear_pointer() becomes a macro which calls the free function directly, with no typecasting and thus no undefined behavior. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> --- meson.build | 2 +- src/libvirt_private.syms | 1 - src/util/glibcompat.c | 125 --------------------------------------- src/util/glibcompat.h | 10 ---- 4 files changed, 1 insertion(+), 137 deletions(-) diff --git a/meson.build b/meson.build index cb374ab118..583383b0d3 100644 --- a/meson.build +++ b/meson.build @@ -978,7 +978,7 @@ else endif endif -glib_version = '2.56.0' +glib_version = '2.58.0' glib_dep = dependency('glib-2.0', version: '>=' + glib_version) gobject_dep = dependency('gobject-2.0', version: '>=' + glib_version) if host_machine.system() == 'windows' diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 947294cb2b..1c8f3f902d 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -1848,7 +1848,6 @@ virStorageSourceUpdatePhysicalSize; # util/glibcompat.h -vir_g_canonicalize_filename; vir_g_fsync; vir_g_source_unref; vir_g_strdup_printf; diff --git a/src/util/glibcompat.c b/src/util/glibcompat.c index fdc32af5e2..d8912b323b 100644 --- a/src/util/glibcompat.c +++ b/src/util/glibcompat.c @@ -63,136 +63,11 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" -#undef g_canonicalize_filename -#undef g_hash_table_steal_extended #undef g_fsync #undef g_strdup_printf #undef g_strdup_vprintf -gchar * -vir_g_canonicalize_filename(const gchar *filename, - const gchar *relative_to) -{ -#if GLIB_CHECK_VERSION(2, 58, 0) - return g_canonicalize_filename(filename, relative_to); -#else /* ! GLIB_CHECK_VERSION(2, 58, 0) */ - gchar *canon, *start, *p, *q; - guint i; - - g_return_val_if_fail(relative_to == NULL || g_path_is_absolute(relative_to), NULL); - - if (!g_path_is_absolute(filename)) { - gchar *cwd_allocated = NULL; - const gchar *cwd; - - if (relative_to != NULL) - cwd = relative_to; - else - cwd = cwd_allocated = g_get_current_dir(); - - canon = g_build_filename(cwd, filename, NULL); - g_free(cwd_allocated); - } else { - canon = g_strdup(filename); - } - - start = (char *)g_path_skip_root(canon); - - if (start == NULL) { - /* This shouldn't really happen, as g_get_current_dir() should - return an absolute pathname, but bug 573843 shows this is - not always happening */ - g_free(canon); - return g_build_filename(G_DIR_SEPARATOR_S, filename, NULL); - } - - /* POSIX allows double slashes at the start to - * mean something special (as does windows too). - * So, "//" != "/", but more than two slashes - * is treated as "/". - */ - i = 0; - for (p = start - 1; - (p >= canon) && - G_IS_DIR_SEPARATOR(*p); - p--) - i++; - if (i > 2) { - i -= 1; - start -= i; - memmove(start, start+i, strlen(start+i) + 1); - } - - /* Make sure we're using the canonical dir separator */ - p++; - while (p < start && G_IS_DIR_SEPARATOR(*p)) - *p++ = G_DIR_SEPARATOR; - - p = start; - while (*p != 0) { - if (p[0] == '.' && (p[1] == 0 || G_IS_DIR_SEPARATOR(p[1]))) { - memmove(p, p+1, strlen(p+1)+1); - } else if (p[0] == '.' && p[1] == '.' && - (p[2] == 0 || G_IS_DIR_SEPARATOR(p[2]))) { - q = p + 2; - /* Skip previous separator */ - p = p - 2; - if (p < start) - p = start; - while (p > start && !G_IS_DIR_SEPARATOR(*p)) - p--; - if (G_IS_DIR_SEPARATOR(*p)) - *p++ = G_DIR_SEPARATOR; - memmove(p, q, strlen(q)+1); - } else { - /* Skip until next separator */ - while (*p != 0 && !G_IS_DIR_SEPARATOR(*p)) - p++; - - if (*p != 0) { - /* Canonicalize one separator */ - *p++ = G_DIR_SEPARATOR; - } - } - - /* Remove additional separators */ - q = p; - while (*q && G_IS_DIR_SEPARATOR(*q)) - q++; - - if (p != q) - memmove(p, q, strlen(q) + 1); - } - - /* Remove trailing slashes */ - if (p > start && G_IS_DIR_SEPARATOR(*(p-1))) - *(p-1) = 0; - - return canon; -#endif /* ! GLIB_CHECK_VERSION(2, 58, 0) */ -} - - -gboolean -vir_g_hash_table_steal_extended(GHashTable *hash_table, - gconstpointer lookup_key, - gpointer *stolen_key, - gpointer *stolen_value) -{ -#if GLIB_CHECK_VERSION(2, 58, 0) - return g_hash_table_steal_extended(hash_table, lookup_key, stolen_key, stolen_value); -#else /* ! GLIB_CHECK_VERSION(2, 58, 0) */ - if (!(g_hash_table_lookup_extended(hash_table, lookup_key, stolen_key, stolen_value))) - return FALSE; - - g_hash_table_steal(hash_table, lookup_key); - - return TRUE; -#endif /* ! GLIB_CHECK_VERSION(2, 58, 0) */ -} - - /* Drop when min glib >= 2.63.0 */ gint vir_g_fsync(gint fd) diff --git a/src/util/glibcompat.h b/src/util/glibcompat.h index 178fea3cf3..2542b4d5dc 100644 --- a/src/util/glibcompat.h +++ b/src/util/glibcompat.h @@ -68,15 +68,6 @@ #endif /* GLib < 2.67.0 */ -gchar * vir_g_canonicalize_filename(const gchar *filename, - const gchar *relative_to); - -gboolean -vir_g_hash_table_steal_extended(GHashTable *hash_table, - gconstpointer lookup_key, - gpointer *stolen_key, - gpointer *stolen_value); -#define g_hash_table_steal_extended vir_g_hash_table_steal_extended gint vir_g_fsync(gint fd); char *vir_g_strdup_printf(const char *msg, ...) @@ -89,7 +80,6 @@ char *vir_g_strdup_vprintf(const char *msg, va_list args) # define g_strdup_vprintf vir_g_strdup_vprintf #endif -#define g_canonicalize_filename vir_g_canonicalize_filename #undef g_fsync #define g_fsync vir_g_fsync -- 2.43.2

Ubuntu 24.04 was released recently. Add it to our CI. Also, to be able to run ASAN/UBSAN builds on Ubuntu 24.04 libclang-rt-dev needs to be installed (because clang's runtime was moved into a separate package). Hence so many seemingly unrelated changes. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- ci/buildenv/centos-stream-9.sh | 1 + ci/buildenv/debian-12-cross-aarch64.sh | 1 + ci/buildenv/debian-12-cross-armv6l.sh | 1 + ci/buildenv/debian-12-cross-armv7l.sh | 1 + ci/buildenv/debian-12-cross-i686.sh | 1 + ci/buildenv/debian-12-cross-mips64el.sh | 1 + ci/buildenv/debian-12-cross-mipsel.sh | 1 + ci/buildenv/debian-12-cross-ppc64le.sh | 1 + ci/buildenv/debian-12-cross-s390x.sh | 1 + ci/buildenv/debian-12.sh | 1 + ci/buildenv/debian-sid-cross-aarch64.sh | 1 + ci/buildenv/debian-sid-cross-armv6l.sh | 1 + ci/buildenv/debian-sid-cross-armv7l.sh | 1 + ci/buildenv/debian-sid-cross-i686.sh | 1 + ci/buildenv/debian-sid-cross-mips64el.sh | 1 + ci/buildenv/debian-sid-cross-ppc64le.sh | 1 + ci/buildenv/debian-sid-cross-s390x.sh | 1 + ci/buildenv/debian-sid.sh | 1 + ci/buildenv/fedora-39.sh | 1 + ci/buildenv/fedora-40-cross-mingw32.sh | 1 + ci/buildenv/fedora-40-cross-mingw64.sh | 1 + ci/buildenv/fedora-40.sh | 1 + ci/buildenv/fedora-rawhide-cross-mingw32.sh | 1 + ci/buildenv/fedora-rawhide-cross-mingw64.sh | 1 + ci/buildenv/fedora-rawhide.sh | 1 + ci/buildenv/ubuntu-2404.sh | 101 +++++++++++++++++ ci/containers/centos-stream-9.Dockerfile | 1 + .../debian-12-cross-aarch64.Dockerfile | 1 + .../debian-12-cross-armv6l.Dockerfile | 1 + .../debian-12-cross-armv7l.Dockerfile | 1 + ci/containers/debian-12-cross-i686.Dockerfile | 1 + .../debian-12-cross-mips64el.Dockerfile | 1 + .../debian-12-cross-mipsel.Dockerfile | 1 + .../debian-12-cross-ppc64le.Dockerfile | 1 + .../debian-12-cross-s390x.Dockerfile | 1 + ci/containers/debian-12.Dockerfile | 1 + .../debian-sid-cross-aarch64.Dockerfile | 1 + .../debian-sid-cross-armv6l.Dockerfile | 1 + .../debian-sid-cross-armv7l.Dockerfile | 1 + .../debian-sid-cross-i686.Dockerfile | 1 + .../debian-sid-cross-mips64el.Dockerfile | 1 + .../debian-sid-cross-ppc64le.Dockerfile | 1 + .../debian-sid-cross-s390x.Dockerfile | 1 + ci/containers/debian-sid.Dockerfile | 1 + ci/containers/fedora-39.Dockerfile | 1 + .../fedora-40-cross-mingw32.Dockerfile | 1 + .../fedora-40-cross-mingw64.Dockerfile | 1 + ci/containers/fedora-40.Dockerfile | 1 + .../fedora-rawhide-cross-mingw32.Dockerfile | 1 + .../fedora-rawhide-cross-mingw64.Dockerfile | 1 + ci/containers/fedora-rawhide.Dockerfile | 1 + ci/containers/ubuntu-2404.Dockerfile | 104 ++++++++++++++++++ ci/gitlab/builds.yml | 21 +++- ci/gitlab/containers.yml | 7 ++ ci/lcitool/projects/libvirt.yml | 1 + ci/manifest.yml | 4 + 56 files changed, 283 insertions(+), 5 deletions(-) create mode 100644 ci/buildenv/ubuntu-2404.sh create mode 100644 ci/containers/ubuntu-2404.Dockerfile diff --git a/ci/buildenv/centos-stream-9.sh b/ci/buildenv/centos-stream-9.sh index 8dabda22b3..c23c60e026 100644 --- a/ci/buildenv/centos-stream-9.sh +++ b/ci/buildenv/centos-stream-9.sh @@ -17,6 +17,7 @@ function install_buildenv() { ca-certificates \ ccache \ clang \ + compiler-rt \ cpp \ cyrus-sasl-devel \ device-mapper-devel \ diff --git a/ci/buildenv/debian-12-cross-aarch64.sh b/ci/buildenv/debian-12-cross-aarch64.sh index efe5548097..5fc7e8a801 100644 --- a/ci/buildenv/debian-12-cross-aarch64.sh +++ b/ci/buildenv/debian-12-cross-aarch64.sh @@ -27,6 +27,7 @@ function install_buildenv() { iproute2 \ iptables \ kmod \ + libclang-rt-dev \ libnbd-dev \ libxml2-utils \ locales \ diff --git a/ci/buildenv/debian-12-cross-armv6l.sh b/ci/buildenv/debian-12-cross-armv6l.sh index 0b3963f020..24d7d80380 100644 --- a/ci/buildenv/debian-12-cross-armv6l.sh +++ b/ci/buildenv/debian-12-cross-armv6l.sh @@ -27,6 +27,7 @@ function install_buildenv() { iproute2 \ iptables \ kmod \ + libclang-rt-dev \ libnbd-dev \ libxml2-utils \ locales \ diff --git a/ci/buildenv/debian-12-cross-armv7l.sh b/ci/buildenv/debian-12-cross-armv7l.sh index bc489c342a..35738e6bb2 100644 --- a/ci/buildenv/debian-12-cross-armv7l.sh +++ b/ci/buildenv/debian-12-cross-armv7l.sh @@ -27,6 +27,7 @@ function install_buildenv() { iproute2 \ iptables \ kmod \ + libclang-rt-dev \ libnbd-dev \ libxml2-utils \ locales \ diff --git a/ci/buildenv/debian-12-cross-i686.sh b/ci/buildenv/debian-12-cross-i686.sh index 66bdab1e71..dce90645c0 100644 --- a/ci/buildenv/debian-12-cross-i686.sh +++ b/ci/buildenv/debian-12-cross-i686.sh @@ -27,6 +27,7 @@ function install_buildenv() { iproute2 \ iptables \ kmod \ + libclang-rt-dev \ libnbd-dev \ libxml2-utils \ locales \ diff --git a/ci/buildenv/debian-12-cross-mips64el.sh b/ci/buildenv/debian-12-cross-mips64el.sh index 58d3822243..6d3e43aeb0 100644 --- a/ci/buildenv/debian-12-cross-mips64el.sh +++ b/ci/buildenv/debian-12-cross-mips64el.sh @@ -27,6 +27,7 @@ function install_buildenv() { iproute2 \ iptables \ kmod \ + libclang-rt-dev \ libnbd-dev \ libxml2-utils \ locales \ diff --git a/ci/buildenv/debian-12-cross-mipsel.sh b/ci/buildenv/debian-12-cross-mipsel.sh index 908e8ed543..b3a9ba1f40 100644 --- a/ci/buildenv/debian-12-cross-mipsel.sh +++ b/ci/buildenv/debian-12-cross-mipsel.sh @@ -27,6 +27,7 @@ function install_buildenv() { iproute2 \ iptables \ kmod \ + libclang-rt-dev \ libnbd-dev \ libxml2-utils \ locales \ diff --git a/ci/buildenv/debian-12-cross-ppc64le.sh b/ci/buildenv/debian-12-cross-ppc64le.sh index 171bc840fa..1cda4f7928 100644 --- a/ci/buildenv/debian-12-cross-ppc64le.sh +++ b/ci/buildenv/debian-12-cross-ppc64le.sh @@ -27,6 +27,7 @@ function install_buildenv() { iproute2 \ iptables \ kmod \ + libclang-rt-dev \ libnbd-dev \ libxml2-utils \ locales \ diff --git a/ci/buildenv/debian-12-cross-s390x.sh b/ci/buildenv/debian-12-cross-s390x.sh index cecc2ebffa..f0cbfad5a4 100644 --- a/ci/buildenv/debian-12-cross-s390x.sh +++ b/ci/buildenv/debian-12-cross-s390x.sh @@ -27,6 +27,7 @@ function install_buildenv() { iproute2 \ iptables \ kmod \ + libclang-rt-dev \ libnbd-dev \ libxml2-utils \ locales \ diff --git a/ci/buildenv/debian-12.sh b/ci/buildenv/debian-12.sh index 96caa4ea0e..5f19ba7526 100644 --- a/ci/buildenv/debian-12.sh +++ b/ci/buildenv/debian-12.sh @@ -36,6 +36,7 @@ function install_buildenv() { libblkid-dev \ libc6-dev \ libcap-ng-dev \ + libclang-rt-dev \ libcurl4-gnutls-dev \ libdevmapper-dev \ libfuse-dev \ diff --git a/ci/buildenv/debian-sid-cross-aarch64.sh b/ci/buildenv/debian-sid-cross-aarch64.sh index efe5548097..5fc7e8a801 100644 --- a/ci/buildenv/debian-sid-cross-aarch64.sh +++ b/ci/buildenv/debian-sid-cross-aarch64.sh @@ -27,6 +27,7 @@ function install_buildenv() { iproute2 \ iptables \ kmod \ + libclang-rt-dev \ libnbd-dev \ libxml2-utils \ locales \ diff --git a/ci/buildenv/debian-sid-cross-armv6l.sh b/ci/buildenv/debian-sid-cross-armv6l.sh index e5a8249f12..46e374ea88 100644 --- a/ci/buildenv/debian-sid-cross-armv6l.sh +++ b/ci/buildenv/debian-sid-cross-armv6l.sh @@ -27,6 +27,7 @@ function install_buildenv() { iproute2 \ iptables \ kmod \ + libclang-rt-dev \ libnbd-dev \ libxml2-utils \ locales \ diff --git a/ci/buildenv/debian-sid-cross-armv7l.sh b/ci/buildenv/debian-sid-cross-armv7l.sh index 2f6cb045da..c8bb1b9539 100644 --- a/ci/buildenv/debian-sid-cross-armv7l.sh +++ b/ci/buildenv/debian-sid-cross-armv7l.sh @@ -27,6 +27,7 @@ function install_buildenv() { iproute2 \ iptables \ kmod \ + libclang-rt-dev \ libnbd-dev \ libxml2-utils \ locales \ diff --git a/ci/buildenv/debian-sid-cross-i686.sh b/ci/buildenv/debian-sid-cross-i686.sh index a5d553c332..e74b2cee73 100644 --- a/ci/buildenv/debian-sid-cross-i686.sh +++ b/ci/buildenv/debian-sid-cross-i686.sh @@ -27,6 +27,7 @@ function install_buildenv() { iproute2 \ iptables \ kmod \ + libclang-rt-dev \ libnbd-dev \ libxml2-utils \ locales \ diff --git a/ci/buildenv/debian-sid-cross-mips64el.sh b/ci/buildenv/debian-sid-cross-mips64el.sh index 58d3822243..6d3e43aeb0 100644 --- a/ci/buildenv/debian-sid-cross-mips64el.sh +++ b/ci/buildenv/debian-sid-cross-mips64el.sh @@ -27,6 +27,7 @@ function install_buildenv() { iproute2 \ iptables \ kmod \ + libclang-rt-dev \ libnbd-dev \ libxml2-utils \ locales \ diff --git a/ci/buildenv/debian-sid-cross-ppc64le.sh b/ci/buildenv/debian-sid-cross-ppc64le.sh index 171bc840fa..1cda4f7928 100644 --- a/ci/buildenv/debian-sid-cross-ppc64le.sh +++ b/ci/buildenv/debian-sid-cross-ppc64le.sh @@ -27,6 +27,7 @@ function install_buildenv() { iproute2 \ iptables \ kmod \ + libclang-rt-dev \ libnbd-dev \ libxml2-utils \ locales \ diff --git a/ci/buildenv/debian-sid-cross-s390x.sh b/ci/buildenv/debian-sid-cross-s390x.sh index cecc2ebffa..f0cbfad5a4 100644 --- a/ci/buildenv/debian-sid-cross-s390x.sh +++ b/ci/buildenv/debian-sid-cross-s390x.sh @@ -27,6 +27,7 @@ function install_buildenv() { iproute2 \ iptables \ kmod \ + libclang-rt-dev \ libnbd-dev \ libxml2-utils \ locales \ diff --git a/ci/buildenv/debian-sid.sh b/ci/buildenv/debian-sid.sh index 96caa4ea0e..5f19ba7526 100644 --- a/ci/buildenv/debian-sid.sh +++ b/ci/buildenv/debian-sid.sh @@ -36,6 +36,7 @@ function install_buildenv() { libblkid-dev \ libc6-dev \ libcap-ng-dev \ + libclang-rt-dev \ libcurl4-gnutls-dev \ libdevmapper-dev \ libfuse-dev \ diff --git a/ci/buildenv/fedora-39.sh b/ci/buildenv/fedora-39.sh index 0cce268050..db9d88eff4 100644 --- a/ci/buildenv/fedora-39.sh +++ b/ci/buildenv/fedora-39.sh @@ -14,6 +14,7 @@ function install_buildenv() { ccache \ clang \ codespell \ + compiler-rt \ cpp \ cppi \ cyrus-sasl-devel \ diff --git a/ci/buildenv/fedora-40-cross-mingw32.sh b/ci/buildenv/fedora-40-cross-mingw32.sh index f349d1f60d..9104b2e20e 100644 --- a/ci/buildenv/fedora-40-cross-mingw32.sh +++ b/ci/buildenv/fedora-40-cross-mingw32.sh @@ -12,6 +12,7 @@ function install_buildenv() { ca-certificates \ ccache \ codespell \ + compiler-rt \ cpp \ cppi \ diffutils \ diff --git a/ci/buildenv/fedora-40-cross-mingw64.sh b/ci/buildenv/fedora-40-cross-mingw64.sh index fd20ff812b..35120064ec 100644 --- a/ci/buildenv/fedora-40-cross-mingw64.sh +++ b/ci/buildenv/fedora-40-cross-mingw64.sh @@ -12,6 +12,7 @@ function install_buildenv() { ca-certificates \ ccache \ codespell \ + compiler-rt \ cpp \ cppi \ diffutils \ diff --git a/ci/buildenv/fedora-40.sh b/ci/buildenv/fedora-40.sh index 0cce268050..db9d88eff4 100644 --- a/ci/buildenv/fedora-40.sh +++ b/ci/buildenv/fedora-40.sh @@ -14,6 +14,7 @@ function install_buildenv() { ccache \ clang \ codespell \ + compiler-rt \ cpp \ cppi \ cyrus-sasl-devel \ diff --git a/ci/buildenv/fedora-rawhide-cross-mingw32.sh b/ci/buildenv/fedora-rawhide-cross-mingw32.sh index de0f16222e..dadc40dc4e 100644 --- a/ci/buildenv/fedora-rawhide-cross-mingw32.sh +++ b/ci/buildenv/fedora-rawhide-cross-mingw32.sh @@ -13,6 +13,7 @@ function install_buildenv() { ca-certificates \ ccache \ codespell \ + compiler-rt \ cpp \ cppi \ diffutils \ diff --git a/ci/buildenv/fedora-rawhide-cross-mingw64.sh b/ci/buildenv/fedora-rawhide-cross-mingw64.sh index 30d2654f0e..c484250272 100644 --- a/ci/buildenv/fedora-rawhide-cross-mingw64.sh +++ b/ci/buildenv/fedora-rawhide-cross-mingw64.sh @@ -13,6 +13,7 @@ function install_buildenv() { ca-certificates \ ccache \ codespell \ + compiler-rt \ cpp \ cppi \ diffutils \ diff --git a/ci/buildenv/fedora-rawhide.sh b/ci/buildenv/fedora-rawhide.sh index 399b1bae97..f89a87ad63 100644 --- a/ci/buildenv/fedora-rawhide.sh +++ b/ci/buildenv/fedora-rawhide.sh @@ -15,6 +15,7 @@ function install_buildenv() { ccache \ clang \ codespell \ + compiler-rt \ cpp \ cppi \ cyrus-sasl-devel \ diff --git a/ci/buildenv/ubuntu-2404.sh b/ci/buildenv/ubuntu-2404.sh new file mode 100644 index 0000000000..3eacaa6cce --- /dev/null +++ b/ci/buildenv/ubuntu-2404.sh @@ -0,0 +1,101 @@ +# THIS FILE WAS AUTO-GENERATED +# +# $ lcitool manifest ci/manifest.yml +# +# https://gitlab.com/libvirt/libvirt-ci + +function install_buildenv() { + export DEBIAN_FRONTEND=noninteractive + apt-get update + apt-get dist-upgrade -y + apt-get install --no-install-recommends -y \ + augeas-lenses \ + augeas-tools \ + bash-completion \ + black \ + ca-certificates \ + ccache \ + clang \ + codespell \ + cpp \ + diffutils \ + dwarves \ + ebtables \ + flake8 \ + gcc \ + gettext \ + git \ + grep \ + iproute2 \ + iptables \ + kmod \ + libacl1-dev \ + libapparmor-dev \ + libattr1-dev \ + libaudit-dev \ + libblkid-dev \ + libc6-dev \ + libcap-ng-dev \ + libclang-rt-dev \ + libcurl4-gnutls-dev \ + libdevmapper-dev \ + libfuse-dev \ + libglib2.0-dev \ + libglusterfs-dev \ + libgnutls28-dev \ + libiscsi-dev \ + libnbd-dev \ + libnl-3-dev \ + libnl-route-3-dev \ + libnuma-dev \ + libopenwsman-dev \ + libparted-dev \ + libpcap0.8-dev \ + libpciaccess-dev \ + librbd-dev \ + libreadline-dev \ + libsanlock-dev \ + libsasl2-dev \ + libselinux1-dev \ + libssh-dev \ + libssh2-1-dev \ + libtirpc-dev \ + libudev-dev \ + libxen-dev \ + libxml2-dev \ + libxml2-utils \ + libyajl-dev \ + locales \ + lvm2 \ + make \ + meson \ + nfs-common \ + ninja-build \ + numad \ + open-iscsi \ + perl-base \ + pkgconf \ + policykit-1 \ + python3 \ + python3-docutils \ + python3-pytest \ + qemu-utils \ + sed \ + systemtap-sdt-dev \ + wireshark-dev \ + xsltproc + sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen + dpkg-reconfigure locales + rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED + 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/cc + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/clang + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc +} + +export CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers" +export LANG="en_US.UTF-8" +export MAKE="/usr/bin/make" +export NINJA="/usr/bin/ninja" +export PYTHON="/usr/bin/python3" diff --git a/ci/containers/centos-stream-9.Dockerfile b/ci/containers/centos-stream-9.Dockerfile index 082b18d06f..93549eefad 100644 --- a/ci/containers/centos-stream-9.Dockerfile +++ b/ci/containers/centos-stream-9.Dockerfile @@ -18,6 +18,7 @@ RUN dnf distro-sync -y && \ ca-certificates \ ccache \ clang \ + compiler-rt \ cpp \ cyrus-sasl-devel \ device-mapper-devel \ diff --git a/ci/containers/debian-12-cross-aarch64.Dockerfile b/ci/containers/debian-12-cross-aarch64.Dockerfile index b8b6b47ad6..cc26cc2d11 100644 --- a/ci/containers/debian-12-cross-aarch64.Dockerfile +++ b/ci/containers/debian-12-cross-aarch64.Dockerfile @@ -29,6 +29,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ iproute2 \ iptables \ kmod \ + libclang-rt-dev \ libnbd-dev \ libxml2-utils \ locales \ diff --git a/ci/containers/debian-12-cross-armv6l.Dockerfile b/ci/containers/debian-12-cross-armv6l.Dockerfile index e01423cb33..28235d9ba1 100644 --- a/ci/containers/debian-12-cross-armv6l.Dockerfile +++ b/ci/containers/debian-12-cross-armv6l.Dockerfile @@ -29,6 +29,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ iproute2 \ iptables \ kmod \ + libclang-rt-dev \ libnbd-dev \ libxml2-utils \ locales \ diff --git a/ci/containers/debian-12-cross-armv7l.Dockerfile b/ci/containers/debian-12-cross-armv7l.Dockerfile index 0ef8a45788..56fbb73ebd 100644 --- a/ci/containers/debian-12-cross-armv7l.Dockerfile +++ b/ci/containers/debian-12-cross-armv7l.Dockerfile @@ -29,6 +29,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ iproute2 \ iptables \ kmod \ + libclang-rt-dev \ libnbd-dev \ libxml2-utils \ locales \ diff --git a/ci/containers/debian-12-cross-i686.Dockerfile b/ci/containers/debian-12-cross-i686.Dockerfile index bee9af8f08..4601cd297f 100644 --- a/ci/containers/debian-12-cross-i686.Dockerfile +++ b/ci/containers/debian-12-cross-i686.Dockerfile @@ -29,6 +29,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ iproute2 \ iptables \ kmod \ + libclang-rt-dev \ libnbd-dev \ libxml2-utils \ locales \ diff --git a/ci/containers/debian-12-cross-mips64el.Dockerfile b/ci/containers/debian-12-cross-mips64el.Dockerfile index 700c566f07..3d3c0615fa 100644 --- a/ci/containers/debian-12-cross-mips64el.Dockerfile +++ b/ci/containers/debian-12-cross-mips64el.Dockerfile @@ -29,6 +29,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ iproute2 \ iptables \ kmod \ + libclang-rt-dev \ libnbd-dev \ libxml2-utils \ locales \ diff --git a/ci/containers/debian-12-cross-mipsel.Dockerfile b/ci/containers/debian-12-cross-mipsel.Dockerfile index 67e032bbc9..a1e1167f56 100644 --- a/ci/containers/debian-12-cross-mipsel.Dockerfile +++ b/ci/containers/debian-12-cross-mipsel.Dockerfile @@ -29,6 +29,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ iproute2 \ iptables \ kmod \ + libclang-rt-dev \ libnbd-dev \ libxml2-utils \ locales \ diff --git a/ci/containers/debian-12-cross-ppc64le.Dockerfile b/ci/containers/debian-12-cross-ppc64le.Dockerfile index 5f91e15284..836b1c2ec5 100644 --- a/ci/containers/debian-12-cross-ppc64le.Dockerfile +++ b/ci/containers/debian-12-cross-ppc64le.Dockerfile @@ -29,6 +29,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ iproute2 \ iptables \ kmod \ + libclang-rt-dev \ libnbd-dev \ libxml2-utils \ locales \ diff --git a/ci/containers/debian-12-cross-s390x.Dockerfile b/ci/containers/debian-12-cross-s390x.Dockerfile index 29e76ebb80..000e357b97 100644 --- a/ci/containers/debian-12-cross-s390x.Dockerfile +++ b/ci/containers/debian-12-cross-s390x.Dockerfile @@ -29,6 +29,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ iproute2 \ iptables \ kmod \ + libclang-rt-dev \ libnbd-dev \ libxml2-utils \ locales \ diff --git a/ci/containers/debian-12.Dockerfile b/ci/containers/debian-12.Dockerfile index 0df1d0190d..bacfd9ada4 100644 --- a/ci/containers/debian-12.Dockerfile +++ b/ci/containers/debian-12.Dockerfile @@ -38,6 +38,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ libblkid-dev \ libc6-dev \ libcap-ng-dev \ + libclang-rt-dev \ libcurl4-gnutls-dev \ libdevmapper-dev \ libfuse-dev \ diff --git a/ci/containers/debian-sid-cross-aarch64.Dockerfile b/ci/containers/debian-sid-cross-aarch64.Dockerfile index 211e35fad0..48335d5221 100644 --- a/ci/containers/debian-sid-cross-aarch64.Dockerfile +++ b/ci/containers/debian-sid-cross-aarch64.Dockerfile @@ -29,6 +29,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ iproute2 \ iptables \ kmod \ + libclang-rt-dev \ libnbd-dev \ libxml2-utils \ locales \ diff --git a/ci/containers/debian-sid-cross-armv6l.Dockerfile b/ci/containers/debian-sid-cross-armv6l.Dockerfile index 45459bb896..b9cdd95548 100644 --- a/ci/containers/debian-sid-cross-armv6l.Dockerfile +++ b/ci/containers/debian-sid-cross-armv6l.Dockerfile @@ -29,6 +29,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ iproute2 \ iptables \ kmod \ + libclang-rt-dev \ libnbd-dev \ libxml2-utils \ locales \ diff --git a/ci/containers/debian-sid-cross-armv7l.Dockerfile b/ci/containers/debian-sid-cross-armv7l.Dockerfile index 8c994cdcec..4787aea1cd 100644 --- a/ci/containers/debian-sid-cross-armv7l.Dockerfile +++ b/ci/containers/debian-sid-cross-armv7l.Dockerfile @@ -29,6 +29,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ iproute2 \ iptables \ kmod \ + libclang-rt-dev \ libnbd-dev \ libxml2-utils \ locales \ diff --git a/ci/containers/debian-sid-cross-i686.Dockerfile b/ci/containers/debian-sid-cross-i686.Dockerfile index 0b2d35188b..66d84474dc 100644 --- a/ci/containers/debian-sid-cross-i686.Dockerfile +++ b/ci/containers/debian-sid-cross-i686.Dockerfile @@ -29,6 +29,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ iproute2 \ iptables \ kmod \ + libclang-rt-dev \ libnbd-dev \ libxml2-utils \ locales \ diff --git a/ci/containers/debian-sid-cross-mips64el.Dockerfile b/ci/containers/debian-sid-cross-mips64el.Dockerfile index 7b58dfdbf3..4e325bf076 100644 --- a/ci/containers/debian-sid-cross-mips64el.Dockerfile +++ b/ci/containers/debian-sid-cross-mips64el.Dockerfile @@ -29,6 +29,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ iproute2 \ iptables \ kmod \ + libclang-rt-dev \ libnbd-dev \ libxml2-utils \ locales \ diff --git a/ci/containers/debian-sid-cross-ppc64le.Dockerfile b/ci/containers/debian-sid-cross-ppc64le.Dockerfile index 5d247f80f7..8a53dd73bd 100644 --- a/ci/containers/debian-sid-cross-ppc64le.Dockerfile +++ b/ci/containers/debian-sid-cross-ppc64le.Dockerfile @@ -29,6 +29,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ iproute2 \ iptables \ kmod \ + libclang-rt-dev \ libnbd-dev \ libxml2-utils \ locales \ diff --git a/ci/containers/debian-sid-cross-s390x.Dockerfile b/ci/containers/debian-sid-cross-s390x.Dockerfile index c9bbf0dfa2..f9c91d56de 100644 --- a/ci/containers/debian-sid-cross-s390x.Dockerfile +++ b/ci/containers/debian-sid-cross-s390x.Dockerfile @@ -29,6 +29,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ iproute2 \ iptables \ kmod \ + libclang-rt-dev \ libnbd-dev \ libxml2-utils \ locales \ diff --git a/ci/containers/debian-sid.Dockerfile b/ci/containers/debian-sid.Dockerfile index ddc220b45d..0084e418d3 100644 --- a/ci/containers/debian-sid.Dockerfile +++ b/ci/containers/debian-sid.Dockerfile @@ -38,6 +38,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ libblkid-dev \ libc6-dev \ libcap-ng-dev \ + libclang-rt-dev \ libcurl4-gnutls-dev \ libdevmapper-dev \ libfuse-dev \ diff --git a/ci/containers/fedora-39.Dockerfile b/ci/containers/fedora-39.Dockerfile index ec67082a35..91135bf15f 100644 --- a/ci/containers/fedora-39.Dockerfile +++ b/ci/containers/fedora-39.Dockerfile @@ -25,6 +25,7 @@ exec "$@"\n' > /usr/bin/nosync && \ ccache \ clang \ codespell \ + compiler-rt \ cpp \ cppi \ cyrus-sasl-devel \ diff --git a/ci/containers/fedora-40-cross-mingw32.Dockerfile b/ci/containers/fedora-40-cross-mingw32.Dockerfile index 9721481171..ed8566f273 100644 --- a/ci/containers/fedora-40-cross-mingw32.Dockerfile +++ b/ci/containers/fedora-40-cross-mingw32.Dockerfile @@ -23,6 +23,7 @@ exec "$@"\n' > /usr/bin/nosync && \ ca-certificates \ ccache \ codespell \ + compiler-rt \ cpp \ cppi \ diffutils \ diff --git a/ci/containers/fedora-40-cross-mingw64.Dockerfile b/ci/containers/fedora-40-cross-mingw64.Dockerfile index f25012abb6..b030427e0c 100644 --- a/ci/containers/fedora-40-cross-mingw64.Dockerfile +++ b/ci/containers/fedora-40-cross-mingw64.Dockerfile @@ -23,6 +23,7 @@ exec "$@"\n' > /usr/bin/nosync && \ ca-certificates \ ccache \ codespell \ + compiler-rt \ cpp \ cppi \ diffutils \ diff --git a/ci/containers/fedora-40.Dockerfile b/ci/containers/fedora-40.Dockerfile index 32a9cdae12..97e1858473 100644 --- a/ci/containers/fedora-40.Dockerfile +++ b/ci/containers/fedora-40.Dockerfile @@ -25,6 +25,7 @@ exec "$@"\n' > /usr/bin/nosync && \ ccache \ clang \ codespell \ + compiler-rt \ cpp \ cppi \ cyrus-sasl-devel \ diff --git a/ci/containers/fedora-rawhide-cross-mingw32.Dockerfile b/ci/containers/fedora-rawhide-cross-mingw32.Dockerfile index 3c6653affd..4e679991ef 100644 --- a/ci/containers/fedora-rawhide-cross-mingw32.Dockerfile +++ b/ci/containers/fedora-rawhide-cross-mingw32.Dockerfile @@ -24,6 +24,7 @@ exec "$@"\n' > /usr/bin/nosync && \ ca-certificates \ ccache \ codespell \ + compiler-rt \ cpp \ cppi \ diffutils \ diff --git a/ci/containers/fedora-rawhide-cross-mingw64.Dockerfile b/ci/containers/fedora-rawhide-cross-mingw64.Dockerfile index c668d9dcae..bd2641548a 100644 --- a/ci/containers/fedora-rawhide-cross-mingw64.Dockerfile +++ b/ci/containers/fedora-rawhide-cross-mingw64.Dockerfile @@ -24,6 +24,7 @@ exec "$@"\n' > /usr/bin/nosync && \ ca-certificates \ ccache \ codespell \ + compiler-rt \ cpp \ cppi \ diffutils \ diff --git a/ci/containers/fedora-rawhide.Dockerfile b/ci/containers/fedora-rawhide.Dockerfile index 232d76b95a..6f06843985 100644 --- a/ci/containers/fedora-rawhide.Dockerfile +++ b/ci/containers/fedora-rawhide.Dockerfile @@ -26,6 +26,7 @@ exec "$@"\n' > /usr/bin/nosync && \ ccache \ clang \ codespell \ + compiler-rt \ cpp \ cppi \ cyrus-sasl-devel \ diff --git a/ci/containers/ubuntu-2404.Dockerfile b/ci/containers/ubuntu-2404.Dockerfile new file mode 100644 index 0000000000..4a6c63b5a4 --- /dev/null +++ b/ci/containers/ubuntu-2404.Dockerfile @@ -0,0 +1,104 @@ +# THIS FILE WAS AUTO-GENERATED +# +# $ lcitool manifest ci/manifest.yml +# +# https://gitlab.com/libvirt/libvirt-ci + +FROM docker.io/library/ubuntu:24.04 + +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 \ + augeas-lenses \ + augeas-tools \ + bash-completion \ + black \ + ca-certificates \ + ccache \ + clang \ + codespell \ + cpp \ + diffutils \ + dwarves \ + ebtables \ + flake8 \ + gcc \ + gettext \ + git \ + grep \ + iproute2 \ + iptables \ + kmod \ + libacl1-dev \ + libapparmor-dev \ + libattr1-dev \ + libaudit-dev \ + libblkid-dev \ + libc6-dev \ + libcap-ng-dev \ + libclang-rt-dev \ + libcurl4-gnutls-dev \ + libdevmapper-dev \ + libfuse-dev \ + libglib2.0-dev \ + libglusterfs-dev \ + libgnutls28-dev \ + libiscsi-dev \ + libnbd-dev \ + libnl-3-dev \ + libnl-route-3-dev \ + libnuma-dev \ + libopenwsman-dev \ + libparted-dev \ + libpcap0.8-dev \ + libpciaccess-dev \ + librbd-dev \ + libreadline-dev \ + libsanlock-dev \ + libsasl2-dev \ + libselinux1-dev \ + libssh-dev \ + libssh2-1-dev \ + libtirpc-dev \ + libudev-dev \ + libxen-dev \ + libxml2-dev \ + libxml2-utils \ + libyajl-dev \ + locales \ + lvm2 \ + make \ + meson \ + nfs-common \ + ninja-build \ + numad \ + open-iscsi \ + perl-base \ + pkgconf \ + policykit-1 \ + python3 \ + python3-docutils \ + python3-pytest \ + qemu-utils \ + sed \ + systemtap-sdt-dev \ + wireshark-dev \ + xsltproc && \ + eatmydata apt-get autoremove -y && \ + eatmydata apt-get autoclean -y && \ + sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \ + dpkg-reconfigure locales && \ + rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED && \ + 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/cc && \ + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/clang && \ + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc + +ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers" +ENV LANG "en_US.UTF-8" +ENV MAKE "/usr/bin/make" +ENV NINJA "/usr/bin/ninja" +ENV PYTHON "/usr/bin/python3" diff --git a/ci/gitlab/builds.yml b/ci/gitlab/builds.yml index 859dea89d9..a0a64c1ec1 100644 --- a/ci/gitlab/builds.yml +++ b/ci/gitlab/builds.yml @@ -213,22 +213,33 @@ x86_64-ubuntu-2204: optional: true allow_failure: false variables: - JOB_OPTIONAL: 1 NAME: ubuntu-2204 TARGET_BASE_IMAGE: docker.io/library/ubuntu:22.04 -x86_64-ubuntu-2204-clang: +x86_64-ubuntu-2404: extends: .native_build_job needs: - - job: x86_64-ubuntu-2204-container + - job: x86_64-ubuntu-2404-container + optional: true + allow_failure: false + variables: + JOB_OPTIONAL: 1 + NAME: ubuntu-2404 + TARGET_BASE_IMAGE: docker.io/library/ubuntu:24.04 + + +x86_64-ubuntu-2404-clang: + extends: .native_build_job + needs: + - job: x86_64-ubuntu-2404-container optional: true allow_failure: false variables: CC: clang MESON_ARGS: -Db_lundef=false -Db_sanitize=address,undefined - NAME: ubuntu-2204 - TARGET_BASE_IMAGE: docker.io/library/ubuntu:22.04 + NAME: ubuntu-2404 + TARGET_BASE_IMAGE: docker.io/library/ubuntu:24.04 UBSAN_OPTIONS: print_stacktrace=1:halt_on_error=1 diff --git a/ci/gitlab/containers.yml b/ci/gitlab/containers.yml index ff0396b799..55137dc1c3 100644 --- a/ci/gitlab/containers.yml +++ b/ci/gitlab/containers.yml @@ -99,6 +99,13 @@ x86_64-ubuntu-2204-container: NAME: ubuntu-2204 +x86_64-ubuntu-2404-container: + extends: .container_job + allow_failure: false + variables: + NAME: ubuntu-2404 + + # Cross container jobs diff --git a/ci/lcitool/projects/libvirt.yml b/ci/lcitool/projects/libvirt.yml index 66c1fb64f8..a5d2248437 100644 --- a/ci/lcitool/projects/libvirt.yml +++ b/ci/lcitool/projects/libvirt.yml @@ -36,6 +36,7 @@ packages: - libblkid - libc - libcap-ng + - libclang-rt-dev - libcurl - libiscsi - libnbd diff --git a/ci/manifest.yml b/ci/manifest.yml index 80a341034e..647510ed2f 100644 --- a/ci/manifest.yml +++ b/ci/manifest.yml @@ -218,6 +218,10 @@ targets: PKG_CONFIG_PATH: /usr/local/opt/curl/lib/pkgconfig:/usr/local/opt/libpcap/lib/pkgconfig:/usr/local/opt/libxml2/lib/pkgconfig:/usr/local/opt/ncurses/lib/pkgconfig:/usr/local/opt/readline/lib/pkgconfig ubuntu-2204: + jobs: + - arch: x86_64 + + ubuntu-2404: jobs: - arch: x86_64 builds: false -- 2.43.2

On a Tuesday in 2024, Michal Privoznik wrote:
v2 of:
https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/thread/MMENB...
diff to v1: - Juggled some patches around, namely: squashed Fedora and AlmaLinux drop & reintroduction patches, reordered some for easier review. - Switched website job to AlmaLinux 9 - Enhanced commit message on the last commit to explain seemingly unrelated changes.
Example of green pipeline:
https://gitlab.com/MichalPrivoznik/libvirt/-/pipelines/1281843566
Michal Prívozník (10): domaincapsmock: Drop link time dependency on virQEMUCapsGet() qemuxml2argvmock: Drop link time dependency on qemuFDPassDirectNew() testutilsqemu: Don't leak struct testQemuArgs::vdpafds security: Fix return types of .probe callbacks meson: Disable -fsanitize=function ci: Switch from AlmaLinux 8 to AlmaLinux 9 ci: Switch from Fedora 38 to Fedora 40 ci: Drop Ubuntu 20.04 meson: Bump glib version to 2.58.0 ci: Introduce Ubuntu 24.04
.gitlab-ci.yml | 6 +- .../{almalinux-8.sh => almalinux-9.sh} | 8 +- ci/buildenv/centos-stream-9.sh | 1 + ci/buildenv/debian-12-cross-aarch64.sh | 1 +
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano
participants (2)
-
Ján Tomko
-
Michal Privoznik