From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Nov 25 01:50:11 2010 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5F4111065672 for ; Thu, 25 Nov 2010 01:50:11 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 22FC08FC15 for ; Thu, 25 Nov 2010 01:50:11 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id oAP1oBp6032038 for ; Thu, 25 Nov 2010 01:50:11 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id oAP1oA8W032037; Thu, 25 Nov 2010 01:50:10 GMT (envelope-from gnats) Resent-Date: Thu, 25 Nov 2010 01:50:10 GMT Resent-Message-Id: <201011250150.oAP1oA8W032037@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Alexander Wittig Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0386D1065674 for ; Thu, 25 Nov 2010 01:43:15 +0000 (UTC) (envelope-from root@wittig.name) Received: from hotzenplotz.wittig.name (unknown [IPv6:2a02:180:1:1:1c:c068:de48:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8681F8FC25 for ; Thu, 25 Nov 2010 01:43:14 +0000 (UTC) Received: from root by hotzenplotz.wittig.name with local (Exim 4.72 (FreeBSD)) (envelope-from ) id 1PLQrh-0003M6-Dw for FreeBSD-gnats-submit@freebsd.org; Thu, 25 Nov 2010 02:43:13 +0100 Message-Id: Date: Thu, 25 Nov 2010 02:43:13 +0100 From: Alexander Wittig To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/152562: [PATCH] www/phpbb3 pkg-plist deletes config.php file X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Alexander Wittig List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Nov 2010 01:50:11 -0000 >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 >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@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 +@unexec if [ ! -s %%PHPBBDIR%%/config.php ]; then rm -f %%PHPBBDIR%%/config.php; fi +@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: