pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mail/qmail Update to 1.03nb29. pkgsrc changes:



details:   https://anonhg.NetBSD.org/pkgsrc/rev/e3a2ce1d8b5f
branches:  trunk
changeset: 365582:e3a2ce1d8b5f
user:      schmonz <schmonz%pkgsrc.org@localhost>
date:      Fri Jul 21 04:07:01 2017 +0000

description:
Update to 1.03nb29. pkgsrc changes:


Remove unneeded options:

- Unconditionally apply netqmail (which includes a local patch; remove it)

- Unconditionally apply bigdns, maildiruniq, outgoingip, rcptcheck, remote

- Unconditionally apply the TLS + SMTP AUTH _patch_ (not the options)

- Record all applied patches (mandatory and optional) in QMAILPATCHES

- Remove badrcptto, qregex, realrcptto, viruscan (moved to rejectutils)



Simplify packaging:

- Extract a standalone patch <https://schmonz.com/qmail/rejectutils> to
  repackage the mutually conflicting recipient- and content-checking
  patches as separate programs, along with wrappers for running checks
  in sequence

- Extract a standalone patch <https://schmonz.com/qmail/destdir> to
  build to a staging area, as non-root, without hardcoded IDs

- Run the destdir patch's `install-destdir` to make or repair the queue
  and set special file permissions, obviating the need for a dependency
  on mail/queue-fix and handcrafted SPECIAL_PERMS

