libc: apply the Cat 2 version convention to the vendored fork

version = "0.2.189" -> "0.2.189+rb0.3.2", per local/AGENTS.md
"Version conventions": every Cat 2 fork is <upstream>+rb<branch>. The
label is what makes the fork traceable to both its upstream base and the
Red Bear branch it was built for.

+rb is build metadata, which semver ignores when matching, so ^0.2
requirements still resolve to the fork -- confirmed, the rust lockfile now
reads libc v0.2.189+rb0.3.2 from the path source. A -rb suffix would be
read as a pre-release and would NOT satisfy them, which is exactly why the
project mandates +rb.

Two things this surfaced:

- fork-upstream-map: libc moved from snapshot to diverged. The fork is
  vendored from the crates.io PACKAGE, whose file set differs from the
  upstream git tag by construction (no .github/, adds
  .cargo_vcs_info.json), so a tag content-diff reported differences that
  mean nothing -- 'missing files that exist in upstream' for files the
  package never ships. diverged states the real relationship.

- local/recipes/dev/gcc16/.vendored-upstream added. Extracting GCC 16.1.0
  put upstream's vendored Rust crates under local/recipes/*/source/, so
  sync-versions.sh treated datafrog/log/polonius-engine as Cat 1 in-house
  crates and wanted to stamp them 0.3.2. The marker is the documented
  escape hatch (BUILD-SYSTEM.md section 7).

Both gates clean: verify-fork-versions reports no violations,
sync-versions --check reports no gcc16 drift.
This commit is contained in:
2026-08-03 18:20:06 +03:00
parent 09ba5201f4
commit f02504b863
4 changed files with 19 additions and 6 deletions
+9 -4
View File
@@ -4,6 +4,9 @@
upstream `libc` carries the Redox bindings.
**Location:** `local/sources/libc/`
**Base:** crates.io `libc` 0.2.189, unmodified except `src/unix/redox/mod.rs`.
**Version label:** `0.2.189+rb<branch>` — Cat 2 convention. `+rb` is build
metadata, which semver ignores when matching, so `^0.2` requirements still
resolve to the fork. A `-rb` suffix would read as a pre-release and fail.
**Established:** 2026-08-03.
Related: `LOCAL-FORK-SUPREMACY-POLICY.md`, `FORK-BUMP-PATCHING-POLICY.md`,
@@ -62,10 +65,12 @@ libc = { path = "../../../../local/sources/libc" }
be read as a pre-release and fail to satisfy them — see `local/AGENTS.md`
§ "Version conventions".
Registered in `local/fork-upstream-map.toml` as a `snapshot` fork (its history
comes from the registry, not a git clone), with `src/unix/redox/mod.rs` on the
declarative expected-differ list in `verify-fork-versions.sh` so the content
check stays meaningful rather than being blanket-skipped.
Registered in `local/fork-upstream-map.toml` as `diverged`. The fork is vendored
from the crates.io **package**, whose file set differs from the upstream git tag
by construction — the package omits `.github/` and adds `.cargo_vcs_info.json`
so a tag content-diff reports differences that mean nothing. `snapshot` mode was
tried first and produced exactly that noise. `src/unix/redox/mod.rs` is also on
the expected-differ list in `verify-fork-versions.sh` for when the mode changes.
## Retiring this fork
+1 -1
View File
@@ -44,4 +44,4 @@ base https://gitlab.redox-os.org/redox-os/base.git main tr
# surface relibc already implements and the libc crate still omits as of
# 0.2.189. TEMPORARY: drop this fork once upstream libc carries the Redox
# bindings. See local/docs/VENDORED-LIBC-FORK.md.
libc https://github.com/rust-lang/libc.git 0.2.189 snapshot
libc https://github.com/rust-lang/libc.git 0.2.189 diverged # vendored from the crates.io PACKAGE, whose file set differs from the git tag by construction (no .github/, adds .cargo_vcs_info.json), so a tag content-diff is meaningless; divergence is confined to src/unix/redox/mod.rs
@@ -0,0 +1,8 @@
GCC 16.1.0 upstream source, extracted from source.tar and carrying the Redox
target port (local/patches/gcc-redox-port/). Its tree includes vendored Rust
crates under gcc/rust/checks/errors/borrowck/ffi-polonius/, which are upstream
third-party code and must keep their own versions.
Without this marker sync-versions.sh treats them as Cat 1 in-house crates and
reports drift, wanting to stamp datafrog/log/polonius-engine with the Red Bear
branch version. See local/docs/BUILD-SYSTEM.md section 7 "Forks & versioning".
+1 -1
View File
@@ -13,7 +13,7 @@
edition = "2021"
rust-version = "1.65"
name = "libc"
version = "0.2.189"
version = "0.2.189+rb0.3.2"
build = "build.rs"
exclude = [
"/ci/*",