]> git.lyx.org Git - features.git/commitdiff
Make the directories in LyX application bundle read only.
authorStephan Witt <switt@lyx.org>
Fri, 21 Feb 2020 17:04:28 +0000 (18:04 +0100)
committerStephan Witt <switt@lyx.org>
Fri, 22 May 2020 05:24:01 +0000 (07:24 +0200)
Python produces files with cached on-the-fly compiled code on disk inside the bundle.
This should be avoided in case of a signed application bundle.

(cherry picked from commit ca7defab45a685bbc0303c32b94afb5ec98d4118)

development/LyX-Mac-binary-release.sh

index 64d350ce7cabed4a5e8f5e7dafca82148318a505..9bd196dbc71212e33d084bad2c3b158b238f6d9b 100644 (file)
@@ -633,7 +633,10 @@ LYX_BUNDLE_PATH="${LyxAppPrefix}/${BUNDLE_PATH}"
 build_lyx() {
        # Clear Output
        if [ -n "${LyxAppZip}" -a -f "${LyxAppZip}" ]; then rm "${LyxAppZip}"; fi
-       if [ -d "${LyxAppPrefix}" ]; then rm -rf "${LyxAppPrefix}"; fi
+       if [ -d "${LyxAppPrefix}" ]; then
+               find "${LyxAppPrefix}" -type d -exec chmod u+w '{}' \;
+               rm -rf "${LyxAppPrefix}"
+       fi
 
        case "${EnableCXX11}" in
        "--enable-cxx11")
@@ -1013,7 +1016,7 @@ make_dmg() {
        VOLUME=$(mount |grep ${DEVICE} | cut -f 3 -d ' ')
 
        # copy in the application bundle
-       ditto --hfsCompression "${LyxAppDir}.app" "${VOLUME}/${LyxName}.app"
+       ditto --hfsCompression "${LyxAppPrefix}" "${VOLUME}/${LyxName}.app"
 
        # copy in background image
        mkdir -p "${VOLUME}/Pictures"
@@ -1067,5 +1070,6 @@ if [ ${LyxOnlyPackage:-"no"} = "no" ]; then
        convert_universal
        copy_dictionaries
        test -n "${CODESIGN_IDENTITY}" && code_sign "${LYX_BUNDLE_PATH}"
+       find "${LyxAppPrefix}" -type d -exec chmod a-w '{}' \;
 fi
 build_package