On Wed, Mar 22, 2017 at 12:16 PM Mathieu Arnold <m...@freebsd.org> wrote:
> Le 22/03/2017 à 17:57, Jev Björsell a écrit : > > Hello, > > > > I'm updating net-mgmt/prometheus for which I am the maintainer. > > > > During build, I have added some ldflags for the `go build` step, so that > > build time, version, etc. is recorded in the binary. Before this change > > running `prometheus -version` gives a bunch of blank values, my attached > > patch fixes that. > > > > I'm using != assignments in my Makefile to get date, user, and host. > > portlint warns me[0] not to use != assignments, and the linked post > > suggests to use echo $$(${VARIABLE_CMDS}) instead. > > > > TL;DR: do not do that. If you really need to put versions in the > upstream software, put what is available in the Makefile, mainly, > PORTVERSION, and if needed PORTREVISION. > > First, because using != means that every time the Makefile is evaluated, > it needs to fork to get the values, it slow things down considerably > when build the whole ports tree. > > Second, because we need port builds to be reproducible, it means that if > I build the port today, and you build it tomorrow, it will end up giving > the same package. If you add such customization today, they will be > removed very soon when we go over the whole tree again. > > > Thank you Mathieu. I wanted to keep the FreeBSD package `-version` flag output consistent with what the upstream vendor builds provide, but your point about reproducible builds trumps that desire. I will gut the other items and just rely on ${PORTVERSION}. -Jev _______________________________________________ freebsd-ports@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"