Remove hardcoded x86_64 strings.
Installer: support for aarch64 efi boot
Change-Id: Id7b5d978531d801d8b6f390674cb987e169b838a
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/3991
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Vinay Kulkarni <kulkarniv@vmware.com>
Reviewed-by: Rui Gu <ruig@vmware.com>
Reviewed-by: Anish Swaminathan <anishs@vmware.com>
... | ... |
@@ -336,9 +336,9 @@ tool-chain-stage2: check-tools $(PHOTON_STAGE) $(PHOTON_PUBLISH_RPMS) $(PHOTON_S |
336 | 336 |
packages-cached: |
337 | 337 |
@echo "Using cached RPMS..." |
338 | 338 |
@$(RM) -f $(PHOTON_RPMS_DIR_NOARCH)/* && \ |
339 |
- $(RM) -f $(PHOTON_RPMS_DIR_X86_64)/* && \ |
|
339 |
+ $(RM) -f $(PHOTON_RPMS_DIR_ARCH)/* && \ |
|
340 | 340 |
$(CP) -f $(PHOTON_CACHE_PATH)/RPMS/noarch/* $(PHOTON_RPMS_DIR_NOARCH)/ && \ |
341 |
- $(CP) -f $(PHOTON_CACHE_PATH)/RPMS/x86_64/* $(PHOTON_RPMS_DIR_X86_64)/ |
|
341 |
+ $(CP) -f $(PHOTON_CACHE_PATH)/RPMS/$(ARCH)/* $(PHOTON_RPMS_DIR_ARCH)/ |
|
342 | 342 |
|
343 | 343 |
sources: |
344 | 344 |
@$(MKDIR) -p $(PHOTON_SRCS_DIR) |
... | ... |
@@ -359,13 +359,13 @@ publish-x-rpms: |
359 | 359 |
|
360 | 360 |
publish-rpms-cached: |
361 | 361 |
@echo "Using cached publish rpms..." |
362 |
- @$(MKDIR) -p $(PHOTON_PUBLISH_RPMS_DIR)/{x86_64,noarch} && \ |
|
362 |
+ @$(MKDIR) -p $(PHOTON_PUBLISH_RPMS_DIR)/{$(ARCH),noarch} && \ |
|
363 | 363 |
cd $(PHOTON_PULL_PUBLISH_RPMS_DIR) && \ |
364 | 364 |
$(PHOTON_PULL_PUBLISH_RPMS) $(PHOTON_PUBLISH_RPMS_DIR) $(PHOTON_PUBLISH_RPMS_PATH) |
365 | 365 |
|
366 | 366 |
publish-x-rpms-cached: |
367 | 367 |
@echo "Using ..." |
368 |
- @$(MKDIR) -p $(PHOTON_PUBLISH_XRPMS_DIR)/{x86_64,noarch} && \ |
|
368 |
+ @$(MKDIR) -p $(PHOTON_PUBLISH_XRPMS_DIR)/{$(ARCH),noarch} && \ |
|
369 | 369 |
cd $(PHOTON_PULL_PUBLISH_RPMS_DIR) && \ |
370 | 370 |
$(PHOTON_PULL_PUBLISH_X_RPMS) $(PHOTON_PUBLISH_XRPMS_DIR) $(PHOTON_PUBLISH_XRPMS_PATH) |
371 | 371 |
|
... | ... |
@@ -376,12 +376,12 @@ $(PHOTON_STAGE): |
376 | 376 |
$(MKDIR) -p $(PHOTON_CHROOT_PATH) |
377 | 377 |
@echo "Building RPMS folders..." |
378 | 378 |
@test -d $(PHOTON_RPMS_DIR_NOARCH) || $(MKDIR) -p $(PHOTON_RPMS_DIR_NOARCH) |
379 |
- @test -d $(PHOTON_RPMS_DIR_X86_64) || $(MKDIR) -p $(PHOTON_RPMS_DIR_X86_64) |
|
379 |
+ @test -d $(PHOTON_RPMS_DIR_ARCH) || $(MKDIR) -p $(PHOTON_RPMS_DIR_ARCH) |
|
380 | 380 |
@echo "Building SRPMS folders..." |
381 | 381 |
@test -d $(PHOTON_SRPMS_DIR) || $(MKDIR) -p $(PHOTON_SRPMS_DIR) |
382 | 382 |
@echo "Building UPDATED_RPMS folders..." |
383 | 383 |
@test -d $(PHOTON_UPDATED_RPMS_DIR_NOARCH) || $(MKDIR) -p $(PHOTON_UPDATED_RPMS_DIR_NOARCH) |
384 |
- @test -d $(PHOTON_UPDATED_RPMS_DIR_X86_64) || $(MKDIR) -p $(PHOTON_UPDATED_RPMS_DIR_X86_64) |
|
384 |
+ @test -d $(PHOTON_UPDATED_RPMS_DIR_ARCH) || $(MKDIR) -p $(PHOTON_UPDATED_RPMS_DIR_ARCH) |
|
385 | 385 |
@echo "Building SOURCES folder..." |
386 | 386 |
@test -d $(PHOTON_SRCS_DIR) || $(MKDIR) -p $(PHOTON_SRCS_DIR) |
387 | 387 |
@echo "Building LOGS folder..." |
... | ... |
@@ -395,7 +395,8 @@ class Installer(object): |
395 | 395 |
if f in rpms: |
396 | 396 |
rpm_paths.append(os.path.join(root, f)) |
397 | 397 |
|
398 |
- rpm_params = ['--root', self.photon_root, '--dbpath', '/var/lib/rpm'] |
|
398 |
+ # --nodeps is for hosts which do not support rich dependencies |
|
399 |
+ rpm_params = ['--nodeps', '--root', self.photon_root, '--dbpath', '/var/lib/rpm'] |
|
399 | 400 |
|
400 | 401 |
if ('type' in self.install_config and (self.install_config['type'] in ['micro', 'minimal'])) or self.install_config['iso_system']: |
401 | 402 |
rpm_params.append('--excludedocs') |
... | ... |
@@ -49,7 +49,7 @@ run_command "# 6" "cp boot/theme.txt ${WORKINGDIR}/boot/grub2/themes/photon/" "$ |
49 | 49 |
run_command "echo : ${WORKINGDIR}" "echo ${WORKINGDIR}" "${LOGFILE}" |
50 | 50 |
cp BUILD_DVD/isolinux/splash.png ${BUILDROOT}/installer/boot/. |
51 | 51 |
mkdir -p ${BUILDROOT}/installer/EFI/BOOT |
52 |
-cp EFI/BOOT/* ${BUILDROOT}/installer/EFI/BOOT/ |
|
52 |
+cp EFI_$(uname -m)/BOOT/* ${BUILDROOT}/installer/EFI/BOOT/ |
|
53 | 53 |
|
54 | 54 |
#Generate efiboot image |
55 | 55 |
# efiboot is a fat16 image that has at least EFI/BOOT/bootx64.efi |
... | ... |
@@ -68,7 +68,8 @@ dd if=/dev/zero of=${WORKINGDIR}/${EFI_IMAGE} bs=3K count=1024 |
68 | 68 |
mkdosfs ${WORKINGDIR}/${EFI_IMAGE} |
69 | 69 |
mkdir $EFI_FOLDER |
70 | 70 |
mount -o loop ${WORKINGDIR}/${EFI_IMAGE} $EFI_FOLDER |
71 |
-cp -r ./EFI $EFI_FOLDER |
|
71 |
+mkdir $EFI_FOLDER/EFI |
|
72 |
+cp -r ./EFI_$(uname -m)/BOOT $EFI_FOLDER/EFI |
|
72 | 73 |
ls -lR $EFI_FOLDER |
73 | 74 |
umount $EFI_FOLDER |
74 | 75 |
rm -rf $EFI_FOLDER |
... | ... |
@@ -14,6 +14,7 @@ SHASUM=/usr/bin/shasum |
14 | 14 |
PACKER=/usr/local/bin/packer |
15 | 15 |
VAGRANT=/usr/bin/vagrant |
16 | 16 |
VAGRANT_BUILD=vagrant |
17 |
+ARCH?=$(shell uname -m) |
|
17 | 18 |
|
18 | 19 |
SRCROOT := $(realpath $(SRCROOT)) |
19 | 20 |
MAKEROOT := $(realpath $(MAKEROOT)) |
... | ... |
@@ -52,9 +53,9 @@ PHOTON_CLOUD_IMAGE_BUILDER=$(PHOTON_CLOUD_IMAGE_BUILDER_DIR)/cloud-image-build.s |
52 | 52 |
|
53 | 53 |
PHOTON_CHROOT_CLEANER=$(PHOTON_PKG_BUILDER_DIR)/clean-up-chroot.py |
54 | 54 |
PHOTON_RPMS_DIR_NOARCH=$(PHOTON_RPMS_DIR)/noarch |
55 |
-PHOTON_RPMS_DIR_X86_64=$(PHOTON_RPMS_DIR)/x86_64 |
|
55 |
+PHOTON_RPMS_DIR_ARCH=$(PHOTON_RPMS_DIR)/$(ARCH) |
|
56 | 56 |
PHOTON_UPDATED_RPMS_DIR_NOARCH?=$(PHOTON_UPDATED_RPMS_DIR)/noarch |
57 |
-PHOTON_UPDATED_RPMS_DIR_X86_64?=$(PHOTON_UPDATED_RPMS_DIR)/x86_64 |
|
57 |
+PHOTON_UPDATED_RPMS_DIR_ARCH?=$(PHOTON_UPDATED_RPMS_DIR)/$(ARCH) |
|
58 | 58 |
PHOTON_PACKER_TEMPLATES=$(SRCROOT)/support/packer-templates |
59 | 59 |
|
60 | 60 |
PHOTON_CHROOT_PATH:=$(PHOTON_STAGE)/photonroot |
... | ... |
@@ -1,6 +1,7 @@ |
1 | 1 |
from CommandUtils import CommandUtils |
2 | 2 |
from Logger import Logger |
3 | 3 |
import os |
4 |
+import platform |
|
4 | 5 |
import shutil |
5 | 6 |
from constants import constants |
6 | 7 |
import re |
... | ... |
@@ -44,6 +45,8 @@ class PackageUtils(object): |
44 | 44 |
arch="" |
45 | 45 |
if rpmName.find("x86_64") != -1: |
46 | 46 |
arch="x86_64" |
47 |
+ elif rpmName.find("aarch64") != -1: |
|
48 |
+ arch="aarch64" |
|
47 | 49 |
elif rpmName.find("noarch") != -1: |
48 | 50 |
arch="noarch" |
49 | 51 |
return arch |
... | ... |
@@ -281,10 +284,10 @@ class PackageUtils(object): |
281 | 281 |
cmdUtils = CommandUtils() |
282 | 282 |
version = SPECS.getData().getVersion(package) |
283 | 283 |
release = SPECS.getData().getRelease(package) |
284 |
- listFoundRPMFiles = sum([cmdUtils.findFile(package+"-"+version+"-"+release+".x86_64.rpm",constants.rpmPath), |
|
284 |
+ listFoundRPMFiles = sum([cmdUtils.findFile(package+"-"+version+"-"+release+"."+platform.machine()+".rpm",constants.rpmPath), |
|
285 | 285 |
cmdUtils.findFile(package+"-"+version+"-"+release+".noarch.rpm",constants.rpmPath)], []) |
286 | 286 |
if constants.inputRPMSPath is not None: |
287 |
- listFoundRPMFiles = sum([cmdUtils.findFile(package+"-"+version+"-"+release+".x86_64.rpm",constants.inputRPMSPath), |
|
287 |
+ listFoundRPMFiles = sum([cmdUtils.findFile(package+"-"+version+"-"+release+"."+platform.machine()+".rpm",constants.inputRPMSPath), |
|
288 | 288 |
cmdUtils.findFile(package+"-"+version+"-"+release+".noarch.rpm",constants.inputRPMSPath)], listFoundRPMFiles) |
289 | 289 |
if len(listFoundRPMFiles) == 1 : |
290 | 290 |
return listFoundRPMFiles[0] |
... | ... |
@@ -309,7 +312,7 @@ class PackageUtils(object): |
309 | 309 |
|
310 | 310 |
def findPackageInfoFromRPMFile(self,rpmfile): |
311 | 311 |
rpmfile=os.path.basename(rpmfile) |
312 |
- rpmfile=rpmfile.replace(".x86_64.rpm","") |
|
312 |
+ rpmfile=rpmfile.replace("."+platform.machine()+".rpm","") |
|
313 | 313 |
rpmfile=rpmfile.replace(".noarch.rpm","") |
314 | 314 |
releaseindex=rpmfile.rfind("-") |
315 | 315 |
if releaseindex == -1: |
... | ... |
@@ -396,7 +399,7 @@ class PackageUtils(object): |
396 | 396 |
if "noarch" in rpmFile: |
397 | 397 |
rpmPath += "noarch/" |
398 | 398 |
else: |
399 |
- rpmPath += "x86_64/" |
|
399 |
+ rpmPath += platform.machine()+"/" |
|
400 | 400 |
rpmPath += rpmName |
401 | 401 |
return rpmPath |
402 | 402 |
|
... | ... |
@@ -1,5 +1,6 @@ |
1 | 1 |
from SpecUtils import Specutils |
2 | 2 |
import os |
3 |
+import platform |
|
3 | 4 |
from Logger import Logger |
4 | 5 |
from distutils.version import StrictVersion |
5 | 6 |
import Queue |
... | ... |
@@ -77,7 +78,7 @@ class SerializableSpecObjectsUtils(object): |
77 | 77 |
def getListSpecFiles(self,listSpecFiles,path): |
78 | 78 |
for dirEntry in os.listdir(path): |
79 | 79 |
dirEntryPath = os.path.join(path, dirEntry) |
80 |
- if os.path.isfile(dirEntryPath) and dirEntryPath.endswith(".spec"): |
|
80 |
+ if os.path.isfile(dirEntryPath) and dirEntryPath.endswith(".spec") and os.path.basename(dirEntryPath) not in constants.skipSpecsForArch.get(platform.machine(),[]): |
|
81 | 81 |
listSpecFiles.append(dirEntryPath) |
82 | 82 |
elif os.path.isdir(dirEntryPath): |
83 | 83 |
self.getListSpecFiles(listSpecFiles,dirEntryPath) |
... | ... |
@@ -307,8 +308,9 @@ class SPECS(object): |
307 | 307 |
self.specData.addMacro("KERNEL_VERSION",kernelversion) |
308 | 308 |
|
309 | 309 |
#adding openjre8 version rpm macro |
310 |
- java8version = self.specData.getVersion("openjre8") |
|
311 |
- self.specData.addMacro("JAVA8_VERSION",java8version) |
|
310 |
+ if (platform.machine() == "x86_64"): |
|
311 |
+ java8version = self.specData.getVersion("openjre8") |
|
312 |
+ self.specData.addMacro("JAVA8_VERSION",java8version) |
|
312 | 313 |
|
313 | 314 |
#adding kernelrelease rpm macro |
314 | 315 |
kernelrelease = self.specData.getRelease("linux") |
... | ... |
@@ -525,7 +527,7 @@ class SerializedSpecObjects(object): |
525 | 525 |
def getListSpecFiles(self,listSpecFiles,path): |
526 | 526 |
for dirEntry in os.listdir(path): |
527 | 527 |
dirEntryPath = os.path.join(path, dirEntry) |
528 |
- if os.path.isfile(dirEntryPath) and dirEntryPath.endswith(".spec"): |
|
528 |
+ if os.path.isfile(dirEntryPath) and dirEntryPath.endswith(".spec") and os.path.basename(dirEntryPath) not in constants.skipSpecsForArch.get(platform.machine(),[]): |
|
529 | 529 |
listSpecFiles.append(dirEntryPath) |
530 | 530 |
elif os.path.isdir(dirEntryPath): |
531 | 531 |
self.getListSpecFiles(listSpecFiles,dirEntryPath) |
... | ... |
@@ -1,4 +1,5 @@ |
1 | 1 |
import re |
2 |
+import platform |
|
2 | 3 |
from StringUtils import StringUtils |
3 | 4 |
from SpecStructures import * |
4 | 5 |
from constants import constants |
... | ... |
@@ -46,7 +47,18 @@ class SpecParser(object): |
46 | 46 |
i=0 |
47 | 47 |
while i < totalLines: |
48 | 48 |
line = lines[i].strip() |
49 |
- if self.isSpecMacro(line): |
|
49 |
+ if self.isConditionalArch(line): |
|
50 |
+ if (platform.machine() != self.readConditionalArch(line)): |
|
51 |
+ # skip conditional body |
|
52 |
+ deep = 1 |
|
53 |
+ while (i < totalLines and deep != 0): |
|
54 |
+ i=i+1 |
|
55 |
+ line = lines[i].strip() |
|
56 |
+ if self.isConditionalMacroStart(line): |
|
57 |
+ deep = deep + 1 |
|
58 |
+ elif self.isConditionalMacroEnd(line): |
|
59 |
+ deep = deep - 1 |
|
60 |
+ elif self.isSpecMacro(line): |
|
50 | 61 |
macro,i=self.readMacroFromFile(i, lines) |
51 | 62 |
self.updateMacro(macro) |
52 | 63 |
elif self.isPackageMacro(line): |
... | ... |
@@ -78,7 +90,7 @@ class SpecParser(object): |
78 | 78 |
self.readDefinition(line) |
79 | 79 |
elif self.isConditionalCheckMacro(line): |
80 | 80 |
self.conditionalCheckMacroEnabled = True |
81 |
- elif self.conditionalCheckMacroEnabled and self.isConditionalMacroCompleted(line): |
|
81 |
+ elif self.conditionalCheckMacroEnabled and self.isConditionalMacroEnd(line): |
|
82 | 82 |
self.conditionalCheckMacroEnabled = False |
83 | 83 |
else: |
84 | 84 |
self.specAdditionalContent+=line+"\n" |
... | ... |
@@ -137,7 +149,12 @@ class SpecParser(object): |
137 | 137 |
return False |
138 | 138 |
|
139 | 139 |
def isMacro(self,line): |
140 |
- return self.isPackageMacro(line) or self.isSpecMacro(line) |
|
140 |
+ return self.isPackageMacro(line) or self.isSpecMacro(line) or self.isConditionalMacroStart(line) or self.isConditionalMacroEnd(line) |
|
141 |
+ |
|
142 |
+ def isConditionalArch(self,line): |
|
143 |
+ if re.search('^'+'%ifarch',line) : |
|
144 |
+ return True |
|
145 |
+ return False |
|
141 | 146 |
|
142 | 147 |
def isSpecMacro(self,line): |
143 | 148 |
if re.search('^'+'%clean',line) : |
... | ... |
@@ -225,6 +242,12 @@ class SpecParser(object): |
225 | 225 |
return True |
226 | 226 |
return False |
227 | 227 |
|
228 |
+ def readConditionalArch(self,line): |
|
229 |
+ w=line.split() |
|
230 |
+ if len(w) == 2: |
|
231 |
+ return w[1] |
|
232 |
+ return None |
|
233 |
+ |
|
228 | 234 |
def readDefinition(self,line): |
229 | 235 |
listDefines=line.split() |
230 | 236 |
if len(listDefines) == 3: |
... | ... |
@@ -400,12 +423,8 @@ class SpecParser(object): |
400 | 400 |
return False |
401 | 401 |
return True |
402 | 402 |
|
403 |
- def isConditionalMacroCompleted(self,line): |
|
404 |
- data = line.strip() |
|
405 |
- words = data.split() |
|
406 |
- nrWords = len(words) |
|
407 |
- if(nrWords != 1): |
|
408 |
- return False |
|
409 |
- if(words[0] != "%endif"): |
|
410 |
- return False |
|
411 |
- return True |
|
403 |
+ def isConditionalMacroStart(self,line): |
|
404 |
+ return line.startswith("%if") |
|
405 |
+ |
|
406 |
+ def isConditionalMacroEnd(self,line): |
|
407 |
+ return (line.strip() == "%endif") |
... | ... |
@@ -1,3 +1,5 @@ |
1 |
+import platform |
|
2 |
+ |
|
1 | 3 |
class rpmMacro(object): |
2 | 4 |
|
3 | 5 |
def __init__(self): |
... | ... |
@@ -29,7 +31,7 @@ class Package(object): |
29 | 29 |
self.license="" |
30 | 30 |
self.version="" |
31 | 31 |
self.release="" |
32 |
- self.buildarch="x86_64" |
|
32 |
+ self.buildarch=platform.machine() |
|
33 | 33 |
self.distribution="Photon" |
34 | 34 |
self.basePkgName="" |
35 | 35 |
self.URL="" |
... | ... |
@@ -1,5 +1,6 @@ |
1 | 1 |
from SpecParser import SpecParser |
2 | 2 |
from StringUtils import StringUtils |
3 |
+import platform |
|
3 | 4 |
import os |
4 | 5 |
|
5 | 6 |
class Specutils(object): |
... | ... |
@@ -133,7 +134,7 @@ class Specutils(object): |
133 | 133 |
return None |
134 | 134 |
|
135 | 135 |
def getBuildArch(self, pkgName): |
136 |
- buildArch="x86_64" |
|
136 |
+ buildArch=platform.machine() |
|
137 | 137 |
for key in self.spec.packages.keys(): |
138 | 138 |
pkg = self.spec.packages.get(key) |
139 | 139 |
if pkg.name == pkgName: |
... | ... |
@@ -5,6 +5,7 @@ from PackageUtils import PackageUtils |
5 | 5 |
from constants import constants |
6 | 6 |
import subprocess |
7 | 7 |
import os.path |
8 |
+import platform |
|
8 | 9 |
import traceback |
9 | 10 |
import shutil |
10 | 11 |
|
... | ... |
@@ -38,7 +39,7 @@ class ToolChainUtils(object): |
38 | 38 |
cmdUtils.runCommandInShell("mkdir -p "+chrootID+"/sys") |
39 | 39 |
cmdUtils.runCommandInShell("mkdir -p "+chrootID+"/tmp") |
40 | 40 |
cmdUtils.runCommandInShell("mkdir -p "+chrootID+constants.topDirPath) |
41 |
- cmdUtils.runCommandInShell("mkdir -p "+chrootID+constants.topDirPath+"/RPMS/x86_64") |
|
41 |
+ cmdUtils.runCommandInShell("mkdir -p "+chrootID+constants.topDirPath+"/RPMS/"+platform.machine()) |
|
42 | 42 |
cmdUtils.runCommandInShell("mkdir -p "+chrootID+constants.topDirPath+"/RPMS/noarch") |
43 | 43 |
cmdUtils.runCommandInShell("mkdir -p "+chrootID+constants.topDirPath+"/SOURCES") |
44 | 44 |
cmdUtils.runCommandInShell("mkdir -p "+chrootID+constants.topDirPath+"/SPECS") |
... | ... |
@@ -191,8 +192,8 @@ class ToolChainUtils(object): |
191 | 191 |
rpmFile = pkgUtils.findRPMFileForGivenPackage(package) |
192 | 192 |
if rpmFile is None: |
193 | 193 |
# sqlite-autoconf package was renamed, but it still published as sqlite-autoconf |
194 |
- if package == "sqlite": |
|
195 |
- package = "sqlite-autoconf" |
|
194 |
+# if package == "sqlite": |
|
195 |
+# package = "sqlite-autoconf" |
|
196 | 196 |
rpmFile = self.findRPMFileInGivenLocation(package, constants.prevPublishRPMRepo) |
197 | 197 |
if rpmFile is None: |
198 | 198 |
if package in constants.listOfRPMsProvidedAfterBuild: |
... | ... |
@@ -2,6 +2,7 @@ |
2 | 2 |
|
3 | 3 |
from argparse import ArgumentParser |
4 | 4 |
import os.path |
5 |
+import platform |
|
5 | 6 |
from CommandUtils import CommandUtils |
6 | 7 |
from Logger import Logger |
7 | 8 |
from constants import constants |
... | ... |
@@ -67,11 +68,11 @@ def main(): |
67 | 67 |
if not os.path.isdir(options.publishXRPMSPath): |
68 | 68 |
logger.error("Given X RPMS Path is not a directory:"+options.publishXRPMSPath) |
69 | 69 |
errorFlag = True |
70 |
- if not os.path.isdir(options.publishRPMSPath+"/x86_64"): |
|
71 |
- logger.error("Given RPMS Path is missing x86_64 sub-directory:"+options.publishRPMSPath) |
|
70 |
+ if not os.path.isdir(options.publishRPMSPath+"/" + platform.machine()): |
|
71 |
+ logger.error("Given RPMS Path is missing "+platform.machine()+" sub-directory:"+options.publishRPMSPath) |
|
72 | 72 |
errorFlag = True |
73 |
- if not os.path.isdir(options.publishXRPMSPath+"/x86_64"): |
|
74 |
- logger.error("Given X RPMS Path is missing x86_64 sub-directory:"+options.publishXRPMSPath) |
|
73 |
+ if not os.path.isdir(options.publishXRPMSPath+"/" + platform.machine()): |
|
74 |
+ logger.error("Given X RPMS Path is missing "+platform.machine()+" sub-directory:"+options.publishXRPMSPath) |
|
75 | 75 |
errorFlag = True |
76 | 76 |
if not os.path.isdir(options.publishRPMSPath+"/noarch"): |
77 | 77 |
logger.error("Given RPMS Path is missing noarch sub-directory:"+options.publishRPMSPath) |
... | ... |
@@ -108,7 +109,7 @@ def main(): |
108 | 108 |
|
109 | 109 |
|
110 | 110 |
if not os.path.isdir(options.rpmPath): |
111 |
- cmdUtils.runCommandInShell("mkdir -p "+options.rpmPath+"/x86_64") |
|
111 |
+ cmdUtils.runCommandInShell("mkdir -p "+options.rpmPath+"/"+platform.machine()) |
|
112 | 112 |
cmdUtils.runCommandInShell("mkdir -p "+options.rpmPath+"/noarch") |
113 | 113 |
|
114 | 114 |
if not os.path.isdir(options.sourceRpmPath): |
... | ... |
@@ -346,6 +346,70 @@ class constants(object): |
346 | 346 |
"/bin/sed":"sed" |
347 | 347 |
} |
348 | 348 |
|
349 |
+ # list of spec files to skip for parsing for given arch |
|
350 |
+ skipSpecsForArch={ |
|
351 |
+ "x86_64":[], |
|
352 |
+ "aarch64":[ |
|
353 |
+ # fakeroot-ng does not support aarch64 |
|
354 |
+ "fakeroot-ng.spec", |
|
355 |
+ # ipxe does not support aarch64 |
|
356 |
+ "ipxe.spec", |
|
357 |
+ # kexec-tools for arm64 does not support fpic |
|
358 |
+ "kexec-tools.spec", |
|
359 |
+ # no TXT/tboot on arm64 |
|
360 |
+ "tboot.spec", |
|
361 |
+ # backward-cpp does not support amd64 |
|
362 |
+ "backward-cpp.spec", |
|
363 |
+ "envoy.spec", |
|
364 |
+ # only generic linux is for arm64 |
|
365 |
+ "linux-esx.spec", |
|
366 |
+ "linux-secure.spec", |
|
367 |
+ # only linux-secure supports aufs |
|
368 |
+ "aufs-util.spec", |
|
369 |
+ # open-vm-tools does not support aarch64 |
|
370 |
+ "open-vm-tools.spec", |
|
371 |
+ # TODO: mariadb build hangs on amd64 |
|
372 |
+ "mariadb.spec", |
|
373 |
+ # TODO: mysql fails on amd64 with fpic |
|
374 |
+ "mysql.spec", |
|
375 |
+ # irqbalance for arm64 ? |
|
376 |
+ "irqbalance.spec", |
|
377 |
+ # no X rpms to build openjdk, skip all java packages |
|
378 |
+ "openjdk8.spec", |
|
379 |
+ "ant-contrib.spec", |
|
380 |
+ "apache-ant.spec", |
|
381 |
+ "apache-maven.spec", |
|
382 |
+ "apache-tomcat.spec", |
|
383 |
+ "cassandra.spec", |
|
384 |
+ "commons-daemon.spec", |
|
385 |
+ "jna.spec", |
|
386 |
+ "kubernetes-dashboard.spec", |
|
387 |
+ "lightwave.spec", |
|
388 |
+ "mesos.spec", |
|
389 |
+ "protobuf.spec", |
|
390 |
+ "wavefront-proxy.spec", |
|
391 |
+ "zookeeper.spec", |
|
392 |
+ # requires lightwave |
|
393 |
+ "pmd.spec", |
|
394 |
+ # requires protobuf |
|
395 |
+ "calico-felix.spec", |
|
396 |
+ "lightstep-tracer-cpp.spec", |
|
397 |
+ "protobuf-c.spec", |
|
398 |
+ "runc.spec", |
|
399 |
+ # requires cassandra |
|
400 |
+ "python-cqlsh.spec", |
|
401 |
+ # requires python-pyinstaller, but it has unresolved glibc deps |
|
402 |
+ "calico-k8s-policy.spec", |
|
403 |
+ "libcalico.spec", |
|
404 |
+ # pcstat requires patching for aarch64 |
|
405 |
+ "pcstat.spec", |
|
406 |
+ # sysdig for aarch64 requires luajit, skip it and falco |
|
407 |
+ # https://github.com/draios/sysdig/issues/833 |
|
408 |
+ "sysdig.spec", |
|
409 |
+ "falco.spec" |
|
410 |
+ ] |
|
411 |
+ } |
|
412 |
+ |
|
349 | 413 |
@staticmethod |
350 | 414 |
def initialize(options): |
351 | 415 |
constants.dist = options.dist |