From nobody Sun Feb 8 16:12:43 2026 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=1619008677; cv=none; d=zohomail.com; s=zohoarc; b=Gb/IsLqrfsdVUPGppE3bR59XeZGK+zn45oq4C26znhyusxMOHDng0eIwgXD3ALpQgF/UTq0GRBBdEt7BRl5WMNv3U7aWzMk/TuVGCV4M12AB9BP0OkvrVUoCm+hupbdhtjC1XQSZqNoIQaLS2dPnLDJcqdC0j6SCNGpIDRo2S6A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1619008677; 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=wctmCLvw95IFdCZq93ByJOjiTKI6jJz+dHXCFppFvLo=; b=DvNUMbMpipoq1FsOX0rbl6gcVSCrhMhiNrmrHVmxroixqBX3AZ7tIDKX5dWA7oi9tnoyy7dI/Pn8qc3nmX4eHgbw1CisLFX/gyOGWW7hFmjq0YOldTttzlN7yTbu09LlI+MgN+iWmnUtbg1jLaqexwE3lMYbzb20OnXAetNEm/4= 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) header.from= 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 1619008677749275.0250632093497; Wed, 21 Apr 2021 05:37:57 -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-10-Aepd16LjOa2JCc6oJ5x2fA-1; Wed, 21 Apr 2021 08:37:54 -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 10A9883DD32; Wed, 21 Apr 2021 12:37:48 +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 E644660916; Wed, 21 Apr 2021 12:37:47 +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 AFCBE1806D1C; Wed, 21 Apr 2021 12:37:47 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 13LCbhSV013649 for ; Wed, 21 Apr 2021 08:37:43 -0400 Received: by smtp.corp.redhat.com (Postfix) id 1490E19D9B; Wed, 21 Apr 2021 12:37:43 +0000 (UTC) Received: from antique-work.redhat.com (unknown [10.40.195.130]) by smtp.corp.redhat.com (Postfix) with ESMTP id 857BE19D80 for ; Wed, 21 Apr 2021 12:37:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1619008676; 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=wctmCLvw95IFdCZq93ByJOjiTKI6jJz+dHXCFppFvLo=; b=IRBXTxJK00F2/5dbL+fLbRJjB8wrF6yotrtDkg7xsJL/ue0FOQCg4gFT7DMey20pStHpJf AxPYU5bk7Radw23XO0nsJbPUuVb8ry/CI07UG18A2AdFyl5vefdXzBZBdYNoBgNUiQKLcu TR81cSK3j9cjjIjEb+YPcZsGV44wEaE= X-MC-Unique: Aepd16LjOa2JCc6oJ5x2fA-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH v3 4/8] meson: move iscsiadm check into storage_iscsi condition Date: Wed, 21 Apr 2021 14:37:27 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 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 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com 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" This requires to define the binary name in code because we compile src/util/viriscsi.c unconditionally. Signed-off-by: Pavel Hrdina --- meson.build | 22 ++++++++++++++++------ src/util/viriscsi.h | 2 ++ 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/meson.build b/meson.build index fc8fc4f252..8c71e803bf 100644 --- a/meson.build +++ b/meson.build @@ -927,7 +927,6 @@ endforeach optional_programs =3D [ 'augparse', 'flake8', - 'iscsiadm', 'pdwtags', ] =20 @@ -1802,11 +1801,22 @@ if conf.has('WITH_LIBVIRTD') error('Need glusterfs (libgfapi) for gluster storage driver') endif =20 - if not get_option('storage_iscsi').disabled() and iscsiadm_prog.found() - use_storage =3D true - conf.set('WITH_STORAGE_ISCSI', 1) - elif get_option('storage_iscsi').enabled() - error('We need iscsiadm for iSCSI storage driver') + if not get_option('storage_iscsi').disabled() + iscsi_enable =3D true + iscsiadm_prog =3D find_program('iscsiadm', required: false, dirs: libv= irt_sbin_path) + + if not iscsiadm_prog.found() + if get_option('storage_iscsi').enabled() + error('We need iscsiadm for iSCSI storage driver') + else + iscsi_enable =3D false + endif + endif + + if iscsi_enable + use_storage =3D true + conf.set('WITH_STORAGE_ISCSI', 1) + endif endif =20 if not get_option('storage_iscsi_direct').disabled() and libiscsi_dep.fo= und() diff --git a/src/util/viriscsi.h b/src/util/viriscsi.h index 6d17d139eb..fa7ff280c2 100644 --- a/src/util/viriscsi.h +++ b/src/util/viriscsi.h @@ -23,6 +23,8 @@ =20 #include "internal.h" =20 +#define ISCSIADM "iscsiadm" + char * virISCSIGetSession(const char *devpath, bool probe) --=20 2.30.2