SF.net SVN: gar:[24218] csw/mgar/pkg/tor/trunk

jake_goerzen at users.sourceforge.net jake_goerzen at users.sourceforge.net
Sun Oct 26 23:07:39 CET 2014


Revision: 24218
          http://sourceforge.net/p/gar/code/24218
Author:   jake_goerzen
Date:     2014-10-26 22:07:36 +0000 (Sun, 26 Oct 2014)
Log Message:
-----------
tor: update to 2.5.10; bring recipe changes from alpha branch

Modified Paths:
--------------
    csw/mgar/pkg/tor/trunk/Makefile
    csw/mgar/pkg/tor/trunk/files/cswtor

Added Paths:
-----------
    csw/mgar/pkg/tor/trunk/files/0001-add-test-to-detect-we-are-on-Solaris.patch
    csw/mgar/pkg/tor/trunk/files/cswusergroup

Modified: csw/mgar/pkg/tor/trunk/Makefile
===================================================================
--- csw/mgar/pkg/tor/trunk/Makefile	2014-10-26 21:36:10 UTC (rev 24217)
+++ csw/mgar/pkg/tor/trunk/Makefile	2014-10-26 22:07:36 UTC (rev 24218)
@@ -1,6 +1,6 @@
 # $Id$
 NAME = tor
-VERSION = 0.2.4.25
+VERSION = 0.2.5.10
 GARTYPE = v2
 
 DESCRIPTION = Secure network traffic router
@@ -8,9 +8,15 @@
 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.
 endef
 
+# This is where the source git repo is located but we are building from the
+# official alpha release tar.gz distfile downloaded from MATER_SITES.
+# GIT_REPOS = git://git.torproject.org/tor.git
+
 MASTER_SITES = http://www.torproject.org/dist/
 DISTFILES  = $(DISTNAME).tar.gz
 
+PATCHFILES += 0001-add-test-to-detect-we-are-on-Solaris.patch
+
 # File name regex to get notifications about upstream software releases
 UFILES_REGEX = $(NAME)-(\d+(?:\.\d+)*).tar.gz
 
@@ -34,6 +40,8 @@
 
 INITSMF = /etc/opt/csw/init.d/cswtor
 
+USERGROUP = /etc/opt/csw/pkg/CSWtor/cswusergroup
+
 PACKAGING_PLATFORMS = solaris10-sparc solaris10-i386
 
 include gar/category.mk
@@ -48,4 +56,9 @@
 	ginstall -m 444 $(FILEDIR)/README.CSW \
 		$(DESTDIR)/opt/csw/share/doc/tor/
 
+	# Copy cswusergroup
+	ginstall -m 755 -d $(DESTDIR)/etc/opt/csw/pkg/CSWtor
+	ginstall -m 444 $(FILEDIR)/cswusergroup \
+		$(DESTDIR)/etc/opt/csw/pkg/CSWtor/
+
 	@$(MAKECOOKIE)

Added: csw/mgar/pkg/tor/trunk/files/0001-add-test-to-detect-we-are-on-Solaris.patch
===================================================================
--- csw/mgar/pkg/tor/trunk/files/0001-add-test-to-detect-we-are-on-Solaris.patch	                        (rev 0)
+++ csw/mgar/pkg/tor/trunk/files/0001-add-test-to-detect-we-are-on-Solaris.patch	2014-10-26 22:07:36 UTC (rev 24218)
@@ -0,0 +1,28 @@
+From 12209beaed0135b2bf11669cfc7ea27c2b36094f Mon Sep 17 00:00:00 2001
+From: Jake Goerzen <jgoerzen at opencsw.org>
+Date: Thu, 24 Apr 2014 18:57:38 +0200
+Subject: [PATCH] add test to detect we are on Solaris
+
+---
+ src/test/test_bt_cl.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/src/test/test_bt_cl.c b/src/test/test_bt_cl.c
+index 45ae82f..7352e9e 100644
+--- a/src/test/test_bt_cl.c
++++ b/src/test/test_bt_cl.c
+@@ -20,6 +20,11 @@ static int crashtype = 0;
+ #define NORETURN __attribute__((noreturn))
+ #endif
+ 
++#if defined(__sun) && defined(__SVR4)
++#define NOINLINE __attribute__((noinline))
++#define NORETURN __attribute__((noreturn))
++#endif
++
+ int crash(int x) NOINLINE;
+ int oh_what(int x) NOINLINE;
+ int a_tangled_web(int x) NOINLINE;
+-- 
+1.8.4.1
+

Modified: csw/mgar/pkg/tor/trunk/files/cswtor
===================================================================
--- csw/mgar/pkg/tor/trunk/files/cswtor	2014-10-26 21:36:10 UTC (rev 24217)
+++ csw/mgar/pkg/tor/trunk/files/cswtor	2014-10-26 22:07:36 UTC (rev 24218)
@@ -2,14 +2,16 @@
 
 #FMRI network
 
+SU=/bin/su
 DAEMON=/opt/csw/bin/tor
 CONF=/etc/opt/csw/tor/torrc
-pidfile=/var/opt/csw/run/tor.pid
+pidfile=/tmp/tor.pid
+TOR_USER="tor"
 
 case "$1" in
   start)
     echo "Starting Tor"
-    $DAEMON --RunAsDaemon 1 --PidFile /var/opt/csw/run/tor.pid
+    $SU - $TOR_USER -c "$DAEMON --RunAsDaemon 1 --PidFile $pidfile"
     ;;
   stop)
     echo "Stopping Tor"
@@ -19,7 +21,7 @@
     echo "Restarting Tor"
     kill `cat $pidfile`
     sleep 1
-    $DAEMON --RunAsDaemon 1 --PidFile /var/opt/csw/run/tor.pid
+    $SU - $TOR_USER -c "$DAEMON --RunAsDaemon 1 --PidFile $pidfile"
     ;;
   *)
     echo "Usage: $0 { start | stop | restart }"

Added: csw/mgar/pkg/tor/trunk/files/cswusergroup
===================================================================
--- csw/mgar/pkg/tor/trunk/files/cswusergroup	                        (rev 0)
+++ csw/mgar/pkg/tor/trunk/files/cswusergroup	2014-10-26 22:07:36 UTC (rev 24218)
@@ -0,0 +1 @@
+tor:tor:The Onion Router:/var/opt/csw/tor:/bin/false:::NP

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list