Issue #19297 has been updated by vo.x (Vit Ondruch).
hsbt (Hiroshi SHIBATA) wrote in #note-5:
How test `bundler` in Fedora builder?
We don't test Bundler unfortunately (in any automated way). But the Bundler test suite
is not executed as part of Ruby `make check`
It needs to download RSpec from
rubygems.org since
Ruby 2.5.
If this was just about RSpec, we could cope with that, at least for the independent
rubygem-bundler package we have in Fedora. Unfortunately, the Bundler test suite relies on
network connectivity in many other ways, if I am not mistaken.
Just FTR, we can execute the Bundler test suite locally or in
[
Copr](https://docs.fedoraproject.org/en-US/neurofedora/copr/) where we can enable network
connectivity (but that is manual process). Long term, we are considering to leverage
Fedora CI in some way (probably not via upstream test suite, because that is designed to
run in the Git repo clone, not to test the installed Bundler). However the tests enabled
during package build are the typically the most convenient way (and also closest to what
upstreams do) to know our package meets some standards.
----------------------------------------
Bug #19297: Don't download content from internet to execute Ruby test suite
https://bugs.ruby-lang.org/issues/19297#change-101038
* Author: vo.x (Vit Ondruch)
* Status: Open
* Priority: Normal
* ruby -v: ruby 3.2.0 (2022-12-25 revision a528908271) [x86_64-linux]
* Backport: 2.7: DONTNEED, 3.0: DONTNEED, 3.1: DONTNEED, 3.2: REQUIRED
----------------------------------------
Trying to build Ruby 3.2.0 for Fedora and execute its test suite via `make check` as we
always did [1], the test suite suddenly fails (while it was working with
commit:git|c5eefb7f37):
~~~
... snip ...
C-API Util function ruby_strtod
- converts a string to a double and returns the remaining string
- returns 0 and the full string if there's no numerical value
Finished in 45.737677 seconds
3827 files, 31635 examples, 177877 expectations, 0 failures, 0 errors, 0 tagged
./miniruby -I/builddir/build/BUILD/ruby-3.2.0/lib -I. -I.ext/common
/builddir/build/BUILD/ruby-3.2.0/tool/runruby.rb --extout=.ext -- --disable-gems -C
"/builddir/build/BUILD/ruby-3.2.0" bin/gem install --no-document \
--install-dir .bundle --conservative "bundler" "rake"
"rspec:~> 3" #"ruby-prof"
ERROR: Could not find a valid gem 'bundler' (>= 0), here is why:
Unable to download data from
https://rubygems.org/ - SocketError: Failed to open
TCP connection to rubygems.org:443 (getaddrinfo: Temporary failure in name resolution)
(
https://rubygems.org/specs.4.8.gz)
ERROR: Could not find a valid gem 'rspec' (~> 3), here is why:
Unable to download data from
https://rubygems.org/ - SocketError: Failed to open
TCP connection to rubygems.org:443 (getaddrinfo: Temporary failure in name resolution)
(
https://rubygems.org/specs.4.8.gz)
make: Leaving directory '/builddir/build/BUILD/ruby-3.2.0/redhat-linux-build'
make: *** [uncommon.mk:1464: yes-test-syntax-suggest-prepare] Error 2
~~~
This is obviously due to the test suite trying to download `rspec` from the internet,
while Fedora builders does not have internet access (and won't ever have for security
reasons). If I am not mistaken, this is caused by
commit:git|cae53842735237ccf71a13873fd0d1ae7f165582. Now
1) Can this be fixed?
2) Can the tarball be always self contained?
[1]:
https://src.fedoraproject.org/rpms/ruby/blob/631163e3b8a51ed610528181aabe0d…
--
https://bugs.ruby-lang.org/