[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



commit 3c39bce72160b9dbbf1196deea613ad8e2116eaa
Author: Kathy Brade <brade@xxxxxxxxxxxxxxxxx>
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 e36fca9..dc76b6f 100755
--- a/gitian/build-helpers/ddmg.sh
+++ b/gitian/build-helpers/ddmg.sh
@@ -5,11 +5,15 @@ 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 {} \;
 
 [ -n "$REFERENCE_DATETIME" ] && \
         find $@ -exec touch --date="$REFERENCE_DATETIME" {} \;
@@ -18,7 +22,7 @@ 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

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits