1
0
forked from ports/contrib

tor: 0.2.0.29-rc -> 0.2.0.30

This commit is contained in:
Danny Rawlins 2008-07-18 02:48:43 +10:00
parent 79e17d24af
commit e64050d25c
5 changed files with 64 additions and 46 deletions

View File

@ -1,16 +1,15 @@
drwxr-xr-x root/root etc/
drwxr-xr-x root/root etc/rc.d/
-rwxr-xr-x root/root etc/rc.d/tor
-rwxr-xr-- root/root etc/rc.d/tor
drwxr-xr-x root/root etc/tor/
-rw-r----- root/tor etc/tor/tor-tsocks.conf
-rw-r----- root/tor etc/tor/torrc
drwxr-xr-x root/root usr/
drwxr-xr-x root/root usr/bin/
-r-xr--r-- tor/tor usr/bin/tor
-r-xr--r-- tor/tor usr/bin/tor-gencert
-r-xr--r-- tor/tor usr/bin/tor-resolve
-r-xr--r-- tor/tor usr/bin/torify
drwxr-xr-x root/root usr/etc/
drwxr-xr-x root/tor usr/etc/tor/
-rw-rw---- root/tor usr/etc/tor/tor-tsocks.conf
-rw-rw---- root/tor usr/etc/tor/torrc
-rwxr-xr-- root/root usr/bin/tor
-rwxr-xr-- root/root usr/bin/tor-gencert
-rwxr-xr-- root/root usr/bin/tor-resolve
-rwxr-xr-- root/root usr/bin/torify
drwxr-xr-x root/root usr/man/
drwxr-xr-x root/root usr/man/man1/
-rw-r--r-- root/root usr/man/man1/tor-gencert.1.gz
@ -22,8 +21,8 @@ drwxr-xr-x root/root usr/share/tor/
-rw-r--r-- root/root usr/share/tor/geoip
drwxr-xr-x root/root usr/var/
drwxr-xr-x root/root usr/var/lib/
drwxr-xr-x root/tor usr/var/lib/tor/
drwxr-xr-x tor/tor usr/var/lib/tor/
drwxr-xr-x root/root var/
drwxr-xr-x root/root var/log/
drwxr-xr-x root/tor var/log/tor/
-rw-rw---- root/tor var/log/tor/notices.log (EMPTY)
drwxr-xr-x tor/tor var/log/tor/
-rw-r----- tor/tor var/log/tor/notices.log (EMPTY)

View File

@ -1,2 +1,3 @@
6f7305993be83a0fca6619016bd74a1e tor-0.2.0.29-rc.tar.gz
f9c115a1cf34b9f96aa2a20281c37b0c tor.rc
d37b582ee35b4f69564b0635a449b5f6 tor-0.2.0.30.tar.gz
92ab54ed1ef6d346f49cac903cf197ea tor-config.patch
9a9942f93a063c2d88ec8b3c1e228fd0 tor.rc

View File

@ -5,49 +5,41 @@
# Depends on: libevent openssl zlib
name=tor
version=0.2.0.29-rc
version=0.2.0.30
release=1
source=(http://tor.eff.org/dist/tor-$version.tar.gz \
tor.rc)
source=(http://tor.eff.org/dist/tor-$version.tar.gz
tor.rc tor-config.patch)
build() {
cd tor-$version
cd $name-$version
patch -p 1 -i $SRC/tor-config.patch
./configure \
--prefix=/usr \
--sysconfdir=/usr/etc \
--mandir=/usr/man
--mandir=/usr/man \
--sysconfdir=/etc
make
make DESTDIR=$PKG install
install -d \
$PKG/etc/rc.d \
$PKG/usr/var/lib/tor \
$PKG/var/log/tor
# data
install -d $PKG/usr/var/lib/tor
chown tor:tor $PKG/usr/var/lib/tor
# configuration
mv $PKG/etc/tor/torrc.sample $PKG/etc/tor/torrc
find $PKG/etc/tor/ -type f -exec chown root:tor {} \; -execdir chmod 0640 {} \;
# programs
find $PKG/usr/bin -type f -execdir chmod 0754 {} \;
# logs
install -d $PKG/var/log/tor
chown tor:tor $PKG/var/log/tor
touch $PKG/var/log/tor/notices.log
chown -R root:root $PKG
find $PKG/var/log/tor/ -type f -exec chown tor:tor {} \; -execdir chmod 0640 {} \;
chown root:tor \
$PKG/var/log/tor \
$PKG/usr/etc/tor \
$PKG/usr/var/lib/tor
find $PKG/usr/bin -type f -exec chown tor:tor {} \;
find $PKG/usr/etc -type f -exec chown root:tor {} \;
find $PKG/var/log/tor -type f -exec chown root:tor {} \;
find $PKG/usr/bin -type f -exec chmod 0544 {} \;
find $PKG/usr/etc/tor -type f -exec chmod 0660 {} \;
chmod 0660 $PKG/var/log/tor/notices.log
install -m 0755 $SRC/tor.rc $PKG/etc/rc.d/tor
mv $PKG/usr/etc/tor/torrc.sample $PKG/usr/etc/tor/torrc
# edit the config file
sed -i $PKG/usr/etc/tor/torrc \
-e's/#RunAsDaemon 1/RunAsDaemon 1/' \
-e 's:#Log notice file /usr/var/log/tor/notices.log:Log notice file /var/log/tor/notices.log:' \
-e 's:#DataDirectory /usr/var/lib/tor:DataDirectory /usr/var/lib/tor:'
# service
install -m 0754 -D $SRC/tor.rc $PKG/etc/rc.d/tor
}

26
tor/tor-config.patch Normal file
View File

@ -0,0 +1,26 @@
diff -pruN tor-0.2.0.30.orig/src/config/torrc.sample.in tor-0.2.0.30/src/config/torrc.sample.in
--- tor-0.2.0.30.orig/src/config/torrc.sample.in 2008-07-17 13:50:58.055386603 +0000
+++ tor-0.2.0.30/src/config/torrc.sample.in 2008-07-17 13:55:17.578388974 +0000
@@ -33,7 +33,7 @@ SocksListenAddress 127.0.0.1 # accept co
## may provide sensitive information to an attacker who obtains the logs.
##
## Send all messages of level 'notice' or higher to @LOCALSTATEDIR@/log/tor/notices.log
-#Log notice file @LOCALSTATEDIR@/log/tor/notices.log
+Log notice file @LOCALSTATEDIR@/log/tor/notices.log
## Send every possible message to @LOCALSTATEDIR@/log/tor/debug.log
#Log debug file @LOCALSTATEDIR@/log/tor/debug.log
## Use the system log instead of Tor's logfiles
@@ -44,11 +44,11 @@ SocksListenAddress 127.0.0.1 # accept co
## Uncomment this to start the process in the background... or use
## --runasdaemon 1 on the command line. This is ignored on Windows;
## see the FAQ entry if you want Tor to run as an NT service.
-#RunAsDaemon 1
+RunAsDaemon 1
## The directory for keeping all the keys/etc. By default, we store
## things in $HOME/.tor on Unix, and in Application Data\tor on Windows.
-#DataDirectory @LOCALSTATEDIR@/lib/tor
+DataDirectory @LOCALSTATEDIR@/lib/tor
## The port on which Tor will listen for local connections from Tor
## controller applications, as documented in control-spec.txt.

View File

@ -5,7 +5,7 @@
# User settings here
DAEMON=tor
RUN_AS_USER=_tor
RUN_AS_USER=tor
# Check for configuration files
[ -f /usr/etc/tor/tor-tsocks.conf ] || exit 1