[Libreoffice-commits] core.git: bin/macos-add-entitlements-for-instruments.sh
bin/macos-add-entitlements-for-instruments.sh | 33 -- 1 file changed, 33 deletions(-) New commits: commit b76a3bdc996f275f9d615b32d6ab89d533a7505c Author: Patrick Luby AuthorDate: Sat May 20 01:03:57 2023 +0200 Commit: Patrick Luby CommitDate: Mon May 29 01:39:30 2023 +0200 Revert "Script that adds "com.apple.security.get-task-allow" entitlement to soffice" This reverts commit ff95984c8e3475b7ff7832683d621bd09896852e. Reason for revert: The script was just a quick hack that I whipped up during other development work and I didn't know how to integrate it into debug builds by default. @Christian Lohmeier reviewed the script and noted the existing build scripts that add entitlements based on build type where I can put this new entitlement. Change-Id: I4246639e99a62c63fb1ba38b19cac0442c71c0a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152031 Tested-by: Jenkins Reviewed-by: Patrick Luby diff --git a/bin/macos-add-entitlements-for-instruments.sh b/bin/macos-add-entitlements-for-instruments.sh deleted file mode 100755 index e22b4ae6db50.. --- a/bin/macos-add-entitlements-for-instruments.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash - -# Script that adds "com.apple.security.get-task-allow" entitlement to soffice -# -# To connect Xcode's Instruments application to profile LibreOffice, the -# "com.apple.security.get-task-allow" entitlement must be added to the -# soffice executable. -# -# This script will set the "com.apple.security.get-task-allow" entitlement -# instdir/LibreOfficeDev.app/Contents/MacOS/soffice executable so that -# profiling can be done using a local build. -# -# Credit for documenting this Xcode requirement goes to the following blog: -# https://cocoaphony.micro.blog/2022/10/29/solving-required-kernel.html - -SOFFICE=`dirname "$0"`/../instdir/LibreOfficeDev.app/Contents/MacOS/soffice -if [ ! -f "$SOFFICE" -o ! -x "$SOFFICE" ] ; then -echo "Error: '$SOFFICE' is not an executable file" >&2 -exit 1 -fi - -codesign -s - -v -f --entitlements /dev/stdin "$SOFFICE" << ! - -https://www.apple.com/DTDs/PropertyList-1.0.dtd"\> - - -com.apple.security.get-task-allow - - - -! - -exit 0
[Libreoffice-commits] core.git: bin/macos-add-entitlements-for-instruments.sh
bin/macos-add-entitlements-for-instruments.sh | 33 ++ 1 file changed, 33 insertions(+) New commits: commit ff95984c8e3475b7ff7832683d621bd09896852e Author: Patrick Luby AuthorDate: Thu May 18 13:47:40 2023 -0400 Commit: Patrick Luby CommitDate: Thu May 18 21:53:08 2023 +0200 Script that adds "com.apple.security.get-task-allow" entitlement to soffice To connect Xcode's Instruments application to profile LibreOffice, the "com.apple.security.get-task-allow" entitlement must be added to the soffice executable. This script will set the "com.apple.security.get-task-allow" entitlement instdir/LibreOfficeDev.app/Contents/MacOS/soffice executable so that profiling can be done using a local build. Credit for documenting this Xcode requirement goes to the following blog: https://cocoaphony.micro.blog/2022/10/29/solving-required-kernel.html Change-Id: I547edf7c1ad340267e9ed4c396fc723b7ea719be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151981 Tested-by: Jenkins Reviewed-by: Patrick Luby diff --git a/bin/macos-add-entitlements-for-instruments.sh b/bin/macos-add-entitlements-for-instruments.sh new file mode 100755 index ..e22b4ae6db50 --- /dev/null +++ b/bin/macos-add-entitlements-for-instruments.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +# Script that adds "com.apple.security.get-task-allow" entitlement to soffice +# +# To connect Xcode's Instruments application to profile LibreOffice, the +# "com.apple.security.get-task-allow" entitlement must be added to the +# soffice executable. +# +# This script will set the "com.apple.security.get-task-allow" entitlement +# instdir/LibreOfficeDev.app/Contents/MacOS/soffice executable so that +# profiling can be done using a local build. +# +# Credit for documenting this Xcode requirement goes to the following blog: +# https://cocoaphony.micro.blog/2022/10/29/solving-required-kernel.html + +SOFFICE=`dirname "$0"`/../instdir/LibreOfficeDev.app/Contents/MacOS/soffice +if [ ! -f "$SOFFICE" -o ! -x "$SOFFICE" ] ; then +echo "Error: '$SOFFICE' is not an executable file" >&2 +exit 1 +fi + +codesign -s - -v -f --entitlements /dev/stdin "$SOFFICE" << ! + +https://www.apple.com/DTDs/PropertyList-1.0.dtd"\> + + +com.apple.security.get-task-allow + + + +! + +exit 0