update to librenms-1.22.01
This commit is contained in:
parent
441624ce8b
commit
1f11e31006
@ -1,10 +1,11 @@
|
||||
# $OpenBSD: Makefile,v 1.34 2016/10/21 14:52:27 sthen Exp $
|
||||
# $OpenBSD: Makefile,v 1.35 2016/12/14 21:37:03 sthen Exp $
|
||||
|
||||
COMMENT = auto-discovering network management/monitoring system
|
||||
|
||||
V = 201609.01
|
||||
DISTNAME = librenms-$V
|
||||
DISTFILES = librenms-$V{$V}.tar.gz
|
||||
GH_ACCOUNT = librenms
|
||||
GH_PROJECT = librenms
|
||||
GH_TAGNAME = 1.22.01
|
||||
EPOCH = 0
|
||||
|
||||
CATEGORIES = net www
|
||||
|
||||
@ -15,8 +16,6 @@ MAINTAINER = Stuart Henderson <sthen@openbsd.org>
|
||||
# GPLv3+
|
||||
PERMIT_PACKAGE_CDROM = Yes
|
||||
|
||||
MASTER_SITES = https://github.com/librenms/librenms/archive/
|
||||
|
||||
MODULES = lang/php \
|
||||
lang/python
|
||||
MODPY_BUILDDEP = No
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (librenms-201609.01.tar.gz) = hjduofQukUSrsHogPsWkY8pEIuLDXdOTkXhryh1vJjU=
|
||||
SIZE (librenms-201609.01.tar.gz) = 32530499
|
||||
SHA256 (librenms-1.22.01.tar.gz) = ghs2j36E5aWxRB7fmEVMoxQzfX3ZkNgF0hd4hhN+qcM=
|
||||
SIZE (librenms-1.22.01.tar.gz) = 32812938
|
||||
|
@ -1,19 +0,0 @@
|
||||
$OpenBSD: patch-alerts_php,v 1.4 2016/10/14 12:48:55 sthen Exp $
|
||||
--- alerts.php.orig Fri Oct 14 13:25:19 2016
|
||||
+++ alerts.php Fri Oct 14 13:25:33 2016
|
||||
@@ -29,6 +29,7 @@ chdir(__DIR__); // cwd to the directory containing thi
|
||||
|
||||
require_once 'includes/defaults.inc.php';
|
||||
require_once 'config.php';
|
||||
+require_once '/includes/definitions.inc.php';
|
||||
|
||||
$options = getopt('d::');
|
||||
|
||||
@@ -47,7 +48,6 @@ if ($lock === true) {
|
||||
file_put_contents($config['install_dir'].'/.alerts.lock', getmypid());
|
||||
}
|
||||
|
||||
-require_once $config['install_dir'].'/includes/definitions.inc.php';
|
||||
require_once $config['install_dir'].'/includes/functions.php';
|
||||
require_once $config['install_dir'].'/includes/alerts.inc.php';
|
||||
|
@ -1,7 +1,7 @@
|
||||
$OpenBSD: patch-config_php_default,v 1.5 2016/10/14 12:48:55 sthen Exp $
|
||||
--- config.php.default.orig Fri Oct 14 13:25:19 2016
|
||||
+++ config.php.default Fri Oct 14 13:30:22 2016
|
||||
@@ -11,15 +11,16 @@ $config['db']['extension'] = 'mysqli';// mysql or mysq
|
||||
$OpenBSD: patch-config_php_default,v 1.6 2016/12/14 21:37:03 sthen Exp $
|
||||
--- config.php.default.orig Fri Dec 2 10:38:41 2016
|
||||
+++ config.php.default Fri Dec 2 10:38:50 2016
|
||||
@@ -10,15 +10,16 @@ $config['db_name'] = 'librenms';
|
||||
|
||||
// This is the user LibreNMS will run as
|
||||
//Please ensure this user is created and has the correct permissions to your install
|
||||
@ -21,7 +21,7 @@ $OpenBSD: patch-config_php_default,v 1.5 2016/10/14 12:48:55 sthen Exp $
|
||||
|
||||
### Default community
|
||||
$config['snmp']['community'] = array("public");
|
||||
@@ -33,8 +34,8 @@ $config['auth_mechanism'] = "mysql"; # default, other
|
||||
@@ -32,8 +33,8 @@ $config['auth_mechanism'] = "mysql"; # default, other
|
||||
#$config['nets'][] = "172.16.0.0/12";
|
||||
#$config['nets'][] = "192.168.0.0/16";
|
||||
|
||||
|
@ -1,96 +1,79 @@
|
||||
$OpenBSD: patch-daily_sh,v 1.13 2016/10/14 12:48:55 sthen Exp $
|
||||
$OpenBSD: patch-daily_sh,v 1.14 2016/12/14 21:37:03 sthen Exp $
|
||||
|
||||
- use ksh
|
||||
- patch php binary name
|
||||
- avoid ${cnf,,} bashism (converts to lowercase); actually the
|
||||
result was being ignored anyway
|
||||
|
||||
--- daily.sh.orig Fri Oct 14 13:25:19 2016
|
||||
+++ daily.sh Fri Oct 14 13:32:38 2016
|
||||
--- daily.sh.orig Wed Dec 14 17:43:14 2016
|
||||
+++ daily.sh Wed Dec 14 17:47:00 2016
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env bash
|
||||
+#!/bin/ksh
|
||||
################################################################################
|
||||
# Copyright (C) 2015 Daniel Preussker, QuxLabs UG <preussker@quxlabs.com>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -23,7 +23,7 @@ arg="$1"
|
||||
status_run() {
|
||||
printf "%-50s" "$1"
|
||||
echo "$1" >> logs/daily.log
|
||||
- tmp=$(bash -c "$2" 2>&1)
|
||||
+ tmp=$(sh -c "$2" 2>&1)
|
||||
ex=$?
|
||||
echo "$tmp" >> logs/daily.log
|
||||
echo "Returned: $ex" >> logs/daily.log
|
||||
@@ -32,7 +32,7 @@ status_run() {
|
||||
# Layne "Gorian" Breitkreutz <Layne.Breitkreutz@thelenon.com>
|
||||
@@ -24,7 +24,7 @@ DIR_LIBRENMS=$(dirname "$(readlink -f "$0")")
|
||||
|
||||
# set log_file, using librenms $config['log_dir'], if set
|
||||
# otherwise we default to <LibreNMS Install Directory>/logs
|
||||
-LOG_DIR=$(php -r "include '${DIR_LIBRENMS}/config.php'; echo isset(\$config['log_dir']) ? \$config['log_dir'] : '${DIR_LIBRENMS}/logs';")
|
||||
+LOG_DIR=$(%PHP% -r "include '${DIR_LIBRENMS}/config.php'; echo isset(\$config['log_dir']) ? \$config['log_dir'] : '${DIR_LIBRENMS}/logs';")
|
||||
|
||||
|
||||
#######################################
|
||||
@@ -52,7 +52,7 @@ status_run() {
|
||||
|
||||
printf "%-50s" "${arg_text}";
|
||||
echo "${arg_text}" >> ${log_file}
|
||||
- tmp=$(bash -c "${arg_command}" 2>&1);
|
||||
+ tmp=$(sh -c "${arg_command}" 2>&1);
|
||||
exit_code=$?
|
||||
echo "${tmp}" >> ${log_file}
|
||||
echo "Returned: ${exit_code}" >> ${log_file}
|
||||
@@ -82,7 +82,7 @@ call_daily_php() {
|
||||
local args=( "$@" );
|
||||
|
||||
for arg in "${args[@]}"; do
|
||||
- php "${DIR_LIBRENMS}/daily.php" -f "${arg}";
|
||||
+ %PHP% "${DIR_LIBRENMS}/daily.php" -f "${arg}";
|
||||
done
|
||||
}
|
||||
|
||||
if [ -z "$arg" ]; then
|
||||
- up=$(php daily.php -f update >&2; echo $?)
|
||||
+ up=$(%PHP% daily.php -f update >&2; echo $?)
|
||||
if [ "$up" -eq 0 ]; then
|
||||
$0 no-code-update
|
||||
exit
|
||||
@@ -55,11 +55,7 @@ if [ -z "$arg" ]; then
|
||||
fi
|
||||
@@ -100,7 +100,7 @@ main () {
|
||||
cd ${DIR_LIBRENMS};
|
||||
|
||||
cnf=$(echo $(grep '\[.distributed_poller.\]' config.php | egrep -v -e '^//' -e '^#' | cut -d = -f 2 | sed 's/;//g'))
|
||||
- if ((${BASH_VERSINFO[0]} < 4)); then
|
||||
- cnf=`echo $cnf|tr [:upper:] [:lower:]`
|
||||
- else
|
||||
- cnf=${cnf,,}
|
||||
- fi
|
||||
+ cnf=`echo $cnf|tr [:upper:] [:lower:]`
|
||||
if [[ -z "$arg" ]]; then
|
||||
- up=$(php daily.php -f update >&2; echo $?)
|
||||
+ up=$(%PHP% daily.php -f update >&2; echo $?)
|
||||
if [[ "$up" == "0" ]]; then
|
||||
$0 no-code-update
|
||||
exit
|
||||
@@ -123,11 +123,7 @@ main () {
|
||||
fi
|
||||
|
||||
if [ -z "$cnf" ] || [ "$cnf" == "0" ] || [ "$cnf" == "false" ]; then
|
||||
# Call ourself again in case above pull changed or added something to daily.sh
|
||||
@@ -70,28 +66,28 @@ else
|
||||
no-code-update)
|
||||
# Updates of the code are disabled, just check for schema updates
|
||||
# and clean up the db.
|
||||
- status_run 'Updating SQL-Schema' 'php includes/sql-schema/update.php'
|
||||
+ status_run 'Updating SQL-Schema' '%PHP% includes/sql-schema/update.php'
|
||||
status_run 'Cleaning up DB' "$0 cleanup"
|
||||
;;
|
||||
post-pull)
|
||||
# List all tasks to do after pull in the order of execution
|
||||
- status_run 'Updating SQL-Schema' 'php includes/sql-schema/update.php'
|
||||
+ status_run 'Updating SQL-Schema' '%PHP% includes/sql-schema/update.php'
|
||||
status_run 'Updating submodules' "$0 submodules"
|
||||
status_run 'Cleaning up DB' "$0 cleanup"
|
||||
status_run 'Fetching notifications' "$0 notifications"
|
||||
;;
|
||||
cleanup)
|
||||
# Cleanups
|
||||
- php daily.php -f syslog
|
||||
- php daily.php -f eventlog
|
||||
- php daily.php -f authlog
|
||||
- php daily.php -f perf_times
|
||||
- php daily.php -f callback
|
||||
- php daily.php -f device_perf
|
||||
- php daily.php -f purgeusers
|
||||
- php daily.php -f bill_data
|
||||
- php daily.php -f alert_log
|
||||
- php daily.php -f rrd_purge
|
||||
+ %PHP% daily.php -f syslog
|
||||
+ %PHP% daily.php -f eventlog
|
||||
+ %PHP% daily.php -f authlog
|
||||
+ %PHP% daily.php -f perf_times
|
||||
+ %PHP% daily.php -f callback
|
||||
+ %PHP% daily.php -f device_perf
|
||||
+ %PHP% daily.php -f purgeusers
|
||||
+ %PHP% daily.php -f bill_data
|
||||
+ %PHP% daily.php -f alert_log
|
||||
+ %PHP% daily.php -f rrd_purge
|
||||
;;
|
||||
submodules)
|
||||
# Init+Update our submodules
|
||||
@@ -100,7 +96,7 @@ else
|
||||
;;
|
||||
notifications)
|
||||
# Get notifications
|
||||
- php daily.php -f notifications
|
||||
+ %PHP% daily.php -f notifications
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
cnf=$(echo $(grep '\[.distributed_poller.\]' config.php | egrep -v -e '^//' -e '^#' | cut -d = -f 2 | sed 's/;//g'))
|
||||
- if ((${BASH_VERSINFO[0]} < 4)); then
|
||||
- cnf=`echo $cnf|tr [:upper:] [:lower:]`
|
||||
- else
|
||||
- cnf=${cnf,,}
|
||||
- fi
|
||||
+ cnf=`echo $cnf|tr [:upper:] [:lower:]`
|
||||
|
||||
if [[ -z "$cnf" ]] || [[ "$cnf" == "0" ]] || [[ "$cnf" == "false" ]]; then
|
||||
# Call ourself again in case above pull changed or added something to daily.sh
|
||||
@@ -138,12 +134,12 @@ main () {
|
||||
no-code-update)
|
||||
# Updates of the code are disabled, just check for schema updates
|
||||
# and clean up the db.
|
||||
- status_run 'Updating SQL-Schema' 'php includes/sql-schema/update.php'
|
||||
+ status_run 'Updating SQL-Schema' '%PHP% includes/sql-schema/update.php'
|
||||
status_run 'Cleaning up DB' "$0 cleanup"
|
||||
;;
|
||||
post-pull)
|
||||
# List all tasks to do after pull in the order of execution
|
||||
- status_run 'Updating SQL-Schema' 'php includes/sql-schema/update.php'
|
||||
+ status_run 'Updating SQL-Schema' '%PHP% includes/sql-schema/update.php'
|
||||
status_run 'Updating submodules' "$0 submodules"
|
||||
status_run 'Cleaning up DB' "$0 cleanup"
|
||||
status_run 'Fetching notifications' "$0 notifications"
|
||||
|
@ -1,7 +1,7 @@
|
||||
$OpenBSD: patch-html_install_php,v 1.9 2016/10/14 12:48:55 sthen Exp $
|
||||
--- html/install.php.orig Fri Oct 14 13:25:21 2016
|
||||
+++ html/install.php Fri Oct 14 13:25:33 2016
|
||||
@@ -382,7 +382,8 @@ $config_file = <<<"EOD"
|
||||
$OpenBSD: patch-html_install_php,v 1.10 2016/12/14 21:37:03 sthen Exp $
|
||||
--- html/install.php.orig Fri Dec 2 10:38:42 2016
|
||||
+++ html/install.php Fri Dec 2 10:38:50 2016
|
||||
@@ -365,7 +365,8 @@ $config_file = <<<"EOD"
|
||||
#\$config\['base_url'\] = "http://librenms.company.com";
|
||||
|
||||
### Enable this to use rrdcached. Be sure rrd_dir is within the rrdcached dir
|
||||
|
@ -1,6 +1,6 @@
|
||||
$OpenBSD: patch-html_pages_about_inc_php,v 1.4 2016/10/14 12:48:55 sthen Exp $
|
||||
--- html/pages/about.inc.php.orig Fri Oct 14 13:25:21 2016
|
||||
+++ html/pages/about.inc.php Fri Oct 14 13:25:33 2016
|
||||
$OpenBSD: patch-html_pages_about_inc_php,v 1.5 2016/12/14 21:37:03 sthen Exp $
|
||||
--- html/pages/about.inc.php.orig Fri Dec 2 10:38:43 2016
|
||||
+++ html/pages/about.inc.php Fri Dec 2 10:38:50 2016
|
||||
@@ -157,7 +157,7 @@ $version_date = $versions['local_date'];
|
||||
echo "
|
||||
<div class='table-responsive'>
|
||||
@ -8,5 +8,5 @@ $OpenBSD: patch-html_pages_about_inc_php,v 1.4 2016/10/14 12:48:55 sthen Exp $
|
||||
- <tr><td><b>Version</b></td><td><a href='http://www.librenms.org/changelog.html'>$version - <span id='version_date'>$version_date</span></a></td></tr>
|
||||
+ <tr><td><b>Version</b></td><td><a href='http://www.librenms.org/changelog.html'>$project_version - <span id='version_date'>$version_date</span></a></td></tr>
|
||||
<tr><td><b>DB Schema</b></td><td>#$schema_version</td></tr>
|
||||
<tr><td><b>Apache</b></td><td>$apache_version</td></tr>
|
||||
<tr><td><b>Web Server</b></td><td>$webserv_version</td></tr>
|
||||
<tr><td><b>PHP</b></td><td>$php_version</td></tr>
|
||||
|
@ -1,6 +1,6 @@
|
||||
$OpenBSD: patch-includes_common_php,v 1.6 2016/10/14 12:48:55 sthen Exp $
|
||||
--- includes/common.php.orig Fri Oct 14 13:25:21 2016
|
||||
+++ includes/common.php Fri Oct 14 13:28:06 2016
|
||||
$OpenBSD: patch-includes_common_php,v 1.7 2016/12/14 21:37:03 sthen Exp $
|
||||
--- includes/common.php.orig Wed Dec 14 17:47:31 2016
|
||||
+++ includes/common.php Wed Dec 14 17:55:30 2016
|
||||
@@ -1109,16 +1109,15 @@ function version_info($remote = true)
|
||||
curl_setopt($api, CURLOPT_RETURNTRANSFER, 1);
|
||||
$output['github'] = json_decode(curl_exec($api), true);
|
||||
@ -17,8 +17,8 @@ $OpenBSD: patch-includes_common_php,v 1.6 2016/10/14 12:48:55 sthen Exp $
|
||||
$output['php_ver'] = phpversion();
|
||||
$output['mysql_ver'] = dbFetchCell('SELECT version()');
|
||||
$output['rrdtool_ver'] = implode(' ', array_slice(explode(' ', shell_exec($config['rrdtool'].' --version |head -n1')), 1, 1));
|
||||
- $output['netsnmp_ver'] = shell_exec($config['snmpget'].' --version 2>&1');
|
||||
+ $output['netsnmp_ver'] = shell_exec($config['snmpget'].' -V 2>&1');
|
||||
- $output['netsnmp_ver'] = str_replace('version: ', '', rtrim(shell_exec($config['snmpget'].' --version 2>&1')));
|
||||
+ $output['netsnmp_ver'] = str_replace('version: ', '', rtrim(shell_exec($config['snmpget'].' -V 2>&1')));
|
||||
|
||||
return $output;
|
||||
}//end version_info()
|
||||
|
@ -1,7 +1,7 @@
|
||||
$OpenBSD: patch-includes_defaults_inc_php,v 1.17 2016/10/14 12:48:55 sthen Exp $
|
||||
--- includes/defaults.inc.php.orig Fri Oct 14 13:25:21 2016
|
||||
+++ includes/defaults.inc.php Fri Oct 14 13:25:33 2016
|
||||
@@ -49,26 +49,26 @@ $config['db']['extension'] = 'mysqli';//mysql an
|
||||
$OpenBSD: patch-includes_defaults_inc_php,v 1.18 2016/12/14 21:37:03 sthen Exp $
|
||||
--- includes/defaults.inc.php.orig Fri Dec 2 10:38:43 2016
|
||||
+++ includes/defaults.inc.php Fri Dec 2 10:38:50 2016
|
||||
@@ -36,26 +36,26 @@ $config['db']['extension'] = 'mysqli';//mysql an
|
||||
$config['own_hostname'] = 'localhost';
|
||||
|
||||
// Location of executables
|
||||
@ -43,7 +43,7 @@ $OpenBSD: patch-includes_defaults_inc_php,v 1.17 2016/10/14 12:48:55 sthen Exp $
|
||||
|
||||
// Memcached - Keep immediate statistics
|
||||
$config['memcached']['enable'] = false;
|
||||
@@ -462,11 +462,11 @@ $config['billing']['bill_autoadd'] = 0;
|
||||
@@ -451,11 +451,11 @@ $config['billing']['bill_autoadd'] = 0;
|
||||
$config['billing']['base'] = 1000;
|
||||
// Set the base to divider bytes to kB, MB, GB ,... (1000|1024)
|
||||
// External Integration
|
||||
@ -58,7 +58,7 @@ $OpenBSD: patch-includes_defaults_inc_php,v 1.17 2016/10/14 12:48:55 sthen Exp $
|
||||
$config['smokeping']['pings'] = 20;
|
||||
// $config['oxidized']['enabled'] = FALSE;//Set to TRUE
|
||||
// $config['oxidized']['url'] = 'http://127.0.0.1:8888';// Set the Oxidized rest URL
|
||||
@@ -474,7 +474,7 @@ $config['smokeping']['pings'] = 20;
|
||||
@@ -463,7 +463,7 @@ $config['smokeping']['pings'] = 20;
|
||||
// NFSen RRD dir.
|
||||
$config['nfsen_enable'] = 0;
|
||||
// $config['nfsen_split_char'] = "_";
|
||||
@ -67,7 +67,7 @@ $OpenBSD: patch-includes_defaults_inc_php,v 1.17 2016/10/14 12:48:55 sthen Exp $
|
||||
// $config['nfsen_suffix'] = "_yourdomain_com";
|
||||
// Location Mapping
|
||||
// Use this feature to map ugly locations to pretty locations
|
||||
@@ -806,7 +806,7 @@ $config['api_demo'] = 0;
|
||||
@@ -795,7 +795,7 @@ $config['api_demo'] = 0;
|
||||
// Set this to 1 if you want to disable some untrusting features for the API
|
||||
// Distributed Poller-Settings
|
||||
$config['distributed_poller'] = false;
|
||||
|
@ -1,7 +1,7 @@
|
||||
$OpenBSD: patch-includes_functions_php,v 1.3 2016/10/14 12:48:55 sthen Exp $
|
||||
--- includes/functions.php.orig Fri Oct 14 13:25:22 2016
|
||||
+++ includes/functions.php Fri Oct 14 13:29:41 2016
|
||||
@@ -249,7 +249,7 @@ function delete_device($id)
|
||||
$OpenBSD: patch-includes_functions_php,v 1.4 2016/12/14 21:37:03 sthen Exp $
|
||||
--- includes/functions.php.orig Fri Dec 2 10:38:43 2016
|
||||
+++ includes/functions.php Fri Dec 2 10:38:50 2016
|
||||
@@ -235,7 +235,7 @@ function delete_device($id)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
$OpenBSD: patch-validate_php,v 1.7 2016/10/14 12:48:55 sthen Exp $
|
||||
--- validate.php.orig Fri Oct 14 13:25:33 2016
|
||||
+++ validate.php Fri Oct 14 13:25:41 2016
|
||||
@@ -35,7 +35,7 @@ if (isset($options['h'])) {
|
||||
exit;
|
||||
$OpenBSD: patch-validate_php,v 1.8 2016/12/14 21:37:03 sthen Exp $
|
||||
--- validate.php.orig Wed Dec 14 17:43:27 2016
|
||||
+++ validate.php Wed Dec 14 17:43:50 2016
|
||||
@@ -45,7 +45,7 @@ if (!file_exists('config.php')) {
|
||||
}
|
||||
|
||||
-if (strstr(`php -ln config.php`, 'No syntax errors detected')) {
|
||||
+if (strstr(`%PHP% -ln config.php`, 'No syntax errors detected')) {
|
||||
$first_line = `head -n1 config.php`;
|
||||
$last_lines = explode(PHP_EOL, `tail -n2 config.php`);
|
||||
if (substr($first_line, 0, 5) !== '<?php') {
|
||||
$config_failed = false;
|
||||
-$syntax_check = `php -ln config.php`;
|
||||
+$syntax_check = `%PHP% -ln config.php`;
|
||||
if (!str_contains($syntax_check, 'No syntax errors detected')) {
|
||||
print_fail('Syntax error in config.php');
|
||||
echo $syntax_check;
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user