Skip to content

Commit

Permalink
macos: pkg: Use -arm64 suffix instead of -aarch64
Browse files Browse the repository at this point in the history
All files released in
https://github.com/containers/podman/releases/tag/v4.3.1 use -arm64 for
the arch name except podman-installer-macos-aarch64.pkg

Related: #16612
Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
  • Loading branch information
cfergeau committed Nov 29, 2022
1 parent fe548dd commit 54ef7f9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
7 changes: 6 additions & 1 deletion contrib/pkginstaller/Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
SHELL := bash

ARCH ?= aarch64
ifeq ($(ARCH), aarch64)
GOARCH:=arm64
else
GOARCH:=$(ARCH)
endif
GVPROXY_VERSION ?= 0.4.0
QEMU_VERSION ?= 7.1.0-1
GVPROXY_RELEASE_URL ?= https://github.com/containers/gvisor-tap-vsock/releases/download/v$(GVPROXY_VERSION)/gvproxy-darwin
QEMU_RELEASE_URL ?= https://github.com/containers/podman-machine-qemu/releases/download/v$(QEMU_VERSION)/podman-machine-qemu-$(ARCH)-$(QEMU_VERSION).tar.xz
PACKAGE_DIR ?= out/packaging
TMP_DOWNLOAD ?= tmp-download
PACKAGE_ROOT ?= root
PKG_NAME := podman-installer-macos-$(ARCH).pkg
PKG_NAME := podman-installer-macos-$(GOARCH).pkg

default: pkginstaller

Expand Down
13 changes: 7 additions & 6 deletions contrib/pkginstaller/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ arch=$(cat "${BASEDIR}/ARCH")

function build_podman() {
pushd "$1"
local goArch="${arch}"
if [ "${goArch}" = aarch64 ]; then
goArch=arm64
fi
make GOARCH="${goArch}" podman-remote HELPER_BINARIES_DIR="${HELPER_BINARIES_DIR}"
make GOARCH="${goArch}" podman-mac-helper
cp bin/darwin/podman "contrib/pkginstaller/out/packaging/${binDir}/podman"
Expand Down Expand Up @@ -66,6 +62,11 @@ function signQemu() {
--entitlements "${BASEDIR}/hvf.entitlements" "${qemuBinDir}/qemu-system-${qemuArch}"
}

goArch="${arch}"
if [ "${goArch}" = aarch64 ]; then
goArch=arm64
fi

build_podman "../../../../"
sign "${binDir}/podman"
sign "${binDir}/gvproxy"
Expand All @@ -86,7 +87,7 @@ productbuild --distribution "${BASEDIR}/Distribution" \
rm "${OUTPUT}/podman.pkg"

if [ ! "${NO_CODESIGN}" -eq "1" ]; then
productsign --timestamp --sign "${PRODUCTSIGN_IDENTITY}" "${OUTPUT}/podman-unsigned.pkg" "${OUTPUT}/podman-installer-macos-${arch}.pkg"
productsign --timestamp --sign "${PRODUCTSIGN_IDENTITY}" "${OUTPUT}/podman-unsigned.pkg" "${OUTPUT}/podman-installer-macos-${goArch}.pkg"
else
mv "${OUTPUT}/podman-unsigned.pkg" "${OUTPUT}/podman-installer-macos-${arch}.pkg"
mv "${OUTPUT}/podman-unsigned.pkg" "${OUTPUT}/podman-installer-macos-${goArch}.pkg"
fi

0 comments on commit 54ef7f9

Please sign in to comment.