On Sat, Jul 10, 2021 at 8:51 PM Dan Allen <dan.j.allen(a)gmail.com> wrote:
Will the RPM build for a gem package pick up dependencies needed to run the test suite
from Gemfile, or do they have to be declared as development dependencies in the gemspec?
Hello,
you need to explicitly state the build dependencies (BuildRequires:), e.g.:
https://src.fedoraproject.org/rpms/rubygem-activesupport/blob/rawhide/f/r...
https://src.fedoraproject.org/rpms/rubygem-xmlrpc/blob/rawhide/f/rubygem-...
They're not generated automatically, at this point, but the runtime
dependencies are.
Also in the asciidoctor package in Fedora:
https://src.fedoraproject.org/rpms/rubygem-asciidoctor/blob/rawhide/f/rub...
you can see the build dependencies are disabled, as well as the test suite.
The bundler team seems to be suggesting that declaring development dependencies in the
gemspec is deprecated [1].
For rubygem packages I don't not think they're used, apart from a
"spec" file generator (gem2rpm), which requires manual modifications
afterwards.
Testsuite-wise I'm not sure whether some gems don't use it for the
dependencies (pre)loading, but that's not part of packaging.
Before I make any change to the packaged gems I maintain (asciidoctor
and asciidoctor-pdf), I want to make sure this won't break running the test suite when
building the RPM.
You can run a scratch build beforehand, to be sure!
Pavel