Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Jun 2015 18:54:17 +0000 (UTC)
From:      Dirk Meyer <dinoex@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r388543 - head/mail/meta1
Message-ID:  <201506041854.t54IsHRk050809@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dinoex
Date: Thu Jun  4 18:54:16 2015
New Revision: 388543
URL: https://svnweb.freebsd.org/changeset/ports/388543

Log:
  - remove NEED_ROOT
  PR:		200547
  
  - fix GROUPS, USERS
  - enable option IPV6 per default
  - do not create default config on install
  - fix most regression tests
  - add pkg-message for new installs

Added:
  head/mail/meta1/pkg-message   (contents, props changed)
Modified:
  head/mail/meta1/Makefile
  head/mail/meta1/pkg-plist

Modified: head/mail/meta1/Makefile
==============================================================================
--- head/mail/meta1/Makefile	Thu Jun  4 18:48:34 2015	(r388542)
+++ head/mail/meta1/Makefile	Thu Jun  4 18:54:16 2015	(r388543)
@@ -14,7 +14,6 @@ COMMENT=	Secure and efficient mail gatew
 NOT_FOR_ARCHS=	ia64
 MAKE_JOBS_UNSAFE=	yes
 CONFLICTS=	smx-*
-NEED_ROOT=	yes
 MANUAL_PACKAGE_BUILD=	needs hostname
 
 .if !defined(SENDMAIL_WITHOUT_SHMEM) && !defined(BUILDING_INDEX)
@@ -36,16 +35,15 @@ PORTDOCS=	README.dvi README.html README.
 PLIST_SUB+=	NOLOGIN=${NOLOGIN_CMD}
 EXTRA_SBIN=	libcheck/noroot libconf/tree libmta/statit \
 		libmta/t-hostname checks/t-getgroup
-# GROUPS/USERS does not work from package
-#GROUPS=	meta1s meta1q meta1c meta1m meta1
-#USERS=		meta1s meta1q meta1c meta1m meta1
+GROUPS=		meta1s meta1q meta1c meta1m meta1
+USERS=		meta1s meta1q meta1c meta1m meta1
 
 # default config:
 META1CONFDIR?=	${PREFIX}/etc/meta1
 NOLOGIN_CMD?=	/usr/sbin/nologin
 
-OPTIONS_DEFINE=	BDB PMILTER DKIM MSP SASL2 SASL2AUTHD TLS DOCS
-OPTIONS_DEFAULT=	PMILTER DKIM SASL2 TLS
+OPTIONS_DEFINE=	IPV6 BDB PMILTER DKIM MSP SASL2 SASL2AUTHD TLS DOCS
+OPTIONS_DEFAULT=	IPV6 PMILTER DKIM SASL2 TLS
 NO_OPTIONS_SORT=yes
 OPTIONS_SUB=	yes
 
@@ -68,6 +66,10 @@ TLS_CONFIGURE_ENABLE=	TLS
 
 .include <bsd.port.options.mk>
 
+.if ${PORT_OPTIONS:MIPV6}
+MAKE_ENV+=	MTA_NETINET6=1
+.endif
+
 .if ${PORT_OPTIONS:MBDB}
 BROKEN=		port version of Berkeley DB is not compatible
 USE_BDB=	42+
@@ -116,46 +118,21 @@ post-configure:
 		-e 's|$${SD}/checks|${PREFIX}/sbin|' \
 		${WRKDIR}/sm.check.sh
 	@${REINPLACE_CMD} -e 's|/etc/meta1|${META1CONFDIR}|g' \
-		-e 's|[.]/misc|${PREFIX}/bin|' \
+		-e 's|$${S}/misc|${PREFIX}/bin|' \
 		-e 's|$${S}/libconf|${PREFIX}/sbin|' \
-		-e 's|[.]/libmta|${PREFIX}/sbin|' \
-		-e 's|[.]/checks|${PREFIX}/sbin|' \
+		-e 's|$${S}/libmta|${PREFIX}/sbin|' \
+		-e 's|$${S}/checks|${PREFIX}/sbin|' \
 		-e 's|=mcp.sh|=${PREFIX}/etc/rc.d/meta1-mcp.sh|' \
 		${WRKDIR}/sm.setup.sh
+	@${REINPLACE_CMD} -e "/install-data-hook/d" ${WRKSRC}/Makefile.in
+	@${REINPLACE_CMD} -e 's|^TESTS =.*|TESTS = $$(TESTP)|' \
+		${WRKSRC}/libdkim/Makefile.in
+	${CP} ${WRKSRC}/libdns/common.sh ${WRKSRC}/
 
-test:
+test:	build
 	(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
 		${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} check)
 
