summaryrefslogtreecommitdiffstats
path: root/patches/fuel-plugin-ovs/0005-pre_build_hook-Introduce-USE_DOCKER-option.patch
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2016-06-20 19:28:17 +0200
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2016-09-14 16:46:17 +0200
commit5b49b2f7ea1485b56ebc7815b5a3803363ec29af (patch)
tree95a064ad646ce12e05caefe27aa29ced004690ad /patches/fuel-plugin-ovs/0005-pre_build_hook-Introduce-USE_DOCKER-option.patch
parente6c649401c5117fca6823156368095e4063b9f6a (diff)
AArch64: fuel-plugin-ovs enable
OVS-DPDK-NSH is not supported on arm64 for now, see [1] Closes: ARMBAND-46 [1] https://jira.opnfv.org/browse/ARMBAND-86 Change-Id: I79b33bab7348e297c06ff4bb2bf7cc23f21eb7e3 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'patches/fuel-plugin-ovs/0005-pre_build_hook-Introduce-USE_DOCKER-option.patch')
-rw-r--r--patches/fuel-plugin-ovs/0005-pre_build_hook-Introduce-USE_DOCKER-option.patch77
1 files changed, 77 insertions, 0 deletions
diff --git a/patches/fuel-plugin-ovs/0005-pre_build_hook-Introduce-USE_DOCKER-option.patch b/patches/fuel-plugin-ovs/0005-pre_build_hook-Introduce-USE_DOCKER-option.patch
new file mode 100644
index 00000000..dbbfefcf
--- /dev/null
+++ b/patches/fuel-plugin-ovs/0005-pre_build_hook-Introduce-USE_DOCKER-option.patch
@@ -0,0 +1,77 @@
+From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+Date: Sun, 26 Jun 2016 20:00:22 +0200
+Subject: [PATCH] pre_build_hook: Introduce USE_DOCKER option
+
+The build system uses Ubuntu Trusty, which is not properly supported
+by Docker on AArch64 architecture.
+Introduce a new environment variable for enabling/disabling build
+containerization, and disable by default said variable for AArch64.
+
+This requires a slight rework of the pre_build_hook script.
+
+NOTE: Setting USE_DOCKER to false will build the packages on the host
+machine directly.
+
+AArch64 WARNING: This build will install packages automatically!
+
+Change-Id: Ib1294949ecc1767f12631a82e2c7099c45fcb615
+Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+---
+ pre_build_hook | 33 +++++++++++++++++++++++----------
+ 1 file changed, 23 insertions(+), 10 deletions(-)
+
+diff --git a/pre_build_hook b/pre_build_hook
+index 63cf7b4..b9ae6bb 100755
+--- a/pre_build_hook
++++ b/pre_build_hook
+@@ -3,27 +3,40 @@
+ set -eux
+
+ BUILD_FOR=${BUILD_FOR:-ubuntu}
++USE_DOCKER=${USE_DOCKER:-true}
+ DIR="$(dirname `readlink -f $0`)"
+
++if [ `uname -m` = 'aarch64' ]; then
++ USE_DOCKER=false
++fi
++
+ function build_pkg {
+ case $1 in
+ ubuntu)
+- rm -rf ${DIR}/repositories/ubuntu; mkdir -p ${DIR}/repositories/ubuntu
++ DEB_DIR=${DIR}/deb-ovs-dpdk
++ DEB_DIR_NSH=${DIR}/deb-ovs-nsh-dpdk
++
++ rm -rf ${DIR}/repositories/ubuntu ${DEB_DIR} ${DEB_DIR_NSH}
++ mkdir -p ${DIR}/repositories/ubuntu ${DEB_DIR} ${DEB_DIR_NSH}
++ sudo chmod -R 777 ${DEB_DIR} ${DEB_DIR_NSH}
+
+ cd ${DIR}/ovs_build
+- sudo docker build -t ovs_build .
++ if [ "${USE_DOCKER}" = true ]; then
++ sudo docker build -t ovs_build .
++ sudo docker run -v ${DEB_DIR}:/deb -t ovs_build /ovs_build/build-ovs-dpdk.sh
++ sudo docker run -v ${DEB_DIR_NSH}:/deb -t ovs_build /ovs_build/build-ovs-nsh-dpdk.sh
++ else
++ rm -rf /tmp/ovs-build-{,nsh-}dpdk; mkdir -p /tmp/ovs-build-{,nsh-}dpdk
++ BUILD_HOME=/tmp/ovs-build-dpdk BUILD_DEB=${DEB_DIR} ./build-ovs-dpdk.sh
++ BUILD_HOME=/tmp/ovs-build-nsh-dpdk BUILD_DEST=${DEB_DIR_NSH} ./build-ovs-nsh-dpdk.sh
++ rm -rf /tmp/ovs-build-{,nsh-}dpdk
++ fi
+
+- DEB_DIR=${DIR}/deb-ovs-dpdk
+- rm -rf ${DEB_DIR}; mkdir -p ${DEB_DIR}; chmod 777 ${DEB_DIR};
+- sudo docker run -v ${DEB_DIR}:/deb -t ovs_build /ovs_build/build-ovs-dpdk.sh
+ cd ${DEB_DIR}; tar czvf ../repositories/ubuntu/ovs-dpdk.tar.gz .;
+ cd ..; rm -rf ${DEB_DIR}
+
+- DEB_DIR=${DIR}/deb-ovs-nsh-dpdk
+- rm -rf ${DEB_DIR}; mkdir -p ${DEB_DIR}; chmod 777 ${DEB_DIR};
+- sudo docker run -v ${DEB_DIR}:/deb -t ovs_build /ovs_build/build-ovs-nsh-dpdk.sh
+- cd ${DEB_DIR}; tar czvf ../repositories/ubuntu/ovs-nsh-dpdk.tar.gz .;
+- cd ..; rm -rf ${DEB_DIR}
++ cd ${DEB_DIR_NSH}; tar czvf ../repositories/ubuntu/ovs-nsh-dpdk.tar.gz .;
++ cd ..; rm -rf ${DEB_DIR_NSH}
+
+ ;;
+ *) echo "Not supported system"; exit 1;;