diff options
author | Michael Gmelin <grembo@FreeBSD.org> | 2024-09-26 14:22:09 +0200 |
---|---|---|
committer | Michael Gmelin <grembo@FreeBSD.org> | 2024-09-26 15:48:10 +0200 |
commit | d5c8853a4766cee2f6c45ea0e5ee296685ee76c4 (patch) | |
tree | 662d921e5037e568c4cd1a04538c38722e6ea44b /sysutils | |
parent | databases/postgresql17-*: Update to 17.0 (diff) |
sysutils/loki: Add version information to build
This way, `loki --version` actually shows the version that
is installed.
PR: 281716
Approved by: freebsd@funzi.org (maintainer)
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/loki/Makefile | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/sysutils/loki/Makefile b/sysutils/loki/Makefile index 3aa370a171fa..6a286f78f2d7 100644 --- a/sysutils/loki/Makefile +++ b/sysutils/loki/Makefile @@ -1,7 +1,7 @@ PORTNAME= loki DISTVERSIONPREFIX= v DISTVERSION= 2.9.2 -PORTREVISION= 8 +PORTREVISION= 9 CATEGORIES= sysutils PKGNAMEPREFIX= grafana- @@ -329,6 +329,16 @@ GH_TUPLE= \ USE_RC_SUBR= loki promtail GO_TARGET= ./cmd/loki ./cmd/loki-canary ./cmd/logcli ./clients/cmd/promtail +GO_BUILDFLAGS= -v -ldflags "${LD_FLAG_STRING}" + +LD_FLAG_STRING= -s \ + ${LD_FLAG_X_PREFIX}.Version=${PORTVERSION} \ + ${LD_FLAG_X_PREFIX}.Revision=${PORTREVISION} \ + ${LD_FLAG_X_PREFIX}.Branch=HEAD \ + ${LD_FLAG_X_PREFIX}.BuildUser=${BUILD_USER} \ + ${LD_FLAG_X_PREFIX}.BuildDate=$$(date -u +"%Y-%m-%dT%H:%M:%SZ") +LD_FLAG_X_PREFIX= -X github.com/grafana/loki/pkg/util/build +BUILD_USER?= ${USER} LOKI_USER?= loki LOKI_GROUP?= loki @@ -338,9 +348,6 @@ PROMTAIL_USER?= promtail PROMTAIL_GROUP?= promtail PROMTAIL_DATADIR?= /var/db/promtail -USERS= ${LOKI_USER} ${PROMTAIL_USER} -GROUPS= ${LOKI_GROUP} ${PROMTAIL_GROUP} - SUB_LIST= LOKI_USER=${LOKI_USER} \ LOKI_GROUP=${LOKI_GROUP} \ LOKI_DATADIR=${LOKI_DATADIR} \ @@ -348,6 +355,9 @@ SUB_LIST= LOKI_USER=${LOKI_USER} \ PROMTAIL_GROUP=${PROMTAIL_GROUP} \ PROMTAIL_DATADIR=${PROMTAIL_DATADIR} +USERS= ${LOKI_USER} ${PROMTAIL_USER} +GROUPS= ${LOKI_GROUP} ${PROMTAIL_GROUP} + PLIST_SUB= ${SUB_LIST} post-extract: |