aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Langille <dvl@FreeBSD.org>2018-09-01 19:02:13 +0000
committerDan Langille <dvl@FreeBSD.org>2018-09-01 19:02:13 +0000
commitfc812000767ea2edc2d6896f09d31920a0bfd1ab (patch)
treef808f82725286f318768fa8a471cf52028704817
parent56a54e552d9a754a636a22f92a65b23e3b047786 (diff)
downloadports-fc812000767ea2edc2d6896f09d31920a0bfd1ab.tar.gz
ports-fc812000767ea2edc2d6896f09d31920a0bfd1ab.zip
Upgrade to 1.42.01
Approved by: maintainer (via private email) Differential Revision: https://reviews.freebsd.org/D16942
Notes
Notes: svn path=/head/; revision=478715
-rw-r--r--UPDATING52
-rw-r--r--net-mgmt/librenms/Makefile148
-rw-r--r--net-mgmt/librenms/distinfo8
-rw-r--r--net-mgmt/librenms/files/patch-.env.example19
-rw-r--r--net-mgmt/librenms/files/patch-LibreNMS_Validations_User.php33
-rw-r--r--net-mgmt/librenms/files/patch-config.php.default17
-rw-r--r--net-mgmt/librenms/files/patch-html_install.php18
-rw-r--r--net-mgmt/librenms/files/patch-includes_common.php26
-rw-r--r--net-mgmt/librenms/files/patch-includes_defaults.inc.php22
-rw-r--r--net-mgmt/librenms/files/patch-poller-wrapper.py6
-rw-r--r--net-mgmt/librenms/files/pkg-message.in25
11 files changed, 260 insertions, 114 deletions
diff --git a/UPDATING b/UPDATING
index df406556900c..6c7e27fd7438 100644
--- a/UPDATING
+++ b/UPDATING
@@ -6,6 +6,58 @@ You should get into the habit of checking this file for changes each time
you update your ports collection, before attempting any port upgrades.
20180901:
+ AFFECTS: net-mgmt/librenms
+ AUTHOR: dvl@FreeBSD.org
+
+ As of version 1.42, to conform with man hier, logs and rrd files have
+ relocated outside the WWW directory. When upgrading from < 1.42 to more
+ recent versions, the following steps are required.
+
+ You must update config.php and manually relocate the rrd and log files.
+ Before upgrading, please stop librenms, update the configuration, and
+ relocate the files.
+
+ If you find graphs are not updating, fping >= 4.0 requires an IPv6
+ address. Adding an IPv6 address should fix graphing.
+
+ Please add these entries to config.php:
+
+ $config['installed_from_package'] = true;
+ $config['log_dir'] = '/var/log/librenms';
+ $config['rrd_dir'] = '/var/db/librenms/rrd';
+
+ To relocate the files:
+
+ mkdir /var/log/librenms /var/db/librenms
+ chown www:ww: /var/log/librenms /var/db/librenms
+ cd /usr/local/www/librenms
+ mv rrd /var/db/librenms/
+ mv logs/librenms.log /var/log/librenms/
+ rmdir logs
+
+ An application key is required. Please follow these steps to generate it:
+
+ cd /usr/local/www/librenms
+ cp -i .env.sample .env
+
+ You might need to set your database details in that file.
+ Then run:
+
+ php artisan key:generate
+
+ The output should look something like this:
+
+ **************************************
+ * Application In Production! *
+ **************************************
+
+ Do you really wish to run this command? (yes/no) [no]:
+ > y
+
+ Application key [base64:P62La9V........qw=] set successfully.
+
+
+20180901:
AFFECTS: users of samba46
AUTHOR: antoine@FreeBSD.org
diff --git a/net-mgmt/librenms/Makefile b/net-mgmt/librenms/Makefile
index d1771efbf2b8..6dd9056dca8e 100644
--- a/net-mgmt/librenms/Makefile
+++ b/net-mgmt/librenms/Makefile
@@ -2,50 +2,22 @@
# $FreeBSD$
PORTNAME= librenms
-PORTVERSION= 1.35
-PORTREVISION= 0
+PORTVERSION= 1.42.01
+# RELEASE_TIMESTAMP is used for a patch inside the vendor code
+# it represents the release date via: git show --pretty='%H|%ct' -s 1.42.01
+# It sits here so you remember to update it with each release
+RELEASE_TIMESTAMP= 1533413232
PORTEPOCH= 1
CATEGORIES= net-mgmt
+MASTER_SITES= LOCAL/dvl:vendor
+DISTFILES= ${PORTNAME}-vendor-${DISTVERSIONPREFIX}${DISTVERSION}${DISTVERSIONSUFFIX}${EXTRACT_SUFX}:vendor
MAINTAINER= bofh@FreeBSD.org
COMMENT= Autodiscovering PHP/MySQL/SNMP based network monitoring
LICENSE= GPLv3
-USE_GITHUB= yes
-GH_ACCOUNT= librenms
-
-USES= python${PY_MYSQL} shebangfix
-SHEBANG_FILES= scripts/auth_test.php scripts/deploy-docs.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 \
- scripts/Migration/XML_Conversion/convert.sh \
- scripts/Migration/XML_Conversion/destwork.sh \
- scripts/Migration/XML_Conversion/mkdir.sh \
- scripts/removespikes.php scripts/agent-local/nfs-stats.sh \
- scripts/removespikes.pl scripts/watchmaillog/watchmaillog.pl \
- vendor/ezyang/htmlpurifier/maintenance/add-vimline.php \
- vendor/ezyang/htmlpurifier/maintenance/config-scanner.php \
- vendor/ezyang/htmlpurifier/maintenance/flush-definition-cache.php \
- vendor/ezyang/htmlpurifier/maintenance/flush.php \
- vendor/ezyang/htmlpurifier/maintenance/generate-entity-file.php \
- vendor/ezyang/htmlpurifier/maintenance/generate-includes.php \
- vendor/ezyang/htmlpurifier/maintenance/generate-schema-cache.php \
- vendor/ezyang/htmlpurifier/maintenance/generate-standalone.php \
- vendor/ezyang/htmlpurifier/maintenance/merge-library.php \
- vendor/ezyang/htmlpurifier/maintenance/old-extract-schema.php \
- vendor/ezyang/htmlpurifier/maintenance/old-remove-require-once.php \
- vendor/ezyang/htmlpurifier/maintenance/old-remove-schema-def.php \
- vendor/ezyang/htmlpurifier/maintenance/rename-config.php \
- vendor/ezyang/htmlpurifier/maintenance/remove-trailing-whitespace.php \
- vendor/ezyang/htmlpurifier/maintenance/update-config.php \
- vendor/tecnickcom/tcpdf/tools/tcpdf_addfont.php \
- poller.php poller-wrapper.py
-
-USE_PHP= ctype curl filter gd hash json ldap mcrypt mysqli openssl posix session simplexml snmp tokenizer xml
-
-NO_BUILD= yes
+# perhaps we also need python-memcache python-mysqldb
RUN_DEPENDS+= rrdtool:databases/rrdtool \
dot:graphics/graphviz \
@@ -55,6 +27,18 @@ RUN_DEPENDS+= rrdtool:databases/rrdtool \
bash:shells/bash \
sudo:security/sudo
+USES= python${PY_MYSQL} shebangfix
+
+USE_PHP= ctype curl filter gd hash json ldap mbstring mcrypt mysqli openssl pdo posix session simplexml snmp tokenizer xml zip
+
+USE_GITHUB= yes
+GH_ACCOUNT= librenms
+
+USERS= www
+WWW_USER= www
+
+NO_BUILD= yes
+
OPTIONS_DEFINE= APACHEMOD FPING IPMITOOL LIBVIRT MYSQLD NAGPLUGINS NMAP PYPOLLER WMIC DOCS EXAMPLES X11
OPTIONS_DEFAULT= APACHEMOD FPING IPMITOOL LIBVIRT NAGPLUGINS NMAP PYPOLLER WMIC
APACHEMOD_DESC= Use PHP with Apache 2.2+ module
@@ -80,35 +64,78 @@ WMIC_RUN_DEPENDS= wmic:net-mgmt/wmi-client
MYSQLD_USES= mysql:server
MYSQLD_USES_OFF= mysql:client
+SHEBANG_FILES= scripts/auth_test.php scripts/deploy-docs.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 \
+ scripts/Migration/XML_Conversion/convert.sh \
+ scripts/Migration/XML_Conversion/destwork.sh \
+ scripts/Migration/XML_Conversion/mkdir.sh \
+ scripts/removespikes.php scripts/agent-local/nfs-stats.sh \
+ scripts/removespikes.pl scripts/watchmaillog/watchmaillog.pl \
+ poller.php poller-wrapper.py \
+ ../${PORTNAME}-vendor-${PORTVERSION}/ezyang/htmlpurifier/maintenance/generate-includes.php \
+ ../${PORTNAME}-vendor-${PORTVERSION}/ezyang/htmlpurifier/maintenance/flush-definition-cache.php \
+ ../${PORTNAME}-vendor-${PORTVERSION}/ezyang/htmlpurifier/maintenance/old-remove-require-once.php \
+ ../${PORTNAME}-vendor-${PORTVERSION}/ezyang/htmlpurifier/maintenance/config-scanner.php \
+ ../${PORTNAME}-vendor-${PORTVERSION}/ezyang/htmlpurifier/maintenance/flush.php \
+ ../${PORTNAME}-vendor-${PORTVERSION}/ezyang/htmlpurifier/maintenance/add-vimline.php \
+ ../${PORTNAME}-vendor-${PORTVERSION}/ezyang/htmlpurifier/maintenance/remove-trailing-whitespace.php \
+ ../${PORTNAME}-vendor-${PORTVERSION}/ezyang/htmlpurifier/maintenance/merge-library.php \
+ ../${PORTNAME}-vendor-${PORTVERSION}/ezyang/htmlpurifier/maintenance/old-extract-schema.php \
+ ../${PORTNAME}-vendor-${PORTVERSION}/ezyang/htmlpurifier/maintenance/rename-config.php \
+ ../${PORTNAME}-vendor-${PORTVERSION}/ezyang/htmlpurifier/maintenance/generate-standalone.php \
+ ../${PORTNAME}-vendor-${PORTVERSION}/ezyang/htmlpurifier/maintenance/generate-schema-cache.php \
+ ../${PORTNAME}-vendor-${PORTVERSION}/ezyang/htmlpurifier/maintenance/old-remove-schema-def.php \
+ ../${PORTNAME}-vendor-${PORTVERSION}/ezyang/htmlpurifier/maintenance/generate-entity-file.php \
+ ../${PORTNAME}-vendor-${PORTVERSION}/ezyang/htmlpurifier/maintenance/update-config.php \
+ ../${PORTNAME}-vendor-${PORTVERSION}/swiftmailer/swiftmailer/lib/swiftmailer_generate_mimes_config.php \
+ ../${PORTNAME}-vendor-${PORTVERSION}/tecnickcom/tcpdf/tools/tcpdf_addfont.php
+
SUB_FILES+= pkg-message
SUB_LIST+= PHP="${PHPBASE}/bin/php" PYTHON=${PYTHON_CMD}
-ROOT_FILES= addhost.php adduser.php alerts.php build-base.php build.sql \
- billing-calculate.php check-services.php composer.json \
- config.php.default config_to_json.php cronic daily.php daily.sh \
+ROOT_FILES= .env.example addhost.php adduser.php alerts.php artisan billing-calculate.php \
+ build-base.php build.sql check-services.php composer.json \
+ composer.lock config.php.default config_to_json.php cronic daily.php daily.sh \
delhost.php discovery-wrapper.py discovery.php dist-pollers.php irc.php \
- mkdocs.yml pbin.sh phpunit.xml poll-billing.php poller.php poller-service.py \
- poller-wrapper.py readmegen.yml renamehost.php services-wrapper.py \
+ librenms-service.py mkdocs.yml pbin.sh phpunit.xml ping.php poll-billing.php poller.php poller-service.py \
+ poller-wrapper.py readmegen.yml renamehost.php services-wrapper.py snmp-scan.py \
snmptrap.php syslog.php validate.php
-ROOT_DIRS= LibreNMS contrib doc html includes lib logs mibs misc rrd scripts sql-schema tests vendor
-
-DOCS= AUTHORS.md CHANGELOG CONTRIBUTING.md LICENSE.txt README.md
+ROOT_DIRS= LibreNMS app bootstrap config contrib database doc html includes lib licenses logs mibs misc resources routes scripts sql-schema storage tests
+
+# these are directories which require a generic @DIR entry in pkg-plist
+OTHER_DIRS= storage/app/public \
+ storage/debugbar \
+ storage/framework/testing \
+ storage/logs \
+ vendor/amenadiel/jpgraph/tests/_output \
+ vendor/amenadiel/jpgraph/tests/_support/_generated \
+ vendor/laravel/laravel/bootstrap/cache \
+ vendor/laravel/laravel/storage/app/public \
+ vendor/laravel/laravel/storage/framework/cache \
+ vendor/laravel/laravel/storage/framework/sessions \
+ vendor/laravel/laravel/storage/framework/testing \
+ vendor/laravel/laravel/storage/framework/views \
+ vendor/laravel/laravel/storage/logs
+
+DOCS= AUTHORS.md CHANGELOG.md CONTRIBUTING.md LICENSE.txt README.md
PORTDOCS= *
PORTEXAMPLES= snmp.conf.example snmpd.conf.example
NO_ARCH= yes
APACHEMOD_USES= php:mod
APACHEMOD_USES_OFF= php:web
-APACHEMOD_USE= APACHE_RUN=22+
+APACHEMOD_USE= USES=apache:run,22+
post-patch:
- ${REINPLACE_CMD} 's|%%LOCALBASE%%|${LOCALBASE}|g' \
- ${WRKSRC}/poller-wrapper.py ${WRKSRC}/poller.php
- ${REINPLACE_CMD} 's|%%PORTVERSION%%|${PORTVERSION}|g' \
- ${WRKSRC}/includes/common.php
- ${REINPLACE_CMD} -e 's|/opt/librenms|${WWWDIR}|' \
- ${WRKSRC}/html/install.php
+ ${REINPLACE_CMD} 's|%%PORTNAME%%|${PORTNAME}|g' ${WRKSRC}/config.php.default
+ ${REINPLACE_CMD} 's|%%WWW_USER%%|${WWW_USER}|g' ${WRKSRC}/config.php.default
+ ${REINPLACE_CMD} 's|%%LOCALBASE%%|${LOCALBASE}|g' ${WRKSRC}/poller-wrapper.py ${WRKSRC}/poller.php
+ ${REINPLACE_CMD} 's|%%PORTVERSION%%|${PORTVERSION}|g' ${WRKSRC}/includes/common.php
+ ${REINPLACE_CMD} 's|%%RELEASE_TIMESTAMP%%|${RELEASE_TIMESTAMP}|g' ${WRKSRC}/includes/common.php
+ ${REINPLACE_CMD} -e 's|/opt/librenms|${WWWDIR}|' ${WRKSRC}/html/install.php
${RM} ${WRKSRC}/LibreNMS/Validations/Updates.php
do-install:
@@ -120,6 +147,8 @@ do-install:
.for f in ${ROOT_FILES}
${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}/${WWWDIR}
.endfor
+ ${MKDIR} ${STAGEDIR}/${WWWDIR}/vendor
+ (cd ${WRKDIR}/${PORTNAME}-vendor-${PORTVERSION} && ${COPYTREE_SHARE} . ${STAGEDIR}/${WWWDIR}/vendor)
# Make daily.sh executable
${CHMOD} 0755 ${STAGEDIR}/${WWWDIR}/daily.sh
# Files in scripts dir should be executable
@@ -141,11 +170,24 @@ do-install-EXAMPLES-on:
${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}/${EXAMPLESDIR}
.endfor
+# these values should be outside the www tree now
+ ${MKDIR} ${STAGEDIR}/var/log/${PORTNAME}
+ ${MKDIR} ${STAGEDIR}/var/db/${PORTNAME}
+
post-install:
- @${FIND} -s ${STAGEDIR}${WWWDIR} -type f '(' -name '*.orig' -or -name '*.bak' ')' -delete
+ @${FIND} -s ${STAGEDIR}${WWWDIR} -type f '(' -name '*.orig' -or -name '*.bak' -or -name '.gitignore' ')' -delete
@${FIND} -s ${STAGEDIR}${WWWDIR} -not -type d | ${SORT} | \
${SED} -e 's#^${STAGEDIR}${PREFIX}/##' >> ${TMPPLIST}
@${ECHO_CMD} "@dir(www,www,0775) ${WWWDIR}/logs" >> ${TMPPLIST}
- @${ECHO_CMD} "@dir(www,www,0775) ${WWWDIR}/rrd" >> ${TMPPLIST}
+ @${ECHO_CMD} "@dir(www,www,0775) ${WWWDIR}/bootstrap/cache" >> ${TMPPLIST}
+ @${ECHO_CMD} "@dir(www,www,0775) ${WWWDIR}/storage" >> ${TMPPLIST}
+ @${ECHO_CMD} "@dir(www,www,0775) ${WWWDIR}/storage/framework/cache" >> ${TMPPLIST}
+ @${ECHO_CMD} "@dir(www,www,0775) ${WWWDIR}/storage/framework/sessions" >> ${TMPPLIST}
+ @${ECHO_CMD} "@dir(www,www,0775) ${WWWDIR}/storage/framework/views" >> ${TMPPLIST}
+ @${ECHO_CMD} "@dir(www,www,0775) /var/log/${PORTNAME}" >> ${TMPPLIST}
+ @${ECHO_CMD} "@dir(www,www,0775) /var/db/${PORTNAME}" >> ${TMPPLIST}
+.for f in ${OTHER_DIRS}
+ @${ECHO_CMD} "@dir(root,www,0775) ${WWWDIR}/${f}" >> ${TMPPLIST}
+.endfor
.include <bsd.port.mk>
diff --git a/net-mgmt/librenms/distinfo b/net-mgmt/librenms/distinfo
index 49244135fa14..9e35b70af1b6 100644
--- a/net-mgmt/librenms/distinfo
+++ b/net-mgmt/librenms/distinfo
@@ -1,3 +1,5 @@
-TIMESTAMP = 1516371936
-SHA256 (librenms-librenms-1.35_GH0.tar.gz) = 6e685c0c34283fd69e51f437ca8ac392c8ab8430bfb883ea4b63bb7b1cae8cbd
-SIZE (librenms-librenms-1.35_GH0.tar.gz) = 62667335
+TIMESTAMP = 1535580261
+SHA256 (librenms-vendor-1.42.01.tar.gz) = a3695b56715c79f367d324b161b7f8130f93f2d034c20d7bab22cc53e352f504
+SIZE (librenms-vendor-1.42.01.tar.gz) = 31809735
+SHA256 (librenms-librenms-1.42.01_GH0.tar.gz) = 91748b468e569826e27797f3b88db764a468dc82dddc507a1c7994dff1309c23
+SIZE (librenms-librenms-1.42.01_GH0.tar.gz) = 31794610
diff --git a/net-mgmt/librenms/files/patch-.env.example b/net-mgmt/librenms/files/patch-.env.example
new file mode 100644
index 000000000000..923ccc8944d4
--- /dev/null
+++ b/net-mgmt/librenms/files/patch-.env.example
@@ -0,0 +1,19 @@
+--- .env.example.orig 2018-08-29 21:46:24.417728000 +0000
++++ .env.example 2018-08-29 21:46:59.231222000 +0000
+@@ -1,8 +1,12 @@
+ APP_KEY=
+
+-#DB_HOST=
+-#DB_DATABASE=
+-#DB_USERNAME=
+-#DB_PASSWORD=
++DB_HOST=localhost
++DB_DATABASE=librenms
++DB_USERNAME=librenms
++DB_PASSWORD=
+
+ #APP_URL=
++NODE_ID=1
++DB_PORT=3306
++LIBRENMS_USER=librenms
++
diff --git a/net-mgmt/librenms/files/patch-LibreNMS_Validations_User.php b/net-mgmt/librenms/files/patch-LibreNMS_Validations_User.php
deleted file mode 100644
index bd1081d060fd..000000000000
--- a/net-mgmt/librenms/files/patch-LibreNMS_Validations_User.php
+++ /dev/null
@@ -1,33 +0,0 @@
---- LibreNMS/Validations/User.php.orig 2017-12-31 20:48:36 UTC
-+++ LibreNMS/Validations/User.php
-@@ -62,29 +62,7 @@ class User implements ValidationGroup
-
-
- // Let's test the user configured if we have it
-- if (Config::has('user')) {
-- $dir = Config::get('install_dir');
--
-- $find_result = rtrim(`find $dir \! -user $lnms_username -o \! -group $lnms_groupname &> /dev/null`);
-- if (!empty($find_result)) {
-- // Ignore the two logs that may be created by the
-- $files = array_diff(explode(PHP_EOL, $find_result), array(
-- "$dir/logs/error_log",
-- "$dir/logs/access_log",
-- ));
--
-- if (!empty($files)) {
-- $result = ValidationResult::fail(
-- "We have found some files that are owned by a different user than $lnms_username, this " .
-- 'will stop you updating automatically and / or rrd files being updated causing graphs to fail.'
-- )
-- ->setFix("chown -R $lnms_username:$lnms_groupname $dir")
-- ->setList('Files', $files);
--
-- $validator->result($result);
-- }
-- }
-- } else {
-+ if (!Config::has('user')) {
- $validator->warn("You don't have \$config['user'] set, this most likely needs to be set to librenms");
- }
-
diff --git a/net-mgmt/librenms/files/patch-config.php.default b/net-mgmt/librenms/files/patch-config.php.default
index c1eaa777ad17..a61475aa3e56 100644
--- a/net-mgmt/librenms/files/patch-config.php.default
+++ b/net-mgmt/librenms/files/patch-config.php.default
@@ -1,7 +1,20 @@
---- config.php.default.orig 2017-12-31 20:48:36 UTC
+--- config.php.default.orig 2018-08-04 20:07:12 UTC
+++ config.php.default
-@@ -10,7 +10,7 @@ $config['db_name'] = 'librenms';
+@@ -2,15 +2,20 @@
+ ## Have a look in includes/defaults.inc.php for examples of settings you can set here. DO NOT EDIT defaults.inc.php!
+
++$config['installed_from_package'] = true;
++
+ ### Database config
+ $config['db_host'] = 'localhost';
+ $config['db_user'] = 'USERNAME';
+ $config['db_pass'] = 'PASSWORD';
+ $config['db_name'] = 'librenms';
+
++$config['log_dir'] = '/var/log/librenms';
++$config['rrd_dir'] = '/var/db/librenms/rrd';
++
// This is the user LibreNMS will run as
//Please ensure this user is created and has the correct permissions to your install
-$config['user'] = 'librenms';
diff --git a/net-mgmt/librenms/files/patch-html_install.php b/net-mgmt/librenms/files/patch-html_install.php
index 9973465e2a32..f87bf965497c 100644
--- a/net-mgmt/librenms/files/patch-html_install.php
+++ b/net-mgmt/librenms/files/patch-html_install.php
@@ -1,20 +1,22 @@
---- html/install.php.orig 2017-12-31 20:48:36 UTC
+--- html/install.php.orig 2018-08-04 20:07:12 UTC
+++ html/install.php
-@@ -364,7 +364,7 @@ $config_file = <<<"EOD"
+@@ -357,7 +357,7 @@ $config_file = <<<"EOD"
// This is the user LibreNMS will run as
//Please ensure this user is created and has the correct permissions to your install
-\$config['user'] = 'librenms';
+\$config['user'] = 'www';
- ### Memcached config - We use this to store realtime usage
- \$config\['memcached'\]\['enable'\] = FALSE;
-@@ -395,7 +395,7 @@ $config_file = <<<"EOD"
+ ### Locations - it is recommended to keep the default
+ #\$config\['install_dir'\] = "$install_dir";
+@@ -383,8 +383,8 @@ $config_file = <<<"EOD"
#\$config\['nets'\]\[\] = "192.168.0.0/16";
- # Uncomment the next line to disable daily updates
--#\$config\['update'\] = 0;
-+\$config\['update'\] = 0;
+ # Update configuration
+-#\$config\['update_channel'\] = 'release'; # uncomment to follow the monthly release channel
+-#\$config\['update'\] = 0; # uncomment to completely disable updates
++\$config\['update_channel'\] = 'release'; # uncomment to follow the monthly release channel
++\$config\['update'\] = 0; # uncomment to completely disable updates
EOD;
if (!file_exists("../config.php")) {
diff --git a/net-mgmt/librenms/files/patch-includes_common.php b/net-mgmt/librenms/files/patch-includes_common.php
new file mode 100644
index 000000000000..0922a8dcd71f
--- /dev/null
+++ b/net-mgmt/librenms/files/patch-includes_common.php
@@ -0,0 +1,26 @@
+--- includes/common.php.orig 2018-08-04 20:07:12 UTC
++++ includes/common.php
+@@ -1157,6 +1157,10 @@ function version_info($remote = false)
+ $output['local_sha'] = $local_sha;
+ $output['local_date'] = $local_date;
+ $output['local_branch'] = rtrim(`git rev-parse --abbrev-ref HEAD`);
++ } else {
++ $output['local_ver'] = '1.42.01';
++ # obtained via git show --pretty='%H|%ct' -s 1.42.01
++ $output['local_date'] = 1533413232;
+ }
+ $output['db_schema'] = dbIsConnected() ? get_db_schema() : '?';
+ $output['php_ver'] = phpversion();
+@@ -1713,6 +1717,12 @@ function set_numeric($value, $default =
+
+ function check_git_exists()
+ {
++ global $config;
++
++ if (!empty($config['installed_from_package'])) {
++ return false;
++ }
++
+ exec('git > /dev/null 2>&1', $response, $exit_code);
+ if ($exit_code === 1) {
+ return true;
diff --git a/net-mgmt/librenms/files/patch-includes_defaults.inc.php b/net-mgmt/librenms/files/patch-includes_defaults.inc.php
index 7921bfa94df5..1762c44f5f9f 100644
--- a/net-mgmt/librenms/files/patch-includes_defaults.inc.php
+++ b/net-mgmt/librenms/files/patch-includes_defaults.inc.php
@@ -1,32 +1,32 @@
---- includes/defaults.inc.php.orig 2017-12-31 20:48:36 UTC
+--- includes/defaults.inc.php.orig 2018-08-04 20:07:12 UTC
+++ includes/defaults.inc.php
-@@ -48,19 +48,21 @@ $config['fping_options']['retries'] = 3;
+@@ -47,19 +47,19 @@ $config['own_hostname'] = 'localhost';
$config['fping_options']['timeout'] = 500;
$config['fping_options']['count'] = 3;
- $config['fping_options']['millisec'] = 200;
+ $config['fping_options']['interval'] = 500;
-$config['snmpwalk'] = '/usr/bin/snmpwalk';
-$config['snmpget'] = '/usr/bin/snmpget';
-$config['snmpbulkwalk'] = '/usr/bin/snmpbulkwalk';
+-$config['snmptranslate'] = '/usr/bin/snmptranslate';
+$config['snmpwalk'] = '/usr/local/bin/snmpwalk';
+$config['snmpget'] = '/usr/local/bin/snmpget';
+$config['snmpbulkwalk'] = '/usr/local/bin/snmpbulkwalk';
- $config['snmptranslate'] = '/usr/bin/snmptranslate';
++$config['snmptranslate'] = '/usr/local/bin/snmptranslate';
$config['whois'] = '/usr/bin/whois';
-$config['ping'] = '/bin/ping';
-$config['mtr'] = '/usr/bin/mtr';
-$config['nmap'] = '/usr/bin/nmap';
-+$config['ping'] = '/sbin/ping';
-+$config['mtr'] = '/usr/local/bin/mtr';
-+$config['nmap'] = '/usr/local/bin/nmap';
- $config['nagios_plugins'] = '/usr/lib/nagios/plugins';
+-$config['nagios_plugins'] = '/usr/lib/nagios/plugins';
-$config['ipmitool'] = '/usr/bin/ipmitool';
-$config['virsh'] = '/usr/bin/virsh';
-$config['dot'] = '/usr/bin/dot';
-$config['sfdp'] = '/usr/bin/sfdp';
-+$config['rrdtool'] = '/usr/local/bin/rrdtool';
-+$config['rrdtool_version'] = 1.7;
++$config['ping'] = '/sbin/ping';
++$config['mtr'] = '/usr/local/bin/mtr';
++$config['nmap'] = '/usr/localbin/nmap';
++$config['nagios_plugins'] = '/usr/local/libexec/nagios';
+$config['ipmitool'] = '/usr/local/bin/ipmitool';
-+$config['virsh'] = '/usr/lacal/bin/virsh';
++$config['virsh'] = '/usr/local/bin/virsh';
+$config['dot'] = '/usr/local/bin/dot';
+$config['sfdp'] = '/usr/local/bin/sfdp';
diff --git a/net-mgmt/librenms/files/patch-poller-wrapper.py b/net-mgmt/librenms/files/patch-poller-wrapper.py
index d0ab95987a67..14d125c8491a 100644
--- a/net-mgmt/librenms/files/patch-poller-wrapper.py
+++ b/net-mgmt/librenms/files/patch-poller-wrapper.py
@@ -1,10 +1,10 @@
---- poller-wrapper.py.orig 2018-01-14 15:32:19 UTC
+--- poller-wrapper.py.orig 2018-08-29 23:25:16 UTC
+++ poller-wrapper.py
-@@ -36,6 +36,8 @@ except:
+@@ -37,6 +37,8 @@ except:
print "threading, Queue, sys, subprocess, time, os, json"
sys.exit(2)
-+os.environ['PATH'] += ':%%LOCALBASE%%/sbin:%%LOCALBASE%%/bin'
++os.environ['PATH'] += ':/usr/local/sbin:/usr/local/bin'
+
try:
import MySQLdb
diff --git a/net-mgmt/librenms/files/pkg-message.in b/net-mgmt/librenms/files/pkg-message.in
index 5324410d4682..a4f944dacd35 100644
--- a/net-mgmt/librenms/files/pkg-message.in
+++ b/net-mgmt/librenms/files/pkg-message.in
@@ -1,5 +1,5 @@
=== Configuration details ===
-The following is recommended for /var/db/mysql/my.cnf
+The following is recommended for /usr/local/etc/mysql/my.cnf
NOTE: these are global settings. Please read this first:
@@ -26,3 +26,26 @@ PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
01 * * * * www %%PHP%% %%WWWDIR%%/billing-calculate.php >> /dev/null 2>&1
*/5 * * * * www %%PHP%% %%WWWDIR%%/check-services.php >> /dev/null 2>&1
+For a fresh install, you need to create an APP_KEY:
+
+cd %%WWWDIR%%
+cp -i .env.sample .env
+
+You might need to set your database details in that file
+Then run:
+
+php artisan key:generate
+
+The output should look something like this:
+
+**************************************
+* Application In Production! *
+**************************************
+
+ Do you really wish to run this command? (yes/no) [no]:
+ > y
+
+Application key [base64:P62La9V........qw=] set successfully.
+
+After that, follow the LibreNMS documentation for configuration.
+