summaryrefslogtreecommitdiffstats
path: root/patches/fuel-plugin-ovs
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2017-06-28 20:48:38 +0200
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2017-06-28 20:51:14 +0200
commita0805a01542505301918cacb5db6216814c40023 (patch)
treedcc125fa94cbacdac6f30bea2d6ebc59ad335598 /patches/fuel-plugin-ovs
parentbe00c803bcefb56ad9f690ae1509d3dcae7e9d9b (diff)
MCP: Remove all Fuel patches and plugins
Chances are none of the old patches / plugins can be reused as-is, so remove all of them and prepare for the switch to MCP. Change-Id: I999927a43b438d9bda9ff118731e2af4b1fa8caa Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'patches/fuel-plugin-ovs')
-rw-r--r--patches/fuel-plugin-ovs/0001-AArch64-Add-support-for-downloading-prebuilt-DEBs.patch125
-rw-r--r--patches/fuel-plugin-ovs/0002-deb-src-Enable-building-Debian-source-pkgs.patch159
-rw-r--r--patches/fuel-plugin-ovs/0003-build-docker-Use-host-s-network-stack.patch41
3 files changed, 0 insertions, 325 deletions
diff --git a/patches/fuel-plugin-ovs/0001-AArch64-Add-support-for-downloading-prebuilt-DEBs.patch b/patches/fuel-plugin-ovs/0001-AArch64-Add-support-for-downloading-prebuilt-DEBs.patch
deleted file mode 100644
index 2a6ad8a7..00000000
--- a/patches/fuel-plugin-ovs/0001-AArch64-Add-support-for-downloading-prebuilt-DEBs.patch
+++ /dev/null
@@ -1,125 +0,0 @@
-::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-: Copyright (c) 2017 Enea AB and others.
-:
-: All rights reserved. This program and the accompanying materials
-: are made available under the terms of the Apache License, Version 2.0
-: which accompanies this distribution, and is available at
-: http://www.apache.org/licenses/LICENSE-2.0
-::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
-Date: Mon, 12 Sep 2016 18:02:42 +0200
-Subject: [PATCH] AArch64: Add support for downloading prebuilt DEBs
-
-Change-Id: I6042f9f7bdde5a15e3cb5a94ab67a990faae0418
-Signed-off-by: Anders Roxell <anders.roxell@enea.com>
-Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
----
- ovs_build/prebuilt-ovs-fetch.sh | 70 +++++++++++++++++++++++++++++++++++++++++
- pre_build_hook | 10 ++++++
- 2 files changed, 80 insertions(+)
- create mode 100755 ovs_build/prebuilt-ovs-fetch.sh
-
-diff --git a/ovs_build/prebuilt-ovs-fetch.sh b/ovs_build/prebuilt-ovs-fetch.sh
-new file mode 100755
-index 0000000..b4f30c5
---- /dev/null
-+++ b/ovs_build/prebuilt-ovs-fetch.sh
-@@ -0,0 +1,70 @@
-+#!/bin/bash
-+
-+set -eux
-+
-+BUILD_DEST=${BUILD_DEST:-/deb}
-+BUILD_HOME=${BUILD_HOME:-/tmp/ovs-dpdk}
-+BUILD_ARCH=${BUILD_ARCH:-$(dpkg --print-architecture)}
-+UBUNTU_ARCH=${UBUNTU_ARCH:-${BUILD_ARCH}}
-+
-+# armband_fetch will download all binaries for one debian source package
-+#
-+# Usage:
-+# armband_fetch <src_deb_name> <src_deb_version> \
-+# [<repo_base_url> \
-+# [<repo_Sources_relative_url> \
-+# [<repo_Packages_relative_url>]]] \
-+#
-+# e.g.:
-+# armband_fetch dpdk 16.07-0ubuntu5~u1604+mos1 \
-+# https://linux.enea.com/mos-repos/ubuntu/10.0 \
-+# dists/mos10.0-fuel-plugin-ovs/main/source/Sources \
-+# dists/mos10.0-fuel-plugin-ovs/main/binary-arm64/Packages
-+function armband_fetch() {
-+ local name=$1
-+ local ver=${2//\+/\\\+}
-+ local repo_base_url=${3:-http://linux.enea.com/mos-repos/ubuntu/10.0}
-+ local repo_Sources_url=${4:-dists/mos10.0-fuel-plugin-ovs/main/source/Sources}
-+ local repo_Packages_url=${5:-dists/mos10.0-fuel-plugin-ovs/main/binary-arm64/Packages}
-+ local found=false
-+
-+ # Fetch Sources & Packages files if not already present
-+ if [ ! -f Sources -o ! -f Packages ]; then
-+ sudo apt-get -y --force-yes install wget
-+ wget -c "${repo_base_url}/${repo_Sources_url}"
-+ wget -c "${repo_base_url}/${repo_Packages_url}"
-+ fi
-+
-+ L=$(grep -Pzo "(?<=Package: ${name}\nBinary: )(\N*?)(?=\nVersion: ${ver}\n)" \
-+ Sources | tr -d ',')
-+ for deb_binary in ${L}; do
-+ D=$(grep -Po "(?<=Filename: )(.*?\/${deb_binary}_${ver}_.*?\.deb)" Packages) || true
-+ if [ -n "${D}" ]; then
-+ wget -c "${repo_base_url}/${D}" && found=true
-+ fi
-+ done
-+ if [ ${found} = false ]; then
-+ echo "ERROR: Could not find DEBs for pkg/ver: ${name}/${ver}"
-+ exit 1
-+ fi
-+}
-+
-+for arch in ${UBUNTU_ARCH}; do
-+ if [ "${arch}" = "${BUILD_ARCH}" ]; then
-+ # Skip fetching native binaries
-+ continue
-+ fi
-+
-+ cd ${BUILD_DEST}; rm -rf ${BUILD_HOME}; mkdir -p ${BUILD_HOME}
-+ cd ${BUILD_HOME}
-+
-+ ARMBAND_BASE="http://linux.enea.com/mos-repos/ubuntu/10.0"
-+ ARMBAND_SRCS="dists/mos10.0-fuel-plugin-ovs/main/source/Sources"
-+ ARMBAND_BINS="dists/mos10.0-fuel-plugin-ovs/main/binary-${arch}/Packages"
-+
-+ # OVS with NSH
-+ armband_fetch 'openvswitch' '.*nsh' \
-+ "${ARMBAND_BASE}" "${ARMBAND_SRCS}" "${ARMBAND_BINS}"
-+ mkdir -p ${BUILD_HOME}/deb; mv *.deb ${BUILD_HOME}/deb; cd ${BUILD_HOME}/deb
-+ tar czvf ${BUILD_DEST}/ovs-nsh_${arch}.tar.gz .;
-+done
-diff --git a/pre_build_hook b/pre_build_hook
-index a955678..f9a6010 100755
---- a/pre_build_hook
-+++ b/pre_build_hook
-@@ -6,6 +6,11 @@ BUILD_FOR=${BUILD_FOR:-ubuntu}
- BUILD_ARCH="$(dpkg --print-architecture)"
- DIR="$(dirname `readlink -f $0`)"
-
-+# Pass target arch(s) (UBUNTU_ARCH) to build scripts.
-+# All archs should be represented in `dpkg --print-architecture` format
-+# UBUNTU_ARCH holds a space-separated list of target arch(s)
-+export UBUNTU_ARCH=${UBUNTU_ARCH:-$(dpkg --print-architecture)}
-+
- function build_pkg {
- case ${BUILD_ARCH} in
- arm64)
-@@ -24,6 +29,11 @@ function build_pkg {
- 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.sh
- cp -r ${DEB_DIR}/* ${DIR}/repositories/ubuntu/
-+
-+ rm -rf ${DEB_DIR}; mkdir -p ${DEB_DIR}; chmod 777 ${DEB_DIR};
-+ sudo docker run -e "UBUNTU_ARCH=${UBUNTU_ARCH}" -e "BUILD_ARCH=${BUILD_ARCH}" \
-+ -v ${DEB_DIR}:/deb -t ovs_build /ovs_build/prebuilt-ovs-fetch.sh
-+ cp -r ${DEB_DIR}/* ${DIR}/repositories/ubuntu/
- rm -rf ${DEB_DIR}
-
- ;;
diff --git a/patches/fuel-plugin-ovs/0002-deb-src-Enable-building-Debian-source-pkgs.patch b/patches/fuel-plugin-ovs/0002-deb-src-Enable-building-Debian-source-pkgs.patch
deleted file mode 100644
index 8451c68f..00000000
--- a/patches/fuel-plugin-ovs/0002-deb-src-Enable-building-Debian-source-pkgs.patch
+++ /dev/null
@@ -1,159 +0,0 @@
-::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-: Copyright (c) 2017 Enea AB and others.
-:
-: All rights reserved. This program and the accompanying materials
-: are made available under the terms of the Apache License, Version 2.0
-: which accompanies this distribution, and is available at
-: http://www.apache.org/licenses/LICENSE-2.0
-::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
-Date: Wed, 25 Jan 2017 22:11:44 +0100
-Subject: [PATCH] deb-src: Enable building Debian source pkgs
-
-Armband plans on shipping prebuilt binaries.
-Opensource rules dictate they should be accompanied by the
-corresponding source packages.
-
-So, add the possibility to also build Debian sources when a
-dummy "ovs_build/build_debian_source" file exists (to avoid
-passing an useless env var to each docker run).
-
-Change-Id: I4e308d84c2eb01af043ed73440c46fc692c30d12
-Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
----
- ovs_build/build-ovs-dpdk.sh | 28 +++++++++++++++++-----
- ovs_build/build-ovs-nsh.sh | 26 +++++++++++++++++---
- .../debian/patches/series | 1 -
- 3 files changed, 45 insertions(+), 10 deletions(-)
- delete mode 100644 ovs_build/openvswitch_2.6-dpdk_16.07/debian/patches/series
-
-diff --git a/ovs_build/build-ovs-dpdk.sh b/ovs_build/build-ovs-dpdk.sh
-index 7ce2a62..8dd7430 100755
---- a/ovs_build/build-ovs-dpdk.sh
-+++ b/ovs_build/build-ovs-dpdk.sh
-@@ -11,14 +11,30 @@ DEB_ARCH="$(dpkg --print-architecture)"
-
- export DEB_BUILD_OPTIONS='parallel=8 nocheck'
-
-+function debian_build() {
-+ if [ -f "${BUILD_SRC}/build_debian_source" ]; then
-+ dpkg-source -b .
-+ cp -f ../*.{dsc,xz} ${BUILD_HOME}/deb
-+ fi
-+ debian/rules build; fakeroot debian/rules binary
-+}
-+
-+function debian_src_prepare_ovs() {
-+ if [ -f "${BUILD_SRC}/build_debian_source" ]; then
-+ suffix="${OVS_VER}.orig.tar.xz"
-+ tar cJf ../openvswitch_${suffix} --exclude='./debian' .
-+ cd ..; ln -sf openvswitch_${suffix} openvswitch-dpdk_${suffix}; cd -
-+ fi
-+}
-+
- sudo apt-get update
- sudo apt-get -y --force-yes install devscripts dpkg-dev git wget dkms
-
- rm -rf ${BUILD_HOME}; mkdir -p ${BUILD_HOME}/deb
-
- cd ${BUILD_HOME}
--wget -c http://fast.dpdk.org/rel/dpdk-16.07.tar.xz
--xz -d dpdk-16.07.tar.xz; tar xvf dpdk-16.07.tar
-+wget -c http://fast.dpdk.org/rel/dpdk-16.07.tar.xz -O dpdk_16.07.orig.tar.xz
-+tar xJvf dpdk_16.07.orig.tar.xz
- cd dpdk-16.07
- cp -r ${BUILD_SRC}/dpdk_16.07.fuel/debian .
- cat << EOF > debian/changelog
-@@ -45,7 +61,7 @@ sudo apt-get install -y --force-yes debhelper \
- python-sphinx \
- texlive-fonts-recommended \
- texlive-latex-extra
--debian/rules build; fakeroot debian/rules binary
-+debian_build
-
- cd ${BUILD_HOME}
- sudo apt-get install -y --force-yes hwdata
-@@ -73,7 +89,7 @@ sudo apt-get install -y --force-yes autoconf \
- python-six
-
- git clone https://github.com/openvswitch/ovs.git
--cd ovs; git checkout ${OVS_COMMIT}; rm -rf .git
-+cd ovs; git checkout ${OVS_COMMIT}; rm -rf .git; debian_src_prepare_ovs
- cd ${BUILD_HOME}; cp -r ovs ovs-dpdk
-
- cd ovs-dpdk
-@@ -86,10 +102,10 @@ openvswitch-dpdk (${OVS_VER}-1) unstable; urgency=low
- -- Open vSwitch team <dev@openvswitch.org> $(date --rfc-2822)
- EOF
-
--debian/rules build; fakeroot debian/rules binary
-+debian_build
-
- cd ${BUILD_HOME}/ovs
--debian/rules build; fakeroot debian/rules binary
-+debian_build
-
- cp -r ${BUILD_HOME}/*.deb ${BUILD_HOME}/deb
- cd ${BUILD_HOME}/deb
-diff --git a/ovs_build/build-ovs-nsh.sh b/ovs_build/build-ovs-nsh.sh
-index dbebdb2..efbabab 100755
---- a/ovs_build/build-ovs-nsh.sh
-+++ b/ovs_build/build-ovs-nsh.sh
-@@ -11,6 +11,22 @@ DEB_ARCH="$(dpkg --print-architecture)"
-
- export DEB_BUILD_OPTIONS='parallel=8 nocheck'
-
-+function debian_build() {
-+ if [ -f "${BUILD_SRC}/build_debian_source" ]; then
-+ dpkg-source -b .
-+ cp -f ../*.{dsc,xz} ${BUILD_HOME}/deb
-+ fi
-+ debian/rules build; fakeroot debian/rules binary
-+}
-+
-+function debian_src_prepare_ovs() {
-+ if [ -f "${BUILD_SRC}/build_debian_source" ]; then
-+ suffix="${OVS_VER}.orig.tar.xz"
-+ tar cJf ../openvswitch_${suffix} --exclude='./debian' .
-+ cd ..; ln -sf openvswitch_${suffix} openvswitch-dpdk_${suffix}; cd -
-+ fi
-+}
-+
- sudo apt-get update
- sudo apt-get -y --force-yes install devscripts dpkg-dev git wget dkms
-
-@@ -39,12 +55,16 @@ sudo apt-get install -y --force-yes autoconf \
- python-six
-
- git clone https://github.com/openvswitch/ovs.git
--cd ovs; git checkout ${OVS_COMMIT}; rm -rf .git
-+cd ovs; git checkout ${OVS_COMMIT}; rm -rf .git; debian_src_prepare_ovs
-+mkdir -p debian/patches; mkdir -p .pc
- PATCHES=$(cd ${BUILD_SRC}/ovs_nsh_patches/v2.6.1/; echo *patch)
- for patch in ${PATCHES}
- do
-- patch -p1 < ${BUILD_SRC}/ovs_nsh_patches/v2.6.1/${patch}
-+ echo "${patch}" >> debian/patches/series
-+ cp ${BUILD_SRC}/ovs_nsh_patches/v2.6.1/${patch} debian/patches/
-+ patch -p1 < debian/patches/${patch}
- done
-+cp debian/patches/series .pc/applied-patches
-
- cat << EOF > debian/changelog
- openvswitch (${OVS_VER}-1.nsh) unstable; urgency=low
-@@ -53,7 +73,7 @@ openvswitch (${OVS_VER}-1.nsh) unstable; urgency=low
-
- -- Open vSwitch team <dev@openvswitch.org> $(date --rfc-2822)
- EOF
--debian/rules build; fakeroot debian/rules binary
-+debian_build
-
- cp -r ${BUILD_HOME}/*.deb ${BUILD_HOME}/deb
- cd ${BUILD_HOME}/deb
-diff --git a/ovs_build/openvswitch_2.6-dpdk_16.07/debian/patches/series b/ovs_build/openvswitch_2.6-dpdk_16.07/debian/patches/series
-deleted file mode 100644
-index 8b13789..0000000
---- a/ovs_build/openvswitch_2.6-dpdk_16.07/debian/patches/series
-+++ /dev/null
-@@ -1 +0,0 @@
--
diff --git a/patches/fuel-plugin-ovs/0003-build-docker-Use-host-s-network-stack.patch b/patches/fuel-plugin-ovs/0003-build-docker-Use-host-s-network-stack.patch
deleted file mode 100644
index ffa9ba77..00000000
--- a/patches/fuel-plugin-ovs/0003-build-docker-Use-host-s-network-stack.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-: Copyright (c) 2017 Enea AB and others.
-:
-: All rights reserved. This program and the accompanying materials
-: are made available under the terms of the Apache License, Version 2.0
-: which accompanies this distribution, and is available at
-: http://www.apache.org/licenses/LICENSE-2.0
-::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
-Date: Thu, 15 Sep 2016 19:16:34 +0200
-Subject: [PATCH] build: docker: Use host's network stack
-
-Similar to Fuel@OPNFV build process, we want to mount /etc/hosts
-in the builder container to be able to use local mirror caches.
-
-Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
----
- pre_build_hook | 6 ++++--
- 1 file changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/pre_build_hook b/pre_build_hook
-index f9a6010..76da923 100755
---- a/pre_build_hook
-+++ b/pre_build_hook
-@@ -27,12 +27,14 @@ function build_pkg {
- 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-nsh.sh
-+ sudo docker run -v ${DEB_DIR}:/deb -v /etc/hosts:/etc/hosts \
-+ -t ovs_build /ovs_build/build-ovs-nsh.sh
- cp -r ${DEB_DIR}/* ${DIR}/repositories/ubuntu/
-
- rm -rf ${DEB_DIR}; mkdir -p ${DEB_DIR}; chmod 777 ${DEB_DIR};
- sudo docker run -e "UBUNTU_ARCH=${UBUNTU_ARCH}" -e "BUILD_ARCH=${BUILD_ARCH}" \
-- -v ${DEB_DIR}:/deb -t ovs_build /ovs_build/prebuilt-ovs-fetch.sh
-+ -v ${DEB_DIR}:/deb -v /etc/hosts:/etc/hosts \
-+ -t ovs_build /ovs_build/prebuilt-ovs-fetch.sh
- cp -r ${DEB_DIR}/* ${DIR}/repositories/ubuntu/
- rm -rf ${DEB_DIR}
-