From nobody Mon Feb 9 18:19:28 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569940138; cv=none; d=zoho.com; s=zohoarc; b=F5HyZfV/h5ukNC6HQJbLtnUqAGsqBs7k7Bq7FO63G8FBoYb6dtSvSuPkmnJZSt8sC8btEdGOvqCz1Rj4BaA1zEjORxHnLJWPquxF7z2G3fu2eyHzQw4S+cHEIuJoZizWWEgZ0HWuf0cV07mT1P06W+5I/+6YCLM99eaqy4ULjlQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569940138; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=vzG38F53Cpaj49Eb7cvRkXoKaZ9K5cSj2DQQXZEu7js=; b=WMO4acHUYRcXk65hrGmfCF6cD9Ry2ShNihqGVENeOd81KBg9FUjSDmo2T0+ne1lfmsvDTUjauunlVWgbA8ZXm3thOYM+/tXLxnMfzOj793tL2n9Tr4gRgI5yjRnwPCqUtzyN0iI6tqQFumygu6zSKZCOTQMhPjdYAVxAYzi2f9g= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1569940138213409.2983207807288; Tue, 1 Oct 2019 07:28:58 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5EC5E18CB903; Tue, 1 Oct 2019 14:28:56 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2DE6F60F90; Tue, 1 Oct 2019 14:28:56 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id D0A8E8354E; Tue, 1 Oct 2019 14:28:55 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x91ESnQi029551 for ; Tue, 1 Oct 2019 10:28:49 -0400 Received: by smtp.corp.redhat.com (Postfix) id AFB4360468; Tue, 1 Oct 2019 14:28:49 +0000 (UTC) Received: from laerte.brq.redhat.com (unknown [10.43.2.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id DE1C060166; Tue, 1 Oct 2019 14:28:48 +0000 (UTC) From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= To: libvir-list@redhat.com Date: Tue, 1 Oct 2019 16:28:25 +0200 Message-Id: <20191001142833.314631-10-fidencio@redhat.com> In-Reply-To: <20191001142833.314631-1-fidencio@redhat.com> References: <20191001142833.314631-1-fidencio@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Cc: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= , abologna@redhat.com Subject: [libvirt] [jenkins-ci PATCH 09/17] Deal with ninja x ninja-build bin names X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.63]); Tue, 01 Oct 2019 14:28:57 +0000 (UTC) Different OSes have a different name for ninja binary. In some of them, it's called "ninja", in others "ninja-build". Let's allow both in the very same way we already deal with make x gmake and start using a NINJA environmnet variable instead of always relying on "ninja". Signed-off-by: Fabiano Fid=C3=AAncio --- guests/playbooks/build/jobs/meson-build-job.yml | 4 ++-- guests/playbooks/build/jobs/meson-check-job.yml | 2 +- guests/playbooks/build/jobs/meson-rpm-job.yml | 2 +- guests/playbooks/update/tasks/paths.yml | 15 +++++++++++++++ guests/playbooks/update/templates/bashrc.j2 | 1 + jenkins/jobs/meson.yaml | 8 ++++---- 6 files changed, 24 insertions(+), 8 deletions(-) diff --git a/guests/playbooks/build/jobs/meson-build-job.yml b/guests/playb= ooks/build/jobs/meson-build-job.yml index ddb94b6..0f53680 100644 --- a/guests/playbooks/build/jobs/meson-build-job.yml +++ b/guests/playbooks/build/jobs/meson-build-job.yml @@ -10,7 +10,7 @@ mkdir build cd build meson .. . --prefix=3D$VIRT_PREFIX {{ meson_args }} - ninja - ninja install + $NINJA + $NINJA install when: - inventory_hostname in machines diff --git a/guests/playbooks/build/jobs/meson-check-job.yml b/guests/playb= ooks/build/jobs/meson-check-job.yml index cf7a740..ac89cb0 100644 --- a/guests/playbooks/build/jobs/meson-check-job.yml +++ b/guests/playbooks/build/jobs/meson-check-job.yml @@ -7,7 +7,7 @@ {{ global_env }} {{ local_env }} cd build - if ! ninja test + if ! $NINJA test then cat meson-logs/testlog.txt || true exit 1 diff --git a/guests/playbooks/build/jobs/meson-rpm-job.yml b/guests/playboo= ks/build/jobs/meson-rpm-job.yml index f517214..ed75dfc 100644 --- a/guests/playbooks/build/jobs/meson-rpm-job.yml +++ b/guests/playbooks/build/jobs/meson-rpm-job.yml @@ -9,7 +9,7 @@ cd build {{ strip_buildrequires }} rm -f meson-dist/*.tar.{{ archive_format }} - ninja dist + $NINJA dist rpmbuild --clean --define "_topdir `pwd`/rpmbuild" -ta meson-dist/*.ta= r.{{ archive_format }} when: - inventory_hostname in machines diff --git a/guests/playbooks/update/tasks/paths.yml b/guests/playbooks/upd= ate/tasks/paths.yml index 08717ba..9aa8840 100644 --- a/guests/playbooks/update/tasks/paths.yml +++ b/guests/playbooks/update/tasks/paths.yml @@ -12,6 +12,8 @@ - gmake - java - make + - ninja + - ninja-build - su =20 - name: 'Look for files' @@ -52,3 +54,16 @@ make: '{{ commands["make"] }}' when: - make is undefined + +# Prefer ninja-build, fall back to ninja +- name: 'Export paths' + set_fact: + ninja: '{{ commands["ninja-build"] }}' + when: + - commands["ninja-build"] !=3D '' + +- name: 'Export paths' + set_fact: + ninja: '{{ commands["ninja"] }}' + when: + - ninja is undefined diff --git a/guests/playbooks/update/templates/bashrc.j2 b/guests/playbooks= /update/templates/bashrc.j2 index 794398c..d286615 100644 --- a/guests/playbooks/update/templates/bashrc.j2 +++ b/guests/playbooks/update/templates/bashrc.j2 @@ -1,6 +1,7 @@ export PS1=3D"[\u@\h \w]\$ " =20 export MAKE=3D"{{ make }}" +export NINJA=3D"{{ ninja }}" export PYTHON=3D"{{ ansible_python_interpreter }}" =20 export MAKEFLAGS=3D"-j{{ install_vcpus|int + 1 }}" diff --git a/jenkins/jobs/meson.yaml b/jenkins/jobs/meson.yaml index 102d0a4..4d84978 100644 --- a/jenkins/jobs/meson.yaml +++ b/jenkins/jobs/meson.yaml @@ -45,8 +45,8 @@ mkdir build cd build meson .. . --prefix=3D$VIRT_PREFIX {meson_args} - ninja - ninja install + $NINJA + $NINJA install publishers: - email: recipients: '{obj:spam}' @@ -85,7 +85,7 @@ {global_env} {local_env} cd build - if ! ninja test + if ! $NINJA test then cat meson-logs/testlog.txt || true exit 1 @@ -130,7 +130,7 @@ cd build {strip_buildrequires} rm -f meson-dist/*.tar.{archive_format} - ninja dist + $NINJA dist rpmbuild --clean --define "_topdir `pwd`/rpmbuild" -ta meson-dis= t/*.tar.{archive_format} publishers: - email: --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list