[libvirt] [jenkins-ci PATCH v3 00/12] Meson, more meson!

The first 5 patches in the series are adding the machinery for installing meson via pip, which will be needed for systems which do not have the minimum required version, as CentOS 7, Debian 9, Ubuntu 16, and Ubuntu 18. Next 3 patches build and test osinfo-db-tools, osinfo-db, and libosinfo on all supported machines as those now have the minimum requirements needed. Following these patches, there's a patch re-enabling virt-manager builds on the systems which are, again, building libosinfo. Next 2 are basically re-enabling syntax-check job for libvirt-dbus on CentOS 7 and removing some misleading comment. Finally, last patch in the series does the libvirt-dbus builds switch to using meson instead of autotools. This version addresses the comments raised by Andrea during v2. Daniel P. Berrangé (1): guests: add flake8 to libvirt project Fabiano Fidêncio (11): mappings: Add python2-setuptools guests: Add python2-setuptools to the base project mappings: Add python3-pip guests: Add python3-pip to the base project guests: Install meson via pip osinfo-db-tools: Build again on all machines osinfo-db: Build again on all machines libosinfo: Build again on all machines virt-manager: Build again on Debian9 and Ubuntu18 libvirt-dbus: Take advantage of Python 3 on CentOS 7 Switch libvirt-dbus to Meson guests/host_vars/libvirt-centos-7/main.yml | 3 ++ guests/host_vars/libvirt-debian-9/main.yml | 4 ++ guests/host_vars/libvirt-ubuntu-16/main.yml | 3 ++ guests/host_vars/libvirt-ubuntu-18/main.yml | 4 ++ guests/lcitool | 25 +++++++++++ guests/playbooks/build/projects/libosinfo.yml | 14 ++---- .../playbooks/build/projects/libvirt-dbus.yml | 28 ++++-------- .../build/projects/osinfo-db-tools.yml | 14 ++---- guests/playbooks/build/projects/osinfo-db.yml | 15 +------ .../playbooks/build/projects/virt-manager.yml | 4 ++ guests/playbooks/update/tasks/packages.yml | 44 +++++++++++++++++++ guests/vars/mappings.yml | 26 +++++++++++ guests/vars/projects/base.yml | 2 + guests/vars/projects/libvirt.yml | 1 + jenkins/projects/libosinfo.yaml | 10 ++--- jenkins/projects/libvirt-dbus.yaml | 26 +++++------ jenkins/projects/osinfo-db-tools.yaml | 12 ++--- jenkins/projects/osinfo-db.yaml | 13 +----- jenkins/projects/virt-manager.yaml | 2 + 19 files changed, 153 insertions(+), 97 deletions(-) -- 2.23.0

From: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> --- guests/vars/projects/libvirt.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/guests/vars/projects/libvirt.yml b/guests/vars/projects/libvirt.yml index 04c3ecd..8fcb286 100644 --- a/guests/vars/projects/libvirt.yml +++ b/guests/vars/projects/libvirt.yml @@ -9,6 +9,7 @@ packages: - dtrace - dwarves - ebtables + - flake8 - fuse - glib2 - glusterfs -- 2.23.0

python-setuptools, which will only be used on CentOS7, is needed in order to properly use the pip module for installing meson. Without this package, we would see failures as `ImportError: No module named pkg_resources` when trying to use the pip module, even when using its python3 version. Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: Andrea Bolognani <abologna@redhat.com> --- guests/vars/mappings.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/guests/vars/mappings.yml b/guests/vars/mappings.yml index 5c32c94..f69937a 100644 --- a/guests/vars/mappings.yml +++ b/guests/vars/mappings.yml @@ -816,6 +816,9 @@ mappings: Fedora: python2-nose FreeBSD: py27-nose + python2-setuptools: + CentOS7: python2-setuptools + python3: default: python3 -- 2.23.0

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: Andrea Bolognani <abologna@redhat.com> --- guests/vars/projects/base.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/guests/vars/projects/base.yml b/guests/vars/projects/base.yml index f008de3..a8c83ac 100644 --- a/guests/vars/projects/base.yml +++ b/guests/vars/projects/base.yml @@ -25,6 +25,7 @@ packages: - patch - perl - pkg-config + - python2-setuptools - rpmbuild - screen - strace -- 2.23.0

