From 50bc57a641c789a66d5c159272ec0f04b2a82cdb Mon Sep 17 00:00:00 2001 From: Reuben Miller Date: Sun, 11 Feb 2024 15:40:03 +0100 Subject: [PATCH] build: add rust triples to nfpm arch lookup to support new package types in the future Signed-off-by: Reuben Miller --- ci/build_scripts/package.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ci/build_scripts/package.sh b/ci/build_scripts/package.sh index 22766b18e4c..42988e8d31f 100755 --- a/ci/build_scripts/package.sh +++ b/ci/build_scripts/package.sh @@ -189,11 +189,21 @@ build_virtual_package() { } get_package_arch() { + # Return package architecture as per the + # nfpm architectures defined here: https://nfpm.goreleaser.com/goarch-to-pkg/ + # which uses the GOARCH to abstract across the different + # arch names used in different linux packages (e.g. deb != rpm != apk) case "$1" in x86_64-unknown-linux-*) pkg_arch=amd64 ;; + i686-unknown-linux-*) pkg_arch=386 ;; aarch64-unknown-linux-*) pkg_arch=arm64 ;; armv7-unknown-linux-*eabihf) pkg_arch=arm7 ;; arm-unknown-linux-*eabihf) pkg_arch=arm6 ;; + arm-unknown-linux-*eabi) pkg_arch=arm5 ;; + armv5te-unknown-linux-*eabi) pkg_arch=arm5 ;; + riscv64gc-unknown-linux-*) pkg_arch=riscv64 ;; + mips64el-unknown-linux-*abi64) pkg_arch=mips64le ;; + mipsel-unknown-linux-*) pkg_arch=mipsle ;; *) echo "Unknown package architecture. value=$1" exit 1