From 6de5bac371844b70b96b9bd75b62b8d06e5f51fc Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Sat, 24 Sep 2016 17:27:16 +0200 Subject: 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 . 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 or 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 --- build/f_repos/sub/fuel-agent | 1 + build/f_repos/sub/fuel-astute | 1 + build/f_repos/sub/fuel-library | 1 + build/f_repos/sub/fuel-main | 1 + build/f_repos/sub/fuel-menu | 1 + build/f_repos/sub/fuel-mirror | 1 + build/f_repos/sub/fuel-nailgun-agent | 1 + build/f_repos/sub/fuel-ostf | 1 + build/f_repos/sub/fuel-ui | 1 + build/f_repos/sub/fuel-upgrade | 1 + build/f_repos/sub/fuel-web | 1 + build/f_repos/sub/network-checker | 1 + build/f_repos/sub/python-fuelclient | 1 + build/f_repos/sub/shotgun | 1 + 14 files changed, 14 insertions(+) create mode 160000 build/f_repos/sub/fuel-agent create mode 160000 build/f_repos/sub/fuel-astute create mode 160000 build/f_repos/sub/fuel-library create mode 160000 build/f_repos/sub/fuel-main create mode 160000 build/f_repos/sub/fuel-menu create mode 160000 build/f_repos/sub/fuel-mirror create mode 160000 build/f_repos/sub/fuel-nailgun-agent create mode 160000 build/f_repos/sub/fuel-ostf create mode 160000 build/f_repos/sub/fuel-ui create mode 160000 build/f_repos/sub/fuel-upgrade create mode 160000 build/f_repos/sub/fuel-web create mode 160000 build/f_repos/sub/network-checker create mode 160000 build/f_repos/sub/python-fuelclient create mode 160000 build/f_repos/sub/shotgun (limited to 'build/f_repos/sub') diff --git a/build/f_repos/sub/fuel-agent b/build/f_repos/sub/fuel-agent new file mode 160000 index 000000000..7ffbf39ca --- /dev/null +++ b/build/f_repos/sub/fuel-agent @@ -0,0 +1 @@ +Subproject commit 7ffbf39caf5845bd82b8ce20a7766cf24aa803fb diff --git a/build/f_repos/sub/fuel-astute b/build/f_repos/sub/fuel-astute new file mode 160000 index 000000000..390b25724 --- /dev/null +++ b/build/f_repos/sub/fuel-astute @@ -0,0 +1 @@ +Subproject commit 390b257240d49cc5e94ed5c4fcd940b5f2f6ec64 diff --git a/build/f_repos/sub/fuel-library b/build/f_repos/sub/fuel-library new file mode 160000 index 000000000..e283b6275 --- /dev/null +++ b/build/f_repos/sub/fuel-library @@ -0,0 +1 @@ +Subproject commit e283b62750d9e26355981b3ad3be7c880944ae0f diff --git a/build/f_repos/sub/fuel-main b/build/f_repos/sub/fuel-main new file mode 160000 index 000000000..d6a22557d --- /dev/null +++ b/build/f_repos/sub/fuel-main @@ -0,0 +1 @@ +Subproject commit d6a22557d132c592b18c6bac90f5f4b8d1aa3ad7 diff --git a/build/f_repos/sub/fuel-menu b/build/f_repos/sub/fuel-menu new file mode 160000 index 000000000..0ed9e206e --- /dev/null +++ b/build/f_repos/sub/fuel-menu @@ -0,0 +1 @@ +Subproject commit 0ed9e206ed1c6271121d3acf52a6bf757411286b diff --git a/build/f_repos/sub/fuel-mirror b/build/f_repos/sub/fuel-mirror new file mode 160000 index 000000000..d1ef06b53 --- /dev/null +++ b/build/f_repos/sub/fuel-mirror @@ -0,0 +1 @@ +Subproject commit d1ef06b530ce2149230953bb3810a88ecaff870c diff --git a/build/f_repos/sub/fuel-nailgun-agent b/build/f_repos/sub/fuel-nailgun-agent new file mode 160000 index 000000000..46fa0db0f --- /dev/null +++ b/build/f_repos/sub/fuel-nailgun-agent @@ -0,0 +1 @@ +Subproject commit 46fa0db0f8944f9e67699d281d462678aaf4db26 diff --git a/build/f_repos/sub/fuel-ostf b/build/f_repos/sub/fuel-ostf new file mode 160000 index 000000000..f09c98ff7 --- /dev/null +++ b/build/f_repos/sub/fuel-ostf @@ -0,0 +1 @@ +Subproject commit f09c98ff7cc71ee612b2450f68a19f2f9c64345a diff --git a/build/f_repos/sub/fuel-ui b/build/f_repos/sub/fuel-ui new file mode 160000 index 000000000..90de7ef44 --- /dev/null +++ b/build/f_repos/sub/fuel-ui @@ -0,0 +1 @@ +Subproject commit 90de7ef4477230cb7335453ed26ed4306ca6f04f diff --git a/build/f_repos/sub/fuel-upgrade b/build/f_repos/sub/fuel-upgrade new file mode 160000 index 000000000..c1c4bac6a --- /dev/null +++ b/build/f_repos/sub/fuel-upgrade @@ -0,0 +1 @@ +Subproject commit c1c4bac6a467145ac4fac73e4a7dd2b00380ecfb diff --git a/build/f_repos/sub/fuel-web b/build/f_repos/sub/fuel-web new file mode 160000 index 000000000..e2b85bafb --- /dev/null +++ b/build/f_repos/sub/fuel-web @@ -0,0 +1 @@ +Subproject commit e2b85bafb68c348f25cb7cceda81edc668ba2e64 diff --git a/build/f_repos/sub/network-checker b/build/f_repos/sub/network-checker new file mode 160000 index 000000000..fcb47dd09 --- /dev/null +++ b/build/f_repos/sub/network-checker @@ -0,0 +1 @@ +Subproject commit fcb47dd095a76288aacf924de574e39709e1f3ca diff --git a/build/f_repos/sub/python-fuelclient b/build/f_repos/sub/python-fuelclient new file mode 160000 index 000000000..67d8c693a --- /dev/null +++ b/build/f_repos/sub/python-fuelclient @@ -0,0 +1 @@ +Subproject commit 67d8c693a670d27c239d5d175f3ea2a0512c498c diff --git a/build/f_repos/sub/shotgun b/build/f_repos/sub/shotgun new file mode 160000 index 000000000..781a8cfa0 --- /dev/null +++ b/build/f_repos/sub/shotgun @@ -0,0 +1 @@ +Subproject commit 781a8cfa0b6eb290e730429fe2792f2b6f5e0c11 -- cgit 1.2.3-korg