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

Collapse All | Expand All

(-)security/tor-devel/Makefile (-69 / +68 lines)
Lines 3-8 Link Here
3
3
4
PORTNAME=	tor
4
PORTNAME=	tor
5
DISTVERSION=	0.2.9.4-alpha
5
DISTVERSION=	0.2.9.4-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 ssl
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
HAS_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_libevent='-I${LOCALBASE}/include' \
31
		TOR_CPPFLAGS_zlib='-I/usr/include' \
32
		TOR_LDFLAGS_libevent='-L${LOCALBASE}/lib' \
33
		TOR_LDFLAGS_zlib='-L/usr/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=		OPENSSL
41
OPTIONS_SINGLE_OPENSSL=	OPENSSL_BASE OPENSSL_PORT
38
42
43
DMALLOC_DESC=		Use debug memory allocation library
44
MALLOC_DESC=		Dynamic memory allocation management
45
OPENSSL_BASE_DESC=	Use FreeBSD's base OpenSSL libraries
46
OPENSSL_PORT_DESC=	Use OpenSSL 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=	OPENSSL_BASE
52
53
DMALLOC_CONFIGURE_ON=		--with-dmalloc
54
DMALLOC_CONFIGURE_OFF=
55
DMALLOC_LIB_DEPENDS=		libdmalloc.so:devel/dmalloc
56
OPENSSL_BASE_CONFIGURE_ON=	--with-openssl-dir=/usr
57
OPENSSL_BASE_CONFIGURE_OFF=
58
OPENSSL_BASE_CONFIGURE_ENV=	TOR_CPPFLAGS_openssl='-I/usr/include' \
59
				TOR_LDFLAGS_openssl='-L/usr/lib'
60
OPENSSL_BASE_LIB_DEPENDS=	libevent.so:devel/libevent2
61
OPENSSL_PORT_CONFIGURE_ON=	--with-openssl-dir=${OPENSSLBASE}
62
OPENSSL_PORT_CONFIGURE_OFF=
63
OPENSSL_PORT_CONFIGURE_ENV=	TOR_CPPFLAGS_openssl='-I${OPENSSLBASE}/include' \
64
				TOR_LDFLAGS_openssl='-L${OPENSSLBASE}/lib'
65
OPENSSL_PORT_LIB_DEPENDS=	libevent.so:devel/libevent2
66
STATIC_CONFIGURE_ON=		--enable-static-tor
67
STATIC_CONFIGURE_OFF=
68
STATIC_CONFIGURE_BUILD_DEPENDS=	${LOCALBASE}/lib/libevent.a:devel/libevent2
69
TCMALLOC_CONFIGURE_ON=		--with-tcmalloc
70
TCMALLOC_CONFIGURE_OFF=
71
TCMALLOC_LIB_DEPENDS=		libtcmalloc.so:devel/google-perftools
72
TOR2WEB_CONFIGURE_ON=		--enable-tor2web-mode
73
TOR2WEB_CONFIGURE_OFF=
74
39
USE_RC_SUBR=	tor
75
USE_RC_SUBR=	tor
40
SUB_FILES=	pkg-message
76
SUB_FILES=	pkg-message
41
77
Lines 44-110 Link Here
44
80
45
CONFLICTS=	tor-[0-9]*
81
CONFLICTS=	tor-[0-9]*
46
82
47
STATIC_TOR_USES=	ssl:build
48
STATIC_TOR_USES_OFF=	ssl
49
50
.include <bsd.port.options.mk>
83
.include <bsd.port.options.mk>
51
84
52
.if ${OSVERSION} < 1000000
85
.if ${OSVERSION} < 1000015
53
WITH_OPENSSL_PORT=	yes
86
WITH_OPENSSL_PORT=	yes
54
.endif
87
.endif
55
88
56
.if !defined(USE_GCC) && empty(CC:T:M*gcc4*) && \
89
.if !empty(PORT_OPTIONS:MSTATIC)
57
empty(PORT_OPTIONS:MSTATIC_TOR) && empty(ARCH:Mia64)
90
.	if !empty(PORT_OPTIONS:MDMALLOC)
58
CONFIGURE_ARGS+=	--enable-gcc-hardening
91
BUILD_DEPENDS+=		${LOCALBASE}/lib/libdmalloc.a:devel/dmalloc
59
.else
92
.	endif
60
CONFIGURE_ARGS+=	--disable-gcc-hardening
93
.	if !empty(PORT_OPTIONS:MTCMALLOC)
61
.endif
62
63
.if ${PORT_OPTIONS:MSTATIC_TOR}
64
BUILD_DEPENDS +=	${LOCALBASE}/lib/libevent.a:devel/libevent2
65
CONFIGURE_ARGS+=	--enable-static-tor \
66
			--with-zlib-dir=/usr/lib --disable-linker-hardening
