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

Collapse All | Expand All

(-)security/tor/Makefile (-50 / +37 lines)
Lines 2-9 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	tor
4
PORTNAME=	tor
5
PORTVERSION=	0.2.7.6
5
PORTVERSION=	0.2.8.6
6
PORTREVISION=	1
7
CATEGORIES=	security net ipv6
6
CATEGORIES=	security net ipv6
8
MASTER_SITES=	TOR
7
MASTER_SITES=	TOR
9
8
Lines 14-21 Link Here
14
LICENSE_FILE=	${WRKSRC}/LICENSE
13
LICENSE_FILE=	${WRKSRC}/LICENSE
15
14
16
BROKEN_powerpc64=	Does not build
15
BROKEN_powerpc64=	Does not build
16
EXPENSIVE_HARDEN_BROKEN=yes  # https://trac.torproject.org/projects/tor/ticket/19821
17
17
18
USES=		cpe gmake
18
USES=		cpe gmake ssl
19
CPE_VENDOR=	torproject
19
CPE_VENDOR=	torproject
20
GNU_CONFIGURE=	yes
20
GNU_CONFIGURE=	yes
21
CONFIGURE_ARGS=	--with-openssl-dir="${OPENSSLBASE}" --disable-asciidoc
21
CONFIGURE_ARGS=	--with-openssl-dir="${OPENSSLBASE}" --disable-asciidoc
Lines 24-30 Link Here
24
		TOR_LIBEVENT_LIBS="${TOR_LIBEVENT_LIBS}"
24
		TOR_LIBEVENT_LIBS="${TOR_LIBEVENT_LIBS}"
25
25
26
OPTIONS_DEFINE=	BUFFEREVENTS INSTR_DOWNLOADS \
26
OPTIONS_DEFINE=	BUFFEREVENTS INSTR_DOWNLOADS \
27
		STATIC_TOR TCMALLOC TOR2WEB TRANSPARENT
27
		STATIC_TOR TCMALLOC TOR2WEB TRANSPARENT EXPENSIVE_HARDEN
28
OPTIONS_DEFAULT=THREADS TRANSPARENT
28
29
29
BUFFEREVENTS_DESC=	Use libevent's buffered IO
30
BUFFEREVENTS_DESC=	Use libevent's buffered IO
30
INSTR_DOWNLOADS_DESC=	Instrument downloads for analysis
31
INSTR_DOWNLOADS_DESC=	Instrument downloads for analysis
Lines 32-42 Link Here
32
TCMALLOC_DESC=		Use the tcmalloc memory allocation library
33
TCMALLOC_DESC=		Use the tcmalloc memory allocation library
33
TOR2WEB_DESC=		Faster but non-anonymous hidden services
34
TOR2WEB_DESC=		Faster but non-anonymous hidden services
34
TRANSPARENT_DESC=	Transparent proxy support
35
TRANSPARENT_DESC=	Transparent proxy support
36
EXPENSIVE_HARDEN_DESC=	BROKEN Expensive compiler hardening, makes Tor slower
35
37
36
OPTIONS_DEFAULT=	THREADS TRANSPARENT
37
38
USE_OPENSSL=	yes
39
40
USE_RC_SUBR=	tor
38
USE_RC_SUBR=	tor
41
SUB_FILES=	pkg-message
39
SUB_FILES=	pkg-message
42
40
Lines 45-50 Link Here
45
43
46
CONFLICTS=	tor-devel-[0-9]*
44
CONFLICTS=	tor-devel-[0-9]*
47
45
46
BUFFEREVENTS_CONFIGURE_ENABLE=		bufferevents
47
INSTR_DOWNLOADS_CONFIGURE_ENABLE=	instrument-downloads
48
TOR2WEB_CONFIGURE_ENABLE=		tor2web-mode
49
TRANSPARENT_CONFIGURE_ENABLE=		transparent
50
#TCMALLOC_CONFIGURE_WITH=		tcmalloc
51
EXPENSIVE_HARDEN_CONFIGURE_ENABLE=	expensive-hardening
52
STATIC_TOR_CONFIGURE_ENABLE=		static-tor
53
48
.include <bsd.port.options.mk>
54
.include <bsd.port.options.mk>
49
55
50
.if ${OSVERSION} < 1000000
56
.if ${OSVERSION} < 1000000
Lines 51-111 Link Here
51
WITH_OPENSSL_PORT=	yes
57
WITH_OPENSSL_PORT=	yes
52
.endif
58
.endif
53
59
54
.if !defined(USE_GCC) && empty(CC:T:M*gcc4*) && \
60
# delete when this bug is fixed: https://trac.torproject.org/projects/tor/ticket/19518
55
empty(PORT_OPTIONS:MSTATIC_TOR) && empty(ARCH:Mia64)
61
.if ${PORT_OPTIONS:MTCMALLOC}
56
CONFIGURE_ARGS+=	--enable-gcc-hardening
62
CONFIGURE_ARGS=		--with-tcmalloc
57
.else
58
CONFIGURE_ARGS+=	--disable-gcc-hardening
59
.endif
63
.endif
60
64
61
.if ${PORT_OPTIONS:MBUFFEREVENTS}
65
.if ${PORT_OPTIONS:MSTATIC_TOR}
62
CONFIGURE_ARGS+=	--enable-bufferevents
66
DEP_KIND=BUILD
67
DEP_LIB_PATH=${LOCALBASE}/lib/
68
DEP_LIB_SUFF=a
63
.else
69
.else
64
CONFIGURE_ARGS+=	--disable-bufferevents
70
DEP_KIND=LIB
71
DEP_LIB_SUFF=so
65
.endif
72
.endif
66
73
67
.if ${PORT_OPTIONS:MINSTR_DOWNLOADS}
74
${DEP_KIND}_DEPENDS+=		${DEP_LIB_PATH}libevent.${DEP_LIB_SUFF}:devel/libevent2
68
CONFIGURE_ARGS+=	--enable-instrument-downloads
75
TCMALLOC_${DEP_KIND}_DEPENDS+=	${DEP_LIB_PATH}libtcmalloc.${DEP_LIB_SUFF}:devel/google-perftools
76
77
.if !defined(USE_GCC) && empty(CC:T:M*gcc4*) && \
78
    empty(PORT_OPTIONS:MSTATIC_TOR) && empty(ARCH:Mia64)
