Bug 256581 - Mk/Uses/cargo.mk: CARGO_GIT_SUBDIR doesn't work with unpacked [dependencies.<crate>]
Summary: Mk/Uses/cargo.mk: CARGO_GIT_SUBDIR doesn't work with unpacked [dependencies.<...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: FreeBSD Rust Team
URL:
Keywords: needs-patch
Depends on: 259251
Blocks:
  Show dependency treegraph
 
Reported: 2021-06-13 16:03 UTC by Jan Beich
Modified: 2021-11-02 11:59 UTC (History)
1 user (show)

See Also:
tobik: merge-quarterly-


Attachments
cargo-git-update.diff (1.30 KB, patch)
2021-06-16 17:57 UTC, Tobias Kortkamp
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer freebsd_triage 2021-06-13 16:03:08 UTC
CARGO_GIT_SUBDIR expects each line to start with a crate name but fails to substitute local paths if a crate dependency spans multiple lines e.g.,

  [dependencies.wgt]
  package = "wgpu-types"
  git = "https://github.com/gfx-rs/wgpu"
  rev = "53eab747a32414232be45d47cae8a43a369395d0"

To reproduce:

1. Remove games/veloren/files/patch-wgpu
2. Build without network -> failed
3. Adjust CARGO_GIT_SUBDIR: s/wgc/wgpu-core/ + s/wgt/wgpu-types/
4. Build without network -> failed
Comment 1 Tobias Kortkamp freebsd_committer freebsd_triage 2021-06-16 17:57:49 UTC
Created attachment 225862 [details]
cargo-git-update.diff

Ok, to get away from the sed hackery we need to let cargo do the
replacement with [patch] sections. This can maybe work like this:

1. Patch cargo to add an option to not force fetch Git sources when
   using cargo update (we abuse cargo update to trivially bump crate
   versions to avoid patching Cargo.lock ourselves; would be a shame to
   loose it); hack for that attached (against rust-1.52.0 branch in cargo 
   upstream).
2. Put appropriate [patch] sections into ${WRKDIR}/.cargo/config so
   that cargo can do the replacement itself. That currently requires
   the -Zpatch-in-config unstable feature [1].

   For dns/dog (much less complicated for experimentation than
   games/veloren) the [patch] section would look like:

GH_TUPLE=       llogiq:mutagen:c7abc956a10e8a3e2cc71f21279ea0a42f7b7c10:mutagen
CARGO_GIT_SUBDIR= mutagen:mutagen:mutagen       
=>
[patch.'https://github.com/llogiq/mutagen']
mutagen = { path = "${WRKSRC_mutagen}/mutagen" }

[1] https://github.com/rust-lang/cargo/issues/9269
Comment 2 Tobias Kortkamp freebsd_committer freebsd_triage 2021-09-07 11:45:53 UTC
patch-in-config has been stabilized in Rust 1.56 (2021-10-21).

To get slightly more concrete it might look like this:

diff --git a/Mk/Uses/cargo.mk b/Mk/Uses/cargo.mk
index 3d065a45ed3b..46a2ffd40d93 100644
--- a/Mk/Uses/cargo.mk
+++ b/Mk/Uses/cargo.mk
@@ -107,8 +107,8 @@ STRIP_CMD=  ${LOCALBASE}/bin/strip # unsupported e_type with base strip

 # Helper to shorten cargo calls.
 CARGO_CARGO_RUN= \
-       cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${CARGO_ENV} \
-               ${CARGO_CARGO_BIN}
+       cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${CARGO_ENV} RUSTC_BOOTSTRAP=1 CARGO_FREEBSD_PORTS_SKIP_GIT_UPDATE=1 \
+               ${CARGO_CARGO_BIN} -Zpatch-in-config

 # User arguments for cargo targets.
 CARGO_BUILD_ARGS?=
