From 2c47018aff995a07bc5bf7ae339556dd70338536 Mon Sep 17 00:00:00 2001 From: Chris Evich Date: Tue, 21 May 2024 10:54:45 -0400 Subject: [PATCH] Mac PW Pool: Install rosetta Podman machine testing needs rosetta to confirm running x86_64 binaries. Signed-off-by: Chris Evich --- mac_pw_pool/setup.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/mac_pw_pool/setup.sh b/mac_pw_pool/setup.sh index 136a556..9c15689 100644 --- a/mac_pw_pool/setup.sh +++ b/mac_pw_pool/setup.sh @@ -147,6 +147,15 @@ if ! mount | grep -q "$PWUSER"; then sudo pkill -u $PWUSER || true fi +# Rosetta 2 enables arm64 Mac to use Intel Apps. Only install if not present. +if [[ ! -r "/usr/libexec/rosetta/oahd" ]]; then + sudo softwareupdate --install-rosetta --agree-to-license + echo -n "Confirming rosetta is functional" + if ! arch -arch x86_64 /usr/bin/uname -m; then + die "Rosetta installed but non-functional, see setup log for details." + fi +fi + # FIXME: Semi-secret POOLTOKEN value should not be in this file. # ref: https://github.com/cirruslabs/cirrus-cli/discussions/662 cat << EOF | sudo tee $PWCFG > /dev/null