[tbb-commits] [tor-browser-bundle/maint-6.0] Bug 19269: Icon doesn't appear in Applications folder or Dock

gk at torproject.org gk at torproject.org
Thu Jul 14 08:23:39 UTC 2016


commit a444e50be76078eead724908f9154d9217ec3f91
Author: Kathy Brade <brade at pearlcrescent.com>
Date:   Wed Jul 13 15:30:49 2016 -0400

    Bug 19269: Icon doesn't appear in Applications folder or Dock
    
    On OSX, when building with DATA_OUTSIDE_APP_DIR = 1, set the
    mode on all files and directories properly so that standard
    (unprivileged) users can access all files in the app bundle.
---
 gitian/build-helpers/ddmg.sh             | 16 ++++++++++------
 gitian/descriptors/mac/gitian-bundle.yml |  3 +++
 2 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/gitian/build-helpers/ddmg.sh b/gitian/build-helpers/ddmg.sh
index cb513e8..a58e774 100755
--- a/gitian/build-helpers/ddmg.sh
+++ b/gitian/build-helpers/ddmg.sh
@@ -5,17 +5,21 @@ export LC_ALL=C
 DMGFILE=$1
 shift
 
-# We need group readability for some Macs to be able to handle /Applications
-# installation. Still unclear exactly why this is -- it is not dependent on
-# OSX version...
-find $@ -executable -exec chmod 750 {} \;
-find $@ ! -executable -exec chmod 640 {} \;
+if [ "z$DATA_OUTSIDE_APP_DIR" = "z1" ]; then
+  EXE_MODE=0755
+  OTHER_MODE=0644
+else
+  EXE_MODE=0750
+  OTHER_MODE=0640
+fi
+find $@ -executable -exec chmod $EXE_MODE {} \;
+find $@ ! -executable -exec chmod $OTHER_MODE {} \;
 
 cd $@
 find . -type f | sed -e 's/^\.\///' | sort | xargs -i echo "{}={}" > ~/build/filelist.txt
 find . -type l | sed -e 's/^\.\///' | sort | xargs -i echo "{}={}" >> ~/build/filelist.txt
 
-genisoimage -D -V "Tor Browser" -no-pad -R -apple -o ~/build/tbb-uncompressed.dmg -path-list ~/build/filelist.txt -graft-points -gid 20 -dir-mode 0750 -new-dir-mode 0750
+genisoimage -D -V "Tor Browser" -no-pad -R -apple -o ~/build/tbb-uncompressed.dmg -path-list ~/build/filelist.txt -graft-points -gid 20 -dir-mode $EXE_MODE -new-dir-mode $EXE_MODE
 
 cd ~/build
 
diff --git a/gitian/descriptors/mac/gitian-bundle.yml b/gitian/descriptors/mac/gitian-bundle.yml
index a1a4ed8..d644a56 100644
--- a/gitian/descriptors/mac/gitian-bundle.yml
+++ b/gitian/descriptors/mac/gitian-bundle.yml
@@ -71,6 +71,9 @@ script: |
   export TORBROWSER_APP="TorBrowser"
   export TORBROWSER_NAME="TorBrowserBundle"
 
+  # ddmg.sh needs DATA_OUTSIDE_APP_DIR
+  export DATA_OUTSIDE_APP_DIR
+
   if [ "z$DATA_OUTSIDE_APP_DIR" = "z1" ]; then
     DOCSPATH=Contents/Resources/TorBrowser/Docs
     EXTSPATH=Contents/Resources/distribution/extensions



More information about the tbb-commits mailing list