View | Details | Raw Unified | Return to bug 203014 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-21 / +30 lines)
Lines 2-8 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	tor
4
PORTNAME=	tor
5
DISTVERSION=	0.2.6.7
5
DISTVERSION=	0.2.7.4-rc
6
CATEGORIES=	security net ipv6
6
CATEGORIES=	security net ipv6
7
MASTER_SITES=	TOR
7
MASTER_SITES=	TOR
8
PKGNAMESUFFIX=	-devel
8
PKGNAMESUFFIX=	-devel
Lines 15-27 Link Here
15
15
16
USES=		cpe gmake
16
USES=		cpe gmake
17
CPE_VENDOR=	torproject
17
CPE_VENDOR=	torproject
18
#CPE_VERSION=	${DISTVERSION:C/-.*//}
19
#CPE_UPDATE=	${DISTVERSION:C/.*-//}
20
GNU_CONFIGURE=	yes
18
GNU_CONFIGURE=	yes
21
CONFIGURE_ARGS=	--with-openssl-dir="${OPENSSLBASE}" --disable-asciidoc
19
CONFIGURE_ARGS=	--with-openssl-dir=${OPENSSLBASE} --disable-asciidoc
22
CONFIGURE_ENV=	TOR_CPPFLAGS_libevent="-I${LOCALBASE}/include" \
23
		TOR_LDFLAGS_libevent="-L${LOCALBASE}/lib/" \
24
		TOR_LIBEVENT_LIBS="${TOR_LIBEVENT_LIBS}"
25
20
26
OPTIONS_DEFINE=	BUFFEREVENTS INSTR_DOWNLOADS \
21
OPTIONS_DEFINE=	BUFFEREVENTS INSTR_DOWNLOADS \
27
		STATIC_TOR TCMALLOC TOR2WEB TRANSPARENT
22
		STATIC_TOR TCMALLOC TOR2WEB TRANSPARENT
Lines 28-33 Link Here
28
23
29
BUFFEREVENTS_DESC=	Use libevent's buffered IO
24
BUFFEREVENTS_DESC=	Use libevent's buffered IO
30
INSTR_DOWNLOADS_DESC=	Instrument downloads for analysis
25
INSTR_DOWNLOADS_DESC=	Instrument downloads for analysis
26
OBFSPROXY_DESC=		Pluggable transport proxy written in Python
31
STATIC_TOR_DESC=	Build a static tor
27
STATIC_TOR_DESC=	Build a static tor
32
TCMALLOC_DESC=		Use the tcmalloc memory allocation library
28
TCMALLOC_DESC=		Use the tcmalloc memory allocation library
33
TOR2WEB_DESC=		Faster but non-anonymous hidden services
29
TOR2WEB_DESC=		Faster but non-anonymous hidden services
Lines 35-40 Link Here
35
31
36
OPTIONS_DEFAULT=	THREADS TRANSPARENT
32
OPTIONS_DEFAULT=	THREADS TRANSPARENT
37
33
34
OPTIONS_GROUP=	TRANSPORT
35
OPTIONS_GROUP_TRANSPORT=	OBFSPROXY
36
38
USE_OPENSSL=	yes
37
USE_OPENSSL=	yes
39
38
40
USE_RC_SUBR=	tor
39
USE_RC_SUBR=	tor
Lines 47-52 Link Here
47
46
48
.include <bsd.port.options.mk>
47
.include <bsd.port.options.mk>
49
48
49
.if (${OSVERSION} < 1000015)
50
WITH_OPENSSL_PORT=	yes
51
.endif
52
50
.if !defined(USE_GCC) && empty(CC:T:M*gcc4*) && \
53
.if !defined(USE_GCC) && empty(CC:T:M*gcc4*) && \
51
empty(PORT_OPTIONS:MSTATIC_TOR) && empty(ARCH:Mia64)
54
empty(PORT_OPTIONS:MSTATIC_TOR) && empty(ARCH:Mia64)
52
CONFIGURE_ARGS+=	--enable-gcc-hardening
55
CONFIGURE_ARGS+=	--enable-gcc-hardening
Lines 66-76 Link Here
66
CONFIGURE_ARGS+=	--disable-instrument-downloads
69
CONFIGURE_ARGS+=	--disable-instrument-downloads
67
.endif
70
.endif
68
71
72
.if ${PORT_OPTIONS:MOBFSPROXY}
73
BUILD_DEPENDS +=	${LOCALBASE}/bin/obfsproxy:${PORTSDIR}/security/obfsproxy
74
.endif
75
69
.if ${PORT_OPTIONS:MSTATIC_TOR}
76
.if ${PORT_OPTIONS:MSTATIC_TOR}
70
BUILD_DEPENDS +=	${LOCALBASE}/lib/libevent.a:${PORTSDIR}/devel/libevent2
77
BUILD_DEPENDS +=	${LOCALBASE}/lib/libevent.a:${PORTSDIR}/devel/libevent2
71
CONFIGURE_ARGS+=	--enable-static-tor \
78
CONFIGURE_ARGS+=	--enable-static-tor \
72
			--with-zlib-dir=/usr/lib --disable-linker-hardening
