summaryrefslogtreecommitdiffstats
path: root/build/Makefile
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2016-06-18 01:09:27 +0200
committerMichal Skalski <mskalski@mirantis.com>2016-08-02 09:56:47 +0000
commit5bfea5d5b88a167b754384f07453a80d416d7337 (patch)
tree9e762e5a8e734d1c3462440e9b2cb8903ebc637a /build/Makefile
parent7a02094add80d97be77754c3c404e9d1c1a769c6 (diff)
build: fuel-main: Decouple patches, Makefile.
Tested in armband, with very small adaptions. Use `git apply` and/or `git am` in favor of `patch`. Change patches from old context format to unified diff. This change allows us to decouple Makefile and patches. This means we no longer have to manually stage touched files before committing them to git. Possible improvements: - move patches to separate dir and add ordering info (prefix); - merge patches (currently we have one per touched file); Remove obsolete (unused?) patch: - fuel-main_docker_version.patch Change-Id: I5b621370993b259779c813b47105f632948e6da7 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'build/Makefile')
-rw-r--r--build/Makefile13
1 files changed, 5 insertions, 8 deletions
diff --git a/build/Makefile b/build/Makefile
index 44cee03be..f49947b88 100644
--- a/build/Makefile
+++ b/build/Makefile
@@ -109,7 +109,7 @@ $(ISOCACHE):
cd /tmp && git clone $(FUEL_MAIN_REPO); \
fi
cd /tmp/fuel-main && git checkout $(FUEL_MAIN_TAG)
- @echo "fuel" `git -C /tmp/fuel-main show | grep commit | head -1 | cut -d " " -f2` >> $(VERSION_FILE)
+ @echo "fuel" `git -C /tmp/fuel-main rev-parse HEAD` >> $(VERSION_FILE)
# Remove Docker optimizations, otherwise multistrap will fail during
# Fuel build.
sudo rm -f /etc/apt/apt.conf.d/docker*
@@ -133,13 +133,10 @@ $(ISOCACHE):
# OPNFV patches at Fuel build time
# Need to be commited in order for them to be considered by the Fuel
# build system
- cd /tmp/fuel-main/iso && git config user.name "Fuel OPNFV"
- cd /tmp/fuel-main/iso && git config user.email "fuel@opnfv.org"
- cd /tmp/fuel-main/iso && patch -p0 < $(TOPDIR)/bootstrap_admin_node.sh.patch
- cd /tmp/fuel-main/iso && git add -u bootstrap_admin_node.sh
- cd /tmp/fuel-main/iso/isolinux && patch -p0 < $(TOPDIR)/isolinux.cfg.patch
- cd /tmp/fuel-main/iso/isolinux && git add -u isolinux.cfg
- cd /tmp/fuel-main/iso && git commit -m "Added OPNFV patches"
+ cd /tmp/fuel-main && git config user.name "Fuel OPNFV"
+ cd /tmp/fuel-main && git config user.email "fuel@opnfv.org"
+ cd /tmp/fuel-main && git am $(TOPDIR)/bootstrap_admin_node.sh.patch
+ cd /tmp/fuel-main && git am $(TOPDIR)/isolinux.cfg.patch
# Repeat build up to three times
sudo -E ./fuel_build_loop
cp /tmp/fuel-main/build/artifacts/fuel*.iso .