? mail/dma/files/x-patch-dma-mbox-create.c Index: mail/dma/Makefile =================================================================== RCS file: /mirror/cvs/FreeBSD/r/pcvs/ports/mail/dma/Makefile,v retrieving revision 1.10 diff -u -p -r1.10 Makefile --- mail/dma/Makefile 2 Jan 2011 14:01:24 -0000 1.10 +++ mail/dma/Makefile 4 Mar 2012 20:16:52 -0000 @@ -4,29 +4,36 @@ # # $FreeBSD: ports/mail/dma/Makefile,v 1.10 2011/01/02 14:01:24 bapt Exp $ # -# Based on git checkout from git://gitorious.org/dma/dma.git rather than -# from Dragonfly. +# Based on a tarball from https://github.com/corecode/dma/tarball/ +# rather than from Dragonfly. # -PORTNAME= dma -# commit f54b5114efc65d0e31c7b612bd59cc1b7c8cd8dc -PORTVERSION= 20101004 -PORTREVISION= 2 -CATEGORIES= mail ipv6 -MASTER_SITES= LOCAL/bz +PORTNAME= dma +PORTEPOCH= 1 +PORTVERSION= v0.7 +GITHUB_HASH= db9a42b +GITHUB_USER= corecode +CATEGORIES= mail ipv6 +#MASTER_SITES= https://github.com/ # 302 temp move +MASTER_SITES= https://nodeload.github.com/${GITHUB_USER}/${PORTNAME}/tarball/ +DISTFILES= ${PORTVERSION} +DIST_SUBDIR= ${PORTNAME} MAINTAINER= bz@FreeBSD.org COMMENT= DragonFly Mail Agent, a small MTA for local/outbound mail -USE_BZIP2= yes +WRKSRC= ${WRKDIR}/${GITHUB_USER}-${PORTNAME}-${GITHUB_HASH} + USE_OPENSSL= yes LICENSE= BSD - -WRKSRC= ${WRKDIR}/${PORTNAME} +LICENSE_FILE= ${WRKSRC}/LICENSE MAN8= dma.8 -CFLAGS+= -I${OPENSSLINC} +CFLAGS+= -I${OPENSSLINC} \ + -DCONF_PATH='\"${PREFIX}/etc/dma\"' \ + -DDMA_ROOT_USER='\"mailnull\"' \ + -DDMA_GROUP='\"mail\"' LDFLAGS+= -L${OPENSSLLIB} USE_RC_SUBR= dma_flushq @@ -38,24 +45,30 @@ SUB_FILES= pkg-message BROKEN= Does not build on 6.X .endif +# Allow subports to extend. +CONFFILES+= dma.conf auth.conf + +pre-patch: + @${MKDIR} -p ${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 \ - ${WRKSRC}/dma.h + ${WRKSRC}/dma.8 @${REINPLACE_CMD} -e 's, /etc/dma, ${PREFIX}/etc/dma,g' \ ${WRKSRC}/dma.conf - @${MV} ${WRKSRC}/BSDmakefile ${WRKSRC}/Makefile do-install: - ${INSTALL} -o root -g mail -m 2555 ${WRKSRC}/dma ${PREFIX}/libexec + ${INSTALL} -o root -g mail -m 2555 ${WRKSRC}/dma/dma ${PREFIX}/libexec + ${INSTALL} -o root -g mail -m 4550 \ + ${WRKSRC}/dma-mbox-create/dma-mbox-create ${PREFIX}/libexec ${INSTALL_MAN} ${WRKSRC}/dma.8 ${PREFIX}/man/man8/ ${MKDIR} ${PREFIX}/etc/dma -.for i in dma.conf +.for i in ${CONFFILES} ${INSTALL_DATA} -m 0644 ${WRKSRC}/${i} ${PREFIX}/etc/dma/${i}.sample .endfor - ${INSTALL} -o root -g mail -m 0640 ${WRKSRC}/auth.conf \ - ${PREFIX}/etc/dma/auth.conf.sample -.for i in dma.conf auth.conf + ${CHMOD} o-r ${PREFIX}/etc/dma/auth.conf.sample +.for i in ${CONFFILES} if [ ! -f ${PREFIX}/etc/dma/${i} ]; then \ ${CP} -p ${PREFIX}/etc/dma/${i}.sample \ ${PREFIX}/etc/dma/${i} ; \ Index: mail/dma/distinfo =================================================================== RCS file: /mirror/cvs/FreeBSD/r/pcvs/ports/mail/dma/distinfo,v retrieving revision 1.5 diff -u -p -r1.5 distinfo --- mail/dma/distinfo 3 Jul 2011 13:52:48 -0000 1.5 +++ mail/dma/distinfo 4 Mar 2012 20:16:52 -0000 @@ -1,2 +1,2 @@ -SHA256 (dma-20101004.tar.bz2) = 32218152690bcb935526194c5f9c9b6475eb4f480e3f95e8ab71a72e27df9c51 -SIZE (dma-20101004.tar.bz2) = 24895 +SHA256 (dma/v0.7) = 56a84a2a00b89f1abe6761657036a553aa9f1e9b0826abbace13609aea545e50 +SIZE (dma/v0.7) = 43961 Index: mail/dma/pkg-descr =================================================================== RCS file: /mirror/cvs/FreeBSD/r/pcvs/ports/mail/dma/pkg-descr,v retrieving revision 1.4 diff -u -p -r1.4 pkg-descr --- mail/dma/pkg-descr 18 Oct 2010 11:39:00 -0000 1.4 +++ mail/dma/pkg-descr 4 Mar 2012 20:16:52 -0000 @@ -13,4 +13,4 @@ Since dma is not intended as a replaceme like sendmail(8) or postfix(1), it does not listen on port 25 for incoming connections. -WWW: http://gitorious.org/dma +WWW: https://github.com/corecode/dma Index: mail/dma/pkg-plist =================================================================== RCS file: /mirror/cvs/FreeBSD/r/pcvs/ports/mail/dma/pkg-plist,v retrieving revision 1.3 diff -u -p -r1.3 pkg-plist --- mail/dma/pkg-plist 18 Oct 2010 11:39:00 -0000 1.3 +++ mail/dma/pkg-plist 4 Mar 2012 20:16:52 -0000 @@ -1,4 +1,5 @@ libexec/dma +libexec/dma-mbox-create @unexec if cmp -s %D/etc/dma/dma.conf.sample %D/etc/dma/dma.conf; then rm -f %D/etc/dma/dma.conf; fi etc/dma/dma.conf.sample @exec if [ ! -f %B/dma.conf ] ; then cp -p %B/%f %B/dma.conf; fi Index: mail/dma/files/patch-BSDMakefile =================================================================== RCS file: mail/dma/files/patch-BSDMakefile diff -N mail/dma/files/patch-BSDMakefile --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ mail/dma/files/patch-BSDMakefile 4 Mar 2012 20:16:52 -0000 @@ -0,0 +1,30 @@ +--- BSDmakefile.orig 2012-01-03 13:54:05.000000000 +0000 ++++ BSDmakefile 2012-01-28 20:47:09.000000000 +0000 +@@ -1,20 +1,12 @@ + # $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}"' + +-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 + +@@ -23,4 +15,3 @@ BINGRP= mail + BINMODE=2555 + WARNS?= 6 + +-.include Index: mail/dma/files/patch-Makefile =================================================================== RCS file: mail/dma/files/patch-Makefile diff -N mail/dma/files/patch-Makefile --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ mail/dma/files/patch-Makefile 4 Mar 2012 20:16:52 -0000 @@ -0,0 +1,6 @@ +--- 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 Index: mail/dma/files/patch-aliases_scan.l =================================================================== RCS file: mail/dma/files/patch-aliases_scan.l diff -N mail/dma/files/patch-aliases_scan.l --- mail/dma/files/patch-aliases_scan.l 2 Jan 2011 14:01:24 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,22 +0,0 @@ ---- ./aliases_scan.l.orig 2010-10-04 21:03:33.000000000 +0200 -+++ ./aliases_scan.l 2010-12-26 22:03:33.000000000 +0000 -@@ -3,8 +3,6 @@ - #include - #include "aliases_parse.h" - --#define YY_NO_INPUT -- - int yylex(void); - %} - -@@ -13,9 +11,9 @@ int yylex(void); - - %% - -+^([[:blank:]]*(#.*)?\n)+ ;/* ignore empty lines */ - [^:,#[:space:][:cntrl:]]+ {yylval.ident = strdup(yytext); return T_IDENT;} - [:,\n] return yytext[0]; --^([[:blank:]]*(#.*)?\n)+ ;/* ignore empty lines */ - (\n?[[:blank:]]+|#.*)+ ;/* ignore whitespace and continuation */ - \\\n ;/* ignore continuation. not allowed in comments */ - . return T_ERROR; Index: mail/dma/files/patch-conf.c =================================================================== RCS file: mail/dma/files/patch-conf.c diff -N mail/dma/files/patch-conf.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ mail/dma/files/patch-conf.c 4 Mar 2012 20:16:52 -0000 @@ -0,0 +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 @@ + + au = calloc(1, sizeof(*au)); + if (au == NULL) +- errlog(1, NULL); ++ errlog(1, "calloc failed"); + + data = strdup(line); + au->login = strsep(&data, "|"); Index: mail/dma/files/patch-crypto.c =================================================================== RCS file: mail/dma/files/patch-crypto.c diff -N mail/dma/files/patch-crypto.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ mail/dma/files/patch-crypto.c 4 Mar 2012 20:16:52 -0000 @@ -0,0 +1,11 @@ +--- ./crypto.c.orig 2012-01-03 13:54:05.000000000 +0000 ++++ ./crypto.c 2012-01-24 22:57:41.000000000 +0000 +@@ -80,7 +80,7 @@ + smtp_init_crypto(int fd, int feature) + { + SSL_CTX *ctx = NULL; +- const SSL_METHOD *meth = NULL; ++ SSL_METHOD *meth = NULL; + X509 *cert; + int error; + Index: mail/dma/files/patch-dma-Makefile =================================================================== RCS file: mail/dma/files/patch-dma-Makefile diff -N mail/dma/files/patch-dma-Makefile --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ mail/dma/files/patch-dma-Makefile 4 Mar 2012 20:16:52 -0000 @@ -0,0 +1,17 @@ +--- dma/Makefile.orig 2012-01-28 20:33:55.000000000 +0000 ++++ dma/Makefile 2012-01-28 20:33:55.608531000 +0000 +@@ -0,0 +1,14 @@ ++# $FreeBSD$ ++ ++.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 ++ ++DPADD= ${LIBSSL} ${LIBCRYPTO} ++LDADD= -lssl -lcrypto ++ ++.include "../BSDmakefile" ++.include Index: mail/dma/files/patch-dma-mbox-create-Makefile =================================================================== RCS file: mail/dma/files/patch-dma-mbox-create-Makefile diff -N mail/dma/files/patch-dma-mbox-create-Makefile --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ mail/dma/files/patch-dma-mbox-create-Makefile 4 Mar 2012 20:16:52 -0000 @@ -0,0 +1,12 @@ +--- 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,9 @@ ++# $FreeBSD$ ++ ++.PATH: ${.CURDIR} ${.CURDIR}/../ ++ ++PROG= dma-mbox-create ++NO_MAN= ++ ++.include "../BSDmakefile" ++.include Index: mail/dma/files/patch-dma.c =================================================================== RCS file: /mirror/cvs/FreeBSD/r/pcvs/ports/mail/dma/files/patch-dma.c,v retrieving revision 1.3 diff -u -p -r1.3 patch-dma.c --- mail/dma/files/patch-dma.c 18 Oct 2010 11:39:00 -0000 1.3 +++ mail/dma/files/patch-dma.c 4 Mar 2012 20:16:52 -0000 @@ -1,11 +1,29 @@ ---- ./dma.c.orig 2010-10-04 21:03:33.000000000 +0200 -+++ ./dma.c 2010-10-18 13:25:47.331077938 +0200 -@@ -293,7 +293,7 @@ +--- dma.c.orig 2012-01-28 22:36:55.000000000 +0000 ++++ dma.c 2012-01-28 22:46:06.000000000 +0000 +@@ -332,7 +332,7 @@ retry: exit(1); } if (gettimeofday(&now, NULL) == 0 && - (now.tv_sec - st.st_mtim.tv_sec > MAX_TIMEOUT)) { + (now.tv_sec - st.st_mtime > MAX_TIMEOUT)) { - asprintf(__DECONST(void *, &errmsg), + snprintf(errmsg, sizeof(errmsg), "Could not deliver for the last %d seconds. Giving up.", MAX_TIMEOUT); +@@ -534,7 +535,7 @@ main(int argc, char **argv) + skipopts: + if (logident_base == NULL) + logident_base = "dma"; +- setlogident(NULL); ++ setlogident(logident_base); + + act.sa_handler = sighup_handler; + act.sa_flags = 0; +@@ -571,7 +572,7 @@ skipopts: + errlog(1, "can not read aliases file `%s'", config.aliases); + + if ((sender = set_from(&queue, sender)) == NULL) +- errlog(1, NULL); ++ errlog(1, "set_from failed"); + + if (newspoolf(&queue) != 0) + errlog(1, "can not create temp file"); Index: mail/dma/files/patch-dma.conf =================================================================== RCS file: mail/dma/files/patch-dma.conf diff -N mail/dma/files/patch-dma.conf --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ mail/dma/files/patch-dma.conf 4 Mar 2012 20:16:52 -0000 @@ -0,0 +1,11 @@ +--- ./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) Index: mail/dma/files/patch-dma.h =================================================================== RCS file: mail/dma/files/patch-dma.h diff -N mail/dma/files/patch-dma.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ mail/dma/files/patch-dma.h 4 Mar 2012 20:16:52 -0000 @@ -0,0 +1,15 @@ +--- dma.h.orig 2012-01-03 13:54:05.000000000 +0000 ++++ dma.h 2012-01-28 11:02:57.000000000 +0000 +@@ -74,8 +75,12 @@ + #error Please define LIBEXEC_PATH + #endif + ++#ifndef DMA_ROOT_USER + #define DMA_ROOT_USER "mail" ++#endif ++#ifndef DMA_GROUP + #define DMA_GROUP "mail" ++#endif + + #ifndef MBOX_STRICT + #define MBOX_STRICT 0 Index: mail/dma/files/patch-mail.c =================================================================== RCS file: /mirror/cvs/FreeBSD/r/pcvs/ports/mail/dma/files/patch-mail.c,v retrieving revision 1.1 diff -u -p -r1.1 patch-mail.c --- mail/dma/files/patch-mail.c 18 Oct 2010 11:39:00 -0000 1.1 +++ mail/dma/files/patch-mail.c 4 Mar 2012 20:16:52 -0000 @@ -1,11 +1,11 @@ ---- ./mail.c.orig 2010-10-04 21:03:33.000000000 +0200 -+++ ./mail.c 2010-10-18 13:34:03.222470911 +0200 -@@ -415,7 +415,7 @@ - snprintf(line, sizeof(line), "Message-Id: <%"PRIxMAX".%s.%"PRIxMAX"@%s>\n", - (uintmax_t)time(NULL), - queue->id, -- random(), -+ (uintmax_t)random(), - hostname()); - } else if (!had_from) { - had_from = 1; +--- ./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 @@ + ps->pos = 0; + addr = strdup(ps->addr); + if (addr == NULL) +- errlog(1, NULL); ++ errlog(1, "strdup failed"); + + if (add_recp(queue, addr, EXPAND_WILDCARD) != 0) + errlogx(1, "invalid recipient `%s'", addr);