From 1c5c7e756eba76e4bc2a988c3e4cd7b2a86cec85 Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Sat, 18 Jun 2016 17:49:28 +0200 Subject: [PATCH] Backport git based patching from Fuel@OPNFV. Rebase conflicting patches due to format change. Change-Id: Ia9d1f9c0cad77da7b95e8ec4b62324953ef3ce9c Signed-off-by: Alexandru Avadanii --- ...build-fuel-main-Decouple-patches-Makefile.patch | 366 +++++++++++++++++++++ .../000099-FIXME-Remove-repo-mirror-cz.patch.patch | 62 ---- .../0021-Build-bootstrap-image-for-arm64.patch | 38 +-- ...date-bootstrap-target-build-time-estimate.patch | 51 ++- ...ipts-Enable-systemd-binfmt-for-first-boot.patch | 37 +-- 5 files changed, 417 insertions(+), 137 deletions(-) create mode 100644 patches/opnfv-fuel/000098-FIXME-build-fuel-main-Decouple-patches-Makefile.patch delete mode 100644 patches/opnfv-fuel/000099-FIXME-Remove-repo-mirror-cz.patch.patch diff --git a/patches/opnfv-fuel/000098-FIXME-build-fuel-main-Decouple-patches-Makefile.patch b/patches/opnfv-fuel/000098-FIXME-build-fuel-main-Decouple-patches-Makefile.patch new file mode 100644 index 00000000..8b464b47 --- /dev/null +++ b/patches/opnfv-fuel/000098-FIXME-build-fuel-main-Decouple-patches-Makefile.patch @@ -0,0 +1,366 @@ +From: Alexandru Avadanii +Date: Sat, 18 Jun 2016 01:09:27 +0200 +Subject: [PATCH] WIP: build: fuel-main: Decouple patches, Makefile. + +FIXME: Not tested, only a discussion starter. + +Submitted upstream in Fuel@OPNFv, see change-id. + +ARMBAND changes: +Upstream removed all mirrors but usa and cz, and changed +its default to mirror.fuel-infra.org in [1]. + +This allows us to drop patching of fuel-main/config.mk +with the Czech mirror. + +If needed, USE_MIRROR=cz can be specified as an env var. + +FIXME: Remove when Fuel@OPNFV pulls change and deals with it. + +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: +- replace cz mirror patch with USE_MIRROR=cz makevar; +- 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 + +[1] https://github.com/openstack/fuel-main/commit/ + 751d502cfe15d9c9df0ee89530ac3b0b73aa1638 + +Change-Id: I5b621370993b259779c813b47105f632948e6da7 +Signed-off-by: Alexandru Avadanii +--- + build/Makefile | 17 ++-- + build/bootstrap_admin_node.sh.patch | 167 +++++++++++++++-------------------- + build/fuel-main_docker_version.patch | 20 ----- + build/isolinux.cfg.patch | 43 +++++---- + build/repo-mirror-cz.patch | 32 +++---- + 5 files changed, 113 insertions(+), 166 deletions(-) + delete mode 100644 build/fuel-main_docker_version.patch + +diff --git a/build/Makefile b/build/Makefile +index 956183c..69e5690 100644 +--- a/build/Makefile ++++ b/build/Makefile +@@ -109,9 +109,9 @@ $(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) +- # Patch for using the Czech Fuel mirror +- cd /tmp/fuel-main && patch -p0 < $(TOPDIR)/repo-mirror-cz.patch ++ @echo "fuel" `git -C /tmp/fuel-main rev-parse HEAD` >> $(VERSION_FILE) ++ # Patch for using the Czech Fuel mirror (non-committed) ++ cd /tmp/fuel-main && git apply $(TOPDIR)/repo-mirror-cz.patch + # Remove Docker optimizations, otherwise multistrap will fail during + # Fuel build. + sudo rm -f /etc/apt/apt.conf.d/docker* +@@ -135,13 +135,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 . +diff --git a/build/bootstrap_admin_node.sh.patch b/build/bootstrap_admin_node.sh.patch +index e137b74..8a2b69f 100644 +--- a/build/bootstrap_admin_node.sh.patch ++++ b/build/bootstrap_admin_node.sh.patch +@@ -1,95 +1,72 @@ +-*** bootstrap_admin_node.sh.orig Mon May 30 06:31:38 2016 +---- bootstrap_admin_node.sh Mon May 30 06:35:11 2016 +-*************** +-*** 339,346 **** +- set +x +- echo "Done!" +- +- if [[ "$showmenu" == "yes" || "$showmenu" == "YES" ]]; then +-! fuelmenu || fail +- else +- # Give user 15 seconds to enter fuelmenu or else continue +- echo +---- 339,360 ---- +- set +x +- echo "Done!" +- +-+ ### OPNFV addition BEGIN +-+ shopt -s nullglob +-+ for script in /opt/opnfv/bootstrap/pre.d/*.sh +-+ do +-+ echo "Pre script: $script" >> /root/pre.log 2>&1 +-+ $script >> /root/pre.log 2>&1 +-+ done +-+ shopt -u nullglob +-+ ### OPNFV addition END +-+ +-+ # Enable sshd +-+ systemctl enable sshd +-+ systemctl start sshd +-+ +- if [[ "$showmenu" == "yes" || "$showmenu" == "YES" ]]; then +-! fuelmenu +- else +- # Give user 15 seconds to enter fuelmenu or else continue +- echo +-*************** +-*** 360,368 **** +- fi +- fi ++From: Fuel OPNFV ++Date: Mon, 13 Jun 2016 22:23:57 +0200 ++Subject: OPNFV: Additions to bootstrap_admin_node.sh + +- # Enable online base MOS repos (security, updates) if we run an ISO installation +-! [ -f /etc/fuel_build_id ] && \ +-! yum-config-manager --enable mos${FUEL_RELEASE}-security mos${FUEL_RELEASE}-updates --save +- +- if [ ! -f "${ASTUTE_YAML}" ]; then +- echo ${fuelmenu_fail_message} +---- 360,369 ---- +- fi +- fi +- +-+ # OPNFV: Disabled to speedup installation in offline env. +- # Enable online base MOS repos (security, updates) if we run an ISO installation +-! #[ -f /etc/fuel_build_id ] && \ +-! # yum-config-manager --enable mos${FUEL_RELEASE}-security mos${FUEL_RELEASE}-updates --save +- +- if [ ! -f "${ASTUTE_YAML}" ]; then +- echo ${fuelmenu_fail_message} +-*************** +-*** 374,382 **** +- [ ! -f /etc/fuel_build_id ] && \ +- sed -i "s|127.0.0.1:8080/ubuntu/x86_64|mirror.fuel-infra.org/mos-repos/ubuntu/${FUEL_RELEASE}|g" "${ASTUTE_YAML}" +- +-! # Enable sshd +-! systemctl enable sshd +-! systemctl start sshd +- +- # Enable iptables +- systemctl enable iptables.service +---- 388,394 ---- +- [ ! -f /etc/fuel_build_id ] && \ +- sed -i "s|127.0.0.1:8080/ubuntu/x86_64|mirror.fuel-infra.org/mos-repos/ubuntu/${FUEL_RELEASE}|g" "${ASTUTE_YAML}" +- +-! systemctl reload sshd +- +- # Enable iptables +- systemctl enable iptables.service +-*************** +-*** 529,534 **** +---- 541,556 ---- +- +- bash /etc/rc.local +- +-+ ### OPNFV addition BEGIN +-+ shopt -s nullglob +-+ for script in /opt/opnfv/bootstrap/post.d/*.sh +-+ do +-+ echo "Post script: $script" >> /root/post.log 2>&1 +-+ $script >> /root/post.log 2>&1 +-+ done +-+ shopt -u nullglob +-+ ### OPNFV addition END +-+ +- if [ "`get_bootstrap_skip`" = "False" ]; then +- build_ubuntu_bootstrap bs_status || true +- else ++--- ++diff --git a/iso/bootstrap_admin_node.sh b/iso/bootstrap_admin_node.sh ++index 3197c91..e035145 100755 ++--- a/iso/bootstrap_admin_node.sh +++++ b/iso/bootstrap_admin_node.sh ++@@ -339,8 +339,22 @@ fuelmenu --save-only --iface=$ADMIN_INTERFACE || fail ++ set +x ++ echo "Done!" ++ +++### OPNFV addition BEGIN +++shopt -s nullglob +++for script in /opt/opnfv/bootstrap/pre.d/*.sh +++do +++ echo "Pre script: $script" >> /root/pre.log 2>&1 +++ $script >> /root/pre.log 2>&1 +++done +++shopt -u nullglob +++### OPNFV addition END +++ +++# Enable sshd +++systemctl enable sshd +++systemctl start sshd +++ ++ if [[ "$showmenu" == "yes" || "$showmenu" == "YES" ]]; then ++- fuelmenu || fail +++ fuelmenu ++ else ++ # Give user 15 seconds to enter fuelmenu or else continue ++ echo ++@@ -360,9 +374,10 @@ else ++ fi ++ fi ++ +++# OPNFV: Disabled to speedup installation in offline env. ++ # Enable online base MOS repos (security, updates) if we run an ISO installation ++-[ -f /etc/fuel_build_id ] && \ ++- yum-config-manager --enable mos${FUEL_RELEASE}-security mos${FUEL_RELEASE}-updates --save +++#[ -f /etc/fuel_build_id ] && \ +++# yum-config-manager --enable mos${FUEL_RELEASE}-security mos${FUEL_RELEASE}-updates --save ++ ++ if [ ! -f "${ASTUTE_YAML}" ]; then ++ echo ${fuelmenu_fail_message} ++@@ -377,7 +392,5 @@ if [ ! -f /etc/fuel_build_id ]; then ++ ++-# Enable sshd ++-systemctl enable sshd ++-systemctl start sshd +++systemctl reload sshd ++ ++ # Enable iptables ++ systemctl enable iptables.service ++@@ -532,6 +545,16 @@ systemctl start ntpd ++ ++ bash /etc/rc.local ++ +++### OPNFV addition BEGIN +++shopt -s nullglob +++for script in /opt/opnfv/bootstrap/post.d/*.sh +++do +++ echo "Post script: $script" >> /root/post.log 2>&1 +++ $script >> /root/post.log 2>&1 +++done +++shopt -u nullglob +++### OPNFV addition END +++ ++ if [ "`get_bootstrap_skip`" = "False" ]; then ++ build_ubuntu_bootstrap bs_status || true ++ else +diff --git a/build/fuel-main_docker_version.patch b/build/fuel-main_docker_version.patch +deleted file mode 100644 +index 22b5824..0000000 +--- a/build/fuel-main_docker_version.patch ++++ /dev/null +@@ -1,20 +0,0 @@ +-*** prepare-build-env.sh.orig 2016-01-11 14:55:50.615286910 +0100 +---- prepare-build-env.sh 2016-01-11 14:59:44.775308422 +0100 +-*************** +-*** 102,108 **** +- sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9 +- # Install docker +- sudo apt-get update +-! sudo apt-get -y install lxc-docker-1.5.0 +- fi +- +- # Install software +---- 102,109 ---- +- sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9 +- # Install docker +- sudo apt-get update +-! sudo sh -c 'echo DOCKER_OPTS=\"--bip 172.45.0.1/24\" > /etc/default/docker' +-! sudo apt-get -y -o Dpkg::Options::="--force-confold" install lxc-docker-1.7.1 +- fi +- +- # Install software +diff --git a/build/isolinux.cfg.patch b/build/isolinux.cfg.patch +index ebd991b..7ca7a5c 100644 +--- a/build/isolinux.cfg.patch ++++ b/build/isolinux.cfg.patch +@@ -1,24 +1,21 @@ +-*** isolinux.cfg.orig Tue May 10 10:13:21 2016 +---- isolinux.cfg Tue May 10 10:15:12 2016 +-*************** +-*** 19,27 **** +- menu label ^1. Fuel Install (Static IP) +- menu default +- kernel vmlinuz +-! append initrd=initrd.img net.ifnames=0 biosdevname=0 inst.repo=cdrom:LABEL=will_be_substituted_with_ISO_VOLUME_ID:/ inst.ks=cdrom:LABEL=will_be_substituted_with_ISO_VOLUME_ID:/ks.cfg ip=10.20.0.2::10.20.0.1:255.255.255.0:fuel.domain.tld:eth0:off::: nameserver=10.20.0.1 +- +- label nailgunifname +- menu label ^2. Fuel Advanced Install (Static IP) +- kernel vmlinuz +-! append initrd=initrd.img inst.repo=cdrom:LABEL=will_be_substituted_with_ISO_VOLUME_ID:/ inst.ks=cdrom:LABEL=will_be_substituted_with_ISO_VOLUME_ID:/ks.cfg ip=10.20.0.2::10.20.0.1:255.255.255.0:fuel.domain.tld:adminif:off::: nameserver=10.20.0.1 ifname=adminif:XX:XX:XX:XX:XX:XX +---- 19,27 ---- +- menu label ^1. Fuel Install (Static IP) +- menu default +- kernel vmlinuz +-! append initrd=initrd.img net.ifnames=0 biosdevname=0 inst.repo=cdrom:LABEL=will_be_substituted_with_ISO_VOLUME_ID:/ inst.ks=cdrom:LABEL=will_be_substituted_with_ISO_VOLUME_ID:/ks.cfg ip=10.20.0.2::10.20.0.1:255.255.255.0:fuel.domain.tld:eth0:off::: nameserver=10.20.0.1 showmenu=yes +- +- label nailgunifname +- menu label ^2. Fuel Advanced Install (Static IP) +- kernel vmlinuz +-! append initrd=initrd.img inst.repo=cdrom:LABEL=will_be_substituted_with_ISO_VOLUME_ID:/ inst.ks=cdrom:LABEL=will_be_substituted_with_ISO_VOLUME_ID:/ks.cfg ip=10.20.0.2::10.20.0.1:255.255.255.0:fuel.domain.tld:adminif:off::: nameserver=10.20.0.1 ifname=adminif:XX:XX:XX:XX:XX:XX showmenu=yes ++From: Fuel OPNFV ++Date: Mon, 13 Jun 2016 22:23:57 +0200 ++Subject: OPNFV: showmenu=yes in isolinux.cfg + ++--- ++diff --git a/iso/isolinux/isolinux.cfg b/iso/isolinux/isolinux.cfg ++index c6b1ed9..77a4b18 100644 ++--- a/iso/isolinux/isolinux.cfg +++++ b/iso/isolinux/isolinux.cfg ++@@ -19,9 +19,9 @@ label nailgun ++ menu label ^1. Fuel Install (Static IP) ++ menu default ++ kernel vmlinuz ++- append initrd=initrd.img net.ifnames=0 biosdevname=0 inst.repo=cdrom:LABEL=will_be_substituted_with_ISO_VOLUME_ID:/ inst.ks=cdrom:LABEL=will_be_substituted_with_ISO_VOLUME_ID:/ks.cfg ip=10.20.0.2::10.20.0.1:255.255.255.0:fuel.domain.tld:eth0:off::: nameserver=10.20.0.1 +++ append initrd=initrd.img net.ifnames=0 biosdevname=0 inst.repo=cdrom:LABEL=will_be_substituted_with_ISO_VOLUME_ID:/ inst.ks=cdrom:LABEL=will_be_substituted_with_ISO_VOLUME_ID:/ks.cfg ip=10.20.0.2::10.20.0.1:255.255.255.0:fuel.domain.tld:eth0:off::: nameserver=10.20.0.1 showmenu=yes ++ ++ label nailgunifname ++ menu label ^2. Fuel Advanced Install (Static IP) ++ kernel vmlinuz ++- append initrd=initrd.img inst.repo=cdrom:LABEL=will_be_substituted_with_ISO_VOLUME_ID:/ inst.ks=cdrom:LABEL=will_be_substituted_with_ISO_VOLUME_ID:/ks.cfg ip=10.20.0.2::10.20.0.1:255.255.255.0:fuel.domain.tld:adminif:off::: nameserver=10.20.0.1 ifname=adminif:XX:XX:XX:XX:XX:XX +++ append initrd=initrd.img inst.repo=cdrom:LABEL=will_be_substituted_with_ISO_VOLUME_ID:/ inst.ks=cdrom:LABEL=will_be_substituted_with_ISO_VOLUME_ID:/ks.cfg ip=10.20.0.2::10.20.0.1:255.255.255.0:fuel.domain.tld:adminif:off::: nameserver=10.20.0.1 ifname=adminif:XX:XX:XX:XX:XX:XX showmenu=yes +diff --git a/build/repo-mirror-cz.patch b/build/repo-mirror-cz.patch +index aa8eaf9..4b5643c 100644 +--- a/build/repo-mirror-cz.patch ++++ b/build/repo-mirror-cz.patch +@@ -1,19 +1,13 @@ +-*** config.mk.orig Thu Jan 7 23:30:38 2016 +---- config.mk Thu Jan 7 23:32:36 2016 +-*************** +-*** 153,159 **** +- # 'msk', 'srt', 'usa', 'hrk', 'cz' +- # Setting any other value or removing of this variable will cause +- # download of all the packages directly from internet +-! USE_MIRROR?=ext +- +- ifeq ($(USE_MIRROR),ext) +- MIRROR_FUEL?=http://mirror.fuel-infra.org/mos-repos/centos/$(PRODUCT_NAME)$(PRODUCT_VERSION)-centos$(CENTOS_MAJOR)-fuel/os/x86_64/ +---- 153,159 ---- +- # 'msk', 'srt', 'usa', 'hrk', 'cz' +- # Setting any other value or removing of this variable will cause +- # download of all the packages directly from internet +-! USE_MIRROR?=cz +- +- ifeq ($(USE_MIRROR),ext) +- MIRROR_FUEL?=http://mirror.fuel-infra.org/mos-repos/centos/$(PRODUCT_NAME)$(PRODUCT_VERSION)-centos$(CENTOS_MAJOR)-fuel/os/x86_64/ ++diff --git a/config.mk b/config.mk ++index 2a512cf..3193ecf 100644 ++--- a/config.mk +++++ b/config.mk ++@@ -133,7 +133,7 @@ LOCAL_MIRROR_UBUNTU_OS_BASEURL:=$(LOCAL_MIRROR_UBUNTU) ++ # 'msk', 'srt', 'usa', 'hrk', 'cz' ++ # Setting any other value or removing of this variable will cause ++ # download of all the packages directly from internet ++-USE_MIRROR?=ext +++USE_MIRROR?=cz ++ ++ ifeq ($(USE_MIRROR),ext) ++ MIRROR_FUEL?=http://mirror.fuel-infra.org/mos-repos/centos/$(PRODUCT_NAME)$(PRODUCT_VERSION)-centos$(CENTOS_MAJOR)/os/x86_64/ diff --git a/patches/opnfv-fuel/000099-FIXME-Remove-repo-mirror-cz.patch.patch b/patches/opnfv-fuel/000099-FIXME-Remove-repo-mirror-cz.patch.patch deleted file mode 100644 index 467e1076..00000000 --- a/patches/opnfv-fuel/000099-FIXME-Remove-repo-mirror-cz.patch.patch +++ /dev/null @@ -1,62 +0,0 @@ -From: Alexandru Avadanii -Date: Wed, 1 Jun 2016 21:44:49 +0200 -Subject: [PATCH] FIXME: Remove repo-mirror-cz.patch. - -Upstream removed all mirrors but usa and cz, and changed -its default to mirror.fuel-infra.org in [1]. - -This allows us to drop patching of fuel-main/config.mk -with the Czech mirror. - -If needed, USE_MIRROR=cz can be specified as an env var. - -FIXME: Remove when Fuel@OPNFV pulls change and deals with it. - -[1] https://github.com/openstack/fuel-main/commit/ - 751d502cfe15d9c9df0ee89530ac3b0b73aa1638 - -Signed-off-by: Alexandru Avadanii ---- - build/Makefile | 2 -- - build/repo-mirror-cz.patch | 19 ------------------- - 2 files changed, 21 deletions(-) - delete mode 100644 build/repo-mirror-cz.patch - -diff --git a/build/Makefile b/build/Makefile -index e84edcd..211177d 100644 ---- a/build/Makefile -+++ b/build/Makefile -@@ -106,8 +106,6 @@ $(ISOCACHE): - 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) -- # Patch for using the Czech Fuel mirror -- cd /tmp/fuel-main && patch -p0 < $(TOPDIR)/repo-mirror-cz.patch - # Remove Docker optimizations, otherwise multistrap will fail during - # Fuel build. - sudo rm -f /etc/apt/apt.conf.d/docker* -diff --git a/build/repo-mirror-cz.patch b/build/repo-mirror-cz.patch -deleted file mode 100644 -index aa8eaf9..0000000 ---- a/build/repo-mirror-cz.patch -+++ /dev/null -@@ -1,19 +0,0 @@ --*** config.mk.orig Thu Jan 7 23:30:38 2016 ----- config.mk Thu Jan 7 23:32:36 2016 --*************** --*** 153,159 **** -- # 'msk', 'srt', 'usa', 'hrk', 'cz' -- # Setting any other value or removing of this variable will cause -- # download of all the packages directly from internet --! USE_MIRROR?=ext -- -- ifeq ($(USE_MIRROR),ext) -- MIRROR_FUEL?=http://mirror.fuel-infra.org/mos-repos/centos/$(PRODUCT_NAME)$(PRODUCT_VERSION)-centos$(CENTOS_MAJOR)-fuel/os/x86_64/ ----- 153,159 ---- -- # 'msk', 'srt', 'usa', 'hrk', 'cz' -- # Setting any other value or removing of this variable will cause -- # download of all the packages directly from internet --! USE_MIRROR?=cz -- -- ifeq ($(USE_MIRROR),ext) -- MIRROR_FUEL?=http://mirror.fuel-infra.org/mos-repos/centos/$(PRODUCT_NAME)$(PRODUCT_VERSION)-centos$(CENTOS_MAJOR)-fuel/os/x86_64/ diff --git a/patches/opnfv-fuel/0021-Build-bootstrap-image-for-arm64.patch b/patches/opnfv-fuel/0021-Build-bootstrap-image-for-arm64.patch index 42218ad1..f66777c7 100644 --- a/patches/opnfv-fuel/0021-Build-bootstrap-image-for-arm64.patch +++ b/patches/opnfv-fuel/0021-Build-bootstrap-image-for-arm64.patch @@ -10,30 +10,18 @@ per supported arch. This requires Fuel refactoring. 1 file changed, 17 insertions(+) diff --git a/build/bootstrap_admin_node.sh.patch b/build/bootstrap_admin_node.sh.patch -index aeef3f7..c66b497 100644 --- a/build/bootstrap_admin_node.sh.patch +++ b/build/bootstrap_admin_node.sh.patch -@@ -53,6 +53,23 @@ - # Enable iptables - systemctl enable iptables.service - *************** -+*** 484,490 **** -+ local ret=1 -+ echo ${bs_progress_message} >&2 -+ set_ui_bootstrap_error "${bs_progress_message}" >&2 -+! if fuel-bootstrap -v --debug build --activate >>"$bs_build_log" 2>&1; then -+ ret=0 -+ fuel notify --topic "done" --send "${bs_done_message}" -+ else -+--- 484,490 ---- -+ local ret=1 -+ echo ${bs_progress_message} >&2 -+ set_ui_bootstrap_error "${bs_progress_message}" >&2 -+! if fuel-bootstrap -v --debug build --target_arch arm64 --activate >>"$bs_build_log" 2>&1; then -+ ret=0 -+ fuel notify --topic "done" --send "${bs_done_message}" -+ else -+*************** - *** 529,534 **** - --- 541,556 ---- - +@@ -53,3 +53,12 @@ + # Enable iptables + systemctl enable iptables.service ++@@ -484,7 +490,7 @@ ++ local ret=1 ++ echo ${bs_progress_message} >&2 ++ set_ui_bootstrap_error "${bs_progress_message}" >&2 ++- if fuel-bootstrap -v --debug build --activate >>"$bs_build_log" 2>&1; then +++ if fuel-bootstrap -v --debug build --target_arch arm64 --activate >>"$bs_build_log" 2>&1; then ++ ret=0 ++ fuel notify --topic "done" --send "${bs_done_message}" ++ else + @@ -532,6 +545,16 @@ systemctl start ntpd diff --git a/patches/opnfv-fuel/0027-UX-Update-bootstrap-target-build-time-estimate.patch b/patches/opnfv-fuel/0027-UX-Update-bootstrap-target-build-time-estimate.patch index 66ac65e8..4023264c 100644 --- a/patches/opnfv-fuel/0027-UX-Update-bootstrap-target-build-time-estimate.patch +++ b/patches/opnfv-fuel/0027-UX-Update-bootstrap-target-build-time-estimate.patch @@ -15,33 +15,24 @@ diff --git a/build/bootstrap_admin_node.sh.patch b/build/bootstrap_admin_node.sh index c66b497..46b53e6 100644 --- a/build/bootstrap_admin_node.sh.patch +++ b/build/bootstrap_admin_node.sh.patch -@@ -1,6 +1,29 @@ - *** bootstrap_admin_node.sh.orig Mon May 30 06:31:38 2016 - --- bootstrap_admin_node.sh Mon May 30 06:35:11 2016 - *************** -+*** 86,94 **** -+ http://docs.openstack.org/developer/fuel-docs/userdocs/fuel-install-guide/bootstrap/\ -+ bootstrap_troubleshoot.html" -+ bs_progress_message="There is no active bootstrap. Bootstrap image building \ -+! is in progress. Usually it takes 15-20 minutes. It depends on your internet \ -+! connection and hardware performance. After bootstrap image becomes available, \ -+! reboot nodes that failed to be discovered." -+ bs_done_message="Default bootstrap image building done. Now you can boot new \ -+ nodes over PXE, they will be discovered and become available for installing \ -+ OpenStack on them" -+--- 86,96 ---- -+ http://docs.openstack.org/developer/fuel-docs/userdocs/fuel-install-guide/bootstrap/\ -+ bootstrap_troubleshoot.html" -+ bs_progress_message="There is no active bootstrap. Bootstrap image building \ -+! is in progress. Usually it takes 15-20 minutes for a native build (x86_64) \ -+! and/or 30-45 minutes for each cross-build (e.g. AArch64). \ -+! It depends on your internet connection, hardware performance and selected \ -+! bootstrap architecture(s). This ISO supports AArch64 only. After bootstrap \ -+! image becomes available, reboot nodes that failed to be discovered." -+ bs_done_message="Default bootstrap image building done. Now you can boot new \ -+ nodes over PXE, they will be discovered and become available for installing \ -+ OpenStack on them" -+*************** - *** 339,346 **** - set +x - echo "Done!" +@@ -8,5 +8,20 @@ + --- a/iso/bootstrap_admin_node.sh + +++ b/iso/bootstrap_admin_node.sh ++@@ -86,9 +86,11 @@ ++ http://docs.openstack.org/developer/fuel-docs/userdocs/fuel-install-guide/bootstrap/\ ++ bootstrap_troubleshoot.html" ++ bs_progress_message="There is no active bootstrap. Bootstrap image building \ ++-is in progress. Usually it takes 15-20 minutes. It depends on your internet \ ++-connection and hardware performance. After bootstrap image becomes available, \ ++-reboot nodes that failed to be discovered." +++is in progress. Usually it takes 15-20 minutes for a native build (x86_64) \ +++and/or 30-45 minutes for each cross-build (e.g. AArch64). \ +++It depends on your internet connection, hardware performance and selected \ +++bootstrap architecture(s). This ISO supports AArch64 only. After bootstrap \ +++image becomes available, reboot nodes that failed to be discovered." ++ bs_done_message="Default bootstrap image building done. Now you can boot new \ ++ nodes over PXE, they will be discovered and become available for installing \ ++ OpenStack on them" + @@ -339,8 +339,22 @@ fuelmenu --save-only --iface=$ADMIN_INTERFACE || fail + set +x + echo "Done!" diff --git a/patches/opnfv-fuel/0031-post-scripts-Enable-systemd-binfmt-for-first-boot.patch b/patches/opnfv-fuel/0031-post-scripts-Enable-systemd-binfmt-for-first-boot.patch index e3100962..6d55311c 100644 --- a/patches/opnfv-fuel/0031-post-scripts-Enable-systemd-binfmt-for-first-boot.patch +++ b/patches/opnfv-fuel/0031-post-scripts-Enable-systemd-binfmt-for-first-boot.patch @@ -34,28 +34,25 @@ diff --git a/build/bootstrap_admin_node.sh.patch b/build/bootstrap_admin_node.sh index b1ea90b..7f16d0b 100644 --- a/build/bootstrap_admin_node.sh.patch +++ b/build/bootstrap_admin_node.sh.patch -@@ -24,6 +24,21 @@ - nodes over PXE, they will be discovered and become available for installing \ - OpenStack on them" - *************** -+*** 239,244 **** -+--- 239,250 ---- -+ # /etc/fuel_openstack_version is provided by 'fuel-openstack-metadata' package -+ OPENSTACK_VERSION=$(cat /etc/fuel_openstack_version) +@@ -24,5 +24,18 @@ + nodes over PXE, they will be discovered and become available for installing \ + OpenStack on them" ++@@ -239,6 +239,12 @@ ++ # /etc/fuel_openstack_version is provided by 'fuel-openstack-metadata' package ++ OPENSTACK_VERSION=$(cat /etc/fuel_openstack_version) + -++ # FIXME(armband): This part might be moved to an earlier stage later -++ # /etc/fuel_openstack_arch is constructed based on local mirror metadata -++ grep -oP "^Architectures: \K.*$" \ -++ ${wwwdir}/${OPENSTACK_VERSION}/ubuntu/x86_64/dists/mos${FUEL_RELEASE}/Release > \ -++ /etc/fuel_openstack_arch +++# FIXME(armband): This part might be moved to an earlier stage later +++# /etc/fuel_openstack_arch is constructed based on local mirror metadata +++grep -oP "^Architectures: \K.*$" \ +++ ${wwwdir}/${OPENSTACK_VERSION}/ubuntu/x86_64/dists/mos${FUEL_RELEASE}/Release > \ +++ /etc/fuel_openstack_arch ++ -+ # We do not ship debian-installer kernel and initrd on ISO. -+ # But we still need to be able to create ubuntu cobbler distro -+ # which requires kernel and initrd to be available. So, we -+*************** - *** 339,346 **** - set +x - echo "Done!" ++ # We do not ship debian-installer kernel and initrd on ISO. ++ # But we still need to be able to create ubuntu cobbler distro ++ # which requires kernel and initrd to be available. So, we + @@ -339,8 +339,22 @@ fuelmenu --save-only --iface=$ADMIN_INTERFACE || fail + set +x + echo "Done!" diff --git a/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh b/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh new file mode 100755 index 0000000..d33d1d1 -- 2.16.6