mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
meson: Introduce qemu_datadir option
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 <abologna@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
@@ -1685,6 +1685,12 @@ if not get_option('driver_qemu').disabled()
|
||||
endif
|
||||
conf.set_quoted('QEMU_MODDIR', qemu_moddir)
|
||||
|
||||
qemu_datadir = get_option('qemu_datadir')
|
||||
if qemu_datadir == ''
|
||||
qemu_datadir = datadir / 'qemu'
|
||||
endif
|
||||
conf.set_quoted('QEMU_DATADIR', qemu_datadir)
|
||||
|
||||
if host_machine.system() in [ 'freebsd', 'darwin' ]
|
||||
default_qemu_user = 'root'
|
||||
default_qemu_group = 'wheel'
|
||||
|
||||
Reference in New Issue
Block a user