pip will be used to install meson on OSes which do not have support to the minimum required version of the project. Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: Andrea Bolognani <abologna@redhat.com> --- guests/vars/mappings.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/guests/vars/mappings.yml b/guests/vars/mappings.yml index f69937a..524cff2 100644 --- a/guests/vars/mappings.yml +++ b/guests/vars/mappings.yml @@ -856,6 +856,12 @@ mappings: FreeBSD: py36-nose CentOS7: python36-nose + python3-pip: + CentOS7: python3-pip + Debian9: python3-pip + Ubuntu16: python3-pip + Ubuntu18: python3-pip + python3-pytest: default: python3-pytest FreeBSD: py36-pytest -- 2.23.0

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: Andrea Bolognani <abologna@redhat.com> --- guests/vars/projects/base.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/guests/vars/projects/base.yml b/guests/vars/projects/base.yml index a8c83ac..ec04fdf 100644 --- a/guests/vars/projects/base.yml +++ b/guests/vars/projects/base.yml @@ -26,6 +26,7 @@ packages: - perl - pkg-config - python2-setuptools + - python3-pip - rpmbuild - screen - strace -- 2.23.0

Let's install meson via pip whenever meson is not available at all or does not match the minimum required version. Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> --- guests/lcitool | 25 ++++++++++++ guests/playbooks/update/tasks/packages.yml | 44 ++++++++++++++++++++++ guests/vars/mappings.yml | 17 +++++++++ 3 files changed, 86 insertions(+) diff --git a/guests/lcitool b/guests/lcitool index 5b5b622..2c08455 100755 --- a/guests/lcitool +++ b/guests/lcitool @@ -303,6 +303,7 @@ class Projects: with open(mappings_path, "r") as infile: mappings = yaml.safe_load(infile) self._mappings = mappings["mappings"] + self._pip_mappings = mappings["pip_mappings"] except Exception as ex: raise Exception("Can't load mappings: {}".format(ex)) @@ -340,6 +341,9 @@ class Projects: def get_mappings(self): return self._mappings + def get_pip_mappings(self): + return self._pip_mappings + def get_packages(self, project): return self._packages[project] @@ -583,6 +587,7 @@ class Application: def _action_dockerfile(self, args): mappings = self._projects.get_mappings() + pip_mappings = self._projects.get_pip_mappings() hosts = self._inventory.expand_pattern(args.hosts) if len(hosts) > 1: @@ -617,6 +622,7 @@ class Application: pkgs = {} cross_pkgs = {} + pip_pkgs = {} base_keys = ["default", package_format, os_name, os_full] cross_keys = [] if args.cross_arch: @@ -641,21 +647,28 @@ class Application: for key in keys: if key in mappings[package]: pkgs[package] = mappings[package][key] + if package in pip_mappings and key in pip_mappings[package]: + pip_pkgs[package] = pip_mappings[package][key] if package not in pkgs: continue + if package in pip_pkgs and pkgs[package] is not None: + del pip_pkgs[package] if cross_policy == "foreign" and pkgs[package] is not None: cross_pkgs[package] = pkgs[package] if pkgs[package] is None or cross_policy in ["skip", "foreign"]: del pkgs[package] pkg_align = " \\\n" + (" " * len("RUN " + package_manager + " ")) + pip_pkg_align = " \\\n" + (" " * len("RUN pip3 ")) print("FROM {}".format(facts["docker_base"])) varmap = {} varmap["package_manager"] = package_manager varmap["pkgs"] = pkg_align[1:] + pkg_align.join(sorted(set(pkgs.values()))) + varmap["pip_pkgs"] = pip_pkg_align[1:] + pip_pkg_align.join(sorted(set(pip_pkgs.values()))) + if package_format == "deb": if args.cross_arch: deb_arch = Util.native_arch_to_deb_arch(args.cross_arch) @@ -691,7 +704,14 @@ class Application: {package_manager} install --no-install-recommends -y {cross_pkgs} && \\ {package_manager} autoremove -y && \\ {package_manager} autoclean -y + """).format(**varmap)) + + if pip_pkgs: + sys.stdout.write(textwrap.dedent(""" + RUN pip3 install {pip_pkgs} + """).format(**varmap)) + sys.stdout.write(textwrap.dedent(""" ENV ABI "{cross_abi}" ENV CONFIGURE_OPTS "--host={cross_abi} \\ --target={cross_abi}" @@ -714,6 +734,11 @@ class Application: {package_manager} clean all -y """).format(**varmap)) + if pip_pkgs: + sys.stdout.write(textwrap.dedent(""" + RUN pip3 install {pip_pkgs} + """).format(**varmap)) + def run(self): args = self._parser.parse_args() if args.debug: diff --git a/guests/playbooks/update/tasks/packages.yml b/guests/playbooks/update/tasks/packages.yml index ec8a4c4..c041eab 100644 --- a/guests/playbooks/update/tasks/packages.yml +++ b/guests/playbooks/update/tasks/packages.yml @@ -100,3 +100,47 @@ package: name: '{{ flattened|sort }}' state: '{{ state }}' + +- set_fact: + pip_temp: {} + +- name: '{{ project }}: Verify pip mappings' + fail: + msg: 'No mappings defined for {{ item }}' + with_items: + '{{ packages }}' + when: + - pip_mappings[item] is undefined + +- name: '{{ project }}: Look up pip mappings (default)' + set_fact: + pip_temp: '{{ pip_temp|combine({ item: pip_mappings[item]["default"] }) }}' + with_items: + '{{ packages }}' + when: + - pip_mappings[item]["default"] is defined + +- set_fact: + pip_flattened: [] + +- name: '{{ project }}: Flatten pip package list' + set_fact: + pip_flattened: '{{ pip_flattened }} + [ "{{ pip_temp[item] }}" ]' + with_items: + '{{ temp }}' + when: + - pip_temp[item] != None + - pip_temp[item] not in pip_flattened + +- name: '{{ project }}: Install packages from pip (state={{ state }})' + pip: + name: '{{ pip_flattened|sort }}' + executable: pip3 + state: '{{ state }}' + with_items: + '{{ packages }}' + when: + - temp[item] is defined + - temp[item] == None + - pip_temp[item] is defined + - pip_temp[item] != None diff --git a/guests/vars/mappings.yml b/guests/vars/mappings.yml index 524cff2..ba0f1cf 100644 --- a/guests/vars/mappings.yml +++ b/guests/vars/mappings.yml @@ -1007,3 +1007,20 @@ mappings: deb: zlib1g-dev rpm: zlib-static cross-policy-deb: foreign + + +# Pip mappings are used to map the generic packages name used to define +# projects to the specific package name and version which will be used when +# installing them via pip. +# +# pip packages' name are not different between different OSes, thus only +# the default "priority" is taken into account. +# +# In case we need to stick to a specific version of a pip package, it can +# be represented by adding "==$version" to the pip package name, as done +# with the meson package. + +pip_mappings: + + meson: + default: meson==0.49.0 -- 2.23.0