- While here, run `instcheck` to ensure we've installed just like `make
  setup check` as root would have

- Install INSTALL and SENDMAIL docs under their original names,
  even on Darwin

- Avoid building catpages, since we don't install them, and remove nroff
  from USE_TOOLS


Default-enable more useful options:

- "eai" (new) permits UTF-8 almost everywhere in email

- "qmail-rejectutils" (new) adds several tools for selectively
  rejecting messages

- "syncdir" forces synchronous link() and related syscalls

- "tls" and "sasl", instead of causing patch conflicts, cause the TLS
  and SMTP AUTH code to be included (!)

diffstat:

 mail/qmail/INSTALL                                            |   38 +-
 mail/qmail/Makefile                                           |  110 +--
 mail/qmail/PLIST                                              |   18 +-
 mail/qmail/distinfo                                           |   78 +-
 mail/qmail/files/README.pkgsrc                                |    3 +-
 mail/qmail/options.mk                                         |  302 ++++-----
 mail/qmail/patches/patch-Makefile                             |   55 +-
 mail/qmail/patches/patch-auto__uids.c                         |   59 -
 mail/qmail/patches/patch-auto__uids.h                         |   46 -
 mail/qmail/patches/patch-hier.c                               |   15 -
 mail/qmail/patches/patch-pkgsrc__user__destdir__fake__chown.c |   15 -
 mail/qmail/patches/patch-pkgsrc__user__destdir__fake__uids.h  |   23 -
 mail/qmail/patches/patch-spawn.c                              |   13 -
 13 files changed, 289 insertions(+), 486 deletions(-)

diffs (truncated from 1019 to 300 lines):

diff -r 5ef748245a54 -r e3a2ce1d8b5f mail/qmail/INSTALL
--- a/mail/qmail/INSTALL        Fri Jul 21 01:39:33 2017 +0000
+++ b/mail/qmail/INSTALL        Fri Jul 21 04:07:01 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: INSTALL,v 1.8 2017/04/27 20:35:10 schmonz Exp $
+# $NetBSD: INSTALL,v 1.9 2017/07/21 04:07:01 schmonz Exp $
 
 DOCDIR=@DOCDIR@
 EGDIR=@EGDIR@
@@ -56,9 +56,37 @@
        ;;
 
 POST-INSTALL)
-       if ! [ -d ${QMAIL_QUEUE_DIR} ] || ! [ -d ${QMAIL_QUEUE_DIR}/info ]; then
-               ${PREFIX}/bin/queue-fix ${QMAIL_QUEUE_DIR}
+       ${PREFIX}/share/qmail/setup/install-destdir
+       QMAIL_SETUP_EXITCODE=$?
+       if [ ${QMAIL_SETUP_EXITCODE} -ne 0 ]; then
+               ${CAT} <<EOF
+===========================================================================
+
+ERROR: install-destdir exited nonzero (${QMAIL_SETUP_EXITCODE}).
+
+Permissions are likely wrong, and/or the queue may be uninitialized.
+
+===========================================================================
+EOF
+               exit 1
        fi
+
+       QMAIL_CHECK_OUTPUT=$(${PREFIX}/share/qmail/setup/instcheck 2>&1)
+       if [ -n "${QMAIL_CHECK_OUTPUT}" ]; then
+               ${CAT} <<EOF
+===========================================================================
+
+ERROR: instcheck issued warnings:
+
+${QMAIL_CHECK_OUTPUT}
+
+Permissions are likely wrong, and/or the queue may be uninitialized.
+
+===========================================================================
+EOF
+               exit 1
+       fi
+
        if ! [ -z ${QMAIL_QUEUE_EXTRA} ]; then
                ${CAT} <<EOF
 ===========================================================================
@@ -84,6 +112,10 @@
 # ln -s ${SERVERCERT} ${PKG_SYSCONFDIR}/control/clientcert.pem
 # update_tmprsadh
 
+Once you have a certificate, regularly regenerate DH params from cron(8):
+
+    01 01 * * * ${PREFIX}/bin/update_tmprsadh > /dev/null 2>&1
+
 ===========================================================================
 EOF
        fi
diff -r 5ef748245a54 -r e3a2ce1d8b5f mail/qmail/Makefile
--- a/mail/qmail/Makefile       Fri Jul 21 01:39:33 2017 +0000
+++ b/mail/qmail/Makefile       Fri Jul 21 04:07:01 2017 +0000
@@ -1,19 +1,18 @@
-# $NetBSD: Makefile,v 1.86 2017/05/22 17:18:32 schmonz Exp $
+# $NetBSD: Makefile,v 1.87 2017/07/21 04:07:01 schmonz Exp $
 #
 
-DISTNAME=              ${PKGNAME_NOREV}
+DISTNAME=              netqmail-1.06
 PKGNAME=               qmail-1.03
-PKGREVISION=           28
+PKGREVISION=           29
 CATEGORIES=            mail
 MASTER_SITES=          http://qmail.org/
 
 MAINTAINER=            schmonz%NetBSD.org@localhost
-HOMEPAGE=              http://cr.yp.to/qmail.html
+HOMEPAGE=              http://qmail.org/netqmail/
 COMMENT=               Secure, reliable, efficient, simple, and fast MTA
 LICENSE=               public-domain
 
 DEPENDS+=              daemontools-[0-9]*:../../sysutils/daemontools
-DEPENDS+=              queue-fix>=1.4nb1:../../mail/queue-fix
 DEPENDS+=              ucspi-tcp-[0-9]*:../../net/ucspi-tcp
 
 CONFLICTS+=            courier-maildirmake-[0-9]*
@@ -22,11 +21,10 @@
 CONFLICTS+=            mutt<=1.4.2.1nb1
 CONFLICTS+=            netqmail-[0-9]*
 CONFLICTS+=            pulsar<=0.1.1
+CONFLICTS+=            qmail-run<=20170706
 
 WRKSRC=                        ${WRKDIR}/${DISTNAME}
 
-USE_TOOLS+=            nroff
-
 DJB_CONFIG_CMDS=       ${ECHO} ${DESTDIR:Q}${QMAILDIR:Q} > conf-destdir;
 DJB_CONFIG_CMDS+=      ${ECHO} ${QMAIL_ALIAS_USER:Q}     > conf-users;
 DJB_CONFIG_CMDS+=      ${ECHO} ${QMAIL_DAEMON_USER:Q}   >> conf-users;
@@ -50,7 +48,6 @@
 DOCDIR=                        ${PREFIX}/share/doc/qmail
 EGDIR=                 ${PREFIX}/share/examples/qmail
 SHAREDIR=              ${PREFIX}/share/qmail
-PLIST_SUBST+=          DARWINSUFX=${DARWINSUFX:Q}
 MESSAGE_SRC+=          ${PKGDIR}/MESSAGE
 MESSAGE_SUBST+=                DOCDIR=${DOCDIR:Q} EGDIR=${EGDIR:Q}
 FILES_SUBST+=          DOCDIR=${DOCDIR:Q} EGDIR=${EGDIR:Q}
@@ -63,7 +60,8 @@
 FILES_SUBST+=          QMAIL_QUEUE_EXTRA=${QMAIL_QUEUE_EXTRA:Q}
 FILES_SUBST+=          PKGNAME=${PKGNAME:Q}
 
-SETUP_PROGRAMS=                dnsfq dnsip dnsptr hostname install ipmeprint
+SETUP_PROGRAMS=                dnsfq dnsip dnsptr hostname ipmeprint
+SETUP_PROGRAMS+=       install-destdir instcheck
 SETUP_SCRIPTS=         config config-fast
 
 MANDIRS=               man
@@ -76,7 +74,7 @@
 
 .include "../../mk/bsd.prefs.mk"
 
-BUILD_DEFS+=           QMAILDIR QMAIL_QUEUE_DIR QMAIL_QUEUE_EXTRA
+BUILD_DEFS+=           QMAILDIR QMAILPATCHES QMAIL_QUEUE_DIR QMAIL_QUEUE_EXTRA
 BUILD_DEFS+=           QMAIL_ALIAS_USER QMAIL_DAEMON_USER QMAIL_LOG_USER
 BUILD_DEFS+=           QMAIL_ROOT_USER QMAIL_PASSWD_USER QMAIL_QUEUE_USER
 BUILD_DEFS+=           QMAIL_REMOTE_USER QMAIL_SEND_USER
@@ -98,11 +96,17 @@
 SUBST_MESSAGE.logging= Setting QUEUE_EXTRA.
 .endif
 
+CASECLASH=             .doc.caseclash
 SUBST_CLASSES+=                caseclash
 SUBST_STAGE.caseclash= do-configure
 SUBST_FILES.caseclash= hier.c
-SUBST_SED.caseclash=   -e 's|"INSTALL"|"INSTALL${DARWINSUFX}"|g'
-SUBST_SED.caseclash+=  -e 's|"SENDMAIL"|"SENDMAIL${DARWINSUFX}"|g'
+SUBST_SED.caseclash=   -e 's|"INSTALL"|"INSTALL${CASECLASH}"|g'
+SUBST_SED.caseclash+=  -e 's|"SENDMAIL"|"SENDMAIL${CASECLASH}"|g'
+SUBST_CLASSES+=                caseclash2
+SUBST_STAGE.caseclash2=        post-install
+SUBST_FILES.caseclash2=        hier.c
+SUBST_SED.caseclash2=  -e 's|"INSTALL${CASECLASH}"|"INSTALL"|g'
+SUBST_SED.caseclash2+= -e 's|"SENDMAIL${CASECLASH}"|"SENDMAIL"|g'
 
 SUBST_CLASSES+=                catpages
 SUBST_STAGE.catpages=  do-configure
@@ -110,37 +114,13 @@
 SUBST_SED.catpages=    -e 's|.*"man/cat[0-9]".*||g'
 SUBST_SED.catpages+=   -e 's|.*"tcp-environ\.5".*||g'  # also in ucspi-tcp
 
-SUBST_CLASSES+=                destdir
-SUBST_STAGE.destdir=   do-configure
-SUBST_FILES.destdir=   Makefile
-SUBST_SED.destdir=     -e 's|\(^load inst.*\.o\) auto_qmail\.o\(.*\)|\1 auto_destdir.o\2|g'
-SUBST_SED.destdir+=    -e 's|\(^       \./load inst.*\) auto_qmail\.o\(.*\)|\1 auto_destdir.o\2|g'
-
-SUBST_CLASSES+=                groups
-SUBST_STAGE.groups=    do-configure
-SUBST_FILES.groups=    auto_uids.c
-SUBST_SED.groups=      -e 's,@QMAIL_QMAIL_GROUP@,${QMAIL_QMAIL_GROUP:Q},g'
-SUBST_SED.groups+=     -e 's,@QMAIL_NOFILES_GROUP@,${QMAIL_NOFILES_GROUP:Q},g'
-
 SUBST_CLASSES+=                paths
 SUBST_STAGE.paths=     do-configure
 SUBST_FILES.paths=     README.*
-SUBST_SED.paths=       -e 's,@PKGNAME@,${PKGNAME:Q},g'
-SUBST_SED.paths+=      -e 's,@PKG_INFO@,${PKG_INFO:Q},g'
-SUBST_SED.paths+=      -e 's,@PREFIX@,${PREFIX:Q},g'
-SUBST_SED.paths+=      -e 's,@GREP@,${GREP:Q},g'
-
-SUBST_CLASSES+=                users
-SUBST_STAGE.users=     do-configure
-SUBST_FILES.users=     auto_uids.c
-SUBST_SED.users=       -e 's,@QMAIL_ROOT_USER@,${QMAIL_ROOT_USER:Q},g'
-SUBST_SED.users+=      -e 's,@QMAIL_ALIAS_USER@,${QMAIL_ALIAS_USER:Q},g'
-SUBST_SED.users+=      -e 's,@QMAIL_DAEMON_USER@,${QMAIL_DAEMON_USER:Q},g'
-SUBST_SED.users+=      -e 's,@QMAIL_LOG_USER@,${QMAIL_LOG_USER:Q},g'
-SUBST_SED.users+=      -e 's,@QMAIL_PASSWD_USER@,${QMAIL_PASSWD_USER:Q},g'
-SUBST_SED.users+=      -e 's,@QMAIL_QUEUE_USER@,${QMAIL_QUEUE_USER:Q},g'
-SUBST_SED.users+=      -e 's,@QMAIL_REMOTE_USER@,${QMAIL_REMOTE_USER:Q},g'
-SUBST_SED.users+=      -e 's,@QMAIL_SEND_USER@,${QMAIL_SEND_USER:Q},g'
+SUBST_SED.paths=       -e 's|@PKGNAME@|${PKGNAME:Q}|g'
+SUBST_SED.paths+=      -e 's|@PKG_INFO@|${PKG_INFO:Q}|g'
+SUBST_SED.paths+=      -e 's|@PREFIX@|${PREFIX:Q}|g'
+SUBST_SED.paths+=      -e 's|@GREP@|${GREP:Q}|g'
 
 SUBST_FILES.djbware+=  cdb_seek.c dns.c
 
@@ -157,28 +137,22 @@
 .endfor
 PKG_HOME.alias=                ${QMAILDIR}/alias
 
-SPECIAL_PERMS+=                ${PREFIX}/bin/qmail-queue ${QMAIL_QUEUE_USER} ${QMAIL_QMAIL_GROUP} 04711
-.for f in qmail-inject qmail-pop3d qmail-qmqpc qmail-qmqpd qmail-qmtpd qmail-qread qmail-qstat qmail-showctl qmail-smtpd qmail-tcpok qmail-tcpto
-SPECIAL_PERMS+=                ${PREFIX}/bin/${f} ${QMAIL_ROOT_USER} ${QMAIL_QMAIL_GROUP} 0755
-.endfor
-.for f in qmail-clean qmail-getpw qmail-local qmail-popup qmail-pw2u qmail-remote qmail-rspawn qmail-send splogger
-SPECIAL_PERMS+=                ${PREFIX}/bin/${f} ${QMAIL_ROOT_USER} ${QMAIL_QMAIL_GROUP} 0711
-.endfor
-.for f in qmail-lspawn qmail-newmrh qmail-newu qmail-start
-SPECIAL_PERMS+=                ${PREFIX}/bin/${f} ${QMAIL_ROOT_USER} ${QMAIL_QMAIL_GROUP} 0700
-.endfor
+READMES=               README.pkgsrc
 
-OPSYSVARS+=            DARWINSUFX
-DARWINSUFX.Darwin=     .doc
-DARWINSUFX.*=          # empty
+post-extract:
+       for i in ${READMES}; do                                         \
+               ${CP} ${FILESDIR}/$$i ${WRKSRC} || ${TRUE};             \
+       done
+       for i in INSTALL SENDMAIL; do                                   \
+               ${MV} ${WRKSRC}/$$i ${WRKSRC}/$$i${CASECLASH};          \
+       done
 
-post-extract: post-extract-srs post-extract-viruscan
-       ${CP} ${FILESDIR}/README.pkgsrc ${WRKSRC}
-.if ${OPSYS} == "Darwin"
-.      for i in INSTALL SENDMAIL
-         mv ${WRKSRC}/${i} ${WRKSRC}/${i}${DARWINSUFX}
-.      endfor
-.endif
+post-patch:
+       cd ${WRKSRC}; \
+       for i in ssl_timeoutio.c tls.c; do \
+               ( ${ECHO} '#ifdef TLS'; ${CAT} $$i; ${ECHO} '#endif' ) > $$i.new; \
+               mv $$i.new $$i; \
+       done
 
 pre-install:
        ${MKDIR} ${DESTDIR}${QMAILDIR}
@@ -193,8 +167,20 @@
        ${LN} -s ${DESTDIR}${QMAIL_QUEUE_DIR}   ${DESTDIR}${QMAILDIR}/queue
        ${LN} -s ${DESTDIR}${EGDIR}/users       ${DESTDIR}${QMAILDIR}/users
 
-post-install: post-install-srs post-install-viruscan
-       ${INSTALL_DATA} ${WRKSRC}/README.pkgsrc ${DESTDIR}${DOCDIR}
+post-install:
+       for i in ${READMES}; do                                         \
+               ${INSTALL_DATA} ${WRKSRC}/$$i ${DESTDIR}${DOCDIR};      \
+       done
+
+       cd ${WRKSRC} && ${MAKE} instcheck install-destdir
+
+       for i in INSTALL SENDMAIL; do                                   \
+               ${MV} ${DESTDIR}${DOCDIR}/$$i${CASECLASH} ${DESTDIR}${DOCDIR}/$$i || ${TRUE}; \
+       done
+
+       for i in ${REJECTUTILS}; do                                     \
+               ${INSTALL_PROGRAM} ${WRKSRC}/$$i ${DESTDIR}${PREFIX}/bin/$$i; \
+       done
 
        ${INSTALL_PROGRAM_DIR} ${DESTDIR}${SHAREDIR}/setup
        for i in ${SETUP_PROGRAMS}; do                                  \
diff -r 5ef748245a54 -r e3a2ce1d8b5f mail/qmail/PLIST
--- a/mail/qmail/PLIST  Fri Jul 21 01:39:33 2017 +0000
+++ b/mail/qmail/PLIST  Fri Jul 21 04:07:01 2017 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.17 2017/03/31 13:52:00 schmonz Exp $
+@comment $NetBSD: PLIST,v 1.18 2017/07/21 04:07:01 schmonz Exp $
 bin/bouncesaying
 bin/condredirect
 bin/datemail
@@ -24,12 +24,19 @@
 bin/qmail-pop3d
 bin/qmail-popup
 bin/qmail-pw2u
+${PLIST.rejectutils}bin/qmail-qfilter-viruscan
 bin/qmail-qmqpc
 bin/qmail-qmqpd
 bin/qmail-qmtpd
 bin/qmail-qread
 bin/qmail-qstat
 bin/qmail-queue
+${PLIST.rejectutils}bin/qmail-qfilter-ofmipd-queue
+${PLIST.rejectutils}bin/qmail-qfilter-smtpd-queue
+${PLIST.rejectutils}bin/qmail-rcptcheck
+${PLIST.rejectutils}bin/qmail-rcptcheck-badrcptto
+${PLIST.rejectutils}bin/qmail-rcptcheck-qregex
+${PLIST.rejectutils}bin/qmail-rcptcheck-realrcptto
 bin/qmail-remote
 bin/qmail-rspawn
 bin/qmail-send
@@ -96,7 +103,7 @@
 man/man8/qmail-tcpto.8
 man/man8/splogger.8
 share/doc/qmail/FAQ
-share/doc/qmail/INSTALL${DARWINSUFX}
+share/doc/qmail/INSTALL
 share/doc/qmail/INSTALL.alias
 share/doc/qmail/INSTALL.ctl
 share/doc/qmail/INSTALL.ids
@@ -114,10 +121,9 @@
 share/doc/qmail/PIC.rem2local
 share/doc/qmail/README.pkgsrc
 ${PLIST.srs}share/doc/qmail/README.srs
-${PLIST.qregex}share/doc/qmail/README.qregex
 share/doc/qmail/REMOVE.binmail
 share/doc/qmail/REMOVE.sendmail



Home | Main Index | Thread Index | Old Index