diff options
author | schmonz <schmonz@pkgsrc.org> | 2017-10-28 04:51:06 +0000 |
---|---|---|
committer | schmonz <schmonz@pkgsrc.org> | 2017-10-28 04:51:06 +0000 |
commit | 9bd8182f200ecb0fff3bc62a96d41de03b50a511 (patch) | |
tree | d560fd874f9e57fc1d2c333124bd6b663f7b6578 /mail/nullmailer | |
parent | bb5ca75abf544f6adf398f881a919fb482def0ba (diff) | |
download | pkgsrc-9bd8182f200ecb0fff3bc62a96d41de03b50a511.tar.gz |
Update to 2.1. From the changelog:
- Added support for TLS anonymous authentication.
Thanks Uffe Jakobsen.
- Fixed sendmail wrapper handling of empty sender on command line.
Thanks Sebastian Wiedenroth.
- Fixed handling of quoted strings in the "remotes" file.
Thanks Mihai Moldovan.
- Fixed nullmailer-inject handling of leading "From " lines.
- Some build fixes.
- Fixed bogus temporary gethostbyname error message when the protocol
source address was incorrect.
- Fixed potential race condition in tests.
Thanks Felix Lechner.
- Fixed handling of time values on 32-bit big-endian systems.
Thanks Felix Lechner.
- Added support to nullmailer-send to move permanently failing messages
out of the queue, and to generate bounce messages.
- Added support for IPv6.
- Added program to generate bounce/delay messages.
- Added an "allmailfrom" control file to nullmailer-queue, causing all
messages to share a hard-coded envelope sender.
- Added logging the message sender/recipient in nullmailer-send.
- Improved handling of system errors when reading config files.
- Secured handling of password options for protocol modules.
- Support standard shell quoting for options in the "remotes" file.
- Added protocol option to set a separate TLS client private key file.
- Added protocol option to bind the source address on connections.
- Fixed nullmailer-inject to report errors to stderr.
- Fixed gnutls cast to pointer from integer of different size warning.
- Fixed nullmailer-inject and -queue to handle the null (empty) sender
address. Needed for RFC 3798 (Message Disposition Notification).
- Moved spool directory to /var/spool/nullmailer like other MTAs.
Diffstat (limited to 'mail/nullmailer')
-rw-r--r-- | mail/nullmailer/Makefile | 28 | ||||
-rw-r--r-- | mail/nullmailer/PLIST | 5 | ||||
-rw-r--r-- | mail/nullmailer/distinfo | 23 | ||||
-rw-r--r-- | mail/nullmailer/files/nullmailer-daemon | 13 | ||||
-rw-r--r-- | mail/nullmailer/files/nullmailer.sh | 32 | ||||
-rw-r--r-- | mail/nullmailer/options.mk | 5 | ||||
-rw-r--r-- | mail/nullmailer/patches/patch-Makefile.in (renamed from mail/nullmailer/patches/patch-aa) | 8 | ||||
-rw-r--r-- | mail/nullmailer/patches/patch-ab | 25 | ||||
-rw-r--r-- | mail/nullmailer/patches/patch-doc_nullmailer-queue.8 (renamed from mail/nullmailer/patches/patch-ac) | 16 | ||||
-rw-r--r-- | mail/nullmailer/patches/patch-doc_nullmailer-send.8 | 31 | ||||
-rw-r--r-- | mail/nullmailer/patches/patch-lib_selfpipe.cc | 4 | ||||
-rw-r--r-- | mail/nullmailer/patches/patch-src_inject.cc | 25 | ||||
-rw-r--r-- | mail/nullmailer/patches/patch-src_sendmail.cc | 18 | ||||
-rw-r--r-- | mail/nullmailer/patches/patch-test_Makefile.am | 14 | ||||
-rw-r--r-- | mail/nullmailer/patches/patch-test_Makefile.in | 17 | ||||
-rw-r--r-- | mail/nullmailer/patches/patch-test_functions.in | 25 |
16 files changed, 177 insertions, 112 deletions
diff --git a/mail/nullmailer/Makefile b/mail/nullmailer/Makefile index 052bb4b7331..d3858974b20 100644 --- a/mail/nullmailer/Makefile +++ b/mail/nullmailer/Makefile @@ -1,30 +1,29 @@ -# $NetBSD: Makefile,v 1.40 2016/12/12 23:54:12 wiedi Exp $ +# $NetBSD: Makefile,v 1.41 2017/10/28 04:51:06 schmonz Exp $ -DISTNAME= nullmailer-1.13 -PKGREVISION= 4 +DISTNAME= nullmailer-2.1 CATEGORIES= mail MASTER_SITES= ${HOMEPAGE:Q} -DIST_SUBDIR= ${PKGNAME_NOREV} MAINTAINER= schmonz@NetBSD.org HOMEPAGE= http://untroubled.org/nullmailer/ COMMENT= Simple relay-only mail transport agent - LICENSE= gnu-gpl-v2 -PKG_DESTDIR_SUPPORT= destdir +DEPENDS+= daemontools-[0-9]*:../../sysutils/daemontools USE_LANGUAGES= c c++ +USE_TOOLS+= gmake GNU_CONFIGURE= yes CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR} -CONFIGURE_ARGS+= --localstatedir=${VARBASE}/spool +CONFIGURE_ARGS+= --localstatedir=${VARBASE} CONFIGURE_ARGS+= --bindir=${PREFIX}/libexec/nullmailer CONFIGURE_ARGS+= --sbindir=${PREFIX}/libexec/nullmailer +TEST_TARGET= check +USE_TOOLS+= bash + .include "../../mk/bsd.prefs.mk" -NULLMAILER_GROUP?= nullmail -NULLMAILER_USER?= nullmail PKG_GROUPS= ${NULLMAILER_GROUP} PKG_USERS= ${NULLMAILER_USER}:${NULLMAILER_GROUP} PKG_GROUPS_VARS= NULLMAILER_GROUP @@ -34,6 +33,7 @@ MAKE_ENV+= NULLMAILER_GROUP=${NULLMAILER_GROUP} MAKE_ENV+= NULLMAILER_USER=${NULLMAILER_USER} FILES_SUBST+= VARBASE=${VARBASE} \ + PKGNAME=${PKGNAME} \ NULLMAILER_GROUP=${NULLMAILER_GROUP} \ NULLMAILER_USER=${NULLMAILER_USER} @@ -50,11 +50,10 @@ SPECIAL_PERMS+= libexec/nullmailer/nullmailer-queue \ ${NULLMAILER_USER} ${NULLMAILER_GROUP} 4555 SUBST_CLASSES+= paths -SUBST_FILES.paths= ${WRKDIR}/mailer.conf ${WRKDIR}/nullmailer-daemon +SUBST_FILES.paths= ${WRKDIR}/mailer.conf SUBST_FILES.paths+= doc/nullmailer-send.8 doc/nullmailer-queue.8 -SUBST_SED.paths+= -e 's,@PREFIX@,${PREFIX},g' -SUBST_SED.paths+= -e 's,@VARBASE@,${VARBASE},g' -SUBST_SED.paths+= -e 's,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR},g' +SUBST_FILES.paths+= test/functions.in +SUBST_VARS.paths= PREFIX VARBASE PKG_SYSCONFDIR SUBST_STAGE.paths= post-configure INSTALLATION_DIRS= share/doc/${PKGBASE} share/examples/${PKGBASE} @@ -64,14 +63,11 @@ BUILD_DEFS+= VARBASE post-extract: ${CP} ${FILESDIR}/mailer.conf ${WRKDIR}/mailer.conf - ${CP} ${FILESDIR}/nullmailer-daemon ${WRKDIR}/nullmailer-daemon post-install: cd ${WRKSRC} && ${INSTALL_DATA} AUTHORS BUGS COPYING ChangeLog \ HOWTO NEWS README TODO ${DESTDIR}${PREFIX}/share/doc/nullmailer ${INSTALL_DATA} ${WRKDIR}/mailer.conf \ ${DESTDIR}${PREFIX}/share/examples/nullmailer/ - ${INSTALL_SCRIPT} ${WRKDIR}/nullmailer-daemon \ - ${DESTDIR}${PREFIX}/libexec/nullmailer/ .include "../../mk/bsd.pkg.mk" diff --git a/mail/nullmailer/PLIST b/mail/nullmailer/PLIST index c47f82a370b..59c2066821d 100644 --- a/mail/nullmailer/PLIST +++ b/mail/nullmailer/PLIST @@ -1,6 +1,6 @@ -@comment $NetBSD: PLIST,v 1.12 2014/03/11 14:05:04 jperkin Exp $ +@comment $NetBSD: PLIST,v 1.13 2017/10/28 04:51:06 schmonz Exp $ libexec/nullmailer/mailq -libexec/nullmailer/nullmailer-daemon +libexec/nullmailer/nullmailer-dsn libexec/nullmailer/nullmailer-inject libexec/nullmailer/nullmailer-queue libexec/nullmailer/nullmailer-send @@ -8,6 +8,7 @@ libexec/nullmailer/nullmailer-smtpd libexec/nullmailer/qmqp libexec/nullmailer/sendmail libexec/nullmailer/smtp +man/man1/nullmailer-dsn.1 man/man1/nullmailer-inject.1 man/man1/sendmail.1 man/man7/nullmailer.7 diff --git a/mail/nullmailer/distinfo b/mail/nullmailer/distinfo index 47a33134b91..e2f2e098844 100644 --- a/mail/nullmailer/distinfo +++ b/mail/nullmailer/distinfo @@ -1,12 +1,15 @@ -$NetBSD: distinfo,v 1.18 2017/02/17 17:08:32 joerg Exp $ +$NetBSD: distinfo,v 1.19 2017/10/28 04:51:06 schmonz Exp $ -SHA1 (nullmailer-1.13/nullmailer-1.13.tar.gz) = e1178fff0395abee2bb6e77c3ddb8a0a7efcc791 -RMD160 (nullmailer-1.13/nullmailer-1.13.tar.gz) = d9f4663351122826299b04a46ffbb2bf51f41687 -SHA512 (nullmailer-1.13/nullmailer-1.13.tar.gz) = 96dcb3ddecde77a73e5ca1afa5167d35f965d04999f02cc2ef60b54ea7eb7a006e5cf5678fc34a54d4be4f9fd71bd0f784a8671aca40c70dbc307666c548e1d7 -Size (nullmailer-1.13/nullmailer-1.13.tar.gz) = 205431 bytes -SHA1 (patch-aa) = 6e8fb0269fcca08fd450b08b865f67ab3bfa1675 -SHA1 (patch-ab) = cb6ed64a5cdf413837710a6f27ea22d1e37fd1b9 -SHA1 (patch-ac) = c542bbf35dfc2148dd133837799b7f4634b66489 +SHA1 (nullmailer-2.1.tar.gz) = 79322908cb242a80f72f8e2888ac870f2f311bcf +RMD160 (nullmailer-2.1.tar.gz) = 834f7d5c8ee387c5d7b15663f0aa00c7f04f795f +SHA512 (nullmailer-2.1.tar.gz) = 5219e251f6648258247913fcb7036075a482b0800a98cde0d731aa4a6b514baae4d8a340b6757b8d532c4b8343b718642c0f519292e3660f8c04671ac274944b +Size (nullmailer-2.1.tar.gz) = 255269 bytes +SHA1 (patch-Makefile.in) = 56ce789f85f4feccce623c540dfb41d84e655c1a +SHA1 (patch-doc_nullmailer-queue.8) = 6d2651b4ebc2500504ce4f5620842ffc6bf0c2f6 +SHA1 (patch-doc_nullmailer-send.8) = 1ab434a1a3293c11db87781217a1694798ba6f23 SHA1 (patch-lib_fdbuf_fdobuf.h) = 716854a1421ef2021f5383f3e63bd19ece900a23 -SHA1 (patch-lib_selfpipe.cc) = e20596f785a8b6f6621f47408f4a594fc2758ee2 -SHA1 (patch-src_inject.cc) = eaffa250d87bb9501e6ccac81c73c1efafb1ad54 +SHA1 (patch-lib_selfpipe.cc) = a5d7e24bfbf3fa823cbd4e696a1c6488586e3512 +SHA1 (patch-src_sendmail.cc) = 442e2324e082cd6d36057ec1d13ebe5a74a66b77 +SHA1 (patch-test_Makefile.am) = 744771972ca47f154fbc4d8a59dc0fc9b3c616f8 +SHA1 (patch-test_Makefile.in) = 5250f65a0758a9442aa6aec076b67af18ea2444c +SHA1 (patch-test_functions.in) = 5c8d10eb57fd1fda2bd904b85a0895104525a7a4 diff --git a/mail/nullmailer/files/nullmailer-daemon b/mail/nullmailer/files/nullmailer-daemon deleted file mode 100644 index 468b146cf9c..00000000000 --- a/mail/nullmailer/files/nullmailer-daemon +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -# -# ensure that the trigger fifo exists and we own it, then start up -# nullmailer-send with logging and detach - -trigger="@VARBASE@/spool/nullmailer/trigger" - -if [ ! -p ${trigger} -o ! -O ${trigger} -o ! -G ${trigger} ]; then - rm -f ${trigger} - mkfifo -m 0600 ${trigger} -fi - -@PREFIX@/libexec/nullmailer/nullmailer-send 2>&1 | logger -t nullmailer -p mail.info & diff --git a/mail/nullmailer/files/nullmailer.sh b/mail/nullmailer/files/nullmailer.sh index b03682f50f3..60b6c63e3e4 100644 --- a/mail/nullmailer/files/nullmailer.sh +++ b/mail/nullmailer/files/nullmailer.sh @@ -1,28 +1,44 @@ #!@RCD_SCRIPTS_SHELL@ # -# $NetBSD: nullmailer.sh,v 1.4 2009/10/14 21:13:41 plunky Exp $ +# $NetBSD: nullmailer.sh,v 1.5 2017/10/28 04:51:06 schmonz Exp $ # +# @PKGNAME@ script to control nullmailer (simple relay-only MTA). +# + # PROVIDE: mail -# REQUIRE: LOGIN + +name="nullmailer" + +# User-settable rc.conf variables and their default values: +: ${nullmailer_postenv:=""} +: ${nullmailer_logcmd:="logger -t nb${name} -p mail.info"} if [ -f /etc/rc.subr ]; then . /etc/rc.subr fi -name="nullmailer" rcvar=${name} required_files="@PKG_SYSCONFDIR@/nullmailer/remotes" required_dirs="@VARBASE@/spool/nullmailer/queue @VARBASE@/spool/nullmailer/tmp" -command="@PREFIX@/libexec/nullmailer/nullmailer-daemon" -procname="@PREFIX@/libexec/nullmailer/nullmailer-send" +command="@PREFIX@/libexec/nullmailer/nullmailer-send" +start_precmd="nullmailer_prestart" -nullmailer_user="@NULLMAILER_USER@" -nullmailer_group="@NULLMAILER_GROUP@" +nullmailer_prestart() +{ + command="@PREFIX@/bin/pgrphack @SETENV@ - ${nullmailer_postenv} +@PREFIX@/bin/setuidgid @NULLMAILER_USER@ @PREFIX@/libexec/nullmailer/nullmailer-send +2>&1 | +@PREFIX@/bin/pgrphack @PREFIX@/bin/setuidgid @NULLMAILER_USER@ ${nullmailer_logcmd}" + command_args="&" + rc_flags="" +} if [ -f /etc/rc.subr ]; then load_rc_config $name run_rc_command "$1" else @ECHO_N@ " ${name}" - ${command} ${nullmailer_flags} ${command_args} + nullmailer_prestart + eval ${command} ${nullmailer_flags} ${command_args} + nullmailer_poststart fi diff --git a/mail/nullmailer/options.mk b/mail/nullmailer/options.mk index e83af9ec7c9..fb6ef5b313e 100644 --- a/mail/nullmailer/options.mk +++ b/mail/nullmailer/options.mk @@ -1,4 +1,4 @@ -# $NetBSD: options.mk,v 1.1 2015/03/11 15:18:51 wiedi Exp $ +# $NetBSD: options.mk,v 1.2 2017/10/28 04:51:06 schmonz Exp $ PKG_OPTIONS_VAR= PKG_OPTIONS.nullmailer PKG_SUPPORTED_OPTIONS= gnutls @@ -9,5 +9,6 @@ PKG_SUGGESTED_OPTIONS= gnutls .if !empty(PKG_OPTIONS:Mgnutls) . include "../../security/gnutls/buildlink3.mk" CONFIGURE_ARGS+= --enable-tls +.else +CONFIGURE_ARGS+= --disable-tls .endif # option gnutls - diff --git a/mail/nullmailer/patches/patch-aa b/mail/nullmailer/patches/patch-Makefile.in index 25f0e3c47a3..bac57aeda43 100644 --- a/mail/nullmailer/patches/patch-aa +++ b/mail/nullmailer/patches/patch-Makefile.in @@ -1,8 +1,10 @@ -$NetBSD: patch-aa,v 1.6 2015/01/02 04:38:20 schmonz Exp $ +$NetBSD: patch-Makefile.in,v 1.1 2017/10/28 04:51:06 schmonz Exp $ ---- Makefile.in.orig 2013-04-15 14:48:25.000000000 +0000 +Override hard-coded user and group. + +--- Makefile.in.orig 2017-10-24 00:12:35.000000000 +0000 +++ Makefile.in -@@ -632,10 +632,10 @@ install-data-local: +@@ -790,10 +790,10 @@ install-data-local: chmod 600 $(DESTDIR)$(localstatedir)/trigger install-root: diff --git a/mail/nullmailer/patches/patch-ab b/mail/nullmailer/patches/patch-ab deleted file mode 100644 index ebe2f883c7b..00000000000 --- a/mail/nullmailer/patches/patch-ab +++ /dev/null @@ -1,25 +0,0 @@ -$NetBSD: patch-ab,v 1.8 2015/01/02 04:38:20 schmonz Exp $ - ---- doc/nullmailer-send.8.orig 2013-03-28 23:08:05.000000000 +0000 -+++ doc/nullmailer-send.8 -@@ -115,16 +115,16 @@ If this is set to - will wait forever for messages to complete sending. - .SH FILES - .TP --.B /var/nullmailer/queue -+.B @VARBASE@/spool/nullmailer/queue - The message queue. - .TP --.B /var/nullmailer/trigger -+.B @VARBASE@/spool/nullmailer/trigger - A trigger file to cause immediate delivery. - .TP --.B /usr/local/etc/nullmailer -+.B @PKG_SYSCONFDIR@/nullmailer - The configuration directory. - .TP --.B /usr/local/libexec/nullmailer -+.B @PREFIX@/libexec/nullmailer - The protocol program directory. - .SH SEE ALSO - nullmailer-queue(8), diff --git a/mail/nullmailer/patches/patch-ac b/mail/nullmailer/patches/patch-doc_nullmailer-queue.8 index 8b4a440350f..8c4b8b818b3 100644 --- a/mail/nullmailer/patches/patch-ac +++ b/mail/nullmailer/patches/patch-doc_nullmailer-queue.8 @@ -1,20 +1,22 @@ -$NetBSD: patch-ac,v 1.6 2013/09/03 17:50:28 shattered Exp $ +$NetBSD: patch-doc_nullmailer-queue.8,v 1.1 2017/10/28 04:51:06 schmonz Exp $ ---- doc/nullmailer-queue.8.orig 2002-12-23 12:29:20.000000000 -0500 +Override hard-coded paths. + +--- doc/nullmailer-queue.8.orig 2017-10-24 00:12:30.000000000 +0000 +++ doc/nullmailer-queue.8 -@@ -31,13 +31,13 @@ being bounced by your relay host. To sen - them all on one line separated by a comma. +@@ -35,13 +35,13 @@ If this file is not empty, its contents + sender on all messages. .SH OTHER FILES .TP --.B /var/nullmailer/queue +-.B /var/spool/nullmailer/queue +.B @VARBASE@/spool/nullmailer/queue The directory into which the completed messages are moved. .TP --.B /var/nullmailer/tmp +-.B /var/spool/nullmailer/tmp +.B @VARBASE@/spool/nullmailer/tmp The directory in which messages are formed temporarily. .TP --.B /var/nullmailer/trigger +-.B /var/spool/nullmailer/trigger +.B @VARBASE@/spool/nullmailer/trigger A pipe used to trigger .BR nullmailer-send diff --git a/mail/nullmailer/patches/patch-doc_nullmailer-send.8 b/mail/nullmailer/patches/patch-doc_nullmailer-send.8 new file mode 100644 index 00000000000..ad8defaad4c --- /dev/null +++ b/mail/nullmailer/patches/patch-doc_nullmailer-send.8 @@ -0,0 +1,31 @@ +$NetBSD: patch-doc_nullmailer-send.8,v 1.1 2017/10/28 04:51:06 schmonz Exp $ + +Override hard-coded paths. + +--- doc/nullmailer-send.8.orig 2017-10-24 00:12:30.000000000 +0000 ++++ doc/nullmailer-send.8 +@@ -182,19 +182,19 @@ However, the data are integrity protecte + This option must be used with the insecure option - to acknowledge that you know what you are doing. + .SH FILES + .TP +-.B /var/spool/nullmailer/failed ++.B @VARBASE@/spool/nullmailer/failed + The failed message queue. + .TP +-.B /var/spool/nullmailer/queue ++.B @VARBASE@/spool/nullmailer/queue + The outgoing message queue. + .TP +-.B /var/spool/nullmailer/trigger ++.B @VARBASE@/spool/nullmailer/trigger + A trigger file to cause immediate delivery. + .TP +-.B /usr/local/etc/nullmailer ++.B @PKG_SYSCONFDIR@/nullmailer + The configuration directory. + .TP +-.B /usr/local/libexec/nullmailer ++.B @PREFIX@/libexec/nullmailer + The protocol program directory. + .SH SEE ALSO + nullmailer-dsn(1), diff --git a/mail/nullmailer/patches/patch-lib_selfpipe.cc b/mail/nullmailer/patches/patch-lib_selfpipe.cc index 8be49bad8db..9209a382abd 100644 --- a/mail/nullmailer/patches/patch-lib_selfpipe.cc +++ b/mail/nullmailer/patches/patch-lib_selfpipe.cc @@ -1,4 +1,6 @@ -$NetBSD: patch-lib_selfpipe.cc,v 1.1 2017/02/17 17:08:32 joerg Exp $ +$NetBSD: patch-lib_selfpipe.cc,v 1.2 2017/10/28 04:51:06 schmonz Exp $ + +Add missing include. --- lib/selfpipe.cc.orig 2017-02-17 10:54:28.240596810 +0000 +++ lib/selfpipe.cc diff --git a/mail/nullmailer/patches/patch-src_inject.cc b/mail/nullmailer/patches/patch-src_inject.cc deleted file mode 100644 index 02ffe5a1433..00000000000 --- a/mail/nullmailer/patches/patch-src_inject.cc +++ /dev/null @@ -1,25 +0,0 @@ -$NetBSD: patch-src_inject.cc,v 1.1 2016/12/12 23:54:12 wiedi Exp $ - -Add support for RFC976 "From_ lines". -Some systems (e.g. Sun cron) generate UUCP "From_ lines" breaking header parsing. -Upstream bug: https://github.com/bruceg/nullmailer/pull/39 - ---- src/inject.cc.orig 2013-03-27 21:22:39.000000000 +0000 -+++ src/inject.cc -@@ -347,11 +347,16 @@ bool read_header() - { - mystring cur_line; - mystring whole; -+ bool first = true; - for (;;) { - if (!fin.getline(cur_line)) - cur_line = ""; - if(!cur_line || cur_line == "\r") - break; -+ if(first && (cur_line.find_first_of("From ", 0) == 0 || -+ cur_line.find_first_of(">From ", 0) == 0)) -+ continue; -+ first = false; - if(!!whole && is_continuation(cur_line)) { - //if(!whole) - //bad_hdr(cur_line, "First line cannot be a continuation line."); diff --git a/mail/nullmailer/patches/patch-src_sendmail.cc b/mail/nullmailer/patches/patch-src_sendmail.cc new file mode 100644 index 00000000000..146d52323d8 --- /dev/null +++ b/mail/nullmailer/patches/patch-src_sendmail.cc @@ -0,0 +1,18 @@ +$NetBSD: patch-src_sendmail.cc,v 1.1 2017/10/28 04:51:06 schmonz Exp $ + +Avoid "variable-sized object may not be initialized". + +--- src/sendmail.cc.orig 2017-10-25 23:36:35.000000000 +0000 ++++ src/sendmail.cc +@@ -111,9 +111,10 @@ int do_exec(const char* program, const c + + int cli_main(int argc, char* argv[]) + { +- const char* extra_args[argc + 5] = {0}; ++ const char* extra_args[argc + 5]; + int extra_argc = 1; + ++ extra_args[0] = 0; + switch (o_mode) { + case mode_smtp: + return do_exec("nullmailer-smtpd", extra_args); diff --git a/mail/nullmailer/patches/patch-test_Makefile.am b/mail/nullmailer/patches/patch-test_Makefile.am new file mode 100644 index 00000000000..81c7387229f --- /dev/null +++ b/mail/nullmailer/patches/patch-test_Makefile.am @@ -0,0 +1,14 @@ +$NetBSD: patch-test_Makefile.am,v 1.1 2017/10/28 04:51:06 schmonz Exp $ + +Use bash explicitly, and avoid GNUism in find(1). + +--- test/Makefile.am.orig 2017-10-24 00:12:30.000000000 +0000 ++++ test/Makefile.am +@@ -31,5 +31,5 @@ dist-hook: + check: all + ./address-test + ./argparse-test +- sh $(srcdir)/clitest.sh +- $(srcdir)/runtests `find $(abs_srcdir)/tests -type f -not -name '.*'` ++ bash $(srcdir)/clitest.sh ++ $(srcdir)/runtests `find $(abs_srcdir)/tests -type f \! -name '.*'` diff --git a/mail/nullmailer/patches/patch-test_Makefile.in b/mail/nullmailer/patches/patch-test_Makefile.in new file mode 100644 index 00000000000..02b068a9700 --- /dev/null +++ b/mail/nullmailer/patches/patch-test_Makefile.in @@ -0,0 +1,17 @@ +$NetBSD: patch-test_Makefile.in,v 1.1 2017/10/28 04:51:06 schmonz Exp $ + +Use bash explicitly, and avoid GNUism in find(1). + +--- test/Makefile.in.orig 2017-10-24 00:12:35.000000000 +0000 ++++ test/Makefile.in +@@ -612,8 +612,8 @@ dist-hook: + check: all + ./address-test + ./argparse-test +- sh $(srcdir)/clitest.sh +- $(srcdir)/runtests `find $(abs_srcdir)/tests -type f -not -name '.*'` ++ bash $(srcdir)/clitest.sh ++ $(srcdir)/runtests `find $(abs_srcdir)/tests -type f \! -name '.*'` + + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/mail/nullmailer/patches/patch-test_functions.in b/mail/nullmailer/patches/patch-test_functions.in new file mode 100644 index 00000000000..d72e40548bb --- /dev/null +++ b/mail/nullmailer/patches/patch-test_functions.in @@ -0,0 +1,25 @@ +$NetBSD: patch-test_functions.in,v 1.1 2017/10/28 04:51:06 schmonz Exp $ + +Find and use mkfifo(8) and svc(8) for tests. + +--- test/functions.in.orig 2017-10-24 02:56:07.000000000 +0000 ++++ test/functions.in +@@ -10,7 +10,8 @@ mkdir -p \ + $tmpdir/protocols \ + $QUEUEDIR/{failed,queue,tmp} \ + $SYSCONFDIR +-mknod $QUEUEDIR/trigger p ++export PATH=/sbin:$PATH ++mkfifo $QUEUEDIR/trigger + ln -s $builddir/src $tmpdir/sbin + ln -s $builddir/src $tmpdir/bin + ln -s $builddir/protocols/* $tmpdir/protocols/ +@@ -128,7 +129,7 @@ splitblank() { + done + } + +-export PATH=/bin:/usr/bin:/usr/local/bin ++export PATH=/bin:/usr/bin:/usr/local/bin:@PREFIX@/bin + rm -f $SYSCONFDIR/* + echo f.q.d.n >$SYSCONFDIR/me + echo q.d.n >$SYSCONFDIR/defaultdomain |