Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Jun 2017 13:38:52 +0000 (UTC)
From:      Muhammad Moinur Rahman <bofh@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r442762 - in head/net-mgmt/librenms: . files
Message-ID:  <201706061338.v56DcqLr016615@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bofh
Date: Tue Jun  6 13:38:52 2017
New Revision: 442762
URL: https://svnweb.freebsd.org/changeset/ports/442762

Log:
  net-mgmt/librenms: Update version 1.26=>1.28
  
  - Fixed an issue where services-wrapper wasn't working (by adding the PATH
    line to the crontab) [1]
  - Fixed a permissions issue with some directories [1]
  - Added patch to validate.php which allows it to work correctly
    (accidentally ommitted from previous commit) [1]
  
  PR:		218608[1]
  Submitted by:	freebsd@jonathanprice.org[1]

Added:
  head/net-mgmt/librenms/files/patch-validate.php   (contents, props changed)
Modified:
  head/net-mgmt/librenms/Makefile
  head/net-mgmt/librenms/distinfo
  head/net-mgmt/librenms/files/patch-daily.sh
  head/net-mgmt/librenms/files/patch-includes_common.php
  head/net-mgmt/librenms/files/patch-includes_defaults.inc.php
  head/net-mgmt/librenms/files/pkg-message.in

Modified: head/net-mgmt/librenms/Makefile
==============================================================================
--- head/net-mgmt/librenms/Makefile	Tue Jun  6 13:37:53 2017	(r442761)
+++ head/net-mgmt/librenms/Makefile	Tue Jun  6 13:38:52 2017	(r442762)
@@ -2,7 +2,7 @@
 # $FreeBSD$
 
 PORTNAME=	librenms
-PORTVERSION=	1.26
+PORTVERSION=	1.28
 PORTEPOCH=	1
 CATEGORIES=	net-mgmt
 
@@ -15,7 +15,8 @@ USE_GITHUB=	yes
 GH_ACCOUNT=	librenms
 
 USES=		php:cli python shebangfix
-SHEBANG_FILES=	mibs/process.pl scripts/deploy-docs.sh \
+SHEBANG_FILES=	mibs/process.pl scripts/auth_test.php scripts/deploy-docs.sh \
+		scripts/deploy-schema.sh scripts/github-remove \
 		scripts/Migration/Standard_Conversion/convert_no_xml.sh \
 		scripts/Migration/Standard_Conversion/destwork_no_xml.sh \
 		scripts/Migration/Standard_Conversion/mkdir.sh \
@@ -41,7 +42,7 @@ SHEBANG_FILES=	mibs/process.pl scripts/deploy-docs.sh 
 		vendor/ezyang/htmlpurifier/maintenance/update-config.php \
 		vendor/tecnickcom/tcpdf/tools/tcpdf_addfont.php
 
-USE_PHP=	ctype curl filter gd hash json mcrypt mysqli openssl session simplexml snmp tokenizer xml
+USE_PHP=	ctype curl filter gd hash json ldap mcrypt mysqli openssl session simplexml snmp tokenizer xml
 
 NO_BUILD=	yes
 
@@ -149,14 +150,11 @@ post-install:
 	@${ECHO_CMD} "@group ${WWWGRP}" >> ${TMPPLIST}
 	@${FIND} -s ${STAGEDIR}${WWWDIR} -not -type d | ${SORT} | \
 		${SED} -e 's#^${STAGEDIR}${PREFIX}/##' >> ${TMPPLIST}
+	@${FIND} -s ${STAGEDIR}${WWWDIR} -type d | \
+		${SED} -e 's#^${STAGEDIR}#@dir #' >> ${TMPPLIST}
 	${INSTALL_DATA} ${WRKSRC}/config.php.default \
 	       ${STAGEDIR}/${WWWDIR}/config.php.sample
 	@${ECHO} @sample ${WWWDIR}/config.php.sample >> ${TMPPLIST}
