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

Collapse All | Expand All

(-)security/tor-devel/Makefile (-63 / +85 lines)
Lines 2-8 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	tor
4
PORTNAME=	tor
5
DISTVERSION=	0.2.9.4-alpha
5
DISTVERSION=	0.2.9.5-alpha
6
# PORTREVISION=	1
6
CATEGORIES=	security net ipv6
7
CATEGORIES=	security net ipv6
7
MASTER_SITES=	TOR
8
MASTER_SITES=	TOR
8
PKGNAMESUFFIX=	-devel
9
PKGNAMESUFFIX=	-devel
Lines 13-41 Link Here
13
LICENSE=	BSD3CLAUSE
14
LICENSE=	BSD3CLAUSE
14
LICENSE_FILE=	${WRKSRC}/LICENSE
15
LICENSE_FILE=	${WRKSRC}/LICENSE
15
16
16
BROKEN_mips64=	Does not build: error: Need a uint128_t implementation!
17
BROKEN_mips64=		Does not build: error: Need a uint128_t implementation!
17
BROKEN_powerpc64=	Does not build
18
BROKEN_powerpc64=	Does not build.
18
BROKEN_sparc64=	Does not build: error: Need a uint128_t implementation!
19
BROKEN_sparc64=		Does not build: error: Need a uint128_t implementation!
19
20
20
USES=		cpe gmake
21
USES=		cpe
21
CPE_VENDOR=	torproject
22
CPE_VENDOR=	torproject
22
#CPE_VERSION=	${DISTVERSION:C/-.*//}
23
# CPE_VERSION=	${DISTVERSION:C/-.*//}
23
#CPE_UPDATE=	${DISTVERSION:C/.*-//}
24
# CPE_UPDATE=	${DISTVERSION:C/.*-//}
24
GNU_CONFIGURE=	yes
25
GNU_CONFIGURE=	yes
25
CONFIGURE_ARGS=	--with-openssl-dir="${OPENSSLBASE}" --disable-asciidoc
26
CONFIGURE_ARGS=	--disable-asciidoc \
26
CONFIGURE_ENV=	TOR_CPPFLAGS_libevent="-I${LOCALBASE}/include" \
27
		--with-tor-user=${USERS} --with-tor-group=${GROUPS} \
27
		TOR_LDFLAGS_libevent="-L${LOCALBASE}/lib/" \
28
		--with-libevent-dir=${LOCALBASE} \
28
		TOR_LIBEVENT_LIBS="${TOR_LIBEVENT_LIBS}"
29
		--with-zlib-dir=/usr
30
CONFIGURE_ENV=	TOR_CPPFLAGS_zlib='-I/usr/include' \
31
		TOR_LDFLAGS_zlib='-L/usr/lib' \
32
		TOR_CPPFLAGS_libevent='-I${LOCALBASE}/include' \
33
		TOR_LDFLAGS_libevent='-L${LOCALBASE}/lib'
