From nobody Thu May 2 18:18: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=1635934443; cv=none; d=zohomail.com; s=zohoarc; b=Wp0jZZwPZVV3XqBGb7L5UmjQilj/oU/YXx5UxhcwRsKYSvqkbrbLN4J5T9bNYOZnnc2lKLA2bi3lFO2kqa79XQ9grhN4jJ0Wa4L971gydHtBMrbjRSw6SYq8lUDLXJ1i1uFjU5S4CWrYuKT309cq1pfEUlqb9AF931Tr+EMWsas= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1635934443; 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=TciCQ8vsZx0lfeJPxHXMPkJ4vp/mu6jZxpU43D7P/is=; b=oJZ7QcPqQbevygnf4nR93VtvZGo9icszncKxdN/eptsHxHQGCTvDk+l4iEFa/9S42GARr7NvfBHiRN2d3HYpoXmXY3lOwWrlrW1927VEV0PM/c5t/PqY8U+mnsNEOpmU9EtQNc2847yxJ38wfwfNKWi+mrGtu3zF3yq0obhmK0Q= 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 1635934443674191.9650921150386; Wed, 3 Nov 2021 03:14:03 -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-461-iZALvGpeM4O2rs_4nWskTw-1; Wed, 03 Nov 2021 06:13:10 -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 BDB01100CCC1; Wed, 3 Nov 2021 10:13:05 +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 9B0B460843; Wed, 3 Nov 2021 10:13: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 6A13B4A703; Wed, 3 Nov 2021 10:13:04 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1A3AD2s1001527 for ; Wed, 3 Nov 2021 06:13:02 -0400 Received: by smtp.corp.redhat.com (Postfix) id 7BDE55D9DE; Wed, 3 Nov 2021 10:13:02 +0000 (UTC) Received: from kinshicho.usersys.redhat.com (unknown [10.40.195.83]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 91C555D9D5 for ; Wed, 3 Nov 2021 10:13:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1635934442; 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=TciCQ8vsZx0lfeJPxHXMPkJ4vp/mu6jZxpU43D7P/is=; b=jKQ+aRVm96Vo2/UfT7qhRcLJjcWgim4yyoYs6TI5wp94WXJvVq8NVP537e5K451pbKVSPh e1+AG73OhyIxAm+RTGTj5SRvMXt38rWVfPUBntbBGAkO7aHhFVhng7LVrKheRhOqjfGW2C TS+N2Jj+4FoaaFeW/WiTiuBmRXdiVHg= X-MC-Unique: iZALvGpeM4O2rs_4nWskTw-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 1/2] meson: Enable ZFS storage backend even more often Date: Wed, 3 Nov 2021 11:12:48 +0100 Message-Id: <20211103101249.100507-2-abologna@redhat.com> In-Reply-To: <20211103101249.100507-1-abologna@redhat.com> References: <20211103101249.100507-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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) X-ZM-MESSAGEID: 1635934444164100001 Content-Type: text/plain; charset="utf-8" Commit 73a2ff36163e already improved the situation a lot. This pushes things even further. If the user or, more likely, the distro packager explicitly asked for ZFS support to be enabled, then we should comply with that request regardless of whether the necessary programs are available at build time. This is particularly important in the context of Debian, where ZFS cannot be a build dependency of libvirt due to licensing issues but it can still be an optional runtime dependency. Signed-off-by: Andrea Bolognani Reviewed-by: Tim Wiederhake --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 3a9066b9fe..5b73713e50 100644 --- a/meson.build +++ b/meson.build @@ -1978,7 +1978,7 @@ if conf.has('WITH_LIBVIRTD') foreach name : [ 'zfs', 'zpool' ] set_variable( '@0@_prog'.format(name), - find_program(name, required: get_option('storage_zfs'), dirs: libv= irt_sbin_path) + find_program(name, required: false, dirs: libvirt_sbin_path) ) endforeach =20 --=20 2.31.1 From nobody Thu May 2 18:18:33 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1635934444; cv=none; d=zohomail.com; s=zohoarc; b=Iffbmjg2zJiGPpHRnd9OVwakOpgiAEt0u2pcNMncyeMkR4oI49a+4+0GsEfEssGlztVkd82QAUJ8qc4U8ONM/dbGpQ1mjyJ4HNpQAP5enn90TWCq2J5IE0xJhMQqEk98YeWJyS5nLeiS+TXfHx7sI8Mn0MenETVfTivfuzJbeDw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1635934444; 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=W6Y2tOTf7EmKRnmHF9N8FTa0luEb52kmGXZloVpW8FM=; b=nhzUMOZIpdB1kXGeUvNJ3jzro6XCBf59DHpOALFyrSU4/+1PKyU8oBv/1/6UvxrYdBg+EJe7xRYwdoY68bmCER7y+PQCSEU2FllQmmalJ7FrxaTC6DJZJ1OpScMI2jm/Ao2w9O6tn4iEHJsqsIw4P5EQpZArMbQUErVNM1+QUpg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.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 [216.205.24.124]) by mx.zohomail.com with SMTPS id 1635934444546636.1902946331511; Wed, 3 Nov 2021 03:14:04 -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-485-mj7hUSsENau3rkKaLguQ5A-1; Wed, 03 Nov 2021 06:13:20 -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 4DE34A40C6; Wed, 3 Nov 2021 10:13:15 +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 0A4C960BF1; Wed, 3 Nov 2021 10:13:15 +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 D5E861818480; Wed, 3 Nov 2021 10:13:14 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1A3AD4qs001533 for ; Wed, 3 Nov 2021 06:13:04 -0400 Received: by smtp.corp.redhat.com (Postfix) id 102AA5D9DE; Wed, 3 Nov 2021 10:13:04 +0000 (UTC) Received: from kinshicho.usersys.redhat.com (unknown [10.40.195.83]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2034C5D9D5 for ; Wed, 3 Nov 2021 10:13:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1635934443; 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=W6Y2tOTf7EmKRnmHF9N8FTa0luEb52kmGXZloVpW8FM=; b=D/nc2CEl5eReKLIu/O/+wwlu3oW0yIQkBUZ9UKbjpCYQtnro4z/ueiwF0pn3Uc0fuXRyLY giM0ZocvVlcik0y6u1SmsrmNDHCgEETkw9yFYQst8U7BVVlUur4o0xFYR8QcONWhmIFb2+ 7Ow4UaseQ0UsxL8JhkvDzSTjfe55ydc= X-MC-Unique: mj7hUSsENau3rkKaLguQ5A-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 2/2] meson: Stop looking up ZFS programs at build time Date: Wed, 3 Nov 2021 11:12:49 +0100 Message-Id: <20211103101249.100507-3-abologna@redhat.com> In-Reply-To: <20211103101249.100507-1-abologna@redhat.com> References: <20211103101249.100507-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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) X-ZM-MESSAGEID: 1635934446540100001 Content-Type: text/plain; charset="utf-8" At this point, we're no longer using the availability of the ZFS programs at build time to decide whether to enable ZFS support, so the only purpose of these find_program() calls is to record their absolute paths. However, the virCommand facilities that we're ultimately using to run them are already capable of performing this lookup at runtime, and in fact that's exactly what we already do in the case of, for example, vstorage. Drop the build time lookups and always perform them at runtime. Signed-off-by: Andrea Bolognani Reviewed-by: Tim Wiederhake --- meson.build | 16 ---------------- src/storage/storage_backend_zfs.c | 3 +++ 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/meson.build b/meson.build index 5b73713e50..414e10960d 100644 --- a/meson.build +++ b/meson.build @@ -1975,24 +1975,8 @@ if conf.has('WITH_LIBVIRTD') endif =20 if not get_option('storage_zfs').disabled() - foreach name : [ 'zfs', 'zpool' ] - set_variable( - '@0@_prog'.format(name), - find_program(name, required: false, dirs: libvirt_sbin_path) - ) - endforeach - use_storage =3D true conf.set('WITH_STORAGE_ZFS', 1) - foreach name : [ 'zfs', 'zpool' ] - prog_var =3D get_variable('@0@_prog'.format(name)) - if prog_var.found() - prog_path =3D prog_var.path() - else - prog_path =3D name - endif - conf.set_quoted(name.to_upper(), prog_path) - endforeach endif endif =20 diff --git a/src/storage/storage_backend_zfs.c b/src/storage/storage_backen= d_zfs.c index 6fabeade11..2a5d74357d 100644 --- a/src/storage/storage_backend_zfs.c +++ b/src/storage/storage_backend_zfs.c @@ -33,6 +33,9 @@ =20 VIR_LOG_INIT("storage.storage_backend_zfs"); =20 +#define ZFS "zfs" +#define ZPOOL "zpool" + /* * Some common flags of zfs and zpool commands we use: * -H -- don't print headers and separate fields by tab --=20 2.31.1