Date: Wed, 22 Dec 2021 14:05:31 +0000 From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 260608] sysutils/zrepl: build does not include version Message-ID: <bug-260608-7788@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D260608 Bug ID: 260608 Summary: sysutils/zrepl: build does not include version Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: lcook@freebsd.org Reporter: lapo@lapo.it Flags: maintainer-feedback?(lcook@freebsd.org) Assignee: lcook@freebsd.org current: # pkg install zrepl # zrepl version client: zrepl version=3D go=3Dgo1.17.3 GOOS=3Dfreebsd GOARCH=3Damd64 Compil= er=3Dgc expected: # zrepl version client: zrepl version=3D0.4.0 go=3Dgo1.17.3 GOOS=3Dfreebsd GOARCH=3Damd64 C= ompiler=3Dgc The reason is that the port is using `go build` directly, instead of using `gmake`. I tried like this: USES=3D gmake go:modules,no_targets USE_RC_SUBR=3D zrepl MAKE_ENV=3D ZREPL_VERSION=3D${DISTVERSION} but it gets a bit complex as it would probably require modifications to the Makefile (but, as we're not using it, should USES=3Dgmake removed from the port?). I finally managed like this (but is a bit more hackish and breaks WITH_DEBU= G as it overrides "-ldflags=3D-s" as would be otherwise done in /usr/ports/Mk/Uses/go.mk) but it's simple enough and works in the general c= ase: GO_BUILDFLAGS+=3D -ldflags=3D"-X github.com/zrepl/zrepl/version.zreplVersion=3D${DISTVERSION}" --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-260608-7788>