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

Collapse All | Expand All

(-)security/tor/Makefile (-1 / +12 lines)
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 86-91 Link Here
86
CONFIGURE_ARGS+=	--disable-transparent
87
CONFIGURE_ARGS+=	--disable-transparent
87
.endif
88
.endif
88
89
90
pre-everything::
91
.if ${PORT_OPTIONS:MTOR2WEB}
92
	@${ECHO_MSG}
93
	@${ECHO_MSG} "Warning: The expert option 'tor2web' is chosen."
94
	@${ECHO_MSG} "         With this option tor cannot be used for regular traffic,"
95
	@${ECHO_MSG} "         only for non-anonymous hidden service traffic."
96
	@${ECHO_MSG} "         Please make sure you understand this option."
97
	@${ECHO_MSG}
98
.endif
99
89
post-patch:
100
post-patch:
90
	@${REINPLACE_CMD} -E -e "s@(-z) (relro|now)@-Wl,\1,\2@g" \
101
	@${REINPLACE_CMD} -E -e "s@(-z) (relro|now)@-Wl,\1,\2@g" \
91
		${WRKSRC}/configure
102
		${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