From mat@aragorn.in.absolight.net  Wed Dec 25 19:54:07 2013
Return-Path: <mat@aragorn.in.absolight.net>
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 8379B662
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 25 Dec 2013 19:54:07 +0000 (UTC)
Received: from prod2.absolight.net (mx3.absolight.net [IPv6:2a01:678:2:100::25])
	(using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 1DCC81EFF
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 25 Dec 2013 19:54:04 +0000 (UTC)
Received: from prod2.absolight.net (localhost [127.0.0.1])
	by prod2.absolight.net (Postfix) with ESMTP id 1C253BDC56
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 25 Dec 2013 20:54:02 +0100 (CET)
Received: from gw.in.absolight.net (gw-ecl.in.absolight.net [79.143.241.69])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "gw.in.absolight.net", Issuer "CA Cert Signing Authority" (not verified))
	by prod2.absolight.net (Postfix) with ESMTPSA id ED53DBDC44
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 25 Dec 2013 20:54:00 +0100 (CET)
Received: from aragorn.in.absolight.net (aragorn.in.absolight.net [79.143.241.225])
	by gw.in.absolight.net (Postfix) with ESMTP id 603D56124
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 25 Dec 2013 20:54:00 +0100 (CET)
Received: by aragorn.in.absolight.net (Postfix, from userid 1000)
	id C41A014269C; Wed, 25 Dec 2013 20:53:59 +0100 (CET)
Message-Id: <20131225195359.C41A014269C@aragorn.in.absolight.net>
Date: Wed, 25 Dec 2013 20:53:59 +0100 (CET)
From: Mathieu Arnold <mat@FreeBSD.org>
To: FreeBSD-gnats-submit@freebsd.org
Subject: [PATCH] net-mgmt/nagios: Convert to staging and fix www config.
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         185187
>Category:       ports
>Synopsis:       [PATCH] net-mgmt/nagios: Convert to staging and fix www config.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    demon
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Dec 25 20:00:00 UTC 2013
>Closed-Date:    Thu Dec 26 11:44:58 UTC 2013
>Last-Modified:  Thu Dec 26 13:20:01 UTC 2013
>Originator:     Mathieu Arnold
>Release:        FreeBSD 9.2-RELEASE i386
>Organization:
Absolight
>Environment:
System: FreeBSD aragorn.in.absolight.net 9.2-RELEASE FreeBSD 9.2-RELEASE #0 r255898: Fri Sep 27 03:52:52 UTC
>Description:
- Don't overwrite config.inc.php, it can be modified
- Convert to staging
- Use new LIB_DEPENDS

Generated with FreeBSD Port Tools 0.99_11 (mode: change, diff: SVN)
>How-To-Repeat:
>Fix:

--- nagios-3.5.1.patch begins here ---
Index: Makefile
===================================================================
--- Makefile	(revision 337448)
+++ Makefile	(working copy)
@@ -11,10 +11,10 @@
 
 LICENSE=	GPLv2
 
-LIB_DEPENDS=	gd:${PORTSDIR}/graphics/gd
+LIB_DEPENDS=	libgd.so:${PORTSDIR}/graphics/gd
 RUN_DEPENDS=	${LOCALBASE}/libexec/nagios/check_nagios:${PORTSDIR}/net-mgmt/nagios-plugins
 
-USES=		iconv perl5
+USES=		iconv perl5 uidfix
 USE_PERL5=	build
 USE_AUTOTOOLS=	autoconf libltdl
 USE_PHP=	yes
@@ -83,32 +83,21 @@
 EVENT_BROKER_DESC=	Enable event broker functionality
 UNHANDLED_HACK_DESC=	Display passive checks in unhandled queries
 
-NO_STAGE=	yes
-.include <bsd.port.options.mk>
+OPTIONS_SUB=
 
