From nobody Mon May 09 11:15:30 2022 X-Original-To: dev-commits-ports-all@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 2A7FC1ACB3B4; Mon, 9 May 2022 11:15:37 +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 4KxdrT0gBfz3Hgm; Mon, 9 May 2022 11:15:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652094937; 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=h/DVAUOJzxEoKw2g66WFcRmtOIEbcYglhW/lxwykXig=; b=gZpEQWA2bvm/O8KXHghJ7RVgTgc/5pPlMtfKOHNonKIRQwr7zf0ZkH2hZ3JAetrROP0Djn DzDpspEY4w/clzsCjsQwVl4rMghBYvwTaqir1CGOxysXr5wUGLgvuFYrBIFfp6Fs5XpVk4 knFeIMI9oeoSdsr+Rcli9ijJCbqw69uRplRGRe2fLkOhbwBYpPV0DFP/4a6vTfU8KIOPAW 7BELup6YGE7VlcAzu6RtnkTs2wD8E34bJc0xQlH+IfM055hZ0Bzq08MKK+Q53KJ/S0ZGdE tYJ/k0Fdmb9GqrQO4lnH4K2Xr+oAEE4TWG1ps6xtFWgdfzgPyRuiNziRLOxNYQ== 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 1A17C7A5C; Mon, 9 May 2022 11:15:30 +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 249BFUE7024892; Mon, 9 May 2022 11:15:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 249BFUkP024891; Mon, 9 May 2022 11:15:30 GMT (envelope-from git) Date: Mon, 9 May 2022 11:15:30 GMT Message-Id: <202205091115.249BFUkP024891@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: 6e236e189653 - main - Mk/Uses/go.mk: Try to tidy up go.sum after fetch, fix EXTRACT_ONLY List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@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: 6e236e18965327f6100473770e4edb78c94fb1d4 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652094937; 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=h/DVAUOJzxEoKw2g66WFcRmtOIEbcYglhW/lxwykXig=; b=yMArPIuroVoFNN1BES42l2CO2hap5CmL1s64nlfEo8A7RwYu5WW4YK5TfW86ospS4FEGGX 3wZv836Fs5eS9fnz8qWjGOm8Clw8GhuKz76H5tp3gpr8nZ1Ic2+D2gXPSoCQAT8bAt70Io n+yfKl9yyK5t+0zLn52jkS/qw6TPKqkIHVka+M0fSv/zqd86N6uGtmu5FpuJUKq2ksSlxv /E6OzSDteNwj7KL8rPD4GHa37c5yc7wbWb7h+pvDHLG5lGC/2jwBi1/THLh797QgOdgUJK 86JYphSlMXeu+16IZkB/diB40/8B5r0ujTOJ4H7vHVe3jnb3kYqT4w4gwNCngA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1652094937; a=rsa-sha256; cv=none; b=JpB1g87MB/0OO4VTZC5z7wVlmZPScYE0RbzatJ7pDleg7f6N6OtJotcFNw2Kbqw6s535Xa o11HgDpT0iLzZKbFIHekFh0bUqTAoSaIGwwXOUMwyH2KxO6Jse0XFv1uzm7ZV9FrJBBsLD /P8wh3/pbDj5/TQVRWXkvqE88YkoJ/v/ea6lmecafoaq6ZZjXExOsmiJTqc6YKPfRjWoaj 8FAKAv5YZWcOf0+bj1BctjdWdbTkA5DDhtmC6c/SMrtVrBGaYLDDAeL7/0JGCgzOl87LSA IyeqiIcu1X92OYO0AxSyEJMah/GKaRpeTdTQyN+gauaKsOZzr/OLzy5ZtvJHvA== 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=6e236e18965327f6100473770e4edb78c94fb1d4 commit 6e236e18965327f6100473770e4edb78c94fb1d4 Author: Dmitri Goutnik AuthorDate: 2022-05-08 20:49:05 +0000 Commit: Dmitri Goutnik CommitDate: 2022-05-09 11:15:14 +0000 Mk/Uses/go.mk: Try to tidy up go.sum after fetch, fix EXTRACT_ONLY Make a best effort attempt (without network access) to add missing go.sum entries using local module cache prepared by the fetch stage. Set EXTRACT_ONLY dynamically from DISTFILES, repair USE_{GITHUB,GITLAB}. PR: 258210 PR: 262981 PR: 263866 --- Mk/Uses/go.mk | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Mk/Uses/go.mk b/Mk/Uses/go.mk index 0b5f48ed8e07..b73e198e29fe 100644 --- a/Mk/Uses/go.mk +++ b/Mk/Uses/go.mk @@ -118,6 +118,7 @@ GO_ENV+= CGO_ENABLED=${CGO_ENABLED} \ GO_BUILDFLAGS+= -mod=vendor GO_TESTFLAGS+= -mod=vendor GO_GOPATH= ${DISTDIR}/go/${PKGORIGIN:S,/,_,g} +GO_MODCACHE= file://${GO_GOPATH}/pkg/mod/cache/download GO_WRKSRC= ${WRKSRC} GO_ENV+= GOPATH="${GO_GOPATH}" \ GOBIN="${GO_WRKDIR_BIN}" \ @@ -126,15 +127,15 @@ GO_ENV+= GOPATH="${GO_GOPATH}" \ GOSUMDB=${GO_GOSUMDB} . if defined(GO_MODULE) GO_MODNAME= ${GO_MODULE:C/^([^@]*)(@([^@]*)?)/\1/} -. if empty(DISTFILES:Mgo.mod*) +. if empty(DISTFILES:Mgo.mod\:*) && empty(DISTFILES:Mgo.mod) GO_MODVERSION= ${GO_MODULE:C/^([^@]*)(@([^@]*)?)/\2/:M@*:S/^@//:S/^$/${DISTVERSIONFULL}/} GO_MODFILE= ${GO_MODVERSION}.mod GO_DISTFILE= ${GO_MODVERSION}.zip 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 +EXTRACT_ONLY+= ${DISTFILES:N*.mod\:*:N*.mod:C/:.*//} DIST_SUBDIR= go/${PKGORIGIN:S,/,_,g}/${DISTNAME} FETCH_DEPENDS+= ${GO_CMD}:${GO_PORT} \ ca_root_nss>0:security/ca_root_nss @@ -166,7 +167,7 @@ post-fetch: @${ECHO_MSG} "===> Fetching ${GO_MODNAME} dependencies"; @(cd ${DISTDIR}/${DIST_SUBDIR}; \ [ -e go.mod ] || ${RLN} ${GO_MODFILE} go.mod; \ - ${SETENV} ${GO_ENV} GOPROXY=${GO_GOPROXY} ${GO_CMD} mod download -x) + ${SETENV} ${GO_ENV} GOPROXY=${GO_GOPROXY} ${GO_CMD} mod download -x all) . endif . if !target(post-extract) @@ -176,7 +177,10 @@ post-extract: @${LN} -sf ${WRKSRC} ${GO_WRKSRC} . elif ${go_ARGS:Mmodules} && defined(GO_MODULE) post-extract: - @(cd ${GO_WRKSRC}; ${SETENV} ${GO_ENV} GOPROXY=off ${GO_CMD} mod vendor -e) + @${ECHO_MSG} "===> Tidying ${GO_MODNAME} dependencies"; + @(cd ${GO_WRKSRC}; ${SETENV} ${GO_ENV} GOPROXY=${GO_MODCACHE} ${GO_CMD} mod tidy -e) + @${ECHO_MSG} "===> Vendoring ${GO_MODNAME} dependencies"; + @(cd ${GO_WRKSRC}; ${SETENV} ${GO_ENV} GOPROXY=${GO_MODCACHE} ${GO_CMD} mod vendor -e) . endif . endif