Date: Tue, 25 May 2021 20:46:24 GMT From: Dan Langille <dvl@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: 95895b273983 - main - net-mgmt/librenms: fix capture so that it works on FreeBSD Message-ID: <202105252046.14PKkO2G042686@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by dvl: URL: https://cgit.FreeBSD.org/ports/commit/?id=95895b273983fca1a7ecfed8056499c2c9e683f6 commit 95895b273983fca1a7ecfed8056499c2c9e683f6 Author: Dan Langille <dvl@FreeBSD.org> AuthorDate: 2021-05-25 20:44:08 +0000 Commit: Dan Langille <dvl@FreeBSD.org> CommitDate: 2021-05-25 20:46:21 +0000 net-mgmt/librenms: fix capture so that it works on FreeBSD The application depends up on PATH to locate php. The code is now patched to use LOCALBASE. re: https://docs.librenms.org/Support/Device-Troubleshooting/ --- net-mgmt/librenms/Makefile | 7 ++++--- .../files/patch-includes_html_output_capture.inc.php | 20 ++++++++++++++++++++ 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/net-mgmt/librenms/Makefile b/net-mgmt/librenms/Makefile index 5ed4ceccd303..03c02d5caba1 100644 --- a/net-mgmt/librenms/Makefile +++ b/net-mgmt/librenms/Makefile @@ -1,6 +1,6 @@ PORTNAME= librenms PORTVERSION= 21.5.1 -PORTREVISION= 2 +PORTREVISION= 3 PORTEPOCH= 1 CATEGORIES= net-mgmt MASTER_SITES= LOCAL/dvl:vendor @@ -112,10 +112,11 @@ _OTHER_DIRS= html/js/lang resources/views/overview/custom \ vendor/symfony/string/Resources/bin post-patch: - ${REINPLACE_CMD} 's|%%PORTVERSION%%|${PORTVERSION}|g' ${WRKSRC}/includes/common.php - ${REINPLACE_CMD} 's|%%RELEASE_TIMESTAMP%%|${_RELEASE_TIMESTAMP}|g' ${WRKSRC}/includes/common.php ${REINPLACE_CMD} 's|%%LOCALBASE%%|${LOCALBASE}|g' ${WRKSRC}/LibreNMS/Util/Version.php ${REINPLACE_CMD} 's|%%LOCALBASE%%|${LOCALBASE}|g' ${WRKSRC}/LibreNMS/Validations/Php.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} 's|%%LOCALBASE%%|${LOCALBASE}|g' ${WRKSRC}/includes/html/output/capture.inc.php ${REINPLACE_CMD} 's|%%LOCALBASE%%|${LOCALBASE}|g' ${WRKSRC}/config.php.default ${REINPLACE_CMD} 's|%%LOCALBASE%%|${LOCALBASE}|g' ${WRKSRC}/poller-wrapper.py ${RM} ${WRKSRC}/LibreNMS/Validations/Updates.php diff --git a/net-mgmt/librenms/files/patch-includes_html_output_capture.inc.php b/net-mgmt/librenms/files/patch-includes_html_output_capture.inc.php new file mode 100644 index 000000000000..a526ec24e50f --- /dev/null +++ b/net-mgmt/librenms/files/patch-includes_html_output_capture.inc.php @@ -0,0 +1,20 @@ +--- includes/html/output/capture.inc.php.orig 2021-05-25 19:32:48 UTC ++++ includes/html/output/capture.inc.php +@@ -31,7 +31,7 @@ $type = $_REQUEST['type']; + + switch ($type) { + case 'poller': +- $cmd = ['php', \LibreNMS\Config::get('install_dir') . '/poller.php', '-h', $hostname, '-r', '-f', '-d']; ++ $cmd = ['%%LOCALBASE%%/bin/php', \LibreNMS\Config::get('install_dir') . '/poller.php', '-h', $hostname, '-r', '-f', '-d']; + $filename = "poller-$hostname.txt"; + break; + case 'snmpwalk': +@@ -42,7 +42,7 @@ switch ($type) { + $filename = $device['os'] . '-' . $device['hostname'] . '.snmpwalk'; + break; + case 'discovery': +- $cmd = ['php', \LibreNMS\Config::get('install_dir') . '/discovery.php', '-h', $hostname, '-d']; ++ $cmd = ['%%LOCALBASE%%/bin/php', \LibreNMS\Config::get('install_dir') . '/discovery.php', '-h', $hostname, '-d']; + $filename = "discovery-$hostname.txt"; + break; + default:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202105252046.14PKkO2G042686>