Bug 274473 - sysutils/loki: Update to 2.9.1
Summary: sysutils/loki: Update to 2.9.1
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Robert Clausecker
URL: https://github.com/grafana/loki/relea...
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-14 22:41 UTC by Christopher Beppler
Modified: 2023-10-19 07:14 UTC (History)
1 user (show)

See Also:


Attachments
0001: update loki to 2.9.1 (91.93 KB, patch)
2023-10-14 22:41 UTC, Christopher Beppler
freebsd: maintainer-approval+
Details | Diff
0002: add rc.d script for promtail (6.02 KB, patch)
2023-10-14 22:42 UTC, Christopher Beppler
freebsd: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Beppler 2023-10-14 22:41:02 UTC
Created attachment 245624 [details]
0001: update loki to 2.9.1

Update loki to 2.9.1

This also adds a new rc.d file for promtail (based on what has been submitted in #274194)

Both patches have to be applied to give credit to Eren where credit is due :-).
Comment 1 Christopher Beppler 2023-10-14 22:42:40 UTC
Created attachment 245625 [details]
0002: add rc.d script for promtail
Comment 2 Robert Clausecker freebsd_committer freebsd_triage 2023-10-16 05:22:43 UTC
Thank you for the submission.

Check if you can switch to GO_MODULE in the future.  This avoids having to list all the dependencies manually.

Is there a changelog for this update?
Comment 3 Christopher Beppler 2023-10-16 07:15:46 UTC
I tried to migrate to go:modules but failed - probably because the module is not named /v2 and thus the special handling of go v2 releases kicks in. It's an open issue upstream and won't be fixed before v3 (if ever).
I also can't patch it because it fails during download stage...
Comment 4 Christopher Beppler 2023-10-16 07:16:06 UTC
Release Notes URL added.
Comment 5 Robert Clausecker freebsd_committer freebsd_triage 2023-10-16 15:56:04 UTC
Ah that sucks.  I feel with you; finance/ticker suffers from the same problem.
Comment 6 Christopher Beppler 2023-10-16 17:21:41 UTC
There is hope. Just today they released 3.0.0-beta1 and the module name is correctly set to /v3 there.

Possibly 2.9.1 is the last 2.x release.
Comment 7 Robert Clausecker freebsd_committer freebsd_triage 2023-10-16 18:12:50 UTC
Sounds great!

Build fails on arm64 FreeBSD 13.2 with a plist error:

====> Running Q/A tests (stage-qa)
====> Checking for pkg-plist issues (check-plist)
===> Parsing plist
===> Checking for items in STAGEDIR missing from pkg-plist
Error: Orphaned: @dir /var/db/%%PROMTAIL_USER%%
===> Checking for items in pkg-plist which are not in STAGEDIR
===> Error: Plist issues found.
*** Error code 1

Stop.
make: stopped in /usr/ports/sysutils/loki

Please check.  If you're okay with that, I can just add

    @dir %%PROMTAIL_DATADIR%%

to pkg-plist and a corresponding SUB_LIST entry to fix that.
Comment 8 Christopher Beppler 2023-10-16 18:52:09 UTC
Oh, yes... I guess I missed that when adjusting the promtail patch to 2.9.1 Makefile.

Please go ahead :-).

Thanks
Comment 9 Robert Clausecker freebsd_committer freebsd_triage 2023-10-16 19:04:29 UTC
That's why I do additional testing :-)

Will commit with this change, also adjusting ownership to the promtail user.
Comment 10 Christopher Beppler 2023-10-16 19:06:38 UTC
Thanks
Comment 11 commit-hook freebsd_committer freebsd_triage 2023-10-19 07:09:35 UTC
A commit in branch main references this bug:

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

commit b16c0ca7d04e67ba0dd9e2ff7a5cde372a79171b
Author:     Eren Türkay <turkay.eren@gmail.com>
AuthorDate: 2023-10-06 09:46:13 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2023-10-19 07:07:26 +0000

    sysutils/loki: add promtail rc.d script

    Promtail is a log reader and it can be run as a service to gather the
    logs to be sent to remote loki server. For nodes that need to send logs
    only, promtail service and configuration file is needed

    PR:             274194, 274473
    Signed-off-by:  Christopher Beppler <freebsd@funzi.org>
    Approved by:    Chirstopher Beppler <freebsd@funzi.org> (maintainer)

 UIDs                                               |  2 +-
 sysutils/loki/Makefile                             | 13 +++-
 .../files/patch-promtail-local-config.yaml (new)   | 11 ++++
 sysutils/loki/files/promtail.in (new)              | 70 ++++++++++++++++++++++
 sysutils/loki/pkg-plist                            |  4 ++
 5 files changed, 96 insertions(+), 4 deletions(-)
Comment 12 commit-hook freebsd_committer freebsd_triage 2023-10-19 07:09:41 UTC
A commit in branch main references this bug:

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

commit ccbf8b7a166ff7f08a7f531779fe72439ee67e25
Author:     Christopher Beppler <freebsd@funzi.org>
AuthorDate: 2023-10-14 23:55:31 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2023-10-19 07:07:26 +0000

    sysutils/loki: Update to 2.9.1

    Changelog: https://github.com/grafana/loki/releases/tag/v2.9.1

    PR:             274473

 sysutils/loki/Makefile | 229 ++++++++++++++--------------
 sysutils/loki/distinfo | 396 ++++++++++++++++++++++++++-----------------------
 2 files changed, 324 insertions(+), 301 deletions(-)
Comment 13 Robert Clausecker freebsd_committer freebsd_triage 2023-10-19 07:14:12 UTC
Thank you for your contribution.