Re: [Libguestfs] [nbdkit PATCH] tests: Skip guestfs tests on CentOS 6

2018-04-06 Thread Eric Blake
On 04/06/2018 09:05 AM, Richard W.M. Jones wrote:

>>> However in this case I wonder if it would be better to test for this
>>> in the ./configure script and disable the HAVE_LIBGUESTFS automake
>>> conditional (but probably not error out -- we want to still compile on
>>> RHEL 6).  What do you think?
>>
>> Might be easier; I'll play with it, and post a v2 patch along those
>> lines (certainly a smaller patch, but it does mean that we won't even
>> attempt to build plugins/guestfs - I guess that's still okay for an
>> older release).

Okay, done in v2 (much smaller patch, once I figured out where in
configure.ac to add the compile check).

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.   +1-919-301-3266
Virtualization:  qemu.org | libvirt.org



signature.asc
Description: OpenPGP digital signature
___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs

Re: [Libguestfs] [nbdkit PATCH] tests: Skip guestfs tests on CentOS 6

2018-04-06 Thread Richard W.M. Jones
On Fri, Apr 06, 2018 at 09:02:01AM -0500, Eric Blake wrote:
> On 04/06/2018 04:26 AM, Richard W.M. Jones wrote:
> > On Thu, Apr 05, 2018 at 03:03:41PM -0500, Eric Blake wrote:
> >> CentOS 6 has libguestfs-devel 1.20.11, which predates the support
> >> in guestfs_add_drive_opts() for requesting an nbd drive instead
> >> of a local file.  The guestfs plugin can still be built, so no
> >> configure changes are needed; but skip the tests that fail to
> >> compile so that 'make check' can at least complete.
> >>
> >> Signed-off-by: Eric Blake 
> > 
> > 
> >> +#ifndef GUESTFS_ADD_DRIVE_OPTS_PROTOCOL
> > 
> > There's a symbol defined for this kind of test:
> > 
> > #ifndef GUESTFS_HAVE_ADD_DRIVE_OPTS
> >   ...
> > 
> > (from ).
> 
> The libguestfs on CentOS 6 does define GUESTFS_HAVE_ADD_DRIVE_OPTS (and
> the function family guestfs_add_drive_opts*), however, it only supports
> up through option 5 GUESTFS_ADD_DRIVE_OPTS_CACHEMODE.  The compile
> failure was that GUESTFS_ADD_DRIVE_OPTS_PROTOCOL was undefined.  (The
> documentation at http://libguestfs.org/guestfs.3.html#guestfs_add_drive
> doesn't list which version various options were added in, only that the
> function itself was added in 0.3, which predates 1.20.11).

Oh I see, yes that makes more sense.

> > However in this case I wonder if it would be better to test for this
> > in the ./configure script and disable the HAVE_LIBGUESTFS automake
> > conditional (but probably not error out -- we want to still compile on
> > RHEL 6).  What do you think?
> 
> Might be easier; I'll play with it, and post a v2 patch along those
> lines (certainly a smaller patch, but it does mean that we won't even
> attempt to build plugins/guestfs - I guess that's still okay for an
> older release).

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW

___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs


Re: [Libguestfs] [nbdkit PATCH] tests: Skip guestfs tests on CentOS 6

2018-04-06 Thread Eric Blake
On 04/06/2018 04:26 AM, Richard W.M. Jones wrote:
> On Thu, Apr 05, 2018 at 03:03:41PM -0500, Eric Blake wrote:
>> CentOS 6 has libguestfs-devel 1.20.11, which predates the support
>> in guestfs_add_drive_opts() for requesting an nbd drive instead
>> of a local file.  The guestfs plugin can still be built, so no
>> configure changes are needed; but skip the tests that fail to
>> compile so that 'make check' can at least complete.
>>
>> Signed-off-by: Eric Blake 
> 
> 
>> +#ifndef GUESTFS_ADD_DRIVE_OPTS_PROTOCOL
> 
> There's a symbol defined for this kind of test:
> 
> #ifndef GUESTFS_HAVE_ADD_DRIVE_OPTS
>   ...
> 
> (from ).

The libguestfs on CentOS 6 does define GUESTFS_HAVE_ADD_DRIVE_OPTS (and
the function family guestfs_add_drive_opts*), however, it only supports
up through option 5 GUESTFS_ADD_DRIVE_OPTS_CACHEMODE.  The compile
failure was that GUESTFS_ADD_DRIVE_OPTS_PROTOCOL was undefined.  (The
documentation at http://libguestfs.org/guestfs.3.html#guestfs_add_drive
doesn't list which version various options were added in, only that the
function itself was added in 0.3, which predates 1.20.11).

> 
> However in this case I wonder if it would be better to test for this
> in the ./configure script and disable the HAVE_LIBGUESTFS automake
> conditional (but probably not error out -- we want to still compile on
> RHEL 6).  What do you think?

Might be easier; I'll play with it, and post a v2 patch along those
lines (certainly a smaller patch, but it does mean that we won't even
attempt to build plugins/guestfs - I guess that's still okay for an
older release).

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.   +1-919-301-3266
Virtualization:  qemu.org | libvirt.org



signature.asc
Description: OpenPGP digital signature
___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs

Re: [Libguestfs] [nbdkit PATCH] tests: Skip guestfs tests on CentOS 6

2018-04-06 Thread Richard W.M. Jones
On Thu, Apr 05, 2018 at 03:03:41PM -0500, Eric Blake wrote:
> CentOS 6 has libguestfs-devel 1.20.11, which predates the support
> in guestfs_add_drive_opts() for requesting an nbd drive instead
> of a local file.  The guestfs plugin can still be built, so no
> configure changes are needed; but skip the tests that fail to
> compile so that 'make check' can at least complete.
> 
> Signed-off-by: Eric Blake 


> +#ifndef GUESTFS_ADD_DRIVE_OPTS_PROTOCOL

There's a symbol defined for this kind of test:

#ifndef GUESTFS_HAVE_ADD_DRIVE_OPTS
  ...

(from ).

However in this case I wonder if it would be better to test for this
in the ./configure script and disable the HAVE_LIBGUESTFS automake
conditional (but probably not error out -- we want to still compile on
RHEL 6).  What do you think?

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org

___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs