From nobody Sun Feb 8 18:11:12 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=1618852569; cv=none; d=zohomail.com; s=zohoarc; b=fUnEuUWUzoYcRuH2yisklGPIvqH4fIDeSKfjVbQTNAVjzNpaDTaZ4vk/hM74OxartSPfz7K08Jew2C/QpPWDIaBD8e3sh5+uNG2/vjACIo7UVkvJa0o8vckoDiKY4gv7GvBbPQl9mrApAKZtMmAy1Nu1Slu7/3iFoE+gm6tIqqw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1618852569; 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=aXS1XzsG31HrV4TZqYKF4LKKG0OtWsWg3grOUhYVsJheo4RnzVcQidN2Wh9I9ZtlqpW9k8QNGKTDuNik2VVLPHr4xvYVnFuFwuKC7Ff37YrzYZunF3xL87rTgfflCfNfcolsjxNJIwN8r0DrIKRvSXXTTvh2vMf+5oDDNsL85rg= 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 1618852569249337.29596489089465; Mon, 19 Apr 2021 10:16:09 -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-457-R_kW6ETeOtm5tK7r-cfPwA-1; Mon, 19 Apr 2021 13:15:05 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 08688107ACF5; Mon, 19 Apr 2021 17:14:59 +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 D91E660BF1; Mon, 19 Apr 2021 17:14:58 +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 A49EB44A74; Mon, 19 Apr 2021 17:14:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 13JHEs4O021998 for ; Mon, 19 Apr 2021 13:14:54 -0400 Received: by smtp.corp.redhat.com (Postfix) id E1C695D755; Mon, 19 Apr 2021 17:14:54 +0000 (UTC) Received: from antique-work.redhat.com (unknown [10.40.195.130]) by smtp.corp.redhat.com (Postfix) with ESMTP id 609135D742 for ; Mon, 19 Apr 2021 17:14:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618852566; 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=Ix5UcEALtmNItzMwvxQ06eCrMYzfgYcVTNN2T8lhPtvotzbnSJqPzrCIs+tqKMCtSrzurG l5f5Khcj9UD6ud798ligIcBRJ7aZduxejrZksY4sN5HtILgc2/eI+kj6XgkNe+Pd36xUl4 GvZAdf/Tz/3FJ1F+Sy6RQ2IIU++9Fg4= X-MC-Unique: R_kW6ETeOtm5tK7r-cfPwA-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH v2 17/21] meson: move iscsiadm check into storage_iscsi condition Date: Mon, 19 Apr 2021 19:14:20 +0200 Message-Id: <596d8e8e537eb9dc6484f5e55f137e0e048a308b.1618851847.git.phrdina@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 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.12 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