@@ -296,6 +296,8 @@ cargo-configure:
        @${ECHO_CMD} "directory = '${CARGO_VENDOR_DIR}'" >> ${WRKDIR}/.cargo/config
        @${ECHO_CMD} "[source.crates-io]" >> ${WRKDIR}/.cargo/config
        @${ECHO_CMD} "replace-with = 'cargo'" >> ${WRKDIR}/.cargo/config
+       @${ECHO_CMD} "[patch.'https://github.com/llogiq/mutagen']" >> ${WRKDIR}/.cargo/config
+       @${ECHO_CMD} "mutagen = { path = '${WRKSRC_mutagen}/mutagen' }" >> ${WRKDIR}/.cargo/config
        @if ! ${GREP} -qF '[profile.release]' ${CARGO_CARGOTOML}; then \
                ${ECHO_CMD} "" >> ${CARGO_CARGOTOML}; \
                ${ECHO_CMD} "[profile.release]" >> ${CARGO_CARGOTOML}; \
diff --git a/dns/dog/Makefile b/dns/dog/Makefile
index e7b9aa7039de..2cb66d1895fa 100644
--- a/dns/dog/Makefile
+++ b/dns/dog/Makefile
@@ -90,8 +90,15 @@ CARGO_CRATES=        addr2line-0.14.0 \
                winapi-i686-pc-windows-gnu-0.4.0 \
                winapi-x86_64-pc-windows-gnu-0.4.0 \
                winreg-0.6.2
-CARGO_USE_GITHUB=      yes
-CARGO_GIT_SUBDIR=      mutagen:mutagen:mutagen
+# [[package]]
+# name = "mutagen"
+# source = "git+https://github.com/llogiq/mutagen#c7abc956a10e8a3e2cc71f21279ea0a42f7b7c10"
+#
+# make cargo-crates to turn entries like the above into
+#
+# CARGO_CRATES+=       git+https://github.com/llogiq/mutagen\#c7abc956a10e8a3e2cc71f21279ea0a42f7b7c10
+#
+# which cargo.mk can then consume to create the appropriate [patch] sections and GH_TUPLE.

 PORTDOCS=      README.md