On Tue, 2019-10-08 at 22:48 +0200, Fabiano Fidêncio wrote:
+- name: '{{ project }}: Verify pip mappings' + fail: + msg: 'No mappings defined for {{ item }}' + with_items: + '{{ packages }}' + when: + - pip_mappings[item] is undefined
Turns out you actually need the mappings[item] is undefined check here O:-) I'll add it back.
+- name: '{{ project }}: Flatten pip package list' + set_fact: + pip_flattened: '{{ pip_flattened }} + [ "{{ pip_temp[item] }}" ]' + with_items: + '{{ temp }}'
This should be with_items: '{{ pip_temp }}' With these two issues addressed, Reviewed-by: Andrea Bolognani <abologna@redhat.com> I'll push patches 2-11 now. -- Andrea Bolognani / Red Hat / Virtualization

As now we've the needed packages for building and testing osinfo-db-tools on all systems supported by libvirt-jenkins-ci, let's build osinfo-db-tools everywhere. RPM build is still not possible in CentOS7 as it doesn't have the needed RPM macros for Meson. Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: Andrea Bolognani <abologna@redhat.com> --- guests/host_vars/libvirt-centos-7/main.yml | 1 + guests/host_vars/libvirt-debian-9/main.yml | 1 + guests/host_vars/libvirt-ubuntu-16/main.yml | 1 + guests/host_vars/libvirt-ubuntu-18/main.yml | 1 + .../playbooks/build/projects/osinfo-db-tools.yml | 14 +++----------- jenkins/projects/osinfo-db-tools.yaml | 12 +++--------- 6 files changed, 10 insertions(+), 20 deletions(-) diff --git a/guests/host_vars/libvirt-centos-7/main.yml b/guests/host_vars/libvirt-centos-7/main.yml index 4e3ce85..908aeef 100644 --- a/guests/host_vars/libvirt-centos-7/main.yml +++ b/guests/host_vars/libvirt-centos-7/main.yml @@ -7,6 +7,7 @@ projects: - libvirt-ocaml - libvirt-perl - libvirt-python + - osinfo-db-tools - virt-viewer package_format: 'rpm' diff --git a/guests/host_vars/libvirt-debian-9/main.yml b/guests/host_vars/libvirt-debian-9/main.yml index c388ee8..054f4e0 100644 --- a/guests/host_vars/libvirt-debian-9/main.yml +++ b/guests/host_vars/libvirt-debian-9/main.yml @@ -10,6 +10,7 @@ projects: - libvirt-python - libvirt-sandbox - libvirt-tck + - osinfo-db-tools - virt-viewer package_format: 'deb' diff --git a/guests/host_vars/libvirt-ubuntu-16/main.yml b/guests/host_vars/libvirt-ubuntu-16/main.yml index bed11d4..89d4c96 100644 --- a/guests/host_vars/libvirt-ubuntu-16/main.yml +++ b/guests/host_vars/libvirt-ubuntu-16/main.yml @@ -10,6 +10,7 @@ projects: - libvirt-python - libvirt-sandbox - libvirt-tck + - osinfo-db-tools - virt-viewer package_format: 'deb' diff --git a/guests/host_vars/libvirt-ubuntu-18/main.yml b/guests/host_vars/libvirt-ubuntu-18/main.yml index 199b2bb..7ce6711 100644 --- a/guests/host_vars/libvirt-ubuntu-18/main.yml +++ b/guests/host_vars/libvirt-ubuntu-18/main.yml @@ -10,6 +10,7 @@ projects: - libvirt-python - libvirt-sandbox - libvirt-tck + - osinfo-db-tools - virt-viewer package_format: 'deb' diff --git a/guests/playbooks/build/projects/osinfo-db-tools.yml b/guests/playbooks/build/projects/osinfo-db-tools.yml index 67e5f00..68eb620 100644 --- a/guests/playbooks/build/projects/osinfo-db-tools.yml +++ b/guests/playbooks/build/projects/osinfo-db-tools.yml @@ -1,17 +1,7 @@ --- - set_fact: name: osinfo-db-tools - # osinfo-db-tools depends on meson 0.49.0, which is not available on - # CentOS 7, Debian 9, Ubuntu 18; - machines: - - libvirt-debian-10 - - libvirt-debian-sid - - libvirt-fedora-29 - - libvirt-fedora-30 - - libvirt-fedora-rawhide - - libvirt-freebsd-11 - - libvirt-freebsd-12 - - libvirt-freebsd-current + machines: '{{ all_machines }}' archive_format: xz git_url: '{{ git_urls["osinfo-db-tools"][git_remote] }}' @@ -20,6 +10,8 @@ - include: '{{ playbook_base }}/jobs/meson-check-job.yml' - include: '{{ playbook_base }}/jobs/meson-rpm-job.yml' vars: + # RPM build is still not possible on CentOS7 as it does not + # have the needed RPM macros for meson. machines: - libvirt-fedora-29 - libvirt-fedora-30 diff --git a/jenkins/projects/osinfo-db-tools.yaml b/jenkins/projects/osinfo-db-tools.yaml index 8609b46..121da37 100644 --- a/jenkins/projects/osinfo-db-tools.yaml +++ b/jenkins/projects/osinfo-db-tools.yaml @@ -1,15 +1,7 @@ --- - project: name: osinfo-db-tools - # osinfo-db-tools requires meson 0.49.0, which is not available on - # CentOS 7 and Debian 9; - machines: - - libvirt-debian-10 - - libvirt-fedora-29 - - libvirt-fedora-30 - - libvirt-fedora-rawhide - - libvirt-freebsd-11 - - libvirt-freebsd-12 + machines: '{all_machines}' title: osinfo database tools archive_format: xz git_url: '{git_urls[osinfo-db-tools][default]}' @@ -20,6 +12,8 @@ parent_jobs: 'osinfo-db-tools-build' - meson-rpm-job: parent_jobs: 'osinfo-db-tools-check' + # RPM build is still not possible on CentOS7 as it does not + # have the needed RPM macros for meson. machines: - libvirt-fedora-29 - libvirt-fedora-30 -- 2.23.0

