summaryrefslogtreecommitdiffstats
path: root/patches/fuel-plugin-opendaylight/0002-opnfv-quagga-Build-for-UBUNTU_ARCH.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/fuel-plugin-opendaylight/0002-opnfv-quagga-Build-for-UBUNTU_ARCH.patch')
-rw-r--r--patches/fuel-plugin-opendaylight/0002-opnfv-quagga-Build-for-UBUNTU_ARCH.patch70
1 files changed, 70 insertions, 0 deletions
diff --git a/patches/fuel-plugin-opendaylight/0002-opnfv-quagga-Build-for-UBUNTU_ARCH.patch b/patches/fuel-plugin-opendaylight/0002-opnfv-quagga-Build-for-UBUNTU_ARCH.patch
new file mode 100644
index 00000000..a44222ab
--- /dev/null
+++ b/patches/fuel-plugin-opendaylight/0002-opnfv-quagga-Build-for-UBUNTU_ARCH.patch
@@ -0,0 +1,70 @@
+From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+Date: Mon, 4 Jul 2016 20:44:49 +0200
+Subject: [PATCH] opnfv-quagga: Build for UBUNTU_ARCH.
+
+ODL itself is mostly arch-indep, but its deps (e.g. opnfv-quagga
+and friends) are not.
+
+Introduce opnfv-quagga building/packing for multiple archs, listed
+in UBUNTU_ARCH, which holds a space-separated list of target
+arch(s), represented in `dpkg --print-architecture` format.
+Only applicable when "BUILD_FOR=ubuntu".
+
+FIXME(armband): For now, only native building and prebuilt debs
+are supported (no cross-building).
+
+Due to the design of opnfv-packaging repo, it is easier to:
+- patch upstream sources to support native arm64 builds (see [1]);
+- add prebuilt arm64 binaries to output dir in git repo (like amd64),
+submitted as pull request upstream [2];
+
+Until above OPNFV-QUAGGA changes land upstream and/or are refactored,
+rely on forked repository that contains above patches [3] on
+branch "stable/colorado", including prebuilt binaries (DEBs) for:
+- amd64 (also available in upstream repo);
+- arm64 (submitted upstream in [3]);
+
+[1] https://github.com/nikolas-hermanns/opnfv-quagga-packaging/pull/1
+[2] https://github.com/nikolas-hermanns/opnfv-quagga-packaging/pull/2
+[3] https://github.com/alexandruavadanii/opnfv-quagga-packaging
+
+Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+---
+ pre_build_hook | 16 ++++++++++++++--
+ 1 file changed, 14 insertions(+), 2 deletions(-)
+
+diff --git a/pre_build_hook b/pre_build_hook
+index f973826..953e66c 100755
+--- a/pre_build_hook
++++ b/pre_build_hook
+@@ -41,9 +41,17 @@ NETWORKING_ODL_BRANCH=${NETWORKING_ODL_BRANCH:-stable/mitaka}
+ OPNFV_QUAGGE_PACKAGING_REPO=${OPNFV_QUAGGE_PACKAGING_REPO:-https://github.com/nikolas-hermanns/opnfv-quagga-packaging}
+ OPNFV_QUAGGE_PACKAGING_BRANCH=stable/colorado
+
+-# For which systems odl package should be build
++# For which systems odl package should be built
+ BUILD_FOR=${BUILD_FOR:-ubuntu}
+
++# For which architecture(s) package should be built
++# Only applicable when "BUILD_FOR=ubuntu"
++# ODL itself is mostly arch-indep, but its deps are not
++# All archs should be represented in `dpkg --print-architecture` format
++# UBUNTU_ARCH holds a space-separated list of target arch(s)
++# FIXME(armband): For now, only native building is supported!
++UBUNTU_ARCH=${UBUNTU_ARCH:-$(dpkg --print-architecture)}
++
+ DIR="$(dirname `readlink -f $0`)"
+ TMP_DIR="${DIR}/tmp"
+ MODULES="${DIR}/deployment_scripts/puppet/modules"
+@@ -74,7 +82,10 @@ function add_opnfv_quagga {
+ sudo apt-get -y install `cat requirements.txt`
+ make -j6
+ fi
+- cp debian_package/* $path
++ # Filter only requested archs, bail on missing DEBs
++ for ARCH in ${UBUNTU_ARCH}; do
++ cp debian_package/*_${ARCH}.deb $path
++ done
+ popd
+ popd
+