Skip to content

Commit

Permalink
build: Move macos specific commands out of 'packagedir'
Browse files Browse the repository at this point in the history
These 2 commands are the only things which prevent from running `make
packagedir`. Since `make packagedir` goes together with the
`packaging.sh` script, we can move these 2 commands there.
This should allow us to cross-build the macOS installer data on a linux
host, and then run the signing process on a macOS host.

An alternative would be to commit components.plist to git, which is an
option as the file does not look like it would change too often.
However, I'm not sure how to reliably detect the file has changed and
needs to be updated.
  • Loading branch information
cfergeau authored and praveenkumar committed Jan 9, 2023
1 parent 765ab68 commit ff701c9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 0 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,6 @@ packagedir: clean embed-download-darwin macos-universal-binary

cp $(BUILD_DIR)/macos-universal/crc packaging/root/"$(MACOS_INSTALL_PATH)"
cp LICENSE packaging/darwin/Resources/LICENSE.txt
pkgbuild --analyze --root packaging/root packaging/components.plist
plutil -replace BundleIsRelocatable -bool NO packaging/components.plist

$(BUILD_DIR)/macos-universal/crc-macos-installer.pkg: packagedir
./packaging/package.sh $(@D)
Expand Down
3 changes: 3 additions & 0 deletions packaging/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ binDir="${BASEDIR}/root/Applications/Red Hat OpenShift Local.app/Contents/Resour

version=$(cat "${BASEDIR}/VERSION")

pkgbuild --analyze --root ${BASEDIR}/root ${BASEDIR}/components.plist
plutil -replace BundleIsRelocatable -bool NO ${BASEDIR}/components.plist

sign "${binDir}/crc"
sign "${binDir}/crc-admin-helper-darwin"
sign "${binDir}/vfkit"
Expand Down

0 comments on commit ff701c9

Please sign in to comment.