As now we've the needed packages for building and testing osinfo-db on all systems supported by libvirt-jenkins-ci, let's build osinfo-db everywhere. Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: Andrea Bolognani <abologna@redhat.com> --- guests/host_vars/libvirt-centos-7/main.yml | 1 + guests/host_vars/libvirt-debian-9/main.yml | 1 + guests/host_vars/libvirt-ubuntu-16/main.yml | 1 + guests/host_vars/libvirt-ubuntu-18/main.yml | 1 + guests/playbooks/build/projects/osinfo-db.yml | 15 ++------------- jenkins/projects/osinfo-db.yaml | 13 ++----------- 6 files changed, 8 insertions(+), 24 deletions(-) diff --git a/guests/host_vars/libvirt-centos-7/main.yml b/guests/host_vars/libvirt-centos-7/main.yml index 908aeef..17f3123 100644 --- a/guests/host_vars/libvirt-centos-7/main.yml +++ b/guests/host_vars/libvirt-centos-7/main.yml @@ -7,6 +7,7 @@ projects: - libvirt-ocaml - libvirt-perl - libvirt-python + - osinfo-db - osinfo-db-tools - virt-viewer diff --git a/guests/host_vars/libvirt-debian-9/main.yml b/guests/host_vars/libvirt-debian-9/main.yml index 054f4e0..c6d774c 100644 --- a/guests/host_vars/libvirt-debian-9/main.yml +++ b/guests/host_vars/libvirt-debian-9/main.yml @@ -10,6 +10,7 @@ projects: - libvirt-python - libvirt-sandbox - libvirt-tck + - osinfo-db - osinfo-db-tools - virt-viewer diff --git a/guests/host_vars/libvirt-ubuntu-16/main.yml b/guests/host_vars/libvirt-ubuntu-16/main.yml index 89d4c96..7fc7411 100644 --- a/guests/host_vars/libvirt-ubuntu-16/main.yml +++ b/guests/host_vars/libvirt-ubuntu-16/main.yml @@ -10,6 +10,7 @@ projects: - libvirt-python - libvirt-sandbox - libvirt-tck + - osinfo-db - osinfo-db-tools - virt-viewer diff --git a/guests/host_vars/libvirt-ubuntu-18/main.yml b/guests/host_vars/libvirt-ubuntu-18/main.yml index 7ce6711..7197037 100644 --- a/guests/host_vars/libvirt-ubuntu-18/main.yml +++ b/guests/host_vars/libvirt-ubuntu-18/main.yml @@ -10,6 +10,7 @@ projects: - libvirt-python - libvirt-sandbox - libvirt-tck + - osinfo-db - osinfo-db-tools - virt-viewer diff --git a/guests/playbooks/build/projects/osinfo-db.yml b/guests/playbooks/build/projects/osinfo-db.yml index 1952827..cc88fe8 100644 --- a/guests/playbooks/build/projects/osinfo-db.yml +++ b/guests/playbooks/build/projects/osinfo-db.yml @@ -1,15 +1,7 @@ --- - set_fact: name: osinfo-db - machines: - - libvirt-debian-10 - - libvirt-debian-sid - - libvirt-fedora-29 - - libvirt-fedora-30 - - libvirt-fedora-rawhide - - libvirt-freebsd-11 - - libvirt-freebsd-12 - - libvirt-freebsd-current + machines: '{{ all_machines }}' archive_format: xz git_url: '{{ git_urls["osinfo-db"][git_remote] }}' @@ -25,10 +17,7 @@ $MAKE check - include: '{{ playbook_base }}/jobs/generic-rpm-job.yml' vars: - machines: - - libvirt-fedora-29 - - libvirt-fedora-30 - - libvirt-fedora-rawhide + machines: '{{ rpm_machines }}' command: | {{ strip_buildrequires }} rpmbuild --clean --define "_topdir `pwd`/rpmbuild" --define "_sourcedir `pwd`" -ba osinfo-db.spec diff --git a/jenkins/projects/osinfo-db.yaml b/jenkins/projects/osinfo-db.yaml index 7074fd1..87b6748 100644 --- a/jenkins/projects/osinfo-db.yaml +++ b/jenkins/projects/osinfo-db.yaml @@ -1,13 +1,7 @@ --- - project: name: osinfo-db - machines: - - libvirt-debian-10 - - libvirt-fedora-29 - - libvirt-fedora-30 - - libvirt-fedora-rawhide - - libvirt-freebsd-11 - - libvirt-freebsd-12 + machines: '{all_machines}' title: osinfo database archive_format: xz git_url: '{git_urls[osinfo-db][default]}' @@ -23,10 +17,7 @@ $MAKE check - generic-rpm-job: parent_jobs: 'osinfo-db-check' - machines: - - libvirt-fedora-29 - - libvirt-fedora-30 - - libvirt-fedora-rawhide + machines: '{rpm_machines}' command: | {strip_buildrequires} rpmbuild --clean --define "_topdir `pwd`/rpmbuild" --define "_sourcedir `pwd`" -ba osinfo-db.spec -- 2.23.0

