Skip to content

fish: vendor Rust crates instead of system-crate BuildRequires - #159

Closed
kylerankin wants to merge 1 commit into
projectbluefin:mainfrom
kylerankin:main
Closed

kylerankin wants to merge 1 commit into
projectbluefin:mainfrom
kylerankin:main

Conversation

@kylerankin

@kylerankin kylerankin commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #19

Fedora 44 ships no binary crate RPMs, so the system-crate model
(%cargo_generate_buildrequires emitting BuildRequires: rust-*) can no
longer resolve fish's Rust dependencies and the build fails.

Vendor the dependency tree with cargo vendor --locked and build offline
against it:

  • Commit packages/fish/fish-4.6.0-vendor.tar.gz (Source11). Intentionally
    NOT listed in the sources lookaside manifest, because this factory
    cannot push to src.fedoraproject.org; source_pipeline only fetches
    sources-file entries, so a listed tarball would 404. The committed
    tarball is staged by build-stage's cp -a.
  • In %prep extract Source11 and switch %cargo_prep to
    %cargo_prep -v vendor, which emits [net] offline + crates-io ->
    vendored-sources.
  • Remove the %generate_buildrequires / %cargo_generate_buildrequires
    block that emitted the missing rust-* BuildRequires.
  • Add bundled(crate(...)) provides for every vendored crate.

The forked rust-pcre2 crate stays a path dep (Patch1001); the default
vendored-sources mapping covers the remaining crates.

Documented in agents/skills/fish-cargo-vendor/SKILL.md (router index updated too).

Signed-off-by: kylerankin kylerankin@users.noreply.github.com

🐝 Hive Agent: contributor | SHA: 170681a

— hive: backend=pi model=lemonade/Ornith-1.5-35B-A3B-GGUF-Q6_K pi=0.84.1

Fedora 44 ships no binary crate RPMs, so the system-crate model
(%cargo_generate_buildrequires emitting BuildRequires: rust-*) can no
longer resolve fish's Rust dependencies and the build fails.

Vendor the dependency tree with `cargo vendor --locked` and build offline
against it:

- Commit vendor-4.6.0-vendor.tar.gz in packages/fish/ (Source11). It is
  intentionally NOT listed in the `sources` lookaside manifest, because
  this factory cannot push to src.fedoraproject.org; source_pipeline only
  fetches sources-file entries, so a listed tarball would 404. The
  committed tarball is staged by build-stage's `cp -a`.
- In %prep extract Source11 and switch %cargo_prep to %cargo_prep -v
  vendor, which emits [net] offline + crates-io -> vendored-sources.
- Remove the %generate_buildrequires / %cargo_generate_buildrequires
  block that emitted the missing rust-* BuildRequires.
- Add bundled(crate(...)) provides for every vendored crate.

The forked rust-pcre2 crate stays a path dep (Patch1001); the default
vendored-sources mapping covers the remaining crates.

Documented in .agents/skills/fish-cargo-vendor/SKILL.md.

Signed-off-by: kylerankin <kylerankin@users.noreply.github.com>

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correctness review (at head 170681a)

Blocker — spec no longer parses; CI is already red on this PR.

  • packages/fish/fish.spec:196 — Provides: bundled(crate(wasi)) = 0.11.1+wasi-snapshot-preview1 has two - separators in the EVR. rpm rejects it: srpm/build jobs fail with error: line 196: Invalid version (double separator '-'): 0.11.1+wasi-snapshot-preview1 (see the srpm (fish) / build (fish) checks on this PR). Other distros' specs normalize the build metadata, e.g. 0.11.1+wasi_snapshot_preview1.
  • packages/fish/fish.spec:197 — bundled(crate(wasip2)) = 1.0.1+wasi-0.2.4 parses (single dash), but rpm treats it as version 1.0.1+wasi, release 0.2.4, which misstates the crate version. Normalize it the same way (1.0.1+wasi_0.2.4) while fixing line 196.

Verified correct (for the record, so a re-review isn't needed on these):

  • Vendor tarball contents exactly match the 114 new bundled(crate(...)) provides (fish.spec:91-204); the 2 extra vendored crates (pcre2/pcre2-sys 0.2.9) are covered by the pre-existing fork provide (fish.spec:90) and the new pcre2-sys line (fish.spec:145).
  • The "not in sources" claim holds: tools/source_pipeline.py (bundled_sources) only fetches sources-file entries, and build-stage.yml:216 stages packages/fish/ with cp -a, so Source11 is present without a lookaside fetch.
  • The git→path pcre2 reconciliation claim holds: fish's cmake/Rust.cmake invokes cargo without --locked, so Patch1001's path dep re-resolves offline against the vendored tree.

— hive: agent=reviewer backend=copilot model=claude-fable-5 copilot=1.0.78

@castrojo castrojo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Substantive review:

  • Blocker: Invalid RPM version syntax in fish.spec. Lines 196-197 specify Provides: bundled(crate(wasi)) = 0.11.1+wasi-snapshot-preview1, which contains multiple hyphens in the EVR version component. RPM spec parser strictly rejects this (Invalid version (double separator '-'): 0.11.1+wasi-snapshot-preview1), failing both srpm and rebuild0 jobs.
  • Outstanding: Author needs to sanitize crate version strings (e.g. using underscores 0.11.1+wasi_snapshot_preview1), followed by CI verification and independent review (+2).

@hanthor

hanthor commented Sep 20, 2026

Copy link
Copy Markdown
Member

Closing to consolidate the queue on the merged #178 full-factory candidate. The branch is retained; please re-open or submit a fresh, rebased PR after that build establishes the current baseline.

1 similar comment
@hanthor

hanthor commented Sep 20, 2026

Copy link
Copy Markdown
Member

Closing to consolidate the queue on the merged #178 full-factory candidate. The branch is retained; please re-open or submit a fresh, rebased PR after that build establishes the current baseline.

@hanthor hanthor closed this Sep 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

build: fish needs vendored cargo build (F44 has no crate RPMs)

3 participants