git: f67381ff3f4b - main - net-mgmt/librenms: Update to 23.10.0
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 27 Oct 2023 17:41:10 UTC
The branch main has been updated by dvl: URL: https://cgit.FreeBSD.org/ports/commit/?id=f67381ff3f4b8712de4b89f280f50d9ccf0e37b3 commit f67381ff3f4b8712de4b89f280f50d9ccf0e37b3 Author: Dan Langille <dvl@FreeBSD.org> AuthorDate: 2023-10-27 17:31:13 +0000 Commit: Dan Langille <dvl@FreeBSD.org> CommitDate: 2023-10-27 17:41:05 +0000 net-mgmt/librenms: Update to 23.10.0 re: https://github.com/librenms/librenms/releases/tag/23.10.0 See also UPDATING re crontab issue which this update fixes. --- UPDATING | 10 ++++++++++ net-mgmt/librenms/Makefile | 6 +++--- net-mgmt/librenms/distinfo | 10 +++++----- ...reNMS_Validations_Database_CheckDatabaseSchemaVersion.php | 11 +++++++++++ net-mgmt/librenms/files/patch-LibreNMS_wrapper.py | 12 ++++++------ net-mgmt/librenms/files/patch-doc_General_Updating.md | 11 +++++++++++ .../files/patch-includes_html_output_capture.inc.php | 12 ++++++------ 7 files changed, 52 insertions(+), 20 deletions(-) diff --git a/UPDATING b/UPDATING index e9da3e917786..c625d3b5619c 100644 --- a/UPDATING +++ b/UPDATING @@ -5,6 +5,16 @@ 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. +20231027: + AFFECTS: users of net-mgmt/librenms + AUTHOR: dvl@FreeBSD.org + + When updating to >= 23.10.0, a broken crontab is fixed. This breakage + caused the validation error: Scheduler is not running + After updating, If that error does not clear for you, run: + + sudo lnms config:cache + 20231027: AFFECTS: users of print/ghostscript9* AUTHOR: michaelo@FreeBSD.org diff --git a/net-mgmt/librenms/Makefile b/net-mgmt/librenms/Makefile index 00627645df7a..d29c0ab43251 100644 --- a/net-mgmt/librenms/Makefile +++ b/net-mgmt/librenms/Makefile @@ -1,6 +1,5 @@ PORTNAME= librenms -PORTVERSION= 23.9.1 -PORTREVISION= 3 +PORTVERSION= 23.10.0 PORTEPOCH= 1 CATEGORIES= net-mgmt MASTER_SITES= LOCAL/dvl:vendor @@ -131,7 +130,7 @@ _SCRIPT_FILES= daily.sh lnms # _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= 1695088746 +_RELEASE_TIMESTAMP= 1698378456 _ROOT_DIRS= LibreNMS app bootstrap config database doc html \ includes lang licenses mibs misc resources routes \ scripts tests @@ -163,6 +162,7 @@ post-patch: ${REINPLACE_CMD} 's|%%PORTVERSION%%|${PORTVERSION}|g' ${WRKSRC}/LibreNMS/Util/Version.php ${REINPLACE_CMD} 's|%%RELEASE_TIMESTAMP%%|${_RELEASE_TIMESTAMP}|g' ${WRKSRC}/LibreNMS/Util/Version.php ${REINPLACE_CMD} 's|%%WWWDIR%%|${WWWDIR}|g' ${WRKSRC}/dist/librenms-scheduler.cron + ${REINPLACE_CMD} 's|%%LOCALBASE%%|${LOCALBASE}|g' ${WRKSRC}/dist/librenms-scheduler.cron ${REINPLACE_CMD} 's|%%USER%%|${WWWOWN}|g' ${WRKSRC}/dist/librenms-scheduler.cron ${RM} ${WRKSRC}/LibreNMS/Validations/Updates.php ${RM} -rf ${WRKSRC}/logs diff --git a/net-mgmt/librenms/distinfo b/net-mgmt/librenms/distinfo index 939b3fa04fff..9ee4c2fa50a9 100644 --- a/net-mgmt/librenms/distinfo +++ b/net-mgmt/librenms/distinfo @@ -1,5 +1,5 @@ -TIMESTAMP = 1695749298 -SHA256 (librenms-vendor-23.9.1.tar.gz) = 569a8f3f02fea7633e08ff88c9c136f776ee1224afc96c612e4387c3989cfded -SIZE (librenms-vendor-23.9.1.tar.gz) = 27790089 -SHA256 (librenms-librenms-23.9.1_GH0.tar.gz) = 5621fe4b51c39cd0bd8d5bfa61ec1f66e9612245725eb4762066a1649983d4fe -SIZE (librenms-librenms-23.9.1_GH0.tar.gz) = 58035077 +TIMESTAMP = 1698409387 +SHA256 (librenms-vendor-23.10.0.tar.gz) = 8feba532fe60a05f60fc3634967a99266aa70c0539c5c4723e12ad16eee71105 +SIZE (librenms-vendor-23.10.0.tar.gz) = 27772294 +SHA256 (librenms-librenms-23.10.0_GH0.tar.gz) = 50f3dc9acdf04938a2a2bee652bf0ad548430d0017150c87ac23a1c4fae92204 +SIZE (librenms-librenms-23.10.0_GH0.tar.gz) = 58292140 diff --git a/net-mgmt/librenms/files/patch-LibreNMS_Validations_Database_CheckDatabaseSchemaVersion.php b/net-mgmt/librenms/files/patch-LibreNMS_Validations_Database_CheckDatabaseSchemaVersion.php new file mode 100644 index 000000000000..84f8e087e1a9 --- /dev/null +++ b/net-mgmt/librenms/files/patch-LibreNMS_Validations_Database_CheckDatabaseSchemaVersion.php @@ -0,0 +1,11 @@ +--- LibreNMS/Validations/Database/CheckDatabaseSchemaVersion.php.orig 2023-10-27 13:54:39 UTC ++++ LibreNMS/Validations/Database/CheckDatabaseSchemaVersion.php +@@ -44,7 +44,7 @@ class CheckDatabaseSchemaVersion implements Validation + self::$current = false; + + if (! Schema::isCurrent()) { +- return ValidationResult::fail(trans('validation.validations.database.CheckSchemaVersion.fail_outdated'), './lnms migrate') ++ return ValidationResult::fail(trans('validation.validations.database.CheckSchemaVersion.fail_outdated'), 'sudo lnms migrate') + ->setFixer(__CLASS__); + } + diff --git a/net-mgmt/librenms/files/patch-LibreNMS_wrapper.py b/net-mgmt/librenms/files/patch-LibreNMS_wrapper.py index d37958f3ac0a..e6baefc412f5 100644 --- a/net-mgmt/librenms/files/patch-LibreNMS_wrapper.py +++ b/net-mgmt/librenms/files/patch-LibreNMS_wrapper.py @@ -1,11 +1,11 @@ ---- LibreNMS/wrapper.py.orig 2023-08-21 15:25:48 UTC +--- LibreNMS/wrapper.py.orig 2023-10-27 13:10:42 UTC +++ LibreNMS/wrapper.py -@@ -280,7 +280,7 @@ def poll_worker( +@@ -282,7 +282,7 @@ def poll_worker( os.path.dirname(os.path.dirname(os.path.realpath(__file__))), wrappers[wrapper_type]["executable"], ) -- command = "/usr/bin/env php {} -h {}".format(executable, device_id) -+ command = "%%LOCALBASE%%/bin/php php {} -h {}".format(executable, device_id) +- command = "/usr/bin/env php {} {} {}".format( ++ command = ""%%LOCALBASE%%/bin/php {} {} {}".format( + executable, wrappers[wrapper_type]["option"], device_id + ) if modules is not None and len(str(modules).strip()): - module_str = re.sub("\s", "", str(modules).strip()) - command = command + " -m {}".format(module_str) diff --git a/net-mgmt/librenms/files/patch-doc_General_Updating.md b/net-mgmt/librenms/files/patch-doc_General_Updating.md new file mode 100644 index 000000000000..346aa58f233a --- /dev/null +++ b/net-mgmt/librenms/files/patch-doc_General_Updating.md @@ -0,0 +1,11 @@ +--- doc/General/Updating.md.orig 2023-10-27 13:55:36 UTC ++++ doc/General/Updating.md +@@ -22,7 +22,7 @@ you can do so by running the following commands: + cd /opt/librenms + git pull + ./scripts/composer_wrapper.php install --no-dev +-./lnms migrate ++sudo lnms migrate + ./validate.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 index a526ec24e50f..22e95d6b950a 100644 --- a/net-mgmt/librenms/files/patch-includes_html_output_capture.inc.php +++ b/net-mgmt/librenms/files/patch-includes_html_output_capture.inc.php @@ -1,20 +1,20 @@ ---- includes/html/output/capture.inc.php.orig 2021-05-25 19:32:48 UTC +--- includes/html/output/capture.inc.php.orig 2023-10-27 13:17:37 UTC +++ includes/html/output/capture.inc.php -@@ -31,7 +31,7 @@ $type = $_REQUEST['type']; +@@ -32,7 +32,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']; +- $cmd = ['php', \LibreNMS\Config::get('install_dir') . '/lnms', 'device:poll', $hostname, '--no-data', '-vv']; ++ $cmd = [''%%LOCALBASE%%/bin/php', \LibreNMS\Config::get('install_dir') . '/lnms', 'device:poll', $hostname, '--no-data', '-vv']; $filename = "poller-$hostname.txt"; break; case 'snmpwalk': -@@ -42,7 +42,7 @@ switch ($type) { +@@ -43,7 +43,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']; ++ $cmd = [''%%LOCALBASE%%/bin/php', \LibreNMS\Config::get('install_dir') . '/discovery.php', '-h', $hostname, '-d']; $filename = "discovery-$hostname.txt"; break; default: