View | Details | Raw Unified | Return to bug 232658 | Differences between
and this patch

Collapse All | Expand All

(-)net-mgmt/librenms/Makefile (-5 / +4 lines)
Lines 2-13 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	librenms
4
PORTNAME=	librenms
5
PORTVERSION=	1.43
5
PORTVERSION=	1.45
6
PORTREVISION=	1
7
# RELEASE_TIMESTAMP is used for a patch inside the vendor code
6
# RELEASE_TIMESTAMP is used for a patch inside the vendor code
8
# it represents the release date via: git show --pretty='%H|%ct' -s 1.42.01
7
# it represents the release date via: git show --pretty='%H|%ct' -s 1.42.01
9
# It sits here so you remember to update it with each release
8
# It sits here so you remember to update it with each release
10
RELEASE_TIMESTAMP=	1535704658
9
RELEASE_TIMESTAMP=	1539772408
11
PORTEPOCH=	1
10
PORTEPOCH=	1
12
CATEGORIES=	net-mgmt
11
CATEGORIES=	net-mgmt
13
MASTER_SITES=	LOCAL/dvl:vendor
12
MASTER_SITES=	LOCAL/dvl:vendor
Lines 30-36 Link Here
30
29
31
USES=		python${PY_MYSQL} shebangfix
30
USES=		python${PY_MYSQL} shebangfix
32
31
33
USE_PHP=	ctype curl filter gd hash json ldap mbstring mcrypt mysqli openssl pdo posix session simplexml snmp tokenizer xml zip
32
USE_PHP=	ctype curl filter gd hash json ldap mbstring mysqli openssl pdo pdo_mysql posix session simplexml snmp tokenizer xml zip
34
33
35
USE_GITHUB=	yes
34
USE_GITHUB=	yes
36
GH_ACCOUNT=	librenms
35
GH_ACCOUNT=	librenms
Lines 104-110 Link Here
104
		poller-wrapper.py readmegen.yml renamehost.php services-wrapper.py snmp-scan.py \
103
		poller-wrapper.py readmegen.yml renamehost.php services-wrapper.py snmp-scan.py \
105
		snmptrap.php syslog.php validate.php
104
		snmptrap.php syslog.php validate.php
106
105
107
ROOT_DIRS=	LibreNMS app bootstrap config contrib database doc html includes lib licenses logs mibs misc resources routes scripts sql-schema storage tests
106
ROOT_DIRS=	LibreNMS app bootstrap config contrib database doc html includes licenses logs mibs misc resources routes scripts sql-schema storage tests
108
107
109
# these are directories which require a generic @DIR entry in pkg-plist
108
# these are directories which require a generic @DIR entry in pkg-plist
110
OTHER_DIRS=	storage/app/public \
109
OTHER_DIRS=	storage/app/public \
(-)net-mgmt/librenms/distinfo (-5 / +5 lines)
Lines 1-5 Link Here
1
TIMESTAMP = 1535832769
1
TIMESTAMP = 1540995479
2
SHA256 (librenms-vendor-1.43.tar.gz) = e7364c085d5c636fdf8fd1dbc3d35da16b7a6ceee8934e740c8c3a8f6766d95a
2
SHA256 (librenms-vendor-1.45.tar.gz) = 2c67feacbb448591528870d4c55448f8bcb804bdb1845902cdb2dc1b9f4846f3
3
SIZE (librenms-vendor-1.43.tar.gz) = 31842846
3
SIZE (librenms-vendor-1.45.tar.gz) = 31718828
4
SHA256 (librenms-librenms-1.43_GH0.tar.gz) = 6f5fc969eae766d894715f703628534b35420ba3b77cc25988abfd522f14cb6c
4
SHA256 (librenms-librenms-1.45_GH0.tar.gz) = b3365bf88c40c0ee098edbf2b34510e737f357c483560f04926775c4dea9954d
5
SIZE (librenms-librenms-1.43_GH0.tar.gz) = 32876746
5
SIZE (librenms-librenms-1.45_GH0.tar.gz) = 30880140
(-)net-mgmt/librenms/files/patch-LibreNMS_Validations_Dependencies.php (+12 lines)
Line 0 Link Here
1
--- LibreNMS/Validations/Dependencies.php.orig	2018-10-24 19:04:18 UTC
2
+++ LibreNMS/Validations/Dependencies.php
3
@@ -38,6 +38,9 @@ class Dependencies extends BaseValidatio
4
      */
5
     public function validate(Validator $validator)