29
34
30
OPTIONS_DEFINE=	STATIC_TOR TCMALLOC TOR2WEB TRANSPARENT
35
OPTIONS_DEFINE=		STATIC TOR2WEB
31
36
32
STATIC_TOR_DESC=	Build a static tor
37
OPTIONS_RADIO=		MALLOC
33
TCMALLOC_DESC=		Use the tcmalloc memory allocation library
38
OPTIONS_RADIO_MALLOC=	DMALLOC TCMALLOC
34
TOR2WEB_DESC=		Faster but non-anonymous hidden services
35
TRANSPARENT_DESC=	Transparent proxy support
36
39
37
OPTIONS_DEFAULT=	TRANSPARENT
40
OPTIONS_SINGLE=		SSLTLS
41
OPTIONS_SINGLE_SSLTLS=	SSLTLS_FREEBSD SSLTLS_PORTS
38
42
43
DMALLOC_DESC=		Use debug memory allocation library
44
MALLOC_DESC=		Dynamic memory allocation management
45
SSLTLS_FREEBSD_DESC=	Use FreeBSD's base SSL/TLS libraries
46
SSLTLS_PORTS_DESC=	Use SSL/TLS from ports instead of FreeBSD's
47
STATIC_DESC=		Create an entirely static Tor binary
48
TCMALLOC_DESC=		Use tcmalloc memory allocation library
49
TOR2WEB_DESC=		Support Tor2Web non-anonymous mode
50
51
OPTIONS_DEFAULT=	SSLTLS_FREEBSD
52
53
DMALLOC_CONFIGURE_ON=		--with-dmalloc
54
DMALLOC_CONFIGURE_OFF=
55
DMALLOC_LIB_DEPENDS=		libdmalloc.so:devel/dmalloc
56
SSLTLS_FREEBSD_CONFIGURE_ON=	--with-openssl-dir=/usr --includedir=/usr/include
57
SSLTLS_FREEBSD_CONFIGURE_OFF=
58
SSLTLS_FREEBSD_CONFIGURE_ENV=	SSL_DEFAULT=base DEFAULT_VERSIONS+='ssl=base'
59
SSLTLS_FREEBSD_CONFIGURE_ENV+=	OPENSSLBASE=/usr OPENSSLRPATH=/usr/lib USE_OPENSSL_RPATH=yes
60
SSLTLS_FREEBSD_CONFIGURE_ENV+=	TOR_CPPFLAGS_openssl='-I/usr/include'
61
SSLTLS_FREEBSD_CONFIGURE_ENV+=	TOR_LDFLAGS_openssl='-L/usr/lib -Wl,-rpath,/usr/lib'
62
SSLTLS_FREEBSD_LIB_DEPENDS=	libevent.so:devel/libevent2
63
SSLTLS_PORTS_CONFIGURE_ON=	--with-openssl-dir=${OPENSSLBASE}
64
SSLTLS_PORTS_CONFIGURE_OFF=
65
SSLTLS_PORTS_CONFIGURE_ENV=	TOR_CPPFLAGS_openssl='-I${OPENSSLBASE}/include' TOR_LDFLAGS_openssl='-L${OPENSSLBASE}/lib'
66
SSLTLS_PORTS_LIB_DEPENDS=	libevent.so:devel/libevent2
67
STATIC_CONFIGURE_ON=		--enable-static-tor
68
STATIC_CONFIGURE_OFF=
69
STATIC_CONFIGURE_BUILD_DEPENDS=	libevent.a:devel/libevent2
70
TCMALLOC_CONFIGURE_ON=		--with-tcmalloc
71
TCMALLOC_CONFIGURE_OFF=
72
TCMALLOC_LIB_DEPENDS=		libtcmalloc.so:devel/google-perftools
73
TOR2WEB_CONFIGURE_ON=		--enable-tor2web-mode
74
TOR2WEB_CONFIGURE_OFF=
75
39
USE_RC_SUBR=	tor
76
USE_RC_SUBR=	tor
40
SUB_FILES=	pkg-message
77
SUB_FILES=	pkg-message
41
78
Lines 44-95 Link Here
44
81
45
CONFLICTS=	tor-[0-9]*
82
CONFLICTS=	tor-[0-9]*
46
83
47
STATIC_TOR_USES=	ssl:build
48
STATIC_TOR_USES_OFF=	ssl
49
50
.include <bsd.port.options.mk>
84
.include <bsd.port.options.mk>
51
85
52
.if ${OSVERSION} < 1000000
86
.if ${OSVERSION} < 1000015
53
WITH_OPENSSL_PORT=	yes
87
DEFAULT_VERSIONS+=	ssl=openssl
88
# OPENSSL_PORT=		security/openssl
89
WITH_OPENSSL_PORT=	yes
54
.endif
90
.endif
55
91
56
.if !defined(USE_GCC) && empty(CC:T:M*gcc4*) && \
92
.if !empty(PORT_OPTIONS:MSSLTLS_PORTS)
57
empty(PORT_OPTIONS:MSTATIC_TOR) && empty(ARCH:Mia64)
93
USES+=	ssl
58
CONFIGURE_ARGS+=	--enable-gcc-hardening
59
.else
60
CONFIGURE_ARGS+=	--disable-gcc-hardening
61
.endif
94
.endif
62
95
63
.if ${PORT_OPTIONS:MSTATIC_TOR}
96
.if !empty(PORT_OPTIONS:MSTATIC)
64
BUILD_DEPENDS +=	${LOCALBASE}/lib/libevent.a:devel/libevent2
97
.	if !empty(PORT_OPTIONS:MDMALLOC)
65
CONFIGURE_ARGS+=	--enable-static-tor \
98
BUILD_DEPENDS+=		${LOCALBASE}/lib/libdmalloc.a:devel/dmalloc
66
			--with-zlib-dir=/usr/lib --disable-linker-hardening
