From: Ján Tomko <jto...@redhat.com>

For mutliple reasons, the use of the QEMU driver is no longer
recommended:

1. It is still incomplete

Git statistics from '3 years ago' speak for themselves:
src/qemu:       42505 insertions(+), 31154 deletions(-)

Compared to other drivers that are mostly completed and do not
require so much attention:

src/esx:          283 insertions(+), 380 deletions(-)
src/hypervisor:  2661 insertions(+), 1342 deletions(-)
src/interface:    253 insertions(+), 305 deletions(-)
src/lxc:          906 insertions(+), 995 deletions(-)
src/secret:        77 insertions(+), 75 deletions(-)

2. It is bloated

Look at it, it's just huge!

src/qemu:        148858 lines

Compared to other, leaner drivers:

src/esx:          20284 lines
src/hypervisor:    6291 lines
src/interface:     2632 lines
src/lxc:          15946 lines
src/secret:         846 lines

And finally, my mother's favorite reason:

3. Because I said so.

Signed-off-by: Ján Tomko <jto...@redhat.com>
---
 libvirt.spec.in |  2 +-
 meson.build     | 81 ++-----------------------------------------------
 2 files changed, 4 insertions(+), 79 deletions(-)

diff --git a/libvirt.spec.in b/libvirt.spec.in
index cb41ea1de1..df2b9750e3 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -32,7 +32,7 @@
 %define arches_ch               x86_64 aarch64
 
 # The hypervisor drivers that run in libvirtd
-%define with_qemu          0%{!?_without_qemu:1}
+%define with_qemu          0
 %define with_lxc           0%{!?_without_lxc:1}
 %define with_libxl         0%{!?_without_libxl:1}
 %define with_vbox          0%{!?_without_vbox:1}
diff --git a/meson.build b/meson.build
index 56823ca25b..4929ccb42a 100644
--- a/meson.build
+++ b/meson.build
@@ -1671,7 +1671,7 @@ elif get_option('driver_network').enabled()
 endif
 
 if udev_dep.found() and conf.has('WITH_LIBVIRTD')
-  conf.set('WITH_NODE_DEVICES', 1)
+ conf.set('WITH_NODE_DEVICES', 1)
 endif
 
 if not get_option('driver_openvz').disabled() and host_machine.system() == 
'linux'
@@ -1680,83 +1680,8 @@ elif get_option('driver_openvz').enabled()
   error('OpenVZ driver can be enabled on Linux only')
 endif
 
-if not get_option('driver_qemu').disabled()
-  use_qemu = true
-
-  if not json_c_dep.found()
-    use_qemu = false
-    if get_option('driver_qemu').enabled()
-      error('json-c is required to build QEMU driver')
-    endif
-  endif
-
-  if not conf.has('WITH_LIBVIRTD')
-    use_qemu = false
-    if get_option('driver_qemu').enabled()
-      error('libvirtd is required to build QEMU driver')
-    endif
-  endif
-
-  if use_qemu
-    conf.set('WITH_QEMU', 1)
-
-    qemu_moddir = get_option('qemu_moddir')
-    if qemu_moddir == ''
-      qemu_moddir = libdir / 'qemu'
-    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)
-
-    qemu_user = get_option('qemu_user')
-    qemu_group = get_option('qemu_group')
-    if (qemu_user == '' and qemu_group != '') or (qemu_user != '' and 
qemu_group == '')
-      error('Please specify both qemu_user and qemu_group or neither of them')
-    endif
-    if qemu_user == '' and qemu_group == ''
-      if host_machine.system() in [ 'freebsd', 'darwin' ]
-        qemu_user = 'root'
-        qemu_group = 'wheel'
-      else
-        # RHEL and CentOS both have ID_LIKE=fedora, SLES has ID_LIKE=suse
-        if (os_release.contains('fedora') or
-            os_release.contains('gentoo') or
-            os_release.contains('suse'))
-          qemu_user = 'qemu'
-          qemu_group = 'qemu'
-        # Ubuntu has ID_LIKE=debian so we need to handle it first
-        elif os_release.contains('ubuntu')
-          qemu_user = 'libvirt-qemu'
-          qemu_group = 'kvm'
-        elif (os_release.contains('arch') or
-              os_release.contains('debian'))
-          qemu_user = 'libvirt-qemu'
-          qemu_group = 'libvirt-qemu'
-        else
-          qemu_user = 'root'
-          qemu_group = 'root'
-        endif
-      endif
-    endif
-    conf.set_quoted('QEMU_USER', qemu_user)
-    conf.set_quoted('QEMU_GROUP', qemu_group)
-
-    qemu_slirp_prog = find_program(
-      'slirp-helper',
-      dirs: [ '/usr/bin', '/usr/libexec' ],
-      required: false
-    )
-    if qemu_slirp_prog.found()
-      qemu_slirp_path = qemu_slirp_prog.full_path()
-    else
-      qemu_slirp_path = '/usr/bin/slirp-helper'
-    endif
-    conf.set_quoted('QEMU_SLIRP_HELPER', qemu_slirp_path)
-  endif
+if get_option('driver_qemu').enabled()
+  error('QEMU driver has been deprecated')
 endif
 
 if not get_option('driver_secrets').disabled() and conf.has('WITH_LIBVIRTD')
-- 
2.49.0

Reply via email to