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

Collapse All | Expand All

(-)Makefile (-2 / +4 lines)
Lines 2-8 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	librenms
4
PORTNAME=	librenms
5
PORTVERSION=	1.26
5
PORTVERSION=	1.27
6
PORTEPOCH=	1
6
PORTEPOCH=	1
7
CATEGORIES=	net-mgmt
7
CATEGORIES=	net-mgmt
8
8
Lines 41-47 Link Here
41
		vendor/ezyang/htmlpurifier/maintenance/update-config.php \
41
		vendor/ezyang/htmlpurifier/maintenance/update-config.php \
42
		vendor/tecnickcom/tcpdf/tools/tcpdf_addfont.php
42
		vendor/tecnickcom/tcpdf/tools/tcpdf_addfont.php
43
43
44
USE_PHP=	ctype curl filter gd hash json mcrypt mysqli openssl session simplexml snmp tokenizer xml
44
USE_PHP=	ctype curl filter gd hash json ldap mcrypt mysqli openssl session simplexml snmp tokenizer xml
45
45
46
NO_BUILD=	yes
46
NO_BUILD=	yes
47
47
Lines 149-154 Link Here
149
	@${ECHO_CMD} "@group ${WWWGRP}" >> ${TMPPLIST}
149
	@${ECHO_CMD} "@group ${WWWGRP}" >> ${TMPPLIST}
150
	@${FIND} -s ${STAGEDIR}${WWWDIR} -not -type d | ${SORT} | \
150
	@${FIND} -s ${STAGEDIR}${WWWDIR} -not -type d | ${SORT} | \
151
		${SED} -e 's#^${STAGEDIR}${PREFIX}/##' >> ${TMPPLIST}
151
		${SED} -e 's#^${STAGEDIR}${PREFIX}/##' >> ${TMPPLIST}
152
	@${FIND} -s ${STAGEDIR}${WWWDIR} -type d | \
153
		${SED} -e 's#^${STAGEDIR}#@dir #' >> ${TMPPLIST}
152
	${INSTALL_DATA} ${WRKSRC}/config.php.default \
154
	${INSTALL_DATA} ${WRKSRC}/config.php.default \
153
	       ${STAGEDIR}/${WWWDIR}/config.php.sample
155
	       ${STAGEDIR}/${WWWDIR}/config.php.sample
154
	@${ECHO} @sample ${WWWDIR}/config.php.sample >> ${TMPPLIST}
156
	@${ECHO} @sample ${WWWDIR}/config.php.sample >> ${TMPPLIST}
