pkgsrc-Changes archive

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

CVS commit: pkgsrc/mail/qmail



Module Name:    pkgsrc
Committed By:   schmonz
Date:           Tue Aug 20 02:38:04 UTC 2019

Modified Files:
        pkgsrc/mail/qmail: DEINSTALL INSTALL Makefile PLIST distinfo options.mk
Added Files:
        pkgsrc/mail/qmail/files: README.tls config-fast-pkgsrc-defaults.sh
Removed Files:
        pkgsrc/mail/qmail: MESSAGE MESSAGE.srs MESSAGE.tls
        pkgsrc/mail/qmail/patches: patch-strerr_sys.c

Log Message:
Update from netqmail 1.06 (2007) to notqmail 1.07 (just released). From
the changelog:

- code: remove incorrect usage of vfork()
- code: detect and prefer utmpx where available
- code: removed idedit, install-big. var-qmail packages are no more
- portability problem: explicitly initialize strerr_sys and
  define BIND_8_COMPAT to work around Mac OS X
- code: add instchown to set ownership and mode on installed files
- code: add instpackage to install without root access
- doc: rename INSTALL, SENDMAIL to INSTALL.md, SENDMAIL.md to
  support building on case-insensitive filesystems
- code: lookup uid/gid at runtime
- code: use DESTDIR environment variable as root directory in install

pkgsrc changes:

- If hostname isn't FQDN, config-fast-pkgsrc wouldn't produce a working
  config, so don't run it; tell user what to do instead
- Stage QMAIL_QUEUE_DIR into DESTDIR/tmp, to be more obvious that it's
  not being packaged up (and is not how a queue gets created at
  pkg_add time)
- Drop custom destdir, qbiffutmpx, and Darwin patches
- Rebase TLS-onlyremote, QMAILREMOTE, and SRS patches
- Require latest ucspi-ssl and ucspi-tcp6 for IPv4 fixes
- Move MESSAGE.tls to README.tls, and remove other MESSAGE*
- Set PKG_HOME even for non-default values of QMAIL_ALIAS_USER
- Check whether alias/.qmail-foo exist before trying to remove

Bump PKGREVISION.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 pkgsrc/mail/qmail/DEINSTALL
cvs rdiff -u -r1.15 -r1.16 pkgsrc/mail/qmail/INSTALL
cvs rdiff -u -r1.13 -r0 pkgsrc/mail/qmail/MESSAGE
cvs rdiff -u -r1.1 -r0 pkgsrc/mail/qmail/MESSAGE.srs \
    pkgsrc/mail/qmail/MESSAGE.tls
cvs rdiff -u -r1.113 -r1.114 pkgsrc/mail/qmail/Makefile
cvs rdiff -u -r1.21 -r1.22 pkgsrc/mail/qmail/PLIST
cvs rdiff -u -r1.44 -r1.45 pkgsrc/mail/qmail/distinfo
cvs rdiff -u -r1.65 -r1.66 pkgsrc/mail/qmail/options.mk
cvs rdiff -u -r0 -r1.1 pkgsrc/mail/qmail/files/README.tls \
    pkgsrc/mail/qmail/files/config-fast-pkgsrc-defaults.sh
cvs rdiff -u -r1.1 -r0 pkgsrc/mail/qmail/patches/patch-strerr_sys.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/mail/qmail/DEINSTALL
diff -u pkgsrc/mail/qmail/DEINSTALL:1.7 pkgsrc/mail/qmail/DEINSTALL:1.8
--- pkgsrc/mail/qmail/DEINSTALL:1.7     Tue Dec  4 17:01:39 2018
+++ pkgsrc/mail/qmail/DEINSTALL Tue Aug 20 02:38:04 2019
@@ -1,4 +1,4 @@
-# $NetBSD: DEINSTALL,v 1.7 2018/12/04 17:01:39 schmonz Exp $
+# $NetBSD: DEINSTALL,v 1.8 2019/08/20 02:38:04 schmonz Exp $
 
 QMAILDIR=@QMAILDIR@
 QMAIL_QUEUE_EXTRA=@QMAIL_QUEUE_EXTRA@
@@ -10,10 +10,13 @@ case "${STAGE}" in
 DEINSTALL)
        cd ${PKG_SYSCONFDIR}
        for i in mailer-daemon postmaster root ${QMAIL_QUEUE_EXTRA}; do
-               contents=$(${CAT} alias/.qmail-${i})
-               if [ "${contents}" = '# pkgsrc says: replace this comment with your config' ] \
-                       || [ "${contents}" = '' ]; then
-                       ${RM} -f alias/.qmail-${i}
+               f="alias/.qmail-${i}"
+               if [ -e ${f} ]; then
+                       contents=$(${CAT} ${f})
+                       if [ "${contents}" = '# pkgsrc says: replace this comment with your config' ] \
+                               || [ "${contents}" = '' ]; then
+                               ${RM} -f ${f}
+                       fi
                fi
        done
        for i in defaultdomain locals me plusdomain rcpthosts; do

Index: pkgsrc/mail/qmail/INSTALL
diff -u pkgsrc/mail/qmail/INSTALL:1.15 pkgsrc/mail/qmail/INSTALL:1.16
--- pkgsrc/mail/qmail/INSTALL:1.15      Mon Jul 15 16:11:58 2019
+++ pkgsrc/mail/qmail/INSTALL   Tue Aug 20 02:38:04 2019
@@ -1,109 +1,126 @@
-# $NetBSD: INSTALL,v 1.15 2019/07/15 16:11:58 schmonz Exp $
+# $NetBSD: INSTALL,v 1.16 2019/08/20 02:38:04 schmonz Exp $
 
 DOCDIR=@DOCDIR@
 EGDIR=@EGDIR@
 PKGMANDIR=@PKGMANDIR@
 QMAILDIR=@QMAILDIR@
 QMAIL_QUEUE_DIR=@QMAIL_QUEUE_DIR@
-QMAIL_QUEUE_EXTRA=@QMAIL_QUEUE_EXTRA@
 
 VAR_QMAIL_DIRS="alias bin boot control doc man queue users"
 
