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: