diff options
author | Erik Hanson <erik@slackbuilds.org> | 2010-05-13 00:38:27 +0200 |
---|---|---|
committer | David Somero <xgizzmo@slackbuilds.org> | 2010-05-13 00:38:27 +0200 |
commit | 3be86dfb0f559ae557987a0ba6148307fd6c183b (patch) | |
tree | d669221cda2ce8757a55918cf0c95cfac945cb60 /network | |
parent | 2c77f99062c89beea3e4dfcd29ced8bfcbae1b0f (diff) |
network/tor: Updated for version 0.2.1.22
Diffstat (limited to 'network')
-rw-r--r-- | network/tor/README | 4 | ||||
-rw-r--r-- | network/tor/doinst.sh | 26 | ||||
-rw-r--r-- | network/tor/tor.SlackBuild | 32 | ||||
-rw-r--r-- | network/tor/tor.info | 10 |
4 files changed, 49 insertions, 23 deletions
diff --git a/network/tor/README b/network/tor/README index 962229ae97038..9e88ce90eda9b 100644 --- a/network/tor/README +++ b/network/tor/README @@ -10,7 +10,7 @@ The recommended UID/GID is 220. You can create these like so: groupadd -g 220 tor useradd -u 220 -g 220 -c "The Onion Router" -d /dev/null -s /bin/false tor -You can pass another user/group to the script, this is however, less safe: +You can pass another user/group to the script; this is however, less safe: TOR_USER=nobody TOR_GROUP=nogroup sh tor.SlackBuild The following can be used to start/stop tor automatically: @@ -24,4 +24,4 @@ The following can be used to start/stop tor automatically: /etc/rc.d/rc.tor stop fi -Tor requires the libevent library, available from SlackBuilds.org. +Tor requires libevent. diff --git a/network/tor/doinst.sh b/network/tor/doinst.sh index 36769c85ca52e..6e645431c8b91 100644 --- a/network/tor/doinst.sh +++ b/network/tor/doinst.sh @@ -1,24 +1,28 @@ -#!/bin/sh - config() { NEW="$1" - OLD="`dirname $NEW`/`basename $NEW .new`" + OLD="$(dirname $NEW)/$(basename $NEW .new)" # If there's no config file by that name, mv it over: if [ ! -r $OLD ]; then mv $NEW $OLD - elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then + # toss the redundant copy rm $NEW fi # Otherwise, we leave the .new copy for the admin to consider... } -# Keep same perms on rc.tor.new: -if [ -e etc/rc.d/rc.tor ]; then - cp -a etc/rc.d/rc.tor etc/rc.d/rc.tor.new.incoming - cat etc/rc.d/rc.tor.new > etc/rc.d/rc.tor.new.incoming - mv etc/rc.d/rc.tor.new.incoming etc/rc.d/rc.tor.new -fi +preserve_perms() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + if [ -e $OLD ]; then + cp -a $OLD ${NEW}.incoming + cat $NEW > ${NEW}.incoming + mv ${NEW}.incoming $NEW + fi + config $NEW +} -config etc/rc.d/rc.tor.new +preserve_perms etc/rc.d/rc.tor.new config etc/tor/tor-tsocks.conf.new config etc/tor/torrc.new + diff --git a/network/tor/tor.SlackBuild b/network/tor/tor.SlackBuild index e0fe5d89b2f0c..605bf5f177912 100644 --- a/network/tor/tor.SlackBuild +++ b/network/tor/tor.SlackBuild @@ -1,10 +1,29 @@ #!/bin/sh - +# # Slackware build script for tor -# Written by Erik Hanson erik@slackbuilds.org +# +# Copyright 2009 Erik W. Hanson, Minneapolis, MN, USA +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''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 AUTHOR 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. PRGNAM=tor -VERSION=0.2.0.35 +VERSION=0.2.1.22 ARCH=${ARCH:-i486} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -67,7 +86,8 @@ CFLAGS="$SLKCFLAGS" \ --mandir=/usr/man \ --libdir=/usr/lib${LIBDIRSUFFIX} \ --with-tor-user=$TOR_USER \ - --with-tor-group=$TOR_GROUP + --with-tor-group=$TOR_GROUP \ + --build=$ARCH-slackware-linux make make install-strip DESTDIR=$PKG @@ -93,9 +113,9 @@ cp -a doc/spec/*txt $PKG/usr/doc/$PRGNAM-$VERSION/spec cp -a doc/website $PKG/usr/doc/$PRGNAM-$VERSION/html cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild -mkdir -p $PKG/install $PKG/etc/rc.d +mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/network/tor/tor.info b/network/tor/tor.info index eb6960b7866bc..d179bc8237bd7 100644 --- a/network/tor/tor.info +++ b/network/tor/tor.info @@ -1,8 +1,10 @@ PRGNAM="tor" -VERSION="0.2.0.35" +VERSION="0.2.1.22" HOMEPAGE="http://tor.eff.org/" -DOWNLOAD="http://www.torproject.org/dist/tor-0.2.0.35.tar.gz" -MD5SUM="d4841e1b4d54866495fd373e865b2d44" +DOWNLOAD="http://www.torproject.org/dist/tor-0.2.1.22.tar.gz" +MD5SUM="583501a989ed0c39e209b604c3671ecd" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" MAINTAINER="Erik Hanson" EMAIL="erik@slackbuilds.org" -APPROVED="rworkman" +APPROVED="dsomero" |