99
.	endif
67
TOR_LIBEVENT_LIBS=	${LOCALBASE}/lib/libevent.a
100
.	if !empty(PORT_OPTIONS:MTCMALLOC)
68
.else
69
CONFIGURE_ARGS+=	--enable-linker-hardening
70
LIB_DEPENDS+=		libevent.so:devel/libevent2
71
TOR_LIBEVENT_LIBS=	-levent
72
.endif
73
74
.if ${PORT_OPTIONS:MTCMALLOC}
75
CONFIGURE_ARGS+=	--with-tcmalloc
76
.if ${PORT_OPTIONS:MSTATIC_TOR}
77
BUILD_DEPENDS+=		${LOCALBASE}/lib/libtcmalloc.a:devel/google-perftools
101
BUILD_DEPENDS+=		${LOCALBASE}/lib/libtcmalloc.a:devel/google-perftools
78
.else
102
.	endif
79
LIB_DEPENDS+=		libtcmalloc.so:devel/google-perftools
103
.	if !empty(PORT_OPTIONS:MSSLTLS_PORTS)
104
BUILD_DEPENDS+=		${OPENSSLBASE}/lib/libcrypto.a:${OPENSSL_PORT} \
105
			${OPENSSLBASE}/lib/libssl.a:${OPENSSL_PORT}
106
.	endif
80
.endif
107
.endif
81
.endif
82
108
109
pre-everything::
83
.if ${PORT_OPTIONS:MTOR2WEB}
110
.if ${PORT_OPTIONS:MTOR2WEB}
84
CONFIGURE_ARGS+=	--enable-tor2web-mode
111
	@${ECHO_MSG}
112
	@${ECHO_MSG} "WARNING: TOR2WEB is enabled! This option makes Tor working	"
113
	@${ECHO_MSG} "	only for *non-anonymous* hidden service traffic.		"
114
	@${ECHO_MSG} "	Please make sure you understand this option to proceed!		"
115
	@${ECHO_MSG}
116
	@${ECHO_MSG} "	You may want to stop build with Ctrl+C.				"
117
	@${ECHO_MSG}
118
	sleep 10
85
.endif
119
.endif
86
120
87
.if ${PORT_OPTIONS:MTRANSPARENT}
88
CONFIGURE_ARGS+=	--enable-transparent
89
.else
90
CONFIGURE_ARGS+=	--disable-transparent
91
.endif
92
93
post-patch:
121
post-patch:
94
	@${REINPLACE_CMD} -E -e "s@(-z) (relro|now)@-Wl,\1,\2@g" \
122
	@${REINPLACE_CMD} -E -e "s@(-z) (relro|now)@-Wl,\1,\2@g" \
95
		${WRKSRC}/configure
123
		${WRKSRC}/configure
Lines 98-110 Link Here
98
		${WRKSRC}/doc/tor.1.* \
126
		${WRKSRC}/doc/tor.1.* \
99
		${WRKSRC}/doc/tor.html.in
127
		${WRKSRC}/doc/tor.html.in
100
128
101
post-patch-STATIC_TOR-off:
129
# post-patch-STATIC-off:
102
	@${REINPLACE_CMD} -e "s@-ltcmalloc@${LOCALBASE}/lib/libtcmalloc.so@" \
130
#	@${REINPLACE_CMD} -e "s@-ltcmalloc@${LOCALBASE}/lib/libtcmalloc.so@" \
103
		${WRKSRC}/configure
131
#		${WRKSRC}/configure
104
132
105
post-patch-STATIC_TOR-on:
133
# post-patch-STATIC-on:
106
	@${REINPLACE_CMD} -e "s@-ltcmalloc@${LOCALBASE}/lib/libtcmalloc.a@" \
134
#	@${REINPLACE_CMD} -e "s@-ltcmalloc@${LOCALBASE}/lib/libtcmalloc.a@" \
107
		${WRKSRC}/configure
135
#		${WRKSRC}/configure
108
136
109
post-configure:
137
post-configure:
110
	@${REINPLACE_CMD} -e '\|^nodist_man1_MANS =|s|$$|$$(install_mans:=.1)|' \
138
	@${REINPLACE_CMD} -e '\|^nodist_man1_MANS =|s|$$|$$(install_mans:=.1)|' \
Lines 113-122 Link Here
113
post-install:
141
post-install:
114
	@${MKDIR} ${STAGEDIR}/var/log/tor ${STAGEDIR}/var/run/tor
142
	@${MKDIR} ${STAGEDIR}/var/log/tor ${STAGEDIR}/var/run/tor
115
143
116
.if ! ${PORT_OPTIONS:MTOR2WEB}
117
check regression-test test: build
118
	@cd ${BUILD_WRKSRC} ; ${SETENV} ${MAKE_ENV} ${MAKE_CMD} \
119
		${MAKE_ARGS} check
