Fri Jul 27 17:46:01 2012 UTC ()
enable reload in rc.d scripts


(jnemeth)
diff -r1.109 -r1.110 pkgsrc/mail/sendmail/Makefile
diff -r1.1 -r1.2 pkgsrc/mail/sendmail/files/sendmail.sh
diff -r1.1 -r1.2 pkgsrc/mail/sendmail/files/smmsp.sh

cvs diff -r1.109 -r1.110 pkgsrc/mail/sendmail/Makefile (switch to unified diff)

--- pkgsrc/mail/sendmail/Makefile 2010/03/12 13:19:49 1.109
+++ pkgsrc/mail/sendmail/Makefile 2012/07/27 17:46:01 1.110
@@ -1,107 +1,108 @@ @@ -1,107 +1,108 @@
1# $NetBSD: Makefile,v 1.109 2010/03/12 13:19:49 obache Exp $ 1# $NetBSD: Makefile,v 1.110 2012/07/27 17:46:01 jnemeth Exp $
2 2
3PKGNAME= sendmail-${DIST_VERS} 3PKGNAME= sendmail-${DIST_VERS}
4COMMENT= The well known Mail Transport Agent 4COMMENT= The well known Mail Transport Agent
 5PKGREVISION= 1
5 6
6CONFLICTS+= courier-mta-[0-9]* fastforward>=0.51nb2 postfix-[0-9]* 7CONFLICTS+= courier-mta-[0-9]* fastforward>=0.51nb2 postfix-[0-9]*
7CONFLICTS+= esmtp>=1.2 8CONFLICTS+= esmtp>=1.2
8 9
9PKG_DESTDIR_SUPPORT= user-destdir 10PKG_DESTDIR_SUPPORT= user-destdir
10 11
11.include "options.mk" 12.include "options.mk"
12.include "../../mail/sendmail/Makefile.common" 13.include "../../mail/sendmail/Makefile.common"
13 14
14USE_TOOLS+= pax 15USE_TOOLS+= pax
15 16
16MESSAGE_SRC= ${WRKDIR}/.MESSAGE_SRC 17MESSAGE_SRC= ${WRKDIR}/.MESSAGE_SRC
17PLIST_SRC= ${WRKDIR}/.PLIST_SRC 18PLIST_SRC= ${WRKDIR}/.PLIST_SRC
18 19
19SMRSH_CMDDIR?= ${PREFIX}/libexec/sm.bin 20SMRSH_CMDDIR?= ${PREFIX}/libexec/sm.bin
20PLIST_SUBST+= SMRSH_CMDDIR=${SMRSH_CMDDIR} 21PLIST_SUBST+= SMRSH_CMDDIR=${SMRSH_CMDDIR}
21RCD_SCRIPTS= sendmail smmsp 22RCD_SCRIPTS= sendmail smmsp
22 23
23BUILD_DEFS+= VARBASE 24BUILD_DEFS+= VARBASE
24 25
25# Not OWN_DIRS, so that the admin doesn't get a suggestion to delete the 26# Not OWN_DIRS, so that the admin doesn't get a suggestion to delete the
26# queue dirs if they are nonempty at deinstall (probably undesirable). 27# queue dirs if they are nonempty at deinstall (probably undesirable).
27# 28#
28MAKE_DIRS_PERMS+= /${VARBASE}/spool/clientmqueue smmsp smmsp 0770 29MAKE_DIRS_PERMS+= /${VARBASE}/spool/clientmqueue smmsp smmsp 0770
29MAKE_DIRS_PERMS+= /${VARBASE}/spool/mqueue ${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 0700 30MAKE_DIRS_PERMS+= /${VARBASE}/spool/mqueue ${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 0700
30 31
31SPECIAL_PERMS+= libexec/sendmail/sendmail ${REAL_ROOT_USER} smmsp 2555 32SPECIAL_PERMS+= libexec/sendmail/sendmail ${REAL_ROOT_USER} smmsp 2555
32 33
33PKG_GROUPS= smmsp 34PKG_GROUPS= smmsp
34PKG_USERS= smmsp:smmsp 35PKG_USERS= smmsp:smmsp
35PKG_GECOS.smmsp= Sendmail Message Submission Program 36PKG_GECOS.smmsp= Sendmail Message Submission Program
36 37
37SUBST_CLASSES+= paths 38SUBST_CLASSES+= paths
38SUBST_STAGE.paths= pre-configure 39SUBST_STAGE.paths= pre-configure
39SUBST_FILES.paths= ../mailer.conf smrsh/smrsh.8 cf/cf/Makefile 40SUBST_FILES.paths= ../mailer.conf smrsh/smrsh.8 cf/cf/Makefile
40SUBST_SED.paths+= -e "s|@@BINGRP@@|${BINGRP}|g" 41SUBST_SED.paths+= -e "s|@@BINGRP@@|${BINGRP}|g"
41SUBST_SED.paths+= -e "s|@@BINOWN@@|${BINOWN}|g" 42SUBST_SED.paths+= -e "s|@@BINOWN@@|${BINOWN}|g"
42SUBST_SED.paths+= -e "s|@@INSTALL@@|${INSTALL}|g" 43SUBST_SED.paths+= -e "s|@@INSTALL@@|${INSTALL}|g"
43SUBST_SED.paths+= -e "s|@@PREFIX@@|${PREFIX}|g" 44SUBST_SED.paths+= -e "s|@@PREFIX@@|${PREFIX}|g"
44SUBST_SED.paths+= -e "s|@@SMRSH_CMDDIR@@|${SMRSH_CMDDIR}|g" 45SUBST_SED.paths+= -e "s|@@SMRSH_CMDDIR@@|${SMRSH_CMDDIR}|g"
45SUBST_MESSAGE.paths= Fixing paths. 46SUBST_MESSAGE.paths= Fixing paths.
46 47
47REPLACE_PERL= contrib/socketmapClient.pl contrib/socketmapServer.pl 48REPLACE_PERL= contrib/socketmapClient.pl contrib/socketmapServer.pl
48 49
49INSTALLATION_DIRS= bin lib sbin 50INSTALLATION_DIRS= bin lib sbin
50INSTALLATION_DIRS+= ${PKGMANDIR}/man1 ${PKGMANDIR}/man5 ${PKGMANDIR}/man8 51INSTALLATION_DIRS+= ${PKGMANDIR}/man1 ${PKGMANDIR}/man5 ${PKGMANDIR}/man8
51INSTALLATION_DIRS+= ${PREFIX}/libexec/sendmail ${SMRSH_CMDDIR} 52INSTALLATION_DIRS+= ${PREFIX}/libexec/sendmail ${SMRSH_CMDDIR}
52INSTALLATION_DIRS+= ${PREFIX}/share/examples/sendmail 53INSTALLATION_DIRS+= ${PREFIX}/share/examples/sendmail
53INSTALLATION_DIRS+= ${PREFIX}/share/sendmail ${PREFIX}/share/doc/sendmail 54INSTALLATION_DIRS+= ${PREFIX}/share/sendmail ${PREFIX}/share/doc/sendmail
54 55
55post-patch: make-sendmail-siteconfig 56post-patch: make-sendmail-siteconfig
56.if !empty(PKG_OPTIONS:Mtcpwrappers) 57.if !empty(PKG_OPTIONS:Mtcpwrappers)
57 cat ${FILESDIR}/site.config.m4-tcpwrappers >>${SITECONFIG} 58 cat ${FILESDIR}/site.config.m4-tcpwrappers >>${SITECONFIG}
58.endif 59.endif
59.if !empty(PKG_OPTIONS:Mldap) 60.if !empty(PKG_OPTIONS:Mldap)
60 cat ${FILESDIR}/site.config.m4-ldap >>${SITECONFIG} 61 cat ${FILESDIR}/site.config.m4-ldap >>${SITECONFIG}
61.endif 62.endif
62.if !empty(PKG_OPTIONS:Mdb2) 63.if !empty(PKG_OPTIONS:Mdb2)
63 cat ${FILESDIR}/site.config.m4-db2 >>${SITECONFIG} 64 cat ${FILESDIR}/site.config.m4-db2 >>${SITECONFIG}
64.endif 65.endif
65.if !empty(PKG_OPTIONS:Mdb4) 66.if !empty(PKG_OPTIONS:Mdb4)
66 cat ${FILESDIR}/site.config.m4-db4 >>${SITECONFIG} 67 cat ${FILESDIR}/site.config.m4-db4 >>${SITECONFIG}
67.endif 68.endif
68.if !empty(PKG_OPTIONS:Mtls) 69.if !empty(PKG_OPTIONS:Mtls)
69 cat ${FILESDIR}/site.config.m4-starttls >>${SITECONFIG} 70 cat ${FILESDIR}/site.config.m4-starttls >>${SITECONFIG}
70.endif 71.endif
71.if !empty(PKG_OPTIONS:Msasl) 72.if !empty(PKG_OPTIONS:Msasl)
72 cat ${FILESDIR}/site.config.m4-sasl2 >>${SITECONFIG} 73 cat ${FILESDIR}/site.config.m4-sasl2 >>${SITECONFIG}
73.endif 74.endif
74 75
75post-extract: 76post-extract:
76 cp ${FILESDIR}/mailer.conf ${WRKDIR}/mailer.conf 77 cp ${FILESDIR}/mailer.conf ${WRKDIR}/mailer.conf
77 78
78do-build: 79do-build:
79 (cd ${WRKSRC} && env ${MAKE_ENV} ./Build) 80 (cd ${WRKSRC} && env ${MAKE_ENV} ./Build)
80 81
81post-build: 82post-build:
82 cp ${PKGDIR}/MESSAGE ${MESSAGE_SRC} 83 cp ${PKGDIR}/MESSAGE ${MESSAGE_SRC}
83 cp ${PKGDIR}/PLIST ${WRKDIR}/.PLIST_SRC 84 cp ${PKGDIR}/PLIST ${WRKDIR}/.PLIST_SRC
84 85
85post-install: 86post-install:
86 ${INSTALL_DATA} ${WRKDIR}/mailer.conf \ 87 ${INSTALL_DATA} ${WRKDIR}/mailer.conf \
87 ${DESTDIR}${PREFIX}/share/examples/sendmail/ 88 ${DESTDIR}${PREFIX}/share/examples/sendmail/
88 cd ${WRKSRC}/cf && pax -rw -pp -pm -s',^.*\.orig$$,,' . ${DESTDIR}${PREFIX}/share/sendmail 89 cd ${WRKSRC}/cf && pax -rw -pp -pm -s',^.*\.orig$$,,' . ${DESTDIR}${PREFIX}/share/sendmail
89 90
90 ${INSTALL_DATA} ${WRKSRC}/obj.`${UNAME} -srm | tr \ . | tr \/ - | sed s/sun4./sun4/`/libsm/libsm.a \ 91 ${INSTALL_DATA} ${WRKSRC}/obj.`${UNAME} -srm | tr \ . | tr \/ - | sed s/sun4./sun4/`/libsm/libsm.a \
91 ${DESTDIR}${PREFIX}/lib 92 ${DESTDIR}${PREFIX}/lib
92 93
93 ${INSTALL_DATA} \ 94 ${INSTALL_DATA} \
94 ${WRKSRC}/obj.`${UNAME} -srm | tr \ . | tr \/ - | sed s/sun4./sun4/`/libsmutil/libsmutil.a \ 95 ${WRKSRC}/obj.`${UNAME} -srm | tr \ . | tr \/ - | sed s/sun4./sun4/`/libsmutil/libsmutil.a \
95 ${DESTDIR}${PREFIX}/lib 96 ${DESTDIR}${PREFIX}/lib
96 ${INSTALL_SCRIPT} ${WRKSRC}/contrib/socketmap*.pl \ 97 ${INSTALL_SCRIPT} ${WRKSRC}/contrib/socketmap*.pl \
97 ${DESTDIR}${PREFIX}/share/examples/sendmail/ 98 ${DESTDIR}${PREFIX}/share/examples/sendmail/
98 ${INSTALL_DATA} ${WRKSRC}/RELEASE_NOTES ${DESTDIR}${PREFIX}/share/doc/sendmail 99 ${INSTALL_DATA} ${WRKSRC}/RELEASE_NOTES ${DESTDIR}${PREFIX}/share/doc/sendmail
99 ${INSTALL_DATA} ${WRKSRC}/cf/README ${DESTDIR}${PREFIX}/share/doc/sendmail 100 ${INSTALL_DATA} ${WRKSRC}/cf/README ${DESTDIR}${PREFIX}/share/doc/sendmail
100 ${INSTALL_DATA} ${WRKSRC}/sendmail/SECURITY ${DESTDIR}${PREFIX}/share/doc/sendmail 101 ${INSTALL_DATA} ${WRKSRC}/sendmail/SECURITY ${DESTDIR}${PREFIX}/share/doc/sendmail
101 ${INSTALL_DATA} ${WRKSRC}/doc/op/op.me ${DESTDIR}${PREFIX}/share/doc/sendmail 102 ${INSTALL_DATA} ${WRKSRC}/doc/op/op.me ${DESTDIR}${PREFIX}/share/doc/sendmail
102 ${INSTALL_DATA} ${WRKSRC}/doc/op/op.ps ${DESTDIR}${PREFIX}/share/doc/sendmail 103 ${INSTALL_DATA} ${WRKSRC}/doc/op/op.ps ${DESTDIR}${PREFIX}/share/doc/sendmail
103 104
104.include "../../mk/bsd.pkg.mk" 105.include "../../mk/bsd.pkg.mk"
105 106
106# has to be below include for bsd.pkg.mk, else substition fails 107# has to be below include for bsd.pkg.mk, else substition fails
107OBJDIR!= ${ECHO} obj.`${UNAME} -srm | tr \ . | tr \/ -` 108OBJDIR!= ${ECHO} obj.`${UNAME} -srm | tr \ . | tr \/ -`

cvs diff -r1.1 -r1.2 pkgsrc/mail/sendmail/files/sendmail.sh (switch to unified diff)

--- pkgsrc/mail/sendmail/files/sendmail.sh 2006/06/06 22:03:36 1.1
+++ pkgsrc/mail/sendmail/files/sendmail.sh 2012/07/27 17:46:01 1.2
@@ -1,58 +1,60 @@ @@ -1,58 +1,60 @@
1#!@RCD_SCRIPTS_SHELL@ 1#!@RCD_SCRIPTS_SHELL@
2# 2#
3# $NetBSD: sendmail.sh,v 1.1 2006/06/06 22:03:36 adrianp Exp $ 3# $NetBSD: sendmail.sh,v 1.2 2012/07/27 17:46:01 jnemeth Exp $
4# 4#
5 5
6# PROVIDE: mail 6# PROVIDE: mail
7# REQUIRE: LOGIN 7# REQUIRE: LOGIN
8# we make mail start late, so that things like .forward's are not 8# we make mail start late, so that things like .forward's are not
9# processed until the system is fully operational 9# processed until the system is fully operational
10 10
11 11
12. /etc/rc.subr 12. /etc/rc.subr
13 13
14name="sendmail" 14name="sendmail"
15rcvar=$name 15rcvar=$name
16command="/usr/sbin/${name}" 16command="/usr/sbin/${name}"
17pidfile="@VARBASE@/run/${name}.pid" 17pidfile="@VARBASE@/run/${name}.pid"
18required_files="/etc/mail/sendmail.cf" 18required_files="/etc/mail/sendmail.cf"
19start_precmd="sendmail_precmd" 19start_precmd="sendmail_precmd"
 20extra_commands="reload"
 21
20makemap="@PREFIX@/sbin/makemap" 22makemap="@PREFIX@/sbin/makemap"
21newaliases="@PREFIX@/bin/newaliases" 23newaliases="@PREFIX@/bin/newaliases"
22smbin="@PREFIX@/libexec/sendmail/sendmail" 24smbin="@PREFIX@/libexec/sendmail/sendmail"
23check_files="aliases access genericstable virtusertable domaintable mailertable" 25check_files="aliases access genericstable virtusertable domaintable mailertable"
24sendmail_flags="-Lsm-mta -bd -q30m" 26sendmail_flags="-Lsm-mta -bd -q30m"
25 27
26sendmail_precmd() 28sendmail_precmd()
27{ 29{
28 # check modifications on /etc/mail/ databases 30 # check modifications on /etc/mail/ databases
29 for f in ${check_files}; do 31 for f in ${check_files}; do
30 if [ -r "/etc/mail/$f.db" ] && [ -r "/etc/mail/$f" ]; then 32 if [ -r "/etc/mail/$f.db" ] && [ -r "/etc/mail/$f" ]; then
31 if [ ! "/etc/mail/$f" -ot "/etc/mail/$f.db" ]; then 33 if [ ! "/etc/mail/$f" -ot "/etc/mail/$f.db" ]; then
32 echo \ 34 echo \
33 "${name}: /etc/mail/$f newer than /etc/mail/$f.db, regenerating" 35 "${name}: /etc/mail/$f newer than /etc/mail/$f.db, regenerating"
34 if [ "x$f" = "xaliases" ]; then 36 if [ "x$f" = "xaliases" ]; then
35 ${newaliases} 37 ${newaliases}
36 else 38 else
37 ${makemap} hash \ 39 ${makemap} hash \
38 /etc/mail/$f < /etc/mail/$f  40 /etc/mail/$f < /etc/mail/$f
39 fi 41 fi
40 fi 42 fi
41 fi 43 fi
42 done 44 done
43 45
44 # check existence on /etc/mail/ databases 46 # check existence on /etc/mail/ databases
45 for f in ${check_files}; do 47 for f in ${check_files}; do
46 if [ ! -r "/etc/mail/$f.db" ] && [ -r "/etc/mail/$f" ]; then 48 if [ ! -r "/etc/mail/$f.db" ] && [ -r "/etc/mail/$f" ]; then
47 echo "${name}: /etc/mail/$f.db not present, generating" 49 echo "${name}: /etc/mail/$f.db not present, generating"
48 if [ "x$f" = "xaliases" ]; then 50 if [ "x$f" = "xaliases" ]; then
49 ${newaliases} 51 ${newaliases}
50 else 52 else
51 ${makemap} hash /etc/mail/$f < /etc/mail/$f 53 ${makemap} hash /etc/mail/$f < /etc/mail/$f
52 fi 54 fi
53 fi 55 fi
54 done 56 done
55} 57}
56 58
57load_rc_config $name 59load_rc_config $name
58run_rc_command "$1" 60run_rc_command "$1"

cvs diff -r1.1 -r1.2 pkgsrc/mail/sendmail/files/smmsp.sh (switch to unified diff)

--- pkgsrc/mail/sendmail/files/smmsp.sh 2006/06/06 22:03:36 1.1
+++ pkgsrc/mail/sendmail/files/smmsp.sh 2012/07/27 17:46:01 1.2
@@ -1,28 +1,30 @@ @@ -1,28 +1,30 @@
1#!@RCD_SCRIPTS_SHELL@ 1#!@RCD_SCRIPTS_SHELL@
2# 2#
3# $NetBSD: smmsp.sh,v 1.1 2006/06/06 22:03:36 adrianp Exp $ 3# $NetBSD: smmsp.sh,v 1.2 2012/07/27 17:46:01 jnemeth Exp $
4# 4#
5 5
6# REQUIRE: mail 6# REQUIRE: mail
7 7
8# The only function of the smmsp process is to push locally 8# The only function of the smmsp process is to push locally
9# collected mail (which got stuck in the local client queue) 9# collected mail (which got stuck in the local client queue)
10# to a more fully functional smtp relay. It is not a fully 10# to a more fully functional smtp relay. It is not a fully
11# functional smtp daemon. 11# functional smtp daemon.
12# 12#
13# It can, however, be used as a completely unprivileged 13# It can, however, be used as a completely unprivileged
14# replacement for hosts that were previously using a "null 14# replacement for hosts that were previously using a "null
15# client" configuration and a smart relay. 15# client" configuration and a smart relay.
16 16
17. /etc/rc.subr 17. /etc/rc.subr
18 18
19name="smmsp" 19name="smmsp"
20rcvar=$name 20rcvar=$name
21command="/usr/sbin/sendmail" 21command="/usr/sbin/sendmail"
22pidfile="@VARBASE@/spool/clientmqueue/sm-client.pid" 22pidfile="@VARBASE@/spool/clientmqueue/sm-client.pid"
23required_files="/etc/mail/submit.cf" 23required_files="/etc/mail/submit.cf"
 24extra_commands="reload"
 25
24smbin="@PREFIX@/libexec/sendmail/sendmail" 26smbin="@PREFIX@/libexec/sendmail/sendmail"
25smmsp_flags="-Lsm-msp-queue -Ac -q30m" 27smmsp_flags="-Lsm-msp-queue -Ac -q30m"
26 28
27load_rc_config $name 29load_rc_config $name
28run_rc_command "$1" 30run_rc_command "$1"