79
CONFIGURE_ARGS+=	--enable-gcc-hardening
69
.else
80
.else
70
CONFIGURE_ARGS+=	--disable-instrument-downloads
81
CONFIGURE_ARGS+=	--disable-gcc-hardening
71
.endif
82
.endif
72
83
73
.if ${PORT_OPTIONS:MSTATIC_TOR}
84
.if ${PORT_OPTIONS:MSTATIC_TOR}
74
BUILD_DEPENDS +=	${LOCALBASE}/lib/libevent.a:devel/libevent2
85
CONFIGURE_ARGS+=	--with-zlib-dir=/usr/lib --disable-linker-hardening
75
CONFIGURE_ARGS+=	--enable-static-tor \
86
.  if ${PORT_OPTIONS:MBUFFEREVENTS}
76
			--with-zlib-dir=/usr/lib --disable-linker-hardening
87
TOR_LIBEVENT_LIBS:=	${LOCALBASE}/lib/libevent_openssl.a ${LOCALBASE}/lib/libevent.a
77
TOR_LIBEVENT_LIBS=	${LOCALBASE}/lib/libevent.a
88
.  endif
78
.if ${PORT_OPTIONS:MBUFFEREVENTS}
79
TOR_LIBEVENT_LIBS:=	${LOCALBASE}/lib/libevent_openssl.a ${TOR_LIBEVENT_LIBS}
80
.endif
81
.else
89
.else
82
CONFIGURE_ARGS+=	--enable-linker-hardening
90
CONFIGURE_ARGS+=	--enable-linker-hardening
83
LIB_DEPENDS+=		libevent.so:devel/libevent2
91
.  if ${PORT_OPTIONS:MBUFFEREVENTS}
84
TOR_LIBEVENT_LIBS=	-levent
92
TOR_LIBEVENT_LIBS:=	-levent_openssl -levent
85
.if ${PORT_OPTIONS:MBUFFEREVENTS}
93
.  endif
86
TOR_LIBEVENT_LIBS:=	-levent_openssl ${TOR_LIBEVENT_LIBS}
87
.endif
94
.endif
88
.endif
89
95
90
.if ${PORT_OPTIONS:MTCMALLOC}
91
CONFIGURE_ARGS+=	--with-tcmalloc
92
.if ${PORT_OPTIONS:MSTATIC_TOR}
93
BUILD_DEPENDS+=		${LOCALBASE}/lib/libtcmalloc.a:devel/google-perftools
94
.else
95
LIB_DEPENDS+=		libtcmalloc.so:devel/google-perftools
96
.endif
97
.endif
98
99
.if ${PORT_OPTIONS:MTOR2WEB}
100
CONFIGURE_ARGS+=	--enable-tor2web-mode
101
.endif
102
103
.if ${PORT_OPTIONS:MTRANSPARENT}
104
CONFIGURE_ARGS+=	--enable-transparent
105
.else
106
CONFIGURE_ARGS+=	--disable-transparent
107
.endif
108
109
post-patch:
96
post-patch:
110
	@${REINPLACE_CMD} -E -e "s@(-z) (relro|now)@-Wl,\1,\2@g" \
97
	@${REINPLACE_CMD} -E -e "s@(-z) (relro|now)@-Wl,\1,\2@g" \
111
		${WRKSRC}/configure
98
		${WRKSRC}/configure
(-)security/tor/distinfo (-2 / +3 lines)
Lines 1-2 Link Here
1
SHA256 (tor-0.2.7.6.tar.gz) = 493a8679f904503048114aca6467faef56861206bab8283d858f37141d95105d
1
TIMESTAMP = 1470241580
2
SIZE (tor-0.2.7.6.tar.gz) = 4869754
2
SHA256 (tor-0.2.8.6.tar.gz) = 3dc9fc02f7cd22ed5fce707e0d9b26a72b1bd0976766a804cb13078d32e3ab5a
3
SIZE (tor-0.2.8.6.tar.gz) = 5163500
(-)security/tor/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
 
(-)security/tor/files/tor.in (-1 / +1 lines)
Lines 27-33 Link Here
27
: ${tor_enable="NO"}
27
: ${tor_enable="NO"}
28
: ${tor_conf="%%PREFIX%%/etc/tor/torrc"}
28
: ${tor_conf="%%PREFIX%%/etc/tor/torrc"}
29
: ${tor_user="_tor"}
29
: ${tor_user="_tor"}
30
: ${tor_pidfile="/var/run/tor/tor.pid"}
30
: ${tor_pidfile="/var/run/tor.pid"}
31
: ${tor_datadir="/var/db/tor"}
31
: ${tor_datadir="/var/db/tor"}
32
32
33
required_files=${tor_conf}
33
required_files=${tor_conf}

Return to bug 211553