Comment 3 Tobias Kortkamp freebsd_committer freebsd_triage 2021-09-08 19:32:26 UTC
(In reply to Tobias Kortkamp from comment #2)
Working code for that is here:
https://github.com/t6/freebsd-ports/compare/main...t6:tobik/cargo-git-patch-in-config
Comment 4 commit-hook freebsd_committer freebsd_triage 2021-09-19 09:16:21 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=6f1fefb50e755d727f471aeb75ebe4e28f876b4b

commit 6f1fefb50e755d727f471aeb75ebe4e28f876b4b
Author:     Tobias Kortkamp <tobik@FreeBSD.org>
AuthorDate: 2021-09-07 08:14:14 +0000
Commit:     Tobias Kortkamp <tobik@FreeBSD.org>
CommitDate: 2021-09-19 09:03:21 +0000

    lang/rust: Update to 1.55.0

    - Set codegen-units=1 [1]
    - Add hack to skip cargo update on git sources as a step towards solving [2]
    - Fix 'capacity overflow' panics on armv* [3]

    Changes:        https://blog.rust-lang.org/2021-09-09/Rust-1.55.0.html
    PR:             258337
    PR:             256099 [1]
    PR:             256581 [2]
    PR:             257419 [3]
    Reviewed by:    mikael, pkubaj
    Exp-run by:     antoine
    Differential Revision:  https://reviews.freebsd.org/D31872
    With hat:       rust

 Mk/Uses/cargo.mk                                   |   2 +-
 Mk/bsd.gecko.mk                                    |   2 +-
 lang/rust-bootstrap/Makefile                       |   8 +-
 lang/rust-bootstrap/distinfo                       |   6 +-
 lang/rust/Makefile                                 |  12 +--
 lang/rust/distinfo                                 | 114 ++++++++++-----------
 ...m-project_compiler-rt_lib_builtins_cpu__model.c |  21 ++--
 ...ols_cargo_src_cargo_sources_git_source.rs (new) |  45 ++++++++
 ...rc_tools_cargo_src_cargo_util_toml_mod.rs (new) |  22 ++++
 .../patch-vendor_openssl-sys_build_main.rs (gone)  |  19 ----
 ..._src_unix_bsd_freebsdlike_freebsd_mod.rs (gone) |  12 ---
 ..._unix_bsd_freebsdlike_freebsd_powerpc.rs (gone) |  50 ---------
 .../powerpc64-elfv1/patch-src_bootstrap_native.rs  |  10 +-
 ...h-compiler_rustc__target_src_spec_mod.rs (gone) |  10 --
 ...rc_spec_powerpc64le__unknown__freebsd.rs (gone) |  19 ----
 15 files changed, 154 insertions(+), 198 deletions(-)
Comment 5 commit-hook freebsd_committer freebsd_triage 2021-10-25 08:58:41 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=83810086906d648ffc380fd351dd43481f946666

commit 83810086906d648ffc380fd351dd43481f946666
Author:     Tobias Kortkamp <tobik@FreeBSD.org>
AuthorDate: 2021-10-18 20:35:01 +0000
Commit:     Tobias Kortkamp <tobik@FreeBSD.org>
CommitDate: 2021-10-25 08:49:18 +0000

    devel/cargo-c: Backport patch-in-config stabilization in Rust 1.56.0

    Unbreaks multimedia/gstreamer1-plugins-rust

    PR:             256581

 devel/cargo-c/Makefile                      |  1 +
 devel/cargo-c/files/patch-rust-1.56.0 (new) | 51 +++++++++++++++++++++++++++++
 2 files changed, 52 insertions(+)
Comment 6 commit-hook freebsd_committer freebsd_triage 2021-10-25 08:58:42 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=516d86ef5d2dac80d0fe8090c80e44af2eb90ed2

commit 516d86ef5d2dac80d0fe8090c80e44af2eb90ed2
Author:     Tobias Kortkamp <tobik@FreeBSD.org>
AuthorDate: 2021-10-07 14:47:41 +0000
Commit:     Tobias Kortkamp <tobik@FreeBSD.org>
CommitDate: 2021-10-25 08:49:15 +0000

    sysutils/vector: Chase USES=cargo's new git source support

    PR:             256581

 sysutils/vector/Makefile | 39 ++++++++++++++++-----------------------
 1 file changed, 16 insertions(+), 23 deletions(-)
Comment 7 commit-hook freebsd_committer freebsd_triage 2021-10-25 08:58:43 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=eb16c4a5d7fd15c5cbdf5b8729368869c4967273

commit eb16c4a5d7fd15c5cbdf5b8729368869c4967273
Author:     Tobias Kortkamp <tobik@FreeBSD.org>
AuthorDate: 2021-10-07 14:47:29 +0000
Commit:     Tobias Kortkamp <tobik@FreeBSD.org>
CommitDate: 2021-10-25 08:49:12 +0000

    net-im/zkgroup: Chase USES=cargo's new git source support

    PR:             256581

 net-im/zkgroup/Makefile | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
Comment 8 commit-hook freebsd_committer freebsd_triage 2021-10-25 08:58:44 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=bee1e3224e35d339ad8c62a7f00a4d41c6b3bd3f

commit bee1e3224e35d339ad8c62a7f00a4d41c6b3bd3f
Author:     Tobias Kortkamp <tobik@FreeBSD.org>
AuthorDate: 2021-10-07 14:47:39 +0000
Commit:     Tobias Kortkamp <tobik@FreeBSD.org>
CommitDate: 2021-10-25 08:49:14 +0000

    security/vaultwarden: Chase USES=cargo's new git source support

    PR:             256581

 security/vaultwarden/Makefile | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)
Comment 9 commit-hook freebsd_committer freebsd_triage 2021-10-25 08:58:45 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=e834d64e92ab3094cb6068cca85426c5928d3129

