From owner-freebsd-ports@freebsd.org Sat Jul 6 22:10:06 2019 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2765E15D4415 for ; Sat, 6 Jul 2019 22:10:06 +0000 (UTC) (envelope-from dg@syrec.org) Received: from mail.syrec.org (mail.syrec.org [165.227.215.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2E05482E02 for ; Sat, 6 Jul 2019 22:10:05 +0000 (UTC) (envelope-from dg@syrec.org) Received: from xombo.localdomain (unknown [186.43.130.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.syrec.org (Postfix) with ESMTPSA id C9EB41F9CA for ; Sat, 6 Jul 2019 17:10:03 -0500 (-05) Date: Sat, 6 Jul 2019 17:10:01 -0500 From: Dmitri Goutnik To: freebsd-ports@freebsd.org Subject: Re: How to handle go dependencies Message-ID: <20190706221001.GB86243@xombo.localdomain> Mail-Followup-To: freebsd-ports@freebsd.org References: <5d0e8e03.1c69fb81.5e249.9640@mx.google.com> <20190622205205.GB40599@xombo.localdomain> <4de2a97c-8c41-74e4-cda1-4fdec9554e8f@fechner.net> <20190623095737.GA89814@urd.tobik.me> <20190623214048.GE40599@xombo.localdomain> <07e99b4c-cf7e-49bb-d0a0-66a24c3a563f@fechner.net> <20190706194835.GA86243@xombo.localdomain> <52f3b04f-bf8d-0ec3-e3de-32c6d3a39485@fechner.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <52f3b04f-bf8d-0ec3-e3de-32c6d3a39485@fechner.net> User-Agent: Mutt/1.12.1 (2019-06-15) X-Rspamd-Queue-Id: 2E05482E02 X-Spamd-Bar: ------ X-Spamd-Result: default: False [-6.24 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[syrec.org:s=201902]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-ports@freebsd.org]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; IP_SCORE(-2.32)[ip: (-9.74), ipnet: 165.227.208.0/20(-2.92), asn: 14061(1.10), country: US(-0.06)]; DKIM_TRACE(0.00)[syrec.org:+]; MX_GOOD(-0.01)[mail.syrec.org]; DMARC_POLICY_ALLOW(-0.50)[syrec.org,quarantine]; NEURAL_HAM_SHORT(-0.90)[-0.905,0]; RECEIVED_SPAMHAUS_PBL(0.00)[13.130.43.186.zen.spamhaus.org : 127.0.0.11]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:14061, ipnet:165.227.208.0/20, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jul 2019 22:10:06 -0000 Hi Matthias, On 19-07-06 23:30:33, Matthias Fechner wrote: > Am 06.07.2019 um 21:48 schrieb Dmitri Goutnik: > > -USES= gmake go:no_targets > > +USES= gmake go:modules,no_targets > > > > It adds -mod=vendor build flag that tells Go to not try to download > > anything and assume that all dependencies are already in vendor directory. > > hm, it does not seems to have any impact it does not stop to complain: > # go install > go: finding github.com/grpc-ecosystem/go-grpc-middleware v1.0.0 > It appears that Go build flags need to be passed down to `go build` invocation with MAKE_ENV: +MAKE_ENV= GOFLAGS="${GO_BUILDFLAGS}" With that change, the build then fails later due to missing statFileSystemType func definition for freebsd: # gitlab.com/gitlab-org/gitaly/internal/helper/fstype internal/helper/fstype/fstype.go:7:15: undefined: statFileSystemType Which can be fixed by just copying the linux version (this probably needs to be upstreamed): post-patch: ${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|" ${WRKSRC}/config.toml.example ${MV} ${WRKSRC}/config.toml.example ${WRKSRC}/config.toml.sample + ${CP} ${WRKSRC}/internal/helper/fstype/detect_linux.go ${WRKSRC}/internal/helper/fstype/detect_freebsd.go Best regards, -- Dmitri Goutnik dg@syrec.org