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

Collapse All | Expand All

(-)b/net-mgmt/librenms/Makefile (-20 / +11 lines)
Lines 1-16 Link Here
1
PORTNAME=	librenms
1
PORTNAME=	librenms
2
PORTVERSION=	21.5.1
2
PORTVERSION=	21.12.0
3
PORTREVISION=	3
3
PORTREVISION=	0
4
PORTEPOCH=	1
4
PORTEPOCH=	
5
CATEGORIES=	net-mgmt
5
CATEGORIES=	net-mgmt
6
MASTER_SITES=	LOCAL/dvl:vendor
7
DISTFILES=	${PORTNAME}-vendor-${DISTVERSIONPREFIX}${DISTVERSION}${DISTVERSIONSUFFIX}${EXTRACT_SUFX}:vendor
8
6
9
MAINTAINER=	dvl@FreeBSD.org
7
MAINTAINER=	dvl@FreeBSD.org
10
COMMENT=	Autodiscovering PHP/MySQL/SNMP based network monitoring
8
COMMENT=	Autodiscovering PHP/MySQL/SNMP based network monitoring
11
9
12
LICENSE=	GPLv3
10
LICENSE=	GPLv3
13
11
12
EXTRACT_DEPENDS+= ${LOCALBASE}/bin/composer:devel/php-composer2@${PHP_FLAVOR} 
13
14
# perhaps we also need python-memcache python-mysqldb
14
# perhaps we also need python-memcache python-mysqldb
15
RUN_DEPENDS+=	${LOCALBASE}/share/pear/Net/IPv4.php:net/pear-Net_IPv4@${PHP_FLAVOR} \
15
RUN_DEPENDS+=	${LOCALBASE}/share/pear/Net/IPv4.php:net/pear-Net_IPv4@${PHP_FLAVOR} \
16
		${LOCALBASE}/share/pear/Net/IPv6.php:net/pear-Net_IPv6@${PHP_FLAVOR} \
16
		${LOCALBASE}/share/pear/Net/IPv6.php:net/pear-Net_IPv6@${PHP_FLAVOR} \
Lines 29-36 USE_PHP= ctype curl dom fileinfo filter gd hash json ldap mbstring \ Link Here
29
		snmp sockets tokenizer xml xmlwriter zip
29
		snmp sockets tokenizer xml xmlwriter zip
30
USE_RC_SUBR=	librenms
30
USE_RC_SUBR=	librenms
31
31
32
SHEBANG_FILES=	../${PORTNAME}-vendor-${PORTVERSION}/swiftmailer/swiftmailer/lib/swiftmailer_generate_mimes_config.php \
32
SHEBANG_FILES=	vendor/swiftmailer/swiftmailer/lib/swiftmailer_generate_mimes_config.php \
33
		../${PORTNAME}-vendor-${PORTVERSION}/tecnickcom/tcpdf/tools/tcpdf_addfont.php \
33
		vendor/tecnickcom/tcpdf/tools/tcpdf_addfont.php \
34
		poller-wrapper.py poller.php scripts/auth_test.php \
34
		poller-wrapper.py poller.php scripts/auth_test.php \
35
		scripts/check_requirements.py scripts/github-remove \
35
		scripts/check_requirements.py scripts/github-remove \
36
		scripts/Migration/Standard_Conversion/convert_no_xml.sh \
36
		scripts/Migration/Standard_Conversion/convert_no_xml.sh \
Lines 95-101 _SCRIPT_FILES= daily.sh lnms Link Here
95
_RELEASE_TIMESTAMP=	1621427246
95
_RELEASE_TIMESTAMP=	1621427246
96
_ROOT_DIRS=		LibreNMS app bootstrap config contrib database doc html \
96
_ROOT_DIRS=		LibreNMS app bootstrap config contrib database doc html \
97
			includes licenses mibs misc resources routes scripts \
97
			includes licenses mibs misc resources routes scripts \
98
			sql-schema storage tests
98
			sql-schema storage tests vendor
99
_DOCS=			AUTHORS.md CHANGELOG.md CONTRIBUTING.md LICENSE.txt \
99
_DOCS=			AUTHORS.md CHANGELOG.md CONTRIBUTING.md LICENSE.txt \
100
			README.md
100
			README.md
101
# these are directories which require a generic @DIR entry in pkg-plist
101
# these are directories which require a generic @DIR entry in pkg-plist
Lines 108-113 _OTHER_DIRS= html/js/lang resources/views/overview/custom \ Link Here
108
			vendor/ramsey/collection/bin \
