Skip to content

Instantly share code, notes, and snippets.

@dlangille
Created July 27, 2018 22:17
Show Gist options
  • Save dlangille/ae3eddf4a76bb9e6189ef8a2773cdf65 to your computer and use it in GitHub Desktop.
Save dlangille/ae3eddf4a76bb9e6189ef8a2773cdf65 to your computer and use it in GitHub Desktop.
upgrade to 1.41
Index: Makefile
===================================================================
--- Makefile (revision 475278)
+++ Makefile (working copy)
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= librenms
-PORTVERSION= 1.35
+PORTVERSION= 1.41
PORTREVISION= 0
PORTEPOCH= 1
CATEGORIES= net-mgmt
@@ -25,26 +25,12 @@
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
+USE_PHP= ctype curl filter gd hash json ldap mbstring mcrypt mysqli openssl posix session simplexml snmp tokenizer xml zip
+# perhaps we also need python-memcache python-mysqldb
+
NO_BUILD= yes
RUN_DEPENDS+= rrdtool:databases/rrdtool \
@@ -91,7 +77,7 @@
poller-wrapper.py readmegen.yml renamehost.php services-wrapper.py \
snmptrap.php syslog.php validate.php
-ROOT_DIRS= LibreNMS contrib doc html includes lib logs mibs misc rrd scripts sql-schema tests vendor
+ROOT_DIRS= LibreNMS app bootstrap config contrib database doc html includes lib licenses logs mibs misc resources routes rrd scripts sql-schema storage tests
DOCS= AUTHORS.md CHANGELOG CONTRIBUTING.md LICENSE.txt README.md
PORTDOCS= *
Index: distinfo
===================================================================
--- distinfo (revision 475278)
+++ distinfo (working copy)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1516371936
-SHA256 (librenms-librenms-1.35_GH0.tar.gz) = 6e685c0c34283fd69e51f437ca8ac392c8ab8430bfb883ea4b63bb7b1cae8cbd
-SIZE (librenms-librenms-1.35_GH0.tar.gz) = 62667335
+TIMESTAMP = 1532468807
+SHA256 (librenms-librenms-1.41_GH0.tar.gz) = 293d5bfef49b9071039852d6ac2e8344cd813ab8e609d871bb873eafe7999495
+SIZE (librenms-librenms-1.41_GH0.tar.gz) = 31353495
Index: files/patch-LibreNMS_Validations_User.php
===================================================================
--- files/patch-LibreNMS_Validations_User.php (revision 475278)
+++ files/patch-LibreNMS_Validations_User.php (nonexistent)
@@ -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");
- }
-
Property changes on: files/patch-LibreNMS_Validations_User.php
___________________________________________________________________
Deleted: fbsd:nokeywords
## -1 +0,0 ##
-yes
\ No newline at end of property
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-text/plain
\ No newline at end of property
Index: files/patch-html_install.php
===================================================================
--- files/patch-html_install.php (revision 475278)
+++ files/patch-html_install.php (working copy)
@@ -1,6 +1,6 @@
---- html/install.php.orig 2017-12-31 20:48:36 UTC
-+++ html/install.php
-@@ -364,7 +364,7 @@ $config_file = <<<"EOD"
+--- html/install.php.orig 2018-07-25 10:34:35.069883000 +0000
++++ html/install.php 2018-07-25 10:35:08.175649000 +0000
+@@ -357,7 +357,7 @@
// This is the user LibreNMS will run as
//Please ensure this user is created and has the correct permissions to your install
@@ -7,14 +7,16 @@
-\$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\['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")) {
Index: files/patch-includes_defaults.inc.php
===================================================================
--- files/patch-includes_defaults.inc.php (revision 475278)
+++ files/patch-includes_defaults.inc.php (working copy)
@@ -1,32 +1,32 @@
---- includes/defaults.inc.php.orig 2017-12-31 20:48:36 UTC
-+++ includes/defaults.inc.php
-@@ -48,19 +48,21 @@ $config['fping_options']['retries'] = 3;
+--- includes/defaults.inc.php.orig 2018-06-30 21:37:37.000000000 +0000
++++ includes/defaults.inc.php 2018-07-25 10:43:08.404435000 +0000
+@@ -47,19 +47,19 @@
$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';
Index: files/patch-validate.php
===================================================================
--- files/patch-validate.php (nonexistent)
+++ files/patch-validate.php (working copy)
@@ -0,0 +1,32 @@
+--- validate.php.orig 2018-07-25 12:21:11.041211000 +0000
++++ validate.php 2018-07-25 12:23:26.366209000 +0000
+@@ -93,29 +93,6 @@
+ $pre_checks_failed = true;
+ }
+
+-// Composer checks
+-if (!file_exists('vendor/autoload.php')) {
+- print_fail('Composer has not been run, dependencies are missing', 'composer install --no-dev');
+- exit;
+-}
+-
+-// init autoloading
+-require_once 'vendor/autoload.php';
+-
+-
+-$dep_check = shell_exec('php scripts/composer_wrapper.php install --no-dev --dry-run');
+-preg_match_all('/Installing ([^ ]+\/[^ ]+) \(/', $dep_check, $dep_missing);
+-if (!empty($dep_missing[0])) {
+- print_fail("Missing dependencies!", "./scripts/composer_wrapper.php install --no-dev");
+- $pre_checks_failed = true;
+- print_list($dep_missing[1], "\t %s\n");
+-}
+-preg_match_all('/Updating ([^ ]+\/[^ ]+) \(/', $dep_check, $dep_outdated);
+-if (!empty($dep_outdated[0])) {
+- print_fail("Outdated dependencies", "./scripts/composer_wrapper.php install --no-dev");
+- print_list($dep_outdated[1], "\t %s\n");
+-}
+-
+ $validator = new Validator();
+ $validator->validate(array('dependencies'));
+ if ($validator->getGroupStatus('dependencies') == ValidationResult::FAILURE) {
Property changes on: files/patch-validate.php
___________________________________________________________________
Added: fbsd:nokeywords
## -0,0 +1 ##
+yes
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment