Created attachment 190031 [details] net-mgmt/prometheus: build info fix This patch fixes the build info found under `prometheus --version` and under /status on a running instance. Before: $ prometheus --version prometheus, version (branch: , revision: ) build user: build date: go version: go1.9.2 After: prometheus, version 1.8.2 (branch: release-1.8, revision: 0) build user: dor build date: 20180824-15:08:26 go version: go1.9.2
I David, I'm all for this patch, but I was told not to do this at build time because it makes problems for re-producible builds. It has my approval, but check that it is copacetic with reproducible builds. Here's a link to my past exchange on the matter: https://lists.freebsd.org/pipermail/freebsd-ports/2017-March/107833.html
Created attachment 190034 [details] net-mgmt/prometheus: build info fix How about this version? This patch gets rid of the BuildDate, because that's tricky and it's correct that forking to get it isn't great. For the BuildUser, I've put it behind a `BUILD_USER?=` variable which defaults to `${USER}`. This allows the user to specify it when they build the package if they happen to be building as a user that differs from the upstream build user. The Version, Revision, and Branch variables are hopefully not an issue, as they're based on other settings within the Makefile.
LGTM!
A commit references this bug: Author: brd Date: Thu Feb 1 21:54:26 UTC 2018 New revision: 460640 URL: https://svnweb.freebsd.org/changeset/ports/460640 Log: net-mgmt/prometheus: Fix build info PR: 225430 Submitted by: David O'Rourke <dor.bsd@xm0.uk> Approved by: ports@ecadlabs.com (maintainer) Changes: head/net-mgmt/prometheus/Makefile
Committed with a couple of small changes, like bumping PORTREVISION. Thanks!