From 84a5086e3d5db5c1bf984baf14c84e134bcfd60c Mon Sep 17 00:00:00 2001 From: Huan Xie Date: Thu, 2 Mar 2017 23:37:46 -0800 Subject: [PATCH] Support HYPERVISOR_NAME contains blank space We changed our branding.inc not including speech marks "", e.g. HYPERVISOR_NAME=XXX YYY, but will add the necessary "" in script get_plugin_version.sh, however this made the building failed as there is blank space in sed, e.g. s/@HYPERVISOR_NAME@/XXX YYY/g \, this patch is to fix this problem Change-Id: I3fad385f50e1c7c3c929e4f19658b92cd2b2c991 --- Makefile | 24 ++++++++++++------------ branding.inc | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index 0ae7e73..e00367a 100644 --- a/Makefile +++ b/Makefile @@ -26,19 +26,19 @@ REQUIRED_ISOS=$(PLATFORMS:%=suppack/xcp_%/xenapi-plugins-${OPENSTACK_RELEASE}.is iso: $(REQUIRED_ISOS) $(REQUIRED_ISOS): plugin_source/deployment_scripts/patchset/xenhost - suppack/build-xenserver-suppack.sh ${OPENSTACK_RELEASE} ${HYPERVISOR_NAME} + suppack/build-xenserver-suppack.sh ${OPENSTACK_RELEASE} "${HYPERVISOR_NAME}" ${BUILDROOT}/${PLUGIN_NAME}/branded: ${BRANDING} ${REQUIRED_ISOS} plugin_source mkdir -p ${BUILDROOT}/${PLUGIN_NAME} cp -r plugin_source/* ${BUILDROOT}/${PLUGIN_NAME} find ${BUILDROOT}/${PLUGIN_NAME} -type f -print0 | \ xargs -0 -i sed -i \ - -e s/@HYPERVISOR_NAME@/${HYPERVISOR_NAME}/g \ - -e s/@HYPERVISOR_LOWER@/${HYPERVISOR_LOWER}/g \ - -e s/@PLUGIN_NAME@/${PLUGIN_NAME}/g \ - -e s/@PLUGIN_VERSION@/${PLUGIN_VERSION}/g \ - -e s/@PLUGIN_REVISION@/${PLUGIN_REVISION}/g \ - -e s/@VERSION_HOTFIXES@/${VERSION_HOTFIXES}/g {} + -e "s/@HYPERVISOR_NAME@/${HYPERVISOR_NAME}/g" \ + -e "s/@HYPERVISOR_LOWER@/${HYPERVISOR_LOWER}/g" \ + -e "s/@PLUGIN_NAME@/${PLUGIN_NAME}/g" \ + -e "s/@PLUGIN_VERSION@/${PLUGIN_VERSION}/g" \ + -e "s/@PLUGIN_REVISION@/${PLUGIN_REVISION}/g" \ + -e s/@VERSION_HOTFIXES@/'${VERSION_HOTFIXES}'/g {} cp -r suppack/xcp_* ${BUILDROOT}/${PLUGIN_NAME}/deployment_scripts/ touch ${BUILDROOT}/${PLUGIN_NAME}/branded @@ -54,11 +54,11 @@ ${BUILDROOT}/doc/source ${BUILDROOT}/doc/Makefile: ${BRANDING} doc/Makefile doc/ cp -r doc/Makefile doc/source ${BUILDROOT}/doc find ${BUILDROOT}/doc -type f -print0 | \ xargs -0 -i sed -i \ - -e s/@HYPERVISOR_NAME@/${HYPERVISOR_NAME}/g \ - -e s/@PLUGIN_NAME@/${PLUGIN_NAME}/g \ - -e s/@PLUGIN_VERSION@/${PLUGIN_VERSION}/g \ - -e s/@PLUGIN_REVISION@/${PLUGIN_REVISION}/g \ - -e s/@PLUGIN_MD5@/`cat output/${MD5_FILENAME} | cut -d' ' -f1`/g {} + -e "s/@HYPERVISOR_NAME@/${HYPERVISOR_NAME}/g" \ + -e "s/@PLUGIN_NAME@/${PLUGIN_NAME}/g" \ + -e "s/@PLUGIN_VERSION@/${PLUGIN_VERSION}/g" \ + -e "s/@PLUGIN_REVISION@/${PLUGIN_REVISION}/g" \ + -e "s/@PLUGIN_MD5@/`cat output/${MD5_FILENAME} | cut -d' ' -f1`/g" {} ${BUILDROOT}/doc/build/latex/%.pdf: ${BUILDROOT}/doc/Makefile ${shell find ${BUILDROOT}/doc/source} make -C ${BUILDROOT}/doc latexpdf diff --git a/branding.inc b/branding.inc index 25026d1..15f0ba0 100644 --- a/branding.inc +++ b/branding.inc @@ -1,7 +1,7 @@ HYPERVISOR_NAME=XenServer HYPERVISOR_LOWER=xenserver PLUGIN_NAME=fuel-plugin-xenserver -VERSION_HOTFIXES='{"6.5.0":["XS65ESP1013"]}' +VERSION_HOTFIXES={"6.5.0":["XS65ESP1013"]} PLATFORMS=1.9.0 2.1.0 2.2.0 PLUGIN_BRANCHES=9.0 8.0 7.0 6.1 PLUGIN_VERSION_6_1=1.0