Bug 233676

Summary: sysutils/node_exporter: build has no version
Product: Ports & Packages Reporter: Volodymyr Kostyrko <arcade>
Component: Individual Port(s)Assignee: freebsd-ports-bugs mailing list <ports-bugs>
Status: Closed FIXED    
Severity: Affects Only Me CC: 0mp, ports
Priority: --- Keywords: needs-qa
Version: LatestFlags: bugzilla: maintainer-feedback? (ports)
koobs: merge-quarterly?
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 234707    
Description Flags
patch to add version none

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.