As now we've the needed packages for building and testing libosinfo on all systems supported by libvirt-jenkins-ci, let's build libosinfo everywhere. RPM build is still not possible in CentOS7 as it doesn't have the needed RPM macros for Meson. Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: Andrea Bolognani <abologna@redhat.com> --- guests/host_vars/libvirt-centos-7/main.yml | 1 + guests/host_vars/libvirt-debian-9/main.yml | 1 + guests/host_vars/libvirt-ubuntu-16/main.yml | 1 + guests/host_vars/libvirt-ubuntu-18/main.yml | 1 + guests/playbooks/build/projects/libosinfo.yml | 14 +++----------- jenkins/projects/libosinfo.yaml | 10 +++------- 6 files changed, 10 insertions(+), 18 deletions(-) diff --git a/guests/host_vars/libvirt-centos-7/main.yml b/guests/host_vars/libvirt-centos-7/main.yml index 17f3123..94e29af 100644 --- a/guests/host_vars/libvirt-centos-7/main.yml +++ b/guests/host_vars/libvirt-centos-7/main.yml @@ -1,5 +1,6 @@ --- projects: + - libosinfo - libvirt - libvirt-cim - libvirt-dbus diff --git a/guests/host_vars/libvirt-debian-9/main.yml b/guests/host_vars/libvirt-debian-9/main.yml index c6d774c..6ac3808 100644 --- a/guests/host_vars/libvirt-debian-9/main.yml +++ b/guests/host_vars/libvirt-debian-9/main.yml @@ -1,5 +1,6 @@ --- projects: + - libosinfo - libvirt - libvirt-dbus - libvirt-glib diff --git a/guests/host_vars/libvirt-ubuntu-16/main.yml b/guests/host_vars/libvirt-ubuntu-16/main.yml index 7fc7411..179dd03 100644 --- a/guests/host_vars/libvirt-ubuntu-16/main.yml +++ b/guests/host_vars/libvirt-ubuntu-16/main.yml @@ -1,5 +1,6 @@ --- projects: + - libosinfo - libvirt - libvirt-dbus - libvirt-glib diff --git a/guests/host_vars/libvirt-ubuntu-18/main.yml b/guests/host_vars/libvirt-ubuntu-18/main.yml index 7197037..e9a5a7b 100644 --- a/guests/host_vars/libvirt-ubuntu-18/main.yml +++ b/guests/host_vars/libvirt-ubuntu-18/main.yml @@ -1,5 +1,6 @@ --- projects: + - libosinfo - libvirt - libvirt-dbus - libvirt-glib diff --git a/guests/playbooks/build/projects/libosinfo.yml b/guests/playbooks/build/projects/libosinfo.yml index f06dbb3..bb583c7 100644 --- a/guests/playbooks/build/projects/libosinfo.yml +++ b/guests/playbooks/build/projects/libosinfo.yml @@ -1,17 +1,7 @@ --- - set_fact: name: libosinfo - # libosinfo depends on meson 0.49.0, which is not available on - # CentOS 7, Debian 9, Ubuntu 18; - machines: - - libvirt-debian-10 - - libvirt-debian-sid - - libvirt-fedora-29 - - libvirt-fedora-30 - - libvirt-fedora-rawhide - - libvirt-freebsd-11 - - libvirt-freebsd-12 - - libvirt-freebsd-current + machines: '{{ all_machines }}' archive_format: xz git_url: '{{ git_urls["libosinfo"][git_remote] }}' @@ -20,6 +10,8 @@ - include: '{{ playbook_base }}/jobs/meson-check-job.yml' - include: '{{ playbook_base }}/jobs/meson-rpm-job.yml' vars: + # RPM build is still not possible on CentOS7 as it does not + # have the needed RPM macros for meson. machines: - libvirt-fedora-29 - libvirt-fedora-30 diff --git a/jenkins/projects/libosinfo.yaml b/jenkins/projects/libosinfo.yaml index b38524e..90fc465 100644 --- a/jenkins/projects/libosinfo.yaml +++ b/jenkins/projects/libosinfo.yaml @@ -3,13 +3,7 @@ name: libosinfo # libosinfo depends on meson 0.49.0, which is not available on # CentOS 7, Debian 9, Ubuntu 18; - machines: - - libvirt-debian-10 - - libvirt-fedora-29 - - libvirt-fedora-30 - - libvirt-fedora-rawhide - - libvirt-freebsd-11 - - libvirt-freebsd-12 + machines: '{all_machines}' title: libosinfo archive_format: xz git_url: '{git_urls[libosinfo][default]}' @@ -20,6 +14,8 @@ parent_jobs: 'libosinfo-build' - meson-rpm-job: parent_jobs: 'libosinfo-check' + # RPM build is still not possible on CentOS7 as it does not + # have the needed RPM macros for meson. machines: - libvirt-fedora-29 - libvirt-fedora-30 -- 2.23.0