108
			vendor/ramsey/collection/bin \
109
			vendor/symfony/string/Resources/bin
109
			vendor/symfony/string/Resources/bin
110
110
111
post-extract:
112
	${LOCALBASE}/bin/composer install -n -d ${WRKSRC}
113
111
post-patch:
114
post-patch:
112
	${REINPLACE_CMD}    's|%%LOCALBASE%%|${LOCALBASE}|g'                  ${WRKSRC}/LibreNMS/Util/Version.php
115
	${REINPLACE_CMD}    's|%%LOCALBASE%%|${LOCALBASE}|g'                  ${WRKSRC}/LibreNMS/Util/Version.php
113
	${REINPLACE_CMD}    's|%%LOCALBASE%%|${LOCALBASE}|g'                  ${WRKSRC}/LibreNMS/Validations/Php.php
116
	${REINPLACE_CMD}    's|%%LOCALBASE%%|${LOCALBASE}|g'                  ${WRKSRC}/LibreNMS/Validations/Php.php
Lines 131-148 do-install: Link Here
131
.for f in ${_SCRIPT_FILES}
134
.for f in ${_SCRIPT_FILES}
132
	${INSTALL_SCRIPT} ${WRKSRC}/${f} ${STAGEDIR}/${WWWDIR}
135
	${INSTALL_SCRIPT} ${WRKSRC}/${f} ${STAGEDIR}/${WWWDIR}
133
.endfor
136
.endfor
134
	${MKDIR} ${STAGEDIR}/${WWWDIR}/vendor
135
	(cd ${WRKDIR}/${PORTNAME}-vendor-${PORTVERSION} && ${COPYTREE_SHARE} . ${STAGEDIR}/${WWWDIR}/vendor)
