diff --git a/Makefile b/Makefile index 3bcd504a8..cf2366c0d 100644 --- a/Makefile +++ b/Makefile @@ -37,6 +37,16 @@ image_tag="20.04" endif # Set arch to linux/amd64 if it's not defined arch ?= linux/amd64 + +# Detect the CPU architecture +CPU_ARCH := $(shell uname -m) +# Map the architecture to Docker platform +ifeq ($(CPU_ARCH), arm64) + arch := linux/arm64 +else ifeq ($(CPU_ARCH), aarch64) + arch := linux/arm64 +endif + buildx=0 cache_from=type=local,src=/tmp/.buildx-cache cache_to=type=local,dest=/tmp/.buildx-cache diff --git a/utils/publish-rpm.sh b/utils/publish-rpm.sh index 9511c2669..ec2fde81a 100755 --- a/utils/publish-rpm.sh +++ b/utils/publish-rpm.sh @@ -28,7 +28,7 @@ func_rpmsign_macros_init() { # Macros for signing RPMs. %_signature gpg %_gpg_path ${HOME}/.gnupg -%_gpg_name ${GPG_NAME} ${GPG_MAIL} +%_gpg_name ${GPG_MAIL} %_gpgbin /usr/bin/gpg %__gpg_sign_cmd %{__gpg} gpg --batch --verbose --no-armor --pinentry-mode loopback --passphrase-file ${VAR_GPG_PASSPHRASE} --no-secmem-warning -u "%{_gpg_name}" -sbo %{__signature_filename} --digest-algo sha256 %{__plaintext_filename} _EOC_