From nobody Tue Oct 22 22:24:33 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.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=1695032584; cv=none; d=zohomail.com; s=zohoarc; b=ifSHLWQPsHpu9/QOrB8/u/tFDnMEkwRgIG3TvCPXTymZOf9mEfdCRoxsVrZvMuzJUp59bmHidp4wFb8SL4HmVsbCx38F8nMhEzeFj+4JG4o/W5hndN41EKv3vuVTonZx4LTcywNwnnqxUOqwas8oH+S6by1QMOKCfF4+UcircYA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1695032584; 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=tTjf0kvVwa4wKDU00tZN617gXKvpQ3dRPDt90OwJTvY=; b=RmzgILJ4Y9au/Wn/qjpjZ8RCtR7Wnbz14nBrAqQV9UPqJK91PQPhHVtT+di0sEOnRyufZTE+B9a/riOX99GlXifThLIWGal8MtteRvOjqysIdx6ZsBa02M5vR8zMVzSYSyyHZU9QXdKsYFQdVQIFYPZjgG03+XlI1TmRSZssyE4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.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.129.124]) by mx.zohomail.com with SMTPS id 1695032584476240.5000568407902; Mon, 18 Sep 2023 03:23:04 -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-433-xcgp_ZCNPb-s3BJf4ocjlw-1; Mon, 18 Sep 2023 06:23:00 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (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 1304A1C05147; Mon, 18 Sep 2023 10:22:58 +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 F1FE9C0FE03; Mon, 18 Sep 2023 10:22:57 +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 A7C6A194658F; Mon, 18 Sep 2023 10:22:57 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 48B8E19465A4 for ; Mon, 18 Sep 2023 10:22:56 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 347CD40C2064; Mon, 18 Sep 2023 10:22:56 +0000 (UTC) Received: from orca.home.lan (unknown [10.45.225.58]) by smtp.corp.redhat.com (Postfix) with ESMTP id AE5E640C2070; Mon, 18 Sep 2023 10:22:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695032583; 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=tTjf0kvVwa4wKDU00tZN617gXKvpQ3dRPDt90OwJTvY=; b=Ox+Zs4cRw1LD3xFq9d8moMBEL9QWNSOEFl1lH6w6YyJs+hG2+z4mmMrjcTemorWXaeBdTD IgrD1K2T9p9G+bWg3j6mR4gAmG4e3x2gR2WK77HJivbdmrxb3hRyGt1B+VXTf3K+ZwAD0Q d6+2vuqN7MSrAKUHtlAlZhLBkmFfsuE= X-MC-Unique: xcgp_ZCNPb-s3BJf4ocjlw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Erik Skultety To: libvir-list@redhat.com Subject: [libvirt PATCH 09/12] ci: jobs.sh: run_cmd: Use eval to run commands Date: Mon, 18 Sep 2023 12:22:45 +0200 Message-ID: <8713e3a18682410ecb3ac639ffbadb59ca7c4203.1695032553.git.eskultet@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 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.8 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: 1695032584694100002 Content-Type: text/plain; charset="utf-8"; x-default="true" We tried to evade usage of eval in commit 6214ae55f6a, but trying to use I/O redirections with a command doesn't have the desired effect, because when Shell eats the redirection it is applied to anything inside the run_cmd function, even the print command we use for debugging purposes. In order to print all commands and use the redirection only on the actual execution of a given command, let's adopt eval on "$@" and allow passing redirections as strings later on. Future patches will demonstrate this. Signed-off-by: Erik Skultety --- ci/jobs.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/jobs.sh b/ci/jobs.sh index f4e83dda2e..3a89cb1a69 100644 --- a/ci/jobs.sh +++ b/ci/jobs.sh @@ -15,7 +15,7 @@ fi GIT_ROOT=3D"$(git rev-parse --show-toplevel)" run_cmd() { printf "\e[32m[RUN COMMAND]: '%s'\e[0m\n" "$*" - "$@" + eval "$@" } =20 run_meson_setup() { @@ -70,7 +70,7 @@ run_rpmbuild() { run_cmd rpmbuild \ --clean \ --nodeps \ - --define "_without_mingw 1" \ + --define "'_without_mingw 1'" \ -ta build/meson-dist/libvirt-*.tar.xz } =20 --=20 2.41.0