commit e834d64e92ab3094cb6068cca85426c5928d3129
Author:     Tobias Kortkamp <tobik@FreeBSD.org>
AuthorDate: 2021-10-07 14:47:31 +0000
Commit:     Tobias Kortkamp <tobik@FreeBSD.org>
CommitDate: 2021-10-25 08:49:13 +0000

    net-mgmt/bandwhich: Chase USES=cargo's new git source support

    PR:             256581

 net-mgmt/bandwhich/Makefile | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
Comment 10 commit-hook freebsd_committer freebsd_triage 2021-10-25 08:58:46 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c278b23997b2d8377a4bd18db41b7d43ef1d24bd

commit c278b23997b2d8377a4bd18db41b7d43ef1d24bd
Author:     Tobias Kortkamp <tobik@FreeBSD.org>
AuthorDate: 2021-10-07 14:47:28 +0000
Commit:     Tobias Kortkamp <tobik@FreeBSD.org>
CommitDate: 2021-10-25 08:49:12 +0000

    net-im/libsignal-client: Chase USES=cargo's new git source support

    PR:             256581

 net-im/libsignal-client/Makefile | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
Comment 11 commit-hook freebsd_committer freebsd_triage 2021-10-25 08:58:47 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=ac5105fe655cd924830d2bf39751d13ed046273e

commit ac5105fe655cd924830d2bf39751d13ed046273e
Author:     Tobias Kortkamp <tobik@FreeBSD.org>
AuthorDate: 2021-10-07 14:47:46 +0000
Commit:     Tobias Kortkamp <tobik@FreeBSD.org>
CommitDate: 2021-10-25 08:49:17 +0000

    x11/wezterm: Chase USES=cargo's new git source support

    PR:             256581

 x11/wezterm/Makefile | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
Comment 12 commit-hook freebsd_committer freebsd_triage 2021-10-25 08:58:48 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=82d85623ca94ecfd7988ac70ded2c7212347ab40

commit 82d85623ca94ecfd7988ac70ded2c7212347ab40
Author:     Tobias Kortkamp <tobik@FreeBSD.org>
AuthorDate: 2021-10-07 14:47:44 +0000
Commit:     Tobias Kortkamp <tobik@FreeBSD.org>
CommitDate: 2021-10-25 08:49:16 +0000

    x11/alacritty: Drop unused CARGO_USE_GITHUB

    PR:             256581

 x11/alacritty/Makefile | 1 -
 1 file changed, 1 deletion(-)
Comment 13 commit-hook freebsd_committer freebsd_triage 2021-10-25 08:58:49 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=8259bf7a5dec4da1d24a8f3e986b6e7913cfa611

commit 8259bf7a5dec4da1d24a8f3e986b6e7913cfa611
Author:     Tobias Kortkamp <tobik@FreeBSD.org>
AuthorDate: 2021-10-07 14:47:36 +0000
Commit:     Tobias Kortkamp <tobik@FreeBSD.org>
CommitDate: 2021-10-25 08:49:14 +0000

    security/authenticator: Chase USES=cargo's new git source support

    PR:             256581

 security/authenticator/Makefile               |  39 +---
 security/authenticator/files/patch-gtk (gone) | 283 --------------------------
 2 files changed, 6 insertions(+), 316 deletions(-)
Comment 14 commit-hook freebsd_committer freebsd_triage 2021-10-25 08:58:50 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=0d199f719ee63e01e036c8cb27d77f73506f411c

commit 0d199f719ee63e01e036c8cb27d77f73506f411c
Author:     Tobias Kortkamp <tobik@FreeBSD.org>
AuthorDate: 2021-10-07 14:47:40 +0000
Commit:     Tobias Kortkamp <tobik@FreeBSD.org>
CommitDate: 2021-10-25 08:49:15 +0000

    shells/ion: Chase USES=cargo's new git source support

    PR:             256581

 shells/ion/Makefile | 19 ++++++++-----------
 1 file changed, 8 insertions(+), 11 deletions(-)
