From nobody@FreeBSD.org  Tue May 19 18:09:17 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 585EA106566B
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 19 May 2009 18:09:17 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 2D0188FC08
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 19 May 2009 18:09:17 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n4JI9GF9087211
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 19 May 2009 18:09:16 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id n4JI9GkL087203;
	Tue, 19 May 2009 18:09:16 GMT
	(envelope-from nobody)
Message-Id: <200905191809.n4JI9GkL087203@www.freebsd.org>
Date: Tue, 19 May 2009 18:09:16 GMT
From: Chris Cowart <ccowart@rescomp.berkeley.edu>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch] rc script for net-p2p/transmission-daemon
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         134722
>Category:       ports
>Synopsis:       [patch] rc script for net-p2p/transmission-daemon
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    mezz
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue May 19 18:10:01 UTC 2009
>Closed-Date:    Fri Jun 19 17:58:02 UTC 2009
>Last-Modified:  Fri Jun 19 17:58:02 UTC 2009
>Originator:     Chris Cowart
>Release:        7.0-RELEASE
>Organization:
UC Berkeley - RSSP-IT
>Environment:
FreeBSD dev-aux.rescomp.berkeley.edu 7.0-RELEASE-p6 FreeBSD 7.0-RELEASE-p6 #3: Mon Dec  8 16:42:41 PST 2008     root@dev-aux.rescomp.berkeley.edu:/usr/obj/usr/src/sys/AUX  i386

>Description:
The transmission-daemon bittorrent client doesn't come with an rc script.

I've written an rc script, but I'm having a hard time understanding the
hierarchy of transmission ports that all seem to include each other, so
I don't know which files directory it makes sense to drop it into.

As such, I'm attaching the script. Hopefully the maintainer will be able
to find the right Makefile to add

USE_RC_SUBR=    transmission

And drop the .in into the files directory.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: transmission
# REQUIRE: DAEMON 
#
# Add the following lines to /etc/rc.conf to enable this service:
#
# transmission_enable:	    Set to NO by default. 
#                           Set it to YES to enable the tracker.
# transmission_watch_dir:   A folder for torrent files to download
#                           automatically.
# transmission_conf_dir:    The directory where transmission configuration
#                           data is stored
# transmission_user:        The user account transmission should run as.
#                           This will be root if unset -- you probably don't
#                           want that!
#

. %%RC_SUBR%%

name=transmission
rcvar=`set_rcvar`
command=/usr/local/bin/transmission-daemon

load_rc_config ${name}

: ${transmission_enable:="NO"}
: ${transmission_pidfile:=/var/run/${name}.pid}

transmission_flags="${transmission_watch_dir:+-c ${transmission_watch_dir}} \
    ${transmission_conf_dir:+-g ${transmission_conf_dir}} \
    ${transmission_flags}"
run_rc_command "$1"


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->mezz 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Tue May 19 18:10:18 UTC 2009 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

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

From: "Jeremy Messenger" <mezz7@cox.net>
To: bug-followup@freebsd.org, ccowart@rescomp.berkeley.edu
Cc:  
Subject: Re: ports/134722: [patch] rc script for net-p2p/transmission-daemon
Date: Sun, 31 May 2009 11:42:20 -0500

 I will reading the document and working on rc script after June 5th. I do  
 not like the idea of enable the 'watch dir' by default. The users has to  
 enable it by theirselves. The transmission_user does nothing in your  
 script?
 
 Cheers,
 Mezz
 
 
 -- 
 mezz7@cox.net  -  mezz@FreeBSD.org
 FreeBSD GNOME Team
 http://www.FreeBSD.org/gnome/  -  gnome@FreeBSD.org

From: Chris Cowart <ccowart@rescomp.berkeley.edu>
To: Jeremy Messenger <mezz7@cox.net>
Cc: bug-followup@freebsd.org
Subject: Re: ports/134722: [patch] rc script for net-p2p/transmission-daemon
Date: Mon, 1 Jun 2009 09:35:08 -0700

 --3o/kCc76jHFTce02
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 Jeremy Messenger wrote:
 > I will reading the document and working on rc script after June 5th. I do=
  =20
 > not like the idea of enable the 'watch dir' by default. The users has to =
 =20
 > enable it by theirselves. The transmission_user does nothing in your =20
 > script?
 
 The watchdir is not enabled by default. If it is a non-empty string, it
 is substituted in the flags for "-c ${transmission_watch_dir}".=20
 
 $ echo $transmission_watch_dir
 
 $ echo ${transmission_watch_dir:+-c ${transmission_watch_dir}}=20
 
 $ transmission_watch_dir=3D"/my/dir"
 $ echo ${transmission_watch_dir:+-c ${transmission_watch_dir}}-c /my/dir
 -c /my/dir
 
 The transmission_user is part of /etc/rc.subr, but I figured I'd mention
 it explicitly so users would know they don't have to run as root (but
 will if they leave it unset).
 
 --=20
 Chris Cowart
 Network Technical Lead
 Network & Infrastructure Services, RSSP-IT
 UC Berkeley
 
 --3o/kCc76jHFTce02
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.10 (FreeBSD)
 
 iQIcBAEBAwAGBQJKJAM7AAoJEIGh6j3cHUNPLsUP/1ZMWr/TPNXqEUmCIsfl8Htu
 uKkL4tnxLqNjaved+Km5Pd/iVStYulCMA1201VoFCSUUKLMBRtNCqudPZtes/UMW
 botg6p5ey1F7lB1TnmKrrtbyBiAqDbviUOdkxVDFriGWMPZNHOAylRV+Dtxv+Bk+
 tP+jJNWqu0XxirjSBeq+Yf+hsunYMyTi0MbKdr9031Zuji6PYrB1tgHPswU4rnux
 k8Q9/S3y6afSPg45FcR59epD+hnIZuzgdgH0Goy4Tt+Y7pAYO5XbP4s3AJ4u+mXL
 Z0LKAtV7Np9WoV1Ke2ynWReA9YVwRHlghMdYVS53b6PhiYfS70ssOEusHNDH32xP
 fHWjiK9edNiKD08JaDBk1UF6Ff5i9hrWaKhh8ywTVCXapW4kqdFJEJKwfG7maTtJ
 5OPH3tGnWV0qp+aI9i+0MZ3Xzr33aEIZNJnKg2S1hYt2uZYQScYrJjjrda5IPjsl
 wZZ2duQEy8Dq6J/1V0eeCyLtNfwrwEGcdCf7nZZ3BA4xbIbYiwJEWO8aUfo19nWj
 kLmGrJofbUxE/nJJfDoRFfKVpD3H2UnqPHkv+jjrL9N4yXTbU00ulvoPZvZf3vsu
 hkKg6qU56AXCb2pWBXbwMay1kmBBpx2q0X88FqaGMH2z2RasylJPuiyk+tFsIxXP
 OJycYcvt/5BFCXUwlCVk
 =vIAg
 -----END PGP SIGNATURE-----
 
 --3o/kCc76jHFTce02--
State-Changed-From-To: open->closed 
State-Changed-By: mezz 
State-Changed-When: Fri Jun 19 17:57:01 UTC 2009 
State-Changed-Why:  
I have committed different rc script. Thanks for submit it! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=134722 
>Unformatted:
