[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] First go at a debian package



Update of /home/or/cvsroot/debian
In directory moria.mit.edu:/tmp/cvs-serv29749

Added Files:
	changelog compat control copyright rules tor.default tor.dirs 
	tor.docs tor.init tor.logrotate tor.postinst tor.postrm 
Log Message:
First go at a debian package

--- NEW FILE: changelog ---
tor (0.0.1+0.0.2pre19-1) unstable; urgency=low

  * Initial Release.

 -- Peter Palfrader <weasel@debian.org>  Sat, 10 Jan 2004 11:20:06 +0100


--- NEW FILE: compat ---
4

--- NEW FILE: control ---
Source: tor
Section: comm
Priority: optional
Maintainer: Peter Palfrader <weasel@debian.org>
Build-Depends: debhelper (>= 4.1.65), libssl-dev, dpatch
Standards-Version: 3.6.1

Package: tor
Architecture: any
Depends: ${shlibs:Depends}
Recommends: privoxy, tsocks
Suggests: mixmaster, mixminion, anon-proxy
Description: anonymous communication system
 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 not 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, you don't need an
 extra socks client if you want to use Tor with them.
 .
 Remember that this is alpha code, and the network is very small -- Tor will
 not provide anonymity currently.

--- NEW FILE: copyright ---
This package was debianized by Peter Palfrader <weasel@debian.org> on
Sat, 10 Jan 2004 11:20:06 +0100.

It was downloaded from http://freehaven.net/tor/

Upstream Authors: Roger Dingledine <arma@freehaven.net>
                  Nick Mathewson <nickm@freehaven.net>
                  Matej Pfajfar <badbytes@freehaven.net>


Copyright (c) 2001-2004, Roger Dingledine
Modifications for Debian: Copyright (C) 2004 Peter Palfrader <weasel@debian.org>

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.

--- NEW FILE: rules ---
#!/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

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
	CFLAGS += -O0
else
	CFLAGS += -O2
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
	INSTALL_PROGRAM += -s
endif

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)

	touch build-stamp

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


# 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 

--- NEW FILE: tor.default ---
# 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"

--- NEW FILE: tor.dirs ---
etc/tor
var/lib/tor
var/log/tor
var/run/tor

--- NEW FILE: tor.docs ---
README

--- NEW FILE: tor.init ---
#! /bin/sh

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/bin/tor
NAME=tor
DESC="tor daemon"
TORLOG=/var/log/tor/log
TORPID=/var/run/tor/tor.pid
ARGS="--pidfile $TORPID --logfile $TORLOG --runasdaemon 1"

test -x $DAEMON || exit 0

# Include tor defaults if available
if [ -f /etc/default/tor ] ; then
	. /etc/default/tor
fi

set -e

case "$1" in
  start)
	if [ "$RUN_DAEMON" != "yes" ]; then
		echo "Not starting $DESC (Disabled in /etc/default/tor)."
	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: "
	start-stop-daemon --stop --quiet --oknodo --pidfile $TORPID \
		--exec $DAEMON
	echo "$NAME."
	;;
  reload|force-reload)
	echo "Reloading $DESC configuration."
	start-stop-daemon --stop --signal 1 --oknodo --quiet --pidfile $TORPID \
		--exec $DAEMON
	;;
  restart)
	$0 stop
	sleep 1
	$0 start
	;;
  *)
	echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2
	exit 1
	;;
esac

exit 0

--- NEW FILE: tor.logrotate ---
(This appears to be a binary file; contents omitted.)

--- NEW FILE: tor.postinst ---
#!/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

--- NEW FILE: tor.postrm ---
#!/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