79
			--disable-linker-hardening \
73
TOR_LIBEVENT_LIBS=	${LOCALBASE}/lib/libevent.a
80
			--with-libevent-dir=${LOCALBASE}/lib \
81
			--with-zlib-dir=/usr/lib
74
.if ${PORT_OPTIONS:MBUFFEREVENTS}
82
.if ${PORT_OPTIONS:MBUFFEREVENTS}
75
TOR_LIBEVENT_LIBS:=	${LOCALBASE}/lib/libevent_openssl.a ${TOR_LIBEVENT_LIBS}
83
TOR_LIBEVENT_LIBS:=	${LOCALBASE}/lib/libevent_openssl.a ${TOR_LIBEVENT_LIBS}
76
.endif
84
.endif
Lines 85-96 Link Here
85
93
86
.if ${PORT_OPTIONS:MTCMALLOC}
94
.if ${PORT_OPTIONS:MTCMALLOC}
87
CONFIGURE_ARGS+=	--with-tcmalloc
95
CONFIGURE_ARGS+=	--with-tcmalloc
96
LDFLAGS+=		"-L${LOCALBASE}/lib"
88
.if ${PORT_OPTIONS:MSTATIC_TOR}
97
.if ${PORT_OPTIONS:MSTATIC_TOR}
98
BUILD_DEPENDS +=	${LOCALBASE}/lib/libtcmalloc.a:${PORTSDIR}/devel/google-perftools
99
.endif
89
BUILD_DEPENDS +=	${LOCALBASE}/lib/libtcmalloc.so:${PORTSDIR}/devel/google-perftools
100
BUILD_DEPENDS +=	${LOCALBASE}/lib/libtcmalloc.so:${PORTSDIR}/devel/google-perftools
90
.else
91
LIB_DEPENDS+=		libtcmalloc.so:${PORTSDIR}/devel/google-perftools
101
LIB_DEPENDS+=		libtcmalloc.so:${PORTSDIR}/devel/google-perftools
92
.endif
102
.endif
93
.endif
94
103
95
.if ${PORT_OPTIONS:MTOR2WEB}
104
.if ${PORT_OPTIONS:MTOR2WEB}
96
CONFIGURE_ARGS+=	--enable-tor2web-mode
105
CONFIGURE_ARGS+=	--enable-tor2web-mode
Lines 102-120 Link Here
102
CONFIGURE_ARGS+=	--disable-transparent
111
CONFIGURE_ARGS+=	--disable-transparent
103
.endif
112
.endif
104
113
105
post-patch:
114
.if ! ${PORT_OPTIONS:MTOR2WEB}
106
	@${REINPLACE_CMD} -E -e "s@-ltcmalloc@${LOCALBASE}/lib/libtcmalloc.so@" \
115
check regression-test test: build
107
		-e "s@(-z) (relro|now)@-Wl,\1,\2@g" \
116
	@cd ${BUILD_WRKSRC} ; ${SETENV} ${MAKE_ENV} ${MAKE_CMD} \
108
		${WRKSRC}/configure
117
		${MAKE_ARGS} check
118
.endif
109
119
120
# post-patch:
121
#	@${REINPLACE_CMD} -E -e "s@-ltcmalloc@${LOCALBASE}/lib/libtcmalloc.so@" \
122
#		-e "s@(-z) (relro|now)@-Wl,\1,\2@g" \
123
#		${WRKSRC}/configure
124
110
post-configure:
125
post-configure:
111
	@${REINPLACE_CMD} -e '\|^nodist_man1_MANS =|s|$$|$$(install_mans:=.1)|' \
126
	@${REINPLACE_CMD} -e '\|^nodist_man1_MANS =|s|$$|$$(install_mans:=.1)|' \
112
		${WRKSRC}/Makefile
127
		${WRKSRC}/Makefile
113
128
114
.if ! ${PORT_OPTIONS:MTOR2WEB}
115
check regression-test test: build
116
	@cd ${BUILD_WRKSRC} ; ${SETENV} ${MAKE_ENV} ${MAKE_CMD} \
117
	${MAKE_ARGS} check
