Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Jun 2016 01:23:27 +0000 (UTC)
From:      Jason Unovitch <junovitch@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r417509 - in head: . mail/davmail mail/davmail/files
Message-ID:  <201606260123.u5Q1NRRj017621@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: junovitch
Date: Sun Jun 26 01:23:27 2016
New Revision: 417509
URL: https://svnweb.freebsd.org/changeset/ports/417509

Log:
  mail/davmail: update 4.6.1 -> 4.7.2
  
  - Update rc.d script to run as davmail user rather than root
  - Update rc.d script to take advantage of daemon(8) rather than hand-rolling
    process management
  - Update rev info (checksums, refresh patches, etc.)
  - Remove .md5 files
  - Appease testport by removing empty dirs in STAGEDIR not in plist
  
  UIDs/GIDs: add davmail user
  
  Changes:	https://sourceforge.net/p/davmail/code/2427/tree/trunk/releasenotes.txt
  
  PR:		209354
  Submitted by:	John Hein <z7dr6ut7gs@snkmail.com>
  Approved by:	maintainer timeout (7 weeks)

Modified:
  head/GIDs
  head/UIDs
  head/mail/davmail/Makefile
  head/mail/davmail/distinfo
  head/mail/davmail/files/davmail.in
  head/mail/davmail/files/patch-build.xml

Modified: head/GIDs
==============================================================================
--- head/GIDs	Sun Jun 26 00:42:55 2016	(r417508)
+++ head/GIDs	Sun Jun 26 01:23:27 2016	(r417509)
@@ -199,6 +199,7 @@ _bbstored:*:505:
 radmind:*:506:
 skkserv:*:507:
 pwhois:*:512:
+davmail:*:521:
 nullmail:*:522:
 freevo:*:523:
 dkimproxy:*:525:

Modified: head/UIDs
==============================================================================
--- head/UIDs	Sun Jun 26 00:42:55 2016	(r417508)
+++ head/UIDs	Sun Jun 26 01:23:27 2016	(r417509)
@@ -206,6 +206,7 @@ _bbstored:*:505:505::0:0:Box Backup Stor
 radmind:*:506:506::0:0:radmind User:/var/radmind:/usr/sbin/nologin
 skkserv:*:507:507::0:0:skkserv User:/nonexistent:/usr/sbin/nologin
 pwhois:*:512:512::0:0:pwhoisd User:/nonexistent:/usr/sbin/nologin
+davmail:*:521:521::0:0:Davmail Exchange Gateway:/nonexistent:/usr/sbin/nologin
 nullmail:*:522:522::0:0:Nullmailer Mail System:/var/spool/nullmailer:/bin/sh
 freevo:*:523:523::0:0:Freevo User:/var/db/freevo:/bin/sh
 dkimproxy:*:525:525::0:0:DKIM Proxy Owner:/nonexistent:/usr/sbin/nologin

Modified: head/mail/davmail/Makefile
==============================================================================
--- head/mail/davmail/Makefile	Sun Jun 26 00:42:55 2016	(r417508)
+++ head/mail/davmail/Makefile	Sun Jun 26 01:23:27 2016	(r417509)
@@ -2,7 +2,7 @@
 # $FreeBSD$
 
 PORTNAME=	davmail
-PORTVERSION=	4.6.1
+PORTVERSION=	4.7.2
 CATEGORIES=	mail java
 MASTER_SITES=	SF/davmail/davmail/${PORTVERSION}
 DISTNAME=	${PORTNAME}-src-${PORTVERSION}-${REVISION}
@@ -19,11 +19,14 @@ USE_ANT=	yes
 USE_JAVA=	yes
 JAVA_VERSION=	1.6+
 ALL_TARGET=	release
-REVISION=	2343
+REVISION=	2427  # 4.7.2
 # port build number, same as on DISTNAME
 MAKE_ARGS=	-Drevision=${REVISION}
 MAKE_ENV+=	"ANT_OPTS=-Dfile.encoding=UTF-8"
 
+USERS=		davmail
+GROUPS=		davmail
+
 DATADIR=	${JAVASHAREDIR}/${PORTNAME}
 
 USE_RC_SUBR=	davmail
@@ -39,6 +42,8 @@ do-install:
 		-exec ${MKDIR} ${STAGEDIR}${DATADIR}/\{} \;
 	@cd ${WRKSRC}/dist && ${FIND} . -type f \
 		-not -name "*.deb" \
+		-not -name "*.md5" \
+		-not -name "*.MD5" \
 		-not -name "*.tgz" \
 		-not -name "*.exe" \
 		-not -name "swt-*.jar" \
