Bug 261031

Summary: net-mgmt/librenms: Update port to 21.12.0
Product: Ports & Packages Reporter: Oleksandr Kryvulia <shuriku>
Component: Individual Port(s)Assignee: Dan Langille <dvl>
Status: Closed FIXED    
Severity: Affects Only Me CC: driesm, fgudin+fbsd
Priority: --- Flags: bugzilla: maintainer-feedback? (dvl)
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
patch
none
Proposed patch for update to 22.1.0 none

Description Oleksandr Kryvulia 2022-01-08 12:56:53 UTC
Created attachment 230815 [details]
patch

Patch to update net-mgmt/librenms to 21.12.0 version.
Comment 1 Dan Langille freebsd_committer freebsd_triage 2022-01-26 16:48:21 UTC
I am now aiming for 22.1.0
Comment 2 Oleksandr Kryvulia 2022-01-28 12:28:50 UTC
Created attachment 231407 [details]
Proposed patch for update to 22.1.0
Comment 3 Dan Langille freebsd_committer freebsd_triage 2022-01-28 15:50:14 UTC
Comment on attachment 231407 [details]
Proposed patch for update to 22.1.0

How did you find out that the EXTRACT_DEPENDS was required?

Why run composer?
Comment 4 Dan Langille freebsd_committer freebsd_triage 2022-01-29 00:46:06 UTC
(In reply to Dan Langille from comment #1)
> I am now aiming for 22.1.0

By that, I mean I've been working on that version at $WORK.

There are a number of directory permission issues where librenms wants to write to WWWDIR. Also, PHP8 and MySQL80....
Comment 5 Oleksandr Kryvulia 2022-01-31 12:56:55 UTC
(In reply to Dan Langille from comment #3)
According to docs[1] running composer is needed to populate vendor/ directory. May be this can be done at another stage, not extract.  Or may be I misunderstood your question.

[1] https://docs.librenms.org/Installation/Install-LibreNMS/
Comment 6 Dan Langille freebsd_committer freebsd_triage 2022-01-31 14:36:31 UTC
(In reply to Oleksandr Kryvulia from comment #5)

The install docs assume many things, including that you are not installing from a package. I create the vendor directory manually as part of each update so that you don't have to.

For example

[besser dan ~] % pkg info -l librenms | grep /vendor/ | head
	/usr/local/www/librenms/vendor/amenadiel/jpgraph/.codeclimate.yml
	/usr/local/www/librenms/vendor/amenadiel/jpgraph/.scrutinizer.yml
	/usr/local/www/librenms/vendor/amenadiel/jpgraph/Examples/antispamex01.php
	/usr/local/www/librenms/vendor/amenadiel/jpgraph/Examples/blueblack400x300grad.png
	/usr/local/www/librenms/vendor/amenadiel/jpgraph/Examples/builtinplotmarksex1.php
	/usr/local/www/librenms/vendor/amenadiel/jpgraph/Examples/checkgd.php
	/usr/local/www/librenms/vendor/amenadiel/jpgraph/Examples/checkgd2.php
	/usr/local/www/librenms/vendor/amenadiel/jpgraph/Examples/checkttf.php
	/usr/local/www/librenms/vendor/amenadiel/jpgraph/Examples/classroom.jpg
	/usr/local/www/librenms/vendor/amenadiel/jpgraph/Examples/colormaps.php
[besser dan ~] % 

My recipe is here: https://gist.github.com/dlangille/e91b77ca4a32dfcbcdd7515ffb263e74
Comment 7 Dan Langille freebsd_committer freebsd_triage 2022-01-31 14:37:17 UTC
(In reply to Dan Langille from comment #3)

Also, how did you find out that the EXTRACT_DEPENDS was required?
Comment 8 Oleksandr Kryvulia 2022-01-31 14:48:07 UTC
(In reply to Dan Langille from comment #7)
In my case I run composer after librenms archive is extracted and empty vendor directory is present in  ${WRKSRC}. So installed composer is required before this stage.
Comment 9 Dan Langille freebsd_committer freebsd_triage 2022-01-31 14:53:09 UTC
There is no need to do that.
Comment 10 Oleksandr Kryvulia 2022-01-31 15:04:24 UTC
(In reply to Dan Langille from comment #9)
May be you are right. Running ./scripts/composer_wrapper.php without system composer works too.
Comment 11 Dan Langille freebsd_committer freebsd_triage 2022-02-17 19:48:31 UTC
I have 22.5.0 nearly ready.
Comment 12 Dan Langille freebsd_committer freebsd_triage 2022-02-18 15:21:36 UTC
(In reply to Dan Langille from comment #11)

That should be 22.2.1
Comment 13 commit-hook freebsd_committer freebsd_triage 2022-02-18 15:22:01 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=467e569d02e854b4e3abd762b796da449b57ff72

commit 467e569d02e854b4e3abd762b796da449b57ff72
Author:     Dan Langille <dvl@FreeBSD.org>
AuthorDate: 2022-02-18 15:19:22 +0000
Commit:     Dan Langille <dvl@FreeBSD.org>
CommitDate: 2022-02-18 15:21:02 +0000

    net-mgmt/librenms: Update to 22.2.1

    re: https://github.com/librenms/librenms/releases/tag/22.2.1

    This port update skips over several releases.
    See: https://github.com/librenms/librenms/releases

    See UPDATING for details on storage directory which needs to
    move to /var/db/librenms

    LiberNMS wants to write to the %%WWWDIR%%/storage directory. To comply
    with man 7 hier, this entry is now a symlink to /var/db/librenms/storage
    Please adjust your filesystem accordingly.

    The contrib directory has been removed from the upstream tarball. As such,
    the port now installs the log rotation file to
    /${PREFIX}/etc/newsyslog.conf.d/librenms.conf.sample

    PR:             260085 261031

 UPDATING                                         |   8 ++
 net-mgmt/librenms/Makefile                       |  45 +++++----
 net-mgmt/librenms/distinfo                       |  10 +-
 net-mgmt/librenms/files/patch-config.php.default |  12 +--
 net-mgmt/librenms/files/patch-poller-wrapper.py  |  17 ++--
 net-mgmt/librenms/files/pkg-message.in           | 116 +++++++++++++----------
 6 files changed, 122 insertions(+), 86 deletions(-)
Comment 14 Dan Langille freebsd_committer freebsd_triage 2022-02-18 15:24:04 UTC
Oleksandr: if I didn't get everything you wanted into the port, please let me know. There was a bunch of changes associated with this update and I fear I may have overlooked something.

Thank you.