From nobody Sun Apr 28 17:09:52 2024 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=1637001941; cv=none; d=zohomail.com; s=zohoarc; b=mKi6eSjZwwQEQW6cLVsyak5R7jtL2ZYWou20hfJHd0FsBezcVcKvFZXuFO30sKDp0xlLu9G5vo9odcra/o1U0Xs8u/NL6g2b2lqwVlKNrYF6npCdm9W0d9stn2VsxDIwJbRU2SQEQyD4dIF4pLle1BXwpgIy1IUb4/4Kp2lFrIs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637001941; 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=NV6v1FMqgO66bN4PtYjgsbDzHNQMIL0e3608DIpgyn8=; b=UHANhBd0kcaONnhcvziusTQR6wgqyt3eMfeOfE28FVam+GVRv0Sxg176ZRsjt91lAWD45T3zaHA40vehbHhpiGNR7005dygqZybbxJWr3WwESzYh9UleSOc0Ta0zlUN7Ewm3sCKLQwxxKGKbNUzVAkpFeZPF94Da9ec0x3RUAFY= 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) 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 1637001941530454.84274247986775; Mon, 15 Nov 2021 10:45:41 -0800 (PST) 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-12-jHBeiRhGM1-SUhB2QmnUgw-1; Mon, 15 Nov 2021 13:45:38 -0500 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 55A631006ABC; Mon, 15 Nov 2021 18:45:33 +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 1CFD05FCB3; Mon, 15 Nov 2021 18:45:32 +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 56278181A1D1; Mon, 15 Nov 2021 18:45:30 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1AFIjSgC008629 for ; Mon, 15 Nov 2021 13:45:28 -0500 Received: by smtp.corp.redhat.com (Postfix) id 8149360C9F; Mon, 15 Nov 2021 18:45:28 +0000 (UTC) Received: from kinshicho.usersys.redhat.com (unknown [10.40.193.143]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C4D2B60C7F for ; Mon, 15 Nov 2021 18:45:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1637001940; 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=NV6v1FMqgO66bN4PtYjgsbDzHNQMIL0e3608DIpgyn8=; b=MvOOrn/dtqYd5iJCazTRJxLA80VCz5T0SJg5GnW5kDSBjkvktAqppe7ckTC0j8OEETFHjz C9JzVObUg5M15Q4xNahtqDt2y7g9IWD5XGHLpJn0sCSBQKMUxz8zCSJz/tR7684/8u8Tfm o6ylXzyWeXXakAAk0zlVSpSiA8e+GMg= X-MC-Unique: jHBeiRhGM1-SUhB2QmnUgw-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 1/5] meson: Define qemu_moddir correctly Date: Mon, 15 Nov 2021 19:45:17 +0100 Message-Id: <20211115184521.75340-2-abologna@redhat.com> In-Reply-To: <20211115184521.75340-1-abologna@redhat.com> References: <20211115184521.75340-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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: 1637001943634100001 Content-Type: text/plain; charset="utf-8" We can't hardcode /usr here, because the user might have configured whatever arbitrary prefix. Everything appeared to be okay because when joining paths Meson will drop any component that precedes an absolute path and libdir happens to be absolute, but we should still do things correctly instead of relying on this. Fixes: 2ad009eadde27491ff4248f481560953776b2a87 Signed-off-by: Andrea Bolognani Reviewed-by: J=C3=A1n Tomko --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index dd46572365..e1e4621868 100644 --- a/meson.build +++ b/meson.build @@ -1681,7 +1681,7 @@ if not get_option('driver_qemu').disabled() =20 qemu_moddir =3D get_option('qemu_moddir') if qemu_moddir =3D=3D '' - qemu_moddir =3D '/usr' / libdir / 'qemu' + qemu_moddir =3D libdir / 'qemu' endif conf.set_quoted('QEMU_MODDIR', qemu_moddir) =20 --=20 2.31.1 From nobody Sun Apr 28 17:09:52 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=1637002027; cv=none; d=zohomail.com; s=zohoarc; b=gltlEOFIqnPAJreyGe8Llvler8qxa9NjWWXyqwe///QbSUf62QZCp9+eoN4lUnhymqzgia1CPnTMKcVl4ayO5nUHPw4dxTk5OiO3p9h08ib2+Bne1OpjDHm987O/DPOTfQefpinZ/uM3pS2PGdv1K5uRx05T9dSkg9ko/t1Q/Og= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637002027; 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=+5dUjq/iF8I0xUUB/7IVYUmvqXg49EAwqKSzfqKpLKE=; b=mP2ZJlEpmMlhIEHX0JH75eDKrPf7X51mG4dwGfftw0EWkBVVjWoh78yetmdolqW4Na1+r6viwo+tgieP7wfKFCxAaoBtAcKNyHUmrKyh3cQYHlfDE5sgeWDpY53VrzBY5kMiDgowX/GdEZ5Gn9m9sN7bRzmoSCaMK+332bh2dRo= 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 1637002027180857.1588062062781; Mon, 15 Nov 2021 10:47:07 -0800 (PST) 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-266-8K4sfSBDOQ2OxXunpNy0cA-1; Mon, 15 Nov 2021 13:45:49 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E7BB187D550; Mon, 15 Nov 2021 18:45:44 +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 C525E5FC13; Mon, 15 Nov 2021 18:45:44 +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 90DFF4E58E; Mon, 15 Nov 2021 18:45:44 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1AFIjTbb008649 for ; Mon, 15 Nov 2021 13:45:29 -0500 Received: by smtp.corp.redhat.com (Postfix) id BFB2760C7F; Mon, 15 Nov 2021 18:45:29 +0000 (UTC) Received: from kinshicho.usersys.redhat.com (unknown [10.40.193.143]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 07D3560C9F for ; Mon, 15 Nov 2021 18:45:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1637002026; 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=+5dUjq/iF8I0xUUB/7IVYUmvqXg49EAwqKSzfqKpLKE=; b=BMxa35Al8LW4wuGzEqEbB1CLDcqtul6qriYJ74Lfquna2FHgLMGkA4Y0g6sUR2Tp93XvAx 8H9hgeqd7xh9dvgH4jORg/bdb1QqB27eiqariFTcmkAIDE4RW+UVl88Ko7opA2t4mMV3ph YUW4H5+/Q8OenmgEzgzcuUXRPaDKGGA= X-MC-Unique: 8K4sfSBDOQ2OxXunpNy0cA-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 2/5] qemu: Set QEMU data location correctly Date: Mon, 15 Nov 2021 19:45:18 +0100 Message-Id: <20211115184521.75340-3-abologna@redhat.com> In-Reply-To: <20211115184521.75340-1-abologna@redhat.com> References: <20211115184521.75340-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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.16 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: 1637002028815100001 Content-Type: text/plain; charset="utf-8" While datadir must live under prefix, there is no requirement that its name must necessarily be "share": a different, arbitrary name could have been provided by the user. Fixes: 3c876d2428ee3abbb11a50698a9e225cffb72cbc Signed-off-by: Andrea Bolognani Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_interop_config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_interop_config.c b/src/qemu/qemu_interop_config.c index 848e8f7381..fe1bd44b41 100644 --- a/src/qemu/qemu_interop_config.c +++ b/src/qemu/qemu_interop_config.c @@ -80,7 +80,7 @@ qemuBuildFileList(GHashTable *files, const char *dir) return 0; } =20 -#define QEMU_SYSTEM_LOCATION PREFIX "/share/qemu" +#define QEMU_SYSTEM_LOCATION DATADIR "/qemu" #define QEMU_ETC_LOCATION SYSCONFDIR "/qemu" =20 int --=20 2.31.1 From nobody Sun Apr 28 17:09:52 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=1637001979; cv=none; d=zohomail.com; s=zohoarc; b=W/+vtYIOxX05NKgQL4+r4Vx5KsmEWojfu2I6xiyTV0a8Qg3vZ4IZPp1x08ERPavaySkn0WV+i5PgJwSus5/fkuieS8Kp5deUqzIUtIZW5rjOY7qISz/KLdFy+0tA9BnuSWqEkeAyzuze2XLhuQNISOAXxwO2DSNnal/tMGWcBK4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637001979; 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=vSlgGfxnMDt0cJj8o/asKO93KD98djRtFMTwAKz7Fos=; b=C8n21G6V6a+3dDwpUy1il6dgtM6Ynrz6S3lCKRq5oRO443knuu5pfqoXiE9sulFzlMyzGPaDdYzuHSnu1/6kyYJqhVV1bgtnsK0hA8hksXCz2FxGJ90Nf3hxP2qafI3HMhyrwUZG+mmuxoSgLBEXT5MVbTmg2HKpuIBVsy21Io8= 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 1637001979161187.68694899872048; Mon, 15 Nov 2021 10:46:19 -0800 (PST) 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-409-SLNLtlklNUevnocFQliYEg-1; Mon, 15 Nov 2021 13:45:53 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B73EB101450A; Mon, 15 Nov 2021 18:45:47 +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 8FCBB5F4E1; Mon, 15 Nov 2021 18:45:47 +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 6157D181A1D1; Mon, 15 Nov 2021 18:45:47 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1AFIjUXg008659 for ; Mon, 15 Nov 2021 13:45:31 -0500 Received: by smtp.corp.redhat.com (Postfix) id F130A60C9F; Mon, 15 Nov 2021 18:45:30 +0000 (UTC) Received: from kinshicho.usersys.redhat.com (unknown [10.40.193.143]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5833F60C7F for ; Mon, 15 Nov 2021 18:45:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1637001978; 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=vSlgGfxnMDt0cJj8o/asKO93KD98djRtFMTwAKz7Fos=; b=SgG94TUIrRrayS0wUDpNa40AbwCducXOmrnEUOcGy7KhW02iskvd9nnJw2srfv5tgHDyQk gz3nd+GOT9Zlzl7vnNWOpQnUfZo194SNEpB4DDIh6TT8Rx5VHbj1eYLQrKF9cXkYnmeWqT GxzApDfy0zhAOwYqmdNTz6KdvGxcbsE= X-MC-Unique: SLNLtlklNUevnocFQliYEg-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 3/5] qemu: Rename interop locations Date: Mon, 15 Nov 2021 19:45:19 +0100 Message-Id: <20211115184521.75340-4-abologna@redhat.com> In-Reply-To: <20211115184521.75340-1-abologna@redhat.com> References: <20211115184521.75340-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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.15 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: 1637001981062100001 Content-Type: text/plain; charset="utf-8" Use abstract names that more closely match the Meson nomenclature. Signed-off-by: Andrea Bolognani Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_interop_config.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_interop_config.c b/src/qemu/qemu_interop_config.c index fe1bd44b41..d3f1f34ecf 100644 --- a/src/qemu/qemu_interop_config.c +++ b/src/qemu/qemu_interop_config.c @@ -80,8 +80,8 @@ qemuBuildFileList(GHashTable *files, const char *dir) return 0; } =20 -#define QEMU_SYSTEM_LOCATION DATADIR "/qemu" -#define QEMU_ETC_LOCATION SYSCONFDIR "/qemu" +#define QEMU_DATADIR DATADIR "/qemu" +#define QEMU_CONFDIR SYSCONFDIR "/qemu" =20 int qemuInteropFetchConfigs(const char *name, @@ -91,8 +91,8 @@ qemuInteropFetchConfigs(const char *name, g_autoptr(GHashTable) files =3D virHashNew(g_free); g_autofree char *homeConfig =3D NULL; g_autofree char *xdgConfig =3D NULL; - g_autofree char *sysLocation =3D virFileBuildPath(QEMU_SYSTEM_LOCATION= , name, NULL); - g_autofree char *etcLocation =3D virFileBuildPath(QEMU_ETC_LOCATION, n= ame, NULL); + g_autofree char *dataLocation =3D virFileBuildPath(QEMU_DATADIR, name,= NULL); + g_autofree char *confLocation =3D virFileBuildPath(QEMU_CONFDIR, name,= NULL); g_autofree virHashKeyValuePair *pairs =3D NULL; size_t npairs; virHashKeyValuePair *tmp =3D NULL; @@ -117,10 +117,10 @@ qemuInteropFetchConfigs(const char *name, homeConfig =3D g_strdup_printf("%s/qemu/%s", xdgConfig, name); } =20 - if (qemuBuildFileList(files, sysLocation) < 0) + if (qemuBuildFileList(files, dataLocation) < 0) return -1; =20 - if (qemuBuildFileList(files, etcLocation) < 0) + if (qemuBuildFileList(files, confLocation) < 0) return -1; =20 if (homeConfig && --=20 2.31.1 From nobody Sun Apr 28 17:09:52 2024 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=1637001943; cv=none; d=zohomail.com; s=zohoarc; b=UOaOixnmlTlYEt8qSSKI2qeRx6Hwv+RRJMsStTkjBsRzD/I6y4knUqTatoXmBjQiKj+a3LFTh04z1Sjgdo6CtELXzM2HlsK6liQQvsRC1iOOvPeCm9sOKYVHkykGwhDU+B70BsLa0jX23pXrjOFHRMMd3cGE0Rw2p7wWBP+utTc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637001943; 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=GKXP9uI3dXefEtnTr3SVDJrVmdcF0/yJT7ZJg/AS8UI=; b=BFxnvaMoO94ONbvq9UgK9OpeX7WZyQju7VY8nZeSYXHKkpEAdJhN5nenynKDJ4AN7VtaYmZLb8uVcAgfKphnCIeNk0Y3tQ2P8Ox1gKJarvFILIcc/U+VsZSDZICCk5ccYonrlddazsTokus4eH/oCyv6n1PXWFzQzROuK5v8LLw= 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) 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 1637001943883270.3595142199921; Mon, 15 Nov 2021 10:45:43 -0800 (PST) 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-252-zwWKOqBoOUatVeGeIoRQrg-1; Mon, 15 Nov 2021 13:45:39 -0500 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 77EA41006AA1; Mon, 15 Nov 2021 18:45:34 +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 4E2FF7092B; Mon, 15 Nov 2021 18:45:34 +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 239FD1819AC1; Mon, 15 Nov 2021 18:45:34 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1AFIjWkU008673 for ; Mon, 15 Nov 2021 13:45:32 -0500 Received: by smtp.corp.redhat.com (Postfix) id 38DCA60C9F; Mon, 15 Nov 2021 18:45:32 +0000 (UTC) Received: from kinshicho.usersys.redhat.com (unknown [10.40.193.143]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6038960C7F for ; Mon, 15 Nov 2021 18:45:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1637001942; 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=GKXP9uI3dXefEtnTr3SVDJrVmdcF0/yJT7ZJg/AS8UI=; b=dzA5yijgnHfEwyk99eMdNFU3/vGIlZsKZZnUdXWiijQYsaiKmlzs4DQycbQxlnZHUoOYKo /5I22XejSTHGjv8Ovqw25EyV9HEa+RyWm1CaXh/oCdEPYguR5LtVMSszjQJ82p4NcdB+pa aBR5okMhWPYF1J6zG73hGIyaWY96i3Y= X-MC-Unique: zwWKOqBoOUatVeGeIoRQrg-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 4/5] meson: Introduce qemu_datadir option Date: Mon, 15 Nov 2021 19:45:20 +0100 Message-Id: <20211115184521.75340-5-abologna@redhat.com> In-Reply-To: <20211115184521.75340-1-abologna@redhat.com> References: <20211115184521.75340-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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: 1637001944839100003 Content-Type: text/plain; charset="utf-8" There is no guarantee that QEMU and libvirt have been configured with the same prefix. In particular, Homebrew on macOS will pass a different, private prefix for each package version and then use symlinks to make the files for a specific version appear in the usual locations. This works perfectly fine as long as one package doesn't try to go poking around another package's data - which is exactly what libvirt needs to do in order to read and parse the QEMU interop data. qemu_datadir can now be explicitly provided to make this and other uncommon scenarios work. The common scenario, where QEMU and libvirt both use the same prefix, is unaffected. https://gitlab.com/libvirt/libvirt/-/issues/168 Signed-off-by: Andrea Bolognani Reviewed-by: J=C3=A1n Tomko --- meson.build | 6 ++++++ meson_options.txt | 1 + src/qemu/qemu_interop_config.c | 1 - 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index e1e4621868..9022bcfdc9 100644 --- a/meson.build +++ b/meson.build @@ -1685,6 +1685,12 @@ if not get_option('driver_qemu').disabled() endif conf.set_quoted('QEMU_MODDIR', qemu_moddir) =20 + qemu_datadir =3D get_option('qemu_datadir') + if qemu_datadir =3D=3D '' + qemu_datadir =3D datadir / 'qemu' + endif + conf.set_quoted('QEMU_DATADIR', qemu_datadir) + if host_machine.system() in [ 'freebsd', 'darwin' ] default_qemu_user =3D 'root' default_qemu_group =3D 'wheel' diff --git a/meson_options.txt b/meson_options.txt index 859ed36b8f..5b43cdbd6b 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -62,6 +62,7 @@ option('driver_qemu', type: 'feature', value: 'auto', des= cription: 'QEMU/KVM dri option('qemu_user', type: 'string', value: '', description: 'username to r= un QEMU system instance as') option('qemu_group', type: 'string', value: '', description: 'groupname to= run QEMU system instance as') option('qemu_moddir', type: 'string', value: '', description: 'set the dir= ectory where QEMU modules are located') +option('qemu_datadir', type: 'string', value: '', description: 'set the di= rectory where QEMU shared data is located') option('driver_remote', type: 'feature', value: 'auto', description: 'remo= te driver') option('remote_default_mode', type: 'combo', choices: ['legacy', 'direct']= , value: 'direct', description: 'remote driver default mode') option('driver_secrets', type: 'feature', value: 'auto', description: 'loc= al secrets management driver') diff --git a/src/qemu/qemu_interop_config.c b/src/qemu/qemu_interop_config.c index d3f1f34ecf..24db722c0b 100644 --- a/src/qemu/qemu_interop_config.c +++ b/src/qemu/qemu_interop_config.c @@ -80,7 +80,6 @@ qemuBuildFileList(GHashTable *files, const char *dir) return 0; } =20 -#define QEMU_DATADIR DATADIR "/qemu" #define QEMU_CONFDIR SYSCONFDIR "/qemu" =20 int --=20 2.31.1 From nobody Sun Apr 28 17:09:52 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=1637001953; cv=none; d=zohomail.com; s=zohoarc; b=iNBKrokB2SZQCOSfiEMsYeemR7AKejONUMbPcd2GKmefeiVGmt4NIiLdnjbFNeTt/owbWjU+eZuwwY/iaa4Yg4FjrUNpUuibFUfJdxOaxnMMgzx7QLkB+DPs2gly8/Jpu2jYLNoguc42pjrUNgCiBYIKRrQPJR6xYnkkYM2+qpM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637001953; 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=ILgNb3OrNotsAC0QmtbJtgHECm3TG12PO4SRxDu3JMk=; b=aEvYGLHB9El3wI87KRW060V3moLF4nSVYo90ZgW2uDipMxX2h4Ld45y7/eR1NgIdUZKoKSYa7qnnwZRmflqbf1kfqh/GukaLbGwRaKY2sH6vJyuxTB2x3uoyIiFS7MD4u0ip/iwbO7LmTaZnNl6tu+uv6hw/sXO2kib4rrgLoi8= 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 1637001953001686.6048321120547; Mon, 15 Nov 2021 10:45:53 -0800 (PST) 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-189-JwOgymFgNsuPbaYSSuB6Xw-1; Mon, 15 Nov 2021 13:45:49 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 583AB81901C; Mon, 15 Nov 2021 18:45:44 +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 367E6196E2; Mon, 15 Nov 2021 18:45:44 +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 0BA461832DD7; Mon, 15 Nov 2021 18:45:44 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1AFIjXEt008688 for ; Mon, 15 Nov 2021 13:45:33 -0500 Received: by smtp.corp.redhat.com (Postfix) id 6DFC060C7F; Mon, 15 Nov 2021 18:45:33 +0000 (UTC) Received: from kinshicho.usersys.redhat.com (unknown [10.40.193.143]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9ACBB60BE5 for ; Mon, 15 Nov 2021 18:45:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1637001952; 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=ILgNb3OrNotsAC0QmtbJtgHECm3TG12PO4SRxDu3JMk=; b=hqQaDiDP6Jv5XPi0xJSmKOfKjQRyzSEjfsoSA0eb+S6BUzZRw9o/+/wjCKovoLlmOr7kXX RAnG1A4OEe7sULn/VzKWpCEsRdOBzv3WC/3RADFV6EojtCBl4kxul+QbKmK2+nuOVN13ir pRc1Vzj0eIiO4c+DLMnLPVVBXkcYDnw= X-MC-Unique: JwOgymFgNsuPbaYSSuB6Xw-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 5/5] spec: Explicitly provide locations for QEMU data Date: Mon, 15 Nov 2021 19:45:21 +0100 Message-Id: <20211115184521.75340-6-abologna@redhat.com> In-Reply-To: <20211115184521.75340-1-abologna@redhat.com> References: <20211115184521.75340-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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.23 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: 1637001953863100003 Content-Type: text/plain; charset="utf-8" These are the defaults, but we prefer to be explicit. Signed-off-by: Andrea Bolognani Reviewed-by: J=C3=A1n Tomko --- libvirt.spec.in | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libvirt.spec.in b/libvirt.spec.in index 5f1773ef93..80770a41bb 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -190,6 +190,10 @@ %define qemu_user qemu %define qemu_group qemu =20 +# Locations for QEMU data +%define qemu_moddir %{_libdir}/qemu +%define qemu_datadir %{_datadir}/qemu + =20 # RHEL releases provide stable tool chains and so it is safe to turn # compiler warning into errors without being worried about frequent @@ -1160,6 +1164,8 @@ export SOURCE_DATE_EPOCH=3D$(stat --printf=3D'%Y' %{_= specdir}/%{name}.spec) %{arg_packager_version} \ -Dqemu_user=3D%{qemu_user} \ -Dqemu_group=3D%{qemu_group} \ + -Dqemu_moddir=3D%{qemu_moddir} \ + -Dqemu_datadir=3D%{qemu_datadir} \ -Dtls_priority=3D%{tls_priority} \ %{?enable_werror} \ -Dexpensive_tests=3Denabled \ --=20 2.31.1