[libvirt-ci PATCH 2/2] Build libvirt-tck on CentOS 8

Andrea Bolognani posted 2 patches 5 years, 9 months ago
[libvirt-ci PATCH 2/2] Build libvirt-tck on CentOS 8
Posted by Andrea Bolognani 5 years, 9 months ago
CentOS 7 is missing perl-generators, as explained in the comment,
but this limitation does not apply to CentOS 8.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
---
 guests/playbooks/build/projects/libvirt-tck.yml | 2 ++
 jenkins/projects/libvirt-tck.yaml               | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/guests/playbooks/build/projects/libvirt-tck.yml b/guests/playbooks/build/projects/libvirt-tck.yml
index b8d848c..c83d8b6 100644
--- a/guests/playbooks/build/projects/libvirt-tck.yml
+++ b/guests/playbooks/build/projects/libvirt-tck.yml
@@ -4,6 +4,7 @@
     # build libvirt-tck
     name: libvirt-tck
     machines:
+      - libvirt-centos-8
       - libvirt-debian-9
       - libvirt-debian-10
       - libvirt-debian-sid
@@ -24,6 +25,7 @@
 - include: '{{ playbook_base }}/jobs/perl-modulebuild-rpm-job.yml'
   vars:
     machines:
+      - libvirt-centos-8
       - libvirt-fedora-30
       - libvirt-fedora-31
       - libvirt-fedora-rawhide
diff --git a/jenkins/projects/libvirt-tck.yaml b/jenkins/projects/libvirt-tck.yaml
index fcdea98..c0fb1f7 100644
--- a/jenkins/projects/libvirt-tck.yaml
+++ b/jenkins/projects/libvirt-tck.yaml
@@ -4,6 +4,7 @@
     # CentOS 7 doesn't include perl-generators, which is necessary to
     # build libvirt-tck
     machines:
+      - libvirt-centos-8
       - libvirt-debian-9
       - libvirt-debian-10
       - libvirt-fedora-30
@@ -22,6 +23,7 @@
       - perl-modulebuild-rpm-job:
           parent_jobs: 'libvirt-tck-check'
           machines:
+            - libvirt-centos-8
             - libvirt-fedora-30
             - libvirt-fedora-31
             - libvirt-fedora-rawhide
-- 
2.25.3

Re: [libvirt-ci PATCH 2/2] Build libvirt-tck on CentOS 8
Posted by Daniel P. Berrangé 5 years, 9 months ago
On Mon, Apr 20, 2020 at 03:00:37PM +0200, Andrea Bolognani wrote:
> CentOS 7 is missing perl-generators, as explained in the comment,
> but this limitation does not apply to CentOS 8.

The comment is wrong


> diff --git a/jenkins/projects/libvirt-tck.yaml b/jenkins/projects/libvirt-tck.yaml
> index fcdea98..c0fb1f7 100644
> --- a/jenkins/projects/libvirt-tck.yaml
> +++ b/jenkins/projects/libvirt-tck.yaml
> @@ -4,6 +4,7 @@
>      # CentOS 7 doesn't include perl-generators, which is necessary to
>      # build libvirt-tck

perl-Sys-Virt-TCK.spec.PL says

%if 0%{?fedora} || 0%{?rhel} > 7
BuildRequires: perl-interpreter
BuildRequires: perl-generators
%endif

perl-generators is not a module ever used by code, it is an invention of the
RPM packaging, to get the automatic  Reqiures/Provides lines added. So the
fact that it doesn't exist on RHEL-7 is simply because it is part of another
RPM instead (redhat-rpm-config IIRC)

>      machines:
> +      - libvirt-centos-8
>        - libvirt-debian-9
>        - libvirt-debian-10
>        - libvirt-fedora-30
> @@ -22,6 +23,7 @@
>        - perl-modulebuild-rpm-job:
>            parent_jobs: 'libvirt-tck-check'
>            machines:
> +            - libvirt-centos-8
>              - libvirt-fedora-30
>              - libvirt-fedora-31
>              - libvirt-fedora-rawhide
> -- 
> 2.25.3
> 

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

