From fcdf1470c04b5ef19a7b9d28a48401f4d5c17293 Mon Sep 17 00:00:00 2001 From: Sebastian Hahn Date: Mon, 11 Oct 2010 18:47:14 +0200 Subject: Remove everything related to os x expert package We decided to no longer ship expert packages for OS X because they're a lot of trouble to keep maintained and confuse users. For those who want a tor on OS X without Vidalia, macports is a fine option. Alternatively, building from source is easy, too. The polipo stuff that is still required for the Vidalia bundle build can now be found in the torbrowser repository, git://git.torproject.org/torbrowser.git. --- contrib/polipo/Makefile.osx | 103 ------------------------------ contrib/polipo/Makefile.osx-panther | 97 ---------------------------- contrib/polipo/Polipo | 40 ------------ contrib/polipo/PolipoDesc.plist | 10 --- contrib/polipo/PolipoInfo.plist | 28 -------- contrib/polipo/PolipoPostflight | 50 --------------- contrib/polipo/README | 19 ++---- contrib/polipo/StartupParameters.plist | 11 ---- contrib/polipo/addsysuser | 68 -------------------- contrib/polipo/package.sh | 87 ------------------------- contrib/polipo/uninstall_polipo_bundle.sh | 100 ----------------------------- 11 files changed, 4 insertions(+), 609 deletions(-) delete mode 100644 contrib/polipo/Makefile.osx delete mode 100644 contrib/polipo/Makefile.osx-panther delete mode 100644 contrib/polipo/Polipo delete mode 100644 contrib/polipo/PolipoDesc.plist delete mode 100644 contrib/polipo/PolipoInfo.plist delete mode 100644 contrib/polipo/PolipoPostflight delete mode 100644 contrib/polipo/StartupParameters.plist delete mode 100644 contrib/polipo/addsysuser delete mode 100644 contrib/polipo/package.sh delete mode 100644 contrib/polipo/uninstall_polipo_bundle.sh (limited to 'contrib/polipo') diff --git a/contrib/polipo/Makefile.osx b/contrib/polipo/Makefile.osx deleted file mode 100644 index 55ed1c62f..000000000 --- a/contrib/polipo/Makefile.osx +++ /dev/null @@ -1,103 +0,0 @@ -PREFIX = /Library/Polipo -BINDIR = $(PREFIX)/bin -MANDIR = $(PREFIX)/man -INFODIR = $(PREFIX)/info -LOCAL_ROOT = $(PREFIX)/www -DISK_CACHE_ROOT = $(PREFIX)/cache - -CC = gcc -# CDEBUGFLAGS = -Os -g -Wall -std=gnu99 -CDEBUGFLAGS = -Os -g -Wall - -FILE_DEFINES = -DLOCAL_ROOT=\"$(LOCAL_ROOT)/\" \ - -DDISK_CACHE_ROOT=\"$(DISK_CACHE_ROOT)/\" - -# You may optionally also add any of the following to DEFINES: -# -# -DNO_DISK_CACHE to compile out the on-disk cache and local web server; -# -DNO_IPv6 to avoid using the RFC 3493 API and stick to stock -# Berkeley sockets; -# -DHAVE_IPv6 to force the use of the RFC 3493 API on systems other -# than GNU/Linux and BSD (let me know if it works); -# -DNO_FANCY_RESOLVER to compile out the asynchronous name resolution -# code; -# -DNO_STANDARD_RESOLVER to compile out the code that falls back to -# gethostbyname/getaddrinfo when DNS requests fail; -# -DNO_TUNNEL to compile out the code that handles CONNECT requests; -# -DNO_SOCKS to compile out the SOCKS gateway code. -# -DNO_FORBIDDEN to compile out the all of the forbidden URL code -# -DNO_REDIRECTOR to compile out the Squid-style redirector code - -DEFINES = $(FILE_DEFINES) $(PLATFORM_DEFINES) - -# Uncomment the UNIVERSAL, LDFLAGS, CFLAGS lines if you want universal binaries, otherwise -# you'll produce a binary only for your architecture and version of OSX -# UNIVERSAL = -O -g -mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc -# LDFLAGS = -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk -# CFLAGS = $(MD5INCLUDES) $(CDEBUGFLAGS) $(DEFINES) $(EXTRA_DEFINES) $(UNIVERSAL) -# If you uncommented the above CFLAGS, remove this next one. -CFLAGS = $(MD5INCLUDES) $(CDEBUGFLAGS) $(DEFINES) $(EXTRA_DEFINES) - -SRCS = util.c event.c io.c chunk.c atom.c object.c log.c diskcache.c main.c \ - config.c local.c http.c client.c server.c auth.c tunnel.c \ - http_parse.c parse_time.c dns.c forbidden.c \ - md5import.c md5.c ftsimport.c fts_compat.c socks.c - -OBJS = util.o event.o io.o chunk.o atom.o object.o log.o diskcache.o main.o \ - config.o local.o http.o client.o server.o auth.o tunnel.o \ - http_parse.o parse_time.o dns.o forbidden.o \ - md5import.o ftsimport.o socks.o - -polipo: $(OBJS) - $(CC) $(CFLAGS) $(LDFLAGS) -o polipo $(OBJS) $(MD5LIBS) $(LDLIBS) - -ftsimport.o: ftsimport.c fts_compat.c - -md5import.o: md5import.c md5.c - -.PHONY: all install install.binary install.man - -all: polipo - -install: install.binary install.man - -install.binary: all - mkdir -p $(TARGET)$(BINDIR) - mkdir -p $(TARGET)$(LOCAL_ROOT) - mkdir -p $(TARGET)$(LOCAL_ROOT)/doc - mkdir -p $(TARGET)$(DISK_CACHE_ROOT) - cp -f polipo $(TARGET)$(BINDIR)/ - cp -f localindex.html $(TARGET)$(LOCAL_ROOT)/index.html - cp -f config.osx $(TARGET)$(LOCAL_ROOT)/config - texi2html polipo.texi && cp -f polipo.html $(TARGET)$(LOCAL_ROOT)/doc/index.html - groff polipo.man -T ps -m man | pstopdf -i -o $(TARGET)/polipo.pdf - mkdir -p /Library/StartupItems/Polipo - cp -f contrib/Polipo /Library/StartupItems/Polipo/ - cp -f contrib/StartupParameters.plist /Library/StartupItems/Polipo/ - echo "POLIPO=-YES-" >> /etc/hostconfig - -install.man: all - mkdir -p $(TARGET)$(MANDIR)/man1 - cp -f polipo.man $(TARGET)$(MANDIR)/man1/polipo.1 - -TAGS: $(SRCS) - etags $(SRCS) - -.PHONY: clean - -clean: - -rm -f polipo *.o *~ core TAGS gmon.out - -rm -f polipo.cp polipo.fn polipo.log polipo.vr - -rm -f polipo.cps polipo.info* polipo.pg polipo.toc polipo.vrs - -rm -f polipo.aux polipo.dvi polipo.ky polipo.ps polipo.tp - -rm -f polipo.dvi polipo.ps polipo.ps.gz polipo.pdf polipo.html - -rm -rf ./html/ - -rm -f polipo.man.html - -.PHONY: uninstall - -uninstall: - rm -rf /Library/Polipo - rm -rf /Library/StartupItems/Polipo - cp -f /etc/hostconfig /etc/hostconfig.polipo.saved - cat /etc/hostconfig.polipo.saved | grep -v POLIPO > /etc/hostconfig diff --git a/contrib/polipo/Makefile.osx-panther b/contrib/polipo/Makefile.osx-panther deleted file mode 100644 index d1d24d1f3..000000000 --- a/contrib/polipo/Makefile.osx-panther +++ /dev/null @@ -1,97 +0,0 @@ -PREFIX = /Library/Polipo -BINDIR = $(PREFIX)/bin -MANDIR = $(PREFIX)/man -INFODIR = $(PREFIX)/info -LOCAL_ROOT = $(PREFIX)/www -DISK_CACHE_ROOT = $(PREFIX)/cache - -CC = gcc -# CDEBUGFLAGS = -Os -g -Wall -std=gnu99 -CDEBUGFLAGS = -Os -g -Wall - -FILE_DEFINES = -DLOCAL_ROOT=\"$(LOCAL_ROOT)/\" \ - -DDISK_CACHE_ROOT=\"$(DISK_CACHE_ROOT)/\" - -# You may optionally also add any of the following to DEFINES: -# -# -DNO_DISK_CACHE to compile out the on-disk cache and local web server; -# -DNO_IPv6 to avoid using the RFC 3493 API and stick to stock -# Berkeley sockets; -# -DHAVE_IPv6 to force the use of the RFC 3493 API on systems other -# than GNU/Linux and BSD (let me know if it works); -# -DNO_FANCY_RESOLVER to compile out the asynchronous name resolution -# code; -# -DNO_STANDARD_RESOLVER to compile out the code that falls back to -# gethostbyname/getaddrinfo when DNS requests fail; -# -DNO_TUNNEL to compile out the code that handles CONNECT requests; -# -DNO_SOCKS to compile out the SOCKS gateway code. -# -DNO_FORBIDDEN to compile out the all of the forbidden URL code -# -DNO_REDIRECTOR to compile out the Squid-style redirector code - -DEFINES = $(FILE_DEFINES) $(PLATFORM_DEFINES) - -CFLAGS = $(MD5INCLUDES) $(CDEBUGFLAGS) $(DEFINES) $(EXTRA_DEFINES) - -SRCS = util.c event.c io.c chunk.c atom.c object.c log.c diskcache.c main.c \ - config.c local.c http.c client.c server.c auth.c tunnel.c \ - http_parse.c parse_time.c dns.c forbidden.c \ - md5import.c md5.c ftsimport.c fts_compat.c socks.c - -OBJS = util.o event.o io.o chunk.o atom.o object.o log.o diskcache.o main.o \ - config.o local.o http.o client.o server.o auth.o tunnel.o \ - http_parse.o parse_time.o dns.o forbidden.o \ - md5import.o ftsimport.o socks.o - -polipo: $(OBJS) - $(CC) $(CFLAGS) $(LDFLAGS) -o polipo $(OBJS) $(MD5LIBS) $(LDLIBS) - -ftsimport.o: ftsimport.c fts_compat.c - -md5import.o: md5import.c md5.c - -.PHONY: all install install.binary install.man - -all: polipo - -install: install.binary install.man - -install.binary: all - mkdir -p $(TARGET)$(BINDIR) - mkdir -p $(TARGET)$(LOCAL_ROOT) - mkdir -p $(TARGET)$(LOCAL_ROOT)/doc - mkdir -p $(TARGET)$(DISK_CACHE_ROOT) - cp -f polipo $(TARGET)$(BINDIR)/ - cp -f localindex.html $(TARGET)$(LOCAL_ROOT)/index.html - cp -f config.osx $(TARGET)$(LOCAL_ROOT)/config - texi2html polipo.texi && cp -f polipo.html $(TARGET)$(LOCAL_ROOT)/doc/index.html - groff polipo.man -T ps -m man | pstopdf -i -o $(TARGET)/polipo.pdf - mkdir -p /Library/StartupItems/Polipo - cp -f contrib/Polipo /Library/StartupItems/Polipo/ - cp -f contrib/StartupParameters.plist /Library/StartupItems/Polipo/ - echo "POLIPO=-YES-" >> /etc/hostconfig - -install.man: all - mkdir -p $(TARGET)$(MANDIR)/man1 - cp -f polipo.man $(TARGET)$(MANDIR)/man1/polipo.1 - -TAGS: $(SRCS) - etags $(SRCS) - -.PHONY: clean - -clean: - -rm -f polipo *.o *~ core TAGS gmon.out - -rm -f polipo.cp polipo.fn polipo.log polipo.vr - -rm -f polipo.cps polipo.info* polipo.pg polipo.toc polipo.vrs - -rm -f polipo.aux polipo.dvi polipo.ky polipo.ps polipo.tp - -rm -f polipo.dvi polipo.ps polipo.ps.gz polipo.pdf polipo.html - -rm -rf ./html/ - -rm -f polipo.man.html - -.PHONY: uninstall - -uninstall: - rm -rf /Library/Polipo - rm -rf /Library/StartupItems/Polipo - cp -f /etc/hostconfig /etc/hostconfig.polipo.saved - cat /etc/hostconfig.polipo.saved | grep -v POLIPO > /etc/hostconfig diff --git a/contrib/polipo/Polipo b/contrib/polipo/Polipo deleted file mode 100644 index 14589c84d..000000000 --- a/contrib/polipo/Polipo +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh - -## -# Polipo -## - -. /etc/rc.common - -StartService () -{ - if [ -f /Library/Polipo/bin/polipo ]; then - if pid=$(GetPID polipo); then - return 0 - else if [ "${POLIPO:=-NO-}" = "-YES-" ]; then - ConsoleMessage "Starting Polipo" - /Library/Polipo/bin/polipo -c /Library/Polipo/www/config - fi - fi - fi -} - -StopService () -{ - if pid=$(GetPID polipo); then - ConsoleMessage "Stopping Polipo" - kill -TERM "${pid}" - else - ConsoleMessage "Polipo not responding." -# Just for sanity (sometimes necessary.) - killall tor 2>/dev/null - fi -} - -RestartService () -{ - StopService - StartService -} - -RunService "$1" diff --git a/contrib/polipo/PolipoDesc.plist b/contrib/polipo/PolipoDesc.plist deleted file mode 100644 index 88b7612ff..000000000 --- a/contrib/polipo/PolipoDesc.plist +++ /dev/null @@ -1,10 +0,0 @@ - - - - - IFPkgDescriptionTitle - Polipo - IFPkgDescriptionVersion - 1.0.4 - - diff --git a/contrib/polipo/PolipoInfo.plist b/contrib/polipo/PolipoInfo.plist deleted file mode 100644 index aa018f2d9..000000000 --- a/contrib/polipo/PolipoInfo.plist +++ /dev/null @@ -1,28 +0,0 @@ - - - - - CFBundleIdentifier - Polipo 1.0.4 - CFBundleGetInfoString - Polipo 1.0.4 - CFBundleName - Polipo - CFBundleSortVersionString - 1.0.4 - IFPkgFlagAllowBackRev - - IFPkgFlagAuthorizationAction - RootAuthorization - IFPkgFlagFollowLinks - - IFPkgFlagIsRequired - - IFPkgFlagRootVolumeOnly - - IfPkgFlagBackgroundScaling - proportional - IFPkgFlagBackgroundAlignment - bottomleft - - diff --git a/contrib/polipo/PolipoPostflight b/contrib/polipo/PolipoPostflight deleted file mode 100644 index 0894caec6..000000000 --- a/contrib/polipo/PolipoPostflight +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/sh - -# PolipoPostflight gets invoked after any install or upgrade. - -ADDSYSUSER=$RECEIPT_PATH/addsysuser -if [ ! -x "$ADDSYSUSER" ]; then - echo "Could not find addsysuser script." - exit 1 -fi - -POLIPOUSER=_polipo -POLIPOGROUP=daemon -TARGET=/Library/Polipo -LOGDIR=$TARGET/log - -# Create user $POLIPOUSER in group daemon. If it's already there, great. -$ADDSYSUSER $POLIPOUSER "Polipo System user" $POLIPODIR - -# Create the polipo direcpolipoy, if it doesn't exist. -if [ ! -d $POLIPODIR ]; then - mkdir -p $POLIPODIR -fi -if [ ! -d $LOGDIR ]; then - mkdir -p $LOGDIR -fi -# Check its permissions. -chown $POLIPOUSER $POLIPODIR -chgrp daemon $POLIPODIR -chmod 700 $POLIPODIR -chown $POLIPOUSER $LOGDIR -chgrp daemon $LOGDIR -chmod 700 $LOGDIR - -# Create the configuration file only if there wasn't one already. -if [ ! -f $TARGET/config]; then - cp $TARGET/config.osx $TARGET/config -fi - -cd /usr/share/man/man1 -MAN1=$TARGET/share/man/man1 - -if [ -d /Library/StartupItems/Polipo ]; then - find /Library/StartupItems/Polipo -print0 | xargs -0 chown root:wheel -fi - -# Copy Uninstaller -if [ -f $PACKAGE_PATH/Contents/Resources/uninstall_polipo_bundle.sh ]; then - cp $PACKAGE_PATH/Contents/Resources/uninstall_polipo_bundle.sh $TARGET/uninstall_polipo_bundle.sh - chmod 755 $TARGET/uninstall_polipo_bundle.sh -fi diff --git a/contrib/polipo/README b/contrib/polipo/README index 6670d579e..98deec3e4 100644 --- a/contrib/polipo/README +++ b/contrib/polipo/README @@ -6,14 +6,14 @@ General Comments ---------------- These are some hacks for making polipo work and install a package native -to OSX or Windows. +to Windows. They need some work before they can be committed upstream: - - Merge the three makefiles into one with specific builds such as "make - dist-osx" or "make dist-win32" + - Change the Makefile so it has a specific build such as "make + dist-win32" - Configure the options for tor in polipo config, just leave them commented out for easy activation. - - Work out better polipo config options for Tor. + - Work out better polipo config options for Tor. As always, I'm happy to accept patches. @@ -45,14 +45,3 @@ choose Compile NSIS Script. You'll then create a polipo installer. The Polipo NSI installer assumes libgnurx-0.dll is in the same directory as polipo.exe. You'll need to copy libgnurx-0.dll into "./" in order to make the installation package. - ---------------------------------------------- -OSX Universal Binary and Installation package ---------------------------------------------- -You'll need the contrib/polipo directory from Tor's source distribution. -1) Copy Makefile.osx over Makefile. -2) Run 'make'. -3) Copy the contents of contrib/polipo into a directory named "contrib". -4) Run 'chmod +x ./contrib/package.sh' -5) Run './contrib/package.sh' -6) You should have a Polipo-version.dmg ready for installation. diff --git a/contrib/polipo/StartupParameters.plist b/contrib/polipo/StartupParameters.plist deleted file mode 100644 index 8309e930c..000000000 --- a/contrib/polipo/StartupParameters.plist +++ /dev/null @@ -1,11 +0,0 @@ -{ - Description = "Polipo"; - Provides = ("Polipo"); - Requires = ("NetworkExtensions","Resolver"); - OrderPreference = "Late"; - Messages = - { - start = "Starting Polipo"; - stop = "Stopping Polipo"; - }; -} diff --git a/contrib/polipo/addsysuser b/contrib/polipo/addsysuser deleted file mode 100644 index 7b167eac0..000000000 --- a/contrib/polipo/addsysuser +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/sh -# -# Original adduser 05 Feb 2002 by Jon L. Gardner -# -# Modified for Tor installer by Nick Mathewson -# 2007-06-12 Modified for leopard by Andrew Lewman - - -ROOTPROP=/ - -if [ "`whoami`" != "root" ]; then -echo "You must be root to execute this script." -exit -fi -if [ "x$3" = "x" ]; then -echo 'Usage: addsysuser "" ' -exit 0 -fi -username=$1 -realname=$2 -homedir=$3 -if [ -x /usr/bin/dscl ]; then - # Determine the gid of the daemon group - gid=`dscl . -read /groups/daemon gid` - if [ "x`dscl . -list /users|cut -f2 -d' '|grep $username`" != "x" ]; then - echo The account $username already exists. - exit 0 - fi - # home is the local path to the home directory - home=/Users/$username - echo Creating account for $username... - dscl . -create /users/$username - dscl . -create /users/$username _writers_tim_passwd $username - dscl . -create /users/$username realname $realname - dscl . -create /users/$username _writers_passwd $username - dscl . -create /users/$username gid $gid - dscl . -create /users/$username home $homedir - dscl . -create /users/$username name $username - dscl . -create /users/$username passwd '*' - dscl . -create /users/$username shell /dev/null -else - # Determine the gid of the daemon group - gid=`niutil -readprop $ROOTPROP /groups/daemon gid` - if [ "x`niutil -list $ROOTPROP /users|cut -f2 -d' '|grep $username`" != "x" ]; then - echo The account $username already exists. - exit 0 - fi - # home is the local path to the home directory - home=/Users/$username - # defhome is what goes into NetInfo - defhome="/Network/Servers/MyServer/Users" - #echo "Determining next available system uid (please be patient)..." - # Uids over 500 are for system users. - uiddef=`nidump passwd / | cut -d: -f3 | sort -n | grep -v '^[56789]..' |grep -v '^....$' | tail -n 1` - uiddef=`echo $uiddef + 1 |bc` - echo Creating account for $username... - niutil -create $ROOTPROP /users/$username - niutil -createprop $ROOTPROP /users/$username _writers_tim_passwd $username - niutil -createprop $ROOTPROP /users/$username realname $realname - niutil -createprop $ROOTPROP /users/$username _writers_passwd $username - niutil -createprop $ROOTPROP /users/$username uid $uiddef - #niutil -createprop $ROOTPROP /users/$username home_loc "afp://afp.server.com/Users/$username" - niutil -createprop $ROOTPROP /users/$username gid $gid - niutil -createprop $ROOTPROP /users/$username home $homedir - niutil -createprop $ROOTPROP /users/$username name $username - niutil -createprop $ROOTPROP /users/$username passwd '*' - niutil -createprop $ROOTPROP /users/$username shell /dev/null -fi diff --git a/contrib/polipo/package.sh b/contrib/polipo/package.sh deleted file mode 100644 index 61bd496f5..000000000 --- a/contrib/polipo/package.sh +++ /dev/null @@ -1,87 +0,0 @@ -#!/bin/sh -# Copyright 2004-2005 Nick Mathewson & Andrew Lewman. -# Copyright 2005-2008 Andrew Lewman -# This is licensed under the Modified BSD License. - -### -# Helpful info on OS X packaging: -# http://developer.apple.com/documentation/DeveloperTools/Conceptual/SoftwareDistribution/index.html -# man packagemaker - -VERSION="1.0.4" - -## Determine OSX Version -# map version to name -if [ -x /usr/bin/sw_vers ]; then -# This is poor, yet functional. We don't care about the 3rd number in -# the OS version - OSVER=`/usr/bin/sw_vers | grep ProductVersion | cut -f2 | cut -d"." -f1,2` - case "$OSVER" in - "10.6") ARCH="i386";; - "10.5") ARCH="i386";; - "10.4") ARCH="i386";; - "10.3") ARCH="ppc";; - "10.2") ARCH="ppc";; - "10.1") ARCH="ppc";; - "10.0") ARCH="ppc";; - *) ARCH="unknown";; - esac -else - ARCH="unknown" -fi - -# Where will we put our temporary files? -BUILD_DIR=/tmp/polipo-osx-$$ -# Path to PackageMaker app. -PACKAGEMAKER=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker - -umask 022 - -echo I might ask you for your password now, so you can sudo. - -sudo rm -rf $BUILD_DIR -mkdir $BUILD_DIR || exit 1 -for subdir in polipo_packageroot output; do - mkdir $BUILD_DIR/$subdir -done - -### Make Polipo package. -chmod 755 contrib/PolipoPostflight -mkdir -p $BUILD_DIR/polipo_packageroot/Library/Polipo/ -cp polipo $BUILD_DIR/polipo_packageroot/polipo -cp config.sample $BUILD_DIR/polipo_packageroot/config -cp contrib/PolipoPostflight $BUILD_DIR/polipo_packageroot/postflight -cp contrib/addsysuser $BUILD_DIR/polipo_packageroot/addsysuser -cp contrib/uninstall_polipo_bundle.sh $BUILD_DIR/polipo_packageroot/uninstall_polipo_bundle.sh -cp localindex.html $BUILD_DIR/polipo_packageroot/index.html -cat < $BUILD_DIR/polipo_packageroot/Welcome.txt -Polipo: a caching web proxy - -Polipo is a small and fast caching web proxy (a web cache, an HTTP -proxy, a proxy server). -EOF - -### Assemble documentation - -groff polipo.man -T ps -m man | /usr/bin/pstopdf -i -o $BUILD_DIR/polipo_packageroot/polipo.pdf -texi2html polipo.texi && cp polipo.html $BUILD_DIR/polipo_packageroot/polipo.html - -find $BUILD_DIR/polipo_packageroot -print0 |sudo xargs -0 chown root:wheel - -$PACKAGEMAKER -build \ - -p $BUILD_DIR/output/Polipo.pkg \ - -f $BUILD_DIR/polipo_packageroot \ - -i contrib/PolipoInfo.plist \ - -d contrib/PolipoDesc.plist - -### Package it all into a DMG - -find $BUILD_DIR/output -print0 | sudo xargs -0 chown root:wheel - -sudo mv $BUILD_DIR/output "$BUILD_DIR/Polipo-$VERSION-$ARCH" -sudo rm -f "Polipo-$VERSION-$ARCH-Bundle.dmg" -USER="`whoami`" -sudo hdiutil create -format UDZO -srcfolder "$BUILD_DIR/Polipo-$VERSION-$ARCH" "Polipo-$VERSION-$ARCH.dmg" -sudo chown "$USER" "Polipo-$VERSION-$ARCH.dmg" - -#sudo rm -rf $BUILD_DIR diff --git a/contrib/polipo/uninstall_polipo_bundle.sh b/contrib/polipo/uninstall_polipo_bundle.sh deleted file mode 100644 index 73507701a..000000000 --- a/contrib/polipo/uninstall_polipo_bundle.sh +++ /dev/null @@ -1,100 +0,0 @@ -#!/bin/sh -# -# Original version 2005 by loki der quaeler -# Copyright 2007-2008 Andrew Lewman -# This is licensed under a Modified BSD license. - - -### this is the location of a file which contains all the actual package names -## (ie "Polipo", "polipostartup", ...) the list should be new-line-delimited. -PACKAGE_LIST_SRC="Polipo polipostartup" - -### this is the name of the user created in the install process of Polipo -POLIPO_USER=_polipo - -### these should be constant across all osX installs (so leave them be) -STARTUP_ITEMS_DIR=/Library/StartupItems -PKG_RCPT_BASE_DIR=/Library/Receipts -BOM_INTERMEDIATE_DIR=Contents/Resources -INFO_INTERMEDIATE_DIR=$BOM_INTERMEDIATE_DIR/English.lproj -TEMP_BOM_CONTENTS=/tmp/polipo_uninst_scratch - - -### make sure the script is being run as root, barf if not -if [ "`whoami`" != "root" ]; then - echo "Must be root to run the uninstall script." - exit -1 -fi - -### check to see if polipo is currently running, kill it if it is -## we grep on 'Polipo/polipo ' because 'polipo' is too common (like in 'direcpolipoy') -## -- this relies on the fact that polipo has been started with command -## line arguments.. :-/ -POLIPO_PID=`ps -uax | grep 'Polipo/polipo ' | grep -v grep | awk '{print $2;}'` -if [ ${#POLIPO_PID} -gt 0 ]; then - echo ". Killing currently running polipo process, pid is $POLIPO_PID" - kill -9 $POLIPO_PID -else - echo ". polipo process appears to already be stopped" -fi - - -## grab each package name from the package list file -while read LINE; do - if [ ${#LINE} -gt 0 ]; then - PACKAGE_NAME=$LINE.pkg - PACKAGE_PATH=$PKG_RCPT_BASE_DIR/$PACKAGE_NAME - echo ". Uninstalling $PACKAGE_NAME" - if [ ! -d $PACKAGE_PATH ]; then - echo " . No receipt exists for this package -- skipping." - - continue - fi - - - ## get rid of the startup item if it exists - STARTUP_DIR=$STARTUP_ITEMS_DIR/$LINE - if [ -d $STARTUP_DIR ]; then - echo " . Deleting startup item $STARTUP_DIR" - rm -rf $STARTUP_DIR - fi - - - ## determine the root direcpolipoy of the the relative paths specified in the bom - DEFAULT_LOC=`grep DefaultLocation $PACKAGE_PATH/$INFO_INTERMEDIATE_DIR/$LINE.info | awk '{print $2;}'` - if [ ${#DEFAULT_LOC} -eq 0 ]; then - echo "!! Could not find default location for $LINE package -- skipping package." - - continue - fi - - ## examine the list of installed items desribed in the bom - BOM_FILE=$PACKAGE_PATH/$BOM_INTERMEDIATE_DIR/$LINE.bom - lsbom $BOM_FILE > $TEMP_BOM_CONTENTS - while read BOM_ITEM; do - ## 3 column items describe just direcpolipoies, 5 column items describe actual files - COL_COUNT=$(echo $BOM_ITEM | awk '{print NF;}') - if [ "$COL_COUNT" -eq 5 ]; then - FILE_NAME=$DEFAULT_LOC/$(echo $BOM_ITEM | awk '{print $1;}') - - echo " . Removing $FILE_NAME" - rm -rf $FILE_NAME - fi - done < $TEMP_BOM_CONTENTS - - ## remove package receipt - echo " . Removing package receipt $PACKAGE_PATH" - rm -rf $PACKAGE_PATH - fi -done < $PACKAGE_LIST_SRC - -## nuke the user created by the install process. -echo ". Removing created user $POLIPO_USER" -niutil -destroy . /users/$POLIPO_USER - -## clean up -echo ". Cleaning up" -rm -rf $TEMP_BOM_CONTENTS -rm -rf /Library/Polipo/ /Library/StartupItems/Polipo/ -echo ". Finished" - -- cgit v1.2.3