aboutsummaryrefslogtreecommitdiffstats
path: root/patches/opnfv-fuel/upstream-backports
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2016-10-01 13:18:11 +0200
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2016-10-09 16:33:43 +0200
commit42f8585ebb8fffad19a89314659ab9129176c3e9 (patch)
treee2cf6a4797bcbd036e080541cc3925f8b209549b /patches/opnfv-fuel/upstream-backports
parent6f3a054fc95622f0c002f72c0fac6074bb36c36f (diff)
build: Rework patch mechanism for Fuel submodules
While refactoring the patching mechanism, take care of: - Sync submodule handling with Fuel@OPFNV; - build: Investigate/prepare for moving patches to Fuel@OPNFV; - build: Investigate divergent fuel-mirror; - ISO build: cacheid for Fuel comps should not depend on Armband git commit; CHANGE: Rename/shuffle patches while grouping them in "features", preparing for upstreaming them to Fuel@OPNFV and beyond. CHANGE: Allow linking patches for better representing the dependency between one patch and different features. e.g. 0001-Add-arch-to-nailgun-release-and-target-image.patch: - part of `multiarch-fuel`, because it extends Fuel; - part of `direct-kernel-boot`, as arch is required for that; - part of `cross-bootstrap`, target image is arch-dependent; NOTE: Patch links are not staged to Fuel@OPNFV, they only serve as markers that a specific patch is part of a feature. CHANGE: Kill all Fuel component submodules, now handled in Fuel@OPNFV: - fuel-agent - fuel-astute - fuel-library - fuel-mirror - fuel-nailgun-agent - fuel-web CHANGE: Move armband-fuel-config.mk to armband git root. FIXME: m1.micro-Increase-profile-RAM-size-to-128MB.patch is NOT part of `cross-bootstrap` feature, but patch context says so ... FIXME: 0001-Add-arm64-deb-repositories-setup.patch is broken at `make patches-export` by removing spaces at EOL. v2 -> v3: * Phony patch support (links to show a patch belongs to a feature); * Updated README.md v3 -> v7: * Re-export Fuel submodules & plugins patches (update patch context); * Update Cavium mail addresses (s/caviumnetworks.com/cavium.com/); * Ignore submodule changes; * Add armband git repo info to gitinfo_fuel.txt at build time; Implements: ARMBAND-136 Closes-bug: ARMBAND-95 Closes-bug: ARMBAND-93 Closes-bug: ARMBAND-92 Change-Id: I1a236d9f43b2e6dca22055911f696b43c22b5973 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'patches/opnfv-fuel/upstream-backports')
-rw-r--r--patches/opnfv-fuel/upstream-backports/0001-deploy.sh-Remove-check-for-root-rm-umask-0000.patch106
-rw-r--r--patches/opnfv-fuel/upstream-backports/0002-Backport-dpkg-checkbuilddeps-to-mk-build-deps.patch58
2 files changed, 164 insertions, 0 deletions
diff --git a/patches/opnfv-fuel/upstream-backports/0001-deploy.sh-Remove-check-for-root-rm-umask-0000.patch b/patches/opnfv-fuel/upstream-backports/0001-deploy.sh-Remove-check-for-root-rm-umask-0000.patch
new file mode 100644
index 00000000..cd30166a
--- /dev/null
+++ b/patches/opnfv-fuel/upstream-backports/0001-deploy.sh-Remove-check-for-root-rm-umask-0000.patch
@@ -0,0 +1,106 @@
+From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+Date: Fri, 6 May 2016 03:07:40 +0200
+Subject: [PATCH] deploy.sh: Remove check for root (rm umask 0000)
+
+Patch(es) by Josep, signed by Alex only for upstreaming.
+
+[Alexandru Avadanii]
+Squashed two atomic commits into one change.
+
+Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>
+Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+---
+ ci/deploy.sh | 11 -----------
+ deploy/deploy-config.py | 1 -
+ deploy/deploy.py | 2 --
+ deploy/environments/virtual_fuel.py | 2 --
+ 4 files changed, 16 deletions(-)
+
+diff --git a/ci/deploy.sh b/ci/deploy.sh
+index 8411714..081806c 100755
+--- a/ci/deploy.sh
++++ b/ci/deploy.sh
+@@ -84,9 +84,6 @@ Input parameters to the build script is:
+ -i .iso image to be deployed (needs to be provided in a URI
+ style, it can be a local resource: file:// or a remote resource http(s)://)
+
+-NOTE: Root priviledges are needed for this script to run
+-
+-
+ Examples:
+ sudo `basename $0` -b file:///home/jenkins/lab-config -l lf -p pod1 -s ha_odl-l3_heat_ceilometer -i file:///home/jenkins/myiso.iso
+ EOF
+@@ -212,11 +209,6 @@ do
+ esac
+ done
+
+-if [[ $EUID -ne 0 ]]; then
+- echo "This script must be run as root" 1>&2
+- exit 1
+-fi
+-
+ if [ -z $BASE_CONFIG_URI ] || [ -z $TARGET_LAB ] || \
+ [ -z $TARGET_POD ] || [ -z $DEPLOY_SCENARIO ] || \
+ [ -z $ISO ]; then
+@@ -231,9 +223,6 @@ fi
+ # Enable the automatic exit trap
+ trap do_exit SIGINT SIGTERM EXIT
+
+-# Set no restrictive umask so that Jenkins can removeeee any residuals
+-umask 0000
+-
+ clean
+
+ pushd ${DEPLOY_DIR} > /dev/null
+diff --git a/deploy/deploy-config.py b/deploy/deploy-config.py
+index 2a09aa3..02debe2 100644
+--- a/deploy/deploy-config.py
++++ b/deploy/deploy-config.py
+@@ -41,7 +41,6 @@ from common import (
+ check_file_exists,
+ create_dir_if_not_exists,
+ delete,
+- check_if_root,
+ ArgParser,
+ )
+
+diff --git a/deploy/deploy.py b/deploy/deploy.py
+index fe213e5..08702d2 100755
+--- a/deploy/deploy.py
++++ b/deploy/deploy.py
+@@ -34,7 +34,6 @@ from common import (
+ check_dir_exists,
+ create_dir_if_not_exists,
+ delete,
+- check_if_root,
+ ArgParser,
+ )
+
+@@ -252,7 +251,6 @@ class AutoDeploy(object):
+ return 0
+
+ def run(self):
+- check_if_root()
+ if self.cleanup_only:
+ self.cleanup_execution_environment()
+ else:
+diff --git a/deploy/environments/virtual_fuel.py b/deploy/environments/virtual_fuel.py
+index b1a76e4..4ff68f6 100644
+--- a/deploy/environments/virtual_fuel.py
++++ b/deploy/environments/virtual_fuel.py
+@@ -18,7 +18,6 @@ import time
+ from common import (
+ exec_cmd,
+ check_file_exists,
+- check_if_root,
+ delete,
+ log,
+ )
+@@ -135,7 +134,6 @@ class VirtualFuel(ExecutionEnvironment):
+ vm_definition_overwrite)
+
+ def setup_environment(self):
+- check_if_root()
+ self.cleanup_environment()
+ self.create_vm()
+
diff --git a/patches/opnfv-fuel/upstream-backports/0002-Backport-dpkg-checkbuilddeps-to-mk-build-deps.patch b/patches/opnfv-fuel/upstream-backports/0002-Backport-dpkg-checkbuilddeps-to-mk-build-deps.patch
new file mode 100644
index 00000000..eb81942e
--- /dev/null
+++ b/patches/opnfv-fuel/upstream-backports/0002-Backport-dpkg-checkbuilddeps-to-mk-build-deps.patch
@@ -0,0 +1,58 @@
+From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+Date: Wed, 6 Jul 2016 17:03:49 +0200
+Subject: [PATCH] Backport: dpkg-checkbuilddeps to mk-build-deps.
+
+Backported from [1].
+
+[1] https://review.openstack.org/#/c/325210/
+
+Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+---
+ ...ce-dpkg-checkbuilddeps-with-mk-build-deps.patch | 38 ++++++++++++++++++++++
+ 1 file changed, 38 insertions(+)
+ create mode 100644 build/f_repos/patch/fuel-main/0005-replace-dpkg-checkbuilddeps-with-mk-build-deps.patch
+
+diff --git a/build/f_repos/patch/fuel-main/0005-replace-dpkg-checkbuilddeps-with-mk-build-deps.patch b/build/f_repos/patch/fuel-main/0005-replace-dpkg-checkbuilddeps-with-mk-build-deps.patch
+new file mode 100644
+index 0000000..896f3cf
+--- /dev/null
++++ b/build/f_repos/patch/fuel-main/0005-replace-dpkg-checkbuilddeps-with-mk-build-deps.patch
+@@ -0,0 +1,38 @@
++From: Sergii Golovatiuk <sgolovatiuk@mirantis.com>
++Date: Fri, 3 Jun 2016 12:26:19 +0200
++Subject: [PATCH] Replace dpkg-checkbuilddeps with mk-build-deps
++
++dpkg-checkbuilddeps doesn't check dependencies inside chroot as in many
++cases host system might not have required packages. This change replaces
++dpkg-checkbuilddeps with mk-build-deps in chroot
++
++Implements: mos-xenial
++Change-Id: I27a65893c1bd33e6d82c11bf3d08423562dbe4d2
++Signed-off-by: Sergii Golovatiuk <sgolovatiuk@mirantis.com>
++---
++ packages/deb/module.mk | 5 ++---
++ 1 file changed, 2 insertions(+), 3 deletions(-)
++
++diff --git a/packages/deb/module.mk b/packages/deb/module.mk
++index 6c93441..c0ba737 100644
++--- a/packages/deb/module.mk
+++++ b/packages/deb/module.mk
++@@ -10,7 +10,7 @@ clean-deb:
++ done
++ sudo rm -rf $(BUILD_DIR)/packages/deb
++
++-$(BUILD_DIR)/packages/deb/buildd.tar.gz: SANDBOX_DEB_PKGS:=wget bzip2 apt-utils build-essential python-setuptools python-pbr devscripts debhelper fakeroot
+++$(BUILD_DIR)/packages/deb/buildd.tar.gz: SANDBOX_DEB_PKGS:=wget bzip2 apt-utils build-essential fakeroot devscripts equivs debhelper python-setuptools python-pbr
++ $(BUILD_DIR)/packages/deb/buildd.tar.gz: SANDBOX_UBUNTU:=$(BUILD_DIR)/packages/deb/chroot
++ $(BUILD_DIR)/packages/deb/buildd.tar.gz: export SANDBOX_UBUNTU_UP:=$(SANDBOX_UBUNTU_UP)
++ $(BUILD_DIR)/packages/deb/buildd.tar.gz: export SANDBOX_UBUNTU_DOWN:=$(SANDBOX_UBUNTU_DOWN)
++@@ -47,8 +47,7 @@ $(BUILD_DIR)/packages/deb/$1.done: $(BUILD_DIR)/repos/repos.done
++ sudo -E dch -c $$(SANDBOX_UBUNTU)/tmp/$1/debian/changelog -D $(UBUNTU_RELEASE) -b --force-distribution \
++ -v $(PACKAGE_VERSION)-`awk -F'=' '/DEBRELEASE/ {print $$$$2}' $(BUILD_DIR)/packages/sources/$1/version` \
++ "`awk -F'=' '/DEBMSG/ {print $$$$2}' $(BUILD_DIR)/packages/sources/$1/version`"
++- dpkg-checkbuilddeps $(BUILD_DIR)/repos/$1/debian/control 2>&1 | sed 's/^dpkg-checkbuilddeps: Unmet build dependencies: //g' | sed 's/([^()]*)//g;s/|//g' | sudo tee $$(SANDBOX_UBUNTU)/tmp/$1.installdeps
++- sudo chroot $$(SANDBOX_UBUNTU) /bin/sh -c "cat /tmp/$1.installdeps | xargs --no-run-if-empty env LC_ALL=C DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true apt-get -y install"
+++ sudo chroot $$(SANDBOX_UBUNTU) /bin/sh -c "mk-build-deps --install --remove --tool 'apt-get --yes --no-remove --no-install-recommends' /tmp/$1/debian/control"
++ sudo chroot $$(SANDBOX_UBUNTU) /bin/sh -c "cd /tmp/$1 ; DEB_BUILD_OPTIONS=nocheck debuild -us -uc -b -d"
++ cp $$(SANDBOX_UBUNTU)/tmp/*.deb $(BUILD_DIR)/packages/deb/packages
++ sudo sh -c "$$$${SANDBOX_UBUNTU_DOWN}"