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?
The bundler team seems to be suggesting that declaring development dependencies in the gemspec is deprecated [1]. 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.
Thanks,
-Dan
[1] https://github.com/rubygems/rubygems/issues/4748
On Sat, Jul 10, 2021 at 8:51 PM Dan Allen dan.j.allen@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/ruby... https://src.fedoraproject.org/rpms/rubygem-xmlrpc/blob/rawhide/f/rubygem-xml...
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/rubyge... 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
Thanks,
-Dan
[1] https://github.com/rubygems/rubygems/issues/4748
-- Dan Allen (he, him, his) | @mojavelinux | https://twitter.com/mojavelinux
On Mon, Jul 12, 2021 at 9:59 AM Pavel Valena pvalena@redhat.com wrote:
On Sat, Jul 10, 2021 at 8:51 PM Dan Allen dan.j.allen@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/ruby... https://src.fedoraproject.org/rpms/rubygem-xmlrpc/blob/rawhide/f/rubygem-xml...
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/rubyge... you can see the build dependencies are disabled, as well as the test suite.
* for `%rhel`.
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
Thanks,
-Dan
[1] https://github.com/rubygems/rubygems/issues/4748
-- Dan Allen (he, him, his) | @mojavelinux | https://twitter.com/mojavelinux
Dne 10. 07. 21 v 20:49 Dan Allen napsal(a):
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?
gem2rpm can generate list of BuildRequires from gem. We don't use Gemfile for anything.
But honestly, while RPM provide facilities to generate build dependencies, I'd be against using them, because the dependencies are not "build" dependencies but "development" dependencies. I am afraid that in average, we would need to filter them heavily. My guess is that we would need to remove more then 50% of dependencies.
The bundler team seems to be suggesting that declaring development dependencies in the gemspec is deprecated [1].
.gemspec is the best place to specify any dependency IMHO. I don't understand why upstream is framing it like this. It'd be much better if every dependency is specified in .gemspec.
Vít
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.
Thanks,
-Dan
[1] https://github.com/rubygems/rubygems/issues/4748 https://github.com/rubygems/rubygems/issues/4748
-- Dan Allen (he, him, his) | @mojavelinux | https://twitter.com/mojavelinux https://twitter.com/mojavelinux
ruby-sig mailing list -- ruby-sig@lists.fedoraproject.org To unsubscribe send an email to ruby-sig-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/ruby-sig@lists.fedoraproject.o... Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
ruby-sig@lists.fedoraproject.org