summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMuhammad Moinur Rahman <bofh@FreeBSD.org>2017-06-06 13:38:52 +0000
committerMuhammad Moinur Rahman <bofh@FreeBSD.org>2017-06-06 13:38:52 +0000
commit9404e62876a9b21354c09d5a9bccd8bad717d6d7 (patch)
tree0b080a9fb15cd85404c9d276cf65b5565a1e78f9
parentMOVED: Fix sysutils/jail2 entry (diff)
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]
-rw-r--r--net-mgmt/librenms/Makefile14
-rw-r--r--net-mgmt/librenms/distinfo6
-rw-r--r--net-mgmt/librenms/files/patch-daily.sh9
-rw-r--r--net-mgmt/librenms/files/patch-includes_common.php6
-rw-r--r--net-mgmt/librenms/files/patch-includes_defaults.inc.php10
-rw-r--r--net-mgmt/librenms/files/patch-validate.php39
-rw-r--r--net-mgmt/librenms/files/pkg-message.in1
7 files changed, 57 insertions, 28 deletions
diff --git a/net-mgmt/librenms/Makefile b/net-mgmt/librenms/Makefile
index 7da37bdf168d..67d44b703b67 100644
--- a/net-mgmt/librenms/Makefile
+++ b/net-mgmt/librenms/Makefile
@@ -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}
diff --git a/net-mgmt/librenms/distinfo b/net-mgmt/librenms/distinfo
index 45b2f20e44d8..ecfb30cb10e0 100644
--- a/net-mgmt/librenms/distinfo
+++ b/net-mgmt/librenms/distinfo
@@ -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
diff --git a/net-mgmt/librenms/files/patch-daily.sh b/net-mgmt/librenms/files/patch-daily.sh
index 08520dd739e0..1020e9ad21d3 100644
--- a/net-mgmt/librenms/files/patch-daily.sh
+++ b/net-mgmt/librenms/files/patch-daily.sh
@@ -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
diff --git a/net-mgmt/librenms/files/patch-includes_common.php b/net-mgmt/librenms/files/patch-includes_common.php
index 7ff08bbc4c82..974dc867c257 100644
--- a/net-mgmt/librenms/files/patch-includes_common.php
+++ b/net-mgmt/librenms/files/patch-includes_common.php
@@ -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`));
diff --git a/net-mgmt/librenms/files/patch-includes_defaults.inc.php b/net-mgmt/librenms/files/patch-includes_defaults.inc.php
index 37c8b302b234..9f199e135410 100644
--- a/net-mgmt/librenms/files/patch-includes_defaults.inc.php
+++ b/net-mgmt/librenms/files/patch-includes_defaults.inc.php
@@ -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;
diff --git a/net-mgmt/librenms/files/patch-validate.php b/net-mgmt/librenms/files/patch-validate.php
new file mode 100644
index 000000000000..e51e72d137f2
--- /dev/null
+++ b/net-mgmt/librenms/files/patch-validate.php
@@ -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) {
diff --git a/net-mgmt/librenms/files/pkg-message.in b/net-mgmt/librenms/files/pkg-message.in
index 955d686fcc15..5324410d4682 100644
--- a/net-mgmt/librenms/files/pkg-message.in
+++ b/net-mgmt/librenms/files/pkg-message.in
@@ -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