ports/net-mgmt/librenms/files/patch-LibreNMS_Util_Version.php
Dan Langille 3e84726434 net-mgmt/librenms: Update to 23.1.0
re: https://github.com/librenms/librenms/releases/tag/23.1.0

While here, run the Makefile through portfmt and portlint
2023-01-25 13:59:25 +00:00

20 lines
735 B
PHP

--- LibreNMS/Util/Version.php.orig 2023-01-24 21:18:47 UTC
+++ LibreNMS/Util/Version.php
@@ -56,7 +56,7 @@ class Version
public function date(string $format = 'c'): string
{
- return date($format, $this->git->commitDate() ?: filemtime(__FILE__)); // approximate date for non-git installs
+ return date($format, %%RELEASE_TIMESTAMP%%); // obtained via git show --pretty='%H|%ct' -s %%PORTVERSION%%
}
public function name(): string
@@ -123,7 +123,7 @@
public function python(): string
{
- $proc = new Process(['python3', '--version']);
+ $proc = new Process(['%%LOCALBASE%%/bin/python3', '--version']);
$proc->run();
if ($proc->getExitCode() !== 0) {