-case ${STAGE} in
+error_qmaildir() {
+       local _qmaildir
+       _qmaildir="$1"
 
-PRE-INSTALL)
-       for dir in $VAR_QMAIL_DIRS; do
-               if [ -e ${QMAILDIR}/$dir ]; then
-                       ${CAT} <<EOF
+       ${CAT} <<EOF
 ===========================================================================
 
-ERROR: ${QMAILDIR} exists and is non-empty.
+ERROR: ${_qmaildir} exists and is non-empty.
 
 Please remove or rename it, then try again.
 
 ===========================================================================
 EOF
-               exit 1
-               fi
-       done
+       exit 1
+}
+
+error_instchown() {
+       local _exitcode
+       _exitcode="$1"
 
-       if ${ECHO} ${QMAIL_QUEUE_DIR} | ${GREP} -q "^${QMAILDIR}/"; then
-               ${CAT} <<EOF
+       ${CAT} <<EOF
 ===========================================================================
 
-ERROR: QMAIL_QUEUE_DIR must not be under ${QMAILDIR}.
+ERROR: instchown exited ${_exitcode}.
 
-Please adjust your definition of QMAIL_QUEUE_DIR, then try again.
+Permissions are likely wrong, and/or the queue may be uninitialized.
 
 ===========================================================================
 EOF
-               exit 1
-       fi
+       exit 1
+}
 
-       # keep in sync with Makefile:pre-install
-       ${LN} -s ${PKG_SYSCONFDIR}/alias        ${QMAILDIR}/alias
-       ${LN} -s ${PREFIX}/bin                  ${QMAILDIR}/bin
-       ${LN} -s ${EGDIR}/boot                  ${QMAILDIR}/boot
-       ${LN} -s ${PKG_SYSCONFDIR}/control      ${QMAILDIR}/control
-       ${LN} -s ${DOCDIR}                      ${QMAILDIR}/doc
-       ${LN} -s ${PREFIX}/${PKGMANDIR}         ${QMAILDIR}/man
-       ${LN} -s ${QMAIL_QUEUE_DIR}             ${QMAILDIR}/queue
-       ${LN} -s ${PKG_SYSCONFDIR}/users        ${QMAILDIR}/users
-
-       ;;
+error_instcheck() {
+       local _output
+       _output="$1"
 
-POST-INSTALL)
-       ${PREFIX}/share/qmail/setup/install-destdir
-       QMAIL_SETUP_EXITCODE=$?
-       if [ ${QMAIL_SETUP_EXITCODE} -ne 0 ]; then
-               ${CAT} <<EOF
+       ${CAT} <<EOF
 ===========================================================================
 
-ERROR: install-destdir exited nonzero (${QMAIL_SETUP_EXITCODE}).
+ERROR: instcheck issued warnings:
+
+${_output}
 
 Permissions are likely wrong, and/or the queue may be uninitialized.
 
 ===========================================================================
 EOF
-               exit 1
-       fi
+       exit 1
+}
 
-       QMAIL_CHECK_OUTPUT=$(${PREFIX}/share/qmail/setup/instcheck 2>&1)
-       if [ -n "${QMAIL_CHECK_OUTPUT}" ]; then
-               ${CAT} <<EOF
+warning_fqdn() {
+       local _command _name
+       _command="$1"
+       _name="$2"
+
+       ${CAT} <<EOF
 ===========================================================================
 
-ERROR: instcheck issued warnings:
+WARNING: "${_name}" is not a fully qualified name.
 
-${QMAIL_CHECK_OUTPUT}
+To configure basic qmail control files, please run this command:
 
-Permissions are likely wrong, and/or the queue may be uninitialized.
+# ${_command} ${_name}.YOURDOMAIN.TLD
 
 ===========================================================================
 EOF
-               exit 1
-       fi
+}
 
-       cd ${PREFIX}/share/qmail/setup && ./config-fast-pkgsrc `./hostname`
+case "${STAGE}" in
 
-       cd ${PKG_SYSCONFDIR}/.pkgsrc-defaults-do-not-edit
-       for i in locals rcpthosts; do
-               ${SORT} -u ${i} > ${i}.tmp && ${MV} ${i}.tmp ${i}
+PRE-INSTALL)
+       for dir in $VAR_QMAIL_DIRS; do
+               if [ -e ${QMAILDIR}/$dir ]; then
+                       error_qmaildir ${QMAILDIR}
+               fi
        done
 
-       cd ${PKG_SYSCONFDIR}
-       for i in defaultdomain locals me plusdomain rcpthosts; do
-               [ -f control/${i} ] \
-                       || ${CP} .pkgsrc-defaults-do-not-edit/${i} control
-       done
+       # keep in sync with Makefile:pre-install
+       ${LN} -s ${PKG_SYSCONFDIR}/alias        ${QMAILDIR}/alias
+       ${LN} -s ${PREFIX}/bin                  ${QMAILDIR}/bin
+       ${LN} -s ${EGDIR}/boot                  ${QMAILDIR}/boot
+       ${LN} -s ${PKG_SYSCONFDIR}/control      ${QMAILDIR}/control
+       ${LN} -s ${DOCDIR}                      ${QMAILDIR}/doc
+       ${LN} -s ${PREFIX}/${PKGMANDIR}         ${QMAILDIR}/man
+       ${LN} -s ${QMAIL_QUEUE_DIR}             ${QMAILDIR}/queue
+       ${LN} -s ${PKG_SYSCONFDIR}/users        ${QMAILDIR}/users
 
-       cd ${PKG_SYSCONFDIR}/alias
-       for i in mailer-daemon postmaster root ${QMAIL_QUEUE_EXTRA}; do
-               [ -s .qmail-${i} ] \
-                       || ${ECHO} '# pkgsrc says: replace this comment with your config' \
-                       > .qmail-${i}
-               ${CHMOD} 644 .qmail-${i}
-       done
+       ;;
+
+POST-INSTALL)
+       # create the queue
+       ${PREFIX}/share/qmail/setup/instpackage >/dev/null 2>&1
+       ${PREFIX}/share/qmail/setup/instchown
+       QMAIL_SETUP_EXITCODE=$?
+       if [ ${QMAIL_SETUP_EXITCODE} -ne 0 ]; then
+               error_instchown ${QMAIL_SETUP_EXITCODE}
+       fi
+
+       QMAIL_CHECK_OUTPUT=$(${PREFIX}/share/qmail/setup/instcheck 2>&1)
+       if [ -n "${QMAIL_CHECK_OUTPUT}" ]; then
+               error_instcheck "${QMAIL_CHECK_OUTPUT}"
+       fi
+
+       QMAIL_CONFIG_CMD="${PREFIX}/share/qmail/setup/config-fast-pkgsrc"
+       QMAIL_FQDN=$(${PREFIX}/share/qmail/setup/hostname)
+       case "${QMAIL_FQDN}" in
+       *.*)
+               ${QMAIL_CONFIG_CMD} "${QMAIL_FQDN}"
+               ;;
+       *)
+               warning_fqdn "${QMAIL_CONFIG_CMD}" "${QMAIL_FQDN}"
+               ;;
+       esac
 
        ;;
 

Index: pkgsrc/mail/qmail/Makefile
diff -u pkgsrc/mail/qmail/Makefile:1.113 pkgsrc/mail/qmail/Makefile:1.114
--- pkgsrc/mail/qmail/Makefile:1.113    Mon Jul  1 14:57:31 2019
+++ pkgsrc/mail/qmail/Makefile  Tue Aug 20 02:38:04 2019
@@ -1,14 +1,16 @@
-# $NetBSD: Makefile,v 1.113 2019/07/01 14:57:31 schmonz Exp $
+# $NetBSD: Makefile,v 1.114 2019/08/20 02:38:04 schmonz Exp $
 #
 
-DISTNAME=              netqmail-1.06
+DISTNAME=              notqmail-1.07
 PKGNAME=               qmail-1.03
-PKGREVISION=           45
+PKGREVISION=           46
 CATEGORIES=            mail
-MASTER_SITES=          ${HOMEPAGE}
+MASTER_SITES=          ${MASTER_SITE_GITHUB:=notqmail/}
+GITHUB_PROJECT=                notqmail
+GITHUB_RELEASE=                ${DISTNAME}
 
 MAINTAINER=            schmonz%NetBSD.org@localhost
-HOMEPAGE=              http://netqmail.org/
+HOMEPAGE=              https://notqmail.org/
 COMMENT=               Secure, reliable, efficient, simple, and fast MTA
 LICENSE=               public-domain
 
@@ -22,9 +24,6 @@ CONFLICTS+=           netqmail-[0-9]*
 CONFLICTS+=            pulsar<=0.1.1
 CONFLICTS+=            qmail-run<=20170706
 
-WRKSRC=                        ${WRKDIR}/${DISTNAME}
-
-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;
 DJB_CONFIG_CMDS+=      ${ECHO} ${QMAIL_LOG_USER:Q}      >> conf-users;
