From nobody Sat Dec 21 17:44:24 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 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=1694439966; cv=none; d=zohomail.com; s=zohoarc; b=IDoQtUS/qlBZ5IoG8GbkOncmcGW4kxTTR6++RZvMHvyTbodtUpwCfDwjBqPoYlG88bpLstEHW5/GhX+kkb9AqGal0KRMzTz9tMglpy8HpzK/UrGopCyEe0HxsqyvofSgWdzKw+bGYA51XjmZPYD2yGroFC2misK6WWjFGBLOWhM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1694439966; 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; bh=/uQY4srVIGaICUisAq1URJio04u5iUjdWMRfUdzbwKE=; b=NyI6BIWb1TQr147coDVhuKwP5sKrFCG6WXafT+4yF3iM4Szt7hBPlCh6UEWu1zolsZDdrTISJVu78j6rp22fqz8idLMHZi7ByAnr6j/NzFPiZvn0UvVZWRV8faIWiHbRuNuO+x9VoIe+Vp9d3DhgcrO+LcbMLA2gaLDx3tJpA3Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1694439966260513.3573499127609; Mon, 11 Sep 2023 06:46:06 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-636-KOEl7VNTObmPvbjjDIjWYA-1; Mon, 11 Sep 2023 09:44:08 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 600EC3C0C88D; Mon, 11 Sep 2023 13:43:50 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 47B2040C6EBF; Mon, 11 Sep 2023 13:43:50 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 892521946A49; Mon, 11 Sep 2023 13:43:45 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 5DE5319465B8 for ; Mon, 11 Sep 2023 13:43:44 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 40328200B682; Mon, 11 Sep 2023 13:43:44 +0000 (UTC) Received: from orca.home.lan (unknown [10.45.225.151]) by smtp.corp.redhat.com (Postfix) with ESMTP id B60EB202348A; Mon, 11 Sep 2023 13:43:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694439964; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=/uQY4srVIGaICUisAq1URJio04u5iUjdWMRfUdzbwKE=; b=OHFHkF3yhIglXta7qE40MyovrrGUxudPblUuLoV6fF8Ts1i/mz5aN/yxV3IKt4sumZ7Pjw Ft++84k/ASDJdlJoyTlOx0x1k4hlUWUJZ1+/M7pZM/IzR03UF5Vr8hn8+1cenHJ8HQC3El ueJlAfgMx9Fd4a4s3S3uuON2dPaJFhQ= X-MC-Unique: KOEl7VNTObmPvbjjDIjWYA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Erik Skultety To: libvir-list@redhat.com Subject: [libvirt PATCH v2 07/35] ci: build.sh: Add a helper function to create the dist tarball Date: Mon, 11 Sep 2023 15:43:08 +0200 Message-ID: <2f6a0e36c68a075827653994c4f13941dd3e842c.1694439815.git.eskultet@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Erik Skultety Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1694440010475100001 Content-Type: text/plain; charset="utf-8"; x-default="true" This helper function does not correspond to a particular GitLab job, it just logically separates the necessary step of creating a dist tarball from the RPM build job that takes over. One notable change here is the need to update git's file index which causes issues in local container executions which rely on a shallow copy of the libvirt repo created as: $ git clone --local Even if all changes have been committed, git often complained otherwise. Updating the index in a GitLab environment is a NOP. Signed-off-by: Erik Skultety Erik Skultety : Reviewed-by: Daniel P. Berrang=C3=A9 --- ci/build.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ci/build.sh b/ci/build.sh index f908bbc5d4..ab56c5e5eb 100644 --- a/ci/build.sh +++ b/ci/build.sh @@ -42,3 +42,13 @@ run_build() { test -d $GIT_ROOT/build/build.ninja || run_meson_setup run_cmd meson compile -C build $BUILD_ARGS } + +run_dist() { + test -d $GIT_ROOT/build/build.ninja || run_meson_setup + + # dist is unhappy in local container environment complaining about + # uncommitted changes in the repo which is often not the case - refres= hing + # git's index solves the problem + git update-index --refresh + run_cmd meson dist -C build --no-tests +} --=20 2.41.0