Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 May 2014 23:12:27 GMT
From:      Joseph Benden <joe@thrallingpenguin.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/190435: [patch] Add staging support to www/sit
Message-ID:  <201405302312.s4UNCRmc031650@cgiserv.freebsd.org>
Resent-Message-ID: <201405302320.s4UNK0t1075440@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         190435
>Category:       ports
>Synopsis:       [patch] Add staging support to www/sit
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri May 30 23:20:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     Joseph Benden
>Release:        FreeBSD 11
>Organization:
>Environment:
FreeBSD lucy 11.0-CURRENT FreeBSD 11.0-CURRENT #4 r264887: Thu Apr 24 12:43:46 MST 2014     root@lucy:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
Adds staging support to www/sit.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff --git a/www/sit/Makefile b/www/sit/Makefile
index 6ed5bd2..7fa1593 100644
--- a/www/sit/Makefile
+++ b/www/sit/Makefile
@@ -25,7 +25,6 @@ OPTIONS_DEFAULT=	IMAP MBSTRING
 IMAP_DESC=	Email Support
 MBSTRING_DESC=	Inbound email feature
 
-NO_STAGE=	yes
 .include <bsd.port.options.mk>
 
 .if ${PORT_OPTIONS:MIMAP}
@@ -41,17 +40,11 @@ USE_PHP+=	ldap
 .endif
 
 do-install:
-	${MKDIR} ${WWWDIR}
+	${MKDIR} ${STAGEDIR}${WWWDIR}
 	cd ${WRKSRC}; ${FIND} . \
-		| ${CPIO} -pdm -R ${WWWOWN}:${WWWGRP} ${WWWDIR}
-	${CHMOD} -R ${BINMODE} ${WWWDIR}
-	${FIND} ${WWWDIR} ! -type d | ${XARGS} ${CHMOD} ${NOBINMODE}
-
+		| ${CPIO} -pdm -R ${WWWOWN}:${WWWGRP} ${STAGEDIR}${WWWDIR}
+	${CHMOD} -R ${BINMODE} ${STAGEDIR}${WWWDIR}
+	${FIND} ${STAGEDIR}${WWWDIR} ! -type d | ${XARGS} ${CHMOD} ${NOBINMODE}
 	@${CAT} ${PKGMESSAGE}
 
-post-install:
-	@if [ -f ${WWWDIR}/config.inc.php ]; then \
-		${CP} -p ${WWWDIR}/config.inc.php ${WWWDIR}/config.inc.php.bak ; \
-	fi
-
 .include <bsd.port.mk>
diff --git a/www/sit/pkg-plist b/www/sit/pkg-plist
index 78b45a7..139a55a 100644
--- a/www/sit/pkg-plist
+++ b/www/sit/pkg-plist
@@ -34,7 +34,9 @@
 %%WWWDIR%%/calendar/week_planner.js.php
 %%WWWDIR%%/calendar/year.inc.php
 %%WWWDIR%%/chart.php
+@unexec if cmp -s %D/%%WWWDIR%%/config.inc.php %D/%%WWWDIR%%/config.inc-dist.php; then rm -f %D/%%WWWDIR%%/config.inc.php; fi
 %%WWWDIR%%/config.inc-dist.php
+@exec cp -n %D/%F %B/config.inc.php
 %%WWWDIR%%/config.php
 %%WWWDIR%%/contact_add.php
 %%WWWDIR%%/contact_delete.php


>Release-Note:
>Audit-Trail:
>Unformatted:



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