non port: Mk/Scripts/cargo-crates.awk |
Number of commits found: 11 |
Monday, 25 Oct 2021
|
08:49 Tobias Kortkamp (tobik)
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
2bad8d1 |
Wednesday, 8 Sep 2021
|
19:05 Tobias Kortkamp (tobik)
Scripts/split-url.awk: Pass result array as parameter
628c619 |
Tuesday, 7 Sep 2021
|
16:53 Tobias Kortkamp (tobik)
Scripts/cargo-crates.awk: Move split_url() to separate file
Also stop leaking local variables
d8fbaa5 |
Tuesday, 6 Apr 2021
|
14:27 Mathieu Arnold (mat)
framework: Remove $FreeBSD$
Where appropriate fiddle with a few other things.
5d33e04 |
Thursday, 5 Dec 2019
|
06:42 tobik
Mk/Uses/cargo.mk: Support new Cargo.lock format
The new format [1,2] dropped the [metadata] table. As a consequence
our cargo-crates.awk script no longer outputs CARGO_CRATES. We can
get the crate list from the various [[package]] tables instead.
This should work with the new as well as the old format.
[1] https://github.com/rust-lang/cargo/pull/7070
[2] https://github.com/rust-lang/cargo/pull/7579
PR: 242416
Reported by: jbeich
|
Wednesday, 7 Aug 2019
|
10:37 tobik
Mk/Uses/cargo.mk: cargo-crates to flag unknown git hosts
To avoid some head scratching print a warning instead of being
silent when encountering unhandled git hosts.
|
Tuesday, 6 Aug 2019
|
08:12 tobik
Mk/Uses/cargo.mk: Add support for CARGO_USE_GITLAB/GL_TUPLE to cargo-crates
|
06:44 tobik
Assign cargo-crates.awk to rust@ too same as USES=cargo
|
06:43 tobik
Mk/Uses/cargo.mk: Fix cargo-crates to not output identical GH_TUPLE entries
For example, in audio/spotifyd some crates have their sources on
GitHub instead of crates.io and share the same repository and commit
in Cargo.lock like
[[package]]
name = "librespot"
source =
"git+https://github.com/librespot-org/librespot.git#4e3576ba7c6146cf68e1953daeec929d619b26b1"
[[package]]
name = "librespot-audio"
source =
"git+https://github.com/librespot-org/librespot.git#4e3576ba7c6146cf68e1953daeec929d619b26b1"
Based on this cargo-crates.awk would naively generate multiple
identical entries like
librespot-org:librespot:4e3576ba7c6146cf68e1953daeec929d619b26b1:librespot
librespot-org:librespot:4e3576ba7c6146cf68e1953daeec929d619b26b1:librespotaudio
This adds a lot of extra noise to the port and distinfo and is not
really needed for anything.
|
Wednesday, 19 Jul 2017
|
14:00 tobik
When specifying Git dependencies in Cargo.toml developers can set 3
additional keys: rev, branch, tag [1]. These are reflected in a
projects' Cargo.lock file as e.g.
git+https://github.com/servo/angle?branch=servo#a1371e8a160128677af863d1d73f150862ba42b2
git+https://github.com/rust-lang/libc?tag=0.2.26#288942e6858a4b2f8ee56338da5386263b9c4b82
Currently cargo-crates.awk generates the wrong output in these cases:
GH_TUPLE= servo:angle?branch=servo:a1371e8a160128677af863d1d73f150862ba42b2:angle
\
rust-lang:libc?tag=0.2.26:288942e6858a4b2f8ee56338da5386263b9c4b82:libc
Fix cargo-crates.awk to ignore the query string (except in the tag
case) and generate
GH_TUPLE= servo:angle:a1371e8a160128677af863d1d73f150862ba42b2:angle \
rust-lang:libc:0.2.26:libc
instead.
[1]
https://github.com/rust-lang/cargo/blob/master/src/doc/specifying-dependencies.md#specifying-dependencies-from-git-repositories
PR: 220548
Reported by: jbeich
Reviewed by: jbeich, mat
Differential Revision: https://reviews.freebsd.org/D11571
|
Wednesday, 21 Jun 2017
|
16:22 tobik
Add USES=cargo to make creating ports of Rust applications easier
Approved by: mat (mentor)
Reviewed by: dumbbell, mat
Differential Revision: https://reviews.freebsd.org/D11162
|
Number of commits found: 11 |