Hello everyone,
Thank you for the feedback.
Using this feedback I managed to avoid the Rosetta installation by doing
the following:
⁃ pkgutil --expand nginx.mpkg nginx.expanded
⁃ open the Distribution file (XML)
⁃ add <options hostArchitectures="arm64"/> above the </installer>
tag
⁃ pkgutil --flatten nginx.expanded nginx.mpkg
Thank you very much for the assistance!
Met vriendelijke groeten | Bien à vous | Kind regards
Dimitri
ARC - your Apple Authorised Service partner
H. D. Saviolaan 8
1700 Dilbeek
T. : 00 32 02 466 5000
On 28 Jan 2025, at 21:47, Joshua Root wrote:
Hello,
We've build a few packages using the mpkg command on an Apple Silicon
Mac.
When we want to install any of these packages, Rosetta 2 installation
is
required.
We want to avoid using Rosseta 2, if there a way of forcing the
architecture to arm64 when building a mpkg?
Unfortunately Apple's Installer started assuming in Big Sur that
packages require Rosetta 2 unless they set the previously optional
hostArchitectures key in the Distribution file to something including
arm64. This was reported for the MacPorts base installer and was
fixed: <https://trac.macports.org/ticket/63096>
However 'port mpkg' still does not set this, partly because it's not
straightforward to figure out whether any of the included dependencies
need Rosetta 2. If you know you're only including arm64 code in the
mpkg, possible solutions would be to have the top level port provide a
custom Distribution file that sets hostArchitectures like the MacPorts
port does, or patch portmpkg::write_distribution in base to set it.
- Josh