From owner-svn-ports-all@freebsd.org Sat Sep 1 19:02:16 2018 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F23C0FF7937; Sat, 1 Sep 2018 19:02:15 +0000 (UTC) (envelope-from dvl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B02A97733D; Sat, 1 Sep 2018 19:02:15 +0000 (UTC) (envelope-from dvl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AAF3D66B3; Sat, 1 Sep 2018 19:02:15 +0000 (UTC) (envelope-from dvl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w81J2FDU024133; Sat, 1 Sep 2018 19:02:15 GMT (envelope-from dvl@FreeBSD.org) Received: (from dvl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w81J2D2a024122; Sat, 1 Sep 2018 19:02:13 GMT (envelope-from dvl@FreeBSD.org) Message-Id: <201809011902.w81J2D2a024122@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dvl set sender to dvl@FreeBSD.org using -f From: Dan Langille Date: Sat, 1 Sep 2018 19:02:13 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r478715 - in head: . net-mgmt/librenms net-mgmt/librenms/files X-SVN-Group: ports-head X-SVN-Commit-Author: dvl X-SVN-Commit-Paths: in head: . net-mgmt/librenms net-mgmt/librenms/files X-SVN-Commit-Revision: 478715 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Sep 2018 19:02:16 -0000 Author: dvl Date: Sat Sep 1 19:02:13 2018 New Revision: 478715 URL: https://svnweb.freebsd.org/changeset/ports/478715 Log: Upgrade to 1.42.01 Approved by: maintainer (via private email) Differential Revision: https://reviews.freebsd.org/D16942 Added: head/net-mgmt/librenms/files/patch-.env.example (contents, props changed) head/net-mgmt/librenms/files/patch-includes_common.php (contents, props changed) Deleted: head/net-mgmt/librenms/files/patch-LibreNMS_Validations_User.php Modified: head/UPDATING head/net-mgmt/librenms/Makefile head/net-mgmt/librenms/distinfo head/net-mgmt/librenms/files/patch-config.php.default head/net-mgmt/librenms/files/patch-html_install.php head/net-mgmt/librenms/files/patch-includes_defaults.inc.php head/net-mgmt/librenms/files/patch-poller-wrapper.py head/net-mgmt/librenms/files/pkg-message.in Modified: head/UPDATING ============================================================================== --- head/UPDATING Sat Sep 1 18:39:48 2018 (r478714) +++ head/UPDATING Sat Sep 1 19:02:13 2018 (r478715) @@ -6,6 +6,58 @@ You should get into the habit of checking this file fo you update your ports collection, before attempting any port upgrades. 20180901: + AFFECTS: net-mgmt/librenms + AUTHOR: dvl@FreeBSD.org + + 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: antoine@FreeBSD.org Modified: head/net-mgmt/librenms/Makefile ============================================================================== --- head/net-mgmt/librenms/Makefile Sat Sep 1 18:39:48 2018 (r478714) +++ head/net-mgmt/librenms/Makefile Sat Sep 1 19:02:13 2018 (r478715) @@ -2,51 +2,23 @@ # $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= bofh@FreeBSD.org COMMENT= Autodiscovering PHP/MySQL/SNMP based network monitoring LICENSE= GPLv3 -USE_GITHUB= yes -GH_ACCOUNT= librenms +# perhaps we also need python-memcache python-mysqldb -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 - RUN_DEPENDS+= rrdtool:databases/rrdtool \ dot:graphics/graphviz \ ${LOCALBASE}/share/pear/Net/IPv4.php:net/pear-Net_IPv4@${PHP_FLAVOR} \ @@ -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 +ROOT_DIRS= LibreNMS app bootstrap config contrib database doc html includes lib licenses logs mibs misc resources routes scripts sql-schema storage tests -DOCS= AUTHORS.md CHANGELOG CONTRIBUTING.md LICENSE.txt README.md +# 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 Modified: head/net-mgmt/librenms/distinfo ============================================================================== --- head/net-mgmt/librenms/distinfo Sat Sep 1 18:39:48 2018 (r478714) +++ head/net-mgmt/librenms/distinfo Sat Sep 1 19:02:13 2018 (r478715) @@ -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 Added: head/net-mgmt/librenms/files/patch-.env.example ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/librenms/files/patch-.env.example Sat Sep 1 19:02:13 2018 (r478715) @@ -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 ++ Modified: head/net-mgmt/librenms/files/patch-config.php.default ============================================================================== --- head/net-mgmt/librenms/files/patch-config.php.default Sat Sep 1 18:39:48 2018 (r478714) +++ head/net-mgmt/librenms/files/patch-config.php.default Sat Sep 1 19:02:13 2018 (r478715) @@ -1,7 +1,20 @@ ---- config.php.default.orig 2017-12-31 20:48:36 UTC +--- config.php.default.orig 2018-08-04 20:07:12 UTC +++ config.php.default -@@ -10,7 +10,7 @@ $config['db_name'] = 'librenms'; +@@ -2,15 +2,20 @@ + ## Have a look in includes/defaults.inc.php for examples of settings you can set here. DO NOT EDIT defaults.inc.php! + ++$config['installed_from_package'] = true; ++ + ### Database config + $config['db_host'] = 'localhost'; + $config['db_user'] = 'USERNAME'; + $config['db_pass'] = 'PASSWORD'; + $config['db_name'] = 'librenms'; + ++$config['log_dir'] = '/var/log/librenms'; ++$config['rrd_dir'] = '/var/db/librenms/rrd'; ++ // 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'; Modified: head/net-mgmt/librenms/files/patch-html_install.php ============================================================================== --- head/net-mgmt/librenms/files/patch-html_install.php Sat Sep 1 18:39:48 2018 (r478714) +++ head/net-mgmt/librenms/files/patch-html_install.php Sat Sep 1 19:02:13 2018 (r478715) @@ -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")) { Added: head/net-mgmt/librenms/files/patch-includes_common.php ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/librenms/files/patch-includes_common.php Sat Sep 1 19:02:13 2018 (r478715) @@ -0,0 +1,26 @@ +--- includes/common.php.orig 2018-08-04 20:07:12 UTC ++++ includes/common.php +@@ -1157,6 +1157,10 @@ function version_info($remote = false) + $output['local_sha'] = $local_sha; + $output['local_date'] = $local_date; + $output['local_branch'] = rtrim(`git rev-parse --abbrev-ref HEAD`); ++ } else { ++ $output['local_ver'] = '1.42.01'; ++ # obtained via git show --pretty='%H|%ct' -s 1.42.01 ++ $output['local_date'] = 1533413232; + } + $output['db_schema'] = dbIsConnected() ? get_db_schema() : '?'; + $output['php_ver'] = phpversion(); +@@ -1713,6 +1717,12 @@ function set_numeric($value, $default = + + function check_git_exists() + { ++ global $config; ++ ++ if (!empty($config['installed_from_package'])) { ++ return false; ++ } ++ + exec('git > /dev/null 2>&1', $response, $exit_code); + if ($exit_code === 1) { + return true; Modified: head/net-mgmt/librenms/files/patch-includes_defaults.inc.php ============================================================================== --- head/net-mgmt/librenms/files/patch-includes_defaults.inc.php Sat Sep 1 18:39:48 2018 (r478714) +++ head/net-mgmt/librenms/files/patch-includes_defaults.inc.php Sat Sep 1 19:02:13 2018 (r478715) @@ -1,32 +1,32 @@ ---- includes/defaults.inc.php.orig 2017-12-31 20:48:36 UTC +--- includes/defaults.inc.php.orig 2018-08-04 20:07:12 UTC +++ includes/defaults.inc.php -@@ -48,19 +48,21 @@ $config['fping_options']['retries'] = 3; +@@ -47,19 +47,19 @@ $config['own_hostname'] = 'localhost'; $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'; Modified: head/net-mgmt/librenms/files/patch-poller-wrapper.py ============================================================================== --- head/net-mgmt/librenms/files/patch-poller-wrapper.py Sat Sep 1 18:39:48 2018 (r478714) +++ head/net-mgmt/librenms/files/patch-poller-wrapper.py Sat Sep 1 19:02:13 2018 (r478715) @@ -1,10 +1,10 @@ ---- poller-wrapper.py.orig 2018-01-14 15:32:19 UTC +--- poller-wrapper.py.orig 2018-08-29 23:25:16 UTC +++ poller-wrapper.py -@@ -36,6 +36,8 @@ except: +@@ -37,6 +37,8 @@ except: print "threading, Queue, sys, subprocess, time, os, json" sys.exit(2) -+os.environ['PATH'] += ':%%LOCALBASE%%/sbin:%%LOCALBASE%%/bin' ++os.environ['PATH'] += ':/usr/local/sbin:/usr/local/bin' + try: import MySQLdb Modified: head/net-mgmt/librenms/files/pkg-message.in ============================================================================== --- head/net-mgmt/librenms/files/pkg-message.in Sat Sep 1 18:39:48 2018 (r478714) +++ head/net-mgmt/librenms/files/pkg-message.in Sat Sep 1 19:02:13 2018 (r478715) @@ -1,5 +1,5 @@ === Configuration details === -The following is recommended for /var/db/mysql/my.cnf +The following is recommended for /usr/local/etc/mysql/my.cnf NOTE: these are global settings. Please read this first: @@ -25,4 +25,27 @@ PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin */5 * * * * www %%PHP%% %%WWWDIR%%/poll-billing.php >> /dev/null 2>&1 01 * * * * www %%PHP%% %%WWWDIR%%/billing-calculate.php >> /dev/null 2>&1 */5 * * * * www %%PHP%% %%WWWDIR%%/check-services.php >> /dev/null 2>&1 + +For a fresh install, you need to create an APP_KEY: + +cd %%WWWDIR%% +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. + +After that, follow the LibreNMS documentation for configuration.