136
137
# As of 1.66_1, the package installs bootstrap/cache
138
# This was previously left to the code to populate.
139
# That causese problems when the code doesn't do that update.
140
	${MV} ${STAGEDIR}/${WWWDIR}/vendor/bootstrap-cache/* ${STAGEDIR}/${WWWDIR}/bootstrap/cache/
141
	${RM} -rf ${STAGEDIR}/${WWWDIR}/vendor/bootstrap-cache
142
143
# similarly with html/js/lang
144
	${MV} ${STAGEDIR}/${WWWDIR}/vendor/html-js-lang/* ${STAGEDIR}/${WWWDIR}/html/js/lang/
145
	${RM} -rf ${STAGEDIR}/${WWWDIR}/vendor/html-js-lang
146
137
147
# Make daily.sh executable
138
# Make daily.sh executable
148
#	${CHMOD} 0755 ${STAGEDIR}/${WWWDIR}/daily.sh
139
#	${CHMOD} 0755 ${STAGEDIR}/${WWWDIR}/daily.sh
(-)b/net-mgmt/librenms/distinfo (-3 / +3 lines)
Lines 1-5 Link Here
1
TIMESTAMP = 1621543700
1
TIMESTAMP = 1641384420
2
SHA256 (librenms-vendor-21.5.1.tar.gz) = 746a0ffd58a0f9d7428283c9b3b706e514b405781a5fc4c2685492479bad2580
2
SHA256 (librenms-vendor-21.5.1.tar.gz) = 746a0ffd58a0f9d7428283c9b3b706e514b405781a5fc4c2685492479bad2580
3
SIZE (librenms-vendor-21.5.1.tar.gz) = 28282743
3
SIZE (librenms-vendor-21.5.1.tar.gz) = 28282743
4
SHA256 (librenms-librenms-21.5.1_GH0.tar.gz) = 4baa930bb0c884b2d596047a01f79d717992dafefb5e744b1b5438f5570dbb8b
4
SHA256 (librenms-librenms-21.12.0_GH0.tar.gz) = 5f0095388d85354d6391c571063bd4f9ccb52d5ce3baf2fa0451761d1531169c
5
SIZE (librenms-librenms-21.5.1_GH0.tar.gz) = 50159109
5
SIZE (librenms-librenms-21.12.0_GH0.tar.gz) = 52978722
(-)b/net-mgmt/librenms/files/patch-config.php.default (-39 / +5 lines)
Lines 1-6 Link Here
1
--- config.php.default.orig	2020-07-10 19:56:16 UTC
1
--- config.php.default.orig	2022-01-05 12:52:10 UTC
2
+++ config.php.default
2
+++ config.php.default
3
@@ -2,10 +2,26 @@
3
@@ -2,9 +2,25 @@
4
 
4
 
5
 ## Have a look in misc/config_definitions.json for examples of settings you can set here. DO NOT EDIT misc/config_definitions.json!
5
 ## Have a look in misc/config_definitions.json for examples of settings you can set here. DO NOT EDIT misc/config_definitions.json!
6
 
6
 
Lines 14-64 Link Here
14
+
14
+
15
 // This is the user LibreNMS will run as
15
 // This is the user LibreNMS will run as
16
-//Please ensure this user is created and has the correct permissions to your install
16
-//Please ensure this user is created and has the correct permissions to your install
17
-$config['user'] = 'librenms';
17
-#$config['user'] = 'librenms';
18
+// Please ensure this user is created and has the correct permissions to your install
18
+// Please ensure this user is created and has the correct permissions to your install
19
+// The FreeBSD package sets this.
19
+// The FreeBSD package sets this.
20
+// It's up to you to install a webserver, such as Apache or Nginx. By default, they
20
+// It's up to you to install a webserver, such as Apache or Nginx. By default, they
21
+// run as the www user.
21
+// run as the www user.
22
+//
22
+//
23
+$config['user'] = 'www';
23
+$config['user'] = 'www';
24
 
24
+
25
+#
25
+#
26
+# The FreeBSD package set the above items
26
+# The FreeBSD package set the above items
27
+#
27
+#
28
+
28
 
29
 ### This should *only* be set if you want to *force* a particular hostname/port
29
 ### This should *only* be set if you want to *force* a particular hostname/port
30
 ### It will prevent the web interface being usable form any other hostname
30
 ### It will prevent the web interface being usable form any other hostname
31
 #$config['base_url']        = "/";
32
@@ -27,7 +43,8 @@ $config['auth_mechanism'] = "mysql"; # default, other 
33
 #$config['nets'][] = "192.168.0.0/16";
34
 
35
 # Uncomment the next line to disable daily updates
36
-#$config['update'] = 0;
37
+# FreeBSD package uncommented this line for you.
38
+$config['update'] = 0;
39
 
40
 # Number in days of how long to keep old rrd files. 0 disables this feature
41
 $config['rrd_purge'] = 0;
42
@@ -43,3 +60,22 @@ $config['enable_billing'] = 1;
43
 
44
 # Enable the in-built services support (Nagios plugins)
45
 $config['show_services'] = 1;
46
+
47
+# These paths are supplied by the FreeBSD port and correct those found in
48
+# the code.
49
+
50
+$config['snmpwalk']       = '%%LOCALBASE%%/bin/snmpwalk';
51
+$config['snmpget']        = '%%LOCALBASE%%/bin/snmpget';
52
+$config['snmpbulkwalk']   = '%%LOCALBASE%%/bin/snmpbulkwalk';
53
+$config['snmptranslate']  = '%%LOCALBASE%%/bin/snmptranslate';
54
+
55
+$config['ping']           = '/sbin/ping';
56
+$config['mtr']            = '%%LOCALBASE%%/bin/mtr';
57
+$config['nmap']           = '%%LOCALBASE%%/bin/nmap';
58
+
59
+$config['nagios_plugins'] = '%%LOCALBASE%%/libexec/nagios';
60
+$config['ipmitool']       = '%%LOCALBASE%%/bin/ipmitool';
61
+$config['virsh']          = '%%LOCALBASE%%/bin/virsh';
62
+$config['dot']            = '%%LOCALBASE%%/bin/dot';
63
+$config['sfdp']           = '%%LOCALBASE%%/bin/sfdp';
64
+$config['nfdump']         = '%%LOCALBASE%%/bin/nfdump';
(-)a/net-mgmt/librenms/files/patch-poller-wrapper.py (-12 lines)
Removed Link Here
1
--- poller-wrapper.py.orig	2021-01-14 02:21:36 UTC
2
+++ poller-wrapper.py
3
@@ -44,6 +44,8 @@ except ImportError as exc:
4
     print('ERROR: %s' % exc)
5
     sys.exit(2)
6
 
7
+os.environ['PATH'] += ':%%LOCALBASE%%/sbin:%%LOCALBASE%%/bin'
8
+
9
 
10
 APP_NAME = "poller_wrapper"
11
 LOG_FILE = "logs/" + APP_NAME + ".log"
12
- 

Return to bug 261031