From owner-freebsd-ports@freebsd.org Sun Jun 23 21:40:59 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 191EB15AD205 for ; Sun, 23 Jun 2019 21:40:59 +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 E55A371626 for ; Sun, 23 Jun 2019 21:40:57 +0000 (UTC) (envelope-from dg@syrec.org) Received: from xombo.localdomain (unknown [186.43.128.115]) (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 A85414AE91 for ; Sun, 23 Jun 2019 16:40:50 -0500 (-05) Date: Sun, 23 Jun 2019 16:40:48 -0500 From: Dmitri Goutnik To: freebsd-ports@freebsd.org Subject: Re: How to handle go dependencies Message-ID: <20190623214048.GE40599@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> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.12.0 (2019-05-25) X-Rspamd-Queue-Id: E55A371626 X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.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(-0.93)[-0.931,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]; MX_GOOD(-0.01)[mail.syrec.org]; DKIM_TRACE(0.00)[syrec.org:+]; DMARC_POLICY_ALLOW(-0.50)[syrec.org,quarantine]; NEURAL_HAM_SHORT(-0.26)[-0.258,0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; IP_SCORE(-0.05)[ipnet: 165.227.208.0/20(-1.29), asn: 14061(1.12), country: US(-0.06)]; ASN(0.00)[asn:14061, ipnet:165.227.208.0/20, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[115.128.43.186.zen.spamhaus.org : 127.0.0.11] 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: Sun, 23 Jun 2019 21:40:59 -0000 On 19-06-23 22:21:44, Matthias Fechner wrote: > Am 23.06.2019 um 11:57 schrieb Tobias Kortkamp: > > Please do not use it. It is broken in many ways. Use Dimtri's > > devel/modules2tuple instead. Change to WRKSRC of your port and run > > `go mod vendor` then `modules2tuple vendor/modules.txt` and it will > > spit out an appropriate GH_TUPLE etc. > > thanks that looks fine now. I added also a target `gomod-deps` to get > that more easily generated. > It currently seems to only support GH and not GL, this could maybe > improved later. > > > Probably you need > > USE_GITHUB= nodefault > > > > and it should work. > > seems ok, I have now the following: > https://gitlab.fechner.net/mfechner/Gitlab/commit/e83876fb9de9c79c39ba85801ebb242a08f5412c > > But now I get the error message: > =================================================== > The > https://gitlab.com/gitlab-org/gitaly-proto/repository/f4db5d05d437abe1154d7308ca044d3577b5ccba/archive.tar.gz?dummy=/:gitaly-proto > MASTER_SITES line has > a group with invalid characters, only use [a-zA-Z0-9_] > *** Error code 1 > > This seems to be a bug in the ports? > Why is a `-` an invalid character, it exists in: > https://gitlab.com/gitlab-org/gitaly/ > > Is there a way out? > > Gruß > Matthias > Hi Matthias, Gitaly seems to be using gmake for build so USES=go won't work here because go.mk would add a "do-build" target (as port's Makefile doesn't define one explicitly) and it will break the build, -USES= gmake go go:modules +USES= gmake -MAKE_ENV+= GOPATH=${WRKSRC} The group error is coming from this GL_TUPLE line: gitlab-org:gitaly-proto:f4db5d05d437abe1154d7308ca044d3577b5ccba:gitaly-proto/vendor/gitlab.com/gitlab-org/gitaly-proto "gitaly-proto" is not a valid group name (contains "-"); can be fixed by changing the group name to e.g. "gitaly_proto" Upstream's Makefile is disabling Go modules support by setting GO111MODULES=off so "rm go.mod" can be removed from post-patch (go.mod is ignored with GO111MODULES=off): post-patch: ${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|" ${WRKSRC}/config.toml.example ${MV} ${WRKSRC}/config.toml.example ${WRKSRC}/config.toml.sample - ${RM} ${WRKSRC}/go.mod -- Dmitri Goutnik dg@syrec.org