4c5a721479a95ef0cb606eb6b2a1abded90b6f7f
[pti/rtp.git] /
1 From 1671972d0f1bfeed4ac2243cefd90ca169f334a9 Mon Sep 17 00:00:00 2001
2 From: Jackie Huang <jackie.huang@windriver.com>
3 Date: Wed, 12 Jul 2023 10:32:54 +0800
4 Subject: [PATCH 1/2] puppet-manifests: fix the hardcoded kernel name
5
6 The kernel names in puppet-update-grub-env.py is hardcoded
7 as amd64, use dpkg-architecture to check host arch and
8 replace the hardcoded names.
9
10 Test Plan:
11 PASS: build-pkgs on x86-64 host
12 PASS: build-image on x86-64 host
13 PASS: build-pkgs on arm64 host
14 PASS: build-image on arm64 host
15 PASS: install AIO-SX on x86-64 targets
16 PASS: install AIO-SX on arm64 targets
17
18 Story: 2010739
19 Task: 48284
20
21 Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
22 Change-Id: I1df220f585f53e58f2fcd8f6918273f8ea45fb90
23 ---
24  puppet-manifests/debian/deb_folder/rules | 5 +++++
25  1 file changed, 5 insertions(+)
26
27 diff --git a/puppet-manifests/debian/deb_folder/rules b/puppet-manifests/debian/deb_folder/rules
28 index ec2bca6c..f5ba9a01 100755
29 --- a/puppet-manifests/debian/deb_folder/rules
30 +++ b/puppet-manifests/debian/deb_folder/rules
31 @@ -1,6 +1,8 @@
32  #!/usr/bin/make -f
33  #export DH_VERBOSE = 1
34  
35 +export DEB_HOST_ARCH = $(shell dpkg-architecture -qDEB_HOST_ARCH 2>/dev/null)
36 +
37  %:
38         dh $@
39  
40 @@ -10,6 +12,9 @@ override_dh_usrlocal:
41         echo "Do Nothing"
42  
43  override_dh_install:
44 +ifeq ($(DEB_HOST_ARCH),arm64)
45 +       sed -i "s/amd64/arm64/" $(CURDIR)/bin/puppet-update-grub-env.py
46 +endif
47         $(MAKE) install hiera_v5=true ignore_puppet_warnings=true \
48                 BINDIR=$(CURDIR)/debian/tmp/usr/local/bin \
49                 CONFIGDIR=$(CURDIR)/debian/tmp/etc/puppet \
50 -- 
51 2.30.2
52