From nobody Thu Sep 26 13:49:56 2024 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XDw2Y1bv2z5XKlc; Thu, 26 Sep 2024 13:49:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XDw2X6Ck8z4VgX; Thu, 26 Sep 2024 13:49:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727358596; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3Vw2jwgM2see8r8vHha5T2fGou54pcdsm5O4ttGEaEw=; b=KKyZwfRsHRrQxRKCeK1E+c4enD6QLbeEIHyV9wZ+ZzrY7SgBto/D1fo68n1ECNJUOAJWjB 0yAyS+GfrCUzqGL9z8HBHNRk9cq/eGKbhgb1aivv2ZU7lDippKC9lsot7olRj36+svPMvz CKEhXBZ4ybdnEeayEJJ6Uijcc8JxaHd0WVDypKwoDUQeKNqIUrApMh3AlHbqNz58m2rZMK KyYKJnhf+SWC4nVd1piise4NrmCamK38WmQqJ2CulZDrG4mKJrJBGoW61LpLOTLKCnuK8Q SjYMA9OSaHuzo0AfieylATA+3TYqK1dHuJX7vM3mR484lpORmTrjEslsYM2ivA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727358596; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3Vw2jwgM2see8r8vHha5T2fGou54pcdsm5O4ttGEaEw=; b=OOJnx7zK8o1m5P/WYIvMvgCO47OyxuDIxfLObD9+GxGRBJOJkvS3HcwHw0E4zr2aVCJue0 rL0ycvJZH4W8mrvn31sRwvAsR92lN7jAs7mn/Q4L45GR7XPZTy3rbcG4Uk15df+rE4DQUS 116nsCp6xcYSPbDEUTeDdi9kKQAyvMYfNcNXeWvhgXpX7zPffy+Lsb7cgpQDkMTQF3pr42 i4UpU677JCFEOWK71OZDOfi749IE/pr0IDtXjSAt6rBiAN+kCHYd4R5MdSAQbghWV2BiUS UKIC6bSKboQDsScyZontS1SyOVntZ56PLHD4FZ7AAemT5ENT5cqyMaLQfjpLUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727358596; a=rsa-sha256; cv=none; b=EhauQY8eb6FmfbTK0sUwCGScdOCskovfq2wp7FPscD3snhk7GUPoW9EU7rybKde45hBytu +NceBRrsrbU77yjoIF7r49281fushj5S0BYinqP7WdvvQN7Ze5Ikq21UNhZm4aZpe1WDeE wR9UUL5YSwfuqugMWy/3Z8WeiX+NHnwidzH+dLhMMgYdNNwTjCBBfmAWc6oOELr5PfpvfF wC2AQEQzuQF/bgtCftryOr7G/cbm/gar4twlr3o/b2tA+BqHsgB9atTl890LVUFUtmBZpg S+/cVTTFHCMKWqbiSSXf1RJRx+CPQJH2iXpLvB4cJh2tA5wNkNZlh09RQDHtcQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XDw2X5hv6z106k; Thu, 26 Sep 2024 13:49:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 48QDnu1c034719; Thu, 26 Sep 2024 13:49:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48QDnuCm034716; Thu, 26 Sep 2024 13:49:56 GMT (envelope-from git) Date: Thu, 26 Sep 2024 13:49:56 GMT Message-Id: <202409261349.48QDnuCm034716@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Michael Gmelin Subject: git: d5c8853a4766 - main - sysutils/loki: Add version information to build List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: grembo X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d5c8853a4766cee2f6c45ea0e5ee296685ee76c4 Auto-Submitted: auto-generated The branch main has been updated by grembo: URL: https://cgit.FreeBSD.org/ports/commit/?id=d5c8853a4766cee2f6c45ea0e5ee296685ee76c4 commit d5c8853a4766cee2f6c45ea0e5ee296685ee76c4 Author: Michael Gmelin AuthorDate: 2024-09-26 12:22:09 +0000 Commit: Michael Gmelin CommitDate: 2024-09-26 13:48:10 +0000 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) --- sysutils/loki/Makefile | 18 ++++++++++++++---- 1 file 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: