Introducing Torbutton integration to the Tor-Privoxy OSX bundle.

svn:r11938
This commit is contained in:
Andrew Lewman
2007-10-15 04:04:16 +00:00
parent 3dfb943d1f
commit d0eda6dbb0
9 changed files with 92 additions and 28 deletions
+2 -1
View File
@@ -8,4 +8,5 @@ EXTRA_DIST = PrivoxyConfDesc.plist PrivoxyConfInfo.plist \
TorInfo.plist.in TorStartupDesc.plist.in TorStartupInfo.plist \
package.sh privoxy.config TorPostflight addsysuser \
Tor_Uninstaller.applescript uninstall_tor_bundle.sh \
package_list.txt tor_logo.gif TorPreFlight
package_list.txt tor_logo.gif TorPreFlight TorbuttonInfo.plist \
TorbuttonDesc.plist
+2 -2
View File
@@ -5,9 +5,9 @@
<key>IFPkgDescriptionDeleteWarning</key>
<string></string>
<key>IFPkgDescriptionDescription</key>
<string>Bundled package of Tor @VERSION@ and Privoxy.</string>
<string>Bundled package of Tor @VERSION@, Privoxy 3.0.6, and Torbutton.</string>
<key>IFPkgDescriptionTitle</key>
<string>Tor - Privoxy Bundle</string>
<string>Tor - Privoxy - Torbutton Bundle</string>
<key>IFPkgDescriptionVersion</key>
<string>@VERSION@</string>
</dict>
+6
View File
@@ -38,6 +38,12 @@
<key>IFPkgFlagPackageSelection</key>
<string>selected</string>
</dict>
<dict>
<key>IFPkgFlagPackageLocation</key>
<string>torbutton.pkg</string>
<key>IFPkgFlagPackageSelection</key>
<string>selected</string>
</dict>
</array>
<key>IFPkgFormatVersion</key>
<real>0.10000000149011612</real>
+25 -10
View File
@@ -1,23 +1,38 @@
{\rtf1\mac\ansicpg10000\cocoartf102
{\fonttbl\f0\fswiss\fcharset77 Helvetica;\f1\fswiss\fcharset77 Helvetica-Bold;}
{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf420
{\fonttbl\f0\fswiss\fcharset77 Helvetica;\f1\fswiss\fcharset77 Helvetica-Oblique;\f2\fswiss\fcharset77 Helvetica-Bold;
}
{\colortbl;\red255\green255\blue255;}
\paperw11900\paperh16840\margl1440\margr1440\vieww9000\viewh9000\viewkind0
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural
\f0\fs24 \cf0 Welcome to Tor - Privoxy Bundle installer.\
This will install Tor and privoxy in your computer.\
\f0\fs24 \cf0 Welcome to Tor - Privoxy - Torbutton Bundle installer.\
This will install Tor, Privoxy, and Torbutton in your computer.\
\
\f1\b Tor and Privoxy are separate products.\
\f1\i Tor, Privoxy, and Torbutton are separate products.\
They are packaged together for your convenience.
\f2\i0\b \
\f0\b0 \
\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
\cf0 Tor is a system for using the Internet anonymously, and allowing\
\f2\b \cf0 Tor
\f0\b0 is a system for using the Internet anonymously, and allowing\
others to do so.\
\
For more information, please visit http://tor.eff.org/\
For more information, please visit https://tor.eff.org/\
\
Privoxy stands between your web browser and Tor to make your web surfing experience safer.\
\f2\b Privoxy
\f0\b0 stands between your web browser and Tor to make your web surfing experience safer.\
\
For more information, please visit http://www.privoxy.org/}
For more information, please visit http://www.privoxy.org/\
\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
\f2\b \cf0 Torbutton
\f0\b0 is a 1-click way for Firefox users to enable or disable the browser's use of Tor.
\f1\i Torbutton will not install if you do not have Firefox installed.
\f0\i0 \
\
For more information, please visit https://torbutton.torproject.org/}
+20 -3
View File
@@ -13,6 +13,7 @@ TORGROUP=daemon
TARGET=$2/Library/Tor
TORDIR=$TARGET/var/lib/tor
LOGFILE=/var/log/tor.log
TORBUTTON_VERSION="1.1.8-alpha"
# Check defaults for TARGET
if [ "$TARGET" == "//Library/Tor" ]; then
@@ -40,7 +41,7 @@ fi
# Create the configuration file only if there wasn't one already.
if [ ! -f $TARGET/torrc ]; then
cp $TARGET/torrc.sample $TARGET/torrc.sample
cp $TARGET/torrc.sample $TARGET/torrc
fi
# Ensure symbolic links
@@ -70,12 +71,12 @@ fi
# Copy Uninstaller
if [ -f $PACKAGE_PATH/Contents/Resources/Tor_Uninstaller.applescript ]; then
cp $PACKAGE_PATH/Contents/Resources/Tor_Uninstaller.applescript $TARGET/Tor_Uninstaller.applescript
chmod 555 $TARGET/Tor_Uninstaller.applescript
chmod 550 $TARGET/Tor_Uninstaller.applescript
fi
if [ -f $PACKAGE_PATH/Contents/Resources/uninstall_tor_bundle.sh ]; then
cp $PACKAGE_PATH/Contents/Resources/uninstall_tor_bundle.sh $TARGET/uninstall_tor_bundle.sh
chmod 555 $TARGET/uninstall_tor_bundle.sh
chmod 550 $TARGET/uninstall_tor_bundle.sh
fi
if [ -f $PACKAGE_PATH/Contents/Resources/package_list.txt ]; then
@@ -86,3 +87,19 @@ if [ -d /Library/StartupItems/Tor ]; then
rm -f /Library/StartupItems/Tor/Tor.loc
echo "$TARGET" > /Library/StartupItems/Tor/Tor.loc
fi
if [ -f /Applications/Firefox.app/Contents/MacOS/firefox ]; then
if [ -f $TARGET/torbutton-$TORBUTTON_VERSION.xpi ]; then
/Applications/Firefox.app/Contents/MacOS/firefox -install-global-extension $TARGET/torbutton-$TORBUTTON_VERSION.xpi
# The following is a kludge to get around the fact that the installer
# runs as root. This means the Torbutton extension will install with
# root permissions; thereby making uninstalling Torbutton from inside
# Firefox impossible. The user will be caught in an endless loop of
# uninstall -> automatic re-installation of Torbutton. The OSX
# installer doesn't tell you the owner of Firefox, therefore we have to
# parse it.
USR=`ls -alrt /Applications/Firefox.app/Contents/MacOS/extensions/ | tail -1 | awk '{print $3}'`
GRP=`ls -alrt /Applications/Firefox.app/Contents/MacOS/extensions/ | tail -1 | awk '{print $4}'`
chown -R $USR:$GRP /Applications/Firefox.app/Contents/MacOS/extensions/
fi
fi
+3 -3
View File
@@ -16,8 +16,8 @@ fi
# Backup all of Tor, just in case
if [ -d $TORPATH ]; then
cp ${TORPATH}/torrc ${TORPATH}/torrc.installer-saved
cp ${PRIVOXYPATH}/config ${PRIVOXYPATH}/config.installer-saved
cp ${PRIVOXYPATH}/user.action ${PRIVOXYPATH}/user.action.installer-saved
cp $TORPATH/torrc $TORPATH/torrc.installer-saved
cp $PRIVOXYPATH/config $PRIVOXYPATH/config.installer-saved
cp $PRIVOXYPATH/user.action $PRIVOXYPATH/user.action.installer-saved
fi
+32 -8
View File
@@ -8,6 +8,7 @@
# - One for Privoxy.
# - One for a tor-specific privoxy configuration script.
# - One for Startup scripts for Tor.
# - One for Torbutton, an extension for FireFox
#
# This script expects to be run from the toplevel makefile, with VERSION
# set to the latest Tor version, and Tor already built.
@@ -20,6 +21,11 @@
# privoxy lives somewhere else.
PRIVOXY_PKG_ZIP=~/tmp/privoxyosx_setup_3.0.6.zip
# Where have we put the xpi and license for Torbutton? Edit this if your
# torbutton and torbutton license live somewhere else.
TORBUTTON_PATH=~/tmp/torbutton-1.1.8-alpha.xpi
TORBUTTON_LIC_PATH=~/tmp/LICENSE
###
# Helpful info on OS X packaging:
# http://developer.apple.com/documentation/DeveloperTools/Conceptual/SoftwareDistribution/index.html
@@ -66,11 +72,13 @@ for subdir in tor_packageroot tor_resources \
torstartup_packageroot \
privoxyconf_packageroot \
torbundle_resources \
torbutton_packageroot \
output; do
mkdir $BUILD_DIR/$subdir
done
### Make Tor package.
make install DESTDIR=$BUILD_DIR/tor_packageroot
#mv $BUILD_DIR/tor_packageroot/Library/Tor/torrc.sample $BUILD_DIR/tor_packageroot/Library/Tor/torrc
cp contrib/osx/ReadMe.rtf $BUILD_DIR/tor_resources
@@ -139,16 +147,31 @@ $PACKAGEMAKER -build \
### Make Startup Script package
mkdir -p $BUILD_DIR/torstartup_packageroot/Library/StartupItems/Tor
cp contrib/osx/Tor contrib/osx/StartupParameters.plist \
mkdir -p $BUILD_DIR/torstartup_packageroot/Library/StartupItems/Tor
cp contrib/osx/Tor contrib/osx/StartupParameters.plist \
$BUILD_DIR/torstartup_packageroot/Library/StartupItems/Tor
find $BUILD_DIR/torstartup_packageroot -print0 | sudo xargs -0 chown root:wheel
$PACKAGEMAKER -build \
-p $BUILD_DIR/output/torstartup.pkg \
-f $BUILD_DIR/torstartup_packageroot \
-i contrib/osx/TorStartupInfo.plist \
-d contrib/osx/TorStartupDesc.plist
find $BUILD_DIR/torstartup_packageroot -print0 | sudo xargs -0 chown root:wheel
$PACKAGEMAKER -build \
-p $BUILD_DIR/output/torstartup.pkg \
-f $BUILD_DIR/torstartup_packageroot \
-i contrib/osx/TorStartupInfo.plist \
-d contrib/osx/TorStartupDesc.plist
### Make Torbutton Installation package
mkdir -p $BUILD_DIR/torbutton_packageroot/Library/Torbutton
cp $TORBUTTON_PATH $BUILD_DIR/torbutton_packageroot/Library/Torbutton/
cp $TORBUTTON_LIC_PATH $BUILD_DIR/torbutton_packageroot/Library/Torbutton/Torbutton-LICENSE.txt
find $BUILD_DIR/torbutton_packageroot -print0 | sudo xargs -0 chown root:wheel
$PACKAGEMAKER -build \
-p $BUILD_DIR/output/torbutton.pkg \
-f $BUILD_DIR/torbutton_packageroot \
-i contrib/osx/TorbuttonInfo.plist \
-d contrib/osx/TorbuttonDesc.plist
### Assemble the metapackage. Packagemaker won't buld metapackages from
# the command line, so we need to do it by hand.
@@ -175,6 +198,7 @@ cp $PRIVOXY_RESDIR/License.html $BUILD_DIR/output/Privoxy\ License.html
cp $PRIVOXY_RESDIR/ReadMe.txt $BUILD_DIR/output/Privoxy\ ReadMe.txt
cp contrib/osx/ReadMe.rtf $BUILD_DIR/output/Tor\ ReadMe.rtf
cp LICENSE $BUILD_DIR/output/Tor\ License.txt
cp $TORBUTTON_LIC_PATH $BUILD_DIR/output/Torbutton_LICENSE.txt
### Package it all into a DMG
+1
View File
@@ -3,3 +3,4 @@ Privoxy
torstartup
privoxyconf
Vidalia
torbutton
+1 -1
View File
@@ -134,7 +134,7 @@ fi
## clean up
echo ". Cleaning up"
rm -rf $TEMP_BOM_CONTENTS
rm -rf /Library/Privoxy/ /Library/StartupItems/Privoxy/ /Library/Tor/ /Library/StartupItems/Tor/
rm -rf /Library/Privoxy/ /Library/StartupItems/Privoxy/ /Library/Tor/ /Library/StartupItems/Tor/ /Library/Torbutton/
echo ". Finished"