rpms/tor/devel tor-0.1.0.15-setgroups.patch, NONE, 1.1 tor-0.1.1.23.tar.gz.asc, NONE, 1.1 tor.logrotate, NONE, 1.1 tor.lsb, NONE, 1.1 tor.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Enrico Scholz (ensc) fedora-extras-commits at redhat.com
Tue Sep 26 06:27:27 UTC 2006


Author: ensc

Update of /cvs/extras/rpms/tor/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv15108/devel

Modified Files:
	.cvsignore sources 
Added Files:
	tor-0.1.0.15-setgroups.patch tor-0.1.1.23.tar.gz.asc 
	tor.logrotate tor.lsb tor.spec 
Log Message:
auto-import tor-0.1.1.23-3.fc5x on branch devel from tor-0.1.1.23-3.fc5x.src.rpm

tor-0.1.0.15-setgroups.patch:

--- NEW FILE tor-0.1.0.15-setgroups.patch ---
--- tor-0.1.0.15/src/common/compat.c.setgroups	2005-06-09 06:12:12.000000000 +0200
+++ tor-0.1.0.15/src/common/compat.c	2005-12-10 12:22:34.000000000 +0100
@@ -432,6 +432,11 @@
       return -1;
     }
 
+    if (getgroups(0,0)!=0 && setgroups(0,0)!=0) {
+      log_fn(LOG_ERR,"Error setting groups: %s", strerror(errno));
+      return -1;
+    }
+
     if (setgid(gr->gr_gid) != 0) {
       log_fn(LOG_ERR,"Error setting GID: %s", strerror(errno));
       return -1;


--- NEW FILE tor-0.1.1.23.tar.gz.asc ---
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQBEzRjG61qJaiiYi/URAqUOAJ9HUsuk00JEtr3Yzq2MCPTg6IQfGwCeOis8
2ZmqcR//ifBxovaU1ly7cRE=
=9xg3
-----END PGP SIGNATURE-----


--- NEW FILE tor.logrotate ---
/var/log/tor/*.log {
	delaycompress
	notifempty
	sharedscripts
	postrotate
		test ! -f /etc/init.d/tor         || /etc/init.d/tor reload         >/dev/null 2>/dev/null || :
		test ! -f /etc/initng/damon/tor.i || /sbin/ngc --restart daemon/tor >/dev/null 2>/dev/null || :
		test ! -d /etc/minit/services/tor || /bin/msvc -h services/tor      >/dev/null 2>/dev/null || :
        endscript
}


--- NEW FILE tor.lsb ---
#!/bin/sh
#
# Init file for tor - An Anonymizing overlay network for TCP
#
# chkconfig: - 99 01
# description:   An Anonymizing overlay network for TCP
#
### BEGIN INIT INFO
# Default-Stop:       0 1 2 3 4 5 6
# Short-Description:  An Anonymizing overlay network for TCP
# Description:        An Anonymizing overlay network for TCP
# Required-Start: $network $syslog $remote_fs $local_fs
### END INIT INFO

. /lib/lsb/init-functions

f=/etc/sysconfig/tor

TOR_OPTS=
TOR_PIDFILE=/var/run/tor/tor.pid
TOR_USER=toranon
test ! -r "$f" || . "$f"

prog="/usr/bin/tor"

lockfile=/var/lock/subsys/tor
pidfile=$TOR_PIDFILE

start() {
    echo -n $"Starting $prog: "

    start_daemon $prog --PIDFile "$pidfile" --RunAsDaemon 1 $TOR_OPTS
    rc=$?
    if test $rc -eq 0 && touch $lockfile; then
	log_success_msg
    else
	log_failure_msg
    fi
    
    return $rc
}

stop() {
    echo -n $"Stopping $prog: "
    killproc $prog -INT && log_success_msg || log_failure_msg
    rm -f $pidfile $lockfile
}

restart() {
    stop
    start
}

reload() {
    echo -n $"Reloading $prog: "
    killproc $prog -HUP && log_success_msg || log_failure_msg
}

status() {
    pids=$(pidofproc "$prog")
    if test -n "$pids"; then
	echo $"$prog is running"
	return 0
    fi

    if test -s $pidfile; then
	echo $"$prog is dead and /var/run pid file exists"
	return 1
    fi
    
    if test -f $lockfile; then
	echo $"$prog is dead and /var/lock lock file exists"
	return 2
    fi

    echo $"$prog is not running"
    return 3
}

case $1 in
    (start)
	start
	;;
    (stop)
	stop
	;;
    (restart|force-reload)
	restart
	;;
    (condrestart|try-restart)
	if [ -f $lockfile ]; then
	    restart
	fi
	;;
    (reload)
	reload
	;;
    (status)
	status
	;;
    (*)
	echo $"Usage: $0 {start|stop|force-reload|reload|try-restart|status}"
	exit 3
esac


--- NEW FILE tor.spec ---
## $Id$

## This package understands the following switches:

%global username		toranon
%global homedir			%_var/lib/%name
%global logdir			%_var/log/%name

%{!?release_func:%global release_func() %1%{?dist}}

Name:		tor
Version:	0.1.1.23
Release:	%release_func 3
Group:		System Environment/Daemons
License:	BSD
Summary:	Anonymizing overlay network for TCP (The onion router)
URL:		http://tor.eff.org
Requires:	%name-core = %version-%release
Requires:	%name-lsb  = %version-%release


%package core
Summary:	Core programs for tor
Group:		System Environment/Daemons
URL:		http://tor.eff.org
Source0:	http://tor.eff.org/dist/%name-%version.tar.gz
Source1:	http://tor.eff.org/dist/%name-%version.tar.gz.asc
Source2:	tor.logrotate
Patch0:		tor-0.1.0.15-setgroups.patch
BuildRoot:	%_tmppath/%name-%version-%release-root-%(%__id_u -n)

BuildRequires:	libevent-devel openssl-devel transfig tetex-latex ghostscript
Requires:		init(%name)
Requires(pre):		fedora-usermgmt /etc/logrotate.d
Requires(postun):	fedora-usermgmt /etc/logrotate.d


%package lsb
Summary:	LSB initscripts for tor
Group:		System Environment/Daemons
Provides:	init(%name) = lsb
Requires:	lsb
Requires:	%name-core =  %version-%release
Source10:	tor.lsb
Requires(pre):		%name-core
Requires(postun):	lsb %name-core
Requires(post):		lsb
Requires(preun):	lsb


%description
Tor is a connection-based low-latency anonymous communication system.

Applications connect to the local Tor proxy using the SOCKS protocol. The
local proxy chooses a path through a set of relays, in which each relay
knows its predecessor and successor, but no others. Traffic flowing down
the circuit is unwrapped by a symmetric key at each relay, which reveals
the downstream relay.

Warnings: 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. This is alpha code,
and is even more likely than released code to have anonymity-spoiling
bugs. The present network is very small -- this further reduces the
strength of the anonymity provided. Tor is not presently suitable for
high-stakes anonymity.


%description core
Tor is a connection-based low-latency anonymous communication system.

This package provides the "tor" program, which serves as both a client
and a relay node.


%description lsb
Tor is a connection-based low-latency anonymous communication system.

This package contains the LSB compliant initscripts to start the "tor"
daemon.


%prep
%setup -q
%patch0 -p1 -b .setgroups

sed -i -e 's!^\# *\(Log notice file \)!\1!;
	   s!^\(\# *\)\?DataDirectory .*!DataDirectory %homedir/.tor!' src/config/torrc.sample.in
cat <<EOF >>src/config/torrc.sample.in
Group %username
User  %username
EOF


%build
%configure
make %{?_smp_mflags}
make -C doc/design-paper tor-design.pdf


%install
rm -rf $RPM_BUILD_ROOT

make install DESTDIR=$RPM_BUILD_ROOT
mv $RPM_BUILD_ROOT%_sysconfdir/tor/torrc{.sample,}

mkdir -p $RPM_BUILD_ROOT{%_sysconfdir/logrotate.d,%_initrddir,%logdir,%homedir,%_var/run/%name}

install -p -m0755 %SOURCE10 $RPM_BUILD_ROOT%_initrddir/tor
install -p -m0644 %SOURCE2  $RPM_BUILD_ROOT%_sysconfdir/logrotate.d/tor


%pre core
/usr/sbin/fedora-groupadd 19 -r %username &>/dev/null || :
/usr/sbin/fedora-useradd  19 -r  -s /sbin/nologin -M -d %homedir	\
	-c 'tor anonymizing user' -g %username %username &>/dev/null || :


%postun core
test "$1" != 0 || /usr/sbin/fedora-userdel  %username &>/dev/null || :
test "$1" != 0 || /usr/sbin/fedora-groupdel %username &>/dev/null || :


%post lsb
/usr/lib/lsb/install_initd %_initrddir/tor

%preun lsb
test "$1" != 0 || {
	%_initrddir/tor stop &>/dev/null || :
	/usr/lib/lsb/remove_initd %_initrddir/tor
}

%postun lsb
test "$1"  = 0 || %_initrddir/tor try-restart &>/dev/null


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc doc/HACKING doc/TODO
%doc doc/*.txt
%doc doc/design-paper/tor-design.pdf
%doc %lang(en) doc/website/*.en
%doc %lang(es) doc/website/*.es
%doc %lang(fr) doc/website/*.fr
%doc %lang(it) doc/website/*.it
%doc %lang(pt) doc/website/*.pt
%doc %lang(ru) doc/website/*.ru
%doc doc/website/*.css


%files core
%defattr(-,root,root,-)
%doc AUTHORS INSTALL LICENSE README ChangeLog
%dir               %_sysconfdir/tor
%config(noreplace) %_sysconfdir/logrotate.d/tor
%attr(0700,%username,%username) %dir %homedir
%attr(0730,root,%username)      %dir %logdir
%attr(0640,root,%username) %config(noreplace) %_sysconfdir/tor/torrc
%_bindir/*
%_mandir/man1/*

%exclude %_bindir/torify
%exclude %_mandir/man1/torify*
%exclude %_sysconfdir/tor/tor-tsocks.conf


%files lsb
  %defattr(-,root,root,-)
  %config %_initrddir/*
  %attr(0755,%username,%username) %dir %_var/run/%name


%changelog
* Mon Sep 25 2006 Enrico Scholz <enrico.scholz at informatik.tu-chemnitz.de> - 0.1.1.23-3
- removed '.have-lsb' and related logic in logrotate script; check for
  existence of the corresponding initscript instead of
- fixed bare '%%' in changelog section

* Thu Sep 21 2006 Enrico Scholz <enrico.scholz at informatik.tu-chemnitz.de> - 0.1.1.23-2
- simplified things yet more and removed tsocks/torify too
- build -lsb unconditionally

* Thu Sep 21 2006 Enrico Scholz <enrico.scholz at informatik.tu-chemnitz.de> - 0.1.1.23-1
- simplified spec file and removed -initng and -minit stuff

* Sun Aug 13 2006 Enrico Scholz <enrico.scholz at informatik.tu-chemnitz.de> - 0.1.1.23-0
- updated to 0.1.1.23

* Sat Jul  8 2006 Enrico Scholz <enrico.scholz at informatik.tu-chemnitz.de> - 0.1.1.22-0
- updated to 0.1.1.22

* Tue Jun 13 2006 Enrico Scholz <enrico.scholz at informatik.tu-chemnitz.de> - 0.1.1.21-0
- updated to 0.1.1.21

* Wed May 24 2006 Enrico Scholz <enrico.scholz at informatik.tu-chemnitz.de> - 0.1.1.20-0
- updated to 0.1.1.20; adjusted %%doc file-list
- added (optional) -tsocks subpackage
- use the more modern %%bcond_with* for specifying optional features

* Sun Feb 19 2006 Enrico Scholz <enrico.scholz at informatik.tu-chemnitz.de> - 0.1.0.17-0
- updated to 0.1.0.17

* Mon Jan 30 2006 Enrico Scholz <enrico.scholz at informatik.tu-chemnitz.de> - 0.1.0.16-0.1
- renamed the current main-package into a '-core' subpackage and
  created a new main-package which requires both the 'tor-core'
  subpackage and this with the current default init-method. This
  allows 'yum install tor' to work better; because yum is not very
  smart, the old packaging might install unwanted packages else.

* Wed Jan  4 2006 Enrico Scholz <enrico.scholz at informatik.tu-chemnitz.de> - 0.1.0.16-0
- updated to 0.1.0.16

* Fri Dec 23 2005 Enrico Scholz <enrico.scholz at informatik.tu-chemnitz.de> - 0.1.0.15-1.11
- reworked the 'setgroups' patch so that 'tor' survives a SIGHUP
- (re)added the 'reload' functionality to the lsb initscript and use
  it in logrotate

* Fri Dec 23 2005 Enrico Scholz <enrico.scholz at informatik.tu-chemnitz.de> - 0.1.0.15-1.8
- added ChangeLog to %%doc
- made torrc not world-readable
- added logrotate script

* Thu Dec 22 2005 Enrico Scholz <enrico.scholz at informatik.tu-chemnitz.de> - 0.1.0.15-1.4
- updated initng scripts to initng-0.4.8 syntax
- tweaked some Requires(...):
- added ghostscript BuildRequires:
- install initng scripts into the correct dir

* Thu Dec 15 2005 Enrico Scholz <enrico.scholz at informatik.tu-chemnitz.de> - 0.1.0.15-1.2
- use relative UID of 19 instead of 18 due to conflicts with the
  'munin' package

* Wed Dec 14 2005 Enrico Scholz <enrico.scholz at informatik.tu-chemnitz.de> - 0.1.0.15-1.1
- added -minit subpackage

* Sat Dec 10 2005 Enrico Scholz <enrico.scholz at informatik.tu-chemnitz.de> - 0.1.0.15-1
- initial build


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/tor/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	26 Sep 2006 06:25:00 -0000	1.1
+++ .cvsignore	26 Sep 2006 06:27:27 -0000	1.2
@@ -0,0 +1 @@
+tor-0.1.1.23.tar.gz


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/tor/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	26 Sep 2006 06:25:00 -0000	1.1
+++ sources	26 Sep 2006 06:27:27 -0000	1.2
@@ -0,0 +1 @@
+33ce7155f545c4d30cb846d7017cc6c2  tor-0.1.1.23.tar.gz




More information about the fedora-extras-commits mailing list