Skip to content

ggshield: add riscv64 build for 1.56.1 - #4754

Draft
luhenry wants to merge 6 commits into
mainfrom
port/ggshield
Draft

luhenry wants to merge 6 commits into
mainfrom
port/ggshield

Conversation

@luhenry

@luhenry luhenry commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

Compiles the native Rust ggshield dispatcher (fast path for secret scan ai-hook, hands everything else to ggshield-py). Upstream publishes no riscv64 wheel, so riscv64 falls back to the pure-Python wheel without it.

Mirrors upstream's wheels.yml linux job.

Differs from upstream

  • manylinux_2_39 riscv64 image instead of manylinux2014; wheel tagged manylinux_2_39_riscv64.
  • musllinux dropped - rfc3161-client and pydantic-core have no musllinux riscv64 wheel for the smoke test.
  • Smoke-test venv uses our index for pydantic-core and rfc3161-client.

Testing

  • same as upstream

License: OK

Patches

  • 0001-hatch_build-accept-riscv64-ELF-binaries.patch - To upstream (not submitted yet). hatch_build.py rejects the riscv64 dispatcher as an unknown ELF machine. riscv64-only.

luhenry added a commit that referenced this pull request Nov 9, 2026
The smoke test's venv seeded from cp311 gets ensurepip's bundled pip 24.0,
whose vendored packaging 21.3 yields no manylinux riscv64 tags, so it
rejected the correctly tagged manylinux_2_39_riscv64 wheel as unsupported.
_publish-wheel.yml now requires a matrix input (main's "publish:
Validate effective wheel targets"), but this PR branch forked before
that landed and ggshield has never been merged to main, so
build-ggshield.yml never picked up the matching one-line update every
already-published package's workflow got. The merge ref combines the
new required-input _publish-wheel.yml with this branch's old
build-ggshield.yml, so any run has failed startup with "Input matrix is
required, but not provided".

Pass it the same way the mass-update commit did for every other
package's publish job.
rustup-init was run with --default-toolchain none, relying on
rust/rust-toolchain.toml's directory-scoped pin (1.96.0) to supply a
toolchain when the dispatcher itself is built. That pin only applies
inside the ggshield checkout, though, and smoke-test-wheel installs
the built wheel into a fresh venv elsewhere: when pydantic-core or
rfc3161-client resolve to a release newer than pypi.riseproject.dev
has a riscv64 wheel for, pip falls back to building it from its sdist
there, and cargo has no default toolchain to fall back to -
"rustup could not choose a version of cargo to run, because one
wasn't specified explicitly, and no default is configured."

Set --default-toolchain stable instead, so any Rust sdist pip needs to
build outside the ggshield tree has a usable default; the dispatcher
build itself is unaffected, since rust-toolchain.toml's override still
takes precedence inside that tree.

This branch has not been deployed

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

1 participant