From nobody Mon Feb 9 17:35:33 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=1565949021; cv=none; d=zoho.com; s=zohoarc; b=gHjQQhLco/Kl42j2sN0X1bVHM97TY49eXTvljy/ezNlatT0xFf+WrfNH0f1FiHj/a53M6ZJDVMvIflX2zTF0H1ou9nA9HsaMgN+xNqYHPIGb4ft6wJUOpyhJGLgnQSA1Mn2bTFmOd8GMurGnvugUg61CaXCGHmX/mlM+IsHqY10= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1565949021; 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:ARC-Authentication-Results; bh=V8cwIND5Hcw3peErOvtJ90yOoFPh8YGyo6KhqYoAikE=; b=Vq8s+RzVNCgB/WkYAdyhNS0I5f9JqMSt9mUyhCUWQz+TTmo6rXBtIECwh7MxO5LFB4R7bm/4bgzzkZGwm6QtBmFy6DvklYjD2tcBQ4XIkYdydUQHqtE5ArGfwQxSA14qfYBp8eBt7/8tuKVKlpuIvhAZqfb1BKRN6ggLUbh8w1M= 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 1565949021143312.65722245005225; Fri, 16 Aug 2019 02:50:21 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B9CC330860C8; Fri, 16 Aug 2019 09:50:19 +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 949817DA52; Fri, 16 Aug 2019 09:50:19 +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 50BBC24FDF; Fri, 16 Aug 2019 09:50:19 +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 x7G9oHrV019812 for ; Fri, 16 Aug 2019 05:50:17 -0400 Received: by smtp.corp.redhat.com (Postfix) id 6C5C88261E; Fri, 16 Aug 2019 09:50:17 +0000 (UTC) Received: from kinshicho.brq.redhat.com (unknown [10.43.2.73]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EBC4083B9F for ; Fri, 16 Aug 2019 09:50:13 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Fri, 16 Aug 2019 11:49:52 +0200 Message-Id: <20190816094954.30096-9-abologna@redhat.com> In-Reply-To: <20190816094954.30096-1-abologna@redhat.com> References: <20190816094954.30096-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 Subject: [libvirt] [PATCH 08/10] ci: Introduce $(CI_PREPARE_SCRIPT) 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-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.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Fri, 16 Aug 2019 09:50:20 +0000 (UTC) Content-Type: text/plain; charset="utf-8" This script is run before $(CI_BUILD_SCRIPT) and can be used to tweak the environment as necessary before the build starts. Signed-off-by: Andrea Bolognani --- Makefile.am | 1 + ci/Makefile | 8 +++++++- ci/prepare.sh | 9 +++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 ci/prepare.sh diff --git a/Makefile.am b/Makefile.am index 96fac92186..cf9ff94f4f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -52,6 +52,7 @@ EXTRA_DIST =3D \ build-aux/vc-list-files \ ci/Makefile \ ci/build.sh \ + ci/prepare.sh \ $(NULL) =20 pkgconfigdir =3D $(libdir)/pkgconfig diff --git a/ci/Makefile b/ci/Makefile index 2b5be97238..17d85d407f 100644 --- a/ci/Makefile +++ b/ci/Makefile @@ -41,6 +41,9 @@ CI_MAKE_ARGS =3D # Any extra arguments to pass to configure CI_CONFIGURE_ARGS =3D =20 +# Script containing environment preparation steps +CI_PREPARE_SCRIPT =3D $(CI_ROOTDIR)/prepare.sh + # Script containing build instructions CI_BUILD_SCRIPT =3D $(CI_ROOTDIR)/build.sh =20 @@ -100,6 +103,7 @@ CI_HOME_MOUNTS =3D \ $(NULL) =20 CI_SCRIPT_MOUNTS =3D \ + --volume $(CI_SCRATCHDIR)/prepare:$(CI_USER_HOME)/prepare:z \ --volume $(CI_SCRATCHDIR)/build:$(CI_USER_HOME)/build:z \ $(NULL) =20 @@ -194,8 +198,9 @@ ci-prepare-tree: ci-check-engine cp /etc/passwd $(CI_SCRATCHDIR); \ cp /etc/group $(CI_SCRATCHDIR); \ mkdir -p $(CI_SCRATCHDIR)/home; \ + cp "$(CI_PREPARE_SCRIPT)" $(CI_SCRATCHDIR)/prepare; \ cp "$(CI_BUILD_SCRIPT)" $(CI_SCRATCHDIR)/build; \ - chmod +x "$(CI_SCRATCHDIR)/build"; \ + chmod +x "$(CI_SCRATCHDIR)/prepare" "$(CI_SCRATCHDIR)/build"; \ echo "Cloning $(CI_GIT_ROOT) to $(CI_HOST_SRCDIR)"; \ git clone $(CI_GIT_ARGS) $(CI_GIT_ROOT) $(CI_HOST_SRCDIR) || exit 1; \ for mod in $$(git submodule | awk '{ print $$2 }' | sed -E 's,^../,,g') = ; \ @@ -209,6 +214,7 @@ ci-prepare-tree: ci-check-engine ci-run-command@%: ci-prepare-tree $(CI_ENGINE) run $(CI_ENGINE_ARGS) $(CI_IMAGE_PREFIX)$*$(CI_IMAGE_TAG) \ /bin/bash -c ' \ + $(CI_USER_HOME)/prepare || exit 1; \ export CI_CONT_SRCDIR=3D"$(CI_CONT_SRCDIR)"; \ export CI_CONT_BUILDDIR=3D"$(CI_CONT_BUILDDIR)"; \ export CI_SMP=3D"$(CI_SMP)"; \ diff --git a/ci/prepare.sh b/ci/prepare.sh new file mode 100644 index 0000000000..f70107bd62 --- /dev/null +++ b/ci/prepare.sh @@ -0,0 +1,9 @@ +# This script is used to prepare the environment that will be used +# to build libvirt inside the container. +# +# You can customize it to your liking, or alternatively use a +# completely different script by passing +# +# CI_PREPARE_SCRIPT=3D/path/to/your/prepare/script +# +# to make. --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list