Fix aarch64 architecture for packages (#54856)

This commit fixes the architecture reported in the packages on aarch64.
This commit is contained in:
Jason Tedor 2020-04-07 06:03:32 -04:00
parent 1039cae2cc
commit 91818c32c5
No known key found for this signature in database
GPG Key ID: FA89F05560F16BC5
1 changed files with 16 additions and 1 deletions

View File

@ -105,7 +105,22 @@ Closure commonPackageConfig(String type, boolean oss, boolean jdk, String archit
}
dependsOn "process${oss ? 'Oss' : ''}${jdk ? '' : 'NoJdk'}${type.capitalize()}Files"
packageName "elasticsearch${oss ? '-oss' : ''}"
arch(architecture == 'aarch64' ? 'aarch64' : type == 'deb' ? 'amd64' : 'X86_64')
if (type == 'deb') {
if (architecture == 'x64') {
arch('amd64')
} else {
assert architecture == 'aarch64' : architecture
arch('arm64')
}
} else {
assert type == 'rpm' : type
if (architecture == 'x64') {
arch('X86_64')
} else {
assert architecture == 'aarch64' : architecture
arch('aarch64')
}
}
// Follow elasticsearch's file naming convention
String jdkString = jdk ? "" : "no-jdk-"
String prefix = "${architecture == 'aarch64' ? 'aarch64-' : ''}${oss ? 'oss-' : ''}${jdk ? '' : 'no-jdk-'}${type}"