As osinfo-db-tools, osindo-db, and libosinfo can now be built again on Debian9 and Ubuntu18, let's enable virt-manager builds on those OSes as well. This commit partilly reverts 570143fc41fa270. Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> --- guests/host_vars/libvirt-debian-9/main.yml | 1 + guests/host_vars/libvirt-ubuntu-18/main.yml | 1 + guests/playbooks/build/projects/virt-manager.yml | 4 ++++ jenkins/projects/virt-manager.yaml | 2 ++ 4 files changed, 8 insertions(+) diff --git a/guests/host_vars/libvirt-debian-9/main.yml b/guests/host_vars/libvirt-debian-9/main.yml index 6ac3808..6b685a4 100644 --- a/guests/host_vars/libvirt-debian-9/main.yml +++ b/guests/host_vars/libvirt-debian-9/main.yml @@ -13,6 +13,7 @@ projects: - libvirt-tck - osinfo-db - osinfo-db-tools + - virt-manager - virt-viewer package_format: 'deb' diff --git a/guests/host_vars/libvirt-ubuntu-18/main.yml b/guests/host_vars/libvirt-ubuntu-18/main.yml index e9a5a7b..5b5bf0c 100644 --- a/guests/host_vars/libvirt-ubuntu-18/main.yml +++ b/guests/host_vars/libvirt-ubuntu-18/main.yml @@ -13,6 +13,7 @@ projects: - libvirt-tck - osinfo-db - osinfo-db-tools + - virt-manager - virt-viewer package_format: 'deb' diff --git a/guests/playbooks/build/projects/virt-manager.yml b/guests/playbooks/build/projects/virt-manager.yml index 0078fbe..f955f4c 100644 --- a/guests/playbooks/build/projects/virt-manager.yml +++ b/guests/playbooks/build/projects/virt-manager.yml @@ -5,6 +5,7 @@ # Ubuntu 16.04 has Python 3 but not the libxml2 bindings, so it can't # build the project either machines: + - libvirt-debian-9 - libvirt-debian-10 - libvirt-debian-sid - libvirt-fedora-29 @@ -13,6 +14,7 @@ - libvirt-freebsd-11 - libvirt-freebsd-12 - libvirt-freebsd-current + - libvirt-ubuntu-18 archive_format: gz git_url: '{{ git_urls["virt-manager"][git_remote] }}' @@ -27,11 +29,13 @@ # so skip the test suite there for the time being. See # https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=224902 machines: + - libvirt-debian-9 - libvirt-debian-10 - libvirt-debian-sid - libvirt-fedora-29 - libvirt-fedora-30 - libvirt-fedora-rawhide + - libvirt-ubuntu-18 - include: '{{ playbook_base }}/jobs/python-distutils-rpm-job.yml' vars: machines: diff --git a/jenkins/projects/virt-manager.yaml b/jenkins/projects/virt-manager.yaml index fe6b903..2577ea9 100644 --- a/jenkins/projects/virt-manager.yaml +++ b/jenkins/projects/virt-manager.yaml @@ -5,6 +5,7 @@ # Ubuntu 16.04 has Python 3 but not the libxml2 bindings, so it can't # build the project either machines: + - libvirt-debian-9 - libvirt-debian-10 - libvirt-fedora-29 - libvirt-fedora-30 @@ -27,6 +28,7 @@ # so skip the test suite there for the time being. See # https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=224902 machines: + - libvirt-debian-9 - libvirt-debian-10 - libvirt-fedora-29 - libvirt-fedora-30 -- 2.23.0