-.if ${PORT_OPTIONS:MEMBEDDED_PERL}
-USE_PERL5+=	run
-CONFIGURE_ARGS+=--enable-embedded-perl \
-		--with-perlcache
-PLIST_SUB+=	EMBEDDED_PERL=""
-.else
-PLIST_SUB+=	EMBEDDED_PERL="@comment "
-.endif
+EMBEDDED_PERL_USE=	perl5=run
+EMBEDDED_PERL_CONFIGURE_ENABLE=	embedded-perl
+EMBEDDED_PERL_CONFIGURE_WITH=	perlcache
+NANOSLEEP_CONFIGURE_ENABLE=	nanosleep
+EVENT_BROKER_CONFIGURE_ENABLE=	event-broker
 
-.if ${PORT_OPTIONS:MNANOSLEEP}
-CONFIGURE_ARGS+=--enable-nanosleep
-.endif
-
-.if ${PORT_OPTIONS:MEVENT_BROKER}
-CONFIGURE_ARGS+=--enable-event-broker
-.else
-CONFIGURE_ARGS+=--disable-event-broker
-.endif
-
 post-extract:
 	@${MV} ${WRKDIR}/${PORTNAME} ${WRKSRC}
 
+.include <bsd.port.options.mk>
+
 post-patch:
+	@${REINPLACE_CMD} -e '/^INSTALL_OPTS=/d' `${FIND} ${WRKSRC} -name Makefile.in`
 .if ${PORT_OPTIONS:MUNHANDLED_HACK}
 	@${REINPLACE_CMD} -e 's#;serviceprops=42\&#;serviceprops=10\&#g' \
 		-e 's#;hostprops=42\"#;hostprops=10\"#g' ${WRKSRC}/html/side.php
@@ -115,9 +104,6 @@
 .endif
 
 post-install:
-	@${CHMOD} 775 ${NAGIOSDIR} ${NAGIOSDIR}/archives ${NAGIOSDIR}/checkresults ${NAGIOSDIR}/rw
-	@${CHOWN} ${NAGIOSUSER}:${NAGIOSGROUP} ${NAGIOSDIR} ${NAGIOSDIR}/archives ${NAGIOSDIR}/checkresults
-	@${CHOWN} ${NAGIOSUSER}:${WWWGRP} ${NAGIOSDIR}/rw
-	@${CAT} ${PKGMESSAGE}
+	@${MV} ${STAGEDIR}${PREFIX}/${NAGIOSWWWDIR}/config.inc.php ${STAGEDIR}${PREFIX}/${NAGIOSWWWDIR}/config.inc.php.sample
 
 .include <bsd.port.mk>
Index: pkg-plist
===================================================================
--- pkg-plist	(revision 337448)
+++ pkg-plist	(working copy)
@@ -33,7 +33,9 @@
 %%NAGIOSWWWDIR%%/cgi-bin/summary.cgi
 %%NAGIOSWWWDIR%%/cgi-bin/tac.cgi
 %%NAGIOSWWWDIR%%/cgi-bin/trends.cgi
-%%NAGIOSWWWDIR%%/config.inc.php
+@unexec if cmp -s %D/%%NAGIOSWWWDIR%%/config.inc.php.sample %D/%%NAGIOSWWWDIR%%/config.inc.php; then rm -f %D/%%NAGIOSWWWDIR%%/config.inc.php; fi
+%%NAGIOSWWWDIR%%/config.inc.php.sample
+@exec if [ ! -f %D/%%NAGIOSWWWDIR%%/config.inc.php ] ; then cp -p %D/%F %B/config.inc.php; fi
 %%NAGIOSWWWDIR%%/contexthelp/A1.html
 %%NAGIOSWWWDIR%%/contexthelp/A2.html
 %%NAGIOSWWWDIR%%/contexthelp/A3.html
