From nobody@FreeBSD.org  Tue May  1 11:11:11 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 2C0F4106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  1 May 2012 11:11:11 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id F13DC8FC08
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  1 May 2012 11:11:10 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q41BBAJj084161
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 1 May 2012 11:11:10 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id q41BBAWo084160;
	Tue, 1 May 2012 11:11:10 GMT
	(envelope-from nobody)
Message-Id: <201205011111.q41BBAWo084160@red.freebsd.org>
Date: Tue, 1 May 2012 11:11:10 GMT
From: Fabian Keil <fk@fabiankeil.de>
To: freebsd-gnats-submit@FreeBSD.org
Subject: security/tor-devel: Additional Log directives in config file ignored due to rc script
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         167482
>Category:       ports
>Synopsis:       security/tor-devel: Additional Log directives in config file ignored due to rc script
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bf
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue May 01 11:20:07 UTC 2012
>Closed-Date:    Sat May 19 17:58:41 UTC 2012
>Last-Modified:  Sat May 19 18:00:09 UTC 2012
>Originator:     Fabian Keil
>Release:        HEAD
>Organization:
>Environment:
FreeBSD r500.local 10.0-CURRENT FreeBSD 10.0-CURRENT #424 r+1ac027d: Mon Apr 30 22:59:10 CEST 2012     fk@r500.local:/usr/obj/usr/src/sys/ZOEY  amd64

>Description:
As of security/tor-devel 0.2.3.9.a, additional log files specified in
torrc are overridden by the default rc script, due to a syntax change
made upstream. Quoting the ChangeLog:

| Changes in version 0.2.3.9-alpha - 2011-12-08
| [...]
| o Minor features (new/different config options):
| [...]
|    - Slightly change behavior of "list" options (that is, config
|      options that can appear more than once) when they appear both in
|      torrc and on the command line. Previously, the command-line options
|      would be appended to the ones from torrc. Now, the command-line
|      options override the torrc options entirely. This new behavior
|      allows the user to override list options (like exit policies and
|      ports to listen on) from the command line, rather than simply
|      appending to the list.
|    - You can get the old (appending) command-line behavior for "list"
|      options by prefixing the option name with a "+".

>How-To-Repeat:
Add a line like the following to /usr/local/etc/tor/torrc:
Log [app]debug info file /usr/local/var/log/tor/debug.log
restart tor, note that tor doesn't write to the file.
>Fix:
The attached patch adds the "+" to the list option, thus getting the previous behavior again.

The alternative would be to remove the --Log option completely, forcing the user to specify all log files in the torrc. As a user with multiple log files I would prefer that, but users with a single log file probably wouldn't.

Patch attached with submission follows:

--- .zfs/snapshot/2012-05-01_12:58/security/tor-devel/files/tor.in	2012-05-01 12:56:57.404278382 +0200
+++ security/tor-devel/files/tor.in	2012-05-01 12:59:07.042280697 +0200
@@ -37,7 +37,7 @@
 required_dirs=${tor_datadir}
 pidfile=${tor_pidfile}
 command="%%PREFIX%%/bin/${name}"
-command_args="-f ${tor_conf} --PidFile ${tor_pidfile} --RunAsDaemon 1 --DataDirectory ${tor_datadir} --Log notice\ file\ ${tor_logfile}"
+command_args="-f ${tor_conf} --PidFile ${tor_pidfile} --RunAsDaemon 1 --DataDirectory ${tor_datadir} --+Log notice\ file\ ${tor_logfile}"
 extra_commands="log"
 log_cmd="${name}_log"
 


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->bf 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Tue May 1 11:20:16 UTC 2012 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=167482 
State-Changed-From-To: open->closed 
State-Changed-By: bf 
State-Changed-When: Sat May 19 17:58:40 UTC 2012 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=167482 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/167482: commit references a PR
Date: Sat, 19 May 2012 17:51:31 +0000 (UTC)

 bf          2012-05-19 17:51:18 UTC
 
   FreeBSD ports repository
 
   Modified files:
     security/tor-devel   Makefile 
     security/tor-devel/files tor.in 
   Log:
   change the rc-script to permit supplementary Log entries in tor_conf
   
   PR:             167482
   Submitted by:   F. Keil
   
   Revision  Changes    Path
   1.130     +1 -0      ports/security/tor-devel/Makefile
   1.12      +2 -2      ports/security/tor-devel/files/tor.in
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
