forked from pfsense/FreeBSD-ports
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Approved by: maintainer (via private email) Differential Revision: https://reviews.freebsd.org/D16942
- Loading branch information
Showing
11 changed files
with
260 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,58 @@ they are unavoidable. | |
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: [email protected] | ||
|
||
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: [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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= [email protected] | ||
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
+ |
33 changes: 0 additions & 33 deletions
33
net-mgmt/librenms/files/patch-LibreNMS_Validations_User.php
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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")) { |
Oops, something went wrong.