(-)distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1491554959
1
TIMESTAMP = 1494329428
2
SHA256 (librenms-librenms-1.26_GH0.tar.gz) = cc76a343296c48a6a2423efc9138e2a52d2827178ba733c0714dc6ef38d264e8
2
SHA256 (librenms-librenms-1.27_GH0.tar.gz) = 822f275cb1b35b46c0c86a6a89fc1a7f4b3d0689a3ffbb0192577bcd301187ab
3
SIZE (librenms-librenms-1.26_GH0.tar.gz) = 57165188
3
SIZE (librenms-librenms-1.27_GH0.tar.gz) = 56912738
(-)files/patch-daily.sh (-9 lines)
Lines 1-14 Link Here
1
--- daily.sh.orig	2017-03-26 12:06:00 UTC
1
--- daily.sh.orig	2017-03-26 12:06:00 UTC
2
+++ daily.sh
2
+++ daily.sh
3
@@ -113,7 +113,7 @@ main () {
4
         # only try to su if we are root (or sudo)
5
         if [[ "$EUID" -eq 0 ]]; then
6
             echo "Re-running ${DAILY_SCRIPT} as ${LIBRENMS_USER} user"
7
-            su -l "$LIBRENMS_USER" -c "$DAILY_SCRIPT $@"
8
+            sudo -u "$LIBRENMS_USER" "$DAILY_SCRIPT"
9
             exit;
10
         fi
11
 
12
@@ -123,27 +123,6 @@ main () {
3
@@ -123,27 +123,6 @@ main () {
13
     fi
4
     fi
14
 
5
 
(-)files/patch-includes_common.php (-3 / +3 lines)
Lines 1-7 Link Here
1
--- includes/common.php.orig	2017-01-29 06:54:29 UTC
1
--- includes/common.php.orig	2017-03-26 12:06:00 UTC
2
+++ includes/common.php
2
+++ includes/common.php
3
@@ -1095,10 +1095,8 @@ function version_info($remote = true)
3
@@ -1098,10 +1098,8 @@ function version_info($remote = true)
4
             curl_setopt($api, CURLOPT_RETURNTRANSFER, 1);
4
             curl_setopt($api, CURLOPT_CONNECTTIMEOUT, 5);
5
             $output['github'] = json_decode(curl_exec($api), true);
5
             $output['github'] = json_decode(curl_exec($api), true);
6
         }
6
         }
7
-        list($local_sha, $local_date) = explode('|', rtrim(`git show --pretty='%H|%ct' -s HEAD`));
7
-        list($local_sha, $local_date) = explode('|', rtrim(`git show --pretty='%H|%ct' -s HEAD`));
(-)files/patch-includes_defaults.inc.php (-5 / +5 lines)
Lines 1-8 Link Here
1
--- includes/defaults.inc.php.orig      2017-01-01 15:50:41.000000000 +0000
1
--- includes/defaults.inc.php.orig	2017-03-26 12:06:00 UTC
2
+++ includes/defaults.inc.php   2017-01-09 13:24:06.964918000 +0000
2
+++ includes/defaults.inc.php
3
@@ -36,26 +36,26 @@
3
@@ -41,26 +41,26 @@ $config['db_port']               = 3306;
4
 $config['own_hostname'] = 'localhost';
4
 $config['own_hostname'] = 'localhost';
5
5
 
6
 // Location of executables
6
 // Location of executables
7
-$config['rrdtool']                  = '/usr/bin/rrdtool';
7
-$config['rrdtool']                  = '/usr/bin/rrdtool';
8
+$config['rrdtool']                  = '/usr/local/bin/rrdtool';
8
+$config['rrdtool']                  = '/usr/local/bin/rrdtool';
Lines 38-43 Link Here
38
+$config['virsh']          = '/usr/local/bin/virsh';
38
+$config['virsh']          = '/usr/local/bin/virsh';
39
+$config['dot']            = '/usr/local/bin/dot';
39
+$config['dot']            = '/usr/local/bin/dot';
40
+$config['sfdp']           = '/usr/local/bin/sfdp';
40
+$config['sfdp']           = '/usr/local/bin/sfdp';
41
41
 
42
 // Memcached - Keep immediate statistics
42
 // Memcached - Keep immediate statistics
43
 $config['memcached']['enable'] = false;
43
 $config['memcached']['enable'] = false;
(-)files/patch-validate.php (+39 lines)
Line 0 Link Here
1
--- validate.php.orig	2017-04-11 18:45:34 UTC
2
+++ validate.php
3
@@ -108,13 +108,6 @@ if (!($username === 'root' || (isset($co
4
     print_fail('You need to run this script as root' . (isset($config['user']) ? ' or '.$config['user'] : ''));
5
 }
6
 
7
-if ($git_found === true) {
8
-    if ($config['update_channel'] == 'master' && $cur_sha != $versions['github']['sha']) {
9
-        $commit_date = new DateTime('@'.$versions['local_date'], new DateTimeZone(date_default_timezone_get()));
10
-        print_warn("Your install is out of date, last update: " . $commit_date->format('r'));
11
-    }
12
-}
13
-
14
 // Check php modules we use to make sure they are loaded
15
 $extensions = array('pcre','curl','session','snmp','mcrypt');
16
 foreach ($extensions as $extension) {
17
@@ -302,22 +295,6 @@ if (dbFetchCell('SELECT COUNT(*) FROM `d
18
 }
19
 
20
 
21
-if ($git_found === true) {
22
-    if ($versions['local_branch'] != 'master') {
23
-        print_warn("Your local git branch is not master, this will prevent automatic updates.");
24
-    }
25
-
26
-    // check for modified files
27
-    $modifiedcmd = 'git diff --name-only --exit-code';
28
-    if ($username === 'root') {
29
-        $modifiedcmd = 'su '.$config['user'].' -c "'.$modifiedcmd.'"';
30
-    }
31
-    exec($modifiedcmd, $cmdoutput, $code);
32
-    if ($code !== 0 && !empty($cmdoutput)) {
33
-        print_warn("Your local git contains modified files, this could prevent automatic updates.\nModified files:");
34
-        print_list($cmdoutput, "\t %s\n");
35
-    }
36
-}
37
 // Modules test
38
 $modules = explode(',', $options['m']);
39
 foreach ($modules as $module) {
(-)files/pkg-message.in (+1 lines)
Lines 16-21 Link Here
16
- Installation directory is %%WWWDIR%%
16
- Installation directory is %%WWWDIR%%
17
- The following lines should be added to /etc/crontab:
17
- The following lines should be added to /etc/crontab:
18
18
19
PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
19
33	*/6	*	*	*	www	cd %%WWWDIR%% && %%PHP%% discovery.php -h all >> /dev/null 2>&1
20
33	*/6	*	*	*	www	cd %%WWWDIR%% && %%PHP%% discovery.php -h all >> /dev/null 2>&1
20
*/5	*	*	*	*	www	cd %%WWWDIR%% && %%PHP%% discovery.php -h new >> /dev/null 2>&1
21
*/5	*	*	*	*	www	cd %%WWWDIR%% && %%PHP%% discovery.php -h new >> /dev/null 2>&1
21
*/5	*	*	*	*	www	cd %%WWWDIR%% && %%PYTHON%% poller-wrapper.py 16 >> /dev/null 2>&1
22
*/5	*	*	*	*	www	cd %%WWWDIR%% && %%PYTHON%% poller-wrapper.py 16 >> /dev/null 2>&1

Return to bug 218608