Date: Fri, 13 Jan 2006 17:01:49 -0800 (PST) From: Peter Thoenen <eol1@yahoo.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/91778: Update: security/tor-devel Message-ID: <20060114010149.35599.qmail@web51910.mail.yahoo.com> Resent-Message-ID: <200601140110.k0E1A3Ui056743@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 91778 >Category: ports >Synopsis: update security/tor-devel >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Sat Jan 14 01:10:03 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Peter Thoenen <eol1@yahoo.com> >Release: FreeBSD 6.0-RELEASE-p2 i386 >Organization: >Environment: >Description: Update to current release. Don't like the new tor rc script or my hacked version to get it to work on FBSD. It works (from my testing) but have this nagging feeling I missed something. Suggestions, comments, fixes appreciated. --0-111850115-1137200509=:33822 Content-Type: text/plain; name="tof.diff.txt" Content-Description: 3752778288-tof.diff.txt Content-Disposition: inline; filename="tof.diff.txt" diff -ruN tor-devel.orig/Makefile tor-devel/Makefile --- tor-devel.orig/Makefile Wed Jan 11 12:54:18 2006 +++ tor-devel/Makefile Fri Jan 13 09:06:50 2006 @@ -6,7 +6,7 @@ # PORTNAME= tor -PORTVERSION= 0.1.1.10 +PORTVERSION= 0.1.1.12 CATEGORIES= security net MASTER_SITES= http://tor.eff.org/dist/ PKGNAMESUFFIX= -devel @@ -42,6 +42,14 @@ PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL post-install: - ${INSTALL_DATA} ${WRKSRC}/contrib/tor.sh ${PREFIX}/etc/rc.d/tor.sh.sample - + ${INSTALL_SCRIPT} ${WRKSRC}/contrib/tor.sh ${PREFIX}/etc/rc.d/tor.sh + ${INSTALL_SCRIPT} ${WRKSRC}/contrib/torctl ${PREFIX}/bin/torctl + @${MKDIR} ${PREFIX}/var/run/tor + @${CHOWN} _tor:_tor ${PREFIX}/var/run/tor + @${TOUCH} /var/log/tor + @${CHOWN} _tor:_tor /var/log/tor + @${MKDIR} /var/db/tor + @${MKDIR} /var/db/tor/data + @${CHOWN} -R _tor:_tor /var/db/tor + @${CAT} ${PKGMESSAGE} .include <bsd.port.mk> diff -ruN tor-devel.orig/distinfo tor-devel/distinfo --- tor-devel.orig/distinfo Wed Jan 11 12:54:18 2006 +++ tor-devel/distinfo Thu Jan 12 11:15:07 2006 @@ -1,3 +1,3 @@ -MD5 (tor-0.1.1.10-alpha.tar.gz) = ae30e0401e63977008677be3f4d60d47 -SHA256 (tor-0.1.1.10-alpha.tar.gz) = 9090f80d15930397feea48359cd22f5d5da17aa3173a55044821073137bddc18 -SIZE (tor-0.1.1.10-alpha.tar.gz) = 736838 +MD5 (tor-0.1.1.12-alpha.tar.gz) = 64439b11f18462bc0a9599940899240e +SHA256 (tor-0.1.1.12-alpha.tar.gz) = 125bfd5b3f6979ee02dca0fa8372f80bbf6e4907a569e890105fe3405dc03a95 +SIZE (tor-0.1.1.12-alpha.tar.gz) = 751711 diff -ruN tor-devel.orig/files/patch-contrib-tor.sh.in tor-devel/files/patch-contrib-tor.sh.in --- tor-devel.orig/files/patch-contrib-tor.sh.in Wed Jan 11 12:54:18 2006 +++ tor-devel/files/patch-contrib-tor.sh.in Thu Jan 12 06:26:55 2006 @@ -1,28 +1,85 @@ ---- contrib/tor.sh.in.orig Sun Jun 5 15:44:43 2005 -+++ contrib/tor.sh.in Fri Sep 2 13:25:51 2005 -@@ -5,12 +5,12 @@ - # chkconfig: 2345 90 10 - # description: Onion Router - --TORUSER= --TORGROUP= -+TORUSER=_tor -+TORGROUP=_tor - TORBIN=@BINDIR@/tor - TORPID=@LOCALSTATEDIR@/run/tor/tor.pid --TORLOG=@LOCALSTATEDIR@/log/tor/tor.log --TORDATA=@LOCALSTATEDIR@/lib/tor -+TORLOG=/var/log/tor.log -+TORDATA=/var/db/tor/data - - TORCONF=@CONFDIR@/torrc - # Strictly speaking, we don't need to su if we have --user and --group. -@@ -48,7 +48,7 @@ - if [ "x$TORUSER" = "x" ]; then - $TORBIN -f $TORCONF $TORARGS - else -- $SUPROG -c "$TORBIN -f $TORCONF $TORARGS" $TORUSER -+ $SUPROG $TORUSER -c "$TORBIN -f $TORCONF $TORARGS" - fi - RETVAL=$? - if [ $RETVAL -eq 0 ]; then +--- contrib/tor.sh.in.orig Mon Dec 26 04:28:12 2005 ++++ contrib/tor.sh.in Thu Jan 12 06:25:02 2006 +@@ -9,26 +9,26 @@ + # This particular script is written for Red Hat/Fedora Linux, and may + # also work on Mandrake, but not SuSE. + # +-# These next couple of lines "declare" tor for the "chkconfig" program, +-# originally from SGI, used on Red Hat/Fedora and probably elsewhere. +-# +-# chkconfig: 2345 90 10 + # description: Onion Router - A low-latency anonymous proxy + # ++# ++# Add some of the following variables to /etc/rc.conf to configure stunnel: ++# tor_enable (bool): Default "NO" ++# Set it to "YES" to enable stunnel. ++# tor_user (str): Default "_tor" ++# Set it to the tor user ++# tor_group (str): Default "_tor" ++# Set it to the tor group ++# + +-# Library functions +-if [ -f /etc/rc.d/init.d/functions ]; then +- . /etc/rc.d/init.d/functions +-elif [ -f /etc/init.d/functions ]; then +- . /etc/init.d/functions +-fi ++tor_enable=${tor_enable-"NO"} + +-TORCTL=@BINDIR@/torctl ++TORCTL=/usr/local/bin/torctl + + # torctl will use these environment variables +-TORUSER=@TORUSER@ ++TORUSER=${tor_user-"_tor"} + export TORUSER +-TORGROUP=@TORGROUP@ ++TORGROUP=${tor_group-"_tor"} + export TORGROUP + + if [ -x /bin/su ] ; then +@@ -46,28 +46,32 @@ + case "$1" in + + start) +- action $"Starting tor:" $TORCTL start +- RETVAL=$? ++ echo "Starting tor:" ++ $TORCTL start ++ RETVAL=$? + ;; + + stop) +- action $"Stopping tor:" $TORCTL stop +- RETVAL=$? ++ echo "Stopping tor:" ++ $TORCTL stop ++ RETVAL=$? + ;; + + restart) +- action $"Restarting tor:" $TORCTL restart +- RETVAL=$? ++ echo "Restarting tor:" ++ $TORCTL restart ++ RETVAL=$? + ;; + + reload) +- action $"Reloading tor:" $TORCTL reload +- RETVAL=$? ++ echo "Reloading tor:" ++ $TORCTL reload ++ RETVAL=$? + ;; + + status) +- $TORCTL status +- RETVAL=$? ++ $TORCTL status ++ RETVAL=$? + ;; + + *) diff -ruN tor-devel.orig/files/patch-contrib-torctl.in tor-devel/files/patch-contrib-torctl.in --- tor-devel.orig/files/patch-contrib-torctl.in Thu Jan 1 03:00:00 1970 +++ tor-devel/files/patch-contrib-torctl.in Fri Jan 13 09:14:03 2006 @@ -0,0 +1,39 @@ +--- contrib/torctl.in.orig Mon Dec 26 04:28:12 2005 ++++ contrib/torctl.in Fri Jan 13 09:12:42 2006 +@@ -24,20 +24,20 @@ + EXEC=tor + # + # the path to your binary, including options if necessary +-TORBIN="@BINDIR@/$EXEC" ++TORBIN="/usr/local/bin/$EXEC" + # + # the path to the configuration file +-TORCONF="@CONFDIR@/torrc" ++TORCONF="/usr/local/etc/tor/torrc" + # + # the path to your PID file +-PIDFILE="@LOCALSTATEDIR@/run/tor/tor.pid" ++PIDFILE="/usr/local/var/run/tor/tor.pid" + # + # The path to the log file +-LOGFILE="@LOCALSTATEDIR@/log/tor/tor.log" ++LOGFILE="/var/log/tor" + # + # The path to the datadirectory +-TORDATA="@LOCALSTATEDIR@/lib/tor" + # ++TORDATA="/var/db/tor/data" + TORARGS="--pidfile $PIDFILE --log \"notice file $LOGFILE\" --runasdaemon 1" + TORARGS="$TORARGS --datadirectory $TORDATA" + +@@ -47,8 +47,8 @@ + # let an unprivileged user run tor for her own use using this script, + # while still providing for it to be used as a system daemon. + if [ "x`id -u`" = "x0" ]; then +- TORUSER=@TORUSER@ +- TORGROUP=@TORGROUP@ ++ TORUSER="_tor" ++ TORGROUP="_tor" + fi + + if [ "x$TORUSER" != "x" ]; then diff -ruN tor-devel.orig/pkg-message tor-devel/pkg-message --- tor-devel.orig/pkg-message Thu Jan 1 03:00:00 1970 +++ tor-devel/pkg-message Thu Jan 12 11:15:24 2006 @@ -0,0 +1,7 @@ + +*********************** WARNING! WARNING! WARNING! *********************** +The tor startup script has been converted to rc_subr format now. You +have to set at least the tor_enable variable if you want tor to be started +automatically at boot time! +************************************************************************** + diff -ruN tor-devel.orig/pkg-plist tor-devel/pkg-plist --- tor-devel.orig/pkg-plist Wed Jan 11 12:54:18 2006 +++ tor-devel/pkg-plist Fri Jan 13 09:08:12 2006 @@ -1,7 +1,9 @@ bin/tor bin/tor-resolve +bin/torctl bin/torify -etc/rc.d/tor.sh.sample +etc/rc.d/tor.sh etc/tor/tor-tsocks.conf.sample etc/tor/torrc.sample -@unexec rmdir %D/etc/tor 2>/dev/null || true +@dirrm var/run/tor +@dirrm etc/tor --0-111850115-1137200509=:33822-- >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: --0-111850115-1137200509=:33822 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Content-Id: Content-Disposition: inline
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060114010149.35599.qmail>