nbdkit/0001-vddk-Remove-vimapiver-parameter.patch
Richard W.M. Jones c59e48e5bb Fix final release of nbdkit in EPEL 7 so it matches capabilities of RHEL 7.6.
nbdkit has been added to RHEL 7.6.  For this reason we expect that
nbdkit will be removed from EPEL (since it will be added to base
CentOS 7.6 instead).  However owing to a screw up, the version in RHEL
7.6 had a lower NVR than EPEL 7.5, but also more features (especially
including the new VDDK plugin, which is required when running oVirt on
CentOS 7).

For this reason this commit includes all the new features from RHEL
7.6.  RHEL 7.6 will still have a lower NVR than this package --
there's nothing we can do about that -- but at least there are no
missing features now.  You can stay on the EPEL 7 package and nothing
bad will happen.  Or if you prefer you can manually downgrade to the
RHEL 7.6 nbdkit package.  There will be no difference.

Note that in RHEL 7.7 we intend to rebase nbdkit again which will
cleanly fix this (https://bugzilla.redhat.com/1621894).

This includes the following commits from RHEL 7.6:

Enable VDDK plugin and remove the spec file distributed with the SRPM.

Small refactorings in the spec file.

(cherry picked from commit 948daff1f0)

Enable VDDK plugin.

(cherry picked from commit b160c01694)

Limit VDDK plugin to i386 and x86-64.

These are the only architectures for which VMware provides
this library.

(cherry picked from commit aa1623f194)

related: rhbz#1519486
(cherry picked from commit 80386e0396a592a61cd5cb69c897db919215de8c)

Further VDDK fixes.
related: rhbz#1519486

(cherry picked from commit be7a2f901d211395fcfc5a1bbdd11cff2190a931)

Fix permissions on test-vddk.sh
related: rhbz#1519486

(cherry picked from commit 29e951331b739970e90d8e3a6d787d674a5b1612)
2018-10-16 13:36:40 +01:00

117 lines
3.7 KiB
Diff

From bf6e917a926cf18ed34dd4ef0f75862e99050440 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
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 ec15aac..ae1df65 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<https://blogs.vmware.com/vsphere/2012/02/uniquely-identifying-virtual-machines
=item B<vimapiver=>APIVER
-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<nfchostport=PORT> parameter is supported
by this build.
-=item C<vddk_has_vimapiver=1>
-
-If this is printed then the C<vimapiver=APIVER> 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.19.0.rc0