@@ -36,11 +35,8 @@ DJB_CONFIG_CMDS+=    ${ECHO} ${QMAIL_SEND_U
 DJB_CONFIG_CMDS+=      ${ECHO} ${QMAIL_QMAIL_GROUP:Q}    > conf-groups;
 DJB_CONFIG_CMDS+=      ${ECHO} ${QMAIL_NOFILES_GROUP:Q} >> conf-groups;
 DJB_BUILD_TARGETS=     man
-INSTALL_TARGET=                setup
 DJB_RESTRICTED=                no
 
-CPPFLAGS.Darwin+=      -DBIND_8_COMPAT=1
-
 PKG_SYSCONFSUBDIR=     qmail
 OWN_DIRS+=             ${PKG_SYSCONFDIR} ${PKG_SYSCONFDIR}/alias
 OWN_DIRS+=             ${PKG_SYSCONFDIR}/control ${PKG_SYSCONFDIR}/users
@@ -50,8 +46,6 @@ OWN_DIRS+=            ${QMAILDIR} ${QMAIL_QUEUE_DI
 DOCDIR=                        ${PREFIX}/share/doc/qmail
 EGDIR=                 ${PREFIX}/share/examples/qmail
 SHAREDIR=              ${PREFIX}/share/qmail
-MESSAGE_SRC+=          ${PKGDIR}/MESSAGE
-MESSAGE_SUBST+=                DOCDIR=${DOCDIR:Q} EGDIR=${EGDIR:Q}
 FILES_SUBST+=          DOCDIR=${DOCDIR:Q} EGDIR=${EGDIR:Q}
 FILES_SUBST+=          PKGMANDIR=${PKGMANDIR:Q} SHAREDIR=${SHAREDIR:Q}
 FILES_SUBST+=          QMAILDIR=${QMAILDIR:Q}
@@ -63,7 +57,7 @@ FILES_SUBST+=         PKGNAME=${PKGNAME:Q}
 FILES_SUBST+=          WC=${WC:Q}
 
 SETUP_PROGRAMS=                dnsfq dnsip dnsptr hostname ipmeprint
-SETUP_PROGRAMS+=       install-destdir instcheck
+SETUP_PROGRAMS+=       instpackage instchown instcheck
 SETUP_SCRIPTS=         config config-fast config-fast-pkgsrc
 
 MANDIRS=               man
@@ -98,30 +92,22 @@ SUBST_SED.logging+= -e 's|""|${QUEUE_EXT
 SUBST_MESSAGE.logging= Setting QUEUE_EXTRA.
 .endif
 
-SUBST_CLASSES+=                caseclash
-SUBST_STAGE.caseclash= do-configure
-SUBST_FILES.caseclash= hier.c
-SUBST_SED.caseclash=   -e 's|"doc","INSTALL"|".","doc/INSTALL"|g'
-SUBST_SED.caseclash+=  -e 's|"doc","SENDMAIL"|".","doc/SENDMAIL"|g'
-
 SUBST_CLASSES+=                catpages
 SUBST_STAGE.catpages=  do-configure
 SUBST_FILES.catpages=  hier.c
 SUBST_SED.catpages=    -e 's|.*"man/cat[0-9]".*||g'
 SUBST_SED.catpages+=   -e 's|.*"tcp-environ\.5".*||g'  # also in ucspi-tcp
 
-.if defined(MANZ)
-SUBST_CLASSES+=                manzpages
-SUBST_STAGE.manzpages= post-build
-SUBST_FILES.manzpages= hier_destdir.c
-SUBST_SED.manzpages=   -e 's|\(.*"man/man[0-9]",".*\.[0-9]\)|\1.gz|g'
-.endif
-
 SUBST_CLASSES+=                paths
 SUBST_STAGE.paths=     do-configure
 SUBST_FILES.paths=     README.*
 SUBST_VARS.paths=      PKGNAME PKG_INFO PREFIX GREP
 
+SUBST_CLASSES+=                config
+SUBST_STAGE.config=    do-configure
+SUBST_FILES.config=    config-fast-pkgsrc-defaults.sh
+SUBST_VARS.config=     SORT MV CP PKG_SYSCONFDIR QMAIL_QUEUE_EXTRA
+
 SUBST_FILES.djbware+=  cdb_seek.c dns.c
 
 PKG_USERS_VARS+=       QMAIL_ALIAS_USER QMAIL_DAEMON_USER QMAIL_LOG_USER
@@ -139,15 +125,15 @@ PKG_USERS+=               ${QMAIL_SEND_USER}:${QMAIL_
 .for user in ${PKG_USERS:C/\:.*//}
 PKG_HOME.${user}=      ${QMAILDIR}
 .endfor
-PKG_HOME.alias=                ${QMAILDIR}/alias
+PKG_HOME.${QMAIL_ALIAS_USER}=  ${QMAILDIR}/alias
 
 READMES=               README.pkgsrc
 
 # Record all patches applied, starting with the non-optional ones:
-QMAILPATCHES=                  netqmail:${DEFAULT_DISTFILES}
+QMAILPATCHES=                  notqmail:${DEFAULT_DISTFILES}
 
 QMAILPATCHES+=                 tls:${TLSREMOTE_PATCH}
-TLSREMOTE_PATCH=               netqmail-1.06-tls-20190408-onlyremote-20190408.patch
+TLSREMOTE_PATCH=               notqmail-1.07-tls-20190517-onlyremote-20190819.patch
 PATCHFILES+=                   ${TLSREMOTE_PATCH}
 SITES.${TLSREMOTE_PATCH}=      https://schmonz.com/qmail/tlsonlyremote/
 
@@ -157,11 +143,6 @@ PATCHFILES+=                       ${BIGDNS_PATCH}
 SITES.${BIGDNS_PATCH}=         https://www.ckdhr.com/ckd/
 PATCH_DIST_STRIP.${BIGDNS_PATCH}=-p1
 
-QMAILPATCHES+=                 destdir:${DESTDIR_PATCH}
-DESTDIR_PATCH=                 netqmail-1.06-destdir-20181217.patch
-PATCHFILES+=                   ${DESTDIR_PATCH}
-SITES.${DESTDIR_PATCH}=                https://schmonz.com/qmail/destdir/
-
 QMAILPATCHES+=                 maildiruniq:${MAILDIRUNIQ_PATCH}
 MAILDIRUNIQ_PATCH=             qmail-1.03-maildir-uniq.patch
 PATCHFILES+=                   ${MAILDIRUNIQ_PATCH}
@@ -177,13 +158,8 @@ OUTGOINGIP_PATCH=          outgoingip.patch
 PATCHFILES+=                   ${OUTGOINGIP_PATCH}
 SITES.${OUTGOINGIP_PATCH}=     http://qmailorg.schmonz.com/
 
-QMAILPATCHES+=                 qbiffutmpx:${QBIFFUTMPX_PATCH}
-QBIFFUTMPX_PATCH=              netqmail-1.06-qbiffutmpx-20170820.patch
-PATCHFILES+=                   ${QBIFFUTMPX_PATCH}
-SITES.${QBIFFUTMPX_PATCH}=     https://schmonz.com/qmail/qbiffutmpx/
-
 QMAILPATCHES+=                 remote:${REMOTE_PATCH}
-REMOTE_PATCH=                  netqmail-1.06-qmailremote-20170716.patch
+REMOTE_PATCH=                  notqmail-1.07-tls-20190517-qmailremote-20190819.patch
 PATCHFILES+=                   ${REMOTE_PATCH}
 SITES.${REMOTE_PATCH}=         https://schmonz.com/qmail/remote/
 
@@ -203,18 +179,30 @@ post-extract:
        for i in ${READMES}; do                                         \
                ${CP} ${FILESDIR}/$$i ${WRKSRC} || ${TRUE};             \
        done
-       mkdir ${WRKSRC}/doc &&                                          \
-       for i in INSTALL SENDMAIL; do                                   \
-               ${MV} ${WRKSRC}/$$i ${WRKSRC}/doc/$$i;                  \
+       ${CP} ${FILESDIR}/config-fast-pkgsrc-defaults.sh ${WRKSRC}
+       for i in FILES; do                                              \
+               ${TOUCH} ${WRKSRC}/$$i;                                 \
        done
 
+USE_TOOLS+=                    sleep
 post-build:
-       cd ${WRKSRC}; \
-       ${SED} -e 's|${QMAILDIR}/control/|${PKG_SYSCONFDIR}/.pkgsrc-defaults-do-not-edit/|' < config-fast > config-fast-pkgsrc
+.if defined(MANZ)
+       cd ${WRKSRC} && \
+       ${SLEEP} 2 && \
+       ${SED} -e 's|\(.*"man/man[0-9]",".*\.[0-9]\)|\1.gz|g' \
+               < hier.c > hier.c.tmp && \
+               ${MV} hier.c.tmp hier.c && \
+       ${MAKE} instchown instcheck
+.endif
+       cd ${WRKSRC} && \
+       ${SED} -e 's|${QMAILDIR}/control/|${PKG_SYSCONFDIR}/.pkgsrc-defaults-do-not-edit/|' \
+               < config-fast > config-fast-pkgsrc && \
+       ${CAT} ${WRKSRC}/config-fast-pkgsrc-defaults.sh \
+               >> config-fast-pkgsrc
 
 pre-install:
        ${MKDIR} ${DESTDIR}${QMAILDIR}
-       ${MKDIR} ${DESTDIR}${QMAIL_QUEUE_DIR}
+       ${MKDIR} ${DESTDIR}/tmp${QMAIL_QUEUE_DIR}
        # keep in sync with INSTALL:PRE-INSTALL
        ${LN} -s ${DESTDIR}${EGDIR}/alias       ${DESTDIR}${QMAILDIR}/alias
        ${LN} -s ${DESTDIR}${PREFIX}/bin        ${DESTDIR}${QMAILDIR}/bin
@@ -222,16 +210,18 @@ pre-install:
        ${LN} -s ${DESTDIR}${EGDIR}/control     ${DESTDIR}${QMAILDIR}/control
        ${LN} -s ${DESTDIR}${DOCDIR}            ${DESTDIR}${QMAILDIR}/doc
        ${LN} -s ${DESTDIR}${PREFIX}/${PKGMANDIR} ${DESTDIR}${QMAILDIR}/man
-       ${LN} -s ${DESTDIR}${QMAIL_QUEUE_DIR}   ${DESTDIR}${QMAILDIR}/queue
+       ${LN} -s ${DESTDIR}/tmp${QMAIL_QUEUE_DIR} ${DESTDIR}${QMAILDIR}/queue
        ${LN} -s ${DESTDIR}${EGDIR}/users       ${DESTDIR}${QMAILDIR}/users
 
+do-install:
+       cd ${WRKSRC}; \
+       DESTDIR=${DESTDIR:Q} ./instpackage
+
 post-install:
        for i in ${READMES}; do                                         \
                ${INSTALL_DATA} ${WRKSRC}/$$i ${DESTDIR}${DOCDIR};      \
        done
 
-       cd ${WRKSRC} && ${MAKE} instcheck install-destdir
-
        ${INSTALL_PROGRAM_DIR} ${DESTDIR}${SHAREDIR}/setup
        for i in ${SETUP_PROGRAMS}; do                                  \
                ${INSTALL_PROGRAM} ${WRKSRC}/$$i                        \

Index: pkgsrc/mail/qmail/PLIST
diff -u pkgsrc/mail/qmail/PLIST:1.21 pkgsrc/mail/qmail/PLIST:1.22
--- pkgsrc/mail/qmail/PLIST:1.21        Wed Nov 14 16:43:17 2018
+++ pkgsrc/mail/qmail/PLIST     Tue Aug 20 02:38:04 2019
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.21 2018/11/14 16:43:17 schmonz Exp $
+@comment $NetBSD: PLIST,v 1.22 2019/08/20 02:38:04 schmonz Exp $
 bin/bouncesaying
 bin/condredirect
 bin/datemail
@@ -96,12 +96,12 @@ man/man8/qmail-tcpok.8
 man/man8/qmail-tcpto.8
 man/man8/splogger.8
 share/doc/qmail/FAQ
-share/doc/qmail/INSTALL
 share/doc/qmail/INSTALL.alias
 share/doc/qmail/INSTALL.ctl
 share/doc/qmail/INSTALL.ids
 share/doc/qmail/INSTALL.maildir
 share/doc/qmail/INSTALL.mbox
+share/doc/qmail/INSTALL.md
 share/doc/qmail/INSTALL.vsm
 share/doc/qmail/PIC.local2alias
 share/doc/qmail/PIC.local2ext
@@ -114,9 +114,10 @@ share/doc/qmail/PIC.relaygood
 share/doc/qmail/PIC.rem2local
 share/doc/qmail/README.pkgsrc
 ${PLIST.srs}share/doc/qmail/README.srs
+${PLIST.tls}share/doc/qmail/README.tls
 share/doc/qmail/REMOVE.binmail
 share/doc/qmail/REMOVE.sendmail
-share/doc/qmail/SENDMAIL
+share/doc/qmail/SENDMAIL.md
 share/doc/qmail/TEST.deliver
 share/doc/qmail/TEST.receive
 share/doc/qmail/UPGRADE
@@ -137,6 +138,7 @@ share/qmail/setup/dnsfq
 share/qmail/setup/dnsip
 share/qmail/setup/dnsptr
 share/qmail/setup/hostname
-share/qmail/setup/install-destdir
 share/qmail/setup/instcheck
+share/qmail/setup/instchown
+share/qmail/setup/instpackage
 share/qmail/setup/ipmeprint

Index: pkgsrc/mail/qmail/distinfo
diff -u pkgsrc/mail/qmail/distinfo:1.44 pkgsrc/mail/qmail/distinfo:1.45
--- pkgsrc/mail/qmail/distinfo:1.44     Wed Apr 10 22:24:57 2019
+++ pkgsrc/mail/qmail/distinfo  Tue Aug 20 02:38:04 2019
@@ -1,33 +1,29 @@
-$NetBSD: distinfo,v 1.44 2019/04/10 22:24:57 schmonz Exp $
+$NetBSD: distinfo,v 1.45 2019/08/20 02:38:04 schmonz Exp $
 
 SHA1 (netqmail-1.05-TAI-leapsecs.patch) = 2c21cd7e20b241c1a82b79379f2c7ee3da5519f7
 RMD160 (netqmail-1.05-TAI-leapsecs.patch) = 9fd59001be5a07d914c66127236ebe8c33f64675
 SHA512 (netqmail-1.05-TAI-leapsecs.patch) = 2278139b825330a418171ad6dd4667410819591d3828f8b40dda789e1aafe1cefcc638fdc6d9de21a8c0ca6caffb41fbbb44bab2dd80f570e81c6e900c8596f7
 Size (netqmail-1.05-TAI-leapsecs.patch) = 16382 bytes
-SHA1 (netqmail-1.06-destdir-20181217.patch) = b309f99d29af95358301ae6dde6b32c8db6c371a
-RMD160 (netqmail-1.06-destdir-20181217.patch) = e42312b05c6f5dbb6614bfffb17991e25a4518d0
-SHA512 (netqmail-1.06-destdir-20181217.patch) = 1cb02193f69930569c4c340c427d8e0002d1fb67b622ee8fd0fcbb273b5deca356fa2e0b11d44a2473cf2c083fc09d43bb3dfb70f22d284f262f2c2d6cf4221e
-Size (netqmail-1.06-destdir-20181217.patch) = 12726 bytes
-SHA1 (netqmail-1.06-qbiffutmpx-20170820.patch) = ebc33f028b12ef808d7dcaa05824cca06f7d27d4
-RMD160 (netqmail-1.06-qbiffutmpx-20170820.patch) = dd2d26902f5e12f6c318ad73cc01b1af07c855a3
-SHA512 (netqmail-1.06-qbiffutmpx-20170820.patch) = c2abcf345d242a42a72583fa85efc8fef37dd3f952407f5e6d3d46632c558ffb6909c60851abf23f113e712f902f7d82934cb07f79a75f511d6df48361a0972c
-Size (netqmail-1.06-qbiffutmpx-20170820.patch) = 3120 bytes
-SHA1 (netqmail-1.06-qmailremote-20170716.patch) = cf7fa5aaf74a5b7d48b2cf0e5f46f7c124de83c7
-RMD160 (netqmail-1.06-qmailremote-20170716.patch) = c26d7f8510cab92bcf5d5fbb861ec62ff593196a
-SHA512 (netqmail-1.06-qmailremote-20170716.patch) = de77c1b01ab88199b3f096e64a733dd86867001dfbcea1cf0d6b20e99d448638e0294440ef48fabc309355440834a8747b4c476cf47b89e6ddb3b7250008dd8e
-Size (netqmail-1.06-qmailremote-20170716.patch) = 1668 bytes
 SHA1 (netqmail-1.06-tls-20160918-onlyremote-20181107-spp-20181109-smtputf8-20181109.patch) = c2c89aed0bc2059a8a6686bd0ec094fe08b63600
 RMD160 (netqmail-1.06-tls-20160918-onlyremote-20181107-spp-20181109-smtputf8-20181109.patch) = 1ad6791996f8741917e2b2980c7e5f6a9449e00f
 SHA512 (netqmail-1.06-tls-20160918-onlyremote-20181107-spp-20181109-smtputf8-20181109.patch) = 
a02cad7ef0f57a9eee8a12444a30df4d112ba256fa581124d7f0fb78acee4da53d0211d98de5822f058518d6a872e01e737f28e437b8ed5f8fa392ae8808468b
 Size (netqmail-1.06-tls-20160918-onlyremote-20181107-spp-20181109-smtputf8-20181109.patch) = 6962 bytes
-SHA1 (netqmail-1.06-tls-20190408-onlyremote-20190408.patch) = e8f57536ef0d65f03b6494fc0ced023cfadb5661
-RMD160 (netqmail-1.06-tls-20190408-onlyremote-20190408.patch) = c6b013a6474f278ee111075112b0361c5f4b1305
-SHA512 (netqmail-1.06-tls-20190408-onlyremote-20190408.patch) = dcf0df01637c42780eb0a454b1cf25eeb516c693e8d11aef498c59cee44e69317d6c84013196352a8435a094343331b3231b2d8437c8309b5599a625459e4990
-Size (netqmail-1.06-tls-20190408-onlyremote-20190408.patch) = 27028 bytes
-SHA1 (netqmail-1.06.tar.gz) = 9ee9a603e2ad3d8e1d34b900e19b7a5d275f538b
-RMD160 (netqmail-1.06.tar.gz) = d31598afa862abb35bc1feb8d038ab619b5a17a2
-SHA512 (netqmail-1.06.tar.gz) = de40a6d8fac502bd785010434d99b99f2c0524e10aea3d0f2a0d35c70fce91e991eb1fb8f20a1276eb56d7e73130ea5e2c178f6075d138af47b28d9ca6e6046b
-Size (netqmail-1.06.tar.gz) = 260941 bytes
+SHA1 (notqmail-1.07-tls-20190517-onlyremote-20190819.patch) = 9392e0833458c933db2668c3f19f26c0b05bdec4
+RMD160 (notqmail-1.07-tls-20190517-onlyremote-20190819.patch) = 49f3f36fb03a89e8afab450597f697c1f9210477
+SHA512 (notqmail-1.07-tls-20190517-onlyremote-20190819.patch) = f3064c3f6ce40da0e99624ee59df99c8211016ae161a8cf5170d19a7fe3300d1a3d7c675d67ec1989c5421b9c10a131266c12d3eb8af02329eb677d3f46709f9
+Size (notqmail-1.07-tls-20190517-onlyremote-20190819.patch) = 26547 bytes
+SHA1 (notqmail-1.07-tls-20190517-qmailremote-20190819-srs-20190819.patch) = 8aaabb5ab8e7737055dae47c1a83ec8ff7741c20
+RMD160 (notqmail-1.07-tls-20190517-qmailremote-20190819-srs-20190819.patch) = a3682ab33bb0e746ae214dbac91e0c8f92c780e2
+SHA512 (notqmail-1.07-tls-20190517-qmailremote-20190819-srs-20190819.patch) = 
8b9894d743f6ea7ceb72d34fedaa8afeb61afdfb5b6d929b5c76eb31da27232cb6f952a26b3733c244bfd430750d250bdc0fa92464c6a64f017abd97c84e8c77
+Size (notqmail-1.07-tls-20190517-qmailremote-20190819-srs-20190819.patch) = 24175 bytes
+SHA1 (notqmail-1.07-tls-20190517-qmailremote-20190819.patch) = 2aa984625c439069a9c252186f989a51f48449ad
+RMD160 (notqmail-1.07-tls-20190517-qmailremote-20190819.patch) = 95622f1895c2909bc3a3c5f609bd1f116437f65a
+SHA512 (notqmail-1.07-tls-20190517-qmailremote-20190819.patch) = cf4f7dda23f90ffff26b3cb0ff4c5d7037ca70a43370e4bd9edd703a67ae0aa125bd5fe54aa97aea6b82054ac6819cc469a091e4cc7b39a48f61409420cfd516
+Size (notqmail-1.07-tls-20190517-qmailremote-20190819.patch) = 1643 bytes
+SHA1 (notqmail-1.07.tar.gz) = 7aebb1e4cebcdb248bd907f1a7949c5f0030665b
+RMD160 (notqmail-1.07.tar.gz) = 2f8b610a8ffb0829af071a91515626c83f58126c
+SHA512 (notqmail-1.07.tar.gz) = 586d1ebeba881ebbd5234c957e1bf599d0854eea9dea13f387790b3de3188d49ec1654590862c613894c588b7b0a140345e0d9849da2f4cd974963a485124f49
+Size (notqmail-1.07.tar.gz) = 227458 bytes
 SHA1 (outgoingip.patch) = c37b50facc72f82cad6505d2db88d5eccc5418b2
 RMD160 (outgoingip.patch) = 032c653d395e5f599c0998e92debb09d84f90f0f
 SHA512 (outgoingip.patch) = 876eba3e65eba02f62838e5324cf64985254805ac5ec9417b168caa8c8d150a5185885d49a92d968690438289963bd6569e3de3330daf71a248206cd94227cd2
@@ -48,9 +44,4 @@ SHA1 (qmail-spp-0.42.tar.gz) = 76a94051b
 RMD160 (qmail-spp-0.42.tar.gz) = 5511722c52346692488a63bca53106d580a004c7
 SHA512 (qmail-spp-0.42.tar.gz) = 03449862886a0ca20fbadab4c94b34b55d185f8df3261bd68aea99e9ded9edfab4477c6b38a8e0295e9b38b0045615da8b1a906a458f28745eadd3c4d882bcbf
 Size (qmail-spp-0.42.tar.gz) = 18689 bytes
-SHA1 (qmail-srs-0.8.patch) = 44d6075fe22d698b21a9045b0cce7f607bc86eee
-RMD160 (qmail-srs-0.8.patch) = cf86dc7874dc116b31bf933f18615c75cfc4c0c4
-SHA512 (qmail-srs-0.8.patch) = a2a6c26a02d1c607f4ed4f73d6c8b57ed6a6c31126f20b073e9cd2258ca43c0da98a67de254df30e07e3887c90239cba0ccf3f45d535f4c66017217da1732f9b
-Size (qmail-srs-0.8.patch) = 25412 bytes
 SHA1 (patch-Makefile) = ee82c0d6e64aaf617e3b2e69c577b6c4c23f62ca
-SHA1 (patch-strerr_sys.c) = 15e6466c655058664cb660e5e12232bf45010814

Index: pkgsrc/mail/qmail/options.mk
diff -u pkgsrc/mail/qmail/options.mk:1.65 pkgsrc/mail/qmail/options.mk:1.66
--- pkgsrc/mail/qmail/options.mk:1.65   Fri Jun 28 19:18:25 2019
+++ pkgsrc/mail/qmail/options.mk        Tue Aug 20 02:38:04 2019
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.65 2019/06/28 19:18:25 schmonz Exp $
+# $NetBSD: options.mk,v 1.66 2019/08/20 02:38:04 schmonz Exp $
 
 PKG_OPTIONS_VAR=               PKG_OPTIONS.qmail
 PKG_SUPPORTED_OPTIONS+=                eai inet6 pam syncdir tai-system-clock tls
@@ -29,6 +29,7 @@ CUSTOMERROR_PATCH=            qmail-queue-custom-e
 PATCHFILES+=                   ${CUSTOMERROR_PATCH}
 SITES.${CUSTOMERROR_PATCH}=    https://notes.sagredo.eu/files/qmail/patches/
 PATCH_DIST_STRIP.${CUSTOMERROR_PATCH}=-p1
+PATCH_DIST_CAT.${CUSTOMERROR_PATCH}=   ${SED} -e 's|vfork|fork|g' < ${CUSTOMERROR_PATCH}
 .endif
 
 PLIST_VARS+=                   srs
@@ -36,20 +37,9 @@ PLIST_VARS+=                 srs
 PLIST.srs=                     yes
 .  include "../../mail/libsrs2/buildlink3.mk"
 QMAILPATCHES+=                 srs:${SRS_PATCH}
-SRS_PATCH=                     qmail-srs-0.8.patch
+SRS_PATCH=                     notqmail-1.07-tls-20190517-qmailremote-20190819-srs-20190819.patch
 PATCHFILES+=                   ${SRS_PATCH}
-SITES.${SRS_PATCH}=            http://www.mco2.com.br/opensource/download/qmail/
-PATCH_DIST_STRIP.${SRS_PATCH}= -l
-PATCH_DIST_CAT.${SRS_PATCH}=   ${SED} -e 's|binm3 binm3+df|binm3 binm3+df update_tmprsadh|g' < ${SRS_PATCH}
-SUBST_CLASSES+=                        srsnetq1 srsnetq2
-SUBST_STAGE.srsnetq1=          pre-patch
-SUBST_STAGE.srsnetq2=          pre-configure
-SUBST_FILES.srsnetq1=          Makefile
-SUBST_FILES.srsnetq2=          Makefile
-SUBST_SED.srsnetq1=            -e 's|^auto_split.o env.a$$|auto_split.o|'
-SUBST_SED.srsnetq2=            -e 's|^auto_split.o$$|auto_split.o env.a|'
-SUBST_SED.srsnetq1+=           -e 's|^ substdio.a error.a str.a fs.a auto_qmail.o auto_split.o env.a$$|        substdio.a error.a str.a fs.a auto_qmail.o auto_split.o|'
-SUBST_SED.srsnetq2+=           -e 's|^ substdio.a error.a str.a fs.a auto_qmail.o auto_split.o \\$$|   substdio.a error.a str.a fs.a auto_qmail.o auto_split.o env.a \\|'
+SITES.${SRS_PATCH}=            https://schmonz.com/qmail/srs/
 SUBST_CLASSES+=                        srsinclude
 SUBST_STAGE.srsinclude=                do-configure
 SUBST_FILES.srsinclude=                srs.c
@@ -58,7 +48,6 @@ SUBST_CLASSES+=                       srsreadme
 SUBST_STAGE.srsreadme=         do-configure
 SUBST_FILES.srsreadme=         README.srs
 SUBST_VARS.srsreadme=          PKG_SYSCONFDIR
-MESSAGE_SRC+=                  ${PKGDIR}/MESSAGE.srs
 READMES+=                      README.srs
 .endif
 
@@ -103,19 +92,18 @@ SUBST_STAGE.tmprsadh=              do-configure
 SUBST_FILES.tmprsadh=          update_tmprsadh.sh
 SUBST_SED.tmprsadh=            -e 's|^export PATH=.*||'
 SUBST_SED.tmprsadh+=           -e 's|^openssl |${OPENSSL} |'
-MESSAGE_SRC+=                  ${PKGDIR}/MESSAGE.tls
-MESSAGE_SUBST+=                        OPENSSL=${OPENSSL:Q}
-MESSAGE_SUBST+=                        SERVERCERT=${PKG_SYSCONFDIR:Q}/control/servercert.pem
-MESSAGE_SUBST+=                        CLIENTCERT=${PKG_SYSCONFDIR:Q}/control/clientcert.pem
-MESSAGE_SUBST+=                        QMAIL_DAEMON_USER=${QMAIL_DAEMON_USER:Q}
-MESSAGE_SUBST+=                        QMAIL_QMAIL_GROUP=${QMAIL_QMAIL_GROUP:Q}
-DEPENDS+=                      ucspi-ssl-[0-9]*:../../net/ucspi-ssl
+READMES+=                      README.tls
+SUBST_VARS.paths+=             OPENSSL QMAIL_DAEMON_USER QMAIL_QMAIL_GROUP
+SUBST_VARS.paths+=             OPENSSL SERVERCERT CLIENTCERT
+SUBST_SED.paths+=              -e 's|@SERVERCERT@|${PKG_SYSCONFDIR:Q}/control/servercert.pem|g'
+SUBST_SED.paths+=              -e 's|@CLIENTCERT@|${PKG_SYSCONFDIR:Q}/control/clientcert.pem|g'
+DEPENDS+=                      ucspi-ssl>=0.999.10.11nb2:../../net/ucspi-ssl
 .else
 BUILDLINK_TRANSFORM+=          rm:-lssl
 BUILDLINK_TRANSFORM+=          rm:-lcrypto
 .  if !empty(PKG_OPTIONS:Minet6)
-DEPENDS+=                      ucspi-tcp6-[0-9]*:../../net/ucspi-tcp6
+DEPENDS+=                      ucspi-tcp6>=1.10.7nb1:../../net/ucspi-tcp6
 .  else
-DEPENDS+=                      {ucspi-tcp6-[0-9]*,ucspi-tcp-[0-9]*}:../../net/ucspi-tcp
+DEPENDS+=                      {ucspi-tcp6>=1.10.7nb1,ucspi-tcp-[0-9]*}:../../net/ucspi-tcp
 .  endif
 .endif

Added files:

Index: pkgsrc/mail/qmail/files/README.tls
diff -u /dev/null pkgsrc/mail/qmail/files/README.tls:1.1
--- /dev/null   Tue Aug 20 02:38:05 2019
+++ pkgsrc/mail/qmail/files/README.tls  Tue Aug 20 02:38:04 2019
@@ -0,0 +1,26 @@
+ Configuring TLS
+ ===============
+
+You've applied a Transport Layer Security patch to your qmail installation.
+It is documented more fully by its author here:
+
+<URL:https://schmonz.com/qmail/tlsonlyremote/>
+
+
+For qmail to opportunistically encrypt outgoing mail, obtain a
+certificate (e.g., from Let's Encrypt) and make it available as
+@SERVERCERT@.
+
+# chmod 640 @SERVERCERT@
+# chown @QMAIL_DAEMON_USER@:@QMAIL_QMAIL_GROUP@ @SERVERCERT@
+# ln -s @SERVERCERT@ @CLIENTCERT@
+# update_tmprsadh
+
+Once you have a certificate, regularly regenerate DH params from cron(8):
+
+    01 01 * * * @PREFIX@/bin/update_tmprsadh > /dev/null 2>&1
+
+
+For qmail to opportunistically encrypt incoming mail, and to require
+encryption before authentication for submitted messages, install the
+qmail-run package and use its qmailsmtpd and qmailofmipd rc.d scripts.
Index: pkgsrc/mail/qmail/files/config-fast-pkgsrc-defaults.sh
diff -u /dev/null pkgsrc/mail/qmail/files/config-fast-pkgsrc-defaults.sh:1.1
--- /dev/null   Tue Aug 20 02:38:05 2019
+++ pkgsrc/mail/qmail/files/config-fast-pkgsrc-defaults.sh      Tue Aug 20 02:38:04 2019
@@ -0,0 +1,27 @@
+# $NetBSD: config-fast-pkgsrc-defaults.sh,v 1.1 2019/08/20 02:38:04 schmonz Exp $
+
+SORT=@SORT@
+MV=@MV@
+CP=@CP@
+
+PKG_SYSCONFDIR=@PKG_SYSCONFDIR@
+QMAIL_QUEUE_EXTRA=@QMAIL_QUEUE_EXTRA@
+
+cd ${PKG_SYSCONFDIR}/.pkgsrc-defaults-do-not-edit
+for i in locals rcpthosts; do
+       ${SORT} -u ${i} > ${i}.tmp && ${MV} ${i}.tmp ${i}
+done
+
+cd ${PKG_SYSCONFDIR}
+for i in defaultdomain locals me plusdomain rcpthosts; do
+       [ -f control/${i} ] \
+               || ${CP} .pkgsrc-defaults-do-not-edit/${i} control
+done
+
+cd ${PKG_SYSCONFDIR}/alias
+for i in mailer-daemon postmaster root ${QMAIL_QUEUE_EXTRA}; do
+       [ -s .qmail-${i} ] \
+               || echo '# pkgsrc says: replace this comment with your config' \
+               > .qmail-${i}
+       chmod 644 .qmail-${i}
+done



Home | Main Index | Thread Index | Old Index