aboutsummaryrefslogtreecommitdiffstats
path: root/build/config.mk
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2016-09-24 17:27:16 +0200
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2016-10-05 21:44:58 +0200
commit6de5bac371844b70b96b9bd75b62b8d06e5f51fc (patch)
tree7105db6f62d236c91130d47283842aa4a6f16156 /build/config.mk
parent49f066e78e52fde9ce0d467a838211270f518591 (diff)
build: Use git submodules for Fuel git repos
This change reworks support for cloning (fetching) and patching all Fuel components (fuel-library ... fuel-ui, see [1] for full list), both outside the ISO build process (for development purposes, like testing OPNFV patches apply cleanly to each component), and during the ISO build. The implementation relies heavily on git submodules and patches, so backporting pending upstream gerrit changes, as well as adding new out-of-upstream-tree patches, should be trivial. Also, since without tracking remotes the repos rarely change, leverage the in-place OPNFV build caching mechanism to drastically reduce the number of git clones during each build. The mechanism is detailed more in-depth in the JIRA ticket [3], and it's merely a rehash of the submodule handling in Armband, implemented initially by Stanislaw Kardach <stanislaw.kardach@cavium.com>. Pros (+ new features): - OPNFV patches for Fuel components can be applied (imported) or developed (exported) outside of the ISO build process; - git repo caching reduces the number of external pulls; - reuse the same fuel-* componets in ALL targets e.g. fuel-mirror used to employ 2 slightly different git trees; - one step closer to Fuel/Armband merge (lots of steps left though); Cons: - adds a lot complexity to solve a non-problem (handling the repos is fine in the current form, for the current goals); However, patching <fuel-astute> or <fuel-agent> seems to be quite complicated with the current mechanism, as env vars override our locally patched repos for these components). The proposed change should eliminate this issue completely. CHANGE: Aligned divergent fuel-mirror in ISO vs local repo build by applying the 302 redirect fix ("Fixed handling http redirects") [2] on top of 9.0.1 tag in fuel-mirror repo, and using that for both. This obsoleted the followking mk file: - build/f_isoroot/f_repobuild/config.mk CHANGE: Removed unused make target `get-fuel-repo` from build/config.mk. FIXME: Remote tracking is currently deactivated for all branches. Change this when remote HEAD should be tracked instead, e.g. during Newton rebase. [1] https://github.com/openstack/fuel-main/blob/stable/mitaka/repos.mk#L32 [2] https://review.openstack.org/#/c/334882/ [3] https://jira.opnfv.org/browse/FUEL-200 TODO: Extend build/f_repos/README.md with info about: - branch changes; - tag bumps; - patching now supports subdirs; v5 -> v6: * Added support for nesting patches in subdirs, to be used for feature groups and related changes across submodules. E.g. Upcoming multiarch EFI support could go in: - .../f_repos/patch/fuel-agent/multiarch-efi/...; - .../f_repos/patch/fuel-astute/multiarch-efi/...; While Armband patches could go in: - .../f_repos/patch/fuel-agent/armband/...; - .../f_repos/patch/fuel-astute/armband/...; etc. v6 -> v13: * fix wrong tag used for VERSION dump; * fix wrong tag used for patches-export; * move OPNFV_TAG to main config.mk and use it in FUEL_*_COMMIT; * only run `patches-import` when patches changed / not yet applied; * only run `clean` for stale `.cacheid` (avoid re-applying patches); * allow git submodule path/name to be different (FIXED); * put-cache should only run when artifact is not already cached; * `git am`: use 3-way merge so already applied patches are gently skipped (useful for upstreaming patches from Armband); * Properly support nested patch dirs; * Colorize the output a little; JIRA: FUEL-200 Change-Id: I9dbdd9b3022896d4497d21be8dacc859730db489 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'build/config.mk')
-rw-r--r--build/config.mk75
1 files changed, 50 insertions, 25 deletions
diff --git a/build/config.mk b/build/config.mk
index f78043e18..ab30518b5 100644
--- a/build/config.mk
+++ b/build/config.mk
@@ -1,5 +1,5 @@
##############################################################################
-# Copyright (c) 2015 Ericsson AB and others.
+# Copyright (c) 2015,2016 Ericsson AB and others.
# stefan.k.berg@ericsson.com
# jonas.bjurel@ericsson.com
# All rights reserved. This program and the accompanying materials
@@ -8,34 +8,59 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-FUEL_MAIN_REPO := https://github.com/openstack/fuel-main
-FUEL_MAIN_TAG := 9.0.1
-MOS_VERSION = 9.0
+# fuel-main tag checked out from upstream `fuel-main` repo before patching it
+FUEL_MAIN_TAG = 9.0.1
+MOS_VERSION = 9.0
OPENSTACK_VERSION = mitaka-9.0
-# Pinning down exact Fuel repo versions for Fuel 9.0.1
-export FUELLIB_COMMIT?=e283b62750d9e26355981b3ad3be7c880944ae0f
-export NAILGUN_COMMIT?=e2b85bafb68c348f25cb7cceda81edc668ba2e64
-export PYTHON_FUELCLIENT_COMMIT?=67d8c693a670d27c239d5d175f3ea2a0512c498c
-export FUEL_AGENT_COMMIT?=7ffbf39caf5845bd82b8ce20a7766cf24aa803fb
-export FUEL_NAILGUN_AGENT_COMMIT?=46fa0db0f8944f9e67699d281d462678aaf4db26
-export ASTUTE_COMMIT?=390b257240d49cc5e94ed5c4fcd940b5f2f6ec64
-export OSTF_COMMIT?=f09c98ff7cc71ee612b2450f68a19f2f9c64345a
-export FUEL_MIRROR_COMMIT?=d1ef06b530ce2149230953bb3810a88ecaff870c
-export FUELMENU_COMMIT?=0ed9e206ed1c6271121d3acf52a6bf757411286b
-export SHOTGUN_COMMIT?=781a8cfa0b6eb290e730429fe2792f2b6f5e0c11
-export NETWORKCHECKER_COMMIT?=fcb47dd095a76288aacf924de574e39709e1f3ca
-export FUELUPGRADE_COMMIT?=c1c4bac6a467145ac4fac73e4a7dd2b00380ecfb
-export FUEL_UI_COMMIT?=90de7ef4477230cb7335453ed26ed4306ca6f04f
-
-# for the patches applying purposes
+# FIXME(alav): Disable remote tracking for now, stick to submodule commits
+FUEL_TRACK_REMOTES =
+
+##############################################################################
+# Fuel components pinning / remote tracking; use submodules from f_repos
+##############################################################################
+
+# git submodule & patch locations for Fuel components
+F_GIT_ROOT := $(shell git rev-parse --show-toplevel)
+F_SUBMOD_DIR := ${F_GIT_ROOT}/build/f_repos/sub
+F_PATCH_DIR := ${F_GIT_ROOT}/build/f_repos/patch
+F_OPNFV_TAG := ${FUEL_MAIN_TAG}-opnfv
+
+# fuel-main repo location used by main Makefile ISO building, use submodule
+FUEL_MAIN_REPO := ${F_SUBMOD_DIR}/fuel-main
+
+export FUELLIB_REPO?=${F_SUBMOD_DIR}/fuel-library
+export NAILGUN_REPO?=${F_SUBMOD_DIR}/fuel-web
+export PYTHON_FUELCLIENT_REPO?=${F_SUBMOD_DIR}/python-fuelclient
+export FUEL_AGENT_REPO?=${F_SUBMOD_DIR}/fuel-agent
+export FUEL_NAILGUN_AGENT_REPO?=${F_SUBMOD_DIR}/fuel-nailgun-agent
+export ASTUTE_REPO?=${F_SUBMOD_DIR}/fuel-astute
+export OSTF_REPO?=${F_SUBMOD_DIR}/fuel-ostf
+export FUEL_MIRROR_REPO?=${F_SUBMOD_DIR}/fuel-mirror
+export FUELMENU_REPO?=${F_SUBMOD_DIR}/fuel-menu
+export SHOTGUN_REPO?=${F_SUBMOD_DIR}/shotgun
+export NETWORKCHECKER_REPO?=${F_SUBMOD_DIR}/network-checker
+export FUELUPGRADE_REPO?=${F_SUBMOD_DIR}/fuel-upgrade
+export FUEL_UI_REPO?=${F_SUBMOD_DIR}/fuel-ui
+
+# OPNFV tags are automatically applied by `make -C f_repos patches-import`
+export FUELLIB_COMMIT?=${F_OPNFV_TAG}
+export NAILGUN_COMMIT?=${F_OPNFV_TAG}
+export PYTHON_FUELCLIENT_COMMIT?=${F_OPNFV_TAG}
+export FUEL_AGENT_COMMIT?=${F_OPNFV_TAG}
+export FUEL_NAILGUN_AGENT_COMMIT?=${F_OPNFV_TAG}
+export ASTUTE_COMMIT?=${F_OPNFV_TAG}
+export OSTF_COMMIT?=${F_OPNFV_TAG}
+export FUEL_MIRROR_COMMIT?=${F_OPNFV_TAG}
+export FUELMENU_COMMIT?=${F_OPNFV_TAG}
+export SHOTGUN_COMMIT?=${F_OPNFV_TAG}
+export NETWORKCHECKER_COMMIT?=${F_OPNFV_TAG}
+export FUELUPGRADE_COMMIT?=${F_OPNFV_TAG}
+export FUEL_UI_COMMIT?=${F_OPNFV_TAG}
+
+# for the patches applying purposes (empty git config in docker build container)
export GIT_COMMITTER_NAME?=Fuel OPNFV
export GIT_COMMITTER_EMAIL?=fuel@opnfv.org
DOCKER_REPO := http://get.docker.com/builds/Linux/x86_64
DOCKER_TAG := docker-latest
-
-.PHONY: get-fuel-repo
-get-fuel-repo:
- @echo $(FUEL_MAIN_REPO) $(FUEL_MAIN_TAG)
-