Bug 1982410
Summary: | rubygem-rspec-support: FTBFS related to require 'rake/file_utils' | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 9 | Reporter: | Florian Weimer <fweimer> | ||||
Component: | rubygem-rspec-support | Assignee: | Pavel Valena <pvalena> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Jan Houska <jhouska> | ||||
Severity: | unspecified | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | CentOS Stream | CC: | bstinson, hhorak, jhouska, jwboyer, pvalena, vondruch | ||||
Target Milestone: | beta | Keywords: | Triaged | ||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | rubygem-rspec-core-3.10.1-7.el9 | Doc Type: | No Doc Update | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2021-12-07 21:52:33 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 1980998 | ||||||
Attachments: |
|
`rubygem-rake` is missing in the buildroot. It should've been required by rubygem-rspec-core, but it seems the runtime require is missing. Only difference I was able to found (in comparison to Fedora) is this: https://gitlab.com/redhat/centos-stream/rpms/rubygem-rspec-core/-/commit/ae1a6bd84e49a2588bfcf06bb40aa450ff1f4280 Other possibile difference is in soft dependencies handling, as the rubygem-rspec-core spec file contains: ``` Recommends: rubygem(rake) ``` I'd simply modify the runtime dependency from Recommends to Requires in the rubygem-rspec-core package, at least temporarily, as it achieves the exact desired state without any side-effects (it's not intended for other than buildroot use, AFAIK). Merge Request: https://gitlab.com/redhat/centos-stream/rpms/rubygem-rspec-core/-/merge_requests/2 mock doesn't install weak dependencies in my experience (at least in the configurations we use). You could use this: Recommends: rubygem(rake) Requires: (rubygem(rake) if redhat-rpm-config) here redhat-rpm-config serves as a marker package for “this is a buildroot-like environment”. This way, you can keep the dependency optional for other kinds of environments. It's what we plan to use for glibc-gconv-extra, which has similar issues around the buildroot (should be uninstallable for end users, so weak dependency, but must be included in the buildroot). Thanks! Amended. (In reply to Florian Weimer from comment #2) > mock doesn't install weak dependencies in my experience (at least in the > configurations we use). > > You could use this: > > Recommends: rubygem(rake) > Requires: (rubygem(rake) if redhat-rpm-config) Actually, upon more investigation, it turns out the `Recommends` was only RHEL- change. Probably with the intention to drop it. Not sure how that would be possible with current build failures. Also it previously built ok, so it was most probably pulled into the buildroot along with other dependencies. I'll revert the change. I've just stumbled upon this: https://gitlab.com/redhat/centos-stream/rpms/rubygem-rake/ - it is a 404 Where does the `rubygem-rake` package come from? Why is it available, without a repository, or a koji build? https://kojihub.stream.rdu2.redhat.com/koji/search?match=glob&type=package&terms=rubygem-rake rubygem-rake is a subpackage of ruby: $ dnf info info rubygem-rake […] Name : rubygem-rake Version : 13.0.3 Release : 150.el9 Architecture : noarch Size : 91 k Source : ruby-3.0.1-150.el9.src.rpm Repository : build Summary : Ruby based make-like utility URL : https://www.ruby-lang.org/ License : MIT Description : Rake is a Make-like program implemented in Ruby. Tasks and : dependencies are specified in standard Ruby syntax. (In reply to Florian Weimer from comment #7) > rubygem-rake is a subpackage of ruby: > You're right, my bad, I confused it with rack... sorry, I should've run the query. Should be fixed now, when built with: rubygem-rspec-core-3.10.1-7.el9 Please note that the rubygem-rspec-core build is held on gating-yaml.validation (probably missing gating). Previous version of rspec-core with runtime dependency on Rake was used when building the new version, therefore the rubygem-rake was pulled in. With updated version with the soft dependency, it cannot work anymore. Not easy to catch, sorry for the breakage. Nevertheless, I still think the soft dependency is the right solution and the Rake should be specified explicitly when needed. I had an discussion about it with Fedora maintainer, but it could have been prior weak dependencies were available. (In reply to Vít Ondruch from comment #11) > Previous version of rspec-core with runtime dependency on Rake was used when > building the new version, therefore the rubygem-rake was pulled in. With > updated version with the soft dependency, it cannot work anymore. Not easy > to catch, sorry for the breakage. It's required for multiple test suites, including the rspec-core one. As it's already included in Ruby, I opted for the easier solution, sorry. Alternative would be to have something like in Comment 2 (there's still time for a "fix"). > > Nevertheless, I still think the soft dependency is the right solution and > the Rake should be specified explicitly when needed. I had an discussion > about it with Fedora maintainer, but it could have been prior weak > dependencies were available. Yes, this is unfortunate. I still think it would be easier to test it in Fedora first, and merge into c9s subsequently, as it requires changes in multiple packages. (In reply to Pavel Valena from comment #12) > Yes, this is unfortunate. I still think it would be easier to test it in > Fedora first, and merge into c9s subsequently, as it requires changes in > multiple packages. I can validate changes on a CentOS Stream side tag over some weekend in August. The c9s builders have lots of spare capacity, and I have got scripts to submit builds. This is how I found this issue in the first place. Rebuilding Fedora is much harder. It's both larger, and the builders tend to be much more loaded. Eventually, I would like to see a program-level initiative to ensure that packages still build and pass gating, all the time, but it doesn't exist as of today. (Fedora is actually better in this regard, there is Koschei to find build problems.) (In reply to Pavel Valena from comment #12) > > Nevertheless, I still think the soft dependency is the right solution and > > the Rake should be specified explicitly when needed. I had an discussion > > about it with Fedora maintainer, but it could have been prior weak > > dependencies were available. > > Yes, this is unfortunate. I still think it would be easier to test it in > Fedora first, and merge into c9s subsequently, as it requires changes in > multiple packages. I have opened this PR to narrow this in Fedora: https://src.fedoraproject.org/rpms/rubygem-rspec-core/pull-request/4 There is probably no point to bother with this in RHEL9, so please keep the changes as they already are. Waived, as agreed on with PO and QE. As of current situation this BuildRoot package gating test would be of little value. Verified Rubygem-rspec-core packgae is now available in nightly compose -> https://download-node-02.eng.bos.redhat.com/rhel-9/nightly/RHEL-9-Beta/RHEL-9.0.0-20210804.6/compose/CRB/x86_64/os/Packages/rubygem-rspec-core-3.10.1-7.el9.noarch.rpm |
Created attachment 1801625 [details] build.log A rebuild of rubygem-rspec-support-3.10.2-1.el9.1 fails with an error during the %check phase: Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.yvfb9P + umask 022 + cd /builddir/build/BUILD + cd rspec-support-3.10.2 + LANG=C.UTF-8 + FAILFILE=() + FAILTEST=() + (( i = 0 )) + (( i < 0 )) + ruby -rrubygems -Ilib/ -S rspec spec/ Simplecov could not be loaded An error occurred while loading ./spec/rspec/support/spec/shell_out_spec.rb. - Did you mean? rspec ./spec/rspec/support/spec/stderr_splitter_spec.rb rspec ./spec/rspec/support/source/node_spec.rb Failure/Error: require 'rake/file_utils' LoadError: cannot load such file -- rake/file_utils # ./spec/rspec/support/spec/shell_out_spec.rb:1:in `<top (required)>' An error occurred while loading ./spec/rspec/support/warnings_spec.rb. - Did you mean? rspec ./spec/rspec/support/differ_spec.rb rspec ./spec/rspec/support_spec.rb rspec ./spec/rspec/support/source_spec.rb Failure/Error: require 'rake/file_utils' LoadError: cannot load such file -- rake/file_utils