ports/103803: [patch] mail/dk-milter multiple instantiation does not work when run from /etc/rc
Hirohisa Yamaguchi
umq at ueo.co.jp
Fri Sep 29 07:40:16 UTC 2006
>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: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Fri Sep 29 07:40:15 GMT 2006
>Closed-Date:
>Last-Modified:
>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 at 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:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list