[RFC] qemu: Check for changes in qemu modules directory

Daniel P. Berrangé berrange at redhat.com
Wed Aug 26 09:31:26 UTC 2020


On Thu, Aug 20, 2020 at 05:03:44PM -0600, Jim Fehlig wrote:
> Add a configuration option for specifying location of the qemu modules
> directory, defaulting to /usr/lib64/qemu. Then use this location to
> check for changes in the directory, indicating that a qemu module has
> changed and capabilities need to be reprobed.
> 
> Signed-off-by: Jim Fehlig <jfehlig at suse.com>
> ---
> 
> This is a mildly tested impl of the idea discussed here (and elsewhere
> in the thread)
> 
> https://www.redhat.com/archives/libvir-list/2020-August/msg00684.html
> 
> I've checked that both system and session caches are updated when a
> qemu modules package is updated. I'll do some more testing but wanted
> to send the patch for early comments. Testing in other environments
> would be much appreciated. Thanks!
> 
>  meson.build                  |  6 ++++++
>  meson_options.txt            |  1 +
>  src/qemu/qemu_capabilities.c | 35 +++++++++++++++++++++++++++++++++++
>  3 files changed, 42 insertions(+)
> 
> diff --git a/meson.build b/meson.build
> index a72d0c0e85..16928482aa 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -1745,6 +1745,12 @@ if not get_option('driver_qemu').disabled()
>    if use_qemu
>      conf.set('WITH_QEMU', 1)
>  
> +    qemu_moddir = get_option('qemu_moddir')
> +    if qemu_moddir == ''
> +      qemu_moddir = '/usr/lib64/qemu'

We sholdn't hardcode lib64 - use  libdir variable, eg

"/usr" / libdir / "qemu"

> +    endif
> +    conf.set_quoted('QEMU_MODDIR', qemu_moddir)
> +

Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




More information about the libvir-list mailing list