From owner-freebsd-ports-bugs@FreeBSD.ORG Thu May 22 15:40:01 2014 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F29EE7B9 for ; Thu, 22 May 2014 15:40:01 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF7292E5C for ; Thu, 22 May 2014 15:40:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s4MFe1AV040392 for ; Thu, 22 May 2014 15:40:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s4MFe12t040391; Thu, 22 May 2014 15:40:01 GMT (envelope-from gnats) Resent-Date: Thu, 22 May 2014 15:40:01 GMT Resent-Message-Id: <201405221540.s4MFe12t040391@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, Joseph Benden Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 194D14E8 for ; Thu, 22 May 2014 15:34:49 +0000 (UTC) Received: from cgiserv.freebsd.org (cgiserv.freebsd.org [IPv6:2001:1900:2254:206a::50:4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E0C482E0E for ; Thu, 22 May 2014 15:34:48 +0000 (UTC) Received: from cgiserv.freebsd.org ([127.0.1.6]) by cgiserv.freebsd.org (8.14.8/8.14.8) with ESMTP id s4MFYmmu007927 for ; Thu, 22 May 2014 15:34:48 GMT (envelope-from nobody@cgiserv.freebsd.org) Received: (from nobody@localhost) by cgiserv.freebsd.org (8.14.8/8.14.8/Submit) id s4MFYmEn007925; Thu, 22 May 2014 15:34:48 GMT (envelope-from nobody) Message-Id: <201405221534.s4MFYmEn007925@cgiserv.freebsd.org> Date: Thu, 22 May 2014 15:34:48 GMT From: Joseph Benden To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: ports/190114: [patch] Add staging support to www/geeklog X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 May 2014 15:40:02 -0000 >Number: 190114 >Category: ports >Synopsis: [patch] Add staging support to www/geeklog >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 May 22 15:40:01 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/geeklog. >How-To-Repeat: >Fix: Patch attached with submission follows: diff --git a/www/geeklog/Makefile b/www/geeklog/Makefile index 7bceb50..a1563a6 100644 --- a/www/geeklog/Makefile +++ b/www/geeklog/Makefile @@ -16,24 +16,20 @@ USE_MYSQL= yes NO_BUILD= yes USE_PHP= yes -NO_STAGE= yes do-install: - @${INSTALL} -o ${WWWOWN} -g ${WWWGRP} -m 555 -d ${WWWDIR} + @${INSTALL} -o ${WWWOWN} -g ${WWWGRP} -m 555 -d ${STAGEDIR}${WWWDIR} @(cd ${WRKSRC} && \ - ${COPYTREE_SHARE} \* ${WWWDIR} "! -name db-config.php \ + ${COPYTREE_SHARE} \* ${STAGEDIR}${WWWDIR} "! -name db-config.php \ -or -name siteconfig.php") - @if [ ! -f ${WWWDIR}/db-config.php ]; then \ - ${INSTALL_DATA} ${WRKSRC}/db-config.php ${WWWDIR}/db-config.php; \ - fi - @if [ ! -f ${WWWDIR}/public_html/siteconfig.php ]; then \ - {INSTALL_DATA} ${WRKSRC}/public_html/siteconfig.php \ - ${WWWDIR}/public_html/siteconfig.php; \ - fi + @${INSTALL_DATA} ${WRKSRC}/db-config.php ${STAGEDIR}${WWWDIR}/db-config.php.sample; + @${INSTALL_DATA} ${WRKSRC}/public_html/siteconfig.php \ + ${STAGEDIR}${WWWDIR}/public_html/siteconfig.php.sample + @${RM} ${STAGEDIR}${WWWDIR}/public_html/siteconfig.php post-install: - @${CHOWN} -R ${WWWOWN}:${WWWGRP} ${WWWDIR} + @${CHOWN} -R ${WWWOWN}:${WWWGRP} ${STAGEDIR}${WWWDIR} .for i in db-config.php error.log siteconfig.php geeklog.rss - @${FIND} ${WWWDIR} -name ${i} | ${XARGS} ${CHMOD} 755 + @${FIND} ${STAGEDIR}${WWWDIR} -name ${i} | ${XARGS} ${CHMOD} 755 .endfor @${CAT} ${PKGMESSAGE} diff --git a/www/geeklog/pkg-plist b/www/geeklog/pkg-plist index 745b1f5..d3cbb34 100644 --- a/www/geeklog/pkg-plist +++ b/www/geeklog/pkg-plist @@ -1,5 +1,9 @@ -@unexec if [ "`md5 -q %D/%%WWWDIR%%/db-config.php`" = "e152b8b4ebd7e8b5bf05c9466f618bfa" ]; then rm -f %D/%%WWWDIR%%/db-config.php; fi -@unexec if [ "`md5 -q %D/%%WWWDIR%%/public_html/siteconfig.php`" = "a713c0e73d143db728d350010f7cf289" ]; then rm -f %D/%%WWWDIR%%/public_html/siteconfig.php; fi +@unexec if cmp -s %D/%%WWWDIR%%/db-config.php %D/%%WWWDIR%%/db-config.php.sample; then rm -f %D/%%WWWDIR%%/db-config.php; fi +%%WWWDIR%%/db-config.php.sample +@exec cp -n %D/%F %B/db-config.php +@unexec if cmp -s %D/%%WWWDIR%%/public_html/siteconfig.php %D/%%WWWDIR%%/public_html/siteconfig.php.sample; then rm -f %D/%%WWWDIR%%/public_html/siteconfig.php; fi +%%WWWDIR%%/public_html/siteconfig.php.sample +@exec cp -n %D/%F %B/siteconfig.php %%WWWDIR%%/INSTALL %%WWWDIR%%/backups/README %%WWWDIR%%/data/README >Release-Note: >Audit-Trail: >Unformatted: