Bug 233676 - sysutils/node_exporter: build has no version
Summary: sysutils/node_exporter: build has no version
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: freebsd-ports-bugs mailing list
Keywords: needs-qa
Depends on:
Blocks: 234707
  Show dependency treegraph
Reported: 2018-11-30 22:07 UTC by Volodymyr Kostyrko
Modified: 2019-01-09 15:30 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (ports)
koobs: merge-quarterly?

patch to add version (723 bytes, patch)
2018-12-21 12:04 UTC, Volodymyr Kostyrko
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Volodymyr Kostyrko 2018-11-30 22:07:42 UTC

Currently I have this:

> node_exporter --version
node_exporter, version  (branch: , revision: )
  build user:
  build date:
  go version:       go1.11.1

It makes it hard to track unupdated hosts for example.
Comment 1 Volodymyr Kostyrko 2018-12-20 23:35:49 UTC
I know how to fix:

LD_FLAG_X_PREFIX=      -X ${GO_PKGNAME}/vendor/${GO_PKGNAME:H}/common/version
LD_FLAG_STRING=                -s \
               ${LD_FLAG_X_PREFIX}.Version=${PORTVERSION} \
               ${LD_FLAG_X_PREFIX}.Revision=${PORTREVISION} \
               ${LD_FLAG_X_PREFIX}.Branch=release-${PORTVERSION:R} \
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2018-12-21 02:06:02 UTC
(In reply to Volodymyr Kostyrko from comment #1)

Could you provide a unified diff to the port as an attachment please
Comment 3 Volodymyr Kostyrko 2018-12-21 12:04:33 UTC
Created attachment 200331 [details]
patch to add version

Taken from prometheus port, actually.
Comment 4 Mateusz Piotrowski freebsd_committer 2019-01-09 15:29:36 UTC
Committed in #489681.