From reho@rx.cz  Mon Dec 19 01:46:12 2005
Return-Path: <reho@rx.cz>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id DEEBB16A41F;
	Mon, 19 Dec 2005 01:46:12 +0000 (GMT)
	(envelope-from reho@rx.cz)
Received: from charon.rx.cz (199.106.broadband4.iol.cz [85.71.106.199])
	by mx1.FreeBSD.org (Postfix) with ESMTP id DDD1E43D55;
	Mon, 19 Dec 2005 01:46:10 +0000 (GMT)
	(envelope-from reho@rx.cz)
Received: from charon.rx.cz (localhost [127.0.0.1])
	by charon.rx.cz (8.13.4/8.13.4) with ESMTP id jBJ1jpdY026181;
	Mon, 19 Dec 2005 02:45:52 +0100 (CET)
	(envelope-from reho@199.106.broadband4.iol.cz)
Received: (from root@localhost)
	by charon.rx.cz (8.13.4/8.13.4/Submit) id jBJ1jpPd026180;
	Mon, 19 Dec 2005 02:45:51 +0100 (CET)
	(envelope-from reho)
Message-Id: <200512190145.jBJ1jpPd026180@charon.rx.cz>
Date: Mon, 19 Dec 2005 02:45:51 +0100 (CET)
From: Petr Rehor <prehor@gmail.com>
Reply-To: Petr Rehor <prehor@gmail.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc: perl@freebsd.org
Subject: [patch] mail/p5-Mail-SpamAssassin - properly set pidfile in rc.d script
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         90625
>Category:       ports
>Synopsis:       [patch] mail/p5-Mail-SpamAssassin - properly set pidfile in rc.d script
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    perl
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec 19 01:50:02 GMT 2005
>Closed-Date:    Wed Jan 04 06:35:16 GMT 2006
>Last-Modified:  Wed Jan 04 06:35:16 GMT 2006
>Originator:     Petr Rehor
>Release:        FreeBSD 6.0-RELEASE i386
>Organization:
>Environment:
System: FreeBSD charon.rx.cz 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Tue Nov 8 20:44:39 UTC 2005 root@marvin.rx.cz:/usr/obj/usr/src/sys/GENERIC i386
>Description:
- PID file name in rc.d scripts must be set to "pidfile" variable,
  not to "<name>_pidfile" variable.
- Placing -r (and -d too) options to command_args is more suitable because
  they mustn't be overwrited by spamd_flags
>How-To-Repeat:
	
>Fix:
--- p5-Mail-SpamAssassin.diff begins here ---
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/mail/p5-Mail-SpamAssassin/Makefile,v
retrieving revision 1.84
diff -u -r1.84 Makefile
--- Makefile	16 Dec 2005 05:05:47 -0000	1.84
+++ Makefile	19 Dec 2005 01:26:46 -0000
@@ -7,7 +7,7 @@
 
 PORTNAME=	Mail-SpamAssassin
 PORTVERSION=	3.1.0
-PORTREVISION=	4
+PORTREVISION=	5
 CATEGORIES=	mail perl5
 MASTER_SITES=	${MASTER_SITE_APACHE:S/$/:apache/} ${MASTER_SITE_PERL_CPAN:S/$/:cpan/}
 MASTER_SITE_SUBDIR=	spamassassin/source/:apache Mail/:cpan
Index: files/spamd.sh
===================================================================
RCS file: /home/ncvs/ports/mail/p5-Mail-SpamAssassin/files/spamd.sh,v
retrieving revision 1.11
diff -u -r1.11 spamd.sh
--- files/spamd.sh	10 May 2005 13:00:22 -0000	1.11
+++ files/spamd.sh	19 Dec 2005 00:45:11 -0000
@@ -21,7 +21,15 @@
 name=spamd
 rcvar=`set_rcvar`
 
+load_rc_config $name
+
+# Set defaults
+: ${spamd_enable:="NO"}
+: ${spamd_flags="-c %%SQL_FLAG%% %%RUN_AS_USER%%"}
+
+pidfile=${spamd_pidfile:-"/var/run/spamd/spamd.pid"}
 command=%%PREFIX%%/bin/spamd
+command_args="-d -r ${pidfile}"
 required_dirs=%%PREFIX%%/share/spamassassin
 
 stop_postcmd=stop_postcmd
@@ -31,11 +39,4 @@
   rm -f $pidfile
 }
 
-# set defaults
-
-spamd_enable=${spamd_enable:-"NO"}
-spamd_pidfile=${spamd_pidfile:-"/var/run/spamd/spamd.pid"}
-spamd_flags=${spamd_flags:-"-c -d %%SQL_FLAG%% -r ${spamd_pidfile} %%RUN_AS_USER%%"}
-
-load_rc_config $name
 run_rc_command "$1"
--- p5-Mail-SpamAssassin.diff ends here ---


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->perl 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Tue Dec 20 00:16:37 UTC 2005 
Responsible-Changed-Why:  
Over to maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=90625 
State-Changed-From-To: open->closed 
State-Changed-By: edwin 
State-Changed-When: Wed Jan 4 06:35:12 UTC 2006 
State-Changed-Why:  
Committed, thanks! 

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