[libvirt PATCH 0/3] ci: Start building RPMs

See it in action: https://gitlab.com/abologna/libvirt/-/pipelines/199936179 Andrea Bolognani (3): ci: Refresh Dockerfiles ci: Allow skipping dist ci: Start building RPMs .gitlab-ci.yml | 41 ++++++++++--------- ci/containers/libvirt-centos-7.Dockerfile | 1 + ci/containers/libvirt-centos-8.Dockerfile | 1 + .../libvirt-centos-stream.Dockerfile | 1 + ci/containers/libvirt-fedora-31.Dockerfile | 1 + ci/containers/libvirt-fedora-32.Dockerfile | 1 + ...rt-fedora-rawhide-cross-mingw32.Dockerfile | 1 + ...rt-fedora-rawhide-cross-mingw64.Dockerfile | 1 + .../libvirt-fedora-rawhide.Dockerfile | 1 + 9 files changed, 30 insertions(+), 19 deletions(-) -- 2.26.2

The corresponding lcitool change is https://gitlab.com/libvirt/libvirt-ci/-/commit/00d736ea991e4a5b2f1a8f9a793f2... Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- ci/containers/libvirt-centos-7.Dockerfile | 1 + ci/containers/libvirt-centos-8.Dockerfile | 1 + ci/containers/libvirt-centos-stream.Dockerfile | 1 + ci/containers/libvirt-fedora-31.Dockerfile | 1 + ci/containers/libvirt-fedora-32.Dockerfile | 1 + ci/containers/libvirt-fedora-rawhide-cross-mingw32.Dockerfile | 1 + ci/containers/libvirt-fedora-rawhide-cross-mingw64.Dockerfile | 1 + ci/containers/libvirt-fedora-rawhide.Dockerfile | 1 + 8 files changed, 8 insertions(+) diff --git a/ci/containers/libvirt-centos-7.Dockerfile b/ci/containers/libvirt-centos-7.Dockerfile index 165368ed9a..cff225ccc7 100644 --- a/ci/containers/libvirt-centos-7.Dockerfile +++ b/ci/containers/libvirt-centos-7.Dockerfile @@ -50,6 +50,7 @@ WEiJKtQrZDJloqtyi/mmRa1VsV7RYR0VPJjhK/R8EQ7Ysshy\n\ dnsmasq \ dwarves \ ebtables \ + firewalld-filesystem \ fuse-devel \ gcc \ gdb \ diff --git a/ci/containers/libvirt-centos-8.Dockerfile b/ci/containers/libvirt-centos-8.Dockerfile index 7fd793580c..82d2970677 100644 --- a/ci/containers/libvirt-centos-8.Dockerfile +++ b/ci/containers/libvirt-centos-8.Dockerfile @@ -22,6 +22,7 @@ RUN dnf install 'dnf-command(config-manager)' -y && \ dnsmasq \ dwarves \ ebtables \ + firewalld-filesystem \ fuse-devel \ gcc \ gdb \ diff --git a/ci/containers/libvirt-centos-stream.Dockerfile b/ci/containers/libvirt-centos-stream.Dockerfile index 70db325cc1..12c18759f7 100644 --- a/ci/containers/libvirt-centos-stream.Dockerfile +++ b/ci/containers/libvirt-centos-stream.Dockerfile @@ -23,6 +23,7 @@ RUN dnf install -y centos-release-stream && \ dnsmasq \ dwarves \ ebtables \ + firewalld-filesystem \ fuse-devel \ gcc \ gdb \ diff --git a/ci/containers/libvirt-fedora-31.Dockerfile b/ci/containers/libvirt-fedora-31.Dockerfile index 36adde5101..6fb77dddc7 100644 --- a/ci/containers/libvirt-fedora-31.Dockerfile +++ b/ci/containers/libvirt-fedora-31.Dockerfile @@ -20,6 +20,7 @@ RUN dnf update -y && \ dnsmasq \ dwarves \ ebtables \ + firewalld-filesystem \ fuse-devel \ gcc \ gdb \ diff --git a/ci/containers/libvirt-fedora-32.Dockerfile b/ci/containers/libvirt-fedora-32.Dockerfile index bbd7ff87a4..9b10864d72 100644 --- a/ci/containers/libvirt-fedora-32.Dockerfile +++ b/ci/containers/libvirt-fedora-32.Dockerfile @@ -20,6 +20,7 @@ RUN dnf update -y && \ dnsmasq \ dwarves \ ebtables \ + firewalld-filesystem \ fuse-devel \ gcc \ gdb \ diff --git a/ci/containers/libvirt-fedora-rawhide-cross-mingw32.Dockerfile b/ci/containers/libvirt-fedora-rawhide-cross-mingw32.Dockerfile index cf70e5939b..f65bdc13bb 100644 --- a/ci/containers/libvirt-fedora-rawhide-cross-mingw32.Dockerfile +++ b/ci/containers/libvirt-fedora-rawhide-cross-mingw32.Dockerfile @@ -16,6 +16,7 @@ RUN dnf update -y --nogpgcheck fedora-gpg-keys && \ dnsmasq \ dwarves \ ebtables \ + firewalld-filesystem \ gcc \ gdb \ gettext-devel \ diff --git a/ci/containers/libvirt-fedora-rawhide-cross-mingw64.Dockerfile b/ci/containers/libvirt-fedora-rawhide-cross-mingw64.Dockerfile index 92a5b991c9..e460123aa5 100644 --- a/ci/containers/libvirt-fedora-rawhide-cross-mingw64.Dockerfile +++ b/ci/containers/libvirt-fedora-rawhide-cross-mingw64.Dockerfile @@ -16,6 +16,7 @@ RUN dnf update -y --nogpgcheck fedora-gpg-keys && \ dnsmasq \ dwarves \ ebtables \ + firewalld-filesystem \ gcc \ gdb \ gettext-devel \ diff --git a/ci/containers/libvirt-fedora-rawhide.Dockerfile b/ci/containers/libvirt-fedora-rawhide.Dockerfile index d362662f35..3a995b3c68 100644 --- a/ci/containers/libvirt-fedora-rawhide.Dockerfile +++ b/ci/containers/libvirt-fedora-rawhide.Dockerfile @@ -21,6 +21,7 @@ RUN dnf update -y --nogpgcheck fedora-gpg-keys && \ dnsmasq \ dwarves \ ebtables \ + firewalld-filesystem \ fuse-devel \ gcc \ gdb \ -- 2.26.2

Instead of having an ad-hoc build script for CentOS 7, follow the pattern established in other repositories under the libvirt group and allow selectively disabling that specific part of the build. Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- .gitlab-ci.yml | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ee404bf50a..dda199761a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -51,24 +51,13 @@ stages: - *script_variables script: - meson build --werror || (cat build/meson-logs/meson-log.txt && exit 1) - - ninja -C build dist - -# Default native build job only for CentOS 7 that is always run -# meson dist fails on CentOS 7 because of old git that fails to clone -# from shallow git repository which is done when running meson dist -.native_build_centos_7_job_template: &native_build_centos_7_job_definition - stage: builds - image: $CI_REGISTRY_IMAGE/ci-$NAME:latest - cache: - paths: - - ccache/ - key: "$CI_JOB_NAME" - before_script: - - *script_variables - script: - - meson build --werror || (cat build/meson-logs/meson-log.txt && exit 1) - - ninja -C build - - ninja -C build test + - if test "$DIST" != "skip"; + then + ninja -C build dist; + else + ninja -C build; + ninja -C build test; + fi # Jobs that we delegate to Cirrus CI because they require an operating # system other than Linux. These jobs will only run if the required @@ -305,11 +294,14 @@ x64-debian-sid: NAME: debian-sid x64-centos-7: - <<: *native_build_centos_7_job_definition + <<: *native_build_job_definition needs: - x64-centos-7-container variables: NAME: centos-7 + # meson dist fails on CentOS 7 because of old git that fails to clone + # from shallow git repository which is done when running meson dist + DIST: skip x64-centos-8: <<: *native_build_job_definition -- 2.26.2

We lost this coverage during the move from CentOS CI to GitLab CI, and it's high time we brought it back. Building RPMs is currently skipped for: * openSUSE, which is not supported by our spec file; * clang builds, where rpmbuild fails with meson.build:1:0: ERROR: Unable to determine dynamic linker * targets where we install Meson from PyPi, because that doesn't bring in the necessary RPM macros. Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- .gitlab-ci.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index dda199761a..887bc30242 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -58,6 +58,10 @@ stages: ninja -C build; ninja -C build test; fi + - if test -x /usr/bin/rpmbuild && test "$RPM" != "skip"; + then + rpmbuild --nodeps -ta build/meson-dist/libvirt-*.tar.xz; + fi # Jobs that we delegate to Cirrus CI because they require an operating # system other than Linux. These jobs will only run if the required @@ -302,6 +306,7 @@ x64-centos-7: # meson dist fails on CentOS 7 because of old git that fails to clone # from shallow git repository which is done when running meson dist DIST: skip + RPM: skip x64-centos-8: <<: *native_build_job_definition @@ -309,6 +314,7 @@ x64-centos-8: - x64-centos-8-container variables: NAME: centos-8 + RPM: skip x64-centos-8-clang: <<: *native_build_job_definition @@ -317,6 +323,7 @@ x64-centos-8-clang: variables: NAME: centos-8 CC: clang + RPM: skip x64-centos-stream: <<: *native_build_job_definition @@ -324,6 +331,7 @@ x64-centos-stream: - x64-centos-stream-container variables: NAME: centos-stream + RPM: skip x64-fedora-31: <<: *native_build_job_definition @@ -331,6 +339,7 @@ x64-fedora-31: - x64-fedora-31-container variables: NAME: fedora-31 + RPM: skip x64-fedora-32: <<: *native_build_job_definition @@ -353,6 +362,7 @@ x64-fedora-rawhide-clang: variables: NAME: fedora-rawhide CC: clang + RPM: skip x64-opensuse-151: <<: *native_build_job_definition @@ -360,6 +370,7 @@ x64-opensuse-151: - x64-opensuse-151-container variables: NAME: opensuse-151 + RPM: skip x64-ubuntu-1804: <<: *native_build_job_definition -- 2.26.2

