diff options
author | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2016-07-05 13:51:41 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@172.30.200.206> | 2016-07-05 13:51:41 +0000 |
commit | 4a34951f52904a367000bcb17b25b2e61a941fd2 (patch) | |
tree | aec7d0de976aa99ad90e425ae0744f035cb982d6 /patches/fuel-plugin-opendaylight/0002-opnfv-quagga-Build-for-UBUNTU_ARCH.patch | |
parent | 9dd1aacd451b610050e987c2b284aa0b361a1f72 (diff) | |
parent | f90ee3550bf6e78e8afed67de9b682023eba6af4 (diff) |
Merge "ODL: Rework opnfv-quagga building/packaging."
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.patch | 70 |
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 + |