From owner-freebsd-ports-bugs@FreeBSD.ORG Wed May 21 19:20:00 2014 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8D62C7D4 for ; Wed, 21 May 2014 19:20:00 +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 694B726A4 for ; Wed, 21 May 2014 19:20:00 +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 s4LJK0P1072491 for ; Wed, 21 May 2014 19:20:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s4LJK0b3072490; Wed, 21 May 2014 19:20:00 GMT (envelope-from gnats) Resent-Date: Wed, 21 May 2014 19:20:00 GMT Resent-Message-Id: <201405211920.s4LJK0b3072490@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 [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7CC3D4AA for ; Wed, 21 May 2014 19:13:08 +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 69D8B263C for ; Wed, 21 May 2014 19:13:08 +0000 (UTC) Received: from cgiserv.freebsd.org ([127.0.1.6]) by cgiserv.freebsd.org (8.14.8/8.14.8) with ESMTP id s4LJD8YE013929 for ; Wed, 21 May 2014 19:13:08 GMT (envelope-from nobody@cgiserv.freebsd.org) Received: (from nobody@localhost) by cgiserv.freebsd.org (8.14.8/8.14.8/Submit) id s4LJD8Ap013928; Wed, 21 May 2014 19:13:08 GMT (envelope-from nobody) Message-Id: <201405211913.s4LJD8Ap013928@cgiserv.freebsd.org> Date: Wed, 21 May 2014 19:13:08 GMT From: Joseph Benden To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: ports/190083: [patch] Add staging support to www/foswiki 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: Wed, 21 May 2014 19:20:00 -0000 >Number: 190083 >Category: ports >Synopsis: [patch] Add staging support to www/foswiki >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: Wed May 21 19:20:00 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/foswiki. >How-To-Repeat: >Fix: Patch attached with submission follows: diff --git a/www/foswiki/Makefile b/www/foswiki/Makefile index 9d11270..0d1a32f 100644 --- a/www/foswiki/Makefile +++ b/www/foswiki/Makefile @@ -26,7 +26,6 @@ OPTINT_DESC= Install Perl modules for intl character support OPTOTH_DESC= Install other optional Perl modules APACHE_DESC= Install Apache web server and sample config file -NO_STAGE= yes .include .if ${PORT_OPTIONS:MOPTINT} @@ -97,9 +96,10 @@ post-patch: post-install: .if ${PORT_OPTIONS:MAPACHE} - @if [ -d "${CONFDIR}" ]; then \ + @${MKDIR} ${STAGEDIR}${CONFDIR} + @if [ -d "${STAGEDIR}${CONFDIR}" ]; then \ ${INSTALL_DATA} ${WRKSRC}/foswiki_httpd_conf.txt \ - ${CONFDIR}/foswiki.conf.sample; \ + ${STAGEDIR}${CONFDIR}/foswiki.conf.sample; \ else \ ${ECHO_MSG} "" ; \ ${ECHO_MSG} "Please check your Apache installation -" ; \ diff --git a/www/foswiki/bsd.foswiki.mk b/www/foswiki/bsd.foswiki.mk index d77a671..44244d0 100644 --- a/www/foswiki/bsd.foswiki.mk +++ b/www/foswiki/bsd.foswiki.mk @@ -15,7 +15,7 @@ PORTVERSION?= 0.0.${SVNREV} .if ${PORTNAME} == foswiki .if ${.TARGETS} == make-port -PNAME= +PNAME= .else PNAME= core .endif @@ -40,7 +40,6 @@ PLIST_SUB+= FWDIR=${FWDIR:S|^${PREFIX}/||} SUB_LIST+= FWDIR=${FWDIR} FIND=${FIND} CHMOD=${CHMOD} CHOWN=${CHOWN} \ TOUCH=${TOUCH} WWWOWN=${WWWOWN} WWWGRP=${WWWGRP} \ CONFDIR=${CONFDIR} -SUB_FILES+= pkg-install MAINTAINER?= glarkin@FreeBSD.org RUN_DEPENDS+= ${FWDEP:C/([^=<>]*)([=<>]*)(.*)/foswiki-\1\20.0.\3:${PORTSDIR}\/www\/foswiki-\1/} @@ -60,12 +59,11 @@ create-plist: extract @${ECHO_CMD} '@dirrm %%FWDIR%%' >> ${PLIST} do-install: - @${INSTALL} -d ${FWDIR}/ - @cd ${WRKSRC}/ && ${COPYTREE_SHARE} . ${FWDIR}/ + @${INSTALL} -d ${STAGEDIR}${FWDIR}/ + @cd ${WRKSRC}/ && ${COPYTREE_SHARE} . ${STAGEDIR}${FWDIR}/ .if ${PORTNAME} == foswiki - @${INSTALL_DATA} ${WRKDIR}/LocalSite.cfg ${WWWDIR}/lib + @${INSTALL_DATA} ${WRKDIR}/LocalSite.cfg ${STAGEDIR}${WWWDIR}/lib/LocalSite.cfg.sample .endif - ${SETENV} ${SCRIPTS_ENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL make-fwdep: extract @echo "FWDEP=`grep -v ^# ${WRKSRC}/lib/*[wW]iki/*/${PORTNAME}/DEPENDENCIES |\ @@ -124,4 +122,5 @@ make-port: sed -E 's|.+[wW]iki:Main[./]||g;s|^|Author: |;s| | |g;s| $$||;\ s|([a-z]) |\1, |;s|([a-z])([A-Z])|\1 \2|g' >> pkg-descr &&\ echo "WWW: http://www.foswiki.org/Support/$$nnam" >> pkg-descr;\ + done diff --git a/www/foswiki/files/pkg-install.in b/www/foswiki/files/pkg-install.in deleted file mode 100644 index 82244c5..0000000 --- a/www/foswiki/files/pkg-install.in +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# - -WWWDIR=%%WWWDIR%% -FIND=%%FIND%% -CHMOD=%%CHMOD%% -CHOWN=%%CHOWN%% -TOUCH=%%TOUCH%% -WWWOWN=%%WWWOWN%% -WWWGRP=%%WWWGRP%% - -case $2 in - PRE-INSTALL) - ;; - POST-INSTALL) - cd ${WWWDIR}/ - ${FIND} . -type d -print -exec ${CHMOD} 755 {} \; - ${FIND} data -name '*.txt' -type f -exec ${CHMOD} 644 {} \; - ${FIND} data pub -name '*,v' -type f -exec ${CHMOD} 444 {} \; - ${FIND} lib -type f -exec ${CHMOD} 444 {} \; - ${FIND} locale -type f -exec ${CHMOD} 444 {} \; - ${FIND} pub -type f -exec ${CHMOD} 644 {} \; - ${FIND} bin -type f -exec ${CHMOD} 555 {} \; - ${FIND} templates -type f -exec ${CHMOD} 444 {} \; - ${FIND} tools -type f -exec ${CHMOD} 555 {} \; - ${TOUCH} data/.htpasswd - ${CHMOD} 644 data/.htpasswd - ${CHMOD} 644 data/mime.types - ${CHMOD} 644 bin/LocalLib.cfg.txt bin/.htaccess.txt - ${CHMOD} 444 bin/setlib.cfg - ${CHMOD} 644 lib/LocalSite.cfg - ${CHMOD} 444 tools/extender.pl - ${CHMOD} 444 working/tmp/README working/README \ - working/registration_approvals/README \ - working/work_areas/README - ${CHMOD} 660 working/.htaccess - ${CHMOD} 444 AUTHORS COPYING COPYRIGHT index.html \ - INSTALL.html LICENSE pub-htaccess.txt readme.txt \ - robots.txt root-htaccess.txt subdir-htaccess.txt \ - foswiki_httpd_conf.txt ReleaseNotes01x01.html - ${CHOWN} -R ${WWWOWN}:${WWWGRP} . - ;; - *) - echo "Unexpected Argument $2!!!" - exit 1 - ;; -esac -exit 0 diff --git a/www/foswiki/pkg-plist b/www/foswiki/pkg-plist index 0d84bcc..54a0886 100644 --- a/www/foswiki/pkg-plist +++ b/www/foswiki/pkg-plist @@ -1,4 +1,6 @@ %%NOAPACHE%%%%CONFDIR%%/foswiki.conf.sample +@owner %%WWWOWN%% +@group %%WWWGRP%% %%WWWDIR%%/AUTHORS %%WWWDIR%%/COPYING %%WWWDIR%%/COPYRIGHT @@ -1141,7 +1143,9 @@ %%WWWDIR%%/lib/Foswiki/Validation.pm %%WWWDIR%%/lib/Foswiki/ValidationException.pm %%WWWDIR%%/lib/Foswiki/WebFilter.pm -@unexec if [ "`md5 -q %D/%%WWWDIR%%/lib/LocalSite.cfg`" = "c648a70f925757e7e982a5a13d47cfe7" ]; then rm -f %D/%%WWWDIR%%/lib/LocalSite.cfg; fi +@unexec if cmp -s %D/%%WWWDIR%%/lib/LocalSite.cfg %D/%%WWWDIR%%/lib/LocalSite.cfg.sample; then rm -f %D/%%WWWDIR%%/lib/LocalSite.cfg; fi +%%WWWDIR%%/lib/LocalSite.cfg.sample +@exec cp -n %D/%F %B/%%WWWDIR%%/lib/LocalSite.cfg %%WWWDIR%%/lib/MANIFEST %%WWWDIR%%/lib/Monitor.pm %%WWWDIR%%/lib/TWiki.pm @@ -6139,6 +6143,16 @@ %%WWWDIR%%/working/registration_approvals/README %%WWWDIR%%/working/tmp/README %%WWWDIR%%/working/work_areas/README +@exec find %%WWWDIR%% -type d -exec ${CHMOD} 755 {} \; +@exec find %%WWWDIR%%/data -name '*.txt' -type f -exec ${CHMOD} 644 {} \; +@exec find %%WWWDIR%%/data %%WWWDIR%%/pub -name '*,v' -type f -exec ${CHMOD} 444 {} \; +@exec find %%WWWDIR%%/lib -type f -exec ${CHMOD} 444 {} \; +@exec find %%WWWDIR%%/locale -type f -exec ${CHMOD} 444 {} \; +@exec find %%WWWDIR%%/pub -type f -exec ${CHMOD} 644 {} \; +@exec find %%WWWDIR%%/bin -type f -exec ${CHMOD} 555 {} \; +@exec find %%WWWDIR%%/templates -type f -exec ${CHMOD} 444 {} \; +@exec find %%WWWDIR%%/tools -type f -exec ${CHMOD} 555 {} \; +@exec chmod 644 %%WWWDIR%%/data/mime.types @dirrmtry %%WWWDIR%%/working/work_areas @dirrmtry %%WWWDIR%%/working/tmp @dirrmtry %%WWWDIR%%/working/registration_approvals >Release-Note: >Audit-Trail: >Unformatted: