From nobody Sun Apr 28 23:46:13 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=1585337812; cv=none; d=zohomail.com; s=zohoarc; b=ZdDM+HdIDmop7Vja9zwxS/+89t/27DSSwADDQESPwatgaLMUPhMiIr33sNPSi04LOgAVkSkOGWbF4AZO4SP/C3h4YGrKNPHJOpNEZSoBZOma4Ai3qF/310QDHobd+mEv/QA+urXt4hdh6Y3ftrKxeXPJIc6gASKN78KKXW5FUFg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1585337812; 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=1A23Ah3araeHjcmmW6Bmxomu5umvURoh0Nrn59L3Em4=; b=QHdEQC+2gmPys/DY5xM/DDbL8CaXhaWfX7wMdjfKz4YYXgW2HEVDdRVQcQPbIA2NDG9J7ipZGxvClUMzOMhI4cZs30/I9/yMbyUxWc0xmCcthj4KxI23x6aU3fCkOBk+DqrvFEasg+p92Wg74SRezwdXlcQZIMdcjNNP9K5qY1Y= 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 1585337812595890.2491293388993; Fri, 27 Mar 2020 12:36: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-292-C1V6AxkePSigeLdvRzmqKQ-1; Fri, 27 Mar 2020 15:36:49 -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 EB53A13F8; Fri, 27 Mar 2020 19:36: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 B8D8C92F93; Fri, 27 Mar 2020 19:36: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 5D8D91803C33; Fri, 27 Mar 2020 19:36:43 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 02RJZAEN019003 for ; Fri, 27 Mar 2020 15:35:10 -0400 Received: by smtp.corp.redhat.com (Postfix) id E1B7E1001B2D; Fri, 27 Mar 2020 19:35:10 +0000 (UTC) Received: from kinshicho.usersys.redhat.com (unknown [10.40.195.82]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 14AE51001B28 for ; Fri, 27 Mar 2020 19:35:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1585337811; 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=1A23Ah3araeHjcmmW6Bmxomu5umvURoh0Nrn59L3Em4=; b=IKi3Kzqkm02gkgIL9dXPw22inqOWU4r9Toei0jOO60UCyWpGSnSXHUAFiJBKww7cpn3GMk bwzSe76bPcZln5KPPUTDLXvPGx/McGcB5v6b2FjcoOd1FwLpXGOe+p5R7aTgVJjgoToK5I rxTCiRw3LTXkQnNK9aXvY4YNvOddtQ4= X-MC-Unique: C1V6AxkePSigeLdvRzmqKQ-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt-jenkins-ci PATCH 1/7] lcitool: Improve ccache symlinks creation Date: Fri, 27 Mar 2020 20:34:53 +0100 Message-Id: <20200327193459.1335921-2-abologna@redhat.com> In-Reply-To: <20200327193459.1335921-1-abologna@redhat.com> References: <20200327193459.1335921-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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" Instead of having the same code snippet twice, once for Linux and once for FreeBSD, the only actual difference being the name of the compiler, include the compiler's path in the inventory among other paths and then figure out the correct name for the symlink based on that information. Signed-off-by: Andrea Bolognani Reviewed-by: Daniel P. Berrang=C3=A9 --- guests/host_vars/libvirt-centos-7/main.yml | 1 + guests/host_vars/libvirt-centos-8/main.yml | 1 + guests/host_vars/libvirt-debian-10/main.yml | 1 + guests/host_vars/libvirt-debian-9/main.yml | 1 + guests/host_vars/libvirt-debian-sid/main.yml | 1 + guests/host_vars/libvirt-fedora-30/main.yml | 1 + guests/host_vars/libvirt-fedora-31/main.yml | 1 + .../host_vars/libvirt-fedora-rawhide/main.yml | 1 + guests/host_vars/libvirt-freebsd-11/main.yml | 1 + guests/host_vars/libvirt-freebsd-12/main.yml | 1 + .../libvirt-freebsd-current/main.yml | 1 + .../host_vars/libvirt-opensuse-151/main.yml | 1 + guests/host_vars/libvirt-ubuntu-1604/main.yml | 1 + guests/host_vars/libvirt-ubuntu-1804/main.yml | 1 + guests/playbooks/update/tasks/users.yml | 19 +------------------ 15 files changed, 15 insertions(+), 18 deletions(-) diff --git a/guests/host_vars/libvirt-centos-7/main.yml b/guests/host_vars/= libvirt-centos-7/main.yml index 7f22d9d..f1fef44 100644 --- a/guests/host_vars/libvirt-centos-7/main.yml +++ b/guests/host_vars/libvirt-centos-7/main.yml @@ -21,6 +21,7 @@ os_name: 'CentOS' os_version: '7' =20 bash: /bin/bash +cc: /usr/bin/gcc ccache: /usr/bin/ccache java: /usr/bin/java make: /usr/bin/make diff --git a/guests/host_vars/libvirt-centos-8/main.yml b/guests/host_vars/= libvirt-centos-8/main.yml index bcf4224..48edb78 100644 --- a/guests/host_vars/libvirt-centos-8/main.yml +++ b/guests/host_vars/libvirt-centos-8/main.yml @@ -21,6 +21,7 @@ os_name: 'CentOS' os_version: '8' =20 bash: /bin/bash +cc: /usr/bin/gcc ccache: /usr/bin/ccache java: /usr/bin/java make: /usr/bin/make diff --git a/guests/host_vars/libvirt-debian-10/main.yml b/guests/host_vars= /libvirt-debian-10/main.yml index 88e1634..37036e6 100644 --- a/guests/host_vars/libvirt-debian-10/main.yml +++ b/guests/host_vars/libvirt-debian-10/main.yml @@ -23,6 +23,7 @@ os_name: 'Debian' os_version: '10' =20 bash: /bin/bash +cc: /usr/bin/gcc ccache: /usr/bin/ccache java: /usr/bin/java make: /usr/bin/make diff --git a/guests/host_vars/libvirt-debian-9/main.yml b/guests/host_vars/= libvirt-debian-9/main.yml index a6f1a56..b46efd1 100644 --- a/guests/host_vars/libvirt-debian-9/main.yml +++ b/guests/host_vars/libvirt-debian-9/main.yml @@ -23,6 +23,7 @@ os_name: 'Debian' os_version: '9' =20 bash: /bin/bash +cc: /usr/bin/gcc ccache: /usr/bin/ccache java: /usr/bin/java make: /usr/bin/make diff --git a/guests/host_vars/libvirt-debian-sid/main.yml b/guests/host_var= s/libvirt-debian-sid/main.yml index 5dd51ff..36045cd 100644 --- a/guests/host_vars/libvirt-debian-sid/main.yml +++ b/guests/host_vars/libvirt-debian-sid/main.yml @@ -23,6 +23,7 @@ os_name: 'Debian' os_version: 'Sid' =20 bash: /bin/bash +cc: /usr/bin/gcc ccache: /usr/bin/ccache java: /usr/bin/java make: /usr/bin/make diff --git a/guests/host_vars/libvirt-fedora-30/main.yml b/guests/host_vars= /libvirt-fedora-30/main.yml index a15aff2..71b8e7b 100644 --- a/guests/host_vars/libvirt-fedora-30/main.yml +++ b/guests/host_vars/libvirt-fedora-30/main.yml @@ -36,6 +36,7 @@ os_name: 'Fedora' os_version: '30' =20 bash: /bin/bash +cc: /usr/bin/gcc ccache: /usr/bin/ccache java: /usr/bin/java make: /usr/bin/make diff --git a/guests/host_vars/libvirt-fedora-31/main.yml b/guests/host_vars= /libvirt-fedora-31/main.yml index 4be1a19..c692715 100644 --- a/guests/host_vars/libvirt-fedora-31/main.yml +++ b/guests/host_vars/libvirt-fedora-31/main.yml @@ -24,6 +24,7 @@ os_name: 'Fedora' os_version: '31' =20 bash: /bin/bash +cc: /usr/bin/gcc ccache: /usr/bin/ccache java: /usr/bin/java make: /usr/bin/make diff --git a/guests/host_vars/libvirt-fedora-rawhide/main.yml b/guests/host= _vars/libvirt-fedora-rawhide/main.yml index 3a79a3a..bea4ad1 100644 --- a/guests/host_vars/libvirt-fedora-rawhide/main.yml +++ b/guests/host_vars/libvirt-fedora-rawhide/main.yml @@ -24,6 +24,7 @@ os_name: 'Fedora' os_version: 'Rawhide' =20 bash: /bin/bash +cc: /usr/bin/gcc ccache: /usr/bin/ccache java: /usr/bin/java make: /usr/bin/make diff --git a/guests/host_vars/libvirt-freebsd-11/main.yml b/guests/host_var= s/libvirt-freebsd-11/main.yml index 6234e8a..7fbab39 100644 --- a/guests/host_vars/libvirt-freebsd-11/main.yml +++ b/guests/host_vars/libvirt-freebsd-11/main.yml @@ -22,6 +22,7 @@ os_name: 'FreeBSD' os_version: '11' =20 bash: /usr/local/bin/bash +cc: /usr/bin/clang ccache: /usr/local/bin/ccache java: /usr/local/bin/java make: /usr/local/bin/gmake diff --git a/guests/host_vars/libvirt-freebsd-12/main.yml b/guests/host_var= s/libvirt-freebsd-12/main.yml index 22a3697..abedd95 100644 --- a/guests/host_vars/libvirt-freebsd-12/main.yml +++ b/guests/host_vars/libvirt-freebsd-12/main.yml @@ -22,6 +22,7 @@ os_name: 'FreeBSD' os_version: '12' =20 bash: /usr/local/bin/bash +cc: /usr/bin/clang ccache: /usr/local/bin/ccache java: /usr/local/bin/java make: /usr/local/bin/gmake diff --git a/guests/host_vars/libvirt-freebsd-current/main.yml b/guests/hos= t_vars/libvirt-freebsd-current/main.yml index fdc7e9b..9b0ba1f 100644 --- a/guests/host_vars/libvirt-freebsd-current/main.yml +++ b/guests/host_vars/libvirt-freebsd-current/main.yml @@ -22,6 +22,7 @@ os_name: 'FreeBSD' os_version: 'Current' =20 bash: /usr/local/bin/bash +cc: /usr/bin/clang ccache: /usr/local/bin/ccache java: /usr/local/bin/java make: /usr/local/bin/gmake diff --git a/guests/host_vars/libvirt-opensuse-151/main.yml b/guests/host_v= ars/libvirt-opensuse-151/main.yml index bcc5ca3..3e674cc 100644 --- a/guests/host_vars/libvirt-opensuse-151/main.yml +++ b/guests/host_vars/libvirt-opensuse-151/main.yml @@ -22,6 +22,7 @@ os_name: 'OpenSUSE' os_version: '151' =20 bash: /bin/bash +cc: /usr/bin/gcc ccache: /usr/bin/ccache java: /usr/bin/java make: /usr/bin/make diff --git a/guests/host_vars/libvirt-ubuntu-1604/main.yml b/guests/host_va= rs/libvirt-ubuntu-1604/main.yml index b474264..1eb2345 100644 --- a/guests/host_vars/libvirt-ubuntu-1604/main.yml +++ b/guests/host_vars/libvirt-ubuntu-1604/main.yml @@ -22,6 +22,7 @@ os_name: 'Ubuntu' os_version: '1604' =20 bash: /bin/bash +cc: /usr/bin/gcc ccache: /usr/bin/ccache java: /usr/bin/java make: /usr/bin/make diff --git a/guests/host_vars/libvirt-ubuntu-1804/main.yml b/guests/host_va= rs/libvirt-ubuntu-1804/main.yml index ddfeef2..c9515b6 100644 --- a/guests/host_vars/libvirt-ubuntu-1804/main.yml +++ b/guests/host_vars/libvirt-ubuntu-1804/main.yml @@ -23,6 +23,7 @@ os_name: 'Ubuntu' os_version: '1804' =20 bash: /bin/bash +cc: /usr/bin/gcc ccache: /usr/bin/ccache java: /usr/bin/java make: /usr/bin/make diff --git a/guests/playbooks/update/tasks/users.yml b/guests/playbooks/upd= ate/tasks/users.yml index a6fb0aa..5d202b3 100644 --- a/guests/playbooks/update/tasks/users.yml +++ b/guests/playbooks/update/tasks/users.yml @@ -79,24 +79,7 @@ group: '{{ flavor }}' with_items: - cc - - clang - when: - - ccache !=3D '' - - os_name =3D=3D 'FreeBSD' - -- name: '{{ flavor }}: Create ccache wrappers' - file: - src: '{{ ccache }}' - dest: /home/{{ flavor }}/.ccache/bin/{{ item }} - state: link - owner: '{{ flavor }}' - group: '{{ flavor }}' - with_items: - - cc - - gcc - when: - - ccache !=3D '' - - os_name !=3D 'FreeBSD' + - '{{ cc | basename }}' =20 - name: '{{ flavor }}: Create shell profile' template: --=20 2.25.1 From nobody Sun Apr 28 23:46:13 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=1585337790; cv=none; d=zohomail.com; s=zohoarc; b=EfHlE8xOU1zw3wqSYl3dtGKSPE3CNQpn6fXvgfBy7JkIxWC77GuA/l+ba2z74QhoWyyhlpPkR2udKKm5KpzG4OQfMJTkl585Gk64Y2GKG7EDKaJJ/BPdhRXkzn5GnoFfX3GxoDNmoEM+k8wItrnmSkhCwxdZDvxhEd4IB4SCvzk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1585337790; 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=n6NFhSWCCOyPaf/wCSGiZk5sVpehn1jwpMhCTwoz3II=; b=IyAx1bk2xHYHz4d1Kw/ksOK1FpMmwM5SJdz2MamljXma+jHqFueWT7aVhp61xLcnaU3RA61dI/imW8S80xI7o8Nacs35973hj08w0nMECiLmmDloRAdSoemXXWTuWP4OOyAXyk1L+eO4LPh37XGfWOOqRoh89zKI5N1s1K1x/ak= 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 158533779090058.35691701040719; Fri, 27 Mar 2020 12:36:30 -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-235-Nn9_QtpXNEW7R-DSKuBnzw-1; Fri, 27 Mar 2020 15:36:27 -0400 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id C7452800D4E; Fri, 27 Mar 2020 19:36:21 +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 01639619DB; Fri, 27 Mar 2020 19:36:21 +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 5A2008A04F; Fri, 27 Mar 2020 19:36:20 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 02RJZClM019011 for ; Fri, 27 Mar 2020 15:35:12 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8F8891001B30; Fri, 27 Mar 2020 19:35:12 +0000 (UTC) Received: from kinshicho.usersys.redhat.com (unknown [10.40.195.82]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 806941001B28 for ; Fri, 27 Mar 2020 19:35:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1585337789; 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=n6NFhSWCCOyPaf/wCSGiZk5sVpehn1jwpMhCTwoz3II=; b=T1wUV15F3pvvg8oRgmDWg8JaeyVkmmuohK2IU78fZYGfWoO/qI+5juPxGIU7+SDTd2yZt1 AAtUo6F0+vAyk42rm4oHC85LksVh+EgLELGtqRVEG/GrQpMMubSKV1XrorgN/+XFCEmz85 zwdeXcLTOdqWh+zQPKu0JqPlgvPKsns= X-MC-Unique: Nn9_QtpXNEW7R-DSKuBnzw-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt-jenkins-ci PATCH 2/7] lcitool: Configure ccache using environment variables Date: Fri, 27 Mar 2020 20:34:54 +0100 Message-Id: <20200327193459.1335921-3-abologna@redhat.com> In-Reply-To: <20200327193459.1335921-1-abologna@redhat.com> References: <20200327193459.1335921-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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.12 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" We're going to stop creating $HOME/.ccache soon, so we need an alternative way to configure ccache; environment variables work perfectly fine. Signed-off-by: Andrea Bolognani Reviewed-by: Daniel P. Berrang=C3=A9 --- guests/playbooks/update/tasks/users.yml | 7 ------- guests/playbooks/update/templates/bashrc.j2 | 1 + guests/playbooks/update/templates/ccache.conf.j2 | 1 - 3 files changed, 1 insertion(+), 8 deletions(-) delete mode 100644 guests/playbooks/update/templates/ccache.conf.j2 diff --git a/guests/playbooks/update/tasks/users.yml b/guests/playbooks/upd= ate/tasks/users.yml index 5d202b3..931d79b 100644 --- a/guests/playbooks/update/tasks/users.yml +++ b/guests/playbooks/update/tasks/users.yml @@ -63,13 +63,6 @@ - ccache - ccache/bin =20 -- name: '{{ flavor }}: Configure ccache' - template: - src: '{{ playbook_base }}/templates/ccache.conf.j2' - dest: /home/{{ flavor }}/.ccache/ccache.conf - owner: '{{ flavor }}' - group: '{{ flavor }}' - - name: '{{ flavor }}: Create ccache wrappers' file: src: '{{ ccache }}' diff --git a/guests/playbooks/update/templates/bashrc.j2 b/guests/playbooks= /update/templates/bashrc.j2 index 9cea90c..898d30b 100644 --- a/guests/playbooks/update/templates/bashrc.j2 +++ b/guests/playbooks/update/templates/bashrc.j2 @@ -5,6 +5,7 @@ export NINJA=3D"{{ ninja }}" export PYTHON=3D"{{ python }}" =20 export MAKEFLAGS=3D"-j{{ install_vcpus|int + 1 }}" +export CCACHE_MAXSIZE=3D"2G" =20 export VIRT_PREFIX=3D"$HOME/build/libvirt" export PATH=3D"$VIRT_PREFIX/bin:$HOME/.ccache/bin:$PATH" diff --git a/guests/playbooks/update/templates/ccache.conf.j2 b/guests/play= books/update/templates/ccache.conf.j2 deleted file mode 100644 index 48c3756..0000000 --- a/guests/playbooks/update/templates/ccache.conf.j2 +++ /dev/null @@ -1 +0,0 @@ -max_size =3D 2G --=20 2.25.1 From nobody Sun Apr 28 23:46:13 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=1585337822; cv=none; d=zohomail.com; s=zohoarc; b=Et1wU8yGWna5i3lal/U310jQBz2tQacURUM4hX0yaM7LTb+pQ6w3qAeP9kCOqMk16GC+8dGz5YF8Ef/YBY+0qLgMtjjKszkfTwFzwrkpobxO7KNAO/MPcHJ9QrNmPtqnA+P/Y3HJjyX2fSVJPoRT+BqR6WotTUbQ7ucU54SQ8so= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1585337822; 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=BZr7bXanSykpzl8bp/QDo9Ab+S+/OWELiQLnlzQB9bE=; b=aPyr6vnQI4uORaQW8BXw2ufo5Qvepo4afcLxWPOaNPtRHBiTj3xXL3l2yHakD5DIg4+c1kBEWmOH5IBHdEj5vH04i33fLVUegIGfplIfJAhyz0bepcF/0aAg3M7XNwHKEARaMjGe3c4cck968A3yU4hAczWxf3Oijvsm5k+p+1o= 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 1585337822730835.7133619492977; Fri, 27 Mar 2020 12:37:02 -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-176-HPWYYbrZNMKivNsFTfNWeQ-1; Fri, 27 Mar 2020 15:36:59 -0400 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 919D218C43C0; Fri, 27 Mar 2020 19:36:53 +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 5B78E60C18; Fri, 27 Mar 2020 19:36:53 +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 108E28A04D; Fri, 27 Mar 2020 19:36:53 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 02RJZEL5019023 for ; Fri, 27 Mar 2020 15:35:14 -0400 Received: by smtp.corp.redhat.com (Postfix) id 35F9B1001B30; Fri, 27 Mar 2020 19:35:14 +0000 (UTC) Received: from kinshicho.usersys.redhat.com (unknown [10.40.195.82]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 211401001B28 for ; Fri, 27 Mar 2020 19:35:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1585337821; 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=BZr7bXanSykpzl8bp/QDo9Ab+S+/OWELiQLnlzQB9bE=; b=XJpTF194stsGnGlMxjPwNCWZ2NLu3sdCPE+dsvUE0Wp1UtMJL4Cq+kNEH75AKEHvdHz3B6 vZlD8N2+1Br0bZUptxtKROVMdpsG3+IJE5KQJUnc1Y90tYtrz2WFAW5XFJNhrrQ6XIu80p FxZABtwuCMjwUXUt9oz5huPRUn7iGSg= X-MC-Unique: HPWYYbrZNMKivNsFTfNWeQ-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt-jenkins-ci PATCH 3/7] lcitool: Create ccache wrappers outside of $HOME Date: Fri, 27 Mar 2020 20:34:55 +0100 Message-Id: <20200327193459.1335921-4-abologna@redhat.com> In-Reply-To: <20200327193459.1335921-1-abologna@redhat.com> References: <20200327193459.1335921-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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.12 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" Having the wrappers inside $HOME works fine when we have control over which user will run the build, as is the case for the current Jenkins-based environment, but not when the user is chosen by an external entity, as is the case for container-based builds. Signed-off-by: Andrea Bolognani Reviewed-by: Daniel P. Berrang=C3=A9 --- guests/playbooks/update/main.yml | 1 + guests/playbooks/update/tasks/global.yml | 14 ++++++++++++++ guests/playbooks/update/tasks/users.yml | 21 --------------------- guests/playbooks/update/templates/bashrc.j2 | 2 +- 4 files changed, 16 insertions(+), 22 deletions(-) create mode 100644 guests/playbooks/update/tasks/global.yml diff --git a/guests/playbooks/update/main.yml b/guests/playbooks/update/mai= n.yml index 107a78a..a5a4de8 100644 --- a/guests/playbooks/update/main.yml +++ b/guests/playbooks/update/main.yml @@ -51,6 +51,7 @@ - include: '{{ playbook_base }}/tasks/kludges.yml' - include: '{{ playbook_base }}/tasks/bootloader.yml' - include: '{{ playbook_base }}/tasks/services.yml' + - include: '{{ playbook_base }}/tasks/global.yml' - include: '{{ playbook_base }}/tasks/users.yml' =20 # Configure the Jenkins agent diff --git a/guests/playbooks/update/tasks/global.yml b/guests/playbooks/up= date/tasks/global.yml new file mode 100644 index 0000000..504a549 --- /dev/null +++ b/guests/playbooks/update/tasks/global.yml @@ -0,0 +1,14 @@ +--- +- name: 'Create ccache wrappers' + file: + path: /usr/local/share/ccache-wrappers + state: directory + +- name: 'Create ccache wrappers' + file: + src: '{{ ccache }}' + dest: /usr/local/share/ccache-wrappers/{{ item }} + state: link + with_items: + - cc + - '{{ cc | basename }}' diff --git a/guests/playbooks/update/tasks/users.yml b/guests/playbooks/upd= ate/tasks/users.yml index 931d79b..30e5fca 100644 --- a/guests/playbooks/update/tasks/users.yml +++ b/guests/playbooks/update/tasks/users.yml @@ -53,27 +53,6 @@ when: - flavor =3D=3D 'test' =20 -- name: '{{ flavor }}: Configure ccache' - file: - path: /home/{{ flavor }}/.{{ item }} - state: directory - owner: '{{ flavor }}' - group: '{{ flavor }}' - with_items: - - ccache - - ccache/bin - -- name: '{{ flavor }}: Create ccache wrappers' - file: - src: '{{ ccache }}' - dest: /home/{{ flavor }}/.ccache/bin/{{ item }} - state: link - owner: '{{ flavor }}' - group: '{{ flavor }}' - with_items: - - cc - - '{{ cc | basename }}' - - name: '{{ flavor }}: Create shell profile' template: src: '{{ playbook_base }}/templates/{{ item }}.j2' diff --git a/guests/playbooks/update/templates/bashrc.j2 b/guests/playbooks= /update/templates/bashrc.j2 index 898d30b..77c8fb8 100644 --- a/guests/playbooks/update/templates/bashrc.j2 +++ b/guests/playbooks/update/templates/bashrc.j2 @@ -8,7 +8,7 @@ export MAKEFLAGS=3D"-j{{ install_vcpus|int + 1 }}" export CCACHE_MAXSIZE=3D"2G" =20 export VIRT_PREFIX=3D"$HOME/build/libvirt" -export PATH=3D"$VIRT_PREFIX/bin:$HOME/.ccache/bin:$PATH" +export PATH=3D"$VIRT_PREFIX/bin:/usr/local/share/ccache-wrappers:$PATH" export C_INCLUDE_PATH=3D"$VIRT_PREFIX/include" export LD_LIBRARY_PATH=3D"$VIRT_PREFIX/lib" export PKG_CONFIG_PATH=3D"$VIRT_PREFIX/lib/pkgconfig" --=20 2.25.1 From nobody Sun Apr 28 23:46:13 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=1585337748; cv=none; d=zohomail.com; s=zohoarc; b=M1VBUy4unGwQrJBwLqIZEN4GDT1BdDkGmDetyLwAwLnbkTeUMcD+5QCs7xMNQUqlxQVBfbL7rkuE5iBRf5PY/+VBTitc2sLKaG0xD9rWzotNaY0NXskiJpyRTZWE+WIFjHtfFF+2kGhXezhNFNEiIQo8BBxTsyXQ0Rkt4o+jAGE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1585337748; 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=7lm9pmFCPQ9xoJ3KUHSTpZQdf7Z7ZrHFflbWoJr3QiQ=; b=V4f2CN9Gr1vWGhNgHWXYE567Kub5uX6JBj6quMdu/+ySL44xoTy1iPbCPrmCrwPiaZxcUVJqXzwjVtn737INTqtfZPeQnQ8+fjbN2aLDMwTGNkDdmETZmIgTFgbHQ6GQeENAg/LLtdvs1s0r68Z1TS2qVV+V3i4nUCZ54Qiqe38= 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 1585337748331789.9533965256045; Fri, 27 Mar 2020 12:35:48 -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-329-3UXWqOQINm-GMjYiWhVeNw-1; Fri, 27 Mar 2020 15:35:44 -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 9C18018C43C2; Fri, 27 Mar 2020 19:35:38 +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 0FCD78FBED; Fri, 27 Mar 2020 19:35:38 +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 A12C11803C33; Fri, 27 Mar 2020 19:35:37 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 02RJZFaM019035 for ; Fri, 27 Mar 2020 15:35:15 -0400 Received: by smtp.corp.redhat.com (Postfix) id 99D111001B30; Fri, 27 Mar 2020 19:35:15 +0000 (UTC) Received: from kinshicho.usersys.redhat.com (unknown [10.40.195.82]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CAAED1001B28 for ; Fri, 27 Mar 2020 19:35:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1585337747; 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=7lm9pmFCPQ9xoJ3KUHSTpZQdf7Z7ZrHFflbWoJr3QiQ=; b=JgOv3rLj+T3dAQhaX5nSRWEMTwKlRcVg16MKjUhgoqQ+vL1uk6k2O/Z5FdtOnEOLf6So6X JJcBX0wycJHDikyNLP7ImdZG8K4BXkNGPJGNhbqPveW9s9bCrRfNluRDU1NtZDr7wIH9sX aIr4ZbGEm9W8lEabqGXE08LozG7R9Hs= X-MC-Unique: 3UXWqOQINm-GMjYiWhVeNw-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt-jenkins-ci PATCH 4/7] lcitool: Refactor cross_arch handling a bit Date: Fri, 27 Mar 2020 20:34:56 +0100 Message-Id: <20200327193459.1335921-5-abologna@redhat.com> In-Reply-To: <20200327193459.1335921-1-abologna@redhat.com> References: <20200327193459.1335921-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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" It will make further changes easier. This commit is better viewed with 'git show -w'. Signed-off-by: Andrea Bolognani Reviewed-by: Daniel P. Berrang=C3=A9 --- guests/lcitool | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/guests/lcitool b/guests/lcitool index 9559002..98ef2a0 100755 --- a/guests/lcitool +++ b/guests/lcitool @@ -808,20 +808,6 @@ class Application: sed -Ei 's,^# (en_US\\.UTF-8 .*)$,\\1,' /etc/locale.ge= n && \\ dpkg-reconfigure locales """).format(**varmap)) - if cross_arch: - # Intentionally a separate RUN command from the above - # so that the common packages of all cross-built images - # share a Docker image layer. - sys.stdout.write(textwrap.dedent(""" - RUN export DEBIAN_FRONTEND=3Dnoninteractive && \\ - dpkg --add-architecture {cross_arch} && \\ - {package_manager} update && \\ - {package_manager} dist-upgrade -y && \\ - {package_manager} install --no-install-recommends = -y dpkg-dev && \\ - {package_manager} install --no-install-recommends = -y {cross_pkgs} && \\ - {package_manager} autoremove -y && \\ - {package_manager} autoclean -y - """).format(**varmap)) elif package_format =3D=3D "rpm": commands =3D [] =20 @@ -882,10 +868,22 @@ class Application: =20 sys.stdout.write(script.format(**varmap)) =20 - if cross_arch: - # Intentionally a separate RUN command from the above - # so that the common packages of all cross-built images - # share a Docker image layer. + if cross_arch: + # Intentionally a separate RUN command from the above + # so that the common packages of all cross-built images + # share a Docker image layer. + if package_format =3D=3D "deb": + sys.stdout.write(textwrap.dedent(""" + RUN export DEBIAN_FRONTEND=3Dnoninteractive && \\ + dpkg --add-architecture {cross_arch} && \\ + {package_manager} update && \\ + {package_manager} dist-upgrade -y && \\ + {package_manager} install --no-install-recommends = -y dpkg-dev && \\ + {package_manager} install --no-install-recommends = -y {cross_pkgs} && \\ + {package_manager} autoremove -y && \\ + {package_manager} autoclean -y + """).format(**varmap)) + elif package_format =3D=3D "rpm": sys.stdout.write(textwrap.dedent(""" RUN {package_manager} install -y {cross_pkgs} && \\ {package_manager} clean all -y --=20 2.25.1 From nobody Sun Apr 28 23:46:13 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=1585337795; cv=none; d=zohomail.com; s=zohoarc; b=OiAS9Ne7dD+49A1H15LIQtTiceJpcbjX6NTJ0wcTs+KggFOsAnMWb13GayyGsBICgbl2DO7g8W7V53x4eVIK3n1y/wHCA7tz0RhKQB5AegTfUJeZK9yyXyOJEAlQ+xUU9kmNojuzVhjV76KWb5v+L6Er8jANEmiqI7t9rp9YnoA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1585337795; 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=rA0LNnOZalBa+OgmFHYq622kiHnnMYDXZkO6s/qnQEQ=; b=UVLoB/73+YoC45qE7B0C5C0ohf4nSzZ4OuCn17Xo/P+laJ0ngZWh2TrFt2Okz22eXKWdIJqn4cqJYgAqI96jySMlGj8DeR8m8SbjX2TxGp9zeX22+XqgUbOdqGOfd6hfatFOxYBBy0H1LElZ6OqiKqPcgsNdw1fTnF2Qes61v1o= 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 1585337795716521.8628583363496; Fri, 27 Mar 2020 12:36:35 -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-443-1u8Iyv4yNLiyPzPAd8EaQA-1; Fri, 27 Mar 2020 15:36:32 -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 4052F1084457; Fri, 27 Mar 2020 19:36:26 +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 0AEEAA0A90; Fri, 27 Mar 2020 19:36:26 +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 95F3A8A05F; Fri, 27 Mar 2020 19:36:25 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 02RJZH2q019048 for ; Fri, 27 Mar 2020 15:35:17 -0400 Received: by smtp.corp.redhat.com (Postfix) id 489E71001B30; Fri, 27 Mar 2020 19:35:17 +0000 (UTC) Received: from kinshicho.usersys.redhat.com (unknown [10.40.195.82]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3A3731001B28 for ; Fri, 27 Mar 2020 19:35:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1585337794; 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=rA0LNnOZalBa+OgmFHYq622kiHnnMYDXZkO6s/qnQEQ=; b=div8AHowiWfvJ9QqIfguoh0vIu/U6cHCMF5+ny1tl+F81c19RUnBDokpk5hKaeStki2DVV NCiZZ1elwR/RNUDySwKjA8DkxNPilzrcp1Nky0Ks9HPGfVxWcCIb2qZFTyn976im22IumQ D7/BpwA9XfReEZFzTRW6iqupzIXkTZM= X-MC-Unique: 1u8Iyv4yNLiyPzPAd8EaQA-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt-jenkins-ci PATCH 5/7] lcitool: Use commands[] for deb-based distros Date: Fri, 27 Mar 2020 20:34:57 +0100 Message-Id: <20200327193459.1335921-6-abologna@redhat.com> In-Reply-To: <20200327193459.1335921-1-abologna@redhat.com> References: <20200327193459.1335921-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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" It's nicer to use, and will make further changes easier. This commit is better viewed with 'git show -w'. Signed-off-by: Andrea Bolognani Reviewed-by: Daniel P. Berrang=C3=A9 --- guests/lcitool | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/guests/lcitool b/guests/lcitool index 98ef2a0..fb0219b 100755 --- a/guests/lcitool +++ b/guests/lcitool @@ -797,20 +797,20 @@ class Application: =20 print("FROM {}".format(facts["docker_base"])) =20 + commands =3D [] + if package_format =3D=3D "deb": - sys.stdout.write(textwrap.dedent(""" - RUN export DEBIAN_FRONTEND=3Dnoninteractive && \\ - {package_manager} update && \\ - {package_manager} dist-upgrade -y && \\ - {package_manager} install --no-install-recommends -y {= pkgs} && \\ - {package_manager} autoremove -y && \\ - {package_manager} autoclean -y && \\ - sed -Ei 's,^# (en_US\\.UTF-8 .*)$,\\1,' /etc/locale.ge= n && \\ - dpkg-reconfigure locales - """).format(**varmap)) + commands.extend([ + "export DEBIAN_FRONTEND=3Dnoninteractive", + "{package_manager} update", + "{package_manager} dist-upgrade -y", + "{package_manager} install --no-install-recommends -y {pkg= s}", + "{package_manager} autoremove -y", + "{package_manager} autoclean -y", + "sed -Ei 's,^# (en_US\\.UTF-8 .*)$,\\1,' /etc/locale.gen", + "dpkg-reconfigure locales", + ]) elif package_format =3D=3D "rpm": - commands =3D [] - # Rawhide needs this because the keys used to sign packages are # cycled from time to time if os_name =3D=3D "Fedora" and os_version =3D=3D "Rawhide": @@ -864,9 +864,8 @@ class Application: "{package_manager} clean all -y", ]) =20 - script =3D "\nRUN " + (" && \\\n ".join(commands)) + "\n" - - sys.stdout.write(script.format(**varmap)) + script =3D "\nRUN " + (" && \\\n ".join(commands)) + "\n" + sys.stdout.write(script.format(**varmap)) =20 if cross_arch: # Intentionally a separate RUN command from the above --=20 2.25.1 From nobody Sun Apr 28 23:46:13 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=1585337837; cv=none; d=zohomail.com; s=zohoarc; b=SvxbaDPIu66E4tkk//ANpoXck09q5Hdkbcy+GGRmR43evvLabmttDntWK/URv+l2kvG0uOUvxr8mACWwTP3j2c3QKT6Y9v6V81WV8aihZCb+h9tClkYMShYTXN0MjO2rH5tikZvoEOg9GSppxbNX/liu/RUF4KOWGnZMcYo5HRY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1585337837; 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=IPcL9lX+d1TEzmvEU7UEv8H7H7722t43qeAesSfSQwA=; b=Tz9/aVv0ir5EPJuxmO0rYYXYhMA6FAv7xXPzqBPGopTdYrouWFw0L0RAIygWFGguGHNizF6Wt/PFKxWpJ+WEty4UZkhot3X89Ho2AoZ1dorITq++LAbgb+NJ8jYS4fmqhIGbvQsouXm/1uGCG1y5QlslVFTLlERM2XZE4+KlWCY= 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 1585337837348852.6487182406378; Fri, 27 Mar 2020 12:37:17 -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-240-PxjzN8ciM72g2ATngNnIOQ-1; Fri, 27 Mar 2020 15:37:09 -0400 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2084B13F8; Fri, 27 Mar 2020 19:37:01 +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 956AD60C84; Fri, 27 Mar 2020 19:37:00 +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 37C361803C38; Fri, 27 Mar 2020 19:37:00 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 02RJZIhU019060 for ; Fri, 27 Mar 2020 15:35:18 -0400 Received: by smtp.corp.redhat.com (Postfix) id AA1E81001B30; Fri, 27 Mar 2020 19:35:18 +0000 (UTC) Received: from kinshicho.usersys.redhat.com (unknown [10.40.195.82]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DC0C81001B28 for ; Fri, 27 Mar 2020 19:35:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1585337836; 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=IPcL9lX+d1TEzmvEU7UEv8H7H7722t43qeAesSfSQwA=; b=YUB2Z/siN58K6xe60HyetMsPka0m5XBe1vXcG9HZ9KNwoVPhLWia7drebDKeRlNskhtYt6 Ctq9IysPFoKQxVmsXl4bfe80DOdf6YOGHI5wwY35e70ihZQdFPBjXfa8HGYjdALoqpmwe8 xBmzyYcmuPDUqSo6qRWaNLJquyDe3w8= X-MC-Unique: PxjzN8ciM72g2ATngNnIOQ-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt-jenkins-ci PATCH 6/7] lcitool: Use cross_commands[] for all distros Date: Fri, 27 Mar 2020 20:34:58 +0100 Message-Id: <20200327193459.1335921-7-abologna@redhat.com> In-Reply-To: <20200327193459.1335921-1-abologna@redhat.com> References: <20200327193459.1335921-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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.12 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" It's nicer to use, and consistent with how we're building the native part of the Dockerfile. Signed-off-by: Andrea Bolognani Reviewed-by: Daniel P. Berrang=C3=A9 --- guests/lcitool | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/guests/lcitool b/guests/lcitool index fb0219b..117e1a5 100755 --- a/guests/lcitool +++ b/guests/lcitool @@ -868,25 +868,30 @@ class Application: sys.stdout.write(script.format(**varmap)) =20 if cross_arch: + cross_commands =3D [] + # Intentionally a separate RUN command from the above # so that the common packages of all cross-built images # share a Docker image layer. if package_format =3D=3D "deb": - sys.stdout.write(textwrap.dedent(""" - RUN export DEBIAN_FRONTEND=3Dnoninteractive && \\ - dpkg --add-architecture {cross_arch} && \\ - {package_manager} update && \\ - {package_manager} dist-upgrade -y && \\ - {package_manager} install --no-install-recommends = -y dpkg-dev && \\ - {package_manager} install --no-install-recommends = -y {cross_pkgs} && \\ - {package_manager} autoremove -y && \\ - {package_manager} autoclean -y - """).format(**varmap)) + cross_commands.extend([ + "export DEBIAN_FRONTEND=3Dnoninteractive", + "dpkg --add-architecture {cross_arch}", + "{package_manager} update", + "{package_manager} dist-upgrade -y", + "{package_manager} install --no-install-recommends -y = dpkg-dev", + "{package_manager} install --no-install-recommends -y = {cross_pkgs}", + "{package_manager} autoremove -y", + "{package_manager} autoclean -y", + ]) elif package_format =3D=3D "rpm": - sys.stdout.write(textwrap.dedent(""" - RUN {package_manager} install -y {cross_pkgs} && \\ - {package_manager} clean all -y - """).format(**varmap)) + cross_commands.extend([ + "{package_manager} install -y {cross_pkgs}", + "{package_manager} clean all -y", + ]) + + cross_script =3D "\nRUN " + (" && \\\n ".join(cross_command= s)) + "\n" + sys.stdout.write(cross_script.format(**varmap)) =20 if "pip_pkgs" in varmap: sys.stdout.write(textwrap.dedent(""" --=20 2.25.1 From nobody Sun Apr 28 23:46:13 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=1585337856; cv=none; d=zohomail.com; s=zohoarc; b=ahisr+TevJmXYxR42Su8+2MmSNuTM6FptzIWUONEN3ZvQU0pO+aSKCymTEla5ejVMUGOFA7Z9+wqXVFf5N9V+lSF5mbl1S0xR5VO54qf9BG8BjJiqvgvlHXx42H6V/awnJ3G2AKLUB1QNFx9KEB5UvIxwysDqHElXu9bqbJFohY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1585337856; 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=TGBRIFuWjIIrvESDLnr0Ns5vLLD2adxBftv/iyBAsf0=; b=nU2+v1Q3SN6JYayUP8VN7286ta1SJy7vlmA1xIopn+Js0SmR6qO3KMxKR091g+g+2kF0YI2s3yJztAP2i8li7cvwg50HuXEYymdJuKs7mVyUuznL9ZjCzdr4yc1L4WRroGuD3/1NUru/ZNUQ8L9eHv2LoVJazveXk3xlnfiNO3s= 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 1585337856424685.2975555024692; Fri, 27 Mar 2020 12:37:36 -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-331-DPAbkZpUMVyxH7PmTA1aug-1; Fri, 27 Mar 2020 15:37:33 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D8F2E800D4E; Fri, 27 Mar 2020 19:37:04 +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 A853A1001901; Fri, 27 Mar 2020 19:37:04 +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 508191803C38; Fri, 27 Mar 2020 19:37:04 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 02RJZKFT019074 for ; Fri, 27 Mar 2020 15:35:20 -0400 Received: by smtp.corp.redhat.com (Postfix) id 58CB11001B30; Fri, 27 Mar 2020 19:35:20 +0000 (UTC) Received: from kinshicho.usersys.redhat.com (unknown [10.40.195.82]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4C6FA1001B28 for ; Fri, 27 Mar 2020 19:35:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1585337855; 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=TGBRIFuWjIIrvESDLnr0Ns5vLLD2adxBftv/iyBAsf0=; b=GLPBHoQxm5c51zNWg3BxfOqm6VKM6pxnOtet+wQZOptbywzRBk3IefHZhdIL3C1t4Xguhm d2rpZP1Cs5vjIOkqblwYngLFRDPukglmqHKjhXdR5qulDSOW9dsTke/b+8JkqA1n8U01V7 L84d4JgXYUpd9jIrzWyxOp2w7PRrbd4= X-MC-Unique: DPAbkZpUMVyxH7PmTA1aug-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt-jenkins-ci PATCH 7/7] lcitool: Create and expose ccache wrappers Date: Fri, 27 Mar 2020 20:34:59 +0100 Message-Id: <20200327193459.1335921-8-abologna@redhat.com> In-Reply-To: <20200327193459.1335921-1-abologna@redhat.com> References: <20200327193459.1335921-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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.84 on 10.5.11.22 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" VM-based builds have used ccache by default for a very long time, and now container-based builds will too. Signed-off-by: Andrea Bolognani Reviewed-by: Daniel P. Berrang=C3=A9 --- guests/lcitool | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/guests/lcitool b/guests/lcitool index 117e1a5..011fc07 100755 --- a/guests/lcitool +++ b/guests/lcitool @@ -651,6 +651,8 @@ 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["cc"] =3D facts["cc"] + varmap["ccache"] =3D facts["ccache"] varmap["make"] =3D facts["make"] varmap["ninja"] =3D facts["ninja"] varmap["python"] =3D facts["python"] @@ -864,6 +866,21 @@ class Application: "{package_manager} clean all -y", ]) =20 + commands.extend([ + "mkdir -p /usr/local/share/ccache-wrappers", + ]) + + if cross_arch: + commands.extend([ + "ln -s {ccache} /usr/local/share/ccache-wrappers/{cross_ab= i}-cc", + "ln -s {ccache} /usr/local/share/ccache-wrappers/{cross_ab= i}-$(basename {cc})", + ]) + else: + commands.extend([ + "ln -s {ccache} /usr/local/share/ccache-wrappers/cc", + "ln -s {ccache} /usr/local/share/ccache-wrappers/$(basenam= e {cc})", + ]) + script =3D "\nRUN " + (" && \\\n ".join(commands)) + "\n" sys.stdout.write(script.format(**varmap)) =20 @@ -900,6 +917,7 @@ class Application: =20 sys.stdout.write(textwrap.dedent(""" ENV LANG "en_US.UTF-8" + ENV PATH "/usr/local/share/ccache-wrappers:$PATH" =20 ENV MAKE "{make}" ENV NINJA "{ninja}" --=20 2.25.1