Skip to content

Commit

Permalink
Mac PW Pool: Install rosetta
Browse files Browse the repository at this point in the history
Podman machine testing needs rosetta to confirm running x86_64 binaries.

Signed-off-by: Chris Evich <[email protected]>
  • Loading branch information
cevich committed May 21, 2024
1 parent 9a8a1a2 commit 2c47018
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions mac_pw_pool/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2c47018

Please sign in to comment.