diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7c39d2a --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +SOURCES/libguestfs.keyring +SOURCES/nbdkit-1.2.6.tar.gz diff --git a/.nbdkit.metadata b/.nbdkit.metadata new file mode 100644 index 0000000..d0870cf --- /dev/null +++ b/.nbdkit.metadata @@ -0,0 +1,2 @@ +1bbc40f501a7fef9eef2a39b701a71aee2fea7c4 SOURCES/libguestfs.keyring +d5bc6e56b35c971ddec17b2abab5ba1d94a9b7a5 SOURCES/nbdkit-1.2.6.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index 98f42b4..0000000 --- a/README.md +++ /dev/null @@ -1,4 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/0001-vddk-Remove-vimapiver-parameter.patch b/SOURCES/0001-vddk-Remove-vimapiver-parameter.patch new file mode 100644 index 0000000..134499f --- /dev/null +++ b/SOURCES/0001-vddk-Remove-vimapiver-parameter.patch @@ -0,0 +1,117 @@ +From f8871cf914911e620c1321e9ecd0915322dca1f3 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Tue, 24 Jul 2018 12:08:41 +0100 +Subject: [PATCH 1/8] vddk: Remove vimapiver parameter. + +VDDK never used this, setting it is useless. + +(cherry picked from commit ecface865aa121a601c571831d78f4ea1f0574b8) +--- + plugins/vddk/nbdkit-vddk-plugin.pod | 12 ++---------- + plugins/vddk/vddk.c | 20 +++----------------- + 2 files changed, 5 insertions(+), 27 deletions(-) + +diff --git a/plugins/vddk/nbdkit-vddk-plugin.pod b/plugins/vddk/nbdkit-vddk-plugin.pod +index 4d9c6e9..c5486a3 100644 +--- a/plugins/vddk/nbdkit-vddk-plugin.pod ++++ b/plugins/vddk/nbdkit-vddk-plugin.pod +@@ -10,7 +10,7 @@ nbdkit-vddk-plugin - VMware VDDK plugin for nbdkit + [vm=moref=ID] [server=HOSTNAME] [user=USERNAME] + [password=PASSWORD | password=- | password=+FILENAME] + [cookie=COOKIE] [thumbprint=THUMBPRINT] +- [vimapiver=APIVER] [port=PORT] [nfchostport=PORT] ++ [port=PORT] [nfchostport=PORT] + [snapshot=MOREF] [transports=MODE:MODE:...] + nbdkit vddk --dump-plugin + +@@ -177,10 +177,7 @@ L + +-Optional. Specify the VIM API version. If not given it defaults to +-the current version. +- +-(Only supported in VDDK ≥ 6.5.0) ++This parameter is ignored for backwards compatibility. + + =back + +@@ -271,11 +268,6 @@ at runtime. + If this is printed then the C parameter is supported + by this build. + +-=item C +- +-If this is printed then the C parameter is supported +-by this build. +- + =back + + =head1 DEBUGGING VDDK +diff --git a/plugins/vddk/vddk.c b/plugins/vddk/vddk.c +index 1c15127..d7a4987 100644 +--- a/plugins/vddk/vddk.c ++++ b/plugins/vddk/vddk.c +@@ -1,5 +1,5 @@ + /* nbdkit +- * Copyright (C) 2013-2017 Red Hat Inc. ++ * Copyright (C) 2013-2018 Red Hat Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without +@@ -59,7 +59,6 @@ static const char *snapshot_moref = NULL; /* snapshot */ + static const char *thumb_print = NULL; /* thumbprint */ + static const char *transport_modes = NULL; /* transports */ + static const char *username = NULL; /* user */ +-static const char *vim_api_ver = NULL; /* vimapiver */ + static const char *vmx_spec = NULL; /* vm */ + static int is_remote = 0; + +@@ -208,12 +207,7 @@ vddk_config (const char *key, const char *value) + username = value; + } + else if (strcmp (key, "vimapiver") == 0) { +-#if HAVE_VIXDISKLIBCONNECTPARAMS_VIMAPIVER +- vim_api_ver = value; +-#else +- nbdkit_error ("this version of VDDK is too old to support vimapiver"); +- return -1; +-#endif ++ /* Ignored for backwards compatibility. */ + } + else if (strcmp (key, "vm") == 0) { + vmx_spec = value; +@@ -248,8 +242,7 @@ vddk_config_complete (void) + cookie || + thumb_print || + port || +- nfc_host_port || +- vim_api_ver; ++ nfc_host_port; + + if (is_remote) { + #define missing(test, param) \ +@@ -281,10 +274,6 @@ vddk_dump_plugin (void) + printf ("vddk_has_nfchostport=1\n"); + #endif + +-#if HAVE_VIXDISKLIBCONNECTPARAMS_VIMAPIVER +- printf ("vddk_has_vimapiver=1\n"); +-#endif +- + /* XXX We really need to print the version of the dynamically + * linked library here, but VDDK does not provide it. + */ +@@ -336,9 +325,6 @@ vddk_open (int readonly) + params.port = port; + #if HAVE_VIXDISKLIBCONNECTPARAMS_NFCHOSTPORT + params.nfcHostPort = nfc_host_port; +-#endif +-#if HAVE_VIXDISKLIBCONNECTPARAMS_VIMAPIVER +- params.vimApiVer = (char *) vim_api_ver; + #endif + } + +-- +2.18.0 + diff --git a/SOURCES/0002-vddk-Remove-compile-time-dependency-on-VDDK-library.patch b/SOURCES/0002-vddk-Remove-compile-time-dependency-on-VDDK-library.patch new file mode 100644 index 0000000..1ea3a6f --- /dev/null +++ b/SOURCES/0002-vddk-Remove-compile-time-dependency-on-VDDK-library.patch @@ -0,0 +1,600 @@ +From cc20761db7c5a1f9183c3a94528a2ed241c7cf00 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Tue, 24 Jul 2018 12:11:17 +0100 +Subject: [PATCH 2/8] vddk: Remove compile-time dependency on VDDK library. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Allow the plugin to be compiled without needing the library. Instead +of linking to the library at compile time we open the library at +runtime using dlopen. + +The plugin is now compiled unconditionally, unless you use +‘./configure --disable-vddk’. (Of course you still need the VDDK +library if you want to use the plugin. We cannot even test the plugin +loads without the library.). + +This change also moves the initialization of VDDK (calling InitEx) +into the config_complete method instead of the load method. This +later initialization allows the "config=FILENAME" and +"libdir=PATHNAME" parameters to have an effect whereas previously they +were silently ignored. + +(cherry picked from commit 8d7f7c26eb435334d7fa35e84ceee7d266dfae4c) +--- + README | 4 - + configure.ac | 75 ++--------------- + plugins/vddk/Makefile.am | 13 +-- + plugins/vddk/README.VDDK | 25 ++---- + plugins/vddk/nbdkit-vddk-plugin.pod | 48 ++++++++--- + plugins/vddk/vddk-structs.h | 125 ++++++++++++++++++++++++++++ + plugins/vddk/vddk.c | 89 ++++++++++++++------ + 7 files changed, 244 insertions(+), 135 deletions(-) + create mode 100644 plugins/vddk/vddk-structs.h + +diff --git a/README b/README +index baa29fc..8867cab 100644 +--- a/README ++++ b/README +@@ -65,10 +65,6 @@ For the libguestfs plugin, and to run the test suite: + + - guestfish (from libguestfs) + +-For the VDDK plugin: +- +- - VDDK (see plugins/vddk/README.VDDK) +- + For the Perl, example4 and tar plugins: + + - perl development libraries +diff --git a/configure.ac b/configure.ac +index d207050..b3278eb 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -430,77 +430,14 @@ dnl Check for qemu-io (only needed for some of the tests). + AC_CHECK_PROG([QEMU_IO], [qemu-io], [qemu-io], [no]) + AM_CONDITIONAL([HAVE_QEMU_IO], [test "x$QEMU_IO" != "xno"]) + ++dnl Check if the user wants to disable VDDK support. + dnl See plugins/vddk/README.VDDK. +-AC_CHECK_SIZEOF([size_t]) +-AS_IF([test "x$ac_cv_sizeof_size_t" = "x4"],[bits=32],[bits=64]) +-AC_ARG_WITH([vddk],[ +- AS_HELP_STRING([--with-vddk], +- [enable VMware VDDK plugin @<:@default=no@:>@])], ++AC_ARG_ENABLE([vddk],[ ++ AS_HELP_STRING([--disable-vddk], ++ [disable VMware VDDK plugin])], + [], +- [with_vddk=no]) +-AS_IF([test "$with_vddk" = "yes"],[ +- VDDK_CFLAGS= +- VDDK_LIBS="-lvixDiskLib" +- # XXX Warning: stupid VMware API. +- VDDK_LIBDIR="$libdir/vmware-vix-disklib" +- AC_MSG_NOTICE([VDDK plugin enabled from $VDDK_LIBDIR]) +- ],[ +- AS_IF([test "$with_vddk" != "no"], [ +- VDDK_CFLAGS="-I$with_vddk/include" +- VDDK_LIBS="-L$with_vddk/lib$bits -lvixDiskLib" +- VDDK_LIBDIR="$with_vddk" +- AC_MSG_NOTICE([VDDK plugin enabled from $with_vddk]) +- ], +- [AC_MSG_NOTICE([VDDK plugin disabled]) +- ]) +-]) +- +-dnl If the VDDK plugin was enabled, compile and link a test program to make +-dnl sure the library really works. +-AS_IF([test "x$VDDK_LIBS" != "x"],[ +- # Save CFLAGS etc while we do this test. +- acx_nbdkit_save_CFLAGS="${CFLAGS}" +- acx_nbdkit_save_LIBS="${LIBS}" +- CFLAGS="$CFLAGS $VDDK_CFLAGS" +- LIBS="$VDDK_LIBS $LIBS" +- +- AC_MSG_CHECKING([if we can link to VDDK]) +- AC_LINK_IFELSE([ +- AC_LANG_SOURCE([[ +-#include +-#include +-#include +- +-int +-main () +-{ +- VixDiskLib_Exit (); +-} +-]]) +- ],[ +- AC_MSG_RESULT([yes]) +- ],[ +- AC_MSG_RESULT([no]) +- AC_MSG_ERROR([could not link to VDDK, see ‘config.log’ for more information]) +- ]) +- +- dnl Check for optional fields in VixDiskLibConnectParams struct. +- AC_CHECK_MEMBERS([VixDiskLibConnectParams.nfcHostPort, VixDiskLibConnectParams.vimApiVer], +- [], [], [[ +-#include +-#include +-#include +-]]) +- +- dnl Restore CFLAGS, etc. +- CFLAGS="${acx_nbdkit_save_CFLAGS}" +- LIBS="${acx_nbdkit_save_LIBS}" +-]) +- +-AC_SUBST([VDDK_CFLAGS]) +-AC_SUBST([VDDK_LIBS]) +-AC_DEFINE_UNQUOTED([VDDK_LIBDIR],["$VDDK_LIBDIR"],[VDDK 'libDir'.]) +-AM_CONDITIONAL([HAVE_VDDK],[test "x$VDDK_LIBS" != "x"]) ++ [enable_vddk=yes]) ++AM_CONDITIONAL([HAVE_VDDK], [test "x$enable_vddk" = "xyes"]) + + dnl Produce output files. + AC_CONFIG_HEADERS([config.h]) +diff --git a/plugins/vddk/Makefile.am b/plugins/vddk/Makefile.am +index b910a64..1f4c91e 100644 +--- a/plugins/vddk/Makefile.am ++++ b/plugins/vddk/Makefile.am +@@ -1,5 +1,5 @@ + # nbdkit +-# Copyright (C) 2013 Red Hat Inc. ++# Copyright (C) 2013-2018 Red Hat Inc. + # All rights reserved. + # + # Redistribution and use in source and binary forms, with or without +@@ -44,15 +44,16 @@ plugin_LTLIBRARIES = nbdkit-vddk-plugin.la + + nbdkit_vddk_plugin_la_SOURCES = \ + vddk.c \ ++ vddk-structs.h \ + $(top_srcdir)/include/nbdkit-plugin.h + + nbdkit_vddk_plugin_la_CPPFLAGS = \ +- -I$(top_srcdir)/include ++ -I$(top_srcdir)/include \ ++ -DVDDK_LIBDIR=\"$(libdir)/vmware-vix-disklib\" + nbdkit_vddk_plugin_la_CFLAGS = \ +- $(WARNINGS_CFLAGS) \ +- $(VDDK_CFLAGS) ++ $(WARNINGS_CFLAGS) + nbdkit_vddk_plugin_la_LIBADD = \ +- $(VDDK_LIBS) ++ -ldl + nbdkit_vddk_plugin_la_LDFLAGS = \ + -module -avoid-version -shared + +@@ -68,4 +69,4 @@ nbdkit-vddk-plugin.1: nbdkit-vddk-plugin.pod + + endif + +-endif ++endif HAVE_VDDK +diff --git a/plugins/vddk/README.VDDK b/plugins/vddk/README.VDDK +index d8c62b1..1e56631 100644 +--- a/plugins/vddk/README.VDDK ++++ b/plugins/vddk/README.VDDK +@@ -11,27 +11,14 @@ account and download it from: + This directory contains an nbdkit plugin which uses this library to + export VMDK files and VMware disks over NBD. + +-VDDK >= 6.5 is required. +- +-Note: VDDK can do NBD on its own, so nbdkit might not be needed unless +-you want the extra features and flexibility of nbdkit. +- +-It is never compiled by default. To enable it you have to do: +- +- ./configure --with-vddk +- +-If the VDDK library is located in a non-standard location, use this +-instead: +- +- ./configure --with-vddk=/path/to/vmware-vix-disklib-distrib +- +-(This looks for include/ and lib{32,64}/ subdirectories of the given +-path for header files and libraries respectively.) ++You do NOT require VDDK to compile the plugin, and the plugin does not ++contain any VMware code. You only need VDDK at runtime. The plugin ++uses dlopen to load the library from LD_LIBRARY_PATH (or else the ++standard shared library paths). + + After building nbdkit-vddk-plugin.so, read the man page to find out +-how to use it (nbdkit-vddk-plugin(1)). +- +-You'll probably also want to read the VDDK developer documentation. ++how to use it (nbdkit-vddk-plugin(1)). You'll probably also want to ++read the VDDK developer documentation. + + Bugs + ---- +diff --git a/plugins/vddk/nbdkit-vddk-plugin.pod b/plugins/vddk/nbdkit-vddk-plugin.pod +index c5486a3..ba7806d 100644 +--- a/plugins/vddk/nbdkit-vddk-plugin.pod ++++ b/plugins/vddk/nbdkit-vddk-plugin.pod +@@ -16,21 +16,41 @@ nbdkit-vddk-plugin - VMware VDDK plugin for nbdkit + + =head1 DESCRIPTION + +-C is a L plugin that serves files from ++C is an L plugin that serves files from + local VMware VMDK files, VMware ESXi servers, VMware VCenter servers, +-and other sources by using VMware's proprietary VDDK library. ++and other sources. It requires VMware's proprietary VDDK library that ++you must download yourself separately. + + The plugin can serve read-only (if the I<-r> option is used) or + read/write. + +-=head1 LIBRARY LOCATION ++=head1 LIBRARY AND CONFIG FILE LOCATIONS + +-If the VDDK library (C) is located on a non-standard +-path, you may need to set C or modify +-C before this plugin will work. ++If the VDDK library (F) is located on a ++non-standard path, you may need to set C or modify ++F before this plugin will work. In addition you may ++want to set the C parameter so that the VDDK library can load ++plugins like Advanced Transport. + +-The VDDK library may depend on C or other libraries +-which you may have to install yourself. ++For 64 bit platforms pass the F subdirectory: ++ ++ export LD_LIBRARY_PATH=/path/to/vmware-vix-disklib-distrib/lib64 ++ ++For 32 bit platforms pass the F subdirectory: ++ ++ export LD_LIBRARY_PATH=/path/to/vmware-vix-disklib-distrib/lib32 ++ ++Then pass the VDDK distribution directory as C along with ++other parameters as required: ++ ++ nbdkit vddk \ ++ libdir=/path/to/vmware-vix-disklib-distrib \ ++ file=file.vmdk ++ ++VDDK itself looks in a few default locations for the optional ++configuration file, usually including F and ++F<$HOME/.vmware/config>, but you can override this using the C ++parameter. + + =head1 PARAMETERS + +@@ -67,11 +87,14 @@ L below). + + =item B + +-Optional. This sets the path of the VMware VDDK library. It must be +-an absolute path. ++Optional. This sets the path of the VMware VDDK distribution. It ++must be an absolute path. ++ ++VDDK uses this to load its own plugins, if this path is unspecified or ++wrong then VDDK will work with reduced functionality. + + If the parameter is not given, then a hard-coded path determined at +-compile time is used. ++compile time is used, see L below. + + =item B + +@@ -307,7 +330,6 @@ support this. + + =head1 SEE ALSO + +-L, + L, + L, + L, +@@ -319,7 +341,7 @@ Richard W.M. Jones + + =head1 COPYRIGHT + +-Copyright (C) 2013-2017 Red Hat Inc. ++Copyright (C) 2013-2018 Red Hat Inc. + + =head1 LICENSE + +diff --git a/plugins/vddk/vddk-structs.h b/plugins/vddk/vddk-structs.h +new file mode 100644 +index 0000000..3e7a3c6 +--- /dev/null ++++ b/plugins/vddk/vddk-structs.h +@@ -0,0 +1,125 @@ ++/* nbdkit ++ * Copyright (C) 2013-2018 Red Hat Inc. ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are ++ * met: ++ * ++ * * Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * ++ * * Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in the ++ * documentation and/or other materials provided with the distribution. ++ * ++ * * Neither the name of Red Hat nor the names of its contributors may be ++ * used to endorse or promote products derived from this software without ++ * specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND ++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, ++ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A ++ * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR ++ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ++ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ++ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF ++ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ++ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, ++ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT ++ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ++ * SUCH DAMAGE. ++ */ ++ ++/* Types and structs that we pass to or return from the VDDK API. ++ * ++ * Updated to VDDK 6.7 ++ */ ++ ++#ifndef NBDKIT_VDDK_STRUCTS_H ++#define NBDKIT_VDDK_STRUCTS_H ++ ++typedef uint64_t VixError; ++#define VIX_OK 0 ++ ++#define VIXDISKLIB_FLAG_OPEN_READ_ONLY 4 ++#define VIXDISKLIB_SECTOR_SIZE 512 ++ ++typedef void *VixDiskLibConnection; ++typedef void *VixDiskLibHandle; ++ ++typedef void VixDiskLibGenericLogFunc (const char *fmt, va_list args); ++ ++enum VixDiskLibCredType { ++ VIXDISKLIB_CRED_UID = 1, ++ VIXDISKLIB_CRED_SESSIONID = 2, ++ VIXDISKLIB_CRED_TICKETID = 3, ++ VIXDISKLIB_CRED_SSPI = 4, ++ VIXDISKLIB_CRED_UNKNOWN = 256 ++}; ++ ++enum VixDiskLibSpecType { ++ VIXDISKLIB_SPEC_VMX = 0, ++ VIXDISKLIB_SPEC_VSTORAGE_OBJECT = 1, ++ VIXDISKLIB_SPEC_UNKNOWN = 2 ++}; ++ ++struct VixDiskLibVStorageObjectSpec { ++ char *id; ++ char *datastoreMoRef; ++ char *ssId; ++}; ++ ++typedef struct VixDiskLibConnectParams { ++ char *vmxSpec; ++ char *serverName; ++ char *thumbPrint; ++ long reserved1; ++ enum VixDiskLibCredType credType; ++ union { ++ struct { ++ char *userName; ++ char *password; ++ } uid; ++ struct { ++ char *cookie; ++ char *userName; ++ char *key; ++ } sessionId; ++ void *reserved2; ++ } creds; ++ uint32_t port; ++ uint32_t nfcHostPort; ++ char *reserved3; ++ char reserved4[8]; ++ void *reserved5; ++ union { ++ struct VixDiskLibVStorageObjectSpec vStorageObjSpec; ++ } spec; ++ enum VixDiskLibSpecType specType; ++} VixDiskLibConnectParams; ++ ++struct VixDiskLibGeometry { ++ uint32_t cylinders; ++ uint32_t heads; ++ uint32_t sectors; ++}; ++ ++enum VixDiskLibAdapterType { ++ VIXDISKLIB_ADAPTER_IDE = 1, ++ VIXDISKLIB_ADAPTER_SCSI_BUSLOGIC = 2, ++ VIXDISKLIB_ADAPTER_SCSI_LSILOGIC = 3, ++ VIXDISKLIB_ADAPTER_UNKNOWN = 256 ++}; ++ ++typedef struct VixDiskLibInfo { ++ struct VixDiskLibGeometry biosGeo; ++ struct VixDiskLibGeometry physGeo; ++ uint64_t capacity; ++ enum VixDiskLibAdapterType adapterType; ++ int numLinks; ++ char *parentFileNameHint; ++ char *uuid; ++} VixDiskLibInfo; ++ ++#endif /* NBDKIT_VDDK_STRUCTS_H */ +diff --git a/plugins/vddk/vddk.c b/plugins/vddk/vddk.c +index d7a4987..e3190cd 100644 +--- a/plugins/vddk/vddk.c ++++ b/plugins/vddk/vddk.c +@@ -39,14 +39,36 @@ + #include + #include + #include ++#include + + #include + +-#include ++#include "vddk-structs.h" + ++/* The VDDK APIs that we call. These globals are initialized when the ++ * plugin is loaded (by vddk_load). ++ */ ++char *(*VixDiskLib_GetErrorText) (VixError err, const char *unused); ++void (*VixDiskLib_FreeErrorText) (char *text); ++VixError (*VixDiskLib_InitEx) (uint32_t major, uint32_t minor, VixDiskLibGenericLogFunc *log_function, VixDiskLibGenericLogFunc *warn_function, VixDiskLibGenericLogFunc *panic_function, const char *lib_dir, const char *config_file); ++void (*VixDiskLib_Exit) (void); ++VixError (*VixDiskLib_ConnectEx) (const VixDiskLibConnectParams *params, char read_only, const char *snapshot_ref, const char *transport_modes, VixDiskLibConnection *connection); ++VixError (*VixDiskLib_Open) (const VixDiskLibConnection connection, const char *path, uint32_t flags, VixDiskLibHandle *handle); ++const char *(*VixDiskLib_GetTransportMode) (VixDiskLibHandle handle); ++VixError (*VixDiskLib_Close) (VixDiskLibHandle handle); ++VixError (*VixDiskLib_Disconnect) (VixDiskLibConnection connection); ++VixError (*VixDiskLib_GetInfo) (VixDiskLibHandle handle, VixDiskLibInfo **info); ++void (*VixDiskLib_FreeInfo) (VixDiskLibInfo *info); ++VixError (*VixDiskLib_Read) (VixDiskLibHandle handle, uint64_t start_sector, uint64_t nr_sectors, unsigned char *buf); ++VixError (*VixDiskLib_Write) (VixDiskLibHandle handle, uint64_t start_sector, uint64_t nr_sectors, const unsigned char *buf); ++ ++/* Parameters passed to InitEx. */ + #define VDDK_MAJOR 5 + #define VDDK_MINOR 1 + ++static void *dl = NULL; /* dlopen handle */ ++static int init_called = 0; /* was InitEx called */ ++ + static char *config = NULL; /* config */ + static const char *cookie = NULL; /* cookie */ + static const char *filename = NULL; /* file */ +@@ -120,27 +142,39 @@ error_function (const char *fs, va_list args) + static void + vddk_load (void) + { +- VixError err; ++ const char *soname = "libvixDiskLib.so.6"; + +- DEBUG_CALL ("VixDiskLib_InitEx", +- "%d, %d, &debug_fn, &error_fn, &error_fn, %s, %s", +- VDDK_MAJOR, VDDK_MINOR, libdir, config ? : "NULL"); +- err = VixDiskLib_InitEx (VDDK_MAJOR, VDDK_MINOR, +- &debug_function, /* log function */ +- &error_function, /* warn function */ +- &error_function, /* panic function */ +- libdir, config); +- if (err != VIX_OK) { +- VDDK_ERROR (err, "VixDiskLib_InitEx"); ++ /* Load the plugin and set the entry points. */ ++ dl = dlopen (soname, RTLD_NOW); ++ if (dl == NULL) { ++ nbdkit_error ("%s: %s", soname, dlerror ()); + exit (EXIT_FAILURE); + } ++ ++ VixDiskLib_GetErrorText = dlsym (dl, "VixDiskLib_GetErrorText"); ++ VixDiskLib_FreeErrorText = dlsym (dl, "VixDiskLib_FreeErrorText"); ++ VixDiskLib_InitEx = dlsym (dl, "VixDiskLib_InitEx"); ++ VixDiskLib_Exit = dlsym (dl, "VixDiskLib_Exit"); ++ VixDiskLib_ConnectEx = dlsym (dl, "VixDiskLib_ConnectEx"); ++ VixDiskLib_Open = dlsym (dl, "VixDiskLib_Open"); ++ VixDiskLib_GetTransportMode = dlsym (dl, "VixDiskLib_GetTransportMode"); ++ VixDiskLib_Close = dlsym (dl, "VixDiskLib_Close"); ++ VixDiskLib_Disconnect = dlsym (dl, "VixDiskLib_Disconnect"); ++ VixDiskLib_GetInfo = dlsym (dl, "VixDiskLib_GetInfo"); ++ VixDiskLib_FreeInfo = dlsym (dl, "VixDiskLib_FreeInfo"); ++ VixDiskLib_Read = dlsym (dl, "VixDiskLib_Read"); ++ VixDiskLib_Write = dlsym (dl, "VixDiskLib_Write"); + } + + static void + vddk_unload (void) + { +- DEBUG_CALL ("VixDiskLib_Exit", ""); +- VixDiskLib_Exit (); ++ if (init_called) { ++ DEBUG_CALL ("VixDiskLib_Exit", ""); ++ VixDiskLib_Exit (); ++ } ++ if (dl) ++ dlclose (dl); + free (config); + free (password); + } +@@ -170,15 +204,10 @@ vddk_config (const char *key, const char *value) + libdir = value; + } + else if (strcmp (key, "nfchostport") == 0) { +-#if HAVE_VIXDISKLIBCONNECTPARAMS_NFCHOSTPORT + if (sscanf (value, "%d", &nfc_host_port) != 1) { + nbdkit_error ("cannot parse nfchostport: %s", value); + return -1; + } +-#else +- nbdkit_error ("this version of VDDK is too old to support nfchostpost"); +- return -1; +-#endif + } + else if (strcmp (key, "password") == 0) { + free (password); +@@ -223,6 +252,8 @@ vddk_config (const char *key, const char *value) + static int + vddk_config_complete (void) + { ++ VixError err; ++ + if (filename == NULL) { + nbdkit_error ("you must supply the file= parameter after the plugin name on the command line"); + return -1; +@@ -258,6 +289,21 @@ vddk_config_complete (void) + #undef missing + } + ++ /* Initialize VDDK library. */ ++ DEBUG_CALL ("VixDiskLib_InitEx", ++ "%d, %d, &debug_fn, &error_fn, &error_fn, %s, %s", ++ VDDK_MAJOR, VDDK_MINOR, libdir, config ? : "NULL"); ++ err = VixDiskLib_InitEx (VDDK_MAJOR, VDDK_MINOR, ++ &debug_function, /* log function */ ++ &error_function, /* warn function */ ++ &error_function, /* panic function */ ++ libdir, config); ++ if (err != VIX_OK) { ++ VDDK_ERROR (err, "VixDiskLib_InitEx"); ++ exit (EXIT_FAILURE); ++ } ++ init_called = 1; ++ + return 0; + } + +@@ -269,10 +315,7 @@ static void + vddk_dump_plugin (void) + { + printf ("vddk_default_libdir=%s\n", VDDK_LIBDIR); +- +-#if HAVE_VIXDISKLIBCONNECTPARAMS_NFCHOSTPORT + printf ("vddk_has_nfchostport=1\n"); +-#endif + + /* XXX We really need to print the version of the dynamically + * linked library here, but VDDK does not provide it. +@@ -323,9 +366,7 @@ vddk_open (int readonly) + } + params.thumbPrint = (char *) thumb_print; + params.port = port; +-#if HAVE_VIXDISKLIBCONNECTPARAMS_NFCHOSTPORT + params.nfcHostPort = nfc_host_port; +-#endif + } + + /* XXX Some documentation suggests we should call +-- +2.18.0 + diff --git a/SOURCES/0003-vddk-Add-comment-about-my-experiment-with-PrepareFor.patch b/SOURCES/0003-vddk-Add-comment-about-my-experiment-with-PrepareFor.patch new file mode 100644 index 0000000..f240786 --- /dev/null +++ b/SOURCES/0003-vddk-Add-comment-about-my-experiment-with-PrepareFor.patch @@ -0,0 +1,30 @@ +From 3573a04198b562a52de8870a8a7aff9af1c3c584 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Tue, 24 Jul 2018 15:35:20 +0100 +Subject: [PATCH 3/8] vddk: Add comment about my experiment with + PrepareForAccess. + +(cherry picked from commit ba593d2dfa3b3ccd4073f7bad7bcd2d67ce23b64) +--- + plugins/vddk/vddk.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/plugins/vddk/vddk.c b/plugins/vddk/vddk.c +index e3190cd..77e3406 100644 +--- a/plugins/vddk/vddk.c ++++ b/plugins/vddk/vddk.c +@@ -370,8 +370,9 @@ vddk_open (int readonly) + } + + /* XXX Some documentation suggests we should call +- * VixDiskLib_PrepareForAccess here. However we need the true VM +- * name to do that. ++ * VixDiskLib_PrepareForAccess here. It may be required for ++ * Advanced Transport modes, but I could not make it work with ++ * either ESXi or vCenter servers. + */ + + DEBUG_CALL ("VixDiskLib_ConnectEx", +-- +2.18.0 + diff --git a/SOURCES/0004-vddk-Make-dlsym-variables-static.patch b/SOURCES/0004-vddk-Make-dlsym-variables-static.patch new file mode 100644 index 0000000..995e9a9 --- /dev/null +++ b/SOURCES/0004-vddk-Make-dlsym-variables-static.patch @@ -0,0 +1,50 @@ +From 54eb27a47cf5cd8eb4521506d7abc64514cdb256 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Wed, 25 Jul 2018 09:10:03 +0100 +Subject: [PATCH 4/8] vddk: Make dlsym variables static. + +Fixes commit 8d7f7c26eb435334d7fa35e84ceee7d266dfae4c. + +(cherry picked from commit 168364eff47004e64d0880516de5744fecaa8047) +--- + plugins/vddk/vddk.c | 22 +++++++++++----------- + 1 file changed, 11 insertions(+), 11 deletions(-) + +diff --git a/plugins/vddk/vddk.c b/plugins/vddk/vddk.c +index 77e3406..4f03498 100644 +--- a/plugins/vddk/vddk.c ++++ b/plugins/vddk/vddk.c +@@ -48,19 +48,19 @@ + /* The VDDK APIs that we call. These globals are initialized when the + * plugin is loaded (by vddk_load). + */ +-char *(*VixDiskLib_GetErrorText) (VixError err, const char *unused); +-void (*VixDiskLib_FreeErrorText) (char *text); +-VixError (*VixDiskLib_InitEx) (uint32_t major, uint32_t minor, VixDiskLibGenericLogFunc *log_function, VixDiskLibGenericLogFunc *warn_function, VixDiskLibGenericLogFunc *panic_function, const char *lib_dir, const char *config_file); ++static char *(*VixDiskLib_GetErrorText) (VixError err, const char *unused); ++static void (*VixDiskLib_FreeErrorText) (char *text); ++static VixError (*VixDiskLib_InitEx) (uint32_t major, uint32_t minor, VixDiskLibGenericLogFunc *log_function, VixDiskLibGenericLogFunc *warn_function, VixDiskLibGenericLogFunc *panic_function, const char *lib_dir, const char *config_file); + void (*VixDiskLib_Exit) (void); +-VixError (*VixDiskLib_ConnectEx) (const VixDiskLibConnectParams *params, char read_only, const char *snapshot_ref, const char *transport_modes, VixDiskLibConnection *connection); +-VixError (*VixDiskLib_Open) (const VixDiskLibConnection connection, const char *path, uint32_t flags, VixDiskLibHandle *handle); ++static VixError (*VixDiskLib_ConnectEx) (const VixDiskLibConnectParams *params, char read_only, const char *snapshot_ref, const char *transport_modes, VixDiskLibConnection *connection); ++static VixError (*VixDiskLib_Open) (const VixDiskLibConnection connection, const char *path, uint32_t flags, VixDiskLibHandle *handle); + const char *(*VixDiskLib_GetTransportMode) (VixDiskLibHandle handle); +-VixError (*VixDiskLib_Close) (VixDiskLibHandle handle); +-VixError (*VixDiskLib_Disconnect) (VixDiskLibConnection connection); +-VixError (*VixDiskLib_GetInfo) (VixDiskLibHandle handle, VixDiskLibInfo **info); +-void (*VixDiskLib_FreeInfo) (VixDiskLibInfo *info); +-VixError (*VixDiskLib_Read) (VixDiskLibHandle handle, uint64_t start_sector, uint64_t nr_sectors, unsigned char *buf); +-VixError (*VixDiskLib_Write) (VixDiskLibHandle handle, uint64_t start_sector, uint64_t nr_sectors, const unsigned char *buf); ++static VixError (*VixDiskLib_Close) (VixDiskLibHandle handle); ++static VixError (*VixDiskLib_Disconnect) (VixDiskLibConnection connection); ++static VixError (*VixDiskLib_GetInfo) (VixDiskLibHandle handle, VixDiskLibInfo **info); ++static void (*VixDiskLib_FreeInfo) (VixDiskLibInfo *info); ++static VixError (*VixDiskLib_Read) (VixDiskLibHandle handle, uint64_t start_sector, uint64_t nr_sectors, unsigned char *buf); ++static VixError (*VixDiskLib_Write) (VixDiskLibHandle handle, uint64_t start_sector, uint64_t nr_sectors, const unsigned char *buf); + + /* Parameters passed to InitEx. */ + #define VDDK_MAJOR 5 +-- +2.18.0 + diff --git a/SOURCES/0005-vddk-Improve-error-message-if-the-proprietary-librar.patch b/SOURCES/0005-vddk-Improve-error-message-if-the-proprietary-librar.patch new file mode 100644 index 0000000..483273f --- /dev/null +++ b/SOURCES/0005-vddk-Improve-error-message-if-the-proprietary-librar.patch @@ -0,0 +1,37 @@ +From 9039b0fabc700982af9d86a1c0afcb951c6a90f7 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Wed, 25 Jul 2018 09:28:04 +0100 +Subject: [PATCH 5/8] vddk: Improve error message if the proprietary library + cannot be found. + +(cherry picked from commit 94e791f87c6029983befa6199771345fd9cdfcc9) +--- + plugins/vddk/vddk.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/plugins/vddk/vddk.c b/plugins/vddk/vddk.c +index 4f03498..79bcf7f 100644 +--- a/plugins/vddk/vddk.c ++++ b/plugins/vddk/vddk.c +@@ -142,12 +142,16 @@ error_function (const char *fs, va_list args) + static void + vddk_load (void) + { +- const char *soname = "libvixDiskLib.so.6"; ++ static const char soname[] = "libvixDiskLib.so.6"; + + /* Load the plugin and set the entry points. */ + dl = dlopen (soname, RTLD_NOW); + if (dl == NULL) { +- nbdkit_error ("%s: %s", soname, dlerror ()); ++ nbdkit_error ("%s\n\n" ++ "If '%s' is located on a non-standard path you may need to\n" ++ "set $LD_LIBRARY_PATH or edit /etc/ld.so.conf.\n\n" ++ "See the nbdkit-vddk-plugin(1) man page for details.", ++ dlerror (), soname); + exit (EXIT_FAILURE); + } + +-- +2.18.0 + diff --git a/SOURCES/0006-vddk-If-relative-libdir-parameter-is-passed-make-it-.patch b/SOURCES/0006-vddk-If-relative-libdir-parameter-is-passed-make-it-.patch new file mode 100644 index 0000000..583a98a --- /dev/null +++ b/SOURCES/0006-vddk-If-relative-libdir-parameter-is-passed-make-it-.patch @@ -0,0 +1,82 @@ +From cb13bf0b5218a75b8f91722126008b78ada89955 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Wed, 25 Jul 2018 09:28:32 +0100 +Subject: [PATCH 6/8] vddk: If relative libdir parameter is passed, make it + absolute. + +(cherry picked from commit 8838497c44d51f2c3ea12adad89fd836116af201) + +RHEL 7.6: Replace the nbdkit_realpath function with +nbdkit_absolute_path, since nbdkit-1.2 does not have the former. +--- + plugins/vddk/nbdkit-vddk-plugin.pod | 3 +-- + plugins/vddk/vddk.c | 14 ++++++++++---- + 2 files changed, 11 insertions(+), 6 deletions(-) + +diff --git a/plugins/vddk/nbdkit-vddk-plugin.pod b/plugins/vddk/nbdkit-vddk-plugin.pod +index ba7806d..57a039f 100644 +--- a/plugins/vddk/nbdkit-vddk-plugin.pod ++++ b/plugins/vddk/nbdkit-vddk-plugin.pod +@@ -87,8 +87,7 @@ L below). + + =item B + +-Optional. This sets the path of the VMware VDDK distribution. It +-must be an absolute path. ++Optional. This sets the path of the VMware VDDK distribution. + + VDDK uses this to load its own plugins, if this path is unspecified or + wrong then VDDK will work with reduced functionality. +diff --git a/plugins/vddk/vddk.c b/plugins/vddk/vddk.c +index 79bcf7f..5d7bf6d 100644 +--- a/plugins/vddk/vddk.c ++++ b/plugins/vddk/vddk.c +@@ -72,7 +72,7 @@ static int init_called = 0; /* was InitEx called */ + static char *config = NULL; /* config */ + static const char *cookie = NULL; /* cookie */ + static const char *filename = NULL; /* file */ +-static const char *libdir = VDDK_LIBDIR; /* libdir */ ++static char *libdir = NULL; /* libdir */ + static int nfc_host_port = 0; /* nfchostport */ + static char *password = NULL; /* password */ + static int port = 0; /* port */ +@@ -180,6 +180,7 @@ vddk_unload (void) + if (dl) + dlclose (dl); + free (config); ++ free (libdir); + free (password); + } + +@@ -205,7 +206,11 @@ vddk_config (const char *key, const char *value) + filename = value; + } + else if (strcmp (key, "libdir") == 0) { +- libdir = value; ++ /* See FILENAMES AND PATHS in nbdkit-plugin(3). */ ++ free (libdir); ++ libdir = nbdkit_absolute_path (value); ++ if (!libdir) ++ return -1; + } + else if (strcmp (key, "nfchostport") == 0) { + if (sscanf (value, "%d", &nfc_host_port) != 1) { +@@ -296,12 +301,13 @@ vddk_config_complete (void) + /* Initialize VDDK library. */ + DEBUG_CALL ("VixDiskLib_InitEx", + "%d, %d, &debug_fn, &error_fn, &error_fn, %s, %s", +- VDDK_MAJOR, VDDK_MINOR, libdir, config ? : "NULL"); ++ VDDK_MAJOR, VDDK_MINOR, ++ libdir ? : VDDK_LIBDIR, config ? : "NULL"); + err = VixDiskLib_InitEx (VDDK_MAJOR, VDDK_MINOR, + &debug_function, /* log function */ + &error_function, /* warn function */ + &error_function, /* panic function */ +- libdir, config); ++ libdir ? : VDDK_LIBDIR, config); + if (err != VIX_OK) { + VDDK_ERROR (err, "VixDiskLib_InitEx"); + exit (EXIT_FAILURE); +-- +2.18.0 + diff --git a/SOURCES/0007-vddk-Two-more-static-dlsym-variables.patch b/SOURCES/0007-vddk-Two-more-static-dlsym-variables.patch new file mode 100644 index 0000000..a3f40fd --- /dev/null +++ b/SOURCES/0007-vddk-Two-more-static-dlsym-variables.patch @@ -0,0 +1,33 @@ +From 033ab68ec56dbdac091b084dee7b7f333290768a Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Wed, 25 Jul 2018 14:02:32 +0100 +Subject: [PATCH 7/8] vddk: Two more static dlsym variables. + +Fixes commit 168364eff47004e64d0880516de5744fecaa8047 +and commit 8d7f7c26eb435334d7fa35e84ceee7d266dfae4c. + +(cherry picked from commit b776d1f5e59faef659f0d6e7fbffec614d58a368) +--- + plugins/vddk/vddk.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/plugins/vddk/vddk.c b/plugins/vddk/vddk.c +index 5d7bf6d..29b48dd 100644 +--- a/plugins/vddk/vddk.c ++++ b/plugins/vddk/vddk.c +@@ -51,10 +51,10 @@ + static char *(*VixDiskLib_GetErrorText) (VixError err, const char *unused); + static void (*VixDiskLib_FreeErrorText) (char *text); + static VixError (*VixDiskLib_InitEx) (uint32_t major, uint32_t minor, VixDiskLibGenericLogFunc *log_function, VixDiskLibGenericLogFunc *warn_function, VixDiskLibGenericLogFunc *panic_function, const char *lib_dir, const char *config_file); +-void (*VixDiskLib_Exit) (void); ++static void (*VixDiskLib_Exit) (void); + static VixError (*VixDiskLib_ConnectEx) (const VixDiskLibConnectParams *params, char read_only, const char *snapshot_ref, const char *transport_modes, VixDiskLibConnection *connection); + static VixError (*VixDiskLib_Open) (const VixDiskLibConnection connection, const char *path, uint32_t flags, VixDiskLibHandle *handle); +-const char *(*VixDiskLib_GetTransportMode) (VixDiskLibHandle handle); ++static const char *(*VixDiskLib_GetTransportMode) (VixDiskLibHandle handle); + static VixError (*VixDiskLib_Close) (VixDiskLibHandle handle); + static VixError (*VixDiskLib_Disconnect) (VixDiskLibConnection connection); + static VixError (*VixDiskLib_GetInfo) (VixDiskLibHandle handle, VixDiskLibInfo **info); +-- +2.18.0 + diff --git a/SOURCES/0008-vddk-Add-a-very-simple-test.patch b/SOURCES/0008-vddk-Add-a-very-simple-test.patch new file mode 100644 index 0000000..d2106f4 --- /dev/null +++ b/SOURCES/0008-vddk-Add-a-very-simple-test.patch @@ -0,0 +1,179 @@ +From 585abf15b46b0c36c4b696cbe925fbefbd22d90a Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Wed, 25 Jul 2018 14:09:58 +0100 +Subject: [PATCH 8/8] vddk: Add a very simple test. + +We cannot do anything like a real test without the proprietary +library. However by making a dummy library which contains some stub +functions we can test --dump-plugin output. + +(cherry picked from commit 70f7227ecc9b7c8d628987cb12ca7541bf485d66) +--- + tests/Makefile.am | 21 ++++++++++++++++ + tests/dummy-vddk.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++ + tests/test-vddk.sh | 45 +++++++++++++++++++++++++++++++++ + 3 files changed, 128 insertions(+) + create mode 100644 tests/dummy-vddk.c + create mode 100755 tests/test-vddk.sh + +diff --git a/tests/Makefile.am b/tests/Makefile.am +index 53b2d8a..d65bde5 100644 +--- a/tests/Makefile.am ++++ b/tests/Makefile.am +@@ -67,6 +67,7 @@ EXTRA_DIST = \ + test-start.sh \ + test-random-sock.sh \ + test-tls.sh \ ++ test-vddk.sh \ + test-version.sh \ + test-version-filter.sh \ + test-version-plugin.sh +@@ -319,6 +320,26 @@ test_streaming_SOURCES = test-streaming.c test.h + test_streaming_CFLAGS = $(WARNINGS_CFLAGS) $(LIBGUESTFS_CFLAGS) + test_streaming_LDADD = libtest.la $(LIBGUESTFS_LIBS) + ++# VDDK plugin test. ++# This only tests that the plugin can be loaded against a ++# dummy VDDK library, it is not a detailed test. ++ ++# check_LTLIBRARIES won't build a shared library (see automake manual). ++# So we have to do this and add a dependency. ++noinst_LTLIBRARIES += libvixDiskLib.la ++TESTS += test-vddk.sh ++ ++libvixDiskLib_la_SOURCES = \ ++ dummy-vddk.c ++libvixDiskLib_la_CPPFLAGS = \ ++ -I$(top_srcdir)/plugins/vddk ++libvixDiskLib_la_CXXFLAGS = \ ++ $(WARNINGS_CFLAGS) ++# For use of the -rpath option, see: ++# https://lists.gnu.org/archive/html/libtool/2007-07/msg00067.html ++libvixDiskLib_la_LDFLAGS = \ ++ -shared -version-number 6:0:0 -rpath /nowhere ++ + # xz plugin test. + if HAVE_LIBLZMA + if HAVE_GUESTFISH +diff --git a/tests/dummy-vddk.c b/tests/dummy-vddk.c +new file mode 100644 +index 0000000..e9069c9 +--- /dev/null ++++ b/tests/dummy-vddk.c +@@ -0,0 +1,62 @@ ++/* nbdkit ++ * Copyright (C) 2018 Red Hat Inc. ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are ++ * met: ++ * ++ * * Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * ++ * * Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in the ++ * documentation and/or other materials provided with the distribution. ++ * ++ * * Neither the name of Red Hat nor the names of its contributors may be ++ * used to endorse or promote products derived from this software without ++ * specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND ++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, ++ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A ++ * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR ++ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ++ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ++ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF ++ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ++ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, ++ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT ++ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ++ * SUCH DAMAGE. ++ */ ++ ++/* This file pretends to be libvixDiskLib.so.6. ++ * ++ * In fact because we don't check the result from dlsym and because we ++ * only call a few APIs in the --dump-plugin path there are only a few ++ * stub functions needed. ++ */ ++ ++#include ++#include ++#include ++ ++#include "vddk-structs.h" ++ ++VixError ++VixDiskLib_InitEx (uint32_t major, uint32_t minor, ++ VixDiskLibGenericLogFunc *log_function, ++ VixDiskLibGenericLogFunc *warn_function, ++ VixDiskLibGenericLogFunc *panic_function, ++ const char *lib_dir, const char *config_file) ++{ ++ /* Do nothing, only exit with no error. */ ++ return VIX_OK; ++} ++ ++void ++VixDiskLib_Exit (void) ++{ ++ /* Do nothing. */ ++} +diff --git a/tests/test-vddk.sh b/tests/test-vddk.sh +new file mode 100755 +index 0000000..5ccfff1 +--- /dev/null ++++ b/tests/test-vddk.sh +@@ -0,0 +1,45 @@ ++#!/bin/bash - ++# nbdkit ++# Copyright (C) 2018 Red Hat Inc. ++# All rights reserved. ++# ++# Redistribution and use in source and binary forms, with or without ++# modification, are permitted provided that the following conditions are ++# met: ++# ++# * Redistributions of source code must retain the above copyright ++# notice, this list of conditions and the following disclaimer. ++# ++# * Redistributions in binary form must reproduce the above copyright ++# notice, this list of conditions and the following disclaimer in the ++# documentation and/or other materials provided with the distribution. ++# ++# * Neither the name of Red Hat nor the names of its contributors may be ++# used to endorse or promote products derived from this software without ++# specific prior written permission. ++# ++# THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND ++# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, ++# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A ++# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR ++# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ++# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ++# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF ++# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ++# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, ++# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT ++# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ++# SUCH DAMAGE. ++ ++set -x ++set -e ++ ++rm -f test-vddk.out ++ ++LD_LIBRARY_PATH=.libs:$LD_LIBRARY_PATH \ ++nbdkit vddk --dump-plugin > test-vddk.out ++cat test-vddk.out ++ ++grep ^vddk_default_libdir= test-vddk.out ++ ++rm test-vddk.out +-- +2.18.0 + diff --git a/SOURCES/nbdkit-1.2.6.tar.gz.sig b/SOURCES/nbdkit-1.2.6.tar.gz.sig new file mode 100644 index 0000000..d492f09 --- /dev/null +++ b/SOURCES/nbdkit-1.2.6.tar.gz.sig @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIcBAABAgAGBQJbYeqOAAoJEJFzj3Pht2igbjcP/it0ILmJWsxH3Db3EJc0RYts +drPv214wBWPDgaV0SuJPPoEUYWgieSQuRPlWxIsKhoricVOXLcuKfzjFWF4t3DAz +2mynu5xUzb6ZVSQq+/XlAwerMt6bLPw8O6J0slHJcbTOxi6bEFS/VAl7/EqJBBIY +UkJkaEk27LX42azjMGRB4ehPJRNSM85+UEwwFuL+Ghzn9zJO2yo0+ejXVe/w7Rya +qaCw4EpBjMhL/j0kh5fJ2k30oMnjYRnivJZmPRQXfCAx+kWZZ7FqewP62+9bUkM3 +eNSW0FYSaLoPm5KIlH1U3IihodRUaOCIvxCoKiW8elTsI5H+/KQ48votM2a46RTW +Fdeof02szUq4xxmRzs+lTt+2Fbfw8McRXYrkiElAY9lMwbLLkikkYoTYdvf8ogfA +VP7e4UrSgXhAxAXKyd7ULhT9dCeJmWEdTf+o27A9SHnPaRGntXE8imZW2/OymQr0 +3zmmh2aeuyD461H9gg5nuVomfLIf74rweYG4AoBPE+vAVh9Rc71RuYq1K5JCqHGH +eECvgxPISkO59Kpo+G172fzFaAsjka6jJql7q9ZqjQqAMu9yHmB6sS5ShLcPNsFO +Fe7MRox9g7C55zT5REYWTn0RU3516jOtQUYjJwODDJHNcz57a8WXMLFFjKk2OpML +l7Xh/lY952epnfW3KPWK +=KgNI +-----END PGP SIGNATURE----- diff --git a/SPECS/nbdkit.spec b/SPECS/nbdkit.spec new file mode 100644 index 0000000..db19967 --- /dev/null +++ b/SPECS/nbdkit.spec @@ -0,0 +1,672 @@ +%global _hardened_build 1 + +%ifarch aarch64 %{arm} %{ix86} x86_64 ppc %{power64} +%global have_libguestfs 1 +%endif + +# Architectures where the complete test suite must pass. +# +# On all other architectures, a simpler test suite must pass. This +# omits any tests that run full qemu, since running qemu under TCG is +# often broken on non-x86_64 arches. +%global complete_test_arches x86_64 + +# Currently everything has Python 2. RHEL 7 doesn't have Python 3. +%if 0%{?rhel} != 7 +%global have_python3 1 +%endif + +# If we should verify tarball signature with GPGv2. +%global verify_tarball_signature 1 + +# If there are patches which touch autotools files, set this to 1. +%global patches_touch_autotools 1 + +# The source directory. +%global source_directory 1.2-stable + +Name: nbdkit +Version: 1.2.6 +Release: 1%{?dist} +Summary: NBD server + +License: BSD +URL: https://github.com/libguestfs/nbdkit + +Source0: http://libguestfs.org/download/nbdkit/%{source_directory}/%{name}-%{version}.tar.gz +%if 0%{verify_tarball_signature} +Source1: http://libguestfs.org/download/nbdkit/%{source_directory}/%{name}-%{version}.tar.gz.sig +# Keyring used to verify tarball signature. +Source2: libguestfs.keyring +%endif + +# Patches come from: +# https://github.com/libguestfs/nbdkit/tree/rhel-7.6 +Patch1: 0001-vddk-Remove-vimapiver-parameter.patch +Patch2: 0002-vddk-Remove-compile-time-dependency-on-VDDK-library.patch +Patch3: 0003-vddk-Add-comment-about-my-experiment-with-PrepareFor.patch +Patch4: 0004-vddk-Make-dlsym-variables-static.patch +Patch5: 0005-vddk-Improve-error-message-if-the-proprietary-librar.patch +Patch6: 0006-vddk-If-relative-libdir-parameter-is-passed-make-it-.patch +Patch7: 0007-vddk-Two-more-static-dlsym-variables.patch +Patch8: 0008-vddk-Add-a-very-simple-test.patch + +%if 0%{patches_touch_autotools} +BuildRequires: autoconf, automake, libtool +%endif + +%if 0%{?rhel} == 7 +# On RHEL 7, nothing in the virt stack is shipped on aarch64 and +# libguestfs was not shipped on POWER (fixed in 7.5). We could in +# theory make all of this work by having lots more conditionals, but +# for now limit this package to x86_64 on RHEL. +ExclusiveArch: x86_64 +%endif + +%ifnarch %{complete_test_arches} +BuildRequires: autoconf, automake, libtool +%endif +BuildRequires: /usr/bin/pod2man +BuildRequires: gnutls-devel +BuildRequires: libselinux-devel +%if 0%{?have_libguestfs} +BuildRequires: libguestfs-devel +%endif +BuildRequires: libvirt-devel +BuildRequires: xz-devel +BuildRequires: zlib-devel +BuildRequires: libcurl-devel +BuildRequires: perl-devel +BuildRequires: perl(ExtUtils::Embed) +BuildRequires: python2-devel +%if 0%{?have_python3} +BuildRequires: python3-devel +%endif +%ifarch %{ocaml_native_compiler} +# Requires OCaml 4.02.2 which contains fix for +# http://caml.inria.fr/mantis/view.php?id=6693 +BuildRequires: ocaml >= 4.02.2 +%endif +BuildRequires: ruby-devel +%if 0%{verify_tarball_signature} +BuildRequires: gnupg2 +%endif + +# Only for running the test suite: +BuildRequires: /usr/bin/certtool +BuildRequires: /usr/bin/qemu-img +BuildRequires: /usr/bin/socat +BuildRequires: /usr/sbin/ss + +%description +NBD is a protocol for accessing block devices (hard disks and +disk-like things) over the network. + +'nbdkit' is a toolkit for creating NBD servers. + +The key features are: + +* Multithreaded NBD server written in C with good performance. + +* Well-documented, simple plugin API with a stable ABI guarantee. + Allows you to export "unconventional" block devices easily. + +* Liberal license (BSD) allows nbdkit to be linked to proprietary + libraries or included in proprietary code. + +You probably want to install one of more plugins (%{name}-plugin-*). + +To develop plugins, install the %{name}-devel package and start by +reading the nbdkit(1) and nbdkit-plugin(3) manual pages. + + +%package basic-plugins +Summary: Basic plugins for %{name} +License: BSD + +Requires: %{name}%{?_isa} = %{version}-%{release} + +# For upgrade path, remove these in Fedora 30. +Obsoletes: %{name}-plugin-file < 1.1.19-1 +Obsoletes: %{name}-plugin-nbd < 1.1.19-1 +Obsoletes: %{name}-plugin-streaming < 1.1.19-1 + + +%description basic-plugins +This package contains some basic plugins for %{name} which have only +trivial dependencies. + +* nbdkit-file-plugin + + A file serving plugin. + +* nbdkit-memory-plugin + + A virtual memory plugin. + +* nbdkit-nbd-plugin + + An NBD forwarding plugin. + + It provides an NBD server that forwards all traffic as a client to + another existing NBD server. A primary usage of this setup is to + alter the set of features available to the ultimate end client, + without having to change the original server (for example, to + convert between oldstyle and newtyle, or to add TLS support where + the original server lacks it). + +* nbdkit-null-plugin + + A null (bitbucket) plugin. + +* nbdkit-split-plugin + + Concatenate one or more files into a single virtual disk. + +* nbdkit-streaming-plugin + + A streaming file serving plugin. + + +%package example-plugins +Summary: Example plugins for %{name} +License: BSD + +Requires: %{name}%{?_isa} = %{version}-%{release} + +# For upgrade path, remove this in Fedora 30. +Obsoletes: %{name}-plugin-examples < 1.1.19-1 + + +%description example-plugins +This package contains example plugins for %{name}. + + +# The plugins below have non-trivial dependencies are so are +# packaged separately. + +%package plugin-python-common +Summary: Python 2 and 3 plugin common files for %{name} +License: BSD + +Requires: %{name}%{?_isa} = %{version}-%{release} + + +%description plugin-python-common +This package contains common files shared between Python 2 +and Python 3 %{name} plugins. + +You should not install this package directly. Instead install +either %{name}-plugin-python2 or %{name}-plugin-python3. + + +%package plugin-python2 +Summary: Python 2 plugin for %{name} +License: BSD + +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{name}-plugin-python-common = %{version}-%{release} + + +%description plugin-python2 +This package lets you write Python 2 plugins for %{name}. + + +%ifarch %{ix86} x86_64 +%package plugin-vddk +Summary: VMware VDDK plugin for %{name} +License: BSD + +Requires: %{name}%{?_isa} = %{version}-%{release} + + +%description plugin-vddk +This package is a plugin for %{name} which connects to +VMware VDDK for accessing VMware disks and servers. +%endif + + +%package devel +Summary: Development files and documentation for %{name} +License: BSD + +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: pkgconfig + + +%description devel +This package contains development files and documentation +for %{name}. Install this package if you want to develop +plugins for %{name}. + + +%prep +%if 0%{verify_tarball_signature} +tmphome="$(mktemp -d)" +gpgv2 --homedir "$tmphome" --keyring %{SOURCE2} %{SOURCE1} %{SOURCE0} +%endif +%autosetup -p1 +%if 0%{patches_touch_autotools} +autoreconf -i +%endif + +%ifnarch %{complete_test_arches} +# Simplify the test suite so it doesn't require qemu. +sed -i -e '/^if HAVE_LIBGUESTFS/,/^endif HAVE_LIBGUESTFS/d' tests/Makefile.am +sed -i -e '/^if HAVE_GUESTFISH/,/^endif HAVE_GUESTFISH/d' tests/Makefile.am +autoreconf -i +%endif + +# Patch doesn't set permissions correctly. XXX +chmod +x tests/test-vddk.sh + + +%build +# Force immediate binding for hardened build for plugins. +# https://bugzilla.redhat.com/show_bug.cgi?id=977446#c13 +export LDFLAGS="$LDFLAGS -Wl,-z,now" + +# Build for Python 3 in a separate subdirectory. Upstream does not +# support srcdir!=builddir so copy the whole source. +copy="$(mktemp -d)" +cp -a . "$copy" +mv "$copy" python3 + +%configure --disable-static --with-tls-priority=@NBDKIT,SYSTEM \ + --disable-perl \ + --disable-ocaml \ + --disable-ruby \ + --without-curl \ + --without-libvirt \ + --without-zlib \ + --without-liblzma \ + --without-libguestfs +make %{?_smp_mflags} + +%if 0%{?have_python3} +pushd python3 +export PYTHON=%{_bindir}/python3 +%configure --disable-static --disable-perl --disable-ocaml --disable-ruby +# Verify that it picked the correct version of Python +# to avoid RHBZ#1404631 happening again silently. +grep '^PYTHON_VERSION = 3' Makefile +make %{?_smp_mflags} +unset PYTHON +popd +%endif + + +%install +%make_install + +pushd $RPM_BUILD_ROOT%{_libdir}/nbdkit/plugins/ +mv nbdkit-python-plugin.so nbdkit-python2-plugin.so +# For backwards compatibility, "the" python plugin is Python 2. +# Probably we will change this in future if Fedora switches +# exclusively to Python 3. +ln -s nbdkit-python2-plugin.so nbdkit-python-plugin.so +popd + +# Disable built-in filters but leave the empty directory. +rm -r $RPM_BUILD_ROOT%{_libdir}/%{name}/filters/nbdkit-*-filter.so +rm -r $RPM_BUILD_ROOT%{_mandir}/man1/nbdkit-*-filter.1* + +# Delete libtool crap. +find $RPM_BUILD_ROOT -name '*.la' -delete + +# Delete the VDDK plugin on !x86 architectures since it is not +# applicable there. +%ifnarch %{ix86} x86_64 +rm $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/nbdkit-vddk-plugin.so +rm $RPM_BUILD_ROOT%{_mandir}/man1/nbdkit-vddk-plugin.1* +%endif + + +%check +# Workaround for broken libvirt (RHBZ#1138604). +mkdir -p $HOME/.cache/libvirt + +# Make sure we can see the debug messages (RHBZ#1230160). +export LIBGUESTFS_DEBUG=1 +export LIBGUESTFS_TRACE=1 + +make check -j1 || { + cat tests/test-suite.log + exit 1 + } + + +%files +%doc README +%license LICENSE +%{_sbindir}/nbdkit +%dir %{_libdir}/%{name} +%dir %{_libdir}/%{name}/plugins +%dir %{_libdir}/%{name}/filters +%{_mandir}/man1/nbdkit.1* + + +%files basic-plugins +%doc README +%license LICENSE +%{_libdir}/%{name}/plugins/nbdkit-file-plugin.so +%{_libdir}/%{name}/plugins/nbdkit-memory-plugin.so +%{_libdir}/%{name}/plugins/nbdkit-nbd-plugin.so +%{_libdir}/%{name}/plugins/nbdkit-null-plugin.so +%{_libdir}/%{name}/plugins/nbdkit-split-plugin.so +%{_libdir}/%{name}/plugins/nbdkit-streaming-plugin.so +%{_mandir}/man1/nbdkit-file-plugin.1* +%{_mandir}/man1/nbdkit-memory-plugin.1* +%{_mandir}/man1/nbdkit-nbd-plugin.1* +%{_mandir}/man1/nbdkit-null-plugin.1* +%{_mandir}/man1/nbdkit-split-plugin.1* +%{_mandir}/man1/nbdkit-streaming-plugin.1* + + +%files example-plugins +%doc README +%license LICENSE +%{_libdir}/%{name}/plugins/nbdkit-example*-plugin.so +%{_mandir}/man1/nbdkit-example*-plugin.1* + + +%files plugin-python-common +%doc README +%license LICENSE +%{_mandir}/man3/nbdkit-python-plugin.3* + + +%files plugin-python2 +%{_libdir}/%{name}/plugins/nbdkit-python-plugin.so +%{_libdir}/%{name}/plugins/nbdkit-python2-plugin.so + + +%ifarch %{ix86} x86_64 +%files plugin-vddk +%doc README +%license LICENSE +%{_libdir}/%{name}/plugins/nbdkit-vddk-plugin.so +%{_mandir}/man1/nbdkit-vddk-plugin.1* +%endif + + +%files devel +%doc OTHER_PLUGINS README TODO +%license LICENSE +# Include the source of the example plugins in the documentation. +%doc plugins/example*/*.c +#%doc plugins/example4/nbdkit-example4-plugin +#%doc plugins/perl/example.pl +#%doc plugins/python/example.py +#%doc plugins/ruby/example.rb +%{_includedir}/nbdkit-common.h +%{_includedir}/nbdkit-filter.h +%{_includedir}/nbdkit-plugin.h +%{_mandir}/man3/nbdkit-filter.3* +%{_mandir}/man3/nbdkit-plugin.3* +%{_libdir}/pkgconfig/nbdkit.pc + + +%changelog +* Wed Aug 1 2018 Richard W.M. Jones - 1.2.6-1 +- New stable version 1.2.6. + +* Wed Jul 25 2018 Richard W.M. Jones - 1.2.5-1 +- New stable version 1.2.5. +- Enable VDDK plugin on x86-64 only. +- Small refactorings in the spec file. + +* Sun Jul 1 2018 Richard W.M. Jones - 1.2.4-4 +- Add all upstream patches since 1.2.4 was released. + +* Thu Jun 14 2018 Richard W.M. Jones - 1.2.4-3 +- Fix use of autopatch/autosetup macros in prep section. + +* Tue Jun 12 2018 Richard W.M. Jones - 1.2.4-2 +- Add all upstream patches since 1.2.4 was released. +- Drop example4 and tar plugins since they depend on Perl. + +* Sat Jun 9 2018 Richard W.M. Jones - 1.2.4-1 +- New stable version 1.2.4. +- Remove upstream patches. +- Enable tarball signatures. +- Add upstream patch to fix tests when guestfish not available. + +* Wed Jun 6 2018 Richard W.M. Jones - 1.2.3-1 +- New stable version 1.2.3. +- Add patch to work around libvirt problem with relative socket paths. +- Add patch to fix the xz plugin test with recent guestfish. +- Fix version in VDDK plugin spec file. + +* Sat Apr 21 2018 Richard W.M. Jones - 1.2.2-1 +- New stable version 1.2.2. + +* Fri Apr 20 2018 Tomáš Golembiovský - 1.2.1-2 +- Fix link to sources + +* Mon Apr 9 2018 Richard W.M. Jones - 1.2.1-1 +- New stable version 1.2.1. + +* Fri Apr 6 2018 Richard W.M. Jones - 1.2.0-1 +- Move to stable branch version 1.2.0. +- Escape macros in %%changelog +- Run a simplified test suite on all arches. + +* Thu Mar 15 2018 Tomáš Golembiovský - 1.1.26-2 +- Enable python2 plugin. + +* Sat Dec 23 2017 Richard W.M. Jones - 1.1.26-1 +- New upstream version 1.1.26. +- Add new pkg-config file and dependency. + +* Wed Dec 06 2017 Richard W.M. Jones - 1.1.25-1 +- New upstream version 1.1.25. + +* Tue Dec 05 2017 Richard W.M. Jones - 1.1.24-1 +- New upstream version 1.1.24. +- Add tar plugin (new subpackage nbdkit-plugin-tar). + +* Tue Dec 05 2017 Richard W.M. Jones - 1.1.23-1 +- New upstream version 1.1.23. +- Add example4 plugin. +- Python3 tests require libguestfs so disable on s390x. + +* Sun Dec 03 2017 Richard W.M. Jones - 1.1.22-1 +- New upstream version 1.1.22. +- Enable tests on Fedora. + +* Sat Dec 02 2017 Richard W.M. Jones - 1.1.20-1 +- New upstream version 1.1.20. +- Add nbdkit-split-plugin to basic plugins. + +* Sat Dec 02 2017 Richard W.M. Jones - 1.1.19-2 +- OCaml 4.06.0 rebuild. + +* Thu Nov 30 2017 Richard W.M. Jones - 1.1.19-1 +- New upstream version 1.1.19. +- Combine all the simple plugins in %%{name}-basic-plugins. +- Add memory and null plugins. +- Rename the example plugins subpackage. +- Use %%license instead of %%doc for license file. +- Remove patches now upstream. + +* Wed Nov 29 2017 Richard W.M. Jones - 1.1.18-4 +- Fix Python 3 builds / RHEL macros (RHBZ#1404631). + +* Tue Nov 21 2017 Richard W.M. Jones - 1.1.18-3 +- New upstream version 1.1.18. +- Add NBD forwarding plugin. +- Add libselinux-devel so that SELinux support is enabled in the daemon. +- Apply all patches from upstream since 1.1.18. + +* Fri Oct 20 2017 Richard W.M. Jones - 1.1.16-2 +- New upstream version 1.1.16. +- Disable python3 plugin on RHEL/EPEL <= 7. +- Only ship on x86_64 in RHEL/EPEL <= 7. + +* Wed Sep 27 2017 Richard W.M. Jones - 1.1.15-1 +- New upstream version 1.1.15. +- Enable TLS support. + +* Fri Sep 01 2017 Richard W.M. Jones - 1.1.14-1 +- New upstream version 1.1.14. + +* Fri Aug 25 2017 Richard W.M. Jones - 1.1.13-1 +- New upstream version 1.1.13. +- Remove patches which are all upstream. +- Remove grubby hack, should not be needed with modern supermin. + +* Sat Aug 19 2017 Richard W.M. Jones - 1.1.12-13 +- Rebuild for OCaml 4.05.0. + +* Thu Aug 03 2017 Fedora Release Engineering - 1.1.12-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 1.1.12-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Tue Jun 27 2017 Richard W.M. Jones - 1.1.12-10 +- Rebuild for OCaml 4.04.2. + +* Sun Jun 04 2017 Jitka Plesnikova - 1.1.12-9 +- Perl 5.26 rebuild + +* Mon May 15 2017 Richard W.M. Jones - 1.1.12-8 +- Rebuild for OCaml 4.04.1. + +* Fri Feb 10 2017 Fedora Release Engineering - 1.1.12-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Thu Jan 12 2017 Vít Ondruch - 1.1.12-6 +- Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_2.4 + +* Fri Dec 23 2016 Richard W.M. Jones - 1.1.12-5 +- Rebuild for Python 3.6 update. + +* Wed Dec 14 2016 Richard W.M. Jones - 1.1.12-4 +- Fix python3 subpackage so it really uses python3 (RHBZ#1404631). + +* Sat Nov 05 2016 Richard W.M. Jones - 1.1.12-3 +- Rebuild for OCaml 4.04.0. + +* Mon Oct 03 2016 Richard W.M. Jones - 1.1.12-2 +- Compile Python 2 and Python 3 versions of the plugin. + +* Wed Jun 08 2016 Richard W.M. Jones - 1.1.12-1 +- New upstream version 1.1.12 +- Enable Ruby plugin. +- Disable tests on Rawhide because libvirt is broken again (RHBZ#1344016). + +* Wed May 25 2016 Richard W.M. Jones - 1.1.11-10 +- Add another upstream patch since 1.1.11. + +* Mon May 23 2016 Richard W.M. Jones - 1.1.11-9 +- Add all patches upstream since 1.1.11 (fixes RHBZ#1336758). + +* Tue May 17 2016 Jitka Plesnikova - 1.1.11-7 +- Perl 5.24 rebuild + +* Wed Mar 09 2016 Richard W.M. Jones - 1.1.11-6 +- When tests fail, dump out test-suite.log so we can debug it. + +* Fri Feb 05 2016 Richard W.M. Jones - 1.1.11-5 +- Don't run tests on x86, because kernel is broken there + (https://bugzilla.redhat.com/show_bug.cgi?id=1302071) + +* Thu Feb 04 2016 Fedora Release Engineering - 1.1.11-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Mon Jan 11 2016 Richard W.M. Jones - 1.1.11-3 +- Add support for newstyle NBD protocol (RHBZ#1297100). + +* Sat Oct 31 2015 Richard W.M. Jones - 1.1.11-1 +- New upstream version 1.1.11. + +* Thu Jul 30 2015 Richard W.M. Jones - 1.1.10-3 +- OCaml 4.02.3 rebuild. + +* Sat Jun 20 2015 Richard W.M. Jones - 1.1.10-2 +- Enable libguestfs plugin on aarch64. + +* Fri Jun 19 2015 Richard W.M. Jones - 1.1.10-1 +- New upstream version. +- Enable now working OCaml plugin (requires OCaml >= 4.02.2). + +* Wed Jun 17 2015 Fedora Release Engineering - 1.1.9-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Thu Jun 11 2015 Jitka Plesnikova - 1.1.9-5 +- Perl 5.22 rebuild + +* Wed Jun 10 2015 Richard W.M. Jones - 1.1.9-4 +- Enable debugging messages when running make check. + +* Sat Jun 06 2015 Jitka Plesnikova - 1.1.9-3 +- Perl 5.22 rebuild + +* Tue Oct 14 2014 Richard W.M. Jones - 1.1.9-2 +- New upstream version 1.1.9. +- Add the streaming plugin. +- Include fix for streaming plugin in 1.1.9. + +* Wed Sep 10 2014 Richard W.M. Jones - 1.1.8-4 +- Rebuild for updated Perl in Rawhide. +- Workaround for broken libvirt (RHBZ#1138604). + +* Sun Aug 17 2014 Fedora Release Engineering - 1.1.8-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sat Jun 21 2014 Richard W.M. Jones - 1.1.8-1 +- New upstream version 1.1.8. +- Add support for cURL, and new nbdkit-plugin-curl package. + +* Fri Jun 20 2014 Richard W.M. Jones - 1.1.7-1 +- New upstream version 1.1.7. +- Remove patches which are now all upstream. + +* Sat Jun 07 2014 Fedora Release Engineering - 1.1.6-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Thu Mar 06 2014 Dan Horák - 1.1.6-4 +- libguestfs is available only on selected arches + +* Fri Feb 21 2014 Richard W.M. Jones - 1.1.6-3 +- Backport some upstream patches, fixing a minor bug and adding more tests. +- Enable the tests since kernel bug is fixed. + +* Sun Feb 16 2014 Richard W.M. Jones - 1.1.6-1 +- New upstream version 1.1.6. + +* Sat Feb 15 2014 Richard W.M. Jones - 1.1.5-2 +- New upstream version 1.1.5. +- Enable the new Python plugin. +- Perl plugin man page moved to section 3. +- Perl now requires ExtUtils::Embed. + +* Mon Feb 10 2014 Richard W.M. Jones - 1.1.4-1 +- New upstream version 1.1.4. +- Enable the new Perl plugin. + +* Sun Aug 4 2013 Richard W.M. Jones - 1.1.3-1 +- New upstream version 1.1.3 which fixes some test problems. +- Disable tests because Rawhide kernel is broken (RHBZ#991808). +- Remove a single quote from description which confused emacs. +- Remove patch, now upstream. + +* Sat Aug 03 2013 Fedora Release Engineering - 1.1.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Sun Jul 21 2013 Richard W.M. Jones - 1.1.2-3 +- Fix segfault when IPv6 client is used (RHBZ#986601). + +* Tue Jul 16 2013 Richard W.M. Jones - 1.1.2-2 +- New development version 1.1.2. +- Disable the tests on Fedora <= 18. + +* Tue Jun 25 2013 Richard W.M. Jones - 1.1.1-1 +- New development version 1.1.1. +- Add libguestfs plugin. +- Run the test suite. + +* Mon Jun 24 2013 Richard W.M. Jones - 1.0.0-4 +- Initial release.