Re: [libvirt-ci PATCH 2/2] Build libvirt-tck on CentOS 8
Posted by Andrea Bolognani 5 years, 9 months ago
On Mon, 2020-04-20 at 14:05 +0100, Daniel P. Berrangé wrote:
> On Mon, Apr 20, 2020 at 03:00:37PM +0200, Andrea Bolognani wrote:
> >      # CentOS 7 doesn't include perl-generators, which is necessary to
> >      # build libvirt-tck
> 
> perl-Sys-Virt-TCK.spec.PL says
> 
> %if 0%{?fedora} || 0%{?rhel} > 7
> BuildRequires: perl-interpreter
> BuildRequires: perl-generators
> %endif
> 
> perl-generators is not a module ever used by code, it is an invention of the
> RPM packaging, to get the automatic  Reqiures/Provides lines added. So the
> fact that it doesn't exist on RHEL-7 is simply because it is part of another
> RPM instead (redhat-rpm-config IIRC)

Okay, my testing was flawed because I failed to add libvirt-tck to
the list of projects associated to the hosts in the inventory.

What happens if you actually try to build the project is, everything
works fine on both targets until you get to the RPM part, which fails
with

  perl(Config::Record) is needed by perl-Sys-Virt-TCK-2.0.0-1.el7.noarch
  perl(TAP::Formatter::HTML) is needed by perl-Sys-Virt-TCK-2.0.0-1.el7.noarch
  perl(TAP::Formatter::JUnit) is needed by perl-Sys-Virt-TCK-2.0.0-1.el7.noarch
  perl(TAP::Harness::Archive) is needed by perl-Sys-Virt-TCK-2.0.0-1.el7.noarch
  perl(accessors) is needed by perl-Sys-Virt-TCK-2.0.0-1.el7.noarch

on CentOS 7 and with

  perl(Config::Record) is needed by perl-Sys-Virt-TCK-2.0.0-1.el8.noarch
  perl(LWP::UserAgent) is needed by perl-Sys-Virt-TCK-2.0.0-1.el8.noarch
  perl(Sys::Virt) >= 0.2.1 is needed by perl-Sys-Virt-TCK-2.0.0-1.el8.noarch
  perl(TAP::Formatter::HTML) is needed by perl-Sys-Virt-TCK-2.0.0-1.el8.noarch
  perl(TAP::Formatter::JUnit) is needed by perl-Sys-Virt-TCK-2.0.0-1.el8.noarch
  perl(TAP::Harness::Archive) is needed by perl-Sys-Virt-TCK-2.0.0-1.el8.noarch
  perl(accessors) is needed by perl-Sys-Virt-TCK-2.0.0-1.el8.noarch

on CentOS 8, which looks about right because the corresponding
packages are not available in the repositories.

Now the question is: if these are actual build requirements, how can
the build succeed and the test suite pass?

-- 
Andrea Bolognani / Red Hat / Virtualization

