From nobody Tue Feb 10 00:58:51 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1608198970; cv=none; d=zohomail.com; s=zohoarc; b=gSuGw/xpn0jHEzbDG7nb2W6bLLCjMDIEoTQ5OX0ZMEBV8Tk5mBIDWwRketGyIlNF/xEyTqsjiCD6PaV+n08zdra4Vp7H5626mplB+35KE5TjGIZvxyr6GA5dtG6O+DWO3RllvFyiswlQpx6tBWq+9WeP7PChXRF8eszoWkDev/Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608198970; h=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=n+k02eQPc3Z36SK8b+IVbI3aA4JuoAfer7tExcXmHEY=; b=MTPwG0xYNkhAcAv/fxpcqjGAOsSHyGbe/vqDG/0p85TgryinL3tVET+L4jmgCEprzwIQqYLDvToBUUVJWflWlPyvUVlK9koWxE4+0qkwNPqG6NzijJz8hBsUnknjgUjafID195tRb3TyOQQm5eFijYzxswowLA57vnFYzmnJCTk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 16081989702741010.83461328974; Thu, 17 Dec 2020 01:56:10 -0800 (PST) Received: from localhost ([::1]:56006 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kpq13-0003jJ-60 for importer@patchew.org; Thu, 17 Dec 2020 04:56:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47700) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kppmL-0004hu-8i for qemu-devel@nongnu.org; Thu, 17 Dec 2020 04:40:57 -0500 Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]:36200) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kppmJ-0007jP-2d for qemu-devel@nongnu.org; Thu, 17 Dec 2020 04:40:56 -0500 Received: by mail-ej1-x62e.google.com with SMTP id lt17so36921818ejb.3 for ; Thu, 17 Dec 2020 01:40:53 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id rs27sm3463677ejb.21.2020.12.17.01.40.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Dec 2020 01:40:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=n+k02eQPc3Z36SK8b+IVbI3aA4JuoAfer7tExcXmHEY=; b=S0n89i0J9rIPSaLGzBCSSkUx5XdOPmgJQwGPQ1+VmRtYm72CgqaHlLladSf6x+VxoR yUOJBhA8/MvdgP6pUTJqPEMe18y6GTsAtnv6pIs+UwpVDtjujwLSdmJUc1KF4LZxEpF2 7VcIICvUNh+iB3YgE8zklgdvNaUADwGeDGzW76cBDE9J5pQ4GfiW54lohNfn5OxICw0k vdZ8xTkrIOS9FYQJZ62oAUAq5YlhBJe2ZOGjWkO5PjyIp45ElgnX0fsUuqCq42PL2VHX lJ2Y0FAKQKx/xrsVUv8xhsAAcSA7xaoqrox/fdpifkewtMZhN7etQpl5Adsu5qhubvJe 1yBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=n+k02eQPc3Z36SK8b+IVbI3aA4JuoAfer7tExcXmHEY=; b=rdLhnD1R4ISk3DYTA+E5qmxLySeqKGNQKgNAUg/78RNcT0RyiNJFGzlAlqeMwjuMrS WpnaJkcHxp4TByGfoDOaLDLuqG78Eis0Nmg+YnmrcHwWn1H8c4lbuJLw67PNiKKgpXta qutEHy6GnqdKl4lbwSGwfR0xts2Q10ePd+EzMYxMcsCa6/RaXLnLHKtzGAhXLu1h8lNm muYP/dUau5aVoG9/uZ/ha4Q76FUv32tM4ZwaWRhVMlKPLfJ/CWnzdOea6q4l6cPrwIkZ MTtj6ebz1iopg6LU3zBTQVTiZUOnZPbwpXUvRd1DT/9BuZbg7EVDChDYamvd1rg6j3gk TJEw== X-Gm-Message-State: AOAM532b2sHMUVtkcCz0JUGxCLI0Lf7CbZ0k35HPSLaf8jPe7W6xGMee bMCLI9H5I64WhHl1za00kOT5A02C/ks= X-Google-Smtp-Source: ABdhPJwG2DnN8MgaP2TKIg9e2KkUbMYpdHrGGAit5c9TrdLpcU6X1hKk1XC2xme3cywxyQC497vbdA== X-Received: by 2002:a17:906:6c94:: with SMTP id s20mr14016129ejr.0.1608198052464; Thu, 17 Dec 2020 01:40:52 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 06/18] libiscsi: convert to meson Date: Thu, 17 Dec 2020 10:40:32 +0100 Message-Id: <20201217094044.46462-7-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201217094044.46462-1-pbonzini@redhat.com> References: <20201217094044.46462-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::62e; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x62e.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Marc-Andr=C3=83=C2=A9=20Lureau?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau --- block/meson.build | 2 +- configure | 29 ++++------------------------- contrib/vhost-user-scsi/meson.build | 2 +- meson.build | 10 ++++++---- meson_options.txt | 2 ++ 5 files changed, 14 insertions(+), 31 deletions(-) diff --git a/block/meson.build b/block/meson.build index b02cb14aad..134034abb4 100644 --- a/block/meson.build +++ b/block/meson.build @@ -59,7 +59,7 @@ block_ss.add(when: 'CONFIG_QED', if_true: files( block_ss.add(when: [libxml2, 'CONFIG_PARALLELS'], if_true: files('parallel= s.c')) block_ss.add(when: 'CONFIG_WIN32', if_true: files('file-win32.c', 'win32-a= io.c')) block_ss.add(when: 'CONFIG_POSIX', if_true: [files('file-posix.c'), coref,= iokit]) -block_ss.add(when: 'CONFIG_LIBISCSI', if_true: files('iscsi-opts.c')) +block_ss.add(when: libiscsi, if_true: files('iscsi-opts.c')) block_ss.add(when: 'CONFIG_LINUX', if_true: files('nvme.c')) block_ss.add(when: 'CONFIG_REPLICATION', if_true: files('replication.c')) block_ss.add(when: 'CONFIG_SHEEPDOG', if_true: files('sheepdog.c')) diff --git a/configure b/configure index 082ac3bf35..e22c56e8f6 100755 --- a/configure +++ b/configure @@ -406,7 +406,7 @@ guest_agent_msi=3D"$default_feature" vss_win32_sdk=3D"$default_feature" win_sdk=3D"no" want_tools=3D"$default_feature" -libiscsi=3D"$default_feature" +libiscsi=3D"auto" libnfs=3D"$default_feature" coroutine=3D"" coroutine_pool=3D"$default_feature" @@ -1139,9 +1139,9 @@ for opt do ;; --enable-spice) spice=3D"yes" ;; - --disable-libiscsi) libiscsi=3D"no" + --disable-libiscsi) libiscsi=3D"disabled" ;; - --enable-libiscsi) libiscsi=3D"yes" + --enable-libiscsi) libiscsi=3D"enabled" ;; --disable-libnfs) libnfs=3D"no" ;; @@ -4315,21 +4315,6 @@ if compile_prog "" "" ; then bswap_h=3Dyes fi =20 -########################################## -# Do we have libiscsi >=3D 1.9.0 -if test "$libiscsi" !=3D "no" ; then - if $pkg_config --atleast-version=3D1.9.0 libiscsi; then - libiscsi=3D"yes" - libiscsi_cflags=3D$($pkg_config --cflags libiscsi) - libiscsi_libs=3D$($pkg_config --libs libiscsi) - else - if test "$libiscsi" =3D "yes" ; then - feature_not_found "libiscsi" "Install libiscsi >=3D 1.9.0" - fi - libiscsi=3D"no" - fi -fi - ########################################## # Do we need librt # uClibc provides 2 versions of clock_gettime(), one with realtime @@ -6231,12 +6216,6 @@ if test "$zstd" =3D "yes" ; then echo "ZSTD_LIBS=3D$zstd_libs" >> $config_host_mak fi =20 -if test "$libiscsi" =3D "yes" ; then - echo "CONFIG_LIBISCSI=3Dy" >> $config_host_mak - echo "LIBISCSI_CFLAGS=3D$libiscsi_cflags" >> $config_host_mak - echo "LIBISCSI_LIBS=3D$libiscsi_libs" >> $config_host_mak -fi - if test "$libnfs" =3D "yes" ; then echo "CONFIG_LIBNFS=3Dy" >> $config_host_mak echo "LIBNFS_LIBS=3D$libnfs_libs" >> $config_host_mak @@ -6802,7 +6781,7 @@ NINJA=3D$ninja $meson setup \ -Dvnc=3D$vnc -Dvnc_sasl=3D$vnc_sasl -Dvnc_jpeg=3D$vnc_jpeg -Dvnc_p= ng=3D$vnc_png \ -Dgettext=3D$gettext -Dxkbcommon=3D$xkbcommon -Du2f=3D$u2f -Dvirti= ofsd=3D$virtiofsd \ -Dcapstone=3D$capstone -Dslirp=3D$slirp -Dfdt=3D$fdt -Dbrlapi=3D$b= rlapi \ - -Dcurl=3D$curl -Dglusterfs=3D$glusterfs -Dbzip2=3D$bzip2 \ + -Dcurl=3D$curl -Dglusterfs=3D$glusterfs -Dbzip2=3D$bzip2 -Dlibiscs= i=3D$libiscsi \ -Diconv=3D$iconv -Dcurses=3D$curses -Dlibudev=3D$libudev\ -Ddocs=3D$docs -Dsphinx_build=3D$sphinx_build -Dinstall_blobs=3D$b= lobs \ -Dvhost_user_blk_server=3D$vhost_user_blk_server \ diff --git a/contrib/vhost-user-scsi/meson.build b/contrib/vhost-user-scsi/= meson.build index 044c50bf43..cc893f6f20 100644 --- a/contrib/vhost-user-scsi/meson.build +++ b/contrib/vhost-user-scsi/meson.build @@ -1,4 +1,4 @@ -if 'CONFIG_LIBISCSI' in config_host +if libiscsi.found() executable('vhost-user-scsi', files('vhost-user-scsi.c'), dependencies: [qemuutil, libiscsi, vhost_user], build_by_default: targetos =3D=3D 'linux', diff --git a/meson.build b/meson.build index 9ba8eecf37..3f53a7f1b2 100644 --- a/meson.build +++ b/meson.build @@ -372,9 +372,10 @@ if 'CONFIG_PLUGIN' in config_host libdl =3D cc.find_library('dl', required: true) endif libiscsi =3D not_found -if 'CONFIG_LIBISCSI' in config_host - libiscsi =3D declare_dependency(compile_args: config_host['LIBISCSI_CFLA= GS'].split(), - link_args: config_host['LIBISCSI_LIBS'].sp= lit()) +if not get_option('libiscsi').auto() or have_block + libiscsi =3D dependency('libiscsi', version: '>=3D1.9.0', + required: get_option('libiscsi'), + method: 'pkg-config', static: enable_static) endif zstd =3D not_found if 'CONFIG_ZSTD' in config_host @@ -926,6 +927,7 @@ config_host_data.set('CONFIG_GLUSTERFS_FALLOCATE', glus= terfs.version().version_c config_host_data.set('CONFIG_GLUSTERFS_ZEROFILL', glusterfs.version().vers= ion_compare('>=3D6')) config_host_data.set('CONFIG_GLUSTERFS_FTRUNCATE_HAS_STAT', glusterfs_ftru= ncate_has_stat) config_host_data.set('CONFIG_GLUSTERFS_IOCB_HAS_STAT', glusterfs_iocb_has_= stat) +config_host_data.set('CONFIG_LIBISCSI', libiscsi.found()) config_host_data.set('CONFIG_SDL', sdl.found()) config_host_data.set('CONFIG_SDL_IMAGE', sdl_image.found()) config_host_data.set('CONFIG_VHOST_USER_BLK_SERVER', have_vhost_user_blk_s= erver) @@ -2283,7 +2285,7 @@ summary_info +=3D {'libusb': config_host.h= as_key('CONFIG_USB_LIBUSB')} summary_info +=3D {'usb net redir': config_host.has_key('CONFIG_USB_RE= DIR')} summary_info +=3D {'OpenGL support': config_host.has_key('CONFIG_OPENGL= ')} summary_info +=3D {'OpenGL dmabufs': config_host.has_key('CONFIG_OPENGL= _DMABUF')} -summary_info +=3D {'libiscsi support': config_host.has_key('CONFIG_LIBISC= SI')} +summary_info +=3D {'libiscsi support': libiscsi.found()} summary_info +=3D {'libnfs support': config_host.has_key('CONFIG_LIBNFS= ')} summary_info +=3D {'build guest agent': config_host.has_key('CONFIG_GUEST_= AGENT')} if targetos =3D=3D 'windows' diff --git a/meson_options.txt b/meson_options.txt index fd16f3b399..b562d4f1a6 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -50,6 +50,8 @@ option('curl', type : 'feature', value : 'auto', description: 'CURL block device driver') option('glusterfs', type : 'feature', value : 'auto', description: 'Glusterfs block device driver') +option('libiscsi', type : 'feature', value : 'auto', + description: 'libiscsi userspace initiator') option('mpath', type : 'feature', value : 'auto', description: 'Multipath persistent reservation passthrough') option('iconv', type : 'feature', value : 'auto', --=20 2.29.2