From: Daniel P. Berrangé <berrange@redhat.com> Allow building of the node device driver to be directly controlled. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> --- libvirt.spec.in | 2 ++ meson.build | 9 ++++++++- meson_options.txt | 2 ++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index 13ba0a7670..a8034744e8 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -1393,6 +1393,7 @@ export SOURCE_DATE_EPOCH=$(stat --printf='%Y' %{_specdir}/libvirt.spec) %{?arg_remote_mode} \ -Ddriver_interface=enabled \ -Ddriver_network=enabled \ + -Ddriver_nodedev=enabled \ -Ddriver_nwfilter=enabled \ -Dstorage_fs=enabled \ -Dstorage_lvm=enabled \ @@ -1476,6 +1477,7 @@ export SOURCE_DATE_EPOCH=$(stat --printf='%Y' %{_specdir}/libvirt.spec) -Ddriver_libxl=disabled \ -Ddriver_lxc=disabled \ -Ddriver_network=disabled \ + -Ddriver_nodedev=disabled \ -Ddriver_nwfilter=disabled \ -Ddriver_openvz=disabled \ -Ddriver_qemu=disabled \ diff --git a/meson.build b/meson.build index fb95a73928..581f642b34 100644 --- a/meson.build +++ b/meson.build @@ -1654,8 +1654,14 @@ elif get_option('driver_network').enabled() error('libvirtd must be enabled to build the network driver') endif -if udev_dep.found() and conf.has('WITH_LIBVIRTD') +if not get_option('driver_nodedev').disabled() and conf.has('WITH_LIBVIRTD') and udev_dep.found() conf.set('WITH_NODE_DEVICES', 1) +elif get_option('driver_nodedev').enabled() + if not conf.has('WITH_LIBVIRTD') + error('libvirtd must be enabled to build the node device driver') + elif not udev_dep.found() + error('udev library is required to build the node device driver') + endif endif if not get_option('driver_openvz').disabled() and host_machine.system() == 'linux' @@ -2265,6 +2271,7 @@ driver_summary = { 'LXC': conf.has('WITH_LXC'), 'Monolithic libvirtd': conf.has('WITH_MONOLITHIC_LIBVIRTD'), 'Network': conf.has('WITH_NETWORK'), + 'Node device': conf.has('WITH_NODEDEV'), 'NWFilter': conf.has('WITH_NWFLTER'), 'OpenVZ': conf.has('WITH_OPENVZ'), 'QEMU': conf.has('WITH_QEMU'), diff --git a/meson_options.txt b/meson_options.txt index 4df99a5f87..3faed935ac 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -93,6 +93,8 @@ option('driver_interface', type: 'feature', value: 'auto', description: 'host in # dep:driver_remote dep:driver_libvirtd option('driver_network', type: 'feature', value: 'auto', description: 'virtual network driver') # dep:driver_remote dep:driver_libvirtd +option('driver_nodedev', type: 'feature', value: 'auto', description: 'node device driver') +# dep:driver_remote dep:driver_libvirtd option('driver_nwfilter', type: 'feature', value: 'auto', description: 'network filter driver') # dep:driver_remote dep:driver_libvirtd option('driver_secrets', type: 'feature', value: 'auto', description: 'local secrets management driver') -- 2.56.0