From 0b6707196969e1016051ed85eacd4d018fc203cd Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Fri, 24 Feb 2023 09:18:49 -0500 Subject: [PATCH] Fix deb packaging for ARM v6/v7 Relates to https://github.com/goreleaser/goreleaser/issues/2721 There's a filename clash because some platforms consider armhf to be ARMv6 and some consider it to be ARMv7. Fallback to build and package only ARMv6 because ARMv6 binaries are going to work on ARMv7 anyway. Note: If we really have to release ARMv7 for other platforms, we can split the builds and packaging and then filter the builds used for packaging but that require extra work/maintenance so we will implement it only if required. --- .goreleaser.yml | 8 ++++++-- installer/bash-installer | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 1f9d2d8a..9347857f 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -23,8 +23,11 @@ builds: - arm - arm64 goarm: + # Because of a limitation in DEB packaging we can only build and package + # a single ARMv6 or v7 variant at a single time. As ARMv6 is upwards + # compatible with ARMv7 so let's only build ARMv6 here (default value + # anyway) - 6 - - 7 ignore: - goos: windows goarch: arm @@ -155,7 +158,8 @@ dockers: - "--label=org.opencontainers.image.version={{.Version}}" - image_templates: [ "ghcr.io/symfony-cli/{{ .ProjectName }}:{{ .Version }}-arm32v7" ] goarch: arm - goarm: '7' + # ARMv6 is upwards compatible with ARMv7 + goarm: '6' use: buildx build_flag_templates: - "--pull" diff --git a/installer/bash-installer b/installer/bash-installer index f5a2f2a6..a34d287e 100755 --- a/installer/bash-installer +++ b/installer/bash-installer @@ -129,7 +129,8 @@ case ${machine} in machine="armv6" ;; armv7*) - machine="armv7" + # ARMv6 is upwards compatible with ARMv7 + machine="armv6" ;; aarch64*|armv8*|arm64) machine="arm64"