--- nagios-3.5.1.patch ends here ---

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->demon 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Wed Dec 25 20:00:08 UTC 2013 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=185187 
State-Changed-From-To: open->closed 
State-Changed-By: demon 
State-Changed-When: Thu Dec 26 11:44:41 UTC 2013 
State-Changed-Why:  
Patch committed, thank you. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=185187 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/185187: commit references a PR
Date: Thu, 26 Dec 2013 11:44:28 +0000 (UTC)

 Author: demon
 Date: Thu Dec 26 11:44:20 2013
 New Revision: 337483
 URL: http://svnweb.freebsd.org/changeset/ports/337483
 
 Log:
   Do not overwrite config.inc.php;
   Convert to staging;
   Use new LIB_DEPENDS format.
   
   PR:		185187
   Submitted by:	mat
 
 Modified:
   head/net-mgmt/nagios/Makefile
   head/net-mgmt/nagios/pkg-plist
 
 Modified: head/net-mgmt/nagios/Makefile
 ==============================================================================
 --- head/net-mgmt/nagios/Makefile	Thu Dec 26 11:42:03 2013	(r337482)
 +++ head/net-mgmt/nagios/Makefile	Thu Dec 26 11:44:20 2013	(r337483)
 @@ -11,10 +11,10 @@ COMMENT=	Extremely powerful network moni
  
  LICENSE=	GPLv2
  
 -LIB_DEPENDS=	gd:${PORTSDIR}/graphics/gd
 +LIB_DEPENDS=	libgd.so:${PORTSDIR}/graphics/gd
  RUN_DEPENDS=	${LOCALBASE}/libexec/nagios/check_nagios:${PORTSDIR}/net-mgmt/nagios-plugins
  
 -USES=		iconv perl5
 +USES=		iconv perl5 uidfix
  USE_PERL5=	build
  USE_AUTOTOOLS=	autoconf libltdl
  USE_PHP=	yes
 @@ -83,41 +83,27 @@ NANOSLEEP_DESC=		Use nanosleep in event 
  EVENT_BROKER_DESC=	Enable event broker functionality
  UNHANDLED_HACK_DESC=	Display passive checks in unhandled queries
  
 -NO_STAGE=	yes
 -.include <bsd.port.options.mk>
 -
 -.if ${PORT_OPTIONS:MEMBEDDED_PERL}
 -USE_PERL5+=	run
 -CONFIGURE_ARGS+=--enable-embedded-perl \
 -		--with-perlcache
 -PLIST_SUB+=	EMBEDDED_PERL=""
 -.else
 -PLIST_SUB+=	EMBEDDED_PERL="@comment "
 -.endif
 -
 -.if ${PORT_OPTIONS:MNANOSLEEP}
 -CONFIGURE_ARGS+=--enable-nanosleep
 -.endif
 +OPTIONS_SUB=
  
 -.if ${PORT_OPTIONS:MEVENT_BROKER}
 -CONFIGURE_ARGS+=--enable-event-broker
 -.else
 -CONFIGURE_ARGS+=--disable-event-broker
 -.endif
 +EMBEDDED_PERL_USE=	perl5=run
 +EMBEDDED_PERL_CONFIGURE_ENABLE=	embedded-perl
 +EMBEDDED_PERL_CONFIGURE_WITH=	perlcache
 +NANOSLEEP_CONFIGURE_ENABLE=	nanosleep
 +EVENT_BROKER_CONFIGURE_ENABLE=	event-broker
  
  post-extract:
  	@${MV} ${WRKDIR}/${PORTNAME} ${WRKSRC}
  
 +.include <bsd.port.options.mk>
 +
  post-patch:
 +	@${REINPLACE_CMD} -e '/^INSTALL_OPTS=/d' `${FIND} ${WRKSRC} -name Makefile.in`
  .if ${PORT_OPTIONS:MUNHANDLED_HACK}
  	@${REINPLACE_CMD} -e 's#;serviceprops=42\&#;serviceprops=10\&#g' \
  		-e 's#;hostprops=42\"#;hostprops=10\"#g' ${WRKSRC}/html/side.php
  .endif
  
  post-install:
 -	@${CHMOD} 775 ${NAGIOSDIR} ${NAGIOSDIR}/archives ${NAGIOSDIR}/checkresults ${NAGIOSDIR}/rw
 -	@${CHOWN} ${NAGIOSUSER}:${NAGIOSGROUP} ${NAGIOSDIR} ${NAGIOSDIR}/archives ${NAGIOSDIR}/checkresults
 -	@${CHOWN} ${NAGIOSUSER}:${WWWGRP} ${NAGIOSDIR}/rw
 -	@${CAT} ${PKGMESSAGE}
 +	@${MV} ${STAGEDIR}${PREFIX}/${NAGIOSWWWDIR}/config.inc.php ${STAGEDIR}${PREFIX}/${NAGIOSWWWDIR}/config.inc.php.sample
  
  .include <bsd.port.mk>
 
 Modified: head/net-mgmt/nagios/pkg-plist
 ==============================================================================
 --- head/net-mgmt/nagios/pkg-plist	Thu Dec 26 11:42:03 2013	(r337482)
 +++ head/net-mgmt/nagios/pkg-plist	Thu Dec 26 11:44:20 2013	(r337483)
 @@ -33,7 +33,9 @@ etc/nagios/resource.cfg-sample
  %%NAGIOSWWWDIR%%/cgi-bin/summary.cgi
  %%NAGIOSWWWDIR%%/cgi-bin/tac.cgi
  %%NAGIOSWWWDIR%%/cgi-bin/trends.cgi
 -%%NAGIOSWWWDIR%%/config.inc.php
 +@unexec if cmp -s %D/%%NAGIOSWWWDIR%%/config.inc.php.sample %D/%%NAGIOSWWWDIR%%/config.inc.php; then rm -f %D/%%NAGIOSWWWDIR%%/config.inc.php; fi
 +%%NAGIOSWWWDIR%%/config.inc.php.sample
 +@exec if [ ! -f %D/%%NAGIOSWWWDIR%%/config.inc.php ] ; then cp -p %D/%F %B/config.inc.php; fi
  %%NAGIOSWWWDIR%%/contexthelp/A1.html
  %%NAGIOSWWWDIR%%/contexthelp/A2.html
  %%NAGIOSWWWDIR%%/contexthelp/A3.html
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/185187: commit references a PR
Date: Thu, 26 Dec 2013 13:17:34 +0000 (UTC)

 Author: mat
 Date: Thu Dec 26 13:17:26 2013
 New Revision: 337511
 URL: http://svnweb.freebsd.org/changeset/ports/337511
 
 Log:
   MFH: r337483
   
   Do not overwrite config.inc.php;
   Convert to staging;
   Use new LIB_DEPENDS format.
   
   PR:		185187
   Submitted by:	mat
   
   Approved by:	portmgr (implicit)
 
 Modified:
   branches/2014Q1/net-mgmt/nagios/Makefile
   branches/2014Q1/net-mgmt/nagios/pkg-plist
 Directory Properties:
   branches/2014Q1/   (props changed)
 
 Modified: branches/2014Q1/net-mgmt/nagios/Makefile
 ==============================================================================
 --- branches/2014Q1/net-mgmt/nagios/Makefile	Thu Dec 26 13:17:15 2013	(r337510)
 +++ branches/2014Q1/net-mgmt/nagios/Makefile	Thu Dec 26 13:17:26 2013	(r337511)
 @@ -11,10 +11,10 @@ COMMENT=	Extremely powerful network moni
  
  LICENSE=	GPLv2
  
 -LIB_DEPENDS=	gd:${PORTSDIR}/graphics/gd
 +LIB_DEPENDS=	libgd.so:${PORTSDIR}/graphics/gd
  RUN_DEPENDS=	${LOCALBASE}/libexec/nagios/check_nagios:${PORTSDIR}/net-mgmt/nagios-plugins
  
 -USES=		iconv perl5
 +USES=		iconv perl5 uidfix
  USE_PERL5=	build
  USE_AUTOTOOLS=	autoconf libltdl
  USE_PHP=	yes
 @@ -83,41 +83,27 @@ NANOSLEEP_DESC=		Use nanosleep in event 
  EVENT_BROKER_DESC=	Enable event broker functionality
  UNHANDLED_HACK_DESC=	Display passive checks in unhandled queries
  
 -NO_STAGE=	yes
 -.include <bsd.port.options.mk>
 -
 -.if ${PORT_OPTIONS:MEMBEDDED_PERL}
 -USE_PERL5+=	run
 -CONFIGURE_ARGS+=--enable-embedded-perl \
 -		--with-perlcache
 -PLIST_SUB+=	EMBEDDED_PERL=""
 -.else
 -PLIST_SUB+=	EMBEDDED_PERL="@comment "
 -.endif
 -
 -.if ${PORT_OPTIONS:MNANOSLEEP}
 -CONFIGURE_ARGS+=--enable-nanosleep
 -.endif
 +OPTIONS_SUB=
  
 -.if ${PORT_OPTIONS:MEVENT_BROKER}
 -CONFIGURE_ARGS+=--enable-event-broker
 -.else
 -CONFIGURE_ARGS+=--disable-event-broker
 -.endif
 +EMBEDDED_PERL_USE=	perl5=run
 +EMBEDDED_PERL_CONFIGURE_ENABLE=	embedded-perl
 +EMBEDDED_PERL_CONFIGURE_WITH=	perlcache
 +NANOSLEEP_CONFIGURE_ENABLE=	nanosleep
 +EVENT_BROKER_CONFIGURE_ENABLE=	event-broker
  
  post-extract:
  	@${MV} ${WRKDIR}/${PORTNAME} ${WRKSRC}
  
 +.include <bsd.port.options.mk>
 +
  post-patch:
 +	@${REINPLACE_CMD} -e '/^INSTALL_OPTS=/d' `${FIND} ${WRKSRC} -name Makefile.in`
  .if ${PORT_OPTIONS:MUNHANDLED_HACK}
  	@${REINPLACE_CMD} -e 's#;serviceprops=42\&#;serviceprops=10\&#g' \
  		-e 's#;hostprops=42\"#;hostprops=10\"#g' ${WRKSRC}/html/side.php
  .endif
  
  post-install:
 -	@${CHMOD} 775 ${NAGIOSDIR} ${NAGIOSDIR}/archives ${NAGIOSDIR}/checkresults ${NAGIOSDIR}/rw
 -	@${CHOWN} ${NAGIOSUSER}:${NAGIOSGROUP} ${NAGIOSDIR} ${NAGIOSDIR}/archives ${NAGIOSDIR}/checkresults
 -	@${CHOWN} ${NAGIOSUSER}:${WWWGRP} ${NAGIOSDIR}/rw
 -	@${CAT} ${PKGMESSAGE}
 +	@${MV} ${STAGEDIR}${PREFIX}/${NAGIOSWWWDIR}/config.inc.php ${STAGEDIR}${PREFIX}/${NAGIOSWWWDIR}/config.inc.php.sample
  
  .include <bsd.port.mk>
 
 Modified: branches/2014Q1/net-mgmt/nagios/pkg-plist
 ==============================================================================
 --- branches/2014Q1/net-mgmt/nagios/pkg-plist	Thu Dec 26 13:17:15 2013	(r337510)
 +++ branches/2014Q1/net-mgmt/nagios/pkg-plist	Thu Dec 26 13:17:26 2013	(r337511)
 @@ -33,7 +33,9 @@ etc/nagios/resource.cfg-sample
  %%NAGIOSWWWDIR%%/cgi-bin/summary.cgi
  %%NAGIOSWWWDIR%%/cgi-bin/tac.cgi
  %%NAGIOSWWWDIR%%/cgi-bin/trends.cgi
 -%%NAGIOSWWWDIR%%/config.inc.php
 +@unexec if cmp -s %D/%%NAGIOSWWWDIR%%/config.inc.php.sample %D/%%NAGIOSWWWDIR%%/config.inc.php; then rm -f %D/%%NAGIOSWWWDIR%%/config.inc.php; fi
 +%%NAGIOSWWWDIR%%/config.inc.php.sample
 +@exec if [ ! -f %D/%%NAGIOSWWWDIR%%/config.inc.php ] ; then cp -p %D/%F %B/config.inc.php; fi
  %%NAGIOSWWWDIR%%/contexthelp/A1.html
  %%NAGIOSWWWDIR%%/contexthelp/A2.html
  %%NAGIOSWWWDIR%%/contexthelp/A3.html
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 
>Unformatted:
