Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Oct 2012 12:43:47 +0000 (GMT)
From:      Chris Rees <crees@FreeBSD.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/173238: [PATCH] Stop www/owncloud clobbering customisations
Message-ID:  <20121031124347.7D2E44B253@pegasus.bayofrum.net>
Resent-Message-ID: <201210311250.q9VCo0Ss024991@freefall.freebsd.org>

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

>Number:         173238
>Category:       ports
>Synopsis:       [PATCH] Stop www/owncloud clobbering customisations
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Oct 31 12:50:00 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Chris Rees
>Release:        FreeBSD 9.0-RELEASE amd64
>Organization:
>Environment:
System: FreeBSD pegasus.bayofrum.net 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Sun Apr 29 12:29:02 BST 2012 root@pegasus.bayofrum.net:/usr/obj/usr/src/sys/PEGASUS amd64


	
>Description:
	www/owncloud uses an incorrect method to build its plist, such that on first install, the plist is correct, but once it has been installed again it also includes all files under ${WWWDIR}, including a carefully hand-crafted config.php....

>How-To-Repeat:
	
>Fix:

	The correct way to build a plist when this install method is used is to use WRKSRC.

	An UPDATING note and probably a heads-up on ports@ would be nice to warn people to backup before upgrading so they don't lose their config files!

--- owncloud-noclobber.diff begins here ---
Index: Makefile
===================================================================
--- Makefile	(revision 306739)
+++ Makefile	(working copy)
@@ -30,9 +30,11 @@
 
 post-install:
 	@${CAT} ${PKGMESSAGE}
-	@${FIND} -s -d ${WWWDIR} -type f -print | \
-		${SED} -e "s#${PREFIX}/##g" >> ${TMPPLIST}
-	@${FIND} -s -d ${WWWDIR} -type d  -print | \
-		${SED} -E -e "s#${PREFIX}/#@dirrm #g" >> ${TMPPLIST}
+	@cd ${WRKSRC} && \
+	    ${FIND} -s -d . -type f -print | \
+		${SED} -e "s#^\.#${WWWDIR_REL}#" >> ${TMPPLIST}
+	@cd ${WRKSRC} && \
+	    ${FIND} -s -d . -type d  -print | \
+		${SED} -e "s#^\.#@dirrm ${WWWDIR_REL}#" >> ${TMPPLIST}
 
 .include <bsd.port.mk>
--- owncloud-noclobber.diff ends here ---


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



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