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

Collapse All | Expand All

(-)security/tor/Makefile (-5 / +13 lines)
Lines 15-21 Link Here
15
15
16
BROKEN_powerpc64=	Does not build
16
BROKEN_powerpc64=	Does not build
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 27-33 Link Here
27
27
28
STATIC_TOR_DESC=	Build a static tor
28
STATIC_TOR_DESC=	Build a static tor
29
TCMALLOC_DESC=		Use the tcmalloc memory allocation library
29
TCMALLOC_DESC=		Use the tcmalloc memory allocation library
30
TOR2WEB_DESC=		Faster but non-anonymous hidden services
30
TOR2WEB_DESC=		(EXPERT OPTION) Faster but non-anonymous hidden services
31
TRANSPARENT_DESC=	Transparent proxy support
31
TRANSPARENT_DESC=	Transparent proxy support
32
32
33
OPTIONS_DEFAULT=	TRANSPARENT
33
OPTIONS_DEFAULT=	TRANSPARENT
Lines 34-39 Link Here
34
34
35
USE_RC_SUBR=	tor
35
USE_RC_SUBR=	tor
36
SUB_FILES=	pkg-message
36
SUB_FILES=	pkg-message
37
SUB_LIST=	USER="${USERS}" GROUP="${GROUPS}"
37
38
38
GROUPS=		_tor
39
GROUPS=		_tor
39
USERS=		_tor
40
USERS=		_tor
Lines 40-48 Link Here
40
41
41
CONFLICTS=	tor-devel-[0-9]*
42
CONFLICTS=	tor-devel-[0-9]*
42
43
43
STATIC_TOR_USES=	ssl:build
44
STATIC_TOR_USES_OFF=	ssl
45
46
.include <bsd.port.options.mk>
44
.include <bsd.port.options.mk>
47
45
48
.if ${OSVERSION} < 1000000
46
.if ${OSVERSION} < 1000000
Lines 86-91 Link Here
86
CONFIGURE_ARGS+=	--disable-transparent
84
CONFIGURE_ARGS+=	--disable-transparent
87
.endif
85
.endif
88
86
87
pre-everything::
88
.if ${PORT_OPTIONS:MTOR2WEB}
89
	@${ECHO_MSG}
90
	@${ECHO_MSG} "Warning: An expert option 'tor2web' is chosen."
91
	@${ECHO_MSG} "         With this option tor cannot be used for regular traffic,"
92
	@${ECHO_MSG} "         only for non-anonymous hidden service traffic."
93
	@${ECHO_MSG} "         Please make sure you understand this option."
94
	@${ECHO_MSG}
95
.endif
96
89
post-patch:
97
post-patch:
90
	@${REINPLACE_CMD} -E -e "s@(-z) (relro|now)@-Wl,\1,\2@g" \
98
	@${REINPLACE_CMD} -E -e "s@(-z) (relro|now)@-Wl,\1,\2@g" \
91
		${WRKSRC}/configure
99
		${WRKSRC}/configure
(-)security/tor/files/tor.in (-1 / +20 lines)
Lines 26-32 Link Here
26
26
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="%%USER%%"}
30
: ${tor_group="%%GROUP%%"}
30
: ${tor_pidfile="/var/run/tor/tor.pid"}
31
: ${tor_pidfile="/var/run/tor/tor.pid"}
31
: ${tor_datadir="/var/db/tor"}
32
: ${tor_datadir="/var/db/tor"}
32
33
Lines 37-41 Link Here
37
command_args="-f ${tor_conf} --PidFile ${tor_pidfile} --RunAsDaemon 1 --DataDirectory ${tor_datadir}"
38
command_args="-f ${tor_conf} --PidFile ${tor_pidfile} --RunAsDaemon 1 --DataDirectory ${tor_datadir}"
38
extra_commands="reload"
39
extra_commands="reload"
39
40
41
mkDir() {
42
  local dir=$1
43
  local what=$2
44
  echo "${name}: creating the ${what} directory: ${dir}"
45
  mkdir ${dir}
46
  chown ${tor_user}:${tor_group} ${dir}
47
  chmod 0700 ${dir}
48
}
49
50
# create datadir if it doesn't exist
51
if ! [ -d ${tor_datadir} ]; then
52
  mkDir ${tor_datadir} "data"
53
fi
54
# create rundir if it doesn't exist
55
if ! [ -d ${tor_pidfile%/*} ]; then
56
  mkDir ${tor_pidfile%/*} "run"
57
fi
58
40
run_rc_command "$1"
59
run_rc_command "$1"
41
60

Return to bug 212529