From nobody Mon Feb 9 00:30:10 2026 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=1646643735; cv=none; d=zohomail.com; s=zohoarc; b=QQg3kxfft4dLpwqaAn+vlkmQu26SqoE5FE4MgBF6JlWpgQwZGOXMqJhyAScRDVdFNmc+W6DSL3tYNIhaNfs4YdZaxEZBApvvoFTxthjyuW6tj0tTbgX7H4qb/lobhkdX8AQxQwP7pbItsyfPosrMWeshs3IJrXgTFnSyGnOtBC0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1646643735; 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=QJEx1e0vLhnKh7TwIfgeCnUEgqmZFOa8RgYMQUgghRQ=; b=iSwMUPJNnGMVhcqQV7D0ZInS4SW5bl3zHtTazEyAV0+HmuTP4Cf6qctXPBqKTzD3pE5eL8N3FELHvAGKnPHGVunTw1tjihgF2tM36o4CXs43ep+kvYAv3oLMICtEZOob2d9c2uYdw65bWGotpNxE08bJJEir6mrOsfVhkF1UDOM= 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 164664373576188.58673074400872; Mon, 7 Mar 2022 01:02:15 -0800 (PST) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-467-lkIIXIm1OyGvsbE5AUaQTQ-1; Mon, 07 Mar 2022 04:01:31 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8737D2A5955A; Mon, 7 Mar 2022 09:01:26 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 71ACF400E43E; Mon, 7 Mar 2022 09:01:26 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 312E41931BDD; Mon, 7 Mar 2022 09:01:26 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 689701930587 for ; Mon, 7 Mar 2022 09:01:24 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 2851F21ECB; Mon, 7 Mar 2022 09:01:24 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.45]) by smtp.corp.redhat.com (Postfix) with ESMTP id A20E61F470 for ; Mon, 7 Mar 2022 09:01:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1646643734; 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=QJEx1e0vLhnKh7TwIfgeCnUEgqmZFOa8RgYMQUgghRQ=; b=WomjfI6qzogTONCxHIA9UWmDCUTjKZROvZqVLIrO+SXUbSA2oZD54/E9I6l2/mJvx6P1PF vTzqX8PGaurfcY0ehoXGO1Sg2msguGWcLcCe9bnV9Vwj4wsfcwIzqfzfvteii3x/EJDOXY EvKgWRN3SAtbD4FqPmvbDczPkzzCC5E= X-MC-Unique: lkIIXIm1OyGvsbE5AUaQTQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 17/17] meson: Detect newer fuse Date: Mon, 7 Mar 2022 10:01:07 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 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: 1646643736084100002 Content-Type: text/plain; charset="utf-8" Now that we have support for fuse-3 we can detect it during the configure phase. Even better, we can detect fuse-3 first and fallback to old fuse only if the newer version doesn't exist. Signed-off-by: Michal Privoznik --- meson.build | 12 +++++++++--- src/lxc/lxc_fuse.c | 6 +++++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 519a928c9a..f6259e59a4 100644 --- a/meson.build +++ b/meson.build @@ -947,10 +947,16 @@ if dlopen_dep.found() conf.set('WITH_DLFCN_H', 1) endif =20 -fuse_version =3D '2.8.6' -fuse_dep =3D dependency('fuse', version: '>=3D' + fuse_version, required: = get_option('fuse')) +fuse_version =3D '3.1.0' +fuse_dep =3D dependency('fuse3', version: '>=3D' + fuse_version, required:= false) if fuse_dep.found() - conf.set('WITH_FUSE', 1) + conf.set('WITH_FUSE', 3) +else + fuse_version =3D '2.8.6' + fuse_dep =3D dependency('fuse', version: '>=3D' + fuse_version, required= : get_option('fuse')) + if fuse_dep.found() + conf.set('WITH_FUSE', 1) + endif endif =20 glib_version =3D '2.56.0' diff --git a/src/lxc/lxc_fuse.c b/src/lxc/lxc_fuse.c index 802b2f5a1b..5e48206c39 100644 --- a/src/lxc/lxc_fuse.c +++ b/src/lxc/lxc_fuse.c @@ -26,7 +26,11 @@ #include =20 #if WITH_FUSE -# define FUSE_USE_VERSION 26 +# if WITH_FUSE =3D=3D 3 +# define FUSE_USE_VERSION 31 +# else +# define FUSE_USE_VERSION 26 +# endif # include # if FUSE_USE_VERSION >=3D 31 # include --=20 2.34.1