On Wed, Jan 09, 2019 at 03:46:19PM +0100, Andrea Bolognani wrote:
On Wed, 2019-01-09 at 12:53 +0000, Daniel P. Berrangé wrote:
> On Wed, Jan 09, 2019 at 01:33:44PM +0100, Andrea Bolognani wrote:
> > The way I see it, our examples are supposed to illustrate how to use
> > libvirt itself, not how to write C code that is portable to a
> > multitude of platforms: with that goal in mind, taking advantage of
> > gnulib makes perfect sense, as it allows us to put the focus on the
> > usage of libvirt rather than the surrounding compatibility gunk.
>
> Using gnulib is not an easy thing if you are not familiar with
> it, largely because of the painful autotools integration it
> imposes. It is important that the examples are both simple to
> read, and simple to build standalone. We've always considered that
> the examples should be possible to build using nothing more than
> the C compiler and pkg-config. eg
>
> $CC `pkg-config --cflags --libs libvirt` -o foo foo.c
>
> The benefits of gnulib are not compelling enough to be worth the
> complexity that it brings in for the examples.
I would see a point in making them buildable in a standalone
fashion if
1) we installed them, eg. under /usr/share/doc/libvirt/examples
2) we also installed, for each of them, a plain Makefile that
calls $CC and pkg-config as seen above
Until that's the case, the gnulib dependency makes complete sense to
me, because you're not going to install libvirt using your package
manager, then clone the git repository and figure out yourself how
to compile the examples, just to poke around a bit.
I don't really agree. There's no need to clone the git repo to use
the examples. I've given people direct links to the gitweb viewer
for example programs and just told them to build using the $CC
arg above. Sure we could install them & provide a plain Makefile,
but that's tangential to use of gnulib IMHO.
Anyway, I've noticed that the apparmor/ directory contains files
that we end up installing on the system in non-documentation
directories, which feels all kinds of wrong. Am I missing something,
or should we move that stuff somewhere else?
Yes, those look like they should be in src/security instead.
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 :|