6
     {
7
+        $validator->ok("Installed from package; no Composer required");
8
+        return;
9
+
10
         $composer_output = trim(shell_exec($validator->getBaseDir() . '/scripts/composer_wrapper.php --version'));
11
         $found = preg_match(
12
             '/Composer.*(\d+\.\d+\.\d+(-RC\d*|-beta\d?|-alpha\d+)?)/',
(-)net-mgmt/librenms/files/patch-LibreNMS_Validations_Programs.php (+10 lines)
Line 0 Link Here
1
--- LibreNMS/Validations/Programs.php.orig	2018-10-17 10:33:28 UTC
2
+++ LibreNMS/Validations/Programs.php
3
@@ -73,6 +73,7 @@ class Programs extends BaseValidation
4
             return;
5
         }
6
 
7
+        $validator->warn("fping FAILURES can be ignored if running LibreNMS in a jail without ::1. You may want to test it manually: fping ::1");
8
         $validator->fail(
9
             "$bin could not be executed. $bin must have CAP_NET_RAW capability (getcap) or suid. Selinux exlusions may be required.\n ($output)"
10
         );
(-)net-mgmt/librenms/files/patch-LibreNMS_Validations_User.php (+18 lines)
Line 0 Link Here
1
--- LibreNMS/Validations/User.php.orig	2018-10-17 10:33:28 UTC
2
+++ LibreNMS/Validations/User.php
3
@@ -71,6 +71,7 @@ class User extends BaseValidation
4
                 "sudo setfacl -d -m g::rwx $rrd_dir $log_dir $dir/bootstrap/cache/ $dir/storage/\n" .
5
                 "sudo chmod -R ug=rwX $rrd_dir $log_dir $dir/bootstrap/cache/ $dir/storage/\n";
6
 
7
+            if (!Config::get('installed_from_package')) {
8
             $find_result = rtrim(`find $dir \! -user $lnms_username -o \! -group $lnms_groupname 2> /dev/null`);
9
             if (!empty($find_result)) {
10
                 // Ignore files created by the webserver
11
@@ -124,6 +125,7 @@ class User extends BaseValidation
12
                     'Some folders have incorrect file permissions, this may cause issues.'
13
                 )->setFix($fix)->setList('Files', explode(PHP_EOL, $incorrect)));
14
             }
15
+            }
16
         } else {
17
             $validator->warn("You don't have \$config['user'] set, this most likely needs to be set to librenms");
18
         }
(-)net-mgmt/librenms/files/patch-html_install.php (-3 / +20 lines)
Lines 1-6 Link Here
1
--- html/install.php.orig	2018-08-04 20:07:12 UTC
1
--- html/install.php.orig	2018-10-17 10:33:28 UTC
2
+++ html/install.php
2
+++ html/install.php
3
@@ -357,7 +357,7 @@ $config_file = <<<"EOD"
3
@@ -358,7 +358,7 @@ $config_file = <<<"EOD"
4
 
4
 
5
 // This is the user LibreNMS will run as
5
 // This is the user LibreNMS will run as
6
 //Please ensure this user is created and has the correct permissions to your install
6
 //Please ensure this user is created and has the correct permissions to your install
Lines 9-15 Link Here
9
 
9
 
10
 ### Locations - it is recommended to keep the default
10
 ### Locations - it is recommended to keep the default
11
 #\$config\['install_dir'\]  = "$install_dir";
11
 #\$config\['install_dir'\]  = "$install_dir";
12
@@ -383,8 +383,8 @@ $config_file = <<<"EOD"
12
@@ -384,15 +384,15 @@ $config_file = <<<"EOD"
13
 #\$config\['nets'\]\[\] = "192.168.0.0/16";
13
 #\$config\['nets'\]\[\] = "192.168.0.0/16";
14
 
14
 
15
 # Update configuration
15
 # Update configuration
Lines 20-22 Link Here
20
 EOD;
20
 EOD;
21
 
21
 
