From umq@ueo.co.jp  Fri Sep 29 07:37:54 2006
Return-Path: <umq@ueo.co.jp>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id BC33216A494
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 29 Sep 2006 07:37:48 +0000 (UTC)
	(envelope-from umq@ueo.co.jp)
Received: from mvs1.plala.or.jp (mvs1.plala.or.jp [58.93.247.201])
	by mx1.FreeBSD.org (Postfix) with ESMTP id E384D43D5A
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 29 Sep 2006 07:37:46 +0000 (GMT)
	(envelope-from umq@ueo.co.jp)
Received: from eupheme.kaumoge.org ([125.205.176.135]) by mvs1.plala.or.jp
          with ESMTP
          id <20060929073746.QCTS21584.mvs1.plala.or.jp@eupheme.kaumoge.org>
          for <FreeBSD-gnats-submit@freebsd.org>;
          Fri, 29 Sep 2006 16:37:46 +0900
Received: from calliope.kaumoge.org (calliope.kaumoge.org [192.168.24.120])
	by eupheme.kaumoge.org (8.12.11/8.12.11/20030713) with ESMTP id k8T7c7Fn018015
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 29 Sep 2006 16:38:07 +0900 (JST)
	(envelope-from umq@ueo.co.jp)
Message-Id: <8664f7azsm.wl%umq@ueo.co.jp>
Date: Fri, 29 Sep 2006 16:37:45 +0900
From: Hirohisa Yamaguchi <umq@ueo.co.jp>
To: FreeBSD-gnats-submit@freebsd.org
Subject: [patch] mail/dk-milter multiple instantiation does not work when run from /etc/rc
X-Send-Pr-Version: 3.113

>Number:         103803
>Category:       ports
>Synopsis:       [patch] mail/dk-milter multiple instantiation does not work when run from /etc/rc
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    alepulver
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Sep 29 07:40:15 GMT 2006
>Closed-Date:    Sun Oct 01 15:08:44 GMT 2006
>Last-Modified:  Sun Oct  1 15:10:30 GMT 2006
>Originator:     Hirohisa Yamaguchi
>Release:        FreeBSD 7.0-CURRENT amd64
>Organization:
<organization of PR author (multiple lines)>
>Environment:
System: FreeBSD calliope.****.org 7.0-CURRENT FreeBSD 7.0-CURRENT #2: Fri Sep 1 13:15:27 JST 2006 root@calliope.****.org:/usr/obj/usr/src/sys/CALLIOPE64 amd64


>Description:
	When setting up mail/dkim-milter to run multiple instance
	then do not start up after reboot.

>How-To-Repeat:
	1. setup mail/dkim-milter to run multiple instance.
	2. reboot.
>Fix:

	the patch follows:
	+ fix starting up multiple instance.
	+ fix RUN_DEPENDS does not work correctly by mistake.
	+ support mail/postfix-current like security/amavisd-milter port does.

diff -Npru ports.orig/mail/dk-milter/Makefile ports/mail/dk-milter/Makefile
--- ports.orig/mail/dk-milter/Makefile	Tue Sep 26 02:44:40 2006
+++ ports/mail/dk-milter/Makefile	Fri Sep 29 15:39:08 2006
@@ -17,10 +17,15 @@ COMMENT=	Domainkeys milter for Sendmail
 
 USE_RC_SUBR=	milter-dk.sh
 
-.if defined(WITH_POSTFIX_MILTER)
+.if defined(WITH_POSTFIX_MILTER) || defined(WITH_POSTFIX) || defined(WITH_POSTFIX_CURRENT)
 SENDMAIL_MILTER_IN_BASE=	yes
-RUN_DEPENDS+=	postfix>=2[3-9]*:${PORTSDIR}/mail/postfix
 PKGMESSAGE=	pkg-message.postfix
+
+.if defined(WITH_POSTFIX_CURRENT)
+RUN_DEPENDS+=	${LOCALBASE}/libexec/postfix/smtpd:${PORTSDIR}/mail/postfix-current
+.else
+RUN_DEPENDS+=	${LOCALBASE}/libexec/postfix/smtpd:${PORTSDIR}/mail/postfix
+.endif
 .endif
 
 .if !defined(SENDMAIL_MILTER_IN_BASE)
@@ -44,6 +49,13 @@ SITE+=		${FILESDIR}/site.config.m4.milte
 .endif
 
 .include <bsd.port.pre.mk>
+
+# .sh suffix is stripped in recent releases.
+.if (${OSVERSION} >= 700007 || ( ${OSVERSION} < 700000 && ${OSVERSION} >= 600101 ))
+SUB_LIST=	"RC_SCRIPT=${PREFIX}/etc/rc.d/${USE_RC_SUBR:S/.sh$//}"
+.else
+SUB_LIST=	"RC_SCRIPT=${PREFIX}/etc/rc.d/${USE_RC_SUBR}"
+.endif
 
 .if defined(SENDMAIL_WITHOUT_MILTER)
 pre-fetch:
diff -Npru ports.orig/mail/dk-milter/files/milter-dk.sh.in ports/mail/dk-milter/files/milter-dk.sh.in
--- ports.orig/mail/dk-milter/files/milter-dk.sh.in	Tue Sep 26 02:44:40 2006
+++ ports/mail/dk-milter/files/milter-dk.sh.in	Fri Sep 29 15:36:48 2006
@@ -75,7 +75,7 @@ else
 	if [ "x$1" != "xrestart" ]; then
 	    for profile in ${milterdk_profiles}; do
 		echo "===> milterdk profile: ${profile}"
-		$0 $1 ${profile}
+		%%RC_SCRIPT%% $1 ${profile}
 		retcode="$?"
 		if [ "0${retcode}" -ne 0 ]; then
 		    failed="${profile} (${retcode}) ${failed:-}"
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->alepulver 
Responsible-Changed-By: alepulver 
Responsible-Changed-When: Sun Oct 1 13:36:45 UTC 2006 
Responsible-Changed-Why:  
Take PR. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=103803 
State-Changed-From-To: open->closed 
State-Changed-By: alepulver 
State-Changed-When: Sun Oct 1 15:07:20 UTC 2006 
State-Changed-Why:  
Committed, thanks! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/103803: commit references a PR
Date: Sun,  1 Oct 2006 15:08:29 +0000 (UTC)

 alepulver    2006-10-01 15:08:24 UTC
 
   FreeBSD ports repository
 
   Modified files:
     mail/dk-milter       Makefile 
     mail/dk-milter/files milter-dk.sh.in 
   Log:
   - Fix starting up multiple instance.
   - Fix RUN_DEPENDS does not work correctly by mistake.
   - Support mail/postfix-current like security/amavisd-milter port does.
   
   PR:             ports/103803
   Submitted by:   Hirohisa Yamaguchi <umq@ueo.co.jp>
   
   Revision  Changes    Path
   1.13      +14 -2     ports/mail/dk-milter/Makefile
   1.6       +2 -2      ports/mail/dk-milter/files/milter-dk.sh.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:
