<div class="markdown">
<p dir="auto">Hello everyone,</p>
<p dir="auto">Thank you for the feedback.</p>
<p dir="auto">Using this feedback I managed to avoid the Rosetta installation by doing the following:</p>
<pre><code> ⁃ 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
</code></pre>
<p dir="auto">Thank you very much for the assistance!</p>
</div><div id="8DF7D1A9-C8F0-4D29-A5D5-1BB9F9C09BAE"><html>
<table width="600px" style="border:0px;">
<tr>
<td width="400px">Met vriendelijke groeten | Bien à vous | Kind regards<br/>Dimitri<br/><br/></td>
<td width="200px"></td>
</tr>
<tr>
<td width="400px"><strong>ARC - your Apple Authorised Service partner</strong></td>
<td width="200px">H.D. Saviolaan 8</td>
</tr>
<tr>
<td> </td>
<td>B-1700 Dilbeek</td>
</tr>
<tr>
<td> </td>
<td>Belgium</td>
</tr>
<tr>
<td><a href="[mailto:info@arcict.com](mailto:info@arcict.com)">info@arcict.com</a></td>
<td><a href="[https://www.arcict.com](https://www.arcict.com)">www.arcict.com</a></td>
</tr>
<tr>
<td>tel. : +32 (0)2 466 50 00</td>
<td>fax. : +32 (0)2 466 88 33</td>
</tr>
</table>
</html></div>
<div class="markdown"><p dir="auto"><br />
On 28 Jan 2025, at 21:47, Joshua Root wrote:</p>
<blockquote>
<blockquote>
<p dir="auto">Hello,</p>
<p dir="auto">We've build a few packages using the mpkg command on an Apple Silicon<br />
Mac.<br />
When we want to install any of these packages, Rosetta 2 installation is<br />
required.</p>
<p dir="auto">We want to avoid using Rosseta 2, if there a way of forcing the<br />
architecture to arm64 when building a mpkg?</p>
</blockquote>
<p dir="auto">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: <a href="https://trac.macports.org/ticket/63096">https://trac.macports.org/ticket/63096</a></p>
<p dir="auto">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.</p>
<ul>
<li>Josh</li>
</ul>
</blockquote>
</div>