-	@${ECHO} @dir ${WWWDIR}/rrd >> ${TMPPLIST}
-	@${ECHO} @dir ${WWWDIR}/logs >> ${TMPPLIST}
-	@${ECHO} @dir ${WWWDIR}/lib/influxdb-php/vendor/guzzlehttp/guzzle/build >> ${TMPPLIST}
-	@${ECHO} @dir ${WWWDIR}/lib/influxdb-php/vendor/guzzlehttp/guzzle/docs >> ${TMPPLIST}
-	@${ECHO} @dir ${WWWDIR}/lib/influxdb-php/vendor/guzzlehttp/guzzle/tests >> ${TMPPLIST}
 	@${ECHO_CMD} "@group" >> ${TMPPLIST}
 	@${ECHO_CMD} "@owner" >> ${TMPPLIST}
 

Modified: head/net-mgmt/librenms/distinfo
==============================================================================
--- head/net-mgmt/librenms/distinfo	Tue Jun  6 13:37:53 2017	(r442761)
+++ head/net-mgmt/librenms/distinfo	Tue Jun  6 13:38:52 2017	(r442762)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1491554959
-SHA256 (librenms-librenms-1.26_GH0.tar.gz) = cc76a343296c48a6a2423efc9138e2a52d2827178ba733c0714dc6ef38d264e8
-SIZE (librenms-librenms-1.26_GH0.tar.gz) = 57165188
+TIMESTAMP = 1496573562
+SHA256 (librenms-librenms-1.28_GH0.tar.gz) = ef77dbbbd90c67f2620f1eb2ff57d07903faca9e2a54b20e5fbe9cc247fe4a91
+SIZE (librenms-librenms-1.28_GH0.tar.gz) = 57805277

Modified: head/net-mgmt/librenms/files/patch-daily.sh
==============================================================================
--- head/net-mgmt/librenms/files/patch-daily.sh	Tue Jun  6 13:37:53 2017	(r442761)
+++ head/net-mgmt/librenms/files/patch-daily.sh	Tue Jun  6 13:38:52 2017	(r442762)
@@ -1,14 +1,5 @@
 --- daily.sh.orig	2017-03-26 12:06:00 UTC
 +++ daily.sh
