summaryrefslogtreecommitdiff
path: root/net/tor
diff options
context:
space:
mode:
authorjschauma <jschauma@pkgsrc.org>2005-02-13 20:27:53 +0000
committerjschauma <jschauma@pkgsrc.org>2005-02-13 20:27:53 +0000
commit19dad1b8a163dc6736bc2440758447c31a91f590 (patch)
treeb75b44d7e4551944806ebc86b9df8f29d6a4d922 /net/tor
parent756ec268d492a35ea2b6767f20b1b71375c6c918 (diff)
downloadpkgsrc-19dad1b8a163dc6736bc2440758447c31a91f590.tar.gz
Update tor to 0.0.9.4.
pkgsrc changes: - depend on tsocks to allow torification of other applications - create a user for this application to run as - install a suitable rc script ChangeLog says: o Bugfixes on 0.0.9: - Fix an assert bug that took down most of our servers: when a server claims to have 500 GB of bandwidthburst, don't freak out. - Don't crash as badly if we have spawned the max allowed number of dnsworkers, or we're out of file descriptors. - Block more file-sharing ports in the default exit policy. - MaxConn is now automatically set to the hard limit of max file descriptors we're allowed (ulimit -n), minus a few for logs, etc. - Give a clearer message when servers need to raise their ulimit -n when they start running out of file descriptors. - SGI Compatibility patches from Jan Schaumann. - Tolerate a corrupt cached directory better. - When a dirserver hasn't approved your server, list which one. - Go into soft hibernation after 95% of the bandwidth is used, not 99%. This is especially important for daily hibernators who have a small accounting max. Hopefully it will result in fewer cut connections when the hard hibernation starts. - Load-balance better when using servers that claim more than 800kB/s of capacity. - Make NT services work (experimental, only used if compiled in).
Diffstat (limited to 'net/tor')
-rw-r--r--net/tor/MESSAGE11
-rw-r--r--net/tor/Makefile43
-rw-r--r--net/tor/PLIST4
-rw-r--r--net/tor/distinfo9
-rw-r--r--net/tor/files/tor.in44
-rw-r--r--net/tor/patches/patch-aa15
-rw-r--r--net/tor/patches/patch-ab13
-rw-r--r--net/tor/patches/patch-ac13
8 files changed, 110 insertions, 42 deletions
diff --git a/net/tor/MESSAGE b/net/tor/MESSAGE
new file mode 100644
index 00000000000..b571b7d94bb
--- /dev/null
+++ b/net/tor/MESSAGE
@@ -0,0 +1,11 @@
+===========================================================================
+$NetBSD: MESSAGE,v 1.1 2005/02/13 20:27:53 jschauma Exp $
+
+You probably want to install www/privoxy to torify your browsers. Please
+see http://tor.eff.org/cvs/tor/doc/tor-doc.html for details.
+
+If you wish to chroot tor, you may find the following URLs helpful:
+ http://pestilenz.org/~bauerm/tor-openbsd-howto.html
+ http://wiki.noreply.org/wiki/TheOnionRouter/TorInChroot
+
+===========================================================================
diff --git a/net/tor/Makefile b/net/tor/Makefile
index 54880677890..ced22199200 100644
--- a/net/tor/Makefile
+++ b/net/tor/Makefile
@@ -1,18 +1,33 @@
-# $NetBSD: Makefile,v 1.5 2005/02/02 16:41:22 jschauma Exp $
+# $NetBSD: Makefile,v 1.6 2005/02/13 20:27:53 jschauma Exp $
#
-DISTNAME= tor-0.0.9.3
+DISTNAME= tor-0.0.9.4
CATEGORIES= net security
MASTER_SITES= http://tor.eff.org/dist/
MAINTAINER= jschauma@NetBSD.org
-HOMEPAGE= http://tor.eff.org
+HOMEPAGE= http://tor.eff.org/
COMMENT= Anonymizing overlay network for TCP
+DEPENDS+= tsocks>=1.7:../../net/tsocks
+
+.include "../../mk/bsd.prefs.mk"
+
USE_BUILDLINK3= yes
USE_PKGLOCALEDIR= yes
GNU_CONFIGURE= yes
+
+TOR_USER?= tor
+TOR_GROUP?= tor
+PKG_HOME?= /var/chroot/tor
+
USE_PKGINSTALL= yes
+RCD_SCRIPTS= tor
+PKG_GROUPS= ${TOR_GROUP}
+PKG_USERS= ${TOR_USER}:${TOR_GROUP}::Torifier:${PKG_HOME}
+USER_GROUP= ${TOR_USER} ${TOR_GROUP}
+
+OWN_DIR_PERMS+= ${PKG_HOME} ${USER_GROUP} 0755
CONFIGURE_ARGS+= --localstatedir=${VARBASE}
@@ -21,23 +36,35 @@ CONF_FILES+= ${PREFIX}/share/examples/tor/tor-tsocks.conf \
CONF_FILES+= ${PREFIX}/share/examples/tor/torrc.sample \
${PKG_SYSCONFDIR}/tor/torrc
+RCD_SCRIPT= tor
+
.include "../../mk/bsd.prefs.mk"
.if !empty(PKGSRC_COMPILER:Mmipspro)
CFLAGS+= -c99
.endif
-do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/src/or/tor ${PREFIX}/bin/tor
- ${INSTALL_SCRIPT} ${WRKSRC}/contrib/torify ${PREFIX}/bin/torify
+post-patch:
+ ${SED} -e 's|@PKG_SYSCONFDIR@|${PKG_SYSCONFDIR}|g' \
+ -e 's|@PREFIX@|${PREFIX}|g' \
+ -e 's|@PKG_HOME@|${PKG_HOME}|g' \
+ -e 's|@TOR_USER@|${TOR_USER}|g' \
+ -e 's|@TOR_GROUP@|${TOR_GROUP}|g' \
+ -e 's|@RCD_SCRIPTS_SHELL@|${RCD_SCRIPTS_SHELL}|g' \
+ ${FILESDIR}/tor.in > ${WRKSRC}/tor.pkgsrc.rc
+
+pre-install:
+ ${MKDIR} -m 0700 ${PKG_HOME}
+
+post-install:
${INSTALL_DATA_DIR} ${PKG_SYSCONFDIR}/tor
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/tor
${INSTALL_DATA} ${WRKSRC}/src/config/torrc.sample \
${PREFIX}/share/examples/tor/torrc.sample
${INSTALL_DATA} ${WRKSRC}/contrib/tor-tsocks.conf \
${PREFIX}/share/examples/tor/tor-tsocks.conf
- ${INSTALL_MAN} ${WRKSRC}/doc/tor.1 ${PREFIX}/man/man1/tor.1
- ${INSTALL_MAN} ${WRKSRC}/contrib/torify.1 ${PREFIX}/man/man1/torify.1
+ ${INSTALL_DATA} ${WRKSRC}/tor.pkgsrc.rc ${PREFIX}/${RCD_SCRIPTS_EXAMPLEDIR}/tor
+ ${CHOWN} ${TOR_USER}:${TOR_GROUP} ${PKG_HOME}
.include "../../security/openssl/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/net/tor/PLIST b/net/tor/PLIST
index 72b952e8892..8e322cee39c 100644
--- a/net/tor/PLIST
+++ b/net/tor/PLIST
@@ -1,7 +1,9 @@
-@comment $NetBSD: PLIST,v 1.2 2005/01/11 21:02:20 tv Exp $
+@comment $NetBSD: PLIST,v 1.3 2005/02/13 20:27:53 jschauma Exp $
bin/tor
+bin/tor-resolve
bin/torify
man/man1/tor.1
+man/man1/tor-resolve.1
man/man1/torify.1
share/examples/tor/tor-tsocks.conf
share/examples/tor/torrc.sample
diff --git a/net/tor/distinfo b/net/tor/distinfo
index 888a5028672..e9cd7a2320c 100644
--- a/net/tor/distinfo
+++ b/net/tor/distinfo
@@ -1,6 +1,5 @@
-$NetBSD: distinfo,v 1.4 2005/02/02 16:41:22 jschauma Exp $
+$NetBSD: distinfo,v 1.5 2005/02/13 20:27:53 jschauma Exp $
-SHA1 (tor-0.0.9.3.tar.gz) = 2aa29ba40bbaffb209588f636cf0650f8fbb58fa
-Size (tor-0.0.9.3.tar.gz) = 541810 bytes
-SHA1 (patch-aa) = 56638a359579d6ae8933f000f99202a2d2e63cef
-SHA1 (patch-ab) = 0ffc6fe4564fd4c164d2754f73a973c4d5e0008c
+SHA1 (tor-0.0.9.4.tar.gz) = 24e09332cb9c21eeddb70da3d514fd0a71d049ec
+Size (tor-0.0.9.4.tar.gz) = 542945 bytes
+SHA1 (patch-ac) = c036da74ca6f842af9c5426b96ee0e65215bb964
diff --git a/net/tor/files/tor.in b/net/tor/files/tor.in
new file mode 100644
index 00000000000..56ea5fb0224
--- /dev/null
+++ b/net/tor/files/tor.in
@@ -0,0 +1,44 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: tor.in,v 1.1 2005/02/13 20:27:54 jschauma Exp $
+#
+# PROVIDE: tor
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+#
+# You will need to set some variables in /etc/rc.conf to start tor:
+#
+# tor=YES
+
+if [ -f /etc/rc.subr ]
+then
+ . /etc/rc.subr
+fi
+
+name="tor"
+rcvar=$name
+command="@PREFIX@/bin/tor"
+required_files="@PKG_SYSCONFDIR@/torrc"
+start_cmd="tor_start"
+stop_cmd="tor_stop"
+pidfile="/var/run/${name}.pid"
+restart_cmd="tor_stop ; tor_start"
+
+tor_start ()
+{
+ ${command} --User @TOR_USER@ --Group @TOR_GROUP@ --RunAsDaemon 1 \
+ --DataDirectory @PKG_HOME@ --PIDFile ${pidfile}
+}
+
+tor_stop()
+{
+ kill `cat ${pidfile}` 2>/dev/null
+}
+
+if [ -f /etc/rc.subr -a -f /etc/rc.conf -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ]
+then
+ load_rc_config $name
+ run_rc_command "$1"
+else
+ eval ${start_cmd}
+fi
diff --git a/net/tor/patches/patch-aa b/net/tor/patches/patch-aa
deleted file mode 100644
index f125ec79d8d..00000000000
--- a/net/tor/patches/patch-aa
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-aa,v 1.1 2005/02/02 16:41:22 jschauma Exp $
-
---- src/common/compat.h.orig Wed Feb 2 10:45:31 2005
-+++ src/common/compat.h Wed Feb 2 10:44:58 2005
-@@ -53,6 +53,10 @@
- #define __FUNCTION__ "???"
- #endif
-
-+#if defined(__sgi) && !defined(__GNUC__) && defined(__c99)
-+#define __FUNCTION__ __func__
-+#endif
-+
- /* ===== String compatibility */
- #ifdef MS_WINDOWS
- /* Windows names string functions differently from most other platforms. */
diff --git a/net/tor/patches/patch-ab b/net/tor/patches/patch-ab
deleted file mode 100644
index 5821ca4e96d..00000000000
--- a/net/tor/patches/patch-ab
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-ab,v 1.1 2005/02/02 16:41:22 jschauma Exp $
-
---- src/common/compat.c.orig Wed Feb 2 10:50:05 2005
-+++ src/common/compat.c Wed Feb 2 11:15:38 2005
-@@ -583,6 +583,8 @@
-
- #ifndef MS_WINDOWS
- struct tor_mutex_t {
-+ /* struct declarations without members lead to undefined behaviour */
-+ int unused;
- };
- tor_mutex_t *tor_mutex_new(void) { return NULL; }
- void tor_mutex_acquire(tor_mutex_t *m) { }
diff --git a/net/tor/patches/patch-ac b/net/tor/patches/patch-ac
new file mode 100644
index 00000000000..4503dc8002b
--- /dev/null
+++ b/net/tor/patches/patch-ac
@@ -0,0 +1,13 @@
+$NetBSD: patch-ac,v 1.1 2005/02/13 20:27:54 jschauma Exp $
+
+--- contrib/Makefile.in.orig 2005-02-13 15:07:56.000000000 -0500
++++ contrib/Makefile.in 2005-02-13 15:08:23.000000000 -0500
+@@ -75,7 +75,7 @@
+
+ EXTRA_DIST = tor-tsocks.conf torify.1 tor-control.py tor.nsi tor.sh torctl
+
+-conf_DATA = tor-tsocks.conf
++#conf_DATA = tor-tsocks.conf
+
+ bin_SCRIPTS = torify
+