mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
meson: Enable ZFS storage backend more often
Currently, the ZFS storage backend is enabled only if both zfs and zpool binaries were found during configure phase. This is not consistent with our attempts to move dependencies on binaries from compile to runtime. And also it is inconsistent with other backends, e.g. vstorage. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
4775613527
commit
73a2ff3616
22
meson.build
22
meson.build
@ -1947,24 +1947,24 @@ if conf.has('WITH_LIBVIRTD')
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
if not get_option('storage_zfs').disabled()
|
if not get_option('storage_zfs').disabled()
|
||||||
zfs_enable = true
|
|
||||||
foreach name : [ 'zfs', 'zpool' ]
|
foreach name : [ 'zfs', 'zpool' ]
|
||||||
set_variable(
|
set_variable(
|
||||||
'@0@_prog'.format(name),
|
'@0@_prog'.format(name),
|
||||||
find_program(name, required: get_option('storage_zfs'), dirs: libvirt_sbin_path)
|
find_program(name, required: get_option('storage_zfs'), dirs: libvirt_sbin_path)
|
||||||
)
|
)
|
||||||
if not get_variable('@0@_prog'.format(name)).found()
|
|
||||||
zfs_enable = false
|
|
||||||
endif
|
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
if zfs_enable
|
use_storage = true
|
||||||
use_storage = true
|
conf.set('WITH_STORAGE_ZFS', 1)
|
||||||
conf.set('WITH_STORAGE_ZFS', 1)
|
foreach name : [ 'zfs', 'zpool' ]
|
||||||
foreach name : [ 'zfs', 'zpool' ]
|
prog_var = get_variable('@0@_prog'.format(name))
|
||||||
conf.set_quoted(name.to_upper(), get_variable('@0@_prog'.format(name)).path())
|
if prog_var.found()
|
||||||
endforeach
|
prog_path = prog_var.path()
|
||||||
endif
|
else
|
||||||
|
prog_path = name
|
||||||
|
endif
|
||||||
|
conf.set_quoted(name.to_upper(), prog_path)
|
||||||
|
endforeach
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user