Date: Sat, 28 May 2022 08:47:45 +0100 From: "Ben Lavery-Griffiths" <ben@lavery-griffiths.com> To: "Dmitri Goutnik" <dmgk@freebsd.org> Cc: freebsd-ports@freebsd.org Subject: Re: Golang debug/buildinfo Message-ID: <75eb34c3-6683-4db6-ab19-939aee783b7f@www.fastmail.com> In-Reply-To: <YpFm2q2Fvdw4V1Q3@xombo.localdomain> References: <61959b1c-8075-4f47-9642-15d28115bfd5@www.fastmail.com> <YpFm2q2Fvdw4V1Q3@xombo.localdomain>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi Dmitri, Many thanks for your reply. I shall take a look to see how others have packaged this on other platforms and take a lead from there for now. I'll also raise this with upstream as they usually have an opinion on packaging and may not have considered this. Thanks again! Ben On Sat, 28 May 2022, at 01:03, Dmitri Goutnik wrote: > Hi Ben, > > On 22-05-27 22:31:52, Ben Lavery-Griffiths wrote: > > Hey all, > > > > I maintain the www/gohugo port, with the upgrade to Go 1.18 they project has switched to using debug/buildinfo (https://pkg.go.dev/runtime/debug#BuildInfo), this gets certain information from VCS, as opposed to passing the values in via ldflags. > > > > Presuming more and more Go projects will use this mechanism, does anyone know how we will be dealing with this for building ports? > > Currently, go.mk explicitly disables embedding VCS information in binaries by > passing -buildvcs=false flag. Embedding VCS info will not work for port builds > because it required git (or other VCS, depending on the repository [1]), which > is not available in clean build environments. Other BuildInfo data (compiler > version, settings etc) should be available. > > In cases when upstream code is not able to handle missing VCS info, it will > probably need to be patched. I'd consider this situation an upstream bug as it > effectively prevents packaging. > > [2] provides more background on this issue. > > [1] https://tip.golang.org/doc/go1.18#go-version > [2] https://github.com/golang/go/issues/51748 > > > Many thanks, > > Ben > > > > Best regards, > > -- > Dmitri Goutnik > dg@syrec.org / dmgk@FreeBSD.org > > > *Attachments:* > * signature.asc
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?75eb34c3-6683-4db6-ab19-939aee783b7f>