Re: [libvirt-ci PATCH 2/2] Build libvirt-tck on CentOS 8
Posted by Daniel P. Berrangé 5 years, 9 months ago
On Mon, Apr 20, 2020 at 06:52:59PM +0200, Andrea Bolognani wrote:
> On Mon, 2020-04-20 at 14:05 +0100, Daniel P. Berrangé wrote:
> > On Mon, Apr 20, 2020 at 03:00:37PM +0200, Andrea Bolognani wrote:
> > >      # CentOS 7 doesn't include perl-generators, which is necessary to
> > >      # build libvirt-tck
> > 
> > perl-Sys-Virt-TCK.spec.PL says
> > 
> > %if 0%{?fedora} || 0%{?rhel} > 7
> > BuildRequires: perl-interpreter
> > BuildRequires: perl-generators
> > %endif
> > 
> > perl-generators is not a module ever used by code, it is an invention of the
> > RPM packaging, to get the automatic  Reqiures/Provides lines added. So the
> > fact that it doesn't exist on RHEL-7 is simply because it is part of another
> > RPM instead (redhat-rpm-config IIRC)
> 
> Okay, my testing was flawed because I failed to add libvirt-tck to
> the list of projects associated to the hosts in the inventory.
> 
> What happens if you actually try to build the project is, everything
> works fine on both targets until you get to the RPM part, which fails
> with
> 
>   perl(Config::Record) is needed by perl-Sys-Virt-TCK-2.0.0-1.el7.noarch
>   perl(TAP::Formatter::HTML) is needed by perl-Sys-Virt-TCK-2.0.0-1.el7.noarch
>   perl(TAP::Formatter::JUnit) is needed by perl-Sys-Virt-TCK-2.0.0-1.el7.noarch
>   perl(TAP::Harness::Archive) is needed by perl-Sys-Virt-TCK-2.0.0-1.el7.noarch
>   perl(accessors) is needed by perl-Sys-Virt-TCK-2.0.0-1.el7.noarch
> 
> on CentOS 7 and with
> 
>   perl(Config::Record) is needed by perl-Sys-Virt-TCK-2.0.0-1.el8.noarch
>   perl(LWP::UserAgent) is needed by perl-Sys-Virt-TCK-2.0.0-1.el8.noarch
>   perl(Sys::Virt) >= 0.2.1 is needed by perl-Sys-Virt-TCK-2.0.0-1.el8.noarch
>   perl(TAP::Formatter::HTML) is needed by perl-Sys-Virt-TCK-2.0.0-1.el8.noarch
>   perl(TAP::Formatter::JUnit) is needed by perl-Sys-Virt-TCK-2.0.0-1.el8.noarch
>   perl(TAP::Harness::Archive) is needed by perl-Sys-Virt-TCK-2.0.0-1.el8.noarch
>   perl(accessors) is needed by perl-Sys-Virt-TCK-2.0.0-1.el8.noarch
> 
> on CentOS 8, which looks about right because the corresponding
> packages are not available in the repositories.
> 
> Now the question is: if these are actual build requirements, how can
> the build succeed and the test suite pass?

Well the "build" phase in Perl essentially does nothing more than copying
files from one dir to another dir, so that won't care. The test suite will
need more stuff, but the test suite is fairly minimal in what it does, so
I'm not entirely surprised it passes.

I'm 100% confident if you actually run the TCK though it will fail due to
these missing pieces, most critically the Config::Record module.

I'd probably just leave it disabled on both CentOS but with fixed comments
to say why

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

Re: [libvirt-ci PATCH 2/2] Build libvirt-tck on CentOS 8
Posted by Andrea Bolognani 5 years, 9 months ago
On Mon, 2020-04-20 at 17:58 +0100, Daniel P. Berrangé wrote:
> On Mon, Apr 20, 2020 at 06:52:59PM +0200, Andrea Bolognani wrote:
> > Now the question is: if these are actual build requirements, how can
> > the build succeed and the test suite pass?
> 
> Well the "build" phase in Perl essentially does nothing more than copying
> files from one dir to another dir, so that won't care. The test suite will
> need more stuff, but the test suite is fairly minimal in what it does, so
> I'm not entirely surprised it passes.
> 
> I'm 100% confident if you actually run the TCK though it will fail due to
> these missing pieces, most critically the Config::Record module.
> 
> I'd probably just leave it disabled on both CentOS but with fixed comments
> to say why

Sounds good to me.

Can you ACK the first patch in the series? That one is connected only
by the fact that it also touches CentOS, and it doesn't make a lot of
sense to send it again when I respin this one.

-- 
Andrea Bolognani / Red Hat / Virtualization