-@@ -113,7 +113,7 @@ main () {
-         # only try to su if we are root (or sudo)
-         if [[ "$EUID" -eq 0 ]]; then
-             echo "Re-running ${DAILY_SCRIPT} as ${LIBRENMS_USER} user"
--            su -l "$LIBRENMS_USER" -c "$DAILY_SCRIPT $@"
-+            sudo -u "$LIBRENMS_USER" "$DAILY_SCRIPT"
-             exit;
-         fi
- 
 @@ -123,27 +123,6 @@ main () {
      fi
  

Modified: head/net-mgmt/librenms/files/patch-includes_common.php
==============================================================================
--- head/net-mgmt/librenms/files/patch-includes_common.php	Tue Jun  6 13:37:53 2017	(r442761)
+++ head/net-mgmt/librenms/files/patch-includes_common.php	Tue Jun  6 13:38:52 2017	(r442762)
@@ -1,7 +1,7 @@
---- includes/common.php.orig	2017-01-29 06:54:29 UTC
+--- includes/common.php.orig	2017-03-26 12:06:00 UTC
 +++ includes/common.php
-@@ -1095,10 +1095,8 @@ function version_info($remote = true)
-             curl_setopt($api, CURLOPT_RETURNTRANSFER, 1);
+@@ -1098,10 +1098,8 @@ function version_info($remote = true)
+             curl_setopt($api, CURLOPT_CONNECTTIMEOUT, 5);
              $output['github'] = json_decode(curl_exec($api), true);
          }
 -        list($local_sha, $local_date) = explode('|', rtrim(`git show --pretty='%H|%ct' -s HEAD`));

Modified: head/net-mgmt/librenms/files/patch-includes_defaults.inc.php
==============================================================================
--- head/net-mgmt/librenms/files/patch-includes_defaults.inc.php	Tue Jun  6 13:37:53 2017	(r442761)
+++ head/net-mgmt/librenms/files/patch-includes_defaults.inc.php	Tue Jun  6 13:38:52 2017	(r442762)
@@ -1,8 +1,8 @@
---- includes/defaults.inc.php.orig      2017-01-01 15:50:41.000000000 +0000
-+++ includes/defaults.inc.php   2017-01-09 13:24:06.964918000 +0000
-@@ -36,26 +36,26 @@
+--- includes/defaults.inc.php.orig	2017-03-26 12:06:00 UTC
++++ includes/defaults.inc.php
+@@ -41,26 +41,26 @@ $config['db_port']               = 3306;
  $config['own_hostname'] = 'localhost';
-
+ 
  // Location of executables
 -$config['rrdtool']                  = '/usr/bin/rrdtool';
 +$config['rrdtool']                  = '/usr/local/bin/rrdtool';
@@ -38,6 +38,6 @@
 +$config['virsh']          = '/usr/local/bin/virsh';
 +$config['dot']            = '/usr/local/bin/dot';
 +$config['sfdp']           = '/usr/local/bin/sfdp';
-
+ 
  // Memcached - Keep immediate statistics
  $config['memcached']['enable'] = false;

Added: head/net-mgmt/librenms/files/patch-validate.php
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-mgmt/librenms/files/patch-validate.php	Tue Jun  6 13:38:52 2017	(r442762)
@@ -0,0 +1,39 @@
+--- validate.php.orig	2017-04-11 18:45:34 UTC
++++ validate.php
+@@ -108,13 +108,6 @@ if (!($username === 'root' || (isset($co
+     print_fail('You need to run this script as root' . (isset($config['user']) ? ' or '.$config['user'] : ''));
+ }
+ 
+-if ($git_found === true) {
+-    if ($config['update_channel'] == 'master' && $cur_sha != $versions['github']['sha']) {
+-        $commit_date = new DateTime('@'.$versions['local_date'], new DateTimeZone(date_default_timezone_get()));
+-        print_warn("Your install is out of date, last update: " . $commit_date->format('r'));
+-    }
+-}
+-
+ // Check php modules we use to make sure they are loaded
+ $extensions = array('pcre','curl','session','snmp','mcrypt');
+ foreach ($extensions as $extension) {
+@@ -302,22 +295,6 @@ if (dbFetchCell('SELECT COUNT(*) FROM `d
+ }
+ 
+ 
+-if ($git_found === true) {
+-    if ($versions['local_branch'] != 'master') {
+-        print_warn("Your local git branch is not master, this will prevent automatic updates.");
+-    }
+-
+-    // check for modified files
+-    $modifiedcmd = 'git diff --name-only --exit-code';
+-    if ($username === 'root') {
+-        $modifiedcmd = 'su '.$config['user'].' -c "'.$modifiedcmd.'"';
+-    }
+-    exec($modifiedcmd, $cmdoutput, $code);
+-    if ($code !== 0 && !empty($cmdoutput)) {
+-        print_warn("Your local git contains modified files, this could prevent automatic updates.\nModified files:");
+-        print_list($cmdoutput, "\t %s\n");
+-    }
+-}
+ // Modules test
+ $modules = explode(',', $options['m']);
+ foreach ($modules as $module) {

Modified: head/net-mgmt/librenms/files/pkg-message.in
==============================================================================
--- head/net-mgmt/librenms/files/pkg-message.in	Tue Jun  6 13:37:53 2017	(r442761)
+++ head/net-mgmt/librenms/files/pkg-message.in	Tue Jun  6 13:38:52 2017	(r442762)
@@ -16,6 +16,7 @@ with the following notes:
 - Installation directory is %%WWWDIR%%
 - The following lines should be added to /etc/crontab:
 
+PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
 33	*/6	*	*	*	www	cd %%WWWDIR%% && %%PHP%% discovery.php -h all >> /dev/null 2>&1
 */5	*	*	*	*	www	cd %%WWWDIR%% && %%PHP%% discovery.php -h new >> /dev/null 2>&1
 */5	*	*	*	*	www	cd %%WWWDIR%% && %%PYTHON%% poller-wrapper.py 16 >> /dev/null 2>&1



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201706061338.v56DcqLr016615>