Comment 15 commit-hook freebsd_committer freebsd_triage 2021-10-25 08:58:51 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=0a57b6c3d546e1a1962c75a9b665f77523101eaf

commit 0a57b6c3d546e1a1962c75a9b665f77523101eaf
Author:     Tobias Kortkamp <tobik@FreeBSD.org>
AuthorDate: 2021-10-07 14:47:47 +0000
Commit:     Tobias Kortkamp <tobik@FreeBSD.org>
CommitDate: 2021-10-25 08:49:17 +0000

    x11/wmfocus: Chase USES=cargo's new git source support

    PR:             256581

 x11/wmfocus/Makefile | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
Comment 16 commit-hook freebsd_committer freebsd_triage 2021-10-25 08:58:52 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=8d16cc382b02d56b1e818345bb7f49c0738d2a5e

commit 8d16cc382b02d56b1e818345bb7f49c0738d2a5e
Author:     Tobias Kortkamp <tobik@FreeBSD.org>
AuthorDate: 2021-10-07 14:47:33 +0000
Commit:     Tobias Kortkamp <tobik@FreeBSD.org>
CommitDate: 2021-10-25 08:49:13 +0000

    net-p2p/openethereum: Chase USES=cargo's new git source support

    PR:             256581

 net-p2p/openethereum/Makefile        |  2 --
 net-p2p/openethereum/Makefile.crates | 15 +++++++--------
 2 files changed, 7 insertions(+), 10 deletions(-)
Comment 17 commit-hook freebsd_committer freebsd_triage 2021-10-25 08:58:53 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=bbf47d7c7859723a8a4464db47818b1815fc0d13

commit bbf47d7c7859723a8a4464db47818b1815fc0d13
Author:     Tobias Kortkamp <tobik@FreeBSD.org>
AuthorDate: 2021-10-07 14:47:43 +0000
Commit:     Tobias Kortkamp <tobik@FreeBSD.org>
CommitDate: 2021-10-25 08:49:16 +0000

    www/miniserve: Chase USES=cargo's new git source support

    PR:             256581

 www/miniserve/Makefile | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
Comment 18 commit-hook freebsd_committer freebsd_triage 2021-10-25 08:58:54 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=43be3e5fe9d1e4b1d9bce3fb99066ed43b65e261

commit 43be3e5fe9d1e4b1d9bce3fb99066ed43b65e261
Author:     Tobias Kortkamp <tobik@FreeBSD.org>
AuthorDate: 2021-10-07 14:47:35 +0000
Commit:     Tobias Kortkamp <tobik@FreeBSD.org>
CommitDate: 2021-10-25 08:49:14 +0000

    net/findomain: Chase USES=cargo's new git source support

    PR:             256581

 net/findomain/Makefile | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
Comment 19 commit-hook freebsd_committer freebsd_triage 2021-10-25 08:58:54 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=058754f4879c577c5322bc43aba66b109e580267

commit 058754f4879c577c5322bc43aba66b109e580267
Author:     Tobias Kortkamp <tobik@FreeBSD.org>
AuthorDate: 2021-10-07 14:47:42 +0000
Commit:     Tobias Kortkamp <tobik@FreeBSD.org>
CommitDate: 2021-10-25 08:49:16 +0000

    www/lychee: Chase USES=cargo's new git source support

    PR:             256581

 www/lychee/Makefile | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
Comment 20 commit-hook freebsd_committer freebsd_triage 2021-10-25 08:58:55 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=f5a860a89662f0f18da2d67d09a305e7a6bdece1

commit f5a860a89662f0f18da2d67d09a305e7a6bdece1
Author:     Tobias Kortkamp <tobik@FreeBSD.org>
AuthorDate: 2021-10-07 14:47:27 +0000
Commit:     Tobias Kortkamp <tobik@FreeBSD.org>
CommitDate: 2021-10-25 08:49:12 +0000

    net-im/conduit: Chase USES=cargo's new git source support

    PR:             256581

 net-im/conduit/Makefile | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