22
 if (!file_exists("../config.php")) {
22
 if (!file_exists("../config.php")) {
23
     $conf = fopen("../config.php", 'w');
24
     if ($conf != false) {
25
         if (fwrite($conf, "<?php\n") === false) {
26
-            echo("<div class='alert alert-danger'>We couldn't create the config.php file, please create this manually before continuing by copying the below into a config.php in the root directory of your install (typically /opt/librenms/)</div>");
27
+            echo("<div class='alert alert-danger'>We couldn't create the config.php file, please create this manually before continuing by copying the below into a config.php in the root directory of your install (typically /usr/local/www/librenms/)</div>");
28
             echo("<pre>&lt;?php\n".stripslashes($config_file)."</pre>");
29
         } else {
30
             $config_file = stripslashes($config_file);
31
@@ -400,7 +400,7 @@ if (!file_exists("../config.php")) {
32
             echo("<div class='alert alert-success'>The config file has been created</div>");
33
         }
34
     } else {
35
-        echo("<div class='alert alert-danger'>We couldn't create the config.php file, please create this manually before continuing by copying the below into a config.php in the root directory of your install (typically /opt/librenms/)</div>");
36
+        echo("<div class='alert alert-danger'>We couldn't create the config.php file, please create this manually before continuing by copying the below into a config.php in the root directory of your install (typically /usr/local/www/librenms/)</div>");
37
         echo("<pre>&lt;?php\n".stripslashes($config_file)."</pre>");
38
     }
39
 }
(-)net-mgmt/librenms/files/patch-includes_common.php (-8 / +5 lines)
Lines 1-6 Link Here
1
--- includes/common.php.orig	2018-08-04 20:07:12 UTC
1
--- includes/common.php.orig	2018-10-17 10:33:28 UTC
2
+++ includes/common.php
2
+++ includes/common.php
3
@@ -1157,6 +1157,10 @@ function version_info($remote = false)
3
@@ -1158,6 +1158,10 @@ function version_info($remote = false)
4
         $output['local_sha']    = $local_sha;
4
         $output['local_sha']    = $local_sha;
5
         $output['local_date']   = $local_date;
5
         $output['local_date']   = $local_date;
6
         $output['local_branch'] = rtrim(`git rev-parse --abbrev-ref HEAD`);
6
         $output['local_branch'] = rtrim(`git rev-parse --abbrev-ref HEAD`);
Lines 11-26 Link Here
11
     }
11
     }
12
     $output['db_schema']   = dbIsConnected() ? get_db_schema() : '?';
12
     $output['db_schema']   = dbIsConnected() ? get_db_schema() : '?';
13
     $output['php_ver']     = phpversion();
13
     $output['php_ver']     = phpversion();
14
@@ -1713,6 +1717,12 @@ function set_numeric($value, $default = 
14
@@ -1719,6 +1723,9 @@ function set_numeric($value, $default = 
15
 
15
 
16
 function check_git_exists()
16
 function check_git_exists()
17
 {
17
 {
18
+    global $config;
18
+    # installed from package; git not involved
19
+    return false;
19
+
20
+
20
+    if (!empty($config['installed_from_package'])) {
21
+        return false;
22
+    }
23
+
24
     exec('git > /dev/null 2>&1', $response, $exit_code);
21
     exec('git > /dev/null 2>&1', $response, $exit_code);
25
     if ($exit_code === 1) {
22
     if ($exit_code === 1) {
26
         return true;
23
         return true;
(-)net-mgmt/librenms/files/patch-includes_defaults.inc.php (-2 / +2 lines)
Lines 1-6 Link Here
1
--- includes/defaults.inc.php.orig	2018-08-04 20:07:12 UTC
1
--- includes/defaults.inc.php.orig	2018-10-17 10:33:28 UTC
2
+++ includes/defaults.inc.php
2
+++ includes/defaults.inc.php
3
@@ -47,19 +47,19 @@ $config['own_hostname'] = 'localhost';
3
@@ -49,19 +49,19 @@ $config['own_hostname'] = 'localhost';
4
 $config['fping_options']['timeout'] = 500;
4
 $config['fping_options']['timeout'] = 500;
5
 $config['fping_options']['count']   = 3;
5
 $config['fping_options']['count']   = 3;
6
 $config['fping_options']['interval'] = 500;
6
 $config['fping_options']['interval'] = 500;
(-)net-mgmt/librenms/files/pkg-message.in (-7 / +10 lines)
Lines 1-14 Link Here
1
=== Configuration details ===
1
=== UPGRADE details ===
2
The following is recommended for /usr/local/etc/mysql/my.cnf
3
2
4
NOTE: these are global settings.  Please read this first:
3
Depending on the version, you may have to run the upgrade script.
5
4
6
http://dev.mysql.com/doc/refman/5.7/en/sql-mode.html
5
cd %%WWWDIR%%
6
./build-base.php
7
7
8
[mysqld]
8
re: https://docs.librenms.org/#General/Updating/
9
innodb_file_per_table=1
10
sql-mode=""
11
9
10
=== Configuration details ===
11
12
NOTE: setting sql-mode="" is no longer required. You can remove
13
it from /usr/local/etc/mysql/my.cnf
14
12
You can mostly follow the guide at:
15
You can mostly follow the guide at:
13
http://docs.librenms.org/
16
http://docs.librenms.org/
14
17

Return to bug 232658