OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall
Root: /v/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src Date: 24-Jul-2005 11:10:01
Branch: HEAD Handle: 2005072410100000
Added files:
openpkg-src/tor rc.tor tor.spec
Log:
new package: tor 0.1.0.12 (Anonymous Internet Communication System)
Summary:
Revision Changes Path
1.1 +62 -0 openpkg-src/tor/rc.tor
1.1 +111 -0 openpkg-src/tor/tor.spec
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/tor/rc.tor
============================================================================
$ cvs diff -u -r0 -r1.1 rc.tor
--- /dev/null 2005-07-24 11:09:42 +0200
+++ rc.tor 2005-07-24 11:10:00 +0200
@@ -0,0 +1,62 @@
[EMAIL PROTECTED]@/lib/openpkg/bash @l_prefix@/etc/rc
+##
+## rc.tor -- Run-Commands
+##
+
+%config
+ tor_enable="$openpkg_rc_def"
+ tor_log_prolog="true"
+ tor_log_epilog="true"
+ tor_log_numfiles="10"
+ tor_log_minsize="1M"
+ tor_log_complevel="9"
+
+%common
+ tor_cfgfile="@l_prefix@/etc/tor/torrc"
+ tor_logfile="@l_prefix@/var/tor/tor.log"
+ tor_pidfile="@l_prefix@/var/tor/tor.pid"
+ tor_datadir="@l_prefix@/var/tor/db"
+ tor_signal () {
+ [ -f $tor_pidfile ] && kill -$1 `cat $tor_pidfile`
+ }
+
+%status -u @l_rusr@ -o
+ tor_usable="unknown"
+ tor_active="no"
+ rcService tor enable yes && \
+ tor_signal 0 && tor_active="yes"
+ echo "tor_enable=\"$tor_enable\""
+ echo "tor_usable=\"$tor_usable\""
+ echo "tor_active=\"$tor_active\""
+
+%start -u @l_rusr@
+ rcService tor enable yes || exit 0
+ rcService tor active yes && exit 0
+ @l_prefix@/bin/tor \
+ -f $tor_cfgfile \
+ --datadirectory $tor_datadir \
+ --log "notice file $tor_logfile" \
+ --pidfile $tor_pidfile \
+ --runasdaemon 1
+
+%stop -u @l_rusr@
+ rcService tor enable yes || exit 0
+ rcService tor active no && exit 0
+ tor_signal TERM
+ sleep 2
+ rm -f $tor_pidfile >/dev/null 2>&1 || true
+
+%restart -u @l_rusr@
+ rcService tor enable yes || exit 0
+ rcService tor active no && exit 0
+ rc tor stop start
+
+%daily -u @l_susr@
+ rcService tor enable yes || exit 0
+ shtool rotate -f \
+ -n ${tor_log_numfiles} -s ${tor_log_minsize} -d \
+ -z ${tor_log_complevel} -m 664 -o @l_rusr@ -g @l_rgrp@ \
+ -P "${tor_log_prolog}" \
+ -E "${tor_log_epilog}; rc tor restart" \
+ ${tor_logfile}
+
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/tor/tor.spec
============================================================================
$ cvs diff -u -r0 -r1.1 tor.spec
--- /dev/null 2005-07-24 11:09:42 +0200
+++ tor.spec 2005-07-24 11:10:01 +0200
@@ -0,0 +1,111 @@
+##
+## tor.spec -- OpenPKG RPM Package Specification
+## Copyright (c) 2000-2005 OpenPKG Foundation e.V. <http://openpkg.net/>
+## Copyright (c) 2000-2005 Ralf S. Engelschall <http://engelschall.com/>
+##
+## Permission to use, copy, modify, and distribute this software for
+## any purpose with or without fee is hereby granted, provided that
+## the above copyright notice and this permission notice appear in all
+## copies.
+##
+## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+## 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.
+##
+
+# package information
+Name: tor
+Summary: Anonymous Internet Communication System
+URL: http://tor.eff.org/
+Vendor: R. Dingledine & N. Mathewson
+Packager: OpenPKG
+Distribution: OpenPKG
+Class: EVAL
+Group: Network
+License: LGPL
+Version: 0.1.0.12
+Release: 20050724
+
+# list of sources
+Source0: http://tor.eff.org/dist/tor-%{version}.tar.gz
+Source1: rc.tor
+
+# build information
+Prefix: %{l_prefix}
+BuildRoot: %{l_buildroot}
+BuildPreReq: OpenPKG, openpkg >= 20040130, gcc
+PreReq: OpenPKG, openpkg >= 20040130, tsocks
+BuildPreReq: openssl, libevent
+PreReq: openssl, libevent
+AutoReq: no
+AutoReqProv: no
+
+%description
+ Tor is a toolset for a wide range of organizations and people
+ that want to improve their safety and security on the Internet.
+ Using Tor can help you anonymize web browsing and publishing,
+ instant messaging, IRC, SSH, and other applications that use the TCP
+ protocol. Tor also provides a platform on which software developers
+ can build new applications with built-in anonymity, safety, and
+ privacy features. Your traffic is safer when you use Tor, because
+ communications are bounced around a distributed network of servers,
+ called onion routers. Instead of taking a direct route from source to
+ destination, data packets on the Tor network take a random pathway
+ through several servers that cover your tracks so no observer at any
+ single point can tell where the data came from or where it's going.
+
+%track
+ prog tor = {
+ version = %{version}
+ url = http://tor.eff.org/dist/
+ regex = tor-(\d+\.\d+(\.\d+)*)\.tar\.gz
+ }
+
+%prep
+ %setup -q
+
+%build
+ CC="%{l_cc}" \
+ CFLAGS="%{l_cflags -O}" \
+ CPPFLAGS="%{l_cppflags}" \
+ LDFLAGS="%{l_ldflags}" \
+ ./configure \
+ --prefix=%{l_prefix} \
+ --with-ssl-dir=%{l_prefix}
+ %{l_make} %{l_mflags -O}
+
+%install
+ rm -rf $RPM_BUILD_ROOT
+ %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
+ strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
+ mv $RPM_BUILD_ROOT%{l_prefix}/etc/tor/torrc.sample \
+ $RPM_BUILD_ROOT%{l_prefix}/etc/tor/torrc
+ %{l_shtool} subst \
+ -e 's;exec tsocks;exec %{l_prefix}/bin/tsocks;' \
+ $RPM_BUILD_ROOT%{l_prefix}/bin/torify
+ %{l_shtool} mkdir -f -p -m 755 \
+ $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
+ %{l_shtool} install -c -m 755 %{l_value -s -a} \
+ %{SOURCE rc.tor} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
+ %{l_shtool} mkdir -f -p -m 755 \
+ $RPM_BUILD_ROOT%{l_prefix}/var/tor/db
+ %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
+ %{l_files_std} \
+ '%config %{l_prefix}/etc/tor/*' \
+ '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/tor' \
+ '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/tor/db'
+
+%files -f files
+
+%clean
+ rm -rf $RPM_BUILD_ROOT
+
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [email protected]