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. 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? -- Andrea Bolognani / Red Hat / Virtualization -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list