118
119
.endif
120
.include <bsd.port.mk>
129
.include <bsd.port.mk>
(-)distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (tor-0.2.6.7.tar.gz) = 8c2be88a542ed1b22a8d3d595ec0acd0e28191de273dbcaefc64fdce92b89e6c
1
SHA256 (tor-0.2.7.4-rc.tar.gz) = 6741c3e6abfedb76be781b767b77f794ee1a0f554cc4ccf083e44d4d9dc8af67
2
SIZE (tor-0.2.6.7.tar.gz) = 3595669
2
SIZE (tor-0.2.7.4-rc.tar.gz) = 4830972
(-)files/patch-configure (-49 lines)
Lines 1-49 Link Here
1
--- configure.orig	2012-06-15 03:10:31.000000000 -0400
2
+++ configure	2012-06-17 08:46:34.000000000 -0400
3
@@ -6319,6 +6319,7 @@
4
 fi
5
 
6
 
7
+if false ; then
8
 trylibeventdir=""
9
 
10
 # Check whether --with-libevent-dir was given.
11
@@ -6645,6 +6646,7 @@
12
 LIBS="$tor_saved_LIBS"
13
 LDFLAGS="$tor_saved_LDFLAGS"
14
 CPPFLAGS="$tor_saved_CPPFLAGS"
15
+fi
16
 
17
 
18
 
19
@@ -6707,6 +6709,7 @@
20
 fi
21
 
22
 
23
+if false ; then
24
 if test "$enable_static_libevent" = "yes"; then
25
    if test "$tor_cv_library_libevent_dir" = "(system)"; then
26
      as_fn_error $? "\"You must specify an explicit --with-libevent-dir=x option when using --enable-static-libevent\"" "$LINENO" 5
27
@@ -6716,6 +6719,7 @@
28
 else
29
      TOR_LIBEVENT_LIBS="-levent"
30
 fi
31
+fi
32
 
33
 if test "$enable_bufferevents" = "yes" ; then
34
   if test "$ac_cv_header_event2_bufferevent_ssl_h" != "yes" ; then
35
@@ -6794,12 +6798,14 @@
36
 
37
 $as_echo "#define USE_BUFFEREVENTS 1" >>confdefs.h
38
 
39
+if false ; then
40
   if test "$enable_static_libevent" = "yes"; then
41
     TOR_LIBEVENT_LIBS="$TOR_LIBDIR_libevent/libevent_openssl.a $TOR_LIBEVENT_LIBS"
42
   else
43
     TOR_LIBEVENT_LIBS="-levent_openssl $TOR_LIBEVENT_LIBS"
44
   fi
45
 fi
46
+fi
47
 
48
 
49
 
(-)files/pkg-message.in (-9 / +9 lines)
Lines 6-21 Link Here
6
the net/torsocks port. After installing tor for the first time, or after
6
the net/torsocks port. After installing tor for the first time, or after
7
a major update of tor, you should:
7
a major update of tor, you should:
8
8
9
rm -r /var/db/tor /var/run/tor
9
	# rm -r /var/db/tor /var/log/tor /var/run/tor
10
mkdir -p /var/db/tor/data /var/run/tor
10
	# touch /var/log/tor
11
touch /var/log/tor
11
	# mkdir -p /var/db/tor /var/run/tor
12
chown -R _tor:_tor /var/db/tor /var/log/tor /var/run/tor
12
	# chown -R _tor:_tor /var/db/tor /var/log/tor /var/run/tor
13
chmod -R 700 /var/db/tor
13
	# chmod -R 700 /var/db/tor /var/log/tor /var/run/tor
14
14
15
before starting the tor server. Tor users are strongly advised to prevent traffic
15
Before starting the tor server. Tor users are strongly advised to prevent traffic
16
analysis that exploits sequential IP IDs by setting:
16
analysis that exploits sequential IP ID by setting:
17
17
18
sysctl net.inet.ip.random_id=1
18
	# sysctl net.inet.ip.random_id=1
19
19
20
(see sysctl.conf(5)).
20
Please read sysctl.conf(5) for more information and details.
21
================================================================================
21
================================================================================
(-)files/tor.in (-1 / +1 lines)
Lines 38-44 Link Here
38
required_dirs=${tor_datadir}
38
required_dirs=${tor_datadir}
39
pidfile=${tor_pidfile}
39
pidfile=${tor_pidfile}
40
command="%%PREFIX%%/bin/${name}"
40
command="%%PREFIX%%/bin/${name}"
41
command_args="-f ${tor_conf} --PidFile ${tor_pidfile} --RunAsDaemon 1 --DataDirectory ${tor_datadir} --+Log ${tor_loglevel}\ file\ ${tor_logfile}"
41
command_args="-f ${tor_conf} --PidFile ${tor_pidfile} --RunAsDaemon 1 --DataDirectory ${tor_datadir} --Log ${tor_loglevel}\ file\ ${tor_logfile}"
42
extra_commands="log reload"
42
extra_commands="log reload"
43
log_cmd="${name}_log"
43
log_cmd="${name}_log"
44
44

Return to bug 203014