As latest CentOS 7 has added python3, CentOS 7 has support to python3, let's run syntax-check job the project. Also, let's update the comment explaining that we don't run `make check` on CentOS 7 because python3-pytest version is too old. Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: Andrea Bolognani <abologna@redhat.com> --- guests/playbooks/build/projects/libvirt-dbus.yml | 10 +++++----- jenkins/projects/libvirt-dbus.yaml | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/guests/playbooks/build/projects/libvirt-dbus.yml b/guests/playbooks/build/projects/libvirt-dbus.yml index 218bcc1..148be8f 100644 --- a/guests/playbooks/build/projects/libvirt-dbus.yml +++ b/guests/playbooks/build/projects/libvirt-dbus.yml @@ -9,10 +9,10 @@ - include: '{{ playbook_base }}/jobs/autotools-build-job.yml' - include: '{{ playbook_base }}/jobs/autotools-syntax-check-job.yml' vars: - # CentOS 7 doesn't include Python 3, while the versions of flake8 - # and pyflakes currently available on FreeBSD (3.5.0 and 2.0.0 - # respectively) are not compatible + # flake8 and pyflakes versions currently available on FreeBSD + # (3.5.0 and 2.0.0 respectively) are not compatible. machines: + - libvirt-centos-7 - libvirt-debian-9 - libvirt-debian-10 - libvirt-debian-sid @@ -23,8 +23,8 @@ - libvirt-ubuntu-18 - include: '{{ playbook_base }}/jobs/autotools-check-job.yml' vars: - # CentOS 7 doesn't include Python 3 and the version in Ubuntu - # 16.04 is too old + # Python3 version in Ubuntu 16.04 and python3-pytest version + # in CentOS 7 are too old. machines: - libvirt-debian-9 - libvirt-debian-10 diff --git a/jenkins/projects/libvirt-dbus.yaml b/jenkins/projects/libvirt-dbus.yaml index f7a52ef..b4f5e1e 100644 --- a/jenkins/projects/libvirt-dbus.yaml +++ b/jenkins/projects/libvirt-dbus.yaml @@ -10,10 +10,10 @@ parent_jobs: 'libvirt-glib-build' - autotools-syntax-check-job: parent_jobs: 'libvirt-dbus-build' - # CentOS 7 doesn't include Python 3, while the versions of flake8 - # and pyflakes currently available on FreeBSD (3.5.0 and 2.0.0 - # respectively) are not compatible + # flake8 and pyflakes versions currently available on FreeBSD + # (3.5.0 and 2.0.0 respectively) are not compatible. machines: + - libvirt-centos-7 - libvirt-debian-9 - libvirt-debian-10 - libvirt-fedora-29 @@ -21,8 +21,8 @@ - libvirt-fedora-rawhide - autotools-check-job: parent_jobs: 'libvirt-dbus-syntax-check' - # CentOS 7 doesn't include Python 3 and the version in Ubuntu - # 16.04 is too old + # Python 3 version in Ubuntu 16.04 and python3-pytest version + # in CentOS 7 are too old. machines: - libvirt-debian-9 - libvirt-debian-10 -- 2.23.0

