Q
I have updated my Mac to macOS Sierra. Since then, when I build my projects with Packages, the builds fail. Am I cursed?
A
No, you are not cursed. At least, as far as I know. It's a compatibility issue between Packages and macOS Sierra.
There are actually 2 problems:
- Packages uses deprecated security APIs to sign the distributions and raw packages as it needs to work on Mac OS X 10.5 and later. And since macOS Sierra, at least one of those deprecated APIs is now broken. Hence the build failure.
- Signing with the current versions of Packages has not been recommended for some time as it produces packages that may not be considered properly signed on Mac OS X 10.5. See Caution: Gatekeeper and the Developer ID Installer Certificate.
Signing your built distributions or raw packages on macOS Sierra
As described in the documentation, you can use the productsign(1) command line tool to sign the distributions or raw packages produced by Packages.
$ /usr/bin/productsign --sign "Developer ID Installer: xxxxxx" distribution.pkg signedDistribution.pkg
Signing from the Terminal
You can also create a shell script to both build the project and sign the distribution or package:
#!/bin/sh
/usr/local/bin/packagesbuild /the/path/to/your/packagesProject.pkgproj
/usr/bin/productsign --sign "Developer ID Installer: xxxxxx" /the/path/to/your/build/distribution.pkg \
/the/path/to/your/build/signedDistribution.pkg
exit 0
build-and-sign.sh
About the update that should fix this compatibility issue
Sorry, no minor updates have been released so far to fix this compatibility issue. For a few good and less than good reasons:
- Fixing the issue would prevent Packages from running on Mac OS X 10.5 or on a PowerPC-based Mac.
- Packages was built so far on Mac OS X 10.5 and signed on Mac OS X 10.6.
- Changing the build environment would require more work than just fix the signing issue.
- I had already started updating the entire code base to support more modern APIs.
So, good news: there will a Packages update in 2017. Q2 seemed a reasonable target. QA tests should be finished for Q3.
This update will bring the following changes:
- Packages.app won't run on PowerPC-based Mac. If the contents of your distribution or packages can be installed on a PowerPC-based Mac, this will still be the case.
- OS X 10.8 required to run Packages. Built distributions and packages will still be compatible with Mac OS X 10.5 and later.
- No more need to use
productsign
as long as you don't need timestamp for the signatures.
- Code based on more modern APIs.
- Latest version of the source code available on GitHub: packages.
At the time of this writing:
- The command line tools are 100% completed.
- The development phase is about to be completed. The raw package project editor is 100% done. The distribution project editor is 99.9% complete.
- QA tests are being completed.
- Latest builds are available at the following URLs:
Revision History |
09/23/17 | Status update (download links for builds added) |
08/30/17 | Status update |
08/17/17 | Status update (apfs compatibility issue addressed) |
07/23/17 | Status update |
07/09/17 | Status update |
07/03/17 | Status update |
05/21/17 | Status update |
04/15/17 | Status update |
03/30/17 | Status update |
01/19/17 | First version |