From 0d06e1d2e463543d5ec44821073d0835c6ccb615 Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@55e972cd-5a19-0410-ae62-a4d7a52db4cd> Date: Mon, 15 Mar 2004 01:22:12 +0000 Subject: [PATCH] This commit was manufactured by cvs2svn to create tag 'debian_version_0_0_1+0_0_2pre26-1'. svn:r1276 --- .../debian/README.privoxy | 18 +++ .../debian/TODO | 9 ++ .../debian/changelog | 94 +++++++++++++++ .../debian/compat | 1 + .../debian/control | 44 +++++++ .../debian/copyright | 40 +++++++ .../debian/patches/00list | 2 + .../patches/01_uncomment_datadirectory.dpatch | 37 ++++++ .../02_add_debian_files_in_manpage.dpatch | 41 +++++++ .../debian/rules | 109 ++++++++++++++++++ .../debian/tor.default | 13 +++ .../debian/tor.dirs | 7 ++ .../debian/tor.docs | 3 + .../debian/tor.init | 104 +++++++++++++++++ .../debian/tor.lintian-override | 1 + .../debian/tor.logrotate | 11 ++ .../debian/tor.postinst | 54 +++++++++ .../debian/tor.postrm | 11 ++ 18 files changed, 599 insertions(+) create mode 100644 tags/debian_version_0_0_1+0_0_2pre26-1/debian/README.privoxy create mode 100644 tags/debian_version_0_0_1+0_0_2pre26-1/debian/TODO create mode 100644 tags/debian_version_0_0_1+0_0_2pre26-1/debian/changelog create mode 100644 tags/debian_version_0_0_1+0_0_2pre26-1/debian/compat create mode 100644 tags/debian_version_0_0_1+0_0_2pre26-1/debian/control create mode 100644 tags/debian_version_0_0_1+0_0_2pre26-1/debian/copyright create mode 100644 tags/debian_version_0_0_1+0_0_2pre26-1/debian/patches/00list create mode 100755 tags/debian_version_0_0_1+0_0_2pre26-1/debian/patches/01_uncomment_datadirectory.dpatch create mode 100755 tags/debian_version_0_0_1+0_0_2pre26-1/debian/patches/02_add_debian_files_in_manpage.dpatch create mode 100755 tags/debian_version_0_0_1+0_0_2pre26-1/debian/rules create mode 100644 tags/debian_version_0_0_1+0_0_2pre26-1/debian/tor.default create mode 100644 tags/debian_version_0_0_1+0_0_2pre26-1/debian/tor.dirs create mode 100644 tags/debian_version_0_0_1+0_0_2pre26-1/debian/tor.docs create mode 100644 tags/debian_version_0_0_1+0_0_2pre26-1/debian/tor.init create mode 100644 tags/debian_version_0_0_1+0_0_2pre26-1/debian/tor.lintian-override create mode 100644 tags/debian_version_0_0_1+0_0_2pre26-1/debian/tor.logrotate create mode 100644 tags/debian_version_0_0_1+0_0_2pre26-1/debian/tor.postinst create mode 100644 tags/debian_version_0_0_1+0_0_2pre26-1/debian/tor.postrm diff --git a/tags/debian_version_0_0_1+0_0_2pre26-1/debian/README.privoxy b/tags/debian_version_0_0_1+0_0_2pre26-1/debian/README.privoxy new file mode 100644 index 0000000000..0f4b4f9d95 --- /dev/null +++ b/tags/debian_version_0_0_1+0_0_2pre26-1/debian/README.privoxy @@ -0,0 +1,18 @@ +Tor only provides TCP layer anonymity. It does not do any protocol +cleaning, so if you are going to browse the web you still give away a +lot of information to servers. + +The privoxy package provides a privacy enhancing HTTP proxy, which +is good at filtering headers, cookies, and much more. To view the +description of the Debian privoxy package just run "apt-cache show +privoxy". Please refer to the privoxy documentation for more details. + +In order to use privoxy over tor, add the following line to your +privoxy configuration file: + forward-socks4a / localhost:9050 . +(the dot is important) + +Then configure your browser to use privoxy as its HTTP proxy. + +-- +Peter Palfrader , Tue, 17 Feb 2004 02:15:36 +0100 diff --git a/tags/debian_version_0_0_1+0_0_2pre26-1/debian/TODO b/tags/debian_version_0_0_1+0_0_2pre26-1/debian/TODO new file mode 100644 index 0000000000..7a4f99ed51 --- /dev/null +++ b/tags/debian_version_0_0_1+0_0_2pre26-1/debian/TODO @@ -0,0 +1,9 @@ +Legend: + - Not done + * Top priority + . Partially done + o Done + D Deferred + X Abandoned + +- strip debugging symbols when tor is more mature diff --git a/tags/debian_version_0_0_1+0_0_2pre26-1/debian/changelog b/tags/debian_version_0_0_1+0_0_2pre26-1/debian/changelog new file mode 100644 index 0000000000..f55960b973 --- /dev/null +++ b/tags/debian_version_0_0_1+0_0_2pre26-1/debian/changelog @@ -0,0 +1,94 @@ +tor (0.0.1+0.0.2pre26-1) unstable; urgency=low + + * New upstream release. + * Mention log and pidfile location in tor.1. + + -- Peter Palfrader Mon, 15 Mar 2004 02:21:29 +0100 + +tor (0.0.1+0.0.2pre25-1) unstable; urgency=low + + * New upstream release. + + -- Peter Palfrader Thu, 4 Mar 2004 23:05:38 +0100 + +tor (0.0.1+0.0.2pre24-1) unstable; urgency=low + + * New upstream release. + * Do not strip binaries for now. + * Add "# ulimit -c unlimited" to tor.default + * Always enable DataDirectory. + * Actually use dpatch now (to modify upstream torrc.in) + * Wait for tor to die in init stop. Let the user know if it doesn't. + + -- Peter Palfrader Wed, 3 Mar 2004 14:10:25 +0100 + +tor (0.0.1+0.0.2pre23-1) unstable; urgency=low + + * New upstream release. + * The one test that always failed has been fixed: removed comment from + rules file. + + -- Peter Palfrader Sun, 29 Feb 2004 12:36:33 +0100 + +tor (0.0.1+0.0.2pre22-1) unstable; urgency=low + + * New upstream release. + * Upstream has moved tor back to usr/bin, but we will keep it in + usr/sbin. That's the right place and it doesn't break my tab + completion there. + + -- Peter Palfrader Fri, 27 Feb 2004 01:59:09 +0100 + +tor (0.0.1+0.0.2pre21-1) unstable; urgency=low + + * New upstream release. + * 0.0.2pre20-2 removed the Recommends: on privoxy rather + than tsocks (which is now required) by mistake. Fix that. + * package description: Mention that the package starts the OP by default and + that OR can be enabled in the config. + * tor moved to sbin, updating init script. + + -- Peter Palfrader Wed, 18 Feb 2004 10:08:12 +0100 + +tor (0.0.1+0.0.2pre20-2) unstable; urgency=low + + * Add torify script, documentation, and config file. Means we also + depend on tsocks now rather than just recommending it. Right now + we install it in debian/rules, but upcoming versions might install + it in upstream's make install target. + * There's an upstream ChangeLog file now. Enjoy! + * Add a README.privoxy file that explains how to setup privoxy to + go over tor. + * As is the case too often, the INSTALL file not only covers + installation, but also basic usage and configuration. Therefore + include it in the docs dir. + * Add a lintian override for the INSTALL file. + + -- Peter Palfrader Tue, 17 Feb 2004 02:32:00 +0100 + +tor (0.0.1+0.0.2pre20-1) unstable; urgency=low + + * New upstream version. + - various design paper updates + - resolve cygwin warnings + - split the token bucket into "rate" and "burst" params + - try to resolve discrepency between bytes transmitted over TLS and actual + bandwidth use + - setuid to user _before_ complaining about running as root + - fix several memleaks and double frees + - minor logging fixes + - add more debugging for logs. + - various documentation fixes and improvements + - for perforcmance testing, paths are always 3 hops, not "3 or more" + (this will go away at a later date again) + * Add dependency on adduser which was previously missing. + * Change short description to a nicer one. + + -- Peter Palfrader Sat, 31 Jan 2004 10:10:45 +0100 + +tor (0.0.1+0.0.2pre19-1) unstable; urgency=low + + * Initial Release (closes: #216611). + + -- Peter Palfrader Sat, 10 Jan 2004 11:20:06 +0100 + diff --git a/tags/debian_version_0_0_1+0_0_2pre26-1/debian/compat b/tags/debian_version_0_0_1+0_0_2pre26-1/debian/compat new file mode 100644 index 0000000000..b8626c4cff --- /dev/null +++ b/tags/debian_version_0_0_1+0_0_2pre26-1/debian/compat @@ -0,0 +1 @@ +4 diff --git a/tags/debian_version_0_0_1+0_0_2pre26-1/debian/control b/tags/debian_version_0_0_1+0_0_2pre26-1/debian/control new file mode 100644 index 0000000000..db20e34c7e --- /dev/null +++ b/tags/debian_version_0_0_1+0_0_2pre26-1/debian/control @@ -0,0 +1,44 @@ +Source: tor +Section: comm +Priority: optional +Maintainer: Peter Palfrader +Build-Depends: debhelper (>= 4.1.65), libssl-dev, dpatch +Standards-Version: 3.6.1 + +Package: tor +Architecture: any +Depends: ${shlibs:Depends}, adduser, tsocks +Recommends: privoxy +Suggests: mixmaster, mixminion, anon-proxy +Description: anonymizing overlay network for TCP + Tor is a connection-based low-latency anonymous communication system which + addresses many flaws in the original onion routing design. + . + In brief, Onion Routing is a connection-oriented anonymizing communication + service. Users choose a source-routed path through a set of nodes, and + negotiate a "virtual circuit" through the network, in which each node + knows its predecessor and successor, but no others. Traffic flowing down + the circuit is unwrapped by a symmetric key at each node, which reveals + the downstream node. + . + Basically Tor provides a distributed network of servers ("onion + routers"). Users bounce their tcp streams (web traffic, ftp, ssh, etc) + around the routers, and recipients, observers, and even the routers + themselves have difficulty tracking the source of the stream. + . + Note that Tor does no protocol cleaning. That means there is a danger that + application protocols and associated programs can be induced to reveal + information about the initiator. Tor depends on Privoxy and similar protocol + cleaners to solve this problem. + . + Client applications can use the Tor network by connecting to the local + onion proxy. If the application itself does not come with socks support + you can use a socks client such as tsocks. Some web browsers like mozilla + and web proxies like privoxy come with socks support, so you don't need an + extra socks client if you want to use Tor with them. + . + This package enables only the onion proxy by default, but it can be configured + as a relay (server) node. + . + Remember that this is alpha code, and the network is very small -- Tor will + not provide anonymity currently. diff --git a/tags/debian_version_0_0_1+0_0_2pre26-1/debian/copyright b/tags/debian_version_0_0_1+0_0_2pre26-1/debian/copyright new file mode 100644 index 0000000000..34f11556ff --- /dev/null +++ b/tags/debian_version_0_0_1+0_0_2pre26-1/debian/copyright @@ -0,0 +1,40 @@ +This package was debianized by Peter Palfrader on +Sat, 10 Jan 2004 11:20:06 +0100. + +It was downloaded from http://freehaven.net/tor/ + +Upstream Authors: Roger Dingledine + Nick Mathewson + Matej Pfajfar + + +Copyright (c) 2001-2004, Roger Dingledine +Modifications for Debian: Copyright (C) 2004 Peter Palfrader + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + + * Neither the names of the copyright owners nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"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 COPYRIGHT +OWNER OR CONTRIBUTORS 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. diff --git a/tags/debian_version_0_0_1+0_0_2pre26-1/debian/patches/00list b/tags/debian_version_0_0_1+0_0_2pre26-1/debian/patches/00list new file mode 100644 index 0000000000..6400729f2d --- /dev/null +++ b/tags/debian_version_0_0_1+0_0_2pre26-1/debian/patches/00list @@ -0,0 +1,2 @@ +01_uncomment_datadirectory.dpatch +02_add_debian_files_in_manpage.dpatch diff --git a/tags/debian_version_0_0_1+0_0_2pre26-1/debian/patches/01_uncomment_datadirectory.dpatch b/tags/debian_version_0_0_1+0_0_2pre26-1/debian/patches/01_uncomment_datadirectory.dpatch new file mode 100755 index 0000000000..8f1081d5b9 --- /dev/null +++ b/tags/debian_version_0_0_1+0_0_2pre26-1/debian/patches/01_uncomment_datadirectory.dpatch @@ -0,0 +1,37 @@ +#! /bin/sh -e +## 01_uncomment_datadirectory.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +if [ $# -lt 1 ]; then + echo "`basename $0`: script expects -patch|-unpatch as argument" >&2 + exit 1 +fi + +[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts +patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}" + +case "$1" in + -patch) patch -p1 ${patch_opts} < $0;; + -unpatch) patch -R -p1 ${patch_opts} < $0;; + *) + echo "`basename $0`: script expects -patch|-unpatch as argument" >&2 + exit 1;; +esac + +exit 0 + +@DPATCH@ +diff -urNad /home/weasel/projects/tor/cvs/src/config/torrc.in cvs/src/config/torrc.in +--- /home/weasel/projects/tor/cvs/src/config/torrc.in 2004-03-01 23:41:26.000000000 +0100 ++++ cvs/src/config/torrc.in 2004-03-03 13:47:25.000000000 +0100 +@@ -11,7 +11,7 @@ + ##################### Below is just for servers ##################### + + ## The directory for keeping all the keys/etc for this server +-#DataDirectory @LOCALSTATEDIR@/lib/tor ++DataDirectory @LOCALSTATEDIR@/lib/tor + + #Nickname moria # A unique handle for this server + #Address moria.seul.org # The fqdn for this server diff --git a/tags/debian_version_0_0_1+0_0_2pre26-1/debian/patches/02_add_debian_files_in_manpage.dpatch b/tags/debian_version_0_0_1+0_0_2pre26-1/debian/patches/02_add_debian_files_in_manpage.dpatch new file mode 100755 index 0000000000..ca757c6602 --- /dev/null +++ b/tags/debian_version_0_0_1+0_0_2pre26-1/debian/patches/02_add_debian_files_in_manpage.dpatch @@ -0,0 +1,41 @@ +#! /bin/sh -e +## 02_add_debian_files_in_manpage.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +if [ $# -lt 1 ]; then + echo "`basename $0`: script expects -patch|-unpatch as argument" >&2 + exit 1 +fi + +[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts +patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}" + +case "$1" in + -patch) patch -p1 ${patch_opts} < $0;; + -unpatch) patch -R -p1 ${patch_opts} < $0;; + *) + echo "`basename $0`: script expects -patch|-unpatch as argument" >&2 + exit 1;; +esac + +exit 0 + +@DPATCH@ +diff -urNad /home/weasel/projects/tor/cvs/doc/tor.1.in cvs/doc/tor.1.in +--- /home/weasel/projects/tor/cvs/doc/tor.1.in 2004-03-01 23:41:25.000000000 +0100 ++++ cvs/doc/tor.1.in 2004-03-10 16:30:49.000000000 +0100 +@@ -137,6 +137,12 @@ + .TP + .I @LOCALSTATEDIR@/lib/tor/ + The tor server stores keys/etc here. ++.TP ++.I /var/log/tor/log ++The tor server logs to this file. ++.TP ++.I /var/run/tor/tor.pid ++The PID of the tor (master) process is stored in this file. + + .SH SEE ALSO + .BR privoxy (1), diff --git a/tags/debian_version_0_0_1+0_0_2pre26-1/debian/rules b/tags/debian_version_0_0_1+0_0_2pre26-1/debian/rules new file mode 100755 index 0000000000..8646e93c32 --- /dev/null +++ b/tags/debian_version_0_0_1+0_0_2pre26-1/debian/rules @@ -0,0 +1,109 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# GNU copyright 1997 to 1999 by Joey Hess. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# These are used for cross-compiling and for saving the configure script +# from having to guess our platform (since we know it already) +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) + +CFLAGS = -Wall -g + +export PACKAGE=tor +include /usr/share/dpatch/dpatch.make + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif +#ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) +# INSTALL_PROGRAM += -s +#endif + +configure: patch-stamp +config.status: configure + dh_testdir + CFLAGS="$(CFLAGS)" ./configure \ + --host=$(DEB_HOST_GNU_TYPE) \ + --build=$(DEB_BUILD_GNU_TYPE) \ + --prefix=/usr \ + --mandir=\$${prefix}/share/man \ + --infodir=\$${prefix}/share/info \ + --localstatedir=/var \ + --sysconfdir=/etc + + +build: build-stamp + +build-stamp: config.status + dh_testdir + + $(MAKE) + @echo + @echo + src/or/test + @echo + + touch build-stamp + +clean: unpatch + dh_testdir + dh_testroot + rm -f build-stamp + + -$(MAKE) distclean + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + $(MAKE) install DESTDIR=$(CURDIR)/debian/tor + # move tor to where it belongs + mv $(CURDIR)/debian/tor/usr/bin/tor $(CURDIR)/debian/tor/usr/sbin/tor + install -m 755 contrib/torify $(CURDIR)/debian/tor/usr/bin + install -m 644 contrib/torify.1 $(CURDIR)/debian/tor/usr/share/man/man1 + install -m 644 contrib/tor-tsocks.conf $(CURDIR)/debian/tor/etc/tor + + install -m 644 debian/tor.lintian-override $(CURDIR)/debian/tor/usr/share/lintian/overrides/tor + + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs ChangeLog + dh_installdocs + dh_installexamples +# dh_install +# dh_installdebconf + dh_installlogrotate +# dh_installemacsen +# dh_installmime + dh_installinit +# dh_installcron + dh_installman + dh_link + #dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install diff --git a/tags/debian_version_0_0_1+0_0_2pre26-1/debian/tor.default b/tags/debian_version_0_0_1+0_0_2pre26-1/debian/tor.default new file mode 100644 index 0000000000..8acd2e84ff --- /dev/null +++ b/tags/debian_version_0_0_1+0_0_2pre26-1/debian/tor.default @@ -0,0 +1,13 @@ +# Defaults for tor initscript +# sourced by /etc/init.d/tor +# installed at /etc/default/tor by the maintainer scripts + +# +# This is a POSIX shell fragment +# +RUN_DAEMON="yes" + +# +# Uncomment this if you want to get coredumps +# +# ulimit -c unlimited diff --git a/tags/debian_version_0_0_1+0_0_2pre26-1/debian/tor.dirs b/tags/debian_version_0_0_1+0_0_2pre26-1/debian/tor.dirs new file mode 100644 index 0000000000..ca9f98af2d --- /dev/null +++ b/tags/debian_version_0_0_1+0_0_2pre26-1/debian/tor.dirs @@ -0,0 +1,7 @@ +etc/tor +var/lib/tor +var/log/tor +var/run/tor +usr/share/lintian/overrides +usr/bin +usr/sbin diff --git a/tags/debian_version_0_0_1+0_0_2pre26-1/debian/tor.docs b/tags/debian_version_0_0_1+0_0_2pre26-1/debian/tor.docs new file mode 100644 index 0000000000..c29884600c --- /dev/null +++ b/tags/debian_version_0_0_1+0_0_2pre26-1/debian/tor.docs @@ -0,0 +1,3 @@ +README +INSTALL +debian/README.privoxy diff --git a/tags/debian_version_0_0_1+0_0_2pre26-1/debian/tor.init b/tags/debian_version_0_0_1+0_0_2pre26-1/debian/tor.init new file mode 100644 index 0000000000..63f0ac4473 --- /dev/null +++ b/tags/debian_version_0_0_1+0_0_2pre26-1/debian/tor.init @@ -0,0 +1,104 @@ +#! /bin/sh + +set -e + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +DAEMON=/usr/sbin/tor +NAME=tor +DESC="tor daemon" +TORLOG=/var/log/tor/log +TORPID=/var/run/tor/tor.pid +DEFAULTSFILE=/etc/default/$NAME +WAITFORDAEMON=10 +ARGS="--pidfile $TORPID --logfile $TORLOG --runasdaemon 1" + +test -x $DAEMON || exit 0 + +# Include tor defaults if available +if [ -f $DEFAULTSFILE ] ; then + . $DEFAULTSFILE +fi + +wait_for_deaddaemon () { + pid=$1 + sleep 1 + if test -n "$pid" + then + if kill -0 $pid 2>/dev/null + then + echo -n "." + cnt=0 + while kill -0 $pid 2>/dev/null + do + cnt=`expr $cnt + 1` + if [ $cnt -gt $WAITFORDAEMON ] + then + echo " FAILED." + return 1 + fi + sleep 1 + echo -n "." + done + fi + fi + return 0 +} + +case "$1" in + start) + if [ "$RUN_DAEMON" != "yes" ]; then + echo "Not starting $DESC (Disabled in $DEFAULTSFILE)." + else + echo -n "Starting $DESC: " + start-stop-daemon --start --quiet --oknodo \ + --chuid debian-tor:debian-tor \ + --pidfile $TORPID \ + --exec $DAEMON -- $ARGS + echo "$NAME." + fi + ;; + stop) + echo -n "Stopping $DESC: " + pid=`cat $TORPID 2>/dev/null` || true + if test ! -f $TORPID -o -z "$pid" + then + echo "not running (there is no $TORPID)." + elif start-stop-daemon --stop --quiet --pidfile $TORPID --exec $DAEMON + then + wait_for_deaddaemon $pid + echo "$NAME." + elif kill -0 $pid 2>/dev/null + then + echo "FAILED (Is $pid not $NAME? Is $DAEMON a different binary now?)." + else + echo "FAILED ($DAEMON died: process $pid not running)." + fi + ;; + reload|force-reload) + echo -n "Reloading $DESC configuration: " + pid=`cat $TORPID 2>/dev/null` || true + if test ! -f $TORPID -o -z "$pid" + then + echo "not running (there is no $TORPID)." + elif start-stop-daemon --stop --signal 1 --quiet --pidfile $TORPID --exec $DAEMON + then + echo "$NAME." + elif kill -0 $pid 2>/dev/null + then + echo "FAILED (Is $pid not $NAME? Is $DAEMON a different binary now?)." + else + echo "FAILED ($DAEMON died: process $pid not running)." + fi + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + *) + echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/tags/debian_version_0_0_1+0_0_2pre26-1/debian/tor.lintian-override b/tags/debian_version_0_0_1+0_0_2pre26-1/debian/tor.lintian-override new file mode 100644 index 0000000000..192b63b66f --- /dev/null +++ b/tags/debian_version_0_0_1+0_0_2pre26-1/debian/tor.lintian-override @@ -0,0 +1 @@ +tor: package-contains-upstream-install-documentation diff --git a/tags/debian_version_0_0_1+0_0_2pre26-1/debian/tor.logrotate b/tags/debian_version_0_0_1+0_0_2pre26-1/debian/tor.logrotate new file mode 100644 index 0000000000..cd8f0de9c0 --- /dev/null +++ b/tags/debian_version_0_0_1+0_0_2pre26-1/debian/tor.logrotate @@ -0,0 +1,11 @@ +/var/log/tor/log { + daily + rotate 5 + compress + delaycompress + missingok + notifempty + postrotate + /etc/init.d/tor reload > /dev/null + endscript +} diff --git a/tags/debian_version_0_0_1+0_0_2pre26-1/debian/tor.postinst b/tags/debian_version_0_0_1+0_0_2pre26-1/debian/tor.postinst new file mode 100644 index 0000000000..cd2e91beeb --- /dev/null +++ b/tags/debian_version_0_0_1+0_0_2pre26-1/debian/tor.postinst @@ -0,0 +1,54 @@ +#!/bin/sh -e + +# checking debian-tor account + +uid=`getent passwd debian-tor | cut -d ":" -f 3` +home=`getent passwd debian-tor | cut -d ":" -f 6` + +# if there is the uid the account is there and we can do +# the sanit(ar)y checks otherwise we can safely create it. + +if [ "$uid" ]; then + # guess??? the checks!!! + if [ $uid -ge 100 ] && [ $uid -le 999 ]; then + echo "debian-tor uid check: ok" + else + echo "ERROR: debian-tor account has a non-system uid!" + echo "Please check /usr/share/doc/tor/README.Debian on how to" + echo "correct this problem" + exit 1 + fi + if [ "$home" = "/var/lib/tor" ]; then + echo "debian-tor homedir check: ok" + else + echo "ERROR: debian-tor account has an invalid home directory!" + echo "Please check /usr/share/doc/tor/README.Debian on how to" + echo "correct this problem" + exit 1 + fi +else + # what this might mean?? oh creating a system l^Huser! + adduser --quiet \ + --system \ + --disabled-password \ + --home /var/lib/tor \ + --no-create-home \ + --shell /bin/bash \ + --group \ + debian-tor +fi + +# ch{owning,moding} things around +# We will do nothing across upgrades. + +if [ "$2" = "" ]; then + for i in lib log run; do + chown -R debian-tor:debian-tor /var/$i/tor + chmod -R 700 /var/$i/tor + find /var/$i/tor -type f -exec chmod 600 '{}' ';' + done +fi + +#DEBHELPER# + +exit 0 diff --git a/tags/debian_version_0_0_1+0_0_2pre26-1/debian/tor.postrm b/tags/debian_version_0_0_1+0_0_2pre26-1/debian/tor.postrm new file mode 100644 index 0000000000..cb3707e27f --- /dev/null +++ b/tags/debian_version_0_0_1+0_0_2pre26-1/debian/tor.postrm @@ -0,0 +1,11 @@ +#!/bin/sh -e + +if [ "$1" = "purge" ]; then + # logs have to be removed according to policy. + rm -rf /var/log/tor/ + rm -rf /var/lib/tor/ +fi + +#DEBHELPER# + +exit 0