ports/188293: When starting Tor, I get: "Failed to parse/validate config: Failed to init Log options"
Neel Chauhan
neel at neelc.org
Sat Apr 5 16:00:00 UTC 2014
>Number: 188293
>Category: ports
>Synopsis: When starting Tor, I get: "Failed to parse/validate config: Failed to init Log options"
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sat Apr 05 16:00:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator: Neel Chauhan
>Release: FreeBSD 10.0-RELEASE
>Organization:
>Environment:
FreeBSD megan.neelc.org 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260829: Fri Jan 17 13:23:36 EST 2014 neel at megan:/usr/obj/usr/src/sys/GENERIC amd64
>Description:
When I start Tor, I get an error which says:
Failed to parse/validate config: Failed to init Log options
\I tried submitting this without sending a PR and just sent it to the mailing lists <http://lists.freebsd.org/pipermail/freebsd-ports/2014-April/091338.html>, but I got no response, so I decided to come here.
>How-To-Repeat:
1. Install /usr/ports/security/tor
2. Copy /usr/local/etc/tor/torrc.sample /usr/local/etc/tor/torrc
3. Start Tor (run "service tor onestart" without the quotes)
4. If /var/log/tor doesn't exist and isn't isn't owned by _tor, you get the error:
Failed to parse/validate config: Failed to init Log options
>Fix:
I have a patch to fix this:
--- Makefile.old 2014-04-03 19:48:25.000000000 -0400
+++ Makefile 2014-04-03 19:49:57.000000000 -0400
@@ -42,6 +42,9 @@
CONFLICTS= tor-devel-[0-9]*
+PLIST_SUB= USERS=${USERS}
+PLIST_SUB+= GROUPS=${GROUPS}
+
.include <bsd.port.options.mk>
.if ( (${OSVERSION} < 900000) || \
--- pkg-plist.old 2014-04-03 19:37:16.000000000 -0400
+++ pkg-plist 2014-04-03 19:47:56.000000000 -0400
@@ -8,6 +8,8 @@
man/man1/tor-resolve.1.gz
man/man1/tor.1.gz
man/man1/torify.1.gz
+ at exec touch /var/log/tor ; chown %%USERS%%:%%GROUPS%% /var/log/tor
+ at exec mkdir /var/run/tor ; chown -R %%USERS%%:%%GROUPS%% /var/run/tor
%%DATADIR%%/geoip
%%DATADIR%%/geoip6
@dirrm %%DATADIR%%
So what this patch does is, that it makes the /var/log/tor logfile, the /var/run/tor directory for the tor.pid file, and makes /var/(log,run)/tor owned by _tor (or whatever user is specified to run Tor).
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list