[or-cvs] First cut of code to make mac osx packages. Once this is m...

Nick Mathewson nickm at seul.org
Sun Dec 19 04:26:34 UTC 2004


Update of /home/or/cvsroot/tor/contrib/osx
In directory moria.mit.edu:/tmp/cvs-serv4872/contrib/osx

Added Files:
      Tag: tor-0_0_9-patches
	License.rtf Makefile.am PrivoxyConfDesc.plist 
	PrivoxyConfInfo.plist ReadMe.rtf StartupParameters.plist Tor 
	TorBundleDesc.plist.in TorBundleInfo.plist.in 
	TorBundleWelcome.rtf TorDesc.plist.in TorInfo.plist.in 
	TorStartupDesc.plist TorStartupInfo.plist package.sh 
	privoxy.config 
Log Message:
First cut of code to make mac osx packages.  Once this is more confirmed, port it to mainline CVS.

--- NEW FILE: License.rtf ---
{\rtf1\mac\ansicpg10000\cocoartf102
{\fonttbl\f0\fswiss\fcharset77 Helvetica;}
{\colortbl;\red255\green255\blue255;}
\margl1440\margr1440\vieww15320\viewh8060\viewkind0
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural

\f0\fs24 \cf0 Copyright (c) 2001-2004, Roger Dingledine\
Copyright (c) 2004, Roger Dingledine, Nick Mathewson\
\
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\
\
    * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\
\
    * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\
\
    * Neither the names of the copyright owners nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\
\
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\
}
--- NEW FILE: Makefile.am ---
confdir = $(sysconfdir)/tor

EXTRA_DIST = License.rtf PrivoxyConfDesc.plist PrivoxyConfInfo.plist    \
    ReadMe.rtf StartupParaeters.plist Tor TorBundleDesc.plist.in        \
    TorBundleInfo.plist.in TorBundleWelcome.rtf TorDesc.plist.in        \
    TorInfo.plist. TorStartupDesc.plist TorStartupInfo.plist            \
    package.sh privoxy.config


--- NEW FILE: PrivoxyConfDesc.plist ---
(This appears to be a binary file; contents omitted.)

--- NEW FILE: PrivoxyConfInfo.plist ---
(This appears to be a binary file; contents omitted.)

--- NEW FILE: ReadMe.rtf ---
{\rtf1\mac\ansicpg10000\cocoartf102
{\fonttbl\f0\fswiss\fcharset77 Helvetica;}
{\colortbl;\red255\green255\blue255;}
\margl1440\margr1440\vieww9000\viewh9000\viewkind0
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural

\f0\fs24 \cf0 Tor is a toolset for a wide range of organizations and people who want to improve their safety and security on the Internet. Using Tor can help you anonymize web browsing and publishing, instant messaging, IRC, SSH, and more. Tor also provides a platform on which software developers can build new applications with built-in anonymity, safety, and privacy features.}
--- NEW FILE: StartupParameters.plist ---
(This appears to be a binary file; contents omitted.)

--- NEW FILE: Tor ---
#!/bin/sh

##
# Tor Service
##

. /etc/rc.common

StartService ()
{

    if [ -f /usr/local/bin/tor ]; then
        if pid=$(GetPID Tor); then
            return 0
        else
		ConsoleMessage "Starting Tor Service"
# Tentative
# Making sure it is not running (I know it is not a best approarch)
		killall tor
		/usr/local/bin/tor -f /usr/local/etc/tor/torrc --runasdaemon 1 --pidfile /var/run/Tor.pid &
	fi
    fi
}

StopService ()
{
    if pid=$(GetPID Tor); then
	ConsoleMessage "Stopping Tor Service"
	kill -TERM "${pid}"
# Just for sanity (sometimes necessary.)
	killall tor
    else
	ConsoleMessage "Tor Service not responding."
# Just for sanity (sometimes necessary.)	
	killall tor
    fi
}

