Date: Tue, 22 Aug 2017 16:26:13 +0000 (UTC) From: Steve Wills <swills@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r448544 - in head/net-mgmt/observium: . files Message-ID: <201708221626.v7MGQDnX085170@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: swills Date: Tue Aug 22 16:26:13 2017 New Revision: 448544 URL: https://svnweb.freebsd.org/changeset/ports/448544 Log: net-mgmt/observium: multiple changes * Fix license * Improve post install message * Add Apache config PR: 214515 Submitted by: dirkx@webweaving.org (maintainer) (with slight modification) Added: head/net-mgmt/observium/files/observium.conf.sample.in (contents, props changed) Modified: head/net-mgmt/observium/Makefile head/net-mgmt/observium/files/pkg-message.in head/net-mgmt/observium/pkg-plist Modified: head/net-mgmt/observium/Makefile ============================================================================== --- head/net-mgmt/observium/Makefile Tue Aug 22 16:09:28 2017 (r448543) +++ head/net-mgmt/observium/Makefile Tue Aug 22 16:26:13 2017 (r448544) @@ -3,7 +3,7 @@ PORTNAME= observium PORTVERSION= 0.16.10.8128 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= net-mgmt MASTER_SITES= http://www.observium.org/ DISTNAME= ${PORTNAME}-community-latest @@ -12,47 +12,55 @@ DIST_SUBDIR= ${PORTNAME}-${PORTVERSION} MAINTAINER= dirkx@webweaving.org COMMENT= Autodiscovering PHP/MySQL/SNMP based network monitoring -LICENSE= GPLv3 +LICENSE= EULA +LICENSE_NAME= "Observium License Version 1.0" +LICENSE_FILE= ${WRKSRC}/LICENSE.COMMUNITY +LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept WRKSRC= ${WRKDIR}/${PORTNAME} USES= php:cli python shebangfix -SHEBANG_FILES= mibs/process.pl \ - scripts/agent-local/areca-hw \ - scripts/agent-local/asterisk \ - scripts/agent-local/bind \ - scripts/agent-local/crashplan \ - scripts/agent-local/edac \ - scripts/agent-local/exim-mailqueue.sh \ - scripts/agent-local/hdarray \ - scripts/agent-local/ipmitool-sensor \ - scripts/agent-local/kamailio \ - scripts/agent-local/ksm \ - scripts/agent-local/lighttpd \ - scripts/agent-local/lmsensors \ - scripts/agent-local/lvs_stats \ - scripts/agent-local/postfix_mailgraph \ - scripts/agent-local/postfix_qshape \ - scripts/agent-local/postgresql.pl \ - scripts/agent-local/proxmox-qemu \ - scripts/agent-local/sabnzbd-qstatus \ - scripts/agent-local/temperature \ - scripts/agent-local/virt-what \ - scripts/agent-local/vmwaretools \ - scripts/agent-local/zimbra \ - scripts/add_ds.pl \ - scripts/add_ds_to_rrd.pl \ - scripts/get-geshi.sh \ - scripts/get-jpgraph.sh \ - scripts/ifAlias \ - scripts/ifAlias_persist \ - scripts/makecss.sh \ - scripts/observium_agent \ - scripts/removespikes.php \ - scripts/removespikes.pl \ - scripts/rename-mibs.pl \ - scripts/rrdtoolx.py \ - poller-wrapper.py +SHEBANG_FILES= \ + mibs/process.pl \ + poller-wrapper.py \ + scripts/add_ds_to_rrd.pl \ + scripts/add_ds.pl \ + scripts/agent-local/areca-hw \ + scripts/agent-local/asterisk \ + scripts/agent-local/bind \ + scripts/agent-local/crashplan \ + scripts/agent-local/edac \ + scripts/agent-local/exim-mailqueue.sh \ + scripts/agent-local/hdarray \ + scripts/agent-local/ipmitool-sensor \ + scripts/agent-local/kamailio \ + scripts/agent-local/ksm \ + scripts/agent-local/lighttpd \ + scripts/agent-local/lmsensors \ + scripts/agent-local/lvs_stats \ + scripts/agent-local/memcached \ + scripts/agent-local/nginx \ + scripts/agent-local/postfix_mailgraph \ + scripts/agent-local/postfix_qshape \ + scripts/agent-local/postgresql.pl \ + scripts/agent-local/proxmox-qemu \ + scripts/agent-local/sabnzbd-qstatus \ + scripts/agent-local/temperature \ + scripts/agent-local/virt-what \ + scripts/agent-local/vmwaretools \ + scripts/agent-local/zimbra \ + scripts/get-geshi.sh \ + scripts/get-jpgraph.sh \ + scripts/glue.py \ + scripts/ifAlias \ + scripts/ifAlias_persist \ + scripts/logparser \ + scripts/makecss.sh \ + scripts/observium_agent \ + scripts/removespikes.php \ + scripts/removespikes.pl \ + scripts/rename-mibs.pl \ + scripts/rrdtoolx.py USE_PHP= ctype filter gd iconv json mcrypt mysqli openssl posix session snmp tokenizer xml zlib IGNORE_WITH_PHP= 71 @@ -88,7 +96,7 @@ WMIC_RUN_DEPENDS= wmic:net-mgmt/wmi-client .include <bsd.port.options.mk> -SUB_FILES+= pkg-message +SUB_FILES+= pkg-message observium.conf.sample SUB_LIST+= PHP="${PHPBASE}/bin/php" PYTHON=${PHPBASE}/bin/python ROOT_FILES= rename_device.php snmptrap.php add_device.php \ @@ -100,9 +108,11 @@ ROOT_DIRS= html scripts includes update mibs libs PORTDOCS= INSTALL README PORTEXAMPLES= snmp.conf.example snmpd.conf.example -.if ${PORT_OPTIONS:MAPACHEMOD} && !defined(PACKAGE_BUILDING) -USES+= php:mod +.if ${PORT_OPTIONS:MAPACHEMOD} USE_APACHE_RUN= 22+ +.endif +.if !defined(PACKAGE_BUILDING) +USES+= php:mod .else # Package builder doesn't create php5 with module USES+= php:web @@ -118,7 +128,7 @@ post-patch: ${REINPLACE_CMD} 's|%%LOCALBASE%%|${LOCALBASE}|g' ${WRKSRC}/poller-wrapper.py ${WRKSRC}/poller.php do-install: - ${MKDIR} ${STAGEDIR}/${WWWDIR} + ${MKDIR} ${STAGEDIR}/${WWWDIR} ${STAGEDIR}/${PREFIX}/${APACHEETCDIR}/Includes .for dir in ${ROOT_DIRS} ${MKDIR} ${STAGEDIR}/${WWWDIR}/${dir} cd ${WRKSRC}/${dir} && ${COPYTREE_SHARE} . ${STAGEDIR}/${WWWDIR}/${dir} @@ -147,5 +157,6 @@ do-install: ${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}/${EXAMPLESDIR} .endfor .endif + ${INSTALL_DATA} ${WRKDIR}/observium.conf.sample ${STAGEDIR}/${PREFIX}/${APACHEETCDIR}/Includes .include <bsd.port.mk> Added: head/net-mgmt/observium/files/observium.conf.sample.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/observium/files/observium.conf.sample.in Tue Aug 22 16:26:13 2017 (r448544) @@ -0,0 +1,66 @@ + +# Observium cannot be ran on a sub-uri (See the FAQ +# http://observium.org/docs/faq/). Hence this strawman +# config runs it as a virtual host on port 8080. +# +# Replace the '*:8080' by the actual virtual host(name) +# you will be using; and consider enabling SSL. An example +# can be fund at e /usr/local/etc/apache24/extra/httpd-ssl.conf +# + +Listen *:8080 +<VirtualHost *:8080> + Documentroot "%%WWWDIR%%/html" + AddHandler application/x-httpd-php .php + # + # CustomLog "/var/log/httpd-observium-access.log" common + + DirectoryIndex index.php + <Directory "%%WWWDIR%%/html"> + Options Indexes FollowSymLinks Multiviews + AllowOverride None + + # These:w statement mirror the .htaccess + # files that are part of the normal + # Observium distribution. See the URL: + # + # https://httpd.apache.org/docs/current/howto/htaccess.html#when + # + # for the various reasons to promote + # these to an apache config file. + # + RedirectMatch 404 /\. + + RewriteEngine on + RewriteBase / + + # Block access to hidden files/dirs + RewriteRule ^\..*$ - [F,L] + # Don't favicon! + RewriteCond %{REQUEST_FILENAME} !^favicon\.ico + RewriteCond %{REQUEST_FILENAME} !-f + RewriteCond %{REQUEST_FILENAME} !-d + RewriteCond %{REQUEST_URI} !\.(js|ico|txt|gif|jpg|png|css|php) + RewriteCond %{REQUEST_URI} !^api/ + RewriteCond %{REQUEST_URI} !^rrd/ + RewriteCond %{REQUEST_URI} !=/server-status + RewriteRule ^(.*)$ index.php/$1/ + + AcceptPathInfo On + Require all granted + </directory> + + <Directory "%%WWWDIR%%/pages"> + deny from all + </Directory> + + <Directory "%%WWWDIR%%/html/print"> + deny from all + </Directory> + + <Directory "%%WWWDIR%%/includes"> + deny from all + </Directory> + +</VirtualHost> + Modified: head/net-mgmt/observium/files/pkg-message.in ============================================================================== --- head/net-mgmt/observium/files/pkg-message.in Tue Aug 22 16:09:28 2017 (r448543) +++ head/net-mgmt/observium/files/pkg-message.in Tue Aug 22 16:26:13 2017 (r448544) @@ -56,7 +56,20 @@ sudo -u www %%WWWDIR%%/poller.php -h all -d 5: Install the above crontabs. +6: Edit the file + + %%PREFIX%%/%%APACHEETCDIR%%/Includes/observium.conf + + and fill out a port number and hostname. + +7: restart the webserver with + + apachectl restart + + or stop/start if in case of IP or SSL changes. + 6: log in with a web browser; using the username 'admin' and the password 'SomeInsecureAdminPassword'. Hosts can be added from the webinterface or from the commandline. + Modified: head/net-mgmt/observium/pkg-plist ============================================================================== --- head/net-mgmt/observium/pkg-plist Tue Aug 22 16:09:28 2017 (r448543) +++ head/net-mgmt/observium/pkg-plist Tue Aug 22 16:26:13 2017 (r448544) @@ -11549,3 +11549,4 @@ @dir(www,www,) %%WWWDIR%%/logs @dir(www,www,) %%WWWDIR%%/rrd @dir %%WWWDIR%%/scripts/agent-local/munin-scripts +@sample %%APACHEETCDIR%%/Includes/observium.conf.sample
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201708221626.v7MGQDnX085170>