With some help from Dan, I've managed to get back to a passing pipeline on gitlab! I'm pushing this now. Eric Blake (2): ci: Add opensuse-leap 15.4, skip TLS on 15.3 ci: Add coverage of --without-libxml2 ci/build.sh | 22 ++++++-- ci/buildenv/opensuse-leap-154.sh | 61 +++++++++++++++++++++ ci/containers/opensuse-leap-154.Dockerfile | 62 ++++++++++++++++++++++ ci/gitlab.yml | 1 + ci/gitlab/build-templates.yml | 5 ++ ci/gitlab/builds.yml | 40 ++++++++++++++ ci/gitlab/container-templates.yml | 1 + ci/gitlab/containers.yml | 7 +++ ci/manifest.yml | 15 +++++- dump/dump-data.sh | 1 + dump/dump-pattern.sh | 1 + 11 files changed, 210 insertions(+), 6 deletions(-) create mode 100644 ci/buildenv/opensuse-leap-154.sh create mode 100644 ci/containers/opensuse-leap-154.Dockerfile -- 2.37.3
Eric Blake
2022-Oct-19 14:46 UTC
[Libguestfs] [libnbd PATCH 1/2] ci: Add opensuse-leap 15.4, skip TLS on 15.3
lcitool recently added support for Leap 15.4; meanwhile, Leap 15.3 has a version of nbdkit that tries to use @NBDKIT,SYSTEM as the TLS priority which then crashes in gnutls. Explicitly testing our --without-gnutls configure coverage on that platform is thus a good idea; this required tweaking build.sh to learn another variables, and reordering to put CONFIGURE_OPTS (which the user can override at pipeline time) after our hard-coded CONFIG_ARGS. Thanks: Daniel P. Berrang? <berrange at redhat.com> --- ci/build.sh | 14 +++-- ci/buildenv/opensuse-leap-154.sh | 61 +++++++++++++++++++++ ci/containers/opensuse-leap-154.Dockerfile | 62 ++++++++++++++++++++++ ci/gitlab.yml | 1 + ci/gitlab/build-templates.yml | 5 ++ ci/gitlab/builds.yml | 20 +++++++ ci/gitlab/container-templates.yml | 1 + ci/gitlab/containers.yml | 7 +++ ci/manifest.yml | 10 +++- 9 files changed, 176 insertions(+), 5 deletions(-) create mode 100644 ci/buildenv/opensuse-leap-154.sh create mode 100644 ci/containers/opensuse-leap-154.Dockerfile diff --git a/ci/build.sh b/ci/build.sh index 3983e749..eb2fcd1c 100755 --- a/ci/build.sh +++ b/ci/build.sh @@ -4,7 +4,7 @@ set -xe skip_tests() { # Add a way to run all the tests, even the skipped ones, with an environment - # variable, so that it can be set fora branch or fork in GitLab. + # variable, so that it can be set for a branch or fork in GitLab. if test "$SKIPPED_TESTS" != "force" then # Skip tests from ci/skipped_tests if this is the right OS version @@ -33,7 +33,7 @@ skip_tests() { test_case_bckup="${test_case}_skipped_test" if ! git ls-files "$test_case" | grep -q "$test_case" then - make -C "$(dirname "$test_case")" "$(basename "$test_case")" 2>/dev/null || : + $MAKE -C "$(dirname "$test_case")" "$(basename "$test_case")" 2>/dev/null || : fi echo Backing up "$test_case" to "${test_case_bckup}" cp "$test_case" "${test_case_bckup}" @@ -72,10 +72,16 @@ main() { CONFIG_ARGS="\ --enable-gcc-warnings \ ---with-gnutls \ --with-libxml2 \ " + if test skip = "$GNUTLS" + then + CONFIG_ARGS="$CONFIG_ARGS --without-gnutls" + else + CONFIG_ARGS="$CONFIG_ARGS --with-gnutls" + fi + if test -n "$CROSS" then CONFIG_ARGS="$CONFIG_ARGS @@ -96,7 +102,7 @@ main() { fi fi - ./configure $CONFIGURE_OPTS $CONFIG_ARGS + ./configure $CONFIG_ARGS $CONFIGURE_OPTS $MAKE diff --git a/ci/buildenv/opensuse-leap-154.sh b/ci/buildenv/opensuse-leap-154.sh new file mode 100644 index 00000000..c77cd305 --- /dev/null +++ b/ci/buildenv/opensuse-leap-154.sh @@ -0,0 +1,61 @@ +# THIS FILE WAS AUTO-GENERATED +# +# $ lcitool manifest ci/manifest.yml +# +# https://gitlab.com/libvirt/libvirt-ci + +function install_buildenv() { + zypper update -y + zypper install -y \ + autoconf \ + automake \ + bash-completion \ + ca-certificates \ + ccache \ + clang \ + diffutils \ + fuse3 \ + fuse3-devel \ + gcc \ + gcc-c++ \ + git \ + glib2-devel \ + glibc-devel \ + glibc-locale \ + gnutls \ + go \ + iproute2 \ + jq \ + libev-devel \ + libgnutls-devel \ + libtool \ + libxml2-devel \ + make \ + nbd \ + nbdkit \ + ocaml \ + ocaml-findlib \ + ocaml-ocamldoc \ + perl \ + perl-Pod-Simple \ + perl-base \ + pkgconfig \ + python3-devel \ + python3-flake8 \ + qemu \ + qemu-tools \ + sed \ + util-linux \ + valgrind + 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 +} + +export CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers" +export LANG="en_US.UTF-8" +export MAKE="/usr/bin/make" diff --git a/ci/containers/opensuse-leap-154.Dockerfile b/ci/containers/opensuse-leap-154.Dockerfile new file mode 100644 index 00000000..7330baa7 --- /dev/null +++ b/ci/containers/opensuse-leap-154.Dockerfile @@ -0,0 +1,62 @@ +# THIS FILE WAS AUTO-GENERATED +# +# $ lcitool manifest ci/manifest.yml +# +# https://gitlab.com/libvirt/libvirt-ci + +FROM registry.opensuse.org/opensuse/leap:15.4 + +RUN zypper update -y && \ + zypper install -y \ + autoconf \ + automake \ + bash-completion \ + ca-certificates \ + ccache \ + clang \ + diffutils \ + fuse3 \ + fuse3-devel \ + gcc \ + gcc-c++ \ + git \ + glib2-devel \ + glibc-devel \ + glibc-locale \ + gnutls \ + go \ + iproute2 \ + jq \ + libev-devel \ + libgnutls-devel \ + libtool \ + libxml2-devel \ + make \ + nbd \ + nbdkit \ + ocaml \ + ocaml-findlib \ + ocaml-ocamldoc \ + perl \ + perl-Pod-Simple \ + perl-base \ + pkgconfig \ + python3-devel \ + python3-flake8 \ + qemu \ + qemu-tools \ + sed \ + util-linux \ + valgrind && \ + 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 + +ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers" +ENV LANG "en_US.UTF-8" +ENV MAKE "/usr/bin/make" diff --git a/ci/gitlab.yml b/ci/gitlab.yml index d1cb3934..68ffe725 100644 --- a/ci/gitlab.yml +++ b/ci/gitlab.yml @@ -67,6 +67,7 @@ workflow: debug: image: docker.io/library/alpine:3 stage: sanity_checks + interruptible: true needs: [] script: - printenv | sort diff --git a/ci/gitlab/build-templates.yml b/ci/gitlab/build-templates.yml index 7c30271a..6076bc47 100644 --- a/ci/gitlab/build-templates.yml +++ b/ci/gitlab/build-templates.yml @@ -26,6 +26,7 @@ .gitlab_native_build_job_prebuilt_env: image: $CI_REGISTRY/$RUN_UPSTREAM_NAMESPACE/libnbd/ci-$NAME:latest stage: builds + interruptible: true before_script: - cat /packages.txt rules: @@ -61,6 +62,7 @@ .gitlab_native_build_job_local_env: image: $IMAGE stage: builds + interruptible: true before_script: - source ci/buildenv/$NAME.sh - install_buildenv @@ -138,6 +140,7 @@ .gitlab_cross_build_job_prebuilt_env: image: $CI_REGISTRY/$RUN_UPSTREAM_NAMESPACE/libnbd/ci-$NAME-cross-$CROSS:latest stage: builds + interruptible: true before_script: - cat /packages.txt rules: @@ -173,6 +176,7 @@ .gitlab_cross_build_job_local_env: image: $IMAGE stage: builds + interruptible: true before_script: - source ci/buildenv/$NAME.sh - install_buildenv @@ -232,6 +236,7 @@ .cirrus_build_job: stage: builds image: registry.gitlab.com/libvirt/libvirt-ci/cirrus-run:master + interruptible: true needs: [] script: - source ci/cirrus/$NAME.vars diff --git a/ci/gitlab/builds.yml b/ci/gitlab/builds.yml index 45225021..c66f96b0 100644 --- a/ci/gitlab/builds.yml +++ b/ci/gitlab/builds.yml @@ -234,6 +234,7 @@ x86_64-opensuse-leap-153-prebuilt-env: optional: true allow_failure: false variables: + GNUTLS: skip NAME: opensuse-leap-153 x86_64-opensuse-leap-153-local-env: @@ -241,10 +242,29 @@ x86_64-opensuse-leap-153-local-env: needs: [] allow_failure: false variables: + GNUTLS: skip IMAGE: registry.opensuse.org/opensuse/leap:15.3 NAME: opensuse-leap-153 +x86_64-opensuse-leap-154-prebuilt-env: + extends: .native_build_job_prebuilt_env + needs: + - job: x86_64-opensuse-leap-154-container + optional: true + allow_failure: false + variables: + NAME: opensuse-leap-154 + +x86_64-opensuse-leap-154-local-env: + extends: .native_build_job_local_env + needs: [] + allow_failure: false + variables: + IMAGE: registry.opensuse.org/opensuse/leap:15.4 + NAME: opensuse-leap-154 + + x86_64-opensuse-tumbleweed-prebuilt-env: extends: .native_build_job_prebuilt_env needs: diff --git a/ci/gitlab/container-templates.yml b/ci/gitlab/container-templates.yml index a577028d..edb4aba6 100644 --- a/ci/gitlab/container-templates.yml +++ b/ci/gitlab/container-templates.yml @@ -16,6 +16,7 @@ .container_job: image: docker:stable stage: containers + interruptible: false needs: [] services: - docker:dind diff --git a/ci/gitlab/containers.yml b/ci/gitlab/containers.yml index a57af29c..68458f35 100644 --- a/ci/gitlab/containers.yml +++ b/ci/gitlab/containers.yml @@ -84,6 +84,13 @@ x86_64-opensuse-leap-153-container: NAME: opensuse-leap-153 +x86_64-opensuse-leap-154-container: + extends: .container_job + allow_failure: false + variables: + NAME: opensuse-leap-154 + + x86_64-opensuse-tumbleweed-container: extends: .container_job allow_failure: false diff --git a/ci/manifest.yml b/ci/manifest.yml index e95626ee..4c0846e1 100644 --- a/ci/manifest.yml +++ b/ci/manifest.yml @@ -55,7 +55,15 @@ targets: freebsd-current: x86_64 - opensuse-leap-153: x86_64 + opensuse-leap-153: + jobs: + - arch: x86_64 + # nbdkit TLS support is broken on 15.3 + # https://listman.redhat.com/archives/libguestfs/2022-October/030165.html + variables: + GNUTLS: skip + + opensuse-leap-154: x86_64 opensuse-tumbleweed: x86_64 -- 2.37.3
Eric Blake
2022-Oct-19 14:46 UTC
[Libguestfs] [libnbd PATCH 2/2] ci: Add coverage of --without-libxml2
Although we generally like URI support, it is worth having explicit coverage in our CI that we can build without it for those who want minimal dependencies. Similar to the previous patch, this is easiest to do with another build.sh variable. Doing so found two additional tests that need skipping (comparable to how we already skipped similar tests in sh/). --- ci/build.sh | 8 +++++++- ci/gitlab/builds.yml | 20 ++++++++++++++++++++ ci/manifest.yml | 5 +++++ dump/dump-data.sh | 1 + dump/dump-pattern.sh | 1 + 5 files changed, 34 insertions(+), 1 deletion(-) diff --git a/ci/build.sh b/ci/build.sh index eb2fcd1c..f6b710ad 100755 --- a/ci/build.sh +++ b/ci/build.sh @@ -72,7 +72,6 @@ main() { CONFIG_ARGS="\ --enable-gcc-warnings \ ---with-libxml2 \ " if test skip = "$GNUTLS" @@ -82,6 +81,13 @@ main() { CONFIG_ARGS="$CONFIG_ARGS --with-gnutls" fi + if test skip = "$LIBXML2" + then + CONFIG_ARGS="$CONFIG_ARGS --without-libxml2" + else + CONFIG_ARGS="$CONFIG_ARGS --with-libxml2" + fi + if test -n "$CROSS" then CONFIG_ARGS="$CONFIG_ARGS diff --git a/ci/gitlab/builds.yml b/ci/gitlab/builds.yml index c66f96b0..cbcd8636 100644 --- a/ci/gitlab/builds.yml +++ b/ci/gitlab/builds.yml @@ -227,6 +227,26 @@ x86_64-fedora-rawhide-clang-local-env: NAME: fedora-rawhide +x86_64-fedora-rawhide-no-libxml2-prebuilt-env: + extends: .native_build_job_prebuilt_env + needs: + - job: x86_64-fedora-rawhide-container + optional: true + allow_failure: false + variables: + LIBXML2: skip + NAME: fedora-rawhide + +x86_64-fedora-rawhide-no-libxml2-local-env: + extends: .native_build_job_local_env + needs: [] + allow_failure: false + variables: + IMAGE: registry.fedoraproject.org/fedora:rawhide + LIBXML2: skip + NAME: fedora-rawhide + + x86_64-opensuse-leap-153-prebuilt-env: extends: .native_build_job_prebuilt_env needs: diff --git a/ci/manifest.yml b/ci/manifest.yml index 4c0846e1..bca17ece 100644 --- a/ci/manifest.yml +++ b/ci/manifest.yml @@ -49,6 +49,11 @@ targets: variables: CC: clang + - arch: x86_64 + suffix: -no-libxml2 + variables: + LIBXML2: skip + freebsd-12: x86_64 freebsd-13: x86_64 diff --git a/dump/dump-data.sh b/dump/dump-data.sh index 11145b08..d902e902 100755 --- a/dump/dump-data.sh +++ b/dump/dump-data.sh @@ -24,6 +24,7 @@ set -x requires nbdkit --version requires nbdkit data --dump-plugin requires nbdkit -U - null --run 'test "$uri" != ""' +requires nbdsh -c 'exit(not h.supports_uri())' # This test requires nbdkit >= 1.22. minor=$( nbdkit --dump-config | grep ^version_minor | cut -d= -f2 ) diff --git a/dump/dump-pattern.sh b/dump/dump-pattern.sh index e2188ac8..3a89ff19 100755 --- a/dump/dump-pattern.sh +++ b/dump/dump-pattern.sh @@ -24,6 +24,7 @@ set -x requires nbdkit --version requires nbdkit pattern --dump-plugin requires nbdkit -U - null --run 'test "$uri" != ""' +requires nbdsh -c 'exit(not h.supports_uri())' output=dump-pattern.out rm -f $output -- 2.37.3