From nobody Mon Feb 9 00:02:38 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=1621929673; cv=none; d=zohomail.com; s=zohoarc; b=HVRPy3kTyhDy0/LCZXRL+JxfcMQltEdjPpQy43c8U6S8CPecXRpfpi6sIMJHyE2VxrgrhdP2YxmpasdqIMZh6oK8kt+mD9u2hAIdnOKs4SswKhOzcxFwsKz4aKKK8j8/BFzd6VD0VxNKzyLDoUy/uGyBly4Sy7DBI/U8pPy8on8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621929673; 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=NRWHKyv+uxvef4XCzi30Nepsv+495Q2YsxlEo7ggGio=; b=cQ0EmB/scaGqH6+BnQtzhBWKxoi/4Kf/uB7t8HjN0ymGeAn545RMYYhvDH0WdGBIxUh5SxwplwhMw0etMFLqz6b/l8aYqBhtaVwx1JGnrFAK9bmAeIOdGcj1cbAMk+ateGUgoda6CV2gyiJVnjieRc09QPoO5sWAcN3FUR3s+UE= 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 162192967375544.97438186727811; Tue, 25 May 2021 01:01:13 -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-16-JkrCjEFzO1W8WxWc1ie_qQ-1; Tue, 25 May 2021 04:01:10 -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 718BF6DD3F; Tue, 25 May 2021 08:01:05 +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 33FFD100E113; Tue, 25 May 2021 08:01:05 +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 DB5D8180B464; Tue, 25 May 2021 08:01:04 +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 14P80pMY021827 for ; Tue, 25 May 2021 04:00:51 -0400 Received: by smtp.corp.redhat.com (Postfix) id E439F18AD4; Tue, 25 May 2021 08:00:51 +0000 (UTC) Received: from antique-work.redhat.com (unknown [10.40.193.112]) by smtp.corp.redhat.com (Postfix) with ESMTP id 60640189C7 for ; Tue, 25 May 2021 08:00:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621929672; 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=NRWHKyv+uxvef4XCzi30Nepsv+495Q2YsxlEo7ggGio=; b=ifgKMODJvx2n5ClZhWj2Eto6LlQFD8Hpiuh1bYf8FX2o1Clxf/9z5rDD2E5k1IOSK5pbyw PVZ6WRQS6HI8gum6lGlHrjORPMOU2uF6ZRge4culPBqFv0/yHaLkFfpKJdcMWmz2FiH+vD faeMwSgUQpHaQYEfBvMNLlwUaYV07/U= X-MC-Unique: JkrCjEFzO1W8WxWc1ie_qQ-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [PATCH RESEND v3 4/8] meson: move iscsiadm check into storage_iscsi condition Date: Tue, 25 May 2021 10:00:43 +0200 Message-Id: <242b64244d53728097a9e626ad9ecf0635adea5c.1621929489.git.phrdina@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 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 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 ed4afd2052..7eeaa689f9 100644 --- a/meson.build +++ b/meson.build @@ -824,7 +824,6 @@ endforeach optional_programs =3D [ 'augparse', 'flake8', - 'iscsiadm', 'pdwtags', ] =20 @@ -1742,11 +1741,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.31.1