Comment 21 commit-hook freebsd_committer freebsd_triage 2021-10-25 08:58:56 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c9d85f0d9ca12976d76cad14dcbf24e3acba1ec0

commit c9d85f0d9ca12976d76cad14dcbf24e3acba1ec0
Author:     Tobias Kortkamp <tobik@FreeBSD.org>
AuthorDate: 2021-10-07 14:47:25 +0000
Commit:     Tobias Kortkamp <tobik@FreeBSD.org>
CommitDate: 2021-10-25 08:49:11 +0000

    multimedia/gstreamer1-plugins-rust: Chase USES=cargo's new git source support

    PR:             256581

 multimedia/gstreamer1-plugins-rust/Makefile | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
Comment 22 commit-hook freebsd_committer freebsd_triage 2021-10-25 08:58:57 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=714c353f67e7526c1ab04567348110de31df5b40

commit 714c353f67e7526c1ab04567348110de31df5b40
Author:     Tobias Kortkamp <tobik@FreeBSD.org>
AuthorDate: 2021-10-07 14:47:23 +0000
Commit:     Tobias Kortkamp <tobik@FreeBSD.org>
CommitDate: 2021-10-25 08:49:11 +0000

    misc/xd-rust: Chase USES=cargo's new git source support

    PR:             256581

 misc/xd-rust/Makefile | 3 ---
 misc/xd-rust/distinfo | 2 --
 2 files changed, 5 deletions(-)
Comment 23 commit-hook freebsd_committer freebsd_triage 2021-10-25 08:58:58 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=cc9d1909f082b631efcc272f8d9c94b938fc0973

commit cc9d1909f082b631efcc272f8d9c94b938fc0973
Author:     Tobias Kortkamp <tobik@FreeBSD.org>
AuthorDate: 2021-10-07 14:47:19 +0000
Commit:     Tobias Kortkamp <tobik@FreeBSD.org>
CommitDate: 2021-10-25 08:49:10 +0000

    games/veloren: Chase USES=cargo's new git source support

    PR:             256581

 games/veloren/Makefile | 52 +++++++++++++++++---------------------------------
 1 file changed, 18 insertions(+), 34 deletions(-)
Comment 24 commit-hook freebsd_committer freebsd_triage 2021-10-25 08:58:58 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=551949aec246598fcd730e299245295af56e28a9

commit 551949aec246598fcd730e299245295af56e28a9
Author:     Tobias Kortkamp <tobik@FreeBSD.org>
AuthorDate: 2021-10-07 14:47:18 +0000
Commit:     Tobias Kortkamp <tobik@FreeBSD.org>
CommitDate: 2021-10-25 08:49:10 +0000

    games/anki: Chase USES=cargo's new git source support

    PR:             256581

 games/anki/Makefile | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)
Comment 25 commit-hook freebsd_committer freebsd_triage 2021-10-25 08:58:59 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=15d43d187799cc8c11bca0d209111f91599064ed

commit 15d43d187799cc8c11bca0d209111f91599064ed
Author:     Tobias Kortkamp <tobik@FreeBSD.org>
AuthorDate: 2021-10-07 14:47:11 +0000
Commit:     Tobias Kortkamp <tobik@FreeBSD.org>
CommitDate: 2021-10-25 08:49:08 +0000

    databases/redisjson: Chase USES=cargo's new git source support

    Fix USE_GITHUB usage while here.

    PR:             256581

 databases/redisjson/Makefile | 16 ++++++----------
 databases/redisjson/distinfo |  4 ++--
 2 files changed, 8 insertions(+), 12 deletions(-)
Comment 26 commit-hook freebsd_committer freebsd_triage 2021-10-25 08:59:00 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=88d555cd751d684e56da89916311189628d32075

