From nobody Mon Apr 22 07:22:39 2024 X-Original-To: freebsd-ports@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VNGtG2RhQz5JWWv for ; Mon, 22 Apr 2024 07:22:46 +0000 (UTC) (envelope-from idefix@fechner.net) Received: from beta.fechner.net (beta.fechner.net [IPv6:2a03:4000:67:cc1::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4VNGtD73Qjz428N for ; Mon, 22 Apr 2024 07:22:44 +0000 (UTC) (envelope-from idefix@fechner.net) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=pass (policy=none) header.from=fechner.net; spf=pass (mx1.freebsd.org: domain of idefix@fechner.net designates 2a03:4000:67:cc1::2 as permitted sender) smtp.mailfrom=idefix@fechner.net Received: from server.idefix.lan (unknown [212.108.150.210]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) (Authenticated sender: idefix@fechner.net) by beta.fechner.net (Postfix) with ESMTPSA id 91A29B7F59; Mon, 22 Apr 2024 09:22:40 +0200 (CEST) Received: from [192.168.0.151] (unknown [192.168.0.151]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by server.idefix.lan (Postfix) with ESMTPSA id 6EE8120436; Mon, 22 Apr 2024 10:22:39 +0300 (EEST) Content-Type: multipart/alternative; boundary="------------SHP4a6kYpkaaWrZ7we0t9b0r" Message-ID: <6d96a3de-1d87-4dab-aba0-90b45e554817@fechner.net> Date: Mon, 22 Apr 2024 10:22:39 +0300 List-Id: Porting software to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-ports List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-ports@freebsd.org Sender: owner-freebsd-ports@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Porting a new Golang app: go mod replace relative path To: Zach Leslie , freebsd-ports@freebsd.org References: Content-Language: en-US From: Matthias Fechner Autocrypt: addr=idefix@fechner.net; keydata= xsFNBFqca1YBEADM9mF2+ifk8HILTlf5wtAzV6SYVR4RvNOo/8Kucw4sCZT76zS1fjZe4Zy1 3C0IZ07Wi+3PnoGIgOCsXp3PrTc2nuHQWkwVBYXy8UaR9DHBWA/mIvRGG1ZscKQYA6oUdCvd K8Mu26zO60yTt+ONzFtK6G1myH4EHXZ8dpmdCFf+W3rzTU+aCQ5S3OfwCLGgYgOaVREGkdOc 5SVCpFb4n+2B8+CqeWsRHhnT+4h7/YhgDMGp4GiI3yrB2nBVSUUvcosD2nRtJQgGQHcAFtMq 3hJaKPOR/mHc6KVrp0xmGNmdtazvXloHmGIl9O1UpmMmrYu9Kugl0JkGi2fAcno02XgVlkyX 7xDLTteP5cNqRxor4yVDaRWUQnOfK9XgcrKGrAzb65BkCSkjT+Aw3S/A8Qd6NvjL9qy1d+Ct dzatOVF/Y7jaW28CMr3jvwPS13OxV7PnJzIZzdik20eVxfOXuYfxZD+PwBaGgFF0qj6zKACC aKLalE0ZpY0zNn/iPyQX/Cf9KoDyFpOHSsEswiJ5rCWwppVcsFyogHOemVmeaXlvyDPEipnV ZUkpGP/CCqPu3eD0uDzP7UJ0pt/l/JfW0Xw/4p9mjB024xiRlxLa6vSRfGl//EdtAIbKKa8x 5wsKTQEbYJDmXE3tH/A54DCqRXhcopTlu2iJlTdnIMltn9afVwARAQABzSVNYXR0aGlhcyBG ZWNobmVyIDxpZGVmaXhAZmVjaG5lci5uZXQ+wsGXBBMBCgBBAhsDBQkQ1NXWBQsJCAcDBRUK CQgLBRYDAgEAAh4BAheAFiEEaWB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yP9T0HT2tHHA+/EGmfq5Ohe+IF4WpBJ37t12ZxelA7qXHbtPljz+Ptljs3tS zX4omw== In-Reply-To: X-Rspamd-Action: no action X-Rspamd-Server: beta.fechner.net X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.60 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.61)[-0.606]; DMARC_POLICY_ALLOW(-0.50)[fechner.net,none]; RCVD_IN_DNSWL_MED(-0.20)[2a03:4000:67:cc1::2:from]; R_SPF_ALLOW(-0.20)[+a]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; XM_UA_NO_VERSION(0.01)[]; RCPT_COUNT_TWO(0.00)[2]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:197540, ipnet:2a03:4000::/32, country:DE]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; TO_DN_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; FREEMAIL_TO(0.00)[gmail.com,freebsd.org]; RCVD_COUNT_TWO(0.00)[2]; MLMMJ_DEST(0.00)[freebsd-ports@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; R_DKIM_NA(0.00)[]; ARC_NA(0.00)[] X-Rspamd-Queue-Id: 4VNGtD73Qjz428N This is a multi-part message in MIME format. --------------SHP4a6kYpkaaWrZ7we0t9b0r Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Am 19.04.2024 um 19:44 schrieb Zach Leslie: > ===> Fetching github.com/grafana/alloy dependencies go: > github.com/grafana/alloy/syntax@v0.1.0 (replaced by ./syntax): reading > syntax/go.mod: open > /usr/ports/distfiles/go/sysutils_alloy/grafana-alloy-v1.0.0_GH0/syntax/go.mod: > no such file or directory *** Error code 1 > > I've spoken with the authors, and they don't intend to keep a `vendor` > directory, nor do they intend to change the go mod replace line, so > I'm left wondering what my options are. > > Is there a workaround for this? Can we specify in the port that for a > specific module, to reference the module > github.com/grafana/alloy/syntax at the same version as the port? Any > advice would be appreciated. I think the problem is this line: https://github.com/grafana/alloy/blob/main/go.mod#L777 You can maybe try to fetch this additional go.mod somehow manually: https://github.com/grafana/alloy/blob/main/syntax/go.mod maybe by an additional manually added distfile entry to place it in the expected directly (maybe in a prefetch rule or by just manually extending the DIST_FILES). Gruß Matthias -- "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning." -- Rich Cook --------------SHP4a6kYpkaaWrZ7we0t9b0r Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
Am 19.04.2024 um 19:44 schrieb Zach Leslie:
===> Fetching github.com/grafana/alloy dependencies go:
github.com/grafana/alloy/syntax@v0.1.0 (replaced by ./syntax): reading
syntax/go.mod: open
/usr/ports/distfiles/go/sysutils_alloy/grafana-alloy-v1.0.0_GH0/syntax/go.mod:
no such file or directory *** Error code 1

I've spoken with the authors, and they don't intend to keep a `vendor`
directory, nor do they intend to change the go mod replace line, so
I'm left wondering what my options are.

Is there a workaround for this?  Can we specify in the port that for a
specific module, to reference the module
github.com/grafana/alloy/syntax at the same version as the port?  Any
advice would be appreciated.

I think the problem is this line:
https://github.com/grafana/alloy/blob/main/go.mod#L777

You can maybe try to fetch this additional go.mod somehow manually:
https://github.com/grafana/alloy/blob/main/syntax/go.mod

maybe by an additional manually added distfile entry to place it in the expected directly (maybe in a prefetch rule or by just manually extending the DIST_FILES).

Gruß
Matthias

-- 

"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the universe trying to
produce bigger and better idiots. So far, the universe is winning." --
Rich Cook
--------------SHP4a6kYpkaaWrZ7we0t9b0r--