ports/152562: [PATCH] www/phpbb3 pkg-plist deletes config.php file

Alexander Wittig alexander at wittig.name
Thu Nov 25 01:50:11 UTC 2010


>Number:         152562
>Category:       ports
>Synopsis:       [PATCH] www/phpbb3 pkg-plist deletes config.php file
>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:   Thu Nov 25 01:50:10 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Alexander Wittig <alexander at wittig.name>
>Release:        FreeBSD 8.2-PRERELEASE amd64
>Organization:
>Environment:
System: FreeBSD hotzenplotz.wittig.name 8.2-PRERELEASE FreeBSD 8.2-PRERELEASE #0: Wed Nov 24 16:31:48 CET 2010 root at hotzenplotz.wittig.name:/usr/obj/usr/src/sys/ALEX amd64


	
>Description:
	pkg-plist lists the configuration fiel for the board explicitly. Thus, it is always deleted on updates, eventhough the makefile has provisions to check if there is a config fil(it only creates an empty file by "touch config.php" if there is none)

	Another question: is there a reason why all files are installed as executable? Not only the .php files are, even the txt and other files. Possibly a "find . -type f -exec chmod 644 {} \;" is in order there at the end of installation...
	
>How-To-Repeat:
	Install port, edit config.php, the run portmaster / portupgarde / make deinstall reinstall or whatever. After that, config.php is empty
	
>Fix:
	Attached patch changes pkg-plist to mimick the behaviour of teh Makefile: if there is a config.php and it is not empty, then do not delete it. At installation time, create an empty config.php if none is there.
	

--- patch-pkg-plist.diff begins here ---
--- /usr/ports/www/phpbb3/pkg-plist	2010-11-23 10:43:37.000000000 +0100
+++ pkg-plist	2010-11-25 02:27:09.000000000 +0100
@@ -128,7 +128,8 @@
 %%PHPBBDIR%%/cache/.htaccess
 %%PHPBBDIR%%/cache/index.htm
 %%PHPBBDIR%%/common.php
-%%PHPBBDIR%%/config.php
+ at unexec if [ ! -s %%PHPBBDIR%%/config.php ]; then rm -f %%PHPBBDIR%%/config.php; fi
+ at exec if [ ! -f %%PHPBBDIR%%/config.php ]; then touch %%PHPBBDIR%%/config.php; fi
 %%PHPBBDIR%%/cron.php
 %%PHPBBDIR%%/docs/AUTHORS
 %%PHPBBDIR%%/docs/CHANGELOG.html
--- patch-pkg-plist.diff ends here ---


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



More information about the freebsd-ports-bugs mailing list