commit 88d555cd751d684e56da89916311189628d32075
Author:     Tobias Kortkamp <tobik@FreeBSD.org>
AuthorDate: 2021-10-07 14:47:08 +0000
Commit:     Tobias Kortkamp <tobik@FreeBSD.org>
CommitDate: 2021-10-25 08:49:07 +0000

    audio/shortwave: Chase USES=cargo's new git source support

    PR:             256581

 audio/shortwave/Makefile               |  35 +----
 audio/shortwave/files/patch-gtk (gone) | 241 ---------------------------------
 2 files changed, 5 insertions(+), 271 deletions(-)
Comment 27 commit-hook freebsd_committer freebsd_triage 2021-10-25 08:59:01 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=d91e0eb16e5c849453997178aea2ac7a59824ae9

commit d91e0eb16e5c849453997178aea2ac7a59824ae9
Author:     Tobias Kortkamp <tobik@FreeBSD.org>
AuthorDate: 2021-10-07 14:47:16 +0000
Commit:     Tobias Kortkamp <tobik@FreeBSD.org>
CommitDate: 2021-10-25 08:49:09 +0000

    dns/dog: Chase USES=cargo's new git source support

    PR:             256581

 dns/dog/Makefile | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
Comment 28 commit-hook freebsd_committer freebsd_triage 2021-10-25 08:59:02 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=545ee2932db14475d9678caf861e3052a780816d

commit 545ee2932db14475d9678caf861e3052a780816d
Author:     Tobias Kortkamp <tobik@FreeBSD.org>
AuthorDate: 2021-10-07 14:47:06 +0000
Commit:     Tobias Kortkamp <tobik@FreeBSD.org>
CommitDate: 2021-10-25 08:49:06 +0000

    accessibility/sctd: Chase USES=cargo's new git source support

    PR:             256581

 accessibility/sctd/Makefile | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
Comment 29 commit-hook freebsd_committer freebsd_triage 2021-10-25 08:59:03 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=2bad8d171afe848ac88585270964342a55d504ce

commit 2bad8d171afe848ac88585270964342a55d504ce
Author:     Tobias Kortkamp <tobik@FreeBSD.org>
AuthorDate: 2021-09-07 14:08:46 +0000
Commit:     Tobias Kortkamp <tobik@FreeBSD.org>
CommitDate: 2021-10-25 08:49:06 +0000

    Uses/cargo: Rework git source support based on patch-in-config sections

    Git sources from `Cargo.lock` are added to `CARGO_CRATES` through
    the normal mechanism of `make cargo-crates` by the porter.  They
    are used to populate `MASTER_SITES`, `DISTFILES` with static
    git-archive(1) tarballs a la `USE_GITHUB`, `USE_GITLAB`.  In the
    configure phase we generate `[patch]` sections in the config file
    which will cause `cargo update` to auto-update `Cargo.lock` to point
    to the appropriate extraction directories.

    Normally `cargo update` would connect to the network to update all
    Git sources but since rust-1.55.0 our cargo has been patched to
    skip this when `CARGO_FREEBSD_PORTS_SKIP_GIT_UPDATE` is set in the
    environment.

    This replaces the old `CARGO_USE_GITHUB`, `CARGO_USE_GITLAB` hacks
    where this was done by editing all `Cargo.toml` with sed(1) calls.

    Additionally, we try to automatically infer the individiual crate
    sub-directories inside the Git sources based on `package.name` in
    `Cargo.toml` to remove the need for `CARGO_GIT_SUBDIR`.

    USES=cargo also now sets `WRKSRC_crate_$name` for each crate to
    point to the crate extraction directories.

    PR:             256581
    Reviewed by:    jbeich

 Mk/Scripts/cargo-crates-git-common.awk (new)    | 105 ++++++++++++++++++
 Mk/Scripts/cargo-crates-git-configure.awk (new) | 137 ++++++++++++++++++++++++
 Mk/Scripts/cargo-crates-git-fetch.awk (new)     |  20 ++++
 Mk/Scripts/cargo-crates.awk                     |  80 ++------------
 Mk/Uses/cargo.mk                                | 116 ++++++++++----------
 5 files changed, 330 insertions(+), 128 deletions(-)
