From nobody Wed May 04 12:31:08 2022 X-Original-To: dev-commits-ports-main@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 7E5D51ACDBF9; Wed, 4 May 2022 12:31:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ktblw36chz54VQ; Wed, 4 May 2022 12:31:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651667468; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tvUICqfOq3mESzO6LsDubTLVTlBOOt0oDS9LYhnWOgc=; b=R6uHWda5XHHS/dU7niYFrLfcpbFkdymCz14BRhAho6qBftnjluzHfsqqETLHHYJ66u2cQh J6S5dlgFYEl5e+I30MevU87ojyjyviftj68G5uJIpQqCBTZWbmU2bWXvftOqboYnaNgZOZ ljWTW/ErrQa5XGB8IaU7DtAsU+xt/E0JzvIoihhOJqgQjEjsyht2gCgj5WYWMpKptBcGD+ GK8pu3ebU2it1LuQScwcLBkDxgEJjBrt2YhjPQb5lLpVIZ3qTCU7BTwHS06LvV5LdQbCyo U+h6BuFxQ3rReEEcuB8GaxkKDM1Db+Zd+SocPrzlLHnFx4e5g86JxxWxRZ2EYA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4B78712B5E; Wed, 4 May 2022 12:31:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 244CV8YN097641; Wed, 4 May 2022 12:31:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 244CV8ie097640; Wed, 4 May 2022 12:31:08 GMT (envelope-from git) Date: Wed, 4 May 2022 12:31:08 GMT Message-Id: <202205041231.244CV8ie097640@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Dmitri Goutnik Subject: git: d592a0f851d5 - main - Mk/Uses/go.mk: Do not insist on always pulling go.mod and distfile from GOPROXY List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dmgk X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d592a0f851d5e09f08eb62f0e7342b3cc69d9ad1 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651667468; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tvUICqfOq3mESzO6LsDubTLVTlBOOt0oDS9LYhnWOgc=; b=M43nXyyV3DZjPDNfTMaOSvi4ELWzE3nQHgu6K83lT8N97CnR4sFicotuC/WM7RAAI9JMXX QFMNTiLwdkFOdiWzoT0U50xscfAUFamrFrwFrCbkaYTOh7aEz2eu8llRWHdXOPPJAmhr9b LQaCVqh/JX9IaKzG0l6ZDenWgSiDltYL1gfSSaN2R33poQQ3aP38XKIzrIfUTVcminb6zw CU96HFOAaCLFXcKRJhYDTB7drjCbc2RcBbgJhcGpgDZe9owmo1V6QtT+ydWENF/R4dqXQB QXnEmkJY5MOdDx/HygJs2WOkFKTelwOEiQn3S3CLPGi2xlS0yppquf+OAcgN2Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1651667468; a=rsa-sha256; cv=none; b=KAezBHEoafstOlKCLv3U+Nj2yD2Is9gjBIjPh1KHgl6BNpiOuk/+yIHTgRKdN5z0NOvLbF TBGuk9ticA6iFkglVYIvmmDolilQAZ6DiCm7og2eszeNEU+9+1KoJN18HhC+ZwzOMYsZFO Jv1nCcLiC37IV9TDtMNNgMwEQ8sZOAfj5HHdqhV+4UPOuO3rG5VftC4R/kk7oj9tg3Y8M+ 7Tf/aG8XIMyKSfvCCzKMmbdZK4WgYlWqyzHVr/8/0e+M0bcXEqMLAsAJKEz2DJU990N6wJ 9zGTLBV1rJ8In0NuzudxEUqpXjE+S7dW25m41VRSocHUQi/4HHNHa1IwzrRZnA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dmgk: URL: https://cgit.FreeBSD.org/ports/commit/?id=d592a0f851d5e09f08eb62f0e7342b3cc69d9ad1 commit d592a0f851d5e09f08eb62f0e7342b3cc69d9ad1 Author: Dmitri Goutnik AuthorDate: 2022-05-04 12:12:06 +0000 Commit: Dmitri Goutnik CommitDate: 2022-05-04 12:30:23 +0000 Mk/Uses/go.mk: Do not insist on always pulling go.mod and distfile from GOPROXY Some Go packages are not listed on pkg.go.dev (usually because their versioning scheme does not satisfy Go requirements) and, as a consequence, are not accessible through proxy.golang.org. Instead of resorting to hacks with pseudo-versions and/or enumerating dependencies manually with modules2tuple, support fetching go.mod and distfile from the usual places using DISTFILES mechanism. This will allow bypassing GOPROXY for go.mod and the distribution archive, but will still use it for fetching dependencies (with GO_MODULE). --- Mk/Uses/go.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Mk/Uses/go.mk b/Mk/Uses/go.mk index 034416dda1c1..d77c78c63b84 100644 --- a/Mk/Uses/go.mk +++ b/Mk/Uses/go.mk @@ -120,14 +120,16 @@ GO_ENV+= GOPATH="${GO_GOPATH}" \ GOSUMDB=${GO_GOSUMDB} . if defined(GO_MODULE) GO_MODNAME= ${GO_MODULE:C/^([^@]*)(@([^@]*)?)/\1/} +. if empty(DISTFILES:Mgo.mod*) GO_MODVERSION= ${GO_MODULE:C/^([^@]*)(@([^@]*)?)/\2/:M@*:S/^@//:S/^$/${DISTVERSIONFULL}/} GO_MODFILE= ${GO_MODVERSION}.mod GO_DISTFILE= ${GO_MODVERSION}.zip -DIST_SUBDIR= go/${PKGORIGIN:S,/,_,g}/${DISTNAME} MASTER_SITES+= ${GO_GOPROXY}/${GO_MODNAME:C/([A-Z])/!\1/g:tl}/@v/ DISTFILES+= ${GO_MODFILE} ${GO_DISTFILE} EXTRACT_ONLY+= ${GO_DISTFILE} WRKSRC= ${WRKDIR}/${GO_MODNAME}@${GO_MODVERSION} +. endif +DIST_SUBDIR= go/${PKGORIGIN:S,/,_,g}/${DISTNAME} FETCH_DEPENDS+= ${GO_CMD}:${GO_PORT} \ ca_root_nss>0:security/ca_root_nss USES+= zip