git: 9342baefce1b - main - net-mgmt/librenms: Update to 24.2.0

From: Dan Langille <dvl_at_FreeBSD.org>
Date: Wed, 28 Feb 2024 17:05:42 UTC
The branch main has been updated by dvl:

URL: https://cgit.FreeBSD.org/ports/commit/?id=9342baefce1b8670da95d1f83275225239ade052

commit 9342baefce1b8670da95d1f83275225239ade052
Author:     Dan Langille <dvl@FreeBSD.org>
AuthorDate: 2024-02-28 17:00:36 +0000
Commit:     Dan Langille <dvl@FreeBSD.org>
CommitDate: 2024-02-28 17:05:35 +0000

    net-mgmt/librenms: Update to 24.2.0
    
    re: https://github.com/librenms/librenms/releases/tag/24.2.0
    
    This release works with php82 and php83 for me. The previous release
    worked on php82, but not php83.
    
    Adjust the pkg-message for so `lnms migrate` and `./validate.php` work
    instead of saying you can't run this as root.
---
 net-mgmt/librenms/Makefile             |  5 +++--
 net-mgmt/librenms/distinfo             | 10 +++++-----
 net-mgmt/librenms/files/pkg-message.in |  5 +++--
 3 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/net-mgmt/librenms/Makefile b/net-mgmt/librenms/Makefile
index 995aa46ce7f4..5178b89352d7 100644
--- a/net-mgmt/librenms/Makefile
+++ b/net-mgmt/librenms/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	librenms
-PORTVERSION=	24.1.0
+PORTVERSION=	24.2.0
 PORTEPOCH=	1
 CATEGORIES=	net-mgmt
 MASTER_SITES=	LOCAL/dvl:vendor
@@ -127,7 +127,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=	1704642592
+_RELEASE_TIMESTAMP=	1709060050
 _ROOT_DIRS=		LibreNMS app bootstrap config database doc html \
 			includes lang licenses mibs misc resources routes \
 			scripts tests
@@ -227,6 +227,7 @@ post-install:
 	${INSTALL_DATA} ${WRKSRC}/.env.example ${STAGEDIR}/${WWWDIR}
 	${ECHO_CMD} "@dir(www,www,0775) ${DBDIR}/storage" >> ${TMPPLIST}
 	${ECHO_CMD} "@dir(www,www,0775) ${DBDIR}" >> ${TMPPLIST}
+	${ECHO_CMD} "@dir(www,www,0775) ${WWWDIR}/html/images/custommap/background" >> ${TMPPLIST}
 	${ECHO_CMD} "@dir(www,www,0775) /var/log/${PORTNAME}" >> ${TMPPLIST}
 	${ECHO_CMD} "@(root,www,0750) ${WWWDIR}/.env.example" >> ${TMPPLIST}
 
diff --git a/net-mgmt/librenms/distinfo b/net-mgmt/librenms/distinfo
index 213a18081cc5..899ccabede63 100644
--- a/net-mgmt/librenms/distinfo
+++ b/net-mgmt/librenms/distinfo
@@ -1,5 +1,5 @@
-TIMESTAMP = 1704848844
-SHA256 (librenms-vendor-24.1.0.tar.gz) = c321a0e5b27c1f67519b970f0a066c28f3adb352ef38a10e517984f29f014897
-SIZE (librenms-vendor-24.1.0.tar.gz) = 27803312
-SHA256 (librenms-librenms-24.1.0_GH0.tar.gz) = 295877ffeb5a4d8b24e4e195968934e3a708bb17e6f1ca351d7fd0d719d55cbf
-SIZE (librenms-librenms-24.1.0_GH0.tar.gz) = 59244177
+TIMESTAMP = 1709062661
+SHA256 (librenms-vendor-24.2.0.tar.gz) = 02fdce280b3044093abf783fcae2f9fbcace6db255af6ea8c874c5a79bf7bf9e
+SIZE (librenms-vendor-24.2.0.tar.gz) = 28545490
+SHA256 (librenms-librenms-24.2.0_GH0.tar.gz) = 20f8fdfb74d8bab0bae7b835424eab4f71b695135f3b99f0afddfef44dca4a9f
+SIZE (librenms-librenms-24.2.0_GH0.tar.gz) = 60168925
diff --git a/net-mgmt/librenms/files/pkg-message.in b/net-mgmt/librenms/files/pkg-message.in
index 9baa7ecdf16a..74d46bee166a 100644
--- a/net-mgmt/librenms/files/pkg-message.in
+++ b/net-mgmt/librenms/files/pkg-message.in
@@ -92,7 +92,7 @@ It is also a good idea to validate your configuation after MySQL has been
 started:
 
 cd %%WWWDIR%%
-sudo ./validate.php
+echo ./validate.php | sudu su -fm www
 
 EOM
 }
@@ -100,7 +100,8 @@ EOM
   message: <<EOM
 Depending on the version, you may have to run the upgrade script.
 
-sudo %%PREFIX%%/bin/lnms migrate
+sudo su -fm www
+%%PREFIX%%/bin/lnms migrate
 
 NOTE: that script is particular about who runs it and ownership.
 Previously, it was suggested you avoid this via chown when using