pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/tor Update tor to 0.0.9.4.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/b143f03b99a1
branches:  trunk
changeset: 488970:b143f03b99a1
user:      jschauma <jschauma%pkgsrc.org@localhost>
date:      Sun Feb 13 20:27:53 2005 +0000

description:
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:

 net/tor/MESSAGE          |  11 +++++++++++
 net/tor/Makefile         |  43 +++++++++++++++++++++++++++++++++++--------
 net/tor/PLIST            |   4 +++-
 net/tor/distinfo         |   9 ++++-----
 net/tor/files/tor.in     |  44 ++++++++++++++++++++++++++++++++++++++++++++
 net/tor/patches/patch-aa |  15 ---------------
 net/tor/patches/patch-ab |  13 -------------
 net/tor/patches/patch-ac |  13 +++++++++++++
 8 files changed, 110 insertions(+), 42 deletions(-)

diffs (225 lines):

diff -r ff09be61c444 -r b143f03b99a1 net/tor/MESSAGE
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/tor/MESSAGE   Sun Feb 13 20:27:53 2005 +0000
@@ -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 -r ff09be61c444 -r b143f03b99a1 net/tor/Makefile
--- a/net/tor/Makefile  Sun Feb 13 19:17:46 2005 +0000
+++ b/net/tor/Makefile  Sun Feb 13 20:27:53 2005 +0000
@@ -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@localhost
-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/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 -r ff09be61c444 -r b143f03b99a1 net/tor/PLIST
--- a/net/tor/PLIST     Sun Feb 13 19:17:46 2005 +0000
+++ b/net/tor/PLIST     Sun Feb 13 20:27:53 2005 +0000
@@ -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 -r ff09be61c444 -r b143f03b99a1 net/tor/distinfo
--- a/net/tor/distinfo  Sun Feb 13 19:17:46 2005 +0000
+++ b/net/tor/distinfo  Sun Feb 13 20:27:53 2005 +0000
@@ -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 -r ff09be61c444 -r b143f03b99a1 net/tor/files/tor.in
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/tor/files/tor.in      Sun Feb 13 20:27:53 2005 +0000
@@ -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 -r ff09be61c444 -r b143f03b99a1 net/tor/patches/patch-aa
--- a/net/tor/patches/patch-aa  Sun Feb 13 19:17:46 2005 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -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 -r ff09be61c444 -r b143f03b99a1 net/tor/patches/patch-ab
--- a/net/tor/patches/patch-ab  Sun Feb 13 19:17:46 2005 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -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 -r ff09be61c444 -r b143f03b99a1 net/tor/patches/patch-ac
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/tor/patches/patch-ac  Sun Feb 13 20:27:53 2005 +0000
@@ -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
+ 



Home | Main Index | Thread Index | Old Index