67
TOR_LIBEVENT_LIBS=	${LOCALBASE}/lib/libevent.a
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
94
BUILD_DEPENDS+=		${LOCALBASE}/lib/libtcmalloc.a:devel/google-perftools
78
.else
95
.	endif
79
LIB_DEPENDS+=		libtcmalloc.so:devel/google-perftools
80
.endif
96
.endif
81
.endif
82
97
83
.if ${PORT_OPTIONS:MTOR2WEB}
84
CONFIGURE_ARGS+=	--enable-tor2web-mode
85
.endif
86
87
.if ${PORT_OPTIONS:MTRANSPARENT}
88
CONFIGURE_ARGS+=	--enable-transparent
89
.else
90
CONFIGURE_ARGS+=	--disable-transparent
91
.endif
92
93
post-patch:
98
post-patch:
94
	@${REINPLACE_CMD} -E -e "s@(-z) (relro|now)@-Wl,\1,\2@g" \
99
#	@${REINPLACE_CMD} -E -e "s@(-z) (relro|now)@-Wl,\1,\2@g" \
95
		${WRKSRC}/configure
100
#		${WRKSRC}/configure
96
	@${REINPLACE_CMD} -e 's|lib/tor|db/tor|' \
101
	@${REINPLACE_CMD} -e 's|lib/tor|db/tor|' \
97
		${WRKSRC}/src/config/torrc.*.in \
102
		${WRKSRC}/src/config/torrc.*.in \
98
		${WRKSRC}/doc/tor.1.* \
103
		${WRKSRC}/doc/tor.1.* \
99
		${WRKSRC}/doc/tor.html.in
104
		${WRKSRC}/doc/tor.html.in
100
105
101
post-patch-STATIC_TOR-off:
106
# post-patch-STATIC-off:
102
	@${REINPLACE_CMD} -e "s@-ltcmalloc@${LOCALBASE}/lib/libtcmalloc.so@" \
107
#	@${REINPLACE_CMD} -e "s@-ltcmalloc@${LOCALBASE}/lib/libtcmalloc.so@" \
103
		${WRKSRC}/configure
108
#		${WRKSRC}/configure
104
109
105
post-patch-STATIC_TOR-on:
110
# post-patch-STATIC-on:
106
	@${REINPLACE_CMD} -e "s@-ltcmalloc@${LOCALBASE}/lib/libtcmalloc.a@" \
111
#	@${REINPLACE_CMD} -e "s@-ltcmalloc@${LOCALBASE}/lib/libtcmalloc.a@" \
107
		${WRKSRC}/configure
112
#		${WRKSRC}/configure
108
113
109
post-configure:
114
post-configure:
110
	@${REINPLACE_CMD} -e '\|^nodist_man1_MANS =|s|$$|$$(install_mans:=.1)|' \
115
	@${REINPLACE_CMD} -e '\|^nodist_man1_MANS =|s|$$|$$(install_mans:=.1)|' \
Lines 113-122 Link Here
113
post-install:
118
post-install:
114
	@${MKDIR} ${STAGEDIR}/var/log/tor ${STAGEDIR}/var/run/tor
119
	@${MKDIR} ${STAGEDIR}/var/log/tor ${STAGEDIR}/var/run/tor
115
120
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>
121
.include <bsd.port.mk>
(-)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 the 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 options; 
5
options: see that script for details.) To use the torify script, install
5
see that 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, 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 IDs 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
================================================================================

Return to bug 203014