Comment 30 commit-hook freebsd_committer freebsd_triage 2021-10-25 08:59:04 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=e2500e896b61807ae2c4785baf1f3e3bb9b6424e

commit e2500e896b61807ae2c4785baf1f3e3bb9b6424e
Author:     Tobias Kortkamp <tobik@FreeBSD.org>
AuthorDate: 2021-10-07 14:47:13 +0000
Commit:     Tobias Kortkamp <tobik@FreeBSD.org>
CommitDate: 2021-10-25 08:49:09 +0000

    deskutils/solanum: Chase USES=cargo's new git source support

    PR:             256581

 deskutils/solanum/Makefile               |  33 +---
 deskutils/solanum/files/patch-gtk (gone) | 310 -------------------------------
 2 files changed, 5 insertions(+), 338 deletions(-)
Comment 31 commit-hook freebsd_committer freebsd_triage 2021-10-25 08:59:05 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=97f276841f95f54a6efa0c5bd4c2e9398ed855c3

commit 97f276841f95f54a6efa0c5bd4c2e9398ed855c3
Author:     Tobias Kortkamp <tobik@FreeBSD.org>
AuthorDate: 2021-09-10 06:59:19 +0000
Commit:     Tobias Kortkamp <tobik@FreeBSD.org>
CommitDate: 2021-10-25 08:49:06 +0000

    Mk/bsd.sanity.mk: Mark CARGO_USE_GIT* and CARGO_GIT_SUBDIR as unsupported

    PR:             256581

 Mk/bsd.sanity.mk | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
Comment 32 commit-hook freebsd_committer freebsd_triage 2021-10-25 08:59:07 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=a160015b86be2ef7188bd435a4ec924dfe9fe624

commit a160015b86be2ef7188bd435a4ec924dfe9fe624
Author:     Tobias Kortkamp <tobik@FreeBSD.org>
AuthorDate: 2021-10-07 14:47:07 +0000
Commit:     Tobias Kortkamp <tobik@FreeBSD.org>
CommitDate: 2021-10-25 08:49:07 +0000

    audio/gnome-podcasts: Chase USES=cargo's new git source support

    PR:             256581

 audio/gnome-podcasts/Makefile | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
Comment 33 commit-hook freebsd_committer freebsd_triage 2021-10-25 08:59:08 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=333c19d3bde66eec75020cbaa44a01b2b5415b18

commit 333c19d3bde66eec75020cbaa44a01b2b5415b18
Author:     Tobias Kortkamp <tobik@FreeBSD.org>
AuthorDate: 2021-10-07 14:47:17 +0000
Commit:     Tobias Kortkamp <tobik@FreeBSD.org>
CommitDate: 2021-10-25 08:49:09 +0000

    games/abstreet: Chase USES=cargo's new git source support

    PR:             256581

 games/abstreet/Makefile | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
Comment 34 commit-hook freebsd_committer freebsd_triage 2021-10-25 08:59:09 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=a9638fee3dd5ba09920d5a6c7f6065bccfb88f6b

commit a9638fee3dd5ba09920d5a6c7f6065bccfb88f6b
Author:     Tobias Kortkamp <tobik@FreeBSD.org>
AuthorDate: 2021-10-07 14:47:22 +0000
Commit:     Tobias Kortkamp <tobik@FreeBSD.org>
CommitDate: 2021-10-25 08:49:10 +0000

    math/kalker: Chase USES=cargo's new git source support

    PR:             256581

 math/kalker/Makefile | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)
Comment 35 Tobias Kortkamp freebsd_committer freebsd_triage 2021-10-25 09:04:28 UTC
NACK on merge-quarterly (from my side anyway). Keeping this open in case someone
else thinks it's worth their time to merge it. Otherwise we can close.