oxidize-rb / rb-sys

Easily build Ruby native extensions in Rust
https://oxidize-rb.github.io/rb-sys/
Apache License 2.0
219 stars 34 forks source link

Dinosaur wants to build from source without a signing key... #378

Open gl-yziquel opened 2 months ago

gl-yziquel commented 2 months ago

Hi.

I'd like to build from source. A sort of personal hygiene.

I noticed the following in gem/rb_sys.gemspec:

spec.signing_key = File.expand_path("~/.ssh/gem-private_key.pem") if $0.end_with?("gem")

I could always circumvent that with a bit of hackery, but... I would greatly appreciate if there could be an easy way to build the gemfolder hierarchy with a simple command like bundle exec rake build.

Could it be possible to either consider a NO_SIGN environment variable or some explicit instructions as to how best to do it without the hassle of either brittle hackery or the overhead of creating a key in a folder location that I consider my personal private space ?

Best.

P.S.: For now, using sed -i.bak '/spec.signing_key/s/^/#/' rb_sys.gemspec.

ianks commented 2 months ago

I'd accept a PR which removes the check with RUBYGEMS_FORCE_DISABLE_GEM_SIGNING=true env var check

ianks commented 2 months ago

Done. Do you need me to cut a new release or is git sha good enough?

gl-yziquel commented 2 months ago

The git sha is good enough.