As libvirt-dbus has switched to using Meson instead of autotools, let's switch its jobs here. During the switch, `make check` and `make syntax-check` got merged into `ninja test`, which is reflected here by merging those two jobs. Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: Andrea Bolognani <abologna@redhat.com> --- .../playbooks/build/projects/libvirt-dbus.yml | 24 ++++++------------- jenkins/projects/libvirt-dbus.yaml | 22 +++++++---------- 2 files changed, 15 insertions(+), 31 deletions(-) diff --git a/guests/playbooks/build/projects/libvirt-dbus.yml b/guests/playbooks/build/projects/libvirt-dbus.yml index 148be8f..910fa65 100644 --- a/guests/playbooks/build/projects/libvirt-dbus.yml +++ b/guests/playbooks/build/projects/libvirt-dbus.yml @@ -6,36 +6,26 @@ git_url: '{{ git_urls["libvirt-dbus"][git_remote] }}' - include: '{{ playbook_base }}/jobs/prepare.yml' -- include: '{{ playbook_base }}/jobs/autotools-build-job.yml' -- include: '{{ playbook_base }}/jobs/autotools-syntax-check-job.yml' +- include: '{{ playbook_base }}/jobs/meson-build-job.yml' +- include: '{{ playbook_base }}/jobs/meson-check-job.yml' vars: # flake8 and pyflakes versions currently available on FreeBSD # (3.5.0 and 2.0.0 respectively) are not compatible. + # Python3 version in Ubuntu 16.04 and python3-pytest version + # in CentOS 7 are too old. machines: - - libvirt-centos-7 - libvirt-debian-9 - libvirt-debian-10 - libvirt-debian-sid - libvirt-fedora-29 - libvirt-fedora-30 - libvirt-fedora-rawhide - - libvirt-ubuntu-16 - libvirt-ubuntu-18 -- include: '{{ playbook_base }}/jobs/autotools-check-job.yml' +- include: '{{ playbook_base }}/jobs/meson-rpm-job.yml' vars: - # Python3 version in Ubuntu 16.04 and python3-pytest version - # in CentOS 7 are too old. + # RPM build is still not possible on CentOS7 as it does not + # have the needed RPM macros for meson. machines: - - libvirt-debian-9 - - libvirt-debian-10 - - libvirt-debian-sid - libvirt-fedora-29 - libvirt-fedora-30 - libvirt-fedora-rawhide - - libvirt-freebsd-11 - - libvirt-freebsd-12 - - libvirt-freebsd-current - - libvirt-ubuntu-18 -- include: '{{ playbook_base }}/jobs/autotools-rpm-job.yml' - vars: - machines: '{{ rpm_machines }}' diff --git a/jenkins/projects/libvirt-dbus.yaml b/jenkins/projects/libvirt-dbus.yaml index b4f5e1e..7a1e8f3 100644 --- a/jenkins/projects/libvirt-dbus.yaml +++ b/jenkins/projects/libvirt-dbus.yaml @@ -6,31 +6,25 @@ archive_format: xz git_url: '{git_urls[libvirt-dbus][default]}' jobs: - - autotools-build-job: + - meson-build-job: parent_jobs: 'libvirt-glib-build' - - autotools-syntax-check-job: + - meson-check-job: parent_jobs: 'libvirt-dbus-build' # flake8 and pyflakes versions currently available on FreeBSD # (3.5.0 and 2.0.0 respectively) are not compatible. + # Python3 version in Ubuntu 16.04 and python3-pytest version + # in CentOS 7 are too old. machines: - - libvirt-centos-7 - libvirt-debian-9 - libvirt-debian-10 - libvirt-fedora-29 - libvirt-fedora-30 - libvirt-fedora-rawhide - - autotools-check-job: - parent_jobs: 'libvirt-dbus-syntax-check' - # Python 3 version in Ubuntu 16.04 and python3-pytest version - # in CentOS 7 are too old. + - meson-rpm-job: + parent_jobs: 'libvirt-dbus-check' + # RPM build is still not possible on CentOS7 as it does not + # have the needed RPM macros for meson. machines: - - libvirt-debian-9 - - libvirt-debian-10 - libvirt-fedora-29 - libvirt-fedora-30 - libvirt-fedora-rawhide - - libvirt-freebsd-11 - - libvirt-freebsd-12 - - autotools-rpm-job: - parent_jobs: 'libvirt-dbus-check' - machines: '{rpm_machines}' -- 2.23.0
participants (2)
-
Andrea Bolognani
-
Fabiano Fidêncio