120
.endif
121
122
.include <bsd.port.mk>
144
.include <bsd.port.mk>
(-)security/tor-devel/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1476741065
1
TIMESTAMP = 1478628950
2
SHA256 (tor-0.2.9.4-alpha.tar.gz) = fc5664fff4c86d3644043a068f11b17c57f9a295c37b7186bf90bb237913e400
2
SHA256 (tor-0.2.9.5-alpha.tar.gz) = d0c898ad5e8f1a136864aa105407c7b89f3e70d9462a7bb307a55a3afa5b62bd
3
SIZE (tor-0.2.9.4-alpha.tar.gz) = 5481286
3
SIZE (tor-0.2.9.5-alpha.tar.gz) = 5489651
(-)security/tor-devel/files/pkg-message.in (-9 / +11 lines)
Lines 1-14 Link Here
1
================================================================================
1
================================================================================
2
To enable the tor server, set tor_enable="YES" in your /etc/rc.conf
2
To enable Tor, please set tor_enable="YES" in your /etc/rc.conf and 
3
and edit %%PREFIX%%/etc/tor/torrc as desired. (However, note that the
3
edit %%PREFIX%%/etc/tor/torrc as desired (however, note that the 
4
%%PREFIX%%/etc/rc.d/tor rc.subr script can override some torrc
4
%%PREFIX%%/etc/rc.d/tor rc.subr script can override some torrc's options; 
5
options: see that script for details.) To use the torify script, install
5
see this script for details).
6
the net/torsocks port.
7
6
8
Tor users are strongly advised to prevent traffic analysis that
7
To use torify(1), you need to install the 'net/torsocks' port.
9
exploits sequential IP IDs by setting:
10
8
11
sysctl net.inet.ip.random_id=1
9
Tor users are strongly advised to prevent traffic analysis that exploits 
10
sequential IP ID by setting:
12
11
13
(see sysctl.conf(5)).
12
	# sysctl net.inet.ip.random_id=1
13
14
Please refer to sysctl.conf(5) for more information on how to make this change
15
permanent.
14
================================================================================
16
================================================================================
(-)security/tor-devel/pkg-descr (-12 / +19 lines)
Lines 1-16 Link Here
1
Tor: an anonymizing overlay network for TCP
1
Tor: The Onion Routing Network (anonymizing overlay network for TCP)
2
2
3
Tor is a connection-based low-latency anonymous communication system which
3
Tor is free software and an open network that helps you defend against 
4
addresses many flaws in the original onion routing design.
4
traffic analysis, a form of network surveillance that threatens 
5
personal freedom and privacy, confidential business activities and 
6
relationships, and state security.
5
7
6
Tor is a toolset for a wide range of organizations and people that
8
Protect your privacy! Defend yourself against network surveillance.
7
want to improve their safety and security on the Internet. Using
8
Tor can help you anonymize web browsing and publishing, instant
9
messaging, IRC, SSH, and more. Tor also provides a platform on which
10
software developers can build new applications with built-in
11
anonymity, safety, and privacy features.
12
9
13
Remember that this is development code -- DON'T RELY ON THE CURRENT TOR
10
	o prevents people from learning your location or browsing habits;
14
NETWORK FOR ANONYMITY!
11
	o Tor is for web browsers, instant messaging clients, and more.
15
12
16
WWW: http://torproject.org/
13
Tor is a toolset for a wide range of organizations and people that want 
14
to improve their safety and security on the Internet. Using Tor can help 
15
you anonymize web browsing and publishing, instant messaging, IRC, SSH, 
16
and more. Tor also provides a platform on which software developers can 
17
build new applications with built-in anonymity, safety, and privacy features.
18
19
	*** This version is not a stable Tor release ***
20
	***  Remember that this is development code  ***
21
	*** DON'T RELY ON THIS VERSION FOR ANONYMITY ***
22
23
WWW: https://www.torproject.org/
(-)security/tor-devel/pkg-plist (-5 / +5 lines)
Lines 1-13 Link Here
1
%%DATADIR%%/geoip
2
%%DATADIR%%/geoip6
3
@dir(_tor,_tor,750) /var/log/tor
4
@dir(_tor,_tor,750) /var/run/tor
5
@sample etc/tor/torrc.sample
1
bin/tor
6
bin/tor
2
bin/tor-gencert
7
bin/tor-gencert
3
bin/tor-resolve
8
bin/tor-resolve
4
bin/torify
9
bin/torify
5
@sample etc/tor/torrc.sample
6
man/man1/tor-gencert.1.gz
10
man/man1/tor-gencert.1.gz
7
man/man1/tor-resolve.1.gz
11
man/man1/tor-resolve.1.gz
8
man/man1/tor.1.gz
12
man/man1/tor.1.gz
9
man/man1/torify.1.gz
13
man/man1/torify.1.gz
10
%%DATADIR%%/geoip
11
%%DATADIR%%/geoip6
12
@dir(_tor,_tor,750) /var/run/tor
13
@dir(_tor,_tor,750) /var/log/tor

Return to bug 203014