pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/mail/mailfront
Module Name: pkgsrc
Committed By: schmonz
Date: Thu Apr 27 20:18:44 UTC 2017
Modified Files:
pkgsrc/mail/mailfront: Makefile
pkgsrc/mail/mailfront/files: smtpfront.sh
Log Message:
Wrap long command line. Replace LOCALBASE with PREFIX. Honor custom
values of ${QMAIL_DAEMON_USER} and ${QMAIL_LOG_USER}. Allow
smtpfront_smtpdcmd to be overridden in rc.conf.
To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 pkgsrc/mail/mailfront/Makefile
cvs rdiff -u -r1.1.1.1 -r1.2 pkgsrc/mail/mailfront/files/smtpfront.sh
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/mail/mailfront/Makefile
diff -u pkgsrc/mail/mailfront/Makefile:1.14 pkgsrc/mail/mailfront/Makefile:1.15
--- pkgsrc/mail/mailfront/Makefile:1.14 Tue Feb 21 16:04:04 2017
+++ pkgsrc/mail/mailfront/Makefile Thu Apr 27 20:18:44 2017
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.14 2017/02/21 16:04:04 joerg Exp $
+# $NetBSD: Makefile,v 1.15 2017/04/27 20:18:44 schmonz Exp $
#
DISTNAME= mailfront-2.12
@@ -21,10 +21,14 @@ DJB_MAKE_TARGETS= NO
DJB_CONFIG_CMDS+= ${ECHO} ${PREFIX}/include > conf-include; \
${ECHO} ${PREFIX}/lib/${PKGBASE} > conf-modules;
+FILES_SUBST+= QMAIL_DAEMON_USER=${QMAIL_DAEMON_USER:Q}
+FILES_SUBST+= QMAIL_LOG_USER=${QMAIL_LOG_USER:Q}
RCD_SCRIPTS= smtpfront
INSTALLATION_DIRS= share/doc/mailfront
INSTALL_ENV+= install_prefix=${DESTDIR:Q}
+BUILD_DEFS+= QMAIL_DAEMON_USER QMAIL_LOG_USER
+
USE_LIBTOOL= yes
MAKE_JOBS_SAFE= no # due to hacky libtoolization
Index: pkgsrc/mail/mailfront/files/smtpfront.sh
diff -u pkgsrc/mail/mailfront/files/smtpfront.sh:1.1.1.1 pkgsrc/mail/mailfront/files/smtpfront.sh:1.2
--- pkgsrc/mail/mailfront/files/smtpfront.sh:1.1.1.1 Wed Jul 20 03:30:19 2005
+++ pkgsrc/mail/mailfront/files/smtpfront.sh Thu Apr 27 20:18:44 2017
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: smtpfront.sh,v 1.1.1.1 2005/07/20 03:30:19 schmonz Exp $
+# $NetBSD: smtpfront.sh,v 1.2 2017/04/27 20:18:44 schmonz Exp $
#
# PROVIDE: smtpfront
@@ -16,10 +16,11 @@ name="smtpfront"
: ${smtpfront_datalimit:="2000000"}
: ${smtpfront_pretcpserver:=""}
: ${smtpfront_presmtpd:=""}
+: ${smtpfront_smtpdcmd:="@PREFIX@/bin/smtpfront-qmail"}
: ${smtpfront_postsmtpd:=""}
: ${smtpfront_log:="YES"}
: ${smtpfront_logcmd:="logger -t nb${name} -p mail.info"}
-: ${smtpfront_nologcmd:="@LOCALBASE@/bin/multilog -*"}
+: ${smtpfront_nologcmd:="@PREFIX@/bin/multilog -*"}
if [ -f /etc/rc.subr ]; then
. /etc/rc.subr
@@ -29,7 +30,7 @@ rcvar=${name}
required_files="@PKG_SYSCONFDIR@/control/concurrencyincoming"
required_files="${required_files} @PKG_SYSCONFDIR@/tcp.smtp.cdb"
required_files="${required_files} @PKG_SYSCONFDIR@/control/rcpthosts"
-command="@LOCALBASE@/bin/tcpserver"
+command="@PREFIX@/bin/tcpserver"
procname=${name}
start_precmd="smtpfront_precmd"
extra_commands="cdb"
@@ -40,10 +41,19 @@ smtpfront_precmd()
# tcpserver(1) is akin to inetd(8), but runs one service per process.
# We want to signal only the tcpserver process responsible for SMTP
# service. Use argv0(1) to set procname to "smtpfront".
- if [ -f /etc/rc.subr ]; then
- checkyesno smtpfront_log || smtpfront_logcmd=${smtpfront_nologcmd}
+ if [ -f /etc/rc.subr ] && ! checkyesno smtpfront_log; then
+ smtpfront_logcmd=${smtpfront_nologcmd}
fi
- command="@SETENV@ - ${smtpfront_postenv} @LOCALBASE@/bin/softlimit -m ${smtpfront_datalimit} ${smtpfront_pretcpserver} @LOCALBASE@/bin/argv0 @LOCALBASE@/bin/tcpserver ${name}
${smtpfront_tcpflags} -x @PKG_SYSCONFDIR@/tcp.smtp.cdb -c `@HEAD@ -1 @PKG_SYSCONFDIR@/control/concurrencyincoming` -u `@ID@ -u qmaild ` -g `@ID@ -g qmaild` ${smtpfront_tcphost} ${smtpfront_tcpport}
${smtpfront_presmtpd} @LOCALBASE@/bin/smtpfront-qmail ${smtpfront_postsmtpd} 2>&1 | @LOCALBASE@/bin/setuidgid qmaill ${smtpfront_logcmd}"
+ command="@SETENV@ - ${smtpfront_postenv}
+@PREFIX@/bin/softlimit -m ${smtpfront_datalimit} ${smtpfront_pretcpserver}
+@PREFIX@/bin/argv0 @PREFIX@/bin/tcpserver ${name}
+${smtpfront_tcpflags} -x @PKG_SYSCONFDIR@/tcp.smtp.cdb
+-c `@HEAD@ -1 @PKG_SYSCONFDIR@/control/concurrencyincoming`
+-u `@ID@ -u @QMAIL_DAEMON_USER@ ` -g `@ID@ -g @QMAIL_DAEMON_USER@`
+${smtpfront_tcphost} ${smtpfront_tcpport}
+${smtpfront_presmtpd} ${smtpfront_smtpdcmd} ${smtpfront_postsmtpd}
+2>&1 |
+@PREFIX@/bin/setuidgid @QMAIL_LOG_USER@ ${smtpfront_logcmd}"
command_args="&"
rc_flags=""
}
@@ -51,7 +61,7 @@ smtpfront_precmd()
smtpfront_cdb()
{
@ECHO@ "Reloading @PKG_SYSCONFDIR@/tcp.smtp."
- @LOCALBASE@/bin/tcprules @PKG_SYSCONFDIR@/tcp.smtp.cdb @PKG_SYSCONFDIR@/tcp.smtp.tmp < @PKG_SYSCONFDIR@/tcp.smtp
+ @PREFIX@/bin/tcprules @PKG_SYSCONFDIR@/tcp.smtp.cdb @PKG_SYSCONFDIR@/tcp.smtp.tmp < @PKG_SYSCONFDIR@/tcp.smtp
@CHMOD@ 644 @PKG_SYSCONFDIR@/tcp.smtp.cdb
}
Home |
Main Index |
Thread Index |
Old Index