Date: Fri, 24 Apr 2015 13:30:42 +0000 (UTC) From: Lars Engels <lme@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r384639 - in head/net-mgmt/pnp: . files Message-ID: <201504241330.t3ODUgBP088052@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: lme Date: Fri Apr 24 13:30:42 2015 New Revision: 384639 URL: https://svnweb.freebsd.org/changeset/ports/384639 Log: - Update to 0.6.25 - Take maintainership. Reason: last maintainer's activity on the port was 5 years ago, never replied to my mails concerning the port. - Update COMMENT - Add a missing dependency on php5-session - Use simpler version of OPTIONS - Remove pkg-{de,}install - Install webserver sample configs - Update pkg-message Deleted: head/net-mgmt/pnp/files/pkg-deinstall.in head/net-mgmt/pnp/files/pkg-install.in Modified: head/net-mgmt/pnp/Makefile head/net-mgmt/pnp/distinfo head/net-mgmt/pnp/files/patch-sample-config__Makefile.in head/net-mgmt/pnp/files/pkg-message.in head/net-mgmt/pnp/pkg-plist Modified: head/net-mgmt/pnp/Makefile ============================================================================== --- head/net-mgmt/pnp/Makefile Fri Apr 24 13:23:39 2015 (r384638) +++ head/net-mgmt/pnp/Makefile Fri Apr 24 13:30:42 2015 (r384639) @@ -2,15 +2,14 @@ # $FreeBSD$ PORTNAME= pnp -PORTVERSION= 0.6.21 -PORTREVISION= 1 +PORTVERSION= 0.6.25 CATEGORIES= net-mgmt MASTER_SITES= SF MASTER_SITE_SUBDIR=pnp4nagios/PNP-0.6 DISTNAME= pnp4nagios-${DISTVERSIONPREFIX}${DISTVERSION}${DISTVERSIONSUFFIX} -MAINTAINER?= rea@FreeBSD.org -COMMENT?= Nagios performance data collector and grapher +MAINTAINER?= lme@FreeBSD.org +COMMENT?= Nagios / Icinga performance data collector and grapher LICENSE= GPLv2 @@ -27,10 +26,11 @@ PDF_DESC= Use built-in fpdf library to p .include <bsd.port.options.mk> -USE_PHP= gd iconv json pcre simplexml sockets xml zlib - +USE_PHP= gd iconv json pcre session simplexml sockets xml zlib WANT_PHP_WEB= yes + USE_RC_SUBR= npcd + DOS2UNIX_REGEX= '.*\.\(php\|js\|txt\)$$' NAGIOSDIR?= /var/spool/nagios @@ -42,11 +42,8 @@ PNP_RRDS= ${PNP_STATE}/rrd PNP_SPOOL= ${PNP_STATE}/perfspool PNP_URL?= ${NAGIOSHTMURL}/pnp FPDF_DIR?= share/fpdf -SPOOL_DIRS= ${PNP_STATE}:${NAGIOSUSER}:${NAGIOSGROUP}:0750%${PNP_RRDS}:${NAGIOSUSER}:${NAGIOSGROUP}:0750%${PNP_SPOOL}:${NAGIOSUSER}:${NAGIOSGROUP}:0750 -.if ! ${PORT_OPTIONS:MPDF} -EXTRA_PATCHES+= ${FILESDIR}/extra-patch-disable-pdf -.endif +PDF_EXTRA_PATCHES_OFF+= ${FILESDIR}/extra-patch-disable-pdf GNU_CONFIGURE= yes CONFIGURE_ARGS+= \ @@ -65,16 +62,20 @@ CONFIGURE_ARGS+= \ MAKE_ARGS= INSTALL_OPTS= INSTALL_TARGET= install install-config -PLIST_SUB+= NAGIOSDIR=${NAGIOSDIR} -SUB_FILES= pkg-install \ - pkg-deinstall \ - pkg-message -SUB_LIST= SPOOL_DIRS=${SPOOL_DIRS} \ - PNP_RRDS=${PNP_RRDS} \ +PLIST_SUB+= NAGIOSDIR=${NAGIOSDIR} \ + NAGIOSUSER=${NAGIOSUSER} \ + NAGIOSGROUP=${NAGIOSGROUP} \ + WWWOWN=${WWWOWN} \ + WWWGRP=${WWWGRP} + +SUB_FILES= pkg-message +SUB_LIST= PNP_RRDS=${PNP_RRDS} \ PNP_URL=${PNP_URL} \ NAGIOSUSER=${NAGIOSUSER} \ NAGIOSGROUP=${NAGIOSGROUP} +SAMPLE_CONFIGS= lighttpd.pnp4nagios.conf nginx.pnp4nagios.conf httpd.conf + .if ${PORT_OPTIONS:MPDF} PNP_USE_FPDF= 1 .else @@ -88,9 +89,18 @@ post-patch: -e's|/usr/local/check_mk/|/usr/local/share/check_mk/|g' \ -e's|/usr/local/nagios/var/rw/live|/${NAGIOSDIR}/rw/live|' \ "${WRKSRC}/sample-config/pnp/config.php.in" +.for f in ${SAMPLE_CONFIGS} + @${REINPLACE_CMD} -e 's|@BASE_URL@|${PNP_URL}|g' -e 's|@datarootdir@|${WWWDIR}|g' \ + -e 's|/usr/local/nagios/etc|${PREFIX}/etc/${NAGIOSUSER}|' -e 's|Nagios|${NAGIOSUSER}|' \ + "${WRKSRC}/sample-config/${f}.in" +.endfor @${LN} -fs ../en_US/dwnld.html ${WRKSRC}/share/pnp/documents/de_DE/dwnld.html post-install: + @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} +.for f in ${SAMPLE_CONFIGS} + ${INSTALL_DATA} ${WRKSRC}/sample-config/${f} ${STAGEDIR}${EXAMPLESDIR} +.endfor ${INSTALL_MAN} ${WRKSRC}/man/npcd.8 ${STAGEDIR}${MAN8PREFIX}/man/man8 .include <bsd.port.mk> Modified: head/net-mgmt/pnp/distinfo ============================================================================== --- head/net-mgmt/pnp/distinfo Fri Apr 24 13:23:39 2015 (r384638) +++ head/net-mgmt/pnp/distinfo Fri Apr 24 13:30:42 2015 (r384639) @@ -1,2 +1,2 @@ -SHA256 (pnp4nagios-0.6.21.tar.gz) = bb5d36a7cc49dcbcfcb424d437dc3739baa647816cffc610fb621216c4f5992a -SIZE (pnp4nagios-0.6.21.tar.gz) = 2917588 +SHA256 (pnp4nagios-0.6.25.tar.gz) = 62d9cdcb132326753373b18fafebd716ec27dc5cbe1ef42204440fca21ca7a0c +SIZE (pnp4nagios-0.6.25.tar.gz) = 2921068 Modified: head/net-mgmt/pnp/files/patch-sample-config__Makefile.in ============================================================================== --- head/net-mgmt/pnp/files/patch-sample-config__Makefile.in Fri Apr 24 13:23:39 2015 (r384638) +++ head/net-mgmt/pnp/files/patch-sample-config__Makefile.in Fri Apr 24 13:30:42 2015 (r384639) @@ -1,6 +1,6 @@ ---- ./sample-config/Makefile.in.orig 2013-03-24 17:25:56.000000000 +0100 -+++ ./sample-config/Makefile.in 2014-05-02 09:00:07.000000000 +0200 -@@ -40,35 +40,18 @@ +--- sample-config/Makefile.in.orig 2015-01-03 14:09:06.000000000 +0100 ++++ sample-config/Makefile.in 2015-04-22 21:47:23.294933000 +0200 +@@ -40,35 +40,18 @@ install: $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(SYSCONFDIR)/check_commands $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(SYSCONFDIR)/pages $(INSTALL) -m 644 $(INSTALL_OPTS) pnp/pnp4nagios_release $(DESTDIR)$(SYSCONFDIR) Modified: head/net-mgmt/pnp/files/pkg-message.in ============================================================================== --- head/net-mgmt/pnp/files/pkg-message.in Fri Apr 24 13:23:39 2015 (r384638) +++ head/net-mgmt/pnp/files/pkg-message.in Fri Apr 24 13:30:42 2015 (r384639) @@ -1,15 +1,15 @@ ======================================================================== -You just installed/upgraded PNP graphing tool for Nagios. +You just installed/upgraded PNP graphing tool for %%NAGIOSUSER%%. You will need to read the documentation at http://docs.pnp4nagios.org/pnp-0.6/doc_complete both for new installations and upgrades from 0.4, since you will -need to tweak your Nagios and PNP configuration according to the +need to tweak your %%NAGIOSUSER%% and PNP configuration according to the 0.6.x recipes. -We recommend to start with the following restrictive Apache -configuration for the PNP area: +We recommend to start with the following restrictive Apache configuration for +the PNP area: {{{ # PNP graphing tool Alias %%PNP_URL%% %%WWWDIR%% @@ -22,7 +22,46 @@ Alias %%PNP_URL%% %%WWWDIR%% DirectoryIndex index.php RewriteEngine on - RewriteBase /nagios/pnp/ + RewriteBase %%PNP_URL%%/ + # Protect application and system files from being viewed + RewriteRule ^(application|modules|system) - [F,L] + # Allow any files or directories that exist to be displayed directly + RewriteCond %{REQUEST_FILENAME} !-f + RewriteCond %{REQUEST_FILENAME} !-d + # Rewrite all other URLs to index.php/URL + RewriteRule .* index.php/$0 [PT,L] +</Directory> +# PNP graphing tool +Alias %%PNP_URL%% %%WWWDIR%% + +<Directory %%WWWDIR%%> + <IfModule mod_authz_core.c> + # Apache 2.4 + <RequireAll> + Require all granted + # Require local + Require valid-user + </RequireAll> + </IfModule> + <IfModule !mod_authz_core.c> + # Apache 2.2 + Order allow,deny + Allow from all + # Order deny,allow + # Deny from all + # Allow from 127.0.0.1 + Require valid-user + </IfModule> + + AuthName "PNP Access" + AuthType Basic + AuthUserFile %%PREFIX%%/etc%%NAGIOSHTMURL%%/htpasswd.users + + AddHandler application/x-httpd-php .php + DirectoryIndex index.php + + RewriteEngine on + RewriteBase %%PNP_URL%%/ # Protect application and system files from being viewed RewriteRule ^(application|modules|system) - [F,L] # Allow any files or directories that exist to be displayed directly @@ -33,6 +72,11 @@ Alias %%PNP_URL%% %%WWWDIR%% </Directory> }}} +Don't forget to install and enable www/mod_php5 as well as mod_rewrite. + +If you use another web server like nginx or lighttpd, take a look at +%%EXAMPLESDIR%% + Create %%WWWDIR%%/install.ignore to disable sanity check and start using PNP. Modified: head/net-mgmt/pnp/pkg-plist ============================================================================== --- head/net-mgmt/pnp/pkg-plist Fri Apr 24 13:23:39 2015 (r384638) +++ head/net-mgmt/pnp/pkg-plist Fri Apr 24 13:30:42 2015 (r384639) @@ -272,6 +272,9 @@ libexec/process_perfdata.pl libexec/rrd_convert.pl libexec/rrd_modify.pl man/man8/npcd.8.gz +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/httpd.conf +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/lighttpd.pnp4nagios.conf +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/nginx.pnp4nagios.conf %%WWWDIR%%/application/config/config.php %%WWWDIR%%/application/config/locale.php %%WWWDIR%%/application/config/routes.php @@ -320,6 +323,9 @@ man/man8/npcd.8.gz %%WWWDIR%%/application/vendor/fpdf/filters/FilterLZW.php %%WWWDIR%%/application/vendor/fpdf/filters/FilterLZW_FPDI.php %%WWWDIR%%/application/vendor/fpdf/font/courier.php +%%WWWDIR%%/application/vendor/fpdf/font/courierb.php +%%WWWDIR%%/application/vendor/fpdf/font/courierbi.php +%%WWWDIR%%/application/vendor/fpdf/font/courieri.php %%WWWDIR%%/application/vendor/fpdf/font/helvetica.php %%WWWDIR%%/application/vendor/fpdf/font/helveticab.php %%WWWDIR%%/application/vendor/fpdf/font/helveticabi.php @@ -346,6 +352,7 @@ man/man8/npcd.8.gz %%WWWDIR%%/application/views/graph.php %%WWWDIR%%/application/views/graph_content.php %%WWWDIR%%/application/views/graph_content_special.php +%%WWWDIR%%/application/views/graph_tiny.php %%WWWDIR%%/application/views/header.php %%WWWDIR%%/application/views/host_box.php %%WWWDIR%%/application/views/icon_box.php
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201504241330.t3ODUgBP088052>