@@ -47,6 +52,8 @@ do-install:
 		-not -name "*.rpm" \
 		-not -name "*.desktop" \
 		-exec ${INSTALL_DATA} \{} ${STAGEDIR}${DATADIR}/\{} \;
+	@${FIND} ${STAGEDIR}/${DATADIR} -depth -empty -type d \
+		-exec ${RMDIR} \{} +
 	${INSTALL_SCRIPT} ${WRKDIR}/davmail.sh ${STAGEDIR}${PREFIX}/bin/davmail
 	${INSTALL_DATA} ${WRKSRC}/src/etc/davmail.properties \
 		${STAGEDIR}${PREFIX}/etc/davmail.properties.sample

Modified: head/mail/davmail/distinfo
==============================================================================
--- head/mail/davmail/distinfo	Sun Jun 26 00:42:55 2016	(r417508)
+++ head/mail/davmail/distinfo	Sun Jun 26 01:23:27 2016	(r417509)
@@ -1,2 +1,3 @@
-SHA256 (davmail-src-4.6.1-2343.tgz) = 1e6f5c88469416276fd7301990ddaa048dd177eb90e3348ae8d54b22df38997e
-SIZE (davmail-src-4.6.1-2343.tgz) = 22659201
+TIMESTAMP = 1466903595
+SHA256 (davmail-src-4.7.2-2427.tgz) = bf66cd4e735329d9862c8e01c9749e2d21d5beddc8090545d705b9aa8d04dbe7
+SIZE (davmail-src-4.7.2-2427.tgz) = 22682341

Modified: head/mail/davmail/files/davmail.in
==============================================================================
--- head/mail/davmail/files/davmail.in	Sun Jun 26 00:42:55 2016	(r417508)
+++ head/mail/davmail/files/davmail.in	Sun Jun 26 01:23:27 2016	(r417509)
@@ -22,7 +22,10 @@ load_rc_config $name
 
 : ${davmail_enable="NO"}
 : ${davmail_config="%%PREFIX%%/etc/davmail.properties"}
+: ${davmail_user="davmail"}
+: ${davmail_group="davmail"}
 
+start_precmd="${name}_prestart"
 start_cmd="${name}_start"
 
 davmail_procname()
@@ -31,15 +34,24 @@ davmail_procname()
 	    /usr/bin/awk -F= '{if ($1=="JAVAVM_PROG") print $2}' 2> /dev/null
 }
 
+pidfiledir="/var/run/davmail"
+pidfile="${pidfiledir}/davmail.pid"
 procname="$(davmail_procname)"
-pidfile="/var/run/davmail.pid"
 required_files=${davmail_config}
 
+command="/usr/sbin/daemon"
+command_args="-p ${pidfile} %%LOCALBASE%%/bin/java -cp '%%DATADIR%%/davmail.jar:%%DATADIR%%/lib/*' davmail.DavGateway '${davmail_config}'"
+
 davmail_daemon()
 {
-	%%LOCALBASE%%/bin/java \
-	    -cp "%%DATADIR%%/davmail.jar:%%DATADIR%%/lib/*" \
-	    davmail.DavGateway "${davmail_config}" & echo -n $! > ${pidfile}
+	su -m ${davmail_user} -c "env -i PATH=${PATH} ${command} ${command_args}"
+}
+
+davmail_prestart()
+{
+	if [ ! -d "${pidfiledir}" ]; then
+		install -d -o "${davmail_user}" -g "${davmail_group}" -m 750 "${pidfiledir}"
+	fi
 }
 
 davmail_start()

Modified: head/mail/davmail/files/patch-build.xml
==============================================================================
--- head/mail/davmail/files/patch-build.xml	Sun Jun 26 00:42:55 2016	(r417508)
+++ head/mail/davmail/files/patch-build.xml	Sun Jun 26 01:23:27 2016	(r417509)
@@ -1,14 +1,6 @@
---- build.xml.orig	2015-07-04 15:28:32.000000000 -0700
-+++ build.xml	2015-07-04 15:28:59.000000000 -0700
-@@ -26,6 +26,7 @@
-         <or>
-             <equals arg1="${ant.java.version}" arg2="1.6"/>
-             <equals arg1="${ant.java.version}" arg2="1.7"/>
-+            <equals arg1="${ant.java.version}" arg2="1.8"/>
-         </or>
-     </condition>
- 
-@@ -59,7 +60,7 @@
+--- build.xml.orig	2016-04-09 15:14:49 UTC
++++ build.xml
+@@ -61,7 +61,7 @@
      </target>
  
      <target name="defaultrelease" unless="is.svn">



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201606260123.u5Q1NRRj017621>