In case you are making macOS Installer packages and doing that
since ages, you should take note of the following passage
from the productbuild
man page and revisit your Distribution
files:
NOTE: On Apple Silicon, the macOS Installer will evaluate the product's
distribution under Rosetta 2 unless the arch key includes the arm64
architecture specifier. Some distribution properties may be evaluated
differently between Rosetta 2 and native execution, such as the
predicate specified by the sysctl-requirements key. If the distribution
is evaluated under Rosetta 2, any package scripts inside of product
will be executed with Rosetta 2 at install time.
Although it seems awkward at first, this is indeed necessary - any "script"
might as well be a binary instead which in turn might require Rosetta 2
(as it's probably not Universal, which is typical for old Installer packages).
In case you're creating the Distribution
files manually, the
options
XML element has a hostArchitectures
attribute which lets you specify the exact requirements.
Thanks to Randy Saldinger (Mothers Ruin Software) for letting me know 