patches-arm: add patches based on stx.9.0 for stx-puppet 28/13828/1
authorJackie Huang <jackie.huang@windriver.com>
Mon, 9 Dec 2024 02:26:33 +0000 (10:26 +0800)
committerJackie Huang <jackie.huang@windriver.com>
Mon, 9 Dec 2024 04:45:05 +0000 (12:45 +0800)
Add patches based on stx.9.0 for stx-puppet repo:
https://opendev.org/starlingx/stx-puppet.git

Issue-ID: INF-481

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Change-Id: Ia412465e35d0d90fdb6ce35a20a890432a5d0c2a

scripts/build_inf_debian/meta-patches-arm/stx90/cgcs-root/stx/stx-puppet/0001-puppet-manifests-fix-the-hardcoded-kernel-name.patch [new file with mode: 0644]
scripts/build_inf_debian/meta-patches-arm/stx90/cgcs-root/stx/stx-puppet/0002-puppet-manifests-add-arm64-support-for-etcd.patch [new file with mode: 0644]

diff --git a/scripts/build_inf_debian/meta-patches-arm/stx90/cgcs-root/stx/stx-puppet/0001-puppet-manifests-fix-the-hardcoded-kernel-name.patch b/scripts/build_inf_debian/meta-patches-arm/stx90/cgcs-root/stx/stx-puppet/0001-puppet-manifests-fix-the-hardcoded-kernel-name.patch
new file mode 100644 (file)
index 0000000..4c5a721
--- /dev/null
@@ -0,0 +1,52 @@
+From 1671972d0f1bfeed4ac2243cefd90ca169f334a9 Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Wed, 12 Jul 2023 10:32:54 +0800
+Subject: [PATCH 1/2] puppet-manifests: fix the hardcoded kernel name
+
+The kernel names in puppet-update-grub-env.py is hardcoded
+as amd64, use dpkg-architecture to check host arch and
+replace the hardcoded names.
+
+Test Plan:
+PASS: build-pkgs on x86-64 host
+PASS: build-image on x86-64 host
+PASS: build-pkgs on arm64 host
+PASS: build-image on arm64 host
+PASS: install AIO-SX on x86-64 targets
+PASS: install AIO-SX on arm64 targets
+
+Story: 2010739
+Task: 48284
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+Change-Id: I1df220f585f53e58f2fcd8f6918273f8ea45fb90
+---
+ puppet-manifests/debian/deb_folder/rules | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/puppet-manifests/debian/deb_folder/rules b/puppet-manifests/debian/deb_folder/rules
+index ec2bca6c..f5ba9a01 100755
+--- a/puppet-manifests/debian/deb_folder/rules
++++ b/puppet-manifests/debian/deb_folder/rules
+@@ -1,6 +1,8 @@
+ #!/usr/bin/make -f
+ #export DH_VERBOSE = 1
++export DEB_HOST_ARCH = $(shell dpkg-architecture -qDEB_HOST_ARCH 2>/dev/null)
++
+ %:
+       dh $@
+@@ -10,6 +12,9 @@ override_dh_usrlocal:
+       echo "Do Nothing"
+ override_dh_install:
++ifeq ($(DEB_HOST_ARCH),arm64)
++      sed -i "s/amd64/arm64/" $(CURDIR)/bin/puppet-update-grub-env.py
++endif
+       $(MAKE) install hiera_v5=true ignore_puppet_warnings=true \
+               BINDIR=$(CURDIR)/debian/tmp/usr/local/bin \
+               CONFIGDIR=$(CURDIR)/debian/tmp/etc/puppet \
+-- 
+2.30.2
+
diff --git a/scripts/build_inf_debian/meta-patches-arm/stx90/cgcs-root/stx/stx-puppet/0002-puppet-manifests-add-arm64-support-for-etcd.patch b/scripts/build_inf_debian/meta-patches-arm/stx90/cgcs-root/stx/stx-puppet/0002-puppet-manifests-add-arm64-support-for-etcd.patch
new file mode 100644 (file)
index 0000000..2366891
--- /dev/null
@@ -0,0 +1,40 @@
+From 1b3c2bf1aa20eb17cbafd54e85e7afe806a91aaf Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Wed, 12 Jul 2023 10:32:54 +0800
+Subject: [PATCH 2/2] puppet-manifests: add arm64 support for etcd
+
+Add environmnet ETCD_UNSUPPORTED_ARCH=arm64 for etcd
+so it will workaround the unsupported warning.
+
+Test Plan:
+PASS: build-pkgs on x86-64 host
+PASS: build-image on x86-64 host
+PASS: build-pkgs on arm64 host
+PASS: build-image on arm64 host
+PASS: install AIO-SX on x86-64 targets
+PASS: install AIO-SX on arm64 targets
+
+Story: 2010739
+Task: 48284
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ puppet-manifests/debian/deb_folder/rules | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/puppet-manifests/debian/deb_folder/rules b/puppet-manifests/debian/deb_folder/rules
+index f5ba9a01..081e869c 100755
+--- a/puppet-manifests/debian/deb_folder/rules
++++ b/puppet-manifests/debian/deb_folder/rules
+@@ -14,6 +14,8 @@ override_dh_usrlocal:
+ override_dh_install:
+ ifeq ($(DEB_HOST_ARCH),arm64)
+       sed -i "s/amd64/arm64/" $(CURDIR)/bin/puppet-update-grub-env.py
++      sed -i '/EnvironmentFile/a Environment="ETCD_UNSUPPORTED_ARCH=arm64"' \
++              $(CURDIR)/modules/platform/templates/etcd-override.conf.erb
+ endif
+       $(MAKE) install hiera_v5=true ignore_puppet_warnings=true \
+               BINDIR=$(CURDIR)/debian/tmp/usr/local/bin \
+-- 
+2.30.2
+