RestartService () { StopService; StartService; }

RunService "$1"

--- NEW FILE: TorBundleDesc.plist.in ---
(This appears to be a binary file; contents omitted.)

--- NEW FILE: TorBundleInfo.plist.in ---
(This appears to be a binary file; contents omitted.)

--- NEW FILE: TorBundleWelcome.rtf ---
{\rtf1\mac\ansicpg10001\cocoartf102
{\fonttbl\f0\fswiss\fcharset77 Helvetica;\f1\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.\
\

\f1\b Tor and Privoxy are separate product.\
It is packaged together for your convenience.
\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\
others to do so.\
\
For more information, please visit http://www.freehaven.net/tor/\
\
Privoxy stands between your web browser and tor to make your web surfing experience safer.\
\
For more information, please visit http://www.privoxy.org/}
--- NEW FILE: TorDesc.plist.in ---
(This appears to be a binary file; contents omitted.)

--- NEW FILE: TorInfo.plist.in ---
(This appears to be a binary file; contents omitted.)

--- NEW FILE: TorStartupDesc.plist ---
(This appears to be a binary file; contents omitted.)

--- NEW FILE: TorStartupInfo.plist ---
(This appears to be a binary file; contents omitted.)

--- NEW FILE: package.sh ---
#!/bin/sh

if [ "XX$VERSION" = 'XX' ]; then
  echo "VERSION not set."
  exit 1
fi

PREFIX=/usr/local
BUILD_DIR=/tmp/tor-osx-$$
PRIVOXY_PKG_ZIP=~/src/privoxy-setup/privoxyosx_setup_3.0.3.zip
PACKAGEMAKER=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker

umask 022

rm -rf $BUILD_DIR
mkdir $BUILD_DIR || exit 1
for subdir in tor_packageroot tor_resources \
              torstartup_packageroot \
              privoxyconf_packageroot \
              torbundle_resources \
              output; do
    mkdir $BUILD_DIR/$subdir
done

make install DESTDIR=$BUILD_DIR/tor_packageroot
cp contrib/osx/ReadMe.rtf $BUILD_DIR/tor_resources
cp contrib/osx/License.rtf $BUILD_DIR/tor_resources
cat <<EOF > $BUILD_DIR/tor_resources/Welcome.txt
Tor: an anonymous Internet communication system

Tor is a system for using the internet anonymously, and allowing
others to do so.
EOF

$PACKAGEMAKER -build              \
    -p $BUILD_DIR/output/Tor.pkg  \
    -f $BUILD_DIR/tor_packageroot \
    -r $BUILD_DIR/tor_resources   \
    -i contrib/osx/TorInfo.plist  \
    -d contrib/osx/TorDesc.plist

mkdir -p $BUILD_DIR/privoxyconf_packageroot/Library/Privoxy
cp contrib/osx/privoxy.config $BUILD_DIR/privoxyconf_packageroot/Library/Privoxy/config

$PACKAGEMAKER -build                      \
    -p $BUILD_DIR/output/privoxyconf.pkg  \
    -f $BUILD_DIR/privoxyconf_packageroot \
    -i contrib/osx/PrivoxyConfInfo.plist \
    -i contrib/osx/PrivoxyConfDesc.plist

mkdir -p $BUILD_DIR/torstartup_packageroot/System/Library/StartupItems/Tor
cp contrib/osx/Tor contrib/osx/StartupParameters.plist \
   $BUILD_DIR/torstartup_packageroot/System/Library/StartupItems/Tor

$PACKAGEMAKER -build                    \
    -p $BUILD_DIR/output/torstartup.pkg \
    -f $BUILD_DIR/torstartup_packageroot \
    -i contrib/osx/TorStartupInfo.plist \
    -i contrib/osx/TorStartupDesc.plist


## Ug! Packagemaker won't buld metapackages.

MPKG=$BUILD_DIR/output/Tor\ Bundle.mpkg
mkdir -p "$MPKG/Contents/Resources"
echo -n "pmkrpkg1" > "$MPKG/Contents/PkgInfo"
cp contrib/osx/ReadMe.rtf "$MPKG/Contents/Resources"
cp contrib/osx/License.rtf "$MPKG/Contents/Resources"
cp contrib/osx/TorBundleInfo.plist "$MPKG/Contents/Info.plist"
cp contrib/osx/TorBundleWelcome.rtf "$MPKG/Contents/Resources/Welcome.rtf"
cp contrib/osx/TorBundleDesc.plist "$MPKG/Contents/Resources/Description.plist"

mkdir $BUILD_DIR/output/.contained_packages
mv $BUILD_DIR/output/*.pkg $BUILD_DIR/OUTPUT/.contained_packages
( cd $BUILD_DIR/output/.contained_packages && unzip $PRIVOXY_PKG_ZIP && find Privoxy.pkg -type d | xargs chmod u+w )

PRIVOXY_RESDIR=$BUILD_DIR/output/.contained_packages/Privoxy.pkg/Contents/Resources
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 contrib/osx/License.rtf $BUILD_DIR/output/Tor\ License.rtf

DOC=$BUILD_DIR/output/Documents
mkdir $DOC
cp doc/tor-doc.html doc/tor-doc.css $DOC
cp AUTHORS $DOC/AUTHORS.txt
groff doc/tor.1 -T ps -m man | ps2pdf - $DOC/tor-reference.pdf
groff doc/tor-resolve.1 -T ps -m man | ps2pdf - $DOC/tor-resolve.pdf

mkdir $DOC/Advanced
cp doc/tor-spec.txt doc/rend-spec.txt doc/control-spec.txt doc/socks-extensions.txt $DOC/Advanced
cp doc/CLIENTS $DOC/Advanced/CLIENTS.txt
cp doc/HACKING $DOC/Advanced/HACKING.txt
cp ChangeLog $DOC/Advanced/ChangeLog.txt

mv $BUILD_DIR/output "$BUILD_DIR/Tor $VERSION Bundle"
rm -f "Tor $VERSION Bundle.dmg"
hdiutil create -format UDZO -srcfolder "$BUILD_DIR/Tor $VERSION Bundle" "Tor $VERSION Bundle.dmg"

rm -rf $BUILD_DIR

--- NEW FILE: privoxy.config ---
#        Sample Configuration File for Privoxy v3.0.x
#  
#  Copyright (C) 2001-2004 Privoxy Developers http://privoxy.org
#  
#  $Id: privoxy.config,v 1.1.2.1 2004/12/19 04:26:30 nickm Exp $
#  
####################################################################
#                                                                  #
#                      Table of Contents                           #
#                                                                  #
#        I. INTRODUCTION                                           #
#       II. FORMAT OF THE CONFIGURATION FILE                       #
#                                                                  #
#        1. CONFIGURATION AND LOG FILE LOCATIONS                   #
#        2. LOCAL SET-UP DOCUMENTATION                             #
#        3. DEBUGGING                                              #
#        4. ACCESS CONTROL AND SECURITY                            #
#        5. FORWARDING                                             #
#        6. WINDOWS GUI OPTIONS                                    #
[...1034 lines suppressed...]
#log-font-size 8

#  "show-on-task-bar" controls whether or not Privoxy will appear as
#  a button on the Task bar when minimized:
#  
#show-on-task-bar 0

#  If "close-button-minimizes" is set to 1, the Windows close button
#  will minimize Privoxy instead of closing the program (close with
#  the exit option on the File menu).
#  
#close-button-minimizes 1

#  The "hide-console" option is specific to the MS-Win console version
#  of Privoxy.  If this option is used, Privoxy will disconnect from
#  and hide the command console.
#  
#hide-console

#  



More information about the tor-commits mailing list