-
Notifications
You must be signed in to change notification settings - Fork 803
Define arm64 as a supported architecture in the Installer package #2610
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Does this need any build changes so the binaries for both arches is in the release package or this change of metadata will take care of all of this? Please, update also https://github.com/OpenSC/OpenSC/blob/master/.github/workflows/macos.yml#L14 so it rebuilds the mac ci on change of this file (or any file in the |
|
arm64 is only available when the installer is being built on arm64. arm64 was added recently to the github runners, but since it requires some quirks, I don't believe this is enabled by default. This PR should be changed so that |
I do not follow. This PR merely resolves a "quirk" of the Installer app whereby it requires Rosetta 2 even if the package components are all universal, like the current release version 22. With this change I can install OpenSC without installing Rosetta 2 first (which I have not installed in my machine).
Since the |
|
Just use a second file with all architectures included. Then modify the build script to use the correct distribution file, e.g. something like this: diff --git a/MacOSX/build-package.in b/MacOSX/build-package.in
index 509fe0df..07d55167 100755
--- a/MacOSX/build-package.in
+++ b/MacOSX/build-package.in
@@ -58,6 +58,9 @@ export CFLAGS="$CFLAGS -isysroot $SDK_PATH"
if test -n "${BUILD_ARM}"; then
export CFLAGS="$CFLAGS -arch x86_64 -arch arm64"
export LDFLAGS="$LDFLAGS -arch x86_64 -arch arm64"
+ DISTRIBUTION_XML=MacOSX/Distribution_universal.xml
+else
+ DISTRIBUTION_XML=MacOSX/Distribution.xml
fi
export OBJCFLAGS=$CFLAGS
@@ -220,7 +223,7 @@ pkgbuild --root ${BUILDPATH}/target_token $COMPONENT_TOKEN --identifier org.open
pkgbuild --root ${BUILDPATH}/target_startup --component-plist MacOSX/target_startup.plist --identifier org.opensc-project.startup --version @PACKAGE_VERSION@ --install-location / OpenSC-startup.pkg
# Build product
-productbuild --distribution MacOSX/Distribution.xml --package-path . --resources MacOSX/resources "${imagedir}/OpenSC @[email protected]"
+productbuild --distribution $DISTRIBUTION_XML --package-path . --resources MacOSX/resources "${imagedir}/OpenSC @[email protected]"
# Sign installer
if test -n "${INSTALLER_SIGN_IDENTITY}"; then |
|
Note, that I'd like to keep support for older xcode versions, because TokenD cannot be built with the newer ones. |
|
Thank you. You also need to add the new file to MacOSX/Makefile.am. |
The Installer app assumes that the package requires Rosetta 2, unless arm64 is explicitly declared. s. https://scriptingosx.com/2020/12/platform-support-in-macos-installer-packages-pkg/
|
@frankmorgner Can this PR be included in the 0.23 release? |
|
I think it makes sense to include it in the releases, but I am not familiar with the code enough to merge it and before doing another RC with this, I would like to solve the issue with the osx build artifacts mentioned in #2426 (comment) |
|
Thank you for your contribution! |
The Installer app assumes that the package requires Rosetta 2, unless arm64 is explicitly declared.
s. https://scriptingosx.com/2020/12/platform-support-in-macos-installer-packages-pkg/
Fixes #2608