-#fails on bento
-#regression-test:	test
-
-.if !defined(UID)
-UID!=	${ID} -u
-.endif
-.if ${UID} != 0
-post-build:	test
-.endif
-
-pre-install:
-	if ! pw groupshow meta1s; then pw groupadd meta1s -g 260; fi
-	if ! pw groupshow meta1q; then pw groupadd meta1q -g 261; fi
-	if ! pw groupshow meta1c; then pw groupadd meta1c -g 262; fi
-	if ! pw groupshow meta1m; then pw groupadd meta1m -g 263; fi
-	if ! pw groupshow meta1; then pw groupadd meta1 -g 264; fi
-	if ! pw usershow meta1s; then pw useradd meta1s -g meta1s -u 260 \
-		-h - -d ${NONEXISTENT} -s ${NOLOGIN_CMD} -c "MeTA1 SMTPS"; fi
-	if ! pw usershow meta1q; then pw useradd meta1q -g meta1q -u 261 \
-		-h - -d ${NONEXISTENT} -s ${NOLOGIN_CMD} -c "MeTA1 QMGR"; fi
-	if ! pw usershow meta1c; then pw useradd meta1c -g meta1c -u 262 \
-		-h - -d ${NONEXISTENT} -s ${NOLOGIN_CMD} -c "MeTA1 SMTPC"; fi
-	if ! pw usershow meta1m; then pw useradd meta1m -g meta1m -u 263 \
-		-h - -d ${NONEXISTENT} -s ${NOLOGIN_CMD} -c "MeTA1 misc"; fi
-	if ! pw usershow meta1; then pw useradd meta1 -g meta1 -u 264 \
-		-h - -d ${NONEXISTENT} -s ${NOLOGIN_CMD} -c "MeTA1 other"; fi
-	pw groupmod meta1c -m meta1s
-	pw groupmod meta1m -m meta1s,meta1q
-
 post-install:
 	${INSTALL_SCRIPT} ${WRKDIR}/sm.check.sh ${STAGEDIR}${PREFIX}/sbin/
 	${INSTALL_SCRIPT} ${WRKDIR}/sm.setup.sh ${STAGEDIR}${PREFIX}/sbin/

Added: head/mail/meta1/pkg-message
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/mail/meta1/pkg-message	Thu Jun  4 18:54:16 2015	(r388543)
@@ -0,0 +1,13 @@
+---------------------------------------------------
+on first installation please run:
+
+/usr/local/sbin/sm.setup.sh
+
+---------------------------------------------------
+to clean after permanent removal please run:
+
+rm -rf /usr/local/etc/meta1 /var/spool/meta1
+pw userdel meta1s meta1q meta1c meta1m meta1
+pw groupdel meta1s meta1q
+
+---------------------------------------------------

Modified: head/mail/meta1/pkg-plist
==============================================================================
--- head/mail/meta1/pkg-plist	Thu Jun  4 18:48:34 2015	(r388542)
+++ head/mail/meta1/pkg-plist	Thu Jun  4 18:54:16 2015	(r388543)
@@ -1,15 +1,3 @@
-@exec if ! pw groupshow meta1s 2>/dev/null; then pw groupadd meta1s -g 260; fi
-@exec if ! pw groupshow meta1q 2>/dev/null; then pw groupadd meta1q -g 261; fi
-@exec if ! pw groupshow meta1c 2>/dev/null; then pw groupadd meta1c -g 262; fi
-@exec if ! pw groupshow meta1m 2>/dev/null; then pw groupadd meta1m -g 263; fi
-@exec if ! pw groupshow meta1 2>/dev/null; then pw groupadd meta1 -g 264; fi
-@exec if ! pw usershow meta1s 2>/dev/null; then pw useradd meta1s -g meta1s -u 260 -h - -d /nonexistent -s %%NOLOGIN%% -c "MeTA1 SMTPS"; fi
-@exec if ! pw usershow meta1q 2>/dev/null; then pw useradd meta1q -g meta1q -u 261 -h - -d /nonexistent -s %%NOLOGIN%% -c "MeTA1 QMGR"; fi
-@exec if ! pw usershow meta1c 2>/dev/null; then pw useradd meta1c -g meta1c -u 262 -h - -d /nonexistent -s %%NOLOGIN%% -c "MeTA1 SMTPC"; fi
-@exec if ! pw usershow meta1m 2>/dev/null; then pw useradd meta1m -g meta1m -u 263 -h - -d /nonexistent -s %%NOLOGIN%% -c "MeTA1 misc"; fi
-@exec if ! pw usershow meta1 2>/dev/null; then pw useradd meta1 -g meta1 -u 264 -h - -d /nonexistent -s %%NOLOGIN%% -c "MeTA1 other"; fi
-@exec pw groupmod meta1c -m meta1s
-@exec pw groupmod meta1m -m meta1s,meta1q
 %%WITH_BDBINT%%bin/db_archive
 %%WITH_BDBINT%%bin/db_checkpoint
 %%WITH_BDBINT%%bin/db_deadlock
@@ -84,4 +72,3 @@ sbin/statit
 sbin/t-hostname
 sbin/t-getgroup
 sbin/tree
-@exec %D/sbin/sm.setup.sh



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