-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Makefile] Fix codesign of libjulia when installing it on macOS (#44510)
* [Makefile] Fix codesign of libjulia when installing it on macOS * Add shell sript for codesigning and use it in Makefile
- Loading branch information
Showing
2 changed files
with
49 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/sh | ||
# This file is a part of Julia. License is MIT: https://julialang.org/license | ||
|
||
# Codesign binary files for macOS. | ||
|
||
usage() { | ||
echo "Usage: ${0} MACOS_CODESIGN_IDENTITY FILE-OR-DIRECTORY" | ||
exit 0 | ||
} | ||
|
||
# Default codesign identity to `-` if not provided | ||
if [ -z "${1}" ]; then | ||
MACOS_CODESIGN_IDENTITY="-" | ||
ENTITLEMENTS="" | ||
else | ||
MACOS_CODESIGN_IDENTITY="${1}" | ||
ENTITLEMENTS="--entitlements $(dirname "${0}")/mac/app/Entitlements.plist" | ||
fi | ||
|
||
if [ "${#}" -eq 2 ]; then | ||
if [ -f "${2}" ]; then | ||
# Codesign only the given file | ||
MACHO_FILES="${2}" | ||
elif [ -d "${2}" ]; then | ||
# Find all files in the given directory | ||
MACHO_FILES=$(find "${2}" -type f -perm -0111 | cut -d: -f1) | ||
else | ||
usage | ||
fi | ||
else | ||
usage | ||
fi | ||
|
||
echo "Codesigning with identity ${MACOS_CODESIGN_IDENTITY}" | ||
for f in ${MACHO_FILES}; do | ||
echo "Codesigning ${f}..." | ||
codesign -s "${MACOS_CODESIGN_IDENTITY}" --option=runtime ${ENTITLEMENTS} -vvv --timestamp --deep --force "${f}" | ||
done |
8076517
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Executing the daily package evaluation, I will reply here when finished:
@nanosoldier
runtests(ALL, isdaily = true)
8076517
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your package evaluation job has completed - possible new issues were detected. A full report can be found here.