Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Oct 2021 08:59:03 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 256581] Mk/Uses/cargo.mk: CARGO_GIT_SUBDIR doesn't work with unpacked [dependencies.<crate>]
Message-ID:  <bug-256581-7788-3Vi00k84K9@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-256581-7788@https.bugs.freebsd.org/bugzilla/>
References:  <bug-256581-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D256581

--- Comment #29 from commit-hook@FreeBSD.org ---
A commit in branch main references this bug:

URL:
https://cgit.FreeBSD.org/ports/commit/?id=3D2bad8d171afe848ac88585270964342=
a55d504ce

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=3Dcargo 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(-)

--=20
You are receiving this mail because:
You are on the CC list for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-256581-7788-3Vi00k84K9>