On Thu, Oct 8, 2020 at 1:43 PM Andrea Bolognani <abologna@redhat.com> wrote:
We lost this coverage during the move from CentOS CI to GitLab CI, and it's high time we brought it back.
Building RPMs is currently skipped for:
* openSUSE, which is not supported by our spec file;
I've got a patch set locally that adds the few knobs needed to make openSUSE build with the upstream spec file. If you want, I can clean that up and submit it for upstream inclusion? -- 真実はいつも一つ!/ Always, there's only one truth!

On Thu, 2020-10-08 at 22:17 -0400, Neal Gompa wrote:
On Thu, Oct 8, 2020 at 1:43 PM Andrea Bolognani <abologna@redhat.com> wrote:
We lost this coverage during the move from CentOS CI to GitLab CI, and it's high time we brought it back.
Building RPMs is currently skipped for:
* openSUSE, which is not supported by our spec file;
I've got a patch set locally that adds the few knobs needed to make openSUSE build with the upstream spec file. If you want, I can clean that up and submit it for upstream inclusion?
Sure thing! -- Andrea Bolognani / Red Hat / Virtualization

On Fri, Oct 9, 2020 at 4:49 AM Andrea Bolognani <abologna@redhat.com> wrote:
On Thu, 2020-10-08 at 22:17 -0400, Neal Gompa wrote:
On Thu, Oct 8, 2020 at 1:43 PM Andrea Bolognani <abologna@redhat.com> wrote:
We lost this coverage during the move from CentOS CI to GitLab CI, and it's high time we brought it back.
Building RPMs is currently skipped for:
* openSUSE, which is not supported by our spec file;
I've got a patch set locally that adds the few knobs needed to make openSUSE build with the upstream spec file. If you want, I can clean that up and submit it for upstream inclusion?
Sure thing!
I'll do it after your spec cleanup patch set lands, because otherwise it's going to be a bit hellish to rebase. -- 真実はいつも一つ!/ Always, there's only one truth!

On Fri, 2020-10-09 at 07:11 -0400, Neal Gompa wrote:
On Fri, Oct 9, 2020 at 4:49 AM Andrea Bolognani <abologna@redhat.com> wrote:
On Thu, 2020-10-08 at 22:17 -0400, Neal Gompa wrote:
I've got a patch set locally that adds the few knobs needed to make openSUSE build with the upstream spec file. If you want, I can clean that up and submit it for upstream inclusion?
Sure thing!
I'll do it after your spec cleanup patch set lands, because otherwise it's going to be a bit hellish to rebase.
I agree, that's definitely the smart way to go about it :) -- Andrea Bolognani / Red Hat / Virtualization

On 10/8/20 7:42 PM, Andrea Bolognani wrote:
See it in action:
https://gitlab.com/abologna/libvirt/-/pipelines/199936179
Andrea Bolognani (3): ci: Refresh Dockerfiles ci: Allow skipping dist ci: Start building RPMs
.gitlab-ci.yml | 41 ++++++++++--------- ci/containers/libvirt-centos-7.Dockerfile | 1 + ci/containers/libvirt-centos-8.Dockerfile | 1 + .../libvirt-centos-stream.Dockerfile | 1 + ci/containers/libvirt-fedora-31.Dockerfile | 1 + ci/containers/libvirt-fedora-32.Dockerfile | 1 + ...rt-fedora-rawhide-cross-mingw32.Dockerfile | 1 + ...rt-fedora-rawhide-cross-mingw64.Dockerfile | 1 + .../libvirt-fedora-rawhide.Dockerfile | 1 + 9 files changed, 30 insertions(+), 19 deletions(-)
Reviewed-by: Michal Privoznik <mprivozn@redhat.com> Michal
participants (3)
-
Andrea Bolognani
-
Michal Privoznik
-
Neal Gompa