[libvirt PATCH 000/351] port libvirt to Meson build system

Pavel Hrdina phrdina at redhat.com
Fri Jul 17 17:50:35 UTC 2020

On Fri, Jul 17, 2020 at 03:51:21PM +0100, Daniel P. Berrangé wrote:
> On Thu, Jul 16, 2020 at 11:53:56AM +0200, Pavel Hrdina wrote:
> > So I was finally able to produce the patches to port libvirt to Meson.
> > Obviously, it is a lot of changes. It might look that some of the
> > patches could be squashed together but I would rather have it as
> > separated as possible to make the review not that difficult.
> > 
> > Once we are done with review I suggest to squash all patches to single
> > patch as it doesn't make sense to keep them separated as it will not be
> > possible to build complete libvirt code by any of the build systems.
> > Trying to achieve that would be even more challenging and the review
> > would me more difficult.
> > 
> > The reasoning behind taking this approach is to have 1:1 conversion from
> > autotools to Meson where each patch removes that part from autotools. It
> > serves as a check that nothing is skipped and to make sure that the
> > conversion is complete.
> > 
> > As probably most of us know Meson is completely different build system
> > and one of the most challenging things was to deal with the fact that
> > meson doesn't allow user functions and that everything has to be defined
> > before it is used.
> > 
> > Patches are available in my Gitlab repo as well:
> > 
> >     git clone -b meson https://gitlab.com/phrdina/libvirt.git
> I compared the contents of config.h and meson-config.h for the
> before and after state, looking at wha "#define" are present.
> I couple of problems appear
> were not set in meson-config.h

Nice catch, I actually had a code to define HAVE_DECL_SEEK_HOLE but it
requires -D_GNU_SOURCE to detect it.

For some reason I missed HAVE_LIBATTR.

We don't use HAVE_LIBUTIL anywhere in the code, only HAVE_LIBUTIL_H
which is in meson-config.h.

WITH_PM_UTILS is actually broken in autotools and it should not be
there. If you check m4/virt-pm-utils.m4 we don't use pm-utils if
building on host with D-Bus and systemd.

Digging into the history commit <cf6b65a19eeb026cbf653b76e93e56383bf52da6>
removed init_systemd but forgot to update m4/virt-pm-utils.m4 to use 
"$with_init_script" = "systemd" instead of "$init_systemd" = "yes".

I'll fix the first two defines but the other two are correct unless I
should add the not-used HAVE_LIBUTIL.

Thanks for the review.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20200717/3130bc5f/attachment-0001.sig>

More information about the libvir-list mailing list