summaryrefslogtreecommitdiff
path: root/security/tor-devel
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2006-01-16 00:13:31 +0000
committerPav Lucistnik <pav@FreeBSD.org>2006-01-16 00:13:31 +0000
commit434f90e65c5ec37490110810aaa1a444e30a4b28 (patch)
treeec2d6f125e574380cf8844d2b8c6d36af13cfc11 /security/tor-devel
parent- Move freeglut from x11-toolkits to graphics, where libglut already is (diff)
- Update to 0.1.1.12
- Provide rc_subr script PR: ports/91778 Submitted by: Peter Thoenen <eol1@yahoo.com> (maintainer)
Notes
Notes: svn path=/head/; revision=153606
Diffstat (limited to 'security/tor-devel')
-rw-r--r--security/tor-devel/Makefile18
-rw-r--r--security/tor-devel/distinfo6
-rw-r--r--security/tor-devel/files/patch-contrib-tor.sh.in113
-rw-r--r--security/tor-devel/files/patch-contrib-torctl.in39
-rw-r--r--security/tor-devel/pkg-message7
-rw-r--r--security/tor-devel/pkg-plist5
6 files changed, 151 insertions, 37 deletions
diff --git a/security/tor-devel/Makefile b/security/tor-devel/Makefile
index 1778b0e5365a..f1cf39682723 100644
--- a/security/tor-devel/Makefile
+++ b/security/tor-devel/Makefile
@@ -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
@@ -21,6 +21,7 @@ LIB_DEPENDS= event-1.1a:${PORTSDIR}/devel/libevent
GNU_CONFIGURE= yes
USE_OPENSSL= yes
USE_REINPLACE= yes
+USE_RC_SUBR= yes
CONFLICTS= tor-[0-9]*
@@ -32,7 +33,8 @@ post-patch:
${WRKSRC}/contrib/tor-tsocks.conf.sample
@${REINPLACE_CMD} -e "s|tor-tsocks.conf|tor-tsocks.conf.sample|g" \
${WRKSRC}/contrib/Makefile.in
-# uphold CFLAGS
+ @${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|g" \
+ ${WRKSRC}/contrib/torctl.in
@${FIND} ${WRKSRC} -type f | ${XARGS} \
-n 10 ${REINPLACE_CMD} -E \
-e 's!-g -O2!!' \
@@ -42,6 +44,14 @@ pre-install:
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} /var/run/tor
+ @${CHOWN} _tor:_tor /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 --git a/security/tor-devel/distinfo b/security/tor-devel/distinfo
index a08e8bd0735a..8616dbcd899c 100644
--- a/security/tor-devel/distinfo
+++ b/security/tor-devel/distinfo
@@ -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 --git a/security/tor-devel/files/patch-contrib-tor.sh.in b/security/tor-devel/files/patch-contrib-tor.sh.in
index 1a9ff5774218..e9cdbdb472e5 100644
--- a/security/tor-devel/files/patch-contrib-tor.sh.in
+++ b/security/tor-devel/files/patch-contrib-tor.sh.in
@@ -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=%%PREFIX%%/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 --git a/security/tor-devel/files/patch-contrib-torctl.in b/security/tor-devel/files/patch-contrib-torctl.in
new file mode 100644
index 000000000000..b305980d0a2c
--- /dev/null
+++ b/security/tor-devel/files/patch-contrib-torctl.in
@@ -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="/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 --git a/security/tor-devel/pkg-message b/security/tor-devel/pkg-message
new file mode 100644
index 000000000000..fc1729eb4ad2
--- /dev/null
+++ b/security/tor-devel/pkg-message
@@ -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 --git a/security/tor-devel/pkg-plist b/security/tor-devel/pkg-plist
index c6e016f41c54..62748b9e9712 100644
--- a/security/tor-devel/pkg-plist
+++ b/security/tor-devel/pkg-plist
@@ -1,7 +1,8 @@
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 etc/tor