Bug 189895 - Update mail/dma to build under 8.x (8.4)
Summary: Update mail/dma to build under 8.x (8.4)
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Erwin Lansing
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-17 20:10 UTC by Peter Losher
Modified: 2014-05-18 03:00 UTC (History)
0 users

See Also:


Attachments
file.diff (2.55 KB, patch)
2014-05-17 20:10 UTC, Peter Losher
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Losher freebsd_committer 2014-05-17 20:10:00 UTC

Fix: See attached patches - moved the existing spool.c patch to it's own conditional and added one for 8.x systems.

Patch attached with submission follows:
How-To-Repeat: cd /usr/ports/mail/dma under a 8.x box and watch it blow...

[...]
/usr/ports/mail/dma/work/corecode-dma-2bb8bcb/dma/..//spool.c: In function 'flushqueue_since':
/usr/ports/mail/dma/work/corecode-dma-2bb8bcb/dma/..//spool.c:419: error: 'struct stat' has no member named 'st_mtim'
Comment 1 Edwin Groothuis freebsd_committer 2014-05-17 20:10:03 UTC
Responsible Changed
From-To: freebsd-ports-bugs->erwin

erwin@ wants this submitter's PRs (via the GNATS Auto Assign Tool)
Comment 2 Edwin Groothuis freebsd_committer 2014-05-17 20:10:04 UTC
Maintainer of mail/dma,

Please note that PR ports/189895 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/189895

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 3 Edwin Groothuis freebsd_committer 2014-05-17 20:10:05 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 4 Bjoern A.Zeeb 2014-05-17 21:55:25 UTC
On Sat, 17 May 2014, Edwin Groothuis wrote:

If some ports person gets the patches sorted correctly, I'll approve
and bapt volunteered to take that port weeks ago after committing it
to head.  So please adjust the maintainer as well.

I guess it doesn't do staging yet either;-)

-- 
Bjoern A. Zeeb             "Come on. Learn, goddamn it.", WarGames, 1983
Comment 5 Erwin Lansing freebsd_committer 2014-05-18 02:46:09 UTC
State Changed
From-To: feedback->closed

Committed, thanks!
Comment 6 dfilter service freebsd_committer 2014-05-18 02:53:35 UTC
Author: erwin
Date: Sun May 18 01:53:30 2014
New Revision: 354383
URL: http://svnweb.freebsd.org/changeset/ports/354383
QAT: https://qat.redports.org/buildarchive/r354383/

Log:
  - Fix build on 8.x [1]
  - Change license to BSD3CLAUSE
  - Stageify
  
  PR:		189895 [1]
  Submitted by:	plosher [1]
  Sponsored by:	DK Hostmaster A/S

Added:
  head/mail/dma/files/extrapatch-8-spool.c   (contents, props changed)
  head/mail/dma/files/extrapatch-else-spool.c   (contents, props changed)
Deleted:
  head/mail/dma/files/patch-spool.c
Modified:
  head/mail/dma/Makefile
  head/mail/dma/pkg-plist

Modified: head/mail/dma/Makefile
==============================================================================
--- head/mail/dma/Makefile	Sun May 18 01:51:43 2014	(r354382)
+++ head/mail/dma/Makefile	Sun May 18 01:53:30 2014	(r354383)
@@ -10,12 +10,10 @@ EXTRACT_SUFX=
 MAINTAINER=	bzeeb+freebsd+ports@zabbadoz.net
 COMMENT=	DragonFly Mail Agent, a small MTA for local/outbound mail
 
-LICENSE=	BSD
+LICENSE=	BSD3CLAUSE
 
 USE_OPENSSL=	yes
 
-MAN8=		dma.8
-
 USE_GITHUB=	yes
 GH_COMMIT=	2bb8bcb
 GH_ACCOUNT=	corecode
@@ -29,15 +27,17 @@ LDFLAGS+=	-L${OPENSSLLIB}
 
 USE_RC_SUBR=	dma_flushq
 SUB_FILES=	pkg-message
