asomers@gmail.com
2020-Jun-19 01:58 UTC
[Libguestfs] [PATCH 1/3] nbdkit: fix build of the SSH plugin on FreeBSD
From: Alan Somers <asomers@gmail.com> There was a missing #include. It only worked on Linux due to header pollution. --- plugins/ssh/ssh.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/ssh/ssh.c b/plugins/ssh/ssh.c index ea199a93..a4007c40 100644 --- a/plugins/ssh/ssh.c +++ b/plugins/ssh/ssh.c @@ -30,6 +30,8 @@ * SUCH DAMAGE. */ +#include <sys/stat.h> + #include <config.h> #include <stdio.h> -- 2.26.2
asomers@gmail.com
2020-Jun-19 01:58 UTC
[Libguestfs] [PATCH 2/3] Fix build of the info plugin on FreeBSD
From: Alan Somers <asomers@gmail.com> It needs the include path for gnutls headers --- plugins/info/Makefile.am | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/info/Makefile.am b/plugins/info/Makefile.am index 7d9accc1..cf483c14 100644 --- a/plugins/info/Makefile.am +++ b/plugins/info/Makefile.am @@ -44,7 +44,9 @@ nbdkit_info_plugin_la_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/common/include \ $(NULL) -nbdkit_info_plugin_la_CFLAGS = $(WARNINGS_CFLAGS) +nbdkit_info_plugin_la_CFLAGS = \ + $(WARNINGS_CFLAGS) \ + $(GNUTLS_CFLAGS) nbdkit_info_plugin_la_LDFLAGS = \ -module -avoid-version -shared $(SHARED_LDFLAGS) \ -Wl,--version-script=$(top_srcdir)/plugins/plugins.syms \ -- 2.26.2
asomers@gmail.com
2020-Jun-19 01:58 UTC
[Libguestfs] [PATCH 3/3] nbdkit: add a --without-linuxdisk configure argument
From: Alan Somers <asomers@gmail.com> This can be used to disable the linuxdisk plugin, which otherwise is always built if a suitable mke2fs command is present. --- configure.ac | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index f24c3734..c93e822b 100644 --- a/configure.ac +++ b/configure.ac @@ -483,18 +483,25 @@ AS_IF([test "$GNUTLS_LIBS" != ""],[ LIBS="$old_LIBS" ]) +AC_ARG_WITH([linuxdisk], + [AS_HELP_STRING([--without-linuxdisk], + [disable linuxdisk plugin @<:@default=check@:>@])], + [], + [with_linuxdisk=check]) dnl Check for mke2fs -d (used by linuxdisk plugin). There are two dnl possible outcomes that we care about: (1) We have mke2fs and dnl it supports the -d option. (2) We either don't have mke2fs dnl or it's too old to support the -d option (eg. on RHEL 7). mke2fs_with_d=no -AC_MSG_CHECKING([for mke2fs supporting the -d option]) -AS_IF([mke2fs -V >/dev/null 2>&1], [ - AS_IF([LANG=C mke2fs -d 2>&1 | grep -sq "option requires an argument"], [ - mke2fs_with_d=yes +AS_IF([test "$with_linuxdisk" != "no"], [ + AC_MSG_CHECKING([for mke2fs supporting the -d option]) + AS_IF([mke2fs -V >/dev/null 2>&1], [ + AS_IF([LANG=C mke2fs -d 2>&1 | grep -sq "option requires an argument"], [ + mke2fs_with_d=yes + ]) ]) + AC_MSG_RESULT([$mke2fs_with_d]) ]) -AC_MSG_RESULT([$mke2fs_with_d]) AM_CONDITIONAL([HAVE_MKE2FS_WITH_D],[test "x$mke2fs_with_d" = "xyes"]) dnl Check for valgrind. -- 2.26.2
Richard W.M. Jones
2020-Jun-19 14:29 UTC
Re: [Libguestfs] [PATCH 3/3] nbdkit: add a --without-linuxdisk configure argument
I made some stylistic changes to the first two patches so they match existing code, and I pushed them, along with your third patch unmodified. Thanks, Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://people.redhat.com/~rjones/virt-top
Eric Blake
2020-Jun-19 15:16 UTC
Re: [Libguestfs] [PATCH 1/3] nbdkit: fix build of the SSH plugin on FreeBSD
On 6/18/20 8:58 PM, asomers@gmail.com wrote:> From: Alan Somers <asomers@gmail.com> > > There was a missing #include. It only worked on Linux due to header > pollution. > --- > plugins/ssh/ssh.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/plugins/ssh/ssh.c b/plugins/ssh/ssh.c > index ea199a93..a4007c40 100644 > --- a/plugins/ssh/ssh.c > +++ b/plugins/ssh/ssh.c > @@ -30,6 +30,8 @@ > * SUCH DAMAGE. > */ > > +#include <sys/stat.h> > + > #include <config.h><config.h> must always be first, as there are cases where it sets macros that control how system headers will behave. But I see Rich made that change. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org
Reasonably Related Threads
- Re: [PATCH 3/3] nbdkit: add a --without-linuxdisk configure argument
- [PATCH 1/3] nbdkit: fix build of the SSH plugin on FreeBSD
- [PATCH 3/3] nbdkit: add a --without-linuxdisk configure argument
- [PATCH nbdkit] build: Rename configure --without-linuxdisk -> --disable-linuxdisk
- [PATCH nbdkit v2 0/3] build: Rename configure --without-linuxdisk -> --disable-linuxdisk