Bug 191706 - [ staging ] net-mgmt/routers2
Summary: [ staging ] net-mgmt/routers2
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Many People
Assignee: John Marino
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-07 16:38 UTC by Dan Lukes
Modified: 2014-07-29 01:39 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Lukes 2014-07-07 16:38:04 UTC
net-mgmt/routers2 require staging or will be removed

Fix:
Patch is attached. 

--- net-mgmt/routers2/Makefile.orig	2014-07-07 18:22:25.000000000 +0200
+++ net-mgmt/routers2/Makefile	2014-07-07 18:28:55.000000000 +0200
@@ -28,7 +28,8 @@
 
 NO_BUILD=	YES
 
-NO_STAGE=	yes
+PLIST_DIRSTRY+=	/var/db/rrdtool
+
 post-patch:
 	@${RM} ${WRKSRC}/extras/targetnames/BER.pm ${WRKSRC}/extras/targetnames/SNMP_*.pm
 	for file in routers2.cgi.pl routers2.conf ; do \
@@ -36,22 +37,22 @@
 	done
 
 do-install:
-		${MKDIR} -m 755 ${PREFIX}/www/routers2
-		${MKDIR} -m 755 ${PREFIX}/www/routers2/rrdicons
-		${MKDIR} -m 755 ${PREFIX}/www/routers2/graphs
-		${MKDIR} -m 755 /var/db/rrdtool
-		${CHOWN} ${WWWOWN}:${WWWGRP} /var/db/rrdtool
-		${CHOWN} ${WWWOWN}:${WWWGRP} ${PREFIX}/www/routers2/graphs
+		${MKDIR} -m 755 ${STAGEDIR}${PREFIX}/www/routers2
+		${MKDIR} -m 755 ${STAGEDIR}${PREFIX}/www/routers2/rrdicons
+		${MKDIR} -m 755 ${STAGEDIR}${PREFIX}/www/routers2/graphs
+		${MKDIR} -m 755 ${STAGEDIR}/var/db/rrdtool
+		${CHOWN} ${WWWOWN}:${WWWGRP} ${STAGEDIR}/var/db/rrdtool
+		${CHOWN} ${WWWOWN}:${WWWGRP} ${STAGEDIR}${PREFIX}/www/routers2/graphs
 
 .if !defined(NOPORTDOCS)
-		${MKDIR} -m 755 ${DOCSDIR}
+		${MKDIR} -m 755 ${STAGEDIR}${DOCSDIR}
 		for file in CHANGES README doc/* ; do \
-			${INSTALL_DATA} ${WRKSRC}/$$file ${DOCSDIR}; \
+			${INSTALL_DATA} ${WRKSRC}/$$file ${STAGEDIR}${DOCSDIR}; \
 		done
 .endif
-		${INSTALL_DATA} ${WRKSRC}/routers2.conf ${PREFIX}/etc/routers2.conf.sample
-		${INSTALL_DATA} ${WRKSRC}/rrdicons/* ${PREFIX}/www/routers2/rrdicons
-		${INSTALL_SCRIPT} ${WRKSRC}/routers2.cgi.pl ${PREFIX}/www/routers2/routers2.cgi
+		${INSTALL_DATA} ${WRKSRC}/routers2.conf ${STAGEDIR}${PREFIX}/etc/routers2.conf.sample
+		${INSTALL_DATA} ${WRKSRC}/rrdicons/* ${STAGEDIR}${PREFIX}/www/routers2/rrdicons
+		${INSTALL_SCRIPT} ${WRKSRC}/routers2.cgi.pl ${STAGEDIR}${PREFIX}/www/routers2/routers2.cgi
 #		for file in mrtg cfgmaker indexmaker; do \
 #			${INSTALL_SCRIPT} ${WRKSRC}/bin/$$file ${PREFIX}/bin/; \
 #		done
--- net-mgmt/routers2/pkg-plist.orig	2014-02-03 21:05:51.000000000 +0100
+++ net-mgmt/routers2/pkg-plist	2014-07-07 18:32:49.000000000 +0200
@@ -1,4 +1,6 @@
+@unexec if cmp -s %D/etc/routers2.conf %D/etc/routers2.conf.sample ; then rm -f %D/etc/routers2.conf ; fi
 etc/routers2.conf.sample
+@exec if [ ! -f %D/etc/routers2.conf ]; then cp -p %D/%F %B/routers2.conf; fi
 www/routers2/routers2.cgi
 www/routers2/rrdicons/3com-sm.gif
 www/routers2/rrdicons/aix-sm.gif
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2014-07-08 01:30:41 UTC
Notify maintainer.
Comment 2 John Marino freebsd_committer freebsd_triage 2014-07-26 07:31:54 UTC
We don't need to notify maintainer for stage patches.

Dan, it would help the committer tremendously if you resubmitted this patch as an attachment.
Comment 3 commit-hook freebsd_committer freebsd_triage 2014-07-29 01:38:37 UTC
A commit references this bug:

Author: marino
Date: Tue Jul 29 01:37:43 UTC 2014
New revision: 363284
URL: http://svnweb.freebsd.org/changeset/ports/363284

Log:
  Stage net-mgmt/routers2 and cleanup

   * stage support
   * use PORTDOCS (remove from pkg-plist)
   * use DOCS instead of NOPORTDOCS
   * get rid of 3 unnecessary for loops
   * properly handly /var/db/rddtool
   * Use @sample keyword
   * Use %%WWWDIR%% in pkg-plist

  PR:		191706
  Submitted by:	Dan Lukes
  Modified++:	marino

Changes:
  head/net-mgmt/routers2/Makefile
  head/net-mgmt/routers2/pkg-plist
Comment 4 John Marino freebsd_committer freebsd_triage 2014-07-29 01:39:48 UTC
Okay, all the routers2 stuff is done.  I went a lot further with staging here as well.