+PLIST_SUB+=	RESETPREFIX=${PREFIX}
 
 # Allow subports to extend.
 CONFFILES+=	dma.conf auth.conf
 
-NO_STAGE=	yes
 .include <bsd.port.pre.mk>
 
 .if ${OSVERSION} < 900000
-IGNORE=	Does not build in 8.x
+EXTRA_PATCHES=	${.CURDIR:H:H}/mail/dma/files/extrapatch-8-spool.c
+.else
+EXTRA_PATCHES=  ${.CURDIR:H:H}/mail/dma/files/extrapatch-else-spool.c
 .endif
 
 pre-patch:
@@ -54,24 +54,15 @@ post-patch:
 .endif
 
 do-install:
-	${INSTALL} -o root -g mail -m 2555 ${WRKSRC}/dma/dma ${PREFIX}/libexec
+	${INSTALL} -o root -g mail -m 2555 ${WRKSRC}/dma/dma ${STAGEDIR}/${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 ${CONFFILES}
-	${INSTALL_DATA} -m 0644 ${WRKSRC}/${i} ${PREFIX}/etc/dma/${i}.sample
-.endfor
-	${CHMOD} o-r ${PREFIX}/etc/dma/auth.conf.sample
+		${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}
-	if [ ! -f ${PREFIX}/etc/dma/${i} ]; then \
-		${CP} -p ${PREFIX}/etc/dma/${i}.sample \
-			${PREFIX}/etc/dma/${i} ; \
-	fi
+	${INSTALL_DATA} -m 0644 ${WRKSRC}/${i} ${STAGEDIR}/${PREFIX}/etc/dma/${i}.sample
 .endfor
-	${INSTALL} -d -o root -g mail -m 770 /var/spool/dma
-
-post-install:
-	@${CAT} ${PKGMESSAGE}
+	${CHMOD} o-r ${STAGEDIR}/${PREFIX}/etc/dma/auth.conf.sample
+	${INSTALL} -d -o root -g mail -m 770 ${STAGEDIR}/var/spool/dma
 
 .include <bsd.port.post.mk>

Added: head/mail/dma/files/extrapatch-8-spool.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/mail/dma/files/extrapatch-8-spool.c	Sun May 18 01:53:30 2014	(r354383)
@@ -0,0 +1,19 @@
+--- spool.c	2013-06-03 14:03:15.000000000 +0000
++++ spool.c.8	2014-05-17 18:14:45.000000000 +0000
+@@ -36,6 +36,7 @@
+ 
+ #include <sys/file.h>
+ #include <sys/stat.h>
++#include <sys/time.h>
+ 
+ #include <ctype.h>
+ #include <dirent.h>
+@@ -415,7 +416,7 @@
+ 		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_mtime + (int)period >= now.tv_sec)
+ 		return (1);
+ 	else
+ 		return (0);

Added: head/mail/dma/files/extrapatch-else-spool.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/mail/dma/files/extrapatch-else-spool.c	Sun May 18 01:53:30 2014	(r354383)
@@ -0,0 +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)
+ 		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);

Modified: head/mail/dma/pkg-plist
==============================================================================
--- head/mail/dma/pkg-plist	Sun May 18 01:51:43 2014	(r354382)
+++ head/mail/dma/pkg-plist	Sun May 18 01:53:30 2014	(r354383)
@@ -1,11 +1,9 @@
 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
-@unexec if cmp -s %D/etc/dma/auth.conf.sample %D/etc/dma/auth.conf; then rm -f %D/etc/dma/auth.conf; fi
-etc/dma/auth.conf.sample
-@exec if [ ! -f %B/auth.conf ] ; then cp -p %B/%f %B/auth.conf; fi
+@sample etc/dma/dma.conf.sample
+@sample etc/dma/auth.conf.sample
+man/man8/dma.8.gz
 @dirrmtry etc/dma
-@exec install -d -o root -g mail -m 770 /var/spool/dma
-@dirrmtry rmdir /var/spool/dma
+@cwd /
+@dirrmtry var/spool/dma
+@cwd %%RESETPREFIX%%
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"