diff options
author | schmonz <schmonz@pkgsrc.org> | 2014-05-30 21:35:04 +0000 |
---|---|---|
committer | schmonz <schmonz@pkgsrc.org> | 2014-05-30 21:35:04 +0000 |
commit | 4a5da2a935eda27d53839a3813bdec2ea2ad25a3 (patch) | |
tree | f5f11f0da6ba66936493cc2fc5686d4e48d7ec7b /mail | |
parent | c9401a09897c653e876288903984105591e08399 (diff) | |
download | pkgsrc-4a5da2a935eda27d53839a3813bdec2ea2ad25a3.tar.gz |
Improve binary package:
* Reduce potential patch conflicts by switching more DESTDIR support to sed
* Enable `qmail-netqmail` by default
* Install `qmail-viruscan` signatures via CONF_FILES
* With `tls` option, don't generate cert, instruct the user at INSTALL time
That last change also fixes the source build with `tls` enabled on
systems that don't already have a /var/qmail/control, as reported
by Thomas Lazar on pkgsrc-users@.
While here, add a comment with the new location of the qregex patch.
Since it's named strangely, I've also placed a traditionally-named
copy on ftp.n.o.
Bump PKGREVISION.
Diffstat (limited to 'mail')
-rw-r--r-- | mail/qmail/INSTALL | 27 | ||||
-rw-r--r-- | mail/qmail/Makefile | 16 | ||||
-rw-r--r-- | mail/qmail/PLIST | 3 | ||||
-rw-r--r-- | mail/qmail/distinfo | 4 | ||||
-rw-r--r-- | mail/qmail/options.mk | 32 | ||||
-rw-r--r-- | mail/qmail/patches/patch-Makefile | 46 |
6 files changed, 66 insertions, 62 deletions
diff --git a/mail/qmail/INSTALL b/mail/qmail/INSTALL index 80dadac1ef9..89b4a5dcd66 100644 --- a/mail/qmail/INSTALL +++ b/mail/qmail/INSTALL @@ -1,12 +1,12 @@ -# $NetBSD: INSTALL,v 1.5 2011/06/07 02:53:42 schmonz Exp $ +# $NetBSD: INSTALL,v 1.6 2014/05/30 21:35:04 schmonz Exp $ DOCDIR=@DOCDIR@ EGDIR=@EGDIR@ +OPENSSL=@OPENSSL@ PKGMANDIR=@PKGMANDIR@ QMAILDIR=@QMAILDIR@ QMAIL_QUEUE_DIR=@QMAIL_QUEUE_DIR@ QMAIL_QUEUE_EXTRA=@QMAIL_QUEUE_EXTRA@ -VIRUSCAN_SIGS_SRCFILE=@VIRUSCAN_SIGS_SRCFILE@ VAR_QMAIL_DIRS="alias bin boot control doc man queue users" @@ -65,14 +65,23 @@ QUEUE_EXTRA. =========================================================================== EOF fi - if ! [ -z ${VIRUSCAN_SIGS_SRCFILE} ] && \ - ! [ -s ${PKG_SYSCONFDIR}/control/signatures ]; then - ${SED} -e '1,15d' -e '34,$d' \ - < ${VIRUSCAN_SIGS_SRCFILE} \ - > ${PKG_SYSCONFDIR}/control/signatures - ${CHMOD} 644 ${PKG_SYSCONFDIR}/control/signatures - fi + SERVERCERT=${PKG_SYSCONFDIR}/control/servercert.pem + if ! [ -z ${OPENSSL} ] && ! [ -s ${SERVERCERT} ]; then + ${CAT} <<EOF +=========================================================================== + +NOTE: If you don't already have an SSL certificate for qmail: + +# ${OPENSSL} req -new -x509 -nodes -days 366 -out ${SERVERCERT} -keyout ${SERVERCERT} +# chmod 640 ${SERVERCERT} +# chown qmaild:qmail ${SERVERCERT} +# ln -s ${SERVERCERT} ${PKG_SYSCONFDIR}/control/clientcert.pem +# update_tmprsadh + +=========================================================================== +EOF + fi ;; diff --git a/mail/qmail/Makefile b/mail/qmail/Makefile index d0545d53781..1266805ccb4 100644 --- a/mail/qmail/Makefile +++ b/mail/qmail/Makefile @@ -1,9 +1,9 @@ -# $NetBSD: Makefile,v 1.68 2014/04/16 04:57:23 schmonz Exp $ +# $NetBSD: Makefile,v 1.69 2014/05/30 21:35:04 schmonz Exp $ # DISTNAME= ${PKGNAME_NOREV} PKGNAME= qmail-1.03 -PKGREVISION= 18 +PKGREVISION= 19 CATEGORIES= mail MASTER_SITES= http://qmail.org/ @@ -46,11 +46,11 @@ SHAREDIR= ${PREFIX}/share/qmail PLIST_SUBST+= DARWINSUFX=${DARWINSUFX:Q} MESSAGE_SUBST+= DOCDIR=${DOCDIR:Q} EGDIR=${EGDIR:Q} FILES_SUBST+= DOCDIR=${DOCDIR:Q} EGDIR=${EGDIR:Q} +FILES_SUBST+= OPENSSL=${OPENSSL:Q} FILES_SUBST+= PKGMANDIR=${PKGMANDIR:Q} SHAREDIR=${SHAREDIR:Q} FILES_SUBST+= QMAILDIR=${QMAILDIR:Q} FILES_SUBST+= QMAIL_QUEUE_DIR=${QMAIL_QUEUE_DIR:Q} FILES_SUBST+= QMAIL_QUEUE_EXTRA=${QMAIL_QUEUE_EXTRA:Q} -FILES_SUBST+= VIRUSCAN_SIGS_SRCFILE=${VIRUSCAN_SIGS_SRCFILE:Q} FILES_SUBST+= PKGNAME=${PKGNAME:Q} SETUP_PROGRAMS= dnsfq dnsip dnsptr hostname install ipmeprint @@ -96,6 +96,12 @@ 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 +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+= paths SUBST_STAGE.paths= do-configure SUBST_FILES.paths= README.pkgsrc @@ -123,7 +129,7 @@ DARWINSUFX= .doc DARWINSUFX= # empty .endif -post-extract: +post-extract: post-extract-viruscan ${CP} ${FILESDIR}/README.pkgsrc ${WRKSRC} .if ${OPSYS} == "Darwin" . for i in INSTALL SENDMAIL @@ -146,7 +152,7 @@ pre-install: ${LN} -s ${DESTDIR}${EGDIR}/users ${DESTDIR}${QMAILDIR}/users . endif -post-install: +post-install: post-install-viruscan # qmail's installer sets strange permissions, set them back . if (${PKG_INSTALLATION_TYPE} == "overwrite") . for i in bin boot diff --git a/mail/qmail/PLIST b/mail/qmail/PLIST index 741c041b27d..29613455da1 100644 --- a/mail/qmail/PLIST +++ b/mail/qmail/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.15 2012/03/12 03:53:55 sbd Exp $ +@comment $NetBSD: PLIST,v 1.16 2014/05/30 21:35:04 schmonz Exp $ bin/bouncesaying bin/condredirect bin/datemail @@ -129,6 +129,7 @@ share/examples/qmail/boot/home share/examples/qmail/boot/home+df share/examples/qmail/boot/proc share/examples/qmail/boot/proc+df +${PLIST.viruscan}share/examples/qmail/control/signatures share/qmail/setup/config share/qmail/setup/config-fast share/qmail/setup/dnsfq diff --git a/mail/qmail/distinfo b/mail/qmail/distinfo index 40a21915c5d..ba66816f31d 100644 --- a/mail/qmail/distinfo +++ b/mail/qmail/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.24 2014/04/16 04:57:23 schmonz Exp $ +$NetBSD: distinfo,v 1.25 2014/05/30 21:35:04 schmonz Exp $ SHA1 (qmail-1.03.tar.gz) = 18fb960481291a0503e93a94df3f6094edb7f27a RMD160 (qmail-1.03.tar.gz) = b851f273f1d365d38efd949b1efcf35768ffa30f @@ -30,6 +30,6 @@ Size (qmail-smtpd-viruscan-1.3.patch) = 8891 bytes SHA1 (qmail-smtpd-viruscan-logging.patch) = ca7105b5561cf280e9e3a465d2d68a16673ff56c RMD160 (qmail-smtpd-viruscan-logging.patch) = 79631cb7b5b120f98397011c4fb94726c48b83e4 Size (qmail-smtpd-viruscan-logging.patch) = 2157 bytes -SHA1 (patch-Makefile) = 2c8c50889cbc7da8c51bf6d44c0b31f5f0853896 +SHA1 (patch-Makefile) = 66519495fcb2c051ef6a74b49498c565d89044d4 SHA1 (patch-spawn.c) = aad06c4ed3ad4bd0e500ab561d7f7307c19e3283 SHA1 (patch-strerr_sys.c) = 15e6466c655058664cb660e5e12232bf45010814 diff --git a/mail/qmail/options.mk b/mail/qmail/options.mk index e8571c872ab..086b5efcfce 100644 --- a/mail/qmail/options.mk +++ b/mail/qmail/options.mk @@ -1,10 +1,11 @@ -# $NetBSD: options.mk,v 1.33 2014/04/16 04:57:23 schmonz Exp $ +# $NetBSD: options.mk,v 1.34 2014/05/30 21:35:04 schmonz Exp $ PKG_OPTIONS_VAR= PKG_OPTIONS.qmail PKG_OPTIONS_OPTIONAL_GROUPS= rcpt PKG_OPTIONS_GROUP.rcpt= qmail-badrcptto qmail-qregex qmail-realrcptto PKG_SUPPORTED_OPTIONS+= sasl syncdir tls qmail-bigdns qmail-netqmail PKG_SUPPORTED_OPTIONS+= qmail-outgoingip qmail-viruscan +PKG_SUGGESTED_OPTIONS+= qmail-netqmail .include "../../mk/bsd.options.mk" @@ -37,6 +38,7 @@ PLIST_VARS+= qregex QREGEX_PATCH= qregex-20060423.patch PATCHFILES+= ${QREGEX_PATCH} SITES.${QREGEX_PATCH}= http://www.arda.homeunix.net/store/qmail/ +# actually http://www.arda.homeunix.net/?ddownload=409 PATCH_DIST_STRIP.${QREGEX_PATCH}= -p3 PLIST.qregex= yes .endif @@ -58,9 +60,13 @@ TLSSASL_PATCH= netqmail-1.05-tls-smtpauth-20070417.patch PATCHFILES+= ${TLSSASL_PATCH} SITES.${TLSSASL_PATCH}= https://raw.githubusercontent.com/shupp/legacy-qmail-related/master/patches/ . if !empty(PKG_OPTIONS:Mtls) -CFLAGS+= -DTLS=20070408 # NOTE: update according to the patch -DJB_INSTALL_TARGETS= cert tmprsadh -USE_TOOLS+= gmake +CFLAGS+= -DTLS=20070408 # NOTE: match what's _in_ the patch +USE_TOOLS+= openssl +SUBST_CLASSES+= tmprsadh +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} |' PLIST.tls= yes . endif .endif @@ -77,6 +83,7 @@ SUBST_SED.load+= -e '$$s|$$| -bind_at_load|' SUBST_MESSAGE.load= Setting linker flags for syncdir. .endif +PLIST_VARS+= viruscan .if !empty(PKG_OPTIONS:Mqmail-viruscan) VIRUSCAN_PATCH= qmail-smtpd-viruscan-1.3.patch VIRUSCAN_LOG_PATCH= qmail-smtpd-viruscan-logging.patch @@ -89,7 +96,20 @@ SUBST_CLASSES+= viruscan SUBST_STAGE.viruscan= do-configure SUBST_FILES.viruscan= qmail-smtpd.c SUBST_SED.viruscan= -e 's|qmail-smtpd: ||g' -VIRUSCAN_SIGS_SRCFILE= ${DISTDIR}/${VIRUSCAN_PATCH} +PLIST.viruscan= yes +post-extract-viruscan: + ${SED} -e '1,15d' -e '34,$$d' \ + < ${DISTDIR}/${VIRUSCAN_PATCH} \ + > ${WRKSRC}/signatures + ${CHMOD} 644 ${WRKSRC}/signatures +post-install-viruscan: + ${INSTALL_DATA} ${WRKSRC}/signatures ${DESTDIR}/${EGDIR}/control +. for i in control/signatures +CONF_FILES+= ${EGDIR}/${i} ${PKG_SYSCONFDIR}/${i} +. endfor .else -VIRUSCAN_SIGS_SRCFILE= # undefined +post-extract-viruscan: + ${DO_NADA} +post-install-viruscan: + ${DO_NADA} .endif diff --git a/mail/qmail/patches/patch-Makefile b/mail/qmail/patches/patch-Makefile index 7b83da9c127..07c835b43b8 100644 --- a/mail/qmail/patches/patch-Makefile +++ b/mail/qmail/patches/patch-Makefile @@ -1,12 +1,12 @@ -$NetBSD: patch-Makefile,v 1.1 2013/08/15 15:43:48 schmonz Exp $ +$NetBSD: patch-Makefile,v 1.2 2014/05/30 21:35:04 schmonz Exp $ DESTDIR support. --- Makefile.orig 1998-06-15 10:53:16.000000000 +0000 +++ Makefile -@@ -78,6 +78,14 @@ auto_break.o: \ - compile auto_break.c - ./compile auto_break.c +@@ -4,6 +4,14 @@ SHELL=/bin/sh + + default: it +auto_destdir.c: \ +auto-str conf-destdir @@ -16,38 +16,6 @@ DESTDIR support. +compile auto_destdir.c + ./compile auto_destdir.c + - auto_patrn.c: \ - auto-int8 conf-patrn - ./auto-int8 auto_patrn `head -1 conf-patrn` > auto_patrn.c -@@ -740,15 +748,15 @@ seek.h fork.h - ./compile idedit.c - - install: \ --load install.o fifo.o hier.o auto_qmail.o auto_split.o auto_uids.o \ -+load install.o fifo.o hier.o auto_destdir.o auto_split.o auto_uids.o \ - strerr.a substdio.a open.a error.a str.a fs.a -- ./load install fifo.o hier.o auto_qmail.o auto_split.o \ -+ ./load install fifo.o hier.o auto_destdir.o auto_split.o \ - auto_uids.o strerr.a substdio.a open.a error.a str.a fs.a - - install-big: \ --load install-big.o fifo.o install.o auto_qmail.o auto_split.o \ -+load install-big.o fifo.o install.o auto_destdir.o auto_split.o \ - auto_uids.o strerr.a substdio.a open.a error.a str.a fs.a -- ./load install-big fifo.o install.o auto_qmail.o \ -+ ./load install-big fifo.o install.o auto_destdir.o \ - auto_split.o auto_uids.o strerr.a substdio.a open.a error.a \ - str.a fs.a - -@@ -763,9 +771,9 @@ exit.h - ./compile install.c - - instcheck: \ --load instcheck.o fifo.o hier.o auto_qmail.o auto_split.o auto_uids.o \ -+load instcheck.o fifo.o hier.o auto_destdir.o auto_split.o auto_uids.o \ - strerr.a substdio.a error.a str.a fs.a -- ./load instcheck fifo.o hier.o auto_qmail.o auto_split.o \ -+ ./load instcheck fifo.o hier.o auto_destdir.o auto_split.o \ - auto_uids.o strerr.a substdio.a error.a str.a fs.a - - instcheck.o: \ + addresses.0: \ + addresses.5 + nroff -man addresses.5 > addresses.0 |