From nobody Sat Oct 08 12:23:48 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 4Ml4904Whkz4fGsS; Sat, 8 Oct 2022 12:23:48 +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 4Ml490433Tz3YGn; Sat, 8 Oct 2022 12:23:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665231828; 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=W6kfY17ACPhTAQq82IgFEk2tip7ZYiDNanFn7635W1o=; b=k6kM9WdBAQd4wLpb2yg43NXnH8zo7xOTAl6B7BNrpH7IxNylWGG1hcF6eWMqi0Xn6yk4LG cCKUKWrpT/Q8wyUvxq/QmwSPNumC2k8y5hzClJuDoZkzfwzvVzuLuGosiRWUnlheObbA/R cJ7ofUhgncvN6ra8BU9Xmr32MtaJcWv10z5L+LuIKXWjy2v02QB82PPkirfBs9EEmGWczk sxA+JLQr1gHToZUf3+OcRkCRRpAuoe5aoJz6hDsJs/I3tviQaYxi3kE3eTKh1A7IrBr8AA q/NnI9EETfEJ6NJXC7zuQh11W0jy6dCZ3MR/MVA2k7MwA7FqjkW0kcAuix1z6A== 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 4Ml490378Fzwmr; Sat, 8 Oct 2022 12:23:48 +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 298CNmVA013431; Sat, 8 Oct 2022 12:23:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 298CNmGQ013430; Sat, 8 Oct 2022 12:23:48 GMT (envelope-from git) Date: Sat, 8 Oct 2022 12:23:48 GMT Message-Id: <202210081223.298CNmGQ013430@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Tobias Kortkamp Subject: git: 18052912af5d - main - Uses/cargo: Fix invalid WRKSRC for crates fetched from GitLab with tag 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: tobik X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 18052912af5ddbea5d2008e750c568dda0d97b43 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665231828; 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=W6kfY17ACPhTAQq82IgFEk2tip7ZYiDNanFn7635W1o=; b=nbQW75lICEvtFvejppsUOvkxkTnkZlpvOFGhn4tC9hCwQBF2dYxHKj4yE91QzRCyL2+x6e gQTrABO0ItbfLzeORJPuF2m2fTgYpxwDF0JdaTZdpAsCBSZ2ucKPM5zOtrh2WtUs20hgr2 Ta27Xzf+IpQQhDvf2jfMN9LW/94vkV8VJEX0vT85C1PFbYZVfXQ8N5PIzPk0Djs4zJ7f5o 2ySkrWB63BJIWoEj8ogP11LsrTEwcJpm7jbirCroHtYx7YkCsDospnFKYdkMYlpFcHxf+U 7Y9grBvCcFgOp+qubgL2t17s4vaKTd7oqoKiMCs3Q95exVlMsOjmaJrY7cO9aQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1665231828; a=rsa-sha256; cv=none; b=jHi2SQeRIQmFL3uF9fcWsyZNAZK80SJTEQvs6ozXjnY6QIwrampIMI1x8bKu4j86wdP7wU 17bcVsk4K4H8fBGOmxIsQNXx+K3WocKpFByejR5NU4MiFkApzj62MsewxXjg12bkpnUaYO ZoL3sSmvvCyGpGjMdNjBxkxL54oJZr7WkU4AYvltA+/O+BESh5VV4T/7OGAlcSf+F4Zjaz vDRPlqoostihu6pBS2ngcIuK0G7SYf7uwhQoB2t+EYuuQWVD4QI7Mel1R/hXxCQdem2e+1 TdKMBau1uinFZhuiuXf7ixEO1jYQXxkNaEzzyc7ks/8FXgeAAYFHuFChRmCn6g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by tobik: URL: https://cgit.FreeBSD.org/ports/commit/?id=18052912af5ddbea5d2008e750c568dda0d97b43 commit 18052912af5ddbea5d2008e750c568dda0d97b43 Author: Tobias Kortkamp AuthorDate: 2022-10-08 12:21:19 +0000 Commit: Tobias Kortkamp CommitDate: 2022-10-08 12:21:19 +0000 Uses/cargo: Fix invalid WRKSRC for crates fetched from GitLab with tag When using tags the archive fetched from GitLab has the corresponding commit hash appended to the directory root too. snui@git+https://gitlab.com/snakedye/snui.git?tag=v0.1.4\#83873f1e148a9c84471c10f166c9a945a44d3e64 would result in WRKSRC_crate_snui= ${WRKDIR}/snui-v0.1.4 but it must be WRKSRC_crate_snui= ${WRKDIR}/snui-v0.1.4-83873f1e148a9c84471c10f166c9a945a44d3e64 PR: 266724 Reported by: jbeich --- Mk/Scripts/cargo-crates-git-common.awk | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Mk/Scripts/cargo-crates-git-common.awk b/Mk/Scripts/cargo-crates-git-common.awk index c1c5dcc7ce6e..f4023bb4f880 100644 --- a/Mk/Scripts/cargo-crates-git-common.awk +++ b/Mk/Scripts/cargo-crates-git-common.awk @@ -38,7 +38,7 @@ function commit_from_git_url(url) { } } -function split_git_url(info, git_url, url, path, account, project, commit, i, dir_ver, host) { +function split_git_url(info, git_url, url, path, account, project, commit, i, dir_ver, host, tag, fragment) { delete info split_url(url, git_url) url["scheme"] = tolower(url["scheme"]) @@ -80,6 +80,8 @@ function split_git_url(info, git_url, url, path, account, project, commit, i, d project = path[i] sub(/\.[gG][iI][tT]$/, "", project) commit = commit_from_git_url(url) + fragment = url["fragment"] + tag = url["query", "tag"] host = url["host"] delete url @@ -93,7 +95,12 @@ function split_git_url(info, git_url, url, path, account, project, commit, i, d gsub(/\//, "-", account) info["filename"] = sprintf("%s-%s-%s_GL0.tar.gz", account, project, commit) - info["dir"] = sprintf("%s-%s", project, commit) + # c.f. https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=266724 + if (tag) { + info["dir"] = sprintf("%s-%s-%s", project, tag, fragment) + } else { + info["dir"] = sprintf("%s-%s", project, commit) + } return 1 }