Index: head/mail/dma/Makefile =================================================================== --- head/mail/dma/Makefile (revision 408859) +++ head/mail/dma/Makefile (revision 408860) @@ -1,69 +1,63 @@ # Created by: Daniel Roethlisberger # $FreeBSD$ PORTNAME= dma -PORTVERSION= v0.9 -PORTREVISION= 1 +PORTVERSION= 0.11 +DISTVERSIONPREFIX= v PORTEPOCH= 1 CATEGORIES= mail ipv6 -EXTRACT_SUFX= MAINTAINER= ports@FreeBSD.org COMMENT= DragonFly Mail Agent, a small MTA for local/outbound mail LICENSE= BSD3CLAUSE USE_OPENSSL= yes USE_GITHUB= yes GH_ACCOUNT= corecode -GH_TAGNAME= 2bb8bcb +BUILD_WRKSRC= ${WRKSRC}/bsd +INSTALL_WRKSRC= ${WRKSRC}/bsd CFLAGS+= -I${OPENSSLINC} \ -DCONF_PATH='\"${PREFIX}/etc/dma\"' \ -DDMA_ROOT_USER='\"mailnull\"' \ -DDMA_GROUP='\"mail\"' LDFLAGS+= -L${OPENSSLLIB} -MAKE_ENV= __MAKE_CONF=/dev/null SRCCONF=/dev/null NO_WERROR=defined +MAKE_ENV= __MAKE_CONF=/dev/null SRCCONF=/dev/null NO_WERROR=defined \ + MANDIR=${MANDIRS}/man USE_RC_SUBR= dma_flushq SUB_FILES= pkg-message # Allow subports to extend. CONFFILES+= dma.conf auth.conf .include # 11.x has dma imported into base and /var/spool/dma added to mtree .if ${OSVERSION} < 1100009 PLIST_SUB+= VARDIR="" .else PLIST_SUB+= VARDIR="@comment " .endif -pre-patch: - @${MKDIR} ${WRKSRC}/dma ${WRKSRC}/dma-mbox-create - @${MV} ${WRKSRC}/Makefile ${WRKSRC}/Makefile.dist - post-patch: @${REINPLACE_CMD} -e 's,/etc/dma,${PREFIX}/etc/dma,g' \ ${WRKSRC}/dma.8 @${REINPLACE_CMD} -e 's, /etc/dma, ${PREFIX}/etc/dma,g' \ ${WRKSRC}/dma.conf + @${REINPLACE_CMD} -e '/^MK_MAN/d' -e 's/^NOMAN/NO_MAN/' \ + ${WRKSRC}/bsd/dma-mbox-create/Makefile .if ${OSVERSION} < 1000013 - @${REINPLACE_CMD} -e 's,^YFLAGS.*,,' ${WRKSRC}/dma/Makefile + @${REINPLACE_CMD} -e 's,^YFLAGS.*,,' ${WRKSRC}/bsd/dma/Makefile .endif -do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/dma/dma ${STAGEDIR}/${PREFIX}/libexec - ${INSTALL_PROGRAM} \ - ${WRKSRC}/dma-mbox-create/dma-mbox-create ${STAGEDIR}/${PREFIX}/libexec - ${INSTALL_MAN} ${WRKSRC}/dma.8 ${STAGEDIR}/${PREFIX}/man/man8/ - ${MKDIR} ${STAGEDIR}/${PREFIX}/etc/dma -.for i in ${CONFFILES} - ${INSTALL_DATA} ${WRKSRC}/${i} ${STAGEDIR}/${PREFIX}/etc/dma/${i}.sample -.endfor +post-install: + ${MKDIR} ${STAGEDIR}${ETCDIR} ${MKDIR} ${STAGEDIR}/var/spool/dma + ${INSTALL_DATA} ${WRKSRC}/dma.conf ${STAGEDIR}${ETCDIR}/dma.conf.sample + ${INSTALL_DATA} ${WRKSRC}/auth.conf ${STAGEDIR}${ETCDIR}/auth.conf.sample .include Index: head/mail/dma/distinfo =================================================================== --- head/mail/dma/distinfo (revision 408859) +++ head/mail/dma/distinfo (revision 408860) @@ -1,2 +1,2 @@ -SHA256 (corecode-dma-v0.9-2bb8bcb_GH0) = 4c829de90cfb77ea5471108b724281b87a657e6a92f954436b49e6c25aa9eb12 -SIZE (corecode-dma-v0.9-2bb8bcb_GH0) = 45609 +SHA256 (corecode-dma-v0.11_GH0.tar.gz) = 288bd57f17aba696b6423b1fa0cd0f7d9b7228d32811f1cd7b821d5f020051b8 +SIZE (corecode-dma-v0.11_GH0.tar.gz) = 34529 Index: head/mail/dma/files/patch-alias_scan.l =================================================================== --- head/mail/dma/files/patch-alias_scan.l (revision 408859) +++ head/mail/dma/files/patch-alias_scan.l (nonexistent) @@ -1,15 +0,0 @@ -! -! Work around bug in FreeBSD 8.1 due to missing fix for: -! bin/139319: [patch] flex(1): fix prototypes, esp. when YY_NO_INPUT is defined -! ---- aliases_scan.l.orig 2012-01-03 13:54:05.000000000 +0000 -+++ aliases_scan.l 2012-04-13 18:23:41.000000000 +0000 -@@ -3,8 +3,6 @@ - #include - #include "aliases_parse.h" - --#define YY_NO_INPUT -- - int yylex(void); - %} - Property changes on: head/mail/dma/files/patch-alias_scan.l ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/mail/dma/files/patch-BSDMakefile =================================================================== --- head/mail/dma/files/patch-BSDMakefile (revision 408859) +++ head/mail/dma/files/patch-BSDMakefile (nonexistent) @@ -1,31 +0,0 @@ ---- BSDmakefile.orig 2013-06-03 14:03:15.000000000 +0000 -+++ BSDmakefile 2013-08-22 10:35:28.000000000 +0000 -@@ -1,21 +1,13 @@ - # $DragonFly: src/libexec/dma/Makefile,v 1.5 2008/09/19 00:36:57 corecode Exp $ - # - --version!= sh get-version.sh -+version!= (cd .. && sh get-version.sh) - --CFLAGS+= -I${.CURDIR} -+CFLAGS+= -I${.CURDIR} -I${.CURDIR}/.. - CFLAGS+= -DHAVE_REALLOCF -DHAVE_STRLCPY -DHAVE_GETPROGNAME - CFLAGS+= -DLIBEXEC_PATH='"${LIBEXEC}"' -DDMA_VERSION='"${version}"' - CFLAGS+= -DCONF_PATH='"${CONFDIR}"' - --DPADD= ${LIBSSL} ${LIBCRYPTO} --LDADD= -lssl -lcrypto -- --PROG= dma --SRCS= aliases_parse.y aliases_scan.l base64.c conf.c crypto.c --SRCS+= dma.c dns.c local.c mail.c net.c spool.c util.c --MAN= dma.8 -- - PREFIX?= /usr/local - LIBEXEC?= ${PREFIX}/libexec - CONFDIR?= ${PREFIX}/etc/dma -@@ -25,4 +17,3 @@ BINGRP= mail - BINMODE=2555 - WARNS?= 6 - --.include Property changes on: head/mail/dma/files/patch-BSDMakefile ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/mail/dma/files/patch-Makefile =================================================================== --- head/mail/dma/files/patch-Makefile (revision 408859) +++ head/mail/dma/files/patch-Makefile (nonexistent) @@ -1,6 +0,0 @@ ---- Makefile.orig 2012-01-28 20:35:32.000000000 +0000 -+++ Makefile 2012-01-28 20:31:56.000000000 +0000 -@@ -0,0 +1,3 @@ -+SUBDIR= dma dma-mbox-create -+ -+.include Property changes on: head/mail/dma/files/patch-Makefile ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/mail/dma/files/patch-dma-Makefile =================================================================== --- head/mail/dma/files/patch-dma-Makefile (revision 408859) +++ head/mail/dma/files/patch-dma-Makefile (nonexistent) @@ -1,18 +0,0 @@ ---- dma/Makefile.orig 2013-08-22 10:56:28.000000000 +0000 -+++ dma/Makefile 2013-08-22 11:18:05.000000000 +0000 -@@ -0,0 +1,15 @@ -+.PATH: ${.CURDIR} ${.CURDIR}/../ -+ -+PROG= dma -+SRCS= aliases_parse.y aliases_scan.l base64.c conf.c crypto.c -+SRCS+= dma.c dns.c local.c mail.c net.c spool.c util.c -+MAN= dma.8 -+ -+CFLAGS+= -DYY_NO_INPUT -+DPADD= ${LIBSSL} ${LIBCRYPTO} -+LDADD= -lssl -lcrypto -+ -+YFLAGS+= -i -+ -+.include "../BSDmakefile" -+.include Property changes on: head/mail/dma/files/patch-dma-Makefile ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/mail/dma/files/patch-dma.conf =================================================================== --- head/mail/dma/files/patch-dma.conf (revision 408859) +++ head/mail/dma/files/patch-dma.conf (nonexistent) @@ -1,11 +0,0 @@ ---- ./dma.conf.orig 2012-01-24 22:57:52.000000000 +0000 -+++ ./dma.conf 2012-01-24 22:58:08.000000000 +0000 -@@ -2,8 +2,6 @@ - # - # Your smarthost (also called relayhost). Leave blank if you don't want - # smarthost support. --# NOTE: on Debian systems this is handled via debconf! --# Please use dpkg-reconfigure dma to change this value. - #SMARTHOST - - # Use this SMTP port. Most users will be fine with the default (25) Property changes on: head/mail/dma/files/patch-dma.conf ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/mail/dma/files/patch-dma-mbox-create-Makefile =================================================================== --- head/mail/dma/files/patch-dma-mbox-create-Makefile (revision 408859) +++ head/mail/dma/files/patch-dma-mbox-create-Makefile (nonexistent) @@ -1,10 +0,0 @@ ---- dma-mbox-create/Makefile.orig 2012-01-28 20:34:03.000000000 +0000 -+++ dma-mbox-create/Makefile 2012-01-28 20:33:27.000000000 +0000 -@@ -0,0 +1,7 @@ -+.PATH: ${.CURDIR} ${.CURDIR}/../ -+ -+PROG= dma-mbox-create -+NO_MAN= -+ -+.include "../BSDmakefile" -+.include Property changes on: head/mail/dma/files/patch-dma-mbox-create-Makefile ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/mail/dma/files/patch-bsd_dma-mbox-create_Makefile =================================================================== --- head/mail/dma/files/patch-bsd_dma-mbox-create_Makefile (nonexistent) +++ head/mail/dma/files/patch-bsd_dma-mbox-create_Makefile (revision 408860) @@ -0,0 +1,15 @@ +--- bsd/dma-mbox-create/Makefile.orig 2016-02-07 12:41:49 UTC ++++ bsd/dma-mbox-create/Makefile +@@ -17,8 +17,9 @@ PREFIX?= /usr/local + LIBEXEC?= ${PREFIX}/libexec + CONFDIR?= ${PREFIX}/etc/dma + +-BINOWN= root +-BINGRP= mail +-BINMODE=4554 ++BINDIR= ${LIBEXEC} ++#BINOWN= root ++#BINGRP= mail ++#BINMODE=4554 + + .include Property changes on: head/mail/dma/files/patch-bsd_dma-mbox-create_Makefile ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/mail/dma/files/patch-bsd_dma_Makefile =================================================================== --- head/mail/dma/files/patch-bsd_dma_Makefile (nonexistent) +++ head/mail/dma/files/patch-bsd_dma_Makefile (revision 408860) @@ -0,0 +1,25 @@ +--- bsd/dma/Makefile.orig 2016-02-07 12:41:49 UTC ++++ bsd/dma/Makefile +@@ -11,6 +11,8 @@ CFLAGS+= -DCONF_PATH='"${CONFDIR}"' + DPADD= ${LIBSSL} ${LIBCRYPTO} + LDADD= -lssl -lcrypto + ++YFLAGS+= -i ++ + PROG= dma + .PATH: ${.CURDIR}/../.. + SRCS= aliases_parse.y aliases_scan.l base64.c conf.c crypto.c +@@ -21,9 +23,10 @@ PREFIX?= /usr/local + LIBEXEC?= ${PREFIX}/libexec + CONFDIR?= ${PREFIX}/etc/dma + +-BINOWN= root +-BINGRP= mail +-BINMODE=2555 ++BINDIR= ${LIBEXEC} ++#BINOWN= root ++#BINGRP= mail ++#BINMODE=2555 + WARNS?= 5 + + .include Property changes on: head/mail/dma/files/patch-bsd_dma_Makefile ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/mail/dma/files/patch-conf.c =================================================================== --- head/mail/dma/files/patch-conf.c (revision 408859) +++ head/mail/dma/files/patch-conf.c (revision 408860) @@ -1,11 +1,11 @@ ---- ./conf.c.orig 2012-01-03 13:54:05.000000000 +0000 -+++ ./conf.c 2012-01-24 22:57:41.000000000 +0000 -@@ -121,7 +121,7 @@ +--- conf.c.orig 2016-02-07 12:41:49 UTC ++++ conf.c +@@ -121,7 +121,7 @@ parse_authfile(const char *path) au = calloc(1, sizeof(*au)); if (au == NULL) -- errlog(1, NULL); -+ errlog(1, "calloc failed"); +- errlog(EX_OSERR, NULL); ++ errlog(EX_OSERR, "calloc failed"); data = strdup(line); au->login = strsep(&data, "|"); Index: head/mail/dma/files/patch-dma.c =================================================================== --- head/mail/dma/files/patch-dma.c (revision 408859) +++ head/mail/dma/files/patch-dma.c (revision 408860) @@ -1,29 +1,29 @@ ---- dma.c.orig 2013-08-22 10:56:28.000000000 +0000 -+++ dma.c 2013-08-22 11:03:59.000000000 +0000 -@@ -343,7 +343,7 @@ retry: - exit(1); +--- dma.c.orig 2016-02-07 12:41:49 UTC ++++ dma.c +@@ -340,7 +340,7 @@ retry: + exit(EX_SOFTWARE); } if (gettimeofday(&now, NULL) == 0 && - (now.tv_sec - st.st_mtim.tv_sec > MAX_TIMEOUT)) { + (now.tv_sec - st.st_mtime > MAX_TIMEOUT)) { snprintf(errmsg, sizeof(errmsg), "Could not deliver for the last %d seconds. Giving up.", MAX_TIMEOUT); -@@ -560,7 +560,7 @@ main(int argc, char **argv) +@@ -564,7 +564,7 @@ main(int argc, char **argv) skipopts: if (logident_base == NULL) logident_base = "dma"; - setlogident(NULL); + setlogident("%s", logident_base); act.sa_handler = sighup_handler; act.sa_flags = 0; -@@ -598,7 +598,7 @@ skipopts: - errlog(1, "can not read aliases file `%s'", config.aliases); +@@ -596,7 +596,7 @@ skipopts: + errlog(EX_SOFTWARE, "could not parse aliases file `%s'", config.aliases); if ((sender = set_from(&queue, sender)) == NULL) -- errlog(1, NULL); -+ errlog(1, "set_from failed"); +- errlog(EX_SOFTWARE, NULL); ++ errlog(EX_SOFTWARE, "set_from failed"); if (newspoolf(&queue) != 0) - errlog(1, "can not create temp file in `%s'", config.spooldir); + errlog(EX_CANTCREAT, "can not create temp file in `%s'", config.spooldir); Index: head/mail/dma/files/patch-get-version.sh =================================================================== --- head/mail/dma/files/patch-get-version.sh (revision 408859) +++ head/mail/dma/files/patch-get-version.sh (revision 408860) @@ -1,12 +1,13 @@ ---- get-version.sh.orig 2012-03-08 17:37:54.000000000 +0000 -+++ get-version.sh 2012-03-08 17:38:41.000000000 +0000 -@@ -1,9 +1,7 @@ - #!/bin/sh +--- get-version.sh.orig 2016-02-07 12:41:49 UTC ++++ get-version.sh +@@ -2,10 +2,8 @@ + tmp=$1 + file=${tmp:=VERSION} -gitver=$(git describe 2>/dev/null | tr - .) - filever=$(cat VERSION) + filever=$(cat ${file} 2>/dev/null) -version=${gitver} : ${version:=$filever} echo "$version" Index: head/mail/dma/files/patch-mail.c =================================================================== --- head/mail/dma/files/patch-mail.c (revision 408859) +++ head/mail/dma/files/patch-mail.c (revision 408860) @@ -1,11 +1,11 @@ ---- ./mail.c.orig 2012-01-03 13:54:05.000000000 +0000 -+++ ./mail.c 2012-01-24 22:57:41.000000000 +0000 -@@ -332,7 +332,7 @@ +--- mail.c.orig 2016-02-07 12:41:49 UTC ++++ mail.c +@@ -333,7 +333,7 @@ newaddr: ps->pos = 0; addr = strdup(ps->addr); if (addr == NULL) -- errlog(1, NULL); -+ errlog(1, "strdup failed"); +- errlog(EX_SOFTWARE, NULL); ++ errlog(EX_SOFTWARE, "strdup failed"); if (add_recp(queue, addr, EXPAND_WILDCARD) != 0) - errlogx(1, "invalid recipient `%s'", addr); + errlogx(EX_DATAERR, "invalid recipient `%s'", addr); Index: head/mail/dma/files/patch-spool.c =================================================================== --- head/mail/dma/files/patch-spool.c (revision 408859) +++ head/mail/dma/files/patch-spool.c (revision 408860) @@ -1,11 +1,11 @@ ---- spool.c.orig 2013-06-03 14:03:15.000000000 +0000 -+++ spool.c 2013-08-22 11:07:47.000000000 +0000 -@@ -415,7 +415,7 @@ flushqueue_since(unsigned int period) +--- spool.c.orig 2016-02-07 12:41:49 UTC ++++ spool.c +@@ -416,7 +416,7 @@ flushqueue_since(unsigned int period) return (0); /* Did the flush file get touched within the last period seconds? */ - if (st.st_mtim.tv_sec + period >= now.tv_sec) + if (st.st_mtim.tv_sec + (int)period >= now.tv_sec) return (1); else return (0); Index: head/mail/dma/pkg-plist =================================================================== --- head/mail/dma/pkg-plist (revision 408859) +++ head/mail/dma/pkg-plist (revision 408860) @@ -1,6 +1,6 @@ -@(,mail,2555) libexec/dma -@(root,mail,4555) libexec/dma-mbox-create +@(root,mail,2555) libexec/dma +@(root,mail,4554) libexec/dma-mbox-create @sample(root,mail,0644) etc/dma/dma.conf.sample @sample(root,mail,0640) etc/dma/auth.conf.sample man/man8/dma.8.gz %%VARDIR%%@dir(root,mail,770) /var/spool/dma