Page MenuHomeFreeBSD

lang/rust: Update to 1.56.0

Authored by tobik on Oct 18 2021, 6:01 PM.
Referenced Files
F72328518: D32553.id97177.diff
Tue, Dec 5, 8:11 PM
Unknown Object (File)
Thu, Nov 30, 12:43 AM
Unknown Object (File)
Tue, Nov 28, 5:51 AM
Unknown Object (File)
Thu, Nov 23, 11:49 AM
Unknown Object (File)
Wed, Nov 22, 3:42 AM
Unknown Object (File)
Fri, Nov 10, 2:27 PM
Unknown Object (File)
Nov 4 2023, 12:10 AM
Unknown Object (File)
Nov 4 2023, 12:10 AM



Scheduled to be released on 2021-10-21.

Including changes to USES=cargo for

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

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 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.

Test Plan

poudriere 13.0 amd64 ok
ref13-aarch64 ok
ref13-i386 ok
ref13-ppc64 ok
ref12-amd64 ok
13.0 powerpc ok
13.0 powerpc64le ok
12.2 aarch64 ok
12.2 armv7 ok
12.2 armv6 fails to build, the problem with DOCS is back (armv7 is not affected)

Diff Detail

R11 FreeBSD ports repository
Lint Not Applicable
Tests Not Applicable

Event Timeline

tobik held this revision as a draft.
tobik edited the test plan for this revision. (Show Details)
  • Make sure to always set CARGO_FREEBSD_PORTS_SKIP_GIT_UPDATE
tobik published this revision for review.Oct 18 2021, 7:34 PM
tobik edited the test plan for this revision. (Show Details)

@jbeich Can you help unbreak games/veloren?

It fails with

error[E0557]: feature has been removed
   --> /wrkdirs/usr/ports/games/veloren/work/veloren-e4716147a7356eb13088e7d74ace3ccdcb5cd900/cargo-crates/packed_simd_2-0.3.5/src/
215 |     const_generics,
    |     ^^^^^^^^^^^^^^ feature has been removed
    = note: removed in favor of `#![feature(adt_const_params]` and `#![feature(generic_const_exprs)]`

Also see



tobik marked an inline comment as done.
  • Mk/ Bump to LLVM13 for LTO
  • multimedia/gstreamer1-plugins-rust: Drop ?tag= from tokio crate url to avoid changing distinfo
  • devel/cargo-c: Backport patch-in-config stabilization to unbreak gstreamer1-plugins-rust
  • textproc/ripgrep: Unbreak with Rust 1.56.0

@jbeich Can you help unbreak games/veloren?

Attached the complete fix (put under files/ without splitting). Builds fine at least on 12.2/14.0 amd64. Also works fine.

1 ↗(On Diff #97084)

Please, combine all related patches into one based on topic (e.g., files/patch-rust-1.56) and reference what it's based on aka the origin (e.g., ). Makes it easier to prune in future simply by looking whether the upstream change is part of the tag the port is being updated to.

tobik marked an inline comment as done.
  • games/veloren: Unbreak with Rust 1.56.0
  • www/firefox: Unbreak build with Rust 1.56.0
  • lang/rust: Exclude DOCS on armv6
  • www/firefox-esr: Unbreak build with Rust 1.56.0

Changes to my ports look OK. Mostly reviewed a month ago (via WIP on GitHub).

9 ↗(On Diff #97206)
  • Rebase for databases/redisjson
  • Rebase for net-im/libsignal-client again...
pkubaj edited the test plan for this revision. (Show Details)
This revision was not accepted when it landed; it landed in state Needs Review.Oct 25 2021, 8:57 AM
This revision was automatically updated to reflect the committed changes.