From nobody Sat Apr 27 18:47:49 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.74 as permitted sender) client-ip=216.205.24.74; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-74.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.74 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=1585330010; cv=none; d=zohomail.com; s=zohoarc; b=WoPFQZufwG653Ts98CDik8FJUxiFT2kfLXzFp0gaq2blq0Fzxh+qmUhnuG2WnweP4Jx+oO5KLxSbCYFOaMEF+oGkL7D287q+RtW8KBob0CL+pXW0U6qbtU4EiF/iMQswQxIHj3D86rPM6QglKYKnMJiyy3NiyVcf3UcodyLIgUU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1585330010; h=Content-Type:Content-Transfer-Encoding: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; bh=vais1wcIbsiGl2cSM5XGY847B6We0CTFpCBWD33UIEM=; b=Td0rI3ktZxytp3NZVZ8JEAKG3hXqPHEO5JVUjUzgvkL5zeORERZvU8yF7htUUb/UIlWZsXZwYm5Yvv58AZzZCao096YoG5Tx6zHwnSIUZkkzBC0ewsKKrvIFreZVMLErwVv4rX0JOoRA6XMJcmQ3msmex7Sn+md64+AzpPKNNwE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.74 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-74.mimecast.com (us-smtp-delivery-74.mimecast.com [216.205.24.74]) by mx.zohomail.com with SMTPS id 1585330010369244.2755842882833; Fri, 27 Mar 2020 10:26:50 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-199-HOry6QltPJiniUWXga_Y3A-1; Fri, 27 Mar 2020 13:26:46 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 394F21005512; Fri, 27 Mar 2020 17:26:40 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A792C7E303; Fri, 27 Mar 2020 17:26:39 +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 467D318089CF; Fri, 27 Mar 2020 17:26:39 +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 02RHQaY8015195 for ; Fri, 27 Mar 2020 13:26:36 -0400 Received: by smtp.corp.redhat.com (Postfix) id 9FE5F8FBED; Fri, 27 Mar 2020 17:26:36 +0000 (UTC) Received: from kinshicho.usersys.redhat.com (unknown [10.40.195.82]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 662A5CDBD9 for ; Fri, 27 Mar 2020 17:26:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1585330008; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=vais1wcIbsiGl2cSM5XGY847B6We0CTFpCBWD33UIEM=; b=HJ8endIpXWeyeLBQyiqrZcseZNY2DCgisWxwEA1EefIhghx135Beb5XPWA+OlAwvr5J2ox EY85ftWRx1jdM/vY9QgXiI4P9s2TyqxGDFRs5rEjgw3coGfPAi5uDWOV/vCCDHb2oYxmxX KDM4tDFg9KlFI4tkjUyJPgaFIN4DWLg= X-MC-Unique: HOry6QltPJiniUWXga_Y3A-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt-jenkins-ci PATCH 1/3] lcitool: Include paths in the inventory Date: Fri, 27 Mar 2020 18:26:25 +0100 Message-Id: <20200327172627.1110692-2-abologna@redhat.com> In-Reply-To: <20200327172627.1110692-1-abologna@redhat.com> References: <20200327172627.1110692-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Figuring them out at runtime is neat, but in practice they don't change frequently enough for it to be necessary; more importantly, including them in the inventory means we can use them in the Dockerfile generator in addition to the Ansible playbooks. Signed-off-by: Andrea Bolognani Reviewed-by: Daniel P. Berrang=C3=A9 --- guests/host_vars/libvirt-centos-7/main.yml | 9 +++ guests/host_vars/libvirt-centos-8/main.yml | 9 +++ guests/host_vars/libvirt-debian-10/main.yml | 9 +++ guests/host_vars/libvirt-debian-9/main.yml | 9 +++ guests/host_vars/libvirt-debian-sid/main.yml | 9 +++ guests/host_vars/libvirt-fedora-30/main.yml | 9 +++ guests/host_vars/libvirt-fedora-31/main.yml | 9 +++ .../host_vars/libvirt-fedora-rawhide/main.yml | 9 +++ guests/host_vars/libvirt-freebsd-11/main.yml | 9 +++ guests/host_vars/libvirt-freebsd-12/main.yml | 9 +++ .../libvirt-freebsd-current/main.yml | 9 +++ .../host_vars/libvirt-opensuse-151/main.yml | 9 +++ guests/host_vars/libvirt-ubuntu-1604/main.yml | 9 +++ guests/host_vars/libvirt-ubuntu-1804/main.yml | 9 +++ guests/playbooks/update/main.yml | 1 - guests/playbooks/update/tasks/paths.yml | 71 ------------------- 16 files changed, 126 insertions(+), 72 deletions(-) delete mode 100644 guests/playbooks/update/tasks/paths.yml diff --git a/guests/host_vars/libvirt-centos-7/main.yml b/guests/host_vars/= libvirt-centos-7/main.yml index becd297..7f22d9d 100644 --- a/guests/host_vars/libvirt-centos-7/main.yml +++ b/guests/host_vars/libvirt-centos-7/main.yml @@ -20,4 +20,13 @@ package_manager: 'yum' os_name: 'CentOS' os_version: '7' =20 +bash: /bin/bash +ccache: /usr/bin/ccache +java: /usr/bin/java +make: /usr/bin/make +ninja: /usr/bin/ninja-build +python: /usr/bin/python3 +su: /bin/su +sudoers: /etc/sudoers + ansible_python_interpreter: /usr/bin/python2 diff --git a/guests/host_vars/libvirt-centos-8/main.yml b/guests/host_vars/= libvirt-centos-8/main.yml index cb49e9c..bcf4224 100644 --- a/guests/host_vars/libvirt-centos-8/main.yml +++ b/guests/host_vars/libvirt-centos-8/main.yml @@ -20,4 +20,13 @@ package_manager: 'dnf' os_name: 'CentOS' os_version: '8' =20 +bash: /bin/bash +ccache: /usr/bin/ccache +java: /usr/bin/java +make: /usr/bin/make +ninja: /usr/bin/ninja +python: /usr/bin/python3 +su: /bin/su +sudoers: /etc/sudoers + ansible_python_interpreter: /usr/bin/python3 diff --git a/guests/host_vars/libvirt-debian-10/main.yml b/guests/host_vars= /libvirt-debian-10/main.yml index c5d0047..88e1634 100644 --- a/guests/host_vars/libvirt-debian-10/main.yml +++ b/guests/host_vars/libvirt-debian-10/main.yml @@ -22,4 +22,13 @@ package_manager: 'apt-get' os_name: 'Debian' os_version: '10' =20 +bash: /bin/bash +ccache: /usr/bin/ccache +java: /usr/bin/java +make: /usr/bin/make +ninja: /usr/bin/ninja +python: /usr/bin/python3 +su: /bin/su +sudoers: /etc/sudoers + ansible_python_interpreter: /usr/bin/python3 diff --git a/guests/host_vars/libvirt-debian-9/main.yml b/guests/host_vars/= libvirt-debian-9/main.yml index 3addcd4..a6f1a56 100644 --- a/guests/host_vars/libvirt-debian-9/main.yml +++ b/guests/host_vars/libvirt-debian-9/main.yml @@ -22,4 +22,13 @@ package_manager: 'apt-get' os_name: 'Debian' os_version: '9' =20 +bash: /bin/bash +ccache: /usr/bin/ccache +java: /usr/bin/java +make: /usr/bin/make +ninja: /usr/bin/ninja +python: /usr/bin/python3 +su: /bin/su +sudoers: /etc/sudoers + ansible_python_interpreter: /usr/bin/python3 diff --git a/guests/host_vars/libvirt-debian-sid/main.yml b/guests/host_var= s/libvirt-debian-sid/main.yml index a60dd1b..5dd51ff 100644 --- a/guests/host_vars/libvirt-debian-sid/main.yml +++ b/guests/host_vars/libvirt-debian-sid/main.yml @@ -22,4 +22,13 @@ package_manager: 'apt-get' os_name: 'Debian' os_version: 'Sid' =20 +bash: /bin/bash +ccache: /usr/bin/ccache +java: /usr/bin/java +make: /usr/bin/make +ninja: /usr/bin/ninja +python: /usr/bin/python3 +su: /bin/su +sudoers: /etc/sudoers + ansible_python_interpreter: /usr/bin/python3 diff --git a/guests/host_vars/libvirt-fedora-30/main.yml b/guests/host_vars= /libvirt-fedora-30/main.yml index e4ad7ea..a15aff2 100644 --- a/guests/host_vars/libvirt-fedora-30/main.yml +++ b/guests/host_vars/libvirt-fedora-30/main.yml @@ -35,4 +35,13 @@ package_manager: 'dnf' os_name: 'Fedora' os_version: '30' =20 +bash: /bin/bash +ccache: /usr/bin/ccache +java: /usr/bin/java +make: /usr/bin/make +ninja: /usr/bin/ninja +python: /usr/bin/python3 +su: /bin/su +sudoers: /etc/sudoers + ansible_python_interpreter: /usr/bin/python3 diff --git a/guests/host_vars/libvirt-fedora-31/main.yml b/guests/host_vars= /libvirt-fedora-31/main.yml index e605873..4be1a19 100644 --- a/guests/host_vars/libvirt-fedora-31/main.yml +++ b/guests/host_vars/libvirt-fedora-31/main.yml @@ -23,4 +23,13 @@ package_manager: 'dnf' os_name: 'Fedora' os_version: '31' =20 +bash: /bin/bash +ccache: /usr/bin/ccache +java: /usr/bin/java +make: /usr/bin/make +ninja: /usr/bin/ninja +python: /usr/bin/python3 +su: /bin/su +sudoers: /etc/sudoers + ansible_python_interpreter: /usr/bin/python3 diff --git a/guests/host_vars/libvirt-fedora-rawhide/main.yml b/guests/host= _vars/libvirt-fedora-rawhide/main.yml index 1a3338c..3a79a3a 100644 --- a/guests/host_vars/libvirt-fedora-rawhide/main.yml +++ b/guests/host_vars/libvirt-fedora-rawhide/main.yml @@ -23,4 +23,13 @@ package_manager: 'dnf' os_name: 'Fedora' os_version: 'Rawhide' =20 +bash: /bin/bash +ccache: /usr/bin/ccache +java: /usr/bin/java +make: /usr/bin/make +ninja: /usr/bin/ninja +python: /usr/bin/python3 +su: /bin/su +sudoers: /etc/sudoers + ansible_python_interpreter: /usr/bin/python3 diff --git a/guests/host_vars/libvirt-freebsd-11/main.yml b/guests/host_var= s/libvirt-freebsd-11/main.yml index 2de64ef..6234e8a 100644 --- a/guests/host_vars/libvirt-freebsd-11/main.yml +++ b/guests/host_vars/libvirt-freebsd-11/main.yml @@ -21,4 +21,13 @@ package_manager: 'pkg' os_name: 'FreeBSD' os_version: '11' =20 +bash: /usr/local/bin/bash +ccache: /usr/local/bin/ccache +java: /usr/local/bin/java +make: /usr/local/bin/gmake +ninja: /usr/local/bin/ninja +python: /usr/local/bin/python3 +su: /usr/bin/su +sudoers: /usr/local/etc/sudoers + ansible_python_interpreter: /usr/local/bin/python3 diff --git a/guests/host_vars/libvirt-freebsd-12/main.yml b/guests/host_var= s/libvirt-freebsd-12/main.yml index 2e3b935..22a3697 100644 --- a/guests/host_vars/libvirt-freebsd-12/main.yml +++ b/guests/host_vars/libvirt-freebsd-12/main.yml @@ -21,4 +21,13 @@ package_manager: 'pkg' os_name: 'FreeBSD' os_version: '12' =20 +bash: /usr/local/bin/bash +ccache: /usr/local/bin/ccache +java: /usr/local/bin/java +make: /usr/local/bin/gmake +ninja: /usr/local/bin/ninja +python: /usr/local/bin/python3 +su: /usr/bin/su +sudoers: /usr/local/etc/sudoers + ansible_python_interpreter: /usr/local/bin/python3 diff --git a/guests/host_vars/libvirt-freebsd-current/main.yml b/guests/hos= t_vars/libvirt-freebsd-current/main.yml index 9b63d30..fdc7e9b 100644 --- a/guests/host_vars/libvirt-freebsd-current/main.yml +++ b/guests/host_vars/libvirt-freebsd-current/main.yml @@ -21,4 +21,13 @@ package_manager: 'pkg' os_name: 'FreeBSD' os_version: 'Current' =20 +bash: /usr/local/bin/bash +ccache: /usr/local/bin/ccache +java: /usr/local/bin/java +make: /usr/local/bin/gmake +ninja: /usr/local/bin/ninja +python: /usr/local/bin/python3 +su: /usr/bin/su +sudoers: /usr/local/etc/sudoers + ansible_python_interpreter: /usr/local/bin/python3 diff --git a/guests/host_vars/libvirt-opensuse-151/main.yml b/guests/host_v= ars/libvirt-opensuse-151/main.yml index 88d5dfd..bcc5ca3 100644 --- a/guests/host_vars/libvirt-opensuse-151/main.yml +++ b/guests/host_vars/libvirt-opensuse-151/main.yml @@ -21,4 +21,13 @@ package_manager: 'zypper' os_name: 'OpenSUSE' os_version: '151' =20 +bash: /bin/bash +ccache: /usr/bin/ccache +java: /usr/bin/java +make: /usr/bin/make +ninja: /usr/bin/ninja +python: /usr/bin/python3 +su: /bin/su +sudoers: /etc/sudoers + ansible_python_interpreter: /usr/bin/python3 diff --git a/guests/host_vars/libvirt-ubuntu-1604/main.yml b/guests/host_va= rs/libvirt-ubuntu-1604/main.yml index 2754282..b474264 100644 --- a/guests/host_vars/libvirt-ubuntu-1604/main.yml +++ b/guests/host_vars/libvirt-ubuntu-1604/main.yml @@ -21,4 +21,13 @@ package_manager: 'apt-get' os_name: 'Ubuntu' os_version: '1604' =20 +bash: /bin/bash +ccache: /usr/bin/ccache +java: /usr/bin/java +make: /usr/bin/make +ninja: /usr/bin/ninja +python: /usr/bin/python3 +su: /bin/su +sudoers: /etc/sudoers + ansible_python_interpreter: /usr/bin/python3 diff --git a/guests/host_vars/libvirt-ubuntu-1804/main.yml b/guests/host_va= rs/libvirt-ubuntu-1804/main.yml index 027acba..ddfeef2 100644 --- a/guests/host_vars/libvirt-ubuntu-1804/main.yml +++ b/guests/host_vars/libvirt-ubuntu-1804/main.yml @@ -22,4 +22,13 @@ package_manager: 'apt-get' os_name: 'Ubuntu' os_version: '1804' =20 +bash: /bin/bash +ccache: /usr/bin/ccache +java: /usr/bin/java +make: /usr/bin/make +ninja: /usr/bin/ninja +python: /usr/bin/python3 +su: /bin/su +sudoers: /etc/sudoers + ansible_python_interpreter: /usr/bin/python3 diff --git a/guests/playbooks/update/main.yml b/guests/playbooks/update/mai= n.yml index e82055b..107a78a 100644 --- a/guests/playbooks/update/main.yml +++ b/guests/playbooks/update/main.yml @@ -49,7 +49,6 @@ =20 # Configure environment. Needs to happen after installing packages - include: '{{ playbook_base }}/tasks/kludges.yml' - - include: '{{ playbook_base }}/tasks/paths.yml' - include: '{{ playbook_base }}/tasks/bootloader.yml' - include: '{{ playbook_base }}/tasks/services.yml' - include: '{{ playbook_base }}/tasks/users.yml' diff --git a/guests/playbooks/update/tasks/paths.yml b/guests/playbooks/upd= ate/tasks/paths.yml deleted file mode 100644 index c204462..0000000 --- a/guests/playbooks/update/tasks/paths.yml +++ /dev/null @@ -1,71 +0,0 @@ ---- -- set_fact: - commands: {} - files: {} - -- name: 'Look for commands' - shell: 'which {{ item }} 2>/dev/null || true' - register: which - with_items: - - bash - - ccache - - gmake - - java - - make - - ninja - - ninja-build - - python3 - - su - -- name: 'Look for files' - shell: '(find /usr/local/etc -name {{ item }}; find /etc -name {{ item }= }) 2>/dev/null' - register: find - with_items: - - sudoers - -- set_fact: - commands: '{{ commands|combine({ item.item: item.stdout }) }}' - no_log: True - with_items: - '{{ which.results }}' - -- set_fact: - files: '{{ files|combine({ item.item: item.stdout }) }}' - no_log: True - with_items: - '{{ find.results }}' - -- name: 'Export paths' - set_fact: - bash: '{{ commands["bash"] }}' - ccache: '{{ commands["ccache"] }}' - java: '{{ commands["java"] }}' - python: '{{ commands["python3"] }}' - su: '{{ commands["su"] }}' - sudoers: '{{ files["sudoers"] }}' - -# Prefer gmake, fall back to make -- name: 'Export paths' - set_fact: - make: '{{ commands["gmake"] }}' - when: - - commands["gmake"] !=3D '' - -- name: 'Export paths' - set_fact: - make: '{{ commands["make"] }}' - when: - - make is undefined - -# Prefer ninja, fall back to ninja-build -- name: 'Export paths' - set_fact: - ninja: '{{ commands["ninja"] }}' - when: - - commands["ninja"] !=3D '' - -- name: 'Export paths' - set_fact: - ninja: '{{ commands["ninja-build"] }}' - when: - - ninja is undefined --=20 2.25.1 From nobody Sat Apr 27 18:47:49 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.74 as permitted sender) client-ip=63.128.21.74; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-74.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.74 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=1585330020; cv=none; d=zohomail.com; s=zohoarc; b=EXf6szCiCxqSOF1+tCuoZ2E4cam4KhAb/KZ5JZWPFW9w4e+cIi8ocN9mDa0iIFqVTbnzmBDBPB6LGrxGbmSxRd2BFAynJrn9vThert2kFHxaNErVHJKqFwTu9bWqM2kZ0N+7gRBlVH86ifjS0RjnFwbJjK0Np3YmFPia+SrSgoQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1585330020; h=Content-Type:Content-Transfer-Encoding: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; bh=lrVtCheF1QJn4ujFk6YIP7NGD9zNdmoZEQY8azhrC3k=; b=VDCikQzela7XJ5ou1FposFtXqDXUsE7e96XT9hhVJLuagblGnAq48kTrxBEcyJmrRjfg/LlrjN2SmAmSj71Ko2rba0SQ2Gy20jKoiC4sAOJ4zkJRrLPxmvL+TOHIdaRIEduLNCnbQ4FocrDQ5q5LRZACnkp2rU4DXL78UhfSi1w= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.74 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-74.mimecast.com (us-smtp-delivery-74.mimecast.com [63.128.21.74]) by mx.zohomail.com with SMTPS id 1585330020903995.4251395660497; Fri, 27 Mar 2020 10:27:00 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-158-3KB2syYsNyOe1nQ0L5peTg-1; Fri, 27 Mar 2020 13:26:57 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 101B88010C7; Fri, 27 Mar 2020 17:26:52 +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 D8F66CDBCD; Fri, 27 Mar 2020 17:26:51 +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 8FA658A055; Fri, 27 Mar 2020 17:26:51 +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 02RHQcWj015202 for ; Fri, 27 Mar 2020 13:26:38 -0400 Received: by smtp.corp.redhat.com (Postfix) id 4734A907FF; Fri, 27 Mar 2020 17:26:38 +0000 (UTC) Received: from kinshicho.usersys.redhat.com (unknown [10.40.195.82]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 778B98FBED for ; Fri, 27 Mar 2020 17:26:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1585330019; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=lrVtCheF1QJn4ujFk6YIP7NGD9zNdmoZEQY8azhrC3k=; b=Y8d6QcVLsz7Dnrhq2y0TmMsUY1mqCq3PzagJyPCXR/GIXJ1+Bw2J3NoFEyyLfm82s/hSs3 IBts2+G0AK/7w/Q1wCWPs/sEhkmjKHvMlnFHMByvY94TCjDWOVixiI8c9aJX8bYEM20cbD Ih6K6r/saTX2CIsoE6Md2yj0xdFl5nI= X-MC-Unique: 3KB2syYsNyOe1nQ0L5peTg-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt-jenkins-ci PATCH 2/3] lcitool: Refactor varmap generation a bit Date: Fri, 27 Mar 2020 18:26:26 +0100 Message-Id: <20200327172627.1110692-3-abologna@redhat.com> In-Reply-To: <20200327172627.1110692-1-abologna@redhat.com> References: <20200327172627.1110692-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Some values don't depend on whether the underlying OS user deb or rpm as the package format, so we can set them in common code. Signed-off-by: Andrea Bolognani Reviewed-by: Daniel P. Berrang=C3=A9 --- guests/lcitool | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/guests/lcitool b/guests/lcitool index 209380a..b72abec 100755 --- a/guests/lcitool +++ b/guests/lcitool @@ -646,9 +646,16 @@ class Application: =20 def _dockerfile_build_varmap(self, facts, mappings, pip_mappings, proj= ects, cross_arch): if facts["package_format"] =3D=3D "deb": - return self._dockerfile_build_varmap_deb(facts, mappings, pip_= mappings, projects, cross_arch) + varmap =3D self._dockerfile_build_varmap_deb(facts, mappings, = pip_mappings, projects, cross_arch) if facts["package_format"] =3D=3D "rpm": - return self._dockerfile_build_varmap_rpm(facts, mappings, pip_= mappings, projects, cross_arch) + varmap =3D self._dockerfile_build_varmap_rpm(facts, mappings, = pip_mappings, projects, cross_arch) + + varmap["package_manager"] =3D facts["package_manager"] + + if cross_arch: + varmap["cross_abi"] =3D Util.native_arch_to_abi(cross_arch) + + return varmap =20 def _dockerfile_build_varmap_deb(self, facts, mappings, pip_mappings, = projects, cross_arch): package_format =3D facts["package_format"] @@ -700,7 +707,6 @@ class Application: pip_pkg_align =3D " \\\n" + (" " * len("RUN pip3 ")) =20 varmap =3D {} - varmap["package_manager"] =3D package_manager varmap["pkgs"] =3D pkg_align[1:] + pkg_align.join(sorted(set(pkgs.= values()))) =20 if cross_arch: @@ -712,7 +718,6 @@ class Application: pkg_names =3D [p + ":" + deb_arch for p in cross_pkgs.values()] pkg_names.append(gcc) varmap["cross_pkgs"] =3D pkg_align[1:] + pkg_align.join(sorted= (set(pkg_names))) - varmap["cross_abi"] =3D abi varmap["cross_lib"] =3D lib =20 if pip_pkgs: @@ -771,11 +776,9 @@ class Application: pip_pkg_align =3D " \\\n" + (" " * len("RUN pip3 ")) =20 varmap =3D {} - varmap["package_manager"] =3D package_manager varmap["pkgs"] =3D pkg_align[1:] + pkg_align.join(sorted(set(pkgs.= values()))) =20 if cross_arch: - varmap["cross_abi"] =3D Util.native_arch_to_abi(cross_arch) varmap["cross_pkgs"] =3D pkg_align[1:] + pkg_align.join(sorted= (set(cross_pkgs.values()))) =20 if pip_pkgs: --=20 2.25.1 From nobody Sat Apr 27 18:47:49 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.74 as permitted sender) client-ip=216.205.24.74; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-74.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.74 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=1585330012; cv=none; d=zohomail.com; s=zohoarc; b=ERKTIGi/7gJiuREBNKZqp9ZRaM/0RHWQD8W2E7H87Xa0F9IhYa9jtWfIiMo5u+dfF0xurqbRIobmP2/yJAW8HNYiY9Csvt1esbYoirdVSNeVCnln+VffNN8BVHQe+SqGifMD4VYPit3RZ2C77drNgwAJMS68692Vzk/jEfleo7Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1585330012; h=Content-Type:Content-Transfer-Encoding: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; bh=BmSm0O8U1d2Nc28SDEVTT20XEm4pwWiTS8wTpAlnv+g=; b=lAXZBww8ednl/EQI7bu0FtG9X1Px+ky3RAUQ9bqkCOyPEa2b8G7JpLoKBUeYP6r54BE3K2IA3kjokZAvFt3KLmK8iYpkyX23K/vtMvPdTKCsfm6NO6CPG58qeyV8vEivIfcKx1spcFivNFDfX9um3i315bUiX+oLUB9wPqwpCxE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.74 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-74.mimecast.com (us-smtp-delivery-74.mimecast.com [216.205.24.74]) by mx.zohomail.com with SMTPS id 1585330012675125.66648632332613; Fri, 27 Mar 2020 10:26:52 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-213-Z-T4U6bFPSqulkGhmKjLOw-1; Fri, 27 Mar 2020 13:26:49 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 44B8A1005513; Fri, 27 Mar 2020 17:26:43 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 197935E016; Fri, 27 Mar 2020 17:26:43 +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 B9E7918089CF; Fri, 27 Mar 2020 17:26:42 +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 02RHQd6D015210 for ; Fri, 27 Mar 2020 13:26:39 -0400 Received: by smtp.corp.redhat.com (Postfix) id E9EE8907FF; Fri, 27 Mar 2020 17:26:39 +0000 (UTC) Received: from kinshicho.usersys.redhat.com (unknown [10.40.195.82]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DB1B2CDBCD for ; Fri, 27 Mar 2020 17:26:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1585330011; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=BmSm0O8U1d2Nc28SDEVTT20XEm4pwWiTS8wTpAlnv+g=; b=PGe0JB5HVCmcb0HlTrvZbXUR1ySHME12icwe1i22JuuPt0uvaAnU39pTdQxklb+gbH2fvj vffQdgFNUqsIthjyp3WTlWSIs5oZXMIPXAzYXm/cyEtvGN3TSskWefVhm0xSjGgqyNJPCA 07kdvQvXqbBEELC8GKNkzDvWrZR9j2I= X-MC-Unique: Z-T4U6bFPSqulkGhmKjLOw-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt-jenkins-ci PATCH 3/3] lcitool: Include some paths in the generated Dockerfiles Date: Fri, 27 Mar 2020 18:26:27 +0100 Message-Id: <20200327172627.1110692-4-abologna@redhat.com> In-Reply-To: <20200327172627.1110692-1-abologna@redhat.com> References: <20200327172627.1110692-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" These paths are a reflections of the contents of the container image, so it makes sense to expose them in the container's environment. This will allow the GitLab CI integration for both libvirt and libosinfo to stop setting these values themselves and start relying on them being already present in the environment instead. Signed-off-by: Andrea Bolognani Reviewed-by: Daniel P. Berrang=C3=A9 --- guests/lcitool | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/guests/lcitool b/guests/lcitool index b72abec..9559002 100755 --- a/guests/lcitool +++ b/guests/lcitool @@ -651,6 +651,9 @@ class Application: varmap =3D self._dockerfile_build_varmap_rpm(facts, mappings, = pip_mappings, projects, cross_arch) =20 varmap["package_manager"] =3D facts["package_manager"] + varmap["make"] =3D facts["make"] + varmap["ninja"] =3D facts["ninja"] + varmap["python"] =3D facts["python"] =20 if cross_arch: varmap["cross_abi"] =3D Util.native_arch_to_abi(cross_arch) @@ -895,6 +898,10 @@ class Application: =20 sys.stdout.write(textwrap.dedent(""" ENV LANG "en_US.UTF-8" + + ENV MAKE "{make}" + ENV NINJA "{ninja}" + ENV PYTHON "{python}" """).format(**varmap)) =20 if cross_arch: --=20 2.25.1