ports/173238: [PATCH] Stop www/owncloud clobbering customisations

Chris Rees crees at FreeBSD.org
Wed Oct 31 12:50:01 UTC 2012


>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 at 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:


More information about the freebsd-ports-bugs mailing list